# Light Mechanics

> Technical companion to **Foundations of Light Theory**.  
> Here we describe how Light Theory is implemented as a concrete geometric field
> framework: the math, the operators, and how they connect to the experiments
> in this repository.

---

## 0. Relationship to *Foundations of Light Theory*

**Foundations of Light Theory** is written for a broad audience:  
it explains *what* the geometry-of-information idea is and *why* Light Theory
Realm exists.

**Light Mechanics** is the technical layer underneath:

- We specify the **mathematical objects** (Clifford algebra, spinors,
  quantum geometric tensor, contact and Kaluza–Klein structures).
- We define the **dynamical operators** (the sixth-order master
  operator, information stress–energy, Reeb flow).
- We explain how these feed directly into the **toy models** in this repo:
  prime plaquettes, Pocket_U Lite, curvature landscapes, etc.

You can read this document as "how the engine actually works and what the
equations mean."

---

## 1. Mathematical setting

We begin by fixing the basic ingredients that all Light Theory constructions use.

### 1.1 State manifolds and parameters

We assume:

- A family of (pure) states |ψ(θ)⟩
- Depending smoothly on real parameters θ = (θ¹, …, θⁿ)

You can think of θ as:

- Angles in a quantum circuit,
- Weights of a small model,
- Internal coordinates labelling a prime plaquette configuration.

The space of parameters Θ carries the **information geometry** we care
about: distances and curvature as we move around in Θ.

### 1.2 Clifford algebra Cl(1,3)

To represent spacetime-like structure and spinor degrees of freedom, we work
inside the real Clifford algebra Cl(1,3):

- Generated by gamma matrices γ^μ (μ = 0,1,2,3),
- Satisfying the usual anticommutation relation:

```
{γ^μ, γ^ν} = 2 η^μν 𝟙
```

with η^μν the Minkowski metric (signature (+,-,-,-)).

In code, this is wrapped as the `CliffordEngine`:

- Provides gamma matrices in a fixed representation (e.g. Weyl),
- Implements the **geometric product** of multivectors,
- Offers helpers for:
  - **Grade projection**: extract the scalar / vector / bivector / … piece of a multivector.
  - **Wedge product**: antisymmetric outer product producing bivectors and higher blades.

This algebra is the "hardware" on which the rest of Light Theory runs.

### 1.3 Spinors as carriers of "light"

We represent "light states" as 4-component spinors ψ ∈ ℂ⁴,
possibly assembled into larger structures when we stack degrees of freedom.

- In the simplest cases, |ψ(θ)⟩ is a normalized spinor-valued function of parameters θ.
- The Clifford engine acts on these spinors with gamma matrices and multivectors,
  generating rotations, boosts, and internal rotations.

From the Light Theory point of view:

> This is the minimal setup that allows both spacetime structure and internal
> geometric phases to coexist in a single algebraic framework.

---

## 2. Quantum geometric tensor and information geometry

The geometric core of Light Theory is the **quantum geometric tensor (QGT)**.

### 2.1 Definition

For a family of normalized states |ψ(θ)⟩, the QGT is the Hermitian matrix:

```
Q_uv = ⟨∂_u ψ | ∂_v ψ⟩ - ⟨∂_u ψ | ψ⟩ ⟨ψ | ∂_v ψ⟩
```

where ∂_u = ∂/∂θ^u.

We decompose:

- **Real part**:  
  ```
  g_uv = ℜ Q_uv   (quantum metric)
  ```
- **Imaginary part**:
  ```
  Ω_uv = 2 ℑ Q_uv   (Berry curvature)
  ```

Interpretation:

- g_uv measures **information distance**: how much the state changes under parameter perturbations.
- Ω_uv measures **geometric twist**: accumulated phase around loops in parameter space.

### 2.2 Implementation in Light Theory Realm

In the repository, this is implemented in `CliffordQGT`:

- Given:
  - A state ψ(θ),
  - A Jacobian J = ∂ψ/∂θ,

- The code constructs Q_uv and splits it into:
  - `fisher` (the metric g_uv),
  - `berry` (the curvature Ω_uv).

Everything is written in JAX:

- Gradients are differentiable through the QGT computation,
- All operations are `jit`-friendly,
- Mixed real/complex linear algebra is handled cleanly.

### 2.3 Classical Fisher information limit (sketch)

In the classical limit where ψ(θ) encodes a probability distribution
p(x | θ) (e.g. via amplitude encoding), the QGT reduces to:

- g_uv → **Fisher information matrix**:
  ```
  I_uv = 𝔼[∂_u log p(x|θ) ∂_v log p(x|θ)]
  ```
- Ω_uv → vanishes for purely real, positive amplitudes (no phase), and becomes nontrivial 
  when complex phases carry additional structure.

Light Mechanics takes this seriously: curvature Ω is treated as a
first-class geometric observable, not a side effect.

---

## 3. The sixth-order master information operator

### 3.1 Motivation

Second-order operators appear everywhere:

- Heat equation: L₂ = Δ,
- Diffusion in parameter space,
- Standard Fisher-geometry gradient flows.

In Light Theory, the empirical structure of mass hierarchies and curvature
patterns suggests that a **higher-order coupling** plays a central role.

We introduce the **sixth-order master operator**:

```
L₆ = (∇³)† ∇³
```

where ∇ is a covariant derivative built from the QGT connection.

Intuitively:

- L₂ cares about first derivatives (local diffusion),
- L₆ cares about **third derivatives**, i.e. changes in curvature and higher-order structure.

### 3.2 Structure and properties

Key properties we design L₆ to satisfy:

- **Positivity**: L₆ is constructed as A†A, so its spectrum is nonnegative.
- **Gauge covariance**: ∇ includes the Berry connection, so gauge transformations act consistently.
- **Sensitivity to curvature**: In flat regions of the information manifold, higher derivatives 
  vanish or become small; in highly curved regions, L₆ "lights up."

In practice:

- We don't try to solve L₆ψ = 0 exactly.
- Instead, we use L₆ as a **penalty / scoring operator** that assigns
  more structure to configurations that sit at nontrivial higher-order geometric features.

### 3.3 Relation to masses (toy model viewpoint)

In the Standard Model toy experiments (Pocket_U Lite):

- Each prime plaquette defines a "loop" in parameter space.
- For each loop, we compute geometric quantities (e.g. expectation values of
  curvature-dependent operators built from L₆).
- We map these into **effective mass scales**.

The punchline:

> Mass scales emerge from how aggressively a given configuration excites the
> sixth-order geometric structure of the information manifold.

This is not claimed as a final theory of mass, but as a structured way to
tie mass hierarchies to higher-order geometry.

---

## 4. Information geometry as a field equation

### 4.1 Metric and curvature as dynamical objects

Once we have g_uv and Ω_uv, we can treat:

- g_uv as a **dynamical metric field** on parameter space / state space,
- Ω_uv as a **field strength** or curvature two-form.

We can then write down an **information action**:
- Built from curvature scalars,
- Coupled to an "information stress–energy" built from score covariances
  and fluctuations.

### 4.2 Information stress–energy (sketch)

Let s_u = ∂_u log p(x | θ) be the score.

A natural candidate for an information stress–energy tensor is:

```
T^info_uv ~ 𝔼[s_u s_v] - (trace terms)
```

- This measures how much "informational pressure" each direction exerts.
- Large eigenvalues correspond to directions where small changes in θ
  cause large changes in the likelihood.

In Light Theory, we treat T^info_uv as sourcing curvature in the same way 
that stress–energy sources curvature in general relativity:

> "Where information fluctuates strongly, the information manifold bends."

### 4.3 Schematic field equation

At a schematic level, we can write an **Einstein–Fisher-like equation**:

```
𝒢_uv(g, Ω) = 8π G_info T^info_uv
```

where:

- 𝒢_uv is an "information Einstein tensor" constructed from the QGT metric and curvature;
- G_info is an effective information–geometry coupling constant.

The exact form of 𝒢_uv is model-dependent and not fixed in this
document; what matters is the structural statement:

> Information fluctuations gravitate: they curve the geometry in which both
> physical and learning dynamics take place.

---

## 5. Kaluza–Klein uplift and gauge structure

### 5.1 From 4D information geometry to 5D

We can uplift the 4D information manifold (with metric g_uv and a
connection one-form A_u derived from Berry curvature) into a **5D metric**:

- Base coordinates: θ^u,
- Extra coordinate: χ (a "fiber" direction associated with phase / charge).

A standard Kaluza–Klein-style ansatz is:

```
ds²_5D = g_uv dθ^u dθ^v + φ²(dχ + A_u dθ^u)²
```

where:

- φ is a scalar field controlling the size of the extra dimension,
- A_u is the Berry connection / gauge potential extracted from the QGT.

### 5.2 Interpretation

In this picture:

- The Berry connection becomes a genuine **gauge field** in the 5D geometry.
- Charged trajectories in information space feel an effective force (Lorentz-type term) 
  when moving through regions with nonzero curvature.
- The extra dimension χ encodes a phase/charge degree of freedom that couples to information geometry.

This provides a geometric story for how **gauge structure and information
geometry can be unified** in a minimal extension.

### 5.3 Implementation status

In the repository:

- The Kaluza–Klein uplift is implemented at the level of **metric assembly**:
  given g_uv and A_u, construct a 5×5 metric tensor.
- Full dynamical equations in 5D are not yet solved; the current use is:
  - Construct the metric,
  - Compute simple invariants,
  - Compare how different prime plaquettes populate this extended geometry.

### 5.4 Holographic interpretation: bulk–boundary duality

We now make explicit a key structural assumption of Light Theory:

> **Light Theory is formulated in a holographic universe where an AdS/CFT-like bulk–boundary duality holds.**

Under this assumption, we can read the mathematical structures we have built
as a complete **boundary/bulk correspondence**:

#### Boundary theory (information geometry)

The QGT-based information geometry on parameter space Θ is the **boundary CFT-like**
description:

- **Boundary data**: The metric g_uv and connection / Berry curvature Ω_uv computed
  from the state manifold |ψ(θ)⟩.
- **Boundary operators**: Prime plaquette Wilson loops and other geometric observables
  constructed on the boundary parameter space.
- **Boundary action**: An information action built from Fisher metric and curvature,
  with information stress–energy as sources.

Physically / conceptually:

- The boundary is "dual" to the learning dynamics, information flows, and
  geometric phases of the boundary system.
- States and their correlators encode the boundary CFT data.

#### Bulk theory (extended geometry)

The 5D Kaluza–Klein metric and associated fields define the **bulk geometry**:

```
ds²_bulk = g_μν(X) dX^μ dX^ν
```

where X^μ include the base coordinates θ^u, the extra KK fiber χ, and possibly
a radial coordinate (for an explicit AdS picture).

- **Bulk metric**: The 5D metric assembled from QGT and Berry connection is a
  candidate **asymptotically AdS-like metric** (the precise form depends on how
  boundary data scale; in the standard AdS/CFT picture, boundary coupling constants
  and VEVs map to bulk moduli).
- **Bulk fields**: The dilaton φ, gauge potential A_u, and any derived scalar potentials.
- **Bulk dynamics**: Einstein-like information field equations (from an information action).

Key properties:

- The bulk geometry encodes the **dual description** of the boundary information manifold.
- Solving bulk equations of motion with boundary conditions (fixed g_uv, Ω_uv)
  automatically encodes the boundary theory's dynamics.

#### Boundary/bulk dictionary

Explicit mappings between boundary observables and bulk fields:

| Boundary observable                    | Bulk counterpart                    |
| -------------------------------------- | ----------------------------------- |
| State \|\psi(θ)\⟩                     | Bulk scalar field φ_bulk or spinor |
| QGT metric g_uv                         | 4D block of 5D bulk metric         |
| Berry connection A_u                   | KK gauge field in bulk             |
| Information stress–energy T^info_uv    | Bulk stress–energy (Einstein eqs)  |
| Prime plaquette Wilson loop W          | Bulk geodesic or minimal surface   |
| Information distance on boundary       | Bulk geodesic distance             |
| Boundary correlation functions         | Bulk field correlators             |

#### Why this matters

Under the holographic assumption:

1. **Boundary computations have bulk partners**: Any geometric observable or
   information-theoretic quantity computed on the boundary has a dual bulk
   interpretation (geodesic distance, area, curvature invariants, etc.).

2. **Bulk geometry is constrained**: The bulk is not arbitrary; it must be
   consistent with boundary data and satisfy bulk equations derived from an
   information action. This makes the bulk **computable** from boundary data
   and provides a consistency check on the theory.

3. **Emergent phenomena**: "Matter-like" behavior (bound states, massive modes,
   phase transitions in the information IGBP) emerges from how boundary
   configurations populate the bulk geometry. This is consistent with the AdS/CFT
   philosophy that bulk dynamics encode emergent phenomena on the boundary.

4. **Testability**: If boundary experiments reveal violations of expected
   bulk/boundary correspondence (e.g., boundary observables incompatible with
   any consistent bulk geometry), the holographic hypothesis is falsified for
   Light Theory.

#### Relation to standard AdS/CFT

The Light Theory holographic picture shares structure with AdS/CFT but differs:

- In standard AdS/CFT: the boundary is a CFT living on flat spacetime;
  the bulk is AdS with a black hole or other geometric features.
- In Light Theory: the boundary is an information manifold (curved parameter space
  with nontrivial QGT); the bulk is the 5D extension that realizes gauge structure
  and higher-dimensional phases.

The analogy is structural, not literal. Light Theory does not claim that physics
is *literally* a holographic encoding in the AdS/CFT sense; rather, it assumes
that **the mathematical structure of holography** (boundary/bulk duality, emergence,
encoded constraints) is a useful lens for organizing the information geometry of
learning and physical systems.

---

## 6. Contact geometry, Reeb flow, and time

### 6.1 Contact structure

Beyond Riemannian geometry, Light Theory uses a **contact structure** to
encode time and "dark-energy-like" tension.

A **contact form** α is a one-form on an odd-dimensional manifold
satisfying a nondegeneracy condition. In our context:

- The manifold is the extended phase space of states and parameters.
- α is built from:
  - A phase one-form (encoding Berry-type phases),
  - An energy-like function (constructed from the information Hamiltonian).

### 6.2 Reeb vector field

Given a contact form α, there is a distinguished **Reeb vector field**
R, defined by:
- α(R) = 1,
- dα(R, ·) = 0.

We interpret:

- The flow of R as the **intrinsic time evolution** of the light state.
- Regions where R aligns or misaligns with gradients of information
  potentials as regions of "tension" in the geometry.

This allows us to talk about:

> Time not as an external parameter, but as a **geometric flow** generated
> by the contact structure of the information manifold.

### 6.3 Dark energy–like behaviour (interpretation)

In some regimes, the contribution of the Reeb flow to the effective dynamics
looks like a **uniform expansion / repulsion**:

- A contact term in the action can contribute an effective "pressure" that
  tends to expand volume elements.
- From the Light Theory perspective, this is an information-geometric analogue
  of dark energy: a background tension that encourages certain flows.

This interpretation is speculative by design, and is treated as a research
direction, not an established fact.

---

## 7. Information-geometry equation of state (IGBP)

### 7.1 Definition (conceptual)

To classify different regimes of the information manifold, Light Theory
introduces an information-geometry equation of state, denoted **IGBP**.

The idea is to define an effective **information density** ρ_info that compares:

- The **gradient** of a representative entropy / complexity functional
  S_rep on the manifold,
- With the **local curvature** Ω or associated invariants.

Schematic example:

```
ρ_info ~ ||∇ S_rep||² / ||Ω||
```

with norms taken with respect to the QGT metric.

### 7.2 Phases: free light vs knotted matter/intelligence

The IGBP framework then distinguishes:

- **Free light phase** – regions where the gradient energy is small relative
  to curvature: trajectories are almost geodesic, information flows freely.
- **Knotted / condensed phase** – regions where gradient energy is large
  relative to curvature: trajectories get "caught" in structured basins, corresponding to:
  - Matter-like bound states (in physics language),
  - Persistent modes / attractors (in learning language),
  - Structured reasoning or behaviours (in agent language).

A critical ratio (or band) in ρ_info marks the transition between these phases.

### 7.3 Role in experiments

In the current repository:

- IGBP is not fully parameterized or fit; instead, we:
  - Compute proxies for ||∇ S_rep||² and ||Ω||,
  - Compare them across prime plaquettes,
  - Identify which configurations live closer to the "knotted" regime.

Long term, this can be turned into:

- A quantitative classifier for different sectors of the curvature landscape.
- A way to predict where mass hierarchies or phase transitions should occur.

---

## 8. From theory to experiments

We now connect the theoretical machinery to the actual experiments in the code.

### 8.1 Prime plaquettes as Wilson loops

Each **prime plaquette** is a finite sequence of primes, e.g.
[2,3,5,7], [2,17,23,7], etc.

We interpret these as:

- Discrete instructions for a closed loop in parameter space,
- Where each prime controls:
  - A jump in some coordinate,
  - Or a twist generated by a specific bivector.

The loop defines a **Wilson-loop-like observable**:
- The state is parallel transported around the loop using the Berry connection.
- We read off the accumulated phase and curvature exposure.

This mapping from plaquette → loop → geometric response is the backbone
of Pocket_U Lite.

### 8.2 Pocket_U Lite: Standard Model toy

Pocket_U Lite is a small experiment that:

1. Assigns a plaquette to each of the 9 charged fermions.
2. Runs the geometric engine to compute curvature-dependent quantities.
3. Maps these into predicted mass scales.

Observed behaviour:

- The predicted masses match experimental values at the ~2–3% level.
- The empirical Koide relation among lepton masses appears as a
  geometric constraint, not a built-in assumption.

This is not claimed as a final model of particle physics, but as an
existence proof that:

> A purely geometric, prime-labelled structure can reproduce nontrivial
> mass patterns without manual fine-tuning per particle.

### 8.3 Curvature landscapes

The curvature landscape experiment:

- Fixes a set of plaquettes,
- For each, computes:
  - QGT metric and curvature,
  - Curvature scalars (e.g. something analogous to a Ricci scalar),
  - Derived quantities like ρ_info.

Results:

- Different plaquettes populate different parts of the curvature landscape.
- In particular, heavier particles tend to live in more curved regions
  (in the current toy model).
- This enables concrete questions like:
  - "Is there a monotone relation between curvature and mass?"
  - "Can curvature predict mass hierarchies beyond what we've fit?"

### 8.4 Falsifiability

The framework is **falsifiable** at multiple levels:

- **Internal consistency**: QGT, curvature, and operators must satisfy basic geometric identities.
- **Mass patterns**: If improved experiments or better data invalidate the observed fits,
    the current mapping must be revised or discarded.
- **Curvature–mass correlations**: If curvature turns out to be uncorrelated with mass hierarchies in more
    refined models, the central geometric intuition is weakened.

The point is not to defend the current toy forever, but to provide a **clear,
testable geometric setup** others can stress-test.

---

## 9. Geometrodynamics: geometry as the substance

Light Theory is best understood as a **geometrodynamical** framework.

Classical geometrodynamics (à la Wheeler) takes the view that gravity is not
a force on top of spacetime, but the **dynamics of spacetime geometry itself**.
Matter can, in principle, be rephrased in terms of topological and geometric
features of that geometry.

Light Theory adopts the same attitude, but for the **geometry of information**:

- The primary fields are the **metric** g_{uv} and **curvature** Ω_{uv}
  of the parameter/state manifold Θ, extracted from the QGT.
- The **information field equations** (Einstein–Fisher-like relations and their
  generalizations) treat information fluctuations as the source of curvature.
- The **Kaluza–Klein uplift** promotes the QGT data to a higher-dimensional bulk
  metric, so that gauge structure and curvature are purely geometric.
- The **contact structure and Reeb flow** define an intrinsic notion of "time"
  and expansion in terms of geometric flows, not an external time parameter.
- The **IGBP equation of state** classifies phases of this geometry (free vs
  knotted) in terms of gradients and curvature invariants.

In this viewpoint:

> There is no separate "stuff" besides geometry of information.  
> What we call particles, masses, and even persistent behaviours are specific  
> **geometric excitations** of this underlying information manifold.

Concretely, in the Standard Model toy:

- Each prime plaquette labels a **boundary excitation** (a particular way of
  exciting the geometry via a closed loop in parameter space).
- The response of the geometry — measured via QGT, higher-order operators like
  L₆, and curvature invariants — is mapped to an effective **mass scale**.
- Mass hierarchies then reflect **how strongly** different excitations deform
  the geometry, rather than being independent input parameters.

The holographic picture makes this explicit:

- The **boundary theory** on Θ is a geometrodynamical information
  theory: its basic degrees of freedom are g_{uv}, Ω_{uv}, and
  their flows under the information action.
- The **bulk theory** is a higher-dimensional geometrodynamics where the
  extended metric encodes the same physics in a different representation.
- Prime plaquettes and other observables act as boundary operators whose
  expectation values are dual to geometric quantities in the bulk.

From this perspective, Light Theory is not "geometry on top of physics" but
**physics as the dynamics of geometry** — with the crucial twist that the
geometry in question is the geometry of information.

---

## 10. Next directions

A non-exhaustive list of directions suggested by Light Mechanics:

1. **Mass–curvature correlation studies**  
   Systematically explore how different plaquettes / configurations fill
   the curvature landscape and whether simple laws emerge.

2. **Higher-dimensional parameter spaces**  
   Go beyond minimal toy models:
   - More parameters,
   - Larger spinor spaces,
   - Multi-field couplings.

3. **Applications to learning systems**  
   Treat RL policies or neural networks as ψ(θ), use Light Theory's geometry to:
   - Predict training instabilities,
   - Design geometry-aware optimizers,
   - Identify phase transitions in behaviour.

4. **Refined information field equations**  
   Make the Einstein–Fisher-like equations more precise,
   explore whether a canonical choice of information stress–energy emerges.

5. **Beyond 5D Kaluza–Klein**  
   Consider more general fiber bundles,
   study how richer gauge groups and symmetry breaking appear in the
   information geometry.

---

## 11. Summary

Light Mechanics formalizes the intuitive slogan:

> **Information has geometry, and that geometry has dynamics.**

- The **Clifford engine** and **QGT** provide the kinematics:
  how states live and move on curved information manifolds.
- The **sixth-order operator**, **information field equations**, and
  **contact / Kaluza–Klein structures** provide the dynamics:
  how curvature, phases, and flows interact.
- The **prime plaquette experiments** demonstrate that even minimal
  implementations of this idea can reproduce nontrivial structures in data.

Everything here is intentionally modular:

- You can treat it as a speculative physics framework,
- As a toolbox for analysing AI models,
- Or simply as a geometric playground for high-dimensional systems.

The code in this repository is the reference implementation of these ideas.
Further work will refine, test, and, if necessary, break them.
