Fold Isomorphism module into Lattice.lean
Signed-off-by: Danila Fedorin <danila.fedorin@gmail.com>
This commit is contained in:
@@ -1,6 +1,5 @@
|
|||||||
import Spa.Lattice
|
import Spa.Lattice
|
||||||
import Spa.Fixedpoint
|
import Spa.Fixedpoint
|
||||||
import Spa.Isomorphism
|
|
||||||
import Spa.Lattice.Unit
|
import Spa.Lattice.Unit
|
||||||
import Spa.Lattice.Prod
|
import Spa.Lattice.Prod
|
||||||
import Spa.Lattice.AboveBelow
|
import Spa.Lattice.AboveBelow
|
||||||
|
|||||||
@@ -1,16 +0,0 @@
|
|||||||
import Spa.Lattice
|
|
||||||
|
|
||||||
namespace Spa
|
|
||||||
|
|
||||||
def FiniteHeightLattice.transport {α β : Type*} [Lattice β]
|
|
||||||
[I : FiniteHeightLattice α] (f : α → β) (g : β → α)
|
|
||||||
(hf : Monotone f) (hg : Monotone g)
|
|
||||||
(hgf : Function.LeftInverse g f) (hfg : Function.LeftInverse f g) :
|
|
||||||
FiniteHeightLattice β where
|
|
||||||
toLattice := inferInstance
|
|
||||||
longestChain :=
|
|
||||||
I.longestChain.map f (hf.strictMono_of_injective hgf.injective)
|
|
||||||
chains_bounded := fun c =>
|
|
||||||
I.chains_bounded (c.map g (hg.strictMono_of_injective hfg.injective))
|
|
||||||
|
|
||||||
end Spa
|
|
||||||
@@ -107,6 +107,25 @@ lemma le_top (a : α) : a ≤ (⊤ : α) := by
|
|||||||
rw [RelSeries.snoc_length] at hbound
|
rw [RelSeries.snoc_length] at hbound
|
||||||
omega
|
omega
|
||||||
|
|
||||||
|
/-- This is something like a lemma about isomorphic types having the same height.
|
||||||
|
Given a finite-height lattice `α`, lattice `β`, and a `Monotone` bijection
|
||||||
|
between the two, we can show that lattice `β` also has a finite height.
|
||||||
|
|
||||||
|
The proof is fairly trivial: the longest chain in `α` can be transported
|
||||||
|
to be a longest chain in `β` (by monotonicity), establishing a height witness.
|
||||||
|
At the same time, any chain in `β` can be transported to a chain in `α`,
|
||||||
|
and must be bounded by the same height by `FiniteHeightLattice.chains_bounded`. -/
|
||||||
|
def transport {α β : Type*} [Lattice β]
|
||||||
|
[I : FiniteHeightLattice α] (f : α → β) (g : β → α)
|
||||||
|
(hf : Monotone f) (hg : Monotone g)
|
||||||
|
(hgf : Function.LeftInverse g f) (hfg : Function.LeftInverse f g) :
|
||||||
|
FiniteHeightLattice β where
|
||||||
|
toLattice := inferInstance
|
||||||
|
longestChain :=
|
||||||
|
I.longestChain.map f (hf.strictMono_of_injective hgf.injective)
|
||||||
|
chains_bounded := fun c =>
|
||||||
|
I.chains_bounded (c.map g (hg.strictMono_of_injective hfg.injective))
|
||||||
|
|
||||||
end FiniteHeightLattice
|
end FiniteHeightLattice
|
||||||
|
|
||||||
end Spa
|
end Spa
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
import Spa.Lattice.IterProd
|
import Spa.Lattice.IterProd
|
||||||
import Spa.Isomorphism
|
|
||||||
|
|
||||||
namespace Spa
|
namespace Spa
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user