Usw OrderBot / OrderTop for lattice witnesses
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Co-Authored-By: OpenAI Codex <codex@openai.com>
This commit is contained in:
@@ -93,6 +93,14 @@ lemma bot_le' (a : AboveBelow α) : (bot : AboveBelow α) ≤ a :=
|
||||
lemma le_top' (a : AboveBelow α) : a ≤ (top : AboveBelow α) :=
|
||||
le_iff.mpr (sup_top a)
|
||||
|
||||
instance : OrderBot (AboveBelow α) where
|
||||
bot := bot
|
||||
bot_le := bot_le'
|
||||
|
||||
instance : OrderTop (AboveBelow α) where
|
||||
top := top
|
||||
le_top := le_top'
|
||||
|
||||
lemma bot_lt_mk (x : α) : (bot : AboveBelow α) < mk x :=
|
||||
lt_of_le_of_ne (bot_le' _) (by simp)
|
||||
|
||||
@@ -224,6 +232,8 @@ lemma boundedChains : BoundedChains (AboveBelow α) 2 := fun c => by
|
||||
|
||||
instance [Inhabited α] : FiniteHeightLattice (AboveBelow α) where
|
||||
toLattice := inferInstance
|
||||
toOrderBot := inferInstance
|
||||
toOrderTop := inferInstance
|
||||
longestChain :=
|
||||
((RelSeries.singleton _ bot).snoc (mk default)
|
||||
(by rw [RelSeries.last_singleton]; exact bot_lt_mk default)).snoc top
|
||||
|
||||
@@ -29,6 +29,8 @@ lemma boundedChains : BoundedChains Bool 1 := fun c => by
|
||||
|
||||
instance : FiniteHeightLattice Bool where
|
||||
toLattice := inferInstance
|
||||
toOrderBot := inferInstance
|
||||
toOrderTop := inferInstance
|
||||
longestChain := (RelSeries.singleton _ (⊥ : Bool)).snoc (⊤ : Bool)
|
||||
(by rw [RelSeries.last_singleton]; exact bot_lt_top)
|
||||
chains_bounded := boundedChains
|
||||
|
||||
@@ -141,10 +141,12 @@ private def stdChain : (n : ℕ) →
|
||||
((FiniteHeightLattice.longestChain (α := β)).map
|
||||
(fun b => (Fin.cons b (⊥ : Fin n → β) : Fin (n + 1) → β)) consBot_strictMono)
|
||||
(prev.1.map (fun f => (Fin.cons (⊤ : β) f : Fin (n + 1) → β)) consTop_strictMono)
|
||||
(by rw [LTSeries.last_map, LTSeries.head_map, prev.2.1]; rfl),
|
||||
(by
|
||||
rw [LTSeries.last_map, LTSeries.head_map,
|
||||
FiniteHeightLattice.longestChain_last, prev.2.1]),
|
||||
by
|
||||
simp only [RelSeries.head_smash, LTSeries.head_map]
|
||||
rw [show (FiniteHeightLattice.longestChain (α := β)).head = (⊥ : β) from rfl]
|
||||
rw [FiniteHeightLattice.longestChain_head]
|
||||
funext i
|
||||
refine Fin.cases ?_ (fun j => ?_) i <;> simp [Pi.bot_apply],
|
||||
by
|
||||
@@ -154,6 +156,8 @@ private def stdChain : (n : ℕ) →
|
||||
|
||||
instance instFiniteHeight {n : ℕ} : FiniteHeightLattice (Fin n → β) where
|
||||
toLattice := inferInstance
|
||||
toOrderBot := inferInstance
|
||||
toOrderTop := inferInstance
|
||||
longestChain := (stdChain n).1
|
||||
chains_bounded := fun c => by
|
||||
obtain ⟨cs, _, _, hbound⟩ := exists_unzip c
|
||||
|
||||
Reference in New Issue
Block a user