AFTD Auto-Formalizing Theoretical Domains

matrix_is_mortal_of_zero_mem

theoremverified

Any set of square matrices containing the zero matrix is mortal.

Statement

theorem matrix_is_mortal_of_zero_mem {m : Type*} [Fintype m] [DecidableEq m] {α : Type*} [Semiring α] {S : Set (Matrix m m α)} (h0 : 0 ∈ S) : matrix_is_mortal S
Source
folklore
Verified
06 Nov 2026
Axioms
Classical.choiceQuot.soundpropext
Built on 1
  • matrix_is_mortalA set of square matrices S is mortal if some non-empty finite product of matrices in S equals zero.

Read back from the Lean

Let $m$ be a finite type with decidable equality, let $\alpha$ be a semiring, and let $S$ be a set of $m \times m$ matrices with entries in $\alpha$. If the zero matrix belongs to $S$, then $S$ is mortal (matrix_is_mortal S).

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

To show that a set of matrices $S$ containing the zero matrix is mortal, it suffices to find a non-empty list of elements of $S$ whose product is zero. The singleton list $[0]$ immediately provides such a witness. Its only element belongs to $S$ by hypothesis, and its product is the zero matrix.

  1. $S$ is mortal, witnessed by the singleton list $[0]$

    To prove that $S$ is mortal, we provide the singleton list $[0]$ as a witness for the existential quantifier in the definition of mortality. This generates three subgoals: verifying that $[0] \neq []$, that every element of $[0]$ belongs to $S$, and that the product of $[0]$ is $0$. The first goal holds by definition of list emptiness; the second reduces to the assumption $h_0 : 0 \in S$; and the third holds because the product of a singleton list is its single element, the zero matrix. Each of these obligations is discharged by simplification.

    line 2

    theorem matrix_is_mortal_of_zero_mem {m : Type*} [Fintype m] [DecidableEq m] {α : Type*} [Semiring α] {S : Set (Matrix m m α)} (h0 : 0 ∈ S) : matrix_is_mortal S := ⟨[0], by simp, by simp [h0], by simp⟩

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

/-- Any set of matrices containing the zero matrix is mortal. -/theorem matrix_is_mortal_of_zero_mem {m : Type*} [Fintype m] [DecidableEq m] {α : Type*} [Semiring α] {S : Set (Matrix m m α)} (h0 : 0 ∈ S) : matrix_is_mortal S := ⟨[0], by simp, by simp [h0], by simp⟩
See it in the graphDiscuss this resultChallenge it