Make FiniteHeightLattice extend Lattice and derive Top/Bot

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
2026-06-25 18:42:28 -05:00
parent acef0f202b
commit cbad43efdc
11 changed files with 61 additions and 102 deletions

View File

@@ -6,13 +6,13 @@ namespace Fixedpoint
open FiniteHeightLattice (height)
variable {α : Type*} [Lattice α] [DecidableEq α] [FiniteHeightLattice α]
variable {α : Type*} [DecidableEq α] [FiniteHeightLattice α]
def doStep (f : α α) (hf : Monotone f) :
(g : ) (c : LTSeries α), c.length + g = height (α := α) + 1
c.last f c.last {a : α // a = f a}
| 0, c, hlen, _ =>
absurd (FiniteHeightLattice.chains_bounded c) (by omega)
absurd (FiniteHeightLattice.chains_bounded c) (by simp only [height] at hlen; omega)
| g + 1, c, hlen, hle =>
if heq : c.last = f c.last then
c.last, heq
@@ -39,7 +39,8 @@ lemma doStep_le (f : αα) (hf : Monotone f)
(g : ) (c : LTSeries α) (hlen : c.length + g = height (α := α) + 1)
(hle : c.last f c.last), c.last b
(doStep f hf g c hlen hle : α) b
| 0, c, hlen, _ => fun _ => absurd (FiniteHeightLattice.chains_bounded c) (by omega)
| 0, c, hlen, _ => fun _ =>
absurd (FiniteHeightLattice.chains_bounded c) (by simp only [height] at hlen; omega)
| g + 1, c, hlen, hle => fun hcb => by
rw [doStep]
split