CoRN.ftc.RefLemma
Require Export RefSeparating.
Require Export RefSeparated.
Require Export RefSepRef.
Section Refinement_Lemma.
The Refinement Lemmas
Variables a b : IR.
Hypothesis Hab : a [<=] b.
Variable F : PartIR.
Hypothesis contF : Continuous_I Hab F.
Hypothesis incF : included (Compact Hab) (Dom F).
Section First_Refinement_Lemma.
This is the first part of the proof of Theorem 2.9.
- P, Q are partitions of I with, respectively, n and m points;
- Q is a refinement of P;
- e is a positive real number;
- d is the modulus of continuity of F for e;
- the mesh of P is less or equal to d;
- fP and fQ are choices of points respecting the partitions P and Q,
Variable e : IR.
Hypothesis He : [0] [<] e.
Variables m n : nat.
Variable P : Partition Hab n.
Hypothesis HMesh : Mesh P [<=] d.
Variable Q : Partition Hab m.
Hypothesis Href : Refinement P Q.
Variable fP : ∀ i : nat, i < n → IR.
Hypothesis HfP : Points_in_Partition P fP.
Hypothesis HfP' : nat_less_n_fun fP.
Variable fQ : ∀ i : nat, i < m → IR.
Hypothesis HfQ : Points_in_Partition Q fQ.
Hypothesis HfQ' : nat_less_n_fun fQ.
Lemma first_refinement_lemma : AbsIR (Partition_Sum HfP incF[-]Partition_Sum HfQ incF) [<=] e[*] (b[-]a).
Proof.
eapply leEq_wdl.
2: apply eq_symmetric_unfolded; apply ref_calc2.
eapply leEq_wdl.
2: apply eq_symmetric_unfolded; apply ref_calc3.
eapply leEq_wdl.
2: apply eq_symmetric_unfolded; apply ref_calc4.
eapply leEq_wdl.
2: apply eq_symmetric_unfolded; apply ref_calc5.
eapply leEq_transitive.
apply ref_calc6.
eapply leEq_transitive.
apply ref_calc7.
eapply leEq_transitive.
apply ref_calc8.
apply leEq_wdl with (e[*] Sumx (fun (i : nat) (Hi : i < n) ⇒ Sum2
(fun (j : nat) (Hj : sub i ≤ j) (Hj' : j ≤ pred (sub (S i))) ⇒
Q _ (H' _ _ Hi Hj') [-]Q _ (lt_le_weak _ _ (H _ _ Hi Hj'))))).
apply mult_resp_leEq_lft.
2: apply less_leEq; assumption.
apply leEq_wdl with (Sumx (fun (i : nat) (Hi : i < n) ⇒ P _ Hi[-]P _ (lt_le_weak _ _ Hi))).
2: apply Sumx_wd; intros.
2: apply eq_symmetric_unfolded; apply ref_calc1.
eapply leEq_wdl.
2: apply eq_symmetric_unfolded; apply Mengolli_Sum with (f := fun (i : nat) (Hi : i ≤ n) ⇒ P i Hi).
eapply leEq_transitive.
apply leEq_AbsIR.
eapply leEq_wdr.
2: apply AbsIR_eq_x.
2: apply shift_leEq_minus; astepl a; assumption.
apply compact_elements with Hab; apply Partition_in_compact.
red in |- *; intros; apply prf1; auto.
intros; apply cg_minus_wd; apply prf1; auto.
apply eq_symmetric_unfolded; eapply eq_transitive_unfolded.
2: apply Sumx_comm_scal'.
apply Sumx_wd; intros.
eapply eq_transitive_unfolded.
2: apply Sum2_comm_scal'.
algebra.
apply RL_sub_SS.
Qed.
End First_Refinement_Lemma.
Section Second_Refinement_Lemma.
This is inequality (2.6.7).
- P, Q, R are partitions of I with, respectively, j, n and k points;
- Q is a common refinement of P and R;
- e, e' are positive real numbers;
- d, d' are the moduli of continuity of F for e, e';
- the Mesh of P is less or equal to d;
- the Mesh of R is less or equal to d';
- fP, fQ and fR are choices of points respecting the partitions P, Q
Variables n j k : nat.
Variable P : Partition Hab j.
Variable Q : Partition Hab n.
Variable R : Partition Hab k.
Hypothesis HrefP : Refinement P Q.
Hypothesis HrefR : Refinement R Q.
Variables e e' : IR.
Hypothesis He : [0] [<] e.
Hypothesis He' : [0] [<] e'.
Hypothesis HMeshP : Mesh P [<=] d.
Hypothesis HMeshR : Mesh R [<=] d'.
Variable fP : ∀ i : nat, i < j → IR.
Hypothesis HfP : Points_in_Partition P fP.
Hypothesis HfP' : nat_less_n_fun fP.
Variable fR : ∀ i : nat, i < k → IR.
Hypothesis HfR : Points_in_Partition R fR.
Hypothesis HfR' : nat_less_n_fun fR.
Lemma second_refinement_lemma :
AbsIR (Partition_Sum HfP incF[-]Partition_Sum HfR incF) [<=] e[*] (b[-]a) [+]e'[*] (b[-]a).
Proof.
set (HfQ := Partition_imp_points_1 _ _ _ _ Q) in ×.
set (H' := Partition_imp_points_2 _ _ _ _ Q) in ×.
apply leEq_wdl with (AbsIR (Partition_Sum HfP incF[-]Partition_Sum HfQ incF[+]
(Partition_Sum HfQ incF[-]Partition_Sum HfR incF))).
2: apply AbsIR_wd; rational.
eapply leEq_transitive.
apply triangle_IR.
apply plus_resp_leEq_both.
apply first_refinement_lemma with He; assumption.
eapply leEq_wdl.
2: apply AbsIR_minus.
apply first_refinement_lemma with He'; assumption.
Qed.
End Second_Refinement_Lemma.
Section Third_Refinement_Lemma.
This is an approximation of inequality (2.6.7), but without assuming the existence of a common refinement of P and R.
- P, R are partitions of I with, respectively, n and m points;
- e, e' are positive real numbers;
- d, d' are the moduli of continuity of F for e, e';
- the Mesh of P is less than d;
- the Mesh of R is less than d';
- fP and fR are choices of points respecting the partitions P and R,
- beta is a positive real number.
Variables n m : nat.
Variable P : Partition Hab n.
Variable R : Partition Hab m.
Variables e e' : IR.
Hypothesis He : [0] [<] e.
Hypothesis He' : [0] [<] e'.
Hypothesis HMeshP : Mesh P [<] d.
Hypothesis HMeshR : Mesh R [<] d'.
Variable fP : ∀ i : nat, i < n → IR.
Hypothesis HfP : Points_in_Partition P fP.
Hypothesis HfP' : nat_less_n_fun fP.
Variable fR : ∀ i : nat, i < m → IR.
Hypothesis HfR : Points_in_Partition R fR.
Hypothesis HfR' : nat_less_n_fun fR.
Hypothesis Hab' : a [<] b.
Variable beta : IR.
Hypothesis Hbeta : [0] [<] beta.
Lemma third_refinement_lemma :
AbsIR (Partition_Sum HfP incF[-]Partition_Sum HfR incF) [<=] e[*] (b[-]a) [+]e'[*] (b[-]a) [+]beta.
Proof.
apply leEq_wdl with (AbsIR (Partition_Sum HfP incF[-]Partition_Sum RL_fP'_in_P' incF[+]
(Partition_Sum RL_fP'_in_P' incF[-]Partition_Sum RL_fQ_in_Q incF) [+]
(Partition_Sum RL_fQ_in_Q incF[-]Partition_Sum RL_fR'_in_R' incF) [+]
(Partition_Sum RL_fR'_in_R' incF[-]Partition_Sum HfR incF))).
apply leEq_wdr with (alpha[+]alpha[+] (e[*] (b[-]a) [+]e'[*] (b[-]a)) [+]alpha).
2: unfold alpha in |- *; rational.
eapply leEq_transitive.
apply triangle_IR.
apply plus_resp_leEq_both.
eapply leEq_transitive.
apply triangle_IR.
apply plus_resp_leEq_both.
eapply leEq_transitive.
apply triangle_IR.
apply plus_resp_leEq_both.
apply RL_P'_P_sum.
apply RL_Q_P'_sum.
2: eapply leEq_wdl.
3: apply AbsIR_minus.
2: apply RL_R'_R_sum.
2: apply AbsIR_wd; rational.
eapply second_refinement_lemma with (Q := Separated_Refinement _ _ _ _ _ _ _ RL_Q_sep) (He := He)
(He' := He').
apply Separated_Refinement_lft.
apply Separated_Refinement_rht.
apply RL_Q_Mesh.
apply less_leEq; apply RL_R'_Mesh.
Qed.
End Third_Refinement_Lemma.
Section Fourth_Refinement_Lemma.
Finally, this is inequality (2.6.7) exactly as stated (same conventions as
above)
Variables n m : nat.
Variable P : Partition Hab n.
Variable R : Partition Hab m.
Variables e e' : IR.
Hypothesis He : [0] [<] e.
Hypothesis He' : [0] [<] e'.
Hypothesis HMeshP : Mesh P [<] d.
Hypothesis HMeshR : Mesh R [<] d'.
Variable fP : ∀ i : nat, i < n → IR.
Hypothesis HfP : Points_in_Partition P fP.
Hypothesis HfP' : nat_less_n_fun fP.
Variable fR : ∀ i : nat, i < m → IR.
Hypothesis HfR : Points_in_Partition R fR.
Hypothesis HfR' : nat_less_n_fun fR.
Hypothesis Hab' : b[-]a [<] Min d d'.
Lemma fourth_refinement_lemma :
AbsIR (Partition_Sum HfP incF[-]Partition_Sum HfR incF) [<=] e[*] (b[-]a) [+]e'[*] (b[-]a).
Proof.
generalize (proj2b_sig2T _ _ _ (contF' e He));
generalize (proj2a_sig2T _ _ _ (contF' e He)); fold d in |- *; intros Hd Hdd.
generalize (proj2b_sig2T _ _ _ (contF' e' He'));
generalize (proj2a_sig2T _ _ _ (contF' e' He')); fold d' in |- *; intros Hd' Hdd'.
apply leEq_wdl with (AbsIR (Fa[*] (b[-]a) [-] Sumx (fun (i : nat) (Hi : i < n) ⇒
(Fa[-]Part F (fP i Hi) (just HfP)) [*] (P _ Hi[-]P _ (lt_le_weak _ _ Hi))) [-] (Fa[*] (b[-]a) [-]
Sumx (fun (j : nat) (Hj : j < m) ⇒ (Fa[-]Part F (fR j Hj) (just HfR)) [*]
(R _ Hj[-]R _ (lt_le_weak _ _ Hj)))))).
2: apply AbsIR_wd; apply eq_symmetric_unfolded.
2: apply cg_minus_wd; apply RL_sum_lemma_aux.
apply leEq_wdl with (AbsIR (Sumx (fun (j : nat) (Hj : j < m) ⇒
(Fa[-]Part F (fR j Hj) (just HfR)) [*] (R _ Hj[-]R _ (lt_le_weak _ _ Hj))) [-] Sumx
(fun (i : nat) (Hi : i < n) ⇒ (Fa[-]Part F (fP i Hi) (just HfP)) [*]
(P _ Hi[-]P _ (lt_le_weak _ _ Hi))))).
2: apply AbsIR_wd; rational.
rstepr (e'[*] (b[-]a) [+]e[*] (b[-]a)).
eapply leEq_transitive.
apply triangle_IR_minus.
apply plus_resp_leEq_both.
eapply leEq_transitive.
apply triangle_SumxIR.
apply leEq_wdr with (Sumx (fun (i : nat) (Hi : i < m) ⇒ e'[*] (R _ Hi[-]R _ (lt_le_weak _ _ Hi)))).
apply Sumx_resp_leEq; intros.
eapply leEq_wdl.
2: apply eq_symmetric_unfolded; apply AbsIR_resp_mult.
apply mult_resp_leEq_both; try apply AbsIR_nonneg.
unfold Fa in |- *; apply Hdd'; unfold I in |- ×.
apply compact_inc_lft.
apply Pts_part_lemma with m R; assumption.
apply leEq_transitive with (AbsIR (b[-]a)).
apply compact_elements with Hab.
apply compact_inc_lft.
apply Pts_part_lemma with m R; assumption.
eapply leEq_wdl.
2: apply eq_symmetric_unfolded; apply AbsIR_eq_x.
2: apply shift_leEq_minus; astepl a; assumption.
eapply leEq_transitive.
apply less_leEq; apply Hab'.
apply Min_leEq_rht.
apply eq_imp_leEq; apply AbsIR_eq_x.
apply shift_leEq_minus; astepl (R i (lt_le_weak _ _ H)); apply prf2.
eapply eq_transitive_unfolded.
apply Sumx_comm_scal' with (f := fun (i : nat) (Hi : i < m) ⇒ R _ Hi[-]R _ (lt_le_weak _ _ Hi)).
apply mult_wdr.
eapply eq_transitive_unfolded.
apply Mengolli_Sum with (f := fun (i : nat) (Hi : i ≤ m) ⇒ R i Hi).
red in |- *; intros.
apply prf1; auto.
intros; algebra.
apply cg_minus_wd; [ apply finish | apply start ].
eapply leEq_transitive.
apply triangle_SumxIR.
apply leEq_wdr with (Sumx (fun (i : nat) (Hi : i < n) ⇒ e[*] (P _ Hi[-]P _ (lt_le_weak _ _ Hi)))).
apply Sumx_resp_leEq; intros.
eapply leEq_wdl.
2: apply eq_symmetric_unfolded; apply AbsIR_resp_mult.
apply mult_resp_leEq_both; try apply AbsIR_nonneg.
unfold Fa in |- *; apply Hdd; unfold I in |- ×.
apply compact_inc_lft.
apply Pts_part_lemma with n P; assumption.
apply leEq_transitive with (AbsIR (b[-]a)).
apply compact_elements with Hab.
apply compact_inc_lft.
apply Pts_part_lemma with n P; assumption.
eapply leEq_wdl.
2: apply eq_symmetric_unfolded; apply AbsIR_eq_x.
2: apply shift_leEq_minus; astepl a; assumption.
eapply leEq_transitive.
apply less_leEq; apply Hab'.
apply Min_leEq_lft.
apply eq_imp_leEq; apply AbsIR_eq_x.
apply shift_leEq_minus; astepl (P i (lt_le_weak _ _ H)); apply prf2.
eapply eq_transitive_unfolded.
apply Sumx_comm_scal' with (f := fun (i : nat) (Hi : i < n) ⇒ P _ Hi[-]P _ (lt_le_weak _ _ Hi)).
apply mult_wdr.
eapply eq_transitive_unfolded.
apply Mengolli_Sum with (f := fun (i : nat) (Hi : i ≤ n) ⇒ P i Hi).
red in |- *; intros.
apply prf1; auto.
intros; algebra.
apply cg_minus_wd; [ apply finish | apply start ].
Qed.
End Fourth_Refinement_Lemma.
Section Main_Refinement_Lemma.
We finish by presenting Theorem 9.
Variables n m : nat.
Variable P : Partition Hab n.
Variable R : Partition Hab m.
Variables e e' : IR.
Hypothesis He : [0] [<] e.
Hypothesis He' : [0] [<] e'.
Hypothesis HMeshP : Mesh P [<] d.
Hypothesis HMeshR : Mesh R [<] d'.
Variable fP : ∀ i : nat, i < n → IR.
Hypothesis HfP : Points_in_Partition P fP.
Hypothesis HfP' : nat_less_n_fun fP.
Variable fR : ∀ i : nat, i < m → IR.
Hypothesis HfR : Points_in_Partition R fR.
Hypothesis HfR' : nat_less_n_fun fR.
Lemma refinement_lemma : AbsIR (Partition_Sum HfP incF[-]Partition_Sum HfR incF) [<=] e[*] (b[-]a) [+]e'[*] (b[-]a).
Proof.
cut ([0] [<] Min d d').
intro H; elim (less_cotransitive_unfolded _ _ _ H (b[-]a)); intro.
astepr (e[*] (b[-]a) [+]e'[*] (b[-]a) [+][0]).
apply shift_leEq_plus'.
apply approach_zero_weak.
intros beta Hbeta.
apply shift_minus_leEq.
astepr (e[*] (b[-]a) [+]e'[*] (b[-]a) [+]beta).
apply third_refinement_lemma with (He := He) (He' := He'); try assumption.
astepl ([0][+]a); apply shift_plus_less; assumption.
apply fourth_refinement_lemma with He He'.
assumption.
apply less_Min.
unfold d in |- *; apply proj2a_sig2T.
unfold d' in |- *; apply proj2a_sig2T.
Qed.
End Main_Refinement_Lemma.
End Refinement_Lemma.