Order intervals #
This file defines (nonempty) closed intervals in an order (see Set.Icc). This is a prototype for
interval arithmetic.
Main declarations #
NonemptyInterval: Nonempty intervals. Pairs where the second element is greater than the first.Interval: Intervals. Either∅or a nonempty interval.
The nonempty closed intervals in an order.
We define intervals by the pair of endpoints fst, snd. To convert intervals to the set of
elements between these endpoints, use the coercion NonemptyInterval α → Set α.
Instances For
The injection that induces the order on intervals.
Instances For
toDualProd as an order embedding.
Equations
- NonemptyInterval.toDualProdHom = { toFun := NonemptyInterval.toDualProd, inj' := ⋯, map_rel_iff' := ⋯ }
Instances For
Turn an interval into an interval in the dual order.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- NonemptyInterval.instCoeSet = { coe := fun (s : NonemptyInterval α) => Set.Icc s.toProd.1 s.toProd.2 }
Equations
- NonemptyInterval.instMembership = { mem := fun (s : NonemptyInterval α) (a : α) => a ∈ Set.Icc s.toProd.1 s.toProd.2 }
{a} as an interval.
Equations
- NonemptyInterval.pure a = { fst := a, snd := a, fst_le_snd := ⋯ }
Instances For
Equations
- NonemptyInterval.instInhabited = { default := NonemptyInterval.pure default }
Pushforward of nonempty intervals.
Instances For
Binary pushforward of nonempty intervals.
Equations
Instances For
Consider a nonempty interval [a, b] as the set [a, b].
Equations
- NonemptyInterval.coeHom = OrderEmbedding.ofMapLEIff (fun (s : NonemptyInterval α) => Set.Icc s.toProd.1 s.toProd.2) ⋯
Instances For
Equations
- NonemptyInterval.setLike = { coe := fun (s : NonemptyInterval α) => Set.Icc s.toProd.1 s.toProd.2, coe_injective' := ⋯ }
The closed intervals in an order.
We represent intervals either as ⊥ or a nonempty interval given by its endpoints fst, snd.
To convert intervals to the set of elements between these endpoints, use the coercion
Interval α → Set α.
Equations
- Interval α = WithBot (NonemptyInterval α)
Instances For
Equations
Equations
Equations
Equations
Recursor for Interval using the preferred forms ⊥ and ↑a.
Equations
- Interval.recBotCoe bot coe n = WithBot.recBotCoe bot coe n
Instances For
Equations
Turn an interval into an interval in the dual order.
Equations
Instances For
Equations
Equations
Consider an interval [a, b] as the set [a, b].
Equations
- Interval.coeHom = OrderEmbedding.ofMapLEIff (fun (s : Interval α) => match s with | none => ∅ | some s => ↑s) ⋯
Instances For
Equations
- Interval.setLike = { coe := ⇑Interval.coeHom, coe_injective' := ⋯ }
Equations
- One or more equations did not get rendered due to their size.
Equations
- One or more equations did not get rendered due to their size.