Lean Transformation Family Plan
- Parent README: README.md
- Related analysis: ANIME_ONTOLOGY_GAP_ANALYSIS.md
- Canonical formal surface: ../FORMAL_LEDGER.md
- Existing precedent: ../lean/Lean/ForkRaceFoldTheorems/ReinforcementTopology.lean
- Existing precedent: ../lean/Lean/ForkRaceFoldTheorems/CancerReinforcement.lean
This is a Lean-first plan for the most useful bounded extraction from the
anime-inspired ontology: formalize a transformation-family kernel around
projection, reinforcement, and a new generic decomposition operator.
The goal is not to canonize anime lore. The goal is to capture one reusable formal substrate that already matches existing Gnosis work and can support new reducers, theorem ids, and cross-domain bridges.
Why This Candidate
This is the best next formalization candidate because:
projectionalready exists in the current Gnosis surface.reinforcementalready exists and already feeds useful downstream work, including cancer theorems.decompositionis the missing operator from the same family and is the most natural formal reduction of the anime material.- The triad is small enough to mechanize honestly and useful enough to power a deterministic reducer instead of a one-off manuscript note.
The useful claim is simple:
- projection creates structure,
- reinforcement amplifies existing structure,
- decomposition removes structure,
- featureless states cannot be reinforced until structure is restored.
That last point is already repo-relevant because ../lean/Lean/ForkRaceFoldTheorems/CancerReinforcement.lean proves the same pattern in the oncology domain.
Proposed Lean Surface
Add two new modules:
lean/Lean/ForkRaceFoldTheorems/DecompositionTopology.leanlean/Lean/ForkRaceFoldTheorems/TransformationFamily.lean
Keep them small and arithmetic-first. Do not start with franchise examples. Start with finite natural-number witnesses and explicit before/after states.
DecompositionTopology.lean
Define a generic topological object and a decomposition result:
structure TransformObject where
crossings : Nat
weight : Nat
capacity : Nat
hCapacity : 0 < capacity
structure DecompositionResult where
residualCrossings : Nat
releasedWeight : Nat
residueUnits : NatPrimary operator:
decompose : TransformObject → Nat → DecompositionResult
Where the second argument is a bounded decomposition budget or intensity.
Core semantic intent:
- decomposition never increases crossings;
- full decomposition can drive crossings to zero;
- released weight and residue are non-negative;
- decomposing a featureless object is idempotent.
TransformationFamily.lean
Import:
ReinforcementTopologyDecompositionTopology- optionally
LiftProjectionCoreonly if the projection bridge actually needs it; do not import it by default if simple arithmetic witnesses suffice.
Define:
inductive TransformationMode
| projection
| reinforcement
| decomposition
structure TransformationWitness where
beforeCrossings : Nat
afterCrossings : Nat
beforeWeight : Nat
afterWeight : NatUse this module to state the pairwise relations between the three operator families without re-proving the full reinforcement surface.
Theorem Scope
Keep the first pass to 6-8 theorems total.
DecompositionTopology.lean
Planned theorem set:
decomposition_does_not_increase_crossingsresidualCrossings ≤ object.crossingsfull_decomposition_yields_featurelessfull budget on a finite object yieldsresidualCrossings = 0decomposition_releases_nonnegative_residuereleasedWeightandresidueUnitsare non-negative by constructionfeatureless_decomposition_idempotentdecomposing an already featureless object preserves the featureless result
TransformationFamily.lean
Planned theorem set:
projection_adds_structurere-export or restate the existing projection witness in the family languagereinforcement_preserves_structurere-export or restate the existing reinforcement witness in the family languagedecomposition_removes_or_preserves_structuredecomposition cannot add crossingsprojection_reinforcement_exclusivea single witness cannot both create crossings and preserve crossingsreinforcement_decomposition_exclusivea single witness cannot both strictly preserve and strictly reduce crossingsfeatureless_states_cannot_reinforceifbeforeCrossings = 0, reinforcement cannot be the correct modedecompose_then_reinforce_requires_restorationonce a full decomposition yields zero crossings, any subsequent successful reinforcement requires an intermediate structure-restoring step
That last theorem is the practical bridge back to cancer reinforcement and is the main reason this family is useful.
TypeScript Mirror and Reducer
After the Lean layer exists, add one runtime mirror:
src/transformation-family-formalization.ts
Do not make it a sprawling ontology parser. Make it a deterministic reducer that classifies already-normalized transformation examples into the three families and emits theorem ids plus simple counts.
Suggested shape:
export type TransformationFamily =
| 'projection'
| 'reinforcement'
| 'decomposition';
export interface TransformationFamilyInput {
readonly id: string;
readonly beforeCrossings: number;
readonly afterCrossings: number;
readonly beforeWeight: number;
readonly afterWeight: number;
}
export interface TransformationFamilyEntry {
readonly id: string;
readonly family: TransformationFamily;
readonly featurelessBefore: boolean;
readonly featurelessAfter: boolean;
}
export interface TransformationFamilyBundle {
readonly theoremIds: readonly TransformationFamilyTheoremId[];
readonly entries: readonly TransformationFamilyEntry[];
readonly aggregate: {
readonly projectionCount: number;
readonly reinforcementCount: number;
readonly decompositionCount: number;
readonly featurelessCount: number;
};
}Suggested theorem ids:
THM-TRANSFORMATION-PROJECTION-ADDS-STRUCTURETHM-TRANSFORMATION-REINFORCEMENT-PRESERVES-STRUCTURETHM-TRANSFORMATION-DECOMPOSITION-NONINCREASINGTHM-TRANSFORMATION-PROJECTION-REINFORCEMENT-EXCLUSIVETHM-TRANSFORMATION-REINFORCEMENT-DECOMPOSITION-EXCLUSIVETHM-TRANSFORMATION-FEATURELESS-CANNOT-REINFORCETHM-TRANSFORMATION-DECOMPOSE-THEN-REINFORCE-REQUIRES-RESTORATION
Planned Consumer Value
This is worth doing only if it pays rent outside the manuscript layer.
Immediate consumer value:
- gives the anime-inspired ontology one honest reduced substrate;
- supplies a reusable classifier for future cross-domain notes;
- tightens the conceptual bridge from reinforcement magic to cancer reinforcement without adding franchise-specific canon;
- creates a small formal vocabulary that future reducer bundles can use instead of inventing ad hoc operator names.
Likely downstream consumers:
FORMAL_LEDGER.mdonce promoted;- any future ontology-reducer note;
- cross-domain theorem composition that needs to distinguish create / amplify / dismantle operations.
Out of Scope
Do not include these in the first implementation:
- full anime universe matrices;
- source-typology taxonomy across every franchise;
- strategic-scale tiering;
- expository examples inside Lean types or theorem names;
- transmutation as a fourth operator unless decomposition is already stable.
If transmutation becomes useful later, model it as a composition built on top of decomposition plus reconstruction, not as day-one surface area.
Implementation Order
- Add
DecompositionTopology.leanwith the bounded arithmetic kernel and four theorems. - Add
TransformationFamily.leanas the bridge module over projection, reinforcement, and decomposition. - Add
src/transformation-family-formalization.tswith theorem ids and deterministic classification. - Add a focused test file for the reducer only after the bundle shape is fixed.
- Add one short canonical summary to
FORMAL_LEDGER.mdonly if the Lean and reducer surfaces both exist. - Let Aeon link to the Gnosis summary only after Gnosis promotion.
Verification Plan
Lean:
- module compiles sorry-free;
- theorem names are stable and exported through the usual Gnosis surface;
- no new axioms or placeholders.
TypeScript:
- deterministic bundle generation from fixed inputs;
- theorem ids appear in the bundle;
- family classification is stable across repeated runs;
- featureless cases classify correctly.
Docs:
- the canonical ledger summary stays short and substrate-neutral;
- franchise names, if preserved at all, stay outside the canonical theorem surface.
Success Criteria
This plan is successful if it yields all of the following:
- one new operator family that the repo does not already have
(
decomposition); - one small bridge module that unifies the three transformation modes without duplicating existing theorem families;
- one deterministic reducer bundle with stable theorem ids;
- zero dependence on franchise-specific canonical naming.
If that cannot be achieved cleanly, the topic should remain a docs note rather than being promoted into the formal ledger.