AFTD Auto-Formalizing Theoretical Domains

xx_interaction_hamiltonian

def

The interaction Hamiltonian V of an open XX spin chain of length n is the sum of nearest-neighbor flip-flop exchange terms, acting on computational basis states by hopping excitations between adjacent sites.

Statement

open scoped Classical in
noncomputable def xx_interaction_hamiltonian (n : ℕ) : Matrix (Fin n → Bool) (Fin n → Bool) ℂ
Defined in
arXiv:2611.05010, Sec. VI
Verified
17 Nov 2026
Axioms
none listed
Used by 2
  • xx_total_thresholdFor an open XX spin chain of length n at inverse temperature beta > 0, xx_total_threshold n beta is the infimum of couplings g > 0 such…
  • xx_incoherent_thresholdFor an open XX spin chain of length n at inverse temperature beta > 0, xx_incoherent_threshold n beta is the infimum of couplings g > 0…

Read back from the Lean

A definition xx_interaction_hamiltonian that takes a natural number n and returns a (Fin n → Bool) × (Fin n → Bool) matrix over ℂ. For any two configurations s, s' : Fin n → Bool, the (s, s')-entry is defined to be: - 1 : ℂ if there exists a natural number i with i + 1 < n such that: 1. s(i) ≠ s(i + 1), 2. s'(i) = s(i + 1), 3. s'(i + 1) = s(i), and 4. for all natural numbers j with j < n, if j ≠ i and j ≠ i + 1, then s'(j) = s(j); - 0 : ℂ otherwise.

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

Lean source view module on GitHub

open scoped Classical in
/-- Open XX chain nearest-neighbor exchange interaction V = (1/2) sum_{i=1}^{n-1} (X_i X_{i+1} + Y_i Y_{i+1}). -/
noncomputable def xx_interaction_hamiltonian (n : ℕ) : Matrix (Fin n → Bool) (Fin n → Bool) ℂ := fun s s' =>
  if ∃ (i : ℕ) (hi : i + 1 < n),
    s ⟨i, Nat.lt_of_succ_lt hi⟩ ≠ s ⟨i + 1, hi⟩ ∧
    s' ⟨i, Nat.lt_of_succ_lt hi⟩ = s ⟨i + 1, hi⟩ ∧
    s' ⟨i + 1, hi⟩ = s ⟨i, Nat.lt_of_succ_lt hi⟩ ∧
    (∀ (j : ℕ) (hj : j < n), j ≠ i → j ≠ i + 1 → s' ⟨j, hj⟩ = s ⟨j, hj⟩)
  then (1 : ℂ) else 0
See it in the graphDiscuss this resultChallenge it