Rename longest_chain to longestChain for convention
This commit is contained in:
@@ -13,13 +13,13 @@ def FiniteHeightLattice.transport {α β : Type*} [Lattice α] [Lattice β]
|
|||||||
bot := f ⊥
|
bot := f ⊥
|
||||||
top := f ⊤
|
top := f ⊤
|
||||||
height := I.height
|
height := I.height
|
||||||
longest_chain :=
|
longestChain :=
|
||||||
{ series :=
|
{ series :=
|
||||||
I.longest_chain.series.map f
|
I.longestChain.series.map f
|
||||||
(hf.strictMono_of_injective (Function.LeftInverse.injective hgf))
|
(hf.strictMono_of_injective (Function.LeftInverse.injective hgf))
|
||||||
head_series := congrArg f I.longest_chain.head_series
|
head_series := congrArg f I.longestChain.head_series
|
||||||
last_series := congrArg f I.longest_chain.last_series
|
last_series := congrArg f I.longestChain.last_series
|
||||||
length_series := I.longest_chain.length_series }
|
length_series := I.longestChain.length_series }
|
||||||
chains_bounded := fun c =>
|
chains_bounded := fun c =>
|
||||||
I.chains_bounded
|
I.chains_bounded
|
||||||
(c.map g (hg.strictMono_of_injective (Function.LeftInverse.injective hfg)))
|
(c.map g (hg.strictMono_of_injective (Function.LeftInverse.injective hfg)))
|
||||||
|
|||||||
@@ -58,7 +58,7 @@ structure PointedLTSeries (α : Type*) (f t : α)(n : ℕ) [Preorder α] where
|
|||||||
|
|
||||||
class FiniteHeightLattice (α : Type*) [Lattice α] extends Bot α, Top α where
|
class FiniteHeightLattice (α : Type*) [Lattice α] extends Bot α, Top α where
|
||||||
height : ℕ
|
height : ℕ
|
||||||
longest_chain : PointedLTSeries α ⊥ ⊤ height
|
longestChain : PointedLTSeries α ⊥ ⊤ height
|
||||||
chains_bounded : BoundedChains α height
|
chains_bounded : BoundedChains α height
|
||||||
|
|
||||||
namespace FixedHeight
|
namespace FixedHeight
|
||||||
@@ -70,7 +70,7 @@ theorem bot_le [FiniteHeightLattice α] : ∀ (a : α), ⊥ ≤ a := by
|
|||||||
by_cases heq : ⊥ ⊓ a = ⊥
|
by_cases heq : ⊥ ⊓ a = ⊥
|
||||||
· exact inf_eq_left.mp heq
|
· exact inf_eq_left.mp heq
|
||||||
· exfalso
|
· exfalso
|
||||||
have lc := FiniteHeightLattice.longest_chain (α := α)
|
have lc := FiniteHeightLattice.longestChain (α := α)
|
||||||
have hlt : ⊥ ⊓ a < lc.series.head := by
|
have hlt : ⊥ ⊓ a < lc.series.head := by
|
||||||
rw [lc.head_series]
|
rw [lc.head_series]
|
||||||
exact lt_of_le_of_ne inf_le_left heq
|
exact lt_of_le_of_ne inf_le_left heq
|
||||||
|
|||||||
@@ -273,7 +273,7 @@ instance [Inhabited α] : FiniteHeightLattice (AboveBelow α) where
|
|||||||
bot := bot
|
bot := bot
|
||||||
top := top
|
top := top
|
||||||
height := 2
|
height := 2
|
||||||
longest_chain :=
|
longestChain :=
|
||||||
{ series :=
|
{ series :=
|
||||||
((RelSeries.singleton _ bot).snoc (mk default)
|
((RelSeries.singleton _ bot).snoc (mk default)
|
||||||
(by rw [RelSeries.last_singleton]; exact bot_lt_mk default)).snoc top
|
(by rw [RelSeries.last_singleton]; exact bot_lt_mk default)).snoc top
|
||||||
|
|||||||
@@ -68,25 +68,25 @@ instance prod [A : FiniteHeightLattice α] [B : FiniteHeightLattice β] :
|
|||||||
bot := ((⊥ : α), (⊥ : β))
|
bot := ((⊥ : α), (⊥ : β))
|
||||||
top := ((⊤ : α), (⊤ : β))
|
top := ((⊤ : α), (⊤ : β))
|
||||||
height := A.height + B.height
|
height := A.height + B.height
|
||||||
longest_chain :=
|
longestChain :=
|
||||||
{ series :=
|
{ series :=
|
||||||
RelSeries.smash
|
RelSeries.smash
|
||||||
(A.longest_chain.series.map (fun a => (a, (⊥ : β)))
|
(A.longestChain.series.map (fun a => (a, (⊥ : β)))
|
||||||
(fun _ _ h => Prod.mk_lt_mk_iff_left.mpr h))
|
(fun _ _ h => Prod.mk_lt_mk_iff_left.mpr h))
|
||||||
(B.longest_chain.series.map (fun b => ((⊤ : α), b))
|
(B.longestChain.series.map (fun b => ((⊤ : α), b))
|
||||||
(fun _ _ h => Prod.mk_lt_mk_iff_right.mpr h))
|
(fun _ _ h => Prod.mk_lt_mk_iff_right.mpr h))
|
||||||
(by simp [A.longest_chain.last_series, B.longest_chain.head_series])
|
(by simp [A.longestChain.last_series, B.longestChain.head_series])
|
||||||
head_series :=
|
head_series :=
|
||||||
(RelSeries.head_smash _).trans
|
(RelSeries.head_smash _).trans
|
||||||
((LTSeries.head_map _ _ _).trans
|
((LTSeries.head_map _ _ _).trans
|
||||||
(congrArg (·, (⊥ : β)) A.longest_chain.head_series))
|
(congrArg (·, (⊥ : β)) A.longestChain.head_series))
|
||||||
last_series :=
|
last_series :=
|
||||||
(RelSeries.last_smash _).trans
|
(RelSeries.last_smash _).trans
|
||||||
((LTSeries.last_map _ _ _).trans
|
((LTSeries.last_map _ _ _).trans
|
||||||
(congrArg ((⊤ : α), ·) B.longest_chain.last_series))
|
(congrArg ((⊤ : α), ·) B.longestChain.last_series))
|
||||||
length_series := by
|
length_series := by
|
||||||
show A.longest_chain.series.length + B.longest_chain.series.length = _
|
show A.longestChain.series.length + B.longestChain.series.length = _
|
||||||
rw [A.longest_chain.length_series, B.longest_chain.length_series] }
|
rw [A.longestChain.length_series, B.longestChain.length_series] }
|
||||||
chains_bounded := fun c => by
|
chains_bounded := fun c => by
|
||||||
obtain ⟨c₁, c₂, -, -, -, -, hlen⟩ := LTSeries.exists_unzip c
|
obtain ⟨c₁, c₂, -, -, -, -, hlen⟩ := LTSeries.exists_unzip c
|
||||||
have h₁ := A.chains_bounded c₁
|
have h₁ := A.chains_bounded c₁
|
||||||
|
|||||||
@@ -22,7 +22,7 @@ instance : FiniteHeightLattice PUnit where
|
|||||||
bot := PUnit.unit
|
bot := PUnit.unit
|
||||||
top := PUnit.unit
|
top := PUnit.unit
|
||||||
height := 0
|
height := 0
|
||||||
longest_chain := { series := RelSeries.singleton _ PUnit.unit, head_series := refl _, last_series := refl _, length_series := refl _ }
|
longestChain := { series := RelSeries.singleton _ PUnit.unit, head_series := refl _, last_series := refl _, length_series := refl _ }
|
||||||
chains_bounded := boundedChains_of_subsingleton PUnit 0
|
chains_bounded := boundedChains_of_subsingleton PUnit 0
|
||||||
|
|
||||||
end Spa
|
end Spa
|
||||||
|
|||||||
Reference in New Issue
Block a user