Order homomorphisms #
This file defines order homomorphisms, which are bundled monotone functions. A preorder
homomorphism f : α →o β
is a function α → β
along with a proof that ∀ x y, x ≤ y → f x ≤ f y
.
Main definitions #
In this file we define the following bundled monotone maps:
order_hom α β
a.k.a.α →o β
: Preorder homomorphism. Anorder_hom α β
is a functionf : α → β
such thata₁ ≤ a₂ → f a₁ ≤ f a₂
order_embedding α β
a.k.a.α ↪o β
: Relation embedding. Anorder_embedding α β
is an embeddingf : α ↪ β
such thata ≤ b ↔ f a ≤ f b
. Defined as an abbreviation of@rel_embedding α β (≤) (≤)
.order_iso
: Relation isomorphism. Anorder_iso α β
is an equivalencef : α ≃ β
such thata ≤ b ↔ f a ≤ f b
. Defined as an abbreviation of@rel_iso α β (≤) (≤)
.
We also define many order_hom
s. In some cases we define two versions, one with ₘ
suffix and
one without it (e.g., order_hom.compₘ
and order_hom.comp
). This means that the former
function is a "more bundled" version of the latter. We can't just drop the "less bundled" version
because the more bundled version usually does not work with dot notation.
order_hom.id
: identity map asα →o α
;order_hom.curry
: an order isomorphism betweenα × β →o γ
andα →o β →o γ
;order_hom.comp
: composition of two bundled monotone maps;order_hom.compₘ
: composition of bundled monotone maps as a bundled monotone map;order_hom.const
: constant function as a bundled monotone map;order_hom.prod
: combineα →o β
andα →o γ
intoα →o β × γ
;order_hom.prodₘ
: a more bundled version oforder_hom.prod
;order_hom.prod_iso
: order isomorphism betweenα →o β × γ
and(α →o β) × (α →o γ)
;order_hom.diag
: diagonal embedding ofα
intoα × α
as a bundled monotone map;order_hom.on_diag
: restrict a monotone mapα →o α →o β
to the diagonal;order_hom.fst
: projectionprod.fst : α × β → α
as a bundled monotone map;order_hom.snd
: projectionprod.snd : α × β → β
as a bundled monotone map;order_hom.prod_map
:prod.map f g
as a bundled monotone map;pi.eval_order_hom
: evaluation of a function at a pointfunction.eval i
as a bundled monotone map;order_hom.coe_fn_hom
: coercion to function as a bundled monotone map;order_hom.apply
: application of aorder_hom
at a point as a bundled monotone map;order_hom.pi
: combine a family of monotone mapsf i : α →o π i
into a monotone mapα →o Π i, π i
;order_hom.pi_iso
: order isomorphism betweenα →o Π i, π i
andΠ i, α →o π i
;order_hom.subtyle.val
: embeddingsubtype.val : subtype p → α
as a bundled monotone map;order_hom.dual
: reinterpret a monotone mapα →o β
as a monotone maporder_dual α →o order_dual β
;order_hom.dual_iso
: order isomorphism betweenα →o β
andorder_dual (order_dual α →o order_dual β)
;
We also define two functions to convert other bundled maps to α →o β
:
order_embedding.to_order_hom
: convertα ↪o β
toα →o β
;rel_hom.to_order_hom
: conver arel_hom
between strict orders to aorder_hom
.
Tags #
monotone map, bundled morphism
order_hom_class F α b
asserts that F
is a type of ≤
-preserving morphisms.
An order embedding is an embedding f : α ↪ β
such that a ≤ b ↔ (f a) ≤ (f b)
.
This definition is an abbreviation of rel_embedding (≤) (≤)
.
Equations
- order_hom.has_coe_to_fun = {coe := order_hom.to_fun _inst_2}
Equations
- order_hom.order_hom_class = {to_fun_like := {coe := order_hom.to_fun _inst_2, coe_injective' := _}, map_rel := _}
One can lift an unbundled monotone function to a bundled one.
Equations
- order_hom.can_lift = {coe := coe_fn order_hom.has_coe_to_fun, cond := monotone _inst_2, prf := _}
The identity function as bundled monotone function.
Equations
- order_hom.inhabited = {default := order_hom.id _inst_1}
The preorder structure of α →o β
is pointwise inequality: f ≤ g ↔ ∀ a, f a ≤ g a
.
Equations
Equations
- order_hom.partial_order = partial_order.lift coe_fn order_hom.partial_order._proof_1
Curry/uncurry as an order isomorphism between α × β →o γ
and α →o β →o γ
.
Equations
The composition of two bundled monotone functions, a fully bundled version.
Given two bundled monotone maps f
, g
, f.prod g
is the map x ↦ (f x, g x)
bundled as a
order_hom
. This is a fully bundled version.
Diagonal embedding of α
into α × α
as a order_hom
.
Equations
Order isomorphism between the space of monotone maps to β × γ
and the product of the spaces
of monotone maps to β
and γ
.
Evaluation of an unbundled function at a point (function.eval
) as a order_hom
.
Equations
- pi.eval_order_hom i = {to_fun := function.eval i, monotone' := _}
Function application λ f, f a
(for fixed a
) is a monotone function from the
monotone function space α →o β
to β
. See also pi.eval_order_hom
.
Equations
Construct a bundled monotone map α →o Π i, π i
from a family of monotone maps
f i : α →o π i
.
Order isomorphism between bundled monotone maps α →o Π i, π i
and families of bundled monotone
maps Π i, α →o π i
.
Equations
- order_hom.pi_iso = {to_equiv := {to_fun := λ (f : α →o Π (i : ι), π i) (i : ι), (pi.eval_order_hom i).comp f, inv_fun := order_hom.pi (λ (i : ι), _inst_5 i), left_inv := _, right_inv := _}, map_rel_iff' := _}
subtype.val
as a bundled monotone function.
Equations
- order_hom.subtype.val p = {to_fun := subtype.val p, monotone' := _}
There is a unique monotone map from a subsingleton to itself.
Equations
- order_hom.unique = {to_inhabited := {default := order_hom.id _inst_1}, uniq := _}
Reinterpret a bundled monotone function as a monotone function between dual orders.
Equations
- order_hom.dual = {to_fun := λ (f : α →o β), {to_fun := ⇑order_dual.to_dual ∘ ⇑f ∘ ⇑order_dual.of_dual, monotone' := _}, inv_fun := λ (f : order_dual α →o order_dual β), {to_fun := ⇑order_dual.of_dual ∘ ⇑f ∘ ⇑order_dual.to_dual, monotone' := _}, left_inv := _, right_inv := _}
order_hom.dual
as an order isomorphism.
Equations
- order_hom.dual_iso α β = {to_equiv := order_hom.dual.trans order_dual.to_dual, map_rel_iff' := _}
Embeddings of partial orders that preserve <
also preserve ≤
.
Equations
- f.order_embedding_of_lt_embedding = {to_embedding := f.to_embedding, map_rel_iff' := _}
<
is preserved by order embeddings of preorders.
Equations
- f.lt_embedding = {to_embedding := f.to_embedding, map_rel_iff' := _}
An order embedding is also an order embedding between dual orders.
Equations
- f.dual = {to_embedding := f.to_embedding, map_rel_iff' := _}
To define an order embedding from a partial order to a preorder it suffices to give a function
together with a proof that it satisfies f a ≤ f b ↔ a ≤ b
.
Equations
A strictly monotone map from a linear order is an order embedding. -
Equations
Embedding of a subtype into the ambient type as an order_embedding
.
Equations
Convert an order_embedding
to a order_hom
.
A bundled expression of the fact that a map between partial orders that is strictly monotone is weakly monotone.
Reinterpret an order isomorphism as an order embedding.
Equations
Identity order isomorphism.
Equations
Inverse of an order isomorphism.
Equations
- e.symm = rel_iso.symm e
To show that f : α → β
, g : β → α
make up an order isomorphism of linear orders,
it suffices to prove cmp a (g b) = cmp (f a) b
. -
Order isomorphism between two equal sets.
Equations
- order_iso.set_congr s t h = {to_equiv := equiv.set_congr h, map_rel_iff' := _}
Order isomorphism between univ : set α
and α
.
Equations
- order_iso.set.univ = {to_equiv := equiv.set.univ α, map_rel_iff' := _}
Order isomorphism between α → β
and β
, where α
has a unique element.
Equations
- order_iso.fun_unique α β = {to_equiv := equiv.fun_unique α β _inst_4, map_rel_iff' := _}
If e
is an equivalence with monotone forward and inverse maps, then e
is an
order isomorphism.
Equations
- e.to_order_iso h₁ h₂ = {to_equiv := e, map_rel_iff' := _}
If a function f
is strictly monotone on a set s
, then it defines an order isomorphism
between s
and its image.
Equations
- strict_mono_on.order_iso f s hf = {to_equiv := set.bij_on.equiv f _, map_rel_iff' := _}
A strictly monotone function from a linear order is an order isomorphism between its domain and its range.
Equations
- strict_mono.order_iso f h_mono = {to_equiv := equiv.of_injective f _, map_rel_iff' := _}
A strictly monotone surjective function from a linear order is an order isomorphism.
Equations
- strict_mono.order_iso_of_surjective f h_mono h_surj = (strict_mono.order_iso f h_mono).trans ((order_iso.set_congr (set.range f) set.univ _).trans order_iso.set.univ)
A strictly monotone function with a right inverse is an order isomorphism.
Equations
- strict_mono.order_iso_of_right_inverse f h_mono g hg = {to_equiv := {to_fun := f, inv_fun := g, left_inv := _, right_inv := hg}, map_rel_iff' := _}
An order isomorphism is also an order isomorphism between dual orders.
Note that this goal could also be stated (disjoint on f) a b