Orders on a sum type #
This file defines the disjoint sum and the linear (aka lexicographic) sum of two orders and
provides relation instances for Sum.LiftRel and Sum.Lex.
We declare the disjoint sum of orders as the default set of instances. The linear order goes on a type synonym.
Main declarations #
Sum.LE,Sum.LT: Disjoint sum of orders.Sum.Lex.LE,Sum.Lex.LT: Lexicographic/linear sum of orders.
Notation #
α ⊕ₗ β: The linear sum ofαandβ.
Unbundled relation classes #
Disjoint sum of two orders #
Equations
- Sum.instLESum = { le := Sum.LiftRel (fun (x1 x2 : α) => x1 ≤ x2) fun (x1 x2 : β) => x1 ≤ x2 }
Equations
- Sum.instLTSum = { lt := Sum.LiftRel (fun (x1 x2 : α) => x1 < x2) fun (x1 x2 : β) => x1 < x2 }
Equations
- Sum.instPreorderSum = let __src := Sum.instLESum; let __src_1 := Sum.instLTSum; { toLE := __src, toLT := __src_1, le_refl := ⋯, le_trans := ⋯, lt_iff_le_not_ge := ⋯ }
Equations
- Sum.instPartialOrder = let __src := Sum.instPreorderSum; { toPreorder := __src, le_antisymm := ⋯ }
Linear sum of two orders #
The linear sum of two orders
Equations
- Sum.Lex.«term_⊕ₗ_» = Lean.ParserDescr.trailingNode `Sum.Lex.«term_⊕ₗ_» 30 0 (Lean.ParserDescr.binary `andthen (Lean.ParserDescr.symbol " ⊕ₗ ") (Lean.ParserDescr.cat `term 29))
Instances For
Equations
- Sum.Lex.preorder = let __src := Sum.Lex.LE; let __src_1 := Sum.Lex.LT; { toLE := __src, toLT := __src_1, le_refl := ⋯, le_trans := ⋯, lt_iff_le_not_ge := ⋯ }
Equations
- Sum.Lex.partialOrder = let __src := Sum.Lex.preorder; { toPreorder := __src, le_antisymm := ⋯ }
Equations
- One or more equations did not get rendered due to their size.
Equations
- Sum.Lex.boundedOrder = have __src := Sum.Lex.orderBot; have __src_1 := Sum.Lex.orderTop; { toOrderTop := __src_1, toOrderBot := __src }
Order isomorphisms #
Equiv.sumComm promoted to an order isomorphism.
Equations
- OrderIso.sumComm α β = let __src := Equiv.sumComm α β; { toEquiv := __src, map_rel_iff' := ⋯ }
Instances For
Equiv.sumAssoc promoted to an order isomorphism.
Equations
- OrderIso.sumAssoc α β γ = let __src := Equiv.sumAssoc α β γ; { toEquiv := __src, map_rel_iff' := ⋯ }
Instances For
Equiv.sumAssoc promoted to an order isomorphism.
Equations
- OrderIso.sumLexAssoc α β γ = let __src := Equiv.sumAssoc α β γ; { toEquiv := __src, map_rel_iff' := ⋯ }
Instances For
OrderDual is antidistributive over ⊕ₗ up to an order isomorphism.
Equations
- OrderIso.sumLexDualAntidistrib α β = let __src := Equiv.sumComm α β; { toEquiv := __src, map_rel_iff' := ⋯ }
Instances For
Equiv.sumEmpty as an OrderIso with the lexicographic sum.
Equations
- OrderIso.sumLexEmpty = RelIso.sumLexEmpty (fun (x1 x2 : α) => x1 ≤ x2) fun (x1 x2 : β) => x1 ≤ x2
Instances For
Equiv.emptySum as an OrderIso with the lexicographic sum.
Equations
- OrderIso.emptySumLex = RelIso.emptySumLex (fun (x1 x2 : β) => x1 ≤ x2) fun (x1 x2 : α) => x1 ≤ x2
Instances For
WithBot α is order-isomorphic to PUnit ⊕ₗ α, by sending ⊥ to Unit and ↑a to
a.
Equations
- WithBot.orderIsoPUnitSumLex = { toEquiv := (Equiv.optionEquivSumPUnit α).trans ((Equiv.sumComm α PUnit.{?u.1 + 1}).trans toLex), map_rel_iff' := ⋯ }
Instances For
WithTop α is order-isomorphic to α ⊕ₗ PUnit, by sending ⊤ to Unit and ↑a to
a.
Equations
- WithTop.orderIsoSumLexPUnit = { toEquiv := (Equiv.optionEquivSumPUnit α).trans toLex, map_rel_iff' := ⋯ }