fact
stringlengths
13
15.5k
type
stringclasses
9 values
library
stringclasses
15 values
imports
stringlengths
14
7.64k
βŒ€
filename
stringlengths
12
97
symbolic_name
stringlengths
1
78
index_level
int64
0
38.7k
Definition isrinvertible {X : UU} (opp : binop X) (x : X) : UU := isweq (Ξ» x0 : X, opp x0 x).
Definition
Algebra
null
Algebra\BinaryOperations.v
isrinvertible
300
Definition isinvertible {X : UU} (opp : binop X) (x : X) : UU := (islinvertible opp x) Γ— (isrinvertible opp x).
Definition
Algebra
null
Algebra\BinaryOperations.v
isinvertible
301
Definition binop_weq_fwd {X Y : UU} (H : X ≃ Y) : binop X β†’ binop Y := Ξ» (opp : binop X) (x y : Y), H (opp (invmap H x) (invmap H y)).
Definition
Algebra
null
Algebra\BinaryOperations.v
binop_weq_fwd
302
Definition binop_weq_bck {X Y : UU} (H : X ≃ Y) : binop Y β†’ binop X := Ξ» (opp : binop Y) (x y : X), invmap H (opp (H x) (H y)).
Definition
Algebra
null
Algebra\BinaryOperations.v
binop_weq_bck
303
Definition isassoc {X : UU} (opp : binop X) : UU := ∏ x x' x'', opp (opp x x') x'' = opp x (opp x' x'').
Definition
Algebra
null
Algebra\BinaryOperations.v
isassoc
304
Lemma isapropisassoc {X : hSet} (opp : binop X) : isaprop (isassoc opp). Proof. apply impred. intro x. apply impred. intro x'. apply impred. intro x''. simpl. apply (setproperty X). Defined.
Lemma
Algebra
null
Algebra\BinaryOperations.v
isapropisassoc
305
Lemma assoc4 {X : UU} (opp : binop X) (isa : isassoc opp) : ∏ w x y z : X, opp (opp (opp w x) y) z = opp (opp w (opp x y)) z. Proof. intros. repeat rewrite isa; exact (idpath _). Qed.
Lemma
Algebra
null
Algebra\BinaryOperations.v
assoc4
306
Definition isrcancellative {X : UU} (opp : binop X) : UU := ∏ x:X, isrcancelable opp x.
Definition
Algebra
null
Algebra\BinaryOperations.v
isrcancellative
307
Definition islcancellative {X : UU} (opp : binop X) : UU := ∏ x:X, islcancelable opp x.
Definition
Algebra
null
Algebra\BinaryOperations.v
islcancellative
308
Definition islunit {X : UU} (opp : binop X) (un0 : X) : UU := ∏ x : X, opp un0 x = x.
Definition
Algebra
null
Algebra\BinaryOperations.v
islunit
309
Lemma isapropislunit {X : hSet} (opp : binop X) (un0 : X) : isaprop (islunit opp un0). Proof. apply impred. intro x. simpl. apply (setproperty X). Defined.
Lemma
Algebra
null
Algebra\BinaryOperations.v
isapropislunit
310
Definition isrunit {X : UU} (opp : binop X) (un0 : X) : UU := ∏ x : X, opp x un0 = x.
Definition
Algebra
null
Algebra\BinaryOperations.v
isrunit
311
Lemma isapropisrunit {X : hSet} (opp : binop X) (un0 : X) : isaprop (isrunit opp un0). Proof. apply impred. intro x. simpl. apply (setproperty X). Defined.
Lemma
Algebra
null
Algebra\BinaryOperations.v
isapropisrunit
312
Definition isunit {X : UU} (opp : binop X) (un0 : X) : UU := (islunit opp un0) Γ— (isrunit opp un0).
Definition
Algebra
null
Algebra\BinaryOperations.v
isunit
313
Definition make_isunit {X : UU} {opp : binop X} {un0 : X} (H1 : islunit opp un0) (H2 : isrunit opp un0) : isunit opp un0 := H1 ,, H2.
Definition
Algebra
null
Algebra\BinaryOperations.v
make_isunit
314
Definition isunital {X : UU} (opp : binop X) : UU := βˆ‘ (un0 : X), isunit opp un0.
Definition
Algebra
null
Algebra\BinaryOperations.v
isunital
315
Definition make_isunital {X : UU} {opp : binop X} (un0 : X) (is : isunit opp un0) : isunital opp := un0 ,, is.
Definition
Algebra
null
Algebra\BinaryOperations.v
make_isunital
316
Lemma isapropisunital {X : hSet} (opp : binop X) : isaprop (isunital opp). Proof. apply (@isapropsubtype X (Ξ» un0, hconj (make_hProp _ (isapropislunit opp un0)) (make_hProp _ (isapropisrunit opp un0)))). intros u1 u2. intros ua1 ua2. apply (!(pr2 ua2 u1) @ (pr1 ua1 u2)). Defined.
Lemma
Algebra
null
Algebra\BinaryOperations.v
isapropisunital
317
Definition ismonoidop {X : UU} (opp : binop X) : UU := (isassoc opp) Γ— (isunital opp).
Definition
Algebra
null
Algebra\BinaryOperations.v
ismonoidop
318
Definition make_ismonoidop {X : UU} {opp : binop X} (H1 : isassoc opp) (H2 : isunital opp) : ismonoidop opp := H1 ,, H2.
Definition
Algebra
null
Algebra\BinaryOperations.v
make_ismonoidop
319
Definition assocax_is {X : UU} {opp : binop X} : ismonoidop opp β†’ isassoc opp := @pr1 _ _.
Definition
Algebra
null
Algebra\BinaryOperations.v
assocax_is
320
Definition unel_is {X : UU} {opp : binop X} (is : ismonoidop opp) : X := pr1 (pr2 is).
Definition
Algebra
null
Algebra\BinaryOperations.v
unel_is
321
Definition lunax_is {X : UU} {opp : binop X} (is : ismonoidop opp) : islunit opp (pr1 (pr2 is)) := pr1 (pr2 (pr2 is)).
Definition
Algebra
null
Algebra\BinaryOperations.v
lunax_is
322
Definition runax_is {X : UU} {opp : binop X} (is : ismonoidop opp) : isrunit opp (pr1 (pr2 is)) := pr2 (pr2 (pr2 is)).
Definition
Algebra
null
Algebra\BinaryOperations.v
runax_is
323
Definition unax_is {X : UU} {opp : binop X} (is : ismonoidop opp) : isunit opp (pr1 (pr2 is)) := lunax_is is ,, runax_is is.
Definition
Algebra
null
Algebra\BinaryOperations.v
unax_is
324
Lemma isapropismonoidop {X : hSet} (opp : binop X) : isaprop (ismonoidop opp). Proof. apply (isofhleveldirprod 1). apply isapropisassoc. apply isapropisunital. Defined.
Lemma
Algebra
null
Algebra\BinaryOperations.v
isapropismonoidop
325
Definition islinvel (x : X) : X β†’ UU := Ξ» x0, x0 * x = u.
Definition
Algebra
null
Algebra\BinaryOperations.v
islinvel
326
Definition isrinvel (x : X) : X β†’ UU := Ξ» x0, x * x0 = u.
Definition
Algebra
null
Algebra\BinaryOperations.v
isrinvel
327
Definition isinvel (x : X) : X β†’ UU := Ξ» x0, (islinvel x x0) Γ— (isrinvel x x0).
Definition
Algebra
null
Algebra\BinaryOperations.v
isinvel
328
Definition haslinv (x : X) : UU := βˆ‘ x0 : X, islinvel x x0.
Definition
Algebra
null
Algebra\BinaryOperations.v
haslinv
329
Definition hasrinv (x : X) : UU := βˆ‘ x0 : X, isrinvel x x0.
Definition
Algebra
null
Algebra\BinaryOperations.v
hasrinv
330
Definition hasinv (x : X) : UU := βˆ‘ x0 : X, isinvel x x0.
Definition
Algebra
null
Algebra\BinaryOperations.v
hasinv
331
Definition haslinv_to_linvel {x : X} : haslinv x β†’ X := pr1.
Definition
Algebra
null
Algebra\BinaryOperations.v
haslinv_to_linvel
332
Definition hasrinv_to_rinvel {x : X} : hasrinv x β†’ X := pr1.
Definition
Algebra
null
Algebra\BinaryOperations.v
hasrinv_to_rinvel
333
Definition hasinv_to_invel {x : X} : hasinv x β†’ X := pr1.
Definition
Algebra
null
Algebra\BinaryOperations.v
hasinv_to_invel
334
Definition merely_haslinv (x : X) : hProp := βˆ₯ haslinv x βˆ₯.
Definition
Algebra
null
Algebra\BinaryOperations.v
merely_haslinv
335
Definition merely_hasrinv (x : X) : hProp := βˆ₯ hasrinv x βˆ₯.
Definition
Algebra
null
Algebra\BinaryOperations.v
merely_hasrinv
336
Definition merely_hasinv (x : X) : hProp := βˆ₯ hasinv x βˆ₯.
Definition
Algebra
null
Algebra\BinaryOperations.v
merely_hasinv
337
Definition is_inv_inv : ∏ (x x0 : X), (isinvel x x0 β†’ isinvel x0 x) := Ξ» x x0 isinv, pr2 isinv ,, pr1 isinv.
Definition
Algebra
null
Algebra\BinaryOperations.v
is_inv_inv
338
Lemma invop_l : ∏ (x y x' y' : X), (islinvel x x' β†’ islinvel y y' β†’ islinvel (x * y) (y' * x')). Proof. intros x y x' y' xinv yinv. unfold islinvel. pose (assoc := pr1 is). cbn; unfold islinvel. rewrite <- assoc. rewrite (assoc4 opp assoc), xinv. rewrite (runax_is is). exact yinv. Qed.
Lemma
Algebra
null
Algebra\BinaryOperations.v
invop_l
339
Lemma invop_r : ∏ (x y x' y' : X), (isrinvel x x' β†’ isrinvel y y' β†’ isrinvel (x * y) (y' * x')). Proof. intros x y x' y' xinv yinv. pose (assoc := pr1 is). cbn; unfold isrinvel. rewrite <- assoc. rewrite (assoc4 opp assoc), yinv. rewrite (runax_is is). exact xinv. Qed.
Lemma
Algebra
null
Algebra\BinaryOperations.v
invop_r
340
Lemma invop : ∏ (x y x' y' : X), (isinvel x x' β†’ isinvel y y' β†’ isinvel (x * y) (y' * x')). Proof. intros x y x' y' xinv yinv. use make_dirprod. - apply invop_l. + exact (dirprod_pr1 xinv). + exact (dirprod_pr1 yinv). - apply invop_r. + exact (dirprod_pr2 xinv). + exact (dirprod_pr2 yinv). Defined.
Lemma
Algebra
null
Algebra\BinaryOperations.v
invop
341
Lemma mere_invop : ∏ (x y : X), (merely_hasinv x β†’ merely_hasinv y β†’ merely_hasinv (x * y)). Proof. intros x y. apply hinhfun2. intros xinv yinv. exists ((hasinv_to_invel yinv) * (hasinv_to_invel xinv)). apply invop. - exact (pr2 xinv). - exact (pr2 yinv). Defined.
Lemma
Algebra
null
Algebra\BinaryOperations.v
mere_invop
342
Lemma linv_eq_rinv (x lx rx : X) (lxlinv : islinvel x lx) (rxrinv : isrinvel x rx) : lx = rx. Proof. intros. refine (!runax_is is _ @ _). refine (!maponpaths (Ξ» z, lx * z) rxrinv @ _). refine (!assocax_is is _ _ _ @ _). refine (maponpaths (Ξ» z, z * rx) lxlinv @ _). apply lunax_is. Defined.
Lemma
Algebra
null
Algebra\BinaryOperations.v
linv_eq_rinv
343
Definition islinv : UU := ∏ x : X, (inv x) * x = u.
Definition
Algebra
null
Algebra\BinaryOperations.v
islinv
344
Definition isrinv : UU := ∏ x : X, x * (inv x) = u.
Definition
Algebra
null
Algebra\BinaryOperations.v
isrinv
345
Definition isinv : UU := islinv Γ— isrinv.
Definition
Algebra
null
Algebra\BinaryOperations.v
isinv
346
Definition isapropislinvel (x x0 : X) : isaprop (islinvel opp is x x0) := setproperty X _ _.
Definition
Algebra
null
Algebra\BinaryOperations.v
isapropislinvel
347
Definition isapropisrinvel (x x0 : X) : isaprop (isrinvel opp is x x0) := setproperty X _ _.
Definition
Algebra
null
Algebra\BinaryOperations.v
isapropisrinvel
348
Definition isapropisinvel (x x0 : X) : isaprop (isinvel opp is x x0) := isapropdirprod _ _ (isapropislinvel _ _) (isapropisrinvel _ _).
Definition
Algebra
null
Algebra\BinaryOperations.v
isapropisinvel
349
Definition isaprop_haslinv (x : X) (can : islcancelable opp x) : isaprop (hasrinv opp is x). Proof. apply isaproptotal2. - intro; apply isapropislinvel. - intros x' x'' islinvx' islinvx''. apply (Injectivity (Ξ» x0 : X, x * x0)). + apply incl_injectivity; assumption. + exact (islinvx' @ !islinvx''). Defined.
Definition
Algebra
null
Algebra\BinaryOperations.v
isaprop_haslinv
350
Definition isaprop_hasrinv (x : X) (can : isrcancelable opp x) : isaprop (haslinv opp is x). Proof. apply isaproptotal2. - intro; apply isapropisrinvel. - intros x' x'' isrinvx' isrinvx''. apply (Injectivity (Ξ» x0 : X, x0 * x)). + apply incl_injectivity; assumption. + exact (isrinvx' @ !isrinvx''). Defined.
Definition
Algebra
null
Algebra\BinaryOperations.v
isaprop_hasrinv
351
Definition isaprop_hasinv (x : X) (can : iscancelable opp x) : isaprop (hasinv opp is x). Proof. apply isaproptotal2. - intro; apply isapropdirprod. + apply isapropislinvel. + apply isapropisrinvel. - intros x' x'' isinvx' isinvx''. apply (Injectivity (Ξ» x0 : X, x * x0)). + apply incl_injectivity; apply (pr1 can). + exact (pr2 isinvx' @ !pr2 isinvx''). Defined.
Definition
Algebra
null
Algebra\BinaryOperations.v
isaprop_hasinv
352
Definition merely_invertible_elements : hsubtype X := merely_hasinv opp is.
Definition
Algebra
null
Algebra\BinaryOperations.v
merely_invertible_elements
353
Definition invertible_elements (can : ∏ x, iscancelable opp x) : hsubtype X. Proof. intro x. use make_hProp. - exact (hasinv opp is x). - apply isaprop_hasinv, can. Defined.
Definition
Algebra
null
Algebra\BinaryOperations.v
invertible_elements
354
Definition lcanfromlinv (a b c : X) (c' : haslinv opp is c) : c * a = c * b β†’ a = b. Proof. intros e. refine (!lunax_is is a @ _ @ lunax_is is b). refine (!maponpaths (Ξ» z, z * _) (pr2 c') @ _ @ maponpaths (Ξ» z, z * _) (pr2 c')). refine (assocax_is is _ _ _ @ _ @ !assocax_is is _ _ _). apply maponpaths. assumption. Defined.
Definition
Algebra
null
Algebra\BinaryOperations.v
lcanfromlinv
355
Definition rcanfromrinv (a b c : X) (c' : hasrinv opp is c) : a * c = b * c β†’ a = b. Proof. intros e. refine (!runax_is is a @ _ @ runax_is is b). refine (!maponpaths (Ξ» z, _ * z) (pr2 c') @ _ @ maponpaths (Ξ» z, _ * z) (pr2 c')). refine (!assocax_is is _ _ _ @ _ @ assocax_is is _ _ _). apply (maponpaths (Ξ» z, z * _)). assumption. Defined.
Definition
Algebra
null
Algebra\BinaryOperations.v
rcanfromrinv
356
Lemma isapropislinv : isaprop (islinv opp u inv). Proof. intros; apply impred; intro; apply setproperty. Defined.
Lemma
Algebra
null
Algebra\BinaryOperations.v
isapropislinv
357
Lemma isapropisrinv : isaprop (isrinv opp u inv). Proof. intros; apply impred; intro; apply setproperty. Defined.
Lemma
Algebra
null
Algebra\BinaryOperations.v
isapropisrinv
358
Lemma isapropisinv : isaprop (isinv opp u inv). Proof. exact (isofhleveldirprod 1 _ _ isapropislinv isapropisrinv). Defined.
Lemma
Algebra
null
Algebra\BinaryOperations.v
isapropisinv
359
Definition make_isinv {X : UU} {opp : binop X} {un0 : X} {inv0 : X β†’ X} (H1 : islinv opp un0 inv0) (H2 : isrinv opp un0 inv0) : isinv opp un0 inv0 := H1 ,, H2.
Definition
Algebra
null
Algebra\BinaryOperations.v
make_isinv
360
Definition invstruct {X : UU} (opp : binop X) (is : ismonoidop opp) : UU := βˆ‘ (inv0 : X β†’ X), isinv opp (unel_is is) inv0.
Definition
Algebra
null
Algebra\BinaryOperations.v
invstruct
361
Definition make_invstruct {X : UU} {opp : binop X} {is : ismonoidop opp} (inv0 : X β†’ X) (H : isinv opp (unel_is is) inv0) : invstruct opp is := inv0 ,, H.
Definition
Algebra
null
Algebra\BinaryOperations.v
make_invstruct
362
Definition isgrop {X : UU} (opp : binop X) : UU := βˆ‘ (is : ismonoidop opp), invstruct opp is.
Definition
Algebra
null
Algebra\BinaryOperations.v
isgrop
363
Definition make_isgrop {X : UU} {opp : binop X} (is1 : ismonoidop opp) (is2 : invstruct opp is1) : isgrop opp := is1 ,, is2.
Definition
Algebra
null
Algebra\BinaryOperations.v
make_isgrop
364
Definition pr1isgrop (X : UU) (opp : binop X) : isgrop opp β†’ ismonoidop opp := @pr1 _ _.
Definition
Algebra
null
Algebra\BinaryOperations.v
pr1isgrop
365
Definition grinv_is {X : UU} {opp : binop X} (is : isgrop opp) : X β†’ X := pr1 (pr2 is).
Definition
Algebra
null
Algebra\BinaryOperations.v
grinv_is
366
Definition grlinvax_is {X : UU} {opp : binop X} (is : isgrop opp) : islinv opp (unel_is is) (pr1 (pr2 is)) := pr1 (pr2 (pr2 is)).
Definition
Algebra
null
Algebra\BinaryOperations.v
grlinvax_is
367
Definition grrinvax_is {X : UU} {opp : binop X} (is : isgrop opp) : isrinv opp (unel_is is) (pr1 (pr2 is)) := pr2 (pr2 (pr2 is)).
Definition
Algebra
null
Algebra\BinaryOperations.v
grrinvax_is
368
Lemma isweqrmultingr_is {X : UU} {opp : binop X} (is : isgrop opp) (x0 : X) : isrinvertible opp x0. Proof. induction is as [ is istr ]. set (f := λ x : X, opp x x0). set (g := λ x : X, opp x ((pr1 istr) x0)). induction is as [ assoc isun0 ]. induction istr as [ inv0 axs ]. induction isun0 as [ un0 unaxs ]. simpl in * |-. assert (egf : ∏ x, g (f x) = x). { intro x. unfold f. unfold g. induction (!assoc x x0 (inv0 x0)). set (e := pr2 axs x0). simpl in e. rewrite e. apply (pr2 unaxs x). } assert (efg : ∏ x, f (g x) = x). { intro x. unfold f. unfold g. induction (!assoc x (inv0 x0) x0). set (e := pr1 axs x0). simpl in e. rewrite e. apply (pr2 unaxs x). } apply (isweq_iso _ _ egf efg). Defined.
Lemma
Algebra
null
Algebra\BinaryOperations.v
isweqrmultingr_is
369
Lemma isweqlmultingr_is {X : UU} {opp : binop X} (is : isgrop opp) (x0 : X) : islinvertible opp x0. Proof. induction is as [ is istr ]. set (f := λ x : X, opp x0 x). set (g := λ x : X, opp ((pr1 istr) x0) x). induction is as [ assoc isun0 ]. induction istr as [ inv0 axs ]. induction isun0 as [ un0 unaxs ]. simpl in * |-. assert (egf : ∏ x, g (f x) = x). { intro x. unfold f. unfold g. induction (assoc (inv0 x0) x0 x). set (e := pr1 axs x0). simpl in e. rewrite e. apply (pr1 unaxs x). } assert (efg : ∏ x, f (g x) = x). { intro x. unfold f. unfold g. induction (assoc x0 (inv0 x0) x). set (e := pr2 axs x0). simpl in e. rewrite e. apply (pr1 unaxs x). } apply (isweq_iso _ _ egf efg). Defined.
Lemma
Algebra
null
Algebra\BinaryOperations.v
isweqlmultingr_is
370
Lemma isapropinvstruct {X : hSet} {opp : binop X} (is : ismonoidop opp) : isaprop (invstruct opp is). Proof. apply isofhlevelsn. intro is0. set (un0 := pr1 (pr2 is)). assert (int : ∏ (i : X β†’ X), isaprop ((∏ x : X, opp (i x) x = un0) Γ— (∏ x : X, opp x (i x) = un0))). { intro i. apply (isofhleveldirprod 1). - apply impred. intro x. simpl. apply (setproperty X). - apply impred. intro x. simpl. apply (setproperty X). } apply (isapropsubtype (Ξ» i, make_hProp _ (int i))). intros inv1 inv2. simpl. intro ax1. intro ax2. apply funextfun. intro x0. apply (invmaponpathsweq (make_weq _ (isweqrmultingr_is (is ,, is0) x0))). simpl. rewrite (pr1 ax1 x0). rewrite (pr1 ax2 x0). apply idpath. Defined.
Lemma
Algebra
null
Algebra\BinaryOperations.v
isapropinvstruct
371
Lemma isapropisgrop {X : hSet} (opp : binop X) : isaprop (isgrop opp). Proof. apply (isofhleveltotal2 1). - apply isapropismonoidop. - apply isapropinvstruct. Defined.
Lemma
Algebra
null
Algebra\BinaryOperations.v
isapropisgrop
372
Definition allinvvertibleinv {X : hSet} {opp : binop X} (is : ismonoidop opp) (allinv : ∏ x : X, islinvertible opp x) : X β†’ X := Ξ» x : X, invmap (make_weq _ (allinv x)) (unel_is is).
Definition
Algebra
null
Algebra\BinaryOperations.v
allinvvertibleinv
373
Lemma isgropif {X : hSet} {opp : binop X} (is0 : ismonoidop opp) (is : ∏ x : X, merely_hasrinv opp is0 x) : isgrop opp. Proof. exists is0. induction is0 as [ assoc isun0 ]. induction isun0 as [ un0 unaxs0 ]. simpl in is. simpl in unaxs0. simpl in un0. simpl in assoc. simpl in unaxs0. assert (l1 : ∏ x' : X, isincl (Ξ» x0 : X, opp x0 x')). { intro x'. apply (@hinhuniv (βˆ‘ (x0 : X), opp x' x0 = un0) (make_hProp _ (isapropisincl (Ξ» x0 : X, opp x0 x')))). - intro int1. simpl. apply isinclbetweensets. + apply (pr2 X). + apply (pr2 X). + intros a b. intro e. rewrite <- (pr2 unaxs0 a). rewrite <- (pr2 unaxs0 b). induction int1 as [ invx' eq ]. rewrite <- eq. induction (assoc a x' invx'). induction (assoc b x' invx'). rewrite e. apply idpath. - apply (is x'). } assert (is' : ∏ x : X, βˆƒ (x0 : X), opp x0 x = un0). { intro x. apply (Ξ» f , hinhuniv f (is x)). intro s1. induction s1 as [ x' eq ]. apply hinhpr. exists x'. simpl. apply (invmaponpathsincl _ (l1 x')). rewrite (assoc x' x x'). rewrite eq. rewrite (pr1 unaxs0 x'). unfold unel_is. simpl. rewrite (pr2 unaxs0 x'). apply idpath. } assert (l1' : ∏ x' : X, isincl (Ξ» x0 : X, opp x' x0)). { intro x'. apply (@hinhuniv (βˆ‘ (x0 : X), opp x0 x' = un0) (make_hProp _ (isapropisincl (Ξ» x0 : X, opp x' x0)))). - intro int1. simpl. apply isinclbetweensets. + apply (pr2 X). + apply (pr2 X). + intros a b. intro e. rewrite <- (pr1 unaxs0 a). rewrite <- (pr1 unaxs0 b). induction int1 as [ invx' eq ]. rewrite <- eq. induction (!assoc invx' x' a). induction (!assoc invx' x' b). rewrite e. apply idpath. - apply (is' x'). } assert (int : ∏ x : X, isaprop (βˆ‘ (x0 : X), opp x0 x = un0)%logic). { intro x. apply isapropsubtype. intros x1 x2. intros eq1 eq2. apply (invmaponpathsincl _ (l1 x)). rewrite eq1. rewrite eq2. apply idpath. } simpl. set (linv0 := Ξ» x : X, hinhunivcor1 (make_hProp _ (int x)) (is' x)). simpl in linv0. set (inv0 := Ξ» x : X, pr1 (linv0 x)). exists inv0. simpl. exists (Ξ» x, pr2 (linv0 x)). intro x. apply (invmaponpathsincl _ (l1 x)). rewrite (assoc x (inv0 x) x). change (inv0 x) with (pr1 (linv0 x)). rewrite (pr2 (linv0 x)). unfold unel_is. simpl. rewrite (pr1 unaxs0 x). rewrite (pr2 unaxs0 x). apply idpath. Defined.
Lemma
Algebra
null
Algebra\BinaryOperations.v
isgropif
374
Definition iscomm {X : UU} (opp : binop X) : UU := ∏ x x' : X, opp x x' = opp x' x.
Definition
Algebra
null
Algebra\BinaryOperations.v
iscomm
375
Lemma isapropiscomm {X : hSet} (opp : binop X) : isaprop (iscomm opp). Proof. apply impred. intros x. apply impred. intro x'. simpl. apply (setproperty X). Defined.
Lemma
Algebra
null
Algebra\BinaryOperations.v
isapropiscomm
376
Definition isabmonoidop {X : UU} (opp : binop X) : UU := (ismonoidop opp) Γ— (iscomm opp).
Definition
Algebra
null
Algebra\BinaryOperations.v
isabmonoidop
377
Definition make_isabmonoidop {X : UU} {opp : binop X} (H1 : ismonoidop opp) (H2 : iscomm opp) : isabmonoidop opp := H1 ,, H2.
Definition
Algebra
null
Algebra\BinaryOperations.v
make_isabmonoidop
378
Definition pr1isabmonoidop (X : UU) (opp : binop X) : isabmonoidop opp β†’ ismonoidop opp := @pr1 _ _.
Definition
Algebra
null
Algebra\BinaryOperations.v
pr1isabmonoidop
379
Definition commax_is {X : UU} {opp : binop X} (is : isabmonoidop opp) : iscomm opp := pr2 is.
Definition
Algebra
null
Algebra\BinaryOperations.v
commax_is
380
Lemma isapropisabmonoidop {X : hSet} (opp : binop X) : isaprop (isabmonoidop opp). Proof. apply (isofhleveldirprod 1). apply isapropismonoidop. apply isapropiscomm. Defined.
Lemma
Algebra
null
Algebra\BinaryOperations.v
isapropisabmonoidop
381
Lemma abmonoidoprer {X : UU} {opp : binop X} (is : isabmonoidop opp) (a b c d : X) : opp (opp a b) (opp c d) = opp (opp a c) (opp b d). Proof. induction is as [ is comm ]. induction is as [ assoc unital0 ]. simpl in *. induction (assoc (opp a b) c d). induction (assoc (opp a c) b d). induction (!assoc a b c). induction (!assoc a c b). induction (comm b c). apply idpath. Defined.
Lemma
Algebra
null
Algebra\BinaryOperations.v
abmonoidoprer
382
Lemma weqlcancelablercancelable {X : UU} (opp : binop X) (is : iscomm opp) (x : X) : (islcancelable opp x) ≃ (isrcancelable opp x). Proof. assert (f : (islcancelable opp x) β†’ (isrcancelable opp x)). { unfold islcancelable. unfold isrcancelable. intro isl. apply (Ξ» h, isinclhomot _ _ h isl). intro x0. apply is. } assert (g : (isrcancelable opp x) β†’ (islcancelable opp x)). { unfold islcancelable. unfold isrcancelable. intro isr. apply (Ξ» h, isinclhomot _ _ h isr). intro x0. apply is. } exists f. apply (isweqimplimpl f g (isapropisincl (Ξ» x0 : X, opp x x0)) (isapropisincl (Ξ» x0 : X, opp x0 x))). Defined.
Lemma
Algebra
null
Algebra\BinaryOperations.v
weqlcancelablercancelable
383
Lemma weqlinvertiblerinvertible {X : UU} (opp : binop X) (is : iscomm opp) (x : X) : (islinvertible opp x) ≃ (isrinvertible opp x). Proof. assert (f : (islinvertible opp x) β†’ (isrinvertible opp x)). { unfold islinvertible. unfold isrinvertible. intro isl. apply (isweqhomot (Ξ» y, opp x y)). - intro z. apply is. - apply isl. } assert (g : (isrinvertible opp x) β†’ (islinvertible opp x)). { unfold islinvertible. unfold isrinvertible. intro isr. apply (Ξ» h, isweqhomot _ _ h isr). intro x0. apply is. } exists f. apply (isweqimplimpl f g (isapropisweq (Ξ» x0 : X, opp x x0)) (isapropisweq (Ξ» x0 : X, opp x0 x))). Defined.
Lemma
Algebra
null
Algebra\BinaryOperations.v
weqlinvertiblerinvertible
384
Lemma weqlunitrunit {X : hSet} (opp : binop X) (is : iscomm opp) (un0 : X) : (islunit opp un0) ≃ (isrunit opp un0). Proof. assert (f : (islunit opp un0) β†’ (isrunit opp un0)). { unfold islunit. unfold isrunit. intro isl. intro x. induction (is un0 x). apply (isl x). } assert (g : (isrunit opp un0) β†’ (islunit opp un0)). { unfold islunit. unfold isrunit. intro isr. intro x. induction (is x un0). apply (isr x). } exists f. apply (isweqimplimpl f g (isapropislunit opp un0) (isapropisrunit opp un0)). Defined.
Lemma
Algebra
null
Algebra\BinaryOperations.v
weqlunitrunit
385
Lemma weqlinvrinv {X : hSet} (opp : binop X) (is : iscomm opp) (un0 : X) (inv0 : X β†’ X) : (islinv opp un0 inv0) ≃ (isrinv opp un0 inv0). Proof. assert (f : (islinv opp un0 inv0) β†’ (isrinv opp un0 inv0)). { unfold islinv. unfold isrinv. intro isl. intro x. induction (is (inv0 x) x). apply (isl x). } assert (g : (isrinv opp un0 inv0) β†’ (islinv opp un0 inv0)). { unfold islinv. unfold isrinv. intro isr. intro x. induction (is x (inv0 x)). apply (isr x). } exists f. apply (isweqimplimpl f g (isapropislinv opp un0 inv0) (isapropisrinv opp un0 inv0)). Qed.
Lemma
Algebra
null
Algebra\BinaryOperations.v
weqlinvrinv
386
Definition isabgrop {X : UU} (opp : binop X) : UU := (isgrop opp) Γ— (iscomm opp).
Definition
Algebra
null
Algebra\BinaryOperations.v
isabgrop
387
Definition make_isabgrop {X : UU} {opp : binop X} (H1 : isgrop opp) (H2 : iscomm opp) : isabgrop opp := H1 ,, H2.
Definition
Algebra
null
Algebra\BinaryOperations.v
make_isabgrop
388
Definition pr1isabgrop (X : UU) (opp : binop X) : isabgrop opp β†’ isgrop opp := @pr1 _ _.
Definition
Algebra
null
Algebra\BinaryOperations.v
pr1isabgrop
389
Definition isabgroptoisabmonoidop (X : UU) (opp : binop X) : isabgrop opp β†’ isabmonoidop opp := Ξ» is, pr1 (pr1 is) ,, pr2 is.
Definition
Algebra
null
Algebra\BinaryOperations.v
isabgroptoisabmonoidop
390
Lemma isapropisabgrop {X : hSet} (opp : binop X) : isaprop (isabgrop opp). Proof. apply (isofhleveldirprod 1). apply isapropisgrop. apply isapropiscomm. Defined.
Lemma
Algebra
null
Algebra\BinaryOperations.v
isapropisabgrop
391
Definition isldistr {X : UU} (opp1 opp2 : binop X) : UU := ∏ x x' x'' : X, opp2 x'' (opp1 x x') = opp1 (opp2 x'' x) (opp2 x'' x').
Definition
Algebra
null
Algebra\BinaryOperations.v
isldistr
392
Lemma isapropisldistr {X : hSet} (opp1 opp2 : binop X) : isaprop (isldistr opp1 opp2). Proof. apply impred. intro x. apply impred. intro x'. apply impred. intro x''. simpl. apply (setproperty X). Defined.
Lemma
Algebra
null
Algebra\BinaryOperations.v
isapropisldistr
393
Definition isrdistr {X : UU} (opp1 opp2 : binop X) : UU := ∏ x x' x'' : X, opp2 (opp1 x x') x'' = opp1 (opp2 x x'') (opp2 x' x'').
Definition
Algebra
null
Algebra\BinaryOperations.v
isrdistr
394
Lemma isapropisrdistr {X : hSet} (opp1 opp2 : binop X) : isaprop (isrdistr opp1 opp2). Proof. apply impred. intro x. apply impred. intro x'. apply impred. intro x''. simpl. apply (setproperty X). Defined.
Lemma
Algebra
null
Algebra\BinaryOperations.v
isapropisrdistr
395
Definition isdistr {X : UU} (opp1 opp2 : binop X) : UU := (isldistr opp1 opp2) Γ— (isrdistr opp1 opp2).
Definition
Algebra
null
Algebra\BinaryOperations.v
isdistr
396
Lemma isapropisdistr {X : hSet} (opp1 opp2 : binop X) : isaprop (isdistr opp1 opp2). Proof. apply (isofhleveldirprod 1 _ _ (isapropisldistr _ _) (isapropisrdistr _ _)). Defined.
Lemma
Algebra
null
Algebra\BinaryOperations.v
isapropisdistr
397
Lemma weqldistrrdistr {X : hSet} (opp1 opp2 : binop X) (is : iscomm opp2) : (isldistr opp1 opp2) ≃ (isrdistr opp1 opp2). Proof. assert (f : (isldistr opp1 opp2) β†’ (isrdistr opp1 opp2)). { unfold isldistr. unfold isrdistr. intro isl. intros x x' x''. induction (is x'' (opp1 x x')). induction (is x'' x). induction (is x'' x'). apply (isl x x' x''). } assert (g : (isrdistr opp1 opp2) β†’ (isldistr opp1 opp2)). { unfold isldistr. unfold isrdistr. intro isr. intros x x' x''. induction (is (opp1 x x') x''). induction (is x x''). induction (is x' x''). apply (isr x x' x''). } exists f. apply (isweqimplimpl f g (isapropisldistr opp1 opp2) (isapropisrdistr opp1 opp2)). Defined.
Lemma
Algebra
null
Algebra\BinaryOperations.v
weqldistrrdistr
398
Definition isabsorb {X : UU} (opp1 opp2 : binop X) : UU := ∏ x y : X, opp1 x (opp2 x y) = x.
Definition
Algebra
null
Algebra\BinaryOperations.v
isabsorb
399