Module mathcomp.reals.constructive_ereal
From HB Require Import structures.
From mathcomp Require Import boot order algebra finmap.
From mathcomp Require Import mathcomp_extra interval_inference.
Unset SsrOldRewriteGoalsOrder.
Set Implicit Arguments.
Unset Strict Implicit.
Unset Printing Implicit Defensive.
Reserved Notation "x %:E" (format "x %:E").
Reserved Notation "x %:dE" (format "x %:dE").
Reserved Notation "x +? y" (at level 50, format "x +? y").
Reserved Notation "x *? y" (at level 50, format "x *? y").
Reserved Notation "'\bar' x" (at level 2, format "'\bar' x").
Reserved Notation "'\bar' '^d' x" (at level 2, format "'\bar' '^d' x").
Reserved Notation "{ 'posnum' '\bar' R }" (at level 0,
format "{ 'posnum' '\bar' R }").
Reserved Notation "{ 'nonneg' '\bar' R }" (at level 0,
format "{ 'nonneg' '\bar' R }").
Declare Scope ereal_dual_scope.
Declare Scope ereal_scope.
Import Order.TTheory GRing.Theory Num.Theory.
Local Open Scope ring_scope.
Variant
Source code
Source code
Source code
Source code
Arguments EFin {R}.
Lemma
Source code
Proof.
Definition
Source code
Definition
Source code
Notation
Source code
Notation
Source code
Notation
Source code
Notation
Source code
Notation
Source code
Notation
Source code
Notation
Source code
Notation
Source code
Notation
Source code
Notation
Source code
Notation
Source code
Notation
Source code
Notation
Source code
Bind Scope ereal_dual_scope with dual_extended.
Bind Scope ereal_scope with extended.
Delimit Scope ereal_dual_scope with dE.
Delimit Scope ereal_scope with E.
Local Open Scope ereal_scope.
Definition
dual_extended : Type -> Type dual_extended is not universe polymorphic Arguments dual_extended R%_type_scope dual_extended is transparent Expands to: Constant mathcomp.reals.constructive_ereal.dual_extended Declared in library mathcomp.reals.constructive_ereal, line 151, characters 11-24
Source code
match x with
| r%:E => (f r)%:E
| +oo => +oo
| -oo => -oo
end.
Lemma
Source code
Proof.
Definition
dEFin : forall {R : Type}, R -> \bar^d R dEFin is not universe polymorphic Arguments dEFin {R}%_type_scope _ dEFin is transparent Expands to: Constant mathcomp.reals.constructive_ereal.dEFin Declared in library mathcomp.reals.constructive_ereal, line 153, characters 11-16
Source code
Section EqEReal.
Variable ( : eqType).
Definition
er_map : forall [T T' : Type], (T -> T') -> \bar T -> \bar T' er_map is not universe polymorphic Arguments er_map [T T']%_type_scope f%_function_scope x%_ereal_scope er_map is transparent Expands to: Constant mathcomp.reals.constructive_ereal.er_map Declared in library mathcomp.reals.constructive_ereal, line 180, characters 11-17
Source code
match x, y with
| x%:E, y%:E => x == y
| +oo, +oo => true
| -oo, -oo => true
| _, _ => false
end.
Lemma
Source code
.
Source code
Source code
Source code
Lemma
Source code
Proof.
End EqEReal.
Section ERealChoice.
Variable ( : choiceType).
Definition
fine : forall {R : GRing.Zmodule.Exports.zmodType}, \bar R -> R fine is not universe polymorphic Arguments fine {R} x%_ereal_scope fine is transparent Expands to: Constant mathcomp.reals.constructive_ereal.fine Declared in library mathcomp.reals.constructive_ereal, line 190, characters 11-15
Source code
match x with
| r%:E => GenTree.Node 0 [:: GenTree.Leaf r]
| +oo => GenTree.Node 1 [::]
| -oo => GenTree.Node 2 [::]
end.
Definition
eq_ereal : forall [R : eqType], \bar R -> \bar R -> bool eq_ereal is not universe polymorphic Arguments eq_ereal [R] (x y)%_ereal_scope eq_ereal is transparent Expands to: Constant mathcomp.reals.constructive_ereal.eq_ereal Declared in library mathcomp.reals.constructive_ereal, line 195, characters 11-19
Source code
match x with
| GenTree.Node 0 [:: GenTree.Leaf r] => Some r%:E
| GenTree.Node 1 [::] => Some +oo
| GenTree.Node 2 [::] => Some -oo
| _ => None
end.
Lemma
Source code
Proof.
.
Source code
Source code
Source code
End ERealChoice.
Section ERealCount.
Variable ( : countType).
.
Source code
Source code
Source code
End ERealCount.
Section ERealOrder.
Context { : numDomainType}.
Implicit Types x y : \bar R.
Definition
code : forall [R : choiceType], \bar R -> GenTree.tree R code is not universe polymorphic Arguments code [R] x%_ereal_scope code is transparent Expands to: Constant mathcomp.reals.constructive_ereal.code Declared in library mathcomp.reals.constructive_ereal, line 215, characters 11-15
Source code
match x1, x2 with
| -oo, r%:E | r%:E, +oo => r \is Num.real
| r1%:E, r2%:E => r1 <= r2
| -oo, _ | _, +oo => true
| +oo, _ | _, -oo => false
end.
Definition
decode : forall [R : choiceType], GenTree.tree R -> option \bar R decode is not universe polymorphic Arguments decode [R] x decode is transparent Expands to: Constant mathcomp.reals.constructive_ereal.decode Declared in library mathcomp.reals.constructive_ereal, line 222, characters 11-17
Source code
match x1, x2 with
| -oo, r%:E | r%:E, +oo => r \is Num.real
| r1%:E, r2%:E => r1 < r2
| -oo, -oo | +oo, +oo => false
| +oo, _ | _ , -oo => false
| -oo, _ => true
end.
Lemma
Source code
Lemma
Source code
Proof.
Lemma
Source code
Lemma
Source code
Proof.
by move=> /le_comparable cmp /(comparabler_trans cmp).
by move=> cmp /ge_comparable /comparabler_trans; apply.
Qed.
Fact
Source code
Proof.
.
Source code
Source code
Source code
lt_def_ereal le_refl_ereal le_anti_ereal le_trans_ereal.
Lemma
Source code
Proof.
Source code
Proof.
End ERealOrder.
Notation
Source code
Notation
Source code
(@Order.le ereal_display R) (at level 10, R at level 8, only parsing).
Notation
Source code
Notation
Source code
(@Order.lt ereal_display R) (at level 10, R at level 8, only parsing).
Notation
Source code
Notation
Source code
(@Order.ge ereal_display R) (at level 10, R at level 8, only parsing).
Notation
Source code
Notation
Source code
(@Order.gt ereal_display R) (at level 10, R at level 8, only parsing).
Notation
Source code
Notation
Source code
Notation
Source code
Notation
Source code
Notation
Source code
Notation
Source code
Notation
Source code
Notation
Source code
Notation
Source code
Notation
Source code
Notation
Source code
Notation
Source code
Notation
Source code
Notation
Source code
Notation
Source code
Notation
Source code
Notation
Source code
Notation
Source code
Notation
Source code
Notation
Source code
Notation
Source code
Notation
Source code
Notation
Source code
Notation
Source code
Notation
Source code
Notation
Source code
Notation
Source code
Notation
Source code
Notation
Source code
Notation
Source code
Section ERealZsemimodule.
Context { : nmodType}.
Implicit Types x y z : \bar R.
Definition
le_ereal : forall {R : numDomainType}, \bar R -> \bar R -> bool le_ereal is not universe polymorphic Arguments le_ereal {R} (x1 x2)%_ereal_scope le_ereal is transparent Expands to: Constant mathcomp.reals.constructive_ereal.le_ereal Declared in library mathcomp.reals.constructive_ereal, line 247, characters 11-19
Source code
match x, y with
| x%:E , y%:E => (x + y)%:E
| -oo, _ => -oo
| _ , -oo => -oo
| +oo, _ => +oo
| _ , +oo => +oo
end.
Arguments adde : simpl never.
Definition
lt_ereal : forall {R : numDomainType}, \bar R -> \bar R -> bool lt_ereal is not universe polymorphic Arguments lt_ereal {R} (x1 x2)%_ereal_scope lt_ereal is transparent Expands to: Constant mathcomp.reals.constructive_ereal.lt_ereal Declared in library mathcomp.reals.constructive_ereal, line 255, characters 11-19
Source code
match x, y with
| x%:E , y%:E => (x + y)%R%:E
| +oo, _ => +oo
| _ , +oo => +oo
| -oo, _ => -oo
| _ , -oo => -oo
end.
Arguments dual_adde : simpl never.
Lemma
Source code
Lemma
Source code
Lemma
Source code
.
Source code
Source code
Source code
addeA_subproof addeC_subproof add0e_subproof.
Lemma
Source code
Lemma
Source code
Lemma
Source code
.
Source code
Source code
Source code
.
Source code
Source code
Source code
daddeA_subproof daddeC_subproof dadd0e_subproof.
Definition
adde : forall {R : GRing.Nmodule.Exports.nmodType}, \bar R -> \bar R -> \bar R adde is not universe polymorphic Arguments adde {R} (x y)%_ereal_scope : simpl never The reduction tactics never unfold adde adde is transparent Expands to: Constant mathcomp.reals.constructive_ereal.adde Declared in library mathcomp.reals.constructive_ereal, line 342, characters 11-15
Source code
Definition
dual_adde : forall {R : GRing.Nmodule.Exports.nmodType}, \bar R -> \bar R -> \bar R dual_adde is not universe polymorphic Arguments dual_adde {R} (x y)%_ereal_scope : simpl never The reduction tactics never unfold dual_adde dual_adde is transparent Expands to: Constant mathcomp.reals.constructive_ereal.dual_adde Declared in library mathcomp.reals.constructive_ereal, line 352, characters 11-20
Source code
End ERealZsemimodule.
Arguments adde : simpl never.
Arguments dual_adde : simpl never.
Section ERealOrder_numDomainType.
Context { : numDomainType}.
Implicit Types (x y : \bar R) (r : R).
Lemma
Source code
Proof.
Lemma
Source code
Proof.
Lemma
Source code
Proof.
Lemma
Source code
Proof.
Lemma
Source code
Proof.
Lemma
Source code
Proof.
Lemma
Source code
Proof.
Lemma
Source code
Proof.
Lemma
Source code
Proof.
Lemma
Source code
Proof.
Lemma
Source code
Proof.
Lemma
Source code
Proof.
Lemma
Source code
Lemma
Source code
Proof.
- exact: real_comparable.
- by rewrite /lee/= => ->.
- by rewrite /lee/= => _ ->.
Qed.
Lemma
Source code
Proof.
Source code
Proof.
Lemma
Source code
Proof.
Lemma
Source code
Proof.
Lemma
Source code
Proof.
Lemma
Source code
Lemma
Source code
Proof.
Lemma
Source code
Proof.
Lemma
Source code
Proof.
Lemma
Source code
Lemma
Source code
Proof.
Lemma
Source code
Proof.
Lemma
Source code
Proof.
by case: x => [r r0 | _ |//]; [right; exists r|left].
Qed.
Lemma
Source code
Proof.
Source code
Proof.
End ERealOrder_numDomainType.
#[global] Hint Resolve lee01 lte01 : core.
Section ERealOrder_realDomainType.
Context { : realDomainType}.
Implicit Types (x y : \bar R) (r : R).
Lemma
Source code
Proof.
Lemma
Source code
Proof.
Lemma
Source code
Proof.
Lemma
Source code
Proof.
Lemma
Source code
Proof.
Lemma
Source code
Proof.
Definition
enatmul : forall {R : GRing.Nmodule.Exports.nmodType}, \bar R -> nat -> \bar R enatmul is not universe polymorphic Arguments enatmul {R} x%_ereal_scope n%_nat_scope enatmul is transparent Expands to: Constant mathcomp.reals.constructive_ereal.enatmul Declared in library mathcomp.reals.constructive_ereal, line 387, characters 11-18
Source code
Definition
ednatmul : forall {R : GRing.Nmodule.Exports.nmodType}, \bar^d R -> nat -> \bar^d R ednatmul is not universe polymorphic Arguments ednatmul {R} x%_ereal_dual_scope n%_nat_scope ednatmul is transparent Expands to: Constant mathcomp.reals.constructive_ereal.ednatmul Declared in library mathcomp.reals.constructive_ereal, line 389, characters 11-19
Source code
Lemma
Source code
{homo er_map f : / x <= y}.
Lemma
Source code
.
Source code
Source code
Source code
le_total_ereal.
.
Source code
Source code
Source code
.
Source code
Source code
Source code
End ERealOrder_realDomainType.
Section ERealZmodule.
Context { : zmodType}.
Implicit Types x y z : \bar R.
Definition
lteey : forall {R : realDomainType}, (forall x : \bar R, (x < +oo)%E = (x != +oo%E)) * (forall x : \bar R, (x <= +oo)%E) lteey is not universe polymorphic Arguments lteey {R} lteey is transparent Expands to: Constant mathcomp.reals.constructive_ereal.lteey Declared in library mathcomp.reals.constructive_ereal, line 508, characters 11-16
Source code
match x with
| r%:E => (- r)%:E
| -oo => +oo
| +oo => -oo
end.
End ERealZmodule.
Section ERealArith.
Context { : numDomainType}.
Implicit Types x y z : \bar R.
Definition
lteNye : forall {R : realDomainType}, (forall x : \bar R, (-oo < x)%E = (x != -oo%E)) * (forall x : \bar R, (-oo <= x)%E) lteNye is not universe polymorphic Arguments lteNye {R} lteNye is transparent Expands to: Constant mathcomp.reals.constructive_ereal.lteNye Declared in library mathcomp.reals.constructive_ereal, line 510, characters 11-17
Source code
match x, y with
| x%:E , y%:E => (x * y)%:E
| +oo, +oo | -oo, -oo => +oo
| +oo, -oo | -oo, +oo => -oo
| -oo, y | y, -oo => if y == 0 then 0 else if 0 < y then -oo else +oo
| +oo, y | y, +oo => if y == 0 then 0 else if 0 < y then +oo else -oo
end.
Arguments mule : simpl never.
Definition
oppe : forall {R : GRing.Zmodule.Exports.zmodType}, \bar R -> \bar R oppe is not universe polymorphic Arguments oppe {R} x%_ereal_scope oppe is transparent Expands to: Constant mathcomp.reals.constructive_ereal.oppe Declared in library mathcomp.reals.constructive_ereal, line 536, characters 11-15
Source code
Definition
mule : forall {R : numDomainType}, \bar R -> \bar R -> \bar R mule is not universe polymorphic Arguments mule {R} (x y)%_ereal_scope : simpl never The reduction tactics never unfold mule mule is transparent Expands to: Constant mathcomp.reals.constructive_ereal.mule Declared in library mathcomp.reals.constructive_ereal, line 549, characters 11-15
Source code
match x with
| x%:E => if x == 0%R then +oo else (x^-1)%:E
| +oo => 0
| -oo => -oo
end.
Arguments inve : simpl never.
Definition
abse : forall {R : numDomainType}, \bar R -> \bar R abse is not universe polymorphic Arguments abse {R} x%_ereal_scope abse is transparent Expands to: Constant mathcomp.reals.constructive_ereal.abse Declared in library mathcomp.reals.constructive_ereal, line 559, characters 11-15
Source code
End ERealArith.
Arguments mule : simpl never.
Arguments inve : simpl never.
Elpi Command canonical_notation_ereal.
Elpi Accumulate lp:{{ /**/ }}.
Elpi
Source code
Elpi Command canonical_notation_dual_ereal.
Elpi Accumulate lp:{{ /**/ }}.
Elpi
Source code
Local Notation
Source code
Local Notation
Source code
Local Notation
Source code
Local Notation
Source code
Local Notation
Source code
Local Notation
Source code
Notation
Source code
Notation
Source code
Notation
Source code
Notation
Source code
Notation
Source code
Notation
Source code
Notation
Source code
Notation
Source code
Notation
Source code
Notation
Source code
Notation
Source code
Notation
Source code
Notation
Source code
Notation
Source code
(only parsing) : ereal_dual_scope.
Notation
Source code
(only printing) : ereal_dual_scope.
Notation
Source code
(only printing) : ereal_dual_scope.
Notation
Source code
Notation
Source code
Notation
Source code
Notation
Source code
Notation
Source code
Notation
Source code
Notation
Source code
Notation
Source code
Notation
Source code
Notation
Source code
Notation
Source code
Notation
Source code
Notation
Source code
Notation
Source code
Arguments abse {R}.
Notation
Source code
Notation
Source code
Notation
Source code
Notation
Source code
Source code
Source code
Inductive
Source code
Source code
Inductive
Source code
Source code
Source code
Variant
Source code
Definition
inve : forall {R : numDomainType}, \bar R -> \bar R inve is not universe polymorphic Arguments inve {R} x%_ereal_scope : simpl never The reduction tactics never unfold inve inve is transparent Expands to: Constant mathcomp.reals.constructive_ereal.inve Declared in library mathcomp.reals.constructive_ereal, line 561, characters 11-15
Source code
match x with
| Number.IntDecimal (Decimal.Pos u) => IEFinP (INatmul IOne (Nat.of_uint u))
| Number.IntDecimal (Decimal.Neg u) =>
IEFinN (IEFinP (INatmul IOne (Nat.of_uint u)))
| Number.IntHexadecimal (Hexadecimal.Pos u) =>
IEFinP (INatmul IOne (Nat.of_hex_uint u))
| Number.IntHexadecimal (Hexadecimal.Neg u) =>
IEFinN (IEFinP (INatmul IOne (Nat.of_hex_uint u)))
end.
Definition
expe : forall {R : numDomainType}, \bar R -> nat -> \bar R expe is not universe polymorphic Arguments expe {R} x%_ereal_scope n%_nat_scope expe is transparent Expands to: Constant mathcomp.reals.constructive_ereal.expe Declared in library mathcomp.reals.constructive_ereal, line 569, characters 11-15
Source code
match x with
| IEFinP (INatmul IOne n) =>
Some (Number.IntDecimal (Decimal.Pos (Nat.to_uint n)))
| IEFinN (IEFinP (INatmul IOne n)) =>
Some (Number.IntDecimal (Decimal.Neg (Nat.to_uint n)))
| _ => None
end.
Arguments GRing.one {_}.
#[warnings="-via-type-remapping,-via-type-mismatch"]
Number Notation Idummy_placeholder parse print (via IEFin
mapping [[EFin] => IEFinP, [oppe] => IEFinN,
[GRing.natmul] => INatmul, [GRing.one] => IOne])
: ereal_scope.
#[warnings="-via-type-remapping,-via-type-mismatch"]
Number Notation Idummy_placeholder parse print (via IEFin
mapping [[EFin] => IEFinP, [oppe] => IEFinN,
[GRing.natmul] => INatmul, [GRing.one] => IOne])
: ereal_dual_scope.
Arguments GRing.one : clear implicits.
Notation
Source code
Notation
Source code
Notation
Source code
Notation
Source code
Notation
Source code
Notation
Source code
Notation
Source code
Notation
Source code
Notation
Source code
Notation
Source code
Notation
Source code
(only parsing) : ereal_dual_scope.
Notation
Source code
(only printing) : ereal_dual_scope.
Notation
Source code
(only printing) : ereal_dual_scope.
Notation
Source code
Notation
Source code
Notation
Source code
Notation
Source code
Notation
Source code
Notation
Source code
(\big[+%dE/0%dE]_( <- r | P%B) F%dE) : ereal_dual_scope.
Notation
Source code
(\big[+%E/0%E]_( <- r | P%B) F%E) : ereal_scope.
Notation
Source code
(\big[+%dE/0%dE]_( <- r) F%dE) : ereal_dual_scope.
Notation
Source code
(\big[+%E/0%E]_( <- r) F%E) : ereal_scope.
Notation
Source code
(\big[+%dE/0%dE]_(m <= < n | P%B) F%dE) : ereal_dual_scope.
Notation
Source code
(\big[+%E/0%E]_(m <= < n | P%B) F%E) : ereal_scope.
Notation
Source code
(\big[+%dE/0%dE]_(m <= < n) F%dE) : ereal_dual_scope.
Notation
Source code
(\big[+%E/0%E]_(m <= < n) F%E) : ereal_scope.
Notation
Source code
(\big[+%dE/0%dE]_( | P%B) F%dE) : ereal_dual_scope.
Notation
Source code
(\big[+%E/0%E]_( | P%B) F%E) : ereal_scope.
Notation
Source code
(\big[+%dE/0%dE]_ F%dE) : ereal_dual_scope.
Notation
Source code
(\big[+%E/0%E]_ F%E) : ereal_scope.
Notation
Source code
(\big[+%dE/0%dE]_( : t | P%B) F%dE) (only parsing) : ereal_dual_scope.
Notation
Source code
(\big[+%E/0%E]_( : t | P%B) F%E) (only parsing) : ereal_scope.
Notation
Source code
(\big[+%dE/0%dE]_( : t) F%dE) (only parsing) : ereal_dual_scope.
Notation
Source code
(\big[+%E/0%E]_( : t) F%E) (only parsing) : ereal_scope.
Notation
Source code
(\big[+%dE/0%dE]_( < n | P%B) F%dE) : ereal_dual_scope.
Notation
Source code
(\big[+%E/0%E]_( < n | P%B) F%E) : ereal_scope.
Notation
Source code
(\big[+%dE/0%dE]_( < n) F%dE) : ereal_dual_scope.
Notation
Source code
(\big[+%E/0%E]_( < n) F%E) : ereal_scope.
Notation
Source code
(\big[+%dE/0%dE]_( in A | P%B) F%dE) : ereal_dual_scope.
Notation
Source code
(\big[+%E/0%E]_( in A | P%B) F%E) : ereal_scope.
Notation
Source code
(\big[+%dE/0%dE]_( in A) F%dE) : ereal_dual_scope.
Notation
Source code
(\big[+%E/0%E]_( in A) F%E) : ereal_scope.
Notation
Source code
(\big[*%E/1%:E]_( <- r | P%B) F%E) : ereal_scope.
Notation
Source code
(\big[*%E/1%:E]_( <- r) F%E) : ereal_scope.
Notation
Source code
(\big[*%E/1%:E]_(m <= < n | P%B) F%E) : ereal_scope.
Notation
Source code
(\big[*%E/1%:E]_(m <= < n) F%E) : ereal_scope.
Notation
Source code
(\big[*%E/1%:E]_( | P%B) F%E) : ereal_scope.
Notation
Source code
(\big[*%E/1%:E]_ F%E) : ereal_scope.
Notation
Source code
(\big[*%E/1%:E]_( : t | P%B) F%E) (only parsing) : ereal_scope.
Notation
Source code
(\big[*%E/1%:E]_( : t) F%E) (only parsing) : ereal_scope.
Notation
Source code
(\big[*%E/1%:E]_( < n | P%B) F%E) : ereal_scope.
Notation
Source code
(\big[*%E/1%:E]_( < n) F%E) : ereal_scope.
Notation
Source code
(\big[*%E/1%:E]_( in A | P%B) F%E) : ereal_scope.
Notation
Source code
(\big[*%E/1%:E]_( in A) F%E) : ereal_scope.
Section ERealOrderTheory.
Context { : numDomainType}.
Implicit Types x y z : \bar R.
Local Tactic Notation "elift" constr(lm) ":" ident(x) :=
by case: x => [||?]; first by rewrite ?eqe; apply: lm.
Local Tactic Notation "elift" constr(lm) ":" ident(x) ident(y) :=
by case: x y => [?||] [?||]; first by rewrite ?eqe; apply: lm.
Local Tactic Notation "elift" constr(lm) ":" ident(x) ident(y) ident(z) :=
by case: x y z => [?||] [?||] [?||]; first by rewrite ?eqe; apply: lm.
Lemma
Source code
Lemma
Source code
Lemma
Source code
Lemma
Source code
Lemma
Source code
Lemma
Source code
Lemma
Source code
Lemma
Source code
Lemma
Source code
Proof.
Lemma
Source code
Lemma
Source code
Lemma
Source code
Proof.
Lemma
Source code
Proof.
Lemma
Source code
Proof.
Lemma
Source code
Proof.
Lemma
Source code
Proof.
Lemma
Source code
Proof.
Lemma
Source code
Proof.
Lemma
Source code
Proof.
Lemma
Source code
Proof.
Lemma
Source code
Proof.
Lemma
Source code
Proof.
End ERealOrderTheory.
#[global] Hint Resolve leeN10 lteN10 : core.
Section finNumPred.
Context { : numDomainType}.
Implicit Type (x : \bar R).
Definition
parse : Number.signed_int -> Inatmul parse is not universe polymorphic Arguments parse x parse is transparent Expands to: Constant mathcomp.algebra.algebraic_hierarchy.rings_modules_and_algebras.parse Declared in library mathcomp.algebra.algebraic_hierarchy.rings_modules_and_algebras, line 4029, characters 11-16 print : Inatmul -> option Number.signed_int print is not universe polymorphic Arguments print x print is transparent Expands to: Constant mathcomp.algebra.algebraic_hierarchy.rings_modules_and_algebras.print Declared in library mathcomp.algebra.algebraic_hierarchy.rings_modules_and_algebras, line 4039, characters 11-16
Source code
Fact
Source code
Proof.
Lemma
Source code
Proof.
Lemma
Source code
Proof.
Lemma
Source code
Lemma
Source code
Lemma
Source code
Lemma
Source code
Lemma
Source code
Proof.
End finNumPred.
Section ERealArithTh_numDomainType.
Context { : numDomainType}.
Implicit Types (x y z : \bar R) (r : R).
Lemma
Source code
Proof.
Lemma
Source code
Proof.
Lemma
Source code
Proof.
Lemma
Source code
Proof.
Lemma
Source code
Proof.
Lemma
Source code
Proof.
Lemma
Source code
Proof.
Lemma
Source code
Proof.
Lemma
Source code
Proof.
Let
Source code
Proof.
.
Source code
Source code
Source code
EFin_semi_additive.
Lemma
Source code
Proof.
Lemma
Source code
Proof.
Lemma
Source code
Proof.
Lemma
Source code
\prod_( <- s | P i) (f i)%:E = (\prod_( <- s | P i) f i)%:E.
Lemma
Source code
\sum_( <- s | P i) (F i)%:E = (\sum_( <- s | P i) F i)%:E.
Lemma
Source code
Lemma
Source code
Definition
fin_num : forall {R : numDomainType}, qualifier 1 \bar R fin_num is not universe polymorphic Arguments fin_num {R} fin_num is transparent Expands to: Constant mathcomp.reals.constructive_ereal.fin_num Declared in library mathcomp.reals.constructive_ereal, line 879, characters 11-18
Source code
~~ ((x == +oo) && (y == -oo)) && ~~ ((x == -oo) && (y == +oo)).
Local Notation
Source code
Lemma
Source code
Lemma
Source code
Proof.
Lemma
Source code
Proof.
Lemma
Source code
Proof.
Lemma
Source code
Proof.
Lemma
Source code
Proof.
Lemma
Source code
Proof.
Lemma
Source code
Proof.
Lemma
Source code
Proof.
Lemma
Source code
Proof.
Lemma
Source code
Proof.
Lemma
Source code
Proof.
Lemma
Source code
{in P, forall : I, f h +? f i} ->
f h +? \sum_( <- t | P j) f j.
Proof.
by move=> i x Pi fhx; rewrite adde_defDr// fhi.
Qed.
Lemma
Source code
Lemma
Source code
Lemma
Source code
Lemma
Source code
Lemma
Source code
Proof.
Lemma
Source code
Proof.
Lemma
Source code
Proof.
Lemma
Source code
Proof.
Lemma
Source code
Proof.
Lemma
Source code
Lemma
Source code
Lemma
Source code
Lemma
Source code
Proof.
Lemma
Source code
Proof.
Lemma
Source code
Lemma
Source code
Lemma
Source code
Lemma
Source code
Proof.
Source code
Proof.
Lemma
Source code
Lemma
Source code
Lemma
Source code
Lemma
Source code
.
Source code
Source code
Source code
Lemma
Source code
Proof.
Lemma
Source code
Definition
adde_def : forall {R : numDomainType}, \bar R -> \bar R -> bool adde_def is not universe polymorphic Arguments adde_def {R} (x y)%_ereal_scope adde_def is transparent Expands to: Constant mathcomp.reals.constructive_ereal.adde_def Declared in library mathcomp.reals.constructive_ereal, line 961, characters 11-19
Source code
match x, y with
| _%:E, _%:E | +oo, +oo | -oo, -oo | +oo, -oo | -oo, +oo => true
| r%:E, _ | _, r%:E => (r != 0%R)
end.
Arguments mule_def : simpl never.
Local Notation
Source code
Definition
mule_def : forall {R : numDomainType}, \bar R -> \bar R -> bool mule_def is not universe polymorphic Arguments mule_def {R} (x y)%_ereal_scope mule_def is transparent Expands to: Constant mathcomp.reals.constructive_ereal.mule_def Declared in library mathcomp.reals.constructive_ereal, line 1090, characters 11-19
Source code
~~ (((x == 0) && (`| y | == +oo)) || ((y == 0) && (`| x | == +oo))).
Proof.
Lemma
Source code
Lemma
Source code
Proof.
Lemma
Source code
Proof.
Lemma
Source code
Proof.
Lemma
Source code
Proof.
Lemma
Source code
Proof.
Lemma
Source code
Proof.
Lemma
Source code
Lemma
Source code
Lemma
Source code
Lemma
Source code
Proof.
Lemma
Source code
Proof.
Lemma
Source code
Lemma
Source code
Lemma
Source code
Lemma
Source code
Proof.
Lemma
Source code
Lemma
Source code
Proof.
Lemma
Source code
(x + y \is a fin_num) = (x \is a fin_num) && (y \is a fin_num).
Proof.
Lemma
Source code
\sum_( <- s | P i) f i \is a fin_num =
all [pred | x \is a fin_num] [seq f i | <- s & P i].
Proof.
Lemma
Source code
reflect (forall , i \in s -> P i -> f i \is a fin_num)
(\sum_( <- s | P i) f i \is a fin_num).
Proof.
by move=> + x xs Px; apply; rewrite map_f// mem_filter Px.
by move=> + _ /mapP[x /[!mem_filter]/andP[Px xs] ->]; apply.
Qed.
Lemma
Source code
(x - y \is a fin_num) = (x \is a fin_num) && (y \is a fin_num).
Proof.
Lemma
Source code
x * y \is a fin_num.
Proof.
Lemma
Source code
(forall , P i -> f i \is a fin_num) ->
\prod_( <- s | P i) f i \is a fin_num.
Lemma
Source code
Lemma
Source code
Proof.
Lemma
Source code
Proof.
Lemma
Source code
Proof.
Lemma
Source code
Proof.
Lemma
Source code
(forall , P i -> f i \is a fin_num) ->
(\sum_( <- s | P i) fine (f i))%:E = \sum_( <- s | P i) f i.
Lemma
Source code
(forall , P i -> F i \is a fin_num) ->
(\sum_( <- s | P i) fine (F i) = fine (\sum_( <- s | P i) F i))%R.
Proof.
Lemma
Source code
{in P &, forall , f i +? f j} ->
\sum_( <- s | P i) - f i = - \sum_( <- s | P i) f i.
Proof.
Lemma
Source code
(forall , P i -> f i \is a fin_num) ->
\sum_( <- s | P i) - f i = - \sum_( <- s | P i) f i.
Proof.
Lemma
Source code
(forall , (n <= i <= m)%N -> f i \is a fin_num) -> (n <= m)%N ->
\sum_(n <= < m) (f k.+1 - f k) = f m - f n.
Proof.
Lemma
Source code
Lemma
Source code
Lemma
Source code
Lemma
Source code
(x - z == y) = (x == y + z).
Lemma
Source code
Proof.
Lemma
Source code
Proof.
Lemma
Source code
Proof.
Lemma
Source code
Proof.
Lemma
Source code
Proof.
Lemma
Source code
(x + y != +oo) = (x != +oo) && (y != +oo).
Proof.
Lemma
Source code
(x + y != -oo) = (x != -oo) && (y != -oo).
Proof.
Lemma
Source code
x + y == 0 = (x == 0) && (y == 0).
Lemma
Source code
\sum_( <- s | P i) f i = -oo <-> exists , [/\ i \in s, P i & f i = -oo].
Proof.
rewrite big_seq_cond; elim/big_ind: _ => // [[?| |] [?| |]//|].
by move=> i /andP[si Pi] fioo; exists i; rewrite si Pi fioo.
rewrite big_mkcond (bigID (xpred1 i))/= (eq_bigr (fun _ => -oo)).
by move=> j /eqP ->; rewrite Pi.
rewrite big_const_seq/= [X in X + _](_ : _ = -oo)//.
elim: s i Pi fi si => // h t ih i Pi fi.
rewrite inE => /predU1P[<-/=|it]; first by rewrite eqxx.
by rewrite /= iterD ih//=; case: (_ == _).
Qed.
Lemma
Source code
(\sum_( | P i) f i == -oo) = [exists in P, f i == -oo].
Proof.
Lemma
Source code
(forall , P i -> f i != -oo) ->
\sum_( <- s | P i) f i = +oo <-> exists , [/\ i \in s, P i & f i = +oo].
Proof.
rewrite big_seq_cond; elim/big_ind: _ => // [[?| |] [?| |]//|].
by move=> i /andP[si Pi] fioo; exists i; rewrite si Pi fioo.
elim: s i Pi fi si => // h t ih i Pi fi.
rewrite inE => /predU1P[<-/=|it].
rewrite big_cons Pi fi addye//.
by apply/eqP => /esum_eqNyP[j [jt /finoo/negbTE/eqP]].
by rewrite big_cons; case: ifPn => Ph; rewrite (ih i)// addey// finoo.
Qed.
Lemma
Source code
(forall , P i -> f i != -oo) ->
(\sum_( | P i) f i == +oo) = [exists in P, f i == +oo].
Proof.
Lemma
Source code
Lemma
Source code
Lemma
Source code
Proof.
Lemma
Source code
Proof.
Lemma
Source code
Proof.
Lemma
Source code
Proof.
Lemma
Source code
Proof.
Lemma
Source code
(forall , P t -> 0 <= f t) -> forall , 0 <= \sum_( <- l | P i) f i.
Lemma
Source code
(forall , P t -> f t <= 0) -> forall , \sum_( <- l | P i) f i <= 0.
Lemma
Source code
Proof.
Lemma
Source code
Proof.
Lemma
Source code
Proof.
Lemma
Source code
Proof.
Lemma
Source code
Proof.
Lemma
Source code
Proof.
Lemma
Source code
Proof.
Lemma
Source code
Proof.
Definition
mule_defE : forall {R : numDomainType} (x y : \bar R), (x *? y)%E = ~~ ((x == 0%R) && (`|y|%E == +oo%E) || (y == 0%R) && (`|x|%E == +oo%E)) mule_defE is not universe polymorphic Arguments mule_defE {R} (x y)%_ereal_scope mule_defE is opaque Expands to: Constant mathcomp.reals.constructive_ereal.mule_defE Declared in library mathcomp.reals.constructive_ereal, line 1098, characters 11-20
Source code
Lemma
Source code
Proof.
Lemma
Source code
Lemma
Source code
Proof.
Lemma
Source code
Proof.
Lemma
Source code
Proof.
- exact: mulr_ge0.
- rewrite le_eqVlt => /predU1P[<- _|x0 _]; first by rewrite eqxx.
by rewrite gt_eqF // x0 le0y.
- move=> _; rewrite le_eqVlt => /predU1P[<-|y0]; first by rewrite eqxx.
by rewrite gt_eqF // y0 le0y.
Qed.
Lemma
Source code
(forall , P i -> 0 <= f i) -> 0 <= \prod_( <- s | P i) f i.
Lemma
Source code
Lemma
Source code
Proof.
Lemma
Source code
Proof.
Lemma
Source code
Proof.
Lemma
Source code
Lemma
Source code
Lemma
Source code
Proof.
Lemma
Source code
Lemma
Source code
Proof.
Lemma
Source code
Proof.
Lemma
Source code
x * - y = - (x * y).
Proof.
- by rewrite mulrN.
- by case: ifP; rewrite ?oppe0//; case: ifP.
- by case: ifP; rewrite ?oppe0//; case: ifP.
- rewrite EFinN oppe_eq0; case: ifP; rewrite ?oppe0// oppe_gt0 !lte_fin.
by case: (real_ltgtP xr yr) => // <-; rewrite eqxx.
- rewrite EFinN oppe_eq0; case: ifP; rewrite ?oppe0// oppe_gt0 !lte_fin.
by case: (real_ltgtP xr yr) => // <-; rewrite eqxx.
Qed.
Lemma
Source code
- x * y = - (x * y).
Proof.
Lemma
Source code
- x * - y = x * y.
Proof.
Lemma
Source code
(x + y) ^+ 2 = x ^+ 2 + x * y *+ 2 + y ^+ 2.
Proof.
Lemma
Source code
Lemma
Source code
Lemma
Source code
Lemma
Source code
Lemma
Source code
Lemma
Source code
Lemma
Source code
Lemma
Source code
End ERealArithTh_numDomainType.
Notation
Source code
Notation
Source code
Notation
Source code
Notation
Source code
Notation
Source code
Notation
Source code
(at level 10, R at level 8, only parsing) : function_scope.
Notation
Source code
Notation
Source code
(at level 10, R at level 8, only parsing) : function_scope.
Module
Source code
Section DualERealArithTh_numDomainType.
Local Open Scope ereal_dual_scope.
Context { : numDomainType}.
Implicit Types x y z : \bar^d R.
Lemma
Source code
Lemma
Source code
(\sum_( <- r | P i) F i)%dE = - (\sum_( <- r | P i) (- F i)%E)%E.
Proof.
Lemma
Source code
Proof.
Lemma
Source code
Proof.
Lemma
Source code
Proof.
Let
Source code
Proof.
Source code
.
Source code
Source code
Source code
dEFin_semi_additive.
Lemma
Source code
Proof.
Lemma
Source code
\sum_( <- r | P i) (F i)%:E = (\sum_( <- r | P i) F i)%R%:E.
Proof.
Lemma
Source code
Proof.
Lemma
Source code
Proof.
Lemma
Source code
Proof.
Lemma
Source code
Proof.
Lemma
Source code
Lemma
Source code
Lemma
Source code
Lemma
Source code
Proof.
Lemma
Source code
Proof.
Lemma
Source code
Proof.
Lemma
Source code
Lemma
Source code
Lemma
Source code
Lemma
Source code
Proof.
Lemma
Source code
(x + y \is a fin_num) = (x \is a fin_num) && (y \is a fin_num).
Proof.
Lemma
Source code
{in (@fin_num R) &, {morph fine : / x + y >-> (x + y)%R}}.
Proof.
Lemma
Source code
Proof.
Lemma
Source code
Proof.
Lemma
Source code
Proof.
Lemma
Source code
Proof.
Lemma
Source code
(x - z == y) = (x == y + z).
Lemma
Source code
Proof.
Lemma
Source code
Proof.
Lemma
Source code
Proof.
Lemma
Source code
Proof.
Lemma
Source code
Proof.
Lemma
Source code
(x + y != +oo) = (x != +oo) && (y != +oo).
Proof.
Lemma
Source code
(x + y != -oo) = (x != -oo) && (y != -oo).
Proof.
Lemma
Source code
Proof.
Lemma
Source code
Proof.
Lemma
Source code
x + y == 0 = (x == 0) && (y == 0).
Proof.
Lemma
Source code
\sum_( <- s | P i) f i = +oo <-> exists , [/\ i \in s, P i & f i = +oo].
Proof.
by split=> -[i + /ltac:(exists i)] => [|] []; [|split]; rewrite // eqe_oppLRP.
Qed.
Lemma
Source code
(\sum_( | P i) f i == +oo) = [exists in P, f i == +oo].
Proof.
Lemma
Source code
( : eqType) ( : seq T) ( : pred T) ( : T -> \bar^d R) :
(forall , P i -> f i != +oo) ->
\sum_( <- s | P i) f i = -oo <-> exists , [/\ i \in s, P i & f i = -oo].
Proof.
rewrite dual_sumeE eqe_oppLRP /= esum_eqyP => [i Pi|].
by rewrite eqe_oppLR fioo.
by split=> -[i + /ltac:(exists i)] => [|] []; [|split]; rewrite // eqe_oppLRP.
Qed.
Lemma
Source code
(forall , f i != +oo) ->
(\sum_( | P i) f i == -oo) = [exists in P, f i == -oo].
Proof.
rewrite dual_sumeE eqe_oppLR /= esum_eqy => [i|]; rewrite ?eqe_oppLR //.
by under eq_existsb => i do rewrite eqe_oppLR.
Qed.
Lemma
Source code
Proof.
Lemma
Source code
Proof.
Lemma
Source code
(forall , P n -> 0 <= f n) -> forall , 0 <= \sum_( <- l | P i) f i.
Proof.
Lemma
Source code
(forall , P n -> f n <= 0) -> forall , \sum_( <- l | P i) f i <= 0.
Proof.
Lemma
Source code
Lemma
Source code
Proof.
Lemma
Source code
Proof.
Lemma
Source code
Proof.
Lemma
Source code
Proof.
- by rewrite -EFin_natmul -EFin_dnatmul.
- by rewrite enatmul_pinfty ednatmul_pinfty.
- by rewrite enatmul_ninfty ednatmul_ninfty.
Qed.
Lemma
Source code
Proof.
Lemma
Source code
(x + y) ^+ 2 = x ^+ 2 + x * y *+ 2 + y ^+ 2.
Proof.
End DualERealArithTh_numDomainType.
End DualAddTheoryNumDomain.
Section ERealArithTh_realDomainType.
Context { : realDomainType}.
Implicit Types (x y z u a b : \bar R) (r : R).
Lemma
Source code
Lemma
Source code
Proof.
Lemma
Source code
Proof.
Lemma
Source code
Proof.
Lemma
Source code
Proof.
Lemma
Source code
Proof.
Lemma
Source code
Lemma
Source code
Proof.
Lemma
Source code
Proof.
by move=> /andP[/(le_lt_trans (leNye _))->/=] /lt_le_trans -> //; exact: leey.
Qed.
Lemma
Source code
Proof.
apply/eqP; rewrite eq_le leey /= leNgt; apply/negP.
case: x Ax => [x Ax _|//|/(_ _ ltr01)//].
suff: ~ x%:E < (Order.max 0 x + 1)%:E.
by apply; rewrite lte_fin ltr_pwDr// le_max lexx orbT.
by apply/negP; rewrite -leNgt; apply/Ax/ltr_pwDr; rewrite // le_max lexx.
Qed.
Lemma
Source code
( : pred I) ( : I -> \bar R) : (forall , P i -> 0 <= F i)%E ->
(\sum_( <- r | P i) F i == 0)%E = all (fun => P i ==> (F i == 0%E)) r.
Proof.
rewrite big_seq_cond big1// => i /andP[ir Pi].
by have := PF0 _ ir; rewrite Pi implyTb => /eqP.
move=> i ir; apply/implyP => Pi; apply/eqP.
have rPF : {in r, forall , P i ==> (F i \is a fin_num)}.
move=> j jr; apply/implyP => Pj; rewrite fin_numElt; apply/andP; split.
by rewrite (lt_le_trans _ (F0 _ Pj))// ltNyr.
rewrite ltNge; apply/eqP; rewrite leye_eq; apply/eqP/negP => /eqP Fjoo.
have PFninfty k : P k -> F k != -oo%E.
by move=> Pk; rewrite gt_eqF// (lt_le_trans _ (F0 _ Pk))// ltNyr.
have /esum_eqyP : exists , [/\ i \in r, P i & F i = +oo%E] by exists j.
by move=> /(_ PFninfty); rewrite PF0.
have ? : (\sum_( <- r | P i) (fine \o F) i == 0)%R.
apply/eqP/EFin_inj; rewrite big_seq_cond -sumEFin.
rewrite (eq_bigr (fun => F i0)).
move=> j /andP[jr Pj] /=; rewrite fineK//.
by have := rPF _ jr; rewrite Pj implyTb.
by rewrite -big_seq_cond PF0.
have /allP/(_ _ ir) : all (fun => P i ==> ((fine \o F) i == 0))%R r.
by rewrite -psumr_eq0// => j Pj/=; apply/fine_ge0/F0.
rewrite Pi implyTb => /= => /eqP Fi0.
rewrite -(@fineK _ (F i))//; first by have := rPF _ ir; rewrite Pi implyTb.
by rewrite Fi0.
Qed.
Lemma
Source code
Lemma
Source code
Proof.
Lemma
Source code
(forall , P i -> f i < +oo) -> \sum_( <- s | P i) f i < +oo.
Proof.
by apply: lte_add_pinfty; [exact: xoo| exact: yoo].
Qed.
Lemma
Source code
Lemma
Source code
Lemma
Source code
Lemma
Source code
Lemma
Source code
(0 <= y - x) = (x <= y).
Lemma
Source code
Lemma
Source code
Lemma
Source code
Lemma
Source code
Lemma
Source code
Proof.
Lemma
Source code
Lemma
Source code
Lemma
Source code
Proof.
Lemma
Source code
Lemma
Source code
Proof.
Lemma
Source code
Definition
real_mulr_infty : forall {R : numDomainType}, (forall r : R, r \is Num.real -> (r%:E * +oo)%E = ((Num.sg r)%:E * +oo)%E) * (forall r : R, r \is Num.real -> (+oo * r%:E)%E = ((Num.sg r)%:E * +oo)%E) * (forall r : R, r \is Num.real -> (r%:E * -oo)%E = ((Num.sg r)%:E * -oo)%E) * (forall r : R, r \is Num.real -> (-oo * r%:E)%E = ((Num.sg r)%:E * -oo)%E) real_mulr_infty is not universe polymorphic Arguments real_mulr_infty {R} real_mulr_infty is transparent Expands to: Constant mathcomp.reals.constructive_ereal.real_mulr_infty Declared in library mathcomp.reals.constructive_ereal, line 1396, characters 11-26
Source code
Lemma
Source code
Proof.
Lemma
Source code
Proof.
- by move=> x0 y0; rewrite !lte_fin; exact: mulr_ge0_gt0.
- rewrite le_eqVlt => /predU1P[<-|x0] _; first by rewrite mul0e ltxx.
by rewrite ltry andbT mulr_infty gtr0_sg// mul1e lte_fin x0 ltry.
- move=> _; rewrite le_eqVlt => /predU1P[<-|x0].
by rewrite mule0 ltxx andbC.
by rewrite ltry/= mulr_infty gtr0_sg// mul1e lte_fin x0 ltry.
- by move=> _ _; rewrite mulyy ltry.
Qed.
Lemma
Source code
Proof.
Lemma
Source code
Proof.
Lemma
Source code
Proof.
Lemma
Source code
Proof.
Lemma
Source code
Lemma
Source code
Lemma
Source code
Proof.
Lemma
Source code
Proof.
Lemma
Source code
[|| (x > 0) && (y == +oo), (x < 0) && (y == -oo),
(x == +oo) && (y > 0) | (x == -oo) && (y < 0)].
Proof.
- by rewrite mulr_infty; have [/ltr0_sg|/gtr0_sg|] := ltgtP x 0%R;
move=> ->; rewrite ?(mulN1e,mul1e,sgr0,mul0e).
- by rewrite mulr_infty; have [/ltr0_sg|/gtr0_sg|] := ltgtP x 0%R;
move=> ->; rewrite ?(mulN1e,mul1e,sgr0,mul0e).
- by rewrite mulr_infty; have [/ltr0_sg|/gtr0_sg|] := ltgtP y 0%R;
move=> ->; rewrite ?(mulN1e,mul1e,sgr0,mul0e).
- by rewrite ltry.
- by rewrite mulr_infty; have [/ltr0_sg|/gtr0_sg|] := ltgtP y 0%R;
move=> ->; rewrite ?(mulN1e,mul1e,sgr0,mul0e).
- by rewrite ltNyr.
Qed.
Lemma
Source code
[|| (x > 0) && (y == -oo), (x < 0) && (y == +oo),
(x == -oo) && (y > 0) | (x == +oo) && (y < 0)].
Proof.
Lemma
Source code
Proof.
Lemma
Source code
Proof.
Lemma
Source code
Lemma
Source code
Proof.
Lemma
Source code
Lemma
Source code
Lemma
Source code
Lemma
Source code
Proof.
Lemma
Source code
Lemma
Source code
Lemma
Source code
Lemma
Source code
Proof.
Lemma
Source code
Lemma
Source code
Proof.
Lemma
Source code
Proof.
Lemma
Source code
Lemma
Source code
Lemma
Source code
Proof.
Lemma
Source code
Proof.
Lemma
Source code
Lemma
Source code
Proof.
Lemma
Source code
x < z -> u <= y -> x - y < z - u.
Proof.
Lemma
Source code
Proof.
- by rewrite !lte_fin ltr_pM2r.
- by rewrite mulr_infty gtr0_sg// mul1e 2!ltry.
- by rewrite mulr_infty gtr0_sg// mul1e ltNge leNye ltNge leNye.
- by rewrite mulr_infty gtr0_sg// mul1e ltNge leey ltNge leey.
- by rewrite mulr_infty gtr0_sg// mul1e mulr_infty gtr0_sg// mul1e.
- by rewrite mulr_infty gtr0_sg// mul1e 2!ltNyr.
- by rewrite mulr_infty gtr0_sg// mul1e mulr_infty gtr0_sg// mul1e.
Qed.
Lemma
Source code
Proof.
Lemma
Source code
Proof.
Lemma
Source code
Proof.
Lemma
Source code
Proof.
Lemma
Source code
Lemma
Source code
Proof.
Lemma
Source code
Lemma
Source code
(forall , P i -> f i <= g i) ->
\sum_( <- s | P i) f i <= \sum_( <- s | P i) g i.
Lemma
Source code
{subset Q <= P} -> {in [predD P & Q], forall , 0 <= f i} ->
\sum_( <- s | Q i) f i <= \sum_( <- s | P i) f i.
Proof.
by move/implyP: (QP i); move: (PQf i); rewrite !inE -!topredE/=; do !case: ifP.
Qed.
Lemma
Source code
{subset Q <= P} -> {in [predD P & Q], forall , f i <= 0} ->
\sum_( <- s | P i) f i <= \sum_( <- s | Q i) f i.
Proof.
by move/implyP: (QP i); move: (PQf i); rewrite !inE -!topredE/=; do !case: ifP.
Qed.
Lemma
Source code
( : I -> \bar R) : (forall , P i -> ~~ Q i -> 0 <= f i) ->
\sum_( <- s | P i && Q i) f i <= \sum_( <- s | P i) f i.
Proof.
Lemma
Source code
( : I -> \bar R) : (forall , P i -> ~~ Q i -> f i <= 0) ->
\sum_( <- s | P i) f i <= \sum_( <- s | P i && Q i) f i.
Proof.
Lemma
Source code
(forall , P n -> 0 <= f n) ->
{homo (fun => \sum_( < n | P i) (f i)) : / (i <= j)%N >-> i <= j}.
Proof.
by rewrite lee_sum // => k ?; case: ifP => // _; exact: f0.
Qed.
Lemma
Source code
(forall , P n -> f n <= 0) ->
{homo (fun => \sum_( < n | P i) (f i)) : / (i <= j)%N >-> j <= i}.
Proof.
by rewrite lee_sum // => i ?; case: ifP => // _; exact: f0.
Qed.
Lemma
Source code
(forall , (m <= n)%N -> P n -> 0 <= f n) ->
{homo (fun => \sum_(m <= < n | P i) (f i)) : / (i <= j)%N >-> i <= j}.
Proof.
Lemma
Source code
(forall , (m <= n)%N -> P n -> f n <= 0) ->
{homo (fun => \sum_(m <= < n | P i) (f i)) : / (i <= j)%N >-> j <= i}.
Proof.
Lemma
Source code
(forall , (m < n)%N -> P m -> 0 <= f m) ->
{homo (fun => \sum_(m <= < n | P i) (f i)) : / (i <= j)%N >-> j <= i}.
Proof.
rewrite lee_sum_nneg_subset// => [k | k /and3P[_ /f0->//]].
by rewrite ?inE -!topredE/= => /andP[-> /(leq_trans le_ij)->].
Qed.
Lemma
Source code
(forall , (m < n)%N -> P m -> f m <= 0) ->
{homo (fun => \sum_(m <= < n | P i) (f i)) : / (i <= j)%N >-> i <= j}.
Proof.
rewrite lee_sum_npos_subset// => [k | k /and3P[_ /f0->//]].
by rewrite ?inE -!topredE/= => /andP[-> /(leq_trans le_ij)->].
Qed.
Lemma
Source code
( : T -> \bar R) : {subset A <= B} ->
{in [predD B & A], forall , P t -> 0 <= f t} ->
\sum_( <- A | P t) f t <= \sum_( <- B | P t) f t.
Proof.
rewrite -[leLHS]adde0 leeD //.
rewrite -big_mkcond /= {1}(_ : A = [fset in B | x \in A]%fset) //.
by apply/fsetP=> t; rewrite !inE /= andbC; case: (boolP (_ \in _)) => // /AB.
rewrite big_fset /= big_seq_cond sume_ge0 // => t /andP[tB tA].
by case: ifPn => // Pt; rewrite f0 // !inE tA.
Qed.
Lemma
Source code
( : T -> \bar R) : {subset A <= B} ->
{in [predD B & A], forall , P t -> f t <= 0} ->
\sum_( <- B | P t) f t <= \sum_( <- A | P t) f t.
Proof.
rewrite -[leRHS]adde0 leeD //.
rewrite -big_mkcond /= {3}(_ : A = [fset in B | x \in A]%fset) //.
by apply/fsetP=> t; rewrite !inE /= andbC; case: (boolP (_ \in _)) => // /AB.
rewrite big_fset /= big_seq_cond sume_le0 // => t /andP[tB tA].
by case: ifPn => // Pt; rewrite f0 // !inE tA.
Qed.
Lemma
Source code
Proof.
Lemma
Source code
Lemma
Source code
Proof.
Lemma
Source code
Lemma
Source code
Proof.
Lemma
Source code
Proof.
Lemma
Source code
Proof.
Lemma
Source code
Proof.
Lemma
Source code
Proof.
Lemma
Source code
Lemma
Source code
Proof.
Lemma
Source code
Lemma
Source code
Proof.
Lemma
Source code
Proof.
Lemma
Source code
Proof.
Lemma
Source code
Proof.
Lemma
Source code
Proof.
Lemma
Source code
Lemma
Source code
(x - y < 0) = (x < y).
Lemma
Source code
Proof.
Lemma
Source code
Proof.
Lemma
Source code
Proof.
Lemma
Source code
Proof.
Lemma
Source code
Proof.
Lemma
Source code
Proof.
Lemma
Source code
Proof.
Lemma
Source code
Proof.
Lemma
Source code
Proof.
Lemma
Source code
Proof.
Lemma
Source code
Proof.
Lemma
Source code
Proof.
Lemma
Source code
Proof.
Lemma
Source code
Proof.
Lemma
Source code
Proof.
Lemma
Source code
Proof.
Lemma
Source code
Proof.
by rewrite nmule_rlt0//= -leNgt lt_def.
by rewrite pmule_rlt0//= !lt_neqAle andbA andbb.
Qed.
Lemma
Source code
Proof.
wlog x0 : x y z / 0 < x => [hwlog|].
have [x0| |->] := ltgtP x 0; [ |exact: hwlog|by rewrite !mul0e].
by apply: oppe_inj; rewrite -!mulNe hwlog ?oppe_gt0.
wlog y0 : x y z x0 / 0 < y => [hwlog|].
have [y0| |->] := ltgtP y 0; [ |exact: hwlog|by rewrite !(mul0e, mule0)].
by apply: oppe_inj; rewrite -muleN -2!mulNe -muleN hwlog ?oppe_gt0.
wlog z0 : x y z x0 y0 / 0 < z => [hwlog|].
have [z0| |->] := ltgtP z 0; [ |exact: hwlog|by rewrite !mule0].
by apply: oppe_inj; rewrite -!muleN hwlog ?oppe_gt0.
case: x x0 => [x x0| |//]; last by rewrite !gt0_mulye ?mule_gt0.
case: y y0 => [y y0| |//]; last by rewrite gt0_mulye // muleC !gt0_mulye.
case: z z0 => [z z0| |//]; last by rewrite !gt0_muley ?mule_gt0.
by rewrite /mule/= mulrA.
Qed.
Lemma
Source code
.
Source code
Source code
Source code
muleA muleC mul1e.
Lemma
Source code
Lemma
Source code
Lemma
Source code
Lemma
Source code
Proof.
Lemma
Source code
Lemma
Source code
Lemma
Source code
Lemma
Source code
Proof.
- by rewrite mulrDl.
- by case: ltgtP => // -[] <-; rewrite mulr0 adde0.
- by case: ltgtP => // -[] <-; rewrite mulr0 adde0.
- by case: ltgtP => //; rewrite adde0.
- rewrite !eqe paddr_eq0 //; move: s0; rewrite lee_fin.
case: (ltgtP s) => //= [s0|->{s}] _; rewrite ?add0e.
+ rewrite lte_fin -[in LHS](addr0 0%R) ltr_leD // lte_fin s0.
by case: ltgtP t0 => // [t0|[<-{t}]] _; [rewrite gt_eqF|rewrite eqxx].
+ by move: t0; rewrite lee_fin; case: (ltgtP t).
- by case: ltgtP s0.
- by case: ltgtP t0.
- rewrite !eqe paddr_eq0 //; move: s0; rewrite lee_fin.
case: (ltgtP s) => //= [s0|->{s}] _; rewrite ?add0e.
+ rewrite lte_fin -[in LHS](addr0 0%R) ltr_leD // lte_fin s0.
by case: ltgtP t0 => // [t0|[<-{t}]].
+ by move: t0; rewrite lee_fin; case: (ltgtP t).
- by case: ltgtP s0.
Qed.
Lemma
Source code
Proof.
Lemma
Source code
Proof.
- by rewrite mulrDl.
- by case: ltgtP => // -[] <-; rewrite mulr0 adde0.
- by case: ltgtP => // -[] <-; rewrite mulr0 adde0.
- by case: ltgtP => //; rewrite adde0.
- rewrite !eqe naddr_eq0 //; move: s0; rewrite lee_fin.
case: (ltgtP s) => //= [s0|->{s}] _; rewrite ?add0e.
+ rewrite !lte_fin -[in LHS](addr0 0%R) ltNge lerD // ?ltW //=.
by rewrite !ltNge ltW //.
+ by case: (ltgtP t).
- by case: ltgtP s0.
- rewrite !eqe naddr_eq0 //; move: s0; rewrite lee_fin.
case: (ltgtP s) => //= [s0|->{s}] _; rewrite ?add0e.
+ rewrite !lte_fin -[in LHS](addr0 0%R) ltNge lerD // ?ltW //=.
by rewrite !ltNge ltW // -lee_fin t0; case: eqP.
+ by case: (ltgtP t).
- by rewrite ltNge s0 /=; case: eqP.
- by rewrite ltNge t0 /=; case: eqP.
Qed.
Lemma
Source code
Proof.
Lemma
Source code
Proof.
Variant
Source code
|
Source code
|
Source code
|
Source code
|
Source code
Lemma
Source code
Proof.
Lemma
Source code
Lemma
Source code
Lemma
Source code
Lemma
Source code
Proof.
Source code
Proof.
Lemma
Source code
Proof.
Lemma
Source code
Lemma
Source code
Proof.
Lemma
Source code
Lemma
Source code
Proof.
Lemma
Source code
Proof.
Lemma
Source code
Lemma
Source code
Lemma
Source code
Lemma
Source code
Proof.
Lemma
Source code
Lemma
Source code
Lemma
Source code
Lemma
Source code
Lemma
Source code
Proof.
Lemma
Source code
Proof.
Lemma
Source code
Proof.
rewrite lee_fin le_eqVlt => /predU1P[<- y z|x0]; first by rewrite 2!mule0.
move=> [y| |] [z| |]//; first by rewrite !lee_fin// ler_pM2r.
- by move=> _; rewrite mulr_infty gtr0_sg// mul1e leey.
- by move=> _; rewrite mulr_infty gtr0_sg// mul1e leNye.
- by move=> _; rewrite mulNyr mulyr gtr0_sg// 2!mul1e.
move=> [y| |] [z| |]//.
- rewrite lee_fin => yz.
have [z0|z0|] := ltgtP 0%R z.
+ by rewrite [leRHS]mulr_infty gtr0_sg// mul1e leey.
+ by rewrite mulr_infty ltr0_sg// ?(le_lt_trans yz)// [leRHS]mulr_infty ltr0_sg.
+ move=> z0; move: yz; rewrite -z0 mul0e le_eqVlt => /predU1P[->|y0].
by rewrite mul0e.
by rewrite mulr_infty ltr0_sg// mulN1e leNye.
+ by move=> _; rewrite mulyy leey.
+ by move=> _; rewrite mulNyy leNye.
Qed.
Lemma
Source code
Proof.
Lemma
Source code
(forall , P i -> 0 <= F i) ->
(\sum_( <- s | P i) F i) * x = \sum_( <- s | P i) (F i * x).
Proof.
Lemma
Source code
(forall , P i -> 0 <= F i) ->
x * (\sum_( <- s | P i) F i) = \sum_( <- s | P i) (x * F i).
Proof.
Lemma
Source code
(forall , P i -> F i <= 0) ->
(\sum_( <- s | P i) F i) * x = \sum_( <- s | P i) (F i * x).
Proof.
Lemma
Source code
(forall , P i -> F i <= 0) ->
x * (\sum_( <- s | P i) F i) = \sum_( <- s | P i) (x * F i).
Proof.
Lemma
Source code
( : I -> \bar R) :
x \is a fin_num -> {in P &, forall , F i +? F j} ->
x * (\sum_( <- s | P i) F i) = \sum_( <- s | P i) x * F i.
Proof.
Lemma
Source code
Proof.
Lemma
Source code
Lemma
Source code
Lemma
Source code
Proof.
Lemma
Source code
Lemma
Source code
Lemma
Source code
Lemma
Source code
`|\sum_( <- s | P i) F i| <= \sum_( <- s | P i) `|F i|.
Proof.
by move=> *; exact/(le_trans (lee_abs_add _ _) (leeD _ _)).
Qed.
Lemma
Source code
Lemma
Source code
Proof.
have [r0|r0] := leP 0%R r.
by rewrite (ger0_norm r0)// gee0_abs// mule_ge0// leey.
rewrite (ltr0_norm r0)// lte0_abs// ?EFinN ?mulNe//.
by rewrite mule_lt0 /= eqe lt_eqF//= lte_fin r0.
move=> [x| |] [y| |] //=; first by rewrite normrM.
- by rewrite -abseN -muleNN abseN -EFinN xoo normrN.
- by rewrite muleC xoo muleC.
- by rewrite -abseN -muleNN abseN -EFinN xoo normrN.
Qed.
Lemma
Source code
`|\prod_( <- r | P i) F i| = \prod_( <- r | P i) `|F i|.
Proof.
Lemma
Source code
{in fin_num &, {mono @fine R : / maxe x y >-> (Num.max x y)%:E}}.
Proof.
Lemma
Source code
\big[maxe/r%:E]_( <- s | P i) (F i)%:E =
(\big[Num.max/r]_( <- s | P i) F i)%:E.
Lemma
Source code
{in fin_num &, {mono @fine R : / mine x y >-> (Num.min x y)%:E}}.
Proof.
Lemma
Source code
Proof.
Lemma
Source code
Proof.
Lemma
Source code
Lemma
Source code
.
Source code
Source code
Monoid.isLaw.Build (\bar R) -oo maxe maxA maxNye maxeNy.
Lemma
Source code
Lemma
Source code
.
Source code
Source code
Monoid.isLaw.Build (\bar R) +oo mine minA minye miney.
Lemma
Source code
Proof.
Lemma
Source code
Lemma
Source code
z * maxe x y = maxe (z * x) (z * y).
Proof.
Lemma
Source code
maxe x y * z = maxe (x * z) (y * z).
Lemma
Source code
z * mine x y = mine (z * x) (z * y).
Proof.
Lemma
Source code
mine x y * z = mine (x * z) (y * z).
Lemma
Source code
\big[maxe/-oo%E]_( <- s) i%:E \is a fin_num.
Proof.
Lemma
Source code
Proof.
Lemma
Source code
Proof.
Lemma
Source code
Proof.
Lemma
Source code
Proof.
Lemma
Source code
Proof.
move: x => [x| |] ih.
- by rewrite -EFinM mulr_natl EFin_natmul.
- by rewrite mulry gtr0_sg// mul1e enatmul_pinfty.
- by rewrite mulrNy gtr0_sg// mul1e enatmul_ninfty.
Qed.
Lemma
Source code
Lemma
Source code
0 <= x1 -> 0 <= x2 -> x1 < y1 -> x2 < y2 -> x1 * x2 < y1 * y2.
Proof.
rewrite !(lte_fin,lee_fin).
- by move=> *; rewrite ltr_pM.
- move=> x10 x20 xy1 xy2.
by rewrite mulry gtr0_sg ?mul1e -?EFinM ?ltry// (le_lt_trans _ xy1).
- move=> x10 x20 xy1 xy2.
by rewrite mulyr gtr0_sg ?mul1e -?EFinM ?ltry// (le_lt_trans _ xy2).
- by move=> *; rewrite mulyy -EFinM ltry.
Qed.
Lemma
Source code
x1 * x2 <= y1 * y2.
Proof.
- exact: ler_pM.
- rewrite le_eqVlt => /predU1P[<- x20 y10 _|x10 x20 xy1 _].
by rewrite mul0e mule_ge0// leey.
by rewrite mulr_infty gtr0_sg// ?mul1e ?leey// (lt_le_trans x10).
- rewrite le_eqVlt => /predU1P[<- _ y10 _|x10 _ xy1 _].
by rewrite mul0e mule_ge0// leey.
rewrite mulr_infty gtr0_sg// mul1e mulr_infty gtr0_sg// ?mul1e//.
exact: (lt_le_trans x10).
- move=> x10; rewrite le_eqVlt => /predU1P[<- _ y20|x20 _ xy2].
by rewrite mule0 mulr_infty mule_ge0// ?leey// lee_fin sgr_ge0.
by rewrite mulr_infty gtr0_sg ?mul1e ?leey// (lt_le_trans x20).
- by move=> x10 x20 _ _; rewrite mulyy leey.
- rewrite le_eqVlt => /predU1P[<- _ _ _|x10 _ _ _].
by rewrite mulyy mul0e leey.
by rewrite mulyy mulr_infty gtr0_sg// mul1e.
- move=> _; rewrite le_eqVlt => /predU1P[<- _ y20|x20 _ xy2].
by rewrite mule0 mulr_infty mule_ge0// ?leey// lee_fin sgr_ge0.
rewrite mulr_infty gtr0_sg// mul1e mulr_infty gtr0_sg ?mul1e//.
exact: (lt_le_trans x20).
- move=> _; rewrite le_eqVlt => /predU1P[<- _ _|x20 _ _].
by rewrite mule0 mulyy leey.
by rewrite mulr_infty gtr0_sg// mul1e// mulyy.
Qed.
Lemma
Source code
Proof.
- by rewrite -2!EFinM 2!lee_fin ler_pM2l.
- by rewrite mulry gtr0_sg// mul1e 2!leey.
- by rewrite mulrNy gtr0_sg// mul1e 2!leeNy_eq.
- by rewrite mulry gtr0_sg// mul1e 2!leye_eq.
- by rewrite mulry gtr0_sg// mul1e.
- by rewrite mulry mulrNy gtr0_sg// mul1e mul1e.
- by rewrite mulrNy gtr0_sg// mul1e 2!leNye.
- by rewrite mulrNy mulry gtr0_sg// 2!mul1e.
- by rewrite mulrNy gtr0_sg// mul1e.
Qed.
Lemma
Source code
Proof.
Lemma
Source code
Proof.
Lemma
Source code
Proof.
Lemma
Source code
Proof.
Lemma
Source code
Proof.
exact: lt_le_trans xlt0 _.
Qed.
Lemma
Source code
Lemma
Source code
Lemma
Source code
Proof.
Lemma
Source code
Lemma
Source code
Lemma
Source code
Lemma
Source code
Proof.
End ERealArithTh_realDomainType.
Arguments lee_sum_nneg_ord {R}.
Arguments lee_sum_npos_ord {R}.
Arguments lee_sum_nneg_natr {R}.
Arguments lee_sum_npos_natr {R}.
Arguments lee_sum_nneg_natl {R}.
Arguments lee_sum_npos_natl {R}.
#[global] Hint Extern 0 (is_true (0 <= `| _ |)%E) => solve [apply: abse_ge0] : core.
#[deprecated(since="mathcomp-analysis 1.8.0", note="renamed to maxe_pMr")]
Notation
Source code
#[deprecated(since="mathcomp-analysis 1.8.0", note="renamed to maxe_pMl")]
Notation
Source code
#[deprecated(since="mathcomp-analysis 1.8.0", note="renamed to mine_pMr")]
Notation
Source code
#[deprecated(since="mathcomp-analysis 1.8.0", note="renamed to mine_pMl")]
Notation
Source code
Section esg.
Context { : realDomainType}.
Implicit Types x : \bar R.
Definition
mulr_infty : forall {R : realDomainType}, (forall r : R, (r%:E * +oo)%E = ((Num.sg r)%:E * +oo)%E) * (forall r : R, (+oo * r%:E)%E = ((Num.sg r)%:E * +oo)%E) * (forall r : R, (r%:E * -oo)%E = ((Num.sg r)%:E * -oo)%E) * (forall r : R, (-oo * r%:E)%E = ((Num.sg r)%:E * -oo)%E) mulr_infty is not universe polymorphic Arguments mulr_infty {R} mulr_infty is transparent Expands to: Constant mathcomp.reals.constructive_ereal.mulr_infty Declared in library mathcomp.reals.constructive_ereal, line 1945, characters 11-21
Source code
Lemma
Source code
Proof.
Lemma
Source code
Lemma
Source code
Lemma
Source code
End esg.
Module
Source code
Section DualERealArithTh_realDomainType.
Import DualAddTheoryNumDomain.
Local Open Scope ereal_dual_scope.
Context { : realDomainType}.
Implicit Types x y z a b : \bar^d R.
Lemma
Source code
Proof.
Lemma
Source code
Proof.
Lemma
Source code
Proof.
Lemma
Source code
Proof.
Lemma
Source code
(y - x <= 0) = (y <= x).
Proof.
Lemma
Source code
Proof.
Lemma
Source code
Proof.
Lemma
Source code
Proof.
Lemma
Source code
Proof.
Lemma
Source code
Proof.
Lemma
Source code
Proof.
Lemma
Source code
Proof.
Lemma
Source code
Proof.
Lemma
Source code
Proof.
Lemma
Source code
Lemma
Source code
Lemma
Source code
Proof.
Lemma
Source code
Proof.
Lemma
Source code
Proof.
Lemma
Source code
Proof.
Lemma
Source code
Proof.
Lemma
Source code
Proof.
Lemma
Source code
Proof.
Lemma
Source code
Proof.
Lemma
Source code
Lemma
Source code
Lemma
Source code
Proof.
Lemma
Source code
(forall , P i -> f i <= g i) ->
\sum_( <- s | P i) f i <= \sum_( <- s | P i) g i.
Proof.
Lemma
Source code
{subset Q <= P} -> {in [predD P & Q], forall , 0 <= f i} ->
\sum_( <- s | Q i) f i <= \sum_( <- s | P i) f i.
Proof.
apply: lee_sum_npos_subset => [//|i iPQ]; rewrite oppe_le0; exact: PQf.
Qed.
Lemma
Source code
{subset Q <= P} -> {in [predD P & Q], forall , f i <= 0} ->
\sum_( <- s | P i) f i <= \sum_( <- s | Q i) f i.
Proof.
apply: lee_sum_nneg_subset => [//|i iPQ]; rewrite oppe_ge0; exact: PQf.
Qed.
Lemma
Source code
( : I -> \bar^d R) : (forall , P i -> ~~ Q i -> 0 <= f i) ->
\sum_( <- s | P i && Q i) f i <= \sum_( <- s | P i) f i.
Proof.
apply: lee_sum_npos => i Pi nQi; rewrite oppe_le0; exact: PQf.
Qed.
Lemma
Source code
( : I -> \bar^d R) : (forall , P i -> ~~ Q i -> f i <= 0) ->
\sum_( <- s | P i) f i <= \sum_( <- s | P i && Q i) f i.
Proof.
apply: lee_sum_nneg => i Pi nQi; rewrite oppe_ge0; exact: PQf.
Qed.
Lemma
Source code
(forall , P n -> 0 <= f n)%E ->
{homo (fun => \sum_( < n | P i) (f i)) : / (i <= j)%N >-> i <= j}.
Proof.
apply: (lee_sum_npos_ord (fun => - f i)%E) => [i Pi|//].
rewrite oppe_le0; exact: f0.
Qed.
Lemma
Source code
(forall , P n -> f n <= 0)%E ->
{homo (fun => \sum_( < n | P i) (f i)) : / (i <= j)%N >-> j <= i}.
Proof.
apply: (lee_sum_nneg_ord (fun => - f i)%E) => [i Pi|//].
rewrite oppe_ge0; exact: f0.
Qed.
Lemma
Source code
(forall , (m <= n)%N -> P n -> 0 <= f n) ->
{homo (fun => \sum_(m <= < n | P i) (f i)) : / (i <= j)%N >-> i <= j}.
Proof.
apply: lee_sum_npos_natr => [n ? ?|//]; rewrite oppe_le0; exact: f0.
Qed.
Lemma
Source code
(forall , (m <= n)%N -> P n -> f n <= 0) ->
{homo (fun => \sum_(m <= < n | P i) (f i)) : / (i <= j)%N >-> j <= i}.
Proof.
apply: lee_sum_nneg_natr => [n ? ?|//]; rewrite oppe_ge0; exact: f0.
Qed.
Lemma
Source code
(forall , (m < n)%N -> P m -> 0 <= f m) ->
{homo (fun => \sum_(m <= < n | P i) (f i)) : / (i <= j)%N >-> j <= i}.
Proof.
apply: lee_sum_npos_natl => [m ? ?|//]; rewrite oppe_le0; exact: f0.
Qed.
Lemma
Source code
(forall , (m < n)%N -> P m -> f m <= 0) ->
{homo (fun => \sum_(m <= < n | P i) (f i)) : / (i <= j)%N >-> i <= j}.
Proof.
apply: lee_sum_nneg_natl => [m ? ?|//]; rewrite oppe_ge0; exact: f0.
Qed.
Lemma
Source code
( : T -> \bar^d R) : {subset A <= B} ->
{in [predD B & A], forall , P t -> 0 <= f t} ->
\sum_( <- A | P t) f t <= \sum_( <- B | P t) f t.
Proof.
apply: lee_sum_npos_subfset => [//|? ? ?]; rewrite oppe_le0; exact: f0.
Qed.
Lemma
Source code
( : T -> \bar^d R) : {subset A <= B} ->
{in [predD B & A], forall , P t -> f t <= 0} ->
\sum_( <- B | P t) f t <= \sum_( <- A | P t) f t.
Proof.
apply: lee_sum_nneg_subfset => [//|? ? ?]; rewrite oppe_ge0; exact: f0.
Qed.
Lemma
Source code
Proof.
Lemma
Source code
Proof.
Lemma
Source code
Proof.
Lemma
Source code
Proof.
Lemma
Source code
Proof.
Lemma
Source code
Proof.
Lemma
Source code
Proof.
Lemma
Source code
Proof.
Lemma
Source code
Proof.
Lemma
Source code
Proof.
Lemma
Source code
Proof.
Lemma
Source code
Proof.
Lemma
Source code
Proof.
Lemma
Source code
Proof.
Lemma
Source code
Proof.
Lemma
Source code
Proof.
Lemma
Source code
Lemma
Source code
Proof.
Lemma
Source code
(0 < y - x) = (x < y).
Proof.
Lemma
Source code
Proof.
Lemma
Source code
Lemma
Source code
Proof.
Lemma
Source code
Proof.
Lemma
Source code
Proof.
Lemma
Source code
Proof.
Lemma
Source code
( : I -> \bar^d R) :
(forall , P i -> 0 <= F i) ->
(\sum_( <- s | P i) F i) * x = \sum_( <- s | P i) (F i * x).
Proof.
- by rewrite oppe_le0 F0.
- by under eq_bigr => i _ do rewrite mulNe.
Qed.
Lemma
Source code
( : I -> \bar^d R) :
(forall , P i -> 0 <= F i) ->
x * (\sum_( <- s | P i) F i) = \sum_( <- s | P i) (x * F i).
Proof.
Lemma
Source code
( : I -> \bar^d R) :
(forall , P i -> F i <= 0) ->
(\sum_( <- s | P i) F i) * x = \sum_( <- s | P i) (F i * x).
Proof.
- by rewrite oppe_ge0 F0.
- by under eq_bigr => i _ do rewrite mulNe.
Qed.
Lemma
Source code
( : I -> \bar^d R) :
(forall , P i -> F i <= 0) ->
x * (\sum_( <- s | P i) F i) = \sum_( <- s | P i) (x * F i).
Proof.
Lemma
Source code
Lemma
Source code
`|\sum_( <- s | P i) F i| <= \sum_( <- s | P i) `|F i|.
Proof.
by move=> *; exact/(le_trans (lee_abs_dadd _ _) (lee_dD _ _)).
Qed.
Lemma
Source code
Lemma
Source code
Proof.
Lemma
Source code
Proof.
Lemma
Source code
Lemma
Source code
Lemma
Source code
Lemma
Source code
Proof.
Lemma
Source code
Proof.
Lemma
Source code
Proof.
Lemma
Source code
Proof.
Lemma
Source code
Proof.
End DualERealArithTh_realDomainType.
Arguments lee_dsum_nneg_ord {R}.
Arguments lee_dsum_npos_ord {R}.
Arguments lee_dsum_nneg_natr {R}.
Arguments lee_dsum_npos_natr {R}.
Arguments lee_dsum_nneg_natl {R}.
Arguments lee_dsum_npos_natl {R}.
End DualAddTheoryRealDomain.
Section realFieldType_lemmas.
Variable : realFieldType.
Implicit Types x y : \bar R.
Implicit Types r : R.
Definition
inveM_def : forall [R : realFieldType], \bar R -> \bar R -> bool inveM_def is not universe polymorphic Arguments inveM_def [R] (x y)%_ereal_scope inveM_def is transparent Expands to: Constant mathcomp.reals.constructive_ereal.inveM_def Declared in library mathcomp.reals.constructive_ereal, line 3465, characters 11-20
Source code
match x, y with
| r%:E, s%:E => [&& (r == 0) ==> (s >= 0) & (s == 0) ==> (r >= 0)]%R
| +oo, +oo => true
| -oo, -oo | +oo, -oo | -oo, +oo => false
| r%:E, +oo | +oo, r%:E => (r > 0)%R
| r%:E, -oo | -oo, r%:E => (r > 0)%R
end.
Arguments inveM_def : simpl never.
Notation
Source code
(format "x *^-1? y", at level 50) : ereal_scope.
Lemma
Source code
[&& (x == 0) ==> (0 <= y < +oo),
(y == 0) ==> (0 <= x < +oo),
(`|x| == +oo) ==> (y > 0) &
(`|y| == +oo) ==> (x > 0)].
Proof.
Lemma
Source code
Proof.
case: (inveP x) => [|||r rN0]; case: (inveP y) => [|||s sN0]//=;
rewrite ?(eqxx, lexx, ltxx, mule0, mul0e, mulyy, inve0, invey)//=;
do ?by constructor.
- by rewrite mulyr sgrV implybT andbT; case: sgrP sN0 => //=;
rewrite (mulN1e, mul1e); constructor.
- by rewrite mulyr; case: sgrP sN0 => //=;
rewrite (mulN1e, mul1e); constructor.
- by rewrite !mulNyr sgrV; case: sgrP sN0 => //=;
rewrite (mulN1e, mul1e); constructor.
- by rewrite mulry sgrV implybT andTb; case: sgrP rN0 => //=;
rewrite (mulN1e, mul1e); constructor.
- by rewrite mulry; case: sgrP rN0 => //=;
rewrite (mulN1e, mul1e); constructor.
- by rewrite mulrNy [RHS]mulrNy sgrV; case: sgrP rN0 => //=;
rewrite (mulN1e, mul1e); constructor.
- by rewrite !inver invfM EFinM mulf_eq0 (negPf rN0) (negPf sN0);
constructor.
Qed.
Lemma
Source code
Proof.
Lemma
Source code
x \is a fin_num -> y \is a fin_num -> x *^-1? y.
Lemma
Source code
Local Notation
Source code
Lemma
Source code
Proof.
rewrite ?inE ?lexx// ?lee_fin.
- by case: (ltgtP s).
- by case: (ltgtP s) => //= s_gt0 _ _ _; rewrite invr_ge0 (ltW s_gt0) leey.
- by case: (ltgtP r) => //= r_gt0; rewrite leey.
- by case: (ltgtP r) => //= r_gt0 _ _ _; rewrite invr_le0 (lt_geF).
by case: (ltgtP s 0%R); case: (ltgtP r 0%R) => // *; rewrite lef_pV2.
Qed.
Lemma
Source code
Proof.
Definition
ltee_pV2 : forall R : realFieldType, {in [pred x | (0%R <= x)%E] &, {mono inve : y x / (x <= y)%E >-> (y <= x)%E}} * {in [pred x | (0%R <= x)%E] &, {mono inve : y x / (x < y)%E >-> (y < x)%E}} ltee_pV2 is not universe polymorphic Arguments ltee_pV2 R ltee_pV2 is transparent Expands to: Constant mathcomp.reals.constructive_ereal.ltee_pV2 Declared in library mathcomp.reals.constructive_ereal, line 3541, characters 11-19
Source code
Lemma
Source code
Proof.
- move=> _; case: (inveP y) => [|||s]; rewrite ?lexx//= lee_fin => ? s_ge0.
by rewrite lee_fin invr_ge0 s_ge0 leey.
- move=> _; case: (inveP y) => [|||s]; rewrite ?lexx//= lee_fin => sN0 s_ge0.
by rewrite lee_fin [RHS]lt_geF// lt_def sN0.
case: ltgtP => // r_gt0 _ _.
case: (inveP y) => [|||s sN0]; rewrite ?ltxx//= ?lte_fin ?lee_fin.
- by rewrite leey invr_ge0 (ltW r_gt0).
- by rewrite [LHS]lt_geF.
by case: ltgtP sN0 => // s_gt0; rewrite -lef_pV2 ?qualifE/= ?invr_gt0// invrK.
Qed.
Lemma
Source code
Proof.
Lemma
Source code
Lemma
Source code
Lemma
Source code
Lemma
Source code
Lemma
Source code
Lemma
Source code
x^-1 + y^-1 = 1 -> y = x / (x - 1).
Proof.
rewrite subee// inve0 mul1e inve1 => /eqP.
rewrite -addeC eq_sym -sube_eq//; first by rewrite fin_num_adde_defl.
rewrite subee// => /eqP /esym; case: y yNy => // r _.
rewrite inver; case: ifPn => // r0 [] /(congr1 (fun => z^-1)%R).
by rewrite invrK invr0 => /eqP; rewrite (negbTE r0).
have [->|x0] := eqVneq x 0.
rewrite inve0 mul0e => /eqP; rewrite addeC eq_sym -sube_eq//.
rewrite /adde_def eqxx/= andbT negb_and/= orbT/=.
apply: contra yNy => /eqP /(congr1 inve).
by rewrite inveK inveNy => ->.
rewrite eq_sym/= addeC/= => /eqP /(congr1 inve).
by rewrite inveK// inveNy => /eqP; rewrite (negbTE yNy).
have xNy : x != -oo by move: xfin; rewrite fin_numE => /andP[].
move=> /eqP; rewrite eq_sym addeC -sube_eq//.
by rewrite fin_num_adde_defl// fin_numV.
move=> /eqP /(congr1 inve) /=; rewrite inveK => <-.
rewrite -[X in X - _](@divee x)// -[X in _ - X]div1e -muleBl.
- by rewrite fin_numV// ?gt_eqF// ltNye.
- by rewrite fin_num_adde_defl.
move: x xfin {xNy} x1 x0 => [x| |]// _; rewrite !eqe => x1 x0.
rewrite inver/= (negbTE x0)/= -EFinD -EFinM.
rewrite inver mulf_eq0 subr_eq0 (negbTE x1)/= invr_eq0.
by rewrite (negbTE x0) invfM// invrK mulrC EFinM inver/= subr_eq0 (negbTE x1).
Qed.
Lemma
Source code
reflect (forall , (0 < e)%R -> x <= y + e%:E) (x <= y).
Proof.
- move: x y => [x| |] [y| |]//.
+ by rewrite lee_fin => xy e e0; rewrite -EFinD lee_fin ler_wpDr// ltW.
+ by move=> _ e e0; rewrite leNye.
- move: x y => [x| |] [y| |]// xy; rewrite ?leey ?leNye//;
[|by move: xy => /(_ _ lte01)..].
by rewrite lee_fin; apply/ler_addgt0Pr => e e0; rewrite -lee_fin EFinD xy.
Qed.
Lemma
Source code
reflect (forall , (0 < e)%R -> x - e%:E <= y) (x <= y).
Proof.
by rewrite leeBlDr//; move: e; exact/lee_addgt0Pr.
by apply/lee_addgt0Pr => e e0; rewrite -leeBlDr// xy.
Qed.
Lemma
Source code
reflect (forall , (0 < r < 1)%R -> r%:E * x <= y) (x <= y).
Proof.
move: x0 xy; rewrite le_eqVlt => /predU1P[<-|x0 xy]; first by rewrite mule0.
by rewrite (le_trans _ xy)// gee_pMl// ltW.
have h01 : (0 < (2^-1 : R) < 1)%R by rewrite invr_gt0 ?invf_lt1 ?ltr0n ?ltr1n.
move: x y => [x||] [y||] // in x0 h *; last 4 first.
- by rewrite leey.
- by have := h _ h01.
- by have := h _ h01; rewrite mulr_infty sgrV gtr0_sg // mul1e.
- by have := h _ h01; rewrite mulr_infty sgrV gtr0_sg // mul1e.
move: (x0); rewrite lee_fin le_eqVlt => /predU1P[<-|{}x0].
by rewrite (le_trans _ (h _ h01))// mule_ge0// lee_fin.
have y0 : (0 < y)%R.
by rewrite -lte_fin (lt_le_trans _ (h _ h01))// mule_gt0// lte_fin.
rewrite lee_fin leNgt; apply/negP => yx.
have /h : (0 < (y + x) / (2 * x) < 1)%R.
apply/andP; split; first by rewrite divr_gt0 // ?addr_gt0// ?mulr_gt0.
by rewrite ltr_pdivrMr ?mulr_gt0// mul1r mulr_natl mulr2n ltrD2r.
rewrite -EFinM lee_fin invfM -mulrA divfK ?gt_eqF//.
by apply/negP; rewrite -ltNge midf_lt.
Qed.
Lemma
Source code
Proof.
- by rewrite 2!lte_fin ltr_pdivrMl.
- by rewrite mulr_infty sgrV gtr0_sg// mul1e 2!ltNge 2!leey.
- by rewrite mulr_infty sgrV gtr0_sg// mul1e -EFinM 2!ltNyr.
- by rewrite mulr_infty gtr0_sg// mul1e 2!ltry.
- by rewrite mulr_infty [in RHS]mulr_infty sgrV gtr0_sg// mul1e ltxx.
- by rewrite mulr_infty [in RHS]mulr_infty sgrV gtr0_sg// 2!mul1e.
- by rewrite mulr_infty gtr0_sg// mul1e.
- by rewrite mulr_infty [in RHS]mulr_infty sgrV gtr0_sg// 2!mul1e.
- by rewrite mulr_infty [in RHS]mulr_infty sgrV gtr0_sg// mul1e.
Qed.
Lemma
Source code
Proof.
Lemma
Source code
Proof.
- by rewrite 2!lte_fin ltr_pdivlMl.
- by rewrite mulr_infty sgrV gtr0_sg// mul1e 2!ltry.
- by rewrite mulr_infty sgrV gtr0_sg// mul1e.
- by rewrite mulr_infty gtr0_sg// mul1e.
- by rewrite mulr_infty [in RHS]mulr_infty sgrV gtr0_sg// mul1e.
- by rewrite mulr_infty [in RHS]mulr_infty sgrV gtr0_sg// 2!mul1e.
- by rewrite mulr_infty gtr0_sg// mul1e 2!ltNyr.
- by rewrite mulr_infty [in RHS]mulr_infty sgrV gtr0_sg// 2!mul1e.
- by rewrite mulr_infty [in RHS]mulr_infty sgrV gtr0_sg// mul1e.
Qed.
Lemma
Source code
Proof.
Lemma
Source code
Proof.
Lemma
Source code
Proof.
Lemma
Source code
Proof.
Lemma
Source code
Proof.
Lemma
Source code
Proof.
Lemma
Source code
Proof.
Lemma
Source code
Proof.
Lemma
Source code
Proof.
Lemma
Source code
Proof.
Lemma
Source code
Proof.
Lemma
Source code
Proof.
Lemma
Source code
Proof.
Lemma
Source code
((r^-1)%:E * y == x) = (y == r%:E * x).
Proof.
- by rewrite eq_le lee_ndivrMl// lee_ndivlMl// -eq_le.
- by rewrite eq_le lee_pdivrMl// lee_pdivlMl// -eq_le.
Qed.
End realFieldType_lemmas.
Module
Source code
Import DualAddTheoryNumDomain DualAddTheoryRealDomain.
Section DualRealFieldType_lemmas.
Local Open Scope ereal_dual_scope.
Variable : realFieldType.
Implicit Types x y : \bar^d R.
Lemma
Source code
reflect (forall , (0 < e)%R -> x <= y + e%:E) (x <= y).
Proof.
End DualRealFieldType_lemmas.
End DualAddTheoryRealField.
Section sqrte.
Variable : rcfType.
Implicit Types x y : \bar R.
Definition
sqrte : forall [R : rcfType], \bar R -> \bar (join_Num_POrderNmodule_between_Algebra_BaseAddUMagma_and_Order_Preorder R) sqrte is not universe polymorphic Arguments sqrte [R] x%_ereal_scope sqrte is transparent Expands to: Constant mathcomp.reals.constructive_ereal.sqrte Declared in library mathcomp.reals.constructive_ereal, line 3779, characters 11-16
Source code
if x is +oo then +oo else if x is r%:E then (Num.sqrt r)%:E else 0.
Lemma
Source code
Proof.
Lemma
Source code
Lemma
Source code
Proof.
Lemma
Source code
Proof.
- by rewrite sqrtrM ?EFinM.
- move: age0; rewrite le_eqVlt eqe => /predU1P[<-|x0].
by rewrite mul0e sqrte0 sqrtr0 mul0e.
by rewrite mulry gtr0_sg ?mul1e// mulry gtr0_sg ?mul1e// sqrtr_gt0.
- move: age0; rewrite mule0 mulrNy lee_fin -sgr_ge0.
by case: sgrP; rewrite ?mul0e ?sqrte0// ?mul1e// ler0N1.
- rewrite !mulyr; case: (sgrP y) => [->||].
+ by rewrite sqrtr0 sgr0 mul0e sqrte0.
+ by rewrite mul1e/= -sqrtr_gt0 -sgr_gt0 -lte_fin => /gt0_muley->.
+ by move=> y0; rewrite EFinN mulN1e/= ltr0_sqrtr// sgr0 mul0e.
- by rewrite mule0.
Qed.
Lemma
Source code
Proof.
Lemma
Source code
Lemma
Source code
Proof.
End sqrte.
Module
Source code
Export DualAddTheoryNumDomain.
Export DualAddTheoryRealDomain.
Export DualAddTheoryRealField.
End DualAddTheory.
Module
Source code
Export DualAddTheory.
End ConstructiveDualAddTheory.
Section Itv.
Context { : numDomainType}.
Definition
ext_num_sem : forall {R : numDomainType}, interval int -> \bar R -> bool ext_num_sem is not universe polymorphic Arguments ext_num_sem {R} i x%_ereal_scope ext_num_sem is transparent Expands to: Constant mathcomp.reals.constructive_ereal.ext_num_sem Declared in library mathcomp.reals.constructive_ereal, line 3839, characters 11-22
Source code
(0 >=< x)%O && (x \in map_itv (EFin \o intr) i).
Local Notation
Source code
Local Notation
Source code
Local Notation
Source code
Local Notation
Source code
Local Notation
Source code
Local Notation
Source code
(@map_itv_bound _ (\bar R) (EFin \o intr)).
Lemma
Source code
Proof.
Lemma
Source code
Proof.
Lemma
Source code
(map_itv_bound EFin x <= map_itv_bound EFin y)%O = (x <= y)%O.
Proof.
Lemma
Source code
(map_itv_bound EFin x <= BLeft y%:E)%O = (x <= BLeft y)%O.
Proof.
Lemma
Source code
(BRight x%:E <= map_itv_bound EFin y)%O = (BRight x <= y)%O.
Proof.
Lemma
Source code
(ext_num_itv_bound x <= ext_num_itv_bound y)%O = (x <= y)%O.
Proof.
Lemma
Source code
forall : \bar R, ext_num_spec x z -> ext_num_spec y z.
Proof.
move: x y x_sub_y => [lx ux] [ly uy] /andP[lel leu] /=.
move=> /andP[lxz zux]; apply/andP; split.
- by apply: le_trans lxz; rewrite le_ext_num_itv_bound.
- by apply: le_trans zux _; rewrite le_ext_num_itv_bound.
Qed.
Section ItvTheory.
Context { : Itv.t}.
Implicit Type x : ext_num_def i.
Lemma
Source code
ext_num_spec i' x%:inum.
Proof.
Definition
ext_widen_itv : forall {R : numDomainType} {i : Itv.t}, Itv.def ext_num_sem i -> forall {i' : Itv.t}, unify_itv i i' -> Itv.def ext_num_sem i' ext_widen_itv is not universe polymorphic Arguments ext_widen_itv {R i} x {i' uni} ext_widen_itv is transparent Expands to: Constant mathcomp.reals.constructive_ereal.ext_widen_itv Declared in library mathcomp.reals.constructive_ereal, line 3900, characters 11-24
Source code
Source code
Itv.mk (ext_widen_itv_subproof x uni).
Lemma
Source code
Proof.
Lemma
Source code
Proof.
Lemma
Source code
Proof.
Lemma
Source code
Proof.
Lemma
Source code
Lemma
Source code
unify (fun => ~~ Itv.sub ix iy) (Itv.Real `[0%Z, 0%Z]) i ->
x%:inum != 0 :> \bar R.
Proof.
End ItvTheory.
End Itv.
Arguments gt0e {R i} _ {_}.
Arguments lte0 {R i} _ {_}.
Arguments ge0e {R i} _ {_}.
Arguments lee0 {R i} _ {_}.
Arguments cmp0e {R i} _ {_}.
Arguments neqe0 {R i} _ {_}.
Arguments ext_widen_itv {R i} _ {_ _}.
Definition
posnume : forall [R : numDomainType], phant R -> Type posnume is not universe polymorphic Arguments posnume [R] _ posnume is transparent Expands to: Constant mathcomp.reals.constructive_ereal.posnume Declared in library mathcomp.reals.constructive_ereal, line 3950, characters 11-18
Source code
Itv.def (@ext_num_sem R) (Itv.Real `]0%Z, +oo[).
Notation
Source code
Definition
nonnege : forall [R : numDomainType], phant R -> Type nonnege is not universe polymorphic Arguments nonnege [R] _ nonnege is transparent Expands to: Constant mathcomp.reals.constructive_ereal.nonnege Declared in library mathcomp.reals.constructive_ereal, line 3953, characters 11-18
Source code
Itv.def (@ext_num_sem R) (Itv.Real `[0%Z, +oo[).
Notation
Source code
Notation
Source code
: ereal_dual_scope.
Notation
Source code
: ereal_scope.
Notation
Source code
(@Itv.from _ _ _ (Phantom _ x)) (Itv.Real `]Posz 0, +oo[) _)
(only printing) : ereal_dual_scope.
Notation
Source code
(@Itv.from _ _ _ (Phantom _ x)) (Itv.Real `]Posz 0, +oo[) _)
(only printing) : ereal_scope.
Notation
Source code
: ereal_dual_scope.
Notation
Source code
: ereal_scope.
Notation
Source code
(@Itv.from _ _ _ (Phantom _ x)) (Itv.Real `[Posz 0, +oo[) _)
(only printing) : ereal_dual_scope.
Notation
Source code
(@Itv.from _ _ _ (Phantom _ x)) (Itv.Real `[Posz 0, +oo[) _)
(only printing) : ereal_scope.
#[export] Hint Extern 0 (is_true (0%R < _)%E) => solve [apply: gt0e] : core.
#[export] Hint Extern 0 (is_true (_ < 0%R)%E) => solve [apply: lte0] : core.
#[export] Hint Extern 0 (is_true (0%R <= _)%E) => solve [apply: ge0e] : core.
#[export] Hint Extern 0 (is_true (_ <= 0%R)%E) => solve [apply: lee0] : core.
#[export] Hint Extern 0 (is_true (0%R >=< _)%O) => solve [apply: cmp0e] : core.
#[export] Hint Extern 0 (is_true (_ != 0%R)%O) => solve [apply: neqe0] : core.
Module
Source code
Import IntItv.
Import Instances.
Section Itv.
Context { : numDomainType}.
Local Notation
Source code
Local Notation
Source code
Local Notation
Source code
Local Notation
Source code
Local Notation
Source code
Local Notation
Source code
Lemma
Source code
Canonical
ItvInstances.pinfty_inum : forall {R : numDomainType}, Itv.def ext_num_sem (Itv.Real `]1%Z, +oo[%R) ItvInstances.pinfty_inum is not universe polymorphic Arguments ItvInstances.pinfty_inum {R} ItvInstances.pinfty_inum is transparent Expands to: Constant mathcomp.reals.constructive_ereal.ItvInstances.pinfty_inum Declared in library mathcomp.reals.constructive_ereal, line 4003, characters 10-21
Source code
Lemma
Source code
ext_num_spec (Itv.Real `]-oo, (-1)%Z[) (-oo : \bar R).
Proof.
Canonical
ItvInstances.ninfty_snum : forall {R : numDomainType}, Itv.def ext_num_sem (Itv.Real `]-oo, (-1)%Z[%R) ItvInstances.ninfty_snum is not universe polymorphic Arguments ItvInstances.ninfty_snum {R} ItvInstances.ninfty_snum is transparent Expands to: Constant mathcomp.reals.constructive_ereal.ItvInstances.ninfty_snum Declared in library mathcomp.reals.constructive_ereal, line 4009, characters 10-21
Source code
Lemma
Source code
Proof.
Canonical
ItvInstances.EFin_inum : forall {R : numDomainType} [i : Itv.t], Itv.def (Itv.num_sem (R:=R)) i -> Itv.def ext_num_sem i ItvInstances.EFin_inum is not universe polymorphic Arguments ItvInstances.EFin_inum {R} [i] x ItvInstances.EFin_inum is transparent Expands to: Constant mathcomp.reals.constructive_ereal.ItvInstances.EFin_inum Declared in library mathcomp.reals.constructive_ereal, line 4017, characters 10-19
Source code
Lemma
Source code
num_spec r (fine x%:num : R).
Proof.
apply/and3P; split; rewrite -?real_fine//.
- case: x lx {xu xr} => [x||]/=; [|by case: l => [? []|]..].
by case: l => [[] [l |//] |//] /[!bnd_simp] => [|/ltW]/=; rewrite lee_fin;
apply: le_trans.
- case: x xu {lx xr} => [x||]/=; [|by case: u => [? [[]|] |]..].
by case: u => [bu [[|//] | u] |//]; case: bu => /[!bnd_simp] [/ltW|]/=;
rewrite lee_fin// => /le_trans; apply; rewrite lerz0.
Qed.
Canonical
ItvInstances.fine_inum : forall {R : numDomainType} [i : Itv.t], Itv.def ext_num_sem i -> Itv.def (Itv.num_sem (R:=R)) (Itv.real1 keep_sign i) ItvInstances.fine_inum is not universe polymorphic Arguments ItvInstances.fine_inum {R} [i] x ItvInstances.fine_inum is transparent Expands to: Constant mathcomp.reals.constructive_ereal.ItvInstances.fine_inum Declared in library mathcomp.reals.constructive_ereal, line 4032, characters 10-19
Source code
Lemma
Source code
ext_num_sem (Interval l u) (+oo : \bar R) = ((l != +oo%O) && (u == +oo%O)).
Proof.
Lemma
Source code
ext_num_sem (Interval l u) (-oo : \bar R) = ((l == -oo%O) && (u != -oo%O)).
Proof.
- by case: l ly => -[].
- by case: u uy => -[].
- exact: real0.
- by case: l ly => -[].
- case: u uy => [|[]//].
by case=> u _ /=; rewrite bnd_simp ?real_leNye ?real_ltNyr /= realz.
Qed.
Lemma
Source code
(BRight (- x) <= ext_num_itv_bound (opp_bound b))%O
= (ext_num_itv_bound b <= BLeft x)%O.
Lemma
Source code
(ext_num_itv_bound (opp_bound b) <= BLeft (- x))%O
= (BRight x <= ext_num_itv_bound b)%O.
Lemma
Source code
ext_num_spec r (- x%:inum : \bar R).
Proof.
[|by case: i => [//| [l u]]; rewrite /= ext_num_sem_y ext_num_sem_Ny;
case: l u => [[] ?|[]] [[] ?|[]]..].
rewrite !ext_num_num_spec => Px.
by rewrite -[x]/(Itv.mk Px)%:inum num_spec_opp.
Qed.
Canonical
ItvInstances.oppe_inum : forall {R : numDomainType} [i : Itv.t], Itv.def ext_num_sem i -> Itv.def ext_num_sem (Itv.real1 opp i) ItvInstances.oppe_inum is not universe polymorphic Arguments ItvInstances.oppe_inum {R} [i] x ItvInstances.oppe_inum is transparent Expands to: Constant mathcomp.reals.constructive_ereal.ItvInstances.oppe_inum Declared in library mathcomp.reals.constructive_ereal, line 4082, characters 10-19
Source code
Lemma
Source code
( := Itv.real2 add xi yi) :
ext_num_spec r (adde x%:inum y%:inum : \bar R).
Proof.
[|by case: xi yi => [//| [xl xu]] [//| [yl yu]];
rewrite /adde/= ?ext_num_sem_y ?ext_num_sem_Ny;
case: xl xu yl yu => [[] ?|[]] [[] ?|[]] [[] ?|[]] [[] ?|[]]..].
rewrite !ext_num_num_spec => Px Py.
by rewrite -[x]/(Itv.mk Px)%:inum -[y]/(Itv.mk Py)%:inum num_spec_add.
Qed.
Canonical
ItvInstances.adde_inum : forall {R : numDomainType} [xi yi : Itv.t], Itv.def ext_num_sem xi -> Itv.def ext_num_sem yi -> Itv.def ext_num_sem (Itv.real2 add xi yi) ItvInstances.adde_inum is not universe polymorphic Arguments ItvInstances.adde_inum {R} [xi yi] x y ItvInstances.adde_inum is transparent Expands to: Constant mathcomp.reals.constructive_ereal.ItvInstances.adde_inum Declared in library mathcomp.reals.constructive_ereal, line 4096, characters 10-19
Source code
Itv.mk (ext_num_spec_add x y).
Import DualAddTheory.
Lemma
Source code
Proof.
Canonical
ItvInstances.dEFin_inum : forall {R : numDomainType} [i : Itv.t], Itv.def (Itv.num_sem (R:=R)) i -> Itv.def ext_num_sem i ItvInstances.dEFin_inum is not universe polymorphic Arguments ItvInstances.dEFin_inum {R} [i] x ItvInstances.dEFin_inum is transparent Expands to: Constant mathcomp.reals.constructive_ereal.ItvInstances.dEFin_inum Declared in library mathcomp.reals.constructive_ereal, line 4107, characters 10-20
Source code
Lemma
Source code
( := Itv.real2 add xi yi) :
ext_num_spec r (dual_adde x%:inum y%:inum : \bar^d R).
Proof.
[|by case: xi yi => [//| [xl xu]] [//| [yl yu]];
rewrite /dual_adde/= ?ext_num_sem_y ?ext_num_sem_Ny;
case: xl xu yl yu => [[] ?|[]] [[] ?|[]] [[] ?|[]] [[] ?|[]]..].
rewrite !ext_num_num_spec => Px Py.
by rewrite -[x]/(Itv.mk Px)%:inum -[y]/(Itv.mk Py)%:inum num_spec_add.
Qed.
Canonical
ItvInstances.dadde_inum : forall {R : numDomainType} [xi yi : Itv.t], Itv.def ext_num_sem xi -> Itv.def ext_num_sem yi -> Itv.def ext_num_sem (Itv.real2 add xi yi) ItvInstances.dadde_inum is not universe polymorphic Arguments ItvInstances.dadde_inum {R} [xi yi] x y ItvInstances.dadde_inum is transparent Expands to: Constant mathcomp.reals.constructive_ereal.ItvInstances.dadde_inum Declared in library mathcomp.reals.constructive_ereal, line 4121, characters 10-20
Source code
Itv.mk (ext_num_spec_dadd x y).
Variant
Source code
|
Source code
ext_sign_spec l u x (Known EqZero)
|
Source code
ext_sign_spec l u x (Known NonNeg)
|
Source code
ext_sign_spec l u x (Known NonPos)
|
Source code
(0 >=< x)%O -> ext_sign_spec l u x Unknown.
Lemma
Source code
(ext_num_itv_bound l <= BLeft x)%O -> (BRight x <= ext_num_itv_bound u)%O ->
(0 >=< x)%O ->
ext_sign_spec l u x (sign (Interval l u)).
Proof.
- case: (@signP R l u x _ _ xs).
+ by case: l xl => -[].
+ by case: u xu => -[].
+ by move=> l0 u0 x0; apply: ISignEqZero => //; rewrite x0.
+ by move=> l0 u0 x0; apply: ISignNonNeg.
+ by move=> l0 u0 x0; apply: ISignNonPos.
+ by move=> l0 u0 x0; apply: ISignBoth.
- have uy : u = +oo%O by case: u xu => -[].
have u0 : (BRight 0%:Z < u)%O by rewrite uy.
case: (leP (BLeft 0%Z) l) => l0.
+ suff -> : sign (Interval l u) = Known NonNeg.
by apply: ISignNonNeg => //; apply: le0y.
rewrite /=/sign_boundl /sign_boundr uy/=.
by case: eqP => [//| /eqP lneq0]; case: ltgtP l0 lneq0.
+ suff -> : sign (Interval l u) = Unknown by exact: ISignBoth.
rewrite /=/sign_boundl /sign_boundr uy/=.
by case: eqP l0 => [->//| /eqP leq0] /ltW->.
- have ly : l = -oo%O by case: l xl => -[].
have l0 : (l < BLeft 0%:Z)%O by rewrite ly.
case: (leP u (BRight 0%Z)) => u0.
+ suff -> : sign (Interval l u) = Known NonPos by exact: ISignNonPos.
rewrite /=/sign_boundl /sign_boundr ly/=.
by case: eqP => [//| /eqP uneq0]; case: ltgtP u0 uneq0.
+ suff -> : sign (Interval l u) = Unknown by exact: ISignBoth.
rewrite /=/sign_boundl /sign_boundr ly/=.
by case: eqP u0 => [->//| /eqP ueq0]; rewrite ltNge => /negbTE->.
Qed.
Lemma
Source code
(BLeft 0%:Z <= b1 -> BLeft 0%:Z <= b2 ->
ext_num_itv_bound b1 <= BLeft x1 ->
ext_num_itv_bound b2 <= BLeft x2 ->
ext_num_itv_bound (mul_boundl b1 b2) <= BLeft (x1 * x2))%O.
Proof.
have x10 : 0 <= x1.
by case: x1 b1x1 (le_trans (eqbRL (le_ext_num_itv_bound _ _) b10) b1x1).
have x20 : 0 <= x2.
by case: x2 b2x2 (le_trans (eqbRL (le_ext_num_itv_bound _ _) b20) b2x2).
have x1r : (0 >=< x1)%O by rewrite real_fine; exact/ger0_real/fine_ge0.
have x2r : (0 >=< x2)%O by rewrite real_fine; exact/ger0_real/fine_ge0.
have ley b1' b2' :
(map_itv_bound EFin (num_itv_bound R (mul_boundl b1' b2'))
<= BLeft +oo%E)%O.
by case: b1' b2' => [[] [[| ?] | ?] | []] [[] [[| ?] | ?] | []]//=;
rewrite bnd_simp ?real_leey ?real_ltry/= ?realz.
case: x1 x2 x10 x20 x1r x2r b1x1 b2x2 => [x1||] [x2||] //= x10 x20 x1r x2r.
- rewrite !(map_itv_bound_comp, map_itv_bound_EFin_le_BLeft)/=.
exact: num_itv_mul_boundl.
- rewrite !(map_itv_bound_comp EFin intr) real_mulry//= => b1x1 _.
case: (comparable_ltgtP x1r) x10 => [x10 |//| [x10]] _.
by rewrite gtr0_sg ?mul1e ?bnd_simp.
rewrite -x10 sgr0 mul0e/= map_itv_bound_EFin_le_BLeft.
suff -> : b1 = BLeft 0%Z by case: b2 {b20}.
apply/le_anti; rewrite b10 andbT.
move: b1x1; rewrite map_itv_bound_EFin_le_BLeft.
by rewrite -x10 -(mulr0z 1) num_itv_bound_le_BLeft.
- rewrite !(map_itv_bound_comp EFin intr) real_mulyr//= => _ b2x2.
case: (comparable_ltgtP x2r) x20 => [x20 |//| [x20]] _.
by rewrite gtr0_sg ?mul1e ?bnd_simp.
rewrite -x20 sgr0 mul0e/= map_itv_bound_EFin_le_BLeft.
suff -> : b2 = BLeft 0%Z by case: b1 {b10} => [[] [] []|].
apply/le_anti; rewrite b20 andbT.
move: b2x2; rewrite map_itv_bound_EFin_le_BLeft.
by rewrite -x20 -(mulr0z 1) num_itv_bound_le_BLeft.
- by rewrite mulyy/= 3!map_itv_bound_comp.
Qed.
Lemma
Source code
(0 <= x1 -> 0 <= x2 ->
BRight x1 <= ext_num_itv_bound b1 ->
BRight x2 <= ext_num_itv_bound b2 ->
BRight (x1 * x2) <= ext_num_itv_bound (mul_boundr b1 b2))%O.
Proof.
have x1r : (0 >=< x1)%O by rewrite real_fine; exact/ger0_real/fine_ge0.
have x2r : (0 >=< x2)%O by rewrite real_fine; exact/ger0_real/fine_ge0.
case: x1 x2 x10 x20 x1r x2r b1x1 b2x2 => [x1||] [x2||] //= x10 x20 x1r x2r.
- rewrite !(map_itv_bound_comp, BRight_le_map_itv_bound_EFin)/=.
exact: num_itv_mul_boundr.
- rewrite real_mulry// => b1x1 b2x2.
have -> : b2 = +oo%O by case: b2 b2x2 => -[].
rewrite mul_boundrC/= map_itv_bound_comp.
case: (comparable_ltgtP x1r) x10 => [x10 |//| [x10]] _.
+ rewrite gtr0_sg ?mul1e ?bnd_simp//.
suff: (BRight 0%Z < b1)%O by case: b1 b1x1 => [[] [] [] |].
move: b1x1; rewrite map_itv_bound_comp BRight_le_map_itv_bound_EFin.
case: b1 => [[] b1 |//]; rewrite !bnd_simp -(@ltr0z R).
* exact/le_lt_trans/ltW.
* exact/lt_le_trans.
+ rewrite -x10 sgr0 mul0e/= BRight_le_map_itv_bound_EFin.
suff: (BRight 0%Z <= b1)%O by case: b1 b1x1 => [[] [] [] |].
move: b1x1; rewrite map_itv_bound_comp BRight_le_map_itv_bound_EFin.
by rewrite -x10 -(@mulr0z R 1) BRight_le_num_itv_bound.
- rewrite real_mulyr// => b1x1 b2x2.
have -> : b1 = +oo%O by case: b1 b1x1 => -[].
rewrite /= map_itv_bound_comp.
case: (comparable_ltgtP x2r) x20 => [x20 |//| [x20]] _.
+ rewrite gtr0_sg ?mul1e ?bnd_simp//.
suff: (BRight 0%Z < b2)%O by case: b2 b2x2 => [[] [] [] |].
move: b2x2; rewrite map_itv_bound_comp BRight_le_map_itv_bound_EFin.
case: b2 => [[] b2 |//]; rewrite !bnd_simp -(@ltr0z R).
* exact/le_lt_trans/ltW.
* exact/lt_le_trans.
+ rewrite -x20 sgr0 mul0e/= BRight_le_map_itv_bound_EFin.
suff: (BRight 0%Z <= b2)%O by case: b2 b2x2 => [[] [] [] |].
move: b2x2; rewrite map_itv_bound_comp BRight_le_map_itv_bound_EFin.
by rewrite -x20 -(@mulr0z R 1) BRight_le_num_itv_bound.
- rewrite mulyy/= => b1x1 b2x2.
have -> : b1 = +oo%O by case: b1 b1x1 => -[].
by have -> : b2 = +oo%O by case: b2 b2x2 => -[].
Qed.
Lemma
Source code
(0 <= x1 -> (0 >=< x2)%O -> BRight 0%Z <= b2 ->
BRight x1 <= ext_num_itv_bound b1 ->
BRight x2 <= ext_num_itv_bound b2 ->
BRight (x1 * x2) <= ext_num_itv_bound (mul_boundr b1 b2))%O.
Proof.
have /orP[x2ge0 | x2le0] : (0 <= x2) || (x2 <= 0).
- by case: x2 x2r {lex2b2} => [x2 /=|_|_]; rewrite ?lee_fin ?le0y ?leNy0.
- exact: ext_num_itv_mul_boundr_pos.
have : (BRight (x1 * x2) <= BRight 0%R)%O.
by have:= mule_ge0_le0 x1ge0 x2le0; case: mule.
move/le_trans; apply.
rewrite map_itv_bound_comp BRight_le_map_itv_bound_EFin/=.
rewrite -(@mulr0z R 1) BRight_le_num_itv_bound.
apply: mul_boundr_gt0 => //.
move: x1 x1ge0 lex1b1 => [x1||//]/= x1ge0; last by case: b1 => -[].
rewrite map_itv_bound_comp BRight_le_map_itv_bound_EFin.
rewrite -(@BRight_le_num_itv_bound R)/=.
by apply: le_trans; rewrite bnd_simp -lee_fin.
Qed.
Lemma
Source code
(ext_num_itv_bound x >=< ext_num_itv_bound y)%O.
Proof.
exact/orP/comparable_num_itv_bound.
Qed.
Lemma
Source code
ext_num_itv_bound (Order.min x y)
= Order.min (ext_num_itv_bound x) (ext_num_itv_bound y).
Proof.
rewrite minElt -if_neg -comparable_leNgt ?le_ext_num_itv_bound ?ltW//.
exact: comparable_ext_num_itv_bound.
Qed.
Lemma
Source code
ext_num_itv_bound (Order.max x y)
= Order.max (ext_num_itv_bound x) (ext_num_itv_bound y).
Proof.
rewrite maxElt -if_neg -comparable_leNgt ?le_ext_num_itv_bound ?ltW//.
exact: comparable_ext_num_itv_bound.
Qed.
Lemma
Source code
( := Itv.real2 mul xi yi) :
ext_num_spec r (x%:inum * y%:inum : \bar R).
Proof.
case=> [x /=/and3P[xr /= xlx xxu]] [y /=/and3P[yr /= yly yyu]].
rewrite -/(sign (Interval xl xu)) -/(sign (Interval yl yu)).
have ns000 : ext_num_sem `[0%Z, 0%Z] (0 : \bar R).
by apply/and3P; rewrite ?comparablexx.
have xyr : (0 >=< (x * y)%E)%O by exact: realMe.
case: (ext_signP xlx xxu xr) => xlb xub xs.
- by rewrite xs mul0e; case: (ext_signP yly yyu yr).
- case: (ext_signP yly yyu yr) => ylb yub ys.
+ by rewrite ys mule0.
+ apply/and3P; split=> //=.
* exact: ext_num_itv_mul_boundl.
* exact: ext_num_itv_mul_boundr_pos.
+ apply/and3P; split=> //=; rewrite -[x * y]oppeK -real_muleN//.
* by rewrite oppe_boundl ext_num_itv_mul_boundr_pos ?oppe_ge0 ?oppe_boundr.
* rewrite oppe_boundr ext_num_itv_mul_boundl ?oppe_boundl//.
by rewrite opp_bound_ge0.
+ apply/and3P; split=> //=.
* rewrite -[x * y]oppeK -real_muleN// oppe_boundl.
rewrite ext_num_itv_mul_boundr -?real_fine ?oppe_cmp0 ?oppe_boundr//.
by rewrite opp_bound_gt0 ltW.
* by rewrite ext_num_itv_mul_boundr// ltW.
- case: (ext_signP yly yyu yr) => ylb yub ys.
+ by rewrite ys mule0.
+ apply/and3P; split=> //=; rewrite -[x * y]oppeK -real_mulNe//.
* by rewrite oppe_boundl ext_num_itv_mul_boundr_pos ?oppe_ge0 ?oppe_boundr.
* rewrite oppe_boundr ext_num_itv_mul_boundl ?oppe_boundl//.
by rewrite opp_bound_ge0.
+ apply/and3P; split=> //=; rewrite -real_muleNN//.
* by rewrite ext_num_itv_mul_boundl ?opp_bound_ge0 ?oppe_boundl.
* by rewrite ext_num_itv_mul_boundr_pos ?oppe_ge0 ?oppe_boundr.
+ apply/and3P; split=> //=; rewrite -[x * y]oppeK.
* rewrite -real_mulNe// oppe_boundl.
by rewrite ext_num_itv_mul_boundr ?oppe_ge0 ?oppe_boundr// ltW.
* rewrite oppeK -real_muleNN//.
by rewrite ext_num_itv_mul_boundr ?oppe_boundr
?oppe_ge0 ?oppe_cmp0 ?opp_bound_gt0// ltW.
case: (ext_signP yly yyu yr) => ylb yub ys.
- by rewrite ys mule0.
- apply/and3P; split=> //=; rewrite muleC mul_boundrC.
+ rewrite -[y * x]oppeK -real_muleN// oppe_boundl.
rewrite ext_num_itv_mul_boundr ?oppe_ge0 ?oppe_cmp0 ?oppe_boundr//.
by rewrite opp_bound_gt0 ltW.
+ by rewrite ext_num_itv_mul_boundr// ltW.
- apply/and3P; split=> //=; rewrite muleC mul_boundrC.
+ rewrite -[y * x]oppeK -real_mulNe// oppe_boundl.
by rewrite ext_num_itv_mul_boundr ?oppe_ge0 ?oppe_boundr// ltW.
+ rewrite -real_muleNN// ext_num_itv_mul_boundr ?oppe_ge0
?oppe_cmp0 ?oppe_boundr//.
by rewrite opp_bound_gt0 ltW.
apply/and3P; rewrite xyr/= ext_num_itv_bound_min ext_num_itv_bound_max.
rewrite (comparable_ge_min _ (comparable_ext_num_itv_bound _ _)).
rewrite (comparable_le_max _ (comparable_ext_num_itv_bound _ _)).
have [x0 | /ltW x0] : 0 <= x \/ x < 0; [|split=> //..].
case: x xr {xlx xxu xyr xs} => [x||] /= xr.
- by case: (comparable_leP xr) => x0; [left | right].
- by left; rewrite le0y.
- by right; rewrite ltNy0.
- apply/orP; right; rewrite -[x * y]oppeK -real_muleN// oppe_boundl.
by rewrite ext_num_itv_mul_boundr ?oppe_cmp0 ?oppe_boundr// opp_bound_gt0 ltW.
- by apply/orP; right; rewrite ext_num_itv_mul_boundr// ltW.
- apply/orP; left; rewrite -[x * y]oppeK -real_mulNe// oppe_boundl.
by rewrite ext_num_itv_mul_boundr ?oppe_ge0 ?oppe_boundr// ltW.
- apply/orP; left; rewrite -real_muleNN//.
rewrite ext_num_itv_mul_boundr ?oppe_ge0 ?oppe_cmp0 ?oppe_boundr//.
by rewrite opp_bound_gt0 ltW.
Qed.
Canonical
ItvInstances.mule_inum : forall {R : numDomainType} [xi yi : Itv.t], Itv.def ext_num_sem xi -> Itv.def ext_num_sem yi -> Itv.def ext_num_sem (Itv.real2 mul xi yi) ItvInstances.mule_inum is not universe polymorphic Arguments ItvInstances.mule_inum {R} [xi yi] x y ItvInstances.mule_inum is transparent Expands to: Constant mathcomp.reals.constructive_ereal.ItvInstances.mule_inum Declared in library mathcomp.reals.constructive_ereal, line 4372, characters 10-19
Source code
Itv.mk (ext_num_spec_mul x y).
Definition
ItvInstances.abse_itv : Itv.t -> Itv.t ItvInstances.abse_itv is not universe polymorphic Arguments ItvInstances.abse_itv i ItvInstances.abse_itv is transparent Expands to: Constant mathcomp.reals.constructive_ereal.ItvInstances.abse_itv Declared in library mathcomp.reals.constructive_ereal, line 4375, characters 11-19
Source code
match i with
| Itv.Top => Itv.Real `[0%Z, +oo[
| Itv.Real (Interval l u) =>
match l with
| BRight (Posz _) | BLeft (Posz (S _)) => Itv.Real `]0%Z, +oo[
| _ => Itv.Real `[0%Z, +oo[
end
end.
Arguments abse_itv /.
Lemma
Source code
ext_num_spec r (`|x%:inum| : \bar R).
Proof.
apply/and3P; split; rewrite ?bnd_simp ?abse_ge0//.
by case: x%:inum => [x'||]; rewrite ?cmp0y// le_comparable ?abse_ge0.
have: 0 < x%:inum -> ext_num_sem `]0%Z, +oo[ `|x%:inum|.
move=> xgt0; apply/and3P; split; rewrite ?bnd_simp//.
- by case: x%:num => [x'||]; rewrite ?cmp0y// le_comparable ?abse_ge0.
- case: x%:inum xgt0 => [x'|//|//]/=.
by rewrite !lte_fin normr_gt0; apply: lt0r_neq0.
rewrite {}/r; case: i x => [//| [[[] [[//| l] | //] | //] u]] [x /=] + + _;
move/and3P => [xr /= /[!bnd_simp]lx _]; apply.
- by apply: lt_le_trans lx; rewrite lte_fin ltr0z.
- by apply: le_lt_trans lx; rewrite lee_fin ler0z.
- by apply: lt_trans lx; rewrite lte_fin ltr0z.
Qed.
Canonical
ItvInstances.abse_inum : forall {R : numDomainType} [i : Itv.t], Itv.def ext_num_sem i -> Itv.def ext_num_sem (ItvInstances.abse_itv i) ItvInstances.abse_inum is not universe polymorphic Arguments ItvInstances.abse_inum {R} [i] x ItvInstances.abse_inum is transparent Expands to: Constant mathcomp.reals.constructive_ereal.ItvInstances.abse_inum Declared in library mathcomp.reals.constructive_ereal, line 4404, characters 10-19
Source code
Lemma
Source code
(ext_num_itv_bound b1 <= BLeft x1)%O ->
(ext_num_itv_bound b2 <= BLeft x2)%O ->
(ext_num_itv_bound (Order.min b1 b2) <= BLeft (Order.min x1 x2))%O.
Proof.
- have sb1_le_sb2 := eqbRL (le_ext_num_itv_bound _ _) b1_le_b2.
by rewrite minElt; case: (x1 < x2)%O => [//|_]; apply: le_trans.
- have sb2_le_sb1 := eqbRL (le_ext_num_itv_bound _ _) b2_le_b1.
by rewrite minElt; case: (x1 < x2)%O => [+ _|//]; apply: le_trans.
Qed.
Lemma
Source code
(BRight x1 <= ext_num_itv_bound b1)%O ->
(BRight x2 <= ext_num_itv_bound b2)%O ->
(BRight (Order.min x1 x2) <= ext_num_itv_bound (Order.min b1 b2))%O.
Proof.
- have sb1_le_sb2 := eqbRL (le_ext_num_itv_bound _ _) b1_le_b2.
by case: (comparable_leP x1_cmp_x2) => [//| /ltW ? + _]; apply: le_trans.
- have sb2_le_sb1 := eqbRL (le_ext_num_itv_bound _ _) b2_le_b1.
by case: (comparable_leP x1_cmp_x2) => [? _ |//]; apply: le_trans.
Qed.
Lemma
Source code
( := Itv.real2 min xi yi) :
ext_num_spec r (Order.min x%:inum y%:inum : \bar R).
Proof.
case: x y => [x /= _] [y /= _] => {xi yi r} -[lx ux] [ly uy]/=.
move=> /andP[xr /=/andP[lxx xux]] /andP[yr /=/andP[lyy yuy]].
apply/and3P; split.
- case: x y xr yr {lxx xux lyy yuy} => [x||] [y||]//=.
+ by move=> ? ?; apply: comparable_minr.
+ by move=> ? ?; rewrite real_miney.
+ by move=> ? ?; rewrite real_minNye.
- exact: ext_min_itv_boundl_spec.
- by apply: ext_min_itv_boundr_spec => //; apply: ereal_comparable.
Qed.
Lemma
Source code
(ext_num_itv_bound b1 <= BLeft x1)%O ->
(ext_num_itv_bound b2 <= BLeft x2)%O ->
(ext_num_itv_bound (Order.max b1 b2) <= BLeft (Order.max x1 x2))%O.
Proof.
case: (leP b1 b2) => [b1_le_b2 | /ltW b2_le_b1].
- case: (comparable_leP x1_cmp_x2) => [//| /ltW ? _ sb2_x2].
exact: le_trans sb2_x2 _.
- case: (comparable_leP x1_cmp_x2) => [? sb1_x1 _ |//].
exact: le_trans sb1_x1 _.
Qed.
Lemma
Source code
(BRight x1 <= ext_num_itv_bound b1)%O ->
(BRight x2 <= ext_num_itv_bound b2)%O ->
(BRight (Order.max x1 x2) <= ext_num_itv_bound (Order.max b1 b2))%O.
Proof.
- have sb1_le_sb2 := eqbRL (@le_ext_num_itv_bound R _ _) b1_le_b2.
by rewrite maxElt; case: ifP => [//|_ ? _]; apply: le_trans sb1_le_sb2.
- have sb2_le_sb1 := eqbRL (@le_ext_num_itv_bound R _ _) b2_le_b1.
by rewrite maxElt; case: ifP => [_ _ ?|//]; apply: le_trans sb2_le_sb1.
Qed.
Lemma
Source code
( := Itv.real2 max xi yi) :
ext_num_spec r (Order.max x%:inum y%:inum : \bar R).
Proof.
case: x y => [x /= _] [y /= _] => {xi yi r} -[lx ux] [ly uy]/=.
move=> /andP[xr /=/andP[lxx xux]] /andP[yr /=/andP[lyy yuy]].
apply/and3P; split.
- case: x y xr yr {lxx xux lyy yuy} => [x||] [y||]//=.
+ by move=> ? ?; apply: comparable_maxr.
+ by move=> ? ?; rewrite real_maxey.
+ by move=> ? ?; rewrite real_maxNye.
- by apply: ext_max_itv_boundl_spec => //; apply: ereal_comparable.
- exact: ext_max_itv_boundr_spec.
Qed.
Canonical
ItvInstances.ext_min_max_typ : numDomainType -> min_max_typ ereal_display ItvInstances.ext_min_max_typ is not universe polymorphic Arguments ItvInstances.ext_min_max_typ {R} ItvInstances.ext_min_max_typ is transparent Expands to: Constant mathcomp.reals.constructive_ereal.ItvInstances.ext_min_max_typ Declared in library mathcomp.reals.constructive_ereal, line 4487, characters 10-25
Source code
End Itv.
End ItvInstances.
Export (canonicals) ItvInstances.
Section MorphNum.
Context { : numDomainType} { : Itv.t}.
Local Notation := (Itv.def (@ext_num_sem R) i).
Implicit Types (a : \bar R).
Lemma
Source code
Proof.
End MorphNum.
Section MorphReal.
Context { : numDomainType} { : interval int}.
Implicit Type x : (Itv.def (@ext_num_sem R) (Itv.Real xi)).
Implicit Type y : (Itv.def (@ext_num_sem R) (Itv.Real yi)).
Lemma
Source code
a <= maxe x%:num y%:num = (a <= x%:num) || (a <= y%:num).
Proof.
Lemma
Source code
maxe x%:num y%:num <= a = (x%:num <= a) && (y%:num <= a).
Proof.
Lemma
Source code
a <= mine x%:num y%:num = (a <= x%:num) && (a <= y%:num).
Proof.
Lemma
Source code
mine x%:num y%:num <= a = (x%:num <= a) || (y%:num <= a).
Proof.
Lemma
Source code
a < maxe x%:num y%:num = (a < x%:num) || (a < y%:num).
Proof.
Lemma
Source code
maxe x%:num y%:num < a = (x%:num < a) && (y%:num < a).
Proof.
Lemma
Source code
a < mine x%:num y%:num = (a < x%:num) && (a < y%:num).
Proof.
Lemma
Source code
mine x%:num y%:num < a = (x%:num < a) || (y%:num < a).
Proof.
End MorphReal.
Variant
Source code
\bar R -> bool -> bool -> bool -> Type :=
|
Source code
posnume_spec x +oo false true true
|
Source code
posnume_spec x (p%:num%:E) false true true.
Lemma
Source code
posnume_spec x x (x == 0) (0 <= x) (0 < x).
Proof.
Variant
Source code
\bar R -> bool -> Type :=
|
Source code
|
Source code
Lemma
Source code
nonnege_spec x x (0 <= x).
Proof.
by rewrite lee_fin => /[dup] x_ge0 ->; exact: IsRealNonnege (NngNum x_ge0).
Qed.
Section contract_expand.
Variable : realFieldType.
Implicit Types (x : \bar R) (r : R).
Definition
contract : forall [R : realFieldType], \bar R -> R contract is not universe polymorphic Arguments contract [R] x%_ereal_scope contract is transparent Expands to: Constant mathcomp.reals.constructive_ereal.contract Declared in library mathcomp.reals.constructive_ereal, line 4575, characters 11-19
Source code
match x with
| r%:E => r / (1 + `|r|) | +oo => 1 | -oo => -1
end.
Lemma
Source code
Proof.
Lemma
Source code
Proof.
Lemma
Source code
Lemma
Source code
Definition
expand : forall [R : realFieldType], R -> \bar R expand is not universe polymorphic Arguments expand [R] r%_ring_scope expand is transparent Expands to: Constant mathcomp.reals.constructive_ereal.expand Declared in library mathcomp.reals.constructive_ereal, line 4600, characters 11-17
Source code
if (r >= 1)%R then +oo else if (r <= -1)%R then -oo else (r / (1 - `|r|))%:E.
Lemma
Source code
Proof.
Lemma
Source code
Proof.
rewrite ifF; [apply/negbTE|by rewrite ifT // -lerNr].
by rewrite -ltNge -(opprK r) -ltrNl (lt_le_trans _ r1) // -subr_gt0 opprK.
rewrite -ltNge => r1; case: ifPn; rewrite lerNl opprK; [by move=> ->|].
by rewrite -ltNge leNgt => ->; rewrite leNgt -ltrNl r1 /= mulNr normrN.
Qed.
Lemma
Source code
Lemma
Source code
Lemma
Source code
Proof.
rewrite eqr_norml => /andP[/orP[]/eqP->{r}] _;
by [rewrite expand1|rewrite expandN1].
rewrite /expand 2!leNgt ltrNl; case/ltr_normlP : (r1) => -> -> /=.
have r_pneq0 : (1 + r / (1 - r) != 0)%R.
rewrite -[X in (X + _)%R](@divff _ (1 - r)%R) -?mulrDl.
by rewrite subr_eq0 eq_sym lt_eqF // ltr_normlW.
by rewrite subrK mulf_neq0 // invr_eq0 subr_eq0 eq_sym lt_eqF // ltr_normlW.
have r_nneq0 : (1 - r / (1 + r) != 0)%R.
rewrite -[X in (X + _)%R](@divff _ (1 + r)%R) -?mulrBl.
by rewrite addrC addr_eq0 gt_eqF // ltrNnormlW.
by rewrite addrK mulf_neq0// invr_eq0 addr_eq0 -eqr_oppLR lt_eqF// ltrNnormlW.
wlog : r r1 r_pneq0 r_nneq0 / (0 <= r)%R => wlog_r0.
have [r0|r0] := lerP 0 r; first by rewrite wlog_r0.
move: (wlog_r0 (- r)%R).
rewrite !(normrN, opprK, mulNr) oppr_ge0 => /(_ r1 r_nneq0 r_pneq0 (ltW r0)).
by move/oppr_inj.
rewrite /contract !ger0_norm //.
by rewrite divr_ge0 // subr_ge0 (le_trans _ (ltW r1)) // ler_norm.
apply: (@mulIf _ (1 + r / (1 - r))%R); rewrite // divfK//.
rewrite -[X in (X + _ / _)%R](@divff _ (1 - r)%R) -?mulrDl ?subrK ?div1r //.
by rewrite subr_eq0 eq_sym lt_eqF // ltr_normlW.
Qed.
Lemma
Source code
Proof.
- rewrite lte_fin => r0r1; rewrite ltr_pdivrMr ?ltr_wpDr//.
rewrite mulrAC ltr_pdivlMr ?ltr_wpDr// 2?mulrDr 2?mulr1.
have [r10|?] := ler0P r1; last first.
rewrite ltr_leD // mulrC; have [r00|//] := ler0P r0.
by rewrite (@le_trans _ _ 0%R) // ?pmulr_rle0// mulr_ge0// ?oppr_ge0// ltW.
have [?|r00] := ler0P r0; first by rewrite ltr_leD // 2!mulrN mulrC.
by move: (le_lt_trans r10 (lt_trans r00 r0r1)); rewrite ltxx.
- by rewrite ltr_pdivrMr ?ltr_wpDr// mul1r ltr_pwDl // ler_norm.
- rewrite ltr_pdivlMr ?mulN1r ?ltr_wpDr// => _.
by rewrite ltrNl ltr_pwDl // ler_normr lexx orbT.
Qed.
Definition
lt_contract : forall [R : realFieldType], {mono contract (R:=R) : x y / (x < y)%E >-> (x < y)%R} lt_contract is not universe polymorphic Arguments lt_contract [R] x y lt_contract is transparent Expands to: Constant mathcomp.reals.constructive_ereal.lt_contract Declared in library mathcomp.reals.constructive_ereal, line 4664, characters 11-22
Source code
Definition
contract_inj : forall [R : realFieldType], injective (contract (R:=R)) contract_inj is not universe polymorphic Expanded type for implicit arguments contract_inj : forall [R : realFieldType] [x1 x2 : constructive_ereal_extended__canonical__Order_POrder], contract (R:=R) x1 = contract (R:=R) x2 -> x1 = x2 Arguments contract_inj [R x1 x2] _ contract_inj is transparent Expands to: Constant mathcomp.reals.constructive_ereal.contract_inj Declared in library mathcomp.reals.constructive_ereal, line 4665, characters 11-23
Source code
Lemma
Source code
{mono expand : / (x <= y)%O}}.
Proof.
Definition
lt_expand : forall [R : realFieldType], {in [pred r | (`|r| <= 1)%R] &, {mono expand (R:=R) : x y / (x < y)%R >-> (x < y)%E}} lt_expand is not universe polymorphic Expanded type for implicit arguments lt_expand : forall [R : realFieldType] [x y : R], x \in [pred r | (`|r| <= 1)%R] -> y \in [pred r | (`|r| <= 1)%R] -> (fun x0 : constructive_ereal_extended__canonical__Order_Preorder => [eta (> x0)%O]) (expand (R:=R) x) (expand (R:=R) y) = (fun x0 : R => [eta (> x0)%R]) x y Arguments lt_expand [R x y] _ _ lt_expand is transparent Expands to: Constant mathcomp.reals.constructive_ereal.lt_expand Declared in library mathcomp.reals.constructive_ereal, line 4671, characters 11-20
Source code
Definition
expand_inj : forall [R : realFieldType], {in [pred r | (`|r| <= 1)%R] &, injective (expand (R:=R))} expand_inj is not universe polymorphic Expanded type for implicit arguments expand_inj : forall [R : realFieldType] [x y : R], x \in [pred r | (`|r| <= 1)%R] -> y \in [pred r | (`|r| <= 1)%R] -> expand (R:=R) x = expand (R:=R) y -> x = y Arguments expand_inj [R x y] _ _ _ expand_inj is transparent Expands to: Constant mathcomp.reals.constructive_ereal.expand_inj Declared in library mathcomp.reals.constructive_ereal, line 4672, characters 11-21
Source code
Lemma
Source code
(fine (expand r))%:E = expand r.
Proof.
Lemma
Source code
Proof.
have [y_le1|/ltW /expand1->] := leP y 1%R; last by rewrite leey.
rewrite le_expand_in ?inE// ler_norml y_le1 (le_trans _ xy)//.
by rewrite lerNl (ler_normlP _ _ _).
rewrite ltr_normr => /orP[|] x1; last first.
by rewrite expandN1 // ?leNye // lerNr ltW.
by rewrite expand1; [exact: ltW | rewrite expand1 // (le_trans _ xy) // ltW].
Qed.
Lemma
Source code
Lemma
Source code
Proof.
End contract_expand.
Section ereal_PseudoMetric.
Context { : realFieldType}.
Implicit Types (x y : \bar R) (r : R).
Definition
ereal_ball : forall {R : realFieldType}, \bar R -> R -> \bar R -> bool ereal_ball is not universe polymorphic Arguments ereal_ball {R} x%_ereal_scope r%_ring_scope y%_ereal_scope ereal_ball is transparent Expands to: Constant mathcomp.reals.constructive_ereal.ereal_ball Declared in library mathcomp.reals.constructive_ereal, line 4706, characters 11-21
Source code
Lemma
Source code
Proof.
Lemma
Source code
Proof.
Lemma
Source code
ereal_ball x r1 y -> ereal_ball y r2 z -> ereal_ball x (r1 + r2) z.
Proof.
by rewrite -addrA (le_lt_trans (ler_normD _ _)) // ltrD.
Qed.
Lemma
Source code
ereal_ball (- x) e%:num (- y) -> ereal_ball x e%:num y.
Lemma
Source code
(2 < e%:num)%R -> ereal_ball -oo e%:num x.
Proof.
rewrite (le_trans (ler_normD _ _)) // normr1 -lerBrDr.
by rewrite (le_trans (contract_le1 _)) // (_ : 2 = 1 + 1)%R // addrK.
Qed.
Lemma
Source code
(1 < contract r%:E + e%:num)%R -> ereal_ball r%:E e%:num +oo.
Proof.
by rewrite subr_le0; case/ler_normlP: (contract_le1 r%:E).
by rewrite opprB ltrBlDl.
Qed.
End ereal_PseudoMetric.
Lemma
Source code
a < r%:E -> r%:E < b ->
exists
Source code
forall , (`|y - r| < delta%:num)%R -> (a < y%:E) && (y%:E < b).
Proof.
- move: a b ltax ltxb; abstract: wlog. (*BUG*)
move=> {}a {}b ltxa ltxb.
have m_gt0 : (Num.min ((r - a) / 2) ((b - r) / 2) > 0)%R.
by rewrite lt_min !divr_gt0 // ?subr_gt0.
exists (PosNum m_gt0) => y //=; rewrite lt_min !ltr_distl.
move=> /andP[/andP[ay _] /andP[_ yb]].
rewrite 2!lte_fin (lt_trans _ ay) ?(lt_trans yb) //=.
by rewrite -subr_gt0 addrAC {1}[(r - a)%R]splitr addrK divr_gt0 ?subr_gt0.
rewrite -subr_gt0 opprD addrA {1}[(b - r)%R]splitr addrK.
by rewrite divr_gt0 ?subr_gt0.
- have [//||d dP] := wlog a (r + 1)%R; rewrite ?lte_fin ?ltrDl //.
by exists d => y /dP /andP[->] /= /lt_le_trans; apply; rewrite leey.
- have [//||d dP] := wlog (r - 1)%R b; rewrite ?lte_fin ?gtrDl ?ltrN10 //.
by exists d => y /dP /andP[_ ->] /=; rewrite ltNyr.
- by exists 1%:pos%R => ? ?; rewrite ltNyr ltry.
Qed.