AFTD Auto-Formalizing Theoretical Domains

PauliNZ.toBasis_ne_I

theoremverifiedimported Lean

Non-identity Paulis embed away from the identity. Write $\{X, Y, Z\}$ for the three non-identity Pauli labels, embedded in the natural way into the full Pauli basis $\{I, X, Y, Z\}$. Then the image of every such label differs from the identity element $I$.

Statement

set_option linter.mathlibStandardSet false in
open scoped BigOperators in
open scoped Real in
open scoped Nat in
open scoped Classical in
open scoped Pointwise in
set_option maxRecDepth 4000 in
set_option synthInstance.maxHeartbeats 20000 in
set_option synthInstance.maxSize 128 in
set_option relaxedAutoImplicit false in
set_option autoImplicit false in
open Complex Matrix in
lemma PauliNZ.toBasis_ne_I : ∀ a : PauliNZ, a.toBasis ≠ PauliBasis.I
Source
TCSlib, `PauliNZ.toBasis_ne_I`
Lean proof
By Allan Li, Hydroxyi (from the file's git history), from github.com/Shilun-Allan-Li/tcslib at c8a02591b1e5 (Apache-2.0). Compiled here against leanprover/lean4:v4.33.1, Mathlib v4.33.1; written for leanprover/lean4:v4.25.0.
Verified
07 Oct 2026
Axioms
propext
Built on 3
  • PauliNZ.toBasisEmbeds a non-identity Pauli ($X$, $Y$, or $Z$) from the three-element type $\mathrm{PauliNZ}$ into the full Pauli basis $\{I,X,Y,Z\}$.
  • PauliNZA 3-element type for non-identity single-qubit Pauli operators, used in counting arguments.
  • PauliBasisThe four Pauli basis elements $\{I,X,Y,Z\}$, represented as an inductive type.
Used by 1
  • support_mkWithSupportSupport of a Pauli string built from prescribed data. Fix $n$, a finset $S \subseteq \mathrm{Fin}\,n$, and an assignment…

Lean source view module on GitHub

set_option linter.mathlibStandardSet false inopen scoped BigOperators inopen scoped Real inopen scoped Nat inopen scoped Classical inopen scoped Pointwise inset_option maxRecDepth 4000 inset_option synthInstance.maxHeartbeats 20000 inset_option synthInstance.maxSize 128 inset_option relaxedAutoImplicit false inset_option autoImplicit false inopen Complex Matrix inlemma PauliNZ.toBasis_ne_I : ∀ a : PauliNZ, a.toBasis ≠ PauliBasis.I := by  intro a; cases a <;> simp [PauliNZ.toBasis]
See it in the graphDiscuss this resultChallenge it