IndisputableMonolith.Causality.Basic
IndisputableMonolith/Causality/Basic.lean · 36 lines · 8 declarations
show as:
view math explainer →
1import Mathlib
2
3namespace IndisputableMonolith
4namespace Causality
5
6variable {α : Type}
7
8structure Kinematics (α : Type) where
9 step : α → α → Prop
10
11inductive ReachN (K : Kinematics α) : Nat → α → α → Prop
12| zero {x} : ReachN K 0 x x
13| succ {n x y z} : ReachN K n x y → K.step y z → ReachN K (n+1) x z
14
15def inBall (K : Kinematics α) (x : α) (n : Nat) (y : α) : Prop :=
16 ∃ k ≤ n, ReachN K k x y
17
18lemma reach_in_ball {K : Kinematics α} {x y : α} {n : Nat}
19 (h : ReachN K n x y) : inBall K x n y := ⟨n, le_rfl, h⟩
20
21lemma reach_le_in_ball {K : Kinematics α} {x y : α} {k n : Nat}
22 (hk : k ≤ n) (h : ReachN K k x y) : inBall K x n y := ⟨k, hk, h⟩
23
24def Reaches (K : Kinematics α) (x y : α) : Prop := ∃ n, ReachN K n x y
25
26lemma reaches_of_reachN {K : Kinematics α} {x y : α} {n : Nat}
27 (h : ReachN K n x y) : Reaches K x y := ⟨n, h⟩
28
29lemma inBall_mono {K : Kinematics α} {x y : α} {n m : Nat}
30 (hnm : n ≤ m) : inBall K x n y → inBall K x m y := by
31 intro ⟨k, hk, hkreach⟩
32 exact ⟨k, le_trans hk hnm, hkreach⟩
33
34end Causality
35end IndisputableMonolith
36