Hyperfields/Fields/Hyperdynamics.lean
Explanation legend
L4DEL explanations are a separate layer. They do not change the Lean source. Intuition is explanatory prose; numbered items are a reading path; sources link the wording back to evidence.
- L4DEL
- Lean4 Domain Explanation Language
17 declarations, 0 contain sorry, 0 axioms
Hyperdynamics
[FRAME] Indexed transformations without assuming a universal temporal axis.
This is the Lean port of the local hyperdynamics candidate. It carries the
transition system and the properties that frame establishes.
The frame's central refusal is that a step is not a moment. The state carrier is a set of named states, the step relation is a set of pairs, and the index of a step is local to the system. Nothing here is a clock, nothing here is physical duration, and nothing here says that a reachable state is a state that will be reached.
What is not proved here, and cannot be, is any claim that these finite
systems are the right models of change. The Python source carries the same
[FRAME] classification and this port keeps it: a finite reachability
result is not a foundation.
Imports (2)
Imported by 1 file
- structure
Hyperfields.Fields.Hyperdynamics.TransitionSystemA finite transition system with its state kinds line 43 sourceA finite transition system: its states, its steps, and the kind of each state.
The kinds are declared per state, exactly one per state, and the port keeps them separate from the steps. A step is a relation between two identified states; it is not an interval and it is not a position in an assumed global order.
Every state is named and carries one declared kind, so a step is between two identified states rather than between positions in an assumed sequence.
no axioms what this means
Statement uses:
Natstructure TransitionSystem (n : Nat) where …
- def
Hyperfields.Fields.Hyperdynamics.TransitionSystem.kindOfStateRead a state's kind line 53 sourceThe kind declared for a state, if any.
A state's kind is a name rather than a position, so it is read separately from the transition relation.
Prerequisites: Hyperfields.Fields.Hyperdynamics.TransitionSystem
standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Nat, Hyperfields.Fields.Hyperdynamics.TransitionSystem,Fin,Option,StringProof uses:
Hyperfields.Fields.Hyperdynamics.TransitionSystem.kindOfState.match_1,Prod,List.find?,BEq.beq,Prod.fst,Hyperfields.Fields.Hyperdynamics.TransitionSystem.kindOf,Option.some,Prod.snd,Unit,Option.none4 instances, coercions and auxiliary constants left out.
def TransitionSystem.kindOfState {n : Nat} (system : TransitionSystem n) (state : Fin n) : Option String := … - def
Hyperfields.Fields.Hyperdynamics.TransitionSystem.wellShapedThe axioms a transition system must satisfy line 70 sourceWhether the system satisfies the axioms.
The checks are:
- Every step has both endpoints in the state carrier.
- Every state has exactly one kind, and no state outside the carrier has one.
A step to a state the system does not have describes a change into nothing, and a state with two kinds is described twice.
standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Nat, Hyperfields.Fields.Hyperdynamics.TransitionSystem,BoolProof uses:
Bool.and,List.all,Prod,Fin,Hyperfields.Fields.Hyperdynamics.TransitionSystem.steps, Hyperfields.Finite.mem,Prod.fst,Hyperfields.Fields.Hyperdynamics.TransitionSystem.states,Prod.snd,String,Hyperfields.Fields.Hyperdynamics.TransitionSystem.kindOf,BEq.beq,List.length,List.eraseDups,List.map6 instances, coercions and auxiliary constants left out.
def TransitionSystem.wellShaped {n : Nat} (system : TransitionSystem n) : Bool := … - def
Hyperfields.Fields.Hyperdynamics.reachableWhat a system can reach line 91 sourceThe states reachable from a starting state.
Reachability is computed by a bounded forward walk over the step relation. The bound is the size of the state carrier: a state that is reachable at all is reachable within that many steps, because a shortest path never repeats a state.
A state is reachable when some path of declared steps arrives at it, and the walk is bounded by the number of states.
Prerequisites: Hyperfields.Fields.Hyperdynamics.TransitionSystem
standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Nat, Hyperfields.Fields.Hyperdynamics.TransitionSystem,Fin,ListProof uses:
List.flatMap,List.map,Prod,Prod.snd,List.filter,BEq.beq,Prod.fst,Hyperfields.Fields.Hyperdynamics.TransitionSystem.steps,List.foldl,HAppend.hAppend,List.cons,List.nil,List.range,List.eraseDups6 instances, coercions and auxiliary constants left out.
def reachable {n : Nat} (system : TransitionSystem n) (start : Fin n) : List (Fin n) := … - def
Hyperfields.Fields.Hyperdynamics.pathLiftsLifting a path through a partial bridge line 117 sourceWhether a path lifts through a bridge.
The path must be a path in the source: every state on it is in the source carrier, and every consecutive pair is a declared step. The bridge must cover every state on the path, and the lifted sequence must be a path in the target.
The lift is computed by looking each state up in the bridge. A state the bridge does not cover makes the lift fail, and it is checked separately rather than papered over with a default value: a default would let an uncovered state masquerade as a lifted one.
A lifted path must be a path in the target, so the bridge has to carry every step of the source path into a declared step of the target.
standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Nat, Hyperfields.Fields.Hyperdynamics.TransitionSystem,List,Fin,Prod,BoolProof uses:
Bool.and,List.all, Hyperfields.Finite.mem,Hyperfields.Fields.Hyperdynamics.TransitionSystem.states,List.zip,List.drop,OfNat.ofNat,Hyperfields.Fields.Hyperdynamics.TransitionSystem.steps,List.any,BEq.beq,Prod.fst,List.map,Prod.snd,Hyperfields.Fields.Hyperdynamics.pathLifts.match_1,Option,List.find?,Prod.mk,Bool.false6 instances, coercions and auxiliary constants left out.
def pathLifts {m n : Nat} (source : TransitionSystem m) (target : TransitionSystem n) (path : List (Fin m)) (bridge : List (Fin m × Fin n)) : Bool := … - def
Hyperfields.Fields.Hyperdynamics.chainSystemA three-state transition system line 145 sourceA concrete transition system:
asteps tob,bsteps toc, andcsteps to nothing.The two kinds are declared so that the kind condition is not vacuous:
aandcshare one kind andbhas another.A concrete system lets the compiler check the axioms and the reachability against something a reader can see.
standard axioms: propext what this means
Statement uses: Hyperfields.Fields.Hyperdynamics.TransitionSystem,
OfNat.ofNat,NatProof uses:
Hyperfields.Fields.Hyperdynamics.TransitionSystem.mk,List.cons,Fin,List.nil,Prod,Prod.mk,String4 instances, coercions and auxiliary constants left out.
def chainSystem : TransitionSystem 3 where …
- def
Hyperfields.Fields.Hyperdynamics.cyclicSystemA system with a cycle line 159 sourceA concrete transition system with a cycle:
asteps tobandbsteps back toa.Reachability from
ais the whole carrier, which is what makes the difference between "reachable" and "eventually arrives" visible.A cycle makes the point that reachability is about the step relation, not about a direction of time.
standard axioms: propext what this means
Statement uses: Hyperfields.Fields.Hyperdynamics.TransitionSystem,
OfNat.ofNat,NatProof uses:
Hyperfields.Fields.Hyperdynamics.TransitionSystem.mk,List.cons,Fin,List.nil,Prod,Prod.mk,String4 instances, coercions and auxiliary constants left out.
def cyclicSystem : TransitionSystem 3 where …
- theorem
Hyperfields.Fields.Hyperdynamics.chain_system_is_well_shapedThe transition system satisfies the axioms line 167 sourceThe worked transition system satisfies the axioms.
The concrete example must clear the axioms the frame demands, or the example proves nothing.
standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Eq,Bool, Hyperfields.Fields.Hyperdynamics.TransitionSystem.wellShaped,OfNat.ofNat,Nat, Hyperfields.Fields.Hyperdynamics.chainSystem,Bool.trueProof uses:
of_decide_eq_true,id,Decidable.decide,Eq.refl3 instances, coercions and auxiliary constants left out.
Tactic trace: 1 steps
decideline 168before⊢ chainSystem.wellShaped = true
afterno goals remain
theorem chain_system_is_well_shaped : chainSystem.wellShaped = true := by …
- theorem
Hyperfields.Fields.Hyperdynamics.cyclic_system_is_well_shapedThe cyclic system satisfies the axioms line 173 sourceThe worked cyclic transition system satisfies the axioms.
A cycle in the step relation is allowed; a step to a state the system does not have is not.
standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Eq,Bool, Hyperfields.Fields.Hyperdynamics.TransitionSystem.wellShaped,OfNat.ofNat,Nat, Hyperfields.Fields.Hyperdynamics.cyclicSystem,Bool.trueProof uses:
of_decide_eq_true,id,Decidable.decide,Eq.refl3 instances, coercions and auxiliary constants left out.
Tactic trace: 1 steps
decideline 174before⊢ cyclicSystem.wellShaped = true
afterno goals remain
theorem cyclic_system_is_well_shaped : cyclicSystem.wellShaped = true := by …
- theorem
Hyperfields.Fields.Hyperdynamics.all_states_are_reachable_from_the_startEvery state is reachable from the first line 179 sourceEvery state is reachable from the first state of the chain system.
A chain of steps reaches everything downstream, and the compiler can check the whole reachable set at once.
standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Eq,List,Fin,OfNat.ofNat,Nat, Hyperfields.Fields.Hyperdynamics.reachable, Hyperfields.Fields.Hyperdynamics.chainSystem,List.cons,List.nilProof uses:
of_decide_eq_true,id,Bool,Decidable.decide,Bool.true,Eq.refl8 instances, coercions and auxiliary constants left out.
Tactic trace: 1 steps
decideline 181before⊢ reachable chainSystem 0 = [0, 1, 2]
afterno goals remain
theorem all_states_are_reachable_from_the_start : reachable chainSystem 0 = [0, 1, 2] := by …Mentions: Hyperfields.Fields.Hyperdynamics.reachable, Hyperfields.Fields.Hyperdynamics.chainSystem
- theorem
Hyperfields.Fields.Hyperdynamics.a_terminal_state_reaches_only_itselfA state with no outgoing step reaches only itself line 192 sourceOnly the last state is reachable from the last state of the chain system.
This is the case that distinguishes reachability from a claim about progress. The state
2is a perfectly good state; it simply has no outgoing step, and nothing here says that is a defect.Reachability is about the step relation, so a state that steps to nothing reaches nothing but itself.
standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Eq,List,Fin,OfNat.ofNat,Nat, Hyperfields.Fields.Hyperdynamics.reachable, Hyperfields.Fields.Hyperdynamics.chainSystem,List.cons,List.nilProof uses:
of_decide_eq_true,id,Bool,Decidable.decide,Bool.true,Eq.refl8 instances, coercions and auxiliary constants left out.
Tactic trace: 1 steps
decideline 194before⊢ reachable chainSystem 2 = [2]
afterno goals remain
theorem a_terminal_state_reaches_only_itself : reachable chainSystem 2 = [2] := by …Mentions: Hyperfields.Fields.Hyperdynamics.reachable, Hyperfields.Fields.Hyperdynamics.chainSystem
- theorem
Hyperfields.Fields.Hyperdynamics.a_cycle_reaches_backA cycle makes every state in the cycle reachable line 199 sourceEvery state in the cyclic system is reachable from the first.
A cycle lets a state be reached from itself by a nonempty path, which is what makes the closure of the step relation nontrivial.
standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Eq,List,Fin,OfNat.ofNat,Nat, Hyperfields.Fields.Hyperdynamics.reachable, Hyperfields.Fields.Hyperdynamics.cyclicSystem,List.cons,List.nilProof uses:
of_decide_eq_true,id,Bool,Decidable.decide,Bool.true,Eq.refl8 instances, coercions and auxiliary constants left out.
Tactic trace: 1 steps
decideline 201before⊢ reachable cyclicSystem 0 = [0, 1]
afterno goals remain
theorem a_cycle_reaches_back : reachable cyclicSystem 0 = [0, 1] := by …Mentions: Hyperfields.Fields.Hyperdynamics.reachable, Hyperfields.Fields.Hyperdynamics.cyclicSystem
- theorem
Hyperfields.Fields.Hyperdynamics.a_step_to_an_undeclared_state_is_rejectedA step to an undeclared state is rejected line 211 sourceA system with a step to a state outside its carrier is rejected.
This is the negative case. A checker that never rejects anything is not a check, and this theorem is what makes the positive cases meaningful.
A transition into a state the system does not have describes a change into nothing.
standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Eq,Bool, Hyperfields.Fields.Hyperdynamics.TransitionSystem.wellShaped,OfNat.ofNat,Nat,Hyperfields.Fields.Hyperdynamics.TransitionSystem.mk,List.cons,Fin,List.nil,Prod,Prod.mk,String,Bool.falseProof uses:
of_decide_eq_true,id,Decidable.decide,Bool.true,Eq.refl7 instances, coercions and auxiliary constants left out.
Tactic trace: 1 steps
decideline 215before⊢ { states := [0, 1], steps := [(0, 1), (1, 2)], kindOf := [(0, "phase"), (1, "phase")] }.wellShaped = falseafterno goals remain
theorem a_step_to_an_undeclared_state_is_rejected : ({ states := [0, 1], … - theorem
Hyperfields.Fields.Hyperdynamics.a_state_with_two_kinds_is_rejectedA state with two kinds is rejected line 226 sourceA system that declares two kinds for one state is rejected.
This is the second negative case, and it is independent of the step endpoints: a system can have only well-formed steps and still describe a state twice.
A state declared twice is described twice, and the frame requires exactly one kind per state.
standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Eq,Bool, Hyperfields.Fields.Hyperdynamics.TransitionSystem.wellShaped,OfNat.ofNat,Nat,Hyperfields.Fields.Hyperdynamics.TransitionSystem.mk,List.cons,Fin,List.nil,Prod,Prod.mk,String,Bool.falseProof uses:
of_decide_eq_true,id,Decidable.decide,Bool.true,Eq.refl7 instances, coercions and auxiliary constants left out.
Tactic trace: 1 steps
decideline 230before⊢ { states := [0, 1], steps := [(0, 1)], kindOf := [(0, "phase"), (0, "other"), (1, "phase")] }.wellShaped = falseafterno goals remain
theorem a_state_with_two_kinds_is_rejected : ({ states := [0, 1], … - theorem
Hyperfields.Fields.Hyperdynamics.the_identity_bridge_lifts_the_pathThe identity bridge lifts a path line 240 sourceThe identity bridge lifts the chain path onto itself.
Every step of the path is preserved because the bridge carries each state to itself, so the lifted sequence is the same sequence.
A path is always a path under the identity, which is the baseline the other lifting cases are measured against.
standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Eq,Bool, Hyperfields.Fields.Hyperdynamics.pathLifts,OfNat.ofNat,Nat, Hyperfields.Fields.Hyperdynamics.chainSystem,List.cons,Fin,List.nil,Prod,Prod.mk,Bool.trueProof uses:
of_decide_eq_true,id,Decidable.decide,Eq.refl7 instances, coercions and auxiliary constants left out.
Tactic trace: 1 steps
decideline 242before⊢ pathLifts chainSystem chainSystem [0, 1, 2] [(0, 0), (1, 1), (2, 2)] = true
afterno goals remain
theorem the_identity_bridge_lifts_the_path : pathLifts chainSystem chainSystem [0, 1, 2] [(0, 0), (1, 1), (2, 2)] = true := by …Mentions: Hyperfields.Fields.Hyperdynamics.pathLifts, Hyperfields.Fields.Hyperdynamics.chainSystem
- theorem
Hyperfields.Fields.Hyperdynamics.a_step_breaking_bridge_does_not_liftA bridge that drops a step does not lift a path line 254 sourceA bridge that maps both ends of a step onto the same state does not lift the path.
The lifted sequence would be
[0, 0], whose pair is not a declared step of the target, so the lift fails. This is the negative case for path lifting.A lift must be a path in the target, so a bridge that lands the two endpoints on the same state breaks the step.
standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Eq,Bool, Hyperfields.Fields.Hyperdynamics.pathLifts,OfNat.ofNat,Nat, Hyperfields.Fields.Hyperdynamics.chainSystem,List.cons,Fin,List.nil,Prod,Prod.mk,Bool.falseProof uses:
of_decide_eq_true,id,Decidable.decide,Bool.true,Eq.refl7 instances, coercions and auxiliary constants left out.
Tactic trace: 1 steps
decideline 256before⊢ pathLifts chainSystem chainSystem [0, 1] [(0, 0), (1, 0)] = false
afterno goals remain
theorem a_step_breaking_bridge_does_not_lift : pathLifts chainSystem chainSystem [0, 1] [(0, 0), (1, 0)] = false := by …Mentions: Hyperfields.Fields.Hyperdynamics.pathLifts, Hyperfields.Fields.Hyperdynamics.chainSystem
- def
Hyperfields.Fields.Hyperdynamics.entryHyperdynamics explainer entry line 266 sourceThe canonical Hyperdynamics record used by the unified portal.
This declaration exposes the checked ecosystem record for Hyperdynamics on its own stable explainer page.
See also: Hyperfields.hyperdynamics
no axioms what this means
Statement uses: Hyperfields.Entry
Proof uses: Hyperfields.hyperdynamics
def entry : Hyperfields.Entry := Hyperfields.hyperdynamics …
Mentions: Hyperfields.Entry, Hyperfields.hyperdynamics