fact
stringlengths
8
1.54k
type
stringclasses
19 values
library
stringclasses
8 values
imports
listlengths
1
10
filename
stringclasses
98 values
symbolic_name
stringlengths
1
42
docstring
stringclasses
1 value
val_unitVx : val (x^-1 : unit_of)%g = (val x)^-1. Proof. by []. Qed.
Lemma
algebra
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat seq choice", "From mathcomp Require Import fintype finset fingroup morphism perm action", "From mathcomp Require Import ssralg countalg" ]
algebra/finalg.v
val_unitV
val_unitXn x : val (x ^+ n : unit_of)%g = val x ^+ n. Proof. by case: n; last by elim=> //= n ->. Qed.
Lemma
algebra
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat seq choice", "From mathcomp Require Import fintype finset fingroup morphism perm action", "From mathcomp Require Import ssralg countalg" ]
algebra/finalg.v
val_unitX
unit_actx u := x * val u.
Definition
algebra
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat seq choice", "From mathcomp Require Import fintype finset fingroup morphism perm action", "From mathcomp Require Import ssralg countalg" ]
algebra/finalg.v
unit_act
unit_actEx u : unit_act x u = x * val u. Proof. by []. Qed.
Lemma
algebra
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat seq choice", "From mathcomp Require Import fintype finset fingroup morphism perm action", "From mathcomp Require Import ssralg countalg" ]
algebra/finalg.v
unit_actE
unit_action:= @TotalAction _ _ unit_act (@mulr1 _) (fun _ _ _ => mulrA _ _ _).
Canonical
algebra
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat seq choice", "From mathcomp Require Import fintype finset fingroup morphism perm action", "From mathcomp Require Import ssralg countalg" ]
algebra/finalg.v
unit_action
unit_is_groupAction: @is_groupAction _ R setT setT unit_action. Proof. move=> u _ /[1!inE]; apply/andP; split; first by apply/subsetP=> x /[1!inE]. by apply/morphicP=> x y _ _; rewrite !actpermE /= [_ u]mulrDl. Qed.
Lemma
algebra
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat seq choice", "From mathcomp Require Import fintype finset fingroup morphism perm action", "From mathcomp Require Import ssralg countalg" ]
algebra/finalg.v
unit_is_groupAction
unit_groupAction:= GroupAction unit_is_groupAction.
Canonical
algebra
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat seq choice", "From mathcomp Require Import fintype finset fingroup morphism perm action", "From mathcomp Require Import ssralg countalg" ]
algebra/finalg.v
unit_groupAction
unit_action.
Canonical
algebra
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat seq choice", "From mathcomp Require Import fintype finset fingroup morphism perm action", "From mathcomp Require Import ssralg countalg" ]
algebra/finalg.v
unit_action
unit_groupAction.
Canonical
algebra
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat seq choice", "From mathcomp Require Import fintype finset fingroup morphism perm action", "From mathcomp Require Import ssralg countalg" ]
algebra/finalg.v
unit_groupAction
unitR Ux := (@Unit R%type _ Ux). #[export, non_forgetful_inheritance] HB.instance Definition _ (R : ComUnitRing.type) := [finGroupMixin of R for +%R].
Notation
algebra
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat seq choice", "From mathcomp Require Import fintype finset fingroup morphism perm action", "From mathcomp Require Import ssralg countalg" ]
algebra/finalg.v
unit
ComUnitRing_to_baseFinGroup(R : ComUnitRing.type) := FinStarMonoid.clone R _.
Coercion
algebra
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat seq choice", "From mathcomp Require Import fintype finset fingroup morphism perm action", "From mathcomp Require Import ssralg countalg" ]
algebra/finalg.v
ComUnitRing_to_baseFinGroup
ComUnitRing_to_finGroup(R : ComUnitRing.type) := FinGroup.clone R _. #[export, non_forgetful_inheritance] HB.instance Definition _ (R : IntegralDomain.type) := [finGroupMixin of R for +%R].
Coercion
algebra
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat seq choice", "From mathcomp Require Import fintype finset fingroup morphism perm action", "From mathcomp Require Import ssralg countalg" ]
algebra/finalg.v
ComUnitRing_to_finGroup
IntegralDomain_to_baseFinGroup(R : IntegralDomain.type) := FinStarMonoid.clone R _.
Coercion
algebra
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat seq choice", "From mathcomp Require Import fintype finset fingroup morphism perm action", "From mathcomp Require Import ssralg countalg" ]
algebra/finalg.v
IntegralDomain_to_baseFinGroup
IntegralDomain_to_finGroup(R : IntegralDomain.type) := FinGroup.clone R _. #[export, non_forgetful_inheritance] HB.instance Definition _ (R : Field.type) := [finGroupMixin of R for +%R].
Coercion
algebra
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat seq choice", "From mathcomp Require Import fintype finset fingroup morphism perm action", "From mathcomp Require Import ssralg countalg" ]
algebra/finalg.v
IntegralDomain_to_finGroup
Field_to_baseFinGroup(R : Field.type) := FinStarMonoid.clone R _.
Coercion
algebra
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat seq choice", "From mathcomp Require Import fintype finset fingroup morphism perm action", "From mathcomp Require Import ssralg countalg" ]
algebra/finalg.v
Field_to_baseFinGroup
Field_to_finGroup(R : Field.type) := FinGroup.clone R _. HB.factory Record isField F of Field F := {}. HB.builders Context F of isField F.
Coercion
algebra
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat seq choice", "From mathcomp Require Import fintype finset fingroup morphism perm action", "From mathcomp Require Import ssralg countalg" ]
algebra/finalg.v
Field_to_finGroup
sate f := match f with | GRing.Bool b => b | t1 == t2 => (GRing.eval e t1 == GRing.eval e t2)%bool | GRing.Unit t => GRing.eval e t \is a GRing.unit | f1 /\ f2 => sat e f1 && sat e f2 | f1 \/ f2 => sat e f1 || sat e f2 | f1 ==> f2 => (sat e f1 ==> sat e f2)%bool | ~ f1 => ~~ sat e f1 | ('exists 'X_k, f1) => [exists x : F, sat (set_nth 0%R e k x) f1] | ('forall 'X_k, f1) => [forall x : F, sat (set_nth 0%R e k x) f1] end%T.
Fixpoint
algebra
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat seq choice", "From mathcomp Require Import fintype finset fingroup morphism perm action", "From mathcomp Require Import ssralg countalg" ]
algebra/finalg.v
sat
decidable: GRing.decidable_field_axiom sat. Proof. move=> e f; elim: f e; try by move=> f1 IH1 f2 IH2 e /=; case IH1; case IH2; constructor; tauto. - by move=> b e; apply: idP. - by move=> t1 t2 e; apply: eqP. - by move=> t e; apply: idP. - by move=> f IH e /=; case: IH; constructor. - by move=> i f IH e; apply: (iffP existsP) => [] [x fx]; exists x; apply/IH. by move=> i f IH e; apply: (iffP forallP) => f_ x; apply/IH. Qed. HB.instance Definition _ := GRing.Field_isDecField.Build F decidable. HB.end. #[export, non_forgetful_inheritance] HB.instance Definition _ (R : nzRingType) (M : Lmodule.type R) := [finGroupMixin of M for +%R].
Lemma
algebra
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat seq choice", "From mathcomp Require Import fintype finset fingroup morphism perm action", "From mathcomp Require Import ssralg countalg" ]
algebra/finalg.v
decidable
Lmodule_to_baseFinGroup(R : nzRingType) (M : Lmodule.type R) := FinStarMonoid.clone M _.
Coercion
algebra
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat seq choice", "From mathcomp Require Import fintype finset fingroup morphism perm action", "From mathcomp Require Import ssralg countalg" ]
algebra/finalg.v
Lmodule_to_baseFinGroup
Lmodule_to_finGroup(R : nzRingType) (M : Lmodule.type R) : finGroupType := FinGroup.clone (M : Type) _. #[export, non_forgetful_inheritance] HB.instance Definition _ (R : nzRingType) (M : Lalgebra.type R) := [finGroupMixin of M for +%R].
Coercion
algebra
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat seq choice", "From mathcomp Require Import fintype finset fingroup morphism perm action", "From mathcomp Require Import ssralg countalg" ]
algebra/finalg.v
Lmodule_to_finGroup
Lalgebra_to_baseFinGroup(R : nzRingType) (M : Lalgebra.type R) := FinStarMonoid.clone M _.
Coercion
algebra
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat seq choice", "From mathcomp Require Import fintype finset fingroup morphism perm action", "From mathcomp Require Import ssralg countalg" ]
algebra/finalg.v
Lalgebra_to_baseFinGroup
Lalgebra_to_finGroup(R : nzRingType) (M : Lalgebra.type R) := FinGroup.clone M _. #[export, non_forgetful_inheritance] HB.instance Definition _ (R : nzRingType) (M : Algebra.type R) := [finGroupMixin of M for +%R].
Coercion
algebra
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat seq choice", "From mathcomp Require Import fintype finset fingroup morphism perm action", "From mathcomp Require Import ssralg countalg" ]
algebra/finalg.v
Lalgebra_to_finGroup
Algebra_to_baseFinGroup(R : nzRingType) (M : Algebra.type R) := FinStarMonoid.clone M _.
Coercion
algebra
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat seq choice", "From mathcomp Require Import fintype finset fingroup morphism perm action", "From mathcomp Require Import ssralg countalg" ]
algebra/finalg.v
Algebra_to_baseFinGroup
Algebra_to_finGroup(R : nzRingType) (M : Algebra.type R) := FinGroup.clone M _. #[export, non_forgetful_inheritance] HB.instance Definition _ (R : unitRingType) (M : UnitAlgebra.type R) := [finGroupMixin of M for +%R].
Coercion
algebra
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat seq choice", "From mathcomp Require Import fintype finset fingroup morphism perm action", "From mathcomp Require Import ssralg countalg" ]
algebra/finalg.v
Algebra_to_finGroup
UnitAlgebra_to_baseFinGroup(R : unitRingType) (M : UnitAlgebra.type R) := FinStarMonoid.clone M _.
Coercion
algebra
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat seq choice", "From mathcomp Require Import fintype finset fingroup morphism perm action", "From mathcomp Require Import ssralg countalg" ]
algebra/finalg.v
UnitAlgebra_to_baseFinGroup
UnitAlgebra_to_finGroup(R : unitRingType) (M : UnitAlgebra.type R) := FinGroup.clone M _.
Coercion
algebra
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat seq choice", "From mathcomp Require Import fintype finset fingroup morphism perm action", "From mathcomp Require Import ssralg countalg" ]
algebra/finalg.v
UnitAlgebra_to_finGroup
Definition_ (R : finType) := Finite.on R^o. HB.instance Definition _ (R : finNmodType) := Nmodule.on R^o. HB.instance Definition _ (R : finZmodType) := Zmodule.on R^o. HB.instance Definition _ (R : finPzSemiRingType) := PzSemiRing.on R^o. HB.instance Definition _ (R : finPzRingType) := PzRing.on R^o. HB.instance Definition _ (R : finNzSemiRingType) := NzSemiRing.on R^o. HB.instance Definition _ (R : finNzRingType) := NzRing.on R^o. HB.instance Definition _ (R : finComPzSemiRingType) := PzSemiRing.on R^o. HB.instance Definition _ (R : finComPzRingType) := PzRing.on R^o. HB.instance Definition _ (R : finComNzSemiRingType) := NzSemiRing.on R^o. HB.instance Definition _ (R : finComNzRingType) := NzRing.on R^o. HB.instance Definition _ (R : finUnitRingType) := NzRing.on R^o. HB.instance Definition _ (R : finComUnitRingType) := NzRing.on R^o. HB.instance Definition _ (R : finIdomainType) := NzRing.on R^o. HB.instance Definition _ (R : finFieldType) := NzRing.on R^o.
HB.instance
algebra
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat seq choice", "From mathcomp Require Import fintype finset fingroup morphism perm action", "From mathcomp Require Import ssralg countalg" ]
algebra/finalg.v
Definition
zmod1gE:= zmod1gE.
Definition
algebra
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat seq choice", "From mathcomp Require Import fintype finset fingroup morphism perm action", "From mathcomp Require Import ssralg countalg" ]
algebra/finalg.v
zmod1gE
zmodVgE:= zmodVgE.
Definition
algebra
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat seq choice", "From mathcomp Require Import fintype finset fingroup morphism perm action", "From mathcomp Require Import ssralg countalg" ]
algebra/finalg.v
zmodVgE
zmodMgE:= zmodMgE.
Definition
algebra
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat seq choice", "From mathcomp Require Import fintype finset fingroup morphism perm action", "From mathcomp Require Import ssralg countalg" ]
algebra/finalg.v
zmodMgE
zmodXgE:= zmodXgE.
Definition
algebra
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat seq choice", "From mathcomp Require Import fintype finset fingroup morphism perm action", "From mathcomp Require Import ssralg countalg" ]
algebra/finalg.v
zmodXgE
zmod_mulgC:= zmod_mulgC.
Definition
algebra
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat seq choice", "From mathcomp Require Import fintype finset fingroup morphism perm action", "From mathcomp Require Import ssralg countalg" ]
algebra/finalg.v
zmod_mulgC
zmod_abelian:= zmod_abelian.
Definition
algebra
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat seq choice", "From mathcomp Require Import fintype finset fingroup morphism perm action", "From mathcomp Require Import ssralg countalg" ]
algebra/finalg.v
zmod_abelian
val_unit1:= val_unit1.
Definition
algebra
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat seq choice", "From mathcomp Require Import fintype finset fingroup morphism perm action", "From mathcomp Require Import ssralg countalg" ]
algebra/finalg.v
val_unit1
val_unitM:= val_unitM.
Definition
algebra
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat seq choice", "From mathcomp Require Import fintype finset fingroup morphism perm action", "From mathcomp Require Import ssralg countalg" ]
algebra/finalg.v
val_unitM
val_unitX:= val_unitX.
Definition
algebra
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat seq choice", "From mathcomp Require Import fintype finset fingroup morphism perm action", "From mathcomp Require Import ssralg countalg" ]
algebra/finalg.v
val_unitX
val_unitV:= val_unitV.
Definition
algebra
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat seq choice", "From mathcomp Require Import fintype finset fingroup morphism perm action", "From mathcomp Require Import ssralg countalg" ]
algebra/finalg.v
val_unitV
unit_actE:= unit_actE.
Definition
algebra
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat seq choice", "From mathcomp Require Import fintype finset fingroup morphism perm action", "From mathcomp Require Import ssralg countalg" ]
algebra/finalg.v
unit_actE
finSemiRingType:= (finNzSemiRingType) (only parsing). #[deprecated(since="mathcomp 2.4.0", note="Use finNzRingType instead.")]
Notation
algebra
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat seq choice", "From mathcomp Require Import fintype finset fingroup morphism perm action", "From mathcomp Require Import ssralg countalg" ]
algebra/finalg.v
finSemiRingType
finRingType:= (finNzRingType) (only parsing). #[deprecated(since="mathcomp 2.4.0", note="Use finComNzSemiRingType instead.")]
Notation
algebra
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat seq choice", "From mathcomp Require Import fintype finset fingroup morphism perm action", "From mathcomp Require Import ssralg countalg" ]
algebra/finalg.v
finRingType
finComSemiRingType:= (finComNzSemiRingType) (only parsing). #[deprecated(since="mathcomp 2.4.0", note="Use finComNzRingType instead.")]
Notation
algebra
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat seq choice", "From mathcomp Require Import fintype finset fingroup morphism perm action", "From mathcomp Require Import ssralg countalg" ]
algebra/finalg.v
finComSemiRingType
finComRingType:= (finComNzRingType) (only parsing).
Notation
algebra
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat seq choice", "From mathcomp Require Import fintype finset fingroup morphism perm action", "From mathcomp Require Import ssralg countalg" ]
algebra/finalg.v
finComRingType
card_finNzRing_gt1(R : finNzRingType) : 1 < #|R|. Proof. by rewrite (cardD1 0) (cardD1 1) !inE GRing.oner_neq0. Qed. #[deprecated(since="mathcomp 2.4.0", note="Use card_finNzRing_gt1 instead.")]
Lemma
algebra
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat seq choice", "From mathcomp Require Import fintype finset fingroup morphism perm action", "From mathcomp Require Import ssralg countalg" ]
algebra/finalg.v
card_finNzRing_gt1
card_finRing_gt1:= (card_finNzRing_gt1) (only parsing).
Notation
algebra
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat seq choice", "From mathcomp Require Import fintype finset fingroup morphism perm action", "From mathcomp Require Import ssralg countalg" ]
algebra/finalg.v
card_finRing_gt1
card_finField_unit(F : finFieldType) : #|[set: {unit F}]| = #|F|.-1. Proof. rewrite -(cardC1 0) cardsT card_sub; apply: eq_card => x. by rewrite GRing.unitfE. Qed.
Lemma
algebra
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat seq choice", "From mathcomp Require Import fintype finset fingroup morphism perm action", "From mathcomp Require Import ssralg countalg" ]
algebra/finalg.v
card_finField_unit
ratio:= mkRatio { frac :> R * R; _ : frac.2 != 0 }. HB.instance Definition _ := [isSub for frac]. HB.instance Definition _ := [Choice of ratio by <:].
Inductive
algebra
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat div seq", "From mathcomp Require Import ssrAC choice tuple bigop ssralg poly polydiv", "From mathcomp Require Import generic_quotient" ]
algebra/fraction.v
ratio
denom_ratioP: forall f : ratio, f.2 != 0. Proof. by case. Qed.
Lemma
algebra
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat div seq", "From mathcomp Require Import ssrAC choice tuple bigop ssralg poly polydiv", "From mathcomp Require Import generic_quotient" ]
algebra/fraction.v
denom_ratioP
ratio0:= (@mkRatio (0, 1) (oner_neq0 _)).
Definition
algebra
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat div seq", "From mathcomp Require Import ssrAC choice tuple bigop ssralg poly polydiv", "From mathcomp Require Import generic_quotient" ]
algebra/fraction.v
ratio0
Ratiox y : ratio := insubd ratio0 (x, y).
Definition
algebra
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat div seq", "From mathcomp Require Import ssrAC choice tuple bigop ssralg poly polydiv", "From mathcomp Require Import generic_quotient" ]
algebra/fraction.v
Ratio
numer_Ratiox y : y != 0 -> (Ratio x y).1 = x. Proof. by move=> ny0; rewrite /Ratio /insubd insubT. Qed.
Lemma
algebra
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat div seq", "From mathcomp Require Import ssrAC choice tuple bigop ssralg poly polydiv", "From mathcomp Require Import generic_quotient" ]
algebra/fraction.v
numer_Ratio
denom_Ratiox y : y != 0 -> (Ratio x y).2 = y. Proof. by move=> ny0; rewrite /Ratio /insubd insubT. Qed.
Lemma
algebra
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat div seq", "From mathcomp Require Import ssrAC choice tuple bigop ssralg poly polydiv", "From mathcomp Require Import generic_quotient" ]
algebra/fraction.v
denom_Ratio
numden_Ratio:= (numer_Ratio, denom_Ratio).
Definition
algebra
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat div seq", "From mathcomp Require Import ssrAC choice tuple bigop ssralg poly polydiv", "From mathcomp Require Import generic_quotient" ]
algebra/fraction.v
numden_Ratio
Ratio_spec(n d : R) : ratio -> R -> R -> Type := | RatioNull of d = 0 : Ratio_spec n d ratio0 n 0 | RatioNonNull (d_neq0 : d != 0) : Ratio_spec n d (@mkRatio (n, d) d_neq0) n d.
Variant
algebra
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat div seq", "From mathcomp Require Import ssrAC choice tuple bigop ssralg poly polydiv", "From mathcomp Require Import generic_quotient" ]
algebra/fraction.v
Ratio_spec
RatioPn d : Ratio_spec n d (Ratio n d) n d. Proof. rewrite /Ratio /insubd; case: insubP=> /= [x /= d_neq0 hx|]. have ->: x = @mkRatio (n, d) d_neq0 by apply: val_inj. by constructor. by rewrite negbK=> /eqP hx; rewrite {2}hx; constructor. Qed.
Lemma
algebra
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat div seq", "From mathcomp Require Import ssrAC choice tuple bigop ssralg poly polydiv", "From mathcomp Require Import generic_quotient" ]
algebra/fraction.v
RatioP
Ratio0x : Ratio x 0 = ratio0. Proof. by rewrite /Ratio /insubd; case: insubP; rewrite //= eqxx. Qed.
Lemma
algebra
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat div seq", "From mathcomp Require Import ssrAC choice tuple bigop ssralg poly polydiv", "From mathcomp Require Import generic_quotient" ]
algebra/fraction.v
Ratio0
equivfx y := equivf_notation x y.
Definition
algebra
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat div seq", "From mathcomp Require Import ssrAC choice tuple bigop ssralg poly polydiv", "From mathcomp Require Import generic_quotient" ]
algebra/fraction.v
equivf
equivfEx y : equivf x y = equivf_notation x y. Proof. by []. Qed.
Lemma
algebra
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat div seq", "From mathcomp Require Import ssrAC choice tuple bigop ssralg poly polydiv", "From mathcomp Require Import generic_quotient" ]
algebra/fraction.v
equivfE
equivf_refl: reflexive equivf. Proof. by move=> x; rewrite /equivf mulrC. Qed.
Lemma
algebra
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat div seq", "From mathcomp Require Import ssrAC choice tuple bigop ssralg poly polydiv", "From mathcomp Require Import generic_quotient" ]
algebra/fraction.v
equivf_refl
equivf_sym: symmetric equivf. Proof. by move=> x y; rewrite /equivf eq_sym; congr (_==_); rewrite mulrC. Qed.
Lemma
algebra
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat div seq", "From mathcomp Require Import ssrAC choice tuple bigop ssralg poly polydiv", "From mathcomp Require Import generic_quotient" ]
algebra/fraction.v
equivf_sym
equivf_trans: transitive equivf. Proof. move=> [x Px] [y Py] [z Pz]; rewrite /equivf /= mulrC => /eqP xy /eqP yz. by rewrite -(inj_eq (mulfI Px)) mulrA xy -mulrA yz mulrCA. Qed.
Lemma
algebra
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat div seq", "From mathcomp Require Import ssrAC choice tuple bigop ssralg poly polydiv", "From mathcomp Require Import generic_quotient" ]
algebra/fraction.v
equivf_trans
equivf_equiv:= EquivRel equivf equivf_refl equivf_sym equivf_trans.
Canonical
algebra
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat div seq", "From mathcomp Require Import ssrAC choice tuple bigop ssralg poly polydiv", "From mathcomp Require Import generic_quotient" ]
algebra/fraction.v
equivf_equiv
type:= {eq_quot equivf}.
Definition
algebra
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat div seq", "From mathcomp Require Import ssrAC choice tuple bigop ssralg poly polydiv", "From mathcomp Require Import generic_quotient" ]
algebra/fraction.v
type
Definition_ : EqQuotient _ equivf type := EqQuotient.on type. HB.instance Definition _ := Choice.on type.
HB.instance
algebra
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat div seq", "From mathcomp Require Import ssrAC choice tuple bigop ssralg poly polydiv", "From mathcomp Require Import generic_quotient" ]
algebra/fraction.v
Definition
equivf_def(x y : ratio R) : x == y %[mod type] = (\n_x * \d_y == \d_x * \n_y). Proof. by rewrite eqmodE. Qed.
Lemma
algebra
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat div seq", "From mathcomp Require Import ssrAC choice tuple bigop ssralg poly polydiv", "From mathcomp Require Import generic_quotient" ]
algebra/fraction.v
equivf_def
equivf_rx : \n_x * \d_(repr (\pi_type x)) = \d_x * \n_(repr (\pi_type x)). Proof. by apply/eqP; rewrite -equivf_def reprK. Qed.
Lemma
algebra
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat div seq", "From mathcomp Require Import ssrAC choice tuple bigop ssralg poly polydiv", "From mathcomp Require Import generic_quotient" ]
algebra/fraction.v
equivf_r
equivf_lx : \n_(repr (\pi_type x)) * \d_x = \d_(repr (\pi_type x)) * \n_x. Proof. by apply/eqP; rewrite -equivf_def reprK. Qed.
Lemma
algebra
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat div seq", "From mathcomp Require Import ssrAC choice tuple bigop ssralg poly polydiv", "From mathcomp Require Import generic_quotient" ]
algebra/fraction.v
equivf_l
numer0x : (\n_x == 0) = (x == (ratio0 R) %[mod_eq equivf]). Proof. by rewrite eqmodE /= !equivfE // mulr1 mulr0. Qed.
Lemma
algebra
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat div seq", "From mathcomp Require Import ssrAC choice tuple bigop ssralg poly polydiv", "From mathcomp Require Import generic_quotient" ]
algebra/fraction.v
numer0
Ratio_numden: forall x, Ratio \n_x \d_x = x. Proof. case=> [[n d] /= nd]; rewrite /Ratio /insubd; apply: val_inj=> /=. by case: insubP=> //=; rewrite nd. Qed.
Lemma
algebra
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat div seq", "From mathcomp Require Import ssrAC choice tuple bigop ssralg poly polydiv", "From mathcomp Require Import generic_quotient" ]
algebra/fraction.v
Ratio_numden
tofrac:= lift_embed type (fun x : R => Ratio x 1).
Definition
algebra
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat div seq", "From mathcomp Require Import ssrAC choice tuple bigop ssralg poly polydiv", "From mathcomp Require Import generic_quotient" ]
algebra/fraction.v
tofrac
tofrac_pi_morph:= PiEmbed tofrac.
Canonical
algebra
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat div seq", "From mathcomp Require Import ssrAC choice tuple bigop ssralg poly polydiv", "From mathcomp Require Import generic_quotient" ]
algebra/fraction.v
tofrac_pi_morph
addfx y : dom := Ratio (\n_x * \d_y + \n_y * \d_x) (\d_x * \d_y).
Definition
algebra
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat div seq", "From mathcomp Require Import ssrAC choice tuple bigop ssralg poly polydiv", "From mathcomp Require Import generic_quotient" ]
algebra/fraction.v
addf
add:= lift_op2 type addf.
Definition
algebra
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat div seq", "From mathcomp Require Import ssrAC choice tuple bigop ssralg poly polydiv", "From mathcomp Require Import generic_quotient" ]
algebra/fraction.v
add
pi_add: {morph \pi : x y / addf x y >-> add x y}. Proof. move=> x y; unlock add; apply/eqmodP; rewrite /= equivfE /addf /=. rewrite !numden_Ratio ?mulf_neq0 ?domP // mulrDr mulrDl; apply/eqP. symmetry; rewrite (AC (2*2) (3*1*2*4)) (AC (2*2) (3*2*1*4))/=. by rewrite !equivf_l (ACl ((2*3)*(1*4))) (ACl ((2*3)*(4*1)))/=. Qed.
Lemma
algebra
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat div seq", "From mathcomp Require Import ssrAC choice tuple bigop ssralg poly polydiv", "From mathcomp Require Import generic_quotient" ]
algebra/fraction.v
pi_add
pi_add_morph:= PiMorph2 pi_add.
Canonical
algebra
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat div seq", "From mathcomp Require Import ssrAC choice tuple bigop ssralg poly polydiv", "From mathcomp Require Import generic_quotient" ]
algebra/fraction.v
pi_add_morph
oppfx : dom := Ratio (- \n_x) \d_x.
Definition
algebra
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat div seq", "From mathcomp Require Import ssrAC choice tuple bigop ssralg poly polydiv", "From mathcomp Require Import generic_quotient" ]
algebra/fraction.v
oppf
opp:= lift_op1 type oppf.
Definition
algebra
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat div seq", "From mathcomp Require Import ssrAC choice tuple bigop ssralg poly polydiv", "From mathcomp Require Import generic_quotient" ]
algebra/fraction.v
opp
pi_opp: {morph \pi : x / oppf x >-> opp x}. Proof. move=> x; unlock opp; apply/eqmodP; rewrite /= /equivf /oppf /=. by rewrite !numden_Ratio ?(domP,mulf_neq0) // mulNr mulrN -equivf_r. Qed.
Lemma
algebra
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat div seq", "From mathcomp Require Import ssrAC choice tuple bigop ssralg poly polydiv", "From mathcomp Require Import generic_quotient" ]
algebra/fraction.v
pi_opp
pi_opp_morph:= PiMorph1 pi_opp.
Canonical
algebra
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat div seq", "From mathcomp Require Import ssrAC choice tuple bigop ssralg poly polydiv", "From mathcomp Require Import generic_quotient" ]
algebra/fraction.v
pi_opp_morph
mulfx y : dom := Ratio (\n_x * \n_y) (\d_x * \d_y).
Definition
algebra
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat div seq", "From mathcomp Require Import ssrAC choice tuple bigop ssralg poly polydiv", "From mathcomp Require Import generic_quotient" ]
algebra/fraction.v
mulf
mul:= lift_op2 type mulf.
Definition
algebra
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat div seq", "From mathcomp Require Import ssrAC choice tuple bigop ssralg poly polydiv", "From mathcomp Require Import generic_quotient" ]
algebra/fraction.v
mul
pi_mul: {morph \pi : x y / mulf x y >-> mul x y}. Proof. move=> x y; unlock mul; apply/eqmodP=> /=. rewrite equivfE /= /addf /= !numden_Ratio ?mulf_neq0 ?domP //. by rewrite mulrACA !equivf_r mulrACA. Qed.
Lemma
algebra
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat div seq", "From mathcomp Require Import ssrAC choice tuple bigop ssralg poly polydiv", "From mathcomp Require Import generic_quotient" ]
algebra/fraction.v
pi_mul
pi_mul_morph:= PiMorph2 pi_mul.
Canonical
algebra
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat div seq", "From mathcomp Require Import ssrAC choice tuple bigop ssralg poly polydiv", "From mathcomp Require Import generic_quotient" ]
algebra/fraction.v
pi_mul_morph
invfx : dom := Ratio \d_x \n_x.
Definition
algebra
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat div seq", "From mathcomp Require Import ssrAC choice tuple bigop ssralg poly polydiv", "From mathcomp Require Import generic_quotient" ]
algebra/fraction.v
invf
inv:= lift_op1 type invf.
Definition
algebra
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat div seq", "From mathcomp Require Import ssrAC choice tuple bigop ssralg poly polydiv", "From mathcomp Require Import generic_quotient" ]
algebra/fraction.v
inv
pi_inv: {morph \pi : x / invf x >-> inv x}. Proof. move=> x; unlock inv; apply/eqmodP=> /=; rewrite equivfE /invf eq_sym. do 2?case: RatioP=> /= [/eqP|]; rewrite ?mul0r ?mul1r -?equivf_def ?numer0 ?reprK //. by move=> hx /eqP hx'; rewrite hx' eqxx in hx. by move=> /eqP ->; rewrite eqxx. Qed.
Lemma
algebra
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat div seq", "From mathcomp Require Import ssrAC choice tuple bigop ssralg poly polydiv", "From mathcomp Require Import generic_quotient" ]
algebra/fraction.v
pi_inv
pi_inv_morph:= PiMorph1 pi_inv.
Canonical
algebra
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat div seq", "From mathcomp Require Import ssrAC choice tuple bigop ssralg poly polydiv", "From mathcomp Require Import generic_quotient" ]
algebra/fraction.v
pi_inv_morph
addA: associative add. Proof. elim/quotW=> x; elim/quotW=> y; elim/quotW=> z; rewrite !piE. rewrite /addf /= !numden_Ratio ?mulf_neq0 ?domP // !mulrDl. by rewrite !mulrA !addrA ![_ * _ * \d_x]mulrAC. Qed.
Lemma
algebra
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat div seq", "From mathcomp Require Import ssrAC choice tuple bigop ssralg poly polydiv", "From mathcomp Require Import generic_quotient" ]
algebra/fraction.v
addA
addC: commutative add. Proof. by elim/quotW=> x; elim/quotW=> y; rewrite !piE /addf addrC [\d__ * _]mulrC. Qed.
Lemma
algebra
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat div seq", "From mathcomp Require Import ssrAC choice tuple bigop ssralg poly polydiv", "From mathcomp Require Import generic_quotient" ]
algebra/fraction.v
addC
add0_l: left_id 0%:F add. Proof. elim/quotW=> x; rewrite !piE /addf !numden_Ratio ?oner_eq0 //. by rewrite mul0r mul1r mulr1 add0r Ratio_numden. Qed.
Lemma
algebra
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat div seq", "From mathcomp Require Import ssrAC choice tuple bigop ssralg poly polydiv", "From mathcomp Require Import generic_quotient" ]
algebra/fraction.v
add0_l
addN_l: left_inverse 0%:F opp add. Proof. elim/quotW=> x; apply/eqP; rewrite piE /equivf. rewrite /addf /oppf !numden_Ratio ?(oner_eq0, mulf_neq0, domP) //. by rewrite mulr1 mulr0 mulNr addNr. Qed.
Lemma
algebra
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat div seq", "From mathcomp Require Import ssrAC choice tuple bigop ssralg poly polydiv", "From mathcomp Require Import generic_quotient" ]
algebra/fraction.v
addN_l
Definition_ := GRing.isZmodule.Build type addA addC add0_l addN_l.
HB.instance
algebra
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat div seq", "From mathcomp Require Import ssrAC choice tuple bigop ssralg poly polydiv", "From mathcomp Require Import generic_quotient" ]
algebra/fraction.v
Definition
mulA: associative mul. Proof. elim/quotW=> x; elim/quotW=> y; elim/quotW=> z; rewrite !piE. by rewrite /mulf !numden_Ratio ?mulf_neq0 ?domP // !mulrA. Qed.
Lemma
algebra
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat div seq", "From mathcomp Require Import ssrAC choice tuple bigop ssralg poly polydiv", "From mathcomp Require Import generic_quotient" ]
algebra/fraction.v
mulA
mulC: commutative mul. Proof. elim/quotW=> x; elim/quotW=> y; rewrite !piE /mulf. by rewrite [_ * (\d_x)]mulrC [_ * (\n_x)]mulrC. Qed.
Lemma
algebra
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat div seq", "From mathcomp Require Import ssrAC choice tuple bigop ssralg poly polydiv", "From mathcomp Require Import generic_quotient" ]
algebra/fraction.v
mulC
mul1_l: left_id 1%:F mul. Proof. elim/quotW=> x; rewrite !piE /mulf. by rewrite !numden_Ratio ?oner_eq0 // !mul1r Ratio_numden. Qed.
Lemma
algebra
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat div seq", "From mathcomp Require Import ssrAC choice tuple bigop ssralg poly polydiv", "From mathcomp Require Import generic_quotient" ]
algebra/fraction.v
mul1_l
mul_addl: left_distributive mul add. Proof. elim/quotW=> x; elim/quotW=> y; elim/quotW=> z; apply/eqP. rewrite !piE /equivf /mulf /addf !numden_Ratio ?mulf_neq0 ?domP //; apply/eqP. rewrite !(mulrDr, mulrDl) (AC (3*(2*2)) (4*2*7*((1*3)*(6*5))))/=. by rewrite [X in _ + X](AC (3*(2*2)) (4*6*7*((1*3)*(2*5))))/=. Qed.
Lemma
algebra
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat div seq", "From mathcomp Require Import ssrAC choice tuple bigop ssralg poly polydiv", "From mathcomp Require Import generic_quotient" ]
algebra/fraction.v
mul_addl
nonzero1: 1%:F != 0%:F :> type. Proof. by rewrite piE equivfE !numden_Ratio ?mul1r ?oner_eq0. Qed.
Lemma
algebra
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat div seq", "From mathcomp Require Import ssrAC choice tuple bigop ssralg poly polydiv", "From mathcomp Require Import generic_quotient" ]
algebra/fraction.v
nonzero1
Definition_ := GRing.Zmodule_isComNzRing.Build type mulA mulC mul1_l mul_addl nonzero1.
HB.instance
algebra
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat div seq", "From mathcomp Require Import ssrAC choice tuple bigop ssralg poly polydiv", "From mathcomp Require Import generic_quotient" ]
algebra/fraction.v
Definition
mulV_l: forall a, a != 0%:F -> mul (inv a) a = 1%:F. Proof. elim/quotW=> x /=; rewrite !piE. rewrite /equivf !numden_Ratio ?oner_eq0 // mulr1 mulr0=> nx0. apply/eqmodP; rewrite /= equivfE. by rewrite !numden_Ratio ?(oner_eq0, mulf_neq0, domP) // !mulr1 mulrC. Qed.
Lemma
algebra
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat div seq", "From mathcomp Require Import ssrAC choice tuple bigop ssralg poly polydiv", "From mathcomp Require Import generic_quotient" ]
algebra/fraction.v
mulV_l
inv0: inv 0%:F = 0%:F. Proof. rewrite !piE /invf !numden_Ratio ?oner_eq0 // /Ratio /insubd. do 2?case: insubP; rewrite //= ?eqxx ?oner_eq0 // => u _ hu _. by congr \pi; apply: val_inj; rewrite /= hu. Qed.
Lemma
algebra
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat div seq", "From mathcomp Require Import ssrAC choice tuple bigop ssralg poly polydiv", "From mathcomp Require Import generic_quotient" ]
algebra/fraction.v
inv0
Definition_ := GRing.ComNzRing_isField.Build type mulV_l inv0.
HB.instance
algebra
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat div seq", "From mathcomp Require Import ssrAC choice tuple bigop ssralg poly polydiv", "From mathcomp Require Import generic_quotient" ]
algebra/fraction.v
Definition