fact
stringlengths 8
1.54k
| type
stringclasses 19
values | library
stringclasses 8
values | imports
listlengths 1
10
| filename
stringclasses 98
values | symbolic_name
stringlengths 1
42
| docstring
stringclasses 1
value |
|---|---|---|---|---|---|---|
signr_le0(b : bool) : ((-1) ^+ b <= 0 :> R) = b.
Proof. by rewrite le_eqVlt signr_eq0 signr_lt0. Qed.
|
Lemma
|
algebra
|
[
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat seq choice",
"From mathcomp Require Import ssrAC div fintype path bigop order finset fingroup",
"From mathcomp Require Import ssralg poly orderedzmod"
] |
algebra/num_theory/numdomain.v
|
signr_le0
| |
signr_inj: injective (fun b : bool => (-1) ^+ b : R).
Proof. exact: can_inj (fun x => 0 >= x) signr_le0. Qed.
|
Lemma
|
algebra
|
[
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat seq choice",
"From mathcomp Require Import ssrAC div fintype path bigop order finset fingroup",
"From mathcomp Require Import ssralg poly orderedzmod"
] |
algebra/num_theory/numdomain.v
|
signr_inj
| |
sgr_defx : sg x = (-1) ^+ (x < 0)%R *+ (x != 0).
Proof. by rewrite /sg; do 2!case: ifP => //. Qed.
|
Lemma
|
algebra
|
[
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat seq choice",
"From mathcomp Require Import ssrAC div fintype path bigop order finset fingroup",
"From mathcomp Require Import ssralg poly orderedzmod"
] |
algebra/num_theory/numdomain.v
|
sgr_def
| |
neqr0_signx : x != 0 -> (-1) ^+ (x < 0)%R = sgr x.
Proof. by rewrite sgr_def => ->. Qed.
|
Lemma
|
algebra
|
[
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat seq choice",
"From mathcomp Require Import ssrAC div fintype path bigop order finset fingroup",
"From mathcomp Require Import ssralg poly orderedzmod"
] |
algebra/num_theory/numdomain.v
|
neqr0_sign
| |
gtr0_sgx : 0 < x -> sg x = 1.
Proof. by move=> x_gt0; rewrite /sg gt_eqF // lt_gtF. Qed.
|
Lemma
|
algebra
|
[
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat seq choice",
"From mathcomp Require Import ssrAC div fintype path bigop order finset fingroup",
"From mathcomp Require Import ssralg poly orderedzmod"
] |
algebra/num_theory/numdomain.v
|
gtr0_sg
| |
ltr0_sgx : x < 0 -> sg x = -1.
Proof. by move=> x_lt0; rewrite /sg x_lt0 lt_eqF. Qed.
|
Lemma
|
algebra
|
[
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat seq choice",
"From mathcomp Require Import ssrAC div fintype path bigop order finset fingroup",
"From mathcomp Require Import ssralg poly orderedzmod"
] |
algebra/num_theory/numdomain.v
|
ltr0_sg
| |
sgr0: sg 0 = 0 :> R. Proof. by rewrite /sgr eqxx. Qed.
|
Lemma
|
algebra
|
[
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat seq choice",
"From mathcomp Require Import ssrAC div fintype path bigop order finset fingroup",
"From mathcomp Require Import ssralg poly orderedzmod"
] |
algebra/num_theory/numdomain.v
|
sgr0
| |
sgr1: sg 1 = 1 :> R. Proof. by rewrite gtr0_sg // ltr01. Qed.
|
Lemma
|
algebra
|
[
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat seq choice",
"From mathcomp Require Import ssrAC div fintype path bigop order finset fingroup",
"From mathcomp Require Import ssralg poly orderedzmod"
] |
algebra/num_theory/numdomain.v
|
sgr1
| |
sgrN1: sg (-1) = -1 :> R. Proof. by rewrite ltr0_sg // ltrN10. Qed.
|
Lemma
|
algebra
|
[
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat seq choice",
"From mathcomp Require Import ssrAC div fintype path bigop order finset fingroup",
"From mathcomp Require Import ssralg poly orderedzmod"
] |
algebra/num_theory/numdomain.v
|
sgrN1
| |
sgrE:= (sgr0, sgr1, sgrN1).
|
Definition
|
algebra
|
[
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat seq choice",
"From mathcomp Require Import ssrAC div fintype path bigop order finset fingroup",
"From mathcomp Require Import ssralg poly orderedzmod"
] |
algebra/num_theory/numdomain.v
|
sgrE
| |
sqr_sgx : sg x ^+ 2 = (x != 0)%:R.
Proof. by rewrite sgr_def exprMn_n sqrr_sign -mulnn mulnb andbb. Qed.
|
Lemma
|
algebra
|
[
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat seq choice",
"From mathcomp Require Import ssrAC div fintype path bigop order finset fingroup",
"From mathcomp Require Import ssralg poly orderedzmod"
] |
algebra/num_theory/numdomain.v
|
sqr_sg
| |
mulr_sg_eq1x y : (sg x * y == 1) = (x != 0) && (sg x == y).
Proof.
rewrite /sg eq_sym; case: ifP => _; first by rewrite mul0r oner_eq0.
by case: ifP => _; rewrite ?mul1r // mulN1r eqr_oppLR.
Qed.
|
Lemma
|
algebra
|
[
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat seq choice",
"From mathcomp Require Import ssrAC div fintype path bigop order finset fingroup",
"From mathcomp Require Import ssralg poly orderedzmod"
] |
algebra/num_theory/numdomain.v
|
mulr_sg_eq1
| |
mulr_sg_eqN1x y : (sg x * sg y == -1) = (x != 0) && (sg x == - sg y).
Proof.
move/sg: y => y; rewrite /sg eq_sym eqr_oppLR.
case: ifP => _; first by rewrite mul0r oppr0 oner_eq0.
by case: ifP => _; rewrite ?mul1r // mulN1r eqr_oppLR.
Qed.
|
Lemma
|
algebra
|
[
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat seq choice",
"From mathcomp Require Import ssrAC div fintype path bigop order finset fingroup",
"From mathcomp Require Import ssralg poly orderedzmod"
] |
algebra/num_theory/numdomain.v
|
mulr_sg_eqN1
| |
sgr_eq0x : (sg x == 0) = (x == 0).
Proof. by rewrite -sqrf_eq0 sqr_sg pnatr_eq0; case: (x == 0). Qed.
|
Lemma
|
algebra
|
[
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat seq choice",
"From mathcomp Require Import ssrAC div fintype path bigop order finset fingroup",
"From mathcomp Require Import ssralg poly orderedzmod"
] |
algebra/num_theory/numdomain.v
|
sgr_eq0
| |
sgr_oddn x : x != 0 -> (sg x) ^+ n = (sg x) ^+ (odd n).
Proof. by rewrite /sg; do 2!case: ifP => // _; rewrite ?expr1n ?signr_odd. Qed.
|
Lemma
|
algebra
|
[
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat seq choice",
"From mathcomp Require Import ssrAC div fintype path bigop order finset fingroup",
"From mathcomp Require Import ssralg poly orderedzmod"
] |
algebra/num_theory/numdomain.v
|
sgr_odd
| |
sgrMnx n : sg (x *+ n) = (n != 0)%:R * sg x.
Proof.
case: n => [|n]; first by rewrite mulr0n sgr0 mul0r.
by rewrite !sgr_def mulrn_eq0 mul1r pmulrn_llt0.
Qed.
|
Lemma
|
algebra
|
[
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat seq choice",
"From mathcomp Require Import ssrAC div fintype path bigop order finset fingroup",
"From mathcomp Require Import ssralg poly orderedzmod"
] |
algebra/num_theory/numdomain.v
|
sgrMn
| |
sgr_natn : sg n%:R = (n != 0)%:R :> R.
Proof. by rewrite sgrMn sgr1 mulr1. Qed.
|
Lemma
|
algebra
|
[
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat seq choice",
"From mathcomp Require Import ssrAC div fintype path bigop order finset fingroup",
"From mathcomp Require Import ssralg poly orderedzmod"
] |
algebra/num_theory/numdomain.v
|
sgr_nat
| |
sgr_idx : sg (sg x) = sg x.
Proof. by rewrite !(fun_if sg) !sgrE. Qed.
|
Lemma
|
algebra
|
[
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat seq choice",
"From mathcomp Require Import ssrAC div fintype path bigop order finset fingroup",
"From mathcomp Require Import ssralg poly orderedzmod"
] |
algebra/num_theory/numdomain.v
|
sgr_id
| |
sgr_lt0x : (sg x < 0) = (x < 0).
Proof.
rewrite /sg; case: eqP => [-> // | _].
by case: ifP => _; rewrite ?ltrN10 // lt_gtF.
Qed.
|
Lemma
|
algebra
|
[
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat seq choice",
"From mathcomp Require Import ssrAC div fintype path bigop order finset fingroup",
"From mathcomp Require Import ssralg poly orderedzmod"
] |
algebra/num_theory/numdomain.v
|
sgr_lt0
| |
sgr_le0x : (sgr x <= 0) = (x <= 0).
Proof. by rewrite !le_eqVlt sgr_eq0 sgr_lt0. Qed.
|
Lemma
|
algebra
|
[
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat seq choice",
"From mathcomp Require Import ssrAC div fintype path bigop order finset fingroup",
"From mathcomp Require Import ssralg poly orderedzmod"
] |
algebra/num_theory/numdomain.v
|
sgr_le0
| |
realEsignx : x \is real -> x = (-1) ^+ (x < 0)%R * `|x|.
Proof. by case/real_ge0P; rewrite (mul1r, mulN1r) ?opprK. Qed.
|
Lemma
|
algebra
|
[
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat seq choice",
"From mathcomp Require Import ssrAC div fintype path bigop order finset fingroup",
"From mathcomp Require Import ssralg poly orderedzmod"
] |
algebra/num_theory/numdomain.v
|
realEsign
| |
realNEsignx : x \is real -> - x = (-1) ^+ (0 < x)%R * `|x|.
Proof. by move=> Rx; rewrite -normrN -oppr_lt0 -realEsign ?rpredN. Qed.
|
Lemma
|
algebra
|
[
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat seq choice",
"From mathcomp Require Import ssrAC div fintype path bigop order finset fingroup",
"From mathcomp Require Import ssralg poly orderedzmod"
] |
algebra/num_theory/numdomain.v
|
realNEsign
| |
real_normrEsign(x : R) (xR : x \is real) : `|x| = (-1) ^+ (x < 0)%R * x.
Proof. by rewrite {3}[x]realEsign // signrMK. Qed.
#[deprecated(since="mathcomp 2.3.0", note="use `realEsign` instead")]
|
Lemma
|
algebra
|
[
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat seq choice",
"From mathcomp Require Import ssrAC div fintype path bigop order finset fingroup",
"From mathcomp Require Import ssralg poly orderedzmod"
] |
algebra/num_theory/numdomain.v
|
real_normrEsign
| |
real_mulr_sign_normx : x \is real -> (-1) ^+ (x < 0)%R * `|x| = x.
Proof. by move/realEsign. Qed.
|
Lemma
|
algebra
|
[
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat seq choice",
"From mathcomp Require Import ssrAC div fintype path bigop order finset fingroup",
"From mathcomp Require Import ssralg poly orderedzmod"
] |
algebra/num_theory/numdomain.v
|
real_mulr_sign_norm
| |
real_mulr_Nsign_normx : x \is real -> (-1) ^+ (0 < x)%R * `|x| = - x.
Proof. by move/realNEsign. Qed.
|
Lemma
|
algebra
|
[
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat seq choice",
"From mathcomp Require Import ssrAC div fintype path bigop order finset fingroup",
"From mathcomp Require Import ssralg poly orderedzmod"
] |
algebra/num_theory/numdomain.v
|
real_mulr_Nsign_norm
| |
realEsgx : x \is real -> x = sgr x * `|x|.
Proof.
move=> xR; have [-> | ] := eqVneq x 0; first by rewrite normr0 mulr0.
by move=> /neqr0_sign <-; rewrite -realEsign.
Qed.
|
Lemma
|
algebra
|
[
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat seq choice",
"From mathcomp Require Import ssrAC div fintype path bigop order finset fingroup",
"From mathcomp Require Import ssralg poly orderedzmod"
] |
algebra/num_theory/numdomain.v
|
realEsg
| |
normr_sgx : `|sg x| = (x != 0)%:R.
Proof. by rewrite sgr_def -mulr_natr normrMsign normr_nat. Qed.
|
Lemma
|
algebra
|
[
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat seq choice",
"From mathcomp Require Import ssrAC div fintype path bigop order finset fingroup",
"From mathcomp Require Import ssralg poly orderedzmod"
] |
algebra/num_theory/numdomain.v
|
normr_sg
| |
sgr_normx : sg `|x| = (x != 0)%:R.
Proof. by rewrite /sg le_gtF // normr_eq0 mulrb if_neg. Qed.
|
Lemma
|
algebra
|
[
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat seq choice",
"From mathcomp Require Import ssrAC div fintype path bigop order finset fingroup",
"From mathcomp Require Import ssralg poly orderedzmod"
] |
algebra/num_theory/numdomain.v
|
sgr_norm
| |
leif_nat_rm n C : (m%:R <= n%:R ?= iff C :> R) = (m <= n ?= iff C)%N.
Proof. by rewrite /leif !ler_nat eqr_nat. Qed.
|
Lemma
|
algebra
|
[
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat seq choice",
"From mathcomp Require Import ssrAC div fintype path bigop order finset fingroup",
"From mathcomp Require Import ssralg poly orderedzmod"
] |
algebra/num_theory/numdomain.v
|
leif_nat_r
| |
leifBLRx y z C : (x - y <= z ?= iff C) = (x <= z + y ?= iff C).
Proof. by rewrite /leif !eq_le lerBlDr lerBrDr. Qed.
|
Lemma
|
algebra
|
[
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat seq choice",
"From mathcomp Require Import ssrAC div fintype path bigop order finset fingroup",
"From mathcomp Require Import ssralg poly orderedzmod"
] |
algebra/num_theory/numdomain.v
|
leifBLR
| |
leifBRLx y z C : (x <= y - z ?= iff C) = (x + z <= y ?= iff C).
Proof. by rewrite -leifBLR opprK. Qed.
|
Lemma
|
algebra
|
[
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat seq choice",
"From mathcomp Require Import ssrAC div fintype path bigop order finset fingroup",
"From mathcomp Require Import ssralg poly orderedzmod"
] |
algebra/num_theory/numdomain.v
|
leifBRL
| |
leifDx1 y1 C1 x2 y2 C2 :
x1 <= y1 ?= iff C1 -> x2 <= y2 ?= iff C2 ->
x1 + x2 <= y1 + y2 ?= iff C1 && C2.
Proof.
rewrite -(mono_leif (C := C1) (lerD2r x2)).
rewrite -(mono_leif (C := C2) (lerD2l y1)).
exact: leif_trans.
Qed.
|
Lemma
|
algebra
|
[
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat seq choice",
"From mathcomp Require Import ssrAC div fintype path bigop order finset fingroup",
"From mathcomp Require Import ssralg poly orderedzmod"
] |
algebra/num_theory/numdomain.v
|
leifD
| |
leif_sum(I : finType) (P C : pred I) (E1 E2 : I -> R) :
(forall i, P i -> E1 i <= E2 i ?= iff C i) ->
\sum_(i | P i) E1 i <= \sum_(i | P i) E2 i ?= iff [forall (i | P i), C i].
Proof.
move=> leE12; rewrite -big_andE.
elim/big_rec3: _ => [|i Ci m2 m1 /leE12]; first by rewrite /leif lexx eqxx.
exact: leifD.
Qed.
|
Lemma
|
algebra
|
[
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat seq choice",
"From mathcomp Require Import ssrAC div fintype path bigop order finset fingroup",
"From mathcomp Require Import ssralg poly orderedzmod"
] |
algebra/num_theory/numdomain.v
|
leif_sum
| |
leif_0_sum(I : finType) (P C : pred I) (E : I -> R) :
(forall i, P i -> 0 <= E i ?= iff C i) ->
0 <= \sum_(i | P i) E i ?= iff [forall (i | P i), C i].
Proof. by move/leif_sum; rewrite big1_eq. Qed.
|
Lemma
|
algebra
|
[
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat seq choice",
"From mathcomp Require Import ssrAC div fintype path bigop order finset fingroup",
"From mathcomp Require Import ssralg poly orderedzmod"
] |
algebra/num_theory/numdomain.v
|
leif_0_sum
| |
real_leif_normx : x \is real -> x <= `|x| ?= iff (0 <= x).
Proof.
by move=> xR; rewrite ger0_def eq_sym; apply: leif_eq; rewrite real_ler_norm.
Qed.
|
Lemma
|
algebra
|
[
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat seq choice",
"From mathcomp Require Import ssrAC div fintype path bigop order finset fingroup",
"From mathcomp Require Import ssralg poly orderedzmod"
] |
algebra/num_theory/numdomain.v
|
real_leif_norm
| |
leif_pMx1 x2 y1 y2 C1 C2 :
0 <= x1 -> 0 <= x2 -> x1 <= y1 ?= iff C1 -> x2 <= y2 ?= iff C2 ->
x1 * x2 <= y1 * y2 ?= iff (y1 * y2 == 0) || C1 && C2.
Proof.
move=> x1_ge0 x2_ge0 le_xy1 le_xy2; have [y_0 | ] := eqVneq _ 0.
apply/leifP; rewrite y_0 /= mulf_eq0 !eq_le x1_ge0 x2_ge0 !andbT.
move/eqP: y_0; rewrite mulf_eq0.
by case/pred2P=> <-; rewrite (le_xy1, le_xy2) ?orbT.
rewrite /= mulf_eq0 => /norP[y1nz y2nz].
have y1_gt0: 0 < y1 by rewrite lt_def y1nz (le_trans _ le_xy1).
have [x2_0 | x2nz] := eqVneq x2 0.
apply/leifP; rewrite -le_xy2 x2_0 eq_sym (negPf y2nz) andbF mulr0.
by rewrite mulr_gt0 // lt_def y2nz -x2_0 le_xy2.
have:= le_xy2; rewrite -[X in X -> _](mono_leif (ler_pM2l y1_gt0)).
by apply: leif_trans; rewrite (mono_leif (ler_pM2r _)) // lt_def x2nz.
Qed.
|
Lemma
|
algebra
|
[
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat seq choice",
"From mathcomp Require Import ssrAC div fintype path bigop order finset fingroup",
"From mathcomp Require Import ssralg poly orderedzmod"
] |
algebra/num_theory/numdomain.v
|
leif_pM
| |
leif_nMx1 x2 y1 y2 C1 C2 :
y1 <= 0 -> y2 <= 0 -> x1 <= y1 ?= iff C1 -> x2 <= y2 ?= iff C2 ->
y1 * y2 <= x1 * x2 ?= iff (x1 * x2 == 0) || C1 && C2.
Proof.
rewrite -!oppr_ge0 -mulrNN -[x1 * x2]mulrNN => y1le0 y2le0 le_xy1 le_xy2.
by apply: leif_pM => //; rewrite (nmono_leif lerN2).
Qed.
|
Lemma
|
algebra
|
[
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat seq choice",
"From mathcomp Require Import ssrAC div fintype path bigop order finset fingroup",
"From mathcomp Require Import ssralg poly orderedzmod"
] |
algebra/num_theory/numdomain.v
|
leif_nM
| |
leif_pprod(I : finType) (P C : pred I) (E1 E2 : I -> R) :
(forall i, P i -> 0 <= E1 i) ->
(forall i, P i -> E1 i <= E2 i ?= iff C i) ->
let pi E := \prod_(i | P i) E i in
pi E1 <= pi E2 ?= iff (pi E2 == 0) || [forall (i | P i), C i].
Proof.
move=> E1_ge0 leE12 /=; rewrite -big_andE; elim/(big_load (fun x => 0 <= x)): _.
elim/big_rec3: _ => [|i Ci m2 m1 Pi [m1ge0 le_m12]].
by split=> //; apply/leifP; rewrite orbT.
have Ei_ge0 := E1_ge0 i Pi; split; first by rewrite mulr_ge0.
congr (leif _ _ _): (leif_pM Ei_ge0 m1ge0 (leE12 i Pi) le_m12).
by rewrite mulf_eq0 -!orbA; congr (_ || _); rewrite !orb_andr orbA orbb.
Qed.
|
Lemma
|
algebra
|
[
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat seq choice",
"From mathcomp Require Import ssrAC div fintype path bigop order finset fingroup",
"From mathcomp Require Import ssralg poly orderedzmod"
] |
algebra/num_theory/numdomain.v
|
leif_pprod
| |
subr_lteifr0C x y : (y - x < 0 ?<= if C) = (y < x ?<= if C).
Proof. by case: C => /=; rewrite subr_lte0. Qed.
|
Lemma
|
algebra
|
[
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat seq choice",
"From mathcomp Require Import ssrAC div fintype path bigop order finset fingroup",
"From mathcomp Require Import ssralg poly orderedzmod"
] |
algebra/num_theory/numdomain.v
|
subr_lteifr0
| |
subr_lteif0rC x y : (0 < y - x ?<= if C) = (x < y ?<= if C).
Proof. by case: C => /=; rewrite subr_gte0. Qed.
|
Lemma
|
algebra
|
[
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat seq choice",
"From mathcomp Require Import ssrAC div fintype path bigop order finset fingroup",
"From mathcomp Require Import ssralg poly orderedzmod"
] |
algebra/num_theory/numdomain.v
|
subr_lteif0r
| |
subr_lteif0:= (subr_lteifr0, subr_lteif0r).
|
Definition
|
algebra
|
[
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat seq choice",
"From mathcomp Require Import ssrAC div fintype path bigop order finset fingroup",
"From mathcomp Require Import ssralg poly orderedzmod"
] |
algebra/num_theory/numdomain.v
|
subr_lteif0
| |
lteif01C : 0 < 1 ?<= if C :> R.
Proof. by case: C; rewrite /= lter01. Qed.
|
Lemma
|
algebra
|
[
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat seq choice",
"From mathcomp Require Import ssrAC div fintype path bigop order finset fingroup",
"From mathcomp Require Import ssralg poly orderedzmod"
] |
algebra/num_theory/numdomain.v
|
lteif01
| |
lteifNlC x y : - x < y ?<= if C = (- y < x ?<= if C).
Proof. by case: C; rewrite /= lterNl. Qed.
|
Lemma
|
algebra
|
[
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat seq choice",
"From mathcomp Require Import ssrAC div fintype path bigop order finset fingroup",
"From mathcomp Require Import ssralg poly orderedzmod"
] |
algebra/num_theory/numdomain.v
|
lteifNl
| |
lteifNrC x y : x < - y ?<= if C = (y < - x ?<= if C).
Proof. by case: C; rewrite /= lterNr. Qed.
|
Lemma
|
algebra
|
[
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat seq choice",
"From mathcomp Require Import ssrAC div fintype path bigop order finset fingroup",
"From mathcomp Require Import ssralg poly orderedzmod"
] |
algebra/num_theory/numdomain.v
|
lteifNr
| |
lteif0NrC x : 0 < - x ?<= if C = (x < 0 ?<= if C).
Proof. by case: C; rewrite /= (oppr_ge0, oppr_gt0). Qed.
|
Lemma
|
algebra
|
[
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat seq choice",
"From mathcomp Require Import ssrAC div fintype path bigop order finset fingroup",
"From mathcomp Require Import ssralg poly orderedzmod"
] |
algebra/num_theory/numdomain.v
|
lteif0Nr
| |
lteifNr0C x : - x < 0 ?<= if C = (0 < x ?<= if C).
Proof. by case: C; rewrite /= (oppr_le0, oppr_lt0). Qed.
|
Lemma
|
algebra
|
[
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat seq choice",
"From mathcomp Require Import ssrAC div fintype path bigop order finset fingroup",
"From mathcomp Require Import ssralg poly orderedzmod"
] |
algebra/num_theory/numdomain.v
|
lteifNr0
| |
lteifN2C : {mono -%R : x y /~ x < y ?<= if C :> R}.
Proof. by case: C => ? ?; rewrite /= lterN2. Qed.
|
Lemma
|
algebra
|
[
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat seq choice",
"From mathcomp Require Import ssrAC div fintype path bigop order finset fingroup",
"From mathcomp Require Import ssralg poly orderedzmod"
] |
algebra/num_theory/numdomain.v
|
lteifN2
| |
lteif_oppE:= (lteif0Nr, lteifNr0, lteifN2).
|
Definition
|
algebra
|
[
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat seq choice",
"From mathcomp Require Import ssrAC div fintype path bigop order finset fingroup",
"From mathcomp Require Import ssralg poly orderedzmod"
] |
algebra/num_theory/numdomain.v
|
lteif_oppE
| |
lteifD2lC x : {mono +%R x : y z / y < z ?<= if C}.
Proof. by case: C => ? ?; rewrite /= lterD2. Qed.
|
Lemma
|
algebra
|
[
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat seq choice",
"From mathcomp Require Import ssrAC div fintype path bigop order finset fingroup",
"From mathcomp Require Import ssralg poly orderedzmod"
] |
algebra/num_theory/numdomain.v
|
lteifD2l
| |
lteifD2rC x : {mono +%R^~ x : y z / y < z ?<= if C}.
Proof. by case: C => ? ?; rewrite /= lterD2. Qed.
|
Lemma
|
algebra
|
[
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat seq choice",
"From mathcomp Require Import ssrAC div fintype path bigop order finset fingroup",
"From mathcomp Require Import ssralg poly orderedzmod"
] |
algebra/num_theory/numdomain.v
|
lteifD2r
| |
lteifD2:= (lteifD2l, lteifD2r).
|
Definition
|
algebra
|
[
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat seq choice",
"From mathcomp Require Import ssrAC div fintype path bigop order finset fingroup",
"From mathcomp Require Import ssralg poly orderedzmod"
] |
algebra/num_theory/numdomain.v
|
lteifD2
| |
lteifBlDrC x y z : (x - y < z ?<= if C) = (x < z + y ?<= if C).
Proof. by case: C; rewrite /= lterBDr. Qed.
|
Lemma
|
algebra
|
[
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat seq choice",
"From mathcomp Require Import ssrAC div fintype path bigop order finset fingroup",
"From mathcomp Require Import ssralg poly orderedzmod"
] |
algebra/num_theory/numdomain.v
|
lteifBlDr
| |
lteifBrDrC x y z : (x < y - z ?<= if C) = (x + z < y ?<= if C).
Proof. by case: C; rewrite /= lterBDr. Qed.
|
Lemma
|
algebra
|
[
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat seq choice",
"From mathcomp Require Import ssrAC div fintype path bigop order finset fingroup",
"From mathcomp Require Import ssralg poly orderedzmod"
] |
algebra/num_theory/numdomain.v
|
lteifBrDr
| |
lteifBDr:= (lteifBlDr, lteifBrDr).
|
Definition
|
algebra
|
[
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat seq choice",
"From mathcomp Require Import ssrAC div fintype path bigop order finset fingroup",
"From mathcomp Require Import ssralg poly orderedzmod"
] |
algebra/num_theory/numdomain.v
|
lteifBDr
| |
lteifBlDlC x y z : (x - y < z ?<= if C) = (x < y + z ?<= if C).
Proof. by case: C; rewrite /= lterBDl. Qed.
|
Lemma
|
algebra
|
[
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat seq choice",
"From mathcomp Require Import ssrAC div fintype path bigop order finset fingroup",
"From mathcomp Require Import ssralg poly orderedzmod"
] |
algebra/num_theory/numdomain.v
|
lteifBlDl
| |
lteifBrDlC x y z : (x < y - z ?<= if C) = (z + x < y ?<= if C).
Proof. by case: C; rewrite /= lterBDl. Qed.
|
Lemma
|
algebra
|
[
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat seq choice",
"From mathcomp Require Import ssrAC div fintype path bigop order finset fingroup",
"From mathcomp Require Import ssralg poly orderedzmod"
] |
algebra/num_theory/numdomain.v
|
lteifBrDl
| |
lteifBDl:= (lteifBlDl, lteifBrDl).
|
Definition
|
algebra
|
[
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat seq choice",
"From mathcomp Require Import ssrAC div fintype path bigop order finset fingroup",
"From mathcomp Require Import ssralg poly orderedzmod"
] |
algebra/num_theory/numdomain.v
|
lteifBDl
| |
lteif_pM2lC x : 0 < x -> {mono *%R x : y z / y < z ?<= if C}.
Proof. by case: C => ? ? ?; rewrite /= lter_pM2l. Qed.
|
Lemma
|
algebra
|
[
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat seq choice",
"From mathcomp Require Import ssrAC div fintype path bigop order finset fingroup",
"From mathcomp Require Import ssralg poly orderedzmod"
] |
algebra/num_theory/numdomain.v
|
lteif_pM2l
| |
lteif_pM2rC x : 0 < x -> {mono *%R^~ x : y z / y < z ?<= if C}.
Proof. by case: C => ? ? ?; rewrite /= lter_pM2r. Qed.
|
Lemma
|
algebra
|
[
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat seq choice",
"From mathcomp Require Import ssrAC div fintype path bigop order finset fingroup",
"From mathcomp Require Import ssralg poly orderedzmod"
] |
algebra/num_theory/numdomain.v
|
lteif_pM2r
| |
lteif_nM2lC x : x < 0 -> {mono *%R x : y z /~ y < z ?<= if C}.
Proof. by case: C => ? ? ?; rewrite /= lter_nM2l. Qed.
|
Lemma
|
algebra
|
[
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat seq choice",
"From mathcomp Require Import ssrAC div fintype path bigop order finset fingroup",
"From mathcomp Require Import ssralg poly orderedzmod"
] |
algebra/num_theory/numdomain.v
|
lteif_nM2l
| |
lteif_nM2rC x : x < 0 -> {mono *%R^~ x : y z /~ y < z ?<= if C}.
Proof. by case: C => ? ? ?; rewrite /= lter_nM2r. Qed.
|
Lemma
|
algebra
|
[
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat seq choice",
"From mathcomp Require Import ssrAC div fintype path bigop order finset fingroup",
"From mathcomp Require Import ssralg poly orderedzmod"
] |
algebra/num_theory/numdomain.v
|
lteif_nM2r
| |
lteif_nnormrC x y : y < 0 ?<= if ~~ C -> (`|x| < y ?<= if C) = false.
Proof. by case: C => ?; rewrite /= lter_nnormr. Qed.
|
Lemma
|
algebra
|
[
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat seq choice",
"From mathcomp Require Import ssrAC div fintype path bigop order finset fingroup",
"From mathcomp Require Import ssralg poly orderedzmod"
] |
algebra/num_theory/numdomain.v
|
lteif_nnormr
| |
real_lteifNEx y C : x \is Num.real -> y \is Num.real ->
x < y ?<= if ~~ C = ~~ (y < x ?<= if C).
Proof. by move=> ? ?; rewrite comparable_lteifNE ?real_comparable. Qed.
|
Lemma
|
algebra
|
[
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat seq choice",
"From mathcomp Require Import ssrAC div fintype path bigop order finset fingroup",
"From mathcomp Require Import ssralg poly orderedzmod"
] |
algebra/num_theory/numdomain.v
|
real_lteifNE
| |
real_lteif_normlC x y :
x \is Num.real ->
(`|x| < y ?<= if C) = ((- y < x ?<= if C) && (x < y ?<= if C)).
Proof. by case: C => ?; rewrite /= real_lter_norml. Qed.
|
Lemma
|
algebra
|
[
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat seq choice",
"From mathcomp Require Import ssrAC div fintype path bigop order finset fingroup",
"From mathcomp Require Import ssralg poly orderedzmod"
] |
algebra/num_theory/numdomain.v
|
real_lteif_norml
| |
real_lteif_normrC x y :
y \is Num.real ->
(x < `|y| ?<= if C) = ((x < y ?<= if C) || (x < - y ?<= if C)).
Proof. by case: C => ?; rewrite /= real_lter_normr. Qed.
|
Lemma
|
algebra
|
[
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat seq choice",
"From mathcomp Require Import ssrAC div fintype path bigop order finset fingroup",
"From mathcomp Require Import ssralg poly orderedzmod"
] |
algebra/num_theory/numdomain.v
|
real_lteif_normr
| |
real_lteif_distlC x y e :
x - y \is real ->
(`|x - y| < e ?<= if C) = (y - e < x ?<= if C) && (x < y + e ?<= if C).
Proof. by case: C => /= ?; rewrite real_lter_distl. Qed.
|
Lemma
|
algebra
|
[
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat seq choice",
"From mathcomp Require Import ssrAC div fintype path bigop order finset fingroup",
"From mathcomp Require Import ssralg poly orderedzmod"
] |
algebra/num_theory/numdomain.v
|
real_lteif_distl
| |
real_leif_mean_square_scaledx y :
x \is real -> y \is real -> x * y *+ 2 <= x ^+ 2 + y ^+ 2 ?= iff (x == y).
Proof.
move=> Rx Ry; rewrite -[_ *+ 2]add0r -leifBRL addrAC -sqrrB -subr_eq0.
by rewrite -sqrf_eq0 eq_sym; apply: leif_eq; rewrite -realEsqr rpredB.
Qed.
|
Lemma
|
algebra
|
[
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat seq choice",
"From mathcomp Require Import ssrAC div fintype path bigop order finset fingroup",
"From mathcomp Require Import ssralg poly orderedzmod"
] |
algebra/num_theory/numdomain.v
|
real_leif_mean_square_scaled
| |
real_leif_AGM2_scaledx y :
x \is real -> y \is real -> x * y *+ 4 <= (x + y) ^+ 2 ?= iff (x == y).
Proof.
move=> Rx Ry; rewrite sqrrD addrAC (mulrnDr _ 2) -leifBLR addrK.
exact: real_leif_mean_square_scaled.
Qed.
|
Lemma
|
algebra
|
[
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat seq choice",
"From mathcomp Require Import ssrAC div fintype path bigop order finset fingroup",
"From mathcomp Require Import ssralg poly orderedzmod"
] |
algebra/num_theory/numdomain.v
|
real_leif_AGM2_scaled
| |
leif_AGM_scaled(I : finType) (A : {pred I}) (E : I -> R) (n := #|A|) :
{in A, forall i, 0 <= E i *+ n} ->
\prod_(i in A) (E i *+ n) <= (\sum_(i in A) E i) ^+ n
?= iff [forall i in A, forall j in A, E i == E j].
Proof.
have [m leAm] := ubnP #|A|; elim: m => // m IHm in A leAm E n * => Ege0.
apply/leifP; case: ifPn => [/forall_inP-Econstant | Enonconstant].
have [i /= Ai | A0] := pickP [in A]; last by rewrite [n]eq_card0 ?big_pred0.
have /eqfun_inP-E_i := Econstant i Ai; rewrite -(eq_bigr _ E_i) sumr_const.
by rewrite exprMn_n prodrMn_const -(eq_bigr _ E_i) prodr_const.
set mu := \sum_(i in A) E i; pose En i := E i *+ n.
pose cmp_mu s := [pred i | s * mu < s * En i].
have{Enonconstant} has_cmp_mu e (s := (-1) ^+ e): {i | i \in A & cmp_mu s i}.
apply/sig2W/exists_inP; apply: contraR Enonconstant => /exists_inPn-mu_s_A.
have n_gt0 i: i \in A -> (0 < n)%N by rewrite [n](cardD1 i) => ->.
have{} mu_s_A i: i \in A -> s * En i <= s * mu.
move=> Ai; rewrite real_leNgt ?mu_s_A ?rpredMsign ?ger0_real ?Ege0 //.
by rewrite -(pmulrn_lge0 _ (n_gt0 i Ai)) -sumrMnl sumr_ge0.
have [_ /esym/eqfun_inP] := leif_sum (fun i Ai => leif_eq (mu_s_A i Ai)).
rewrite sumr_const -/n -mulr_sumr sumrMnl -/mu mulrnAr eqxx => A_mu.
apply/forall_inP=> i Ai; apply/eqfun_inP=> j Aj.
by apply: (pmulrnI (n_gt0 i Ai)); apply: (can_inj (signrMK e)); rewrite !A_mu.
have [[i Ai Ei_lt_mu] [j Aj Ej_gt_mu]] := (has_cmp_mu 1, has_cmp_mu 0)%N.
rewrite {cmp_mu has_cmp_mu}/= !mul
...
|
Lemma
|
algebra
|
[
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat seq choice",
"From mathcomp Require Import ssrAC div fintype path bigop order finset fingroup",
"From mathcomp Require Import ssralg poly orderedzmod"
] |
algebra/num_theory/numdomain.v
|
leif_AGM_scaled
| |
poly_disk_boundp b : {ub | forall x, `|x| <= b -> `|p.[x]| <= ub}.
Proof.
exists (\sum_(j < size p) `|p`_j| * b ^+ j) => x le_x_b.
rewrite horner_coef (le_trans (ler_norm_sum _ _ _)) ?ler_sum // => j _.
rewrite normrM normrX ler_wpM2l ?lerXn2r ?unfold_in //=.
exact: le_trans (normr_ge0 x) le_x_b.
Qed.
|
Lemma
|
algebra
|
[
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat seq choice",
"From mathcomp Require Import ssrAC div fintype path bigop order finset fingroup",
"From mathcomp Require Import ssralg poly orderedzmod"
] |
algebra/num_theory/numdomain.v
|
poly_disk_bound
| |
real_mono:
{homo f : x y / x < y} -> {in real &, {mono f : x y / x <= y}}.
Proof.
move=> mf x y xR yR /=; have [lt_xy | le_yx] := real_leP xR yR.
by rewrite ltW_homo.
by rewrite lt_geF ?mf.
Qed.
|
Lemma
|
algebra
|
[
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat seq choice",
"From mathcomp Require Import ssrAC div fintype path bigop order finset fingroup",
"From mathcomp Require Import ssralg poly orderedzmod"
] |
algebra/num_theory/numdomain.v
|
real_mono
| |
real_nmono:
{homo f : x y /~ x < y} -> {in real &, {mono f : x y /~ x <= y}}.
Proof.
move=> mf x y xR yR /=; have [lt_xy|le_yx] := real_ltP xR yR.
by rewrite lt_geF ?mf.
by rewrite ltW_nhomo.
Qed.
|
Lemma
|
algebra
|
[
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat seq choice",
"From mathcomp Require Import ssrAC div fintype path bigop order finset fingroup",
"From mathcomp Require Import ssralg poly orderedzmod"
] |
algebra/num_theory/numdomain.v
|
real_nmono
| |
real_mono_in:
{in D &, {homo f : x y / x < y}} ->
{in [pred x in D | x \is real] &, {mono f : x y / x <= y}}.
Proof.
move=> Dmf x y /andP[hx xR] /andP[hy yR] /=.
have [lt_xy|le_yx] := real_leP xR yR; first by rewrite (ltW_homo_in Dmf).
by rewrite lt_geF ?Dmf.
Qed.
|
Lemma
|
algebra
|
[
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat seq choice",
"From mathcomp Require Import ssrAC div fintype path bigop order finset fingroup",
"From mathcomp Require Import ssralg poly orderedzmod"
] |
algebra/num_theory/numdomain.v
|
real_mono_in
| |
real_nmono_in:
{in D &, {homo f : x y /~ x < y}} ->
{in [pred x in D | x \is real] &, {mono f : x y /~ x <= y}}.
Proof.
move=> Dmf x y /andP[hx xR] /andP[hy yR] /=.
have [lt_xy|le_yx] := real_ltP xR yR; last by rewrite (ltW_nhomo_in Dmf).
by rewrite lt_geF ?Dmf.
Qed.
|
Lemma
|
algebra
|
[
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat seq choice",
"From mathcomp Require Import ssrAC div fintype path bigop order finset fingroup",
"From mathcomp Require Import ssralg poly orderedzmod"
] |
algebra/num_theory/numdomain.v
|
real_nmono_in
| |
realn_mono: {homo f' : x y / x < y >-> (x < y)} ->
{in real &, {mono f' : x y / x <= y >-> (x <= y)}}.
Proof.
move=> mf x y xR yR /=; have [lt_xy | le_yx] := real_leP xR yR.
by rewrite ltW_homo.
by rewrite lt_geF ?mf.
Qed.
|
Lemma
|
algebra
|
[
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat seq choice",
"From mathcomp Require Import ssrAC div fintype path bigop order finset fingroup",
"From mathcomp Require Import ssralg poly orderedzmod"
] |
algebra/num_theory/numdomain.v
|
realn_mono
| |
realn_nmono: {homo f' : x y / y < x >-> (x < y)} ->
{in real &, {mono f' : x y / y <= x >-> (x <= y)}}.
Proof.
move=> mf x y xR yR /=; have [lt_xy|le_yx] := real_ltP xR yR.
by rewrite lt_geF ?mf.
by rewrite ltW_nhomo.
Qed.
|
Lemma
|
algebra
|
[
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat seq choice",
"From mathcomp Require Import ssrAC div fintype path bigop order finset fingroup",
"From mathcomp Require Import ssralg poly orderedzmod"
] |
algebra/num_theory/numdomain.v
|
realn_nmono
| |
realn_mono_in: {in D &, {homo f' : x y / x < y >-> (x < y)}} ->
{in [pred x in D | x \is real] &, {mono f' : x y / x <= y >-> (x <= y)}}.
Proof.
move=> Dmf x y /andP[hx xR] /andP[hy yR] /=.
have [lt_xy|le_yx] := real_leP xR yR; first by rewrite (ltW_homo_in Dmf).
by rewrite lt_geF ?Dmf.
Qed.
|
Lemma
|
algebra
|
[
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat seq choice",
"From mathcomp Require Import ssrAC div fintype path bigop order finset fingroup",
"From mathcomp Require Import ssralg poly orderedzmod"
] |
algebra/num_theory/numdomain.v
|
realn_mono_in
| |
realn_nmono_in: {in D &, {homo f' : x y / y < x >-> (x < y)}} ->
{in [pred x in D | x \is real] &, {mono f' : x y / y <= x >-> (x <= y)}}.
Proof.
move=> Dmf x y /andP[hx xR] /andP[hy yR] /=.
have [lt_xy|le_yx] := real_ltP xR yR; last by rewrite (ltW_nhomo_in Dmf).
by rewrite lt_geF ?Dmf.
Qed.
|
Lemma
|
algebra
|
[
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat seq choice",
"From mathcomp Require Import ssrAC div fintype path bigop order finset fingroup",
"From mathcomp Require Import ssralg poly orderedzmod"
] |
algebra/num_theory/numdomain.v
|
realn_nmono_in
| |
natrG_gt0G : #|G|%:R > 0 :> R.
Proof. by rewrite ltr0n cardG_gt0. Qed.
|
Lemma
|
algebra
|
[
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat seq choice",
"From mathcomp Require Import ssrAC div fintype path bigop order finset fingroup",
"From mathcomp Require Import ssralg poly orderedzmod"
] |
algebra/num_theory/numdomain.v
|
natrG_gt0
| |
natrG_neq0G : #|G|%:R != 0 :> R.
Proof. by rewrite gt_eqF // natrG_gt0. Qed.
|
Lemma
|
algebra
|
[
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat seq choice",
"From mathcomp Require Import ssrAC div fintype path bigop order finset fingroup",
"From mathcomp Require Import ssralg poly orderedzmod"
] |
algebra/num_theory/numdomain.v
|
natrG_neq0
| |
natr_indexg_gt0G B : #|G : B|%:R > 0 :> R.
Proof. by rewrite ltr0n indexg_gt0. Qed.
|
Lemma
|
algebra
|
[
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat seq choice",
"From mathcomp Require Import ssrAC div fintype path bigop order finset fingroup",
"From mathcomp Require Import ssralg poly orderedzmod"
] |
algebra/num_theory/numdomain.v
|
natr_indexg_gt0
| |
natr_indexg_neq0G B : #|G : B|%:R != 0 :> R.
Proof. by rewrite gt_eqF // natr_indexg_gt0. Qed.
|
Lemma
|
algebra
|
[
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat seq choice",
"From mathcomp Require Import ssrAC div fintype path bigop order finset fingroup",
"From mathcomp Require Import ssralg poly orderedzmod"
] |
algebra/num_theory/numdomain.v
|
natr_indexg_neq0
| |
num_realx : x \is real. Proof. exact: num_real. Qed.
Hint Resolve num_real : core.
|
Lemma
|
algebra
|
[
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat seq choice",
"From mathcomp Require Import ssrAC div fintype path bigop order finset fingroup",
"From mathcomp Require Import ssralg poly orderedzmod"
] |
algebra/num_theory/numdomain.v
|
num_real
| |
lerPx y : ler_xor_gt x y (min y x) (min x y) (max y x) (max x y)
`|x - y| `|y - x| (x <= y) (y < x).
Proof. exact: real_leP. Qed.
|
Lemma
|
algebra
|
[
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat seq choice",
"From mathcomp Require Import ssrAC div fintype path bigop order finset fingroup",
"From mathcomp Require Import ssralg poly orderedzmod"
] |
algebra/num_theory/numdomain.v
|
lerP
| |
ltrPx y : ltr_xor_ge x y (min y x) (min x y) (max y x) (max x y)
`|x - y| `|y - x| (y <= x) (x < y).
Proof. exact: real_ltP. Qed.
|
Lemma
|
algebra
|
[
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat seq choice",
"From mathcomp Require Import ssrAC div fintype path bigop order finset fingroup",
"From mathcomp Require Import ssralg poly orderedzmod"
] |
algebra/num_theory/numdomain.v
|
ltrP
| |
ltrgtPx y :
comparer x y (min y x) (min x y) (max y x) (max x y)
`|x - y| `|y - x| (y == x) (x == y)
(x >= y) (x <= y) (x > y) (x < y) .
Proof. exact: real_ltgtP. Qed.
|
Lemma
|
algebra
|
[
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat seq choice",
"From mathcomp Require Import ssrAC div fintype path bigop order finset fingroup",
"From mathcomp Require Import ssralg poly orderedzmod"
] |
algebra/num_theory/numdomain.v
|
ltrgtP
| |
ger0Px : ger0_xor_lt0 x (min 0 x) (min x 0) (max 0 x) (max x 0)
`|x| (x < 0) (0 <= x).
Proof. exact: real_ge0P. Qed.
|
Lemma
|
algebra
|
[
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat seq choice",
"From mathcomp Require Import ssrAC div fintype path bigop order finset fingroup",
"From mathcomp Require Import ssralg poly orderedzmod"
] |
algebra/num_theory/numdomain.v
|
ger0P
| |
ler0Px : ler0_xor_gt0 x (min 0 x) (min x 0) (max 0 x) (max x 0)
`|x| (0 < x) (x <= 0).
Proof. exact: real_le0P. Qed.
|
Lemma
|
algebra
|
[
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat seq choice",
"From mathcomp Require Import ssrAC div fintype path bigop order finset fingroup",
"From mathcomp Require Import ssralg poly orderedzmod"
] |
algebra/num_theory/numdomain.v
|
ler0P
| |
ltrgt0Px : comparer0 x (min 0 x) (min x 0) (max 0 x) (max x 0)
`|x| (0 == x) (x == 0) (x <= 0) (0 <= x) (x < 0) (x > 0).
Proof. exact: real_ltgt0P. Qed.
|
Lemma
|
algebra
|
[
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat seq choice",
"From mathcomp Require Import ssrAC div fintype path bigop order finset fingroup",
"From mathcomp Require Import ssralg poly orderedzmod"
] |
algebra/num_theory/numdomain.v
|
ltrgt0P
| |
mulr_lt0x y :
(x * y < 0) = [&& x != 0, y != 0 & (x < 0) (+) (y < 0)].
Proof.
have [x_gt0|x_lt0|->] /= := ltrgt0P x; last by rewrite mul0r.
by rewrite pmulr_rlt0 //; case: ltrgt0P.
by rewrite nmulr_rlt0 //; case: ltrgt0P.
Qed.
|
Lemma
|
algebra
|
[
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat seq choice",
"From mathcomp Require Import ssrAC div fintype path bigop order finset fingroup",
"From mathcomp Require Import ssralg poly orderedzmod"
] |
algebra/num_theory/numdomain.v
|
mulr_lt0
| |
neq0_mulr_lt0x y :
x != 0 -> y != 0 -> (x * y < 0) = (x < 0) (+) (y < 0).
Proof. by move=> x_neq0 y_neq0; rewrite mulr_lt0 x_neq0 y_neq0. Qed.
|
Lemma
|
algebra
|
[
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat seq choice",
"From mathcomp Require Import ssrAC div fintype path bigop order finset fingroup",
"From mathcomp Require Import ssralg poly orderedzmod"
] |
algebra/num_theory/numdomain.v
|
neq0_mulr_lt0
| |
mulr_sign_lt0(b : bool) x :
((-1) ^+ b * x < 0) = (x != 0) && (b (+) (x < 0)%R).
Proof. by rewrite mulr_lt0 signr_lt0 signr_eq0. Qed.
|
Lemma
|
algebra
|
[
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat seq choice",
"From mathcomp Require Import ssrAC div fintype path bigop order finset fingroup",
"From mathcomp Require Import ssralg poly orderedzmod"
] |
algebra/num_theory/numdomain.v
|
mulr_sign_lt0
| |
mulr_sign_normx : (-1) ^+ (x < 0)%R * `|x| = x.
Proof. by rewrite -realEsign. Qed.
|
Lemma
|
algebra
|
[
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat seq choice",
"From mathcomp Require Import ssrAC div fintype path bigop order finset fingroup",
"From mathcomp Require Import ssralg poly orderedzmod"
] |
algebra/num_theory/numdomain.v
|
mulr_sign_norm
| |
mulr_Nsign_normx : (-1) ^+ (0 < x)%R * `|x| = - x.
Proof. by rewrite real_mulr_Nsign_norm. Qed.
|
Lemma
|
algebra
|
[
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat seq choice",
"From mathcomp Require Import ssrAC div fintype path bigop order finset fingroup",
"From mathcomp Require Import ssralg poly orderedzmod"
] |
algebra/num_theory/numdomain.v
|
mulr_Nsign_norm
| |
numEsignx : x = (-1) ^+ (x < 0)%R * `|x|.
Proof. by rewrite -realEsign. Qed.
|
Lemma
|
algebra
|
[
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat seq choice",
"From mathcomp Require Import ssrAC div fintype path bigop order finset fingroup",
"From mathcomp Require Import ssralg poly orderedzmod"
] |
algebra/num_theory/numdomain.v
|
numEsign
| |
numNEsignx : -x = (-1) ^+ (0 < x)%R * `|x|.
Proof. by rewrite -realNEsign. Qed.
|
Lemma
|
algebra
|
[
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat seq choice",
"From mathcomp Require Import ssrAC div fintype path bigop order finset fingroup",
"From mathcomp Require Import ssralg poly orderedzmod"
] |
algebra/num_theory/numdomain.v
|
numNEsign
| |
normrEsignx : `|x| = (-1) ^+ (x < 0)%R * x.
Proof. by rewrite -real_normrEsign. Qed.
|
Lemma
|
algebra
|
[
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat seq choice",
"From mathcomp Require Import ssrAC div fintype path bigop order finset fingroup",
"From mathcomp Require Import ssralg poly orderedzmod"
] |
algebra/num_theory/numdomain.v
|
normrEsign
| |
sgr_cp0x :
((sg x == 1) = (0 < x)) *
((sg x == -1) = (x < 0)) *
((sg x == 0) = (x == 0)).
Proof.
rewrite -[1]/((-1) ^+ false) -signrN lt0r leNgt sgr_def.
case: (x =P 0) => [-> | _]; first by rewrite !(eq_sym 0) !signr_eq0 ltxx eqxx.
by rewrite !(inj_eq signr_inj) eqb_id eqbF_neg signr_eq0 //.
Qed.
|
Lemma
|
algebra
|
[
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat seq choice",
"From mathcomp Require Import ssrAC div fintype path bigop order finset fingroup",
"From mathcomp Require Import ssralg poly orderedzmod"
] |
algebra/num_theory/numdomain.v
|
sgr_cp0
| |
sgr_valx : R -> bool -> bool -> bool -> bool -> bool -> bool
-> bool -> bool -> bool -> bool -> bool -> bool -> R -> Set :=
| SgrNull of x = 0 : sgr_val x 0 true true true true false false
true false false true false false 0
| SgrPos of x > 0 : sgr_val x x false false true false false true
false false true false false true 1
| SgrNeg of x < 0 : sgr_val x (- x) false true false false true false
false true false false true false (-1).
|
Variant
|
algebra
|
[
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat seq choice",
"From mathcomp Require Import ssrAC div fintype path bigop order finset fingroup",
"From mathcomp Require Import ssralg poly orderedzmod"
] |
algebra/num_theory/numdomain.v
|
sgr_val
| |
sgrPx :
sgr_val x `|x| (0 == x) (x <= 0) (0 <= x) (x == 0) (x < 0) (0 < x)
(0 == sg x) (-1 == sg x) (1 == sg x)
(sg x == 0) (sg x == -1) (sg x == 1) (sg x).
Proof.
by rewrite ![_ == sg _]eq_sym !sgr_cp0 /sg; case: ltrgt0P; constructor.
Qed.
|
Lemma
|
algebra
|
[
"From HB Require Import structures",
"From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat seq choice",
"From mathcomp Require Import ssrAC div fintype path bigop order finset fingroup",
"From mathcomp Require Import ssralg poly orderedzmod"
] |
algebra/num_theory/numdomain.v
|
sgrP
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.