Two-pointings #
This file defines TwoPointing α, the type of two pointings of α. A two-pointing is the data of
two distinct terms.
This is morally a Type-valued Nontrivial. Another type which is quite close in essence is Sym2.
Categorically speaking, prod is a cospan in the category of types. This forms the category of
bipointed types. Two-pointed types form a full subcategory of those.
References #
- [nLab, Coalgebra of the real interval] (https://ncatlab.org/nlab/show/coalgebra+of+the+real+interval)
Equations
- One or more equations did not get rendered due to their size.
Instances For
@[instance_reducible]
Swaps the two pointed elements.
Instances For
instance TwoPointing.instNonemptyOfNontrivial {α : Type u_1} [Nontrivial α] :
Nonempty (TwoPointing α)
@[simp]
def TwoPointing.pi (α : Type u_1) {β : Type u_2} (q : TwoPointing β) [Nonempty α] :
TwoPointing (α → β)
The two-pointing of constant functions.
Equations
Instances For
@[simp]
@[simp]
@[simp]
theorem TwoPointing.prod_fst {α : Type u_1} {β : Type u_2} (p : TwoPointing α) (q : TwoPointing β) :
@[simp]
theorem TwoPointing.prod_snd {α : Type u_1} {β : Type u_2} (p : TwoPointing α) (q : TwoPointing β) :
def TwoPointing.sum {α : Type u_1} {β : Type u_2} (p : TwoPointing α) (q : TwoPointing β) :
TwoPointing (α ⊕ β)
The sum of two pointings. Keeps the first point from the left and the second point from the right.
Instances For
@[simp]
@[simp]
The false, true two-pointing of Bool.
Equations
- TwoPointing.bool = { fst := false, snd := true, fst_ne_snd := Bool.false_ne_true }
Instances For
@[instance_reducible]
Equations
- TwoPointing.instInhabitedBool = { default := TwoPointing.bool }
The False, True two-pointing of Prop.
Equations
- TwoPointing.prop = { fst := False, snd := True, fst_ne_snd := false_ne_true }