Initial and principal segments #
THIS FILE IS SYNCHRONIZED WITH MATHLIB4. Any changes to this file require a corresponding PR to mathlib4.
This file defines initial and principal segments.
Main definitions #
initial_seg r s
: type of order embeddings ofr
intos
for which the range is an initial segment (i.e., ifb
belongs to the range, then anyb' < b
also belongs to the range). It is denoted byr ≼i s
.principal_seg r s
: Type of order embeddings ofr
intos
for which the range is a principal segment, i.e., an interval of the form(-∞, top)
for some elementtop
. It is denoted byr ≺i s
.
Notations #
These notations belong to the initial_seg
locale.
r ≼i s
: the type of initial segment embeddings ofr
intos
.r ≺i s
: the type of principal segment embeddings ofr
intos
.
Initial segments #
Order embeddings whose range is an initial segment of s
(i.e., if b
belongs to the range, then
any b' < b
also belongs to the range). The type of these embeddings from r
to s
is called
initial_seg r s
, and denoted by r ≼i s
.
- to_rel_embedding : r ↪r s
- init' : ∀ (a : α) (b : β), s b (⇑(self.to_rel_embedding) a) → (∃ (a' : α), ⇑(self.to_rel_embedding) a' = b)
If r
is a relation on α
and s
in a relation on β
, then f : r ≼i s
is an order
embedding whose range is an initial segment. That is, whenever b < f a
in β
then b
is in the
range of f
.
Instances for initial_seg
Equations
Equations
- initial_seg.embedding_like = {coe := λ (f : initial_seg r s), f.to_rel_embedding.to_embedding.to_fun, coe_injective' := _, injective' := _}
An order isomorphism is an initial segment
Equations
- initial_seg.of_iso f = {to_rel_embedding := ↑f, init' := _}
The identity function shows that ≼i
is reflexive
Equations
- initial_seg.refl r = {to_rel_embedding := rel_embedding.refl r, init' := _}
Equations
Composition of functions shows that ≼i
is transitive
Equations
- f.trans g = {to_rel_embedding := f.to_rel_embedding.trans g.to_rel_embedding, init' := _}
If we have order embeddings between α
and β
whose images are initial segments, and β
is a well-order then α
and β
are order-isomorphic.
Restrict the codomain of an initial segment
Equations
- initial_seg.cod_restrict p f H = {to_rel_embedding := rel_embedding.cod_restrict p ↑f H, init' := _}
Initial segment from an empty type.
Equations
- initial_seg.of_is_empty r s = {to_rel_embedding := rel_embedding.of_is_empty r s _inst_1, init' := _}
Initial segment embedding of an order r
into the disjoint union of r
and s
.
Equations
- initial_seg.le_add r s = {to_rel_embedding := {to_embedding := {to_fun := sum.inl β, inj' := _}, map_rel_iff' := _}, init' := _}
Principal segments #
Order embeddings whose range is a principal segment of s
(i.e., an interval of the form
(-∞, top)
for some element top
of β
). The type of these embeddings from r
to s
is called
principal_seg r s
, and denoted by r ≺i s
. Principal segments are in particular initial
segments.
- to_rel_embedding : r ↪r s
- top : β
- down' : ∀ (b : β), s b self.top ↔ ∃ (a : α), ⇑(self.to_rel_embedding) a = b
If r
is a relation on α
and s
in a relation on β
, then f : r ≺i s
is an order
embedding whose range is an open interval (-∞, top)
for some element top
of β
. Such order
embeddings are called principal segments
Instances for principal_seg
Equations
Equations
- principal_seg.has_coe_to_fun = {coe := λ (f : principal_seg r s), ⇑f}
A principal segment is in particular an initial segment.
Equations
- principal_seg.has_coe_initial_seg = {coe := λ (f : principal_seg r s), {to_rel_embedding := f.to_rel_embedding, init' := _}}
Composition of a principal segment with an initial segment, as a principal segment
Composition of two principal segments as a principal segment
Composition of an order isomorphism with a principal segment, as a principal segment
Equations
- principal_seg.equiv_lt f g = {to_rel_embedding := ↑f.trans ↑g, top := g.top, down' := _}
Composition of a principal segment with an order isomorphism, as a principal segment
Given a well order s
, there is a most one principal segment embedding of r
into s
.
Any element of a well order yields a principal segment
Equations
- principal_seg.of_element r a = {to_rel_embedding := subrel.rel_embedding r {b : α | r b a}, top := a, down' := _}
Restrict the codomain of a principal segment
Equations
- principal_seg.cod_restrict p f H H₂ = {to_rel_embedding := rel_embedding.cod_restrict p ↑f H, top := ⟨f.top, H₂⟩, down' := _}
Principal segment from an empty type into a type with a minimal element.
Equations
- principal_seg.of_is_empty r H = {to_rel_embedding := {to_embedding := (rel_embedding.of_is_empty r s).to_embedding, map_rel_iff' := _}, top := b, down' := _}
Principal segment from the empty relation on pempty
to the empty relation on punit
.
Equations
- principal_seg.pempty_to_punit = principal_seg.of_is_empty empty_relation principal_seg.pempty_to_punit._proof_1
A relation is well-founded iff every principal segment of it is well-founded.
In this lemma we use subrel
to indicate its principal segments because it's usually more
convenient to use.
Properties of initial and principal segments #
To an initial segment taking values in a well order, one can associate either a principal segment (if the range is not everything, hence one can take as top the minimum of the complement of the range) or an order isomorphism (if the range is everything).
Equations
- f.lt_or_eq = dite (function.surjective ⇑f) (λ (h : function.surjective ⇑f), sum.inr (rel_iso.of_surjective ↑f h)) (λ (h : ¬function.surjective ⇑f), sum.inl {to_rel_embedding := ↑f, top := classical.some _, down' := _})
Composition of an initial segment taking values in a well order and a principal segment.
Given an order embedding into a well order, collapse the order embedding by filling the
gaps, to obtain an initial segment. Here, we construct the collapsed order embedding pointwise,
but the proof of the fact that it is an initial segment will be given in collapse
.
Construct an initial segment from an order embedding into a well order, by collapsing it to fill the gaps.
Equations
- f.collapse = {to_rel_embedding := rel_embedding.of_monotone (λ (a : α), (f.collapse_F a).val) _, init' := _}