Two-pointings #
THIS FILE IS SYNCHRONIZED WITH MATHLIB4. Any changes to this file require a corresponding PR to mathlib4.
This file defines two_pointing α
, 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
.
Instances for two_pointing
- two_pointing.has_sizeof_inst
- two_pointing.nonempty
- two_pointing.inhabited
Swaps the two pointed elements.
The two-pointing of constant functions.
Equations
- two_pointing.pi α q = {to_prod := (λ (_x : α), q.to_prod.fst, λ (_x : α), q.to_prod.snd), fst_ne_snd := _}
The product of two two-pointings.
The sum of two pointings. Keeps the first point from the left and the second point from the right.
The ff
, tt
two-pointing of bool
.
Equations
- two_pointing.bool = {to_prod := (bool.ff, bool.tt), fst_ne_snd := bool.ff_ne_tt}
Equations
The false
, true
two-pointing of Prop
.
Equations
- two_pointing.Prop = {to_prod := (false, true), fst_ne_snd := false_ne_true}