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
natrP x : reflect (exists n, x = n%:R) (nat_num x).
Proof. rewrite natrE. by apply: (iffP eqP) => [<-|[n ->]]; [exists (truncn x) | rewrite natrK]. Qed.
Fact
natrP
algebra
algebra/archimedean.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "ssrnat", "seq", "choice", "fintype", "bigop", "nmodule", "order", "rings_modules_and_algebras", "divalg", "decfield", "poly", "orderedzmod", "numdomain", "numfield", "ssrint", "Order.TTheory", ...
[ "apply", "nat_num", "natrE", "natrK", "truncn" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
bound x
:= sval (sigW (archi_bound_subproof x)).
Definition
bound
algebra
algebra/archimedean.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "ssrnat", "seq", "choice", "fintype", "bigop", "nmodule", "order", "rings_modules_and_algebras", "divalg", "decfield", "poly", "orderedzmod", "numdomain", "numfield", "ssrint", "Order.TTheory", ...
[ "sigW" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
boundP x : 0 <= x -> x < (bound x)%:R.
Proof. by move/ger0_norm=> {1}<-; rewrite /bound; case: (sigW _). Qed.
Fact
boundP
algebra
algebra/archimedean.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "ssrnat", "seq", "choice", "fintype", "bigop", "nmodule", "order", "rings_modules_and_algebras", "divalg", "decfield", "poly", "orderedzmod", "numdomain", "numfield", "ssrint", "Order.TTheory", ...
[ "bound", "ger0_norm", "sigW" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
truncn_sig x : {m | 0 <= x -> m%:R <= x < m.+1%:R}.
Proof. have [Rx | _] := boolP (0 <= x); last by exists 0%N. have/ex_minnP[n lt_x_n1 min_n]: exists n, x < n.+1%:R. by exists (bound x); rewrite (lt_trans (boundP Rx)) ?ltr_nat. exists n => _; rewrite {}lt_x_n1 andbT; case: n min_n => //= n min_n. rewrite real_leNgt ?rpred_nat ?ger0_real //; apply/negP => /min_n. by r...
Fact
truncn_sig
algebra
algebra/archimedean.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "ssrnat", "seq", "choice", "fintype", "bigop", "nmodule", "order", "rings_modules_and_algebras", "divalg", "decfield", "poly", "orderedzmod", "numdomain", "numfield", "ssrint", "Order.TTheory", ...
[ "apply", "bound", "boundP", "ex_minnP", "ger0_real", "last", "lt_trans", "ltnn", "ltr_nat", "real_leNgt", "rpred_nat" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
truncn x
:= if 0 <= x then sval (truncn_sig x) else 0%N.
Definition
truncn
algebra
algebra/archimedean.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "ssrnat", "seq", "choice", "fintype", "bigop", "nmodule", "order", "rings_modules_and_algebras", "divalg", "decfield", "poly", "orderedzmod", "numdomain", "numfield", "ssrint", "Order.TTheory", ...
[ "truncn_sig" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
truncn_subproof x : if 0 <= x then (truncn x)%:R <= x < (truncn x).+1%:R else truncn x == 0%N.
Proof. rewrite /truncn; case: truncn_sig => // n hn. by case: ifP => x_ge0; rewrite ?(ifT _ _ x_ge0) ?(ifF _ _ x_ge0) // hn. Qed.
Fact
truncn_subproof
algebra
algebra/archimedean.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "ssrnat", "seq", "choice", "fintype", "bigop", "nmodule", "order", "rings_modules_and_algebras", "divalg", "decfield", "poly", "orderedzmod", "numdomain", "numfield", "ssrint", "Order.TTheory", ...
[ "truncn", "truncn_sig" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
nat
:= nat_num.
Notation
nat
algebra
algebra/archimedean.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "ssrnat", "seq", "choice", "fintype", "bigop", "nmodule", "order", "rings_modules_and_algebras", "divalg", "decfield", "poly", "orderedzmod", "numdomain", "numfield", "ssrint", "Order.TTheory", ...
[ "nat_num" ]
Not to pollute the local namespace, we define Num.nat and Num.int here.
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
int
:= int_num.
Notation
int
algebra
algebra/archimedean.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "ssrnat", "seq", "choice", "fintype", "bigop", "nmodule", "order", "rings_modules_and_algebras", "divalg", "decfield", "poly", "orderedzmod", "numdomain", "numfield", "ssrint", "Order.TTheory", ...
[ "int_num" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
ArchiDomain T
:= (ArchiRealDomain T) (only parsing).
Notation
ArchiDomain
algebra
algebra/archimedean.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "ssrnat", "seq", "choice", "fintype", "bigop", "nmodule", "order", "rings_modules_and_algebras", "divalg", "decfield", "poly", "orderedzmod", "numdomain", "numfield", "ssrint", "Order.TTheory", ...
[]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
type
:= ArchiRealDomain.type (only parsing).
Notation
type
algebra
algebra/archimedean.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "ssrnat", "seq", "choice", "fintype", "bigop", "nmodule", "order", "rings_modules_and_algebras", "divalg", "decfield", "poly", "orderedzmod", "numdomain", "numfield", "ssrint", "Order.TTheory", ...
[]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
copy T C
:= (ArchiRealDomain.copy T C) (only parsing).
Notation
copy
algebra
algebra/archimedean.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "ssrnat", "seq", "choice", "fintype", "bigop", "nmodule", "order", "rings_modules_and_algebras", "divalg", "decfield", "poly", "orderedzmod", "numdomain", "numfield", "ssrint", "Order.TTheory", ...
[]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
on T
:= (ArchiRealDomain.on T) (only parsing).
Notation
on
algebra
algebra/archimedean.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "ssrnat", "seq", "choice", "fintype", "bigop", "nmodule", "order", "rings_modules_and_algebras", "divalg", "decfield", "poly", "orderedzmod", "numdomain", "numfield", "ssrint", "Order.TTheory", ...
[]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
ArchiField T
:= (ArchiRealField T) (only parsing).
Notation
ArchiField
algebra
algebra/archimedean.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "ssrnat", "seq", "choice", "fintype", "bigop", "nmodule", "order", "rings_modules_and_algebras", "divalg", "decfield", "poly", "orderedzmod", "numdomain", "numfield", "ssrint", "Order.TTheory", ...
[]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
type
:= ArchiRealField.type (only parsing).
Notation
type
algebra
algebra/archimedean.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "ssrnat", "seq", "choice", "fintype", "bigop", "nmodule", "order", "rings_modules_and_algebras", "divalg", "decfield", "poly", "orderedzmod", "numdomain", "numfield", "ssrint", "Order.TTheory", ...
[]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
copy T C
:= (ArchiRealField.copy T C) (only parsing).
Notation
copy
algebra
algebra/archimedean.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "ssrnat", "seq", "choice", "fintype", "bigop", "nmodule", "order", "rings_modules_and_algebras", "divalg", "decfield", "poly", "orderedzmod", "numdomain", "numfield", "ssrint", "Order.TTheory", ...
[]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
on T
:= (ArchiRealField.on T) (only parsing).
Notation
on
algebra
algebra/archimedean.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "ssrnat", "seq", "choice", "fintype", "bigop", "nmodule", "order", "rings_modules_and_algebras", "divalg", "decfield", "poly", "orderedzmod", "numdomain", "numfield", "ssrint", "Order.TTheory", ...
[]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
floorD
:= real_floorDzr (only parsing).
Notation
floorD
algebra
algebra/archimedean.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "ssrnat", "seq", "choice", "fintype", "bigop", "nmodule", "order", "rings_modules_and_algebras", "divalg", "decfield", "poly", "orderedzmod", "numdomain", "numfield", "ssrint", "Order.TTheory", ...
[ "real_floorDzr" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
ceilD
:= real_ceilDzr (only parsing).
Notation
ceilD
algebra
algebra/archimedean.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "ssrnat", "seq", "choice", "fintype", "bigop", "nmodule", "order", "rings_modules_and_algebras", "divalg", "decfield", "poly", "orderedzmod", "numdomain", "numfield", "ssrint", "Order.TTheory", ...
[ "real_ceilDzr" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
real_ceilD
:= real_ceilDzr (only parsing).
Notation
real_ceilD
algebra
algebra/archimedean.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "ssrnat", "seq", "choice", "fintype", "bigop", "nmodule", "order", "rings_modules_and_algebras", "divalg", "decfield", "poly", "orderedzmod", "numdomain", "numfield", "ssrint", "Order.TTheory", ...
[ "real_ceilDzr" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
archiDomainType
:= archiRealDomainType (only parsing).
Notation
archiDomainType
algebra
algebra/archimedean.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "ssrnat", "seq", "choice", "fintype", "bigop", "nmodule", "order", "rings_modules_and_algebras", "divalg", "decfield", "poly", "orderedzmod", "numdomain", "numfield", "ssrint", "Order.TTheory", ...
[]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
archiFieldType
:= archiRealFieldType (only parsing).
Notation
archiFieldType
algebra
algebra/archimedean.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "ssrnat", "seq", "choice", "fintype", "bigop", "nmodule", "order", "rings_modules_and_algebras", "divalg", "decfield", "poly", "orderedzmod", "numdomain", "numfield", "ssrint", "Order.TTheory", ...
[]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
env_nth
:= (env_nth 0).
Notation
env_nth
algebra
algebra/arithmetic_tactic.v
[ "elpi", "derive.std", "param2", "Corelib", "BinNums", "micromega_plugin", "PosDef", "NatDef", "IntDef", "RatDef", "formula", "witness", "tactics", "checker", "eval", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "ssrnat", "seq", "order", "ssralg", "ssrnum", ...
[]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
Peval
:= (Peval +%R *%R N.to_nat (@GRing.exp R) R_of_C (@env_jump R) env_nth).
Notation
Peval
algebra
algebra/arithmetic_tactic.v
[ "elpi", "derive.std", "param2", "Corelib", "BinNums", "micromega_plugin", "PosDef", "NatDef", "IntDef", "RatDef", "formula", "witness", "tactics", "checker", "eval", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "ssrnat", "seq", "order", "ssralg", "ssrnum", ...
[ "env_jump", "env_nth", "exp" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
Psquare
:= (Psquare 0 1 +%R *%R eq_op).
Notation
Psquare
algebra
algebra/arithmetic_tactic.v
[ "elpi", "derive.std", "param2", "Corelib", "BinNums", "micromega_plugin", "PosDef", "NatDef", "IntDef", "RatDef", "formula", "witness", "tactics", "checker", "eval", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "ssrnat", "seq", "order", "ssralg", "ssrnum", ...
[]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
Peval_square l P : Peval l (Psquare P) = Peval l P ^+ 2.
Proof. elim: P l => [c | j Q IH | P IHP i Q IHQ] l; rewrite /= ?rmorphM ?expr2 ?IH//. rewrite Peval_mkPX PevalD Peval_mkPX PevalM Peval_mkPinj PevalMC IHP. rewrite IHQ /= rmorph0 addr0 [in LHS]mulrDl -mulrA mulrACA. set p := Peval l P * env_nth 1 l ^+ Pos.to_nat i; set q := Peval _ Q. rewrite rmorphD rmorph1 [X in _ + ...
Lemma
Peval_square
algebra
algebra/arithmetic_tactic.v
[ "elpi", "derive.std", "param2", "Corelib", "BinNums", "micromega_plugin", "PosDef", "NatDef", "IntDef", "RatDef", "formula", "witness", "tactics", "checker", "eval", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "ssrnat", "seq", "order", "ssralg", "ssrnum", ...
[ "Peval", "PevalD", "PevalM", "PevalMC", "Peval_mkPX", "Peval_mkPinj", "Psquare", "addr0", "env_nth", "expr2", "mulrA", "mulrAC", "mulrACA", "mulrDl", "mulr_natr", "rmorph0", "rmorph1", "rmorphD", "rmorphM", "sqrrD" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
is_tautoT : forall t t', is_tauto t t' -> eval t || eval t'.
Hypothesis
is_tautoT
algebra
algebra/arithmetic_tactic.v
[ "elpi", "derive.std", "param2", "Corelib", "BinNums", "micromega_plugin", "PosDef", "NatDef", "IntDef", "RatDef", "formula", "witness", "tactics", "checker", "eval", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "ssrnat", "seq", "order", "ssralg", "ssrnum", ...
[ "eval", "is_tauto" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
clause
:= (clause Term Annot).
Notation
clause
algebra
algebra/arithmetic_tactic.v
[ "elpi", "derive.std", "param2", "Corelib", "BinNums", "micromega_plugin", "PosDef", "NatDef", "IntDef", "RatDef", "formula", "witness", "tactics", "checker", "eval", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "ssrnat", "seq", "order", "ssralg", "ssrnum", ...
[]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
cnf
:= (cnf Term Annot).
Notation
cnf
algebra
algebra/arithmetic_tactic.v
[ "elpi", "derive.std", "param2", "Corelib", "BinNums", "micromega_plugin", "PosDef", "NatDef", "IntDef", "RatDef", "formula", "witness", "tactics", "checker", "eval", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "ssrnat", "seq", "order", "ssralg", "ssrnum", ...
[]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
cnf_tt
:= (cnf_tt Term Annot).
Notation
cnf_tt
algebra
algebra/arithmetic_tactic.v
[ "elpi", "derive.std", "param2", "Corelib", "BinNums", "micromega_plugin", "PosDef", "NatDef", "IntDef", "RatDef", "formula", "witness", "tactics", "checker", "eval", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "ssrnat", "seq", "order", "ssralg", "ssrnum", ...
[]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
cnf_ff
:= (cnf_ff Term Annot).
Notation
cnf_ff
algebra
algebra/arithmetic_tactic.v
[ "elpi", "derive.std", "param2", "Corelib", "BinNums", "micromega_plugin", "PosDef", "NatDef", "IntDef", "RatDef", "formula", "witness", "tactics", "checker", "eval", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "ssrnat", "seq", "order", "ssralg", "ssrnum", ...
[]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
add_term
:= (add_term is_tauto).
Notation
add_term
algebra
algebra/arithmetic_tactic.v
[ "elpi", "derive.std", "param2", "Corelib", "BinNums", "micromega_plugin", "PosDef", "NatDef", "IntDef", "RatDef", "formula", "witness", "tactics", "checker", "eval", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "ssrnat", "seq", "order", "ssralg", "ssrnum", ...
[ "is_tauto" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
or_clause
:= (or_clause is_tauto).
Notation
or_clause
algebra
algebra/arithmetic_tactic.v
[ "elpi", "derive.std", "param2", "Corelib", "BinNums", "micromega_plugin", "PosDef", "NatDef", "IntDef", "RatDef", "formula", "witness", "tactics", "checker", "eval", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "ssrnat", "seq", "order", "ssralg", "ssrnum", ...
[ "is_tauto" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
or_clause_cnf
:= (or_clause_cnf is_tauto).
Notation
or_clause_cnf
algebra
algebra/arithmetic_tactic.v
[ "elpi", "derive.std", "param2", "Corelib", "BinNums", "micromega_plugin", "PosDef", "NatDef", "IntDef", "RatDef", "formula", "witness", "tactics", "checker", "eval", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "ssrnat", "seq", "order", "ssralg", "ssrnum", ...
[ "is_tauto" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
or_cnf_aux
:= (or_cnf_aux is_tauto).
Notation
or_cnf_aux
algebra
algebra/arithmetic_tactic.v
[ "elpi", "derive.std", "param2", "Corelib", "BinNums", "micromega_plugin", "PosDef", "NatDef", "IntDef", "RatDef", "formula", "witness", "tactics", "checker", "eval", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "ssrnat", "seq", "order", "ssralg", "ssrnum", ...
[ "is_tauto" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
or_cnf
:= (or_cnf is_tauto).
Notation
or_cnf
algebra
algebra/arithmetic_tactic.v
[ "elpi", "derive.std", "param2", "Corelib", "BinNums", "micromega_plugin", "PosDef", "NatDef", "IntDef", "RatDef", "formula", "witness", "tactics", "checker", "eval", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "ssrnat", "seq", "order", "ssralg", "ssrnum", ...
[ "is_tauto" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
eval_clause : clause -> bool
:= has (fun t => eval t.1).
Definition
eval_clause
algebra
algebra/arithmetic_tactic.v
[ "elpi", "derive.std", "param2", "Corelib", "BinNums", "micromega_plugin", "PosDef", "NatDef", "IntDef", "RatDef", "formula", "witness", "tactics", "checker", "eval", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "ssrnat", "seq", "order", "ssralg", "ssrnum", ...
[ "clause", "eval", "has" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
eval_cnf : cnf -> bool
:= all eval_clause.
Definition
eval_cnf
algebra
algebra/arithmetic_tactic.v
[ "elpi", "derive.std", "param2", "Corelib", "BinNums", "micromega_plugin", "PosDef", "NatDef", "IntDef", "RatDef", "formula", "witness", "tactics", "checker", "eval", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "ssrnat", "seq", "order", "ssralg", "ssrnum", ...
[ "all", "cnf", "eval_clause" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
eval_cnf_tt : eval_cnf cnf_tt.
Proof. by []. Qed.
Lemma
eval_cnf_tt
algebra
algebra/arithmetic_tactic.v
[ "elpi", "derive.std", "param2", "Corelib", "BinNums", "micromega_plugin", "PosDef", "NatDef", "IntDef", "RatDef", "formula", "witness", "tactics", "checker", "eval", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "ssrnat", "seq", "order", "ssralg", "ssrnum", ...
[ "cnf_tt", "eval_cnf" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
eval_cnf_ff : eval_cnf cnf_ff = false.
Proof. by []. Qed.
Lemma
eval_cnf_ff
algebra
algebra/arithmetic_tactic.v
[ "elpi", "derive.std", "param2", "Corelib", "BinNums", "micromega_plugin", "PosDef", "NatDef", "IntDef", "RatDef", "formula", "witness", "tactics", "checker", "eval", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "ssrnat", "seq", "order", "ssralg", "ssrnum", ...
[ "cnf_ff", "eval_cnf" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
is_cnf_ttT f : is_cnf_tt f -> f = cnf_tt.
Proof. by case: f. Qed.
Lemma
is_cnf_ttT
algebra
algebra/arithmetic_tactic.v
[ "elpi", "derive.std", "param2", "Corelib", "BinNums", "micromega_plugin", "PosDef", "NatDef", "IntDef", "RatDef", "formula", "witness", "tactics", "checker", "eval", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "ssrnat", "seq", "order", "ssralg", "ssrnum", ...
[ "cnf_tt" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
is_cnf_ffT f : is_cnf_ff f -> f = cnf_ff.
Proof. by case: f => [//| [|//] []]. Qed.
Lemma
is_cnf_ffT
algebra
algebra/arithmetic_tactic.v
[ "elpi", "derive.std", "param2", "Corelib", "BinNums", "micromega_plugin", "PosDef", "NatDef", "IntDef", "RatDef", "formula", "witness", "tactics", "checker", "eval", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "ssrnat", "seq", "order", "ssralg", "ssrnum", ...
[ "cnf_ff" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
add_termP t cl : match add_term t cl with | None => eval t.1 || eval_clause cl | Some cl' => eval_clause cl' = eval t.1 || eval_clause cl end.
Proof. elim: cl t => [| t' cl IH] t /=. by case: ifP => [/is_tautoT/[!orbb]->//|_]. case: ifP => [|_]; first by rewrite orbA => /is_tautoT->. by case: add_term (IH t) => [?|] {}IH; rewrite /= orbCA IH ?orbT. Qed.
Lemma
add_termP
algebra
algebra/arithmetic_tactic.v
[ "elpi", "derive.std", "param2", "Corelib", "BinNums", "micromega_plugin", "PosDef", "NatDef", "IntDef", "RatDef", "formula", "witness", "tactics", "checker", "eval", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "ssrnat", "seq", "order", "ssralg", "ssrnum", ...
[ "add_term", "eval", "eval_clause", "is_tautoT" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
or_clauseP cl1 cl2 : match or_clause cl1 cl2 with | None => eval_clause cl1 || eval_clause cl2 | Some cl' => eval_clause cl' = eval_clause cl1 || eval_clause cl2 end.
Proof. elim: cl1 cl2 => [//| t cl IH] cl2 /=. case: add_term (add_termP t cl2) => [cl'|]; last by rewrite orbAC => ->. rewrite [eval t.1 || eval_clause cl]orbC -orbA. by case: or_clause (IH cl') => [_->->|/[swap]->]. Qed.
Lemma
or_clauseP
algebra
algebra/arithmetic_tactic.v
[ "elpi", "derive.std", "param2", "Corelib", "BinNums", "micromega_plugin", "PosDef", "NatDef", "IntDef", "RatDef", "formula", "witness", "tactics", "checker", "eval", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "ssrnat", "seq", "order", "ssralg", "ssrnum", ...
[ "add_term", "add_termP", "eval", "eval_clause", "last", "or_clause" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
eval_or_clause_cnf cl f : eval_cnf (or_clause_cnf cl f) = eval_clause cl || eval_cnf f.
Proof. case: cl => [//| t cl]. rewrite /or_clause_cnf; move: (t :: cl) => {t}cl; set orcl := fun acc cl => _. have orclP acc cl' : eval_cnf (orcl acc cl') = (eval_clause cl || eval_clause cl') && eval_cnf acc. rewrite /orcl; case: or_clause (or_clauseP cl cl') => [cl''/=->//|]. by move=> /orP[]->//=; rewrite or...
Lemma
eval_or_clause_cnf
algebra
algebra/arithmetic_tactic.v
[ "elpi", "derive.std", "param2", "Corelib", "BinNums", "micromega_plugin", "PosDef", "NatDef", "IntDef", "RatDef", "formula", "witness", "tactics", "checker", "eval", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "ssrnat", "seq", "order", "ssralg", "ssrnum", ...
[ "eval_clause", "eval_cnf", "or_clause", "or_clauseP", "or_clause_cnf" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
eval_rev_append f1 f2 : eval_cnf (ListDef.rev_append f1 f2) = eval_cnf f1 && eval_cnf f2.
Proof. by elim: f1 f2 => [//|cl f1 IH] f2 /=; rewrite IH andbCA andbA. Qed.
Lemma
eval_rev_append
algebra
algebra/arithmetic_tactic.v
[ "elpi", "derive.std", "param2", "Corelib", "BinNums", "micromega_plugin", "PosDef", "NatDef", "IntDef", "RatDef", "formula", "witness", "tactics", "checker", "eval", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "ssrnat", "seq", "order", "ssralg", "ssrnum", ...
[ "eval_cnf", "f1", "f2" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
eval_or_cnf_aux f1 f2 : eval_cnf (or_cnf_aux f1 f2) = eval_cnf f1 || eval_cnf f2.
Proof. elim: f1 => [//|cl f1 IH] /=. by rewrite eval_rev_append IH eval_or_clause_cnf -orb_andl andbC. Qed.
Lemma
eval_or_cnf_aux
algebra
algebra/arithmetic_tactic.v
[ "elpi", "derive.std", "param2", "Corelib", "BinNums", "micromega_plugin", "PosDef", "NatDef", "IntDef", "RatDef", "formula", "witness", "tactics", "checker", "eval", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "ssrnat", "seq", "order", "ssralg", "ssrnum", ...
[ "eval_cnf", "eval_or_clause_cnf", "eval_rev_append", "f1", "f2", "or_cnf_aux" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
eval_or_cnf f1 f2 : eval_cnf (or_cnf f1 f2) = eval_cnf f1 || eval_cnf f2.
Proof. rewrite /or_cnf. case: ifP => [/orP[]/is_cnf_ttT->|_]; rewrite ?eval_cnf_tt ?orbT//. by case: ifP => [/is_cnf_ffT->|_]; rewrite ?eval_cnf_ff ?orbF ?eval_or_cnf_aux. Qed.
Lemma
eval_or_cnf
algebra
algebra/arithmetic_tactic.v
[ "elpi", "derive.std", "param2", "Corelib", "BinNums", "micromega_plugin", "PosDef", "NatDef", "IntDef", "RatDef", "formula", "witness", "tactics", "checker", "eval", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "ssrnat", "seq", "order", "ssralg", "ssrnum", ...
[ "eval_cnf", "eval_cnf_ff", "eval_cnf_tt", "eval_or_cnf_aux", "f1", "f2", "is_cnf_ffT", "is_cnf_ttT", "or_cnf" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
eval_and_cnf f1 f2 : eval_cnf (and_cnf f1 f2) = eval_cnf f1 && eval_cnf f2.
Proof. rewrite /and_cnf. case: ifP => [/orP[]/is_cnf_ffT->|_]; rewrite ?eval_cnf_ff ?andbF//. by case: ifP => [/is_cnf_ttT->|_]; rewrite ?eval_cnf_tt ?andbT ?eval_rev_append. Qed.
Lemma
eval_and_cnf
algebra
algebra/arithmetic_tactic.v
[ "elpi", "derive.std", "param2", "Corelib", "BinNums", "micromega_plugin", "PosDef", "NatDef", "IntDef", "RatDef", "formula", "witness", "tactics", "checker", "eval", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "ssrnat", "seq", "order", "ssralg", "ssrnum", ...
[ "and_cnf", "eval_cnf", "eval_cnf_ff", "eval_cnf_tt", "eval_rev_append", "f1", "f2", "is_cnf_ffT", "is_cnf_ttT" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
R_of_C_ge0 : {mono R_of_C : x / 0 <= x}.
Hypothesis
R_of_C_ge0
algebra
algebra/arithmetic_tactic.v
[ "elpi", "derive.std", "param2", "Corelib", "BinNums", "micromega_plugin", "PosDef", "NatDef", "IntDef", "RatDef", "formula", "witness", "tactics", "checker", "eval", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "ssrnat", "seq", "order", "ssralg", "ssrnum", ...
[]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
Peval
:= (Peval +%R *%R N.to_nat (@GRing.exp R) R_of_C (@env_jump R) (env_nth 0)).
Notation
Peval
algebra
algebra/arithmetic_tactic.v
[ "elpi", "derive.std", "param2", "Corelib", "BinNums", "micromega_plugin", "PosDef", "NatDef", "IntDef", "RatDef", "formula", "witness", "tactics", "checker", "eval", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "ssrnat", "seq", "order", "ssralg", "ssrnum", ...
[ "env_jump", "env_nth", "exp" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
PEeval
:= (PEeval 0 1 +%R *%R (fun x y : R => x - y) -%R N.to_nat (@GRing.exp R) R_of_C (env_nth 0)).
Notation
PEeval
algebra
algebra/arithmetic_tactic.v
[ "elpi", "derive.std", "param2", "Corelib", "BinNums", "micromega_plugin", "PosDef", "NatDef", "IntDef", "RatDef", "formula", "witness", "tactics", "checker", "eval", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "ssrnat", "seq", "order", "ssralg", "ssrnum", ...
[ "env_nth", "exp" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
Feval
:= (Feval 0 1 +%R *%R (fun x y : R => x - y) -%R N.to_nat (@GRing.exp R) isBool eq_op (cneqb eq_op) <=%R <%R R_of_C (env_nth 0)).
Notation
Feval
algebra
algebra/arithmetic_tactic.v
[ "elpi", "derive.std", "param2", "Corelib", "BinNums", "micromega_plugin", "PosDef", "NatDef", "IntDef", "RatDef", "formula", "witness", "tactics", "checker", "eval", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "ssrnat", "seq", "order", "ssralg", "ssrnum", ...
[ "env_nth", "exp" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
Pol_of_PExpr
:= (Pol_of_PExpr 0 1 +%R *%R (fun x y : C => x - y) -%R eq_op).
Notation
Pol_of_PExpr
algebra
algebra/arithmetic_tactic.v
[ "elpi", "derive.std", "param2", "Corelib", "BinNums", "micromega_plugin", "PosDef", "NatDef", "IntDef", "RatDef", "formula", "witness", "tactics", "checker", "eval", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "ssrnat", "seq", "order", "ssralg", "ssrnum", ...
[]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
normalise
:= (normalise 0 1 +%R *%R (fun x y : C => x - y) -%R eq_op).
Notation
normalise
algebra
algebra/arithmetic_tactic.v
[ "elpi", "derive.std", "param2", "Corelib", "BinNums", "micromega_plugin", "PosDef", "NatDef", "IntDef", "RatDef", "formula", "witness", "tactics", "checker", "eval", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "ssrnat", "seq", "order", "ssralg", "ssrnum", ...
[]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
check_inconsistent
:= (check_inconsistent 0%R eq_op <=%R).
Notation
check_inconsistent
algebra
algebra/arithmetic_tactic.v
[ "elpi", "derive.std", "param2", "Corelib", "BinNums", "micromega_plugin", "PosDef", "NatDef", "IntDef", "RatDef", "formula", "witness", "tactics", "checker", "eval", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "ssrnat", "seq", "order", "ssralg", "ssrnum", ...
[]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
normalise_aux
:= (normalise_aux -%R).
Notation
normalise_aux
algebra
algebra/arithmetic_tactic.v
[ "elpi", "derive.std", "param2", "Corelib", "BinNums", "micromega_plugin", "PosDef", "NatDef", "IntDef", "RatDef", "formula", "witness", "tactics", "checker", "eval", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "ssrnat", "seq", "order", "ssralg", "ssrnum", ...
[]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
negate_aux
:= (negate_aux -%R).
Notation
negate_aux
algebra
algebra/arithmetic_tactic.v
[ "elpi", "derive.std", "param2", "Corelib", "BinNums", "micromega_plugin", "PosDef", "NatDef", "IntDef", "RatDef", "formula", "witness", "tactics", "checker", "eval", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "ssrnat", "seq", "order", "ssralg", "ssrnum", ...
[]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
cnf_of_list
:= (cnf_of_list 0 eq_op <=%R).
Notation
cnf_of_list
algebra
algebra/arithmetic_tactic.v
[ "elpi", "derive.std", "param2", "Corelib", "BinNums", "micromega_plugin", "PosDef", "NatDef", "IntDef", "RatDef", "formula", "witness", "tactics", "checker", "eval", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "ssrnat", "seq", "order", "ssralg", "ssrnum", ...
[]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
cnf_normalise
:= (cnf_normalise 0 1 +%R *%R (fun x y : C => x - y) -%R eq_op <=%R).
Notation
cnf_normalise
algebra
algebra/arithmetic_tactic.v
[ "elpi", "derive.std", "param2", "Corelib", "BinNums", "micromega_plugin", "PosDef", "NatDef", "IntDef", "RatDef", "formula", "witness", "tactics", "checker", "eval", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "ssrnat", "seq", "order", "ssralg", "ssrnum", ...
[]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
cnf_negate
:= (cnf_negate 0 1 +%R *%R (fun x y : C => x - y) -%R eq_op <=%R).
Notation
cnf_negate
algebra
algebra/arithmetic_tactic.v
[ "elpi", "derive.std", "param2", "Corelib", "BinNums", "micromega_plugin", "PosDef", "NatDef", "IntDef", "RatDef", "formula", "witness", "tactics", "checker", "eval", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "ssrnat", "seq", "order", "ssralg", "ssrnum", ...
[]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
eval_op1 (o : Op1) (x : R) : bool
:= match o with | Equal => x == 0 | NonEqual => x != 0 | Strict => 0 < x | NonStrict => 0 <= x end.
Definition
eval_op1
algebra
algebra/arithmetic_tactic.v
[ "elpi", "derive.std", "param2", "Corelib", "BinNums", "micromega_plugin", "PosDef", "NatDef", "IntDef", "RatDef", "formula", "witness", "tactics", "checker", "eval", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "ssrnat", "seq", "order", "ssralg", "ssrnum", ...
[]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
NFeval (env : seq R) (f : NFormula C) : bool
:= let: (p, op) := f in eval_op1 op (Peval env p).
Definition
NFeval
algebra
algebra/arithmetic_tactic.v
[ "elpi", "derive.std", "param2", "Corelib", "BinNums", "micromega_plugin", "PosDef", "NatDef", "IntDef", "RatDef", "formula", "witness", "tactics", "checker", "eval", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "ssrnat", "seq", "order", "ssralg", "ssrnum", ...
[ "Peval", "env", "eval_op1", "seq" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
NFeval_normalise l f : NFeval l (normalise f) = Feval l f.
Proof. by case: f => lhs [|||||] rhs /=; rewrite PevalB !Peval_Pol_of_PExpr ?subr_eq0 ?subr_ge0 ?subr_gt0. Qed.
Lemma
NFeval_normalise
algebra
algebra/arithmetic_tactic.v
[ "elpi", "derive.std", "param2", "Corelib", "BinNums", "micromega_plugin", "PosDef", "NatDef", "IntDef", "RatDef", "formula", "witness", "tactics", "checker", "eval", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "ssrnat", "seq", "order", "ssralg", "ssrnum", ...
[ "Feval", "NFeval", "PevalB", "Peval_Pol_of_PExpr", "normalise", "rhs", "subr_eq0", "subr_ge0", "subr_gt0" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
check_inconsistentT l f : check_inconsistent f -> NFeval l f = false.
Proof. case: f => -[] // c [] /= + /ltac:(apply: negbTE). - by apply: contraNN; rewrite !eq_le -oppr_ge0 -rmorphN !R_of_C_ge0 oppr_ge0. - by move=> /eqP->; rewrite rmorph0 negbK. - by rewrite -leNgt -!oppr_ge0 -rmorphN R_of_C_ge0. - by rewrite /cltb andbC -lt_neqAle ltNge R_of_C_ge0. Qed.
Lemma
check_inconsistentT
algebra
algebra/arithmetic_tactic.v
[ "elpi", "derive.std", "param2", "Corelib", "BinNums", "micromega_plugin", "PosDef", "NatDef", "IntDef", "RatDef", "formula", "witness", "tactics", "checker", "eval", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "ssrnat", "seq", "order", "ssralg", "ssrnum", ...
[ "NFeval", "R_of_C_ge0", "apply", "check_inconsistent", "eq_le", "leNgt", "ltNge", "lt_neqAle", "oppr_ge0", "rmorph0", "rmorphN" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
eval_normalise_aux T (tg : T) l f : eval_cnf (fun f => ~~ NFeval l f) [seq [:: (nf, tg)] | nf <- normalise_aux f] = NFeval l f.
Proof. case: f => e [] /=; rewrite andbT !orbF// PevalN. - by rewrite oppr_gt0 -!leNgt eq_le. - by rewrite oppr_ge0 -ltNge. - by rewrite oppr_gt0 -leNgt. Qed.
Lemma
eval_normalise_aux
algebra
algebra/arithmetic_tactic.v
[ "elpi", "derive.std", "param2", "Corelib", "BinNums", "micromega_plugin", "PosDef", "NatDef", "IntDef", "RatDef", "formula", "witness", "tactics", "checker", "eval", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "ssrnat", "seq", "order", "ssralg", "ssrnum", ...
[ "NFeval", "PevalN", "eq_le", "eval_cnf", "leNgt", "ltNge", "normalise_aux", "oppr_ge0", "oppr_gt0", "seq" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
eval_negate_aux T (tg : T) l f : eval_cnf (fun f => ~~ NFeval l f) [seq [:: (nf, tg)] | nf <- negate_aux f] = ~~ NFeval l f.
Proof. by case: f => e[]; rewrite /= andbT !orbF// PevalN oppr_gt0 -!leNgt negbK eq_le. Qed.
Lemma
eval_negate_aux
algebra
algebra/arithmetic_tactic.v
[ "elpi", "derive.std", "param2", "Corelib", "BinNums", "micromega_plugin", "PosDef", "NatDef", "IntDef", "RatDef", "formula", "witness", "tactics", "checker", "eval", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "ssrnat", "seq", "order", "ssralg", "ssrnum", ...
[ "NFeval", "PevalN", "eq_le", "eval_cnf", "leNgt", "negate_aux", "oppr_gt0", "seq" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
eval_cnf_of_list T (tg : T) l lf : eval_cnf (fun f => ~~ NFeval l f) (cnf_of_list lf tg) = eval_cnf (fun f => ~~ NFeval l f) [seq [:: (f, tg)] | f <- lf].
Proof. elim: lf => [//|f lf /= <-]; rewrite orbF. case: (boolP (check_inconsistent f)) => [/check_inconsistentT->//|_/=]. by rewrite orbF. Qed.
Lemma
eval_cnf_of_list
algebra
algebra/arithmetic_tactic.v
[ "elpi", "derive.std", "param2", "Corelib", "BinNums", "micromega_plugin", "PosDef", "NatDef", "IntDef", "RatDef", "formula", "witness", "tactics", "checker", "eval", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "ssrnat", "seq", "order", "ssralg", "ssrnum", ...
[ "NFeval", "check_inconsistent", "check_inconsistentT", "cnf_of_list", "eval_cnf", "seq" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
eval_cnf_normalise T (tg : T) l f : eval_cnf (fun f => ~~ NFeval l f) (cnf_normalise f tg) = Feval l f.
Proof. rewrite /cnf_normalise/= -NFeval_normalise; set nf := normalise f. case: (boolP (check_inconsistent nf)) => [/check_inconsistentT->//|_]. by rewrite eval_cnf_of_list eval_normalise_aux. Qed.
Lemma
eval_cnf_normalise
algebra
algebra/arithmetic_tactic.v
[ "elpi", "derive.std", "param2", "Corelib", "BinNums", "micromega_plugin", "PosDef", "NatDef", "IntDef", "RatDef", "formula", "witness", "tactics", "checker", "eval", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "ssrnat", "seq", "order", "ssralg", "ssrnum", ...
[ "Feval", "NFeval", "NFeval_normalise", "check_inconsistent", "check_inconsistentT", "cnf_normalise", "eval_cnf", "eval_cnf_of_list", "eval_normalise_aux", "normalise" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
eval_cnf_negate T (tg : T) l f : eval_cnf (fun f => ~~ NFeval l f) (cnf_negate f tg) = ~~ Feval l f.
Proof. rewrite /cnf_negate/= -NFeval_normalise; set nf := normalise f. case: (boolP (check_inconsistent nf)) => [/check_inconsistentT->//|_]. by rewrite eval_cnf_of_list eval_negate_aux. Qed.
Lemma
eval_cnf_negate
algebra
algebra/arithmetic_tactic.v
[ "elpi", "derive.std", "param2", "Corelib", "BinNums", "micromega_plugin", "PosDef", "NatDef", "IntDef", "RatDef", "formula", "witness", "tactics", "checker", "eval", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "ssrnat", "seq", "order", "ssralg", "ssrnum", ...
[ "Feval", "NFeval", "NFeval_normalise", "check_inconsistent", "check_inconsistentT", "cnf_negate", "eval_cnf", "eval_cnf_of_list", "eval_negate_aux", "normalise" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
KFeval k : seq R -> Formula C -> eKind k
:= let ev k eq neq le lt := Feval rO rI radd rmul (fun x y => radd x (ropp y)) ropp id rpow k eq neq le lt R_of_C (env_nth rO) in if k is isBool then ev isBool req rneq rle rlt else ev isProp eq (fun x y => x <> y) (fun x y => rle x y) (fun x y => rlt x y).
Definition
KFeval
algebra
algebra/arithmetic_tactic.v
[ "elpi", "derive.std", "param2", "Corelib", "BinNums", "micromega_plugin", "PosDef", "NatDef", "IntDef", "RatDef", "formula", "witness", "tactics", "checker", "eval", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "ssrnat", "seq", "order", "ssralg", "ssrnum", ...
[ "Feval", "Formula", "env_nth", "id", "le", "lt", "seq" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
BFKFeval (l : seq R) : forall k, BFormula (Formula C) k -> eKind k
:= BFeval eqb (fun k f => KFeval k l f).
Definition
BFKFeval
algebra
algebra/arithmetic_tactic.v
[ "elpi", "derive.std", "param2", "Corelib", "BinNums", "micromega_plugin", "PosDef", "NatDef", "IntDef", "RatDef", "formula", "witness", "tactics", "checker", "eval", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "ssrnat", "seq", "order", "ssralg", "ssrnum", ...
[ "Formula", "KFeval", "eqb", "seq" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
RFeval (R : numDomainType) C (R_of_C : C -> R)
:= KFeval 0 1 +%R *%R -%R (fun x n => x ^+ N.to_nat n) eq_op (cneqb eq_op) <=%R <%R R_of_C.
Definition
RFeval
algebra
algebra/arithmetic_tactic.v
[ "elpi", "derive.std", "param2", "Corelib", "BinNums", "micromega_plugin", "PosDef", "NatDef", "IntDef", "RatDef", "formula", "witness", "tactics", "checker", "eval", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "ssrnat", "seq", "order", "ssralg", "ssrnum", ...
[ "KFeval" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
RBFeval (R : numDomainType) C (R_of_C : C -> R)
:= BFKFeval 0 1 +%R *%R -%R (fun x n => x ^+ N.to_nat n) eq_op (cneqb eq_op) <=%R <%R R_of_C.
Definition
RBFeval
algebra
algebra/arithmetic_tactic.v
[ "elpi", "derive.std", "param2", "Corelib", "BinNums", "micromega_plugin", "PosDef", "NatDef", "IntDef", "RatDef", "formula", "witness", "tactics", "checker", "eval", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "ssrnat", "seq", "order", "ssralg", "ssrnum", ...
[ "BFKFeval" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
RFevalP (R : numDomainType) C (R_of_C : C -> R) l f : reflect (RFeval R_of_C isProp l f) (RFeval R_of_C isBool l f).
Proof. case: f => lhs [] rhs; try exact/idP; first exact/(iffP eqP) => [/eqP|/=->]. by apply/(iffP idP) => [/eqP//|]; apply: contra_notN => /eqP. Qed.
Lemma
RFevalP
algebra
algebra/arithmetic_tactic.v
[ "elpi", "derive.std", "param2", "Corelib", "BinNums", "micromega_plugin", "PosDef", "NatDef", "IntDef", "RatDef", "formula", "witness", "tactics", "checker", "eval", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "ssrnat", "seq", "order", "ssralg", "ssrnum", ...
[ "RFeval", "apply", "rhs" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
is_tauto
:= (is_tauto 0 +%R eq_op <=%R).
Notation
is_tauto
algebra
algebra/arithmetic_tactic.v
[ "elpi", "derive.std", "param2", "Corelib", "BinNums", "micromega_plugin", "PosDef", "NatDef", "IntDef", "RatDef", "formula", "witness", "tactics", "checker", "eval", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "ssrnat", "seq", "order", "ssralg", "ssrnum", ...
[]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
cnf_tt
:= (cnf_tt (NFormula C) unit).
Notation
cnf_tt
algebra
algebra/arithmetic_tactic.v
[ "elpi", "derive.std", "param2", "Corelib", "BinNums", "micromega_plugin", "PosDef", "NatDef", "IntDef", "RatDef", "formula", "witness", "tactics", "checker", "eval", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "ssrnat", "seq", "order", "ssralg", "ssrnum", ...
[ "unit" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
cnf_ff
:= (cnf_ff (NFormula C) unit).
Notation
cnf_ff
algebra
algebra/arithmetic_tactic.v
[ "elpi", "derive.std", "param2", "Corelib", "BinNums", "micromega_plugin", "PosDef", "NatDef", "IntDef", "RatDef", "formula", "witness", "tactics", "checker", "eval", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "ssrnat", "seq", "order", "ssralg", "ssrnum", ...
[ "unit" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
and_cnf
:= (@and_cnf (NFormula C) unit).
Notation
and_cnf
algebra
algebra/arithmetic_tactic.v
[ "elpi", "derive.std", "param2", "Corelib", "BinNums", "micromega_plugin", "PosDef", "NatDef", "IntDef", "RatDef", "formula", "witness", "tactics", "checker", "eval", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "ssrnat", "seq", "order", "ssralg", "ssrnum", ...
[ "unit" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
normalise
:= (cnf_normalise 0 1 +%R *%R (fun x y : C => x - y) -%R eq_op <=%R).
Notation
normalise
algebra
algebra/arithmetic_tactic.v
[ "elpi", "derive.std", "param2", "Corelib", "BinNums", "micromega_plugin", "PosDef", "NatDef", "IntDef", "RatDef", "formula", "witness", "tactics", "checker", "eval", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "ssrnat", "seq", "order", "ssralg", "ssrnum", ...
[ "cnf_normalise" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
negate
:= (cnf_negate 0 1 +%R *%R (fun x y : C => x - y) -%R eq_op <=%R).
Notation
negate
algebra
algebra/arithmetic_tactic.v
[ "elpi", "derive.std", "param2", "Corelib", "BinNums", "micromega_plugin", "PosDef", "NatDef", "IntDef", "RatDef", "formula", "witness", "tactics", "checker", "eval", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "ssrnat", "seq", "order", "ssralg", "ssrnum", ...
[ "cnf_negate" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
cnf_of_GFormula
:= (@cnf_of_GFormula _ _ _ cnf_tt cnf_ff or_cnf and_cnf normalise negate).
Notation
cnf_of_GFormula
algebra
algebra/arithmetic_tactic.v
[ "elpi", "derive.std", "param2", "Corelib", "BinNums", "micromega_plugin", "PosDef", "NatDef", "IntDef", "RatDef", "formula", "witness", "tactics", "checker", "eval", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "ssrnat", "seq", "order", "ssralg", "ssrnum", ...
[ "and_cnf", "cnf_ff", "cnf_tt", "negate", "normalise", "or_cnf" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
is_tautoT : forall l (f g : NFormula C), is_tauto f g -> ~~ NFeval R_of_C l f || ~~ NFeval R_of_C l g.
Hypothesis
is_tautoT
algebra
algebra/arithmetic_tactic.v
[ "elpi", "derive.std", "param2", "Corelib", "BinNums", "micromega_plugin", "PosDef", "NatDef", "IntDef", "RatDef", "formula", "witness", "tactics", "checker", "eval", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "ssrnat", "seq", "order", "ssralg", "ssrnum", ...
[ "NFeval", "is_tauto" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
eval_or_cnf
:= (eval_or_cnf (is_tautoT _)).
Notation
eval_or_cnf
algebra
algebra/arithmetic_tactic.v
[ "elpi", "derive.std", "param2", "Corelib", "BinNums", "micromega_plugin", "PosDef", "NatDef", "IntDef", "RatDef", "formula", "witness", "tactics", "checker", "eval", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "ssrnat", "seq", "order", "ssralg", "ssrnum", ...
[ "is_tautoT" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
hold pol k : eKind k -> Prop
:= if k is isProp then if pol then id else not else fun x => x = pol.
Definition
hold
algebra
algebra/arithmetic_tactic.v
[ "elpi", "derive.std", "param2", "Corelib", "BinNums", "micromega_plugin", "PosDef", "NatDef", "IntDef", "RatDef", "formula", "witness", "tactics", "checker", "eval", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "ssrnat", "seq", "order", "ssralg", "ssrnum", ...
[ "id" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
is_bool_spec T k (f : BFormula T k) : GFormula k -> option bool -> Type
:= | IsBoolT : is_bool_spec (TT k) (Some true) | IsBoolF : is_bool_spec (FF k) (Some false) | IsBoolNone : is_bool_spec f None.
Variant
is_bool_spec
algebra
algebra/arithmetic_tactic.v
[ "elpi", "derive.std", "param2", "Corelib", "BinNums", "micromega_plugin", "PosDef", "NatDef", "IntDef", "RatDef", "formula", "witness", "tactics", "checker", "eval", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "ssrnat", "seq", "order", "ssralg", "ssrnum", ...
[]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
is_boolP T k (f : BFormula T k) : is_bool_spec f f (is_bool f).
Proof. case: f => {}k => [||x|f u|f g|f g|f|f u g|f g|f] /=; try exact: IsBoolNone. - exact: IsBoolT. - exact: IsBoolF. Qed.
Lemma
is_boolP
algebra
algebra/arithmetic_tactic.v
[ "elpi", "derive.std", "param2", "Corelib", "BinNums", "micromega_plugin", "PosDef", "NatDef", "IntDef", "RatDef", "formula", "witness", "tactics", "checker", "eval", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "ssrnat", "seq", "order", "ssralg", "ssrnum", ...
[ "is_bool_spec" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
eval_cnf_of_GFormula l pol k (f : GFormula k) : eval_cnf (fun f => ~~ NFeval R_of_C l f) (cnf_of_GFormula pol f) -> hold pol (RBFeval R_of_C l f).
Proof. elim: f pol => {}k /=. - by move: k => -[] []. - by move: k => -[] [] //= _. - by move=> x [] /=. - move=> f u []. + by rewrite eval_cnf_normalise//; case: k => [/RFevalP|//]. + by rewrite eval_cnf_negate//; case: k => [/RFevalP|/negbTE]. - case: k => /= f IHf g IHg []. + by rewrite eval_and_cnf => /andP[/...
Lemma
eval_cnf_of_GFormula
algebra
algebra/arithmetic_tactic.v
[ "elpi", "derive.std", "param2", "Corelib", "BinNums", "micromega_plugin", "PosDef", "NatDef", "IntDef", "RatDef", "formula", "witness", "tactics", "checker", "eval", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "ssrnat", "seq", "order", "ssralg", "ssrnum", ...
[ "NFeval", "RBFeval", "RFevalP", "apply", "cnf_of_GFormula", "eval_and_cnf", "eval_cnf", "eval_cnf_negate", "eval_cnf_normalise", "eval_or_cnf", "ff", "hold", "is_boolP", "last" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
NFeval
:= (NFeval R_of_C).
Notation
NFeval
algebra
algebra/arithmetic_tactic.v
[ "elpi", "derive.std", "param2", "Corelib", "BinNums", "micromega_plugin", "PosDef", "NatDef", "IntDef", "RatDef", "formula", "witness", "tactics", "checker", "eval", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "ssrnat", "seq", "order", "ssralg", "ssrnum", ...
[]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
pexpr_times_nformula
:= (pexpr_times_nformula 0 1 +%R *%R eq_op).
Notation
pexpr_times_nformula
algebra
algebra/arithmetic_tactic.v
[ "elpi", "derive.std", "param2", "Corelib", "BinNums", "micromega_plugin", "PosDef", "NatDef", "IntDef", "RatDef", "formula", "witness", "tactics", "checker", "eval", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "ssrnat", "seq", "order", "ssralg", "ssrnum", ...
[]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
nformula_times_nformula
:= (nformula_times_nformula 0 1 +%R *%R eq_op).
Notation
nformula_times_nformula
algebra
algebra/arithmetic_tactic.v
[ "elpi", "derive.std", "param2", "Corelib", "BinNums", "micromega_plugin", "PosDef", "NatDef", "IntDef", "RatDef", "formula", "witness", "tactics", "checker", "eval", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "ssrnat", "seq", "order", "ssralg", "ssrnum", ...
[]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
nformula_plus_nformula
:= (nformula_plus_nformula 0 +%R eq_op).
Notation
nformula_plus_nformula
algebra
algebra/arithmetic_tactic.v
[ "elpi", "derive.std", "param2", "Corelib", "BinNums", "micromega_plugin", "PosDef", "NatDef", "IntDef", "RatDef", "formula", "witness", "tactics", "checker", "eval", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "ssrnat", "seq", "order", "ssralg", "ssrnum", ...
[]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
eval_Psatz
:= (eval_Psatz 0 1 +%R *%R eq_op <=%R).
Notation
eval_Psatz
algebra
algebra/arithmetic_tactic.v
[ "elpi", "derive.std", "param2", "Corelib", "BinNums", "micromega_plugin", "PosDef", "NatDef", "IntDef", "RatDef", "formula", "witness", "tactics", "checker", "eval", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "ssrnat", "seq", "order", "ssralg", "ssrnum", ...
[]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
deduce
:= nformula_plus_nformula.
Notation
deduce
algebra
algebra/arithmetic_tactic.v
[ "elpi", "derive.std", "param2", "Corelib", "BinNums", "micromega_plugin", "PosDef", "NatDef", "IntDef", "RatDef", "formula", "witness", "tactics", "checker", "eval", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "ssrnat", "seq", "order", "ssralg", "ssrnum", ...
[ "nformula_plus_nformula" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
unsat
:= (check_inconsistent 0 eq_op <=%R).
Notation
unsat
algebra
algebra/arithmetic_tactic.v
[ "elpi", "derive.std", "param2", "Corelib", "BinNums", "micromega_plugin", "PosDef", "NatDef", "IntDef", "RatDef", "formula", "witness", "tactics", "checker", "eval", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "ssrnat", "seq", "order", "ssralg", "ssrnum", ...
[ "check_inconsistent" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
check_normalised_formulas
:= (check_normalised_formulas 0 1 +%R *%R eq_op <=%R).
Notation
check_normalised_formulas
algebra
algebra/arithmetic_tactic.v
[ "elpi", "derive.std", "param2", "Corelib", "BinNums", "micromega_plugin", "PosDef", "NatDef", "IntDef", "RatDef", "formula", "witness", "tactics", "checker", "eval", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "ssrnat", "seq", "order", "ssralg", "ssrnum", ...
[]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
eval_OpMult o o' (x x' : R) : eval_op1 o x -> eval_op1 o' x' -> forall o'', OpMult o o' = Some o'' -> eval_op1 o'' (x * x').
Proof. case: o => /=[/eqP->| ro | ro | ro]. - by rewrite mul0r; case: o' => /= + + [<-]/=. - by case: o' => //= /eqP-> + [<-]/=; rewrite mulr0. - case: o' => /=[/eqP->|//| ro' | ro'] o'' [<-]/=. + by rewrite mulr0. + exact: mulr_gt0. + by rewrite mulr_ge0// ltW. - case: o' => /=[/eqP->|//| ro' | ro'] o'' [<-]/=. ...
Lemma
eval_OpMult
algebra
algebra/arithmetic_tactic.v
[ "elpi", "derive.std", "param2", "Corelib", "BinNums", "micromega_plugin", "PosDef", "NatDef", "IntDef", "RatDef", "formula", "witness", "tactics", "checker", "eval", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "ssrnat", "seq", "order", "ssralg", "ssrnum", ...
[ "eval_op1", "ltW", "mul0r", "mulr0", "mulr_ge0", "mulr_gt0" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
eval_OpAdd o o' (x x' : R) : eval_op1 o x -> eval_op1 o' x' -> forall o'', OpAdd o o' = Some o'' -> eval_op1 o'' (x + x').
Proof. case: o => /=[/eqP->| ro | ro | ro]. - by rewrite add0r => + + [<-]. - by case: o' => //= /eqP-> + [<-]; rewrite addr0. - case: o' => /=[/eqP->|//| ro' | ro'] o'' [<-]/=. + by rewrite addr0. + exact: addr_gt0. + exact: ltr_wpDr. - case: o' => /=[/eqP->|//| ro' | ro'] o'' [<-]/=. + by rewrite addr0. + e...
Lemma
eval_OpAdd
algebra
algebra/arithmetic_tactic.v
[ "elpi", "derive.std", "param2", "Corelib", "BinNums", "micromega_plugin", "PosDef", "NatDef", "IntDef", "RatDef", "formula", "witness", "tactics", "checker", "eval", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "ssrnat", "seq", "order", "ssralg", "ssrnum", ...
[ "add0r", "addr0", "addr_ge0", "addr_gt0", "eval_op1", "ltr_wpDl", "ltr_wpDr" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
eval_pexpr_times_nformula l e f f' : NFeval l f -> pexpr_times_nformula e f = Some f' -> NFeval l f'.
Proof. by case: f => e' []//= /eqP ee' [<-]/=; rewrite PevalM ee' mulr0. Qed.
Lemma
eval_pexpr_times_nformula
algebra
algebra/arithmetic_tactic.v
[ "elpi", "derive.std", "param2", "Corelib", "BinNums", "micromega_plugin", "PosDef", "NatDef", "IntDef", "RatDef", "formula", "witness", "tactics", "checker", "eval", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "ssrnat", "seq", "order", "ssralg", "ssrnum", ...
[ "NFeval", "PevalM", "e'", "ee'", "mulr0", "pexpr_times_nformula" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
eval_nformula_times_nformula l f f' f'' : NFeval l f -> NFeval l f' -> nformula_times_nformula f f' = Some f'' -> NFeval l f''.
Proof. case: f f' => [e o] [e' o'] /= ee ee'. case: OpMult (eval_OpMult ee ee') => [o'' /(_ _ erefl) + [<-]/=|//]. by rewrite PevalM. Qed.
Lemma
eval_nformula_times_nformula
algebra
algebra/arithmetic_tactic.v
[ "elpi", "derive.std", "param2", "Corelib", "BinNums", "micromega_plugin", "PosDef", "NatDef", "IntDef", "RatDef", "formula", "witness", "tactics", "checker", "eval", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "ssrnat", "seq", "order", "ssralg", "ssrnum", ...
[ "NFeval", "PevalM", "e'", "ee'", "eval_OpMult", "nformula_times_nformula" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
eval_nformula_plus_nformula l f f' f'' : NFeval l f -> NFeval l f' -> nformula_plus_nformula f f' = Some f'' -> NFeval l f''.
Proof. case: f f' => [e o] [e' o'] /= ee ee'. case: OpAdd (eval_OpAdd ee ee') => [o'' /(_ _ erefl) + [<-]/=|//]. by rewrite PevalD. Qed.
Lemma
eval_nformula_plus_nformula
algebra
algebra/arithmetic_tactic.v
[ "elpi", "derive.std", "param2", "Corelib", "BinNums", "micromega_plugin", "PosDef", "NatDef", "IntDef", "RatDef", "formula", "witness", "tactics", "checker", "eval", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "eqtype", "ssrnat", "seq", "order", "ssralg", "ssrnum", ...
[ "NFeval", "PevalD", "e'", "ee'", "eval_OpAdd", "nformula_plus_nformula" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d