statement
stringlengths
1
4.33k
proof
stringlengths
0
37.9k
type
stringclasses
25 values
symbolic_name
stringlengths
1
67
library
stringclasses
10 values
filename
stringclasses
112 values
imports
listlengths
2
138
deps
listlengths
0
64
docstring
stringclasses
798 values
source_url
stringclasses
1 value
commit
stringclasses
1 value
and_dnf bcs1 bcs2
:= \big[cat/nil]_(bc1 <- bcs1) map (fun bc2 => (bc1.1 ++ bc2.1, bc1.2 ++ bc2.2)) bcs2.
Definition
and_dnf
algebra.algebraic_hierarchy
algebra/algebraic_hierarchy/decfield.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "ssrnat", "seq", "choice", "fintype", "finfun", "bigop", "nmodule", "rings_modules_and_algebras", "divalg", "GRing", "GRing.Theory", "AllExports" ]
[ "cat", "map" ]
DNF preserving conjunction
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
qf_to_dnf (f : formula R) (neg : bool) {struct f}
:= match f with | Bool b => if b (+) neg then [:: ([::], [::])] else [::] | t1 == t2 => [:: if neg then ([::], [:: t1 - t2]) else ([:: t1 - t2], [::])] | f1 /\ f2 => (if neg then cat else and_dnf) [rec f1, neg] [rec f2, neg] | f1 \/ f2 => (if neg then and_dnf else cat) [rec f1, neg] [rec f2, neg] | f1 ==> f...
Fixpoint
qf_to_dnf
algebra.algebraic_hierarchy
algebra/algebraic_hierarchy/decfield.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "ssrnat", "seq", "choice", "fintype", "finfun", "bigop", "nmodule", "rings_modules_and_algebras", "divalg", "GRing", "GRing.Theory", "AllExports" ]
[ "Bool", "and_dnf", "cat", "f1", "f2", "formula", "neg" ]
Computes a DNF from a qf ring formula
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
dnf_to_form
:= let pos_lit t := And (t == 0) in let neg_lit t := And (t != 0) in let cls bc := Or (foldr pos_lit True bc.1 /\ foldr neg_lit True bc.2) in foldr cls False.
Definition
dnf_to_form
algebra.algebraic_hierarchy
algebra/algebraic_hierarchy/decfield.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "ssrnat", "seq", "choice", "fintype", "finfun", "bigop", "nmodule", "rings_modules_and_algebras", "divalg", "GRing", "GRing.Theory", "AllExports" ]
[ "And", "False", "True", "foldr" ]
Conversely, transforms a DNF into a formula
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
cat_dnfP e bcs1 bcs2 : qf_eval e (dnf_to_form (bcs1 ++ bcs2)) = qf_eval e (dnf_to_form bcs1 \/ dnf_to_form bcs2).
Proof. by elim: bcs1 => //= bc1 bcs1 IH1; rewrite -orbA; congr orb; rewrite IH1. Qed.
Lemma
cat_dnfP
algebra.algebraic_hierarchy
algebra/algebraic_hierarchy/decfield.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "ssrnat", "seq", "choice", "fintype", "finfun", "bigop", "nmodule", "rings_modules_and_algebras", "divalg", "GRing", "GRing.Theory", "AllExports" ]
[ "dnf_to_form", "qf_eval" ]
Catenation of dnf is the Or of formulas
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
and_dnfP e bcs1 bcs2 : qf_eval e (dnf_to_form (and_dnf bcs1 bcs2)) = qf_eval e (dnf_to_form bcs1 /\ dnf_to_form bcs2).
Proof. elim: bcs1 => [|bc1 bcs1 IH1] /=; first by rewrite /and_dnf big_nil. rewrite /and_dnf big_cons -/(and_dnf bcs1 bcs2) cat_dnfP /=. rewrite {}IH1 /= andb_orl; congr orb. elim: bcs2 bc1 {bcs1} => [|bc2 bcs2 IH] bc1 /=; first by rewrite andbF. rewrite {}IH /= andb_orr; congr orb => {bcs2}. suffices aux (l1 l2 : seq...
Lemma
and_dnfP
algebra.algebraic_hierarchy
algebra/algebraic_hierarchy/decfield.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "ssrnat", "seq", "choice", "fintype", "finfun", "bigop", "nmodule", "rings_modules_and_algebras", "divalg", "GRing", "GRing.Theory", "AllExports" ]
[ "And", "True", "and_dnf", "big_cons", "big_nil", "cat_dnfP", "dnf_to_form", "foldr", "l1", "l2", "qf_eval", "seq", "term" ]
and_dnf is the And of formulas
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
qf_to_dnfP e : let qev f b := qf_eval e (dnf_to_form (qf_to_dnf f b)) in forall f, qf_form f && rformula f -> qev f false = qf_eval e f.
Proof. move=> qev; have qevT f: qev f true = ~~ qev f false. rewrite {}/qev; elim: f => //=; do [by case | move=> f1 IH1 f2 IH2 | ]. - by move=> t1 t2; rewrite !andbT !orbF. - by rewrite and_dnfP cat_dnfP negb_and -IH1 -IH2. - by rewrite and_dnfP cat_dnfP negb_or -IH1 -IH2. - by rewrite and_dnfP cat_dnfP /= n...
Lemma
qf_to_dnfP
algebra.algebraic_hierarchy
algebra/algebraic_hierarchy/decfield.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "ssrnat", "seq", "choice", "fintype", "finfun", "bigop", "nmodule", "rings_modules_and_algebras", "divalg", "GRing", "GRing.Theory", "AllExports" ]
[ "and_dnfP", "cat_dnfP", "dnf_to_form", "f1", "f2", "qf_eval", "qf_form", "qf_to_dnf", "rformula", "subr_eq0" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
dnf_to_form_qf bcs : qf_form (dnf_to_form bcs).
Proof. by elim: bcs => //= [[clT clF] _ ->] /=; elim: clT => //=; elim: clF. Qed.
Lemma
dnf_to_form_qf
algebra.algebraic_hierarchy
algebra/algebraic_hierarchy/decfield.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "ssrnat", "seq", "choice", "fintype", "finfun", "bigop", "nmodule", "rings_modules_and_algebras", "divalg", "GRing", "GRing.Theory", "AllExports" ]
[ "dnf_to_form", "qf_form" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
dnf_rterm cl
:= all rterm cl.1 && all rterm cl.2.
Definition
dnf_rterm
algebra.algebraic_hierarchy
algebra/algebraic_hierarchy/decfield.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "ssrnat", "seq", "choice", "fintype", "finfun", "bigop", "nmodule", "rings_modules_and_algebras", "divalg", "GRing", "GRing.Theory", "AllExports" ]
[ "all", "rterm" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
qf_to_dnf_rterm f b : rformula f -> all dnf_rterm (qf_to_dnf f b).
Proof. set ok := all dnf_rterm. have cat_ok bcs1 bcs2: ok bcs1 -> ok bcs2 -> ok (bcs1 ++ bcs2). by move=> ok1 ok2; rewrite [ok _]all_cat; apply/andP. have and_ok bcs1 bcs2: ok bcs1 -> ok bcs2 -> ok (and_dnf bcs1 bcs2). rewrite /and_dnf unlock; elim: bcs1 => //= cl1 bcs1 IH1; rewrite -andbA. case/and3P=> ok11 ok12...
Lemma
qf_to_dnf_rterm
algebra.algebraic_hierarchy
algebra/algebraic_hierarchy/decfield.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "ssrnat", "seq", "choice", "fintype", "finfun", "bigop", "nmodule", "rings_modules_and_algebras", "divalg", "GRing", "GRing.Theory", "AllExports" ]
[ "all", "all_cat", "and_dnf", "apply", "dnf_rterm", "qf_to_dnf", "rformula" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
dnf_to_rform bcs : rformula (dnf_to_form bcs) = all dnf_rterm bcs.
Proof. elim: bcs => //= [[cl1 cl2] bcs ->]; rewrite {2}/dnf_rterm /=; congr (_ && _). by (congr andb; [elim: cl1 | elim: cl2]) => //= t cl ->; rewrite andbT. Qed.
Lemma
dnf_to_rform
algebra.algebraic_hierarchy
algebra/algebraic_hierarchy/decfield.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "ssrnat", "seq", "choice", "fintype", "finfun", "bigop", "nmodule", "rings_modules_and_algebras", "divalg", "GRing", "GRing.Theory", "AllExports" ]
[ "all", "dnf_rterm", "dnf_to_form", "rformula" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
If
:= (pred_f /\ then_f \/ ~ pred_f /\ else_f)%T.
Definition
If
algebra.algebraic_hierarchy
algebra/algebraic_hierarchy/decfield.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "ssrnat", "seq", "choice", "fintype", "finfun", "bigop", "nmodule", "rings_modules_and_algebras", "divalg", "GRing", "GRing.Theory", "AllExports" ]
[]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
If_form_qf : qf_form pred_f -> qf_form then_f -> qf_form else_f -> qf_form If.
Proof. by move=> /= -> -> ->. Qed.
Lemma
If_form_qf
algebra.algebraic_hierarchy
algebra/algebraic_hierarchy/decfield.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "ssrnat", "seq", "choice", "fintype", "finfun", "bigop", "nmodule", "rings_modules_and_algebras", "divalg", "GRing", "GRing.Theory", "AllExports" ]
[ "If", "qf_form" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
If_form_rf : rformula pred_f -> rformula then_f -> rformula else_f -> rformula If.
Proof. by move=> /= -> -> ->. Qed.
Lemma
If_form_rf
algebra.algebraic_hierarchy
algebra/algebraic_hierarchy/decfield.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "ssrnat", "seq", "choice", "fintype", "finfun", "bigop", "nmodule", "rings_modules_and_algebras", "divalg", "GRing", "GRing.Theory", "AllExports" ]
[ "If", "rformula" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
eval_If e : let ev := qf_eval e in ev If = (if ev pred_f then ev then_f else ev else_f).
Proof. by rewrite /=; case: ifP => _; rewrite ?orbF. Qed.
Lemma
eval_If
algebra.algebraic_hierarchy
algebra/algebraic_hierarchy/decfield.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "ssrnat", "seq", "choice", "fintype", "finfun", "bigop", "nmodule", "rings_modules_and_algebras", "divalg", "GRing", "GRing.Theory", "AllExports" ]
[ "If", "qf_eval" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
Pick
:= \big[Or/False]_(p : {ffun pred I}) ((\big[And/True]_i (if p i then pred_f i else ~ pred_f i)) /\ (if pick p is Some i then then_f i else else_f))%T.
Definition
Pick
algebra.algebraic_hierarchy
algebra/algebraic_hierarchy/decfield.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "ssrnat", "seq", "choice", "fintype", "finfun", "bigop", "nmodule", "rings_modules_and_algebras", "divalg", "GRing", "GRing.Theory", "AllExports" ]
[ "And", "False", "True", "pick" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
Pick_form_qf : (forall i, qf_form (pred_f i)) -> (forall i, qf_form (then_f i)) -> qf_form else_f -> qf_form Pick.
Proof. move=> qfp qft qfe; have mA := (big_morph qf_form) true andb. rewrite mA // big1 //= => p _. rewrite mA // big1 => [i _|]; last by case: pick. by rewrite fun_if if_same /= qfp. Qed.
Lemma
Pick_form_qf
algebra.algebraic_hierarchy
algebra/algebraic_hierarchy/decfield.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "ssrnat", "seq", "choice", "fintype", "finfun", "bigop", "nmodule", "rings_modules_and_algebras", "divalg", "GRing", "GRing.Theory", "AllExports" ]
[ "Pick", "big1", "big_morph", "last", "pick", "qf_form" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
eval_Pick e (qev := qf_eval e) : let P i := qev (pred_f i) in qev Pick = (if pick P is Some i then qev (then_f i) else qev else_f).
Proof. move=> P; rewrite ((big_morph qev) false orb) //= big_orE /=. apply/existsP/idP=> [[p] | true_at_P]. rewrite ((big_morph qev) true andb) //= big_andE /=. case/andP=> /forallP-eq_p_P. rewrite (@eq_pick _ _ P) => [i|]; last by case: pick. by move/(_ i): eq_p_P => /=; case: (p i) => //= /negPf. exists [ffun...
Lemma
eval_Pick
algebra.algebraic_hierarchy
algebra/algebraic_hierarchy/decfield.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "ssrnat", "seq", "choice", "fintype", "finfun", "bigop", "nmodule", "rings_modules_and_algebras", "divalg", "GRing", "GRing.Theory", "AllExports" ]
[ "Pick", "apply", "big_andE", "big_morph", "big_orE", "eq_pick", "existsP", "ffunE", "forallP", "last", "pick", "qf_eval", "split" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
foldExistsP I e : (exists2 e', {in [predC I], same_env e e'} & holds e' f) <-> holds e (foldr Exists f I).
Proof. elim: I e => /= [|i I IHi] e. by split=> [[e' eq_e] |]; [apply: eq_holds => i; rewrite eq_e | exists e]. split=> [[e' eq_e f_e'] | [x]]; last set e_x := set_nth 0 e i x. exists e'`_i; apply/IHi; exists e' => // j. by have:= eq_e j; rewrite nth_set_nth /= !inE; case: eqP => // ->. case/IHi=> e' eq_e f_e'; e...
Lemma
foldExistsP
algebra.algebraic_hierarchy
algebra/algebraic_hierarchy/decfield.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "ssrnat", "seq", "choice", "fintype", "finfun", "bigop", "nmodule", "rings_modules_and_algebras", "divalg", "GRing", "GRing.Theory", "AllExports" ]
[ "apply", "e'", "eq_holds", "foldr", "holds", "inE", "last", "nth_set_nth", "same_env", "set_nth", "split" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
foldForallP I e : (forall e', {in [predC I], same_env e e'} -> holds e' f) <-> holds e (foldr Forall f I).
Proof. elim: I e => /= [|i I IHi] e. by split=> [|f_e e' eq_e]; [apply | apply: eq_holds f_e => i; rewrite eq_e]. split=> [f_e' x | f_e e' eq_e]; first set e_x := set_nth 0 e i x. apply/IHi=> e' eq_e; apply: f_e' => j. by have:= eq_e j; rewrite nth_set_nth /= !inE; case: eqP. move/IHi: (f_e e'`_i); apply=> j. by ...
Lemma
foldForallP
algebra.algebraic_hierarchy
algebra/algebraic_hierarchy/decfield.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "ssrnat", "seq", "choice", "fintype", "finfun", "bigop", "nmodule", "rings_modules_and_algebras", "divalg", "GRing", "GRing.Theory", "AllExports" ]
[ "apply", "e'", "eq_holds", "foldr", "holds", "inE", "nth_set_nth", "same_env", "set_nth", "split" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
decidable_field_axiom (R : unitRingType) (s : seq R -> pred (formula R))
:= forall e f, reflect (holds e f) (s e f).
Definition
decidable_field_axiom
algebra.algebraic_hierarchy
algebra/algebraic_hierarchy/decfield.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "ssrnat", "seq", "choice", "fintype", "finfun", "bigop", "nmodule", "rings_modules_and_algebras", "divalg", "GRing", "GRing.Theory", "AllExports" ]
[ "formula", "holds", "seq" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
sol_subproof n f : reflect (exists s, (size s == n) && sat s f) (sat [::] (foldr Exists f (iota 0 n))).
Proof. apply: (iffP (satP _ _)) => [|[s]]; last first. case/andP=> /eqP sz_s /satP f_s; apply/foldExistsP. exists s => // i; rewrite !inE mem_iota -leqNgt add0n => le_n_i. by rewrite !nth_default ?sz_s. case/foldExistsP=> e e0 f_e; set s := take n (set_nth 0 e n 0). have sz_s: size s = n by rewrite size_take size...
Fact
sol_subproof
algebra.algebraic_hierarchy
algebra/algebraic_hierarchy/decfield.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "ssrnat", "seq", "choice", "fintype", "finfun", "bigop", "nmodule", "rings_modules_and_algebras", "divalg", "GRing", "GRing.Theory", "AllExports" ]
[ "add0n", "apply", "e0", "eq_holds", "eq_sym", "eqn_leq", "eqxx", "foldExistsP", "foldr", "inE", "iota", "last", "leqNgt", "leqP", "leq_max", "leqnn", "mem_iota", "nth_default", "nth_set_nth", "nth_take", "sat", "satP", "set_nth", "size", "size_set_nth", "size_take",...
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
sol n f
:= if sol_subproof n f is ReflectT sP then xchoose sP else nseq n 0.
Definition
sol
algebra.algebraic_hierarchy
algebra/algebraic_hierarchy/decfield.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "ssrnat", "seq", "choice", "fintype", "finfun", "bigop", "nmodule", "rings_modules_and_algebras", "divalg", "GRing", "GRing.Theory", "AllExports" ]
[ "nseq", "sol_subproof", "xchoose" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
size_sol n f : size (sol n f) = n.
Proof. rewrite /sol; case: sol_subproof => [sP | _]; last exact: size_nseq. by case/andP: (xchooseP sP) => /eqP. Qed.
Lemma
size_sol
algebra.algebraic_hierarchy
algebra/algebraic_hierarchy/decfield.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "ssrnat", "seq", "choice", "fintype", "finfun", "bigop", "nmodule", "rings_modules_and_algebras", "divalg", "GRing", "GRing.Theory", "AllExports" ]
[ "last", "size", "size_nseq", "sol", "sol_subproof", "xchooseP" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
solP n f : reflect (exists2 s, size s = n & holds s f) (sat (sol n f) f).
Proof. rewrite /sol; case: sol_subproof => [sP | sPn]. case/andP: (xchooseP sP) => _ ->; left. by case: sP => s; case/andP; move/eqP=> <-; move/satP; exists s. apply: (iffP (satP _ _)); first by exists (nseq n 0); rewrite ?size_nseq. by case=> s sz_s; move/satP=> f_s; case: sPn; exists s; rewrite sz_s eqxx. Qed.
Lemma
solP
algebra.algebraic_hierarchy
algebra/algebraic_hierarchy/decfield.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "ssrnat", "seq", "choice", "fintype", "finfun", "bigop", "nmodule", "rings_modules_and_algebras", "divalg", "GRing", "GRing.Theory", "AllExports" ]
[ "apply", "eqxx", "holds", "nseq", "sat", "satP", "size", "size_nseq", "sol", "sol_subproof", "xchooseP" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
eq_sat f1 f2 : (forall e, holds e f1 <-> holds e f2) -> sat^~ f1 =1 sat^~ f2.
Proof. by move=> eqf12 e; apply/satP/satP; case: (eqf12 e). Qed.
Lemma
eq_sat
algebra.algebraic_hierarchy
algebra/algebraic_hierarchy/decfield.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "ssrnat", "seq", "choice", "fintype", "finfun", "bigop", "nmodule", "rings_modules_and_algebras", "divalg", "GRing", "GRing.Theory", "AllExports" ]
[ "apply", "f1", "f2", "holds", "sat", "satP" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
eq_sol f1 f2 : (forall e, holds e f1 <-> holds e f2) -> sol^~ f1 =1 sol^~ f2.
Proof. rewrite /sol => /eq_sat eqf12 n. do 2![case: sol_subproof] => //= [f1s f2s | ns1 [s f2s] | [s f1s] []]. - by apply: eq_xchoose => s; rewrite eqf12. - by case: ns1; exists s; rewrite -eqf12. by exists s; rewrite eqf12. Qed.
Lemma
eq_sol
algebra.algebraic_hierarchy
algebra/algebraic_hierarchy/decfield.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "ssrnat", "seq", "choice", "fintype", "finfun", "bigop", "nmodule", "rings_modules_and_algebras", "divalg", "GRing", "GRing.Theory", "AllExports" ]
[ "apply", "eq_sat", "eq_xchoose", "f1", "f2", "holds", "sol", "sol_subproof" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
wf_QE_proj
:= forall i bc (bc_i := proj i bc), dnf_rterm bc -> qf_form bc_i && rformula bc_i.
Definition
wf_QE_proj
algebra.algebraic_hierarchy
algebra/algebraic_hierarchy/decfield.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "ssrnat", "seq", "choice", "fintype", "finfun", "bigop", "nmodule", "rings_modules_and_algebras", "divalg", "GRing", "GRing.Theory", "AllExports" ]
[ "dnf_rterm", "qf_form", "rformula" ]
The elimination projector is well_formed.
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
valid_QE_proj
:= forall i bc (ex_i_bc := ('exists 'X_i, dnf_to_form [:: bc])%T) e, dnf_rterm bc -> reflect (holds e ex_i_bc) (qf_eval e (proj i bc)).
Definition
valid_QE_proj
algebra.algebraic_hierarchy
algebra/algebraic_hierarchy/decfield.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "ssrnat", "seq", "choice", "fintype", "finfun", "bigop", "nmodule", "rings_modules_and_algebras", "divalg", "GRing", "GRing.Theory", "AllExports" ]
[ "dnf_rterm", "dnf_to_form", "holds", "qf_eval" ]
The elimination projector is valid
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
(wf_proj : wf_QE_proj) (ok_proj : valid_QE_proj).
Hypotheses
wf_proj
algebra.algebraic_hierarchy
algebra/algebraic_hierarchy/decfield.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "ssrnat", "seq", "choice", "fintype", "finfun", "bigop", "nmodule", "rings_modules_and_algebras", "divalg", "GRing", "GRing.Theory", "AllExports" ]
[ "valid_QE_proj", "wf_QE_proj" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
elim_aux f n
:= foldr Or False (map (proj n) (qf_to_dnf f false)).
Let
elim_aux
algebra.algebraic_hierarchy
algebra/algebraic_hierarchy/decfield.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "ssrnat", "seq", "choice", "fintype", "finfun", "bigop", "nmodule", "rings_modules_and_algebras", "divalg", "GRing", "GRing.Theory", "AllExports" ]
[ "False", "foldr", "map", "qf_to_dnf" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
quantifier_elim f
:= match f with | f1 /\ f2 => (quantifier_elim f1) /\ (quantifier_elim f2) | f1 \/ f2 => (quantifier_elim f1) \/ (quantifier_elim f2) | f1 ==> f2 => (~ quantifier_elim f1) \/ (quantifier_elim f2) | ~ f => ~ quantifier_elim f | ('exists 'X_n, f) => elim_aux (quantifier_elim f) n | ('forall 'X_n, f) => ~ el...
Fixpoint
quantifier_elim
algebra.algebraic_hierarchy
algebra/algebraic_hierarchy/decfield.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "ssrnat", "seq", "choice", "fintype", "finfun", "bigop", "nmodule", "rings_modules_and_algebras", "divalg", "GRing", "GRing.Theory", "AllExports" ]
[ "elim_aux", "f1", "f2" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
quantifier_elim_wf f : let qf := quantifier_elim f in rformula f -> qf_form qf && rformula qf.
Proof. suffices aux_wf f0 n : let qf := elim_aux f0 n in rformula f0 -> qf_form qf && rformula qf. - by elim: f => //=; do ?[ move=> f1 IH1 f2 IH2; case/andP=> rf1 rf2; case/andP:(IH1 rf1)=> -> ->; case/andP:(IH2 rf2)=> -> -> // | move...
Lemma
quantifier_elim_wf
algebra.algebraic_hierarchy
algebra/algebraic_hierarchy/decfield.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "ssrnat", "seq", "choice", "fintype", "finfun", "bigop", "nmodule", "rings_modules_and_algebras", "divalg", "GRing", "GRing.Theory", "AllExports" ]
[ "False", "all", "apply", "dnf_rterm", "elim_aux", "f1", "f2", "foldr", "map", "qf", "qf_form", "qf_to_dnf_rterm", "quantifier_elim", "rformula", "wf_proj" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
quantifier_elim_rformP e f : rformula f -> reflect (holds e f) (qf_eval e (quantifier_elim f)).
Proof. pose rc e n f := exists x, qf_eval (set_nth 0 e n x) f. have auxP f0 e0 n0: qf_form f0 && rformula f0 -> reflect (rc e0 n0 f0) (qf_eval e0 (elim_aux f0 n0)). + rewrite /elim_aux => cf; set bcs := qf_to_dnf f0 false. apply: (@iffP (rc e0 n0 (dnf_to_form bcs))); last first. - by case=> x; rewrite -qf_to_dnfP...
Lemma
quantifier_elim_rformP
algebra.algebraic_hierarchy
algebra/algebraic_hierarchy/decfield.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "ssrnat", "seq", "choice", "fintype", "finfun", "bigop", "nmodule", "rings_modules_and_algebras", "divalg", "GRing", "GRing.Theory", "AllExports" ]
[ "all", "apply", "dnf_rterm", "dnf_to_form", "dnf_to_form_qf", "e0", "elim_aux", "f1", "f2", "holds", "last", "qf_eval", "qf_evalP", "qf_form", "qf_to_dnf", "qf_to_dnfP", "qf_to_dnf_rterm", "quantifier_elim", "quantifier_elim_wf", "rformula", "set_nth" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
proj_sat e f
:= qf_eval e (quantifier_elim (to_rform f)).
Definition
proj_sat
algebra.algebraic_hierarchy
algebra/algebraic_hierarchy/decfield.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "ssrnat", "seq", "choice", "fintype", "finfun", "bigop", "nmodule", "rings_modules_and_algebras", "divalg", "GRing", "GRing.Theory", "AllExports" ]
[ "qf_eval", "quantifier_elim", "to_rform" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
proj_satP : DecidableField.axiom proj_sat.
Proof. move=> e f; have fP := quantifier_elim_rformP e (to_rform_rformula f). by apply: (iffP fP); move/to_rformP. Qed.
Lemma
proj_satP
algebra.algebraic_hierarchy
algebra/algebraic_hierarchy/decfield.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "ssrnat", "seq", "choice", "fintype", "finfun", "bigop", "nmodule", "rings_modules_and_algebras", "divalg", "GRing", "GRing.Theory", "AllExports" ]
[ "apply", "axiom", "fP", "proj_sat", "quantifier_elim_rformP", "to_rformP", "to_rform_rformula" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
closed_field_axiom (R : pzRingType)
:= forall n (P : nat -> R), n > 0 -> exists x : R, x ^+ n = \sum_(i < n) P i * (x ^+ i).
Definition
closed_field_axiom
algebra.algebraic_hierarchy
algebra/algebraic_hierarchy/decfield.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "ssrnat", "seq", "choice", "fintype", "finfun", "bigop", "nmodule", "rings_modules_and_algebras", "divalg", "GRing", "GRing.Theory", "AllExports" ]
[ "nat" ]
Axiom == all non-constant monic polynomials have a root
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
imaginary_exists : {i : F | i ^+ 2 = -1}.
Proof. have /sig_eqW[i Di2] := @solve_monicpoly F 2 (nth 0 [:: -1]) isT. by exists i; rewrite Di2 !big_ord_recl big_ord0 mul0r mulr1 !addr0. Qed.
Lemma
imaginary_exists
algebra.algebraic_hierarchy
algebra/algebraic_hierarchy/decfield.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "ssrnat", "seq", "choice", "fintype", "finfun", "bigop", "nmodule", "rings_modules_and_algebras", "divalg", "GRing", "GRing.Theory", "AllExports" ]
[ "addr0", "big_ord0", "big_ord_recl", "mul0r", "mulr1", "nth", "sig_eqW", "solve_monicpoly" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
eq_eval
:= eq_eval.
Definition
eq_eval
algebra.algebraic_hierarchy
algebra/algebraic_hierarchy/decfield.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "ssrnat", "seq", "choice", "fintype", "finfun", "bigop", "nmodule", "rings_modules_and_algebras", "divalg", "GRing", "GRing.Theory", "AllExports" ]
[]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
eval_tsubst
:= eval_tsubst.
Definition
eval_tsubst
algebra.algebraic_hierarchy
algebra/algebraic_hierarchy/decfield.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "ssrnat", "seq", "choice", "fintype", "finfun", "bigop", "nmodule", "rings_modules_and_algebras", "divalg", "GRing", "GRing.Theory", "AllExports" ]
[]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
eq_holds
:= eq_holds.
Definition
eq_holds
algebra.algebraic_hierarchy
algebra/algebraic_hierarchy/decfield.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "ssrnat", "seq", "choice", "fintype", "finfun", "bigop", "nmodule", "rings_modules_and_algebras", "divalg", "GRing", "GRing.Theory", "AllExports" ]
[]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
holds_fsubst
:= holds_fsubst.
Definition
holds_fsubst
algebra.algebraic_hierarchy
algebra/algebraic_hierarchy/decfield.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "ssrnat", "seq", "choice", "fintype", "finfun", "bigop", "nmodule", "rings_modules_and_algebras", "divalg", "GRing", "GRing.Theory", "AllExports" ]
[]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
satP {F e f}
:= @satP F e f.
Definition
satP
algebra.algebraic_hierarchy
algebra/algebraic_hierarchy/decfield.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "ssrnat", "seq", "choice", "fintype", "finfun", "bigop", "nmodule", "rings_modules_and_algebras", "divalg", "GRing", "GRing.Theory", "AllExports" ]
[]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
eq_sat
:= eq_sat.
Definition
eq_sat
algebra.algebraic_hierarchy
algebra/algebraic_hierarchy/decfield.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "ssrnat", "seq", "choice", "fintype", "finfun", "bigop", "nmodule", "rings_modules_and_algebras", "divalg", "GRing", "GRing.Theory", "AllExports" ]
[]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
solP {F n f}
:= @solP F n f.
Definition
solP
algebra.algebraic_hierarchy
algebra/algebraic_hierarchy/decfield.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "ssrnat", "seq", "choice", "fintype", "finfun", "bigop", "nmodule", "rings_modules_and_algebras", "divalg", "GRing", "GRing.Theory", "AllExports" ]
[]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
eq_sol
:= eq_sol.
Definition
eq_sol
algebra.algebraic_hierarchy
algebra/algebraic_hierarchy/decfield.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "ssrnat", "seq", "choice", "fintype", "finfun", "bigop", "nmodule", "rings_modules_and_algebras", "divalg", "GRing", "GRing.Theory", "AllExports" ]
[]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
size_sol
:= size_sol.
Definition
size_sol
algebra.algebraic_hierarchy
algebra/algebraic_hierarchy/decfield.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "ssrnat", "seq", "choice", "fintype", "finfun", "bigop", "nmodule", "rings_modules_and_algebras", "divalg", "GRing", "GRing.Theory", "AllExports" ]
[]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
solve_monicpoly
:= @solve_monicpoly.
Definition
solve_monicpoly
algebra.algebraic_hierarchy
algebra/algebraic_hierarchy/decfield.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "ssrnat", "seq", "choice", "fintype", "finfun", "bigop", "nmodule", "rings_modules_and_algebras", "divalg", "GRing", "GRing.Theory", "AllExports" ]
[]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
imaginary_exists
:= imaginary_exists.
Definition
imaginary_exists
algebra.algebraic_hierarchy
algebra/algebraic_hierarchy/decfield.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "ssrnat", "seq", "choice", "fintype", "finfun", "bigop", "nmodule", "rings_modules_and_algebras", "divalg", "GRing", "GRing.Theory", "AllExports" ]
[]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
"x != y"
:= (GRing.Not (x == y)) : term_scope.
Notation
x != y
algebra.algebraic_hierarchy
algebra/algebraic_hierarchy/decfield.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "ssrnat", "seq", "choice", "fintype", "finfun", "bigop", "nmodule", "rings_modules_and_algebras", "divalg", "GRing", "GRing.Theory", "AllExports" ]
[]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
unit_pred {R : unitRingType}
:= Eval cbv [ unit_subdef NzRing_hasMulInverse.unit_subdef ] in (fun u : R => unit_subdef u).
Definition
unit_pred
algebra.algebraic_hierarchy
algebra/algebraic_hierarchy/divalg.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "ssrnat", "seq", "div", "choice", "fintype", "bigop", "prime", "nmodule", "rings_modules_and_algebras", "GRing", "GRing.Theory", "AllExports", "ClosedExports" ]
[]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
unit {R : unitRingType}
:= [qualify a u : R | unit_pred u].
Definition
unit
algebra.algebraic_hierarchy
algebra/algebraic_hierarchy/divalg.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "ssrnat", "seq", "div", "choice", "fintype", "bigop", "prime", "nmodule", "rings_modules_and_algebras", "GRing", "GRing.Theory", "AllExports", "ClosedExports" ]
[ "unit_pred" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
"x ^-1"
:= (inv x).
Notation
x ^-1
algebra.algebraic_hierarchy
algebra/algebraic_hierarchy/divalg.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "ssrnat", "seq", "div", "choice", "fintype", "bigop", "prime", "nmodule", "rings_modules_and_algebras", "GRing", "GRing.Theory", "AllExports", "ClosedExports" ]
[ "inv" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
"x / y"
:= (x * y^-1).
Notation
x / y
algebra.algebraic_hierarchy
algebra/algebraic_hierarchy/divalg.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "ssrnat", "seq", "div", "choice", "fintype", "bigop", "prime", "nmodule", "rings_modules_and_algebras", "GRing", "GRing.Theory", "AllExports", "ClosedExports" ]
[]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
"x ^- n"
:= ((x ^+ n)^-1).
Notation
x ^- n
algebra.algebraic_hierarchy
algebra/algebraic_hierarchy/divalg.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "ssrnat", "seq", "div", "choice", "fintype", "bigop", "prime", "nmodule", "rings_modules_and_algebras", "GRing", "GRing.Theory", "AllExports", "ClosedExports" ]
[]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
divrr : {in unit, right_inverse 1 (@inv R) *%R}.
Proof. exact: divrr_subproof. Qed.
Lemma
divrr
algebra.algebraic_hierarchy
algebra/algebraic_hierarchy/divalg.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "ssrnat", "seq", "div", "choice", "fintype", "bigop", "prime", "nmodule", "rings_modules_and_algebras", "GRing", "GRing.Theory", "AllExports", "ClosedExports" ]
[ "inv", "unit" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
mulrV
:= divrr.
Definition
mulrV
algebra.algebraic_hierarchy
algebra/algebraic_hierarchy/divalg.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "ssrnat", "seq", "div", "choice", "fintype", "bigop", "prime", "nmodule", "rings_modules_and_algebras", "GRing", "GRing.Theory", "AllExports", "ClosedExports" ]
[ "divrr" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
mulVr : {in unit, left_inverse 1 (@inv R) *%R}.
Proof. exact: mulVr_subproof. Qed.
Lemma
mulVr
algebra.algebraic_hierarchy
algebra/algebraic_hierarchy/divalg.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "ssrnat", "seq", "div", "choice", "fintype", "bigop", "prime", "nmodule", "rings_modules_and_algebras", "GRing", "GRing.Theory", "AllExports", "ClosedExports" ]
[ "inv", "unit" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
invr_out x : x \isn't a unit -> x^-1 = x.
Proof. exact: invr_out_subproof. Qed.
Lemma
invr_out
algebra.algebraic_hierarchy
algebra/algebraic_hierarchy/divalg.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "ssrnat", "seq", "div", "choice", "fintype", "bigop", "prime", "nmodule", "rings_modules_and_algebras", "GRing", "GRing.Theory", "AllExports", "ClosedExports" ]
[ "unit" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
unitrP x : reflect (exists y, y * x = 1 /\ x * y = 1) (x \is a unit).
Proof. apply: (iffP idP) => [Ux | []]; last exact: unitrP_subproof. by exists x^-1; rewrite divrr ?mulVr. Qed.
Lemma
unitrP
algebra.algebraic_hierarchy
algebra/algebraic_hierarchy/divalg.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "ssrnat", "seq", "div", "choice", "fintype", "bigop", "prime", "nmodule", "rings_modules_and_algebras", "GRing", "GRing.Theory", "AllExports", "ClosedExports" ]
[ "apply", "divrr", "last", "mulVr", "unit" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
mulKr : {in unit, left_loop (@inv R) *%R}.
Proof. by move=> x Ux y; rewrite mulrA mulVr ?mul1r. Qed.
Lemma
mulKr
algebra.algebraic_hierarchy
algebra/algebraic_hierarchy/divalg.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "ssrnat", "seq", "div", "choice", "fintype", "bigop", "prime", "nmodule", "rings_modules_and_algebras", "GRing", "GRing.Theory", "AllExports", "ClosedExports" ]
[ "inv", "mul1r", "mulVr", "mulrA", "unit" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
mulVKr : {in unit, rev_left_loop (@inv R) *%R}.
Proof. by move=> x Ux y; rewrite mulrA mulrV ?mul1r. Qed.
Lemma
mulVKr
algebra.algebraic_hierarchy
algebra/algebraic_hierarchy/divalg.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "ssrnat", "seq", "div", "choice", "fintype", "bigop", "prime", "nmodule", "rings_modules_and_algebras", "GRing", "GRing.Theory", "AllExports", "ClosedExports" ]
[ "inv", "mul1r", "mulrA", "mulrV", "unit" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
mulrK : {in unit, right_loop (@inv R) *%R}.
Proof. by move=> x Ux y; rewrite -mulrA divrr ?mulr1. Qed.
Lemma
mulrK
algebra.algebraic_hierarchy
algebra/algebraic_hierarchy/divalg.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "ssrnat", "seq", "div", "choice", "fintype", "bigop", "prime", "nmodule", "rings_modules_and_algebras", "GRing", "GRing.Theory", "AllExports", "ClosedExports" ]
[ "divrr", "inv", "mulr1", "mulrA", "unit" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
mulrVK : {in unit, rev_right_loop (@inv R) *%R}.
Proof. by move=> x Ux y; rewrite -mulrA mulVr ?mulr1. Qed.
Lemma
mulrVK
algebra.algebraic_hierarchy
algebra/algebraic_hierarchy/divalg.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "ssrnat", "seq", "div", "choice", "fintype", "bigop", "prime", "nmodule", "rings_modules_and_algebras", "GRing", "GRing.Theory", "AllExports", "ClosedExports" ]
[ "inv", "mulVr", "mulr1", "mulrA", "unit" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
divrK
:= mulrVK.
Definition
divrK
algebra.algebraic_hierarchy
algebra/algebraic_hierarchy/divalg.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "ssrnat", "seq", "div", "choice", "fintype", "bigop", "prime", "nmodule", "rings_modules_and_algebras", "GRing", "GRing.Theory", "AllExports", "ClosedExports" ]
[ "mulrVK" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
mulrI : {in @unit R, right_injective *%R}.
Proof. by move=> x Ux; apply: can_inj (mulKr Ux). Qed.
Lemma
mulrI
algebra.algebraic_hierarchy
algebra/algebraic_hierarchy/divalg.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "ssrnat", "seq", "div", "choice", "fintype", "bigop", "prime", "nmodule", "rings_modules_and_algebras", "GRing", "GRing.Theory", "AllExports", "ClosedExports" ]
[ "apply", "mulKr", "unit" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
mulIr : {in @unit R, left_injective *%R}.
Proof. by move=> x Ux; apply: can_inj (mulrK Ux). Qed.
Lemma
mulIr
algebra.algebraic_hierarchy
algebra/algebraic_hierarchy/divalg.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "ssrnat", "seq", "div", "choice", "fintype", "bigop", "prime", "nmodule", "rings_modules_and_algebras", "GRing", "GRing.Theory", "AllExports", "ClosedExports" ]
[ "apply", "mulrK", "unit" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
telescope_prodr n m (f : nat -> R) : (forall k, n < k < m -> f k \is a unit) -> n < m -> \prod_(n <= k < m) (f k / f k.+1) = f n / f m.
Proof. move=> Uf ltnm; rewrite (telescope_big (fun i j => f i / f j)) ?ltnm//. by move=> k ltnkm /=; rewrite mulrA divrK// Uf. Qed.
Lemma
telescope_prodr
algebra.algebraic_hierarchy
algebra/algebraic_hierarchy/divalg.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "ssrnat", "seq", "div", "choice", "fintype", "bigop", "prime", "nmodule", "rings_modules_and_algebras", "GRing", "GRing.Theory", "AllExports", "ClosedExports" ]
[ "divrK", "mulrA", "nat", "telescope_big", "unit" ]
Due to noncommutativity, fractions are inverted.
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
telescope_prodr_eq n m (f u : nat -> R) : n < m -> (forall k, n < k < m -> f k \is a unit) -> (forall k, (n <= k < m)%N -> u k = f k / f k.+1) -> \prod_(n <= k < m) u k = f n / f m.
Proof. by move=> ? ? uE; under eq_big_nat do rewrite uE //=; exact: telescope_prodr. Qed.
Lemma
telescope_prodr_eq
algebra.algebraic_hierarchy
algebra/algebraic_hierarchy/divalg.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "ssrnat", "seq", "div", "choice", "fintype", "bigop", "prime", "nmodule", "rings_modules_and_algebras", "GRing", "GRing.Theory", "AllExports", "ClosedExports" ]
[ "eq_big_nat", "nat", "telescope_prodr", "unit" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
commrV x y : comm x y -> comm x y^-1.
Proof. have [Uy cxy | /invr_out-> //] := boolP (y \in unit). by apply: (canLR (mulrK Uy)); rewrite -mulrA cxy mulKr. Qed.
Lemma
commrV
algebra.algebraic_hierarchy
algebra/algebraic_hierarchy/divalg.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "ssrnat", "seq", "div", "choice", "fintype", "bigop", "prime", "nmodule", "rings_modules_and_algebras", "GRing", "GRing.Theory", "AllExports", "ClosedExports" ]
[ "apply", "comm", "invr_out", "mulKr", "mulrA", "mulrK", "unit" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
unitrE x : (x \is a unit) = (x / x == 1).
Proof. apply/idP/eqP=> [Ux | xx1]; first exact: divrr. by apply/unitrP; exists x^-1; rewrite -commrV. Qed.
Lemma
unitrE
algebra.algebraic_hierarchy
algebra/algebraic_hierarchy/divalg.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "ssrnat", "seq", "div", "choice", "fintype", "bigop", "prime", "nmodule", "rings_modules_and_algebras", "GRing", "GRing.Theory", "AllExports", "ClosedExports" ]
[ "apply", "commrV", "divrr", "unit", "unitrP" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
invrK : involutive (@inv R).
Proof. move=> x; case Ux: (x \in unit); last by rewrite !invr_out ?Ux. rewrite -(mulrK Ux _^-1) -mulrA commrV ?mulKr //. by apply/unitrP; exists x; rewrite divrr ?mulVr. Qed.
Lemma
invrK
algebra.algebraic_hierarchy
algebra/algebraic_hierarchy/divalg.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "ssrnat", "seq", "div", "choice", "fintype", "bigop", "prime", "nmodule", "rings_modules_and_algebras", "GRing", "GRing.Theory", "AllExports", "ClosedExports" ]
[ "apply", "commrV", "divrr", "inv", "invr_out", "last", "mulKr", "mulVr", "mulrA", "mulrK", "unit", "unitrP" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
invr_inj : injective (@inv R).
Proof. exact: inv_inj invrK. Qed.
Lemma
invr_inj
algebra.algebraic_hierarchy
algebra/algebraic_hierarchy/divalg.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "ssrnat", "seq", "div", "choice", "fintype", "bigop", "prime", "nmodule", "rings_modules_and_algebras", "GRing", "GRing.Theory", "AllExports", "ClosedExports" ]
[ "inv", "invrK" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
unitrV x : (x^-1 \in unit) = (x \in unit).
Proof. by rewrite !unitrE invrK commrV. Qed.
Lemma
unitrV
algebra.algebraic_hierarchy
algebra/algebraic_hierarchy/divalg.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "ssrnat", "seq", "div", "choice", "fintype", "bigop", "prime", "nmodule", "rings_modules_and_algebras", "GRing", "GRing.Theory", "AllExports", "ClosedExports" ]
[ "commrV", "invrK", "unit", "unitrE" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
unitr1 : 1 \in @unit R.
Proof. by apply/unitrP; exists 1; rewrite mulr1. Qed.
Lemma
unitr1
algebra.algebraic_hierarchy
algebra/algebraic_hierarchy/divalg.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "ssrnat", "seq", "div", "choice", "fintype", "bigop", "prime", "nmodule", "rings_modules_and_algebras", "GRing", "GRing.Theory", "AllExports", "ClosedExports" ]
[ "apply", "mulr1", "unit", "unitrP" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
invr1 : 1^-1 = 1 :> R.
Proof. by rewrite -{2}(mulVr unitr1) mulr1. Qed.
Lemma
invr1
algebra.algebraic_hierarchy
algebra/algebraic_hierarchy/divalg.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "ssrnat", "seq", "div", "choice", "fintype", "bigop", "prime", "nmodule", "rings_modules_and_algebras", "GRing", "GRing.Theory", "AllExports", "ClosedExports" ]
[ "mulVr", "mulr1", "unitr1" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
div1r x : 1 / x = x^-1.
Proof. by rewrite mul1r. Qed.
Lemma
div1r
algebra.algebraic_hierarchy
algebra/algebraic_hierarchy/divalg.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "ssrnat", "seq", "div", "choice", "fintype", "bigop", "prime", "nmodule", "rings_modules_and_algebras", "GRing", "GRing.Theory", "AllExports", "ClosedExports" ]
[ "mul1r" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
divr1 x : x / 1 = x.
Proof. by rewrite invr1 mulr1. Qed.
Lemma
divr1
algebra.algebraic_hierarchy
algebra/algebraic_hierarchy/divalg.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "ssrnat", "seq", "div", "choice", "fintype", "bigop", "prime", "nmodule", "rings_modules_and_algebras", "GRing", "GRing.Theory", "AllExports", "ClosedExports" ]
[ "invr1", "mulr1" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
natr_div m d : d %| m -> d%:R \is a @unit R -> (m %/ d)%:R = m%:R / d%:R :> R.
Proof. by rewrite dvdn_eq => /eqP def_m unit_d; rewrite -{2}def_m natrM mulrK. Qed.
Lemma
natr_div
algebra.algebraic_hierarchy
algebra/algebraic_hierarchy/divalg.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "ssrnat", "seq", "div", "choice", "fintype", "bigop", "prime", "nmodule", "rings_modules_and_algebras", "GRing", "GRing.Theory", "AllExports", "ClosedExports" ]
[ "dvdn_eq", "mulrK", "natrM", "unit" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
divrI : {in unit, right_injective (fun x y => x / y)}.
Proof. by move=> x /mulrI/inj_comp; apply; apply: invr_inj. Qed.
Lemma
divrI
algebra.algebraic_hierarchy
algebra/algebraic_hierarchy/divalg.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "ssrnat", "seq", "div", "choice", "fintype", "bigop", "prime", "nmodule", "rings_modules_and_algebras", "GRing", "GRing.Theory", "AllExports", "ClosedExports" ]
[ "apply", "invr_inj", "mulrI", "unit" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
divIr : {in unit, left_injective (fun x y => x / y)}.
Proof. by move=> x; rewrite -unitrV => /mulIr. Qed.
Lemma
divIr
algebra.algebraic_hierarchy
algebra/algebraic_hierarchy/divalg.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "ssrnat", "seq", "div", "choice", "fintype", "bigop", "prime", "nmodule", "rings_modules_and_algebras", "GRing", "GRing.Theory", "AllExports", "ClosedExports" ]
[ "mulIr", "unit", "unitrV" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
unitr0 : (0 \is a @unit R) = false.
Proof. by apply/unitrP=> [[x [_ /esym/eqP]]]; rewrite mul0r oner_eq0. Qed.
Lemma
unitr0
algebra.algebraic_hierarchy
algebra/algebraic_hierarchy/divalg.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "ssrnat", "seq", "div", "choice", "fintype", "bigop", "prime", "nmodule", "rings_modules_and_algebras", "GRing", "GRing.Theory", "AllExports", "ClosedExports" ]
[ "apply", "mul0r", "oner_eq0", "unit", "unitrP" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
invr0 : 0^-1 = 0 :> R.
Proof. by rewrite invr_out ?unitr0. Qed.
Lemma
invr0
algebra.algebraic_hierarchy
algebra/algebraic_hierarchy/divalg.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "ssrnat", "seq", "div", "choice", "fintype", "bigop", "prime", "nmodule", "rings_modules_and_algebras", "GRing", "GRing.Theory", "AllExports", "ClosedExports" ]
[ "invr_out", "unitr0" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
unitrN1 : -1 \is a @unit R.
Proof. by apply/unitrP; exists (-1); rewrite mulrNN mulr1. Qed.
Lemma
unitrN1
algebra.algebraic_hierarchy
algebra/algebraic_hierarchy/divalg.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "ssrnat", "seq", "div", "choice", "fintype", "bigop", "prime", "nmodule", "rings_modules_and_algebras", "GRing", "GRing.Theory", "AllExports", "ClosedExports" ]
[ "apply", "mulr1", "mulrNN", "unit", "unitrP" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
invrN1 : (-1)^-1 = -1 :> R.
Proof. by rewrite -{2}(divrr unitrN1) mulN1r opprK. Qed.
Lemma
invrN1
algebra.algebraic_hierarchy
algebra/algebraic_hierarchy/divalg.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "ssrnat", "seq", "div", "choice", "fintype", "bigop", "prime", "nmodule", "rings_modules_and_algebras", "GRing", "GRing.Theory", "AllExports", "ClosedExports" ]
[ "divrr", "mulN1r", "opprK", "unitrN1" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
invr_sign n : ((-1) ^- n) = (-1) ^+ n :> R.
Proof. by rewrite -signr_odd; case: (odd n); rewrite (invr1, invrN1). Qed.
Lemma
invr_sign
algebra.algebraic_hierarchy
algebra/algebraic_hierarchy/divalg.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "ssrnat", "seq", "div", "choice", "fintype", "bigop", "prime", "nmodule", "rings_modules_and_algebras", "GRing", "GRing.Theory", "AllExports", "ClosedExports" ]
[ "invr1", "invrN1", "odd", "signr_odd" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
unitrMl x y : y \is a unit -> (x * y \is a unit) = (x \is a unit).
Proof. move=> Uy; wlog Ux: x y Uy / x \is a unit => [WHxy|]. by apply/idP/idP=> Ux; first rewrite -(mulrK Uy x); rewrite WHxy ?unitrV. rewrite Ux; apply/unitrP; exists (y^-1 * x^-1). by rewrite -!mulrA mulKr ?mulrA ?mulrK ?divrr ?mulVr. Qed.
Lemma
unitrMl
algebra.algebraic_hierarchy
algebra/algebraic_hierarchy/divalg.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "ssrnat", "seq", "div", "choice", "fintype", "bigop", "prime", "nmodule", "rings_modules_and_algebras", "GRing", "GRing.Theory", "AllExports", "ClosedExports" ]
[ "apply", "divrr", "mulKr", "mulVr", "mulrA", "mulrK", "unit", "unitrP", "unitrV" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
unitrMr x y : x \is a unit -> (x * y \is a unit) = (y \is a unit).
Proof. move=> Ux; apply/idP/idP=> [Uxy | Uy]; last by rewrite unitrMl. by rewrite -(mulKr Ux y) unitrMl ?unitrV. Qed.
Lemma
unitrMr
algebra.algebraic_hierarchy
algebra/algebraic_hierarchy/divalg.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "ssrnat", "seq", "div", "choice", "fintype", "bigop", "prime", "nmodule", "rings_modules_and_algebras", "GRing", "GRing.Theory", "AllExports", "ClosedExports" ]
[ "apply", "last", "mulKr", "unit", "unitrMl", "unitrV" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
unitr_prod {I : Type} (P : pred I) (E : I -> R) (r : seq I) : (forall i, P i -> E i \is a GRing.unit) -> (\prod_(i <- r | P i) E i \is a GRing.unit).
Proof. by move=> Eunit; elim/big_rec: _ => [/[!unitr1] |i x /Eunit/unitrMr->]. Qed.
Lemma
unitr_prod
algebra.algebraic_hierarchy
algebra/algebraic_hierarchy/divalg.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "ssrnat", "seq", "div", "choice", "fintype", "bigop", "prime", "nmodule", "rings_modules_and_algebras", "GRing", "GRing.Theory", "AllExports", "ClosedExports" ]
[ "big_rec", "seq", "unit", "unitr1", "unitrMr" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
unitr_prod_in {I : eqType} (P : pred I) (E : I -> R) (r : seq I) : {in r, forall i, P i -> E i \is a GRing.unit} -> (\prod_(i <- r | P i) E i \is a GRing.unit).
Proof. by rewrite big_seq_cond => H; apply: unitr_prod => i /andP[]; exact: H. Qed.
Lemma
unitr_prod_in
algebra.algebraic_hierarchy
algebra/algebraic_hierarchy/divalg.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "ssrnat", "seq", "div", "choice", "fintype", "bigop", "prime", "nmodule", "rings_modules_and_algebras", "GRing", "GRing.Theory", "AllExports", "ClosedExports" ]
[ "apply", "big_seq_cond", "seq", "unit", "unitr_prod" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
invrM : {in unit &, forall x y, (x * y)^-1 = y^-1 * x^-1}.
Proof. move=> x y Ux Uy; have Uxy: (x * y \in unit) by rewrite unitrMl. by apply: (mulrI Uxy); rewrite divrr ?mulrA ?mulrK ?divrr. Qed.
Lemma
invrM
algebra.algebraic_hierarchy
algebra/algebraic_hierarchy/divalg.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "ssrnat", "seq", "div", "choice", "fintype", "bigop", "prime", "nmodule", "rings_modules_and_algebras", "GRing", "GRing.Theory", "AllExports", "ClosedExports" ]
[ "apply", "divrr", "mulrA", "mulrI", "mulrK", "unit", "unitrMl" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
unitrM_comm x y : comm x y -> (x * y \is a unit) = (x \is a unit) && (y \is a unit).
Proof. move=> cxy; apply/idP/andP=> [Uxy | [Ux Uy]]; last by rewrite unitrMl. suffices Ux: x \in unit by rewrite unitrMr in Uxy. apply/unitrP; case/unitrP: Uxy => z [zxy xyz]; exists (y * z). rewrite mulrA xyz -{1}[y]mul1r -{1}zxy cxy -!mulrA (mulrA x) (mulrA _ z) xyz. by rewrite mul1r -cxy. Qed.
Lemma
unitrM_comm
algebra.algebraic_hierarchy
algebra/algebraic_hierarchy/divalg.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "ssrnat", "seq", "div", "choice", "fintype", "bigop", "prime", "nmodule", "rings_modules_and_algebras", "GRing", "GRing.Theory", "AllExports", "ClosedExports" ]
[ "apply", "comm", "last", "mul1r", "mulrA", "unit", "unitrMl", "unitrMr", "unitrP" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
unitrX x n : x \is a unit -> x ^+ n \is a unit.
Proof. by move=> Ux; elim: n => [|n IHn]; rewrite ?unitr1 // exprS unitrMl. Qed.
Lemma
unitrX
algebra.algebraic_hierarchy
algebra/algebraic_hierarchy/divalg.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "ssrnat", "seq", "div", "choice", "fintype", "bigop", "prime", "nmodule", "rings_modules_and_algebras", "GRing", "GRing.Theory", "AllExports", "ClosedExports" ]
[ "exprS", "unit", "unitr1", "unitrMl" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
unitrX_pos x n : n > 0 -> (x ^+ n \in unit) = (x \in unit).
Proof. case: n => // n _; rewrite exprS unitrM_comm; first exact: commrX. by case Ux: (x \is a unit); rewrite // unitrX. Qed.
Lemma
unitrX_pos
algebra.algebraic_hierarchy
algebra/algebraic_hierarchy/divalg.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "ssrnat", "seq", "div", "choice", "fintype", "bigop", "prime", "nmodule", "rings_modules_and_algebras", "GRing", "GRing.Theory", "AllExports", "ClosedExports" ]
[ "commrX", "exprS", "unit", "unitrM_comm", "unitrX" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
exprVn x n : x^-1 ^+ n = x ^- n.
Proof. elim: n => [|n IHn]; first by rewrite !expr0 ?invr1. case Ux: (x \is a unit); first by rewrite exprSr exprS IHn -invrM // unitrX. by rewrite !invr_out ?unitrX_pos ?Ux. Qed.
Lemma
exprVn
algebra.algebraic_hierarchy
algebra/algebraic_hierarchy/divalg.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "ssrnat", "seq", "div", "choice", "fintype", "bigop", "prime", "nmodule", "rings_modules_and_algebras", "GRing", "GRing.Theory", "AllExports", "ClosedExports" ]
[ "expr0", "exprS", "exprSr", "invr1", "invrM", "invr_out", "unit", "unitrX", "unitrX_pos" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
exprB m n x : n <= m -> x \is a unit -> x ^+ (m - n) = x ^+ m / x ^+ n.
Proof. by move/subnK=> {2}<- Ux; rewrite exprD mulrK ?unitrX. Qed.
Lemma
exprB
algebra.algebraic_hierarchy
algebra/algebraic_hierarchy/divalg.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "ssrnat", "seq", "div", "choice", "fintype", "bigop", "prime", "nmodule", "rings_modules_and_algebras", "GRing", "GRing.Theory", "AllExports", "ClosedExports" ]
[ "exprD", "mulrK", "subnK", "unit", "unitrX" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
invr_neq0 x : x != 0 -> x^-1 != 0.
Proof. move=> nx0; case Ux: (x \is a unit); last by rewrite invr_out ?Ux. by apply/eqP=> x'0; rewrite -unitrV x'0 unitr0 in Ux. Qed.
Lemma
invr_neq0
algebra.algebraic_hierarchy
algebra/algebraic_hierarchy/divalg.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "ssrnat", "seq", "div", "choice", "fintype", "bigop", "prime", "nmodule", "rings_modules_and_algebras", "GRing", "GRing.Theory", "AllExports", "ClosedExports" ]
[ "apply", "invr_out", "last", "unit", "unitr0", "unitrV" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
invr_eq0 x : (x^-1 == 0) = (x == 0).
Proof. by apply: negb_inj; apply/idP/idP; move/invr_neq0; rewrite ?invrK. Qed.
Lemma
invr_eq0
algebra.algebraic_hierarchy
algebra/algebraic_hierarchy/divalg.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "ssrnat", "seq", "div", "choice", "fintype", "bigop", "prime", "nmodule", "rings_modules_and_algebras", "GRing", "GRing.Theory", "AllExports", "ClosedExports" ]
[ "apply", "invrK", "invr_neq0" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
invr_eq1 x : (x^-1 == 1) = (x == 1).
Proof. by rewrite (inv_eq invrK) invr1. Qed.
Lemma
invr_eq1
algebra.algebraic_hierarchy
algebra/algebraic_hierarchy/divalg.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "ssrnat", "seq", "div", "choice", "fintype", "bigop", "prime", "nmodule", "rings_modules_and_algebras", "GRing", "GRing.Theory", "AllExports", "ClosedExports" ]
[ "inv_eq", "invr1", "invrK" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
rev_unitrP (x y : R^c) : y * x = 1 /\ x * y = 1 -> x \is a unit.
Proof. by case=> [yx1 xy1]; apply/unitrP; exists y. Qed.
Lemma
rev_unitrP
algebra.algebraic_hierarchy
algebra/algebraic_hierarchy/divalg.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "ssrnat", "seq", "div", "choice", "fintype", "bigop", "prime", "nmodule", "rings_modules_and_algebras", "GRing", "GRing.Theory", "AllExports", "ClosedExports" ]
[ "apply", "unit", "unitrP" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
rev_prodrV (R : unitRingType) (I : Type) (r : seq I) (P : pred I) (E : I -> R) : (forall i, P i -> E i \is a GRing.unit) -> \prod_(i <- r | P i) (E i)^-1 = ((\prod_(i <- r | P i) (E i : R^c))^-1).
Proof. move=> Eunit; symmetry. apply: (big_morph_in GRing.unit _ _ (unitr1 R^c) (@invrM _) (invr1 _)) Eunit. by move=> x y xunit; rewrite unitrMr. Qed.
Lemma
rev_prodrV
algebra.algebraic_hierarchy
algebra/algebraic_hierarchy/divalg.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "ssrnat", "seq", "div", "choice", "fintype", "bigop", "prime", "nmodule", "rings_modules_and_algebras", "GRing", "GRing.Theory", "AllExports", "ClosedExports" ]
[ "apply", "big_morph_in", "invr1", "invrM", "seq", "unit", "unitr1", "unitrMr" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d