PauliNZ.toBasis
defimported Lean
Embeds a non-identity Pauli ($X$, $Y$, or $Z$) from the three-element type $\mathrm{PauliNZ}$ into the full Pauli basis $\{I,X,Y,Z\}$.
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 noncomputable def PauliNZ.toBasis : PauliNZ → PauliBasis
- Defined in
- TCSlib, `PauliNZ.toBasis`
- 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.PauliNZ.toBasis← PauliNZ.toBasis (TCSlib/ErrorCorrectingCodes/QuantumHamming.lean:114): verbatim
- Verified
- 07 Oct 2026
- Axioms
- none listed
- Built on 2
- 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 3
- PauliNZ.toBasis_ne_INon-identity Paulis embed away from the identity. Write $\{X, Y, Z\}$ for the three non-identity Pauli labels, embedded in the natural way…
- mkWithSupportGiven a finset $S \subseteq \mathrm{Fin}\,n$ and an assignment $f : S \to \mathrm{PauliNZ}$, constructs the Pauli string that equals…
- card_pauliStringsExactSupportNumber of Pauli strings with a prescribed support. Let $n$ be a natural number and let $S \subseteq \mathrm{Fin}\,n$ be a set of…
Lean source view module on GitHub
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 /-- Embeds a non-identity Pauli into the full Pauli basis. -/ noncomputable def PauliNZ.toBasis : PauliNZ → PauliBasis | .X => .X | .Y => .Y | .Z => .Z