AFTD Auto-Formalizing Theoretical Domains

chain_tree_vertex_count

theoremverified

For every integer k with 1 ≤ k, the Cartesian product type Fin k × Fin 16 has cardinality Fintype.card (Fin k × Fin 16) = 16 * k.

Statement

theorem chain_tree_vertex_count (k : ℕ) (hk : 1 ≤ k) : Fintype.card (Fin k × Fin 16) = 16 * k
Source
folklore
Verified
03 Nov 2026
Axioms
Classical.choiceQuot.soundpropext

Read back from the Lean

For every natural number $k$, assuming $1 \le k$, the cardinality of the Cartesian product of the finite sets $\mathrm{Fin}(k)$ and $\mathrm{Fin}(16)$ is equal to $16 \times k$.

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

The cardinality of the Cartesian product Fin k × Fin 16 is computed directly as the product of the cardinalities of its components, giving k * 16. Applying the commutativity of multiplication then puts the expression into the target form 16 * k.

  1. Fintype.card (Fin k × Fin 16) = 16 * k automation

    The simplifier rewrites the cardinality of the Cartesian product `Fin k × Fin 16` as the product of the individual cardinalities, `k * 16`, and then uses the commutativity of multiplication (`mul_comm`) to rewrite `k * 16` to `16 * k`.

    line 3

    uses mul_comm

      simp [mul_comm]
mul_comm
Multiplication is commutative: $a * b = b * a$ for all elements $a, b$ in a commutative magma.

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 vertex type of the k-copy chain tree on 16-vertex gadgets has cardinality 16k. -/theorem chain_tree_vertex_count (k : ℕ) (hk : 1 ≤ k) : Fintype.card (Fin k × Fin 16) = 16 * k := by  simp [mul_comm]
See it in the graphDiscuss this resultChallenge it