# GQS checked mathematical core

This project formalizes selected mathematics from Joshua Farrow's **Generalized Quantum State Theory: A Formal Framework for Cross-Scale Memory Dynamics**, supplied as `gqs_formal_theory.docx` and dated December 2025. It contains **56 Lean theorem declarations**, including supporting lemmas, in three modules. A separate audit also checks the category's identity construction, composition construction, and category instance.

The main result is a checked mathematical core together with corrections to two central arguments. The scalar decay calculation is repaired; an exact finite graph model cannot sustain nonzero unforced equilibria under positive loss; the claimed continuity argument does not force a phase transition; and precise additional hypotheses establish preservation of entropy deficits and exact recurrence. A specified saturating feedback model supplies a conditional positive-equilibrium threshold theorem.

These results do not establish the empirical equivalence of quantum scars, neural engrams, and cultural memories. They make the hypotheses and consequences of candidate models explicit.

## Verification status

The project was built with **Lean 4.19.0** and mathlib commit **c44e0c8ee63ca166450922a373c7409c5d26b00b** (the `v4.19.0` release). The full project build and the all-theorem axiom audit succeeded. `verification/results.json` records the toolchain and SHA-256 hashes of the checked source and configuration files; `verification/build.log` and `verification/axioms.log` contain the actual outputs.

Every audited declaration depends only on a subset of Lean's standard logical axioms `propext`, `Classical.choice`, and `Quot.sound`. There are no unfinished-proof dependencies (`sorryAx`), custom theory axioms, or native-evaluation axioms in these reports. This is not a claim that the proofs are free of all foundational axioms.

`Audit.lean` checks every manually declared theorem and the three category constructions. The total of 56 includes technical supporting lemmas; it does not mean 56 independent scientific discoveries.

## Important checked results

| Manuscript location | Checked result | Main declaration |
| --- | --- | --- |
| Definition 4.4 and Appendix B.1 | The exponent is negative exactly when `D*k^2 + gamma > 0` | `GQS.Dynamics.exponent_negative_iff` |
| Appendix B.1 | Explicit modes satisfy their ODE and converge to zero for nonnegative diffusion and positive loss | `mode_solves_ode`, `all_modes_decay` |
| Definition 4.3 | Exact finite graph energy dissipation and its derivative along a supplied solution | `energy_dissipation_identity`, `energy_hasDerivAt`, `energy_deriv_le` |
| Definition 4.3 | No nonzero stationary field in the unforced graph model with positive loss | `no_nonzero_unforced_equilibrium` |
| Definition 4.2 | The negative-square scar potential is unbounded below on an unconstrained scalar ray | `negative_square_unbounded_below` |
| Proposition 4.6 and Appendix B.2 | A smooth constant-source model has no positive onset threshold | `GQS.PhaseTransition.affine_has_no_positive_threshold` |
| Proposed repair of Proposition 4.6 | A positive equilibrium of the specified logistic feedback model exists iff `gamma < g` | `logistic_positive_equilibrium_iff` |
| Proposed repair of Proposition 4.6 | Exact reciprocal-linear temporal decay at threshold | `criticalTrajectory_solves_ode`, `criticalTrajectory_reciprocal` |
| Definitions 5.1–5.3 | The repaired, explicitly bundled morphisms form a Mathlib category | `GQS.Category.scarSystemCategory` |
| Definitions 3.4–3.5 and 5.3 | Matched reference entropy is necessary and sufficient for exact depth scaling | `depth_scaling_iff_reference_scaling` |
| Definitions 3.4 and 5.3 | Positive scaling preserves and reflects scar status at the rescaled threshold | `scar_iff_scaled` |
| Cross-domain dynamical comparison | Injective intertwining preserves and reflects exact return times and least periods | `return_iff_of_injective`, `exactPeriod_iff_of_injective` |

Full names and counts are recorded in `verification/theorem_inventory.json`. The source files state all hypotheses and include explanatory comments.

## What the dynamics proofs mean

### Correct the stability inequality

For the scalar mode written in Appendix B.1,

\[
a(t)=a_0e^{-(Dk^2+\gamma)t},
\]

the exponent is negative precisely when \(Dk^2+\gamma>0\). Thus \(D\ge0\) and \(\gamma>0\) give decay at every wave number. The manuscript's inequality \(\gamma<Dk^2\) is not necessary. The checked counterexample uses \(D=1,\gamma=2,k=1\): the mode decays as \(e^{-3t}\), although the proposed inequality becomes \(2<1\).

Lean verifies the derivative, the initial value, convergence to zero, and the bound

\[
|a(t)|\le |a_0|e^{-\gamma t}\qquad(D\ge0,\ t\ge0).
\]

These statements concern the explicitly defined mode. The file does not derive a Fourier transform from a PDE, prove uniqueness of every possible ODE solution, or justify dropping perturbations of the coupled source. Linearizing the full coupled GQS equations would require those additional steps.

### A finite graph dissipation theorem

Let the finite graph have symmetric nonnegative weights \(w_{ij}\), and define

\[
(Ls)_i=\sum_jw_{ij}(s_i-s_j),\qquad
\dot s_i=-D(Ls)_i-\gamma s_i,\qquad
E(s)=\sum_i s_i^2.
\]

Lean verifies the exact identity

\[
\frac{dE}{dt}
=-D\sum_{i,j}w_{ij}(s_i-s_j)^2-2\gamma E,
\]

conditional on the supplied differentiable trajectory satisfying the coordinate ODEs. It then verifies the differential estimate \(E'\le-2\gamma E\) for \(D\ge0\). Separately, the stationary equations imply \(s_i=0\) for every vertex if \(\gamma>0\). Graph connectedness is unnecessary because positive loss also damps constant modes.

This gives an exact no-go result for autonomous nonzero stationary memory in this particular unforced graph model. A maintained pattern requires an explicit source, feedback, or a change in the dynamics. The project does not claim a proof for arbitrary continuum fields, boundary conditions, or the complete stochastic coupled system, and it does not derive a global-in-time existence theorem or integrate the energy estimate into a general trajectory bound.

### The potential term needs constraints or stabilization

The manuscript proposes \(V_{\rm scar}=-\|S\|_2^2\). The checked scalar-ray theorem states that for every real lower bound \(B\), there is \(s\ge0\) with \(-s^2<B\). This term therefore provides no lower bound on its own. Other terms in the full potential, an amplitude constraint, or a stabilizing nonlinear term could change that conclusion; none is silently inserted into the formalization.

## What the transition proofs mean

### A counterexample to the continuity argument

Consider

\[
\dot s=g-\gamma s,\qquad \gamma>0.
\]

Lean proves that its unique equilibrium is \(s_*=g/\gamma\), that this equilibrium varies differentiably with \(g\), and that equilibria exceed any prescribed bound as the source increases. Every \(g>0\), however small, already has a positive equilibrium. Its linearization is \(-\gamma\) for every coupling. The exact solution and exponential error formula are also checked.

This is a countermodel to the abstract reasoning in Appendix B.2. Continuity between zero source and arbitrarily large equilibria does not imply a positive critical coupling or singular change. The scalar countermodel is not presented as a complete implementation of all four GQS evolution equations.

### A conditional replacement with explicit reinforcement

Specify an additional closure,

\[
\dot s=(g-\gamma)s-bs^2,\qquad b>0.
\]

Lean proves

\[
F(s)=0\iff s=0\ \text{or}\ s=(g-\gamma)/b,
\]

and

\[
\exists s>0:\ F(s)=0\iff g>\gamma.
\]

For \(g\le\gamma\), zero is the only nonnegative equilibrium. The checked derivative signs are negative at zero below threshold, positive at zero above threshold, and negative at the positive equilibrium above threshold. These are equilibrium and linearization results; a separate formal nonlinear stability theorem is not included.

At \(g=\gamma\), Lean verifies

\[
s(t)=\frac{s_0}{1+bs_0t},\qquad
\frac1{s(t)}=\frac1{s_0}+bt\quad(s_0>0,t\ge0).
\]

This is an exact temporal decay law. It does not establish spatial power-law correlations, a Kosterlitz–Thouless transition, or common critical exponents across domains. The logistic closure is a new modeling assumption, not a derivation from an unspecified source function.

## What the correspondence proofs mean

### A coherent category

Each morphism includes its state map, positive entropy scale, offset, and monotone parameter maps as explicit data. Identity, composition, and associativity are checked. If two successive entropy transformations use \((\alpha_1,\beta_1)\) and \((\alpha_2,\beta_2)\), their composite uses

\[
\alpha=\alpha_2\alpha_1,\qquad \beta=\alpha_2\beta_1+\beta_2.
\]

The operators remain abstract. The category does not assume or prove continuity, decay semigroup laws, existence of physical scars, or cross-domain empirical functors. In particular, a monotone time map alone need not preserve additive time or cover all target times.

### Reference entropy must map too

Writing \(R_i\) for the reference entropy, suppose

\[
S_2(\phi x)=\alpha S_1(x)+\beta,\qquad \alpha>0.
\]

Exact depth transport

\[
d_2(\phi x)=\alpha d_1(x)
\]

holds at a state if and only if

\[
R_2(\phi x)=\alpha R_1(x)+\beta.
\]

With that condition, the strict scar predicate satisfies

\[
\operatorname{Scar}_1(x,\delta)
\iff \operatorname{Scar}_2(\phi x,\alpha\delta).
\]

The category in the manuscript omits the reference entropy even though the scar definition needs it. A checked numerical counterexample shows that preserving only state entropy can destroy the entropy deficit. The theorem does not assert that an empirically appropriate matched reference exists.

### Exact recurrence requires a non-collapsing map

If \(\phi T_1=T_2\phi\), the map intertwines all finite iterates. If \(\phi\) is injective, Lean proves

\[
T_1^n(x)=x\iff T_2^n(\phi x)=\phi x,
\]

including equality of least positive periods measured in matched updates. All-time fixed-point transport is also checked with explicit time-surjectivity or state-injectivity hypotheses as appropriate.

These statements concern exact returns. Approximate quantum revivals require quantitative metrics and error bounds. Attractor stability needs topological hypotheses, commonly a suitable homeomorphic conjugacy. Noninjective coarse-graining cannot automatically use the reflected-return theorem.

## Remaining mathematical and empirical work

1. **Specify the quantum entropy.** Global von Neumann entropy is zero for every pure state, so it does not distinguish exceptional scar eigenstates from ordinary pure eigenstates. A specified reduced-state entropy and matched subsystem reference would address this issue. Turner et al. analyze subsystem entanglement and other nonthermal signatures; see the primary reference below.
2. **Connect the two meanings of scar.** The document does not define a map from a state's entropy deficit to the field \(S(x)\), or a law relating that deficit to its decay rate. The lifetime claim \(\tau\propto e^{d/T}\) therefore needs additional dynamics, units, and assumptions.
3. **Choose a field space and source interpretation.** Point evaluation \(S(X)\) is not defined for a general \(L^2\) equivalence class. Continuous fields, sufficient regularity, averaging kernels, or a finite graph provide alternatives. A Dirac source also needs an appropriate weak/mild formulation or regularization.
4. **Specify the coupled model.** Formation, attention feedback, noise, boundary conditions, and positivity preservation need explicit definitions before proving the full model well posed or stable.
5. **Construct a concrete correspondence.** Abstract functor existence is weak because constant functors are available when the target category has an object. A scientific conjecture should identify concrete models, meaningful observables, and nondegeneracy conditions. Arbitrary monotone parameter transformations also need not preserve critical exponents.
6. **Repair the natural-transformation typing.** Section 5.6 treats scar systems as both objects and categories. Define the relevant categories and functors first. A natural transformation alone does not establish a causal intervention effect or influence beyond microphysical laws.

## Reproduce the proofs

Install Lean through its official toolchain manager, then open a terminal in this directory. The supplied `lean-toolchain` selects the pinned version. Python 3 is used only to audit the text report and calculate source hashes.

```bash
lake exe cache get Mathlib.Analysis.SpecialFunctions.ExpDeriv Mathlib.Tactic Mathlib.CategoryTheory.Category.Basic Mathlib.Data.NNReal.Basic Mathlib.Logic.Function.Iterate
bash scripts/verify.sh
```

The supplied `lake-manifest.json` locks transitive dependencies. If the manifest must be regenerated, run `MATHLIB_NO_CACHE_ON_UPDATE=1 lake update` before the cache command; review any resulting dependency changes. The release config uses a Git commit, not a path to this session's environment. Network access is required for the initial dependency/cache downloads. Runtime binaries and downloaded libraries are intentionally excluded from this source package.

The verification script runs the project build, invokes Lean on every axiom query with warnings treated as errors, rejects unexpected axioms or missing declarations, and writes the verification records. The original manuscript is identified by a SHA-256 record in `verification/source_document.json`; its bytes are not duplicated in this package.

## Sources and interpretation

- Farrow, Joshua. *Generalized Quantum State Theory: A Formal Framework for Cross-Scale Memory Dynamics*. Supplied manuscript, December 2025; especially §§3–5, predictions P1/P10–P12, and Appendix B. All algebraic criticisms and replacement theorems above are derived from the displayed equations and explicitly stated models.
- [Lean reference manual: Validating a Lean Proof](https://lean-lang.org/doc/reference/latest/ValidatingProofs/) — explains kernel checking, inspecting theorem meaning, and axiom audits.
- [Lean reference manual: Axioms](https://lean-lang.org/doc/reference/latest/Axioms/) — explains standard logical axioms, custom axioms, and unfinished proofs.
- [Pinned mathlib source](https://github.com/leanprover-community/mathlib4/tree/c44e0c8ee63ca166450922a373c7409c5d26b00b) — exact library used here.
- [Turner et al., Physical Review B 98, 155134 (2018)](https://journals.aps.org/prb/abstract/10.1103/PhysRevB.98.155134) — primary study of quantum scarred eigenstates, subsystem entanglement, thermalization, and perturbations.

Proof checking establishes consequences of the formal statements. The correspondence between those statements and the intended scientific systems remains a separate responsibility, made explicit in this package.
