AFTD Auto-Formalizing Theoretical Domains

vector_seq_max_entry_constant

theoremverified

For positive integers n and k, the maximum entry of a constant sequence of vectors equal to c is c.

Statement

theorem vector_seq_max_entry_constant {n k : ℕ} (hn : 0 < n) (hk : 0 < k) (c : ℕ) :
    vector_seq_max_entry (fun (_ : Fin n) (_ : Fin k) => c) = c
Source
arXiv:2610.26970 Def 1.1
Verified
24 Oct 2026
Axioms
Classical.choiceQuot.soundpropext
Built on 1
  • vector_seq_max_entryThe maximum entry max_{i, j} a_i(j) of a vector sequence a : Fin n → Fin k → ℕ, defined as the supremum of a i j over all pairs (i, j).
Used by 3

Read back from the Lean

For any natural numbers $n$ and $k$ satisfying $0 < n$ and $0 < k$, and for any natural number $c$, the maximum entry (vector_seq_max_entry) of the constant function $(\lambda \_ \_ \mapsto c) : \text{Fin } n \to \text{Fin } k \to \mathbb{N}$ is equal to $c$.

Written by a model that saw only the Lean, never the English above. If the two disagree, that is worth a challenge.

The proof, explained

Unfolding the definition of `vector_seq_max_entry` reduces the goal to taking the supremum of a constant function with value c over the universal finset of index pairs in Fin n × Fin k. Since n and k are both positive, this index set is nonempty, witnessed by the index pair (0, 0). The lemma `Finset.sup_const` then evaluates the supremum of the constant function over this nonempty finset to c.

  1. The maximum entry is rephrased as the supremum of the constant function over all index pairs in Fin n × Fin k.

    Unfolding the definition of `vector_seq_max_entry` expresses the maximum entry as the supremum over the full finite set `Finset.univ` of pairs (p.1, p.2) of indices.

    line 4

      unfold vector_seq_max_entry
  2. The supremum of the constant value c over the nonempty set of index pairs is c.

    Because n > 0 and k > 0, the pair of zero indices (0, 0) is well-defined and belongs to `Finset.univ` by `Finset.mem_univ`, providing a witness that the index set is nonempty. Applying `Finset.sup_const` completes the proof by showing that the supremum of a constant function c over this nonempty finset is c.

    line 5

    uses Finset.sup_const, Finset.mem_univ

      exact Finset.sup_const ⟨(⟨0, hn⟩, ⟨0, hk⟩), Finset.mem_univ _⟩ c
Finset.sup_const
The supremum of a constant function taking value c over a non-empty finite set equals c.
Finset.mem_univ
Every element of a finite type is a member of its universal finset.

Written by a model (gemini-3.8-flash) from the Lean proof and the goal states Lean reported at each step. Lean verified the proof; this explanation is a reading aid and is not itself machine-checked.

Lean source view module on GitHub

/-- The maximum entry of a constant vector sequence equals the constant value. -/theorem vector_seq_max_entry_constant {n k : ℕ} (hn : 0 < n) (hk : 0 < k) (c : ℕ) :    vector_seq_max_entry (fun (_ : Fin n) (_ : Fin k) => c) = c := by  unfold vector_seq_max_entry  exact Finset.sup_const ⟨(⟨0, hn⟩, ⟨0, hk⟩), Finset.mem_univ _⟩ c
See it in the graphDiscuss this resultChallenge it