Module mathcomp.classical.unstable
From HB Require Import structures.From mathcomp Require Import boot order finmap ssralg ssrnum ssrint.
From mathcomp Require Import vector archimedean interval matrix.
Attributes warn(note="The unstable.v file should only be used inside analysis.",
cats="internal-analysis").
Unset SsrOldRewriteGoalsOrder.
Set Implicit Arguments.
Unset Strict Implicit.
Unset Printing Implicit Defensive.
Import Order.TTheory GRing.Theory Num.Theory.
Local Open Scope ring_scope.
Module
Source code
Import Order.
Definition
preimage_set_system : forall {aT rT : Type}, set aT -> (aT -> rT) -> set_system rT -> set_system aT preimage_set_system is not universe polymorphic Arguments preimage_set_system {aT rT}%_type_scope D%_classical_set_scope f%_function_scope G _ preimage_set_system is transparent Expands to: Constant mathcomp.classical.classical_sets.preimage_set_system Declared in library mathcomp.classical.classical_sets, line 1693, characters 11-30
Source code
End Order.
Definition
image_set_system : forall [aT rT : Type], set aT -> (aT -> rT) -> set_system aT -> set_system rT image_set_system is not universe polymorphic Arguments image_set_system [aT rT]%_type_scope D%_classical_set_scope f%_function_scope G _ image_set_system is transparent Expands to: Constant mathcomp.classical.classical_sets.image_set_system Declared in library mathcomp.classical.classical_sets, line 1724, characters 11-27
Source code
Section DFunWith.
Variables ( : eqType) ( : I' -> Type) ( : forall , T i).
Lemma
Source code
End DFunWith.
Lemma
Source code
( : 'M[V]_(m, n1)) ( : 'M[V]_(m, n2)) :
row_mx A1 A2 - row_mx B1 B2 = row_mx (A1 - B1) (A2 - B2).
Proof.
Section IntervalNumDomain.
Variable : numDomainType.
Implicit Types x : R.
Lemma
Source code
(- x \in Interval (BInfty _ ba) (BSide bb xb)) =
(x \in Interval (BSide (~~ bb) (- xb)) (BInfty _ (~~ ba))).
Lemma
Source code
(- x \in Interval (BSide ba xa) (BInfty _ bb)) =
(x \in Interval (BInfty _ (~~ bb)) (BSide (~~ ba) (- xa))).
End IntervalNumDomain.
Lemma
Source code
( : seq I) :
all (coprime (F a)) [seq F i | <- [seq <- l | P i]] ->
coprime (F a) (\prod_( <- l | P j) F j).
Proof.
Lemma
Source code
( : nat) :
pairwise coprime [seq F i | <- [seq <- r | P i]] ->
reflect (forall , i \in r -> P i -> F i %| n)
(\prod_( <- r | P i) F i %| n).
Proof.
by rewrite big_nil dvd1n; apply: ReflectT => i; rewrite in_nil.
rewrite big_cons; case: ifP => [Pa|nPa]; last first.
move/HI/equivP; apply; split=> [Fidvdn i|Fidvdn i il].
by rewrite in_cons => /predU1P[->|]; [rewrite nPa|exact: Fidvdn].
by apply: Fidvdn; rewrite in_cons il orbT.
rewrite map_cons pairwise_cons => /andP[allcoprimea pairwisecoprime].
rewrite Gauss_dvd; first exact: coprime_prodr.
apply: (equivP (andPP idP (HI pairwisecoprime))).
split=> [[Fadvdn Fidvdn] i|Fidvdn].
by rewrite in_cons => /predU1P[->//|]; exact: Fidvdn.
split=> [|i il].
by apply: Fidvdn => //; exact: mem_head.
by apply: Fidvdn; rewrite in_cons il orbT.
Qed.
Lemma
Source code
( : nat) :
((\prod_( <- r | P i) F i) ^ n = \prod_( <- r | P i) (F i) ^ n)%N.
Proof.
Lemma
Source code
(\prod_(m <= < y) i * \prod_(n <= < x) i <= \prod_(n + m <= < x + y) i)%N.
Proof.
rewrite [in leqRHS]/index_iota -addnBAC// iotaD big_cat/=.
rewrite mulnC leq_mul//.
by apply: leq_prod; move=> i _; rewrite leq_addr.
rewrite subnKC//.
rewrite -[in leqLHS](add0n m) big_addn.
rewrite [in leqRHS](_ : y - m = ((y - m + x) - x))%N.
by rewrite -addnBA// subnn addn0.
rewrite -[X in iota X _](add0n x) big_addn -addnBA// subnn addn0.
by apply: leq_prod => i _; rewrite leq_add2r leq_addr.
Qed.
Lemma
Source code
(x`! * y`! * ((n + m).+1)`! <= n`! * m`! * ((x + y).+1)`!)%N.
Proof.
rewrite (fact_split nx) -!mulnA leq_mul2l; apply/orP; right.
rewrite (fact_split my) mulnCA -!mulnA leq_mul2l; apply/orP; right.
rewrite [leqRHS](_ : _ =
(n + m).+1`! * \prod_((n + m).+2 <= < (x + y).+2) i)%N.
by rewrite -fact_split// ltnS leq_add.
rewrite mulnA mulnC leq_mul2l; apply/orP; right.
do 2 rewrite -addSn -addnS.
exact: leq_Mprod_prodD.
Qed.
Notation
Source code
Lemma
Source code
Proof.
have [m2n|nm2] := ltnP m.+2 (2 ^ n.+1)%N.
by exists n; rewrite m2n andbT (leq_trans h1).
exists n.+1; rewrite nm2/= -addn1.
rewrite -[X in (_ <= X)%N]prednK ?expn_gt0// -[X in (_ <= X)%N]addn1 leq_add2r.
by rewrite (leq_trans h2)// -subn1 leq_subRL ?expn_gt0// add1n ltn_exp2l.
Qed.
Notation
Source code
(at level 10).
Notation
Source code
(at level 10).
Notation
Source code
(at level 10).
Notation
Source code
(at level 10).
Notation
Source code
(at level 10).
Notation
Source code
(at level 10).
Definition
cross : forall {T T1 T2 : Type}, (T -> T1) -> (T -> T2) -> set_system T1 -> set_system T2 -> set (set T) cross is not universe polymorphic Arguments cross {T T1 T2}%_type_scope (f g)%_function_scope X Y _ cross is transparent Expands to: Constant mathcomp.classical.classical_sets.cross Declared in library mathcomp.classical.classical_sets, line 1732, characters 11-16
Source code
( : predType T) ( : pT) ( : T -> T') :=
{in A &, nondecreasing f} \/ {in A &, {homo f : /~ (x <= y)%O}}.
Definition
cross12 : forall {T1 T2 : Type}, set_system T1 -> set_system T2 -> set (set (T1 * T2)) cross12 is not universe polymorphic Arguments cross12 {T1 T2}%_type_scope X Y _ cross12 is transparent Expands to: Constant mathcomp.classical.classical_sets.cross12 Declared in library mathcomp.classical.classical_sets, line 1738, characters 11-18
Source code
( : predType T) ( : pT) ( : T -> T') :=
{in A &, {homo f : / (x < y)%O}} \/ {in A &, {homo f : /~ (x < y)%O}}.
Lemma
Source code
( : predType T) ( : pT) ( : T -> T') :
strict_monotonic A f -> monotonic A f.
Proof.
Lemma
Source code
Proof.
by rewrite ltn_neqAle fincr (inj_eq (incn_inj fincr)) -ltn_neqAle.
Qed.
Section path_lt.
Context { : orderType d}.
Implicit Types (a b c : T) (s : seq T).
Lemma
Source code
P a -> P (last a [seq <- s | P x]).
Proof.
Lemma
Source code
Proof.
apply: eq_in_filter => x xs.
by apply/negbTE; have := sa _ xs; rewrite ltNge; apply: contra => /ltW.
Qed.
Lemma
Source code
Proof.
by apply: eq_in_filter => x xs; exact: sa.
Qed.
Lemma
Source code
Lemma
Source code
(a < c)%O -> (c < b)%O -> path <%O a s -> last a s = b ->
last c [seq <- s | (c < x)%O] = b.
Proof.
move=> a b c ac cb _ ab.
by apply/eqP; rewrite eq_le (ltW cb) -ab (ltW ac).
rewrite rcons_path => /andP[ah ht]; rewrite last_rcons => tb.
by rewrite filter_rcons tb cb last_rcons.
Qed.
Lemma
Source code
Proof.
End path_lt.
Arguments last_filterP {d T a} P s.
Inductive
Source code
Source code
Reserved Notation "`1- r" (format "`1- r", at level 2).
Reserved Notation "f \^-1" (at level 35, format "f \^-1").
Lemma
Source code
( : X -> nat) : A != fset0 ->
(exists , i \in A /\ forall , j \in A -> f j <= f i)%nat.
Proof.
Lemma
Source code
(exists , i <= n /\ forall , j <= n -> f j <= f i)%N.
Proof.
Arguments big_rmcond {R idx op I r} P.
Arguments big_rmcond_in {R idx op I r} P.
Reserved Notation "`1- x" (format "`1- x", at level 2).
Lemma
Source code
( : I -> {set T}) :
(#|\bigcup_( <- r | P i) F i| <= \sum_( <- r | P i) #|F i|)%N.
Proof.
by rewrite (leq_trans (leq_card_setU _ _))// leq_add.
Qed.
Definition
sequence : Type -> Type sequence is not universe polymorphic Arguments sequence R%_type_scope sequence is transparent Expands to: Constant mathcomp.classical.classical_sets.sequence Declared in library mathcomp.classical.classical_sets, line 2195, characters 11-19
Source code
#[deprecated(since="mathcomp-analysis 1.15.0")]
Notation
Source code
Reserved Notation "p '.~'" (format "p .~", at level 1).
Notation
Source code
Section onem_ring.
Context { : pzRingType}.
Implicit Type r : R.
Lemma
Source code
Lemma
Source code
Lemma
Source code
Proof.
Lemma
Source code
Lemma
Source code
Lemma
Source code
Lemma
Source code
End onem_ring.
Section onem_order.
Variable : numDomainType.
Implicit Types r : R.
Lemma
Source code
Proof.
Lemma
Source code
Lemma
Source code
Lemma
Source code
Lemma
Source code
Proof.
Lemma
Source code
End onem_order.
Lemma
Source code
(0 <= x <= 1 -> `| x.~ | <= 1)%R.
Proof.
Lemma
Source code
Lemma
Source code
(s / (s + t)).~ = t / (s + t).
Proof.
Lemma
Source code
Proof.
Lemma
Source code
reflect (forall , z > y -> x <= z) (x <= y).
Proof.
Lemma
Source code
reflect (forall , z < x -> z <= y) (x <= y).
Proof.
Definition
bigcup2 : forall [T : Type], set T -> set T -> (set T) ^nat bigcup2 is not universe polymorphic Arguments bigcup2 [T]%_type_scope (A B)%_classical_set_scope n / _ (where some original arguments have been renamed) The reduction tactics unfold bigcup2 when applied to 4 arguments bigcup2 is transparent Expands to: Constant mathcomp.classical.classical_sets.bigcup2 Declared in library mathcomp.classical.classical_sets, line 2199, characters 11-18
Source code
Notation
Source code
Arguments inv_fun {T R} _ _ /.
Definition
bigcap2 : forall [T : Type], set T -> set T -> (set T) ^nat bigcap2 is not universe polymorphic Arguments bigcap2 [T]%_type_scope (A B)%_classical_set_scope n / _ (where some original arguments have been renamed) The reduction tactics unfold bigcap2 when applied to 4 arguments bigcap2 is transparent Expands to: Constant mathcomp.classical.classical_sets.bigcap2 Declared in library mathcomp.classical.classical_sets, line 2215, characters 11-18
Source code
if x is BSide c' _ then c == c' else false.
Lemma
Source code
x - y \is Num.real -> (`|x - y| < e) = (x - e < y < x + e).
Proof.
Definition
smallest : forall {T : Type}, (set T -> Prop) -> set T -> set T smallest is not universe polymorphic Arguments smallest {T}%_type_scope C%_function_scope G%_classical_set_scope _ smallest is transparent Expands to: Constant mathcomp.classical.classical_sets.smallest Declared in library mathcomp.classical.classical_sets, line 2455, characters 11-19
Source code
Section reassociate_products.
Context { : Type}.
Definition
bigcap_closed : forall {T : Type}, (set T -> Prop) -> Prop bigcap_closed is not universe polymorphic Arguments bigcap_closed {T}%_type_scope C%_function_scope bigcap_closed is transparent Expands to: Constant mathcomp.classical.classical_sets.bigcap_closed Declared in library mathcomp.classical.classical_sets, line 2482, characters 11-24
Source code
Source code
(xyz.1.1, (xyz.1.2, xyz.2)).
Definition
is_subset1 : forall {T : Type}, set T -> Prop is_subset1 is not universe polymorphic Arguments is_subset1 {T}%_type_scope A%_classical_set_scope is_subset1 is transparent Expands to: Constant mathcomp.classical.classical_sets.is_subset1 Declared in library mathcomp.classical.classical_sets, line 2504, characters 11-21
Source code
Source code
((xyz.1, xyz.2.1), xyz.2.2).
Lemma
Source code
Proof.
Lemma
Source code
Proof.
End reassociate_products.
Lemma
Source code
Proof.
Definition
is_fun : forall {T1 T2 : Type}, (T1 -> T2 -> Prop) -> Prop is_fun is not universe polymorphic Arguments is_fun {T1 T2}%_type_scope f%_function_scope is_fun is transparent Expands to: Constant mathcomp.classical.classical_sets.is_fun Declared in library mathcomp.classical.classical_sets, line 2505, characters 11-17
Source code
(f x.1, f x.2).
Section order_min.
Variables ( : Order.disp_t) ( : orderType d).
Lemma
Source code
Proof.
End order_min.
Section bijection_forall.
Lemma
Source code
bijective f -> (forall , P y) <-> (forall , P (f x)).
Proof.
End bijection_forall.
Lemma
Source code
{in p, forall , P x /\ Q x} <->
{in p, forall , P x} /\ {in p, forall , Q x}.
Proof.
by split; [apply: cnd1 | apply: cnd2].
Qed.
Lemma
Source code
{in `[a, b] &, {mono f : / (x <= y)%O}} ->
{homo f : / x \in `[a, b] >-> x \in `[f a, f b]}.
Proof.
Lemma
Source code
{in `[a, b] &, {mono f : /~ (x <= y)%O}} ->
{homo f : / x \in `[a, b] >-> x \in `[f b, f a]}.
Proof.
Definition
is_total : forall {T1 T2 : Type}, (T1 -> T2 -> Prop) -> Prop is_total is not universe polymorphic Arguments is_total {T1 T2}%_type_scope f%_function_scope is_total is transparent Expands to: Constant mathcomp.classical.classical_sets.is_total Declared in library mathcomp.classical.classical_sets, line 2506, characters 11-19
Source code
( : forall , X i -> T) ( : { & X i}) : T :=
(f (projT1 x) (projT2 x)).
Section FsetPartitions.
Variables : choiceType.
Implicit Types (x y z : T) (A B D X : {fset T}) (P Q : {fset {fset T}}).
Implicit Types (J : pred I) (F : I -> {fset T}).
Variables ( : Type) (
Source code
Let
Source code
(\big[op/idx]_( <- P) \big[op/idx]_( <- A | K x) E x)%fset.
Let
Source code
Lemma
Source code
( : {fset I}) :
(forall , i \in K -> j \in K -> i != j -> [disjoint F i & F j])%fset ->
\big[op/idx]_( <- \big[fsetU/fset0]_( <- K) (F x)) f i =
\big[op/idx]_( <- K) (\big[op/idx]_( <- F k) f i).
Proof.
have trivP : trivIfset P.
apply/trivIfsetP => _ _ /imfsetP[i iK ->] /imfsetP[j jK ->] neqFij.
move: iK; rewrite !inE/= => /andP[iK Fi0].
move: jK; rewrite !inE/= => /andP[jK Fj0].
by apply: (disjF _ _ iK jK); apply: contraNneq neqFij => ->.
have -> : (\bigcup_( <- K) F i)%fset = fcover P.
apply/esym; rewrite /P fcover_imfset big_mkcond /=; apply eq_bigr => i _.
by case: ifPn => // /negPn/eqP.
rewrite big_trivIfset // /rhs big_imfset => [i j iK /andP[jK notFj0] eqFij|] /=.
move: iK; rewrite !inE/= => /andP[iK Fi0].
by apply: contraNeq (disjF _ _ iK jK) _; rewrite -fsetI_eq0 eqFij fsetIid.
rewrite big_filter big_mkcond; apply eq_bigr => i _.
by case: ifPn => // /negPn /eqP ->; rewrite big_seq_fset0.
Qed.
End FsetPartitions.
Lemma
Source code
(forall , x \in s -> 0 <= x <= 1)%R -> (\prod_( <- s) j <= 1)%R.
Proof.
have /andP[y0 y1] : (0 <= y <= 1)%R by rewrite xs01// mem_head.
rewrite mulr_ile1 ?andbT//.
rewrite big_seq prodr_ge0// => x xs.
by have := xs01 x; rewrite inE xs orbT => /(_ _)/andP[].
by rewrite ih// => e xs; rewrite xs01// in_cons xs orbT.
Qed.
Lemma
Source code
Proof.
Lemma
Source code
[ : pred I] [ : I -> R] :
has P r ->
(forall : I, P i -> F i < G i) ->
\sum_( <- r | P i) F i < \sum_( <- r | P i) G i.
Proof.
case: filter (filter_all P r) => //= x {}r /andP[Px Pr] _ ltFG.
rewrite !big_cons ltr_leD// ?ltFG// -(all_filterP Pr) !big_filter.
by rewrite ler_sum => // i Pi; rewrite ltW ?ltFG.
Qed.
Lemma
Source code
(m < n)%N -> (forall : nat, (m <= i < n)%N -> F i < G i) ->
\sum_(m <= < n) F i < \sum_(m <= < n) G i.
Proof.
Lemma
Source code
(forall , P x <-> P' x) ->
(exists2 , P x & Q x) <-> (exists2 , P' x & Q x).
Proof.
Qed.
Lemma
Source code
(forall , Q x <-> Q' x) ->
(exists2 , P x & Q x) <-> (exists2 , P x & Q' x).
Proof.
Declare Scope signature_scope.
Delimit Scope signature_scope with signature.
Import -(notations) Morphisms.
Arguments Proper {A}%_type R%_signature m.
Arguments respectful {A B}%_type (R R')%_signature _ _.
Module
Source code
Notation
Source code
(right associativity, at level 55) : signature_scope.
Notation
Source code
(right associativity, at level 55) : signature_scope.
Notation
Source code
(right associativity, at level 55) : signature_scope.
Export -(notations) Morphisms.
End ProperNotations.
Lemma
Source code
Proof.
Lemma
Source code
Proof.
Lemma
Source code
x \is Num.real -> x < (Num.bound x)%:R.
Proof.
Lemma
Source code
x \is Num.real -> - x < (Num.bound x)%:R.
Proof.
Lemma
Source code
Proof.
Lemma
Source code
Proof.
Module
Source code
.
Source code
Source code
Source code
Source code
norm0 : norm 0 = 0 ;
norm_ge0 : forall , 0 <= norm x ;
ler_normD : forall , norm (x + y) <= norm x + norm y ;
normZ : forall , norm (r *: x) = `|r| * norm x
}.
Source code
.
Source code
Source code
Source code
Source code
.
Source code
Source code
Source code
Source code
(norm : L -> K) := { norm0_eq0 : forall , norm x = 0 -> x = 0 }.
Source code
.
Source code
Source code
Source code
{
Source code
Module Import
Source code
Section Theory.
Variables ( : numDomainType) ( : lmodType K) (
Source code
Lemma
Source code
Proof.
Lemma
Source code
Lemma
Source code
norm (\sum_( <- r) F i) <= \sum_( <- r) norm (F i).
End Theory.
End Theory.
Module Import
Source code
End Norm.
Export Norm.Exports.