Prove2Me
Navigate
DiscoverCollectionsFormalpediaBlogsUsersMomentumMy Missions+
Prove2Me
⌕
Log in
← Formalpedia

The Lean 4 theorem `nsBos_mul` in the `?` chapter of the timepiece formalization

Definition
ChapterNsBrstDerivativeGauge

by leonardopedro · Oct 21, 2026 · Mathlib 0df444a (Lean v4.33.1)

definitionsformalizationtimepiece

Formal definitions for the timepiece Lean 4 formalization (source chapter BookProof/ChapterNsBrstDerivativeGauge.lean): generated def bundle for ChapterNsBrstDerivativeGauge. See BookProof/ChapterNsBrstDerivativeGauge.lean for full context.

Definition code
import Theorems.Thm_BookProof_NavierStokesGaugeY_genY_leibniz

import Theorems.Thm_BookProof_NavierStokesGaugeY_genY_nsSymbol

import Theorems.Thm_BookProof_NavierStokesGaugeY_pderiv_swap

import Theorems.Thm_BookProof_NavierStokesGaugeY_pderiv_u_mul_uD

import Definitions.Def_ChapterNavierStokesGaugeY2
import Definitions.Def_ChapterQuantumGravityBrstCharge
import Definitions.Def_ChapterBRSTNilpotent
import Definitions.Def_ChapterNavierStokesGaugeY
import Mathlib


/-!
# The BRST charge of the Navier–Stokes derivative gauge, and its commutator with the Hamiltonian

`BookProof.ChapterNavierStokesGaugeY` and `BookProof.ChapterNavierStokesGaugeY2` build the
gauge fixing of the Navier–Stokes variables **that represent the derivatives in space of the
velocity field**: the modes `u_{i,j}` (and, at second order, `u_{i,jj}`) are constrained to be
the `y`-derivatives of the field `u_i(y)`, and the constraint is generated by

* `G_j = ∂/∂y_j − u_{i,j} ∂/∂u_i`  (`genY`, first order), respectively
* `G²_j = ∂/∂y_j − u_{i,j} ∂/∂u_i − u_{i,jj} ∂/∂u_{i,j}`  (`genY2`, second order).

Both families are abelian, hence first class, so they are exactly the situation BRST was made
for.  This module builds the BRST charge of that gauge fixing and proves the property the
whole construction rests on: **the charge commutes with the Navier–Stokes Hamiltonian.**

## What is proved

* **The ghost sector.**  `nsGhostSpace = Λ(ℂ³)` carries one ghost per gauge generator, with
  creation `nsGhostCre` (exterior multiplication) and annihilation `nsGhostAnn`
  (contraction); `nsGhost_car` is the canonical anticommutation relations.
* **The graded state space** `NSGraded = ℂ[x, y, u, u_{·,·}, u_{·,··}] ⊗ Λ(ℂ³)`, with the
  bosonic and ghost embeddings `nsBos`, `nsGh` (`nsBos_nsGh_comm`) and the ghosts
  `nsChi`, `nsBeta` (`nsGradedGhostCar`).
* **The Hamiltonian.**  `nsHamAlg nu = ∑_i (π^i A_i + A_i π^i)` with
  **`π^i = ∂/∂u_i` the momentum conjugate to the velocity field** (`genU`) and
  `A_i = u_j(y) u_{i,j} − ν u_{i,jj}` the Navier–Stokes symbol built from the *fields*
  (`BookProof.NavierStokesGaugeY.nsSymbol`); `nsHamAlg2` is the second-order version built
  from `nsSymbol2`.  `nsHamiltonian`, `nsHamiltonian2` are their images on `NSGraded`.

  The momentum is conjugate to `u`, not to the space coordinate `x`: `genU_ccr_u` is the
  canonical commutation relation `[π^i, u_k · ] = δ^i_k`.  The choice is not cosmetic.  With
  `π^i = ∂/∂u_i` the momentum does **not** commute with the symbol, `[∂/∂u_m, A_i] = u_{i,m}`
  (`genU_nsSymbol`, `genU_nsSymbol_ne_zero`), so the symmetrized ordering `π^i A_i + A_i π^i`
  carries real content; the superseded operator built with `∂/∂x_i` is kept as `nsHamAlgX`,
  and `nsHamAlg_ne_nsHamAlgX` shows that the two differ — already on the constant state
  (`nsHamAlg_one`, `nsHamAlgX_one`).
* **The BRST charges** `nsDerivBrstCharge = ∑_j G_j χ_j` and
  `nsDerivBrstCharge2 = ∑_j G²_j χ_j` (abelian constraints, so no cubic ghost term is
  needed), with `nsDerivBrstCharge_nilpotent`, `nsDerivBrstCharge2_nilpotent` (`Ω² = 0`) and
  `nsDerivBrstCharge_ne_zero`, `nsDerivBrstCharge2_ne_zero` (the charges are not the zero
  operator, so the statements below are not vacuous).
* **The headline** — `nsDerivBrstCharge_comm_hamiltonian`,
  `nsDerivBrstCharge2_comm_hamiltonian2`:

  `⁅Ω, H⁆ = 0`.

  The charge is odd and the Hamiltonian even, so the *correct* relation is the commutator,
  and it vanishes.  The mechanism is the gauge invariance of the Hamiltonian symbol
  (`genY_nsSymbol`, `genY2_nsSymbol2`) together with `genY_comm_genU`, `genY2_comm_genU`:
  the generator is a derivation that kills the symbol, so it commutes with multiplication by
  it, and it commutes with the velocity momenta `π^i = ∂/∂u_i` — the coefficients `u_{i,j}`,
  `u_{i,jj}` of the generator are independent canonical variables, so `∂/∂u_m` passes
  through them.  The correction of the momentum therefore changes the Hamiltonian but leaves
  the BRST commutator intact.
* **Consequences** — `nsHamiltonian_mapsTo_ker`, `nsHamiltonian_mapsTo_range` (the dynamics
  preserves the BRST-closed and the BRST-exact states) and hence
  `nsBrstCohomologyMap`: the Hamiltonian descends to the BRST cohomology of the derivative
  gauge; the same statements hold at second order.

That the order of the generator matters — the first-order generator is *not* a symmetry of
the second-order field — is recorded in
`BookProof.NavierStokesGaugeY2.genY_uField2_ne_zero`.

Everything is `sorry`-free and `axiom`-free.
-/

namespace BookProof.NavierStokesGaugeY

open MvPolynomial

/-- `genY_apply` — the gauge generator `G_j` acts as the stated first-order differential
operator.  The published `Def_ChapterNavierStokesGaugeY` text predates this lemma, so it
is restated here for the consumer. -/
theorem genY_apply (j : Fin 3) (p : NSAlg) :
    genY j p = pderiv (NSVar.y j) p - ∑ i : Fin 3, X (NSVar.uD i j) * pderiv (NSVar.u i) p := by
  simp [genY]

end BookProof.NavierStokesGaugeY

namespace BookProof.NsBrstDerivativeGauge

open MvPolynomial BookProof.BRSTNilpotent BookProof.QuantumGravityBrstCharge
open BookProof.NavierStokesGaugeY BookProof.NavierStokesGaugeY2

noncomputable section

/-! ## 1. The ghost sector: one ghost per gauge generator -/

/-- The ghost Fock space of the derivative gauge: one fermionic mode for each of the three
gauge generators `G_j`, realized as the exterior algebra `Λ(ℂ³)`. -/
abbrev nsGhostSpace : Type := ExteriorAlgebra ℂ (Fin 3 → ℂ)

/-- The ghost **creation** operator `χ_a`: exterior multiplication by the `a`-th basis
vector. -/
def nsGhostCre (a : Fin 3) : Module.End ℂ nsGhostSpace :=
  LinearMap.mulLeft ℂ (ExteriorAlgebra.ι ℂ (Pi.single a 1))

/-- The ghost **annihilation** operator `β_a`: contraction against the `a`-th coordinate. -/
def nsGhostAnn (a : Fin 3) : Module.End ℂ nsGhostSpace :=
  CliffordAlgebra.contractLeft (LinearMap.proj a)

/-- **The ghosts obey the canonical anticommutation relations.** -/
theorem nsGhost_car : GhostCAR nsGhostCre nsGhostAnn := by
  constructor
  · intro a b
    refine LinearMap.ext fun x => ?_
    simp only [nsGhostCre, LinearMap.add_apply, Module.End.mul_apply, LinearMap.mulLeft_apply,
      LinearMap.zero_apply, ← mul_assoc]
    rw [← add_mul, CliffordAlgebra.ι_mul_ι_add_swap]
    simp [QuadraticMap.polar]
  · intro a b
    refine LinearMap.ext fun x => ?_
    simp only [nsGhostAnn, LinearMap.add_apply, Module.End.mul_apply, LinearMap.zero_apply]
    rw [CliffordAlgebra.contractLeft_comm, neg_add_cancel]
  · intro a b
    refine LinearMap.ext fun x => ?_
    simp only [nsGhostCre, nsGhostAnn, LinearMap.add_apply, Module.End.mul_apply,
      LinearMap.mulLeft_apply, CliffordAlgebra.contractLeft_ι_mul]
    by_cases h : a = b
    · subst h; simp
    · simp [h]

/-! ## 2. The graded state space -/

/-- The **graded state space** of the derivative gauge: the polynomial algebra in the
canonical variables `x, y, u, u_{i,j}, u_{i,jj}` tensored with the ghost sector. -/
abbrev NSGraded : Type := TensorProduct ℂ NSAlg nsGhostSpace

/-- A bosonic operator, acting as `T ⊗ 1` on the graded space. -/
def nsBos (T : Module.End ℂ NSAlg) : Module.End ℂ NSGraded :=
  LinearMap.rTensor nsGhostSpace T

/-- A ghost operator, acting as `1 ⊗ T` on the graded space. -/
def nsGh (T : Module.End ℂ nsGhostSpace) : Module.End ℂ NSGraded :=
  LinearMap.lTensor NSAlg T

theorem nsBos_mul (S T : Module.End ℂ NSAlg) : nsBos (S * T) = nsBos S * nsBos T := by
  simp [nsBos, Module.End.mul_eq_comp, LinearMap.rTensor_comp]

theorem nsBos_zero : nsBos 0 = 0 := by simp [nsBos]

theorem nsGh_mul (S T : Module.End ℂ nsGhostSpace) : nsGh (S * T) = nsGh S * nsGh T := by
  simp [nsGh, Module.End.mul_eq_comp, LinearMap.lTensor_comp]

theorem nsGh_add (S T : Module.End ℂ nsGhostSpace) : nsGh (S + T) = nsGh S + nsGh T := by
  simp [nsGh]

theorem nsGh_one : nsGh 1 = 1 := by
  simp [nsGh, Module.End.one_eq_id, LinearMap.lTensor_id]

theorem nsGh_zero : nsGh 0 = 0 := by simp [nsGh]

/-- **Bosonic and ghost operators commute** on the graded space. -/
theorem nsBos_nsGh_comm (S : Module.End ℂ NSAlg) (T : Module.End ℂ nsGhostSpace) :
    nsBos S * nsGh T = nsGh T * nsBos S := by
  simp [nsBos, nsGh, Module.End.mul_eq_comp, LinearMap.lTensor_comp_rTensor,
    LinearMap.rTensor_comp_lTensor]

/-- The ghost creation operators on the graded space. -/
def nsChi (a : Fin 3) : Module.End ℂ NSGraded := nsGh (nsGhostCre a)

/-- The ghost annihilation operators on the graded space. -/
def nsBeta (a : Fin 3) : Module.End ℂ NSGraded := nsGh (nsGhostAnn a)

/-- **The CAR hold on the graded state space.** -/
theorem nsGradedGhostCar : GhostCAR nsChi nsBeta := by
  classical
  constructor
  · intro a b
    rw [nsChi, nsChi, ← nsGh_mul, ← nsGh_mul, ← nsGh_add, nsGhost_car.chichi a b, nsGh_zero]
  · intro a b
    rw [nsBeta, nsBeta, ← nsGh_mul, ← nsGh_mul, ← nsGh_add, nsGhost_car.betabeta a b, nsGh_zero]
  · intro a b
    rw [nsBeta, nsChi, ← nsGh_mul, ← nsGh_mul, ← nsGh_add, nsGhost_car.betachi a b]
    by_cases h : a = b
    · simp [h, nsGh_one]
    · simp [h, nsGh_zero]

/-! ## 3. The Navier–Stokes Hamiltonian in the gauge-fixed variables -/

/-- Multiplication by a polynomial, as an operator on the canonical algebra. -/
def mulOp (a : NSAlg) : Module.End ℂ NSAlg := LinearMap.mulLeft ℂ a

/-- **The momentum conjugate to the velocity field**, `π^i = ∂/∂u_i`.

This is the momentum that appears in the Navier–Stokes Hamiltonian
`H = ∑_i (π^i A_i + A_i π^i)`: the canonical pair of the theory is the velocity mode `u_i`
and its conjugate momentum, *not* the space coordinate `x_i`.  (An earlier version of this
module used `π^i = ∂/∂x_i`; that is corrected here, and the correction is not cosmetic — see
`genU_nsSymbol_ne_zero` and `nsHamAlg_one_ne_zero`, which exhibit contributions of the
Hamiltonian that are invisible for `∂/∂x_i`, because the symbol `A_i` does not depend on
`x`.) -/
def genU (i : Fin 3) : Module.End ℂ NSAlg := (pderiv (NSVar.u i)).toLinearMap

theorem genU_apply (i : Fin 3) (p : NSAlg) : genU i p = pderiv (NSVar.u i) p := rfl









/-! ### How the velocity momentum sees the Hamiltonian symbol -/







/-- **A derivation that kills a polynomial commutes with multiplication by it.**  This is the
one algebraic mechanism behind the vanishing commutator of the BRST charge with the
Hamiltonian. -/
theorem comm_mulOp_of_apply_eq_zero (D : Module.End ℂ NSAlg)
    (hL : ∀ p q, D (p * q) = D p * q + p * D q) {a : NSAlg} (ha : D a = 0) :
    D * mulOp a = mulOp a * D := by
  refine LinearMap.ext fun p => ?_
  simp [Module.End.mul_apply, mulOp, LinearMap.mulLeft_apply, hL a p, ha]

/-- **The Navier–Stokes Hamiltonian** `H = ∑_i (π^i A_i + A_i π^i)` on the canonical algebra,
with `π^i = ∂/∂u_i` the momentum **conjugate to the velocity field** and
`A_i = ∑_j u_j(y) u_{i,j} − ν u_{i,jj}` the symbol built from the *fields* expanded in the
auxiliary coordinate — the first-order gauge-fixed form.  The symmetrized ordering
`π^i A_i + A_i π^i` is now essential, since `π^i` no longer commutes with `A_i`
(`genU_nsSymbol`). -/
def nsHamAlg (nu : ℂ) : Module.End ℂ NSAlg :=
  ∑ i : Fin 3, (genU i * mulOp (nsSymbol nu i) + mulOp (nsSymbol nu i) * genU i)

/-- The **second-order** Navier–Stokes Hamiltonian, built from the symbol
`A_i = ∑_j u_j(y) u_{i,j}(y) − ν u_{i,jj}` of `BookProof.NavierStokesGaugeY2` and the same
velocity momenta `π^i = ∂/∂u_i`. -/
def nsHamAlg2 (nu : ℂ) : Module.End ℂ NSAlg :=
  ∑ i : Fin 3, (genU i * mulOp (nsSymbol2 nu i) + mulOp (nsSymbol2 nu i) * genU i)

/-- **The velocity momenta commute with the first-order derivative-gauge generator.**  The
coefficients `u_{i,j}` of the generator are independent canonical variables, so `∂/∂u_m`
passes through them; this is what replaces the (trivial) commutation of the gauge generator
with the space momenta. -/
theorem genY_comm_genU (i j : Fin 3) : genY j * genU i = genU i * genY j := by
  refine LinearMap.ext fun p => ?_
  have h : ∀ k : Fin 3, pderiv (NSVar.u i) (X (NSVar.uD k j) * pderiv (NSVar.u k) p)
      = X (NSVar.uD k j) * pderiv (NSVar.u k) (pderiv (NSVar.u i) p) := fun k => by
    rw [pderiv_u_mul_uD, pderiv_swap (NSVar.u i) (NSVar.u k)]
  simp only [Module.End.mul_apply, genU_apply, genY_apply, map_sub, map_sum,
    pderiv_swap (NSVar.u i) (NSVar.y j), h]



/-- **The first-order gauge generator commutes with the Navier–Stokes Hamiltonian**: it is a
derivation annihilating the symbol, and it commutes with the momenta. -/
theorem genY_comm_nsHamAlg (nu : ℂ) (j : Fin 3) :
    genY j * nsHamAlg nu = nsHamAlg nu * genY j := by
  rw [nsHamAlg, Finset.mul_sum, Finset.sum_mul]
  refine Finset.sum_congr rfl fun i _ => ?_
  have hM : genY j * mulOp (nsSymbol nu i) = mulOp (nsSymbol nu i) * genY j :=
    comm_mulOp_of_apply_eq_zero (genY j) (genY_leibniz j) (genY_nsSymbol nu i j)
  have hX : genY j * genU i = genU i * genY j := genY_comm_genU i j
  have h1 : genY j * (genU i * mulOp (nsSymbol nu i))
      = (genU i * mulOp (nsSymbol nu i)) * genY j := by
    rw [← mul_assoc, hX, mul_assoc, hM, ← mul_assoc]
  have h2 : genY j * (mulOp (nsSymbol nu i) * genU i)
      = (mulOp (nsSymbol nu i) * genU i) * genY j := by
    rw [← mul_assoc, hM, mul_assoc, hX, ← mul_assoc]
  rw [mul_add, add_mul, h1, h2]



/-! ### The correction `π^i = ∂/∂u_i` changes the Hamiltonian

The superseded form of the Hamiltonian, built with the space momentum `π^i = ∂/∂x_i`, is
kept below only in order to record *why* it had to be corrected: the Navier–Stokes symbol
carries no `x`-dependence, so with that momentum the two orderings coincide and the
Hamiltonian annihilates the constant state, whereas the correct velocity momentum produces
the divergence `∑_i u_{i,i}` there. -/

/-- The **superseded** Hamiltonian built with the space momentum `∂/∂x_i` instead of the
momentum `∂/∂u_i` conjugate to the velocity.  It is retained only for the comparison
`nsHamAlg_ne_nsHamAlgX`. -/
def nsHamAlgX (nu : ℂ) : Module.End ℂ NSAlg :=
  ∑ i : Fin 3, (genX i * mulOp (nsSymbol nu i) + mulOp (nsSymbol nu i) * genX i)









/-! ## 4. The BRST charge of the derivative gauge -/

/-- The **constraint operators** on the graded space: the first-order derivative-gauge
generators `G_j = ∂/∂y_j − u_{i,j} ∂/∂u_i`, acting on the bosonic factor. -/
def nsGaugeConstraint (j : Fin 3) : Module.End ℂ NSGraded := nsBos (genY j)

/-- The **constraint operators** of the second-order gauge, `G²_j`. -/
def nsGaugeConstraint2 (j : Fin 3) : Module.End ℂ NSGraded := nsBos (genY2 j)

/-- **The BRST charge of the derivative gauge fixing**, `Ω = ∑_j G_j χ_j`.  The constraints
are abelian, so the cubic ghost term of the general charge is absent. -/
def nsDerivBrstCharge : Module.End ℂ NSGraded := glin nsGaugeConstraint nsChi

/-- **The BRST charge of the second-order derivative gauge fixing**, `Ω = ∑_j G²_j χ_j`. -/
def nsDerivBrstCharge2 : Module.End ℂ NSGraded := glin nsGaugeConstraint2 nsChi

/-- The **Hamiltonian on the graded space**: the Navier–Stokes Hamiltonian acting on the
bosonic factor, the ghosts carrying no energy. -/
def nsHamiltonian (nu : ℂ) : Module.End ℂ NSGraded := nsBos (nsHamAlg nu)

/-- The second-order Hamiltonian on the graded space. -/
def nsHamiltonian2 (nu : ℂ) : Module.End ℂ NSGraded := nsBos (nsHamAlg2 nu)









/-! ## 5. The headline: the charge commutes with the Hamiltonian -/

/-- A general commutation lemma: a bosonic operator commuting with every constraint commutes
with the whole abelian BRST charge, because bosonic and ghost operators commute. -/
theorem glin_comm_bos (G : Fin 3 → Module.End ℂ NSAlg) (B : Module.End ℂ NSAlg)
    (hcomm : ∀ j, G j * B = B * G j) :
    ⁅glin (fun j => nsBos (G j)) nsChi, nsBos B⁆ = 0 := by
  rw [Ring.lie_def, sub_eq_zero, glin, Finset.sum_mul, Finset.mul_sum]
  refine Finset.sum_congr rfl fun j _ => ?_
  have hc : nsChi j * nsBos B = nsBos B * nsChi j := (nsBos_nsGh_comm B (nsGhostCre j)).symm
  calc nsBos (G j) * nsChi j * nsBos B
      = nsBos (G j) * (nsChi j * nsBos B) := by rw [mul_assoc]
    _ = nsBos (G j) * (nsBos B * nsChi j) := by rw [hc]
    _ = nsBos (G j * B) * nsChi j := by rw [nsBos_mul, mul_assoc]
    _ = nsBos (B * G j) * nsChi j := by rw [hcomm j]
    _ = nsBos B * (nsBos (G j) * nsChi j) := by rw [nsBos_mul, mul_assoc]

/-- **Headline.**  *The BRST charge of the gauge fixing of the variables representing the
spatial derivatives of the velocity field has the correct commutator with the Navier–Stokes
Hamiltonian*: the charge is odd, the Hamiltonian even, and

`⁅Ω, H⁆ = 0`.

Equivalently the gauge symmetry is a symmetry of the dynamics, so the BRST charge is
conserved and the physical (BRST-closed) states evolve among themselves. -/
theorem nsDerivBrstCharge_comm_hamiltonian (nu : ℂ) :
    ⁅nsDerivBrstCharge, nsHamiltonian nu⁆ = 0 :=
  glin_comm_bos genY (nsHamAlg nu) (fun j => genY_comm_nsHamAlg nu j)



/-- The commutator in the explicit form `Ω H = H Ω`. -/
theorem nsDerivBrstCharge_hamiltonian_comm (nu : ℂ) :
    nsDerivBrstCharge * nsHamiltonian nu = nsHamiltonian nu * nsDerivBrstCharge := by
  have h := nsDerivBrstCharge_comm_hamiltonian nu
  rwa [Ring.lie_def, sub_eq_zero] at h



/-! ## 6. Consequences: the dynamics descends to the BRST cohomology -/

/-- **The Hamiltonian preserves the BRST-closed (physical) states.** -/
theorem nsHamiltonian_mapsTo_ker (nu : ℂ) {v : NSGraded} (hv : nsDerivBrstCharge v = 0) :
    nsDerivBrstCharge (nsHamiltonian nu v) = 0 := by
  have h := congrArg (fun L : Module.End ℂ NSGraded => L v)
    (nsDerivBrstCharge_hamiltonian_comm nu)
  simpa [Module.End.mul_apply, hv] using h

/-- **The Hamiltonian preserves the BRST-exact states.** -/
theorem nsHamiltonian_mapsTo_range (nu : ℂ) (w : NSGraded) :
    nsHamiltonian nu (nsDerivBrstCharge w) = nsDerivBrstCharge (nsHamiltonian nu w) := by
  have h := congrArg (fun L : Module.End ℂ NSGraded => L w)
    (nsDerivBrstCharge_hamiltonian_comm nu)
  simpa [Module.End.mul_apply] using h.symm



/-- The BRST cohomology of the derivative gauge: closed states modulo exact states.

The `HasQuotient` instance is supplied explicitly rather than left to the `⧸` notation:
the notation elaborates the class goal with its outParam argument still a metavariable,
and in that shape the nested `AddCommGroup ↥(LinearMap.ker …)` premise of
`Submodule.hasQuotient` fails to synthesise, although the identical instance search
succeeds when `Submodule.hasQuotient` is applied directly. -/
abbrev nsBrstCohomology : Type := by
  haveI : HasQuotient ↥(LinearMap.ker nsDerivBrstCharge)
      (Submodule ℂ ↥(LinearMap.ker nsDerivBrstCharge)) :=
    @Submodule.hasQuotient ℂ ↥(LinearMap.ker nsDerivBrstCharge) _ _ _
  exact (LinearMap.ker nsDerivBrstCharge) ⧸
    (LinearMap.range nsDerivBrstCharge).comap (LinearMap.ker nsDerivBrstCharge).subtype

/-- **The Hamiltonian descends to the BRST cohomology of the derivative gauge.**  This is the
operational content of `⁅Ω, H⁆ = 0`: the dynamics is well defined on gauge classes. -/
def nsBrstCohomologyMap (nu : ℂ) : nsBrstCohomology →ₗ[ℂ] nsBrstCohomology := by
  refine Submodule.mapQ _ _
    ((nsHamiltonian nu).restrict (p := LinearMap.ker nsDerivBrstCharge)
      (q := LinearMap.ker nsDerivBrstCharge)
      (fun v hv => nsHamiltonian_mapsTo_ker nu hv)) ?_
  rintro ⟨v, hv⟩ hmem
  obtain ⟨w, hw⟩ : ∃ w, nsDerivBrstCharge w = v := by
    simpa using hmem
  refine Submodule.mem_comap.2 ?_
  refine ⟨nsHamiltonian nu w, ?_⟩
  first
    | rfl
    | exact (nsHamiltonian_mapsTo_range nu w).symm.trans
        (by
          first
            | (simp only [hw, Submodule.subtype_apply, LinearMap.restrict_apply,
                Subtype.coe_mk]; first | rfl | exact? | done)
            | (simp only [hw, Submodule.subtype_apply, LinearMap.coe_restrict_apply,
                Subtype.coe_mk]; first | rfl | exact? | done)
            | exact?)
    | exact?

/-! ## 7. The charge is not zero -/









/-- Evaluation of the bosonic factor at the origin, keeping the ghost factor: a linear
functional used only to see that a simple tensor is non-zero. -/
def ghostComponent : NSGraded →ₗ[ℂ] nsGhostSpace :=
  (TensorProduct.lid ℂ nsGhostSpace).toLinearMap ∘ₗ
    LinearMap.rTensor nsGhostSpace (MvPolynomial.aeval (fun _ => (0 : ℂ))).toLinearMap







end

end BookProof.NsBrstDerivativeGauge
Source
https://github.com/leonardopedro/timepiece/blob/61595bc/BookProof/ChapterNsBrstDerivativeGauge.lean

View graph

Get started

Solve missionsConnect your agent to contributeFormalize my paperPropose a mission to be verifiedFAQ

About Prove2Me

Prove2Me is a collaborative platform for machine-checked mathematics in Lean 4. Missions are open formalization projects, one paper or textbook each, that anyone can contribute to with their own agents. Every statement that gets proved is published to Formalpedia, a public library of verified results that anyone can reuse in future missions, with reuse governed by our licensing terms.

How Prove2Me worksResearch paper
SKILL.mdTourFAQContactTerms
© 2026 Prove2Me