AFTD Auto-Formalizing Theoretical Domains

energy_filter_sequence_purity_zero

theoremverified

For any natural number k, the energy-filtered purity energy_filter_sequence_purity 0 k of the identically zero sequence 0 at parameter k is equal to zero.

Statement

theorem energy_filter_sequence_purity_zero (k : ℕ) :
    energy_filter_sequence_purity 0 k = 0
Source
arXiv:2405.02158 Energy-filtered quantum states and the emergence of non-local correlations
Verified
04 Nov 2026
Axioms
Classical.choiceQuot.soundpropext
Built on 1
  • energy_filter_sequence_purityGiven a sequence filter a : ℤ → ℝ and a parameter k : ℕ, energy_filter_sequence_purity a k is the Renyi-2 purity Tr((Tr_B…

Read back from the Lean

For every natural number $k$, the energy filter sequence purity of the constantly zero function $0 : \mathbb{Z} \to \mathbb{R}$ at parameter $k$ is equal to $0$.

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 energy-filtered purity of a sequence is defined in terms of a matrix M whose entries evaluate the sequence. For the identically zero sequence, M is the zero matrix. Substituting M = 0 makes the numerator and denominator zero, which evaluates to zero under Lean's convention that division by zero returns zero.

  1. Unfolding the definition, the statement reduces to showing that Tr((M Mᵀ)²) / (Tr(M Mᵀ))² = 0 for the matrix M formed by the zero sequence.

    Unfolding energy_filter_sequence_purity reveals that it constructs a matrix M indexed by Boolean strings of length 2k, whose entries evaluate the filter sequence on integer weights. We define M explicitly with the identically zero sequence and restate the goal in terms of M and its transpose.

    lines 4–9

      unfold energy_filter_sequence_purity
      let M : Matrix (Fin (2 * k) → Bool) (Fin (2 * k) → Bool) ℝ :=
        fun sA sB =>
          (0 : ℤ → ℝ) (2 * (k : ℤ) - (∑ j : Fin (2 * k), if sA j then 1 else 0) -
            (∑ j : Fin (2 * k), if sB j then 1 else 0))
      change ((M * M.transpose) * (M * M.transpose)).trace / ((M * M.transpose).trace) ^ 2 = 0
  2. The matrix M is the zero matrix (M = 0).

    By matrix extensionality, it suffices to check that each entry M i j is zero. Since the filter sequence is the constant zero function, every entry evaluates to 0, which simp verifies.

    lines 10–12

      have hM : M = 0 := by
        ext i j
        simp [M]
  3. The purity expression evaluates to 0.

    Substituting M = 0 into the expression turns every matrix product and transpose into the zero matrix, whose trace is 0. Simplifying the resulting arithmetic expression 0 / 0² yields 0 by Lean's division-by-zero convention.

    lines 13–14

      rw [hM]
      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

/-- Sanity lemma: the sequence purity vanishes when the filter sequence is identically zero. -/theorem energy_filter_sequence_purity_zero (k : ℕ) :    energy_filter_sequence_purity 0 k = 0 := by  unfold energy_filter_sequence_purity  let M : Matrix (Fin (2 * k) → Bool) (Fin (2 * k) → Bool) ℝ :=    fun sA sB =>      (0 : ℤ → ℝ) (2 * (k : ℤ) - (∑ j : Fin (2 * k), if sA j then 1 else 0) -        (∑ j : Fin (2 * k), if sB j then 1 else 0))  change ((M * M.transpose) * (M * M.transpose)).trace / ((M * M.transpose).trace) ^ 2 = 0  have hM : M = 0 := by    ext i j    simp [M]  rw [hM]  simp
See it in the graphDiscuss this resultChallenge it