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
|
---|---|---|---|---|---|---|
Lemma isirreflapSet {X : apSet} : β x : X, Β¬ (x # x). Proof. exact (pr1 (pr2 (pr2 X))). Qed. | Lemma | Algebra | Require Import UniMath.Foundations.Propositions. Require Import UniMath.MoreFoundations.Sets. Require Import UniMath.MoreFoundations.Tactics. Require Import UniMath.MoreFoundations.DecidablePropositions. | Algebra\Apartness.v | isirreflapSet | 200 |
Lemma issymmapSet {X : apSet} : β x y : X, x # y β y # x. Proof. exact (pr1 (pr2 (pr2 (pr2 X)))). Qed. | Lemma | Algebra | Require Import UniMath.Foundations.Propositions. Require Import UniMath.MoreFoundations.Sets. Require Import UniMath.MoreFoundations.Tactics. Require Import UniMath.MoreFoundations.DecidablePropositions. | Algebra\Apartness.v | issymmapSet | 201 |
Lemma iscotransapSet {X : apSet} : β x y z : X, x # z β x # y β¨ y # z. Proof. exact (pr2 (pr2 (pr2 (pr2 X)))). Qed. | Lemma | Algebra | Require Import UniMath.Foundations.Propositions. Require Import UniMath.MoreFoundations.Sets. Require Import UniMath.MoreFoundations.Tactics. Require Import UniMath.MoreFoundations.DecidablePropositions. | Algebra\Apartness.v | iscotransapSet | 202 |
Definition istight {X : UU} (R : hrel X) := β x y : X, Β¬ (R x y) β x = y. | Definition | Algebra | Require Import UniMath.Foundations.Propositions. Require Import UniMath.MoreFoundations.Sets. Require Import UniMath.MoreFoundations.Tactics. Require Import UniMath.MoreFoundations.DecidablePropositions. | Algebra\Apartness.v | istight | 203 |
Definition istightap {X : UU} (ap : hrel X) := isaprel ap Γ istight ap. | Definition | Algebra | Require Import UniMath.Foundations.Propositions. Require Import UniMath.MoreFoundations.Sets. Require Import UniMath.MoreFoundations.Tactics. Require Import UniMath.MoreFoundations.DecidablePropositions. | Algebra\Apartness.v | istightap | 204 |
Definition tightap (X : UU) := β ap : hrel X, istightap ap. | Definition | Algebra | Require Import UniMath.Foundations.Propositions. Require Import UniMath.MoreFoundations.Sets. Require Import UniMath.MoreFoundations.Tactics. Require Import UniMath.MoreFoundations.DecidablePropositions. | Algebra\Apartness.v | tightap | 205 |
Definition tightap_aprel {X : UU} (ap : tightap X) : aprel X := pr1 ap ,, (pr1 (pr2 ap)). | Definition | Algebra | Require Import UniMath.Foundations.Propositions. Require Import UniMath.MoreFoundations.Sets. Require Import UniMath.MoreFoundations.Tactics. Require Import UniMath.MoreFoundations.DecidablePropositions. | Algebra\Apartness.v | tightap_aprel | 206 |
Definition tightapSet := β X : hSet, tightap X. | Definition | Algebra | Require Import UniMath.Foundations.Propositions. Require Import UniMath.MoreFoundations.Sets. Require Import UniMath.MoreFoundations.Tactics. Require Import UniMath.MoreFoundations.DecidablePropositions. | Algebra\Apartness.v | tightapSet | 207 |
Definition tightapSet_apSet (X : tightapSet) : apSet := pr1 X ,, (tightap_aprel (pr2 X)). | Definition | Algebra | Require Import UniMath.Foundations.Propositions. Require Import UniMath.MoreFoundations.Sets. Require Import UniMath.MoreFoundations.Tactics. Require Import UniMath.MoreFoundations.DecidablePropositions. | Algebra\Apartness.v | tightapSet_apSet | 208 |
Definition tightapSet_rel (X : tightapSet) : hrel X := (pr1 (pr2 X)). | Definition | Algebra | Require Import UniMath.Foundations.Propositions. Require Import UniMath.MoreFoundations.Sets. Require Import UniMath.MoreFoundations.Tactics. Require Import UniMath.MoreFoundations.DecidablePropositions. | Algebra\Apartness.v | tightapSet_rel | 209 |
Lemma isirrefltightapSet {X : tightapSet} : β x : X, Β¬ (x β x). Proof. exact isirreflapSet. Qed. | Lemma | Algebra | Require Import UniMath.Foundations.Propositions. Require Import UniMath.MoreFoundations.Sets. Require Import UniMath.MoreFoundations.Tactics. Require Import UniMath.MoreFoundations.DecidablePropositions. | Algebra\Apartness.v | isirrefltightapSet | 210 |
Lemma issymmtightapSet {X : tightapSet} : β x y : X, x β y β y β x. Proof. exact issymmapSet. Qed. | Lemma | Algebra | Require Import UniMath.Foundations.Propositions. Require Import UniMath.MoreFoundations.Sets. Require Import UniMath.MoreFoundations.Tactics. Require Import UniMath.MoreFoundations.DecidablePropositions. | Algebra\Apartness.v | issymmtightapSet | 211 |
Lemma iscotranstightapSet {X : tightapSet} : β x y z : X, x β z β x β y β¨ y β z. Proof. exact iscotransapSet. Qed. | Lemma | Algebra | Require Import UniMath.Foundations.Propositions. Require Import UniMath.MoreFoundations.Sets. Require Import UniMath.MoreFoundations.Tactics. Require Import UniMath.MoreFoundations.DecidablePropositions. | Algebra\Apartness.v | iscotranstightapSet | 212 |
Lemma istighttightapSet {X : tightapSet} : β x y : X, Β¬ (x β y) β x = y. Proof. exact (pr2 (pr2 (pr2 X))). Qed. | Lemma | Algebra | Require Import UniMath.Foundations.Propositions. Require Import UniMath.MoreFoundations.Sets. Require Import UniMath.MoreFoundations.Tactics. Require Import UniMath.MoreFoundations.DecidablePropositions. | Algebra\Apartness.v | istighttightapSet | 213 |
Lemma istighttightapSet_rev {X : tightapSet} : β x y : X, x = y β Β¬ (x β y). Proof. intros x _ <-. now apply isirrefltightapSet. Qed. | Lemma | Algebra | Require Import UniMath.Foundations.Propositions. Require Import UniMath.MoreFoundations.Sets. Require Import UniMath.MoreFoundations.Tactics. Require Import UniMath.MoreFoundations.DecidablePropositions. | Algebra\Apartness.v | istighttightapSet_rev | 214 |
Lemma tightapSet_dec {X : tightapSet} : LEM β β x y : X, (x != y <-> x β y). Proof. intros Hdec x y. destruct (Hdec (x β y)) as [ Hneq | Heq ]. - split. + intros _ ; apply Hneq. + intros _ Heq. rewrite <- Heq in Hneq. revert Hneq. now apply isirrefltightapSet. - split. + intros Hneq. apply fromempty, Hneq. now apply istighttightapSet. + intros Hneq. exact (fromempty (Heq Hneq)). Qed. | Lemma | Algebra | Require Import UniMath.Foundations.Propositions. Require Import UniMath.MoreFoundations.Sets. Require Import UniMath.MoreFoundations.Tactics. Require Import UniMath.MoreFoundations.DecidablePropositions. | Algebra\Apartness.v | tightapSet_dec | 215 |
Definition isapunop {X : tightapSet} (op :unop X) := β x y : X, op x β op y β x β y. | Definition | Algebra | Require Import UniMath.Foundations.Propositions. Require Import UniMath.MoreFoundations.Sets. Require Import UniMath.MoreFoundations.Tactics. Require Import UniMath.MoreFoundations.DecidablePropositions. | Algebra\Apartness.v | isapunop | 216 |
Lemma isaprop_isapunop {X : tightapSet} (op :unop X) : isaprop (isapunop op). Proof. intros ap. apply impred_isaprop ; intro x. apply impred_isaprop ; intro y. apply isapropimpl. now apply pr2. Qed. | Lemma | Algebra | Require Import UniMath.Foundations.Propositions. Require Import UniMath.MoreFoundations.Sets. Require Import UniMath.MoreFoundations.Tactics. Require Import UniMath.MoreFoundations.DecidablePropositions. | Algebra\Apartness.v | isaprop_isapunop | 217 |
Definition islapbinop {X : tightapSet} (op : binop X) := β x, isapunop (Ξ» y, op y x). | Definition | Algebra | Require Import UniMath.Foundations.Propositions. Require Import UniMath.MoreFoundations.Sets. Require Import UniMath.MoreFoundations.Tactics. Require Import UniMath.MoreFoundations.DecidablePropositions. | Algebra\Apartness.v | islapbinop | 218 |
Definition israpbinop {X : tightapSet} (op : binop X) := β x, isapunop (Ξ» y, op x y). | Definition | Algebra | Require Import UniMath.Foundations.Propositions. Require Import UniMath.MoreFoundations.Sets. Require Import UniMath.MoreFoundations.Tactics. Require Import UniMath.MoreFoundations.DecidablePropositions. | Algebra\Apartness.v | israpbinop | 219 |
Definition isapbinop {X : tightapSet} (op : binop X) := (islapbinop op) Γ (israpbinop op). | Definition | Algebra | Require Import UniMath.Foundations.Propositions. Require Import UniMath.MoreFoundations.Sets. Require Import UniMath.MoreFoundations.Tactics. Require Import UniMath.MoreFoundations.DecidablePropositions. | Algebra\Apartness.v | isapbinop | 220 |
Lemma isaprop_islapbinop {X : tightapSet} (op : binop X) : isaprop (islapbinop op). Proof. apply impred_isaprop ; intro x. now apply isaprop_isapunop. Qed. | Lemma | Algebra | Require Import UniMath.Foundations.Propositions. Require Import UniMath.MoreFoundations.Sets. Require Import UniMath.MoreFoundations.Tactics. Require Import UniMath.MoreFoundations.DecidablePropositions. | Algebra\Apartness.v | isaprop_islapbinop | 221 |
Lemma isaprop_israpbinop {X : tightapSet} (op : binop X) : isaprop (israpbinop op). Proof. apply impred_isaprop ; intro x. now apply isaprop_isapunop. Qed. | Lemma | Algebra | Require Import UniMath.Foundations.Propositions. Require Import UniMath.MoreFoundations.Sets. Require Import UniMath.MoreFoundations.Tactics. Require Import UniMath.MoreFoundations.DecidablePropositions. | Algebra\Apartness.v | isaprop_israpbinop | 222 |
Lemma isaprop_isapbinop {X : tightapSet} (op :binop X) : isaprop (isapbinop op). Proof. intros ap. apply isapropdirprod. now apply isaprop_islapbinop. now apply isaprop_israpbinop. Qed. | Lemma | Algebra | Require Import UniMath.Foundations.Propositions. Require Import UniMath.MoreFoundations.Sets. Require Import UniMath.MoreFoundations.Tactics. Require Import UniMath.MoreFoundations.DecidablePropositions. | Algebra\Apartness.v | isaprop_isapbinop | 223 |
Definition apbinop (X : tightapSet) := β op : binop X, isapbinop op. | Definition | Algebra | Require Import UniMath.Foundations.Propositions. Require Import UniMath.MoreFoundations.Sets. Require Import UniMath.MoreFoundations.Tactics. Require Import UniMath.MoreFoundations.DecidablePropositions. | Algebra\Apartness.v | apbinop | 224 |
Definition apbinop_pr1 {X : tightapSet} (op : apbinop X) : binop X := pr1 op. | Definition | Algebra | Require Import UniMath.Foundations.Propositions. Require Import UniMath.MoreFoundations.Sets. Require Import UniMath.MoreFoundations.Tactics. Require Import UniMath.MoreFoundations.DecidablePropositions. | Algebra\Apartness.v | apbinop_pr1 | 225 |
Definition apsetwithbinop := β X : tightapSet, apbinop X. | Definition | Algebra | Require Import UniMath.Foundations.Propositions. Require Import UniMath.MoreFoundations.Sets. Require Import UniMath.MoreFoundations.Tactics. Require Import UniMath.MoreFoundations.DecidablePropositions. | Algebra\Apartness.v | apsetwithbinop | 226 |
Definition apsetwithbinop_pr1 (X : apsetwithbinop) : tightapSet := pr1 X. | Definition | Algebra | Require Import UniMath.Foundations.Propositions. Require Import UniMath.MoreFoundations.Sets. Require Import UniMath.MoreFoundations.Tactics. Require Import UniMath.MoreFoundations.DecidablePropositions. | Algebra\Apartness.v | apsetwithbinop_pr1 | 227 |
Definition apsetwithbinop_setwithbinop : apsetwithbinop β setwithbinop := Ξ» X : apsetwithbinop, (apSet_pr1 (apsetwithbinop_pr1 X)),, (pr1 (pr2 X)). | Definition | Algebra | Require Import UniMath.Foundations.Propositions. Require Import UniMath.MoreFoundations.Sets. Require Import UniMath.MoreFoundations.Tactics. Require Import UniMath.MoreFoundations.DecidablePropositions. | Algebra\Apartness.v | apsetwithbinop_setwithbinop | 228 |
Definition op {X : apsetwithbinop} : binop X := op (X := apsetwithbinop_setwithbinop X). | Definition | Algebra | Require Import UniMath.Foundations.Propositions. Require Import UniMath.MoreFoundations.Sets. Require Import UniMath.MoreFoundations.Tactics. Require Import UniMath.MoreFoundations.DecidablePropositions. | Algebra\Apartness.v | op | 229 |
Definition apsetwith2binop := β X : tightapSet, apbinop X Γ apbinop X. | Definition | Algebra | Require Import UniMath.Foundations.Propositions. Require Import UniMath.MoreFoundations.Sets. Require Import UniMath.MoreFoundations.Tactics. Require Import UniMath.MoreFoundations.DecidablePropositions. | Algebra\Apartness.v | apsetwith2binop | 230 |
Definition apsetwith2binop_pr1 (X : apsetwith2binop) : tightapSet := pr1 X. | Definition | Algebra | Require Import UniMath.Foundations.Propositions. Require Import UniMath.MoreFoundations.Sets. Require Import UniMath.MoreFoundations.Tactics. Require Import UniMath.MoreFoundations.DecidablePropositions. | Algebra\Apartness.v | apsetwith2binop_pr1 | 231 |
Definition apsetwith2binop_setwith2binop : apsetwith2binop β setwith2binop := Ξ» X : apsetwith2binop, apSet_pr1 (apsetwith2binop_pr1 X),, pr1 (pr1 (pr2 X)),, pr1 (pr2 (pr2 X)). | Definition | Algebra | Require Import UniMath.Foundations.Propositions. Require Import UniMath.MoreFoundations.Sets. Require Import UniMath.MoreFoundations.Tactics. Require Import UniMath.MoreFoundations.DecidablePropositions. | Algebra\Apartness.v | apsetwith2binop_setwith2binop | 232 |
Definition op1 {X : apsetwith2binop} : binop X := op1 (X := apsetwith2binop_setwith2binop X). | Definition | Algebra | Require Import UniMath.Foundations.Propositions. Require Import UniMath.MoreFoundations.Sets. Require Import UniMath.MoreFoundations.Tactics. Require Import UniMath.MoreFoundations.DecidablePropositions. | Algebra\Apartness.v | op1 | 233 |
Definition op2 {X : apsetwith2binop} : binop X := op2 (X := apsetwith2binop_setwith2binop X). | Definition | Algebra | Require Import UniMath.Foundations.Propositions. Require Import UniMath.MoreFoundations.Sets. Require Import UniMath.MoreFoundations.Tactics. Require Import UniMath.MoreFoundations.DecidablePropositions. | Algebra\Apartness.v | op2 | 234 |
Lemma islapbinop_op : β x x' y : X, op x y β op x' y β x β x'. Proof. intros x y y'. now apply (pr1 (pr2 (pr2 X))). Qed. | Lemma | Algebra | Require Import UniMath.Foundations.Propositions. Require Import UniMath.MoreFoundations.Sets. Require Import UniMath.MoreFoundations.Tactics. Require Import UniMath.MoreFoundations.DecidablePropositions. | Algebra\Apartness.v | islapbinop_op | 235 |
Lemma israpbinop_op : β x y y' : X, op x y β op x y' β y β y'. Proof. intros x y y'. now apply (pr2 (pr2 (pr2 X))). Qed. | Lemma | Algebra | Require Import UniMath.Foundations.Propositions. Require Import UniMath.MoreFoundations.Sets. Require Import UniMath.MoreFoundations.Tactics. Require Import UniMath.MoreFoundations.DecidablePropositions. | Algebra\Apartness.v | israpbinop_op | 236 |
Lemma isapbinop_op : β x x' y y' : X, op x y β op x' y' β x β x' β¨ y β y'. Proof. intros x x' y y' Hop. apply (iscotranstightapSet _ (op x' y)) in Hop. revert Hop ; apply hinhfun ; intros [Hop | Hop]. - left ; revert Hop. now apply islapbinop_op. - right ; revert Hop. now apply israpbinop_op. Qed. | Lemma | Algebra | Require Import UniMath.Foundations.Propositions. Require Import UniMath.MoreFoundations.Sets. Require Import UniMath.MoreFoundations.Tactics. Require Import UniMath.MoreFoundations.DecidablePropositions. | Algebra\Apartness.v | isapbinop_op | 237 |
Definition apsetwith2binop_apsetwithbinop1 : apsetwithbinop := (pr1 X) ,, (pr1 (pr2 X)). | Definition | Algebra | Require Import UniMath.Foundations.Propositions. Require Import UniMath.MoreFoundations.Sets. Require Import UniMath.MoreFoundations.Tactics. Require Import UniMath.MoreFoundations.DecidablePropositions. | Algebra\Apartness.v | apsetwith2binop_apsetwithbinop1 | 238 |
Definition apsetwith2binop_apsetwithbinop2 : apsetwithbinop := (pr1 X) ,, (pr2 (pr2 X)). | Definition | Algebra | Require Import UniMath.Foundations.Propositions. Require Import UniMath.MoreFoundations.Sets. Require Import UniMath.MoreFoundations.Tactics. Require Import UniMath.MoreFoundations.DecidablePropositions. | Algebra\Apartness.v | apsetwith2binop_apsetwithbinop2 | 239 |
Lemma islapbinop_op1 : β x x' y : X, op1 x y β op1 x' y β x β x'. Proof. exact (islapbinop_op (X := apsetwith2binop_apsetwithbinop1)). Qed. | Lemma | Algebra | Require Import UniMath.Foundations.Propositions. Require Import UniMath.MoreFoundations.Sets. Require Import UniMath.MoreFoundations.Tactics. Require Import UniMath.MoreFoundations.DecidablePropositions. | Algebra\Apartness.v | islapbinop_op1 | 240 |
Lemma israpbinop_op1 : β x y y' : X, op1 x y β op1 x y' β y β y'. Proof. exact (israpbinop_op (X := apsetwith2binop_apsetwithbinop1)). Qed. | Lemma | Algebra | Require Import UniMath.Foundations.Propositions. Require Import UniMath.MoreFoundations.Sets. Require Import UniMath.MoreFoundations.Tactics. Require Import UniMath.MoreFoundations.DecidablePropositions. | Algebra\Apartness.v | israpbinop_op1 | 241 |
Lemma isapbinop_op1 : β x x' y y' : X, op1 x y β op1 x' y' β x β x' β¨ y β y'. Proof. exact (isapbinop_op (X := apsetwith2binop_apsetwithbinop1)). Qed. | Lemma | Algebra | Require Import UniMath.Foundations.Propositions. Require Import UniMath.MoreFoundations.Sets. Require Import UniMath.MoreFoundations.Tactics. Require Import UniMath.MoreFoundations.DecidablePropositions. | Algebra\Apartness.v | isapbinop_op1 | 242 |
Lemma islapbinop_op2 : β x x' y : X, op2 x y β op2 x' y β x β x'. Proof. exact (islapbinop_op (X := apsetwith2binop_apsetwithbinop2)). Qed. | Lemma | Algebra | Require Import UniMath.Foundations.Propositions. Require Import UniMath.MoreFoundations.Sets. Require Import UniMath.MoreFoundations.Tactics. Require Import UniMath.MoreFoundations.DecidablePropositions. | Algebra\Apartness.v | islapbinop_op2 | 243 |
Lemma israpbinop_op2 : β x y y' : X, op2 x y β op2 x y' β y β y'. Proof. exact (israpbinop_op (X := apsetwith2binop_apsetwithbinop2)). Qed. | Lemma | Algebra | Require Import UniMath.Foundations.Propositions. Require Import UniMath.MoreFoundations.Sets. Require Import UniMath.MoreFoundations.Tactics. Require Import UniMath.MoreFoundations.DecidablePropositions. | Algebra\Apartness.v | israpbinop_op2 | 244 |
Lemma isapbinop_op2 : β x x' y y' : X, op2 x y β op2 x' y' β x β x' β¨ y β y'. Proof. exact (isapbinop_op (X := apsetwith2binop_apsetwithbinop2)). Qed. | Lemma | Algebra | Require Import UniMath.Foundations.Propositions. Require Import UniMath.MoreFoundations.Sets. Require Import UniMath.MoreFoundations.Tactics. Require Import UniMath.MoreFoundations.DecidablePropositions. | Algebra\Apartness.v | isapbinop_op2 | 245 |
Fixpoint natmult {X : monoid} (n : nat) (x : X) : X := match n with | O => 0%addmonoid | S O => x | S m => (x + natmult m x)%addmonoid end. | Fixpoint | Algebra | Require Import UniMath.Foundations.NaturalNumbers. Require Import UniMath.Algebra.RigsAndRings. Require Import UniMath.Algebra.Groups. Require Import UniMath.Algebra.DivisionRig. Require Import UniMath.Algebra.Domains_and_Fields. Require Import UniMath.Algebra.ConstructiveStructures. Require Import UniMath.MoreFoundations.Tactics. | Algebra\Archimedean.v | natmult | 246 |
Definition nattorig {X : rig} (n : nat) : X := natmult (X := rigaddabmonoid X) n 1%rig. | Definition | Algebra | Require Import UniMath.Foundations.NaturalNumbers. Require Import UniMath.Algebra.RigsAndRings. Require Import UniMath.Algebra.Groups. Require Import UniMath.Algebra.DivisionRig. Require Import UniMath.Algebra.Domains_and_Fields. Require Import UniMath.Algebra.ConstructiveStructures. Require Import UniMath.MoreFoundations.Tactics. | Algebra\Archimedean.v | nattorig | 247 |
Definition nattoring {X : ring} (n : nat) : X := nattorig (X := ringtorig X) n. | Definition | Algebra | Require Import UniMath.Foundations.NaturalNumbers. Require Import UniMath.Algebra.RigsAndRings. Require Import UniMath.Algebra.Groups. Require Import UniMath.Algebra.DivisionRig. Require Import UniMath.Algebra.Domains_and_Fields. Require Import UniMath.Algebra.ConstructiveStructures. Require Import UniMath.MoreFoundations.Tactics. | Algebra\Archimedean.v | nattoring | 248 |
Lemma natmultS : β {X : monoid} (n : nat) (x : X), natmult (S n) x = (x + natmult n x)%addmonoid. Proof. intros X n x. induction n as [|n]. - now rewrite runax. - reflexivity. Qed. | Lemma | Algebra | Require Import UniMath.Foundations.NaturalNumbers. Require Import UniMath.Algebra.RigsAndRings. Require Import UniMath.Algebra.Groups. Require Import UniMath.Algebra.DivisionRig. Require Import UniMath.Algebra.Domains_and_Fields. Require Import UniMath.Algebra.ConstructiveStructures. Require Import UniMath.MoreFoundations.Tactics. | Algebra\Archimedean.v | natmultS | 249 |
Lemma nattorigS {X : rig} : β (n : nat), nattorig (X := X) (S n) = (1 + nattorig n)%rig. Proof. intros. now apply (natmultS (X := rigaddabmonoid X)). Qed. | Lemma | Algebra | Require Import UniMath.Foundations.NaturalNumbers. Require Import UniMath.Algebra.RigsAndRings. Require Import UniMath.Algebra.Groups. Require Import UniMath.Algebra.DivisionRig. Require Import UniMath.Algebra.Domains_and_Fields. Require Import UniMath.Algebra.ConstructiveStructures. Require Import UniMath.MoreFoundations.Tactics. | Algebra\Archimedean.v | nattorigS | 250 |
Lemma nattorig_natmult : β {X : rig} (n : nat) (x : X), (nattorig n * x)%rig = natmult (X := rigaddabmonoid X) n x. Proof. intros. induction n as [|n IHn]. - now apply rigmult0x. - rewrite nattorigS, natmultS. now rewrite rigrdistr, IHn, riglunax2. Qed. | Lemma | Algebra | Require Import UniMath.Foundations.NaturalNumbers. Require Import UniMath.Algebra.RigsAndRings. Require Import UniMath.Algebra.Groups. Require Import UniMath.Algebra.DivisionRig. Require Import UniMath.Algebra.Domains_and_Fields. Require Import UniMath.Algebra.ConstructiveStructures. Require Import UniMath.MoreFoundations.Tactics. | Algebra\Archimedean.v | nattorig_natmult | 251 |
Lemma natmult_plus : β {X : monoid} (n m : nat) (x : X), natmult (n + m) x = (natmult n x + natmult m x)%addmonoid. Proof. induction n as [|n IHn] ; intros m x. - rewrite lunax. reflexivity. - change (S n + m)%nat with (S (n + m))%nat. rewrite !natmultS, IHn, assocax. reflexivity. Qed. | Lemma | Algebra | Require Import UniMath.Foundations.NaturalNumbers. Require Import UniMath.Algebra.RigsAndRings. Require Import UniMath.Algebra.Groups. Require Import UniMath.Algebra.DivisionRig. Require Import UniMath.Algebra.Domains_and_Fields. Require Import UniMath.Algebra.ConstructiveStructures. Require Import UniMath.MoreFoundations.Tactics. | Algebra\Archimedean.v | natmult_plus | 252 |
Lemma nattorig_plus : β {X : rig} (n m : nat), (nattorig (n + m) : X) = (nattorig n + nattorig m)%rig. Proof. intros X n m. apply (natmult_plus (X := rigaddabmonoid X)). Qed. | Lemma | Algebra | Require Import UniMath.Foundations.NaturalNumbers. Require Import UniMath.Algebra.RigsAndRings. Require Import UniMath.Algebra.Groups. Require Import UniMath.Algebra.DivisionRig. Require Import UniMath.Algebra.Domains_and_Fields. Require Import UniMath.Algebra.ConstructiveStructures. Require Import UniMath.MoreFoundations.Tactics. | Algebra\Archimedean.v | nattorig_plus | 253 |
Lemma natmult_mult : β {X : monoid} (n m : nat) (x : X), natmult (n * m) x = (natmult n (natmult m x))%addmonoid. Proof. induction n as [|n IHn] ; intros m x. - reflexivity. - simpl (_ * _)%nat. assert (H : S n = (n + 1)%nat). { rewrite <- plus_n_Sm, natplusr0. reflexivity. } rewrite H ; clear H. rewrite !natmult_plus, IHn. reflexivity. Qed. | Lemma | Algebra | Require Import UniMath.Foundations.NaturalNumbers. Require Import UniMath.Algebra.RigsAndRings. Require Import UniMath.Algebra.Groups. Require Import UniMath.Algebra.DivisionRig. Require Import UniMath.Algebra.Domains_and_Fields. Require Import UniMath.Algebra.ConstructiveStructures. Require Import UniMath.MoreFoundations.Tactics. | Algebra\Archimedean.v | natmult_mult | 254 |
Lemma nattorig_mult : β {X : rig} (n m : nat), (nattorig (n * m) : X) = (nattorig n * nattorig m)%rig. Proof. intros X n m. unfold nattorig. rewrite (natmult_mult (X := rigaddabmonoid X)), <- nattorig_natmult. reflexivity. Qed. | Lemma | Algebra | Require Import UniMath.Foundations.NaturalNumbers. Require Import UniMath.Algebra.RigsAndRings. Require Import UniMath.Algebra.Groups. Require Import UniMath.Algebra.DivisionRig. Require Import UniMath.Algebra.Domains_and_Fields. Require Import UniMath.Algebra.ConstructiveStructures. Require Import UniMath.MoreFoundations.Tactics. | Algebra\Archimedean.v | nattorig_mult | 255 |
Lemma natmult_op {X : monoid} : β (n : nat) (x y : X), (x + y = y + x)%addmonoid β natmult n (x + y)%addmonoid = (natmult n x + natmult n y)%addmonoid. Proof. intros. induction n as [|n IHn]. - rewrite lunax. reflexivity. - rewrite natmultS, assocax, IHn, <- (assocax _ y). assert (X1 : (y + natmult n x = natmult n x + y)%addmonoid). { clear IHn. induction n as [|n IHn]. - rewrite lunax, runax. reflexivity. - rewrite !natmultS, <- assocax, <- X0, !assocax, IHn. reflexivity. } rewrite X1, assocax, <- natmultS, <- assocax, <- natmultS. reflexivity. Qed. | Lemma | Algebra | Require Import UniMath.Foundations.NaturalNumbers. Require Import UniMath.Algebra.RigsAndRings. Require Import UniMath.Algebra.Groups. Require Import UniMath.Algebra.DivisionRig. Require Import UniMath.Algebra.Domains_and_Fields. Require Import UniMath.Algebra.ConstructiveStructures. Require Import UniMath.MoreFoundations.Tactics. | Algebra\Archimedean.v | natmult_op | 256 |
Lemma natmult_binophrel {X : monoid} (R : hrel X) : istrans R β isbinophrel R β β (n : nat) (x y : X), R x y β R (natmult (S n) x) (natmult (S n) y). Proof. intros Hr Hop n x y H. induction n as [|n IHn]. exact H. rewrite !(natmultS (S _)). eapply Hr. apply (pr1 Hop). exact IHn. apply (pr2 Hop). exact H. Qed. | Lemma | Algebra | Require Import UniMath.Foundations.NaturalNumbers. Require Import UniMath.Algebra.RigsAndRings. Require Import UniMath.Algebra.Groups. Require Import UniMath.Algebra.DivisionRig. Require Import UniMath.Algebra.Domains_and_Fields. Require Import UniMath.Algebra.ConstructiveStructures. Require Import UniMath.MoreFoundations.Tactics. | Algebra\Archimedean.v | natmult_binophrel | 257 |
Definition setquot_aux {X : monoid} (R : hrel X) : hrel X := Ξ» x y : X, β c : X, R (x + c)%addmonoid (y + c)%addmonoid. | Definition | Algebra | Require Import UniMath.Foundations.NaturalNumbers. Require Import UniMath.Algebra.RigsAndRings. Require Import UniMath.Algebra.Groups. Require Import UniMath.Algebra.DivisionRig. Require Import UniMath.Algebra.Domains_and_Fields. Require Import UniMath.Algebra.ConstructiveStructures. Require Import UniMath.MoreFoundations.Tactics. | Algebra\Archimedean.v | setquot_aux | 258 |
Lemma istrans_setquot_aux {X : abmonoid} (R : hrel X) : istrans R β isbinophrel R β istrans (setquot_aux R). Proof. intros Hr Hop. intros x y z. apply hinhfun2. intros (c1,Hc1) (c2,Hc2). exists (c1 + c2)%addmonoid. eapply Hr. rewrite <- assocax. apply (pr2 Hop). exact Hc1. rewrite assocax, (commax _ c1), <- !assocax. apply (pr2 Hop). exact Hc2. Qed. | Lemma | Algebra | Require Import UniMath.Foundations.NaturalNumbers. Require Import UniMath.Algebra.RigsAndRings. Require Import UniMath.Algebra.Groups. Require Import UniMath.Algebra.DivisionRig. Require Import UniMath.Algebra.Domains_and_Fields. Require Import UniMath.Algebra.ConstructiveStructures. Require Import UniMath.MoreFoundations.Tactics. | Algebra\Archimedean.v | istrans_setquot_aux | 259 |
Lemma isbinophrel_setquot_aux {X : abmonoid} (R : hrel X) : isbinophrel R β isbinophrel (setquot_aux R). Proof. intros Hop. split. - intros x y z. apply hinhfun. intros (c,Hc). exists c. rewrite !assocax. apply (pr1 Hop). exact Hc. - intros x y z. apply hinhfun. intros (c,Hc). exists c. rewrite !assocax, (commax _ z), <- !assocax. apply (pr2 Hop). exact Hc. Qed. | Lemma | Algebra | Require Import UniMath.Foundations.NaturalNumbers. Require Import UniMath.Algebra.RigsAndRings. Require Import UniMath.Algebra.Groups. Require Import UniMath.Algebra.DivisionRig. Require Import UniMath.Algebra.Domains_and_Fields. Require Import UniMath.Algebra.ConstructiveStructures. Require Import UniMath.MoreFoundations.Tactics. | Algebra\Archimedean.v | isbinophrel_setquot_aux | 260 |
Lemma isequiv_setquot_aux {X : abmonoid} (R : hrel X) : isinvbinophrel R β β x y : X, (setquot_aux R) x y <-> R x y. Proof. intros H x y. split. apply hinhuniv. intros (c,H'). generalize H'; clear H'. apply (pr2 H). intros H1. apply hinhpr. exists 0%addmonoid. rewrite !runax. exact H1. Qed. | Lemma | Algebra | Require Import UniMath.Foundations.NaturalNumbers. Require Import UniMath.Algebra.RigsAndRings. Require Import UniMath.Algebra.Groups. Require Import UniMath.Algebra.DivisionRig. Require Import UniMath.Algebra.Domains_and_Fields. Require Import UniMath.Algebra.ConstructiveStructures. Require Import UniMath.MoreFoundations.Tactics. | Algebra\Archimedean.v | isequiv_setquot_aux | 261 |
Definition isarchmonoid {X : abmonoid} (R : hrel X) := β x y1 y2 : X, R y1 y2 β (β n : nat, R (natmult n y1 + x)%addmonoid (natmult n y2)) Γ (β n : nat, R (natmult n y1) (natmult n y2 + x)%addmonoid). | Definition | Algebra | Require Import UniMath.Foundations.NaturalNumbers. Require Import UniMath.Algebra.RigsAndRings. Require Import UniMath.Algebra.Groups. Require Import UniMath.Algebra.DivisionRig. Require Import UniMath.Algebra.Domains_and_Fields. Require Import UniMath.Algebra.ConstructiveStructures. Require Import UniMath.MoreFoundations.Tactics. | Algebra\Archimedean.v | isarchmonoid | 262 |
Definition isarchmonoid_1 {X : abmonoid} (R : hrel X) : isarchmonoid R β β x y1 y2 : X, R y1 y2 β β n : nat, R (natmult n y1 + x)%addmonoid (natmult n y2) := Ξ» H x y1 y2 Hy, (pr1 (H x y1 y2 Hy)). | Definition | Algebra | Require Import UniMath.Foundations.NaturalNumbers. Require Import UniMath.Algebra.RigsAndRings. Require Import UniMath.Algebra.Groups. Require Import UniMath.Algebra.DivisionRig. Require Import UniMath.Algebra.Domains_and_Fields. Require Import UniMath.Algebra.ConstructiveStructures. Require Import UniMath.MoreFoundations.Tactics. | Algebra\Archimedean.v | isarchmonoid_1 | 263 |
Definition isarchmonoid_2 {X : abmonoid} (R : hrel X) : isarchmonoid R β β x y1 y2 : X, R y1 y2 β β n : nat, R (natmult n y1) (natmult n y2 + x)%addmonoid := Ξ» H x y1 y2 Hy, (pr2 (H x y1 y2 Hy)). | Definition | Algebra | Require Import UniMath.Foundations.NaturalNumbers. Require Import UniMath.Algebra.RigsAndRings. Require Import UniMath.Algebra.Groups. Require Import UniMath.Algebra.DivisionRig. Require Import UniMath.Algebra.Domains_and_Fields. Require Import UniMath.Algebra.ConstructiveStructures. Require Import UniMath.MoreFoundations.Tactics. | Algebra\Archimedean.v | isarchmonoid_2 | 264 |
Definition isarchgr {X : abgr} (R : hrel X) := β x y1 y2 : X, R y1 y2 β β n : nat, R (natmult n y1 + x)%addmonoid (natmult n y2). | Definition | Algebra | Require Import UniMath.Foundations.NaturalNumbers. Require Import UniMath.Algebra.RigsAndRings. Require Import UniMath.Algebra.Groups. Require Import UniMath.Algebra.DivisionRig. Require Import UniMath.Algebra.Domains_and_Fields. Require Import UniMath.Algebra.ConstructiveStructures. Require Import UniMath.MoreFoundations.Tactics. | Algebra\Archimedean.v | isarchgr | 265 |
Lemma isarchgr_isarchmonoid {X : abgr} (R : hrel X) : isbinophrel R β isarchgr R β isarchmonoid (X := abgrtoabmonoid X) R. Proof. intros Hop H x y1 y2 Hy. split. - now apply H. - generalize (H (grinv X x) _ _ Hy). apply hinhfun. intros (n,Hn). exists n. apply isarchgr_isarchmonoid_aux. exact Hop. exact Hn. Defined. | Lemma | Algebra | Require Import UniMath.Foundations.NaturalNumbers. Require Import UniMath.Algebra.RigsAndRings. Require Import UniMath.Algebra.Groups. Require Import UniMath.Algebra.DivisionRig. Require Import UniMath.Algebra.Domains_and_Fields. Require Import UniMath.Algebra.ConstructiveStructures. Require Import UniMath.MoreFoundations.Tactics. | Algebra\Archimedean.v | isarchgr_isarchmonoid | 266 |
Lemma isarchmonoid_isarchgr {X : abgr} (R : hrel X) : isarchmonoid (X := abgrtoabmonoid X) R β isarchgr R. Proof. intros H x y1 y2 Hy. apply (isarchmonoid_1 _ H x y1 y2 Hy). Defined. | Lemma | Algebra | Require Import UniMath.Foundations.NaturalNumbers. Require Import UniMath.Algebra.RigsAndRings. Require Import UniMath.Algebra.Groups. Require Import UniMath.Algebra.DivisionRig. Require Import UniMath.Algebra.Domains_and_Fields. Require Import UniMath.Algebra.ConstructiveStructures. Require Import UniMath.MoreFoundations.Tactics. | Algebra\Archimedean.v | isarchmonoid_isarchgr | 267 |
Lemma isarchabgrdiff {X : abmonoid} (R : hrel X) (Hr : isbinophrel R) : istrans R β isarchmonoid (setquot_aux R) β isarchgr (X := abgrdiff X) (abgrdiffrel X (L := R) Hr). Proof. intros Hr' H. simple refine (setquotuniv3prop _ (Ξ» x y1 y2, (abgrdiffrel X Hr y1 y2 β β n : nat, abgrdiffrel X Hr (natmult (X := abgrdiff X) n y1 * x)%multmonoid (natmult (X := abgrdiff X) n y2)) ,, _) _). abstract apply isapropimpl, propproperty. intros x y1 y2 Hy. eapply hinhfun2. 2: apply (isarchmonoid_1 _ H (pr1 x) (pr1 y1 * pr2 y2)%multmonoid (pr1 y2 * pr2 y1)%multmonoid), Hy. 2: apply (isarchmonoid_2 _ H (pr2 x) (pr1 y1 * pr2 y2)%multmonoid (pr1 y2 * pr2 y1)%multmonoid), Hy. intros n1 n2. exists (pr1 n1 + pr1 n2)%nat. apply isarchabgrdiff_aux. exact Hr'. exact (pr2 n1). exact (pr2 n2). Defined. | Lemma | Algebra | Require Import UniMath.Foundations.NaturalNumbers. Require Import UniMath.Algebra.RigsAndRings. Require Import UniMath.Algebra.Groups. Require Import UniMath.Algebra.DivisionRig. Require Import UniMath.Algebra.Domains_and_Fields. Require Import UniMath.Algebra.ConstructiveStructures. Require Import UniMath.MoreFoundations.Tactics. | Algebra\Archimedean.v | isarchabgrdiff | 268 |
Definition isarchrig {X : rig} (R : hrel X) := (β y1 y2 : X, R y1 y2 β β n : nat, R (nattorig n * y1)%rig (1 + nattorig n * y2)%rig) Γ (β x : X, β n : nat, R (nattorig n) x) Γ (β x : X, β n : nat, R (nattorig n + x)%rig 0%rig). | Definition | Algebra | Require Import UniMath.Foundations.NaturalNumbers. Require Import UniMath.Algebra.RigsAndRings. Require Import UniMath.Algebra.Groups. Require Import UniMath.Algebra.DivisionRig. Require Import UniMath.Algebra.Domains_and_Fields. Require Import UniMath.Algebra.ConstructiveStructures. Require Import UniMath.MoreFoundations.Tactics. | Algebra\Archimedean.v | isarchrig | 269 |
Definition isarchrig_diff {X : rig} (R : hrel X) : isarchrig R β β y1 y2 : X, R y1 y2 β β n : nat, R (nattorig n * y1)%rig (1 + nattorig n * y2)%rig := pr1. | Definition | Algebra | Require Import UniMath.Foundations.NaturalNumbers. Require Import UniMath.Algebra.RigsAndRings. Require Import UniMath.Algebra.Groups. Require Import UniMath.Algebra.DivisionRig. Require Import UniMath.Algebra.Domains_and_Fields. Require Import UniMath.Algebra.ConstructiveStructures. Require Import UniMath.MoreFoundations.Tactics. | Algebra\Archimedean.v | isarchrig_diff | 270 |
Definition isarchrig_gt {X : rig} (R : hrel X) : isarchrig R β β x : X, β n : nat, R (nattorig n) x := Ξ» H, (pr1 (pr2 H)). | Definition | Algebra | Require Import UniMath.Foundations.NaturalNumbers. Require Import UniMath.Algebra.RigsAndRings. Require Import UniMath.Algebra.Groups. Require Import UniMath.Algebra.DivisionRig. Require Import UniMath.Algebra.Domains_and_Fields. Require Import UniMath.Algebra.ConstructiveStructures. Require Import UniMath.MoreFoundations.Tactics. | Algebra\Archimedean.v | isarchrig_gt | 271 |
Definition isarchrig_pos {X : rig} (R : hrel X) : isarchrig R β β x : X, β n : nat, R (nattorig n + x)%rig 0%rig := Ξ» H, (pr2 (pr2 H)). | Definition | Algebra | Require Import UniMath.Foundations.NaturalNumbers. Require Import UniMath.Algebra.RigsAndRings. Require Import UniMath.Algebra.Groups. Require Import UniMath.Algebra.DivisionRig. Require Import UniMath.Algebra.Domains_and_Fields. Require Import UniMath.Algebra.ConstructiveStructures. Require Import UniMath.MoreFoundations.Tactics. | Algebra\Archimedean.v | isarchrig_pos | 272 |
Lemma isarchrig_setquot_aux {X : rig} (R : hrel X) : isinvbinophrel (X := rigaddabmonoid X) R β isarchrig R β isarchrig (setquot_aux (X := rigaddabmonoid X) R). Proof. intros Hr H. split ; [ | split]. - intros y1 y2. apply hinhuniv. intros Hy. generalize (isarchrig_diff R H y1 y2 (pr2 Hr _ _ _ (pr2 Hy))). apply hinhfun. intros n. exists (pr1 n). apply hinhpr. exists 0%rig. rewrite runax, runax. exact (pr2 n). - intros x. generalize (isarchrig_gt R H x). apply hinhfun. intros n. exists (pr1 n). apply hinhpr. exists 0%rig. rewrite runax, runax. exact (pr2 n). - intros x. generalize (isarchrig_pos R H x). apply hinhfun. intros n. exists (pr1 n). apply hinhpr. exists 0%rig. rewrite runax, runax. exact (pr2 n). Qed. | Lemma | Algebra | Require Import UniMath.Foundations.NaturalNumbers. Require Import UniMath.Algebra.RigsAndRings. Require Import UniMath.Algebra.Groups. Require Import UniMath.Algebra.DivisionRig. Require Import UniMath.Algebra.Domains_and_Fields. Require Import UniMath.Algebra.ConstructiveStructures. Require Import UniMath.MoreFoundations.Tactics. | Algebra\Archimedean.v | isarchrig_setquot_aux | 273 |
Lemma isarchrig_isarchmonoid {X : rig} (R : hrel X) : R 1%rig 0%rig β istrans R β isbinophrel (X := rigaddabmonoid X) R β isarchrig R β isarchmonoid (X := rigaddabmonoid X) R. Proof. intros Hr1 Hr Hop1 H x y1 y2 Hy. split. - generalize (isarchrig_diff _ H _ _ Hy) (isarchrig_pos _ H x). apply hinhfun2. intros m n. exists (max 1 (pr1 n) * (pr1 m))%nat. apply isarchrig_isarchmonoid_1_aux. exact Hr1. exact Hr. exact Hop1. exact (pr2 m). exact (pr2 n). - generalize (isarchrig_diff _ H _ _ Hy) (isarchrig_gt _ H x). apply hinhfun2. intros m n. exists (max 1 (pr1 n) * (pr1 m))%nat. apply isarchrig_isarchmonoid_2_aux. exact Hr1. exact Hr. exact Hop1. exact (pr2 m). exact (pr2 n). Defined. | Lemma | Algebra | Require Import UniMath.Foundations.NaturalNumbers. Require Import UniMath.Algebra.RigsAndRings. Require Import UniMath.Algebra.Groups. Require Import UniMath.Algebra.DivisionRig. Require Import UniMath.Algebra.Domains_and_Fields. Require Import UniMath.Algebra.ConstructiveStructures. Require Import UniMath.MoreFoundations.Tactics. | Algebra\Archimedean.v | isarchrig_isarchmonoid | 274 |
Lemma isarchmonoid_isarchrig {X : rig} (R : hrel X) : (R 1%rig 0%rig) β isarchmonoid (X := rigaddabmonoid X) R β isarchrig R. Proof. intros H01 H. repeat split. - intros y1 y2 Hy. generalize (isarchmonoid_2 _ H 1%rig y1 y2 Hy). apply hinhfun. intros n. exists (pr1 n). abstract (rewrite !nattorig_natmult, rigcomm1 ; exact (pr2 n)). - intros x. generalize (isarchmonoid_2 _ H x _ _ H01). apply hinhfun. intros n. exists (pr1 n). abstract ( pattern x at 1; rewrite <- (riglunax1 X x) ; pattern (0%rig : X) at 1; rewrite <- (rigmultx0 X (nattorig (pr1 n))) ; rewrite nattorig_natmult ; exact (pr2 n)). - intros x. generalize (isarchmonoid_1 _ H x _ _ H01). apply hinhfun. intros n. exists (pr1 n). abstract ( pattern (0%rig : X) at 1; rewrite <- (rigmultx0 X (nattorig (pr1 n))), nattorig_natmult ; exact (pr2 n)). Defined. | Lemma | Algebra | Require Import UniMath.Foundations.NaturalNumbers. Require Import UniMath.Algebra.RigsAndRings. Require Import UniMath.Algebra.Groups. Require Import UniMath.Algebra.DivisionRig. Require Import UniMath.Algebra.Domains_and_Fields. Require Import UniMath.Algebra.ConstructiveStructures. Require Import UniMath.MoreFoundations.Tactics. | Algebra\Archimedean.v | isarchmonoid_isarchrig | 275 |
Definition isarchring {X : ring} (R : hrel X) := (β x : X, R x 0%ring β β n : nat, R (nattoring n * x)%ring 1%ring) Γ (β x : X, β n : nat, R (nattoring n) x). | Definition | Algebra | Require Import UniMath.Foundations.NaturalNumbers. Require Import UniMath.Algebra.RigsAndRings. Require Import UniMath.Algebra.Groups. Require Import UniMath.Algebra.DivisionRig. Require Import UniMath.Algebra.Domains_and_Fields. Require Import UniMath.Algebra.ConstructiveStructures. Require Import UniMath.MoreFoundations.Tactics. | Algebra\Archimedean.v | isarchring | 276 |
Definition isarchring_1 {X : ring} (R : hrel X) : isarchring R β β x : X, R x 0%ring β β n : nat, R (nattoring n * x)%ring 1%ring := pr1. | Definition | Algebra | Require Import UniMath.Foundations.NaturalNumbers. Require Import UniMath.Algebra.RigsAndRings. Require Import UniMath.Algebra.Groups. Require Import UniMath.Algebra.DivisionRig. Require Import UniMath.Algebra.Domains_and_Fields. Require Import UniMath.Algebra.ConstructiveStructures. Require Import UniMath.MoreFoundations.Tactics. | Algebra\Archimedean.v | isarchring_1 | 277 |
Definition isarchring_2 {X : ring} (R : hrel X) : isarchring R β β x : X, β n : nat, R (nattoring n) x := pr2. | Definition | Algebra | Require Import UniMath.Foundations.NaturalNumbers. Require Import UniMath.Algebra.RigsAndRings. Require Import UniMath.Algebra.Groups. Require Import UniMath.Algebra.DivisionRig. Require Import UniMath.Algebra.Domains_and_Fields. Require Import UniMath.Algebra.ConstructiveStructures. Require Import UniMath.MoreFoundations.Tactics. | Algebra\Archimedean.v | isarchring_2 | 278 |
Lemma isarchring_isarchrig {X : ring} (R : hrel X) : isbinophrel (X := rigaddabmonoid X) R β isarchring R β isarchrig (X := ringtorig X) R. Proof. intros Hop1 H. repeat split. - intros y1 y2 Hy. assert (X0 : R (y1 - y2)%ring 0%ring). abstract (apply (pr2 (isinvbinophrelgr X Hop1)) with y2 ; change BinaryOperations.op with (@BinaryOperations.op1 X) ; rewrite ringassoc1, ringlinvax1, ringlunax1, ringrunax1 ; exact Hy). generalize (isarchring_1 _ H _ X0). apply hinhfun. intros n. exists (pr1 n). abstract (rewrite <- (ringrunax1 _ (nattorig (pr1 n) * y1)%ring), <- (ringlinvax1 _ (nattorig (pr1 n) * y2)%ring), <- ringassoc1 ; apply (pr2 Hop1) ; rewrite <- ringrmultminus, <- ringldistr ; exact (pr2 n)). - apply isarchring_2. exact H. - intros x. generalize (isarchring_2 _ H (- x)%ring). apply hinhfun. intros n. exists (pr1 n). abstract (change 0%rig with (0%ring : X) ; rewrite <- (ringlinvax1 _ x) ; apply (pr2 Hop1) ; exact (pr2 n)). Defined. | Lemma | Algebra | Require Import UniMath.Foundations.NaturalNumbers. Require Import UniMath.Algebra.RigsAndRings. Require Import UniMath.Algebra.Groups. Require Import UniMath.Algebra.DivisionRig. Require Import UniMath.Algebra.Domains_and_Fields. Require Import UniMath.Algebra.ConstructiveStructures. Require Import UniMath.MoreFoundations.Tactics. | Algebra\Archimedean.v | isarchring_isarchrig | 279 |
Lemma isarchrig_isarchring {X : ring} (R : hrel X) : isbinophrel (X := rigaddabmonoid X) R β isarchrig (X := ringtorig X) R β isarchring R. Proof. intros Hr H. split. - intros x Hx. generalize (isarchrig_diff _ H _ _ Hx). apply hinhfun. intros (n,Hn). exists n. rewrite <- (ringrunax1 _ 1%ring), <- (ringmultx0 _ (nattoring n)). exact Hn. - apply (isarchrig_gt (X := ringtorig X)). exact H. Defined. | Lemma | Algebra | Require Import UniMath.Foundations.NaturalNumbers. Require Import UniMath.Algebra.RigsAndRings. Require Import UniMath.Algebra.Groups. Require Import UniMath.Algebra.DivisionRig. Require Import UniMath.Algebra.Domains_and_Fields. Require Import UniMath.Algebra.ConstructiveStructures. Require Import UniMath.MoreFoundations.Tactics. | Algebra\Archimedean.v | isarchrig_isarchring | 280 |
Lemma isarchring_isarchgr {X : ring} (R : hrel X) : R 1%ring 0%ring β istrans R β isbinophrel (X := X) R β isarchring R β isarchgr (X := X) R. Proof. intros Hr0 Hr Hop1 H. apply isarchmonoid_isarchgr. apply (isarchrig_isarchmonoid (X := X)). exact Hr0. exact Hr. exact Hop1. now apply isarchring_isarchrig. Defined. | Lemma | Algebra | Require Import UniMath.Foundations.NaturalNumbers. Require Import UniMath.Algebra.RigsAndRings. Require Import UniMath.Algebra.Groups. Require Import UniMath.Algebra.DivisionRig. Require Import UniMath.Algebra.Domains_and_Fields. Require Import UniMath.Algebra.ConstructiveStructures. Require Import UniMath.MoreFoundations.Tactics. | Algebra\Archimedean.v | isarchring_isarchgr | 281 |
Lemma isarchgr_isarchring {X : ring} (R : hrel X) : R 1%ring 0%ring β istrans R β isbinophrel (X := X) R β isarchgr (X := X) R β isarchring R. Proof. intros Hr0 Hr Hop1 H. apply isarchrig_isarchring. exact Hop1. apply isarchmonoid_isarchrig. exact Hr0. now apply (isarchgr_isarchmonoid (X := X)). Defined. | Lemma | Algebra | Require Import UniMath.Foundations.NaturalNumbers. Require Import UniMath.Algebra.RigsAndRings. Require Import UniMath.Algebra.Groups. Require Import UniMath.Algebra.DivisionRig. Require Import UniMath.Algebra.Domains_and_Fields. Require Import UniMath.Algebra.ConstructiveStructures. Require Import UniMath.MoreFoundations.Tactics. | Algebra\Archimedean.v | isarchgr_isarchring | 282 |
Theorem isarchrigtoring : β (X : rig) (R : hrel X) (Hr : R 1%rig 0%rig) (Hadd : isbinophrel (X := rigaddabmonoid X) R) (Htra : istrans R) (Harch : isarchrig (setquot_aux (X := rigaddabmonoid X) R)), isarchring (X := rigtoring X) (rigtoringrel X Hadd). Proof. intros. apply isarchgr_isarchring. abstract (apply hinhpr ; simpl ; exists 0%rig ; rewrite !rigrunax1 ; exact Hr). now apply (istransabgrdiffrel (rigaddabmonoid X)). now generalize Hadd ; apply isbinopabgrdiffrel. apply (isarchabgrdiff (X := rigaddabmonoid X)). exact Htra. apply isarchrig_isarchmonoid. abstract (apply hinhpr ; simpl ; exists 0%rig ; rewrite !rigrunax1 ; exact Hr). (now apply (istrans_setquot_aux (X := rigaddabmonoid X))). (now apply (isbinophrel_setquot_aux (X := rigaddabmonoid X))). exact Harch. Defined. | Theorem | Algebra | Require Import UniMath.Foundations.NaturalNumbers. Require Import UniMath.Algebra.RigsAndRings. Require Import UniMath.Algebra.Groups. Require Import UniMath.Algebra.DivisionRig. Require Import UniMath.Algebra.Domains_and_Fields. Require Import UniMath.Algebra.ConstructiveStructures. Require Import UniMath.MoreFoundations.Tactics. | Algebra\Archimedean.v | isarchrigtoring | 283 |
Lemma natmult_commringfrac {X : commring} {S : subabmonoid _} : β n (x : X Γ S), natmult (X := commringfrac X S) n (setquotpr (eqrelcommringfrac X S) x) = setquotpr (eqrelcommringfrac X S) (natmult (X := X) n (pr1 x) ,, (pr2 x)). Proof. simpl ; intros n x. induction n as [|n IHn]. - apply (iscompsetquotpr (eqrelcommringfrac X S)). apply hinhpr ; simpl. exists (pr2 x). rewrite !(ringmult0x X). reflexivity. - rewrite !natmultS, IHn. apply (iscompsetquotpr (eqrelcommringfrac X S)). apply hinhpr ; simpl. exists (pr2 x) ; simpl. rewrite <- (ringldistr X). rewrite (ringcomm2 X (pr1 (pr2 x))). rewrite !(ringassoc2 X). reflexivity. Qed. | Lemma | Algebra | Require Import UniMath.Foundations.NaturalNumbers. Require Import UniMath.Algebra.RigsAndRings. Require Import UniMath.Algebra.Groups. Require Import UniMath.Algebra.DivisionRig. Require Import UniMath.Algebra.Domains_and_Fields. Require Import UniMath.Algebra.ConstructiveStructures. Require Import UniMath.MoreFoundations.Tactics. | Algebra\Archimedean.v | natmult_commringfrac | 284 |
Lemma isarchcommringfrac {X : commring} {S : subabmonoid _} (R : hrel X) Hop1 Hop2 Hs: R 1%ring 0%ring β istrans R β isarchring R β isarchring (X := commringfrac X S) (commringfracgt X S (R := R) Hop1 Hop2 Hs). Proof. intros H0 Htra Hr. split. - simple refine (setquotunivprop _ (Ξ» _, (_,,_)) _). apply isapropimpl, propproperty. intros x Hx. revert Hx ; apply hinhuniv ; intros (c,Hx) ; simpl in Hx. rewrite !(ringmult0x X), (ringrunax2 X) in Hx. apply (hinhfun (X := β n, commringfracgt X S Hop1 Hop2 Hs (setquotpr (eqrelcommringfrac X S) ((nattoring n * pr1 x)%ring,, pr2 x)) 1%ring)). intros H. eexists (pr1 H). unfold nattoring. rewrite (nattorig_natmult (X := commringfrac X S)). rewrite (natmult_commringfrac (X := X) (S := S)). rewrite <- (nattorig_natmult (X := X)). now apply (pr2 H). generalize (isarchring_1 _ Hr _ Hx) (isarchring_2 _ Hr (pr1 (pr2 x) * pr1 c)%ring). apply hinhfun2. intros (m,Hm) (n,Hn). exists (max 1 n * m)%nat. destruct n ; simpl max. + apply hinhpr ; simpl. exists c. rewrite (ringrunax2 X), (ringlunax2 X), (ringassoc2 X). eapply Htra. exact Hm. eapply Htra. exact H0. exact Hn. + unfold nattoring. rewrite (nattorig_natmult (X := X)), natmult_mult. apply hinhpr ; simpl. exists c. change (R (natmult (succ n) (natmult (X := X) m (pr1 x)) * 1 * pr1 c)%ring (1 * pr1 (pr2 x) * pr1 c)%ring). rewrite <- (nattorig_natmult (X := X)), (ringrunax2 X), (ringlunax2 X), (ringassoc2 X), (nattorig_natmult (X := X)). eapply Htra. apply (natmult_binophrel (X := X) R). exact Htra. exact Hop1. rewrite <- (nattorig_natmult (X := X)), (ringassoc2 X). exact Hm. exact Hn. - simple refine (setquotunivprop _ _ _). intros x. apply (hinhfun (X := β n : nat, commringfracgt X S Hop1 Hop2 Hs (setquotpr (eqrelcommringfrac X S) (nattoring n,, unel S)) (setquotpr (eqrelcommringfrac X S) x))). intros (n,Hn). exists n. unfold nattoring, nattorig. change 1%rig with (setquotpr (eqrelcommringfrac X S) (1%ring,, unel S)). rewrite (natmult_commringfrac (X := X) (S := S) n). exact Hn. generalize (isarchring_1 _ Hr _ (Hs (pr1 (pr2 x)) (pr2 (pr2 x)))) (isarchring_2 _ Hr (pr1 x)%ring). apply hinhfun2. intros (m,Hm) (n,Hn). exists (max 1 n * m)%nat. destruct n ; simpl max. + apply hinhpr ; simpl. exists (pr2 x). apply (isringmultgttoisrringmultgt X). exact Hop1. exact Hop2. apply Hs. apply (pr2 (pr2 x)). eapply Htra. exact Hm. eapply Htra. exact H0. rewrite (ringrunax2 X). exact Hn. + apply hinhpr ; simpl. exists (pr2 x). change (n * m + m)%nat with (succ n * m)%nat. unfold nattoring. apply (isringmultgttoisrringmultgt X). exact Hop1. exact Hop2. apply Hs. apply (pr2 (pr2 x)). rewrite (ringrunax2 X), (nattorig_natmult (X := X)), natmult_mult. eapply Htra. apply (natmult_binophrel (X := X) R). exact Htra. exact Hop1. rewrite <- (nattorig_natmult (X := X)). exact Hm. exact Hn. Qed. | Lemma | Algebra | Require Import UniMath.Foundations.NaturalNumbers. Require Import UniMath.Algebra.RigsAndRings. Require Import UniMath.Algebra.Groups. Require Import UniMath.Algebra.DivisionRig. Require Import UniMath.Algebra.Domains_and_Fields. Require Import UniMath.Algebra.ConstructiveStructures. Require Import UniMath.MoreFoundations.Tactics. | Algebra\Archimedean.v | isarchcommringfrac | 285 |
Definition isarchfld {X : fld} (R : hrel X) := β x : X, β n : nat, R (nattoring n) x. | Definition | Algebra | Require Import UniMath.Foundations.NaturalNumbers. Require Import UniMath.Algebra.RigsAndRings. Require Import UniMath.Algebra.Groups. Require Import UniMath.Algebra.DivisionRig. Require Import UniMath.Algebra.Domains_and_Fields. Require Import UniMath.Algebra.ConstructiveStructures. Require Import UniMath.MoreFoundations.Tactics. | Algebra\Archimedean.v | isarchfld | 286 |
Lemma isarchfld_isarchring {X : fld} (R : hrel X) : β (Hadd : isbinophrel (X := rigaddabmonoid X) R) ( Hmult : isringmultgt X R) (Hirr : isirrefl R), isarchfld R β isarchring R. Proof. intros Hadd Hmult Hirr H. split. - intros x Hx. case (fldchoice x) ; intros x'. + generalize (H (pr1 x')). apply hinhfun. intros n. exists (pr1 n). abstract (pattern (1%ring : X) at 1 ; rewrite <- (pr1 (pr2 x')) ; apply (isringmultgttoisrringmultgt _ Hadd Hmult _ _ _ Hx (pr2 n))). + apply hinhpr. exists O. abstract (apply fromempty ; refine (Hirr _ _) ; rewrite x' in Hx ; apply Hx). - exact H. Defined. | Lemma | Algebra | Require Import UniMath.Foundations.NaturalNumbers. Require Import UniMath.Algebra.RigsAndRings. Require Import UniMath.Algebra.Groups. Require Import UniMath.Algebra.DivisionRig. Require Import UniMath.Algebra.Domains_and_Fields. Require Import UniMath.Algebra.ConstructiveStructures. Require Import UniMath.MoreFoundations.Tactics. | Algebra\Archimedean.v | isarchfld_isarchring | 287 |
Lemma isarchring_isarchfld {X : fld} (R : hrel X) : isarchring R β isarchfld R. Proof. intros H. intros x. apply (isarchring_2 R H x). Defined. | Lemma | Algebra | Require Import UniMath.Foundations.NaturalNumbers. Require Import UniMath.Algebra.RigsAndRings. Require Import UniMath.Algebra.Groups. Require Import UniMath.Algebra.DivisionRig. Require Import UniMath.Algebra.Domains_and_Fields. Require Import UniMath.Algebra.ConstructiveStructures. Require Import UniMath.MoreFoundations.Tactics. | Algebra\Archimedean.v | isarchring_isarchfld | 288 |
Theorem isarchfldfrac ( X : intdom ) ( is : isdeceq X ) { R : hrel X } ( is0 : @isbinophrel X R ) ( is1 : isringmultgt X R ) ( is2 : R 1%ring 0%ring ) ( nc : neqchoice R ) ( irr : isirrefl R ) ( tra : istrans R ) : isarchring R β isarchfld (X := fldfrac X is ) (fldfracgt _ is is0 is1 is2 nc). Proof. intros. apply isarchring_isarchfld. unfold fldfracgt. generalize (isarchcommringfrac (X := X) (S := ringpossubmonoid X is1 is2) R is0 is1 (Ξ» (c : X) (r : (ringpossubmonoid X is1 is2) c), r) is2 tra X0). intros. assert (H_f : β n x, (weqfldfracgt_f X is is0 is1 is2 nc (nattoring n * x)%ring) = (nattoring n * weqfldfracgt_f X is is0 is1 is2 nc x)%ring). { clear -irr. intros n x. unfold nattoring. rewrite (nattorig_natmult (X := fldfrac X is)), (nattorig_natmult (X := commringfrac X (@ringpossubmonoid X R is1 is2))). induction n as [|n IHn]. - refine (pr2 (pr1 (isringfunweqfldfracgt_f _ _ _ _ _ _ _))). exact irr. - rewrite !natmultS, <- IHn. refine (pr1 (pr1 (isringfunweqfldfracgt_f _ _ _ _ _ _ _)) _ _). exact irr. } assert (H_0 : (weqfldfracgt_f X is is0 is1 is2 nc 0%ring) = 0%ring). { refine (pr2 (pr1 (isringfunweqfldfracgt_f _ _ _ _ _ _ _))). exact irr. } assert (H_1 : (weqfldfracgt_f X is is0 is1 is2 nc 1%ring) = 1%ring). { refine (pr2 (pr2 (isringfunweqfldfracgt_f _ _ _ _ _ _ _))). exact irr. } split. - intros x Hx. eapply hinhfun. 2: apply (isarchring_1 _ X1 (weqfldfracgt_f X is is0 is1 is2 nc x)). intros (n,Hn). exists n. rewrite H_f, H_1. exact Hn. rewrite H_0 in Hx. exact Hx. - intros x. eapply hinhfun. 2: apply (isarchring_2 _ X1 (weqfldfracgt_f X is is0 is1 is2 nc x)). intros (n,Hn). exists n. rewrite <- (ringrunax2 _ (nattoring n)), H_f, H_1, ringrunax2. exact Hn. Defined. | Theorem | Algebra | Require Import UniMath.Foundations.NaturalNumbers. Require Import UniMath.Algebra.RigsAndRings. Require Import UniMath.Algebra.Groups. Require Import UniMath.Algebra.DivisionRig. Require Import UniMath.Algebra.Domains_and_Fields. Require Import UniMath.Algebra.ConstructiveStructures. Require Import UniMath.MoreFoundations.Tactics. | Algebra\Archimedean.v | isarchfldfrac | 289 |
Definition isarchCF {X : ConstructiveField} (R : hrel X) := β x : X, β n : nat, R (nattoring n) x. | Definition | Algebra | Require Import UniMath.Foundations.NaturalNumbers. Require Import UniMath.Algebra.RigsAndRings. Require Import UniMath.Algebra.Groups. Require Import UniMath.Algebra.DivisionRig. Require Import UniMath.Algebra.Domains_and_Fields. Require Import UniMath.Algebra.ConstructiveStructures. Require Import UniMath.MoreFoundations.Tactics. | Algebra\Archimedean.v | isarchCF | 290 |
Lemma isarchCF_isarchring {X : ConstructiveField} (R : hrel X) : β (Hadd : isbinophrel (X := rigaddabmonoid X) R) ( Hmult : isringmultgt X R) (Hirr : isirrefl R), (β x : X, R x 0%CF β (x β 0)%CF) β isarchCF R β isarchring R. Proof. intros Hadd Hmult Hirr H0 H. split. - intros x Hx. generalize (H (CFinv x (H0 _ Hx))). apply hinhfun. intros (n,Hn). exists n. change 1%ring with (1%CF : X). rewrite <- (islinv_CFinv x (H0 x Hx)). apply isringmultgttoisrringmultgt. exact Hadd. exact Hmult. exact Hx. exact Hn. - exact H. Defined. | Lemma | Algebra | Require Import UniMath.Foundations.NaturalNumbers. Require Import UniMath.Algebra.RigsAndRings. Require Import UniMath.Algebra.Groups. Require Import UniMath.Algebra.DivisionRig. Require Import UniMath.Algebra.Domains_and_Fields. Require Import UniMath.Algebra.ConstructiveStructures. Require Import UniMath.MoreFoundations.Tactics. | Algebra\Archimedean.v | isarchCF_isarchring | 291 |
Lemma isarchring_isarchCF {X : ConstructiveField} (R : hrel X) : isarchring R β isarchCF R. Proof. intros H. intros x. apply (isarchring_2 R H x). Defined. | Lemma | Algebra | Require Import UniMath.Foundations.NaturalNumbers. Require Import UniMath.Algebra.RigsAndRings. Require Import UniMath.Algebra.Groups. Require Import UniMath.Algebra.DivisionRig. Require Import UniMath.Algebra.Domains_and_Fields. Require Import UniMath.Algebra.ConstructiveStructures. Require Import UniMath.MoreFoundations.Tactics. | Algebra\Archimedean.v | isarchring_isarchCF | 292 |
Definition unop (X : UU) : UU := X β X. | Definition | Algebra | null | Algebra\BinaryOperations.v | unop | 293 |
Definition islcancelable {X : UU} (opp : binop X) (x : X) : UU := isincl (Ξ» x0 : X, opp x x0). | Definition | Algebra | null | Algebra\BinaryOperations.v | islcancelable | 294 |
Definition lcancel {X : UU} {opp : binop X} {x : X} (H_x : islcancelable opp x) (y z : X) : opp x y = opp x z β y = z. Proof. apply invmaponpathsincl, H_x. Defined. | Definition | Algebra | null | Algebra\BinaryOperations.v | lcancel | 295 |
Definition isrcancelable {X : UU} (opp : binop X) (x : X) : UU := isincl (Ξ» x0 : X, opp x0 x). | Definition | Algebra | null | Algebra\BinaryOperations.v | isrcancelable | 296 |
Definition rcancel {X : UU} {opp : binop X} {x : X} (H_x : isrcancelable opp x) (y z : X) : opp y x = opp z x β y = z. Proof. apply (invmaponpathsincl (Ξ» y, opp y x)), H_x. Defined. | Definition | Algebra | null | Algebra\BinaryOperations.v | rcancel | 297 |
Definition iscancelable {X : UU} (opp : binop X) (x : X) : UU := (islcancelable opp x) Γ (isrcancelable opp x). | Definition | Algebra | null | Algebra\BinaryOperations.v | iscancelable | 298 |
Definition islinvertible {X : UU} (opp : binop X) (x : X) : UU := isweq (Ξ» x0 : X, opp x x0). | Definition | Algebra | null | Algebra\BinaryOperations.v | islinvertible | 299 |