Notes
- Functions are coded as functional relations (in particular, functions are sets)
- Extensional equality of functions coincedes with extensional equality of sets.
- data ExSnd f a where
- type Total dom f = forall a. (a :∈: dom) -> ExSnd f a
- type Sval f = forall a b1 b2 r. ((a, b1) :∈: f) -> ((a, b2) :∈: f) -> (b1 ~ b2 => r) -> r
- data dom :~>: cod where
- relation :: (dom :~>: cod) f -> f :⊆: (dom :×: cod)
- total :: (dom :~>: cod) f -> (a :∈: dom) -> ExSnd f a
- totalCPS :: (dom :~>: cod) f -> (a :∈: dom) -> (forall totalCPS_y. ((a, totalCPS_y) :∈: f) -> totalCPS_return) -> totalCPS_return
- sval :: forall dom cod a b1 b2 f. (dom :~>: cod) f -> ((a, b1) :∈: f) -> ((a, b2) :∈: f) -> b1 :=: b2
- svalCoerce :: forall dom cod a b1 b2 f. (dom :~>: cod) f -> ((a, b1) :∈: f) -> ((a, b2) :∈: f) -> b1 -> b2
- svalCPS :: (dom :~>: cod) f -> ((a, b1) :∈: f) -> ((a, b2) :∈: f) -> (b1 ~ b2 => r) -> r
- svalCPS' :: (dom :~>: cod) f -> ((a, b1) :∈: f) -> ((a, b2) :∈: f) -> ((b1 :=: b2) -> r) -> r
- rel :: (dom :~>: cod) f -> (pair :∈: f) -> pair :∈: (dom :×: cod)
- relCPS :: (dom :~>: cod) f -> (pair :∈: f) -> (forall relCPS_x relCPS_y. pair ~ (relCPS_x, relCPS_y) => dom relCPS_x -> cod relCPS_y -> relCPS_return) -> relCPS_return
- inDom :: (dom :~>: cod) f -> ((a, b) :∈: f) -> a :∈: dom
- inCod :: (dom :~>: cod) f -> ((a, b) :∈: f) -> b :∈: cod
- domUniq :: (dom :~>: cod) f -> (dom2 :~>: cod) f -> dom :==: dom2
- type :~~>: dom cod = Lower1 (dom :~>: cod)
- lowerFun :: (dom :~>: cod) f -> (dom :~~>: cod) (Lower f)
- raiseFun :: (dom :~~>: cod) (Lower f) -> (dom :~>: cod) f
- raiseFunCPS :: (dom :~~>: cod) lf -> (forall f. lf ~ Lower f => (dom :~>: cod) f -> r) -> r
- data Image f s where
- imageCod :: (dom :~>: cod) f -> Image f s :⊆: cod
- setCodToImage :: (dom :~>: cod) f -> (dom :~>: Image f dom) f
- adjustCod :: (dom :~>: cod) f -> (Image f dom :⊆: cod') -> (dom :~>: cod') f
- extendCod :: (dom :~>: cod) f -> (cod :⊆: cod') -> (dom :~>: cod') f
- imageMonotonic :: (s1 :⊆: s2) -> Image f s1 :⊆: Image f s2
- imageEmpty :: Image f Empty :==: Empty
- imageOfInclusion :: Image (Incl dom cod) s :==: (s :∩: dom)
- fullImageOfInclusion :: (dom :⊆: cod) -> Image (Incl dom cod) dom :==: dom
- imageUnion :: forall dom cod s1 s2 f. (dom :~>: cod) f -> Image f (s1 :∪: s2) :==: (Image f s1 :∪: Image f s2)
- funEq :: forall dom cod cod' f f'. (dom :~>: cod) f -> (dom :~>: cod') f' -> (f :⊆: f') -> f :==: f'
- funEq' :: (dom :~>: cod) f -> (dom :~>: cod') f' -> (f' :⊆: f) -> f :==: f'
- equal_f :: (d :~>: c) f' -> (f :==: f') -> ((x, y) :∈: f) -> ((x, y') :∈: f') -> y :=: y'
- equal_f_coerce :: (d :~>: c) f' -> (f :==: f') -> ((x, y) :∈: f) -> ((x, y') :∈: f') -> y -> y'
- isFun_congruence :: (d :~>: c) f -> (f :==: f') -> (d :~>: c) f'
- data Incl dom cod where
- type Id dom = Incl dom dom
- inclusionIsFun :: (dom :⊆: cod) -> (dom :~>: cod) (Incl dom cod)
- idIsFun :: (dom :~>: dom) (Id dom)
- data g :○: f where
- compoIsFun :: (s2 :~>: s3) g -> (s1 :~>: s2) f -> (s1 :~>: s3) (g :○: f)
- compo_idl :: (d :~>: c) f -> (Id c :○: f) :==: f
- compo_idr :: (d :~>: c) f -> (f :○: Id d) :==: f
- compo_assoc :: :~>: s2 cod g -> :~>: s21 s2 f -> :~>: dom s21 f1 -> ((g :○: f) :○: f1) :==: (g :○: (f :○: f1))
- data Equaliser f1 f2 where
- type EqualiserIncl s f1 f2 = Incl (Equaliser f1 f2) s
- equaliserSubset :: (s :~>: t) f1 -> Equaliser f1 f2 :⊆: s
- equaliserIsFun :: (s :~>: t) f1 -> (Equaliser f1 f2 :~>: s) (EqualiserIncl s f1 f2)
- equaliserUni :: (s0 :~>: s) g -> (s :~>: t) f1 -> ((f1 :○: g) :==: (f2 :○: g)) -> (s0 :~>: Equaliser f1 f2) g
- data Injective f where
- injective :: forall f a1 a2 b. Injective f -> ((a1, b) :∈: f) -> ((a2, b) :∈: f) -> a1 :=: a2
- inclusion_Injective :: Injective (Incl dom cod)
- data Preimage f s where
- preimage_Image :: (dom :~>: cod) f -> (set :⊆: dom) -> set :⊆: Preimage f (Image f set)
- image_Preimage :: (dom :~>: cod) f -> Image f (Preimage f set) :⊆: set
- data Fst s1 s2 where
- data Snd s1 s2 where
- data f1 :***: f2 where
- fstIsFun :: ((s1 :×: s2) :~>: s1) (Fst s1 s2)
- sndIsFun :: ((s1 :×: s2) :~>: s2) (Snd s1 s2)
- targetTuplingIsFun :: (dom :~>: cod1) f1 -> (dom :~>: cod2) f2 -> (dom :~>: (cod1 :×: cod2)) (f1 :***: f2)
- fst_tupling :: (dom :~>: cod1) f1 -> (dom :~>: cod2) f2 -> (Fst cod1 cod2 :○: (f1 :***: f2)) :==: f1
- snd_tupling :: (dom :~>: cod1) f1 -> (dom :~>: cod2) f2 -> (Snd cod1 cod2 :○: (f1 :***: f2)) :==: f2
- tupling_eta :: (dom :~>: (cod1 :×: cod2)) f -> ((Fst cod1 cod2 :○: f) :***: (Snd cod1 cod2 :○: f)) :==: f
- data HaskFun where
- haskFunIsFun :: ((Univ :×: Univ) :~>: FunctionType) HaskFun
- haskFunInjective :: Injective HaskFun
- data KleisliHom m where
- KleisliHom :: KleisliHom m ((,) ((,) a b) (a -> m b))
- kleisliHomIsFun :: ((Univ :×: Univ) :~>: KleisliType m) (KleisliHom m)
- kleisliHomInjective :: Injective (KleisliHom m)
- data Graph f where
- graphIsFun :: (Univ :~>: Univ) (Graph f)
- graphCPS :: (pair :∈: Graph f) -> (forall a. pair ~ (a, f a) => r) -> r
- graphInjective :: Injective (Graph f)
- imageGraphList :: [a] :∈: Image (Graph []) Univ
- data ToTyCon f x = forall y . ToTyCon ((x, y) :∈: f) y
- introToTyCon :: ((x, y) :∈: f) -> y -> ToTyCon f x
- elimToTyCon :: (dom :~>: cod) f -> ToTyCon f x -> ((x, z) :∈: f) -> z
- toTCG :: f x -> ToTyCon (Graph f) x
- fromTCG :: ToTyCon (Graph f) x -> f x
- data BiGraph f where
- biGraphIsFun :: ((Univ :×: Univ) :~>: Univ) (BiGraph f)
- biGraphInjective :: Injective (BiGraph f)
- biGraph_eq_HaskFun :: BiGraph (->) :==: HaskFun
- data Const dom x where
- constIsFun :: (x :∈: cod) -> (dom :~>: cod) (Const dom x)
- constEq :: Ex dom -> (Const dom x :==: Const dom' x') -> x :=: x'
- data Π fam f where
- data Section bundleMap f where
- idLemma :: (dom :~>: dom) f -> (forall x y. ((x, y) :∈: f) -> x :=: y) -> Id dom :==: f
- section_CompoId :: (total :~>: base) bun -> (base :~>: total) f -> Section bun f -> (bun :○: f) :==: Id base
- compoId_Section :: (total :~>: base) bun -> (base :~>: total) f -> ((bun :○: f) :==: Id base) -> Section bun f
- data Inv f where
- invInv0 :: Inv (Inv f) :⊆: f
- invInv :: (dom :~>: cod) f -> Inv (Inv f) :==: f
- injective_Inv :: (dom :~>: cod) f -> Injective f -> (Image f dom :~>: dom) (Inv f)
- invId :: Inv (Id dom) :==: Id dom
Preliminary
Existential quantification over the first component of a pair
type Sval f = forall a b1 b2 r. ((a, b1) :∈: f) -> ((a, b2) :∈: f) -> (b1 ~ b2 => r) -> rSource
Single-valuedness (CPS)
Functions
Functions are encoded as functional relations; the three arguments to the construcor are:
- Is a relation
- Totality
- Single-valuedness (CPS-encoded; using
:=:
would work just as well. I hope that the CPS variant makes the optimizer more happy, but this is pure speculation)
(cod' ~ cod'_copy, Fact (:~>: dom cod f)) => Fact (:⊆: cod cod'_copy -> :~>: dom cod' f) | |
Fact (:⊆: dom cod -> :~>: dom cod (Incl dom cod)) | |
Fact (:∈: x cod -> :~>: dom cod (Const dom x)) | |
Fact (:~~>: dom cod (Lower f) -> :~>: dom cod f) | |
Fact (:~>: dom (:×: cod1 cod2) f -> :==: (:***: (:○: (Fst cod1 cod2) f) (:○: (Snd cod1 cod2) f)) f) | |
Fact (:~>: dom cod1 f1 -> :~>: dom cod2 f2 -> :==: (:○: (Snd cod1 cod2) (:***: f1 f2)) f2) | |
Fact (:~>: dom cod1 f1 -> :~>: dom cod2 f2 -> :==: (:○: (Fst cod1 cod2) (:***: f1 f2)) f1) | |
Fact (:~>: s2 cod g -> :~>: s21 s2 f -> :~>: dom s21 f1 -> :==: (:○: (:○: g f) f1) (:○: g (:○: f f1))) | |
Fact (:~>: dom cod f -> :⊆: (Image f (Preimage f set)) set) | |
Fact (:~>: dom cod f -> :⊆: set dom -> :⊆: set (Preimage f (Image f set))) | |
Fact (:~>: dom cod f -> Injective f -> :~>: (Image f dom) dom (Inv f)) | |
Fact (:~>: total base bun -> :~>: base total f -> :==: (:○: bun f) (Id base) -> Section bun f) | |
Fact (:~>: total base bun -> :~>: base total f -> Section bun f -> :==: (:○: bun f) (Id base)) | |
Fact (:~>: dom cod f -> :~~>: dom cod (Lower f)) | |
Fact (:~>: d c f -> :==: (:○: f (Id d)) f) | |
Fact (:~>: d c f -> :==: (:○: (Id c) f) f) | |
Fact (:~>: dom cod f -> :==: (Image f (:∪: s1 s2)) (:∪: (Image f s1) (Image f s2))) | |
Fact (:~>: dom cod f -> :~>: dom2 cod f -> :==: dom dom2) | |
Fact (:~>: dom cod f -> :∈: (a, b) f -> :∈: b cod) | |
Fact (:~>: dom cod f -> :∈: (a, b) f -> :∈: a dom) | |
Fact (:~>: d c f' -> :==: f f' -> :∈: (x, y) f -> :∈: (x, y') f' -> :=: y y') | |
Fact (:~>: s t f1 -> :~>: (Equaliser f1 f2) s (EqualiserIncl s f1 f2)) | |
Fact (:~>: s0 s g -> :~>: s t f1 -> :==: (:○: f1 g) (:○: f2 g) -> :~>: s0 (Equaliser f1 f2) g) | |
Fact (:~>: s t f1 -> :⊆: (Equaliser f1 f2) s) | |
Fact (:~>: dom cod f -> :⊆: cod cod' -> :~>: dom cod' f) | |
Fact (:~>: dom cod f -> :~>: dom cod' f' -> :⊆: f f' -> :==: f f') | |
Fact (:~>: dom cod f -> :∈: a dom -> ExSnd f a) | |
Fact (:~>: dom cod f -> :∈: pair f -> :∈: pair (:×: dom cod)) | |
Fact (:~>: dom cod f -> :⊆: f (:×: dom cod)) | |
Fact (:~>: dom cod f -> :∈: (a, b1) f -> :∈: (a, b2) f -> :=: b1 b2) | |
Fact (:~>: s2 s3 g -> :~>: s1 s2 f -> :~>: s1 s3 (:○: g f)) | |
Fact (:~>: dom cod1 f1 -> :~>: dom cod2 f2 -> :~>: dom (:×: cod1 cod2) (:***: f1 f2)) | |
(Fact (:~>: dom cod1 f1), Fact (:~>: dom cod2 f2)) => Fact (:~>: dom (:×: cod1 cod2) (:***: f1 f2)) | |
(Fact (:~>: s2 s3 g), Fact (:~>: s1 s2 f)) => Fact (:~>: s1 s3 (:○: g f)) | |
Fact (:⊆: dom cod) => Fact (:~>: dom cod (Incl dom cod)) | |
Fact (:~>: dom dom (Id dom)) | |
Fact (:~>: Univ Univ (Graph f)) | |
Fact (:~>: (:×: s1 s2) s2 (Snd s1 s2)) | |
Fact (:~>: (:×: s1 s2) s1 (Fst s1 s2)) | |
Fact (:~>: (:×: Univ Univ) (KleisliType m) (KleisliHom m)) | |
Fact (:~>: (:×: Univ Univ) FunctionType HaskFun) | |
Fact (:~>: (:×: Univ Univ) Univ (BiGraph f)) |
totalCPS :: (dom :~>: cod) f -> (a :∈: dom) -> (forall totalCPS_y. ((a, totalCPS_y) :∈: f) -> totalCPS_return) -> totalCPS_returnSource
The detailed type variable names help debugging proofs
sval :: forall dom cod a b1 b2 f. (dom :~>: cod) f -> ((a, b1) :∈: f) -> ((a, b2) :∈: f) -> b1 :=: b2Source
Functions are single-valued (reified equality version)
svalCoerce :: forall dom cod a b1 b2 f. (dom :~>: cod) f -> ((a, b1) :∈: f) -> ((a, b2) :∈: f) -> b1 -> b2Source
Perform coercion using the single-valuedness
svalCPS :: (dom :~>: cod) f -> ((a, b1) :∈: f) -> ((a, b2) :∈: f) -> (b1 ~ b2 => r) -> rSource
Functions are single-valued (CPS version)
rel :: (dom :~>: cod) f -> (pair :∈: f) -> pair :∈: (dom :×: cod)Source
Shortcut for unpacking relation
relCPS :: (dom :~>: cod) f -> (pair :∈: f) -> (forall relCPS_x relCPS_y. pair ~ (relCPS_x, relCPS_y) => dom relCPS_x -> cod relCPS_y -> relCPS_return) -> relCPS_returnSource
inDom :: (dom :~>: cod) f -> ((a, b) :∈: f) -> a :∈: domSource
If f a = b
, then a
is in the domain of f
inCod :: (dom :~>: cod) f -> ((a, b) :∈: f) -> b :∈: codSource
If f a = b
, then b
is in the codomain of f
domUniq :: (dom :~>: cod) f -> (dom2 :~>: cod) f -> dom :==: dom2Source
The domain of a function is uniquely determined
Set of functions
raiseFunCPS :: (dom :~~>: cod) lf -> (forall f. lf ~ Lower f => (dom :~>: cod) f -> r) -> rSource
This is stronger than raiseFun
since it introduces the knowledge that lf
is of the form Lower f
, rather than assuming it.
Images
Image of a set under the function
imageCod :: (dom :~>: cod) f -> Image f s :⊆: codSource
Every image is a subset of every possible codomain
setCodToImage :: (dom :~>: cod) f -> (dom :~>: Image f dom) fSource
The full image is a codomain
adjustCod :: (dom :~>: cod) f -> (Image f dom :⊆: cod') -> (dom :~>: cod') fSource
Change the codomain by proving that the full image is included in the new codomain
imageUnion :: forall dom cod s1 s2 f. (dom :~>: cod) f -> Image f (s1 :∪: s2) :==: (Image f s1 :∪: Image f s2)Source
Image distributes over union (in general not over intersection)
Equality
funEq :: forall dom cod cod' f f'. (dom :~>: cod) f -> (dom :~>: cod') f' -> (f :⊆: f') -> f :==: f'Source
Very useful lemma for proving equality of functions.
Given the properties of functions, it is enough to show that f
is a subset of f'
to prove f = f'
.
funEq' :: (dom :~>: cod) f -> (dom :~>: cod') f' -> (f' :⊆: f) -> f :==: f'Source
funEq
with the inclusion argument flipped
equal_f :: (d :~>: c) f' -> (f :==: f') -> ((x, y) :∈: f) -> ((x, y') :∈: f') -> y :=: y'Source
Expresses the fact that f = f' ==> f x = f' x
equal_f_coerce :: (d :~>: c) f' -> (f :==: f') -> ((x, y) :∈: f) -> ((x, y') :∈: f') -> y -> y'Source
Perform coercion using a function equality
isFun_congruence :: (d :~>: c) f -> (f :==: f') -> (d :~>: c) f'Source
Inclusion functions, identity, composition
Inclusion function of a subset
Inclusions do know their codomain (somewhat arbitrary design decision)
inclusionIsFun :: (dom :⊆: cod) -> (dom :~>: cod) (Incl dom cod)Source
Inclusion is a function
Composition
Fact (:~>: dom (:×: cod1 cod2) f -> :==: (:***: (:○: (Fst cod1 cod2) f) (:○: (Snd cod1 cod2) f)) f) | |
Fact (:~>: dom cod1 f1 -> :~>: dom cod2 f2 -> :==: (:○: (Snd cod1 cod2) (:***: f1 f2)) f2) | |
Fact (:~>: dom cod1 f1 -> :~>: dom cod2 f2 -> :==: (:○: (Fst cod1 cod2) (:***: f1 f2)) f1) | |
Fact (:~>: s2 cod g -> :~>: s21 s2 f -> :~>: dom s21 f1 -> :==: (:○: (:○: g f) f1) (:○: g (:○: f f1))) | |
Fact (:~>: total base bun -> :~>: base total f -> :==: (:○: bun f) (Id base) -> Section bun f) | |
Fact (:~>: total base bun -> :~>: base total f -> Section bun f -> :==: (:○: bun f) (Id base)) | |
Fact (:~>: d c f -> :==: (:○: f (Id d)) f) | |
Fact (:~>: d c f -> :==: (:○: (Id c) f) f) | |
Fact (:~>: s0 s g -> :~>: s t f1 -> :==: (:○: f1 g) (:○: f2 g) -> :~>: s0 (Equaliser f1 f2) g) | |
Fact (:~>: s2 s3 g -> :~>: s1 s2 f -> :~>: s1 s3 (:○: g f)) | |
(Fact (:~>: s2 s3 g), Fact (:~>: s1 s2 f)) => Fact (:~>: s1 s3 (:○: g f)) |
compoIsFun :: (s2 :~>: s3) g -> (s1 :~>: s2) f -> (s1 :~>: s3) (g :○: f)Source
The composition is a function
compo_assoc :: :~>: s2 cod g -> :~>: s21 s2 f -> :~>: dom s21 f1 -> ((g :○: f) :○: f1) :==: (g :○: (f :○: f1))Source
Equalisers
data Equaliser f1 f2 whereSource
Equalisers :D
In our category, the equaliser of two parallel functions f1
and f2
is the set of types on which f1
and f2
agree; that is:
Equaliser f1 f2 = { x | f1 x = f2 x }
type EqualiserIncl s f1 f2 = Incl (Equaliser f1 f2) sSource
Inclusion of the equaliser into the domain of the parallel functions
equaliserSubset :: (s :~>: t) f1 -> Equaliser f1 f2 :⊆: sSource
The equaliser is a subset of the domain of the parallel functions
equaliserIsFun :: (s :~>: t) f1 -> (Equaliser f1 f2 :~>: s) (EqualiserIncl s f1 f2)Source
The equaliser inclusion is a function
equaliserUni :: (s0 :~>: s) g -> (s :~>: t) f1 -> ((f1 :○: g) :==: (f2 :○: g)) -> (s0 :~>: Equaliser f1 f2) gSource
Universal property of equalisers:
f1 . g = f2 . g
==> g
factors uniquely through Equaliser f1 f2
Uniqueness is trivial in our case because the function into the equaliser is
identical to g
(our functions don't know their codomain)
Injectivity
Injective functions
(NB: Surjectivity is meaningless here because our functions don't know their codomain, but we have Image
)
inclusion_Injective :: Injective (Incl dom cod)Source
Preimages
Binary product projections, target tupling
Analogous to ***
Fact (:~>: dom (:×: cod1 cod2) f -> :==: (:***: (:○: (Fst cod1 cod2) f) (:○: (Snd cod1 cod2) f)) f) | |
Fact (:~>: dom cod1 f1 -> :~>: dom cod2 f2 -> :==: (:○: (Snd cod1 cod2) (:***: f1 f2)) f2) | |
Fact (:~>: dom cod1 f1 -> :~>: dom cod2 f2 -> :==: (:○: (Fst cod1 cod2) (:***: f1 f2)) f1) | |
Fact (:~>: dom cod1 f1 -> :~>: dom cod2 f2 -> :~>: dom (:×: cod1 cod2) (:***: f1 f2)) | |
(Fact (:~>: dom cod1 f1), Fact (:~>: dom cod2 f2)) => Fact (:~>: dom (:×: cod1 cod2) (:***: f1 f2)) |
targetTuplingIsFun :: (dom :~>: cod1) f1 -> (dom :~>: cod2) f2 -> (dom :~>: (cod1 :×: cod2)) (f1 :***: f2)Source
fst_tupling :: (dom :~>: cod1) f1 -> (dom :~>: cod2) f2 -> (Fst cod1 cod2 :○: (f1 :***: f2)) :==: f1Source
snd_tupling :: (dom :~>: cod1) f1 -> (dom :~>: cod2) f2 -> (Snd cod1 cod2 :○: (f1 :***: f2)) :==: f2Source
tupling_eta :: (dom :~>: (cod1 :×: cod2)) f -> ((Fst cod1 cod2 :○: f) :***: (Snd cod1 cod2 :○: f)) :==: fSource
Particular functions
The type-level function:
HaskFun(a,b) = (a -> b)
haskFunIsFun :: ((Univ :×: Univ) :~>: FunctionType) HaskFunSource
data KleisliHom m whereSource
The type-level function:
KleisliHom(a,b) = (a -> m b)
KleisliHom :: KleisliHom m ((,) ((,) a b) (a -> m b)) |
Fact (Injective (KleisliHom m)) | |
(a1 ~ a, b1 ~ b, m1 ~ m) => Fact (:∈: ((a1, b1), a -> m1 b) (KleisliHom m)) | |
Fact (:~>: (:×: Univ Univ) (KleisliType m) (KleisliHom m)) |
kleisliHomIsFun :: ((Univ :×: Univ) :~>: KleisliType m) (KleisliHom m)Source
Conversions type constructors <-> type-level functions
Graph of a (* -> *)
type constructor
graphInjective :: Injective (Graph f)Source
Type constructors are injective
introToTyCon :: ((x, y) :∈: f) -> y -> ToTyCon f xSource
elimToTyCon :: (dom :~>: cod) f -> ToTyCon f x -> ((x, z) :∈: f) -> zSource
NB: this is stronger than the straightforward unpacking function -- we can use the single-valuedness
Graph of a (* -> * -> *)
type constructor
biGraphInjective :: Injective (BiGraph f)Source
Type constructors are injective
biGraph_eq_HaskFun :: BiGraph (->) :==: HaskFunSource
Example of an extensional equation between functions
Constant functions
constIsFun :: (x :∈: cod) -> (dom :~>: cod) (Const dom x)Source
Dependent product
NB: fam
must be a function mapping some set to a set of sets, or the second condition in the constructor is vacuous
Sections
idLemma :: (dom :~>: dom) f -> (forall x y. ((x, y) :∈: f) -> x :=: y) -> Id dom :==: fSource
Lemma for proving a function equal to the identity
section_CompoId :: (total :~>: base) bun -> (base :~>: total) f -> Section bun f -> (bun :○: f) :==: Id baseSource
Is section ==> composition is id
compoId_Section :: (total :~>: base) bun -> (base :~>: total) f -> ((bun :○: f) :==: Id base) -> Section bun fSource
Composition is id ==> is section