2026-06-09 18:48:02 -07:00
|
|
|
|
import Spa.Lattice
|
|
|
|
|
|
|
2026-06-25 19:36:14 -05:00
|
|
|
|
/-!
|
|
|
|
|
|
|
|
|
|
|
|
# Unit Lattice
|
|
|
|
|
|
|
|
|
|
|
|
This file provides a proof that in addition to being a lattice,
|
|
|
|
|
|
`PUnit` is a `Spa.FiniteHeightLattice`. This is fairly trivial result,
|
|
|
|
|
|
but the unit is used as a placeholder in various contexts (e.g.,
|
|
|
|
|
|
as a base case for the iterated product `Spa/Lattice/IterProd.lean`). -/
|
|
|
|
|
|
|
2026-06-09 18:48:02 -07:00
|
|
|
|
namespace Spa
|
|
|
|
|
|
|
2026-06-25 19:36:14 -05:00
|
|
|
|
/-- Since a singleton type's preorder has no nonempty `<` chains,
|
|
|
|
|
|
they are vacuously bounded by any minimum height. -/
|
2026-06-25 13:59:08 -05:00
|
|
|
|
lemma boundedChains_of_subsingleton (α : Type*) [Preorder α] [Subsingleton α]
|
2026-06-09 18:48:02 -07:00
|
|
|
|
(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
|
2026-06-25 18:42:28 -05:00
|
|
|
|
toLattice := inferInstance
|
|
|
|
|
|
longestChain := RelSeries.singleton _ PUnit.unit
|
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
|