File size: 2,922 Bytes
4a56cd6 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 | import OAI.SetTheory.PartitionPrinciple.Transfinite.InaccessibleBounds
namespace OAI
section
namespace PartitionPilot.Compression.RecursiveMaps
universe u v w
variable {X : Type u} {Column : Type v} {Coord : Type w} {P : MeetOrder X}
variable (C : LinearHeightOrder Column) (D : LinearHeightOrder Coord)
variable (depth : X β Nat) (columns : Nat β Column)
variable (seed : {x : X // depth x = 0} β Column Γ Coord)
variable (coordinate : {x : X // depth x β 0} β Coord)
def depthHeightValue (x : X) : Column Γ Coord :=
if h : depth x = 0 then seed β¨x, hβ© else (columns (depth x), coordinate β¨x, hβ©)
theorem depthHeightValue_old (x : X) (h : depth x = 0) :
depthHeightValue depth columns seed coordinate x = seed β¨x, hβ© := by
simp only [depthHeightValue, dite_eq_left h]
theorem depthHeightValue_fresh (x : X) (h : depth x β 0) :
depthHeightValue depth columns seed coordinate x = (columns (depth x), coordinate β¨x, hβ©) := by
simp only [depthHeightValue, dite_eq_right h]
def depthLayerHeight
(monotone : β x y, P.le x y β depth x β€ depth y)
(increasing : β n m, n < m β C.lt (columns n) (columns m))
(above : β x n, C.lt (seed x).1 (columns n))
(seedStrict : β x y, P.le x.val y.val β x.val β y.val β (C.lex D).lt (seed x) (seed y))
(coordinateStrict : β x y, depth x.val = depth y.val β P.le x.val y.val β
x.val β y.val β D.lt (coordinate x) (coordinate y)) :
StrictHeight P (C.lex D).toHeightOrder where
value := depthHeightValue depth columns seed coordinate
strict x y lower different := by
have depths := monotone x y lower
by_cases hx : depth x = 0
Β· rw [depthHeightValue_old depth columns seed coordinate x hx]
by_cases hy : depth y = 0
Β· rw [depthHeightValue_old depth columns seed coordinate y hy]
exact seedStrict β¨x, hxβ© β¨y, hyβ© lower different
Β· rw [depthHeightValue_fresh depth columns seed coordinate y hy]
exact Or.inl (above β¨x, hxβ© (depth y))
Β· have hy : depth y β 0 := by omega
rw [depthHeightValue_fresh depth columns seed coordinate x hx,
depthHeightValue_fresh depth columns seed coordinate y hy]
by_cases same : depth x = depth y
Β· exact Or.inr β¨congrArg columns same, coordinateStrict β¨x, hxβ© β¨y, hyβ© same lower differentβ©
Β· exact Or.inl (increasing _ _ (by omega))
theorem depthHeightValue_column_bound (cap : Column)
(oldBound : β x, C.lt (seed x).1 cap) (columnBound : β n, C.lt (columns n) cap) (x : X) :
C.lt (depthHeightValue depth columns seed coordinate x).1 cap := by
by_cases h : depth x = 0
Β· rw [depthHeightValue_old depth columns seed coordinate x h]
exact oldBound β¨x, hβ©
Β· rw [depthHeightValue_fresh depth columns seed coordinate x h]
exact columnBound (depth x)
end PartitionPilot.Compression.RecursiveMaps
end
end OAI
|