Documentation

CsdLean4.LF3.Setup

LF3 Setup: signs, detector settings, system-apparatus interfaces, two-qubit Pauli layer #

Category: 3-Local (LF3 foundational types and concrete two-qubit Pauli / spin-projector layer).

Paper §2 / §9.4.

Defines the foundational types (Sign, DetectorSetting), the abstract pointer-readout and system-apparatus interfaces, and the concrete two-qubit Pauli / spin-projector layer used by Singlet/*. The setup-level matrix identities (§2.8: pauliDot_isHermitian, pauliDot_sq, spinProj_idem, spinProj_isHermitian, spinProj_complete) are proved below from DetectorSetting.sum_sq_components_eq_one, Sign.val_mul_self, and 2×2 matrix arithmetic.

Sign type #

inductive CSD.LF3.Sign :

Two-element sign type for outcome labels (paper §9.4).

Instances For
    @[instance_reducible]
    Equations
    @[instance_reducible]
    Equations
    Equations
    Instances For
      @[instance_reducible]

      Sign is a finite type with elements {plus, minus}. (Manual instance: the deriving Fintype handler regressed on a List.Nodup/Multiset.Nodup coercion under the Lean v4.33 toolchain; the explicit instance is equivalent and stable.)

      Equations

      Numerical value: .plus ↦ 1, .minus ↦ -1.

      Equations
      Instances For
        @[simp]
        theorem CSD.LF3.Sign.neg_neg (s : Sign) :
        s.neg.neg = s
        @[simp]
        theorem CSD.LF3.Sign.val_neg (s : Sign) :
        @[simp]
        theorem CSD.LF3.Sign.val_mul_self (s : Sign) :
        s.val * s.val = 1
        @[simp]
        theorem CSD.LF3.Sign.val_sq (s : Sign) :
        s.val ^ 2 = 1
        theorem CSD.LF3.Sign.sum_univ {α : Type u_1} [AddCommMonoid α] (f : Signα) :
        s : Sign, f s = f plus + f minus

        Sum over Sign as a two-term sum.

        Detector settings #

        Detector setting: a unit vector in ℝ³ (paper §2.5).

        Instances For

          For a unit vector in ℝ³, the sum of squared components is 1.

          Abstract pointer-readout algebra #

          Binary pointer-readout algebra on a finite-dimensional pointer Hilbert space K (paper §2.7, spec §9.11). Self-adjointness is stated via the inner-product equation directly, avoiding the Star typeclass synthesis on K →L[ℂ] K (which requires the adjoint construction + completeness).

          Instances For

            System-apparatus container #

            Finite-dimensional system-apparatus container (paper §2.7). Carrier types and instances are type parameters, Mathlib idiom.

            Instances For

              Concrete two-qubit Pauli / spin-projector layer #

              HAB := EuclideanSpace ℂ (Fin 2 × Fin 2).

              noncomputable def CSD.LF3.pauliDot (a : DetectorSetting) :
              Matrix (Fin 2) (Fin 2)

              Pauli operator σ·a = a_x σ_x + a_y σ_y + a_z σ_z as a 2×2 matrix.

              Equations
              Instances For
                noncomputable def CSD.LF3.sigmaDotLeft (a : DetectorSetting) :
                Matrix (Fin 2 × Fin 2) (Fin 2 × Fin 2)

                (σ·a) ⊗ I on HAB.

                Equations
                Instances For
                  noncomputable def CSD.LF3.sigmaDotRight (b : DetectorSetting) :
                  Matrix (Fin 2 × Fin 2) (Fin 2 × Fin 2)

                  I ⊗ (σ·b) on HAB.

                  Equations
                  Instances For
                    noncomputable def CSD.LF3.sigmaDotJoint (a b : DetectorSetting) :
                    Matrix (Fin 2 × Fin 2) (Fin 2 × Fin 2)

                    (σ·a) ⊗ (σ·b) on HAB.

                    Equations
                    Instances For
                      noncomputable def CSD.LF3.spinProj (s : Sign) (a : DetectorSetting) :
                      Matrix (Fin 2) (Fin 2)

                      One-qubit spin projector Πˢ(a) = (I + s σ·a) / 2.

                      Equations
                      Instances For
                        noncomputable def CSD.LF3.jointSpinProj (s t : Sign) (a b : DetectorSetting) :
                        Matrix (Fin 2 × Fin 2) (Fin 2 × Fin 2)

                        Joint two-qubit spin projector Πˢ(a) ⊗ Πᵗ(b).

                        Equations
                        Instances For

                          Setup theorem targets (paper §2.8) #

                          Each proof reduces to straightforward 2×2 matrix arithmetic over Mathlib's Matrix / !![…] API plus DetectorSetting.sum_sq_components_eq_one and Sign.val_mul_self.

                          σ·a is Hermitian. Cell-by-cell from the pauliDot definition: diagonal entries are real (so star = id), off-diagonal entries are a_x ∓ i a_y (star = flip the imaginary part).

                          (σ·a)² = I for a unit vector a. Diagonal entries collapse to a_0² + a_1² + a_2² = 1 via Complex.I_sq = -1; off-diagonal entries cancel pairwise.

                          The spin projector is Hermitian. (1/2) • (1 + s • σ·a) is real-linear in the Hermitian operator pauliDot a; both scalars 1/2 and s.val are real, so star-fixed.

                          The spin projector is idempotent. Expand ((1/2) • A)² = (1/4) • A², where A² = (1 + s·σ)² = 1 + 2s·σ + s²·σ² = 2 + 2s·σ = 2A via pauliDot_sq and Sign.val_mul_self.

                          The two spin projectors sum to the identity.

                          Pointer-completeness re-exports (paper §2.8) #

                          Pointer-completeness re-export, A side (paper §2.8).

                          Pointer-completeness re-export, B side.