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]
[Loading ML file tauto_plugin.cmxs (using legacy method) ... done]
[Loading ML file cc_plugin.cmxs (using legacy method) ... done]
[Loading ML file firstorder_plugin.cmxs (using legacy method) ... done]
Import CMorphisms.ProperNotations.Require Import Basics.Overture Basics.Tactics.Require Import WildCat.Core WildCat.FunctorCat WildCat.ZeroGroupoid WildCat.Yoneda WildCat.UnitCat WildCat.Equiv WildCat.Products WildCat.Prod WildCat.Bifunctor WildCat.Monoidal.(** See Groups/Group.v and AbGroups/AbelianGroup.v for additional things that it might be useful to export in the future. *)Require Export Classes.interfaces.canonical_names (SgOp, sg_op,
MonUnit, mon_unit, Inverse, inv).Export canonical_names.BinOpNotations.LocalOpen Scope mc_add_scope.(** * Wild categories enriched in abelian groups *)(** ** 0-groupoid abelian groups *)(** Hom sets in wild categories are 0-groupoids, and we'd like to put an abelian group structure on these hom sets that satisfies the axioms up to 1-cells, to avoid needing function extensionality. So we define the abstract idea of a 0-groupoid with an abelian group structure. Because we use 1-cells, not paths, we can't reuse any of the work done in Algebra/Groups or Algebra/AbGroups. Note that our definition has redundant fields, which could be filled in using a "smart constructor": [is0functor_inverse_0gpd], [mon_unit_r_0gpd], [inverse_r_0gpd] and the fact that [sgop_0gpd] is a 0-functor in the second variable. *)ClassIsAbGroup_0gpd (A : Type) `{Is0Gpd A} := {
(* Data: *)
sgop_0gpd :: SgOp A;
mon_unit_0gpd :: MonUnit A;
inverse_0gpd :: Inverse A;
(* 0-functoriality: *)
is0bifunctor_sgop_0gpd :: Is0Bifunctor sgop_0gpd;
is0functor_inverse_0gpd :: Is0Functor inverse_0gpd;
(* Axioms: *)
assoc_0gpd : forallabc, (a + b) + c $== a + (b + c);
mon_unit_l_0gpd : foralla, 0 + a $== a;
mon_unit_r_0gpd : foralla, a + 0 $== a;
inverse_l_0gpd : foralla, (-a) + a $== 0;
inverse_r_0gpd : foralla, a - a $== 0;
comm_0gpd : forallab, a + b $== b + a;
}.(** ** Setoid rewriting *)(** [forall x y : A, x $== y -> forall x' y' : A, x' $== y' -> x + x' $== y + y']. *)InstanceIsProper_sgop_0gpd (A : Type) `{IsAbGroup_0gpd A}
: CMorphisms.Proper (GpdHom ==> GpdHom ==> GpdHom) (sg_op (A:=A))
:= @fmap11 _ _ _ _ _ _ sg_op _.(** [forall a x y : A, x $== y -> a + x $== a + y]. This is needed to rewrite on the RHS of a sum. LHS is handled by the two-argument version, but this isn't. *)InstanceIsProper_sgop_0gpd1 (A : Type) `{IsAbGroup_0gpd A} {a : A}
: CMorphisms.Proper (GpdHom ==> GpdHom) (sg_op (A:=A) a)
:= @fmap01 _ _ _ _ _ _ sg_op _ a.InstanceIsProper_inverse_0gpd (A : Type) `{IsAbGroup_0gpd A}
: CMorphisms.Proper (GpdHom ==> GpdHom) (inv (A:=A))
:= @fmap _ _ _ _ inv _.(** ** A few lemmas about 0-groupoid abelian groups *)(** We will try to parallel the naming in Group.v, when applicable. *)SectionLemmas.Context {A : Type} `{IsAbGroup_0gpd A}.Context (xy : A).Definitioninv_V_gg_0gpd : (-x) + (x + y) $== y
:= (assoc_0gpd _ _ _)^$ $@ fmap10 sg_op (inverse_l_0gpd x) y $@ mon_unit_l_0gpd _.Definitioninv_g_Vg_0gpd : x + (-x + y) $== y
:= (assoc_0gpd _ _ _)^$ $@ fmap10 sg_op (inverse_r_0gpd x) y $@ mon_unit_l_0gpd _.Definitioninv_gg_V_0gpd : (x + y) - y $== x
:= assoc_0gpd _ _ _ $@ fmap01 sg_op x (inverse_r_0gpd y) $@ mon_unit_r_0gpd _.Definitioninv_gV_g_0gpd : (x - y) + y $== x
:= assoc_0gpd _ _ _ $@ fmap01 sg_op x (inverse_l_0gpd y) $@ mon_unit_r_0gpd _.
A: Type H: IsGraph A H0: Is01Cat A H1: Is0Gpd A H2: IsAbGroup_0gpd A x, y: A
- - x $== x
A: Type H: IsGraph A H0: Is01Cat A H1: Is0Gpd A H2: IsAbGroup_0gpd A x, y: A
- - x $== x
A: Type H: IsGraph A H0: Is01Cat A H1: Is0Gpd A H2: IsAbGroup_0gpd A x, y: A
- - x $== 0 + x
A: Type H: IsGraph A H0: Is01Cat A H1: Is0Gpd A H2: IsAbGroup_0gpd A x, y: A
- - x $== - - x - x + x
A: Type H: IsGraph A H0: Is01Cat A H1: Is0Gpd A H2: IsAbGroup_0gpd A x, y: A
- - x $== - - x + (- x + x)
A: Type H: IsGraph A H0: Is01Cat A H1: Is0Gpd A H2: IsAbGroup_0gpd A x, y: A
- - x $== - - x + 0
symmetry; apply mon_unit_r_0gpd.Defined.EndLemmas.(** ** We express the operations as maps of 0-groupoids *)Definitionzerogpd_0gpd (A : Type) `{IsAbGroup_0gpd A} : ZeroGpd
:= Build_ZeroGpd _ _ _ _.Definitionleft_op_0gpd {A : Type} `{IsAbGroup_0gpd A} (a : A)
: zerogpd_0gpd A $-> zerogpd_0gpd A
:= Build_Fun01' (funb : A => a + b) (fun__ => fmap01 sg_op a).Definitionright_op_0gpd {A : Type} `{IsAbGroup_0gpd A} (a : A)
: zerogpd_0gpd A $-> zerogpd_0gpd A
:= Build_Fun01' (funb : A => b + a) (funbb'p => fmap10 sg_op p a).Definitioninv_0gpd {A : Type} `{IsAbGroup_0gpd A}
: zerogpd_0gpd A $-> zerogpd_0gpd A
:= Build_Fun01 inverse_0gpd.(** ** The operations are equivalences *)(** Addition on the left is biinvertible. *)
A: Type H: IsGraph A H0: Is01Cat A H1: Is0Gpd A H2: IsAbGroup_0gpd A a: A
Cat_IsBiInv (left_op_0gpd a)
A: Type H: IsGraph A H0: Is01Cat A H1: Is0Gpd A H2: IsAbGroup_0gpd A a: A
Cat_IsBiInv (left_op_0gpd a)
A: Type H: IsGraph A H0: Is01Cat A H1: Is0Gpd A H2: IsAbGroup_0gpd A a: A
zerogpd_0gpd A $-> zerogpd_0gpd A
A: Type H: IsGraph A H0: Is01Cat A H1: Is0Gpd A H2: IsAbGroup_0gpd A a: A
left_op_0gpd a $o ?cat_equiv_inv $==
Id (zerogpd_0gpd A)
A: Type H: IsGraph A H0: Is01Cat A H1: Is0Gpd A H2: IsAbGroup_0gpd A a: A
zerogpd_0gpd A $-> zerogpd_0gpd A
A: Type H: IsGraph A H0: Is01Cat A H1: Is0Gpd A H2: IsAbGroup_0gpd A a: A
?cat_equiv_inv' $o left_op_0gpd a $==
Id (zerogpd_0gpd A)
A: Type H: IsGraph A H0: Is01Cat A H1: Is0Gpd A H2: IsAbGroup_0gpd A a: A
left_op_0gpd a $o left_op_0gpd (- a) $==
Id (zerogpd_0gpd A)
A: Type H: IsGraph A H0: Is01Cat A H1: Is0Gpd A H2: IsAbGroup_0gpd A a: A
left_op_0gpd (- a) $o left_op_0gpd a $==
Id (zerogpd_0gpd A)
A: Type H: IsGraph A H0: Is01Cat A H1: Is0Gpd A H2: IsAbGroup_0gpd A a: A b: Graph.graph_carrier
(zerogpd_graph (zerogpd_0gpd A))
a + (- a + b) $-> b
A: Type H: IsGraph A H0: Is01Cat A H1: Is0Gpd A H2: IsAbGroup_0gpd A a: A b: Graph.graph_carrier
(zerogpd_graph (zerogpd_0gpd A))
- a + (a + b) $-> b
A: Type H: IsGraph A H0: Is01Cat A H1: Is0Gpd A H2: IsAbGroup_0gpd A a: A b: Graph.graph_carrier
(zerogpd_graph (zerogpd_0gpd A))
a + (- a + b) $-> b
apply inv_g_Vg_0gpd.
A: Type H: IsGraph A H0: Is01Cat A H1: Is0Gpd A H2: IsAbGroup_0gpd A a: A b: Graph.graph_carrier
(zerogpd_graph (zerogpd_0gpd A))
- a + (a + b) $-> b
apply inv_V_gg_0gpd.Defined.Definitionleft_op_0gpd' {A : Type} `{IsAbGroup_0gpd A} (a : A)
:= Build_Cat_BiInv _ _ _ _ _ _ _ (left_op_0gpd a) _.(** Addition on the right is biinvertible. *)
A: Type H: IsGraph A H0: Is01Cat A H1: Is0Gpd A H2: IsAbGroup_0gpd A a: A
Cat_IsBiInv (right_op_0gpd a)
A: Type H: IsGraph A H0: Is01Cat A H1: Is0Gpd A H2: IsAbGroup_0gpd A a: A
Cat_IsBiInv (right_op_0gpd a)
A: Type H: IsGraph A H0: Is01Cat A H1: Is0Gpd A H2: IsAbGroup_0gpd A a: A
zerogpd_0gpd A $-> zerogpd_0gpd A
A: Type H: IsGraph A H0: Is01Cat A H1: Is0Gpd A H2: IsAbGroup_0gpd A a: A
right_op_0gpd a $o ?cat_equiv_inv $==
Id (zerogpd_0gpd A)
A: Type H: IsGraph A H0: Is01Cat A H1: Is0Gpd A H2: IsAbGroup_0gpd A a: A
zerogpd_0gpd A $-> zerogpd_0gpd A
A: Type H: IsGraph A H0: Is01Cat A H1: Is0Gpd A H2: IsAbGroup_0gpd A a: A
?cat_equiv_inv' $o right_op_0gpd a $==
Id (zerogpd_0gpd A)
A: Type H: IsGraph A H0: Is01Cat A H1: Is0Gpd A H2: IsAbGroup_0gpd A a: A
right_op_0gpd a $o right_op_0gpd (- a) $==
Id (zerogpd_0gpd A)
A: Type H: IsGraph A H0: Is01Cat A H1: Is0Gpd A H2: IsAbGroup_0gpd A a: A
right_op_0gpd (- a) $o right_op_0gpd a $==
Id (zerogpd_0gpd A)
A: Type H: IsGraph A H0: Is01Cat A H1: Is0Gpd A H2: IsAbGroup_0gpd A a: A b: Graph.graph_carrier
(zerogpd_graph (zerogpd_0gpd A))
b - a + a $-> b
A: Type H: IsGraph A H0: Is01Cat A H1: Is0Gpd A H2: IsAbGroup_0gpd A a: A b: Graph.graph_carrier
(zerogpd_graph (zerogpd_0gpd A))
b + a - a $-> b
A: Type H: IsGraph A H0: Is01Cat A H1: Is0Gpd A H2: IsAbGroup_0gpd A a: A b: Graph.graph_carrier
(zerogpd_graph (zerogpd_0gpd A))
b - a + a $-> b
apply inv_gV_g_0gpd.
A: Type H: IsGraph A H0: Is01Cat A H1: Is0Gpd A H2: IsAbGroup_0gpd A a: A b: Graph.graph_carrier
(zerogpd_graph (zerogpd_0gpd A))
b + a - a $-> b
apply inv_gg_V_0gpd.Defined.Definitionright_op_0gpd' {A : Type} `{IsAbGroup_0gpd A} (a : A)
:= Build_Cat_BiInv _ _ _ _ _ _ _ (right_op_0gpd a) _.(** Inversion is biinvertible. *)
A: Type H: IsGraph A H0: Is01Cat A H1: Is0Gpd A H2: IsAbGroup_0gpd A
Cat_IsBiInv inv_0gpd
A: Type H: IsGraph A H0: Is01Cat A H1: Is0Gpd A H2: IsAbGroup_0gpd A
Cat_IsBiInv inv_0gpd
A: Type H: IsGraph A H0: Is01Cat A H1: Is0Gpd A H2: IsAbGroup_0gpd A
zerogpd_0gpd A $-> zerogpd_0gpd A
A: Type H: IsGraph A H0: Is01Cat A H1: Is0Gpd A H2: IsAbGroup_0gpd A
inv_0gpd $o ?cat_equiv_inv $== Id (zerogpd_0gpd A)
A: Type H: IsGraph A H0: Is01Cat A H1: Is0Gpd A H2: IsAbGroup_0gpd A
zerogpd_0gpd A $-> zerogpd_0gpd A
A: Type H: IsGraph A H0: Is01Cat A H1: Is0Gpd A H2: IsAbGroup_0gpd A
?cat_equiv_inv' $o inv_0gpd $== Id (zerogpd_0gpd A)
A: Type H: IsGraph A H0: Is01Cat A H1: Is0Gpd A H2: IsAbGroup_0gpd A
inv_0gpd $o inv_0gpd $== Id (zerogpd_0gpd A)
A: Type H: IsGraph A H0: Is01Cat A H1: Is0Gpd A H2: IsAbGroup_0gpd A
inv_0gpd $o inv_0gpd $== Id (zerogpd_0gpd A)
A: Type H: IsGraph A H0: Is01Cat A H1: Is0Gpd A H2: IsAbGroup_0gpd A b: Graph.graph_carrier
(zerogpd_graph (zerogpd_0gpd A))
inverse_0gpd (inverse_0gpd b) $-> b
A: Type H: IsGraph A H0: Is01Cat A H1: Is0Gpd A H2: IsAbGroup_0gpd A b: Graph.graph_carrier
(zerogpd_graph (zerogpd_0gpd A))
inverse_0gpd (inverse_0gpd b) $-> b
all: apply inv_inv_0gpd.Defined.Definitioninv_0gpd' {A : Type} `{IsAbGroup_0gpd A}
:= Build_Cat_BiInv _ _ _ _ _ _ _ (inv_0gpd (A:=A)) _.(** ** General properties of a 0-groupoid abelian group *)(** None of these use commutativity. *)SectionGroupProperties.Context {A : Type} `{IsAbGroup_0gpd A}.DefinitioncancelL_0gpd (abc : A) (p : a + b $== a + c)
: b $== c
:= isinj_equiv_0gpd (left_op_0gpd' a) p.DefinitioncancelR_0gpd (abc : A) (p : b + a $== c + a)
: b $== c
:= isinj_equiv_0gpd (right_op_0gpd' a) p.Definitioninv_unit_0gpd : -0 $== 0
:= (mon_unit_l_0gpd (-0))^$ $@ inverse_r_0gpd 0.DefinitionmoveL_gM_0gpd {abc : A} (p : a - c $== b)
: a $== b + c
:= moveL_equiv_M_0gpd (right_op_0gpd' c) p.DefinitionmoveL_Mg_0gpd {abc : A} (p : - b + a $== c)
: a $== b + c
:= moveL_equiv_M_0gpd (left_op_0gpd' b) p.DefinitionmoveR_gM_0gpd {abc : A} (p : a $== c - b)
: a + b $== c
:= moveR_equiv_M_0gpd (right_op_0gpd' b) p.DefinitionmoveR_Mg_0gpd {abc : A} (p : b $== - a + c)
: a + b $== c
:= moveR_equiv_M_0gpd (left_op_0gpd' a) p.(** The next four are the inverses of the previous four. *)DefinitionmoveR_gV_0gpd {abc : A} (p : a $== c + b)
: a - b $== c
:= moveR_equiv_V_0gpd (right_op_0gpd' b) p.DefinitionmoveR_Vg_0gpd {abc : A} (p : b $== a + c)
: -a + b $== c
:= moveR_equiv_V_0gpd (left_op_0gpd' a) p.DefinitionmoveL_gV_0gpd {abc : A} (p : a + c $== b)
: a $== b - c
:= moveL_equiv_V_0gpd (right_op_0gpd' c) p.DefinitionmoveL_Vg_0gpd {abc : A} (p : b + a $== c)
: a $== -b + c
:= moveL_equiv_V_0gpd (left_op_0gpd' b) p.(** Versions of the above involving the unit. *)DefinitionmoveL_0M_0gpd {ab : A} (p : a - b $== 0) : a $== b
:= moveL_gM_0gpd p $@ mon_unit_l_0gpd _.DefinitionmoveL_M0_0gpd {ab : A} (p : -b + a $== 0) : a $== b
:= moveL_Mg_0gpd p $@ mon_unit_r_0gpd _.DefinitionmoveL_0V_0gpd {ab : A} (p : a + b $== 0) : a $== -b
:= moveL_gV_0gpd p $@ mon_unit_l_0gpd _.DefinitionmoveL_V0_0gpd {ab : A} (p : b + a $== 0) : a $== -b
:= moveL_Vg_0gpd p $@ mon_unit_r_0gpd _.DefinitionmoveR_0M_0gpd {ab : A} (p : 0 $== b - a) : a $== b
:= (mon_unit_l_0gpd _)^$ $@ moveR_gM_0gpd p.DefinitionmoveR_M0_0gpd {ab : A} (p : 0 $== -a + b) : a $== b
:= (mon_unit_r_0gpd _)^$ $@ moveR_Mg_0gpd p.DefinitionmoveR_0V_0gpd {ab : A} (p : 0 $== b + a) : -a $== b
:= (mon_unit_l_0gpd _)^$ $@ moveR_gV_0gpd p.DefinitionmoveR_V0_0gpd {ab : A} (p : 0 $== a + b) : -a $== b
:= (mon_unit_r_0gpd _)^$ $@ moveR_Vg_0gpd p.(** Equal things have zero difference. *)
A: Type H: IsGraph A H0: Is01Cat A H1: Is0Gpd A H2: IsAbGroup_0gpd A a, b: A p: a $== b
a - b $== 0
A: Type H: IsGraph A H0: Is01Cat A H1: Is0Gpd A H2: IsAbGroup_0gpd A a, b: A p: a $== b
a - b $== 0
rewrite p; apply inverse_r_0gpd.Defined.
A: Type H: IsGraph A H0: Is01Cat A H1: Is0Gpd A H2: IsAbGroup_0gpd A a, b: A p: a $== b
- a + b $== 0
A: Type H: IsGraph A H0: Is01Cat A H1: Is0Gpd A H2: IsAbGroup_0gpd A a, b: A p: a $== b
- a + b $== 0
rewrite p; apply inverse_l_0gpd.Defined.(** Adding the inverse of the unit. *)
A: Type H: IsGraph A H0: Is01Cat A H1: Is0Gpd A H2: IsAbGroup_0gpd A a: A
a - 0 $== a
A: Type H: IsGraph A H0: Is01Cat A H1: Is0Gpd A H2: IsAbGroup_0gpd A a: A
a - 0 $== a
A: Type H: IsGraph A H0: Is01Cat A H1: Is0Gpd A H2: IsAbGroup_0gpd A a: A
a $== a + 0
symmetry; apply mon_unit_r_0gpd.Defined.
A: Type H: IsGraph A H0: Is01Cat A H1: Is0Gpd A H2: IsAbGroup_0gpd A a: A
- 0 + a $== a
A: Type H: IsGraph A H0: Is01Cat A H1: Is0Gpd A H2: IsAbGroup_0gpd A a: A
- 0 + a $== a
A: Type H: IsGraph A H0: Is01Cat A H1: Is0Gpd A H2: IsAbGroup_0gpd A a: A
a $== 0 + a
symmetry; apply mon_unit_l_0gpd.Defined.EndGroupProperties.(** ** Homomorphisms between 0-groupoid abelian groups *)SectionHomomorphism.Context {AB : Type} `{IsAbGroup_0gpd A} `{IsAbGroup_0gpd B}.(** A homomorphism is a 0-functor that respects the operation up to 1-cells. *)ClassIsGroupHom_0gpd (f : A -> B) `{!Is0Functor f} :=
grp_homo_op_0gpd : forall (aa' : A), f (a + a') $== f a + f a'.(** It follows that it respects the unit and inversion. *)
A, B: Type H: IsGraph A H0: Is01Cat A H1: Is0Gpd A H2: IsAbGroup_0gpd A H3: IsGraph B H4: Is01Cat B H5: Is0Gpd B H6: IsAbGroup_0gpd B f: A -> B Is0Functor0: Is0Functor f H7: IsGroupHom_0gpd f
f 0 $== 0
A, B: Type H: IsGraph A H0: Is01Cat A H1: Is0Gpd A H2: IsAbGroup_0gpd A H3: IsGraph B H4: Is01Cat B H5: Is0Gpd B H6: IsAbGroup_0gpd B f: A -> B Is0Functor0: Is0Functor f H7: IsGroupHom_0gpd f
f 0 $== 0
A, B: Type H: IsGraph A H0: Is01Cat A H1: Is0Gpd A H2: IsAbGroup_0gpd A H3: IsGraph B H4: Is01Cat B H5: Is0Gpd B H6: IsAbGroup_0gpd B f: A -> B Is0Functor0: Is0Functor f H7: IsGroupHom_0gpd f
f 0 + f 0 $== f 0 + 0
A, B: Type H: IsGraph A H0: Is01Cat A H1: Is0Gpd A H2: IsAbGroup_0gpd A H3: IsGraph B H4: Is01Cat B H5: Is0Gpd B H6: IsAbGroup_0gpd B f: A -> B Is0Functor0: Is0Functor f H7: IsGroupHom_0gpd f
f 0 + f 0 $== f 0
A, B: Type H: IsGraph A H0: Is01Cat A H1: Is0Gpd A H2: IsAbGroup_0gpd A H3: IsGraph B H4: Is01Cat B H5: Is0Gpd B H6: IsAbGroup_0gpd B f: A -> B Is0Functor0: Is0Functor f H7: IsGroupHom_0gpd f
f 0 + f 0 $== f (0 + 0)
A, B: Type H: IsGraph A H0: Is01Cat A H1: Is0Gpd A H2: IsAbGroup_0gpd A H3: IsGraph B H4: Is01Cat B H5: Is0Gpd B H6: IsAbGroup_0gpd B f: A -> B Is0Functor0: Is0Functor f H7: IsGroupHom_0gpd f
f (0 + 0) $== f 0 + f 0
apply grp_homo_op_0gpd.Defined.
A, B: Type H: IsGraph A H0: Is01Cat A H1: Is0Gpd A H2: IsAbGroup_0gpd A H3: IsGraph B H4: Is01Cat B H5: Is0Gpd B H6: IsAbGroup_0gpd B f: A -> B Is0Functor0: Is0Functor f H7: IsGroupHom_0gpd f a: A
f (- a) $== - f a
A, B: Type H: IsGraph A H0: Is01Cat A H1: Is0Gpd A H2: IsAbGroup_0gpd A H3: IsGraph B H4: Is01Cat B H5: Is0Gpd B H6: IsAbGroup_0gpd B f: A -> B Is0Functor0: Is0Functor f H7: IsGroupHom_0gpd f a: A
f (- a) $== - f a
A, B: Type H: IsGraph A H0: Is01Cat A H1: Is0Gpd A H2: IsAbGroup_0gpd A H3: IsGraph B H4: Is01Cat B H5: Is0Gpd B H6: IsAbGroup_0gpd B f: A -> B Is0Functor0: Is0Functor f H7: IsGroupHom_0gpd f a: A
f a + f (- a) $== f a - f a
A, B: Type H: IsGraph A H0: Is01Cat A H1: Is0Gpd A H2: IsAbGroup_0gpd A H3: IsGraph B H4: Is01Cat B H5: Is0Gpd B H6: IsAbGroup_0gpd B f: A -> B Is0Functor0: Is0Functor f H7: IsGroupHom_0gpd f a: A
f (a - a) $== f a - f a
A, B: Type H: IsGraph A H0: Is01Cat A H1: Is0Gpd A H2: IsAbGroup_0gpd A H3: IsGraph B H4: Is01Cat B H5: Is0Gpd B H6: IsAbGroup_0gpd B f: A -> B Is0Functor0: Is0Functor f H7: IsGroupHom_0gpd f a: A
f 0 $== f a - f a
A, B: Type H: IsGraph A H0: Is01Cat A H1: Is0Gpd A H2: IsAbGroup_0gpd A H3: IsGraph B H4: Is01Cat B H5: Is0Gpd B H6: IsAbGroup_0gpd B f: A -> B Is0Functor0: Is0Functor f H7: IsGroupHom_0gpd f a: A
f 0 $== 0
rapply grp_homo_unit_0gpd.Defined.
A, B: Type H: IsGraph A H0: Is01Cat A H1: Is0Gpd A H2: IsAbGroup_0gpd A H3: IsGraph B H4: Is01Cat B H5: Is0Gpd B H6: IsAbGroup_0gpd B f: A -> B Is0Functor0: Is0Functor f H7: IsGroupHom_0gpd f a, b: A
f (a - b) $== f a - f b
A, B: Type H: IsGraph A H0: Is01Cat A H1: Is0Gpd A H2: IsAbGroup_0gpd A H3: IsGraph B H4: Is01Cat B H5: Is0Gpd B H6: IsAbGroup_0gpd B f: A -> B Is0Functor0: Is0Functor f H7: IsGroupHom_0gpd f a, b: A
f (a - b) $== f a - f b
A, B: Type H: IsGraph A H0: Is01Cat A H1: Is0Gpd A H2: IsAbGroup_0gpd A H3: IsGraph B H4: Is01Cat B H5: Is0Gpd B H6: IsAbGroup_0gpd B f: A -> B Is0Functor0: Is0Functor f H7: IsGroupHom_0gpd f a, b: A
f a + f (- b) $== f a - f b
A, B: Type H: IsGraph A H0: Is01Cat A H1: Is0Gpd A H2: IsAbGroup_0gpd A H3: IsGraph B H4: Is01Cat B H5: Is0Gpd B H6: IsAbGroup_0gpd B f: A -> B Is0Functor0: Is0Functor f H7: IsGroupHom_0gpd f a, b: A
f (- b) $-> - f b
rapply grp_homo_inv_0gpd.Defined.EndHomomorphism.(** ** Definition of a wild category enriched in abelian groups *)(** It is a 1-category with 0-groupoid abelian group structures on its hom types, such that pre- and post-composition are homomorphisms. *)ClassIsAbEnriched (A : Type) `{Is1Cat A} := {
abgroup_abenriched :: forall (ab : A), IsAbGroup_0gpd (a $-> b);
issgpreserving_postcomp_abenriched
:: forall (abc : A) (g : b $-> c), IsGroupHom_0gpd (cat_postcomp a g) ;
issgpreserving_precomp_abenriched
:: forall (abc : A) (f : a $-> b), IsGroupHom_0gpd (cat_precomp c f) ;
}.(** ** Results involving pre- and post-composition *)(** All of these except [precomp_zero] may not be needed, since Rocq is usually able to infer which homomorphism is involved, but we include them for completeness. *)SectionAbEnriched.Context {A : Type} `{IsAbEnriched A}.Definitionpostcomp_op {BCD : A} (f : C $-> D) (gh : B $-> C)
: f $o (g + h) $== (f $o g) + (f $o h)
:= grp_homo_op_0gpd g h.Definitionprecomp_op {BCD : A} (f : B $-> C) (gh : C $-> D)
: (g + h) $o f $== (g $o f) + (h $o f)
:= grp_homo_op_0gpd g h.Definitionpostcomp_zero {BCD : A} (f : C $-> D)
: f $o 0 $== (0 : B $-> D)
:= grp_homo_unit_0gpd _.Definitionprecomp_zero {BCD : A} (f : B $-> C)
: 0 $o f $== (0 : B $-> D)
:= grp_homo_unit_0gpd (cat_precomp _ _).Definitionpostcomp_inv {BCD : A} (f : C $-> D) (g : B $-> C)
: f $o (-g) $== -(f $o g)
:= grp_homo_inv_0gpd _ g.Definitionprecomp_inv {BCD : A} (f : C $-> D) (g : B $-> C)
: (-f) $o g $== -(f $o g)
:= grp_homo_inv_0gpd _ f.Definitionpostcomp_op_inv {BCD : A} (f : C $-> D) (gh : B $-> C)
: f $o (g - h) $== (f $o g) - (f $o h)
:= grp_homo_op_inv_0gpd _ _ _.Definitionprecomp_op_inv {BCD : A} (f : B $-> C) (gh : C $-> D)
: (g - h) $o f $== (g $o f) - (h $o f)
:= grp_homo_op_inv_0gpd _ g h.EndAbEnriched.