IndisputableMonolith.Foundation.PhysicsLogicRealization
IndisputableMonolith/Foundation/PhysicsLogicRealization.lean · 101 lines · 9 declarations
show as:
view math explainer →
1import IndisputableMonolith.Foundation.OrderedLogicRealization
2
3/-!
4 PhysicsLogicRealization.lean
5
6 Lightweight physics realization hook for Universal Forcing.
7
8 The full physics forcing chain is large and currently imports modules with
9 unrelated build fragility. This module gives the stable interface: identity
10 ticks as the step action, recognition states as the carrier, and equality
11 cost as the minimal realization of physical tick arithmetic.
12-/
13
14namespace IndisputableMonolith
15namespace Foundation
16namespace PhysicsLogicRealization
17
18/-- Minimal recognition-state skeleton indexed by identity ticks. -/
19structure PhysicsState where
20 tick : ArithmeticFromLogic.LogicNat
21 deriving DecidableEq
22
23/-- Equality cost on physics states. -/
24def physicsCost (x y : PhysicsState) : Nat :=
25 if x = y then 0 else 1
26
27@[simp] theorem physicsCost_self (x : PhysicsState) : physicsCost x x = 0 := by
28 simp [physicsCost]
29
30theorem physicsCost_symm (x y : PhysicsState) : physicsCost x y = physicsCost y x := by
31 by_cases h : x = y
32 · subst h
33 simp [physicsCost]
34 · have h' : y ≠ x := by intro hyx; exact h hyx.symm
35 simp [physicsCost, h, h']
36
37/-- Identity-tick successor. -/
38def tickStep (x : PhysicsState) : PhysicsState :=
39 ⟨ArithmeticFromLogic.LogicNat.succ x.tick⟩
40
41/-- Interpret the free arithmetic orbit as identity-tick states. -/
42def physicsInterpret (n : ArithmeticFromLogic.LogicNat) : PhysicsState :=
43 ⟨n⟩
44
45/-- Physics realization skeleton. -/
46def physicsRealization : LogicRealization where
47 Carrier := PhysicsState
48 Cost := Nat
49 zeroCost := inferInstance
50 compare := physicsCost
51 zero := ⟨ArithmeticFromLogic.LogicNat.zero⟩
52 step := tickStep
53 Orbit := ArithmeticFromLogic.LogicNat
54 orbitZero := ArithmeticFromLogic.LogicNat.zero
55 orbitStep := ArithmeticFromLogic.LogicNat.succ
56 interpret := physicsInterpret
57 interpret_zero := rfl
58 interpret_step := by intro n; rfl
59 orbit_no_confusion := by
60 intro n h
61 exact ArithmeticFromLogic.LogicNat.zero_ne_succ n h
62 orbit_step_injective := ArithmeticFromLogic.LogicNat.succ_injective
63 orbit_induction := by
64 intro P h0 hs n
65 exact ArithmeticFromLogic.LogicNat.induction (motive := P) h0 hs n
66 orbitEquivLogicNat := Equiv.refl ArithmeticFromLogic.LogicNat
67 orbitEquiv_zero := rfl
68 orbitEquiv_step := by intro n; rfl
69 identity := physicsCost_self
70 nonContradiction := physicsCost_symm
71 excludedMiddle := True
72 composition := True
73 actionInvariant := True
74 nontrivial := by
75 refine ⟨⟨ArithmeticFromLogic.LogicNat.succ ArithmeticFromLogic.LogicNat.zero⟩, ?_⟩
76 simp [physicsCost]
77
78/-- Physics tick interpretation is faithful. -/
79theorem physics_faithful :
80 LogicRealization.FaithfulArithmeticInterpretation physicsRealization where
81 injective := by
82 intro a b h
83 cases h
84 rfl
85 zero_step_noncollapse := by
86 intro n h
87 have htick := congrArg PhysicsState.tick h
88 exact ArithmeticFromLogic.LogicNat.zero_ne_succ n htick
89
90/-- Physics realization has invariant extracted arithmetic. -/
91noncomputable def physics_arithmetic_invariant (R : LogicRealization.{0, 0}) :
92 (UniversalForcing.arithmeticOf physicsRealization).peano.carrier
93 ≃ (UniversalForcing.arithmeticOf R).peano.carrier :=
94 ArithmeticOf.equivOfInitial
95 (UniversalForcing.arithmeticOf physicsRealization)
96 (UniversalForcing.arithmeticOf R)
97
98end PhysicsLogicRealization
99end Foundation
100end IndisputableMonolith
101