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