Lattice homomorphisms #
This file defines (bounded) lattice homomorphisms.
We use the fun_like
design, so each type of morphisms has a companion typeclass which is meant to
be satisfied by itself and all stricter types.
Types of morphisms #
sup_hom
: Maps which preserve⊔
.inf_hom
: Maps which preserve⊓
.lattice_hom
: Lattice homomorphisms. Maps which preserve⊔
and⊓
.bounded_lattice_hom
: Bounded lattice homomorphisms. Maps which preserve⊤
,⊥
,⊔
and⊓
.
Typeclasses #
TODO #
Do we need more intersections between bot_hom
, top_hom
and lattice homomorphisms?
- to_sup_hom : sup_hom α β
- map_inf' : ∀ (a b : α), self.to_sup_hom.to_fun (a ⊓ b) = self.to_sup_hom.to_fun a ⊓ self.to_sup_hom.to_fun b
The type of lattice homomorphisms from α
to β
.
- to_lattice_hom : lattice_hom α β
- map_top' : self.to_lattice_hom.to_sup_hom.to_fun ⊤ = ⊤
- map_bot' : self.to_lattice_hom.to_sup_hom.to_fun ⊥ = ⊥
The type of bounded lattice homomorphisms from α
to β
.
sup_hom_class F α β
states that F
is a type of ⊔
-preserving morphisms.
You should extend this class when you extend sup_hom
.
inf_hom_class F α β
states that F
is a type of ⊓
-preserving morphisms.
You should extend this class when you extend inf_hom
.
lattice_hom_class F α β
states that F
is a type of lattice morphisms.
You should extend this class when you extend sup_hom
.
- to_lattice_hom_class : lattice_hom_class F α β
- map_top : ∀ (f : F), ⇑f ⊤ = ⊤
- map_bot : ∀ (f : F), ⇑f ⊥ = ⊥
bounded_lattice_hom_class F α β
states that F
is a type of bounded lattice morphisms.
You should extend this class when you extend bounded_lattice_hom
.
Equations
- sup_hom_class.to_order_hom_class = {to_fun_like := sup_hom_class.to_fun_like _inst_3, map_rel := _}
Equations
- inf_hom_class.to_order_hom_class = {to_fun_like := inf_hom_class.to_fun_like _inst_3, map_rel := _}
Equations
- bounded_lattice_hom.has_coe_t = {coe := λ (f : F), {to_lattice_hom := {to_sup_hom := {to_fun := ⇑f, map_sup' := _}, map_inf' := _}, map_top' := _, map_bot' := _}}
Supremum homomorphisms #
Equations
- sup_hom.sup_hom_class = {to_fun_like := {coe := sup_hom.to_fun _inst_2, coe_injective' := _}, map_sup := _}
Helper instance for when there's too many metavariables to apply fun_like.has_coe_to_fun
directly.
Equations
- sup_hom.inhabited α = {default := sup_hom.id α _inst_1}
Equations
- sup_hom.semilattice_sup = function.injective.semilattice_sup coe_fn sup_hom.semilattice_sup._proof_1 sup_hom.semilattice_sup._proof_2
The constant function as a sup_hom
.
Equations
- sup_hom.const α b = {to_fun := λ (_x : α), b, map_sup' := _}
Infimum homomorphisms #
Equations
- inf_hom.inf_hom_class = {to_fun_like := {coe := inf_hom.to_fun _inst_2, coe_injective' := _}, map_inf := _}
Helper instance for when there's too many metavariables to apply fun_like.has_coe_to_fun
directly.
Equations
- inf_hom.inhabited α = {default := inf_hom.id α _inst_1}
Equations
- inf_hom.semilattice_inf = function.injective.semilattice_inf coe_fn inf_hom.semilattice_inf._proof_1 inf_hom.semilattice_inf._proof_2
The constant function as an inf_hom
.
Equations
- inf_hom.const α b = {to_fun := λ (_x : α), b, map_inf' := _}
Lattice homomorphisms #
Reinterpret a lattice_hom
as an inf_hom
.
Equations
- f.to_inf_hom = {to_fun := f.to_sup_hom.to_fun, map_inf' := _}
Equations
- lattice_hom.lattice_hom_class = {to_sup_hom_class := {to_fun_like := {coe := λ (f : lattice_hom α β), f.to_sup_hom.to_fun, coe_injective' := _}, map_sup := _}, map_inf := _}
Helper instance for when there's too many metavariables to apply fun_like.has_coe_to_fun
directly.
Equations
- lattice_hom.has_coe_to_fun = {coe := λ (f : lattice_hom α β), f.to_sup_hom.to_fun}
Copy of a lattice_hom
with a new to_fun
equal to the old one. Useful to fix definitional
equalities.
id
as a lattice_hom
.
Equations
- lattice_hom.id α = {to_sup_hom := {to_fun := id α, map_sup' := _}, map_inf' := _}
Equations
- lattice_hom.inhabited α = {default := lattice_hom.id α _inst_1}
Composition of lattice_hom
s as a lattice_hom
.
Equations
- f.comp g = {to_sup_hom := {to_fun := (f.to_sup_hom.comp g.to_sup_hom).to_fun, map_sup' := _}, map_inf' := _}
An order homomorphism from a linear order is a lattice homomorphism.
Equations
- order_hom_class.to_lattice_hom_class α β = {to_sup_hom_class := {to_fun_like := rel_hom_class.to_fun_like _inst_3, map_sup := _}, map_inf := _}
Reinterpret an order homomorphism to a linear order as a lattice_hom
.
Equations
- order_hom_class.to_lattice_hom α β f = ↑f
Bounded lattice homomorphisms #
Reinterpret a bounded_lattice_hom
as a bounded_order_hom
.
Equations
- f.to_bounded_order_hom = {to_order_hom := {to_fun := f.to_lattice_hom.to_sup_hom.to_fun, monotone' := _}, map_top' := _, map_bot' := _}
Equations
- bounded_lattice_hom.bounded_lattice_hom_class = {to_lattice_hom_class := {to_sup_hom_class := {to_fun_like := {coe := λ (f : bounded_lattice_hom α β), f.to_lattice_hom.to_sup_hom.to_fun, coe_injective' := _}, map_sup := _}, map_inf := _}, map_top := _, map_bot := _}
Helper instance for when there's too many metavariables to apply fun_like.has_coe_to_fun
directly.
Equations
- bounded_lattice_hom.has_coe_to_fun = {coe := λ (f : bounded_lattice_hom α β), f.to_lattice_hom.to_sup_hom.to_fun}
Copy of a bounded_lattice_hom
with a new to_fun
equal to the old one. Useful to fix
definitional equalities.
Equations
- f.copy f' h = {to_lattice_hom := {to_sup_hom := (f.to_lattice_hom.copy f' h).to_sup_hom, map_inf' := _}, map_top' := _, map_bot' := _}
id
as a bounded_lattice_hom
.
Equations
- bounded_lattice_hom.id α = {to_lattice_hom := {to_sup_hom := (lattice_hom.id α).to_sup_hom, map_inf' := _}, map_top' := _, map_bot' := _}
Equations
- bounded_lattice_hom.inhabited α = {default := bounded_lattice_hom.id α _inst_5}
Composition of bounded_lattice_hom
s as a bounded_lattice_hom
.
Equations
- f.comp g = {to_lattice_hom := {to_sup_hom := (f.to_lattice_hom.comp g.to_lattice_hom).to_sup_hom, map_inf' := _}, map_top' := _, map_bot' := _}