From 78ee53e1702bf01e19bb77a94832dc4a7c44dc0b Mon Sep 17 00:00:00 2001 From: desmettr Date: Wed, 9 Oct 2002 09:13:28 +0000 Subject: Proof of Heine's theorem git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/coq/trunk@3105 85f007b7-540e-0410-9357-904b9bb8a0f7 --- theories/Reals/Rtopology.v | 211 ++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 210 insertions(+), 1 deletion(-) diff --git a/theories/Reals/Rtopology.v b/theories/Reals/Rtopology.v index 027e79a6fe..c7a97d0064 100644 --- a/theories/Reals/Rtopology.v +++ b/theories/Reals/Rtopology.v @@ -1141,4 +1141,213 @@ Unfold inclus; Intros; Elim H7; Intros; Elim H8; Intros; Elim H10; Intros; Rewri Apply adherence_P2; Apply compact_P2; Assumption. Apply H4. Unfold famille_ferme; Unfold f0; Simpl; Unfold g; Intro; Apply adherence_P3. -Qed. \ No newline at end of file +Qed. + +(********************************************************) +(* Proof of Heine's theorem *) +(********************************************************) + +Definition uniform_continuity [f:R->R;X:R->Prop] : Prop := (eps:posreal)(EXT delta:posreal | (x,y:R) (X x)->(X y)->``(Rabsolu (x-y))``(Rabsolu ((f x)-(f y)))R := +[i:nat] Cases l of +| nil => R0 +| (cons a l') => + Cases i of + | O => a + | (S i') => (pos_Rl l' i') + end +end. + +(* La borne supérieure, si elle existe, est unique *) +Lemma is_lub_u : (E:R->Prop;x,y:R) (is_lub E x) -> (is_lub E y) -> x==y. +Unfold is_lub; Intros; Elim H; Elim H0; Intros; Apply Rle_antisym; [Apply (H4 ? H1) | Apply (H2 ? H3)]. +Qed. + +Lemma pos_Rl_P1 : (l:Rlist;a:R) (lt O (longueur l)) -> (pos_Rl (cons a l) (longueur l))==(pos_Rl l (pred (longueur l))). +Intros; Induction l; [Elim (lt_n_O ? H) | Simpl; Case (longueur l); [Reflexivity | Intro; Reflexivity]]. +Qed. + +Lemma pos_Rl_P2 : (l:Rlist;x:R) (In x l)<->(EX i:nat | (lt i (longueur l))/\x==(pos_Rl l i)). +Intros; Induction l. +Split; Intro; [Elim H | Elim H; Intros; Elim H0; Intros; Elim (lt_n_O ? H1)]. +Split; Intro. +Elim H; Intro. +Exists O; Split; [Simpl; Apply lt_O_Sn | Simpl; Apply H0]. +Elim Hrecl; Intros; Assert H3 := (H1 H0); Elim H3; Intros; Elim H4; Intros; Exists (S x0); Split; [Simpl; Apply lt_n_S; Assumption | Simpl; Assumption]. +Elim H; Intros; Elim H0; Intros; Elim (zerop x0); Intro. +Rewrite a in H2; Simpl in H2; Left; Assumption. +Right; Elim Hrecl; Intros; Apply H4; Assert H5 : (S (pred x0))=x0. +Symmetry; Apply S_pred with O; Assumption. +Exists (pred x0); Split; [Simpl in H1; Apply lt_S_n; Rewrite H5; Assumption | Rewrite <- H5 in H2; Simpl in H2; Assumption]. +Qed. + +Lemma Rlist_P1 : (l:Rlist;P:R->R->Prop) ((x:R)(In x l)->(EXT y:R | (P x y))) -> (EXT l':Rlist | (longueur l)=(longueur l')/\(i:nat) (lt i (longueur l))->(P (pos_Rl l i) (pos_Rl l' i))). +Intros; Induction l. +Exists nil; Intros; Split; [Reflexivity | Intros; Simpl in H0; Elim (lt_n_O ? H0)]. +Assert H0 : (In r (cons r l)). +Simpl; Left; Reflexivity. +Assert H1 := (H ? H0); Assert H2 : (x:R)(In x l)->(EXT y:R | (P x y)). +Intros; Apply H; Simpl; Right; Assumption. +Assert H3 := (Hrecl H2); Elim H1; Intros; Elim H3; Intros; Exists (cons x x0); Intros; Elim H5; Clear H5; Intros; Split. +Simpl; Rewrite H5; Reflexivity. +Intros; Elim (zerop i); Intro. +Rewrite a; Simpl; Assumption. +Assert H8 : i=(S (pred i)). +Apply S_pred with O; Assumption. +Rewrite H8; Simpl; Apply H6; Simpl in H7; Apply lt_S_n; Rewrite <- H8; Assumption. +Qed. + +Lemma domaine_P1 : (X:R->Prop) ~(EXT y:R | (X y))\/(EXT y:R | (X y)/\((x:R)(X x)->x==y))\/(EXT x:R | (EXT y:R | (X x)/\(X y)/\``x<>y``)). +Intro; Elim (classic (EXT y:R | (X y))); Intro. +Right; Elim H; Intros; Elim (classic (EXT y:R | (X y)/\``y<>x``)); Intro. +Right; Elim H1; Intros; Elim H2; Intros; Exists x; Exists x0; Intros. +Split; [Assumption | Split; [Assumption | Apply not_sym; Assumption]]. +Left; Exists x; Split. +Assumption. +Intros; Case (Req_EM x0 x); Intro. +Assumption. +Elim H1; Exists x0; Split; Assumption. +Left; Assumption. +Qed. + +Theorem Heine : (f:R->R;X:R->Prop) (compact X) -> ((x:R)(X x)->(continuity_pt f x)) -> (uniform_continuity f X). +Intros f0 X H0 H; Elim (domaine_P1 X); Intro Hyp. +(* X est vide *) +Unfold uniform_continuity; Intros; Exists (mkposreal ? Rlt_R0_R1); Intros; Elim Hyp; Exists x; Assumption. +Elim Hyp; Clear Hyp; Intro Hyp. +(* X possède un seul élément *) +Unfold uniform_continuity; Intros; Exists (mkposreal ? Rlt_R0_R1); Intros; Elim Hyp; Clear Hyp; Intros; Elim H4; Clear H4; Intros; Assert H6 := (H5 ? H1); Assert H7 := (H5 ? H2); Rewrite H6; Rewrite H7; Unfold Rminus; Rewrite Rplus_Ropp_r; Rewrite Rabsolu_R0; Apply (cond_pos eps). +(* X possède au moins deux éléments distincts *) +Assert X_enc : (EXT m:R | (EXT M:R | ((x:R)(X x)->``m<=x<=M``)/\``m``(Rabsolu ((f0 z)-(f0 x)))``(Rabsolu ((f0 z)-(f0 x)))(X x). +Intros; Elim H2; Intros; Unfold g in H3; Elim H3; Clear H3; Intros H3 _; Apply H3. +Pose f' := (mkfamille X g H2); Unfold compact in H0; Assert H3 : (recouvrement_ouvert X f'). +Unfold recouvrement_ouvert; Split. +Unfold recouvrement; Intros; Exists x; Simpl; Unfold g; Split. +Assumption. +Assert H4 := (H ? H3); Unfold continuity_pt in H4; Unfold continue_in in H4; Unfold limit1_in in H4; Unfold limit_in in H4; Simpl in H4; Unfold R_dist in H4; Elim (H4 ``eps/2`` (H1 eps)); Intros; Pose E:=[zeta:R]``0``(Rabsolu ((f0 z)-(f0 x))) < eps/2``); Assert H6 : (bound E). +Unfold bound; Exists ``M-m``; Unfold is_upper_bound; Unfold E; Intros; Elim H6; Clear H6; Intros H6 _; Elim H6; Clear H6; Intros _ H6; Apply H6. +Assert H7 : (EXT x:R | (E x)). +Elim H5; Clear H5; Intros; Exists (Rmin x0 ``M-m``); Unfold E; Intros; Split. +Split. +Unfold Rmin; Case (total_order_Rle x0 ``M-m``); Intro. +Apply H5. +Apply Rlt_Rminus; Apply Hyp. +Apply Rmin_r. +Intros; Case (Req_EM x z); Intro. +Rewrite H9; Unfold Rminus; Rewrite Rplus_Ropp_r; Rewrite Rabsolu_R0; Apply (H1 eps). +Apply H7; Split. +Unfold D_x no_cond; Split; [Trivial | Assumption]. +Apply Rlt_le_trans with (Rmin x0 ``M-m``); [Apply H8 | Apply Rmin_l]. +Assert H8 := (complet ? H6 H7); Elim H8; Clear H8; Intros; Cut ``0(EXT del:R | ``0``(Rabsolu ((f0 z)-(f0 x))) < eps/2``)/\(inclus (g x) [z:R]``(Rabsolu (z-x))``(Rabsolu ((f0 z)-(f0 x))) < eps/2``)/\(inclus (g x) [z:R]``(Rabsolu (z-x))``(Rabsolu ((f0 z)-(f0 x))) < eps/2``); Assert H11 : (bound E). +Unfold bound; Exists ``M-m``; Unfold is_upper_bound; Unfold E; Intros; Elim H11; Clear H11; Intros H11 _; Elim H11; Clear H11; Intros _ H11; Apply H11. +Assert H12 : (EXT x:R | (E x)). +Assert H13 := (H ? H9); Unfold continuity_pt in H13; Unfold continue_in in H13; Unfold limit1_in in H13; Unfold limit_in in H13; Simpl in H13; Unfold R_dist in H13; Elim (H13 ? (H1 eps)); Intros; Elim H12; Clear H12; Intros; Exists (Rmin x0 ``M-m``); Unfold E; Intros; Split. +Split; [Unfold Rmin; Case (total_order_Rle x0 ``M-m``); Intro; [Apply H12 | Apply Rlt_Rminus; Apply Hyp] | Apply Rmin_r]. +Intros; Case (Req_EM x z); Intro. +Rewrite H16; Unfold Rminus; Rewrite Rplus_Ropp_r; Rewrite Rabsolu_R0; Apply (H1 eps). +Apply H14; Split; [Unfold D_x no_cond; Split; [Trivial | Assumption] | Apply Rlt_le_trans with (Rmin x0 ``M-m``); [Apply H15 | Apply Rmin_l]]. +Assert H13 := (complet ? H11 H12); Elim H13; Clear H13; Intros; Cut ``0