energy_filter_sequence_purity_scale
For any sequence filter a : ℤ → ℝ, any nonzero real scalar c, and any natural number k, the purity of the scaled filter energy_filter_sequence_purity (fun j => c * a j) k equals energy_filter_sequence_purity a k.
Statement
theorem energy_filter_sequence_purity_scale (a : ℤ → ℝ) (c : ℝ) (hc : c ≠ 0) (k : ℕ) : energy_filter_sequence_purity (fun j => c * a j) k = energy_filter_sequence_purity a k
- Related work
- 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 any sequence $a : \mathbb{Z} \to \mathbb{R}$, any non-zero real number $c$, and any natural number $k$, the energy filter sequence purity of the scaled sequence $(j \mapsto c \cdot a(j))$ at $k$ is equal to the energy filter sequence purity of $a$ at $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 purity of an energy filter sequence is defined as the ratio tr(R²) / (tr R)², where R = M Mᵀ is the Gram matrix formed from the sequence. Scaling the sequence by a nonzero factor c scales M by c, which scales R by c², its square R² by c⁴, and (tr R)² by (c²)² = c⁴. Because c ≠ 0, the common factor c⁴ cancels between the numerator and denominator, leaving the purity invariant.
The purity definition is expanded, and the matrix corresponding to the scaled sequence c * a is identified with c • M, where M is the matrix for a.
Unfolding the definition of energy_filter_sequence_purity reveals that purity is computed from a matrix of sequence evaluations. Letting M be this matrix for the sequence a, the matrix for the scaled sequence j ↦ c * a j is definitionally equal to c • M (recorded as hM). Substituting hM rewrites the LHS purity in terms of c • M.
open Matrix in dsimp only [energy_filter_sequence_purity] let M : Matrix (Fin (2 * k) → Bool) (Fin (2 * k) → Bool) ℝ := fun sA sB => a ((2 * ↑k - ∑ j, if sA j = true then 1 else 0) - ∑ j, if sB j = true then 1 else 0) have hM : (fun sA sB => c * a ((2 * ↑k - ∑ j, if sA j = true then 1 else 0) - ∑ j, if sB j = true then 1 else 0)) = c • M := rfl rw [hM]
The Gram matrix of the scaled filter satisfies (c • M) * (c • M)ᵀ = c² • R, where R = M * Mᵀ.
Defining R = M * Mᵀ, we distribute the transpose across scalar multiplication via transpose_smul to obtain (c • M) * (c • Mᵀ). Pulling the scalars out of the matrix product using smul_mul and Matrix.mul_smul, and combining them into c² via smul_smul and sq, establishes that the scaled Gram matrix is c² • R. Rewriting with hR replaces (c • M) * (c • M)ᵀ with c² • R.
uses
transpose_smul,smul_mul,Matrix.mul_smul,smul_smul,sqlet R := M * Mᵀ have hR : (c • M) * (c • M)ᵀ = (c ^ 2) • R := by rw [transpose_smul, smul_mul, Matrix.mul_smul, smul_smul, sq] rw [hR]
The square of the scaled Gram matrix satisfies (c² • R) * (c² • R) = c⁴ • (R * R).
Factoring out both scalar factors c² using smul_mul and Matrix.mul_smul and combining them with smul_smul gives (c² * c²) • (R * R). The scalar product c² * c² simplifies to c⁴ by ring arithmetic (ring). Rewriting with hR2 puts the numerator matrix product into this form.
uses
smul_mul,Matrix.mul_smul,smul_smulhave hR2 : ((c ^ 2) • R) * ((c ^ 2) • R) = (c ^ 4) • (R * R) := by rw [smul_mul, Matrix.mul_smul, smul_smul] congr 1 ring rw [hR2]
The scalar c⁴ is factored out of both the numerator and denominator traces, yielding (c⁴ * (R * R).trace) / (c⁴ * R.trace²).
By linearity of the matrix trace (trace_smul) and converting scalar multiplication on reals to standard multiplication (smul_eq_mul), the numerator trace becomes c⁴ * (R * R).trace and the denominator becomes (c² * R.trace)². Expanding the denominator square via ring arithmetic gives (c² * R.trace)² = c⁴ * R.trace², which is substituted in with hsq.
uses
trace_smul,smul_eq_mulrw [trace_smul, trace_smul, smul_eq_mul, smul_eq_mul] have hsq : (c ^ 2 * R.trace) ^ 2 = c ^ 4 * R.trace ^ 2 := by ring rw [hsq]
The common scalar factor c⁴ cancels, leaving the purity of the unscaled filter.
Since c ≠ 0, its fourth power c⁴ is nonzero by pow_ne_zero. The common factor c⁴ in the numerator and denominator is cancelled using mul_div_mul_left, completing the equality.
uses
mul_div_mul_left,pow_ne_zeroexact mul_div_mul_left _ _ (pow_ne_zero 4 hc)
transpose_smul- The transpose of a scalar multiple of a matrix equals the scalar multiple of its transpose: (c • M)ᵀ = c • Mᵀ
smul_mul- Left scalar multiplication factors out of a matrix product: (a • M) * N = a • (M * N)
Matrix.mul_smul- Right scalar multiplication factors out of a matrix product: M * (a • N) = a • (M * N)
smul_smul- Consecutive scalar multiplications combine as multiplication of the scalars: a₁ • (a₂ • b) = (a₁ * a₂) • b
sq- The square of an element is the product of that element with itself: a ^ 2 = a * a
trace_smul- The trace of a scalar multiple of a matrix is the scalar times the trace: (r • A).trace = r • A.trace
smul_eq_mul- Scalar multiplication on the ring itself coincides with multiplication: a • b = a * b
mul_div_mul_left- A common nonzero factor cancels from the numerator and denominator: (c * a) / (c * b) = a / b when c ≠ 0
pow_ne_zero- A natural power aⁿ of a nonzero element a is nonzero
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
Choose a tactic — a marked line — to see the goals Lean had before and after it, as in Lean’s infoview. Step with ← → or j k.
/-- The energy-filtered purity is invariant under nonzero scalar multiplication of the filter sequence. -/theorem energy_filter_sequence_purity_scale (a : ℤ → ℝ) (c : ℝ) (hc : c ≠ 0) (k : ℕ) : energy_filter_sequence_purity (fun j => c * a j) k = energy_filter_sequence_purity a k := by open Matrix in dsimp only [energy_filter_sequence_purity] let M : Matrix (Fin (2 * k) → Bool) (Fin (2 * k) → Bool) ℝ := fun sA sB => a ((2 * ↑k - ∑ j, if sA j = true then 1 else 0) - ∑ j, if sB j = true then 1 else 0) have hM : (fun sA sB => c * a ((2 * ↑k - ∑ j, if sA j = true then 1 else 0) - ∑ j, if sB j = true then 1 else 0)) = c • M := rfl rw [hM] let R := M * Mᵀ have hR : (c • M) * (c • M)ᵀ = (c ^ 2) • R := by rw [transpose_smul, smul_mul, Matrix.mul_smul, smul_smul, sq] rw [hR] have hR2 : ((c ^ 2) • R) * ((c ^ 2) • R) = (c ^ 4) • (R * R) := by rw [smul_mul, Matrix.mul_smul, smul_smul] congr 1 ring rw [hR2] rw [trace_smul, trace_smul, smul_eq_mul, smul_eq_mul] have hsq : (c ^ 2 * R.trace) ^ 2 = c ^ 4 * R.trace ^ 2 := by ring rw [hsq] exact mul_div_mul_left _ _ (pow_ne_zero 4 hc)