Proof Assistant Projects
Collection
Digesting proof assistant libraries for AI ingestion.
•
79 items
•
Updated
•
2
fact
stringlengths 6
40.2k
| type
stringclasses 14
values | library
stringclasses 2
values | imports
listlengths 2
4
| filename
stringclasses 28
values | symbolic_name
stringlengths 1
36
| docstring
stringclasses 1
value |
|---|---|---|---|---|---|---|
pos_rat := repeat ( apply Rdiv_lt_0_compat || apply Rplus_lt_0_compat || apply Rmult_lt_0_compat) ; try by apply Rlt_0_1.
|
Ltac
|
examples
|
[
"From Coq Require Import Reals Psatz ssreflect.",
"From Coquelicot Require Import Rcomplements Rbar Hierarchy Derive RInt Continuity Lim_seq ElemFct RInt_analysis."
] |
examples/BacS2013.v
|
pos_rat
| |
sign_0_lt : forall x, 0 < x <-> 0 < sign x. Proof. intros x. unfold sign. destruct total_order_T as [[H|H]|H] ; lra. Qed.
|
Lemma
|
examples
|
[
"From Coq Require Import Reals Psatz ssreflect.",
"From Coquelicot Require Import Rcomplements Rbar Hierarchy Derive RInt Continuity Lim_seq ElemFct RInt_analysis."
] |
examples/BacS2013.v
|
sign_0_lt
| |
sign_lt_0 : forall x, x < 0 <-> sign x < 0. Proof. intros x. unfold sign. destruct total_order_T as [[H|H]|H] ; lra. Qed. (** * Exercice 2 *) (* 8:14 *)
|
Lemma
|
examples
|
[
"From Coq Require Import Reals Psatz ssreflect.",
"From Coquelicot Require Import Rcomplements Rbar Hierarchy Derive RInt Continuity Lim_seq ElemFct RInt_analysis."
] |
examples/BacS2013.v
|
sign_lt_0
| |
fab (a b x : R) : R := (a + b * ln x) / x. (** ** Questions 1 *) (** 1.a. On voit sur le graphique que l'image de 1 par f correspond au point B(1,2). On a donc f(1) = 2. Comme la tangente (BC) à la courbe en ce point admet pour coefficient directeur 0, f'(1) = 0 *) (** 1.b *)
|
Definition
|
examples
|
[
"From Coq Require Import Reals Psatz ssreflect.",
"From Coquelicot Require Import Rcomplements Rbar Hierarchy Derive RInt Continuity Lim_seq ElemFct RInt_analysis."
] |
examples/BacS2013.v
|
fab
| |
Dfab (a b : R) : forall x, 0 < x -> is_derive (fab a b) x (((b - a) - b * ln x) / x ^ 2). Proof. move => x Hx. evar_last. apply is_derive_div. apply @is_derive_plus. apply is_derive_const. apply is_derive_scal. now apply is_derive_Reals, derivable_pt_lim_ln. apply is_derive_id. by apply Rgt_not_eq. rewrite /Rdiv /plus /zero /one /=. field. by apply Rgt_not_eq. Qed. (** 1.c *)
|
Lemma
|
examples
|
[
"From Coq Require Import Reals Psatz ssreflect.",
"From Coquelicot Require Import Rcomplements Rbar Hierarchy Derive RInt Continuity Lim_seq ElemFct RInt_analysis."
] |
examples/BacS2013.v
|
Dfab
| |
Val_a_b (a b : R) : fab a b 1 = 2 -> Derive (fab a b) 1 = 0 -> a = 2 /\ b = 2. Proof. move => Hf Hdf. rewrite /fab in Hf. rewrite ln_1 in Hf. rewrite Rdiv_1 in Hf. rewrite Rmult_0_r in Hf. rewrite Rplus_0_r in Hf. rewrite Hf in Hdf |- * => {a Hf}. split. reflexivity. replace (Derive (fab 2 b) 1) with (((b - 2) - b * ln 1) / 1 ^ 2) in Hdf. rewrite ln_1 /= in Hdf. field_simplify in Hdf. rewrite ?Rdiv_1 in Hdf. by apply Rminus_diag_uniq. apply sym_eq, is_derive_unique. apply Dfab. by apply Rlt_0_1. Qed.
|
Lemma
|
examples
|
[
"From Coq Require Import Reals Psatz ssreflect.",
"From Coquelicot Require Import Rcomplements Rbar Hierarchy Derive RInt Continuity Lim_seq ElemFct RInt_analysis."
] |
examples/BacS2013.v
|
Val_a_b
| |
f (x : R) : R := fab 2 2 x. (** ** Questions 2 *) (* 8:38 *) (** 2.a. *)
|
Definition
|
examples
|
[
"From Coq Require Import Reals Psatz ssreflect.",
"From Coquelicot Require Import Rcomplements Rbar Hierarchy Derive RInt Continuity Lim_seq ElemFct RInt_analysis."
] |
examples/BacS2013.v
|
f
| |
Signe_df : forall x, 0 < x -> sign (Derive f x) = sign (- ln x). Proof. move => x Hx. rewrite (is_derive_unique f x _ (Dfab 2 2 x Hx)). replace ((2 - 2 - 2 * ln x) / x ^ 2) with (2 / x ^ 2 * (- ln x)) by (field ; now apply Rgt_not_eq). rewrite sign_mult sign_eq_1. apply Rmult_1_l. apply Rdiv_lt_0_compat. apply Rlt_0_2. apply pow2_gt_0. by apply Rgt_not_eq. Qed. (** 2.b. *)
|
Lemma
|
examples
|
[
"From Coq Require Import Reals Psatz ssreflect.",
"From Coquelicot Require Import Rcomplements Rbar Hierarchy Derive RInt Continuity Lim_seq ElemFct RInt_analysis."
] |
examples/BacS2013.v
|
Signe_df
| |
filterlim_f_0 : filterlim f (at_right 0) (Rbar_locally m_infty). Proof. unfold f, fab. eapply (filterlim_comp_2 _ _ Rmult). eapply filterlim_comp_2. apply filterlim_const. eapply filterlim_comp_2. apply filterlim_const. by apply is_lim_ln_0. apply (filterlim_Rbar_mult 2 m_infty m_infty). unfold is_Rbar_mult, Rbar_mult'. case: Rle_dec (Rlt_le _ _ Rlt_0_2) => // H _ ; case: Rle_lt_or_eq_dec (Rlt_not_eq _ _ Rlt_0_2) => //. apply (filterlim_Rbar_plus 2 _ m_infty). by []. by apply filterlim_Rinv_0_right. by apply (filterlim_Rbar_mult m_infty p_infty). Qed.
|
Lemma
|
examples
|
[
"From Coq Require Import Reals Psatz ssreflect.",
"From Coquelicot Require Import Rcomplements Rbar Hierarchy Derive RInt Continuity Lim_seq ElemFct RInt_analysis."
] |
examples/BacS2013.v
|
filterlim_f_0
| |
Lim_f_p_infty : is_lim f p_infty 0. Proof. apply is_lim_ext_loc with (fun x => 2 / x + 2 * (ln x / x)). exists 0. move => y Hy. rewrite /f /fab. field. by apply Rgt_not_eq. eapply is_lim_plus. apply is_lim_scal_l. apply is_lim_inv. by apply is_lim_id. by []. apply is_lim_scal_l. by apply is_lim_div_ln_p. unfold is_Rbar_plus, Rbar_plus' ; apply f_equal, f_equal ; ring. Qed. (** 2.c. *)
|
Lemma
|
examples
|
[
"From Coq Require Import Reals Psatz ssreflect.",
"From Coquelicot Require Import Rcomplements Rbar Hierarchy Derive RInt Continuity Lim_seq ElemFct RInt_analysis."
] |
examples/BacS2013.v
|
Lim_f_p_infty
| |
Variation_1 : forall x y, 0 < x -> x < y -> y < 1 -> f x < f y. Proof. apply (incr_function _ 0 1 (fun x => (2 - 2 - 2 * ln x) / x ^ 2)). move => x H0x Hx1. by apply (Dfab 2 2 x). move => x H0x Hx1. apply sign_0_lt. rewrite -(is_derive_unique _ _ _ (Dfab 2 2 x H0x)). rewrite Signe_df. apply -> sign_0_lt. apply Ropp_lt_cancel ; rewrite Ropp_0 Ropp_involutive. rewrite -ln_1. by apply ln_increasing. by apply H0x. Qed.
|
Lemma
|
examples
|
[
"From Coq Require Import Reals Psatz ssreflect.",
"From Coquelicot Require Import Rcomplements Rbar Hierarchy Derive RInt Continuity Lim_seq ElemFct RInt_analysis."
] |
examples/BacS2013.v
|
Variation_1
| |
Variation_2 : forall x y, 1 < x -> x < y -> f x > f y. Proof. move => x y H1x Hxy. apply Ropp_lt_cancel. apply (incr_function (fun x => - f x) 1 p_infty (fun z => - ((2 - 2 - 2 * ln z) / z ^ 2))). move => z H1z _. apply: is_derive_opp. apply (Dfab 2 2 z). by apply Rlt_trans with (1 := Rlt_0_1). move => z H1z _. apply Ropp_lt_cancel ; rewrite Ropp_0 Ropp_involutive. apply sign_lt_0. rewrite -(is_derive_unique _ _ _ (Dfab 2 2 z (Rlt_trans _ _ _ Rlt_0_1 H1z))). rewrite Signe_df. apply -> sign_lt_0. apply Ropp_lt_cancel ; rewrite Ropp_0 Ropp_involutive. rewrite -ln_1. apply ln_increasing. by apply Rlt_0_1. by apply H1z. by apply Rlt_trans with (1 := Rlt_0_1). by []. by []. by []. Qed. (** ** Questions 3 *) (* 9:40 *) (** 3.a *)
|
Lemma
|
examples
|
[
"From Coq Require Import Reals Psatz ssreflect.",
"From Coquelicot Require Import Rcomplements Rbar Hierarchy Derive RInt Continuity Lim_seq ElemFct RInt_analysis."
] |
examples/BacS2013.v
|
Variation_2
| |
f_eq_1_0_1 : exists x, 0 < x <= 1 /\ f x = 1. Proof. case: (IVT_Rbar_incr (fun x => f (Rabs x)) 0 1 m_infty 2 1). eapply filterlim_comp. apply filterlim_Rabs_0. by apply filterlim_f_0. apply is_lim_comp with 1. replace 2 with (f 1). apply is_lim_continuity. apply derivable_continuous_pt. exists (((2 - 2) - 2 * ln 1) / 1 ^ 2) ; apply is_derive_Reals, Dfab. by apply Rlt_0_1. rewrite /f /fab ln_1 /= ; field. rewrite -{2}(Rabs_pos_eq 1). apply (is_lim_continuity Rabs 1). by apply continuity_pt_filterlim, continuous_Rabs. by apply Rle_0_1. exists (mkposreal _ Rlt_0_1) => /= x H0x Hx. rewrite /ball /= /AbsRing_ball /= in H0x. apply Rabs_lt_between' in H0x. rewrite Rminus_eq_0 in H0x. contradict Hx. rewrite -(Rabs_pos_eq x). by apply Rbar_finite_eq. by apply Rlt_le, H0x. move => x H0x Hx1. apply (continuity_pt_comp Rabs). by apply continuity_pt_filterlim, continuous_Rabs. rewrite Rabs_pos_eq. apply derivable_continuous_pt. exists (((2 - 2) - 2 * ln x) / x ^ 2) ; apply is_derive_Reals, Dfab. by []. by apply Rlt_le. by apply Rlt_0_1. split => //. apply Rminus_lt_0 ; ring_simplify ; by apply Rlt_0_1. move => x [H0x [Hx1 Hfx]]. rewrite Rabs_pos_eq in Hfx. exists x ; repeat split. by apply H0x. by apply Rlt_le. by apply Hfx. by apply Rlt_le. Qed. (** 3.b. *)
|
Lemma
|
examples
|
[
"From Coq Require Import Reals Psatz ssreflect.",
"From Coquelicot Require Import Rcomplements Rbar Hierarchy Derive RInt Continuity Lim_seq ElemFct RInt_analysis."
] |
examples/BacS2013.v
|
f_eq_1_0_1
| |
f_eq_1_1_p_infty : exists x, 1 <= x /\ f x = 1. Proof. case: (IVT_Rbar_incr (fun x => - f x) 1 p_infty (-2) 0 (-1)). replace (-2) with (-f 1). apply (is_lim_continuity (fun x => - f x)). apply continuity_pt_opp. apply derivable_continuous_pt. exists (((2 - 2) - 2 * ln 1) / 1 ^ 2) ; apply is_derive_Reals, Dfab. by apply Rlt_0_1. rewrite /f /fab ln_1 /= ; field. evar_last. apply is_lim_opp. by apply Lim_f_p_infty. simpl ; by rewrite Ropp_0. move => x H0x Hx1. apply continuity_pt_opp. apply derivable_continuous_pt. exists (((2 - 2) - 2 * ln x) / x ^ 2) ; apply is_derive_Reals, Dfab. by apply Rlt_trans with (1 := Rlt_0_1). by []. split ; apply Rminus_lt_0 ; ring_simplify ; by apply Rlt_0_1. move => x [H0x [Hx1 Hfx]]. exists x ; split. by apply Rlt_le. rewrite -(Ropp_involutive (f x)) Hfx ; ring. Qed. (** ** Questions 5 *) (* 10:08 *) (** 5.a. *) (** 5.b. *)
|
Lemma
|
examples
|
[
"From Coq Require Import Reals Psatz ssreflect.",
"From Coquelicot Require Import Rcomplements Rbar Hierarchy Derive RInt Continuity Lim_seq ElemFct RInt_analysis."
] |
examples/BacS2013.v
|
f_eq_1_1_p_infty
| |
If : forall x, 0 < x -> is_derive (fun y : R => 2 * ln y + (ln y) ^ 2) x (f x). Proof. move => y Hy. evar_last. apply @is_derive_plus. apply is_derive_Reals. apply derivable_pt_lim_scal. by apply derivable_pt_lim_ln. apply is_derive_pow. by apply is_derive_Reals, derivable_pt_lim_ln. rewrite /f /fab /plus /= ; field. by apply Rgt_not_eq. Qed.
|
Lemma
|
examples
|
[
"From Coq Require Import Reals Psatz ssreflect.",
"From Coquelicot Require Import Rcomplements Rbar Hierarchy Derive RInt Continuity Lim_seq ElemFct RInt_analysis."
] |
examples/BacS2013.v
|
If
| |
RInt_f : is_RInt f ( / exp 1) 1 1. Proof. have Haux1: (0 < /exp 1). apply Rinv_0_lt_compat. apply exp_pos. evar_last. apply: is_RInt_derive. move => x Hx. apply If. apply Rlt_le_trans with (2 := proj1 Hx). apply Rmin_case. by apply Haux1. by apply Rlt_0_1. move => x Hx. apply continuity_pt_filterlim. apply derivable_continuous_pt. exists (((2 - 2) - 2 * ln x) / x ^ 2) ; apply is_derive_Reals, Dfab. apply Rlt_le_trans with (2 := proj1 Hx). apply Rmin_case. by apply Haux1. by apply Rlt_0_1. rewrite /minus /= /plus /opp /= -[eq]/(@eq R). rewrite ln_Rinv. rewrite ln_exp. rewrite ln_1. ring. by apply exp_pos. Qed. (** * Exercice 4 *) (* 10:36 *)
|
Lemma
|
examples
|
[
"From Coq Require Import Reals Psatz ssreflect.",
"From Coquelicot Require Import Rcomplements Rbar Hierarchy Derive RInt Continuity Lim_seq ElemFct RInt_analysis."
] |
examples/BacS2013.v
|
RInt_f
| |
u (n : nat) : R := match n with | O => 2 | S n => 2/3 * u n + 1/3 * (INR n) + 1 end. (** ** Questions 1 *) (** 1.a. *) (** 1.b. *) (** ** Questions 2 *) (* 10:40 *) (** 2.a *)
|
Fixpoint
|
examples
|
[
"From Coq Require Import Reals Psatz ssreflect.",
"From Coquelicot Require Import Rcomplements Rbar Hierarchy Derive RInt Continuity Lim_seq ElemFct RInt_analysis."
] |
examples/BacS2013.v
|
u
| |
Q2a : forall n, u n <= INR n + 3. Proof. elim => [ | n IH] ; rewrite ?S_INR /=. apply Rminus_le_0 ; ring_simplify ; apply Rle_0_1. eapply Rle_trans. apply Rplus_le_compat_r. apply Rplus_le_compat_r. apply Rmult_le_compat_l. lra. by apply IH. lra. Qed. (** 2.b. *)
|
Lemma
|
examples
|
[
"From Coq Require Import Reals Psatz ssreflect.",
"From Coquelicot Require Import Rcomplements Rbar Hierarchy Derive RInt Continuity Lim_seq ElemFct RInt_analysis."
] |
examples/BacS2013.v
|
Q2a
| |
Q2b : forall n, u (S n) - u n = 1/3 * (INR n + 3 - u n). Proof. move => n ; simpl. field. Qed. (** 2.c. *)
|
Lemma
|
examples
|
[
"From Coq Require Import Reals Psatz ssreflect.",
"From Coquelicot Require Import Rcomplements Rbar Hierarchy Derive RInt Continuity Lim_seq ElemFct RInt_analysis."
] |
examples/BacS2013.v
|
Q2b
| |
Q2c : forall n, u n <= u (S n). Proof. move => n. apply Rminus_le_0. rewrite Q2b. apply Rmult_le_pos. lra. apply (Rminus_le_0 (u n)). by apply Q2a. Qed. (** ** Question 3 *) (* 10:49 *)
|
Lemma
|
examples
|
[
"From Coq Require Import Reals Psatz ssreflect.",
"From Coquelicot Require Import Rcomplements Rbar Hierarchy Derive RInt Continuity Lim_seq ElemFct RInt_analysis."
] |
examples/BacS2013.v
|
Q2c
| |
v (n : nat) : R := u n - INR n. (** 3.a. *)
|
Definition
|
examples
|
[
"From Coq Require Import Reals Psatz ssreflect.",
"From Coquelicot Require Import Rcomplements Rbar Hierarchy Derive RInt Continuity Lim_seq ElemFct RInt_analysis."
] |
examples/BacS2013.v
|
v
| |
Q3a : forall n, v n = 2 * (2/3) ^ n. Proof. elim => [ | n IH]. rewrite /v /u /= ; ring. replace (2 * (2 / 3) ^ S n) with (v n * (2/3)) by (rewrite IH /= ; ring). rewrite /v S_INR /=. field. Qed. (** 3.b. *)
|
Lemma
|
examples
|
[
"From Coq Require Import Reals Psatz ssreflect.",
"From Coquelicot Require Import Rcomplements Rbar Hierarchy Derive RInt Continuity Lim_seq ElemFct RInt_analysis."
] |
examples/BacS2013.v
|
Q3a
| |
Q3b : forall n, u n = 2 * (2/3)^n + INR n. Proof. move => n. rewrite -Q3a /v ; ring. Qed.
|
Lemma
|
examples
|
[
"From Coq Require Import Reals Psatz ssreflect.",
"From Coquelicot Require Import Rcomplements Rbar Hierarchy Derive RInt Continuity Lim_seq ElemFct RInt_analysis."
] |
examples/BacS2013.v
|
Q3b
| |
Q3c : is_lim_seq u p_infty. Proof. apply is_lim_seq_ext with (fun n => 2 * (2/3)^n + INR n). move => n ; by rewrite Q3b. eapply is_lim_seq_plus. eapply is_lim_seq_mult. by apply is_lim_seq_const. apply is_lim_seq_geom. rewrite Rabs_pos_eq. lra. lra. by []. apply is_lim_seq_INR. by []. Qed. (** ** Questions 4 *) (* 11:00 *)
|
Lemma
|
examples
|
[
"From Coq Require Import Reals Psatz ssreflect.",
"From Coquelicot Require Import Rcomplements Rbar Hierarchy Derive RInt Continuity Lim_seq ElemFct RInt_analysis."
] |
examples/BacS2013.v
|
Q3c
| |
Su (n : nat) : R := sum_f_R0 u n.
|
Definition
|
examples
|
[
"From Coq Require Import Reals Psatz ssreflect.",
"From Coquelicot Require Import Rcomplements Rbar Hierarchy Derive RInt Continuity Lim_seq ElemFct RInt_analysis."
] |
examples/BacS2013.v
|
Su
| |
Tu (n : nat) : R := Su n / (INR n) ^ 2. (** 4.a. *)
|
Definition
|
examples
|
[
"From Coq Require Import Reals Psatz ssreflect.",
"From Coquelicot Require Import Rcomplements Rbar Hierarchy Derive RInt Continuity Lim_seq ElemFct RInt_analysis."
] |
examples/BacS2013.v
|
Tu
| |
Q4a : forall n, Su n = 6 - 4 * (2/3)^n + INR n * (INR n + 1) / 2. Proof. move => n. rewrite /Su. rewrite -(sum_eq (fun n => (2/3)^n * 2 + INR n)). rewrite sum_plus. rewrite -scal_sum. rewrite tech3. rewrite sum_INR. simpl ; field. apply Rlt_not_eq, Rlt_div_l. repeat apply Rplus_lt_0_compat ; apply Rlt_0_1. apply Rminus_lt_0 ; ring_simplify ; by apply Rlt_0_1. move => i _. rewrite Q3b ; ring. Qed. (** 4.b. *)
|
Lemma
|
examples
|
[
"From Coq Require Import Reals Psatz ssreflect.",
"From Coquelicot Require Import Rcomplements Rbar Hierarchy Derive RInt Continuity Lim_seq ElemFct RInt_analysis."
] |
examples/BacS2013.v
|
Q4a
| |
Q4b : is_lim_seq Tu (1/2). Proof. apply is_lim_seq_ext_loc with (fun n => (6 - 4 * (2/3)^n) / (INR n ^2) + / (2 * INR n) + /2). exists 1%nat => n Hn ; rewrite /Tu Q4a. simpl ; field. apply Rgt_not_eq, (lt_INR O) ; intuition. eapply is_lim_seq_plus. eapply is_lim_seq_plus. eapply is_lim_seq_div. eapply is_lim_seq_minus. apply is_lim_seq_const. eapply is_lim_seq_mult. by apply is_lim_seq_const. apply is_lim_seq_geom. rewrite Rabs_pos_eq. lra. lra. by []. rewrite /is_Rbar_minus /is_Rbar_plus /=. now ring_simplify (6 + - (4 * 0)). repeat eapply is_lim_seq_mult. apply is_lim_seq_INR. apply is_lim_seq_INR. apply is_lim_seq_const. apply is_Rbar_mult_p_infty_pos. by apply Rlt_0_1. by []. by []. by apply is_Rbar_div_p_infty. apply is_lim_seq_inv. eapply is_lim_seq_mult. by apply is_lim_seq_const. by apply is_lim_seq_INR. by apply is_Rbar_mult_sym, is_Rbar_mult_p_infty_pos, Rlt_0_2. by []. by []. apply is_lim_seq_const. apply (f_equal (@Some _)), f_equal. field. Qed. (* 11:33 *)
|
Lemma
|
examples
|
[
"From Coq Require Import Reals Psatz ssreflect.",
"From Coquelicot Require Import Rcomplements Rbar Hierarchy Derive RInt Continuity Lim_seq ElemFct RInt_analysis."
] |
examples/BacS2013.v
|
Q4b
| |
v (n : nat) : R := match n with | O => 7 / 10 * 250000 | S n => 95 / 100 * v n + 1 / 100 * c n end with c (n : nat) : R := match n with | O => 3 / 10 * 250000 | S n => 5 / 100 * v n + 99 / 100 * c n end. (** 2. Définition de la matrice A *)
|
Fixpoint
|
examples
|
[
"From Coq Require Import Reals Psatz ssreflect.",
"From Coquelicot Require Import Hierarchy PSeries Rbar Lim_seq."
] |
examples/BacS2013_bonus.v
|
v
| |
A : matrix 2 2 := [[95/100, 1/100 ] , [ 5/100, 99/100]].
|
Definition
|
examples
|
[
"From Coq Require Import Reals Psatz ssreflect.",
"From Coquelicot Require Import Hierarchy PSeries Rbar Lim_seq."
] |
examples/BacS2013_bonus.v
|
A
| |
X (n : nat) : matrix 2 1 := [[v n],[c n]].
|
Definition
|
examples
|
[
"From Coq Require Import Reals Psatz ssreflect.",
"From Coquelicot Require Import Hierarchy PSeries Rbar Lim_seq."
] |
examples/BacS2013_bonus.v
|
X
| |
Q2 : forall n, X (S n) = scal A (X n). Proof. intros n. rewrite /scal /= /Mmult. apply (coeff_mat_ext 0). case ; [ | case => //]. case ; [ | case => //] ; rewrite coeff_mat_bij /= ; (try lia) ; rewrite sum_Sn sum_O /plus /mult //=. case ; [ | case => //] ; rewrite coeff_mat_bij /= ; (try lia) ; rewrite sum_Sn sum_O /plus /mult //=. Qed. (** 3. Diagonalisation *)
|
Lemma
|
examples
|
[
"From Coq Require Import Reals Psatz ssreflect.",
"From Coquelicot Require Import Hierarchy PSeries Rbar Lim_seq."
] |
examples/BacS2013_bonus.v
|
Q2
| |
P : matrix 2 2 := [[1,-1], [5,1]].
|
Definition
|
examples
|
[
"From Coq Require Import Reals Psatz ssreflect.",
"From Coquelicot Require Import Hierarchy PSeries Rbar Lim_seq."
] |
examples/BacS2013_bonus.v
|
P
| |
Q : matrix 2 2 := [[1,1],[-5,1]]. Goal mult P Q = [[6,0],[0,6]]. apply (coeff_mat_ext_aux 0 0) => i j Hi Hj. rewrite coeff_mat_bij => //. rewrite /coeff_mat /= /mult /plus /=. (destruct i as [ | i] ; destruct j as [ | j] ; rewrite /zero /= ; try ring) ; (try (destruct i as [ | i]) ; try (destruct j as [ | j]) ; rewrite /zero /= ; try ring) ; rewrite sum_Sn sum_O /= /plus /= ; ring. Qed. Goal mult Q P = [[6,0],[0,6]]. apply (coeff_mat_ext_aux 0 0) => i j Hi Hj. rewrite coeff_mat_bij => //. rewrite /coeff_mat /= /mult /plus /=. (destruct i as [ | i] ; destruct j as [ | j] ; rewrite /zero /= ; try ring) ; (try (destruct i as [ | i]) ; try (destruct j as [ | j]) ; rewrite /zero /= ; try ring) ; rewrite sum_Sn sum_O /= /plus /= ; ring. Qed.
|
Definition
|
examples
|
[
"From Coq Require Import Reals Psatz ssreflect.",
"From Coquelicot Require Import Hierarchy PSeries Rbar Lim_seq."
] |
examples/BacS2013_bonus.v
|
Q
| |
P' : matrix 2 2 := [[1 / 6,1 / 6],[-5 / 6,1 / 6]].
|
Definition
|
examples
|
[
"From Coq Require Import Reals Psatz ssreflect.",
"From Coquelicot Require Import Hierarchy PSeries Rbar Lim_seq."
] |
examples/BacS2013_bonus.v
|
P'
| |
Q3a : mult P P' = Mone /\ mult P' P = Mone. Proof. split. apply (coeff_mat_ext_aux 0 0) => i j Hi Hj. rewrite coeff_mat_bij => //. rewrite /coeff_mat /= /mult /plus /=. (destruct i as [ | i] ; destruct j as [ | j] ; rewrite /zero /= ; try field) ; (try (destruct i as [ | i]) ; try (destruct j as [ | j]) ; rewrite /zero /one /= ; try field) ; rewrite sum_Sn sum_O /= /plus /= ; field. apply (coeff_mat_ext_aux 0 0) => i j Hi Hj. rewrite coeff_mat_bij => //. rewrite /coeff_mat /= /mult /plus /=. (destruct i as [ | i] ; destruct j as [ | j] ; rewrite /zero /= ; try field) ; (try (destruct i as [ | i]) ; try (destruct j as [ | j]) ; rewrite /zero /one /= ; try field) ; rewrite sum_Sn sum_O /= /plus /= ; field. Qed.
|
Lemma
|
examples
|
[
"From Coq Require Import Reals Psatz ssreflect.",
"From Coquelicot Require Import Hierarchy PSeries Rbar Lim_seq."
] |
examples/BacS2013_bonus.v
|
Q3a
| |
D : matrix 2 2 := [[1,0],[0,94 / 100]].
|
Definition
|
examples
|
[
"From Coq Require Import Reals Psatz ssreflect.",
"From Coquelicot Require Import Hierarchy PSeries Rbar Lim_seq."
] |
examples/BacS2013_bonus.v
|
D
| |
Q3b : mult P' (mult A P) = D. Proof. apply (coeff_mat_ext_aux 0 0) => i j Hi Hj. rewrite coeff_mat_bij => //. rewrite /coeff_mat /= /mult /plus /=. (destruct i as [ | i] ; destruct j as [ | j] ; rewrite /zero /= ; try field) ; (try (destruct i as [ | i]) ; try (destruct j as [ | j]) ; rewrite /zero /one /= ; try field) ; rewrite sum_Sn sum_O /= /plus /= ; (try field) ; rewrite !sum_Sn !sum_O /= /plus /coeff_mat /= ; field. Qed.
|
Lemma
|
examples
|
[
"From Coq Require Import Reals Psatz ssreflect.",
"From Coquelicot Require Import Hierarchy PSeries Rbar Lim_seq."
] |
examples/BacS2013_bonus.v
|
Q3b
| |
Q3c : forall n, pow_n A n = mult P (mult (pow_n D n) P'). Proof. elim => /= [ | n IH]. rewrite mult_one_l. apply sym_eq, Q3a. by rewrite -{1}Q3b !mult_assoc (proj1 Q3a) mult_one_l -!mult_assoc IH. Qed. (** 4. Terme général et limite de la suite v n *)
|
Lemma
|
examples
|
[
"From Coq Require Import Reals Psatz ssreflect.",
"From Coquelicot Require Import Hierarchy PSeries Rbar Lim_seq."
] |
examples/BacS2013_bonus.v
|
Q3c
| |
Q4 : forall n, v n = 1 / 6 * (1 + 5 * (94 / 100) ^ n) * v 0 + 1 / 6 * (1 - (94 / 100) ^ n) * c 0. Proof. intros n. assert (X n = scal (pow_n A n) (X 0)). elim: n => [ | n IH] /=. by rewrite scal_one. rewrite -scal_assoc -IH. by apply Q2. assert (pow_n D n = [[1,0], [0,(94 / 100)^n]]). elim: (n) => [ | m IH] //=. rewrite IH. apply (coeff_mat_ext_aux 0 0) => i j Hi Hj. rewrite coeff_mat_bij => //=. rewrite /plus /mult /= /coeff_mat /=. (destruct i as [ | i] ; destruct j as [ | j] ; rewrite /zero /one /=) ; (try (destruct i as [ | i]) ; try (destruct j as [ | j]) ; rewrite /zero /one /= ; try field) ; rewrite sum_Sn sum_O /= /plus /= ; field. rewrite Q3c H0 in H. apply (proj1 (coeff_mat_ext 0 _ _)) with (i := O) (j := O) in H. rewrite {1}/coeff_mat /= in H. rewrite H ; repeat (rewrite !/coeff_mat /=). rewrite !sum_Sn !sum_O /= /plus /mult /= ; field. Qed.
|
Lemma
|
examples
|
[
"From Coq Require Import Reals Psatz ssreflect.",
"From Coquelicot Require Import Hierarchy PSeries Rbar Lim_seq."
] |
examples/BacS2013_bonus.v
|
Q4
| |
lim_v : is_lim_seq v (41666 + 2 / 3). Proof. eapply is_lim_seq_ext. intros n ; apply sym_eq, Q4. eapply is_lim_seq_plus. eapply is_lim_seq_mult. eapply is_lim_seq_mult. apply is_lim_seq_const. eapply is_lim_seq_plus. apply is_lim_seq_const. eapply is_lim_seq_mult. apply is_lim_seq_const. apply is_lim_seq_geom. rewrite Rabs_pos_eq ; lra. by []. by []. by []. apply is_lim_seq_const. by []. eapply is_lim_seq_mult. eapply is_lim_seq_mult. apply is_lim_seq_const. eapply is_lim_seq_minus. apply is_lim_seq_const. apply is_lim_seq_geom. rewrite Rabs_pos_eq ; lra. by []. by []. apply is_lim_seq_const. by []. apply (f_equal (fun x => Some (Finite x))) ; simpl ; field. Qed.
|
Lemma
|
examples
|
[
"From Coq Require Import Reals Psatz ssreflect.",
"From Coquelicot Require Import Hierarchy PSeries Rbar Lim_seq."
] |
examples/BacS2013_bonus.v
|
lim_v
| |
lim_c : is_lim_seq c (208333 + 1 / 3). Proof. assert (forall n, c n = 250000 - v n). elim => [ | n /= ->] /= ; field. eapply is_lim_seq_ext. intros n ; apply sym_eq, H. eapply is_lim_seq_minus. apply is_lim_seq_const. by apply lim_v. apply (f_equal (fun x => Some (Finite x))) ; simpl ; field. Qed.
|
Lemma
|
examples
|
[
"From Coq Require Import Reals Psatz ssreflect.",
"From Coquelicot Require Import Hierarchy PSeries Rbar Lim_seq."
] |
examples/BacS2013_bonus.v
|
lim_c
| |
Bessel1_seq (n k : nat) := (-1)^(k)/(INR (fact (k)) * INR (fact (n + (k)))).
|
Definition
|
examples
|
[
"From Coq Require Import Arith Reals Psatz ssreflect.",
"From Coquelicot Require Import Rcomplements Rbar Hierarchy Derive Series PSeries Lim_seq AutoDerive."
] |
examples/Bessel.v
|
Bessel1_seq
| |
Bessel1_seq_neq_0 (n : nat) : forall k, Bessel1_seq n k <> 0. Proof. move => k. apply Rmult_integral_contrapositive_currified. apply pow_nonzero, Ropp_neq_0_compat, R1_neq_R0. apply Rinv_neq_0_compat, Rmult_integral_contrapositive_currified ; apply INR_fact_neq_0. Qed.
|
Lemma
|
examples
|
[
"From Coq Require Import Arith Reals Psatz ssreflect.",
"From Coquelicot Require Import Rcomplements Rbar Hierarchy Derive Series PSeries Lim_seq AutoDerive."
] |
examples/Bessel.v
|
Bessel1_seq_neq_0
| |
CV_Bessel1 (n : nat) : CV_radius (Bessel1_seq n) = p_infty. Proof. apply CV_radius_infinite_DAlembert. by apply Bessel1_seq_neq_0. apply is_lim_seq_ext with (fun p => / (INR (S p) * INR (S (n + p)))). move => p ; rewrite /Bessel1_seq -plus_n_Sm /fact -/fact !mult_INR. simpl ((-1)^(S p)). field_simplify (-1 * (-1) ^ p / (INR (S p) * INR (fact p) * (INR (S (n + p)) * INR (fact (n + p)))) / ((-1) ^ p / (INR (fact p) * INR (fact (n + p))))). rewrite Rabs_div. rewrite Rabs_Ropp Rabs_R1 /Rdiv Rmult_1_l Rabs_pos_eq. by []. apply Rmult_le_pos ; apply pos_INR. apply Rgt_not_eq, Rmult_lt_0_compat ; apply lt_0_INR, Nat.lt_0_succ. repeat split. by apply INR_fact_neq_0. by apply INR_fact_neq_0. by apply Rgt_not_eq, lt_0_INR, Nat.lt_0_succ. by apply Rgt_not_eq, lt_0_INR, Nat.lt_0_succ. by apply pow_nonzero, Rlt_not_eq, (IZR_lt (-1) 0). replace (Finite 0) with (Rbar_inv p_infty) by auto. apply is_lim_seq_inv. eapply is_lim_seq_mult. apply -> is_lim_seq_incr_1. by apply is_lim_seq_INR. apply is_lim_seq_ext with (fun k => INR (k + S n)). intros k. by rewrite (Nat.add_comm n k) plus_n_Sm. apply is_lim_seq_incr_n. by apply is_lim_seq_INR. by []. by []. Qed.
|
Lemma
|
examples
|
[
"From Coq Require Import Arith Reals Psatz ssreflect.",
"From Coquelicot Require Import Rcomplements Rbar Hierarchy Derive Series PSeries Lim_seq AutoDerive."
] |
examples/Bessel.v
|
CV_Bessel1
| |
ex_Bessel1 (n : nat) (x : R) : ex_pseries (Bessel1_seq n) x. Proof. apply CV_radius_inside. by rewrite CV_Bessel1. Qed.
|
Lemma
|
examples
|
[
"From Coq Require Import Arith Reals Psatz ssreflect.",
"From Coquelicot Require Import Rcomplements Rbar Hierarchy Derive Series PSeries Lim_seq AutoDerive."
] |
examples/Bessel.v
|
ex_Bessel1
| |
Bessel1 (n : nat) (x : R) := (x/2)^n * PSeries (Bessel1_seq n) ((x/2)^2).
|
Definition
|
examples
|
[
"From Coq Require Import Arith Reals Psatz ssreflect.",
"From Coquelicot Require Import Rcomplements Rbar Hierarchy Derive Series PSeries Lim_seq AutoDerive."
] |
examples/Bessel.v
|
Bessel1
| |
is_derive_Bessel1 (n : nat) (x : R) : is_derive (Bessel1 n) x ((x / 2) ^ S n * PSeries (PS_derive (Bessel1_seq n)) ((x / 2) ^ 2) + (INR n)/2 * (x / 2) ^ pred n * PSeries (Bessel1_seq n) ((x / 2) ^ 2)). Proof. rewrite /Bessel1. auto_derive. apply ex_derive_PSeries. by rewrite CV_Bessel1. rewrite Derive_PSeries. rewrite /Rdiv ; simpl ; field. by rewrite CV_Bessel1. Qed.
|
Lemma
|
examples
|
[
"From Coq Require Import Arith Reals Psatz ssreflect.",
"From Coquelicot Require Import Rcomplements Rbar Hierarchy Derive Series PSeries Lim_seq AutoDerive."
] |
examples/Bessel.v
|
is_derive_Bessel1
| |
is_derive_2_Bessel1 (n : nat) (x : R) : is_derive_n (Bessel1 n) 2 x (((x/2)^(S (S n)) * PSeries (PS_derive (PS_derive (Bessel1_seq n))) ((x / 2) ^ 2)) + ((INR (2*n+1)/2) * (x/2)^n * PSeries (PS_derive (Bessel1_seq n)) ((x / 2) ^ 2)) + (INR (n * pred n) / 4 * (x / 2) ^ pred (pred n) * PSeries (Bessel1_seq n) ((x / 2) ^ 2))). Proof. rewrite plus_INR ?mult_INR ; simpl INR. eapply is_derive_ext. move => y ; by apply sym_eq, is_derive_unique, is_derive_Bessel1. auto_derive. repeat split. apply ex_derive_PSeries. by rewrite CV_radius_derive CV_Bessel1. apply ex_derive_PSeries. by rewrite CV_Bessel1. rewrite !Derive_PSeries. case: n => [ | n] ; rewrite ?S_INR /Rdiv /= ; field. by rewrite CV_Bessel1. by rewrite CV_radius_derive CV_Bessel1. Qed.
|
Lemma
|
examples
|
[
"From Coq Require Import Arith Reals Psatz ssreflect.",
"From Coquelicot Require Import Rcomplements Rbar Hierarchy Derive Series PSeries Lim_seq AutoDerive."
] |
examples/Bessel.v
|
is_derive_2_Bessel1
| |
Bessel1_correct (n : nat) (x : R) : x^2 * Derive_n (Bessel1 n) 2 x + x * Derive (Bessel1 n) x + (x^2 - (INR n)^2) * Bessel1 n x = 0. Proof. rewrite (is_derive_unique _ _ _ (is_derive_Bessel1 _ _)) ; rewrite /Derive_n (is_derive_unique _ _ _ (is_derive_2_Bessel1 _ _)) ; rewrite /Bessel1 plus_INR ?mult_INR ; simpl INR. set y := x/2 ; replace x with (2 * y) by (unfold y ; field). replace (_ + _) with (4 * y^S (S n) * (y^2 * PSeries (PS_derive (PS_derive (Bessel1_seq n))) (y ^ 2) + (INR n + 1) * PSeries (PS_derive (Bessel1_seq n)) (y ^ 2) + PSeries (Bessel1_seq n) (y ^ 2))). 2: { case: n => [|[|n]] ; rewrite ?S_INR /= ; field. } apply Rmult_eq_0_compat_l. rewrite -PSeries_incr_1 -PSeries_scal -?PSeries_plus. unfold PS_derive, PS_incr_1, PS_scal, PS_plus. rewrite -(PSeries_const_0 (y^2)). apply PSeries_ext. case => [ | p] ; rewrite /Bessel1_seq ; rewrite -?plus_n_Sm ?Nat.add_0_r /fact -/fact ?mult_INR ?S_INR ?plus_INR ; simpl INR ; simpl pow ; rewrite ?Rplus_0_l ?Rmult_1_l. rewrite /plus /zero /scal /= /mult /=. field. split ; rewrite -?S_INR ; apply Rgt_not_eq. by apply INR_fact_lt_0. by apply (lt_INR 0), Nat.lt_0_succ. rewrite /plus /scal /= /mult /=. field. repeat split ; rewrite -?plus_INR -?S_INR ; apply Rgt_not_eq. by apply INR_fact_lt_0. by apply (lt_INR 0), Nat.lt_0_succ. by apply INR_fact_lt_0. by apply (lt_INR 0), Nat.lt_0_succ. by apply (lt_INR 0), Nat.lt_0_succ. by apply (lt_INR 0), Nat.lt_0_succ. apply CV_radius_inside. apply Rbar_lt_le_trans with (2 := CV_radius_plus _ _). apply Rbar_min_case. by rewrite CV_radius_incr_1 ?CV_radius_derive CV_Bessel1. rewrite CV_radius_scal. by rewrite CV_radius_derive CV_Bessel1. now rewrite -S_INR ; apply not_0_INR, sym_not_eq, O_S. by apply ex_Bessel1. apply ex_pseries_R, ex_series_Rabs, CV_disk_inside. by rewrite CV_radius_incr_1 ?CV_radius_derive CV_Bessel1. apply ex_pseries_R, ex_series_Rabs, CV_disk_inside. rewrite CV_radius_scal. by rewrite CV_radius_derive CV_Bessel1. now rewrite -S_INR ; apply not_0_INR, sym_not_eq, O_S. Qed.
|
Lemma
|
examples
|
[
"From Coq Require Import Arith Reals Psatz ssreflect.",
"From Coquelicot Require Import Rcomplements Rbar Hierarchy Derive Series PSeries Lim_seq AutoDerive."
] |
examples/Bessel.v
|
Bessel1_correct
| |
Bessel1_equality_1 (n : nat) (x : R) : x <> 0 -> Bessel1 (S n)%nat x = INR n * Bessel1 n x / x - Derive (Bessel1 n) x. Proof. move => Hx. rewrite (is_derive_unique _ _ _ (is_derive_Bessel1 _ _)) /Bessel1. set y := (x / 2). replace x with (2 * y) by (unfold y ; field). (* Supprimer les PSeries *) have Hy : y <> 0. unfold y ; contradict Hx. replace x with (2 * (x/2)) by field ; rewrite Hx ; ring. case: n => [ | n] ; simpl ; field_simplify => // ; rewrite ?Rdiv_1 -/(pow _ 2). (* * cas n = 0 *) replace (- 2 * y ^ 2 * PSeries (PS_derive (Bessel1_seq 0)) (y ^ 2) / (2 * y)) with (y * ((-1) * PSeries (PS_derive (Bessel1_seq 0)) (y ^ 2))) by (simpl ; unfold y ; field => //). apply f_equal. rewrite -PSeries_scal. apply PSeries_ext => k. rewrite /Bessel1_seq /PS_scal /PS_derive Nat.add_0_l. replace (1+k)%nat with (S k) by ring. rewrite /fact -/fact mult_INR /pow -/pow. change scal with Rmult. field ; split. exact: INR_fact_neq_0. by apply not_0_INR, not_eq_sym, O_S. (* * cas S n *) replace (-2 * y ^ 2 * y ^ n * PSeries (PS_derive (Bessel1_seq (S n))) (y ^ 2) / 2) with (y^2 * y^n * (((-1)* PSeries (PS_derive (Bessel1_seq (S n))) (y ^ 2)))) by (unfold y ; field => //). apply f_equal. rewrite -PSeries_scal. apply PSeries_ext => k. rewrite /Bessel1_seq /PS_scal /PS_derive -?plus_n_Sm ?plus_Sn_m. rewrite /pow -/pow /fact -/fact ?mult_INR ?S_INR plus_INR. change scal with Rmult. field. rewrite -plus_INR -?S_INR. repeat split ; try by [exact: INR_fact_neq_0 | apply not_0_INR, not_eq_sym, O_S]. Qed.
|
Lemma
|
examples
|
[
"From Coq Require Import Arith Reals Psatz ssreflect.",
"From Coquelicot Require Import Rcomplements Rbar Hierarchy Derive Series PSeries Lim_seq AutoDerive."
] |
examples/Bessel.v
|
Bessel1_equality_1
| |
Bessel1_equality_2 (n : nat) (x : R) : (0 < n)%nat -> x<>0 -> Bessel1 (S n)%nat x + Bessel1 (pred n)%nat x = (2*INR n)/x * Bessel1 n x. Proof. case: n => [ | n] Hn Hx. by apply Nat.lt_irrefl in Hn. clear Hn ; simpl pred. rewrite /Bessel1 S_INR. replace ((x / 2) ^ S (S n) * PSeries (Bessel1_seq (S (S n))) ((x / 2) ^ 2) + (x / 2) ^ n * PSeries (Bessel1_seq n) ((x / 2) ^ 2)) with ((x/2)^n * ((x/2)^2 * PSeries (Bessel1_seq (S (S n))) ((x / 2) ^ 2) + PSeries (Bessel1_seq n) ((x / 2) ^ 2))) by (simpl ; ring). replace (2 * (INR n + 1) / x * ((x / 2) ^ S n * PSeries (Bessel1_seq (S n)) ((x / 2) ^ 2))) with ((x/2)^n * ((INR n + 1) * PSeries (Bessel1_seq (S n)) ((x / 2) ^ 2))) by (simpl ; field ; exact: Hx). apply f_equal. rewrite -PSeries_incr_1 -PSeries_scal -PSeries_plus. 2: (* ex_pseries (PS_incr_1 (Bessel1_seq (S (S n))) (S (S n))) ((x / 2) ^ 2) *) by apply ex_pseries_incr_1, ex_Bessel1. 2: (* ex_pseries (PS_incr_n (Bessel1_seq n) n) ((x / 2) ^ 2) *) by apply ex_Bessel1. apply PSeries_ext => k. (* egalité *) rewrite /PS_plus /PS_scal /PS_incr_1 /Bessel1_seq ; case: k => [ | k] ; rewrite ?Nat.add_0_r -?plus_n_Sm ?plus_Sn_m /fact -/fact ?mult_INR ?S_INR ?plus_INR /=. rewrite plus_zero_l /scal /= /mult /=. field. rewrite -S_INR ; split ; by [apply not_0_INR, sym_not_eq, O_S | apply INR_fact_neq_0]. rewrite /plus /scal /= /mult /=. field ; rewrite -?plus_INR -?S_INR ; repeat split ; by [apply INR_fact_neq_0 | apply not_0_INR, sym_not_eq, O_S]. Qed.
|
Lemma
|
examples
|
[
"From Coq Require Import Arith Reals Psatz ssreflect.",
"From Coquelicot Require Import Rcomplements Rbar Hierarchy Derive Series PSeries Lim_seq AutoDerive."
] |
examples/Bessel.v
|
Bessel1_equality_2
| |
Bessel1_equality_3 (n : nat) (x : R) : (0 < n)%nat -> Bessel1 (S n)%nat x - Bessel1 (pred n)%nat x = - 2 * Derive (Bessel1 n) x. Proof. move => Hn. rewrite (is_derive_unique _ _ _ (is_derive_Bessel1 _ _)) /Bessel1. case: n Hn => [ | n] Hn. by apply Nat.lt_irrefl in Hn. clear Hn ; simpl pred. replace ((x / 2) ^ S (S n) * PSeries (Bessel1_seq (S (S n))) ((x / 2) ^ 2) - (x / 2) ^ n * PSeries (Bessel1_seq n) ((x / 2) ^ 2)) with ((x/2)^n * ((x/2)^2 * PSeries (Bessel1_seq (S (S n))) ((x / 2) ^ 2) - PSeries (Bessel1_seq n) ((x / 2) ^ 2))) by (simpl ; ring). replace (-2 *((x / 2) ^ S (S n) * PSeries (PS_derive (Bessel1_seq (S n))) ((x / 2) ^ 2) + INR (S n) / 2 * (x / 2) ^ n * PSeries (Bessel1_seq (S n)) ((x / 2) ^ 2))) with ((x/2)^n * (-2 * ((x/2)^2 * PSeries (PS_derive (Bessel1_seq (S n))) ((x / 2) ^ 2)) - INR (S n) * PSeries (Bessel1_seq (S n)) ((x / 2) ^ 2))) by (rewrite S_INR ; simpl ; field). set y := (x / 2). apply f_equal. rewrite -?PSeries_incr_1 -?PSeries_scal -?PSeries_minus. apply PSeries_ext => k. rewrite /PS_minus /PS_incr_1 /PS_scal /PS_derive /Bessel1_seq. case: k => [ | k] ; rewrite -?plus_n_Sm ?plus_Sn_m /fact -/fact ?mult_INR ?S_INR -?plus_n_O ?plus_INR /= ; rewrite /plus /opp /zero /scal /= /mult /= ; field ; rewrite -?plus_INR -?S_INR. split ; (apply INR_fact_neq_0 || apply not_0_INR, sym_not_eq, O_S). repeat split ; (apply INR_fact_neq_0 || apply not_0_INR, sym_not_eq, O_S). apply @ex_pseries_scal, @ex_pseries_incr_1, ex_pseries_derive. by apply Rmult_comm. by rewrite CV_Bessel1. apply ex_pseries_scal, ex_Bessel1. by apply Rmult_comm. by apply ex_pseries_incr_1, ex_Bessel1. by apply ex_Bessel1. Qed. (** * Unicity *)
|
Lemma
|
examples
|
[
"From Coq Require Import Arith Reals Psatz ssreflect.",
"From Coquelicot Require Import Rcomplements Rbar Hierarchy Derive Series PSeries Lim_seq AutoDerive."
] |
examples/Bessel.v
|
Bessel1_equality_3
| |
Bessel1_uniqueness_aux_0 (a : nat -> R) (n : nat) : Rbar_lt 0 (CV_radius a) -> (forall x : R, Rbar_lt (Rabs x) (CV_radius a) -> x^2 * Derive_n (PSeries a) 2 x + x * Derive (PSeries a) x + (x^2 - (INR n)^2) * PSeries a x = 0) -> (a 0%nat = 0 \/ n = O) /\ (a 1%nat = 0 \/ n = 1%nat) /\ (forall k, (INR (S (S k)) ^ 2 - INR n ^ 2) * a (S (S k)) + a k = 0). Proof. move => Ha H. cut (forall k, (PS_plus (PS_plus (PS_incr_n (PS_derive_n 2 a) 2) (PS_incr_1 (PS_derive a))) (PS_plus (PS_incr_n a 2) (PS_scal (- INR n ^ 2) a))) k = 0). intros Haux. split ; [move: (Haux 0%nat) | move: (fun k => Haux (S k))] => {} Haux. (* n = 0 *) rewrite /PS_plus /= /PS_incr_1 /PS_derive_n /PS_scal /PS_derive in Haux. rewrite /plus /zero /scal /= /mult /= in Haux. ring_simplify in Haux. apply Rmult_integral in Haux ; case: Haux => Haux. right. suff : ~ n <> 0%nat. by intuition. contradict Haux. apply Ropp_neq_0_compat. apply pow_nonzero. by apply not_0_INR. by left. split ; [move: (Haux 0%nat) | move: (fun k => Haux (S k))] => {} Haux. (* n = 1 *) rewrite /PS_plus /= /PS_incr_1 /PS_derive_n /PS_scal /PS_derive /= in Haux. rewrite /plus /zero /scal /= /mult /= in Haux. ring_simplify in Haux. replace (- a 1%nat * INR n ^ 2 + a 1%nat) with ((1 - INR n ^ 2) * a 1%nat) in Haux. apply Rmult_integral in Haux ; case: Haux => Haux. right. suff : ~ n <> 1%nat. by intuition. contradict Haux. replace (1 - INR n ^ 2) with ((1-INR n) * (1 + INR n)) by ring. apply Rmult_integral_contrapositive_currified. apply Rminus_eq_contra. apply sym_not_eq. by apply not_1_INR. apply Rgt_not_eq, Rlt_le_trans with (1 := Rlt_0_1). apply Rminus_le_0 ; ring_simplify. by apply pos_INR. by left. ring. (* n >= 2 *) move => k ; rewrite ?S_INR /= ; move: (Haux k) ; rewrite /PS_plus /= /PS_incr_1 /PS_derive_n /PS_scal /PS_derive -?S_INR. replace (k + 2)%nat with (S (S k)) by ring. rewrite /fact -/fact ?mult_INR ?S_INR => {} Haux. rewrite /plus /scal /= /mult /= in Haux. field_simplify in Haux. field_simplify. by rewrite (Rmult_comm (INR n ^ 2)). try revert Haux. by apply INR_fact_neq_0. move => k. apply (PSeries_ext_recip _ (fun _ => 0)). apply Rbar_lt_le_trans with (2 := CV_radius_plus _ _). apply Rbar_min_case. apply Rbar_lt_le_trans with (2 := CV_radius_plus _ _). apply Rbar_min_case. rewrite /PS_incr_n ?CV_radius_incr_1. by rewrite CV_radius_derive_n. rewrite CV_radius_incr_1. by rewrite CV_radius_derive. apply Rbar_lt_le_trans with (2 := CV_radius_plus _ _). apply Rbar_min_case. by rewrite /PS_incr_n ?CV_radius_incr_1. destruct n. rewrite -(CV_radius_ext (fun _ => 0)) ?CV_radius_const_0. by []. intros n ; rewrite /PS_scal /= /scal /= /mult /= ; ring. rewrite CV_radius_scal ?Ha //. apply Ropp_neq_0_compat, pow_nonzero, not_0_INR, sym_not_eq, O_S. by rewrite CV_radius_const_0. assert (0 < Rbar_min 1 (CV_radius a)). destruct (CV_radius a) as [ca | | ] ; try by auto. apply Rbar_min_case => //. by apply Rlt_0_1. apply Rbar_min_case_strong => // _. by apply Rlt_0_1. exists (mkposreal _ H0) => x Hx. assert (Rbar_lt (Rabs x) (CV_radius a)). destruct (CV_radius a) as [ca | | ] ; try by auto. simpl. eapply Rlt_le_trans. rewrite -(Rminus_0_r x). by apply Hx. simpl. apply Rmin_case_strong => // H1. by apply Req_le. rewrite PSeries_const_0 ?PSeries_plus. rewrite ?PSeries_incr_n PSeries_incr_1 PSeries_scal -Derive_n_PSeries. rewrite -Derive_PSeries. rewrite -Rmult_plus_distr_r. apply H. by apply H1. by apply H1. by apply H1. apply ex_pseries_incr_n, CV_radius_inside, H1. apply ex_pseries_scal, CV_radius_inside. by apply Rmult_comm. by apply H1. apply ex_pseries_incr_n. apply CV_radius_inside. rewrite CV_radius_derive_n. by apply H1. apply ex_pseries_incr_1, ex_pseries_derive. by apply H1. apply ex_pseries_plus. apply ex_pseries_incr_n. apply CV_radius_inside. by rewrite CV_radius_derive_n ; apply H1. apply ex_pseries_incr_1, ex_pseries_derive. by apply H1. apply ex_pseries_plus. apply ex_pseries_incr_n. apply CV_radius_inside. by apply H1. apply ex_pseries_scal. by apply Rmult_comm. apply CV_radius_inside ; by apply H1. Qed.
|
Lemma
|
examples
|
[
"From Coq Require Import Arith Reals Psatz ssreflect.",
"From Coquelicot Require Import Rcomplements Rbar Hierarchy Derive Series PSeries Lim_seq AutoDerive."
] |
examples/Bessel.v
|
Bessel1_uniqueness_aux_0
| |
Bessel1_uniqueness_aux_1 (a : nat -> R) (n : nat) : (a 0%nat = 0 \/ n = O) -> (a 1%nat = 0 \/ n = 1%nat) -> (forall k, (INR (S (S k)) ^ 2 - INR n ^ 2) * a (S (S k)) + a k = 0) -> (forall k : nat, (k < n)%nat -> a k = 0) /\ (forall p : nat, a (n + 2 * p + 1)%nat = 0) /\ (forall p : nat, a (n + 2 * p)%nat = Bessel1_seq n p * / 2 ^ (2 * p) * INR (fact n) * a n). Proof. intros Ha0 Ha1 Ha. assert (forall k, S (S k) <> n -> a (S (S k)) = - a k / (INR (S (S k)) ^ 2 - INR n ^ 2)). intros k Hk. replace (a k) with (- (INR (S (S k)) ^ 2 - INR n ^ 2) * a (S (S k))). field. replace (INR (S (S k)) ^ 2 - INR n ^ 2) with ((INR (S (S k)) - INR n) * (INR (S (S k)) + INR n)) by ring. apply Rmult_integral_contrapositive_currified. apply Rminus_eq_contra. by apply not_INR. rewrite -plus_INR plus_Sn_m. by apply (not_INR _ O), sym_not_eq, O_S. replace (a k) with ((INR (S (S k)) ^ 2 - INR n ^ 2) * a (S (S k)) + a k - (INR (S (S k)) ^ 2 - INR n ^ 2) * a (S (S k))) by ring. rewrite Ha ; ring. assert (forall k : nat, (k < n)%nat -> a k = 0). destruct n => k Hk. by apply Nat.nlt_0_r in Hk. case: Ha0 => // Ha0. destruct n. destruct k => //. by apply Nat.succ_lt_mono, Nat.nlt_0_r in Hk. case: Ha1 => // Ha1. move: k Hk. apply (MyNat.ind_0_1_SS (fun k => (k < S (S n))%nat -> a k = 0)) => // k IH Hk. rewrite H. rewrite IH /Rdiv. ring. eapply Nat.lt_trans, Hk. eapply Nat.lt_trans ; apply Nat.lt_succ_diag_r. by apply MyNat.lt_neq. repeat split. by []. elim => [ | p IH]. replace (n + 2 * 0 + 1)%nat with (S n) by ring. destruct n => //=. case: Ha1 => // Ha1. case: Ha0 => // Ha0. rewrite H ; try by intuition. rewrite H0 /Rdiv. ring. by apply Nat.lt_succ_diag_r. replace (n + 2 * S p + 1)%nat with (S (S (n + 2 * p + 1)%nat)) by ring. rewrite H ; try by intuition. rewrite IH /Rdiv. ring. elim => [ | p IH]. replace (n + 2 * 0)%nat with (n) by ring. rewrite /Bessel1_seq /= -plus_n_O. field ; by apply INR_fact_neq_0. replace (n + 2 * S p)%nat with (S (S (n + 2 * p)%nat)) by ring. rewrite H ; try by intuition. rewrite IH /Rdiv. rewrite /Bessel1_seq -plus_n_Sm. rewrite !pow_sqr /fact -/fact !mult_INR !S_INR !plus_INR /=. field ; rewrite -!plus_INR -!S_INR ; repeat split ; try (by apply INR_fact_neq_0) ; try (by apply (not_INR _ 0), sym_not_eq, O_S). apply pow_nonzero, Rgt_not_eq ; apply Rmult_lt_0_compat ; by apply Rlt_0_2. rewrite -Rsqr_plus_minus. apply Rmult_integral_contrapositive_currified. rewrite -plus_INR. apply Rgt_not_eq, lt_0_INR. lia. apply Rminus_eq_contra, not_INR. lia. Qed.
|
Lemma
|
examples
|
[
"From Coq Require Import Arith Reals Psatz ssreflect.",
"From Coquelicot Require Import Rcomplements Rbar Hierarchy Derive Series PSeries Lim_seq AutoDerive."
] |
examples/Bessel.v
|
Bessel1_uniqueness_aux_1
| |
Bessel1_uniqueness (a : nat -> R) (n : nat) : (Rbar_lt 0 (CV_radius a)) -> (forall x : R, x^2 * Derive_n (PSeries a) 2 x + x * Derive (PSeries a) x + (x^2 - (INR n)^2) * PSeries a x = 0) -> {b : R | forall x, PSeries a x = b * Bessel1 n x}. Proof. intros Hcv_a Ha. assert ((a 0%nat = 0 \/ n = O) /\ (a 1%nat = 0 \/ n = 1%nat) /\ (forall k, (INR (S (S k)) ^ 2 - INR n ^ 2) * a (S (S k)) + a k = 0)). by apply Bessel1_uniqueness_aux_0. assert ((forall k : nat, (k < n)%nat -> a k = 0) /\ (forall p : nat, a (n + 2 * p + 1)%nat = 0) /\ (forall p : nat, a (n + 2 * p)%nat = Bessel1_seq n p * / 2 ^ (2 * p) * INR (fact n) * a n)). apply Bessel1_uniqueness_aux_1 ; by apply H. exists (2^n * INR (fact n) * a n) => x. rewrite /Bessel1 (PSeries_decr_n_aux _ n). case: H0 => _ H0. rewrite Rpow_mult_distr -Rinv_pow. field_simplify ; rewrite ?Rdiv_1. rewrite !(Rmult_assoc (x ^ n)). apply Rmult_eq_compat_l. rewrite PSeries_odd_even. replace (PSeries (fun n0 : nat => PS_decr_n a n (2 * n0 + 1)) (x ^ 2)) with 0. case: H0 => _ H0. rewrite Rmult_0_r Rplus_0_r. rewrite -PSeries_scal. apply Series_ext => k. rewrite /PS_decr_n /PS_scal. rewrite H0. rewrite -!pow_mult. rewrite Rpow_mult_distr -Rinv_pow. rewrite /scal /= /mult /=. ring. by apply Rgt_not_eq, Rlt_0_2. apply sym_eq. rewrite -(PSeries_const_0 (x^2)). apply PSeries_ext => k. rewrite /PS_decr_n. replace (n + (2 * k + 1))%nat with (n + 2 * k + 1)%nat by ring. by apply H0. eapply ex_pseries_ext. move => p ; apply sym_eq. apply H0. eapply ex_pseries_ext. intros p ; rewrite Rmult_assoc ; apply Rmult_comm. apply @ex_pseries_scal. by apply Rmult_comm. case: (Req_dec x 0) => Hx0. rewrite Hx0. rewrite /= Rmult_0_l. by apply @ex_pseries_0. apply ex_series_Rabs. apply ex_series_DAlembert with 0. by apply Rlt_0_1. intros p. apply Rmult_integral_contrapositive_currified. rewrite pow_n_pow. by apply pow_nonzero, pow_nonzero. apply Rmult_integral_contrapositive_currified. by apply Bessel1_seq_neq_0. apply Rinv_neq_0_compat. apply pow_nonzero. by apply Rgt_not_eq, Rlt_0_2. apply is_lim_seq_ext with (fun p => x^2 / 4 * / (INR (S p) * INR (S (n + p)))). intros p ; rewrite !pow_n_pow !pow_mult. rewrite /Bessel1_seq -plus_n_Sm /fact -/fact !mult_INR. replace (@scal R_AbsRing R_NormedModule) with Rmult by auto. simpl (_^(S p)) ; rewrite -!/(pow _ 2) ; ring_simplify (2^2). field_simplify (x ^ 2 * (x ^ 2) ^ p * (-1 * (-1) ^ p / (INR (S p) * INR (fact p) * (INR (S (n + p)) * INR (fact (n + p)))) * / (4 * 4 ^ p)) / ((x ^ 2) ^ p * ((-1) ^ p / (INR (fact p) * INR (fact (n + p))) * / 4 ^ p))). rewrite Rabs_div. rewrite Rabs_Ropp /Rdiv !Rabs_pos_eq. field. split ; apply (not_INR _ 0), sym_not_eq, O_S. change 4 with (INR 2 * INR 2). repeat apply Rmult_le_pos ; apply pos_INR. by apply pow2_ge_0. change 4 with (INR 2 * INR 2). apply Rgt_not_eq ; repeat apply Rmult_lt_0_compat ; apply lt_0_INR, Nat.lt_0_succ. repeat split. apply pow_nonzero, Rgt_not_eq ; repeat apply Rmult_lt_0_compat ; apply Rlt_0_2. by apply INR_fact_neq_0. by apply INR_fact_neq_0. by apply Rgt_not_eq, lt_0_INR, Nat.lt_0_succ. by apply Rgt_not_eq, lt_0_INR, Nat.lt_0_succ. by apply pow_nonzero, Rlt_not_eq, (IZR_lt (-1) 0). rewrite -pow_mult ; by apply pow_nonzero. evar_last. apply is_lim_seq_scal_l. apply is_lim_seq_inv. eapply is_lim_seq_mult. apply -> is_lim_seq_incr_1. by apply is_lim_seq_INR. apply is_lim_seq_ext with (fun k => INR (k + S n)). intros k. by rewrite (Nat.add_comm n k) plus_n_Sm. apply is_lim_seq_incr_n. by apply is_lim_seq_INR. by []. by []. simpl ; apply f_equal ; ring. apply ex_pseries_ext with (fun _ => 0). intros k. rewrite /PS_decr_n /=. replace (n + (k + (k + 0) + 1))%nat with (n + 2 * k + 1)%nat by ring. by rewrite (proj1 H0). eapply ex_series_ext. intros k. rewrite /scal /= /mult /= Rmult_0_r. reflexivity. exists 0 ; apply filterlim_ext with (fun _ => 0). elim => /= [ | k IH]. by rewrite sum_O. by rewrite sum_Sn plus_zero_r. by apply filterlim_const. by apply pow_nonzero, Rgt_not_eq, Rlt_0_2. by apply Rgt_not_eq, Rlt_0_2. by apply H0. Qed.
|
Lemma
|
examples
|
[
"From Coq Require Import Arith Reals Psatz ssreflect.",
"From Coquelicot Require Import Rcomplements Rbar Hierarchy Derive Series PSeries Lim_seq AutoDerive."
] |
examples/Bessel.v
|
Bessel1_uniqueness
| |
auto_derive_2 := match goal with | |- is_derive_n ?f 2 ?x ?d => auto_derive_fun f ; match goal with | |- (forall x, _ -> is_derive _ x (@?d x)) -> _ => let H := fresh "H" in let u := fresh "u" in intro H ; apply (is_derive_ext d) ; [ intro u ; apply sym_eq, is_derive_unique ; apply H | auto_derive ] ; clear H end end.
|
Ltac
|
examples
|
[
"From Coq Require Import Reals ssreflect.",
"From Coquelicot Require Import Rcomplements Derive RInt Hierarchy Derive_2d AutoDerive."
] |
examples/DAlembert.v
|
auto_derive_2
| |
c : R. Hypothesis Zc : c <> 0.
|
Parameter
|
examples
|
[
"From Coq Require Import Reals ssreflect.",
"From Coquelicot Require Import Rcomplements Derive RInt Hierarchy Derive_2d AutoDerive."
] |
examples/DAlembert.v
|
c
| |
u0 : R -> R. Hypothesis Du0 : forall x, ex_derive (fun u => u0 u) x. Hypothesis D2u0 : forall x, ex_derive_n (fun u => u0 u) 2 x.
|
Parameter
|
examples
|
[
"From Coq Require Import Reals ssreflect.",
"From Coquelicot Require Import Rcomplements Derive RInt Hierarchy Derive_2d AutoDerive."
] |
examples/DAlembert.v
|
u0
| |
alpha x t := 1/2 * (u0 (x + c * t) + u0 (x - c * t)).
|
Definition
|
examples
|
[
"From Coq Require Import Reals ssreflect.",
"From Coquelicot Require Import Rcomplements Derive RInt Hierarchy Derive_2d AutoDerive."
] |
examples/DAlembert.v
|
alpha
| |
alpha20 x t := 1/2 * (Derive_n u0 2 (x + c * t) + Derive_n u0 2 (x - c * t)).
|
Definition
|
examples
|
[
"From Coq Require Import Reals ssreflect.",
"From Coquelicot Require Import Rcomplements Derive RInt Hierarchy Derive_2d AutoDerive."
] |
examples/DAlembert.v
|
alpha20
| |
alpha02 x t := c^2/2 * (Derive_n u0 2 (x + c * t) + Derive_n u0 2 (x - c * t)).
|
Definition
|
examples
|
[
"From Coq Require Import Reals ssreflect.",
"From Coquelicot Require Import Rcomplements Derive RInt Hierarchy Derive_2d AutoDerive."
] |
examples/DAlembert.v
|
alpha02
| |
alpha_20_lim : forall x t, is_derive_n (fun u => alpha u t) 2 x (alpha20 x t). Proof. intros x t. unfold alpha. auto_derive_2. repeat split ; apply Du0. repeat split ; apply D2u0. unfold alpha20, Derive_n, Rminus. ring. Qed.
|
Lemma
|
examples
|
[
"From Coq Require Import Reals ssreflect.",
"From Coquelicot Require Import Rcomplements Derive RInt Hierarchy Derive_2d AutoDerive."
] |
examples/DAlembert.v
|
alpha_20_lim
| |
alpha_02_lim : forall x t, is_derive_n (fun u => alpha x u) 2 t (alpha02 x t). Proof. intros x t. unfold alpha. auto_derive_2. repeat split ; apply Du0. repeat split ; apply D2u0. unfold alpha02, Derive_n, Rminus, Rdiv. ring. Qed.
|
Lemma
|
examples
|
[
"From Coq Require Import Reals ssreflect.",
"From Coquelicot Require Import Rcomplements Derive RInt Hierarchy Derive_2d AutoDerive."
] |
examples/DAlembert.v
|
alpha_02_lim
| |
u1 : R -> R. Hypothesis Du1 : forall x, ex_derive (fun u => u1 u) x.
|
Parameter
|
examples
|
[
"From Coq Require Import Reals ssreflect.",
"From Coquelicot Require Import Rcomplements Derive RInt Hierarchy Derive_2d AutoDerive."
] |
examples/DAlembert.v
|
u1
| |
Cu1 : forall x, continuity_pt (fun u => u1 u) x. intros x. destruct (Du1 x) as (l,Hl). apply derivable_continuous_pt. unfold derivable_pt, derivable_pt_abs. exists l. now apply is_derive_Reals. Qed.
|
Lemma
|
examples
|
[
"From Coq Require Import Reals ssreflect.",
"From Coquelicot Require Import Rcomplements Derive RInt Hierarchy Derive_2d AutoDerive."
] |
examples/DAlembert.v
|
Cu1
| |
continuity_implies_ex_Rint : forall f a b, (forall x, continuity_pt f x) -> ex_RInt f a b. intros f a b H. case (Rle_or_lt a b); intros H1. apply ex_RInt_Reals_1. apply continuity_implies_RiemannInt. exact H1. intros x _; apply H. apply ex_RInt_swap. apply ex_RInt_Reals_1. apply continuity_implies_RiemannInt. left; exact H1. intros x _; apply H. Qed.
|
Lemma
|
examples
|
[
"From Coq Require Import Reals ssreflect.",
"From Coquelicot Require Import Rcomplements Derive RInt Hierarchy Derive_2d AutoDerive."
] |
examples/DAlembert.v
|
continuity_implies_ex_Rint
| |
Iu1 : forall a b, ex_RInt (fun u => u1 u) a b. intros a b. apply continuity_implies_ex_Rint. apply Cu1. Qed.
|
Lemma
|
examples
|
[
"From Coq Require Import Reals ssreflect.",
"From Coquelicot Require Import Rcomplements Derive RInt Hierarchy Derive_2d AutoDerive."
] |
examples/DAlembert.v
|
Iu1
| |
beta (x t : R) := 1/(2*c) * RInt (fun u => u1 u) (x - c * t) (x + c * t).
|
Definition
|
examples
|
[
"From Coq Require Import Reals ssreflect.",
"From Coquelicot Require Import Rcomplements Derive RInt Hierarchy Derive_2d AutoDerive."
] |
examples/DAlembert.v
|
beta
| |
beta20 x t := 1/(2*c) * (Derive (fun u => u1 u) (x + c * t) - Derive (fun u => u1 u) (x - c * t)).
|
Definition
|
examples
|
[
"From Coq Require Import Reals ssreflect.",
"From Coquelicot Require Import Rcomplements Derive RInt Hierarchy Derive_2d AutoDerive."
] |
examples/DAlembert.v
|
beta20
| |
beta01 x t := 1/2 * (u1 (x + c * t) + u1 (x - c * t)).
|
Definition
|
examples
|
[
"From Coq Require Import Reals ssreflect.",
"From Coquelicot Require Import Rcomplements Derive RInt Hierarchy Derive_2d AutoDerive."
] |
examples/DAlembert.v
|
beta01
| |
beta02 x t := c/2 * (Derive (fun u => u1 u) (x + c * t) - Derive (fun u => u1 u) (x - c * t)).
|
Definition
|
examples
|
[
"From Coq Require Import Reals ssreflect.",
"From Coquelicot Require Import Rcomplements Derive RInt Hierarchy Derive_2d AutoDerive."
] |
examples/DAlembert.v
|
beta02
| |
beta20_lim : forall x t, is_derive_n (fun u => beta u t) 2 x (beta20 x t). Proof. intros x t. unfold beta. auto_derive_2. (* . *) split. apply Iu1. repeat split. apply filter_forall. apply Cu1. apply filter_forall. apply Cu1. repeat split ; apply Du1. unfold beta20, Rminus. ring. Qed.
|
Lemma
|
examples
|
[
"From Coq Require Import Reals ssreflect.",
"From Coquelicot Require Import Rcomplements Derive RInt Hierarchy Derive_2d AutoDerive."
] |
examples/DAlembert.v
|
beta20_lim
| |
beta01_lim : forall x t, is_derive (fun u => beta x u) t (beta01 x t). Proof. intros x t. unfold beta. auto_derive. split. apply Iu1. repeat split. apply filter_forall. apply Cu1. apply filter_forall. apply Cu1. unfold beta01, Rminus, Rdiv. now field. Qed.
|
Lemma
|
examples
|
[
"From Coq Require Import Reals ssreflect.",
"From Coquelicot Require Import Rcomplements Derive RInt Hierarchy Derive_2d AutoDerive."
] |
examples/DAlembert.v
|
beta01_lim
| |
beta02_lim : forall x t, is_derive_n (fun u => beta x u) 2 t (beta02 x t). Proof. intros x t. unfold beta. auto_derive_2. split. apply Iu1. repeat split. apply filter_forall. apply Cu1. apply filter_forall. apply Cu1. repeat split ; apply Du1. unfold beta02, Rminus, Rdiv. now field. Qed.
|
Lemma
|
examples
|
[
"From Coq Require Import Reals ssreflect.",
"From Coquelicot Require Import Rcomplements Derive RInt Hierarchy Derive_2d AutoDerive."
] |
examples/DAlembert.v
|
beta02_lim
| |
gamma x t := 1/(2*c) * RInt (fun tau => RInt (fun xi => f xi tau) (x - c * (t - tau)) (x + c * (t - tau))) 0 t.
|
Definition
|
examples
|
[
"From Coq Require Import Reals ssreflect.",
"From Coquelicot Require Import Rcomplements Derive RInt Hierarchy Derive_2d AutoDerive."
] |
examples/DAlembert.v
|
gamma
| |
gamma20 x t := 1/(2*c) * RInt (fun tau => Derive (fun u => f u tau) (x + c * (t - tau)) - Derive (fun u => f u tau) (x - c * (t - tau))) 0 t.
|
Definition
|
examples
|
[
"From Coq Require Import Reals ssreflect.",
"From Coquelicot Require Import Rcomplements Derive RInt Hierarchy Derive_2d AutoDerive."
] |
examples/DAlembert.v
|
gamma20
| |
gamma02 x t := (f x t + c/2 * RInt (fun tau => Derive (fun u => f u tau) (x + c * (t - tau)) - Derive (fun u => f u tau) (x - c * (t - tau))) 0 t).
|
Definition
|
examples
|
[
"From Coq Require Import Reals ssreflect.",
"From Coquelicot Require Import Rcomplements Derive RInt Hierarchy Derive_2d AutoDerive."
] |
examples/DAlembert.v
|
gamma02
| |
gamma20_lim : forall x t, is_derive_n (fun u => gamma u t) 2 x (gamma20 x t). Proof. intros x t. unfold gamma. auto_derive_2. repeat split. exists (mkposreal _ Rlt_0_1). simpl. intros t' u' _ _. repeat split. apply continuity_implies_ex_Rint => y. admit. (* cont 2D -> 1D *) apply filter_forall => y. admit. (* cont 2D -> 1D *) apply filter_forall => y. admit. (* cont 2D -> 1D *) apply filter_forall => y. apply continuity_implies_ex_Rint => z. apply derivable_continuous_pt. admit. (* ??? *) intros t' _. admit. repeat split. exists (mkposreal _ Rlt_0_1). intros t' u' _ _. repeat split. admit. admit. apply filter_forall => y. admit. intros t' _. admit. unfold gamma20. apply f_equal. apply RInt_ext => z _. now rewrite 4!Rmult_1_l. Admitted.
|
Lemma
|
examples
|
[
"From Coq Require Import Reals ssreflect.",
"From Coquelicot Require Import Rcomplements Derive RInt Hierarchy Derive_2d AutoDerive."
] |
examples/DAlembert.v
|
gamma20_lim
| |
gamma02_lim : forall x t, is_derive_n (fun u => gamma x u) 2 t (gamma02 x t). Proof. intros x t. unfold gamma. auto_derive_2. repeat split. apply locally_2d_forall => y z. admit. intros t' _. admit. apply filter_forall => y. admit. apply filter_forall => y. apply continuity_implies_ex_Rint => z. admit. exists (mkposreal _ Rlt_0_1). simpl. apply filter_forall => y. apply continuity_implies_ex_Rint => z. admit. exists (mkposreal _ Rlt_0_1). simpl. intros t' u' _ _. repeat split. apply continuity_implies_ex_Rint => y. admit. apply filter_forall => y. admit. apply filter_forall => y. admit. repeat split. apply locally_2d_forall => y z. admit. apply locally_2d_forall => y z. admit. intros x' _. admit. apply filter_forall => y. admit. apply filter_forall => y. admit. apply filter_forall => y. apply continuity_implies_ex_Rint => z. admit. exists (mkposreal _ Rlt_0_1). apply filter_forall => y. apply continuity_implies_ex_Rint => z. admit. exists (mkposreal _ Rlt_0_1). apply filter_forall => y. apply continuity_implies_ex_Rint => z. admit. exists (mkposreal _ Rlt_0_1). intros t' u' _ _. admit. apply locally_2d_forall => y z. admit. intros t' _. admit. apply filter_forall => y. admit. apply filter_forall => y. apply continuity_implies_ex_Rint => z. admit. exists (mkposreal _ Rlt_0_1). apply filter_forall => y. apply continuity_implies_ex_Rint => z. admit. exists (mkposreal _ Rlt_0_1). intros t' u' _ _. repeat split. admit. admit. unfold gamma02. ring_simplify. rewrite Rplus_opp_r Rmult_0_r Ropp_0 Rplus_0_r. rewrite RInt_point Rmult_0_r Rplus_0_r. apply Rplus_eq_reg_l with (- f x t). field_simplify. 2: exact Zc. rewrite Rmult_1_r. rewrite /Rdiv Rmult_comm. rewrite Rmult_assoc (Rmult_comm _ (/2)) -Rmult_assoc. rewrite -[Rmult]/(@scal _ R_ModuleSpace) -RInt_scal. rewrite -RInt_scal. apply RInt_ext => u _. rewrite /scal /= /mult /= /Rminus. now field. admit. admit. Admitted.
|
Lemma
|
examples
|
[
"From Coq Require Import Reals ssreflect.",
"From Coquelicot Require Import Rcomplements Derive RInt Hierarchy Derive_2d AutoDerive."
] |
examples/DAlembert.v
|
gamma02_lim
| |
is_linear_C_R (l : C -> C) : is_linear (U := C_NormedModule) (V := C_NormedModule) l -> is_linear (U := C_R_NormedModule) (V := C_R_NormedModule) l. Proof. intros Lf. - split. intros ; apply Lf. simpl ; intros. rewrite !scal_R_Cmult ; by apply Lf. case: Lf => _ _ [M Lf]. exists M ; split. by apply Lf. intros. rewrite -!Cmod_norm. apply Lf. Qed.
|
Lemma
|
examples
|
[
"From Coq Require Import Reals ssreflect.",
"From Coquelicot Require Import Coquelicot."
] |
examples/Wasow.v
|
is_linear_C_R
| |
is_linear_C_id_1 : is_linear (U := C_NormedModule) (V := AbsRing_NormedModule C_AbsRing) (fun y : C => y). Proof. split => //. exists 1 ; split. by apply Rlt_0_1. intros x ; apply Req_le. rewrite Rmult_1_l ; reflexivity. Qed.
|
Lemma
|
examples
|
[
"From Coq Require Import Reals ssreflect.",
"From Coquelicot Require Import Coquelicot."
] |
examples/Wasow.v
|
is_linear_C_id_1
| |
is_linear_C_id_2 : is_linear (U := AbsRing_NormedModule C_AbsRing) (V := C_NormedModule) (fun y : C_NormedModule => y). Proof. split => //. exists 1 ; split. by apply Rlt_0_1. intros x ; apply Req_le. rewrite Rmult_1_l ; reflexivity. Qed.
|
Lemma
|
examples
|
[
"From Coq Require Import Reals ssreflect.",
"From Coquelicot Require Import Coquelicot."
] |
examples/Wasow.v
|
is_linear_C_id_2
| |
is_linear_RtoC : is_linear RtoC. Proof. split => //=. by intros ; rewrite RtoC_plus. intros ; rewrite {2}/scal /= /prod_scal /= scal_zero_r. reflexivity. exists (sqrt 2) ; split. apply Rlt_sqrt2_0. intros. eapply Rle_trans. rewrite -Cmod_norm. apply Cmod_2Rmax. simpl. rewrite Rabs_R0. rewrite Rmax_left. apply Rle_refl. apply Rabs_pos. Qed.
|
Lemma
|
examples
|
[
"From Coq Require Import Reals ssreflect.",
"From Coquelicot Require Import Coquelicot."
] |
examples/Wasow.v
|
is_linear_RtoC
| |
continuous_RtoC x : continuous RtoC x. Proof. apply filterlim_locally. intros eps ; exists eps => /= y Hy. split => //=. by apply ball_center. Qed.
|
Lemma
|
examples
|
[
"From Coq Require Import Reals ssreflect.",
"From Coquelicot Require Import Coquelicot."
] |
examples/Wasow.v
|
continuous_RtoC
| |
continuous_C_id_1 (x : C) : continuous (T := C_UniformSpace) (U := AbsRing_UniformSpace C_AbsRing) (fun y => y) x. Proof. intros P HP. by apply locally_C. Qed.
|
Lemma
|
examples
|
[
"From Coq Require Import Reals ssreflect.",
"From Coquelicot Require Import Coquelicot."
] |
examples/Wasow.v
|
continuous_C_id_1
| |
continuous_C_id_2 (x : C) : continuous (T := AbsRing_UniformSpace C_AbsRing) (U := C_UniformSpace) (fun y => y) x. Proof. intros P HP. by apply locally_C. Qed.
|
Lemma
|
examples
|
[
"From Coq Require Import Reals ssreflect.",
"From Coquelicot Require Import Coquelicot."
] |
examples/Wasow.v
|
continuous_C_id_2
| |
continuous_C (f : C -> C) (x : C) : continuous (T := C_UniformSpace) (U := C_UniformSpace) f x <-> continuous (T := AbsRing_UniformSpace C_AbsRing) (U := AbsRing_UniformSpace C_AbsRing) f x. Proof. split => H. - intros P HP. by apply locally_C, H, locally_C. - intros P HP. by apply locally_C, H, locally_C. Qed.
|
Lemma
|
examples
|
[
"From Coq Require Import Reals ssreflect.",
"From Coquelicot Require Import Coquelicot."
] |
examples/Wasow.v
|
continuous_C
| |
is_derive_filterdiff_C_R (f : C -> C) (x : C) (df : C -> C) : is_linear df -> is_derive (V := C_NormedModule) f x (df 1) -> filterdiff (U := C_R_NormedModule) (V := C_R_NormedModule) f (locally x) df. Proof. move => Hdf [Lf Hf]. split => //. apply is_linear_C_R. split ; apply Hdf. intros y Hy eps. apply: locally_le_locally_norm. case: (fun Hy => locally_norm_le_locally _ _ (Hf y Hy eps)) => {Hf} /= delta Hf => //. apply locally_C, Hy. by apply locally_C, Hf. exists delta => /= z Hz. rewrite -!Cmod_norm. rewrite -{1}(Cmult_1_r (minus (G := C_R_NormedModule) z y)). rewrite linear_scal. by apply Hf. by apply Hdf. Qed.
|
Lemma
|
examples
|
[
"From Coq Require Import Reals ssreflect.",
"From Coquelicot Require Import Coquelicot."
] |
examples/Wasow.v
|
is_derive_filterdiff_C_R
| |
filterdiff_C_R_is_derive (f : C -> C) (x : C) (df : C) : filterdiff (U := C_R_NormedModule) (V := C_R_NormedModule) f (locally x) (fun u => mult u df) -> is_derive (V := C_NormedModule) f x df. Proof. intros (Lf,Df). split. apply is_linear_scal_l. intros y Hy eps. apply: locally_le_locally_norm. case: (fun Hy => locally_norm_le_locally _ _ (Df y Hy eps)) => {Df} /= delta Df => //. apply locally_C, Hy. by apply locally_C, Df. exists delta => /= z Hz. rewrite /norm /= /abs /= !Cmod_norm. apply Df, Hz. Qed. (** * Intégrale le long d’un segment *)
|
Lemma
|
examples
|
[
"From Coq Require Import Reals ssreflect.",
"From Coquelicot Require Import Coquelicot."
] |
examples/Wasow.v
|
filterdiff_C_R_is_derive
| |
C_RInt (f : R -> C) (a b : R) : C := (RInt (fun t => fst (f t)) a b, RInt (fun t => snd (f t)) a b).
|
Definition
|
examples
|
[
"From Coq Require Import Reals ssreflect.",
"From Coquelicot Require Import Coquelicot."
] |
examples/Wasow.v
|
C_RInt
| |
is_C_RInt_unique (f : R -> C) (a b : R) (l : C) : is_RInt f a b l -> C_RInt f a b = l. Proof. intros Hf. apply RInt_fct_extend_pair with (3 := Hf). by apply is_RInt_unique. by apply is_RInt_unique. Qed.
|
Lemma
|
examples
|
[
"From Coq Require Import Reals ssreflect.",
"From Coquelicot Require Import Coquelicot."
] |
examples/Wasow.v
|
is_C_RInt_unique
| |
C_RInt_correct (f : R -> C) (a b : R) : ex_RInt f a b -> is_RInt f a b (C_RInt f a b). Proof. case => l Hf. replace (C_RInt f a b) with l. by []. by apply sym_eq, is_C_RInt_unique. Qed.
|
Lemma
|
examples
|
[
"From Coq Require Import Reals ssreflect.",
"From Coquelicot Require Import Coquelicot."
] |
examples/Wasow.v
|
C_RInt_correct
| |
C_RInt_ext (f g : R -> C) (a b : R) : (forall x, Rmin a b <= x <= Rmax a b -> g x = f x) -> C_RInt g a b = C_RInt f a b. Proof. intros Heq. apply injective_projections ; simpl ; apply RInt_ext => x Hx ; by rewrite Heq. Qed.
|
Lemma
|
examples
|
[
"From Coq Require Import Reals ssreflect.",
"From Coquelicot Require Import Coquelicot."
] |
examples/Wasow.v
|
C_RInt_ext
| |
C_RInt_swap (f : R -> C) (a b : R) : - C_RInt f a b = C_RInt f b a. Proof. apply injective_projections ; simpl ; apply RInt_swap. Qed.
|
Lemma
|
examples
|
[
"From Coq Require Import Reals ssreflect.",
"From Coquelicot Require Import Coquelicot."
] |
examples/Wasow.v
|
C_RInt_swap
| |
C_RInt_scal_R (f : R -> C) (a b : R) (k : R) : C_RInt (fun t => scal k (f t)) a b = scal k (C_RInt f a b). Proof. apply injective_projections ; simpl ; apply RInt_scal. Qed.
|
Lemma
|
examples
|
[
"From Coq Require Import Reals ssreflect.",
"From Coquelicot Require Import Coquelicot."
] |
examples/Wasow.v
|
C_RInt_scal_R
| |
C_RInt_const c a b : C_RInt (fun _ => c) a b = scal (b - a) c. Proof. apply injective_projections ; simpl ; rewrite RInt_const ; ring. Qed.
|
Lemma
|
examples
|
[
"From Coq Require Import Reals ssreflect.",
"From Coquelicot Require Import Coquelicot."
] |
examples/Wasow.v
|
C_RInt_const
| |
is_C_RInt_scal f a b (k : C) l : is_RInt f a b l -> is_RInt (fun t => k * f t) a b (k * l). Proof. intros H. move: (is_RInt_fct_extend_fst _ _ _ _ H) => /= H1. move: (is_RInt_fct_extend_snd _ _ _ _ H) => /= {H} H2. apply is_RInt_fct_extend_pair ; simpl. by apply: is_RInt_minus ; apply: is_RInt_scal. by apply: is_RInt_plus ; apply: is_RInt_scal. Qed.
|
Lemma
|
examples
|
[
"From Coq Require Import Reals ssreflect.",
"From Coquelicot Require Import Coquelicot."
] |
examples/Wasow.v
|
is_C_RInt_scal
| |
ex_C_RInt_scal f k a b : ex_RInt f a b -> ex_RInt (fun t => k * f t) a b. Proof. intros [lf If]. eexists. apply is_C_RInt_scal ; eassumption. Qed.
|
Lemma
|
examples
|
[
"From Coq Require Import Reals ssreflect.",
"From Coquelicot Require Import Coquelicot."
] |
examples/Wasow.v
|
ex_C_RInt_scal
| |
C_RInt_scal (f : R -> C) (k : C) (a b : R) : ex_RInt f a b -> C_RInt (fun t => k * f t) a b = k * C_RInt f a b. Proof. intros Hf. apply is_C_RInt_unique. apply is_C_RInt_scal. by apply C_RInt_correct. Qed.
|
Lemma
|
examples
|
[
"From Coq Require Import Reals ssreflect.",
"From Coquelicot Require Import Coquelicot."
] |
examples/Wasow.v
|
C_RInt_scal
|
Structured dataset from Coquelicot — Classical real analysis.
2,448 declarations extracted from Coq source files.
| Column | Type | Description |
|---|---|---|
| fact | string | Declaration body |
| type | string | Lemma, Definition, Theorem, etc. |
| library | string | Source module |
| imports | list | Required imports |
| filename | string | Source file path |
| symbolic_name | string | Identifier |