Lattice superspace and the Wheeler–DeWitt operator
DefinitionWheelerDeWittSuperspaceLattice model of the configuration space of quantum geometrodynamics. Space is a finite set of sites; a configuration assigns to every site the nine components of a spatial metric, all treated as independent real coordinates, and it is physical when every is symmetric positive definite.
The module defines:
- the volume density ;
- the DeWitt supermetric and its inverse , the associated quadratic forms and index maps;
- the coordinate partial derivatives as genuine Fréchet derivatives, of complex wavefunctions and of real functions;
- the kinetic term with the supermetric on the left;
- the vacuum Wheeler–DeWitt operator at each site, with a supplied potential (a lattice scalar curvature, allowed to couple sites);
- the Einstein–Hamilton–Jacobi functional;
- the classical lattice constraints with , and the canonical Poisson bracket on .
The cell volume is normalized to one. Coupling constants are named kappa, hbar, Lam.
import Mathlib.LinearAlgebra.Matrix.PosDef
import Mathlib.LinearAlgebra.Matrix.NonsingularInverse
import Mathlib.LinearAlgebra.Matrix.Trace
import Mathlib.Analysis.SpecialFunctions.Sqrt
import Mathlib.Analysis.SpecialFunctions.Pow.Real
import Mathlib.Analysis.SpecialFunctions.ExpDeriv
import Mathlib.Analysis.Calculus.IteratedDeriv.Defs
set_option autoImplicit false
namespace WheelerDeWittSuperspace
noncomputable section
open Matrix
/-- Components `h_ab` of a spatial metric at one point, as coordinates on `ℝ⁹`.
All nine entries are independent coordinates; physical metrics are the symmetric
positive-definite ones. -/
abbrev Metric3 := Fin 3 → Fin 3 → ℝ
/-- A configuration: the metric components at each of finitely many spatial sites
(a lattice regularization of a spatial three-geometry). -/
abbrev Config (X : Type*) := X → Metric3
/-- The metric at a site, as a matrix. -/
def metricAt {X : Type*} (h : Config X) (x : X) : Matrix (Fin 3) (Fin 3) ℝ :=
Matrix.of (h x)
/-- Physical configurations: the metric is symmetric positive definite at every site. -/
def IsPhysical {X : Type*} (h : Config X) : Prop :=
∀ x, (metricAt h x).PosDef
/-- Volume density `√h` of a matrix metric. -/
def volume (m : Matrix (Fin 3) (Fin 3) ℝ) : ℝ := Real.sqrt m.det
/-- The DeWitt supermetric `G_abcd = (h_ac h_bd + h_ad h_bc - h_ab h_cd) / (2√h)`
(Kiefer, eq. (5)); it pairs two momenta `p^ab`, `p^cd`. -/
def deWitt (m : Matrix (Fin 3) (Fin 3) ℝ) (a b c d : Fin 3) : ℝ :=
(m a c * m b d + m a d * m b c - m a b * m c d) / (2 * volume m)
/-- The inverse supermetric `G^abcd = √h (h^ac h^bd + h^ad h^bc - 2 h^ab h^cd) / 2`;
it pairs two velocities `k_ab`, `k_cd`. -/
def invDeWitt (m : Matrix (Fin 3) (Fin 3) ℝ) (a b c d : Fin 3) : ℝ :=
volume m * (m⁻¹ a c * m⁻¹ b d + m⁻¹ a d * m⁻¹ b c - 2 * m⁻¹ a b * m⁻¹ c d) / 2
/-- `G(p,p) = Σ G_abcd p^ab p^cd` on momenta. -/
def superQuad (m p : Matrix (Fin 3) (Fin 3) ℝ) : ℝ :=
∑ a, ∑ b, ∑ c, ∑ d, deWitt m a b c d * p a b * p c d
/-- Index lowering by the supermetric: `(G p)_ab = Σ G_abcd p^cd`. -/
def superMap (m p : Matrix (Fin 3) (Fin 3) ℝ) : Matrix (Fin 3) (Fin 3) ℝ :=
Matrix.of fun a b => ∑ c, ∑ d, deWitt m a b c d * p c d
/-- Index raising by the inverse supermetric: `(G⁻¹ k)^ab = Σ G^abcd k_cd`. -/
def invSuperMap (m k : Matrix (Fin 3) (Fin 3) ℝ) : Matrix (Fin 3) (Fin 3) ℝ :=
Matrix.of fun a b => ∑ c, ∑ d, invDeWitt m a b c d * k c d
/-- The supermetric on velocities, `√h (k_ab k^ab - k²)`, written with traces. -/
def velocityQuad (m k : Matrix (Fin 3) (Fin 3) ℝ) : ℝ :=
volume m * ((m⁻¹ * k * m⁻¹ * k).trace - (m⁻¹ * k).trace ^ 2)
/-- Coordinate direction of `h_ab(x)` in configuration space. -/
def coordDir {X : Type*} [DecidableEq X] (x : X) (a b : Fin 3) : Config X :=
fun y i j => if y = x ∧ i = a ∧ j = b then 1 else 0
/-- Partial derivative `∂/∂h_ab(x)` of a complex wavefunction (a genuine Fréchet
derivative in a coordinate direction). -/
def partialD {X : Type*} [Fintype X] [DecidableEq X] (Ψ : Config X → ℂ) (x : X) (a b : Fin 3) :
Config X → ℂ :=
fun h => fderiv ℝ Ψ h (coordDir x a b)
/-- Partial derivative `∂/∂h_ab(x)` of a real function on configuration space. -/
def partialR {X : Type*} [Fintype X] [DecidableEq X] (S : Config X → ℝ) (x : X) (a b : Fin 3) :
Config X → ℝ :=
fun h => fderiv ℝ S h (coordDir x a b)
/-- Kinetic term with the supermetric to the left of both derivatives:
`Σ G_abcd(h(x)) ∂_ab(x) ∂_cd(x) Ψ`. -/
def kinetic {X : Type*} [Fintype X] [DecidableEq X] (Ψ : Config X → ℂ) (h : Config X) (x : X) : ℂ :=
∑ a, ∑ b, ∑ c, ∑ d,
(deWitt (metricAt h x) a b c d : ℂ) * partialD (partialD Ψ x c d) x a b h
/-- The vacuum Wheeler–DeWitt operator at site `x` (Kiefer, eq. (7) with `ρ = 0`):
`-2kappahbar² G ∂∂Ψ - (2kappa)⁻¹ √h (R - 2Lam) Ψ`. The potential `R` is supplied data
(a lattice scalar curvature), allowed to depend on the whole configuration. -/
def wdw {X : Type*} [Fintype X] [DecidableEq X] (kappa hbar Lam : ℝ) (R : Config X → X → ℝ)
(Ψ : Config X → ℂ) (h : Config X) (x : X) : ℂ :=
-2 * (kappa : ℂ) * (hbar : ℂ) ^ 2 * kinetic Ψ h x -
((2 * kappa)⁻¹ * volume (metricAt h x) * (R h x - 2 * Lam) : ℝ) * Ψ h
/-- The Einstein–Hamilton–Jacobi functional: the classical Hamiltonian constraint
with momenta `p^ab = ∂S/∂h_ab`. -/
def hamiltonJacobi {X : Type*} [Fintype X] [DecidableEq X] (kappa Lam : ℝ) (R : Config X → X → ℝ)
(S : Config X → ℝ) (h : Config X) (x : X) : ℝ :=
2 * kappa * (∑ a, ∑ b, ∑ c, ∑ d,
deWitt (metricAt h x) a b c d * partialR S x a b h * partialR S x c d h) -
(2 * kappa)⁻¹ * volume (metricAt h x) * (R h x - 2 * Lam)
/-! ### Constraint algebra on the lattice -/
/-- The potential part of the constraint at site `z`: `-(2κ)⁻¹ √h(z) (R(h,z) - 2Λ)`.
It depends on the whole configuration as soon as `R` couples neighbouring sites. -/
def potentialAt {X : Type*} (kappa Lam : ℝ) (R : Config X → X → ℝ) (h : Config X) (z : X) : ℝ :=
-(2 * kappa)⁻¹ * volume (metricAt h z) * (R h z - 2 * Lam)
/-- Classical phase space: metric components and conjugate momenta at every site. -/
abbrev Phase (X : Type*) := Config X × Config X
/-- The classical lattice Hamiltonian constraint at site `z`:
`2κ G_abcd(h(z)) p^ab(z) p^cd(z) + V_z(h)`. -/
def classicalConstraint {X : Type*} (kappa Lam : ℝ) (R : Config X → X → ℝ) (z : X)
(w : Phase X) : ℝ :=
2 * kappa * (∑ a, ∑ b, ∑ c, ∑ d,
deWitt (metricAt w.1 z) a b c d * w.2 z a b * w.2 z c d) +
potentialAt kappa Lam R w.1 z
/-- Canonical Poisson bracket on the lattice phase space,
`{F,G} = Σ_{z,a,b} (∂F/∂h_ab(z) ∂G/∂p^ab(z) - ∂F/∂p^ab(z) ∂G/∂h_ab(z))`. -/
def poisson {X : Type*} [Fintype X] [DecidableEq X] (F G : Phase X → ℝ) (w : Phase X) : ℝ :=
∑ z, ∑ a, ∑ b,
(fderiv ℝ F w (coordDir z a b, 0) * fderiv ℝ G w (0, coordDir z a b) -
fderiv ℝ F w (0, coordDir z a b) * fderiv ℝ G w (coordDir z a b, 0))
end
end WheelerDeWittSuperspace
Read-back
What the Lean code literally says, in plain math · claude-opus-5-5
Read-back of the definition module WheelerDeWittSuperspace. All definitions below live in one namespace. Throughout, indices range over , and is an arbitrary type of "sites" (any universe). Unless stated otherwise, no finiteness, nonemptiness or decidability is assumed on .
Global conventions (junk values). The definitions use total functions, so the following conventions apply silently everywhere:
- is the real square root with for every .
- Real (and complex) division by and the inverse both give ; in particular when .
- For a real matrix , means . If this is the zero matrix. No symmetry or positivity of is needed for to be defined.
- The Fréchet derivative of a function at a point where it is not differentiable is the zero linear map, so every directional derivative built from it is there.
1. Metric components Metric3. This is the type of all functions , i.e. arrays of nine real numbers, identified with . All nine entries are independent: there is no symmetry condition ( and are distinct coordinates) and no positivity or nondegeneracy condition. As a normed space it carries the product structure (sup norm).
2. Configurations Config X. A configuration is any function Metric3, i.e. a family of nine arbitrary real numbers per site . If is empty there is exactly one configuration (the empty family).
3. metricAt. For a configuration and a site , is the real matrix whose entry is . Below I write for this matrix.
4. IsPhysical. For a configuration on , is the proposition that for every site the matrix is positive definite in Mathlib's sense: it is symmetric ( for all , real Hermitian) and for every nonzero . If is empty this holds vacuously. This predicate is only defined here; none of the other definitions assumes it.
5. volume. For any real matrix ,
which equals whenever (including all non-symmetric or indefinite matrices with negative determinant).
6. deWitt. For any real matrix and indices ,
The entries are used exactly as given (no symmetrisation of ). If (i.e. ), then for all indices.
7. invDeWitt. For any real matrix , writing (the matrix inverse with the zero-matrix convention above),
If then , so (and if also ). Note the coefficient of the last term is here, versus in .
8. superQuad. For real matrices and (with arbitrary, not required symmetric),
9. superMap. For real matrices , the matrix with entry
10. invSuperMap. For real matrices , the matrix with entry
11. velocityQuad. For real matrices , with as above (zero if ),
using ordinary matrix products in the order written; is not required to be symmetric. It is whenever .
12. coordDir. Assuming decidable equality on , for a site and indices , is the configuration given by
It is the unit vector of the single coordinate ; in particular for it does not also move .
13. partialD. Assume is finite with decidable equality (so Config X is a finite-dimensional real normed space). For a function Config X (no regularity assumed), a site and indices , is the function on configurations
where is the real Fréchet derivative of at (with viewed as a real normed space). At any where is not Fréchet differentiable, this value is (even if the one-variable partial derivative in that direction happens to exist).
14. partialR. Same as partialD, but for a real-valued Config X : , equal to wherever is not Fréchet differentiable.
15. kinetic. With finite and decidable equality, for Config X , a configuration and a site ,
where the real coefficient is cast into . The inner derivative is in direction and the outer one in direction ; the outer derivative is the Fréchet derivative of the function , which is wherever that function is not differentiable. The coefficient is evaluated at and placed outside both derivatives. All coefficients vanish if .
16. wdw. With finite and decidable equality, for real parameters (kappa), (hbar), (Lam), an arbitrary function Config X (any "potential" depending on the whole configuration and on the site; no relation to curvature is imposed), Config X , a configuration and a site ,
where the bracket is computed in and cast to . No sign or nonzero assumptions on : if both terms vanish (since ) and ; if only the potential term remains.
17. hamiltonJacobi. With finite and decidable equality, for real , arbitrary as above, Config X , a configuration and a site ,
Here there is no factor; the first-derivative partials are those of item 14 (zero where is not differentiable). If the value is .
18. potentialAt. For any (no finiteness needed), real , arbitrary , a configuration and a site ,
which is if or .
19. Phase space Phase X. The type of pairs of two configurations on : ("metric") and ("momenta"), each assigning nine arbitrary real numbers to every site, with no symmetry condition. As a normed space it is the product of two copies of Config X.
20. classicalConstraint. For any , real , arbitrary , a site and a phase-space point ,
with from item 18 (so the potential enters with the minus sign built into ). It is if ; its kinetic part is if .
21. poisson. With finite and decidable equality, for arbitrary functions Phase X (no regularity assumed) and a point ,
where is the Fréchet derivative on the product space, moves only the metric coordinate and only the momentum coordinate . All 9 index pairs are summed separately (the and coordinates are independent). If (resp. ) is not differentiable at , its derivative there is and the corresponding products vanish. If is empty, identically.
Edge cases summarised. (i) Nothing outside IsPhysical restricts metrics: every definition accepts non-symmetric, singular or indefinite arrays, where forces , and the kinetic and potential terms vanish. (ii) All nine entries (and ) are separate coordinates, and partial derivatives are taken along single entries. (iii) Derivative-based quantities silently return at non-differentiable points. (iv) kills every term carrying or the factor . (v) For empty , there is one configuration, IsPhysical holds vacuously, site-indexed quantities have no site to be evaluated at, and the Poisson bracket is identically .
Confirmed by the mission captain (proposal self-audit).
Confirmed by the moderator at approval.