2026-06-09 18:48:02 -07:00
|
|
|
|
import Spa.Lattice
|
|
|
|
|
|
|
|
|
|
|
|
namespace Spa
|
|
|
|
|
|
|
|
|
|
|
|
theorem boundedChains_of_subsingleton (α : Type*) [Preorder α] [Subsingleton α]
|
|
|
|
|
|
(n : ℕ) : BoundedChains α n := fun c => by
|
|
|
|
|
|
by_contra hc
|
|
|
|
|
|
push_neg at hc
|
|
|
|
|
|
exact (c.step ⟨0, by omega⟩).ne (Subsingleton.elim _ _)
|
|
|
|
|
|
|
2026-06-22 18:33:48 -05:00
|
|
|
|
instance : FiniteHeightLattice PUnit where
|
Lean migration: Phase 4 (IterProd + FiniteMap lattices)
- Spa.Lattice.IterProd: k-fold product, recursive Lattice instance,
fixed height k*hA + hB, bot = build of bottoms
- Spa.Lattice.FiniteMap: spine-pinned assoc lists ({l // l.map fst = ks});
with = the 1100-line Map.agda collapses into positional 'combine'.
Same lemma inventory (membership, locate, updating, GeneralizedUpdate,
valuesAt, Provenance-union, le_of_mem_mem) — Nodup is now an explicit
hypothesis where the Agda Map carried it intrinsically. Fixed height
|ks|*hB still via transport along the IterProd isomorphism, which no
longer needs Unique ks (representation is canonical).
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-06-09 19:12:39 -07:00
|
|
|
|
bot := PUnit.unit
|
|
|
|
|
|
top := PUnit.unit
|
2026-06-09 18:48:02 -07:00
|
|
|
|
height := 0
|
2026-06-25 13:56:44 -05:00
|
|
|
|
longestChain :=
|
|
|
|
|
|
{ series := RelSeries.singleton _ PUnit.unit
|
|
|
|
|
|
head_series := rfl
|
|
|
|
|
|
last_series := rfl
|
|
|
|
|
|
length_series := rfl }
|
2026-06-22 18:33:48 -05:00
|
|
|
|
chains_bounded := boundedChains_of_subsingleton PUnit 0
|
2026-06-09 18:48:02 -07:00
|
|
|
|
|
|
|
|
|
|
end Spa
|