Formal verification of the Seven Laws of Strategic Replicators in Lean 4 with Mathlib4.
This repository contains formal proofs for the Theory of Strategic Evolution (TSE), which analyzes strategic replicators: AI systems that optimize utility functions and control their own replication.
The formalization covers:
- RUPSI axiom system
- Games with Endogenous Players (GEPs)
- Replicator dynamics and Lyapunov stability
- ESDI characterization (existence, sparsity, equivalence)
- Small-gain condition for multi-level systems
- G∞ closure theorem
- Alignment impossibility
- Hopf bifurcation at stability threshold
| Law | Status | Main File |
|---|---|---|
| Law 1: Strategic Selection | ✓ Verified | Basin.lean |
| Law 2: ESDI Characterization | ✓ Fully machine-checked | ESDI.lean |
| Law 3: H-γ Stability | ✓ Fully machine-checked | SmallGain.lean |
| Law 4: G∞ Closure | ✓ Verified (modulo spectral) | GInfinityExtension.lean |
| Law 5: Constitutional Duality | ✓ Verified | WelfareTheorems.lean |
| Law 6: Alignment Impossibility | ✓ Verified | AlignmentImpossibility.lean |
| Law 7: Hopf Transition | ✓ Verified (modulo bifurcation) | HopfBifurcation.lean |
Basic.lean— Fundamental types and structuresCRUPSI.lean— RUPSI axiom formalizationESDI.lean— Evolutionarily Stable Distributions of Intelligence
Basin.lean— Stability basins and Lyapunov functionsSmallGain.lean— Small-gain condition and spectral radiusHopfBifurcation.lean— Bifurcation at γ = 1
AlignmentImpossibility.lean— Law 6 main theoremAlignmentImpossibilityProofs.lean— Supporting lemmasGInfinityExtension.lean— G∞ closure theoremGInfinityModifications.lean— Modification class structure
Frontier.lean— ROC frontier geometryCooperation.lean— Cooperation thresholdsDemocracy.lean— Endogenous-electorate impossibility
G10Validity.lean— Evolvability boundsG11Evolvability.lean— Innovation dynamicsG12ConstitutionalSelection.lean— Constitutional meta-governanceWelfareTheorems.lean— Welfare theorem extensionsHeterogeneousWelfare.lean— Heterogeneous fitness
PerronFrobenius.lean— Spectral theory for non-negative matricesNeumannSeries.lean— Series convergence for stabilityHelmholtzDecomposition.lean— Potential game structureSparsity.lean— Constraint-driven sparsity
theorem esdi_exists (sys : RUPSISystem) : ∃ x : ESDI sys, True
theorem esdi_sparsity (x : ESDI sys) (h : binding_constraints sys x = m) :
(support x).card ≤ mtheorem small_gain_stability (Γ : Matrix n n ℝ) (hΓ : spectral_radius Γ < 1) :
∃ V : Lyapunov, joint_lyapunov Vtheorem alignment_impossible (sys : ModifiableSystem)
(h : full_reachability sys) :
∀ B : StabilityBasin, ∃ path : ModificationSequence, escapes path Btheorem admissible_closed (φ ψ : Modification)
(hφ : φ ∈ M₀) (hψ : ψ ∈ M₀) :
(ψ ∘ φ) ∈ M₀Requires Lean 4 and Mathlib4.
lake buildSome proofs rely on standard mathematical axioms not yet in Mathlib:
- Spectral theory for general matrices
- ODE existence and uniqueness (Picard-Lindelöf)
- Hopf bifurcation theorem
These are marked with sorry or axiom declarations.
This formalization accompanies:
Vallier, Kevin. "The Theory of Strategic Evolution: Games with Endogenous Players and the Seven Laws of Strategic Replicators." arXiv:XXXX.XXXXX (2025).
Each .lean file corresponds to sections in the paper. Comments reference theorem numbers.
structure StrategicReplicator where
utility : UtilityFunction
budget : ResourceBudget
spawn : SpawnDecision
selection : SelectionPressurestructure RUPSISystem where
rival : RivalResources
utility_guided : UtilityGuided
performance_mapped : PerformanceMapped
selection_monotone : SelectionMonotone
innovation_rare : InnovationRaredef ModificationClass := Set Modification
def admissible (M : ModificationClass) : Prop :=
preserves_replicator_structure M ∧ preserves_small_gain MIssues and PRs welcome. Priority areas:
- Completing spectral theory axioms
- Formalizing ODE existence
- Extending to continuous strategy spaces
@software{vallier2025tseformal,
title={TSE Formal: Lean 4 Formalization of the Theory of Strategic Evolution},
author={Vallier, Kevin},
year={2025},
url={https://github.com/kevinvallier/TSE_Formal}
}MIT License
Lean 4, Mathlib4, formal verification, theorem proving, game theory, evolutionary dynamics, AI alignment, replicator dynamics, Lyapunov stability, spectral theory, impossibility theorems