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 pr1binopfun (X Y : setwithbinop) : binopfun X Y β†’ (X β†’ Y) := @pr1 _ _.
Definition
Algebra
null
Algebra\BinaryOperations.v
pr1binopfun
500
Definition binopfunisbinopfun {X Y : setwithbinop} (f : binopfun X Y) : isbinopfun f := pr2 f.
Definition
Algebra
null
Algebra\BinaryOperations.v
binopfunisbinopfun
501
Lemma isasetbinopfun (X Y : setwithbinop) : isaset (binopfun X Y). Proof. apply (isasetsubset (pr1binopfun X Y)). - change (isofhlevel 2 (X β†’ Y)). apply impred. intro. apply (setproperty Y). - refine (isinclpr1 _ _). intro. apply isapropisbinopfun. Defined.
Lemma
Algebra
null
Algebra\BinaryOperations.v
isasetbinopfun
502
Lemma isbinopfuncomp {X Y Z : setwithbinop} (f : binopfun X Y) (g : binopfun Y Z) : isbinopfun (g ∘ f). Proof. set (axf := binopfunisbinopfun f). set (axg := binopfunisbinopfun g). intros a b. simpl. rewrite (axf a b). rewrite (axg (f a) (f b)). apply idpath. Qed.
Lemma
Algebra
null
Algebra\BinaryOperations.v
isbinopfuncomp
503
Definition binopfuncomp {X Y Z : setwithbinop} (f : binopfun X Y) (g : binopfun Y Z) : binopfun X Z := make_binopfun (g ∘ f) (isbinopfuncomp f g).
Definition
Algebra
null
Algebra\BinaryOperations.v
binopfuncomp
504
Definition binopmono (X Y : setwithbinop) : UU := βˆ‘ (f : incl X Y), isbinopfun (pr1 f).
Definition
Algebra
null
Algebra\BinaryOperations.v
binopmono
505
Definition make_binopmono {X Y : setwithbinop} (f : incl X Y) (is : isbinopfun f) : binopmono X Y := f ,, is.
Definition
Algebra
null
Algebra\BinaryOperations.v
make_binopmono
506
Definition pr1binopmono (X Y : setwithbinop) : binopmono X Y β†’ incl X Y := @pr1 _ _.
Definition
Algebra
null
Algebra\BinaryOperations.v
pr1binopmono
507
Definition binopincltobinopfun (X Y : setwithbinop) : binopmono X Y β†’ binopfun X Y := Ξ» f, make_binopfun (pr1 (pr1 f)) (pr2 f).
Definition
Algebra
null
Algebra\BinaryOperations.v
binopincltobinopfun
508
Definition binopmonocomp {X Y Z : setwithbinop} (f : binopmono X Y) (g : binopmono Y Z) : binopmono X Z := make_binopmono (inclcomp (pr1 f) (pr1 g)) (isbinopfuncomp f g).
Definition
Algebra
null
Algebra\BinaryOperations.v
binopmonocomp
509
Definition binopiso (X Y : setwithbinop) : UU := βˆ‘ (f : X ≃ Y), isbinopfun f.
Definition
Algebra
null
Algebra\BinaryOperations.v
binopiso
510
Definition make_binopiso {X Y : setwithbinop} (f : X ≃ Y) (is : isbinopfun f) : binopiso X Y := f ,, is.
Definition
Algebra
null
Algebra\BinaryOperations.v
make_binopiso
511
Definition pr1binopiso (X Y : setwithbinop) : binopiso X Y β†’ X ≃ Y := @pr1 _ _.
Definition
Algebra
null
Algebra\BinaryOperations.v
pr1binopiso
512
Lemma isasetbinopiso (X Y : setwithbinop) : isaset (binopiso X Y). Proof. use isaset_total2. - use isaset_total2. + use impred_isaset. intros t. use setproperty. + intros x. use isasetaprop. use isapropisweq. - intros w. use isasetaprop. use isapropisbinopfun. Qed.
Lemma
Algebra
null
Algebra\BinaryOperations.v
isasetbinopiso
513
Definition binopisotobinopmono (X Y : setwithbinop) : binopiso X Y β†’ binopmono X Y := Ξ» f, make_binopmono (weqtoincl (pr1 f)) (pr2 f).
Definition
Algebra
null
Algebra\BinaryOperations.v
binopisotobinopmono
514
Definition binopisocomp {X Y Z : setwithbinop} (f : binopiso X Y) (g : binopiso Y Z) : binopiso X Z := make_binopiso (weqcomp (pr1 f) (pr1 g)) (isbinopfuncomp f g).
Definition
Algebra
null
Algebra\BinaryOperations.v
binopisocomp
515
Lemma isbinopfuninvmap {X Y : setwithbinop} (f : binopiso X Y) : isbinopfun (invmap (pr1 f)). Proof. set (axf := pr2 f). intros a b. apply (invmaponpathsweq (pr1 f)). rewrite (homotweqinvweq (pr1 f) (op a b)). rewrite (axf (invmap (pr1 f) a) (invmap (pr1 f) b)). rewrite (homotweqinvweq (pr1 f) a). rewrite (homotweqinvweq (pr1 f) b). apply idpath. Qed.
Lemma
Algebra
null
Algebra\BinaryOperations.v
isbinopfuninvmap
516
Definition invbinopiso {X Y : setwithbinop} (f : binopiso X Y) : binopiso Y X := make_binopiso (invweq (pr1 f)) (isbinopfuninvmap f).
Definition
Algebra
null
Algebra\BinaryOperations.v
invbinopiso
517
Definition idbinopiso (X : setwithbinop) : binopiso X X. Proof. use make_binopiso. - exact (idweq X). - intros x1 x2. use idpath. Defined.
Definition
Algebra
null
Algebra\BinaryOperations.v
idbinopiso
518
Definition setwithbinop_univalence_weq1 (X Y : setwithbinop) : (X = Y) ≃ (X ╝ Y) := total2_paths_equiv _ X Y.
Definition
Algebra
null
Algebra\BinaryOperations.v
setwithbinop_univalence_weq1
519
Definition setwithbinop_univalence_weq2 (X Y : setwithbinop) : (X ╝ Y) ≃ (binopiso X Y). Proof. use weqbandf. - use hSet_univalence. - intros e. use invweq. induction X as [X Xop]. induction Y as [Y Yop]. cbn in e. induction e. use weqimplimpl. + intros i. use funextfun. intros x1. use funextfun. intros x2. exact (i x1 x2). + intros e. cbn in e. intros x1 x2. induction e. use idpath. + use isapropisbinopfun. + use isasetbinoponhSet. Defined.
Definition
Algebra
null
Algebra\BinaryOperations.v
setwithbinop_univalence_weq2
520
Definition setwithbinop_univalence_map (X Y : setwithbinop) : X = Y β†’ binopiso X Y. Proof. intro e. induction e. exact (idbinopiso X). Defined.
Definition
Algebra
null
Algebra\BinaryOperations.v
setwithbinop_univalence_map
521
Lemma setwithbinop_univalence_isweq (X Y : setwithbinop) : isweq (setwithbinop_univalence_map X Y). Proof. use isweqhomot. - exact (weqcomp (setwithbinop_univalence_weq1 X Y) (setwithbinop_univalence_weq2 X Y)). - intros e. induction e. use weqcomp_to_funcomp_app. - use weqproperty. Defined.
Lemma
Algebra
null
Algebra\BinaryOperations.v
setwithbinop_univalence_isweq
522
Definition setwithbinop_univalence (X Y : setwithbinop) : (X = Y) ≃ (binopiso X Y) := make_weq (setwithbinop_univalence_map X Y) (setwithbinop_univalence_isweq X Y).
Definition
Algebra
null
Algebra\BinaryOperations.v
setwithbinop_univalence
523
Definition hfiberbinop {A B : setwithbinop} (f : binopfun A B) (b1 b2 : B) (hf1 : hfiber (pr1 f) b1) (hf2 : hfiber (pr1 f) b2) : hfiber (pr1 f) (@op B b1 b2) := make_hfiber (pr1 f) (@op A (pr1 hf1) (pr1 hf2)) (hfiberbinop_path f b1 b2 hf1 hf2).
Definition
Algebra
null
Algebra\BinaryOperations.v
hfiberbinop
524
Lemma islcancelablemonob {X Y : setwithbinop} (f : binopmono X Y) (x : X) (is : islcancelable (@op Y) (f x)) : islcancelable (@op X) x. Proof. unfold islcancelable. apply (isincltwooutof3a (λ x0 : X, op x x0) f (pr2 (pr1 f))). assert (h : homot ((λ y0 : Y, op (f x) y0) ∘ f) (f ∘ (λ x0 : X, op x x0))). { intro x0; simpl. apply (!(pr2 f) x x0). } apply (isinclhomot _ _ h). apply (isinclcomp f (make_incl _ is)). Defined.
Lemma
Algebra
null
Algebra\BinaryOperations.v
islcancelablemonob
525
Lemma isrcancelablemonob {X Y : setwithbinop} (f : binopmono X Y) (x : X) (is : isrcancelable (@op Y) (f x)) : isrcancelable (@op X) x. Proof. unfold islcancelable. apply (isincltwooutof3a (λ x0 : X, op x0 x) f (pr2 (pr1 f))). assert (h : homot ((λ y0 : Y, op y0 (f x)) ∘ f) (f ∘ (λ x0 : X, op x0 x))). { intro x0; simpl. apply (!(pr2 f) x0 x). } apply (isinclhomot _ _ h). apply (isinclcomp f (make_incl _ is)). Defined.
Lemma
Algebra
null
Algebra\BinaryOperations.v
isrcancelablemonob
526
Lemma iscancelablemonob {X Y : setwithbinop} (f : binopmono X Y) (x : X) (is : iscancelable (@op Y) (f x)) : iscancelable (@op X) x. Proof. apply (islcancelablemonob f x (pr1 is) ,, isrcancelablemonob f x (pr2 is)). Defined.
Lemma
Algebra
null
Algebra\BinaryOperations.v
iscancelablemonob
527
Lemma islinvertibleisob {X Y : setwithbinop} (f : binopiso X Y) (x : X) (is : islinvertible (@op Y) (f x)) : islinvertible (@op X) x. Proof. unfold islinvertible. apply (twooutof3a (λ x0 : X, op x x0) f). - assert (h : homot ((λ y0 : Y, op (f x) y0) ∘ f) (f ∘ (λ x0 : X, op x x0))). { intro x0; simpl. apply (!(pr2 f) x x0). } apply (isweqhomot _ _ h). apply (pr2 (weqcomp f (make_weq _ is))). - apply (pr2 (pr1 f)). Defined.
Lemma
Algebra
null
Algebra\BinaryOperations.v
islinvertibleisob
528
Lemma isrinvertibleisob {X Y : setwithbinop} (f : binopiso X Y) (x : X) (is : isrinvertible (@op Y) (f x)) : isrinvertible (@op X) x. Proof. unfold islinvertible. apply (twooutof3a (λ x0 : X, op x0 x) f). - assert (h : homot ((λ y0 : Y, op y0 (f x)) ∘ f) (f ∘ (λ x0 : X, op x0 x))). { intro x0; simpl. apply (!(pr2 f) x0 x). } apply (isweqhomot _ _ h). apply (pr2 (weqcomp f (make_weq _ is))). - apply (pr2 (pr1 f)). Defined.
Lemma
Algebra
null
Algebra\BinaryOperations.v
isrinvertibleisob
529
Lemma isinvertiblemonob {X Y : setwithbinop} (f : binopiso X Y) (x : X) (is : isinvertible (@op Y) (f x)) : isinvertible (@op X) x. Proof. apply (islinvertibleisob f x (pr1 is) ,, isrinvertibleisob f x (pr2 is)). Defined.
Lemma
Algebra
null
Algebra\BinaryOperations.v
isinvertiblemonob
530
Definition islinvertibleisof {X Y : setwithbinop} (f : binopiso X Y) (x : X) (is : islinvertible (@op X) x) : islinvertible (@op Y) (f x). Proof. unfold islinvertible. apply (twooutof3b f). - apply (pr2 (pr1 f)). - assert (h : homot (f ∘ (λ x0 : X, op x x0)) (λ x0 : X, op (f x) (f x0))). { intro x0; simpl. apply (pr2 f x x0). } apply (isweqhomot _ _ h). apply (pr2 (weqcomp (make_weq _ is) f)). Defined.
Definition
Algebra
null
Algebra\BinaryOperations.v
islinvertibleisof
531
Definition isrinvertibleisof {X Y : setwithbinop} (f : binopiso X Y) (x : X) (is : isrinvertible (@op X) x) : isrinvertible (@op Y) (f x). Proof. unfold isrinvertible. apply (twooutof3b f). - apply (pr2 (pr1 f)). - assert (h : homot (f ∘ (λ x0 : X, op x0 x)) (λ x0 : X, op (f x0) (f x))). { intro x0; simpl. apply (pr2 f x0 x). } apply (isweqhomot _ _ h). apply (pr2 (weqcomp (make_weq _ is) f)). Defined.
Definition
Algebra
null
Algebra\BinaryOperations.v
isrinvertibleisof
532
Lemma isinvertiblemonof {X Y : setwithbinop} (f : binopiso X Y) (x : X) (is : isinvertible (@op X) x) : isinvertible (@op Y) (f x). Proof. apply (islinvertibleisof f x (pr1 is) ,, isrinvertibleisof f x (pr2 is)). Defined.
Lemma
Algebra
null
Algebra\BinaryOperations.v
isinvertiblemonof
533
Lemma isassocmonob {X Y : setwithbinop} (f : binopmono X Y) (is : isassoc (@op Y)) : isassoc (@op X). Proof. set (axf := pr2 f). simpl in axf. intros a b c. apply (invmaponpathsincl _ (pr2 (pr1 f))). rewrite (axf (op a b) c). rewrite (axf a b). rewrite (axf a (op b c)). rewrite (axf b c). apply is. Qed.
Lemma
Algebra
null
Algebra\BinaryOperations.v
isassocmonob
534
Lemma iscommmonob {X Y : setwithbinop} (f : binopmono X Y) (is : iscomm (@op Y)) : iscomm (@op X). Proof. set (axf := pr2 f). simpl in axf. intros a b. apply (invmaponpathsincl _ (pr2 (pr1 f))). rewrite (axf a b). rewrite (axf b a). apply is. Qed.
Lemma
Algebra
null
Algebra\BinaryOperations.v
iscommmonob
535
Lemma isassocisof {X Y : setwithbinop} (f : binopiso X Y) (is : isassoc (@op X)) : isassoc (@op Y). Proof. apply (isassocmonob (invbinopiso f) is). Qed.
Lemma
Algebra
null
Algebra\BinaryOperations.v
isassocisof
536
Lemma iscommisof {X Y : setwithbinop} (f : binopiso X Y) (is : iscomm (@op X)) : iscomm (@op Y). Proof. apply (iscommmonob (invbinopiso f) is). Qed.
Lemma
Algebra
null
Algebra\BinaryOperations.v
iscommisof
537
Lemma isunitisof {X Y : setwithbinop} (f : binopiso X Y) (unx : X) (is : isunit (@op X) unx) : isunit (@op Y) (f unx). Proof. set (axf := pr2 f). split. - intro a. change (f unx) with (pr1 f unx). apply (invmaponpathsweq (pr1 (invbinopiso f))). rewrite (pr2 (invbinopiso f) (pr1 f unx) a). simpl. rewrite (homotinvweqweq (pr1 f) unx). apply (pr1 is). - intro a. change (f unx) with (pr1 f unx). apply (invmaponpathsweq (pr1 (invbinopiso f))). rewrite (pr2 (invbinopiso f) a (pr1 f unx)). simpl. rewrite (homotinvweqweq (pr1 f) unx). apply (pr2 is). Qed.
Lemma
Algebra
null
Algebra\BinaryOperations.v
isunitisof
538
Definition isunitalisof {X Y : setwithbinop} (f : binopiso X Y) (is : isunital (@op X)) : isunital (@op Y) := make_isunital (f (pr1 is)) (isunitisof f (pr1 is) (pr2 is)).
Definition
Algebra
null
Algebra\BinaryOperations.v
isunitalisof
539
Lemma isunitisob {X Y : setwithbinop} (f : binopiso X Y) (uny : Y) (is : isunit (@op Y) uny) : isunit (@op X) ((invmap f) uny). Proof. set (int := isunitisof (invbinopiso f)). simpl. simpl in int. apply int. apply is. Qed.
Lemma
Algebra
null
Algebra\BinaryOperations.v
isunitisob
540
Definition isunitalisob {X Y : setwithbinop} (f : binopiso X Y) (is : isunital (@op Y)) : isunital (@op X) := make_isunital ((invmap f) (pr1 is)) (isunitisob f (pr1 is) (pr2 is)).
Definition
Algebra
null
Algebra\BinaryOperations.v
isunitalisob
541
Definition ismonoidopisof {X Y : setwithbinop} (f : binopiso X Y) (is : ismonoidop (@op X)) : ismonoidop (@op Y) := isassocisof f (pr1 is) ,, isunitalisof f (pr2 is).
Definition
Algebra
null
Algebra\BinaryOperations.v
ismonoidopisof
542
Definition ismonoidopisob {X Y : setwithbinop} (f : binopiso X Y) (is : ismonoidop (@op Y)) : ismonoidop (@op X) := isassocisob f (pr1 is) ,, isunitalisob f (pr2 is).
Definition
Algebra
null
Algebra\BinaryOperations.v
ismonoidopisob
543
Lemma isinvisof {X Y : setwithbinop} (f : binopiso X Y) (unx : X) (invx : X β†’ X) (is : isinv (@op X) unx invx) : isinv (@op Y) (pr1 f unx) ((pr1 f) ∘ invx ∘ invmap (pr1 f)). Proof. set (axf := pr2 f). set (axinvf := pr2 (invbinopiso f)). simpl in axf, axinvf. split. - intro a. apply (invmaponpathsweq (pr1 (invbinopiso f))). simpl. rewrite (axinvf ((pr1 f) (invx (invmap (pr1 f) a))) a). rewrite (homotinvweqweq (pr1 f) unx). rewrite (homotinvweqweq (pr1 f) (invx (invmap (pr1 f) a))). apply (pr1 is). - intro a. apply (invmaponpathsweq (pr1 (invbinopiso f))). simpl. rewrite (axinvf a ((pr1 f) (invx (invmap (pr1 f) a)))). rewrite (homotinvweqweq (pr1 f) unx). rewrite (homotinvweqweq (pr1 f) (invx (invmap (pr1 f) a))). apply (pr2 is). Qed.
Lemma
Algebra
null
Algebra\BinaryOperations.v
isinvisof
544
Definition isgropisof {X Y : setwithbinop} (f : binopiso X Y) (is : isgrop (@op X)) : isgrop (@op Y) := ismonoidopisof f is ,, (f ∘ grinv_is is ∘ invmap f) ,, isinvisof f (unel_is is) (grinv_is is) (pr2 (pr2 is)).
Definition
Algebra
null
Algebra\BinaryOperations.v
isgropisof
545
Lemma isinvisob {X Y : setwithbinop} (f : binopiso X Y) (uny : Y) (invy : Y β†’ Y) (is : isinv (@op Y) uny invy) : isinv (@op X) (invmap (pr1 f) uny) (invmap f ∘ invy ∘ f). Proof. apply (isinvisof (invbinopiso f) uny invy is). Qed.
Lemma
Algebra
null
Algebra\BinaryOperations.v
isinvisob
546
Definition isgropisob {X Y : setwithbinop} (f : binopiso X Y) (is : isgrop (@op Y)) : isgrop (@op X) := ismonoidopisob f is ,, invmap f ∘ grinv_is is ∘ f ,, isinvisob f (unel_is is) (grinv_is is) (pr2 (pr2 is)).
Definition
Algebra
null
Algebra\BinaryOperations.v
isgropisob
547
Definition isabmonoidopisof {X Y : setwithbinop} (f : binopiso X Y) (is : isabmonoidop (@op X)) : isabmonoidop (@op Y) := ismonoidopisof f is ,, iscommisof f (commax_is is).
Definition
Algebra
null
Algebra\BinaryOperations.v
isabmonoidopisof
548
Definition isabmonoidopisob {X Y : setwithbinop} (f : binopiso X Y) (is : isabmonoidop (@op Y)) : isabmonoidop (@op X) := ismonoidopisob f is ,, iscommisob f (commax_is is).
Definition
Algebra
null
Algebra\BinaryOperations.v
isabmonoidopisob
549
Definition isabgropisof {X Y : setwithbinop} (f : binopiso X Y) (is : isabgrop (@op X)) : isabgrop (@op Y) := isgropisof f is ,, iscommisof f (commax_is is).
Definition
Algebra
null
Algebra\BinaryOperations.v
isabgropisof
550
Definition isabgropisob {X Y : setwithbinop} (f : binopiso X Y) (is : isabgrop (@op Y)) : isabgrop (@op X) := isgropisob f is ,, iscommisob f (commax_is is).
Definition
Algebra
null
Algebra\BinaryOperations.v
isabgropisob
551
Definition issubsetwithbinop {X : hSet} (opp : binop X) (A : hsubtype X) : UU := ∏ a a' : A, A (opp (pr1 a) (pr1 a')).
Definition
Algebra
null
Algebra\BinaryOperations.v
issubsetwithbinop
552
Lemma isapropissubsetwithbinop {X : hSet} (opp : binop X) (A : hsubtype X) : isaprop (issubsetwithbinop opp A). Proof. apply impred. intro a. apply impred. intros a'. apply (pr2 (A (opp (pr1 a) (pr1 a')))). Defined.
Lemma
Algebra
null
Algebra\BinaryOperations.v
isapropissubsetwithbinop
553
Definition subsetswithbinop (X : setwithbinop) : UU := βˆ‘ (A : hsubtype X), issubsetwithbinop (@op X) A.
Definition
Algebra
null
Algebra\BinaryOperations.v
subsetswithbinop
554
Definition make_subsetswithbinop {X : setwithbinop} (t : hsubtype X) (H : issubsetwithbinop op t) : subsetswithbinop X := t ,, H.
Definition
Algebra
null
Algebra\BinaryOperations.v
make_subsetswithbinop
555
Definition subsetswithbinopconstr {X : setwithbinop} : ∏ (t : hsubtype X), (Ξ» A : hsubtype X, issubsetwithbinop op A) t β†’ βˆ‘ A : hsubtype X, issubsetwithbinop op A := @make_subsetswithbinop X.
Definition
Algebra
null
Algebra\BinaryOperations.v
subsetswithbinopconstr
556
Definition pr1subsetswithbinop (X : setwithbinop) : subsetswithbinop X β†’ hsubtype X := @pr1 _ (Ξ» A : hsubtype X, issubsetwithbinop (@op X) A).
Definition
Algebra
null
Algebra\BinaryOperations.v
pr1subsetswithbinop
557
Definition pr2subsetswithbinop {X : setwithbinop} (Y : subsetswithbinop X) : issubsetwithbinop (@op X) (pr1subsetswithbinop X Y) := pr2 Y.
Definition
Algebra
null
Algebra\BinaryOperations.v
pr2subsetswithbinop
558
Definition totalsubsetwithbinop (X : setwithbinop) : subsetswithbinop X. Proof. exists (Ξ» x : X, htrue). intros x x'. apply tt. Defined.
Definition
Algebra
null
Algebra\BinaryOperations.v
totalsubsetwithbinop
559
Definition carrierofasubsetwithbinop {X : setwithbinop} (A : subsetswithbinop X) : setwithbinop. Proof. set (aset := (make_hSet (carrier A) (isasetsubset (pr1carrier A) (setproperty X) (isinclpr1carrier A))) : hSet). exists aset. set (subopp := (Ξ» a a' : A, make_carrier A (op (pr1carrier _ a) (pr1carrier _ a')) (pr2 A a a')) : (A β†’ A β†’ A)). simpl. unfold binop. apply subopp. Defined.
Definition
Algebra
null
Algebra\BinaryOperations.v
carrierofasubsetwithbinop
560
Definition isbinophrel {X : setwithbinop} (R : hrel X) : UU := (∏ a b c : X, R a b β†’ R (op c a) (op c b)) Γ— (∏ a b c : X, R a b β†’ R (op a c) (op b c)).
Definition
Algebra
null
Algebra\BinaryOperations.v
isbinophrel
561
Definition make_isbinophrel {X : setwithbinop} {R : hrel X} (H1 : ∏ a b c : X, R a b β†’ R (op c a) (op c b)) (H2 : ∏ a b c : X, R a b β†’ R (op a c) (op b c)) : isbinophrel R := H1 ,, H2.
Definition
Algebra
null
Algebra\BinaryOperations.v
make_isbinophrel
562
Definition isbinophrellogeqf {X : setwithbinop} {L R : hrel X} (lg : hrellogeq L R) (isl : isbinophrel L) : isbinophrel R. Proof. split. - intros a b c rab. apply ((pr1 (lg _ _) ((pr1 isl) _ _ _ (pr2 (lg _ _) rab)))). - intros a b c rab. apply ((pr1 (lg _ _) ((pr2 isl) _ _ _ (pr2 (lg _ _) rab)))). Defined.
Definition
Algebra
null
Algebra\BinaryOperations.v
isbinophrellogeqf
563
Lemma isapropisbinophrel {X : setwithbinop} (R : hrel X) : isaprop (isbinophrel R). Proof. apply isapropdirprod. - apply impred. intro a. apply impred. intro b. apply impred. intro c. apply impred. intro r. apply (pr2 (R _ _)). - apply impred. intro a. apply impred. intro b. apply impred. intro c. apply impred. intro r. apply (pr2 (R _ _)). Defined.
Lemma
Algebra
null
Algebra\BinaryOperations.v
isapropisbinophrel
564
Lemma isbinophrelif {X : setwithbinop} (R : hrel X) (is : iscomm (@op X)) (isl : ∏ a b c : X, R a b β†’ R (op c a) (op c b)) : isbinophrel R. Proof. exists isl. intros a b c rab. induction (is c a). induction (is c b). apply (isl _ _ _ rab). Defined.
Lemma
Algebra
null
Algebra\BinaryOperations.v
isbinophrelif
565
Lemma iscompbinoptransrel {X : setwithbinop} (R : hrel X) (ist : istrans R) (isb : isbinophrel R) : iscomprelrelfun2 R R (@op X). Proof. intros a b c d. intros rab rcd. set (racbc := pr2 isb a b c rab). set (rbcbd := pr1 isb c d b rcd). apply (ist _ _ _ racbc rbcbd). Defined.
Lemma
Algebra
null
Algebra\BinaryOperations.v
iscompbinoptransrel
566
Lemma isbinopreflrel {X : setwithbinop} (R : hrel X) (isr : isrefl R) (isb : iscomprelrelfun2 R R (@op X)) : isbinophrel R. Proof. split. - intros a b c rab. apply (isb c c a b (isr c) rab). - intros a b c rab. apply (isb a b c c rab (isr c)). Defined.
Lemma
Algebra
null
Algebra\BinaryOperations.v
isbinopreflrel
567
Definition binophrel (X : setwithbinop) : UU := βˆ‘ (R : hrel X), isbinophrel R.
Definition
Algebra
null
Algebra\BinaryOperations.v
binophrel
568
Definition make_binophrel {X : setwithbinop} (t : hrel X) (H : isbinophrel t) : binophrel X := t ,, H.
Definition
Algebra
null
Algebra\BinaryOperations.v
make_binophrel
569
Definition pr1binophrel (X : setwithbinop) : binophrel X β†’ hrel X := @pr1 _ (Ξ» R : hrel X, isbinophrel R).
Definition
Algebra
null
Algebra\BinaryOperations.v
pr1binophrel
570
Definition binophrel_resp_left {X : setwithbinop} (R : binophrel X) {a b : X} (c : X) (r : R a b) : R (op c a) (op c b) := pr1 (pr2 R) a b c r.
Definition
Algebra
null
Algebra\BinaryOperations.v
binophrel_resp_left
571
Definition binophrel_resp_right {X : setwithbinop} (R : binophrel X) {a b : X} (c : X) (r : R a b) : R (op a c) (op b c) := pr2 (pr2 R) a b c r.
Definition
Algebra
null
Algebra\BinaryOperations.v
binophrel_resp_right
572
Definition binoppo (X : setwithbinop) : UU := βˆ‘ (R : po X), isbinophrel R.
Definition
Algebra
null
Algebra\BinaryOperations.v
binoppo
573
Definition make_binoppo {X : setwithbinop} (t : po X) (H : isbinophrel t) : binoppo X := t ,, H.
Definition
Algebra
null
Algebra\BinaryOperations.v
make_binoppo
574
Definition pr1binoppo (X : setwithbinop) : binoppo X β†’ po X := @pr1 _ (Ξ» R : po X, isbinophrel R).
Definition
Algebra
null
Algebra\BinaryOperations.v
pr1binoppo
575
Definition binopeqrel (X : setwithbinop) : UU := βˆ‘ (R : eqrel X), isbinophrel R.
Definition
Algebra
null
Algebra\BinaryOperations.v
binopeqrel
576
Definition make_binopeqrel {X : setwithbinop} (t : eqrel X) (H : isbinophrel t) : binopeqrel X := t ,, H.
Definition
Algebra
null
Algebra\BinaryOperations.v
make_binopeqrel
577
Definition pr1binopeqrel (X : setwithbinop) : binopeqrel X β†’ eqrel X := @pr1 _ (Ξ» R : eqrel X, isbinophrel R).
Definition
Algebra
null
Algebra\BinaryOperations.v
pr1binopeqrel
578
Definition binopeqrel_resp_left {X : setwithbinop} (R : binopeqrel X) {a b : X} (c : X) (r : R a b) : R (op c a) (op c b) := pr1 (pr2 R) a b c r.
Definition
Algebra
null
Algebra\BinaryOperations.v
binopeqrel_resp_left
579
Definition binopeqrel_resp_right {X : setwithbinop} (R : binopeqrel X) {a b : X} (c : X) (r : R a b) : R (op a c) (op b c) := pr2 (pr2 R) a b c r.
Definition
Algebra
null
Algebra\BinaryOperations.v
binopeqrel_resp_right
580
Definition setwithbinopquot {X : setwithbinop} (R : binopeqrel X) : setwithbinop. Proof. exists (setquotinset R). set (qt := setquot R). set (qtset := setquotinset R). assert (iscomp : iscomprelrelfun2 R R op) by apply (iscompbinoptransrel R (eqreltrans R) (pr2 R)). set (qtmlt := setquotfun2 R R op iscomp). simpl. unfold binop. apply qtmlt. Defined.
Definition
Algebra
null
Algebra\BinaryOperations.v
setwithbinopquot
581
Definition ispartbinophrel {X : setwithbinop} (S : hsubtype X) (R : hrel X) : UU := (∏ a b c : X, S c β†’ R a b β†’ R (op c a) (op c b)) Γ— (∏ a b c : X, S c β†’ R a b β†’ R (op a c) (op b c)).
Definition
Algebra
null
Algebra\BinaryOperations.v
ispartbinophrel
582
Lemma isaprop_ispartbinophrel {X : setwithbinop} (S : hsubtype X) (R : hrel X) : isaprop (ispartbinophrel S R). Proof. apply isapropdirprod ; apply impred_isaprop ; intros a ; apply impred_isaprop ; intros b ; apply impred_isaprop ; intros c ; apply isapropimpl, isapropimpl, propproperty. Defined.
Lemma
Algebra
null
Algebra\BinaryOperations.v
isaprop_ispartbinophrel
583
Definition isbinoptoispartbinop {X : setwithbinop} (S : hsubtype X) (L : hrel X) (d2 : isbinophrel L) : ispartbinophrel S L. Proof. unfold isbinophrel in d2. unfold ispartbinophrel. split. - intros a b c is. apply (pr1 d2 a b c). - intros a b c is. apply (pr2 d2 a b c). Defined.
Definition
Algebra
null
Algebra\BinaryOperations.v
isbinoptoispartbinop
584
Definition ispartbinophrellogeqf {X : setwithbinop} (S : hsubtype X) {L R : hrel X} (lg : hrellogeq L R) (isl : ispartbinophrel S L) : ispartbinophrel S R. Proof. split. - intros a b c is rab. apply ((pr1 (lg _ _) ((pr1 isl) _ _ _ is (pr2 (lg _ _) rab)))). - intros a b c is rab. apply ((pr1 (lg _ _) ((pr2 isl) _ _ _ is (pr2 (lg _ _) rab)))). Defined.
Definition
Algebra
null
Algebra\BinaryOperations.v
ispartbinophrellogeqf
585
Lemma ispartbinophrelif {X : setwithbinop} (S : hsubtype X) (R : hrel X) (is : iscomm (@op X)) (isl : ∏ a b c : X, S c β†’ R a b β†’ R (op c a) (op c b)) : ispartbinophrel S R. Proof. exists isl. intros a b c s rab. induction (is c a). induction (is c b). apply (isl _ _ _ s rab). Defined.
Lemma
Algebra
null
Algebra\BinaryOperations.v
ispartbinophrelif
586
Definition generated_binophrel_hrel {X : setwithbinop} (R : hrel X) : hrel X := Ξ» x x', βˆ€(R' : binophrel X), (∏ x₁ xβ‚‚, R x₁ xβ‚‚ β†’ R' x₁ xβ‚‚) β‡’ R' x x'.
Definition
Algebra
null
Algebra\BinaryOperations.v
generated_binophrel_hrel
587
Lemma isbinophrel_generated_binophrel {X : setwithbinop} (R : hrel X) : isbinophrel (generated_binophrel_hrel R). Proof. split. - intros a b c H R' H2. apply binophrel_resp_left. exact (H R' H2). - intros a b c H R' H2. apply binophrel_resp_right. exact (H R' H2). Defined.
Lemma
Algebra
null
Algebra\BinaryOperations.v
isbinophrel_generated_binophrel
588
Definition generated_binophrel {X : setwithbinop} (R : hrel X) : binophrel X := make_binophrel (generated_binophrel_hrel R) (isbinophrel_generated_binophrel R).
Definition
Algebra
null
Algebra\BinaryOperations.v
generated_binophrel
589
Lemma generated_binophrel_intro {X : setwithbinop} {R : hrel X} {x x' : X} (r : R x x') : generated_binophrel R x x'. Proof. intros R' H. exact (H x x' r). Defined.
Lemma
Algebra
null
Algebra\BinaryOperations.v
generated_binophrel_intro
590
Definition generated_binopeqrel_hrel {X : setwithbinop} (R : hrel X) : hrel X := Ξ» x x', βˆ€(R' : binopeqrel X), (∏ x₁ xβ‚‚, R x₁ xβ‚‚ β†’ R' x₁ xβ‚‚) β‡’ R' x x'.
Definition
Algebra
null
Algebra\BinaryOperations.v
generated_binopeqrel_hrel
591
Lemma isbinophrel_generated_binopeqrel {X : setwithbinop} (R : hrel X) : isbinophrel (generated_binopeqrel_hrel R). Proof. split. - intros a b c H R' H2. apply binopeqrel_resp_left. exact (H R' H2). - intros a b c H R' H2. apply binopeqrel_resp_right. exact (H R' H2). Defined.
Lemma
Algebra
null
Algebra\BinaryOperations.v
isbinophrel_generated_binopeqrel
592
Lemma iseqrel_generated_binopeqrel {X : setwithbinop} (R : hrel X) : iseqrel (generated_binopeqrel_hrel R). Proof. use iseqrelconstr. - intros x1 x2 x3 H1 H2 R' HR. eapply eqreltrans. + exact (H1 R' HR). + exact (H2 R' HR). - intros x R' HR. apply eqrelrefl. - intros x1 x2 H R' HR. apply eqrelsymm. exact (H R' HR). Defined.
Lemma
Algebra
null
Algebra\BinaryOperations.v
iseqrel_generated_binopeqrel
593
Definition generated_binopeqrel {X : setwithbinop} (R : hrel X) : binopeqrel X := make_binopeqrel (make_eqrel (generated_binopeqrel_hrel R) (iseqrel_generated_binopeqrel R)) (isbinophrel_generated_binopeqrel R).
Definition
Algebra
null
Algebra\BinaryOperations.v
generated_binopeqrel
594
Lemma generated_binopeqrel_intro {X : setwithbinop} {R : hrel X} {x x' : X} (r : R x x') : generated_binopeqrel R x x'. Proof. intros R' H. exact (H x x' r). Defined.
Lemma
Algebra
null
Algebra\BinaryOperations.v
generated_binopeqrel_intro
595
Definition pullback_binopeqrel {X Y : setwithbinop} (f : binopfun X Y) (R : binopeqrel Y) : binopeqrel X. Proof. use make_binopeqrel. - use make_eqrel. + intros x x'. exact (R (f x) (f x')). + apply iseqrelconstr. * intros x1 x2 x3 r1 r2. exact (eqreltrans R _ _ _ r1 r2). * intro x. exact (eqrelrefl R _). * intros x x' r. exact (eqrelsymm R _ _ r). - apply make_isbinophrel; simpl; intros x1 x2 x3 r; rewrite !binopfunisbinopfun. + exact (binopeqrel_resp_left R _ r). + exact (binopeqrel_resp_right R _ r). Defined.
Definition
Algebra
null
Algebra\BinaryOperations.v
pullback_binopeqrel
596
Definition pullback_binopeqrel_rev {X Y : setwithbinop} (f : binopfun X (setwithbinop_rev Y)) (R : binopeqrel Y) : binopeqrel X. Proof. apply (pullback_binopeqrel f). use make_binopeqrel. - exact R. - apply make_isbinophrel; intros x1 x2 x3 r; apply (pr2 R); exact r. Defined.
Definition
Algebra
null
Algebra\BinaryOperations.v
pullback_binopeqrel_rev
597
Definition binopeqrel_eq (X : setwithbinop) : binopeqrel X. Proof. use make_binopeqrel. - use make_eqrel. + intros x x'. exact (make_hProp (x = x') (pr2 (pr1 X) _ _)). + apply iseqrelconstr. * intros x1 x2 x3 r1 r2. exact (r1 @ r2). * intro x. reflexivity. * intros x x' r. exact (!r). - apply make_isbinophrel; simpl; intros x1 x2 x3 r; rewrite r; reflexivity. Defined.
Definition
Algebra
null
Algebra\BinaryOperations.v
binopeqrel_eq
598
Definition binopeqrel_of_binopfun {X Y : setwithbinop} (f : binopfun X Y) : binopeqrel X := pullback_binopeqrel f (binopeqrel_eq Y).
Definition
Algebra
null
Algebra\BinaryOperations.v
binopeqrel_of_binopfun
599