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)
Two-pointing of a type. This is a Type-valued termed Nontrivial
.
- fst : α
- snd : α
- fst_ne_snd : self.fst ≠ self.snd
fst
andsnd
are distinct terms
Instances For
fst
and snd
are distinct terms
Equations
- instDecidableEqTwoPointing = decEqTwoPointing✝
Swaps the two pointed elements.
Equations
- p.swap = { toProd := (p.snd, p.fst), fst_ne_snd := ⋯ }
Instances For
Equations
- ⋯ = ⋯
The two-pointing of constant functions.
Equations
- TwoPointing.pi α q = { toProd := (fun (x : α) => q.fst, fun (x : α) => q.snd), fst_ne_snd := ⋯ }
Instances For
The product of two two-pointings.
Equations
- p.prod q = { toProd := ((p.fst, q.fst), p.snd, q.snd), fst_ne_snd := ⋯ }
Instances For
The sum of two pointings. Keeps the first point from the left and the second point from the right.
Instances For
The false
, true
two-pointing of Bool
.
Equations
- TwoPointing.bool = { toProd := (false, true), fst_ne_snd := Bool.false_ne_true }
Instances For
Equations
- TwoPointing.instInhabitedBool = { default := TwoPointing.bool }
The False
, True
two-pointing of Prop
.
Equations
- TwoPointing.prop = { toProd := (False, True), fst_ne_snd := false_ne_true }