Skip to content

Commit 7dc022f

Browse files
committed
fix compatibility with 9.2; still compatible with 8.17
1 parent 684fcf7 commit 7dc022f

25 files changed

+244
-248
lines changed

Arith/Nk_ind.v

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ USA.
2121

2222
Require Import PeanoNat.
2323
Require Import Compare.
24+
Require Import Lia.
2425
Open Scope nat_scope.
2526

2627
(* begin hide *)
@@ -141,11 +142,7 @@ reflexivity.
141142
intro.
142143
unfold kth_S. fold kth_S.
143144
rewrite IHk.
144-
assert (n + S k + 1=S k + n +1).
145-
auto with arith.
146-
rewrite H. clear H.
147-
simpl.
148-
auto with arith.
145+
lia.
149146
Qed.
150147

151148
(** introduction of [next_P_k] *)

Complex/CFsequence_facts.v

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -418,8 +418,8 @@ Proof.
418418
replace (sum_f_R0 An N + sum_f_R0 (fun l:nat => An (S N + l)%nat) n)%R with
419419
(sum_f_R0 An (S (N + n)))%R.
420420
apply HN' ; intuition lia.
421-
assert (N_pos : (0 <= N)%nat) by intuition.
422-
assert (N_ub : (N < S (N + n))%nat) by intuition.
421+
assert (N_pos : (0 <= N)%nat) by auto with arith.
422+
assert (N_ub : (N < S (N + n))%nat) by auto with arith.
423423
intros; assert (H := sigma_split An N_pos N_ub) ; unfold sigma in H.
424424
do 2 rewrite Nat.sub_0_r in H.
425425
replace (sum_f_R0 An (S (N + n))) with
@@ -441,8 +441,8 @@ Proof.
441441
replace ((CFpartial_sum (fun n0 : nat => fn n0 x) N + sum_f_C0 (fun l:nat => fn (S N + l)%nat x) n))
442442
with (CFpartial_sum (fun n0 : nat => fn n0 x) (S N + n)%nat).
443443
apply HN' ; intuition lia.
444-
assert (N_pos : (0 <= N)%nat) by intuition.
445-
assert (N_ub : (N < S (N + n))%nat) by intuition.
444+
assert (N_pos : (0 <= N)%nat) by auto with arith.
445+
assert (N_ub : (N < S (N + n))%nat) by auto with arith.
446446
intros; assert (H := Csigma_split (fun n => fn n x) O (S (N + n)) N N_pos N_ub) ; unfold Csigma in H.
447447
do 2 rewrite Nat.sub_0_r in H.
448448
replace (CFpartial_sum (fun n0 : nat => fn n0 x) (S N + n)) with
@@ -464,8 +464,8 @@ Proof.
464464
replace (sum_f_R0 An N + sum_f_R0 (fun l:nat => An (S N + l)%nat) n)%R with
465465
(sum_f_R0 An (S (N + n)))%R.
466466
apply HN' ; intuition lia.
467-
assert (N_pos : (0 <= N)%nat) by intuition.
468-
assert (N_ub : (N < S (N + n))%nat) by intuition.
467+
assert (N_pos : (0 <= N)%nat) by auto with arith.
468+
assert (N_ub : (N < S (N + n))%nat) by auto with arith.
469469
intros; assert (H := sigma_split An N_pos N_ub) ; unfold sigma in H.
470470
do 2 rewrite Nat.sub_0_r in H.
471471
replace (sum_f_R0 An (S (N + n))) with
@@ -487,8 +487,8 @@ Proof.
487487
replace ((CFpartial_sum (fun n0 : nat => fn n0 x) N + sum_f_C0 (fun l:nat => fn (S N + l)%nat x) n))
488488
with (CFpartial_sum (fun n0 : nat => fn n0 x) (S N + n)%nat).
489489
apply HN' ; intuition lia.
490-
assert (N_pos : (0 <= N)%nat) by intuition.
491-
assert (N_ub : (N < S (N + n))%nat) by intuition.
490+
assert (N_pos : (0 <= N)%nat) by auto with arith.
491+
assert (N_ub : (N < S (N + n))%nat) by auto with arith.
492492
intros; assert (H := Csigma_split (fun n => fn n x) O (S (N + n)) N N_pos N_ub) ; unfold Csigma in H.
493493
do 2 rewrite Nat.sub_0_r in H.
494494
replace (CFpartial_sum (fun n0 : nat => fn n0 x) (S N + n)) with

Complex/Canalysis_deriv.v

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,7 @@ intros f x Hf_deriv eps eps_pos ; destruct Hf_deriv as (l, Hl).
178178
destruct (Hl (eps / 2)%R eps_2_pos) as ([alpha alpha_pos], Halpha) ;
179179
exists (Rmin (1/2) alpha) ; split ; [apply Rmin_pos ; lra|] ;
180180
intros x' [_ x'_bd] ; simpl ; simpl in Halpha ; unfold C_dist in *.
181-
pose (h := x' - x) ; replace x' with (x + h) by (unfold h ; intuition).
181+
pose (h := x' - x) ; replace x' with (x + h) by (unfold h; auto with complex).
182182
case (Ceq_or_neq_C0 h) ; intro Hh_0.
183183
rewrite Hh_0, Cadd_0_r, Cminus_diag_eq ; [| reflexivity] ;
184184
rewrite Cnorm_C0 ; assumption.
@@ -195,7 +195,7 @@ intros f x Hf_deriv eps eps_pos ; destruct Hf_deriv as (l, Hl).
195195
apply Rlt_trans with ((Rmin (1/2) alpha) * eps)%R.
196196
apply Rmult_lt_compat_r ; assumption.
197197
apply Rle_lt_trans with (eps / 2)%R.
198-
unfold Rdiv ; rewrite Rmult_comm ; apply Rmult_le_compat_l ; intuition ;
198+
unfold Rdiv ; rewrite Rmult_comm ; apply Rmult_le_compat_l ; auto with real;
199199
apply Rle_trans with (1 * /2)%R ; [apply Rmin_l | right ; field].
200200
lra.
201201
assert (eps_2_pos : eps / 2 > 0) by lra ;
@@ -209,7 +209,7 @@ intros f x Hf_deriv eps eps_pos ; destruct Hf_deriv as (l, Hl).
209209
apply Rgt_not_eq ; apply Cnorm_pos_lt ; assumption.
210210
apply Rmin_pos ; lra.
211211
intros x' [_ x'_bd] ; simpl ; unfold C_dist.
212-
pose (h := x' - x) ; replace x' with (x+h) by (unfold h ; intuition) ;
212+
pose (h := x' - x) ; replace x' with (x+h) by (unfold h ; intuition auto with complex) ;
213213
case (Ceq_or_neq_C0 h) ; intro Hh_0.
214214
rewrite Hh_0, Cadd_0_r, Cminus_diag_eq ; [| reflexivity] ;
215215
rewrite Cnorm_C0 ; assumption.

Complex/Cexp.v

Lines changed: 24 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ intro n ; unfold exp_seq, An_deriv, Cseq_shift, Cseq_mult.
6666
replace (fact (S n))%nat with ((S n) * fact n)%nat by reflexivity.
6767
rewrite mult_INC, Cinv_mult_distr, <- Cmult_assoc, Cinv_r, Cmult_1_l ;
6868
[reflexivity | | |] ; replace C0 with (INC O) by reflexivity ; apply not_INC ;
69-
try apply fact_neq_0 ; intuition.
69+
try apply fact_neq_0 ; intuition auto with *.
7070
Qed.
7171

7272
(** * This power serie has a radius of convergence that is infinite *)
@@ -90,11 +90,11 @@ assert (t : (1 > 0)%nat) by constructor ;
9090
apply Rle_trans with (R_dist ((/ Rseq_shift (Rseq_poly 1))%Rseq (N + n)%nat) 0).
9191
right ; unfold R_dist, Rseq_shift, Rseq_poly, pow ; apply Rabs_eq_compat ;
9292
rewrite Rminus_0_r, <- (Rmult_1_r (INR (S (N + n)))) ; reflexivity.
93-
left ; apply HN ; intuition.
94-
apply not_0_INR ; intuition.
93+
left ; apply HN ; intuition auto with *.
94+
apply not_0_INR ; intuition auto with *.
9595

9696
unfold M ; rewrite Rinv_involutive ; [| apply Rgt_not_eq ; apply Rplus_le_lt_0_compat ;
97-
[apply Rabs_pos | apply Rlt_0_1]] ; intuition.
97+
[apply Rabs_pos | apply Rlt_0_1]] ; intuition auto with *.
9898
Qed.
9999

100100
Definition Cexp (z : C) := sum _ exp_infinite_cv_radius z.
@@ -156,7 +156,7 @@ Lemma Cre_Cpow_2 : forall (a : R) (n : nat), Cre ((0 +i a) ^ (2 * n)) = ((-1) ^
156156
Proof.
157157
intros a n ; induction n.
158158
simpl ; ring.
159-
replace (2 * S n)%nat with (S (S (2 * n))) by intuition.
159+
replace (2 * S n)%nat with (S (S (2 * n))) by intuition auto with *.
160160
do 2 rewrite Cpow_S, Cre_mul ; rewrite IHn.
161161
rewrite Cim_mul.
162162
replace (Cre (0 +i a)) with R0 by reflexivity.
@@ -167,7 +167,7 @@ Lemma Cim_Cpow_2 : forall (a : R) (n : nat), Cim ((0 +i a) ^ (2 * n)) = R0.
167167
Proof.
168168
intros a n ; induction n.
169169
simpl ; ring.
170-
replace (2 * S n)%nat with (S (S (2 * n))) by intuition.
170+
replace (2 * S n)%nat with (S (S (2 * n))) by intuition auto with *.
171171
do 2 rewrite Cpow_S, Cim_mul ; rewrite IHn.
172172
rewrite Cre_mul.
173173
replace (Cre (0 +i a)) with R0 by reflexivity.
@@ -178,7 +178,7 @@ Lemma Cre_Cpow_S2 : forall (a : R) (p : nat), Cre ((0 +i a) ^ S (2 * p)) = R0.
178178
Proof.
179179
intros a n ; induction n.
180180
simpl ; ring.
181-
replace (2 * S n)%nat with (S (S (2 * n))) by intuition.
181+
replace (2 * S n)%nat with (S (S (2 * n))) by intuition auto with *.
182182
do 2 rewrite Cpow_S, Cre_mul ; rewrite IHn.
183183
rewrite Cim_mul.
184184
replace (Cre (0 +i a)) with R0 by reflexivity.
@@ -189,7 +189,7 @@ Lemma Cim_Cpow_S2 : forall (a : R) (n : nat), Cim ((0 +i a) ^ (S (2 * n))) = ((-
189189
Proof.
190190
intros a n ; induction n.
191191
simpl ; ring.
192-
replace (2 * S n)%nat with (S (S (2 * n))) by intuition.
192+
replace (2 * S n)%nat with (S (S (2 * n))) by intuition auto with *.
193193
do 2 rewrite Cpow_S, Cim_mul ; rewrite IHn.
194194
rewrite Cre_mul.
195195
replace (Cre (0 +i a)) with R0 by reflexivity.
@@ -214,18 +214,18 @@ intros a ; rewrite <- Ceq ; split ; simpl ;
214214

215215
clear ; induction p.
216216
simpl ; field.
217-
replace (2 * S p)%nat with (S (S (2 * p)))%nat by intuition.
217+
replace (2 * S p)%nat with (S (S (2 * p)))%nat by intuition auto with *.
218218
do 2 rewrite sum_f_C0_simpl ; rewrite tech5 ; do 2 rewrite<- Cre_add_compat ;
219219
rewrite <- IHp, Rplus_assoc ; apply Rplus_eq_compat_l.
220220
replace ((-1) ^ S p / INR (fact (2 * S p)) * a² ^ S p)%R
221221
with (Cre (gt_pser exp_seq (0 +i a) (S (S (2 * p))))).
222222
replace (Cre (gt_pser exp_seq (0 +i a) (S (2 * p))))%R with R0.
223223
symmetry ; apply Rplus_0_l.
224224
unfold_gt ; unfold exp_seq ; rewrite Cre_mul.
225-
replace (S (S (2 * p))) with (2 * S p)%nat by intuition.
225+
replace (S (S (2 * p))) with (2 * S p)%nat by intuition auto with *.
226226
rewrite Cim_inv_INC, Rmult_0_l, Cre_Cpow_S2 ; ring.
227227
unfold_gt ; unfold exp_seq ; rewrite Cre_mul.
228-
replace (S (S (2 * p))) with (2 * S p)%nat by intuition.
228+
replace (S (S (2 * p))) with (2 * S p)%nat by intuition auto with *.
229229
rewrite Cre_Cpow_2, Cim_Cpow_2, INC_inv_Cre_INR.
230230
unfold Rsqr ; rewrite pow_mult, Rmult_0_r, Rminus_0_r.
231231
rewrite Rmult_comm ; unfold Rdiv ; do 2 rewrite Rmult_assoc ;
@@ -240,18 +240,18 @@ clear ; induction p.
240240

241241
clear ; induction p.
242242
simpl ; field.
243-
replace (2 * S p)%nat with (S (S (2 * p)))%nat by intuition.
243+
replace (2 * S p)%nat with (S (S (2 * p)))%nat by intuition auto with *.
244244
do 2 rewrite sum_f_C0_simpl ; rewrite tech5 ; do 2 rewrite<- Cre_add_compat ;
245245
rewrite <- IHp, Rplus_assoc ; apply Rplus_eq_compat_l.
246246
replace ((-1) ^ S p / INR (fact (2 * S p)) * a² ^ S p)%R
247247
with (Cre (gt_pser exp_seq (0 +i a) (S (S (2 * p))))).
248248
replace (Cre (gt_pser exp_seq (0 +i a) (S (S (S (2 * p))))))%R with R0.
249249
symmetry ; apply Rplus_0_r.
250250
unfold_gt ; unfold exp_seq ; rewrite Cre_mul.
251-
replace (S (S (2 * p))) with (2 * S p)%nat by intuition.
251+
replace (S (S (2 * p))) with (2 * S p)%nat by intuition auto with *.
252252
rewrite Cim_inv_INC, Rmult_0_l, Cre_Cpow_S2 ; ring.
253253
unfold_gt ; unfold exp_seq ; rewrite Cre_mul.
254-
replace (S (S (2 * p))) with (2 * S p)%nat by intuition.
254+
replace (S (S (2 * p))) with (2 * S p)%nat by intuition auto with *.
255255
rewrite Cre_Cpow_2, Cim_Cpow_2, INC_inv_Cre_INR.
256256
unfold Rsqr ; rewrite pow_mult, Rmult_0_r, Rminus_0_r.
257257
rewrite Rmult_comm ; unfold Rdiv ; do 2 rewrite Rmult_assoc ;
@@ -272,8 +272,8 @@ clear ; induction p.
272272
simpl ; field.
273273
rewrite sum_f_C0_simpl, <- Cim_add_compat, IHn, Rplus_0_l ;
274274
unfold gt_pser ; replace (0 +i 0) with C0 by reflexivity.
275-
unfold Cseq_mult ; rewrite C0_pow, Cmult_0_r ; simpl ; intuition.
276-
intuition.
275+
unfold Cseq_mult ; rewrite C0_pow, Cmult_0_r ; simpl ; intuition auto with *.
276+
intuition auto with *.
277277

278278
pose (eps' := (eps / Rabs a)%R) ; assert (eps'_pos : 0 < eps').
279279
unfold eps', Rdiv ; apply Rlt_mult_inv_pos ; [| apply Rabs_pos_lt] ; assumption.
@@ -292,7 +292,7 @@ destruct (Hl' _ eps'_pos) as [N HN] ; exists (S (2 * N))%nat ;
292292
clear ; induction p.
293293
simpl ; field.
294294

295-
replace (2 * S (S p))%nat with (S (S (2 * S p))) by intuition.
295+
replace (2 * S (S p))%nat with (S (S (2 * S p))) by intuition auto with *.
296296
rewrite tech5 ; do 2 rewrite sum_f_C0_simpl, <- Cim_add_compat.
297297
rewrite IHp, Rplus_assoc ; apply Rplus_eq_compat_l.
298298
replace (Cim (gt_pser exp_seq (0 +i a) (S (S (2 * S p)))))%R with R0.
@@ -302,7 +302,7 @@ destruct (Hl' _ eps'_pos) as [N HN] ; exists (S (2 * N))%nat ;
302302
unfold Rsqr.
303303
rewrite INC_inv_Cre_INR.
304304
replace (a ^ S (2 * S p))%R with (a * (a ^ 2) ^ (S p))%R.
305-
replace (2 * S p + 1)%nat with (S (2 * S p)) by intuition.
305+
replace (2 * S p + 1)%nat with (S (2 * S p)) by intuition auto with *.
306306
rewrite (Rmult_comm (/ INR (fact (S (2 * S p)))) _) ; unfold Rdiv ;
307307
repeat rewrite Rmult_assoc ; apply Rmult_eq_compat_l.
308308
rewrite Rmult_comm, <- Rmult_assoc ; apply Rmult_eq_compat_r.
@@ -311,7 +311,7 @@ destruct (Hl' _ eps'_pos) as [N HN] ; exists (S (2 * N))%nat ;
311311
rewrite <- pow_mult ; simpl ; reflexivity.
312312
apply fact_neq_0.
313313
unfold_gt ; unfold exp_seq ; rewrite Cim_mul ;
314-
replace ( S (S (2 * S p))) with (2 * (S (S p)))%nat by intuition ;
314+
replace ( S (S (2 * S p))) with (2 * (S (S p)))%nat by (intuition auto with *) ;
315315
rewrite Cim_Cpow_2, INC_inv_Cim_INR.
316316
do 2 rewrite Rmult_0_r ; ring.
317317
apply fact_neq_0.
@@ -325,18 +325,18 @@ apply fact_neq_0.
325325
clear ; induction p.
326326
simpl ; field.
327327

328-
replace (2 * (S p))%nat with (S (S (2 * p))) by intuition.
328+
replace (2 * (S p))%nat with (S (S (2 * p))) by intuition auto with *.
329329
rewrite tech5 ; do 2 rewrite sum_f_C0_simpl, <- Cim_add_compat.
330330
rewrite IHp, Rplus_assoc ; apply Rplus_eq_compat_l.
331331
replace (Cim (gt_pser exp_seq (0 +i a) (S (S (2 * p)))))%R with R0.
332332
unfold_gt ; unfold exp_seq.
333-
replace (S (S (S (2 * p)))) with (S (2 * (S p))) by intuition.
333+
replace (S (S (S (2 * p)))) with (S (2 * (S p))) by intuition auto with *.
334334
rewrite Cim_mul, Cre_Cpow_S2, Cim_Cpow_S2, Rmult_0_l,
335335
Rplus_0_l, Rplus_0_r.
336336
unfold Rsqr.
337337
rewrite INC_inv_Cre_INR.
338338
replace (a ^ S (2 * S p))%R with (a * (a ^ 2) ^ (S p))%R.
339-
replace (2 * S p + 1)%nat with (S (2 * S p)) by intuition.
339+
replace (2 * S p + 1)%nat with (S (2 * S p)) by intuition auto with *.
340340
rewrite (Rmult_comm (/ INR (fact (S (2 * S p)))) _) ; unfold Rdiv ;
341341
repeat rewrite Rmult_assoc ; apply Rmult_eq_compat_l.
342342
rewrite Rmult_comm, <- Rmult_assoc ; apply Rmult_eq_compat_r.
@@ -345,15 +345,15 @@ apply fact_neq_0.
345345
rewrite <- pow_mult ; simpl ; reflexivity.
346346
apply fact_neq_0.
347347
unfold_gt ; unfold exp_seq ; rewrite Cim_mul ;
348-
replace (S (S (2 * p))) with (2 * (S p))%nat by intuition ;
348+
replace (S (S (2 * p))) with (2 * (S p))%nat by (intuition auto with *) ;
349349
rewrite Cim_Cpow_2, INC_inv_Cim_INR.
350350
do 2 rewrite Rmult_0_r ; ring.
351351
apply fact_neq_0.
352352
Qed.
353353

354354
Lemma Cexp_abs_cv : forall z, {l | Cser_abs_cv (gt_pser exp_seq z) l}.
355355
Proof.
356-
intro z ; assert (z_bd : Cnorm z < Cnorm z + 1) by intuition ;
356+
intro z ; assert (z_bd : Cnorm z < Cnorm z + 1) by (intuition auto with *);
357357
destruct (Cpser_abel2_prelim _ _ (exp_infinite_cv_radius (Cnorm z + 1)%R) _ z_bd) as [l Hl].
358358
unfold Cpser_norm in Hl.
359359
exists (Cre l) ; unfold Cser_abs_cv.

Complex/Cpow_plus.v

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ Proof.
122122
intros n zR zI.
123123
apply sum_f_C0_eq_seq.
124124
intros n0 H.
125-
replace (zR +i zI) with ((zR, 0%R) + (0%R, zI)) by (rewrite <- Ceq ; simpl ; intuition).
125+
replace (zR +i zI) with ((zR, 0%R) + (0%R, zI)) by (rewrite <- Ceq ; simpl ; intuition auto with *).
126126
generalize equi_binom_add. intro Hn1. unfold Cdiv in *. apply Hn1. exact H.
127127
Qed.
128128
(* end hide *)
@@ -175,8 +175,8 @@ field.
175175
split ; try split ; apply not_0_INC ; try apply fact_neq_0 ; intuition lia.
176176
}
177177
ring_simplify.
178-
replace (S n - S n)%nat with O by intuition.
179-
replace (S (S n) - S (S n))%nat with O by intuition.
178+
replace (S n - S n)%nat with O by intuition auto with *.
179+
replace (S (S n) - S (S n))%nat with O by intuition auto with *.
180180
repeat rewrite fact_simpl.
181181
repeat rewrite mult_INC. simpl (INC 0).
182182
field_simplify. unfold Cdiv. repeat rewrite Cmult_0_r. rewrite Cmult_0_l. reflexivity.

0 commit comments

Comments
 (0)