Equivalences for Option α #
We define
Equiv.optionCongr: theOption α ≃ Option βconstructed frome : α ≃ βby sendingnonetonone, and applyingeelsewhere.Equiv.removeNone: theα ≃ βconstructed fromOption α ≃ Option βby removingnonefrom both sides.
A universe-polymorphic version of EquivFunctor.mapEquiv Option e.
Equations
- e.optionCongr = { toFun := Option.map ⇑e, invFun := Option.map ⇑e.symm, left_inv := ⋯, right_inv := ⋯ }
Instances For
When α and β are in the same universe, this is the same as the result of
EquivFunctor.mapEquiv.
Alias of Equiv.removeNoneAux.
If we have a value on one side of an Equiv of Option
we also have a value on the other side of the equivalence
Equations
Instances For
Alias of Equiv.removeNoneAux_none.
Alias of Equiv.removeNoneAux_inv.
Given an equivalence between two Option types, eliminate none from that equivalence by
mapping e.symm none to e none.
Equations
- e.removeNone = { toFun := e.removeNoneAux, invFun := e.symm.removeNoneAux, left_inv := ⋯, right_inv := ⋯ }
Instances For
Equivalences between Option α and β that send none to x are equivalent to
equivalences between α and {y : β // y ≠ x}.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Any type with a distinguished element is equivalent to an Option type on the subtype excluding
that element.
Equations
- Equiv.optionSubtypeNe a = ↑((Equiv.optionSubtype a).symm (Equiv.refl { y : α // y ≠ a }))
Instances For
The bijection { i // i ≠ i₀ } ⊕ PUnit ≃ α for any i₀ : α.
Equations
- Equiv.subtypeNeSumPUnit i₀ = (Equiv.optionEquivSumPUnit { i : α // i ≠ i₀ }).symm.trans (Equiv.optionSubtypeNe i₀)