Built with Alectryon, running Coq+SerAPI v8.19.0+0.19.3. Bubbles () indicate interactive fragments: hover for details, tap to reveal contents. Use Ctrl+↑Ctrl+↓ to navigate, Ctrl+🖱️ to focus. On Mac, use ⌘ instead of Ctrl.
[Loading ML file number_string_notation_plugin.cmxs (using legacy method) ... done]
Require Import Types.Bool.Require Import WildCat.Core WildCat.Equiv WildCat.Forall WildCat.NatTrans
WildCat.Opposite WildCat.Products WildCat.UniverseWildCat.Yoneda WildCat.ZeroGroupoid WildCat.PointedCat
WildCat.Monoidal WildCat.Bifunctor.(** * Categories with coproducts *)Definitioncat_coprod_rec_inv {IA : Type} `{Is1Cat A}
(coprod : A) (x : I -> A) (z : A) (inj : foralli, x i $-> coprod)
: yon_0gpd z coprod $-> prod_0gpd I (funi => yon_0gpd z (x i))
:= cat_prod_corec_inv (coprod : A^op) x z inj.ClassCoproduct (I : Type) {A : Type} `{Is1Cat A} (x : I -> A)
:= prod_co_coprod :: Product (A:=A^op) I x.Definitioncat_coprod (I : Type) {A : Type} (x : I -> A) `{Coproduct I _ x} : A
:= cat_prod (A:=A^op) I x.Definitioncat_in {I : Type} {A : Type} {x : I -> A} `{Coproduct I _ x}
: forall (i : I), x i $-> cat_coprod I x
:= cat_pr (A:=A^op) (x:=x).Instancecat_isequiv_cat_coprod_rec_inv {I : Type} {A : Type}
{x : I -> A} `{Coproduct I _ x}
: forall (z : A), CatIsEquiv (cat_coprod_rec_inv (cat_coprod I x) x z cat_in)
:= cat_isequiv_cat_prod_corec_inv (A:=A^op) (x:=x).(** A convenience wrapper for building coproducts *)DefinitionBuild_Coproduct (I : Type) {A : Type} `{Is1Cat A} {x : I -> A}
(cat_coprod : A) (cat_in : foralli : I, x i $-> cat_coprod)
(cat_coprod_rec : forallz : A,
(foralli : I, x i $-> z) -> (cat_coprod $-> z))
(cat_coprod_beta_in : forall (z : A) (f : foralli, x i $-> z) (i : I),
cat_coprod_rec z f $o cat_in i $== f i)
(cat_prod_eta_in : forall (z : A) (fg : cat_coprod $-> z),
(foralli : I, f $o cat_in i $== g $o cat_in i) -> f $== g)
: Coproduct I x
:= Build_Product I
(cat_coprod : A^op)
cat_in
cat_coprod_rec
cat_coprod_beta_in
cat_prod_eta_in.SectionLemmata.Context (I : Type) {A : Type} {x : I -> A} `{Coproduct I _ x}.Definitioncate_cat_coprod_rec_inv {z : A}
: yon_0gpd z (cat_coprod I x) $<~> prod_0gpd I (funi => yon_0gpd z (x i))
:= cate_cat_prod_corec_inv I (A:=A^op) (x:=x).Definitioncate_cat_coprod_rec {z : A}
: prod_0gpd I (funi => yon_0gpd z (x i)) $<~> yon_0gpd z (cat_coprod I x)
:= cate_cat_prod_corec I (A:=A^op) (x:=x).Definitioncat_coprod_rec {z : A}
: (foralli, x i $-> z) -> cat_coprod I x $-> z
:= cat_prod_corec I (A:=A^op) (x:=x).Definitioncat_coprod_beta {z : A} (f : foralli, x i $-> z)
: foralli, cat_coprod_rec f $o cat_in i $== f i
:= cat_prod_beta I (A:=A^op) (x:=x) f.Definitioncat_coprod_eta {z : A} (f : cat_coprod I x $-> z)
: cat_coprod_rec (funi => f $o cat_in i) $== f
:= cat_prod_eta I (A:=A^op) (x:=x) f.Definitionnatequiv_cat_coprod_rec_inv
: NatEquiv (funz => yon_0gpd z (cat_coprod I x))
(funz : A => prod_0gpd I (funi => yon_0gpd z (x i)))
:= natequiv_cat_prod_corec_inv I (A:=A^op) (x:=x).Definitioncat_coprod_rec_eta {z : A} {fg : foralli, x i $-> z}
: (foralli, f i $== g i) -> cat_coprod_rec f $== cat_coprod_rec g
:= cat_prod_corec_eta I (A:=A^op) (x:=x).Definitioncat_coprod_in_eta {z : A} {fg : cat_coprod I x $-> z}
: (foralli, f $o cat_in i $== g $o cat_in i) -> f $== g
:= cat_prod_pr_eta I (A:=A^op) (x:=x).EndLemmata.(** *** Codiagonal / fold map *)Definitioncat_coprod_codiag {I : Type} {A : Type} (x : A) `{Coproduct I _ (fun_ => x)}
: cat_coprod I (fun_ => x) $-> x
:= cat_prod_diag (A:=A^op) x.(** *** Uniqueness of coproducts *)(** [I]-indexed coproducts are unique no matter how they are constructed. *)Definitioncate_cat_coprod {IJ : Type} (ie : I <~> J) {A : Type} `{HasEquivs A}
(x : I -> A) `{!Coproduct I x} (y : J -> A) `{!Coproduct J y}
(e : forall (i : I), y (ie i) $<~> x i)
: cat_coprod J y $<~> cat_coprod I x
:= cate_cat_prod (A:=A^op) ie x y e.(** *** Existence of coproducts *)ClassHasCoproducts (IA : Type) `{Is1Cat A}
:= has_coproducts :: forallx : I -> A, Coproduct I x.ClassHasAllCoproducts (A : Type) `{Is1Cat A}
:= has_all_coproducts :: forallI : Type, HasCoproducts I A.(** *** Coproduct functor *)Local Instancehasproductsop_hascoproducts {IA : Type} `{HasCoproducts I A}
: HasProducts I A^op
:= funx : I -> A^op => @has_coproducts I A _ _ _ _ _ x.
I: Type H: IsGraph I A: Type IsGraph0: IsGraph A Is2Graph0: Is2Graph A Is01Cat0: Is01Cat A H0: Is1Cat A H1: HasCoproducts I A
Is0Functor (funx : I -> A => cat_coprod I x)
I: Type H: IsGraph I A: Type IsGraph0: IsGraph A Is2Graph0: Is2Graph A Is01Cat0: Is01Cat A H0: Is1Cat A H1: HasCoproducts I A
Is0Functor (funx : I -> A => cat_coprod I x)
I: Type H: IsGraph I A: Type IsGraph0: IsGraph A Is2Graph0: Is2Graph A Is01Cat0: Is01Cat A H0: Is1Cat A H1: HasCoproducts I A
Is0Functor (funx : I -> A => cat_coprod I x)
exact (is0functor_cat_prod I A^op).Defined.
I: Type H: IsGraph I A: Type IsGraph0: IsGraph A Is2Graph0: Is2Graph A Is01Cat0: Is01Cat A H0: Is1Cat A H1: HasCoproducts I A
Is1Functor (funx : I -> A => cat_coprod I x)
I: Type H: IsGraph I A: Type IsGraph0: IsGraph A Is2Graph0: Is2Graph A Is01Cat0: Is01Cat A H0: Is1Cat A H1: HasCoproducts I A
Is1Functor (funx : I -> A => cat_coprod I x)
I: Type H: IsGraph I A: Type IsGraph0: IsGraph A Is2Graph0: Is2Graph A Is01Cat0: Is01Cat A H0: Is1Cat A H1: HasCoproducts I A
Is1Functor (funx : I -> A => cat_coprod I x)
exact (is1functor_cat_prod I A^op).Defined.(** *** Categories with specific kinds of coproducts *)
A: Type z: A IsGraph0: IsGraph A Is2Graph0: Is2Graph A Is01Cat0: Is01Cat A H: Is1Cat A H0: Coproduct Empty (fun_ : Empty => z)
IsInitial (cat_coprod Empty (fun_ : Empty => z))
A: Type z: A IsGraph0: IsGraph A Is2Graph0: Is2Graph A Is01Cat0: Is01Cat A H: Is1Cat A H0: Coproduct Empty (fun_ : Empty => z)
IsInitial (cat_coprod Empty (fun_ : Empty => z))
A: Type z: A IsGraph0: IsGraph A Is2Graph0: Is2Graph A Is01Cat0: Is01Cat A H: Is1Cat A H0: Coproduct Empty (fun_ : Empty => z) a: A
{f : cat_coprod Empty (fun_ : Empty => z) $-> a &
forallg : cat_coprod Empty (fun_ : Empty => z) $-> a,
f $== g}
snrefine (cat_coprod_rec _ _; funf => cat_coprod_in_eta _ _); intros [].Defined.(** *** Binary coproducts *)ClassBinaryCoproduct {A : Type} `{Is1Cat A} (x y : A)
:= prod_co_bincoprod :: BinaryProduct (A:=A^op) x y.Definitioncat_bincoprod' {A : Type} `{Is1Cat A} (x y : A) `{!BinaryCoproduct x y} : A
:= cat_binprod' (x : A^op) y.Definitioncat_inl {A : Type} `{Is1Cat A} {x y : A} `{!BinaryCoproduct x y}
: x $-> cat_bincoprod' x y
:= cat_pr1 (A:=A^op) (x:=x) (y:=y).Definitioncat_inr {A : Type} `{Is1Cat A} {x y : A} `{!BinaryCoproduct x y}
: y $-> cat_bincoprod' x y
:= cat_pr2 (A:=A^op) (x:=x) (y:=y).(** A category with binary coproducts is a category with a binary coproduct for each pair of objects. *)ClassHasBinaryCoproducts (A : Type) `{Is1Cat A}
:= binary_coproducts :: forallxy : A, BinaryCoproduct x y.Instancehasbinarycoproducts_hascoproductsbool {A : Type}
`{HasCoproducts Bool A}
: HasBinaryCoproducts A
:= funxy => has_coproducts (funb : Bool => if b then x else y).(** A convenience wrapper for building binary coproducts *)DefinitionBuild_BinaryCoproduct {A : Type} `{Is1Cat A} {x y : A}
(cat_coprod : A) (cat_inl : x $-> cat_coprod) (cat_inr : y $-> cat_coprod)
(cat_coprod_rec : forallz : A, (x $-> z) -> (y $-> z) -> cat_coprod $-> z)
(cat_coprod_beta_inl : forall (z : A) (f : x $-> z) (g : y $-> z),
cat_coprod_rec z f g $o cat_inl $== f)
(cat_coprod_beta_inr : forall (z : A) (f : x $-> z) (g : y $-> z),
cat_coprod_rec z f g $o cat_inr $== g)
(cat_coprod_in_eta : forall (z : A) (fg : cat_coprod $-> z),
f $o cat_inl $== g $o cat_inl -> f $o cat_inr $== g $o cat_inr -> f $== g)
: BinaryCoproduct x y
:= Build_BinaryProduct
(cat_coprod : A^op)
cat_inl
cat_inr
cat_coprod_rec
cat_coprod_beta_inl
cat_coprod_beta_inr
cat_coprod_in_eta.SectionLemmata.Context {A : Type} {xyz : A} `{BinaryCoproduct _ x y}.Definitioncat_bincoprod_rec (f : x $-> z) (g : y $-> z)
: cat_bincoprod' x y $-> z
:= @cat_binprod_corec A^op _ _ _ _ x y _ _ f g.Definitioncat_bincoprod_beta_inl (f : x $-> z) (g : y $-> z)
: cat_bincoprod_rec f g $o cat_inl $== f
:= @cat_binprod_beta_pr1 A^op _ _ _ _ x y _ _ f g.Definitioncat_bincoprod_beta_inr (f : x $-> z) (g : y $-> z)
: cat_bincoprod_rec f g $o cat_inr $== g
:= @cat_binprod_beta_pr2 A^op _ _ _ _ x y _ _ f g.Definitioncat_bincoprod_eta (f : cat_bincoprod' x y $-> z)
: cat_bincoprod_rec (f $o cat_inl) (f $o cat_inr) $== f
:= @cat_binprod_eta A^op _ _ _ _ x y _ _ f.Definitioncat_bincoprod_eta_in {fg : cat_bincoprod' x y $-> z}
: f $o cat_inl $== g $o cat_inl -> f $o cat_inr $== g $o cat_inr -> f $== g
:= @cat_binprod_eta_pr A^op _ _ _ _ x y _ _ f g.Definitioncat_bincoprod_rec_eta {ff' : x $-> z} {gg' : y $-> z}
: f $== f' -> g $== g' -> cat_bincoprod_rec f g $== cat_bincoprod_rec f' g'
:= @cat_binprod_corec_eta A^op _ _ _ _ x y _ _ f f' g g'.EndLemmata.Definitioncat_bincoprod {A: Type} `{HasBinaryCoproducts A} (x y : A) := cat_bincoprod' x y.(** *** Binary coproduct functor *)(** Hint: Use [Set Printing Implicit] to see the implicit arguments in the following proofs. *)
A: Type IsGraph0: IsGraph A Is2Graph0: Is2Graph A Is01Cat0: Is01Cat A H: Is1Cat A hbc: HasBinaryCoproducts A y: A
Is0Functor (funx : A => cat_bincoprod x y)
A: Type IsGraph0: IsGraph A Is2Graph0: Is2Graph A Is01Cat0: Is01Cat A H: Is1Cat A hbc: HasBinaryCoproducts A y: A
Is0Functor (funx : A => cat_bincoprod x y)
A: Type IsGraph0: IsGraph A Is2Graph0: Is2Graph A Is01Cat0: Is01Cat A H: Is1Cat A hbc: HasBinaryCoproducts A y: A
A: Type IsGraph0: IsGraph A Is2Graph0: Is2Graph A Is01Cat0: Is01Cat A H: Is1Cat A H0: HasEquivs A hbc: HasBinaryCoproducts A x, y, z: A
cat_bincoprod x (cat_bincoprod y z) $<~>
cat_bincoprod (cat_bincoprod x y) z
A: Type IsGraph0: IsGraph A Is2Graph0: Is2Graph A Is01Cat0: Is01Cat A H: Is1Cat A H0: HasEquivs A hbc: HasBinaryCoproducts A x, y, z: A
cat_bincoprod x (cat_bincoprod y z) $<~>
cat_bincoprod (cat_bincoprod x y) z
exact (@associator_cat_binprod A^op _ _ _ _ _ hbc x y z)^-1$.Defined.
A: Type IsGraph0: IsGraph A Is2Graph0: Is2Graph A Is01Cat0: Is01Cat A H: Is1Cat A H0: HasEquivs A HasBinaryCoproducts0: HasBinaryCoproducts A
Associator (funxy : A => cat_bincoprod x y)
A: Type IsGraph0: IsGraph A Is2Graph0: Is2Graph A Is01Cat0: Is01Cat A H: Is1Cat A H0: HasEquivs A HasBinaryCoproducts0: HasBinaryCoproducts A
Associator (funxy : A => cat_bincoprod x y)
A: Type IsGraph0: IsGraph A Is2Graph0: Is2Graph A Is01Cat0: Is01Cat A H: Is1Cat A H0: HasEquivs A HasBinaryCoproducts0: HasBinaryCoproducts A
NatEquiv
(funpat : A * A * A =>
cat_bincoprod (fst (fst pat))
(cat_bincoprod (snd (fst pat)) (snd pat)))
(funpat : A * A * A =>
cat_bincoprod
(cat_bincoprod (fst (fst pat)) (snd (fst pat)))
(snd pat))
A: Type IsGraph0: IsGraph A Is2Graph0: Is2Graph A Is01Cat0: Is01Cat A H: Is1Cat A H0: HasEquivs A HasBinaryCoproducts0: HasBinaryCoproducts A
Is1Bifunctor (funxy : A => cat_bincoprod x y)
A: Type IsGraph0: IsGraph A Is2Graph0: Is2Graph A Is01Cat0: Is01Cat A H: Is1Cat A H0: HasEquivs A HasBinaryCoproducts0: HasBinaryCoproducts A
Associator (funxy : A => cat_bincoprod x y)
A: Type IsGraph0: IsGraph A Is2Graph0: Is2Graph A Is01Cat0: Is01Cat A H: Is1Cat A H0: HasEquivs A HasBinaryCoproducts0: HasBinaryCoproducts A
Associator (funxy : A => cat_bincoprod x y)
exact associator_cat_binprod.Defined.(** *** Codiagonal *)Definitioncat_bincoprod_codiag {A : Type}
`{Is1Cat A} (x : A) `{!BinaryCoproduct x x}
: cat_bincoprod' x x $-> x
:= cat_binprod_diag (A:=A^op) x.(** *** Lemmas about [cat_bincoprod_rec] *)Definitioncat_bincoprod_fmap01_rec {A : Type}
`{Is1Cat A, !HasBinaryCoproducts A} {w x y z : A}
(f : z $-> w) (g : y $-> x) (h : x $-> w)
: cat_bincoprod_rec f h $o fmap01 (funxy => cat_bincoprod x y) z g
$== cat_bincoprod_rec f (h $o g)
:= @cat_binprod_fmap01_corec A^op _ _ _ _
hasbinaryproducts_op_hasbinarycoproducts _ _ _ _ f g h.Definitioncat_bincoprod_fmap10_rec {A : Type}
`{Is1Cat A, !HasBinaryCoproducts A} {w x y z : A}
(f : y $-> x) (g : x $-> w) (h : z $-> w)
: cat_bincoprod_rec g h $o fmap10 (funxy => cat_bincoprod x y) f z
$== cat_bincoprod_rec (g $o f) h
:= @cat_binprod_fmap10_corec A^op _ _ _ _
hasbinaryproducts_op_hasbinarycoproducts _ _ _ _ f g h.Definitioncat_bincoprod_fmap11_rec {A : Type}
`{Is1Cat A, !HasBinaryCoproducts A} {v w x y z : A}
(f : y $-> w) (g : z $-> x) (h : w $-> v) (i : x $-> v)
: cat_bincoprod_rec h i $o fmap11 cat_bincoprod f g
$== cat_bincoprod_rec (h $o f) (i $o g)
:= @cat_binprod_fmap11_corec A^op _ _ _ _
hasbinaryproducts_op_hasbinarycoproducts _ _ _ _ _ f g h i.
A: Type IsGraph0: IsGraph A Is2Graph0: Is2Graph A Is01Cat0: Is01Cat A H: Is1Cat A H0: HasEquivs A hbc: HasBinaryCoproducts A w, x, y, z: A f: w $-> z g: x $-> z h: y $-> z
cat_bincoprod_rec (cat_bincoprod_rec f g) h $o
associator_cat_bincoprod w x y $==
cat_bincoprod_rec f (cat_bincoprod_rec g h)
A: Type IsGraph0: IsGraph A Is2Graph0: Is2Graph A Is01Cat0: Is01Cat A H: Is1Cat A H0: HasEquivs A hbc: HasBinaryCoproducts A w, x, y, z: A f: w $-> z g: x $-> z h: y $-> z
cat_bincoprod_rec (cat_bincoprod_rec f g) h $o
associator_cat_bincoprod w x y $==
cat_bincoprod_rec f (cat_bincoprod_rec g h)
A: Type IsGraph0: IsGraph A Is2Graph0: Is2Graph A Is01Cat0: Is01Cat A H: Is1Cat A H0: HasEquivs A hbc: HasBinaryCoproducts A w, x, y, z: A f: w $-> z g: x $-> z h: y $-> z
cat_bincoprod_rec (cat_bincoprod_rec f g) h $==
cat_bincoprod_rec f (cat_bincoprod_rec g h) $o
MonoidalTwistConstruction.associator_twist' A^op
cat_binprod symmetricbraiding_binprod
cat_binprod_twist
cat_binprod_twist_cat_binprod_twist w x y
A: Type IsGraph0: IsGraph A Is2Graph0: Is2Graph A Is01Cat0: Is01Cat A H: Is1Cat A H0: HasEquivs A hbc: HasBinaryCoproducts A w, x, y, z: A f: w $-> z g: x $-> z h: y $-> z
cat_bincoprod_rec f (cat_bincoprod_rec g h) $o
MonoidalTwistConstruction.associator_twist' A^op
cat_binprod symmetricbraiding_binprod
cat_binprod_twist
cat_binprod_twist_cat_binprod_twist w x y $==
cat_bincoprod_rec (cat_bincoprod_rec f g) h
exact (cat_binprod_associator_corec
(HasBinaryProducts0:=hasbinaryproducts_op_hasbinarycoproducts (hbc:=hbc))
f g h).Defined.Definitioncat_bincoprod_swap_rec {A : Type} `{Is1Cat A}
`{!HasBinaryCoproducts A} {a b c : A} (f : a $-> c) (g : b $-> c)
: cat_bincoprod_rec f g $o cat_bincoprod_swap b a $== cat_bincoprod_rec g f
:= @cat_binprod_swap_corec A^op _ _ _ _
hasbinaryproducts_op_hasbinarycoproducts _ _ _ _ _.(** *** Cocartesian Monoidal Structure *)
A: Type IsGraph0: IsGraph A Is2Graph0: Is2Graph A Is01Cat0: Is01Cat A H: Is1Cat A H0: HasEquivs A HasBinaryCoproducts0: HasBinaryCoproducts A zero: A IsInitial0: IsInitial zero
IsMonoidal A cat_bincoprod zero
A: Type IsGraph0: IsGraph A Is2Graph0: Is2Graph A Is01Cat0: Is01Cat A H: Is1Cat A H0: HasEquivs A HasBinaryCoproducts0: HasBinaryCoproducts A zero: A IsInitial0: IsInitial zero
IsMonoidal A cat_bincoprod zero
A: Type IsGraph0: IsGraph A Is2Graph0: Is2Graph A Is01Cat0: Is01Cat A H: Is1Cat A H0: HasEquivs A HasBinaryCoproducts0: HasBinaryCoproducts A zero: A IsInitial0: IsInitial zero
IsMonoidal A^op cat_bincoprod zero
A: Type IsGraph0: IsGraph A Is2Graph0: Is2Graph A Is01Cat0: Is01Cat A H: Is1Cat A H0: HasEquivs A HasBinaryCoproducts0: HasBinaryCoproducts A zero: A IsInitial0: IsInitial zero
IsTerminal zero
by napply isterminal_op_isinitial.Defined.
A: Type IsGraph0: IsGraph A Is2Graph0: Is2Graph A Is01Cat0: Is01Cat A H: Is1Cat A H0: HasEquivs A HasBinaryCoproducts0: HasBinaryCoproducts A zero: A IsInitial0: IsInitial zero
IsSymmetricMonoidal A cat_bincoprod zero
A: Type IsGraph0: IsGraph A Is2Graph0: Is2Graph A Is01Cat0: Is01Cat A H: Is1Cat A H0: HasEquivs A HasBinaryCoproducts0: HasBinaryCoproducts A zero: A IsInitial0: IsInitial zero
IsSymmetricMonoidal A cat_bincoprod zero
A: Type IsGraph0: IsGraph A Is2Graph0: Is2Graph A Is01Cat0: Is01Cat A H: Is1Cat A H0: HasEquivs A HasBinaryCoproducts0: HasBinaryCoproducts A zero: A IsInitial0: IsInitial zero
IsSymmetricMonoidal A^op cat_bincoprod zero
A: Type IsGraph0: IsGraph A Is2Graph0: Is2Graph A Is01Cat0: Is01Cat A H: Is1Cat A H0: HasEquivs A HasBinaryCoproducts0: HasBinaryCoproducts A zero: A IsInitial0: IsInitial zero
IsTerminal zero
by napply isterminal_op_isinitial.Defined.(** *** Coproducts in Type *)(** [Type] has all coproducts. *)
HasAllCoproducts Type
HasAllCoproducts Type
I: Type x: I -> Type
Coproduct I x
I: Type x: I -> Type
Type
I: Type x: I -> Type
foralli : I, x i $-> ?cat_coprod
I: Type x: I -> Type
forallz : Type,
(foralli : I, x i $-> z) -> ?cat_coprod $-> z
I: Type x: I -> Type
forall (z : Type) (f : foralli : I, x i $-> z)
(i : I), ?cat_coprod_rec z f $o ?cat_in i $== f i
I: Type x: I -> Type
forall (z : Type) (fg : ?cat_coprod $-> z),
(foralli : I, f $o ?cat_in i $== g $o ?cat_in i) ->
f $== g
I: Type x: I -> Type
Type
exact (sig (funi : I => x i)).
I: Type x: I -> Type
foralli : I, x i $-> {i0 : I & x i0}
exact (exist x).
I: Type x: I -> Type
forallz : Type,
(foralli : I, x i $-> z) -> {i : I & x i} $-> z
I: Type x: I -> Type A: Type f: foralli : I, x i $-> A i: I xi: x i
A
exact (f i xi).
I: Type x: I -> Type
forall (z : Type) (f : foralli : I, x i $-> z)
(i : I),
(fun (A : Type) (f0 : foralli0 : I, x i0 $-> A) =>
(funX : {i0 : I & x i0} =>
(fun (i0 : I) (xi : x i0) => f0 i0 xi) X.1 X.2)
:
{i0 : I & x i0} $-> A) z f $o exist x i $== f i
intros A f i xi; reflexivity.
I: Type x: I -> Type
forall (z : Type) (fg : {i : I & x i} $-> z),
(foralli : I, f $o exist x i $== g $o exist x i) ->
f $== g
I: Type x: I -> Type A: Type f, g: {i : I & x i} $-> A p: foralli : I, f $o exist x i $== g $o exist x i i: I xi: x i
f (i; xi) = g (i; xi)
exact (p i xi).Defined.(** In particular, [Type] has all binary coproducts. *)Instancehasbinarycoproducts_type : HasBinaryCoproducts Type
:= {}.(** ** Canonical coproduct-product map *)(** There is a canonical map from a coproduct to a product when the indexing set has decidable equality and the category is pointed. *)
I: Type H: DecidablePaths I A: Type IsGraph0: IsGraph A Is2Graph0: Is2Graph A Is01Cat0: Is01Cat A H0: Is1Cat A IsPointedCat0: IsPointedCat A x: I -> A Coproduct0: Coproduct I x Product0: Product I x
cat_coprod I x $-> cat_prod I x
I: Type H: DecidablePaths I A: Type IsGraph0: IsGraph A Is2Graph0: Is2Graph A Is01Cat0: Is01Cat A H0: Is1Cat A IsPointedCat0: IsPointedCat A x: I -> A Coproduct0: Coproduct I x Product0: Product I x
cat_coprod I x $-> cat_prod I x
I: Type H: DecidablePaths I A: Type IsGraph0: IsGraph A Is2Graph0: Is2Graph A Is01Cat0: Is01Cat A H0: Is1Cat A IsPointedCat0: IsPointedCat A x: I -> A Coproduct0: Coproduct I x Product0: Product I x
foralli : I, x i $-> cat_prod I x
I: Type H: DecidablePaths I A: Type IsGraph0: IsGraph A Is2Graph0: Is2Graph A Is01Cat0: Is01Cat A H0: Is1Cat A IsPointedCat0: IsPointedCat A x: I -> A Coproduct0: Coproduct I x Product0: Product I x i: I
x i $-> cat_prod I x
I: Type H: DecidablePaths I A: Type IsGraph0: IsGraph A Is2Graph0: Is2Graph A Is01Cat0: Is01Cat A H0: Is1Cat A IsPointedCat0: IsPointedCat A x: I -> A Coproduct0: Coproduct I x Product0: Product I x i: I
foralli0 : I, x i $-> x i0
I: Type H: DecidablePaths I A: Type IsGraph0: IsGraph A Is2Graph0: Is2Graph A Is01Cat0: Is01Cat A H0: Is1Cat A IsPointedCat0: IsPointedCat A x: I -> A Coproduct0: Coproduct I x Product0: Product I x i, a: I
x i $-> x a
I: Type H: DecidablePaths I A: Type IsGraph0: IsGraph A Is2Graph0: Is2Graph A Is01Cat0: Is01Cat A H0: Is1Cat A IsPointedCat0: IsPointedCat A x: I -> A Coproduct0: Coproduct I x Product0: Product I x i, a: I p: i = a
x i $-> x a
I: Type H: DecidablePaths I A: Type IsGraph0: IsGraph A Is2Graph0: Is2Graph A Is01Cat0: Is01Cat A H0: Is1Cat A IsPointedCat0: IsPointedCat A x: I -> A Coproduct0: Coproduct I x Product0: Product I x i, a: I n: i <> a
x i $-> x a
I: Type H: DecidablePaths I A: Type IsGraph0: IsGraph A Is2Graph0: Is2Graph A Is01Cat0: Is01Cat A H0: Is1Cat A IsPointedCat0: IsPointedCat A x: I -> A Coproduct0: Coproduct I x Product0: Product I x i, a: I p: i = a
x i $-> x a
I: Type H: DecidablePaths I A: Type IsGraph0: IsGraph A Is2Graph0: Is2Graph A Is01Cat0: Is01Cat A H0: Is1Cat A IsPointedCat0: IsPointedCat A x: I -> A Coproduct0: Coproduct I x Product0: Product I x i: I
x i $-> x i
exact (Id _).
I: Type H: DecidablePaths I A: Type IsGraph0: IsGraph A Is2Graph0: Is2Graph A Is01Cat0: Is01Cat A H0: Is1Cat A IsPointedCat0: IsPointedCat A x: I -> A Coproduct0: Coproduct I x Product0: Product I x i, a: I n: i <> a
x i $-> x a
exact zero_morphism.Defined.
A: Type IsGraph0: IsGraph A Is2Graph0: Is2Graph A Is01Cat0: Is01Cat A H: Is1Cat A IsPointedCat0: IsPointedCat A x, y: A BinaryCoproduct0: BinaryCoproduct x y BinaryProduct0: BinaryProduct x y
cat_bincoprod' x y $-> cat_binprod' x y
A: Type IsGraph0: IsGraph A Is2Graph0: Is2Graph A Is01Cat0: Is01Cat A H: Is1Cat A IsPointedCat0: IsPointedCat A x, y: A BinaryCoproduct0: BinaryCoproduct x y BinaryProduct0: BinaryProduct x y
cat_bincoprod' x y $-> cat_binprod' x y
napply cat_coprod_prod; exact _.Defined.(** *** Coproducts in the opposite category *)Definitioncoproduct_op {IA : Type} (x : I -> A)
`{Is1Cat A} {H' : Product I x}
: Coproduct I (A:=A^op) x
:= H'.Hint Immediate coproduct_op : typeclass_instances.