Documentation

Q2Presentation.Quadratic.ConstrainedGauss

Stage G / P6 — the constrained quadratic Gauss transform (lem:constrainedgauss) #

This file formalizes the finite quadratic-form algebra consumed by the §8 zero-edge formula (prop:zeroedge, reference/q2_manuscript.tex l.4314–4369):

Everything here is pure finite linear algebra over F₂ — no arithmetic input, no axioms; the two sources enter only later, through the common value of G(Q⁰) (prop:candidatezero l.2731 / prop:localzero l.3349, see Quadratic/GaussSumValue.lean and audit/BLOCKR_P6_DESIGN.md).

Proof idioms deliberately mirror the green Quadratic/DicksonCount.lean (sign-character expansion, translation reindexing, Finset calculus).

Part 0 — char-2 and dual-space helpers #

theorem Q2Presentation.Quadratic.char2_add_eq_zero_iff {M : Type u_1} [AddCommGroup M] [Module (ZMod 2) M] (a b : M) :
a + b = 0 ↔ a = b

In a ZMod 2-module, a + b = 0 ↔ a = b.

The dual of a finite F₂-module is finite.

Finite F₂ duality preserves cardinality: |E^∨| = |E|.

1 + χ(a) = 2·[a = 0] for the sign character (the ε-indicator expansion of lem:constrainedgauss, l.3898–3899).

theorem Q2Presentation.Quadratic.sum_signChar_dual {E : Type u_1} [AddCommGroup E] [Module (ZMod 2) E] [Fintype (Module.Dual (ZMod 2) E)] (v : E) :
∑ χ : Module.Dual (ZMod 2) E, Dickson.signChar (χ v) = if v = 0 then ↑(Fintype.card (Module.Dual (ZMod 2) E)) else 0

Dual orthogonality over F₂: ∑_{χ ∈ E^∨} (-1)^{χ(v)} is |E^∨| at v = 0 and 0 otherwise (the κ-indicator expansion of lem:constrainedgauss, l.3898–3899; nontrivial characters cancel by translation).

Part 1 — completed square, linear shifts, and representing vectors #

theorem Q2Presentation.Quadratic.QuadF2.completedSquare {V : Type u_1} [AddCommGroup V] [Module (ZMod 2) V] (q : QuadF2 V) (a x : V) :
q.form x + (q.polar a) x = q.form (x + a) + q.form a

The completed square (prop:phaseidentity's algebraic core, l.4137–4142; the square-completion step of lem:constrainedgauss, l.3899–3904): Q(x) + b_Q(a, x) = Q(x + a) + Q(a).

Adding a linear term to a QuadF2 (eq:Qkappadifference l.2158–2163 / eq:candidategeneralQ l.2487–2491 at form level, constants dropped): the polar form is unchanged.

Equations
  • q.addLinear l = { form := fun (x : V) => q.form x + l x, polar := q.polar, form_zero := ⋯, form_add := ⋯ }
Instances For
    @[simp]
    theorem Q2Presentation.Quadratic.QuadF2.addLinear_form {V : Type u_1} [AddCommGroup V] [Module (ZMod 2) V] (q : QuadF2 V) (l : Module.Dual (ZMod 2) V) (x : V) :
    (q.addLinear l).form x = q.form x + l x

    A linear shift preserves nonsingularity (same polar form). This is why the zero-edge count of the actual pushout form Q_κ may be computed against the base form Q⁰ (prop:zeroedge l.4358–4366).

    Nonsingularity makes the polar map a ↦ b_Q(a, ·) injective into the dual.

    Nonsingularity + finiteness make the polar map a bijection onto the dual (existence-uniqueness of the representing vectors a_χ, lem:constrainedgauss l.3883–3885).

    theorem Q2Presentation.Quadratic.QuadF2.exists_polarRep {V : Type u_1} [AddCommGroup V] [Module (ZMod 2) V] [Finite V] (q : QuadF2 V) (hns : q.Nonsingular) (ψ : Module.Dual (ZMod 2) V) :
    ∃ (a : V), q.polar a = ψ

    Every functional on a finite nonsingular quadratic space is represented by the polar form: ∃ a, b_Q(a, ·) = ψ.

    theorem Q2Presentation.Quadratic.QuadF2.polarRep_unique {V : Type u_1} [AddCommGroup V] [Module (ZMod 2) V] (q : QuadF2 V) (hns : q.Nonsingular) {a a' : V} (h : ∀ (x : V), (q.polar a) x = (q.polar a') x) :
    a = a'

    The representing vector is unique, so the phase Q(a_χ) of eq:constrainedgauss is well-defined.

    Part 2 — the constrained zero count and the Gauss transform #

    def Q2Presentation.Quadratic.constrainedZeros {W : Type u_1} {E : Type u_2} [AddCommGroup W] [Module (ZMod 2) W] [AddCommGroup E] [Module (ZMod 2) E] (L : W →ₗ[ZMod 2] E) (Q : QuadF2 W) (l : Module.Dual (ZMod 2) W) (κ : E) (ε : ZMod 2) :

    N(κ, ε) — the constrained count of lem:constrainedgauss (l.3879–3882), with an affine (linear-term) refinement: #{x : L x = κ ∧ Q(x) + ℓ(x) = ε}. At ℓ = 0 this is the manuscript's N(κ,ε); the affine form is what prop:zeroedge consumes through eq:Qkappadifference (the actual pushout form Q_κ is base-plus-linear, its constant part being absorbed into ε).

    Equations
    Instances For
      theorem Q2Presentation.Quadratic.constrainedGauss_count {W : Type u_1} {E : Type u_2} [AddCommGroup W] [Module (ZMod 2) W] [Fintype W] [AddCommGroup E] [Module (ZMod 2) E] [Finite E] [Fintype (Module.Dual (ZMod 2) E)] (L : W →ₗ[ZMod 2] E) (hL : Function.Surjective ⇑L) (Q : QuadF2 W) (l : Module.Dual (ZMod 2) W) (A : Module.Dual (ZMod 2) E → W) (hA : ∀ (χ : Module.Dual (ZMod 2) E) (x : W), (Q.polar (A χ)) x = χ (L x) + l x) (κ : E) (ε : ZMod 2) :
      2 * ↑(Nat.card E) * ↑(constrainedZeros L Q l κ ε) = ↑(Nat.card W) + Dickson.gaussSum Q * ∑ χ : Module.Dual (ZMod 2) E, Dickson.signChar (χ κ + ε + Q.form (A χ))

      The constrained quadratic Gauss transform (lem:constrainedgauss, eq:constrainedgauss l.3888–3894, in the affine form consumed by eq:pointwiseconstrained l.4332–4340):

        2·|E|·N(κ,ε) = |W| + G(Q⁰)·∑_{χ ∈ E^∨} (-1)^{χ(κ) + ε + Q⁰(a_χ)}
      

      for L : W ↠ E, Q⁰ a quadratic form with representing vectors b_{Q⁰}(a_χ, ·) = χ∘L + ℓ, and N(κ,ε) = #{x : Lx = κ, Q⁰(x) + ℓ(x) = ε}. The Gauss sum G(Q⁰) = ∑_x (-1)^{Q⁰(x)} is Dickson.gaussSum; the phase Q⁰(a_χ) is the manuscript's Θ_q^0(a_{χ,κ})-value (eq:Theta0phase).

      Note the hypotheses are weaker than the manuscript's: nonsingularity is not needed once the representing vectors A are supplied (it is needed only for their existence — constrainedGauss_count_exists), and surjectivity of L is used only to cancel nontrivial characters.

      theorem Q2Presentation.Quadratic.constrainedGauss_count_pure {W : Type u_1} {E : Type u_2} [AddCommGroup W] [Module (ZMod 2) W] [Fintype W] [AddCommGroup E] [Module (ZMod 2) E] [Finite E] [Fintype (Module.Dual (ZMod 2) E)] (L : W →ₗ[ZMod 2] E) (hL : Function.Surjective ⇑L) (Q : QuadF2 W) (A : Module.Dual (ZMod 2) E → W) (hA : ∀ (χ : Module.Dual (ZMod 2) E) (x : W), (Q.polar (A χ)) x = χ (L x)) (κ : E) (ε : ZMod 2) :
      2 * ↑(Nat.card E) * ↑(Nat.card { x : W // L x = κ ∧ Q.form x = ε }) = ↑(Nat.card W) + Dickson.gaussSum Q * ∑ χ : Module.Dual (ZMod 2) E, Dickson.signChar (χ κ + ε + Q.form (A χ))

      lem:constrainedgauss verbatim (eq:constrainedgauss, l.3888–3894): the pure case ℓ = 0, i.e. 2·|E|·#{x : Lx = κ, Q(x) = ε} = |W| + G(Q)·∑_χ (-1)^{χ(κ)+ε+Q(a_χ)} with b_Q(a_χ,·) = χ∘L.

      theorem Q2Presentation.Quadratic.constrainedGauss_count_exists {W : Type u_1} {E : Type u_2} [AddCommGroup W] [Module (ZMod 2) W] [Fintype W] [AddCommGroup E] [Module (ZMod 2) E] [Finite E] [Fintype (Module.Dual (ZMod 2) E)] (L : W →ₗ[ZMod 2] E) (hL : Function.Surjective ⇑L) (Q : QuadF2 W) (hns : Q.Nonsingular) (l : Module.Dual (ZMod 2) W) (κ : E) (ε : ZMod 2) :
      ∃ (A : Module.Dual (ZMod 2) E → W), (∀ (χ : Module.Dual (ZMod 2) E) (x : W), (Q.polar (A χ)) x = χ (L x) + l x) ∧ 2 * ↑(Nat.card E) * ↑(constrainedZeros L Q l κ ε) = ↑(Nat.card W) + Dickson.gaussSum Q * ∑ χ : Module.Dual (ZMod 2) E, Dickson.signChar (χ κ + ε + Q.form (A χ))

      lem:constrainedgauss in existential form: for a nonsingular Q the representing vectors exist (b_Q(a_χ,·) = χ∘L + ℓ, unique by QuadF2.polarRep_unique) and the transform holds for them. This is the exact package prop:zeroedge consumes at W := H¹-model, E := H²(T)-model, L := ∂, κ := ρ*e, ℓ := ⟨·, ρ*γ_κ⟩ (eq:pointwiseconstrained).