AFTD Auto-Formalizing Theoretical Domains

pauli_theta

def

For an implicit natural number n and a Pauli string P : PauliString n, pauli_theta P is the real sign factor (-1 : ℝ) ^ k in ℝ, where k is the number of coordinates i : Fin n such that P i = PauliBasis.Y.

Statement

open Classical in
noncomputable def pauli_theta {n : ℕ} (P : PauliString n) : ℝ
Defined in
arXiv:2611.34872, eq. (3)
Verified
28 Nov 2026
Axioms
none listed
Built on 2
  • PauliBasisThe four Pauli basis elements $\{I,X,Y,Z\}$, represented as an inductive type.
  • PauliStringA Pauli string of length $n$ is a function $p : \mathrm{Fin}\,n \to \mathrm{PauliBasis}$.
Used by 2
  • pauli_theta_idFor any natural number n, the real sign factor pauli_theta evaluated on the all-identity Pauli string (fun _ : Fin n => PauliBasis.I)…
  • ppt_pauli_error_ratesFor an implicit natural number n, a function p : PauliString n → ℝ, and a Pauli string b : PauliString n, ppt_pauli_error_rates p b is the…

Read back from the Lean

Definition of a function pauli_theta: for a natural number $n$ (implicit) and a Pauli string $P : \text{Fin } n \to \text{PauliBasis}$, it returns the real number $(-1)^k$, where $k$ is the number of indices $i \in \text{Fin } n$ such that $P(i) = \text{PauliBasis.Y}$.

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 Classical in
/-- The real sign factor (-1)^(#Y in P) under computational basis matrix transposition for a Pauli string P. -/
noncomputable def pauli_theta {n : ℕ} (P : PauliString n) : ℝ := (-1 : ℝ) ^ (Finset.card (Finset.filter (fun i => P i = PauliBasis.Y) Finset.univ))
See it in the graphDiscuss this resultChallenge it