author | huffman |
Wed, 03 Jun 2009 10:02:59 -0700 | |
changeset 31418 | 9baa48bad81c |
parent 31402 | e37967787a4f |
child 31420 | 4c22ef11078b |
permissions | -rw-r--r-- |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1 |
(* Title: Topology |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2 |
Author: Amine Chaieb, University of Cambridge |
30267 | 3 |
Author: Robert Himmelmann, TU Muenchen |
4 |
*) |
|
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5 |
|
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
6 |
header {* Elementary topology in Euclidean space. *} |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
7 |
|
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
8 |
theory Topology_Euclidean_Space |
30654 | 9 |
imports SEQ Euclidean_Space |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
10 |
begin |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
11 |
|
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
12 |
declare fstcart_pastecart[simp] sndcart_pastecart[simp] |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
13 |
|
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
14 |
subsection{* General notion of a topology *} |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
15 |
|
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
16 |
definition "istopology L \<longleftrightarrow> {} \<in> L \<and> (\<forall>S \<in>L. \<forall>T \<in>L. S \<inter> T \<in> L) \<and> (\<forall>K. K \<subseteq>L \<longrightarrow> \<Union> K \<in> L)" |
30488 | 17 |
typedef (open) 'a topology = "{L::('a set) set. istopology L}" |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
18 |
morphisms "openin" "topology" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
19 |
unfolding istopology_def by blast |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
20 |
|
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
21 |
lemma istopology_open_in[intro]: "istopology(openin U)" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
22 |
using openin[of U] by blast |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
23 |
|
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
24 |
lemma topology_inverse': "istopology U \<Longrightarrow> openin (topology U) = U" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
25 |
using topology_inverse[unfolded mem_def Collect_def] . |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
26 |
|
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
27 |
lemma topology_inverse_iff: "istopology U \<longleftrightarrow> openin (topology U) = U" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
28 |
using topology_inverse[of U] istopology_open_in[of "topology U"] by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
29 |
|
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
30 |
lemma topology_eq: "T1 = T2 \<longleftrightarrow> (\<forall>S. openin T1 S \<longleftrightarrow> openin T2 S)" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
31 |
proof- |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
32 |
{assume "T1=T2" hence "\<forall>S. openin T1 S \<longleftrightarrow> openin T2 S" by simp} |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
33 |
moreover |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
34 |
{assume H: "\<forall>S. openin T1 S \<longleftrightarrow> openin T2 S" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
35 |
hence "openin T1 = openin T2" by (metis mem_def set_ext) |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
36 |
hence "topology (openin T1) = topology (openin T2)" by simp |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
37 |
hence "T1 = T2" unfolding openin_inverse .} |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
38 |
ultimately show ?thesis by blast |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
39 |
qed |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
40 |
|
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
41 |
text{* Infer the "universe" from union of all sets in the topology. *} |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
42 |
|
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
43 |
definition "topspace T = \<Union>{S. openin T S}" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
44 |
|
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
45 |
subsection{* Main properties of open sets *} |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
46 |
|
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
47 |
lemma openin_clauses: |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
48 |
fixes U :: "'a topology" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
49 |
shows "openin U {}" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
50 |
"\<And>S T. openin U S \<Longrightarrow> openin U T \<Longrightarrow> openin U (S\<inter>T)" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
51 |
"\<And>K. (\<forall>S \<in> K. openin U S) \<Longrightarrow> openin U (\<Union>K)" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
52 |
using openin[of U] unfolding istopology_def Collect_def mem_def |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
53 |
by (metis mem_def subset_eq)+ |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
54 |
|
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
55 |
lemma openin_subset[intro]: "openin U S \<Longrightarrow> S \<subseteq> topspace U" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
56 |
unfolding topspace_def by blast |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
57 |
lemma openin_empty[simp]: "openin U {}" by (simp add: openin_clauses) |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
58 |
|
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
59 |
lemma openin_Int[intro]: "openin U S \<Longrightarrow> openin U T \<Longrightarrow> openin U (S \<inter> T)" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
60 |
by (simp add: openin_clauses) |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
61 |
|
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
62 |
lemma openin_Union[intro]: "(\<forall>S \<in>K. openin U S) \<Longrightarrow> openin U (\<Union> K)" by (simp add: openin_clauses) |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
63 |
|
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
64 |
lemma openin_Un[intro]: "openin U S \<Longrightarrow> openin U T \<Longrightarrow> openin U (S \<union> T)" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
65 |
using openin_Union[of "{S,T}" U] by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
66 |
|
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
67 |
lemma openin_topspace[intro, simp]: "openin U (topspace U)" by (simp add: openin_Union topspace_def) |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
68 |
|
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
69 |
lemma openin_subopen: "openin U S \<longleftrightarrow> (\<forall>x \<in> S. \<exists>T. openin U T \<and> x \<in> T \<and> T \<subseteq> S)" (is "?lhs \<longleftrightarrow> ?rhs") |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
70 |
proof- |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
71 |
{assume ?lhs then have ?rhs by auto } |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
72 |
moreover |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
73 |
{assume H: ?rhs |
30488 | 74 |
then obtain t where t: "\<forall>x\<in>S. openin U (t x) \<and> x \<in> t x \<and> t x \<subseteq> S" |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
75 |
unfolding Ball_def ex_simps(6)[symmetric] choice_iff by blast |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
76 |
from t have th0: "\<forall>x\<in> t`S. openin U x" by auto |
30488 | 77 |
have "\<Union> t`S = S" using t by auto |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
78 |
with openin_Union[OF th0] have "openin U S" by simp } |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
79 |
ultimately show ?thesis by blast |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
80 |
qed |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
81 |
|
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
82 |
subsection{* Closed sets *} |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
83 |
|
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
84 |
definition "closedin U S \<longleftrightarrow> S \<subseteq> topspace U \<and> openin U (topspace U - S)" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
85 |
|
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
86 |
lemma closedin_subset: "closedin U S \<Longrightarrow> S \<subseteq> topspace U" by (metis closedin_def) |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
87 |
lemma closedin_empty[simp]: "closedin U {}" by (simp add: closedin_def) |
30488 | 88 |
lemma closedin_topspace[intro,simp]: |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
89 |
"closedin U (topspace U)" by (simp add: closedin_def) |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
90 |
lemma closedin_Un[intro]: "closedin U S \<Longrightarrow> closedin U T \<Longrightarrow> closedin U (S \<union> T)" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
91 |
by (auto simp add: Diff_Un closedin_def) |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
92 |
|
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
93 |
lemma Diff_Inter[intro]: "A - \<Inter>S = \<Union> {A - s|s. s\<in>S}" by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
94 |
lemma closedin_Inter[intro]: assumes Ke: "K \<noteq> {}" and Kc: "\<forall>S \<in>K. closedin U S" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
95 |
shows "closedin U (\<Inter> K)" using Ke Kc unfolding closedin_def Diff_Inter by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
96 |
|
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
97 |
lemma closedin_Int[intro]: "closedin U S \<Longrightarrow> closedin U T \<Longrightarrow> closedin U (S \<inter> T)" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
98 |
using closedin_Inter[of "{S,T}" U] by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
99 |
|
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
100 |
lemma Diff_Diff_Int: "A - (A - B) = A \<inter> B" by blast |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
101 |
lemma openin_closedin_eq: "openin U S \<longleftrightarrow> S \<subseteq> topspace U \<and> closedin U (topspace U - S)" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
102 |
apply (auto simp add: closedin_def) |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
103 |
apply (metis openin_subset subset_eq) |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
104 |
apply (auto simp add: Diff_Diff_Int) |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
105 |
apply (subgoal_tac "topspace U \<inter> S = S") |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
106 |
by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
107 |
|
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
108 |
lemma openin_closedin: "S \<subseteq> topspace U \<Longrightarrow> (openin U S \<longleftrightarrow> closedin U (topspace U - S))" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
109 |
by (simp add: openin_closedin_eq) |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
110 |
|
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
111 |
lemma openin_diff[intro]: assumes oS: "openin U S" and cT: "closedin U T" shows "openin U (S - T)" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
112 |
proof- |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
113 |
have "S - T = S \<inter> (topspace U - T)" using openin_subset[of U S] oS cT |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
114 |
by (auto simp add: topspace_def openin_subset) |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
115 |
then show ?thesis using oS cT by (auto simp add: closedin_def) |
30488 | 116 |
qed |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
117 |
|
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
118 |
lemma closedin_diff[intro]: assumes oS: "closedin U S" and cT: "openin U T" shows "closedin U (S - T)" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
119 |
proof- |
30488 | 120 |
have "S - T = S \<inter> (topspace U - T)" using closedin_subset[of U S] oS cT |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
121 |
by (auto simp add: topspace_def ) |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
122 |
then show ?thesis using oS cT by (auto simp add: openin_closedin_eq) |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
123 |
qed |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
124 |
|
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
125 |
subsection{* Subspace topology. *} |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
126 |
|
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
127 |
definition "subtopology U V = topology {S \<inter> V |S. openin U S}" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
128 |
|
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
129 |
lemma istopology_subtopology: "istopology {S \<inter> V |S. openin U S}" (is "istopology ?L") |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
130 |
proof- |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
131 |
have "{} \<in> ?L" by blast |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
132 |
{fix A B assume A: "A \<in> ?L" and B: "B \<in> ?L" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
133 |
from A B obtain Sa and Sb where Sa: "openin U Sa" "A = Sa \<inter> V" and Sb: "openin U Sb" "B = Sb \<inter> V" by blast |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
134 |
have "A\<inter>B = (Sa \<inter> Sb) \<inter> V" "openin U (Sa \<inter> Sb)" using Sa Sb by blast+ |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
135 |
then have "A \<inter> B \<in> ?L" by blast} |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
136 |
moreover |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
137 |
{fix K assume K: "K \<subseteq> ?L" |
30488 | 138 |
have th0: "?L = (\<lambda>S. S \<inter> V) ` openin U " |
139 |
apply (rule set_ext) |
|
140 |
apply (simp add: Ball_def image_iff) |
|
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
141 |
by (metis mem_def) |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
142 |
from K[unfolded th0 subset_image_iff] |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
143 |
obtain Sk where Sk: "Sk \<subseteq> openin U" "K = (\<lambda>S. S \<inter> V) ` Sk" by blast |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
144 |
have "\<Union>K = (\<Union>Sk) \<inter> V" using Sk by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
145 |
moreover have "openin U (\<Union> Sk)" using Sk by (auto simp add: subset_eq mem_def) |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
146 |
ultimately have "\<Union>K \<in> ?L" by blast} |
30488 | 147 |
ultimately show ?thesis unfolding istopology_def by blast |
148 |
qed |
|
149 |
||
150 |
lemma openin_subtopology: |
|
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
151 |
"openin (subtopology U V) S \<longleftrightarrow> (\<exists> T. (openin U T) \<and> (S = T \<inter> V))" |
30488 | 152 |
unfolding subtopology_def topology_inverse'[OF istopology_subtopology] |
153 |
by (auto simp add: Collect_def) |
|
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
154 |
|
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
155 |
lemma topspace_subtopology: "topspace(subtopology U V) = topspace U \<inter> V" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
156 |
by (auto simp add: topspace_def openin_subtopology) |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
157 |
|
30488 | 158 |
lemma closedin_subtopology: |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
159 |
"closedin (subtopology U V) S \<longleftrightarrow> (\<exists>T. closedin U T \<and> S = T \<inter> V)" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
160 |
unfolding closedin_def topspace_subtopology |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
161 |
apply (simp add: openin_subtopology) |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
162 |
apply (rule iffI) |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
163 |
apply clarify |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
164 |
apply (rule_tac x="topspace U - T" in exI) |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
165 |
by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
166 |
|
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
167 |
lemma openin_subtopology_refl: "openin (subtopology U V) V \<longleftrightarrow> V \<subseteq> topspace U" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
168 |
unfolding openin_subtopology |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
169 |
apply (rule iffI, clarify) |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
170 |
apply (frule openin_subset[of U]) apply blast |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
171 |
apply (rule exI[where x="topspace U"]) |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
172 |
by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
173 |
|
30488 | 174 |
lemma subtopology_superset: assumes UV: "topspace U \<subseteq> V" |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
175 |
shows "subtopology U V = U" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
176 |
proof- |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
177 |
{fix S |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
178 |
{fix T assume T: "openin U T" "S = T \<inter> V" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
179 |
from T openin_subset[OF T(1)] UV have eq: "S = T" by blast |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
180 |
have "openin U S" unfolding eq using T by blast} |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
181 |
moreover |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
182 |
{assume S: "openin U S" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
183 |
hence "\<exists>T. openin U T \<and> S = T \<inter> V" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
184 |
using openin_subset[OF S] UV by auto} |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
185 |
ultimately have "(\<exists>T. openin U T \<and> S = T \<inter> V) \<longleftrightarrow> openin U S" by blast} |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
186 |
then show ?thesis unfolding topology_eq openin_subtopology by blast |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
187 |
qed |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
188 |
|
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
189 |
|
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
190 |
lemma subtopology_topspace[simp]: "subtopology U (topspace U) = U" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
191 |
by (simp add: subtopology_superset) |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
192 |
|
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
193 |
lemma subtopology_UNIV[simp]: "subtopology U UNIV = U" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
194 |
by (simp add: subtopology_superset) |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
195 |
|
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
196 |
subsection{* The universal Euclidean versions are what we use most of the time *} |
31418
9baa48bad81c
generalize some constants and lemmas to class topological_space
huffman
parents:
31402
diff
changeset
|
197 |
|
31285
0a3f9ee4117c
generalize dist function to class real_normed_vector
huffman
parents:
31275
diff
changeset
|
198 |
definition |
31418
9baa48bad81c
generalize some constants and lemmas to class topological_space
huffman
parents:
31402
diff
changeset
|
199 |
"open" :: "'a::topological_space set \<Rightarrow> bool" where |
9baa48bad81c
generalize some constants and lemmas to class topological_space
huffman
parents:
31402
diff
changeset
|
200 |
"open S \<longleftrightarrow> S \<in> topo" |
9baa48bad81c
generalize some constants and lemmas to class topological_space
huffman
parents:
31402
diff
changeset
|
201 |
|
9baa48bad81c
generalize some constants and lemmas to class topological_space
huffman
parents:
31402
diff
changeset
|
202 |
definition |
9baa48bad81c
generalize some constants and lemmas to class topological_space
huffman
parents:
31402
diff
changeset
|
203 |
closed :: "'a::topological_space set \<Rightarrow> bool" where |
9baa48bad81c
generalize some constants and lemmas to class topological_space
huffman
parents:
31402
diff
changeset
|
204 |
"closed S \<longleftrightarrow> open(UNIV - S)" |
9baa48bad81c
generalize some constants and lemmas to class topological_space
huffman
parents:
31402
diff
changeset
|
205 |
|
9baa48bad81c
generalize some constants and lemmas to class topological_space
huffman
parents:
31402
diff
changeset
|
206 |
definition |
9baa48bad81c
generalize some constants and lemmas to class topological_space
huffman
parents:
31402
diff
changeset
|
207 |
euclidean :: "'a::topological_space topology" where |
9baa48bad81c
generalize some constants and lemmas to class topological_space
huffman
parents:
31402
diff
changeset
|
208 |
"euclidean = topology open" |
9baa48bad81c
generalize some constants and lemmas to class topological_space
huffman
parents:
31402
diff
changeset
|
209 |
|
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
210 |
lemma open_UNIV[intro,simp]: "open UNIV" |
31418
9baa48bad81c
generalize some constants and lemmas to class topological_space
huffman
parents:
31402
diff
changeset
|
211 |
unfolding open_def by (rule topo_UNIV) |
9baa48bad81c
generalize some constants and lemmas to class topological_space
huffman
parents:
31402
diff
changeset
|
212 |
|
9baa48bad81c
generalize some constants and lemmas to class topological_space
huffman
parents:
31402
diff
changeset
|
213 |
lemma open_inter[intro]: "open S \<Longrightarrow> open T \<Longrightarrow> open (S \<inter> T)" |
9baa48bad81c
generalize some constants and lemmas to class topological_space
huffman
parents:
31402
diff
changeset
|
214 |
unfolding open_def by (rule topo_Int) |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
215 |
|
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
216 |
lemma open_Union[intro]: "(\<forall>S\<in>K. open S) \<Longrightarrow> open (\<Union> K)" |
31418
9baa48bad81c
generalize some constants and lemmas to class topological_space
huffman
parents:
31402
diff
changeset
|
217 |
unfolding open_def subset_eq [symmetric] by (rule topo_Union) |
9baa48bad81c
generalize some constants and lemmas to class topological_space
huffman
parents:
31402
diff
changeset
|
218 |
|
9baa48bad81c
generalize some constants and lemmas to class topological_space
huffman
parents:
31402
diff
changeset
|
219 |
lemma open_empty[intro,simp]: "open {}" |
9baa48bad81c
generalize some constants and lemmas to class topological_space
huffman
parents:
31402
diff
changeset
|
220 |
using open_Union [of "{}"] by simp |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
221 |
|
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
222 |
lemma open_openin: "open S \<longleftrightarrow> openin euclidean S" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
223 |
unfolding euclidean_def |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
224 |
apply (rule cong[where x=S and y=S]) |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
225 |
apply (rule topology_inverse[symmetric]) |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
226 |
apply (auto simp add: istopology_def) |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
227 |
by (auto simp add: mem_def subset_eq) |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
228 |
|
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
229 |
lemma topspace_euclidean: "topspace euclidean = UNIV" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
230 |
apply (simp add: topspace_def) |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
231 |
apply (rule set_ext) |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
232 |
by (auto simp add: open_openin[symmetric]) |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
233 |
|
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
234 |
lemma topspace_euclidean_subtopology[simp]: "topspace (subtopology euclidean S) = S" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
235 |
by (simp add: topspace_euclidean topspace_subtopology) |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
236 |
|
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
237 |
lemma closed_closedin: "closed S \<longleftrightarrow> closedin euclidean S" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
238 |
by (simp add: closed_def closedin_def topspace_euclidean open_openin) |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
239 |
|
31418
9baa48bad81c
generalize some constants and lemmas to class topological_space
huffman
parents:
31402
diff
changeset
|
240 |
lemma open_Un[intro]: |
9baa48bad81c
generalize some constants and lemmas to class topological_space
huffman
parents:
31402
diff
changeset
|
241 |
fixes S T :: "'a::topological_space set" |
9baa48bad81c
generalize some constants and lemmas to class topological_space
huffman
parents:
31402
diff
changeset
|
242 |
shows "open S \<Longrightarrow> open T \<Longrightarrow> open (S\<union>T)" |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
243 |
by (auto simp add: open_openin) |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
244 |
|
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
245 |
lemma open_subopen: "open S \<longleftrightarrow> (\<forall>x\<in>S. \<exists>T. open T \<and> x \<in> T \<and> T \<subseteq> S)" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
246 |
by (simp add: open_openin openin_subopen[symmetric]) |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
247 |
|
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
248 |
lemma closed_empty[intro, simp]: "closed {}" by (simp add: closed_closedin) |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
249 |
|
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
250 |
lemma closed_UNIV[simp,intro]: "closed UNIV" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
251 |
by (simp add: closed_closedin topspace_euclidean[symmetric]) |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
252 |
|
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
253 |
lemma closed_Un[intro]: "closed S \<Longrightarrow> closed T \<Longrightarrow> closed (S\<union>T)" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
254 |
by (auto simp add: closed_closedin) |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
255 |
|
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
256 |
lemma closed_Int[intro]: "closed S \<Longrightarrow> closed T \<Longrightarrow> closed (S\<inter>T)" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
257 |
by (auto simp add: closed_closedin) |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
258 |
|
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
259 |
lemma closed_Inter[intro]: assumes H: "\<forall>S \<in>K. closed S" shows "closed (\<Inter>K)" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
260 |
using H |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
261 |
unfolding closed_closedin |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
262 |
apply (cases "K = {}") |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
263 |
apply (simp add: closed_closedin[symmetric]) |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
264 |
apply (rule closedin_Inter, auto) |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
265 |
done |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
266 |
|
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
267 |
lemma open_closed: "open S \<longleftrightarrow> closed (UNIV - S)" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
268 |
by (simp add: open_openin closed_closedin topspace_euclidean openin_closedin_eq) |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
269 |
|
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
270 |
lemma closed_open: "closed S \<longleftrightarrow> open(UNIV - S)" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
271 |
by (simp add: open_openin closed_closedin topspace_euclidean closedin_def) |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
272 |
|
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
273 |
lemma open_diff[intro]: "open S \<Longrightarrow> closed T \<Longrightarrow> open (S - T)" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
274 |
by (auto simp add: open_openin closed_closedin) |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
275 |
|
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
276 |
lemma closed_diff[intro]: "closed S \<Longrightarrow> open T \<Longrightarrow> closed(S-T)" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
277 |
by (auto simp add: open_openin closed_closedin) |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
278 |
|
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
279 |
lemma open_Inter[intro]: assumes fS: "finite S" and h: "\<forall>T\<in>S. open T" shows "open (\<Inter>S)" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
280 |
using h by (induct rule: finite_induct[OF fS], auto) |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
281 |
|
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
282 |
lemma closed_Union[intro]: assumes fS: "finite S" and h: "\<forall>T\<in>S. closed T" shows "closed (\<Union>S)" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
283 |
using h by (induct rule: finite_induct[OF fS], auto) |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
284 |
|
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
285 |
subsection{* Open and closed balls. *} |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
286 |
|
31285
0a3f9ee4117c
generalize dist function to class real_normed_vector
huffman
parents:
31275
diff
changeset
|
287 |
definition |
31345
80667d5bee32
generalize topological notions to class metric_space; add class perfect_space
huffman
parents:
31344
diff
changeset
|
288 |
ball :: "'a::metric_space \<Rightarrow> real \<Rightarrow> 'a set" where |
31285
0a3f9ee4117c
generalize dist function to class real_normed_vector
huffman
parents:
31275
diff
changeset
|
289 |
"ball x e = {y. dist x y < e}" |
0a3f9ee4117c
generalize dist function to class real_normed_vector
huffman
parents:
31275
diff
changeset
|
290 |
|
0a3f9ee4117c
generalize dist function to class real_normed_vector
huffman
parents:
31275
diff
changeset
|
291 |
definition |
31345
80667d5bee32
generalize topological notions to class metric_space; add class perfect_space
huffman
parents:
31344
diff
changeset
|
292 |
cball :: "'a::metric_space \<Rightarrow> real \<Rightarrow> 'a set" where |
31285
0a3f9ee4117c
generalize dist function to class real_normed_vector
huffman
parents:
31275
diff
changeset
|
293 |
"cball x e = {y. dist x y \<le> e}" |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
294 |
|
30488 | 295 |
lemma mem_ball[simp]: "y \<in> ball x e \<longleftrightarrow> dist x y < e" by (simp add: ball_def) |
296 |
lemma mem_cball[simp]: "y \<in> cball x e \<longleftrightarrow> dist x y \<le> e" by (simp add: cball_def) |
|
31345
80667d5bee32
generalize topological notions to class metric_space; add class perfect_space
huffman
parents:
31344
diff
changeset
|
297 |
|
80667d5bee32
generalize topological notions to class metric_space; add class perfect_space
huffman
parents:
31344
diff
changeset
|
298 |
lemma mem_ball_0 [simp]: |
80667d5bee32
generalize topological notions to class metric_space; add class perfect_space
huffman
parents:
31344
diff
changeset
|
299 |
fixes x :: "'a::real_normed_vector" |
80667d5bee32
generalize topological notions to class metric_space; add class perfect_space
huffman
parents:
31344
diff
changeset
|
300 |
shows "x \<in> ball 0 e \<longleftrightarrow> norm x < e" |
80667d5bee32
generalize topological notions to class metric_space; add class perfect_space
huffman
parents:
31344
diff
changeset
|
301 |
by (simp add: dist_norm) |
80667d5bee32
generalize topological notions to class metric_space; add class perfect_space
huffman
parents:
31344
diff
changeset
|
302 |
|
80667d5bee32
generalize topological notions to class metric_space; add class perfect_space
huffman
parents:
31344
diff
changeset
|
303 |
lemma mem_cball_0 [simp]: |
80667d5bee32
generalize topological notions to class metric_space; add class perfect_space
huffman
parents:
31344
diff
changeset
|
304 |
fixes x :: "'a::real_normed_vector" |
80667d5bee32
generalize topological notions to class metric_space; add class perfect_space
huffman
parents:
31344
diff
changeset
|
305 |
shows "x \<in> cball 0 e \<longleftrightarrow> norm x \<le> e" |
80667d5bee32
generalize topological notions to class metric_space; add class perfect_space
huffman
parents:
31344
diff
changeset
|
306 |
by (simp add: dist_norm) |
80667d5bee32
generalize topological notions to class metric_space; add class perfect_space
huffman
parents:
31344
diff
changeset
|
307 |
|
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
308 |
lemma centre_in_cball[simp]: "x \<in> cball x e \<longleftrightarrow> 0\<le> e" by simp |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
309 |
lemma ball_subset_cball[simp,intro]: "ball x e \<subseteq> cball x e" by (simp add: subset_eq) |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
310 |
lemma subset_ball[intro]: "d <= e ==> ball x d \<subseteq> ball x e" by (simp add: subset_eq) |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
311 |
lemma subset_cball[intro]: "d <= e ==> cball x d \<subseteq> cball x e" by (simp add: subset_eq) |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
312 |
lemma ball_max_Un: "ball a (max r s) = ball a r \<union> ball a s" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
313 |
by (simp add: expand_set_eq) arith |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
314 |
|
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
315 |
lemma ball_min_Int: "ball a (min r s) = ball a r \<inter> ball a s" |
30488 | 316 |
by (simp add: expand_set_eq) |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
317 |
|
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
318 |
subsection{* Topological properties of open balls *} |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
319 |
|
31418
9baa48bad81c
generalize some constants and lemmas to class topological_space
huffman
parents:
31402
diff
changeset
|
320 |
lemma open_dist: |
9baa48bad81c
generalize some constants and lemmas to class topological_space
huffman
parents:
31402
diff
changeset
|
321 |
fixes S :: "'a::metric_space set" |
9baa48bad81c
generalize some constants and lemmas to class topological_space
huffman
parents:
31402
diff
changeset
|
322 |
shows "open S \<longleftrightarrow> (\<forall>x\<in>S. \<exists>e>0. \<forall>x'. dist x' x < e \<longrightarrow> x' \<in> S)" |
9baa48bad81c
generalize some constants and lemmas to class topological_space
huffman
parents:
31402
diff
changeset
|
323 |
unfolding open_def topo_dist by simp |
9baa48bad81c
generalize some constants and lemmas to class topological_space
huffman
parents:
31402
diff
changeset
|
324 |
|
30488 | 325 |
lemma diff_less_iff: "(a::real) - b > 0 \<longleftrightarrow> a > b" |
326 |
"(a::real) - b < 0 \<longleftrightarrow> a < b" |
|
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
327 |
"a - b < c \<longleftrightarrow> a < c +b" "a - b > c \<longleftrightarrow> a > c +b" by arith+ |
30488 | 328 |
lemma diff_le_iff: "(a::real) - b \<ge> 0 \<longleftrightarrow> a \<ge> b" "(a::real) - b \<le> 0 \<longleftrightarrow> a \<le> b" |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
329 |
"a - b \<le> c \<longleftrightarrow> a \<le> c +b" "a - b \<ge> c \<longleftrightarrow> a \<ge> c +b" by arith+ |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
330 |
|
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
331 |
lemma open_ball[intro, simp]: "open (ball x e)" |
31418
9baa48bad81c
generalize some constants and lemmas to class topological_space
huffman
parents:
31402
diff
changeset
|
332 |
unfolding open_dist ball_def Collect_def Ball_def mem_def |
31285
0a3f9ee4117c
generalize dist function to class real_normed_vector
huffman
parents:
31275
diff
changeset
|
333 |
unfolding dist_commute |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
334 |
apply clarify |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
335 |
apply (rule_tac x="e - dist xa x" in exI) |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
336 |
using dist_triangle_alt[where z=x] |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
337 |
apply (clarsimp simp add: diff_less_iff) |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
338 |
apply atomize |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
339 |
apply (erule_tac x="x'" in allE) |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
340 |
apply (erule_tac x="xa" in allE) |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
341 |
by arith |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
342 |
|
31285
0a3f9ee4117c
generalize dist function to class real_normed_vector
huffman
parents:
31275
diff
changeset
|
343 |
lemma centre_in_ball[simp]: "x \<in> ball x e \<longleftrightarrow> e > 0" by (metis mem_ball dist_self) |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
344 |
lemma open_contains_ball: "open S \<longleftrightarrow> (\<forall>x\<in>S. \<exists>e>0. ball x e \<subseteq> S)" |
31418
9baa48bad81c
generalize some constants and lemmas to class topological_space
huffman
parents:
31402
diff
changeset
|
345 |
unfolding open_dist subset_eq mem_ball Ball_def dist_commute .. |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
346 |
|
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
347 |
lemma open_contains_ball_eq: "open S \<Longrightarrow> \<forall>x. x\<in>S \<longleftrightarrow> (\<exists>e>0. ball x e \<subseteq> S)" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
348 |
by (metis open_contains_ball subset_eq centre_in_ball) |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
349 |
|
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
350 |
lemma ball_eq_empty[simp]: "ball x e = {} \<longleftrightarrow> e \<le> 0" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
351 |
unfolding mem_ball expand_set_eq |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
352 |
apply (simp add: not_less) |
31285
0a3f9ee4117c
generalize dist function to class real_normed_vector
huffman
parents:
31275
diff
changeset
|
353 |
by (metis zero_le_dist order_trans dist_self) |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
354 |
|
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
355 |
lemma ball_empty[intro]: "e \<le> 0 ==> ball x e = {}" by simp |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
356 |
|
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
357 |
subsection{* Basic "localization" results are handy for connectedness. *} |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
358 |
|
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
359 |
lemma openin_open: "openin (subtopology euclidean U) S \<longleftrightarrow> (\<exists>T. open T \<and> (S = U \<inter> T))" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
360 |
by (auto simp add: openin_subtopology open_openin[symmetric]) |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
361 |
|
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
362 |
lemma openin_open_Int[intro]: "open S \<Longrightarrow> openin (subtopology euclidean U) (U \<inter> S)" |
30488 | 363 |
by (auto simp add: openin_open) |
364 |
||
365 |
lemma open_openin_trans[trans]: |
|
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
366 |
"open S \<Longrightarrow> open T \<Longrightarrow> T \<subseteq> S \<Longrightarrow> openin (subtopology euclidean S) T" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
367 |
by (metis Int_absorb1 openin_open_Int) |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
368 |
|
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
369 |
lemma open_subset: "S \<subseteq> T \<Longrightarrow> open S \<Longrightarrow> openin (subtopology euclidean T) S" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
370 |
by (auto simp add: openin_open) |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
371 |
|
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
372 |
lemma closedin_closed: "closedin (subtopology euclidean U) S \<longleftrightarrow> (\<exists>T. closed T \<and> S = U \<inter> T)" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
373 |
by (simp add: closedin_subtopology closed_closedin Int_ac) |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
374 |
|
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
375 |
lemma closedin_closed_Int: "closed S ==> closedin (subtopology euclidean U) (U \<inter> S)" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
376 |
by (metis closedin_closed) |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
377 |
|
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
378 |
lemma closed_closedin_trans: "closed S \<Longrightarrow> closed T \<Longrightarrow> T \<subseteq> S \<Longrightarrow> closedin (subtopology euclidean S) T" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
379 |
apply (subgoal_tac "S \<inter> T = T" ) |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
380 |
apply auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
381 |
apply (frule closedin_closed_Int[of T S]) |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
382 |
by simp |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
383 |
|
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
384 |
lemma closed_subset: "S \<subseteq> T \<Longrightarrow> closed S \<Longrightarrow> closedin (subtopology euclidean T) S" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
385 |
by (auto simp add: closedin_closed) |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
386 |
|
31418
9baa48bad81c
generalize some constants and lemmas to class topological_space
huffman
parents:
31402
diff
changeset
|
387 |
lemma openin_euclidean_subtopology_iff: |
9baa48bad81c
generalize some constants and lemmas to class topological_space
huffman
parents:
31402
diff
changeset
|
388 |
fixes S U :: "'a::metric_space set" |
9baa48bad81c
generalize some constants and lemmas to class topological_space
huffman
parents:
31402
diff
changeset
|
389 |
shows "openin (subtopology euclidean U) S |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
390 |
\<longleftrightarrow> S \<subseteq> U \<and> (\<forall>x\<in>S. \<exists>e>0. \<forall>x'\<in>U. dist x' x < e \<longrightarrow> x'\<in> S)" (is "?lhs \<longleftrightarrow> ?rhs") |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
391 |
proof- |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
392 |
{assume ?lhs hence ?rhs unfolding openin_subtopology open_openin[symmetric] |
31418
9baa48bad81c
generalize some constants and lemmas to class topological_space
huffman
parents:
31402
diff
changeset
|
393 |
by (simp add: open_dist) blast} |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
394 |
moreover |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
395 |
{assume SU: "S \<subseteq> U" and H: "\<And>x. x \<in> S \<Longrightarrow> \<exists>e>0. \<forall>x'\<in>U. dist x' x < e \<longrightarrow> x' \<in> S" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
396 |
from H obtain d where d: "\<And>x . x\<in> S \<Longrightarrow> d x > 0 \<and> (\<forall>x' \<in> U. dist x' x < d x \<longrightarrow> x' \<in> S)" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
397 |
by metis |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
398 |
let ?T = "\<Union>{B. \<exists>x\<in>S. B = ball x (d x)}" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
399 |
have oT: "open ?T" by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
400 |
{ fix x assume "x\<in>S" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
401 |
hence "x \<in> \<Union>{B. \<exists>x\<in>S. B = ball x (d x)}" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
402 |
apply simp apply(rule_tac x="ball x(d x)" in exI) apply auto |
31285
0a3f9ee4117c
generalize dist function to class real_normed_vector
huffman
parents:
31275
diff
changeset
|
403 |
by (rule d [THEN conjunct1]) |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
404 |
hence "x\<in> ?T \<inter> U" using SU and `x\<in>S` by auto } |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
405 |
moreover |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
406 |
{ fix y assume "y\<in>?T" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
407 |
then obtain B where "y\<in>B" "B\<in>{B. \<exists>x\<in>S. B = ball x (d x)}" by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
408 |
then obtain x where "x\<in>S" and x:"y \<in> ball x (d x)" by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
409 |
assume "y\<in>U" |
31285
0a3f9ee4117c
generalize dist function to class real_normed_vector
huffman
parents:
31275
diff
changeset
|
410 |
hence "y\<in>S" using d[OF `x\<in>S`] and x by(auto simp add: dist_commute) } |
30488 | 411 |
ultimately have "S = ?T \<inter> U" by blast |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
412 |
with oT have ?lhs unfolding openin_subtopology open_openin[symmetric] by blast} |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
413 |
ultimately show ?thesis by blast |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
414 |
qed |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
415 |
|
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
416 |
text{* These "transitivity" results are handy too. *} |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
417 |
|
30488 | 418 |
lemma openin_trans[trans]: "openin (subtopology euclidean T) S \<Longrightarrow> openin (subtopology euclidean U) T |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
419 |
\<Longrightarrow> openin (subtopology euclidean U) S" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
420 |
unfolding open_openin openin_open by blast |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
421 |
|
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
422 |
lemma openin_open_trans: "openin (subtopology euclidean T) S \<Longrightarrow> open T \<Longrightarrow> open S" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
423 |
by (auto simp add: openin_open intro: openin_trans) |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
424 |
|
30488 | 425 |
lemma closedin_trans[trans]: |
426 |
"closedin (subtopology euclidean T) S \<Longrightarrow> |
|
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
427 |
closedin (subtopology euclidean U) T |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
428 |
==> closedin (subtopology euclidean U) S" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
429 |
by (auto simp add: closedin_closed closed_closedin closed_Inter Int_assoc) |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
430 |
|
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
431 |
lemma closedin_closed_trans: "closedin (subtopology euclidean T) S \<Longrightarrow> closed T \<Longrightarrow> closed S" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
432 |
by (auto simp add: closedin_closed intro: closedin_trans) |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
433 |
|
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
434 |
subsection{* Connectedness *} |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
435 |
|
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
436 |
definition "connected S \<longleftrightarrow> |
30488 | 437 |
~(\<exists>e1 e2. open e1 \<and> open e2 \<and> S \<subseteq> (e1 \<union> e2) \<and> (e1 \<inter> e2 \<inter> S = {}) |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
438 |
\<and> ~(e1 \<inter> S = {}) \<and> ~(e2 \<inter> S = {}))" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
439 |
|
30488 | 440 |
lemma connected_local: |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
441 |
"connected S \<longleftrightarrow> ~(\<exists>e1 e2. |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
442 |
openin (subtopology euclidean S) e1 \<and> |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
443 |
openin (subtopology euclidean S) e2 \<and> |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
444 |
S \<subseteq> e1 \<union> e2 \<and> |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
445 |
e1 \<inter> e2 = {} \<and> |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
446 |
~(e1 = {}) \<and> |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
447 |
~(e2 = {}))" |
31418
9baa48bad81c
generalize some constants and lemmas to class topological_space
huffman
parents:
31402
diff
changeset
|
448 |
unfolding connected_def openin_open by (safe, blast+) |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
449 |
|
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
450 |
lemma exists_diff: "(\<exists>S. P(UNIV - S)) \<longleftrightarrow> (\<exists>S. P S)" (is "?lhs \<longleftrightarrow> ?rhs") |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
451 |
proof- |
30488 | 452 |
|
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
453 |
{assume "?lhs" hence ?rhs by blast } |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
454 |
moreover |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
455 |
{fix S assume H: "P S" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
456 |
have "S = UNIV - (UNIV - S)" by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
457 |
with H have "P (UNIV - (UNIV - S))" by metis } |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
458 |
ultimately show ?thesis by metis |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
459 |
qed |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
460 |
|
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
461 |
lemma connected_clopen: "connected S \<longleftrightarrow> |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
462 |
(\<forall>T. openin (subtopology euclidean S) T \<and> |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
463 |
closedin (subtopology euclidean S) T \<longrightarrow> T = {} \<or> T = S)" (is "?lhs \<longleftrightarrow> ?rhs") |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
464 |
proof- |
30488 | 465 |
have " \<not> connected S \<longleftrightarrow> (\<exists>e1 e2. open e1 \<and> open (UNIV - e2) \<and> S \<subseteq> e1 \<union> (UNIV - e2) \<and> e1 \<inter> (UNIV - e2) \<inter> S = {} \<and> e1 \<inter> S \<noteq> {} \<and> (UNIV - e2) \<inter> S \<noteq> {})" |
466 |
unfolding connected_def openin_open closedin_closed |
|
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
467 |
apply (subst exists_diff) by blast |
30488 | 468 |
hence th0: "connected S \<longleftrightarrow> \<not> (\<exists>e2 e1. closed e2 \<and> open e1 \<and> S \<subseteq> e1 \<union> (UNIV - e2) \<and> e1 \<inter> (UNIV - e2) \<inter> S = {} \<and> e1 \<inter> S \<noteq> {} \<and> (UNIV - e2) \<inter> S \<noteq> {})" |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
469 |
(is " _ \<longleftrightarrow> \<not> (\<exists>e2 e1. ?P e2 e1)") apply (simp add: closed_def) by metis |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
470 |
|
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
471 |
have th1: "?rhs \<longleftrightarrow> \<not> (\<exists>t' t. closed t'\<and>t = S\<inter>t' \<and> t\<noteq>{} \<and> t\<noteq>S \<and> (\<exists>t'. open t' \<and> t = S \<inter> t'))" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
472 |
(is "_ \<longleftrightarrow> \<not> (\<exists>t' t. ?Q t' t)") |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
473 |
unfolding connected_def openin_open closedin_closed by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
474 |
{fix e2 |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
475 |
{fix e1 have "?P e2 e1 \<longleftrightarrow> (\<exists>t. closed e2 \<and> t = S\<inter>e2 \<and> open e1 \<and> t = S\<inter>e1 \<and> t\<noteq>{} \<and> t\<noteq>S)" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
476 |
by auto} |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
477 |
then have "(\<exists>e1. ?P e2 e1) \<longleftrightarrow> (\<exists>t. ?Q e2 t)" by metis} |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
478 |
then have "\<forall>e2. (\<exists>e1. ?P e2 e1) \<longleftrightarrow> (\<exists>t. ?Q e2 t)" by blast |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
479 |
then show ?thesis unfolding th0 th1 by simp |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
480 |
qed |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
481 |
|
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
482 |
lemma connected_empty[simp, intro]: "connected {}" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
483 |
by (simp add: connected_def) |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
484 |
|
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
485 |
subsection{* Hausdorff and other separation properties *} |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
486 |
|
30488 | 487 |
lemma hausdorff: |
31418
9baa48bad81c
generalize some constants and lemmas to class topological_space
huffman
parents:
31402
diff
changeset
|
488 |
fixes x y :: "'a::metric_space" |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
489 |
assumes xy: "x \<noteq> y" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
490 |
shows "\<exists>U V. open U \<and> open V \<and> x\<in> U \<and> y \<in> V \<and> (U \<inter> V = {})" (is "\<exists>U V. ?P U V") |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
491 |
proof- |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
492 |
let ?U = "ball x (dist x y / 2)" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
493 |
let ?V = "ball y (dist x y / 2)" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
494 |
have th0: "\<And>d x y z. (d x z :: real) <= d x y + d y z \<Longrightarrow> d y z = d z y |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
495 |
==> ~(d x y * 2 < d x z \<and> d z y * 2 < d x z)" by arith |
31285
0a3f9ee4117c
generalize dist function to class real_normed_vector
huffman
parents:
31275
diff
changeset
|
496 |
have "?P ?U ?V" using dist_pos_lt[OF xy] th0[of dist,OF dist_triangle dist_commute] |
0a3f9ee4117c
generalize dist function to class real_normed_vector
huffman
parents:
31275
diff
changeset
|
497 |
by (auto simp add: expand_set_eq less_divide_eq_number_of1) |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
498 |
then show ?thesis by blast |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
499 |
qed |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
500 |
|
31418
9baa48bad81c
generalize some constants and lemmas to class topological_space
huffman
parents:
31402
diff
changeset
|
501 |
lemma separation_t2: |
9baa48bad81c
generalize some constants and lemmas to class topological_space
huffman
parents:
31402
diff
changeset
|
502 |
fixes x y :: "'a::metric_space" |
9baa48bad81c
generalize some constants and lemmas to class topological_space
huffman
parents:
31402
diff
changeset
|
503 |
shows "x \<noteq> y \<longleftrightarrow> (\<exists>U V. open U \<and> open V \<and> x \<in> U \<and> y \<in> V \<and> U \<inter> V = {})" |
30488 | 504 |
using hausdorff[of x y] by blast |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
505 |
|
31418
9baa48bad81c
generalize some constants and lemmas to class topological_space
huffman
parents:
31402
diff
changeset
|
506 |
lemma separation_t1: |
9baa48bad81c
generalize some constants and lemmas to class topological_space
huffman
parents:
31402
diff
changeset
|
507 |
fixes x y :: "'a::metric_space" |
9baa48bad81c
generalize some constants and lemmas to class topological_space
huffman
parents:
31402
diff
changeset
|
508 |
shows "x \<noteq> y \<longleftrightarrow> (\<exists>U V. open U \<and> open V \<and> x \<in>U \<and> y\<notin> U \<and> x\<notin>V \<and> y\<in>V)" |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
509 |
using separation_t2[of x y] by blast |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
510 |
|
31418
9baa48bad81c
generalize some constants and lemmas to class topological_space
huffman
parents:
31402
diff
changeset
|
511 |
lemma separation_t0: |
9baa48bad81c
generalize some constants and lemmas to class topological_space
huffman
parents:
31402
diff
changeset
|
512 |
fixes x y :: "'a::metric_space" |
9baa48bad81c
generalize some constants and lemmas to class topological_space
huffman
parents:
31402
diff
changeset
|
513 |
shows "x \<noteq> y \<longleftrightarrow> (\<exists>U. open U \<and> ~(x\<in>U \<longleftrightarrow> y\<in>U))" by(metis separation_t1) |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
514 |
|
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
515 |
subsection{* Limit points *} |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
516 |
|
31345
80667d5bee32
generalize topological notions to class metric_space; add class perfect_space
huffman
parents:
31344
diff
changeset
|
517 |
definition |
80667d5bee32
generalize topological notions to class metric_space; add class perfect_space
huffman
parents:
31344
diff
changeset
|
518 |
islimpt:: "'a::metric_space \<Rightarrow> 'a set \<Rightarrow> bool" (infixr "islimpt" 60) where |
80667d5bee32
generalize topological notions to class metric_space; add class perfect_space
huffman
parents:
31344
diff
changeset
|
519 |
"x islimpt S \<longleftrightarrow> (\<forall>T. x\<in>T \<longrightarrow> open T \<longrightarrow> (\<exists>y\<in>S. y\<in>T \<and> y\<noteq>x))" |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
520 |
|
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
521 |
(* FIXME: Sure this form is OK????*) |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
522 |
lemma islimptE: assumes "x islimpt S" and "x \<in> T" and "open T" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
523 |
obtains "(\<exists>y\<in>S. y\<in>T \<and> y\<noteq>x)" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
524 |
using assms unfolding islimpt_def by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
525 |
|
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
526 |
lemma islimpt_subset: "x islimpt S \<Longrightarrow> S \<subseteq> T ==> x islimpt T" by (auto simp add: islimpt_def) |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
527 |
lemma islimpt_approachable: "x islimpt S \<longleftrightarrow> (\<forall>e>0. \<exists>x'\<in>S. x' \<noteq> x \<and> dist x' x < e)" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
528 |
unfolding islimpt_def |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
529 |
apply auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
530 |
apply(erule_tac x="ball x e" in allE) |
31285
0a3f9ee4117c
generalize dist function to class real_normed_vector
huffman
parents:
31275
diff
changeset
|
531 |
apply auto |
0a3f9ee4117c
generalize dist function to class real_normed_vector
huffman
parents:
31275
diff
changeset
|
532 |
apply(rule_tac x=y in bexI) |
0a3f9ee4117c
generalize dist function to class real_normed_vector
huffman
parents:
31275
diff
changeset
|
533 |
apply (auto simp add: dist_commute) |
31418
9baa48bad81c
generalize some constants and lemmas to class topological_space
huffman
parents:
31402
diff
changeset
|
534 |
apply (simp add: open_dist, drule (1) bspec) |
31285
0a3f9ee4117c
generalize dist function to class real_normed_vector
huffman
parents:
31275
diff
changeset
|
535 |
apply (clarify, drule spec, drule (1) mp, auto) |
0a3f9ee4117c
generalize dist function to class real_normed_vector
huffman
parents:
31275
diff
changeset
|
536 |
done |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
537 |
|
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
538 |
lemma islimpt_approachable_le: "x islimpt S \<longleftrightarrow> (\<forall>e>0. \<exists>x'\<in> S. x' \<noteq> x \<and> dist x' x <= e)" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
539 |
unfolding islimpt_approachable |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
540 |
using approachable_lt_le[where f="\<lambda>x'. dist x' x" and P="\<lambda>x'. \<not> (x'\<in>S \<and> x'\<noteq>x)"] |
31285
0a3f9ee4117c
generalize dist function to class real_normed_vector
huffman
parents:
31275
diff
changeset
|
541 |
by metis (* FIXME: VERY slow! *) |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
542 |
|
31345
80667d5bee32
generalize topological notions to class metric_space; add class perfect_space
huffman
parents:
31344
diff
changeset
|
543 |
axclass perfect_space \<subseteq> metric_space |
80667d5bee32
generalize topological notions to class metric_space; add class perfect_space
huffman
parents:
31344
diff
changeset
|
544 |
islimpt_UNIV [simp, intro]: "x islimpt UNIV" |
80667d5bee32
generalize topological notions to class metric_space; add class perfect_space
huffman
parents:
31344
diff
changeset
|
545 |
|
80667d5bee32
generalize topological notions to class metric_space; add class perfect_space
huffman
parents:
31344
diff
changeset
|
546 |
lemma perfect_choose_dist: |
80667d5bee32
generalize topological notions to class metric_space; add class perfect_space
huffman
parents:
31344
diff
changeset
|
547 |
fixes x :: "'a::perfect_space" |
80667d5bee32
generalize topological notions to class metric_space; add class perfect_space
huffman
parents:
31344
diff
changeset
|
548 |
shows "0 < r \<Longrightarrow> \<exists>a. a \<noteq> x \<and> dist a x < r" |
80667d5bee32
generalize topological notions to class metric_space; add class perfect_space
huffman
parents:
31344
diff
changeset
|
549 |
using islimpt_UNIV [of x] |
80667d5bee32
generalize topological notions to class metric_space; add class perfect_space
huffman
parents:
31344
diff
changeset
|
550 |
by (simp add: islimpt_approachable) |
80667d5bee32
generalize topological notions to class metric_space; add class perfect_space
huffman
parents:
31344
diff
changeset
|
551 |
|
80667d5bee32
generalize topological notions to class metric_space; add class perfect_space
huffman
parents:
31344
diff
changeset
|
552 |
instance real :: perfect_space |
80667d5bee32
generalize topological notions to class metric_space; add class perfect_space
huffman
parents:
31344
diff
changeset
|
553 |
apply default |
80667d5bee32
generalize topological notions to class metric_space; add class perfect_space
huffman
parents:
31344
diff
changeset
|
554 |
apply (rule islimpt_approachable [THEN iffD2]) |
80667d5bee32
generalize topological notions to class metric_space; add class perfect_space
huffman
parents:
31344
diff
changeset
|
555 |
apply (clarify, rule_tac x="x + e/2" in bexI) |
80667d5bee32
generalize topological notions to class metric_space; add class perfect_space
huffman
parents:
31344
diff
changeset
|
556 |
apply (auto simp add: dist_norm) |
80667d5bee32
generalize topological notions to class metric_space; add class perfect_space
huffman
parents:
31344
diff
changeset
|
557 |
done |
80667d5bee32
generalize topological notions to class metric_space; add class perfect_space
huffman
parents:
31344
diff
changeset
|
558 |
|
80667d5bee32
generalize topological notions to class metric_space; add class perfect_space
huffman
parents:
31344
diff
changeset
|
559 |
instance "^" :: (perfect_space, finite) perfect_space |
80667d5bee32
generalize topological notions to class metric_space; add class perfect_space
huffman
parents:
31344
diff
changeset
|
560 |
proof |
80667d5bee32
generalize topological notions to class metric_space; add class perfect_space
huffman
parents:
31344
diff
changeset
|
561 |
fix x :: "'a ^ 'b" |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
562 |
{ |
31345
80667d5bee32
generalize topological notions to class metric_space; add class perfect_space
huffman
parents:
31344
diff
changeset
|
563 |
fix e :: real assume "0 < e" |
80667d5bee32
generalize topological notions to class metric_space; add class perfect_space
huffman
parents:
31344
diff
changeset
|
564 |
def a \<equiv> "x $ arbitrary" |
80667d5bee32
generalize topological notions to class metric_space; add class perfect_space
huffman
parents:
31344
diff
changeset
|
565 |
have "a islimpt UNIV" by (rule islimpt_UNIV) |
80667d5bee32
generalize topological notions to class metric_space; add class perfect_space
huffman
parents:
31344
diff
changeset
|
566 |
with `0 < e` obtain b where "b \<noteq> a" and "dist b a < e" |
80667d5bee32
generalize topological notions to class metric_space; add class perfect_space
huffman
parents:
31344
diff
changeset
|
567 |
unfolding islimpt_approachable by auto |
80667d5bee32
generalize topological notions to class metric_space; add class perfect_space
huffman
parents:
31344
diff
changeset
|
568 |
def y \<equiv> "Cart_lambda ((Cart_nth x)(arbitrary := b))" |
80667d5bee32
generalize topological notions to class metric_space; add class perfect_space
huffman
parents:
31344
diff
changeset
|
569 |
from `b \<noteq> a` have "y \<noteq> x" |
80667d5bee32
generalize topological notions to class metric_space; add class perfect_space
huffman
parents:
31344
diff
changeset
|
570 |
unfolding a_def y_def by (simp add: Cart_eq) |
80667d5bee32
generalize topological notions to class metric_space; add class perfect_space
huffman
parents:
31344
diff
changeset
|
571 |
from `dist b a < e` have "dist y x < e" |
80667d5bee32
generalize topological notions to class metric_space; add class perfect_space
huffman
parents:
31344
diff
changeset
|
572 |
unfolding dist_vector_def a_def y_def |
80667d5bee32
generalize topological notions to class metric_space; add class perfect_space
huffman
parents:
31344
diff
changeset
|
573 |
apply simp |
80667d5bee32
generalize topological notions to class metric_space; add class perfect_space
huffman
parents:
31344
diff
changeset
|
574 |
apply (rule le_less_trans [OF setL2_le_setsum [OF zero_le_dist]]) |
80667d5bee32
generalize topological notions to class metric_space; add class perfect_space
huffman
parents:
31344
diff
changeset
|
575 |
apply (subst setsum_diff1' [where a=arbitrary], simp, simp, simp) |
80667d5bee32
generalize topological notions to class metric_space; add class perfect_space
huffman
parents:
31344
diff
changeset
|
576 |
done |
80667d5bee32
generalize topological notions to class metric_space; add class perfect_space
huffman
parents:
31344
diff
changeset
|
577 |
from `y \<noteq> x` and `dist y x < e` |
80667d5bee32
generalize topological notions to class metric_space; add class perfect_space
huffman
parents:
31344
diff
changeset
|
578 |
have "\<exists>y\<in>UNIV. y \<noteq> x \<and> dist y x < e" by auto |
80667d5bee32
generalize topological notions to class metric_space; add class perfect_space
huffman
parents:
31344
diff
changeset
|
579 |
} |
80667d5bee32
generalize topological notions to class metric_space; add class perfect_space
huffman
parents:
31344
diff
changeset
|
580 |
then show "x islimpt UNIV" unfolding islimpt_approachable by blast |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
581 |
qed |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
582 |
|
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
583 |
lemma closed_limpt: "closed S \<longleftrightarrow> (\<forall>x. x islimpt S \<longrightarrow> x \<in> S)" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
584 |
unfolding closed_def |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
585 |
apply (subst open_subopen) |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
586 |
apply (simp add: islimpt_def subset_eq) |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
587 |
by (metis DiffE DiffI UNIV_I insertCI insert_absorb mem_def) |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
588 |
|
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
589 |
lemma islimpt_EMPTY[simp]: "\<not> x islimpt {}" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
590 |
unfolding islimpt_approachable apply auto by ferrack |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
591 |
|
30582 | 592 |
lemma closed_positive_orthant: "closed {x::real^'n::finite. \<forall>i. 0 \<le>x$i}" |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
593 |
proof- |
30582 | 594 |
let ?U = "UNIV :: 'n set" |
595 |
let ?O = "{x::real^'n. \<forall>i. x$i\<ge>0}" |
|
596 |
{fix x:: "real^'n" and i::'n assume H: "\<forall>e>0. \<exists>x'\<in>?O. x' \<noteq> x \<and> dist x' x < e" |
|
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
597 |
and xi: "x$i < 0" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
598 |
from xi have th0: "-x$i > 0" by arith |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
599 |
from H[rule_format, OF th0] obtain x' where x': "x' \<in>?O" "x' \<noteq> x" "dist x' x < -x $ i" by blast |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
600 |
have th:" \<And>b a (x::real). abs x <= b \<Longrightarrow> b <= a ==> ~(a + x < 0)" by arith |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
601 |
have th': "\<And>x (y::real). x < 0 \<Longrightarrow> 0 <= y ==> abs x <= abs (y - x)" by arith |
30582 | 602 |
have th1: "\<bar>x$i\<bar> \<le> \<bar>(x' - x)$i\<bar>" using x'(1) xi |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
603 |
apply (simp only: vector_component) |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
604 |
by (rule th') auto |
30582 | 605 |
have th2: "\<bar>dist x x'\<bar> \<ge> \<bar>(x' - x)$i\<bar>" using component_le_norm[of "x'-x" i] |
31289 | 606 |
apply (simp add: dist_norm) by norm |
31285
0a3f9ee4117c
generalize dist function to class real_normed_vector
huffman
parents:
31275
diff
changeset
|
607 |
from th[OF th1 th2] x'(3) have False by (simp add: dist_commute) } |
30488 | 608 |
then show ?thesis unfolding closed_limpt islimpt_approachable |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
609 |
unfolding not_le[symmetric] by blast |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
610 |
qed |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
611 |
|
31289 | 612 |
lemma finite_set_avoid: |
31345
80667d5bee32
generalize topological notions to class metric_space; add class perfect_space
huffman
parents:
31344
diff
changeset
|
613 |
fixes a :: "'a::metric_space" |
31289 | 614 |
assumes fS: "finite S" shows "\<exists>d>0. \<forall>x\<in>S. x \<noteq> a \<longrightarrow> d <= dist a x" |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
615 |
proof(induct rule: finite_induct[OF fS]) |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
616 |
case 1 thus ?case apply auto by ferrack |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
617 |
next |
30488 | 618 |
case (2 x F) |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
619 |
from 2 obtain d where d: "d >0" "\<forall>x\<in>F. x\<noteq>a \<longrightarrow> d \<le> dist a x" by blast |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
620 |
{assume "x = a" hence ?case using d by auto } |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
621 |
moreover |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
622 |
{assume xa: "x\<noteq>a" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
623 |
let ?d = "min d (dist a x)" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
624 |
have dp: "?d > 0" using xa d(1) using dist_nz by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
625 |
from d have d': "\<forall>x\<in>F. x\<noteq>a \<longrightarrow> ?d \<le> dist a x" by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
626 |
with dp xa have ?case by(auto intro!: exI[where x="?d"]) } |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
627 |
ultimately show ?case by blast |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
628 |
qed |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
629 |
|
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
630 |
lemma islimpt_finite: assumes fS: "finite S" shows "\<not> a islimpt S" |
30488 | 631 |
unfolding islimpt_approachable |
31285
0a3f9ee4117c
generalize dist function to class real_normed_vector
huffman
parents:
31275
diff
changeset
|
632 |
using finite_set_avoid[OF fS, of a] by (metis dist_commute not_le) |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
633 |
|
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
634 |
lemma islimpt_Un: "x islimpt (S \<union> T) \<longleftrightarrow> x islimpt S \<or> x islimpt T" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
635 |
apply (rule iffI) |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
636 |
defer |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
637 |
apply (metis Un_upper1 Un_upper2 islimpt_subset) |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
638 |
unfolding islimpt_approachable |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
639 |
apply auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
640 |
apply (erule_tac x="min e ea" in allE) |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
641 |
apply auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
642 |
done |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
643 |
|
30488 | 644 |
lemma discrete_imp_closed: |
31418
9baa48bad81c
generalize some constants and lemmas to class topological_space
huffman
parents:
31402
diff
changeset
|
645 |
fixes S :: "'a::metric_space set" |
31345
80667d5bee32
generalize topological notions to class metric_space; add class perfect_space
huffman
parents:
31344
diff
changeset
|
646 |
assumes e: "0 < e" and d: "\<forall>x \<in> S. \<forall>y \<in> S. dist y x < e \<longrightarrow> y = x" |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
647 |
shows "closed S" |
30488 | 648 |
proof- |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
649 |
{fix x assume C: "\<forall>e>0. \<exists>x'\<in>S. x' \<noteq> x \<and> dist x' x < e" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
650 |
from e have e2: "e/2 > 0" by arith |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
651 |
from C[rule_format, OF e2] obtain y where y: "y \<in> S" "y\<noteq>x" "dist y x < e/2" by blast |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
652 |
let ?m = "min (e/2) (dist x y) " |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
653 |
from e2 y(2) have mp: "?m > 0" by (simp add: dist_nz[THEN sym]) |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
654 |
from C[rule_format, OF mp] obtain z where z: "z \<in> S" "z\<noteq>x" "dist z x < ?m" by blast |
31345
80667d5bee32
generalize topological notions to class metric_space; add class perfect_space
huffman
parents:
31344
diff
changeset
|
655 |
have th: "dist z y < e" using z y |
31285
0a3f9ee4117c
generalize dist function to class real_normed_vector
huffman
parents:
31275
diff
changeset
|
656 |
by (intro dist_triangle_lt [where z=x], simp) |
30488 | 657 |
from d[rule_format, OF y(1) z(1) th] y z |
31285
0a3f9ee4117c
generalize dist function to class real_normed_vector
huffman
parents:
31275
diff
changeset
|
658 |
have False by (auto simp add: dist_commute)} |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
659 |
then show ?thesis by (metis islimpt_approachable closed_limpt) |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
660 |
qed |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
661 |
|
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
662 |
subsection{* Interior of a Set *} |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
663 |
definition "interior S = {x. \<exists>T. open T \<and> x \<in> T \<and> T \<subseteq> S}" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
664 |
|
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
665 |
lemma interior_eq: "interior S = S \<longleftrightarrow> open S" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
666 |
apply (simp add: expand_set_eq interior_def) |
31418
9baa48bad81c
generalize some constants and lemmas to class topological_space
huffman
parents:
31402
diff
changeset
|
667 |
apply (subst (2) open_subopen) by (safe, blast+) |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
668 |
|
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
669 |
lemma interior_open: "open S ==> (interior S = S)" by (metis interior_eq) |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
670 |
|
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
671 |
lemma interior_empty[simp]: "interior {} = {}" by (simp add: interior_def) |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
672 |
|
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
673 |
lemma open_interior[simp, intro]: "open(interior S)" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
674 |
apply (simp add: interior_def) |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
675 |
apply (subst open_subopen) by blast |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
676 |
|
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
677 |
lemma interior_interior[simp]: "interior(interior S) = interior S" by (metis interior_eq open_interior) |
30488 | 678 |
lemma interior_subset: "interior S \<subseteq> S" by (auto simp add: interior_def) |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
679 |
lemma subset_interior: "S \<subseteq> T ==> (interior S) \<subseteq> (interior T)" by (auto simp add: interior_def) |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
680 |
lemma interior_maximal: "T \<subseteq> S \<Longrightarrow> open T ==> T \<subseteq> (interior S)" by (auto simp add: interior_def) |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
681 |
lemma interior_unique: "T \<subseteq> S \<Longrightarrow> open T \<Longrightarrow> (\<forall>T'. T' \<subseteq> S \<and> open T' \<longrightarrow> T' \<subseteq> T) \<Longrightarrow> interior S = T" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
682 |
by (metis equalityI interior_maximal interior_subset open_interior) |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
683 |
lemma mem_interior: "x \<in> interior S \<longleftrightarrow> (\<exists>e. 0 < e \<and> ball x e \<subseteq> S)" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
684 |
apply (simp add: interior_def) |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
685 |
by (metis open_contains_ball centre_in_ball open_ball subset_trans) |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
686 |
|
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
687 |
lemma open_subset_interior: "open S ==> S \<subseteq> interior T \<longleftrightarrow> S \<subseteq> T" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
688 |
by (metis interior_maximal interior_subset subset_trans) |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
689 |
|
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
690 |
lemma interior_inter[simp]: "interior(S \<inter> T) = interior S \<inter> interior T" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
691 |
apply (rule equalityI, simp) |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
692 |
apply (metis Int_lower1 Int_lower2 subset_interior) |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
693 |
by (metis Int_mono interior_subset open_inter open_interior open_subset_interior) |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
694 |
|
31345
80667d5bee32
generalize topological notions to class metric_space; add class perfect_space
huffman
parents:
31344
diff
changeset
|
695 |
lemma interior_limit_point [intro]: |
80667d5bee32
generalize topological notions to class metric_space; add class perfect_space
huffman
parents:
31344
diff
changeset
|
696 |
fixes x :: "'a::perfect_space" |
80667d5bee32
generalize topological notions to class metric_space; add class perfect_space
huffman
parents:
31344
diff
changeset
|
697 |
assumes x: "x \<in> interior S" shows "x islimpt S" |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
698 |
proof- |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
699 |
from x obtain e where e: "e>0" "\<forall>x'. dist x x' < e \<longrightarrow> x' \<in> S" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
700 |
unfolding mem_interior subset_eq Ball_def mem_ball by blast |
31345
80667d5bee32
generalize topological notions to class metric_space; add class perfect_space
huffman
parents:
31344
diff
changeset
|
701 |
{ |
80667d5bee32
generalize topological notions to class metric_space; add class perfect_space
huffman
parents:
31344
diff
changeset
|
702 |
fix d::real assume d: "d>0" |
80667d5bee32
generalize topological notions to class metric_space; add class perfect_space
huffman
parents:
31344
diff
changeset
|
703 |
let ?m = "min d e" |
80667d5bee32
generalize topological notions to class metric_space; add class perfect_space
huffman
parents:
31344
diff
changeset
|
704 |
have mde2: "0 < ?m" using e(1) d(1) by simp |
80667d5bee32
generalize topological notions to class metric_space; add class perfect_space
huffman
parents:
31344
diff
changeset
|
705 |
from perfect_choose_dist [OF mde2, of x] |
80667d5bee32
generalize topological notions to class metric_space; add class perfect_space
huffman
parents:
31344
diff
changeset
|
706 |
obtain y where "y \<noteq> x" and "dist y x < ?m" by blast |
80667d5bee32
generalize topological notions to class metric_space; add class perfect_space
huffman
parents:
31344
diff
changeset
|
707 |
then have "dist y x < e" "dist y x < d" by simp_all |
80667d5bee32
generalize topological notions to class metric_space; add class perfect_space
huffman
parents:
31344
diff
changeset
|
708 |
from `dist y x < e` e(2) have "y \<in> S" by (simp add: dist_commute) |
30488 | 709 |
have "\<exists>x'\<in>S. x'\<noteq> x \<and> dist x' x < d" |
31345
80667d5bee32
generalize topological notions to class metric_space; add class perfect_space
huffman
parents:
31344
diff
changeset
|
710 |
using `y \<in> S` `y \<noteq> x` `dist y x < d` by fast |
80667d5bee32
generalize topological notions to class metric_space; add class perfect_space
huffman
parents:
31344
diff
changeset
|
711 |
} |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
712 |
then show ?thesis unfolding islimpt_approachable by blast |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
713 |
qed |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
714 |
|
30488 | 715 |
lemma interior_closed_Un_empty_interior: |
31394
8d8417abb14f
generalize lemma interior_closed_Un_empty_interior
huffman
parents:
31393
diff
changeset
|
716 |
fixes S T :: "'a::metric_space set" |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
717 |
assumes cS: "closed S" and iT: "interior T = {}" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
718 |
shows "interior(S \<union> T) = interior S" |
31394
8d8417abb14f
generalize lemma interior_closed_Un_empty_interior
huffman
parents:
31393
diff
changeset
|
719 |
proof |
8d8417abb14f
generalize lemma interior_closed_Un_empty_interior
huffman
parents:
31393
diff
changeset
|
720 |
show "interior S \<subseteq> interior (S\<union>T)" |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
721 |
by (rule subset_interior, blast) |
31394
8d8417abb14f
generalize lemma interior_closed_Un_empty_interior
huffman
parents:
31393
diff
changeset
|
722 |
next |
8d8417abb14f
generalize lemma interior_closed_Un_empty_interior
huffman
parents:
31393
diff
changeset
|
723 |
show "interior (S \<union> T) \<subseteq> interior S" |
8d8417abb14f
generalize lemma interior_closed_Un_empty_interior
huffman
parents:
31393
diff
changeset
|
724 |
proof |
8d8417abb14f
generalize lemma interior_closed_Un_empty_interior
huffman
parents:
31393
diff
changeset
|
725 |
fix x assume "x \<in> interior (S \<union> T)" |
8d8417abb14f
generalize lemma interior_closed_Un_empty_interior
huffman
parents:
31393
diff
changeset
|
726 |
then obtain R where "open R" "x \<in> R" "R \<subseteq> S \<union> T" |
8d8417abb14f
generalize lemma interior_closed_Un_empty_interior
huffman
parents:
31393
diff
changeset
|
727 |
unfolding interior_def by fast |
8d8417abb14f
generalize lemma interior_closed_Un_empty_interior
huffman
parents:
31393
diff
changeset
|
728 |
show "x \<in> interior S" |
8d8417abb14f
generalize lemma interior_closed_Un_empty_interior
huffman
parents:
31393
diff
changeset
|
729 |
proof (rule ccontr) |
8d8417abb14f
generalize lemma interior_closed_Un_empty_interior
huffman
parents:
31393
diff
changeset
|
730 |
assume "x \<notin> interior S" |
8d8417abb14f
generalize lemma interior_closed_Un_empty_interior
huffman
parents:
31393
diff
changeset
|
731 |
with `x \<in> R` `open R` obtain y where "y \<in> R - S" |
8d8417abb14f
generalize lemma interior_closed_Un_empty_interior
huffman
parents:
31393
diff
changeset
|
732 |
unfolding interior_def expand_set_eq by fast |
8d8417abb14f
generalize lemma interior_closed_Un_empty_interior
huffman
parents:
31393
diff
changeset
|
733 |
from `open R` `closed S` have "open (R - S)" by (rule open_diff) |
8d8417abb14f
generalize lemma interior_closed_Un_empty_interior
huffman
parents:
31393
diff
changeset
|
734 |
from `R \<subseteq> S \<union> T` have "R - S \<subseteq> T" by fast |
8d8417abb14f
generalize lemma interior_closed_Un_empty_interior
huffman
parents:
31393
diff
changeset
|
735 |
from `y \<in> R - S` `open (R - S)` `R - S \<subseteq> T` `interior T = {}` |
8d8417abb14f
generalize lemma interior_closed_Un_empty_interior
huffman
parents:
31393
diff
changeset
|
736 |
show "False" unfolding interior_def by fast |
8d8417abb14f
generalize lemma interior_closed_Un_empty_interior
huffman
parents:
31393
diff
changeset
|
737 |
qed |
8d8417abb14f
generalize lemma interior_closed_Un_empty_interior
huffman
parents:
31393
diff
changeset
|
738 |
qed |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
739 |
qed |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
740 |
|
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
741 |
|
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
742 |
subsection{* Closure of a Set *} |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
743 |
|
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
744 |
definition "closure S = S \<union> {x | x. x islimpt S}" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
745 |
|
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
746 |
lemma closure_interior: "closure S = UNIV - interior (UNIV - S)" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
747 |
proof- |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
748 |
{ fix x |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
749 |
have "x\<in>UNIV - interior (UNIV - S) \<longleftrightarrow> x \<in> closure S" (is "?lhs = ?rhs") |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
750 |
proof |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
751 |
let ?exT = "\<lambda> y. (\<exists>T. open T \<and> y \<in> T \<and> T \<subseteq> UNIV - S)" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
752 |
assume "?lhs" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
753 |
hence *:"\<not> ?exT x" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
754 |
unfolding interior_def |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
755 |
by simp |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
756 |
{ assume "\<not> ?rhs" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
757 |
hence False using * |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
758 |
unfolding closure_def islimpt_def |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
759 |
by blast |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
760 |
} |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
761 |
thus "?rhs" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
762 |
by blast |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
763 |
next |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
764 |
assume "?rhs" thus "?lhs" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
765 |
unfolding closure_def interior_def islimpt_def |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
766 |
by blast |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
767 |
qed |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
768 |
} |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
769 |
thus ?thesis |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
770 |
by blast |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
771 |
qed |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
772 |
|
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
773 |
lemma interior_closure: "interior S = UNIV - (closure (UNIV - S))" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
774 |
proof- |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
775 |
{ fix x |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
776 |
have "x \<in> interior S \<longleftrightarrow> x \<in> UNIV - (closure (UNIV - S))" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
777 |
unfolding interior_def closure_def islimpt_def |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
778 |
by blast |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
779 |
} |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
780 |
thus ?thesis |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
781 |
by blast |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
782 |
qed |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
783 |
|
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
784 |
lemma closed_closure[simp, intro]: "closed (closure S)" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
785 |
proof- |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
786 |
have "closed (UNIV - interior (UNIV -S))" by blast |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
787 |
thus ?thesis using closure_interior[of S] by simp |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
788 |
qed |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
789 |
|
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
790 |
lemma closure_hull: "closure S = closed hull S" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
791 |
proof- |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
792 |
have "S \<subseteq> closure S" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
793 |
unfolding closure_def |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
794 |
by blast |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
795 |
moreover |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
796 |
have "closed (closure S)" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
797 |
using closed_closure[of S] |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
798 |
by assumption |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
799 |
moreover |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
800 |
{ fix t |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
801 |
assume *:"S \<subseteq> t" "closed t" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
802 |
{ fix x |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
803 |
assume "x islimpt S" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
804 |
hence "x islimpt t" using *(1) |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
805 |
using islimpt_subset[of x, of S, of t] |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
806 |
by blast |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
807 |
} |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
808 |
with * have "closure S \<subseteq> t" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
809 |
unfolding closure_def |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
810 |
using closed_limpt[of t] |
31345
80667d5bee32
generalize topological notions to class metric_space; add class perfect_space
huffman
parents:
31344
diff
changeset
|
811 |
by auto |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
812 |
} |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
813 |
ultimately show ?thesis |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
814 |
using hull_unique[of S, of "closure S", of closed] |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
815 |
unfolding mem_def |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
816 |
by simp |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
817 |
qed |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
818 |
|
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
819 |
lemma closure_eq: "closure S = S \<longleftrightarrow> closed S" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
820 |
unfolding closure_hull |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
821 |
using hull_eq[of closed, unfolded mem_def, OF closed_Inter, of S] |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
822 |
by (metis mem_def subset_eq) |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
823 |
|
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
824 |
lemma closure_closed[simp]: "closed S \<Longrightarrow> closure S = S" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
825 |
using closure_eq[of S] |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
826 |
by simp |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
827 |
|
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
828 |
lemma closure_closure[simp]: "closure (closure S) = closure S" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
829 |
unfolding closure_hull |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
830 |
using hull_hull[of closed S] |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
831 |
by assumption |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
832 |
|
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
833 |
lemma closure_subset: "S \<subseteq> closure S" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
834 |
unfolding closure_hull |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
835 |
using hull_subset[of S closed] |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
836 |
by assumption |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
837 |
|
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
838 |
lemma subset_closure: "S \<subseteq> T \<Longrightarrow> closure S \<subseteq> closure T" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
839 |
unfolding closure_hull |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
840 |
using hull_mono[of S T closed] |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
841 |
by assumption |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
842 |
|
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
843 |
lemma closure_minimal: "S \<subseteq> T \<Longrightarrow> closed T \<Longrightarrow> closure S \<subseteq> T" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
844 |
using hull_minimal[of S T closed] |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
845 |
unfolding closure_hull mem_def |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
846 |
by simp |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
847 |
|
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
848 |
lemma closure_unique: "S \<subseteq> T \<and> closed T \<and> (\<forall> T'. S \<subseteq> T' \<and> closed T' \<longrightarrow> T \<subseteq> T') \<Longrightarrow> closure S = T" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
849 |
using hull_unique[of S T closed] |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
850 |
unfolding closure_hull mem_def |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
851 |
by simp |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
852 |
|
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
853 |
lemma closure_empty[simp]: "closure {} = {}" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
854 |
using closed_empty closure_closed[of "{}"] |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
855 |
by simp |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
856 |
|
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
857 |
lemma closure_univ[simp]: "closure UNIV = UNIV" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
858 |
using closure_closed[of UNIV] |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
859 |
by simp |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
860 |
|
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
861 |
lemma closure_eq_empty: "closure S = {} \<longleftrightarrow> S = {}" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
862 |
using closure_empty closure_subset[of S] |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
863 |
by blast |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
864 |
|
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
865 |
lemma closure_subset_eq: "closure S \<subseteq> S \<longleftrightarrow> closed S" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
866 |
using closure_eq[of S] closure_subset[of S] |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
867 |
by simp |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
868 |
|
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
869 |
lemma open_inter_closure_eq_empty: |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
870 |
"open S \<Longrightarrow> (S \<inter> closure T) = {} \<longleftrightarrow> S \<inter> T = {}" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
871 |
using open_subset_interior[of S "UNIV - T"] |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
872 |
using interior_subset[of "UNIV - T"] |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
873 |
unfolding closure_interior |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
874 |
by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
875 |
|
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
876 |
lemma open_inter_closure_subset: "open S \<Longrightarrow> (S \<inter> (closure T)) \<subseteq> closure(S \<inter> T)" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
877 |
proof |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
878 |
fix x |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
879 |
assume as: "open S" "x \<in> S \<inter> closure T" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
880 |
{ assume *:"x islimpt T" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
881 |
{ fix e::real |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
882 |
assume "e > 0" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
883 |
from as `open S` obtain e' where "e' > 0" and e':"\<forall>x'. dist x' x < e' \<longrightarrow> x' \<in> S" |
31418
9baa48bad81c
generalize some constants and lemmas to class topological_space
huffman
parents:
31402
diff
changeset
|
884 |
unfolding open_dist |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
885 |
by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
886 |
let ?e = "min e e'" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
887 |
from `e>0` `e'>0` have "?e > 0" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
888 |
by simp |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
889 |
then obtain y where y:"y\<in>T" "y \<noteq> x \<and> dist y x < ?e" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
890 |
using islimpt_approachable[of x T] using * |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
891 |
by blast |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
892 |
hence "\<exists>x'\<in>S \<inter> T. x' \<noteq> x \<and> dist x' x < e" using e' |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
893 |
using y |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
894 |
by(rule_tac x=y in bexI, simp+) |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
895 |
} |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
896 |
hence "x islimpt S \<inter> T" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
897 |
using islimpt_approachable[of x "S \<inter> T"] |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
898 |
by blast |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
899 |
} |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
900 |
then show "x \<in> closure (S \<inter> T)" using as |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
901 |
unfolding closure_def |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
902 |
by blast |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
903 |
qed |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
904 |
|
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
905 |
lemma closure_complement: "closure(UNIV - S) = UNIV - interior(S)" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
906 |
proof- |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
907 |
have "S = UNIV - (UNIV - S)" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
908 |
by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
909 |
thus ?thesis |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
910 |
unfolding closure_interior |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
911 |
by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
912 |
qed |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
913 |
|
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
914 |
lemma interior_complement: "interior(UNIV - S) = UNIV - closure(S)" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
915 |
unfolding closure_interior |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
916 |
by blast |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
917 |
|
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
918 |
subsection{* Frontier (aka boundary) *} |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
919 |
|
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
920 |
definition "frontier S = closure S - interior S" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
921 |
|
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
922 |
lemma frontier_closed: "closed(frontier S)" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
923 |
by (simp add: frontier_def closed_diff closed_closure) |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
924 |
|
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
925 |
lemma frontier_closures: "frontier S = (closure S) \<inter> (closure(UNIV - S))" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
926 |
by (auto simp add: frontier_def interior_closure) |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
927 |
|
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
928 |
lemma frontier_straddle: "a \<in> frontier S \<longleftrightarrow> (\<forall>e>0. (\<exists>x\<in>S. dist a x < e) \<and> (\<exists>x. x \<notin> S \<and> dist a x < e))" (is "?lhs \<longleftrightarrow> ?rhs") |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
929 |
proof |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
930 |
assume "?lhs" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
931 |
{ fix e::real |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
932 |
assume "e > 0" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
933 |
let ?rhse = "(\<exists>x\<in>S. dist a x < e) \<and> (\<exists>x. x \<notin> S \<and> dist a x < e)" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
934 |
{ assume "a\<in>S" |
31285
0a3f9ee4117c
generalize dist function to class real_normed_vector
huffman
parents:
31275
diff
changeset
|
935 |
have "\<exists>x\<in>S. dist a x < e" using `e>0` `a\<in>S` by(rule_tac x=a in bexI) auto |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
936 |
moreover have "\<exists>x. x \<notin> S \<and> dist a x < e" using `?lhs` `a\<in>S` |
31285
0a3f9ee4117c
generalize dist function to class real_normed_vector
huffman
parents:
31275
diff
changeset
|
937 |
unfolding frontier_closures closure_def islimpt_def using `e>0` |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
938 |
by (auto, erule_tac x="ball a e" in allE, auto) |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
939 |
ultimately have ?rhse by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
940 |
} |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
941 |
moreover |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
942 |
{ assume "a\<notin>S" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
943 |
hence ?rhse using `?lhs` |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
944 |
unfolding frontier_closures closure_def islimpt_def |
31285
0a3f9ee4117c
generalize dist function to class real_normed_vector
huffman
parents:
31275
diff
changeset
|
945 |
using open_ball[of a e] `e > 0` |
0a3f9ee4117c
generalize dist function to class real_normed_vector
huffman
parents:
31275
diff
changeset
|
946 |
by (auto, erule_tac x = "ball a e" in allE, auto) (* FIXME: VERY slow! *) |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
947 |
} |
30488 | 948 |
ultimately have ?rhse by auto |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
949 |
} |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
950 |
thus ?rhs by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
951 |
next |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
952 |
assume ?rhs |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
953 |
moreover |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
954 |
{ fix T assume "a\<notin>S" and |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
955 |
as:"\<forall>e>0. (\<exists>x\<in>S. dist a x < e) \<and> (\<exists>x. x \<notin> S \<and> dist a x < e)" "a \<notin> S" "a \<in> T" "open T" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
956 |
from `open T` `a \<in> T` have "\<exists>e>0. ball a e \<subseteq> T" unfolding open_contains_ball[of T] by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
957 |
then obtain e where "e>0" "ball a e \<subseteq> T" by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
958 |
then obtain y where y:"y\<in>S" "dist a y < e" using as(1) by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
959 |
have "\<exists>y\<in>S. y \<in> T \<and> y \<noteq> a" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
960 |
using `dist a y < e` `ball a e \<subseteq> T` unfolding ball_def using `y\<in>S` `a\<notin>S` by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
961 |
} |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
962 |
hence "a \<in> closure S" unfolding closure_def islimpt_def using `?rhs` by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
963 |
moreover |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
964 |
{ fix T assume "a \<in> T" "open T" "a\<in>S" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
965 |
then obtain e where "e>0" and balle: "ball a e \<subseteq> T" unfolding open_contains_ball using `?rhs` by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
966 |
obtain x where "x \<notin> S" "dist a x < e" using `?rhs` using `e>0` by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
967 |
hence "\<exists>y\<in>UNIV - S. y \<in> T \<and> y \<noteq> a" using balle `a\<in>S` unfolding ball_def by (rule_tac x=x in bexI)auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
968 |
} |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
969 |
hence "a islimpt (UNIV - S) \<or> a\<notin>S" unfolding islimpt_def by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
970 |
ultimately show ?lhs unfolding frontier_closures using closure_def[of "UNIV - S"] by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
971 |
qed |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
972 |
|
30488 | 973 |
lemma frontier_subset_closed: "closed S \<Longrightarrow> frontier S \<subseteq> S" |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
974 |
by (metis frontier_def closure_closed Diff_subset) |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
975 |
|
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
976 |
lemma frontier_empty: "frontier {} = {}" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
977 |
by (simp add: frontier_def closure_empty) |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
978 |
|
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
979 |
lemma frontier_subset_eq: "frontier S \<subseteq> S \<longleftrightarrow> closed S" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
980 |
proof- |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
981 |
{ assume "frontier S \<subseteq> S" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
982 |
hence "closure S \<subseteq> S" using interior_subset unfolding frontier_def by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
983 |
hence "closed S" using closure_subset_eq by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
984 |
} |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
985 |
thus ?thesis using frontier_subset_closed[of S] by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
986 |
qed |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
987 |
|
30488 | 988 |
lemma frontier_complement: "frontier(UNIV - S) = frontier S" |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
989 |
by (auto simp add: frontier_def closure_complement interior_complement) |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
990 |
|
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
991 |
lemma frontier_disjoint_eq: "frontier S \<inter> S = {} \<longleftrightarrow> open S" |
30488 | 992 |
using frontier_complement frontier_subset_eq[of "UNIV - S"] |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
993 |
unfolding open_closed by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
994 |
|
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
995 |
subsection{* Common nets and The "within" modifier for nets. *} |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
996 |
|
31285
0a3f9ee4117c
generalize dist function to class real_normed_vector
huffman
parents:
31275
diff
changeset
|
997 |
definition |
31346 | 998 |
at_infinity :: "'a::real_normed_vector net" where |
31390 | 999 |
"at_infinity = Abs_net (range (\<lambda>r. {x. r \<le> norm x}))" |
31346 | 1000 |
|
1001 |
definition |
|
1002 |
indirection :: "real ^'n::finite \<Rightarrow> real ^'n \<Rightarrow> (real ^'n) net" (infixr "indirection" 70) where |
|
1003 |
"a indirection v = (at a) within {b. \<exists>c\<ge>0. b - a = c*s v}" |
|
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1004 |
|
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1005 |
text{* Prove That They are all nets. *} |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1006 |
|
31390 | 1007 |
lemma Rep_net_at_infinity: |
1008 |
"Rep_net at_infinity = range (\<lambda>r. {x. r \<le> norm x})" |
|
1009 |
unfolding at_infinity_def |
|
1010 |
apply (rule Abs_net_inverse') |
|
1011 |
apply (rule image_nonempty, simp) |
|
1012 |
apply (clarsimp, rename_tac r s) |
|
1013 |
apply (rule_tac x="max r s" in exI, auto) |
|
1014 |
done |
|
1015 |
||
31346 | 1016 |
lemma within_UNIV: "net within UNIV = net" |
31390 | 1017 |
by (simp add: Rep_net_inject [symmetric] Rep_net_within) |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1018 |
|
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1019 |
subsection{* Identify Trivial limits, where we can't approach arbitrarily closely. *} |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1020 |
|
31346 | 1021 |
definition |
1022 |
trivial_limit :: "'a net \<Rightarrow> bool" where |
|
31390 | 1023 |
"trivial_limit net \<longleftrightarrow> {} \<in> Rep_net net" |
31346 | 1024 |
|
1025 |
lemma trivial_limit_within: |
|
31391 | 1026 |
fixes a :: "'a::metric_space" |
31346 | 1027 |
shows "trivial_limit (at a within S) \<longleftrightarrow> \<not> a islimpt S" |
31390 | 1028 |
proof |
1029 |
assume "trivial_limit (at a within S)" |
|
1030 |
thus "\<not> a islimpt S" |
|
1031 |
unfolding trivial_limit_def |
|
1032 |
unfolding Rep_net_within Rep_net_at |
|
1033 |
unfolding islimpt_approachable_le dist_nz |
|
1034 |
apply (clarsimp simp add: not_le expand_set_eq) |
|
1035 |
apply (rule_tac x="r/2" in exI, clarsimp) |
|
1036 |
apply (drule_tac x=x' in spec, simp) |
|
1037 |
done |
|
1038 |
next |
|
1039 |
assume "\<not> a islimpt S" |
|
1040 |
thus "trivial_limit (at a within S)" |
|
1041 |
unfolding trivial_limit_def |
|
1042 |
unfolding Rep_net_within Rep_net_at |
|
1043 |
unfolding islimpt_approachable_le dist_nz |
|
1044 |
apply (clarsimp simp add: image_image not_le) |
|
1045 |
apply (rule_tac x=e in image_eqI) |
|
1046 |
apply (auto simp add: expand_set_eq) |
|
1047 |
done |
|
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1048 |
qed |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1049 |
|
31391 | 1050 |
lemma trivial_limit_at_iff: "trivial_limit (at a) \<longleftrightarrow> \<not> a islimpt UNIV" |
31346 | 1051 |
using trivial_limit_within [of a UNIV] |
1052 |
by (simp add: within_UNIV) |
|
1053 |
||
31391 | 1054 |
lemma trivial_limit_at: |
1055 |
fixes a :: "'a::perfect_space" |
|
1056 |
shows "\<not> trivial_limit (at a)" |
|
1057 |
by (simp add: trivial_limit_at_iff) |
|
1058 |
||
31346 | 1059 |
lemma trivial_limit_at_infinity: |
1060 |
"\<not> trivial_limit (at_infinity :: ('a::{real_normed_vector,zero_neq_one}) net)" |
|
31391 | 1061 |
(* FIXME: find a more appropriate type class *) |
31390 | 1062 |
unfolding trivial_limit_def Rep_net_at_infinity |
1063 |
apply (clarsimp simp add: expand_set_eq) |
|
1064 |
apply (drule_tac x="scaleR r (sgn 1)" in spec) |
|
1065 |
apply (simp add: norm_scaleR norm_sgn) |
|
1066 |
done |
|
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1067 |
|
31346 | 1068 |
lemma trivial_limit_sequentially: "\<not> trivial_limit sequentially" |
31390 | 1069 |
by (auto simp add: trivial_limit_def Rep_net_sequentially) |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1070 |
|
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1071 |
subsection{* Some property holds "sufficiently close" to the limit point. *} |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1072 |
|
31390 | 1073 |
lemma eventually_at: |
1074 |
"eventually P (at a) \<longleftrightarrow> (\<exists>d>0. \<forall>x. 0 < dist x a \<and> dist x a < d \<longrightarrow> P x)" |
|
31393 | 1075 |
unfolding eventually_def Rep_net_at dist_nz by auto |
31390 | 1076 |
|
1077 |
lemma eventually_at_infinity: |
|
1078 |
"eventually P at_infinity \<longleftrightarrow> (\<exists>b. \<forall>x. norm x >= b \<longrightarrow> P x)" |
|
1079 |
unfolding eventually_def Rep_net_at_infinity by auto |
|
1080 |
||
31346 | 1081 |
lemma eventually_within: "eventually P (at a within S) \<longleftrightarrow> |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1082 |
(\<exists>d>0. \<forall>x\<in>S. 0 < dist x a \<and> dist x a < d \<longrightarrow> P x)" |
31393 | 1083 |
unfolding eventually_within eventually_at dist_nz by auto |
31390 | 1084 |
|
1085 |
lemma eventually_within_le: "eventually P (at a within S) \<longleftrightarrow> |
|
1086 |
(\<exists>d>0. \<forall>x\<in>S. 0 < dist x a \<and> dist x a <= d \<longrightarrow> P x)" (is "?lhs = ?rhs") |
|
1087 |
unfolding eventually_within |
|
1088 |
apply safe |
|
1089 |
apply (rule_tac x="d/2" in exI, simp) |
|
1090 |
apply (rule_tac x="d" in exI, simp) |
|
1091 |
done |
|
1092 |
||
1093 |
lemma eventually_happens: "eventually P net ==> trivial_limit net \<or> (\<exists>x. P x)" |
|
1094 |
unfolding eventually_def trivial_limit_def |
|
1095 |
using Rep_net_nonempty [of net] by auto |
|
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1096 |
|
31347
357d58c5743a
new lemmas about eventually; rewrite Lim proofs to use more abstract properties of eventually
huffman
parents:
31346
diff
changeset
|
1097 |
lemma always_eventually: "(\<forall>x. P x) ==> eventually P net" |
31390 | 1098 |
unfolding eventually_def trivial_limit_def |
1099 |
using Rep_net_nonempty [of net] by auto |
|
31347
357d58c5743a
new lemmas about eventually; rewrite Lim proofs to use more abstract properties of eventually
huffman
parents:
31346
diff
changeset
|
1100 |
|
31348 | 1101 |
lemma trivial_limit_eventually: "trivial_limit net \<Longrightarrow> eventually P net" |
31390 | 1102 |
unfolding trivial_limit_def eventually_def by auto |
1103 |
||
1104 |
lemma eventually_False: "eventually (\<lambda>x. False) net \<longleftrightarrow> trivial_limit net" |
|
1105 |
unfolding trivial_limit_def eventually_def by auto |
|
31348 | 1106 |
|
1107 |
lemma trivial_limit_eq: "trivial_limit net \<longleftrightarrow> (\<forall>P. eventually P net)" |
|
31390 | 1108 |
apply (safe elim!: trivial_limit_eventually) |
1109 |
apply (simp add: eventually_False [symmetric]) |
|
1110 |
done |
|
31348 | 1111 |
|
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1112 |
text{* Combining theorems for "eventually" *} |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1113 |
|
31390 | 1114 |
lemma eventually_conjI: |
1115 |
"\<lbrakk>eventually (\<lambda>x. P x) net; eventually (\<lambda>x. Q x) net\<rbrakk> |
|
1116 |
\<Longrightarrow> eventually (\<lambda>x. P x \<and> Q x) net" |
|
31393 | 1117 |
by (rule eventually_conj) |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1118 |
|
31390 | 1119 |
lemma eventually_rev_mono: |
1120 |
"eventually P net \<Longrightarrow> (\<forall>x. P x \<longrightarrow> Q x) \<Longrightarrow> eventually Q net" |
|
1121 |
using eventually_mono [of P Q] by fast |
|
1122 |
||
1123 |
lemma eventually_and: " eventually (\<lambda>x. P x \<and> Q x) net \<longleftrightarrow> eventually P net \<and> eventually Q net" |
|
1124 |
by (auto intro!: eventually_conjI elim: eventually_rev_mono) |
|
1125 |
||
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1126 |
lemma eventually_false: "eventually (\<lambda>x. False) net \<longleftrightarrow> trivial_limit net" |
31390 | 1127 |
by (auto simp add: eventually_False) |
1128 |
||
1129 |
lemma not_eventually: "(\<forall>x. \<not> P x ) \<Longrightarrow> ~(trivial_limit net) ==> ~(eventually (\<lambda>x. P x) net)" |
|
1130 |
by (simp add: eventually_False) |
|
31347
357d58c5743a
new lemmas about eventually; rewrite Lim proofs to use more abstract properties of eventually
huffman
parents:
31346
diff
changeset
|
1131 |
|
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1132 |
subsection{* Limits, defined as vacuously true when the limit is trivial. *} |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1133 |
|
31393 | 1134 |
notation tendsto (infixr "--->" 55) |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1135 |
|
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1136 |
text{* Notation Lim to avoid collition with lim defined in analysis *} |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1137 |
definition "Lim net f = (THE l. (f ---> l) net)" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1138 |
|
30488 | 1139 |
lemma Lim: |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1140 |
"(f ---> l) net \<longleftrightarrow> |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1141 |
trivial_limit net \<or> |
31348 | 1142 |
(\<forall>e>0. eventually (\<lambda>x. dist (f x) l < e) net)" |
1143 |
unfolding tendsto_def trivial_limit_eq by auto |
|
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1144 |
|
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1145 |
|
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1146 |
text{* Show that they yield usual definitions in the various cases. *} |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1147 |
|
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1148 |
lemma Lim_within_le: "(f ---> l)(at a within S) \<longleftrightarrow> |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1149 |
(\<forall>e>0. \<exists>d>0. \<forall>x\<in>S. 0 < dist x a \<and> dist x a <= d \<longrightarrow> dist (f x) l < e)" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1150 |
by (auto simp add: tendsto_def eventually_within_le) |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1151 |
|
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1152 |
lemma Lim_within: "(f ---> l) (at a within S) \<longleftrightarrow> |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1153 |
(\<forall>e >0. \<exists>d>0. \<forall>x \<in> S. 0 < dist x a \<and> dist x a < d \<longrightarrow> dist (f x) l < e)" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1154 |
by (auto simp add: tendsto_def eventually_within) |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1155 |
|
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1156 |
lemma Lim_at: "(f ---> l) (at a) \<longleftrightarrow> |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1157 |
(\<forall>e >0. \<exists>d>0. \<forall>x. 0 < dist x a \<and> dist x a < d \<longrightarrow> dist (f x) l < e)" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1158 |
by (auto simp add: tendsto_def eventually_at) |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1159 |
|
31342
b7941738e3a1
add lemmas Lim_at_iff_LIM, Lim_sequentially_iff_LIMSEQ
huffman
parents:
31341
diff
changeset
|
1160 |
lemma Lim_at_iff_LIM: "(f ---> l) (at a) \<longleftrightarrow> f -- a --> l" |
b7941738e3a1
add lemmas Lim_at_iff_LIM, Lim_sequentially_iff_LIMSEQ
huffman
parents:
31341
diff
changeset
|
1161 |
unfolding Lim_at LIM_def by (simp only: zero_less_dist_iff) |
b7941738e3a1
add lemmas Lim_at_iff_LIM, Lim_sequentially_iff_LIMSEQ
huffman
parents:
31341
diff
changeset
|
1162 |
|
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1163 |
lemma Lim_at_infinity: |
30582 | 1164 |
"(f ---> l) at_infinity \<longleftrightarrow> (\<forall>e>0. \<exists>b. \<forall>x::real^'n::finite. norm x >= b \<longrightarrow> dist (f x) l < e)" |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1165 |
by (auto simp add: tendsto_def eventually_at_infinity) |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1166 |
|
30488 | 1167 |
lemma Lim_sequentially: |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1168 |
"(S ---> l) sequentially \<longleftrightarrow> |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1169 |
(\<forall>e>0. \<exists>N. \<forall>n\<ge>N. dist (S n) l < e)" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1170 |
by (auto simp add: tendsto_def eventually_sequentially) |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1171 |
|
31342
b7941738e3a1
add lemmas Lim_at_iff_LIM, Lim_sequentially_iff_LIMSEQ
huffman
parents:
31341
diff
changeset
|
1172 |
lemma Lim_sequentially_iff_LIMSEQ: "(S ---> l) sequentially \<longleftrightarrow> S ----> l" |
b7941738e3a1
add lemmas Lim_at_iff_LIM, Lim_sequentially_iff_LIMSEQ
huffman
parents:
31341
diff
changeset
|
1173 |
unfolding Lim_sequentially LIMSEQ_def .. |
b7941738e3a1
add lemmas Lim_at_iff_LIM, Lim_sequentially_iff_LIMSEQ
huffman
parents:
31341
diff
changeset
|
1174 |
|
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1175 |
lemma Lim_eventually: "eventually (\<lambda>x. f x = l) net \<Longrightarrow> (f ---> l) net" |
31348 | 1176 |
unfolding tendsto_def by (auto elim: eventually_rev_mono) |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1177 |
|
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1178 |
text{* The expected monotonicity property. *} |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1179 |
|
31285
0a3f9ee4117c
generalize dist function to class real_normed_vector
huffman
parents:
31275
diff
changeset
|
1180 |
lemma Lim_within_empty: "(f ---> l) (at x within {})" |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1181 |
by (simp add: Lim_within_le) |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1182 |
|
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1183 |
lemma Lim_within_subset: "(f ---> l) (at a within S) \<Longrightarrow> T \<subseteq> S \<Longrightarrow> (f ---> l) (at a within T)" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1184 |
apply (auto simp add: Lim_within_le) |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1185 |
by (metis subset_eq) |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1186 |
|
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1187 |
lemma Lim_Un: assumes "(f ---> l) (at x within S)" "(f ---> l) (at x within T)" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1188 |
shows "(f ---> l) (at x within (S \<union> T))" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1189 |
proof- |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1190 |
{ fix e::real assume "e>0" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1191 |
obtain d1 where d1:"d1>0" "\<forall>xa\<in>T. 0 < dist xa x \<and> dist xa x < d1 \<longrightarrow> dist (f xa) l < e" using assms unfolding Lim_within using `e>0` by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1192 |
obtain d2 where d2:"d2>0" "\<forall>xa\<in>S. 0 < dist xa x \<and> dist xa x < d2 \<longrightarrow> dist (f xa) l < e" using assms unfolding Lim_within using `e>0` by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1193 |
have "\<exists>d>0. \<forall>xa\<in>S \<union> T. 0 < dist xa x \<and> dist xa x < d \<longrightarrow> dist (f xa) l < e" using d1 d2 |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1194 |
by (rule_tac x="min d1 d2" in exI)auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1195 |
} |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1196 |
thus ?thesis unfolding Lim_within by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1197 |
qed |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1198 |
|
30488 | 1199 |
lemma Lim_Un_univ: |
31346 | 1200 |
"(f ---> l) (at x within S) \<Longrightarrow> (f ---> l) (at x within T) \<Longrightarrow> S \<union> T = UNIV |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1201 |
==> (f ---> l) (at x)" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1202 |
by (metis Lim_Un within_UNIV) |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1203 |
|
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1204 |
text{* Interrelations between restricted and unrestricted limits. *} |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1205 |
|
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1206 |
lemma Lim_at_within: "(f ---> l)(at a) ==> (f ---> l)(at a within S)" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1207 |
apply (simp add: Lim_at Lim_within) |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1208 |
by metis |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1209 |
|
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1210 |
lemma Lim_within_open: |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1211 |
assumes"a \<in> S" "open S" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1212 |
shows "(f ---> l)(at a within S) \<longleftrightarrow> (f ---> l)(at a)" (is "?lhs \<longleftrightarrow> ?rhs") |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1213 |
proof |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1214 |
assume ?lhs |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1215 |
{ fix e::real assume "e>0" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1216 |
obtain d where d: "d >0" "\<forall>x\<in>S. 0 < dist x a \<and> dist x a < d \<longrightarrow> dist (f x) l < e" using `?lhs` `e>0` unfolding Lim_within by auto |
31418
9baa48bad81c
generalize some constants and lemmas to class topological_space
huffman
parents:
31402
diff
changeset
|
1217 |
obtain d' where d': "d'>0" "\<forall>x. dist x a < d' \<longrightarrow> x \<in> S" using assms unfolding open_dist by auto |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1218 |
from d d' have "\<exists>d>0. \<forall>x. 0 < dist x a \<and> dist x a < d \<longrightarrow> dist (f x) l < e" by (rule_tac x= "min d d'" in exI)auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1219 |
} |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1220 |
thus ?rhs unfolding Lim_at by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1221 |
next |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1222 |
assume ?rhs |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1223 |
{ fix e::real assume "e>0" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1224 |
then obtain d where "d>0" and d:"\<forall>x. 0 < dist x a \<and> dist x a < d \<longrightarrow> dist (f x) l < e" using `?rhs` unfolding Lim_at by auto |
30488 | 1225 |
hence "\<exists>d>0. \<forall>x. 0 < dist x a \<and> dist x a < d \<longrightarrow> dist (f x) l < e" using `d>0` by auto |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1226 |
} |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1227 |
thus ?lhs using Lim_at_within[of f l a S] by (auto simp add: Lim_at) |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1228 |
qed |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1229 |
|
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1230 |
text{* Another limit point characterization. *} |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1231 |
|
30488 | 1232 |
lemma islimpt_sequential: |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1233 |
"x islimpt S \<longleftrightarrow> (\<exists>f. (\<forall>n::nat. f n \<in> S -{x}) \<and> (f ---> x) sequentially)" (is "?lhs = ?rhs") |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1234 |
proof |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1235 |
assume ?lhs |
30488 | 1236 |
then obtain f where f:"\<forall>y. y>0 \<longrightarrow> f y \<in> S \<and> f y \<noteq> x \<and> dist (f y) x < y" |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1237 |
unfolding islimpt_approachable using choice[of "\<lambda>e y. e>0 \<longrightarrow> y\<in>S \<and> y\<noteq>x \<and> dist y x < e"] by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1238 |
{ fix n::nat |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1239 |
have "f (inverse (real n + 1)) \<in> S - {x}" using f by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1240 |
} |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1241 |
moreover |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1242 |
{ fix e::real assume "e>0" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1243 |
hence "\<exists>N::nat. inverse (real (N + 1)) < e" using real_arch_inv[of e] apply (auto simp add: Suc_pred') apply(rule_tac x="n - 1" in exI) by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1244 |
then obtain N::nat where "inverse (real (N + 1)) < e" by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1245 |
hence "\<forall>n\<ge>N. inverse (real n + 1) < e" by (auto, metis Suc_le_mono le_SucE less_imp_inverse_less nat_le_real_less order_less_trans real_of_nat_Suc real_of_nat_Suc_gt_zero) |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1246 |
moreover have "\<forall>n\<ge>N. dist (f (inverse (real n + 1))) x < (inverse (real n + 1))" using f `e>0` by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1247 |
ultimately have "\<exists>N::nat. \<forall>n\<ge>N. dist (f (inverse (real n + 1))) x < e" apply(rule_tac x=N in exI) apply auto apply(erule_tac x=n in allE)+ by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1248 |
} |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1249 |
hence " ((\<lambda>n. f (inverse (real n + 1))) ---> x) sequentially" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1250 |
unfolding Lim_sequentially using f by auto |
30488 | 1251 |
ultimately show ?rhs apply (rule_tac x="(\<lambda>n::nat. f (inverse (real n + 1)))" in exI) by auto |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1252 |
next |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1253 |
assume ?rhs |
31345
80667d5bee32
generalize topological notions to class metric_space; add class perfect_space
huffman
parents:
31344
diff
changeset
|
1254 |
then obtain f::"nat\<Rightarrow>'a" where f:"(\<forall>n. f n \<in> S - {x})" "(\<forall>e>0. \<exists>N. \<forall>n\<ge>N. dist (f n) x < e)" unfolding Lim_sequentially by auto |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1255 |
{ fix e::real assume "e>0" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1256 |
then obtain N where "dist (f N) x < e" using f(2) by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1257 |
moreover have "f N\<in>S" "f N \<noteq> x" using f(1) by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1258 |
ultimately have "\<exists>x'\<in>S. x' \<noteq> x \<and> dist x' x < e" by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1259 |
} |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1260 |
thus ?lhs unfolding islimpt_approachable by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1261 |
qed |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1262 |
|
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1263 |
text{* Basic arithmetical combining theorems for limits. *} |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1264 |
|
30582 | 1265 |
lemma Lim_linear: fixes f :: "('a \<Rightarrow> real^'n::finite)" and h :: "(real^'n \<Rightarrow> real^'m::finite)" |
30488 | 1266 |
assumes "(f ---> l) net" "linear h" |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1267 |
shows "((\<lambda>x. h (f x)) ---> h l) net" |
31347
357d58c5743a
new lemmas about eventually; rewrite Lim proofs to use more abstract properties of eventually
huffman
parents:
31346
diff
changeset
|
1268 |
proof - |
357d58c5743a
new lemmas about eventually; rewrite Lim proofs to use more abstract properties of eventually
huffman
parents:
31346
diff
changeset
|
1269 |
obtain b where b: "b>0" "\<forall>x. norm (h x) \<le> b * norm x" |
357d58c5743a
new lemmas about eventually; rewrite Lim proofs to use more abstract properties of eventually
huffman
parents:
31346
diff
changeset
|
1270 |
using assms(2) using linear_bounded_pos[of h] by auto |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1271 |
{ fix e::real assume "e >0" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1272 |
hence "e/b > 0" using `b>0` by (metis divide_pos_pos) |
31347
357d58c5743a
new lemmas about eventually; rewrite Lim proofs to use more abstract properties of eventually
huffman
parents:
31346
diff
changeset
|
1273 |
with `(f ---> l) net` have "eventually (\<lambda>x. dist (f x) l < e/b) net" |
357d58c5743a
new lemmas about eventually; rewrite Lim proofs to use more abstract properties of eventually
huffman
parents:
31346
diff
changeset
|
1274 |
by (rule tendstoD) |
357d58c5743a
new lemmas about eventually; rewrite Lim proofs to use more abstract properties of eventually
huffman
parents:
31346
diff
changeset
|
1275 |
then have "eventually (\<lambda>x. dist (h (f x)) (h l) < e) net" |
357d58c5743a
new lemmas about eventually; rewrite Lim proofs to use more abstract properties of eventually
huffman
parents:
31346
diff
changeset
|
1276 |
apply (rule eventually_rev_mono [rule_format]) |
357d58c5743a
new lemmas about eventually; rewrite Lim proofs to use more abstract properties of eventually
huffman
parents:
31346
diff
changeset
|
1277 |
apply (simp add: dist_norm linear_sub [OF `linear h`, symmetric]) |
357d58c5743a
new lemmas about eventually; rewrite Lim proofs to use more abstract properties of eventually
huffman
parents:
31346
diff
changeset
|
1278 |
apply (rule le_less_trans [OF b(2) [rule_format]]) |
357d58c5743a
new lemmas about eventually; rewrite Lim proofs to use more abstract properties of eventually
huffman
parents:
31346
diff
changeset
|
1279 |
apply (simp add: pos_less_divide_eq `0 < b` mult_commute) |
357d58c5743a
new lemmas about eventually; rewrite Lim proofs to use more abstract properties of eventually
huffman
parents:
31346
diff
changeset
|
1280 |
done |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1281 |
} |
31347
357d58c5743a
new lemmas about eventually; rewrite Lim proofs to use more abstract properties of eventually
huffman
parents:
31346
diff
changeset
|
1282 |
thus ?thesis unfolding tendsto_def by simp |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1283 |
qed |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1284 |
|
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1285 |
lemma Lim_const: "((\<lambda>x. a) ---> a) net" |
31285
0a3f9ee4117c
generalize dist function to class real_normed_vector
huffman
parents:
31275
diff
changeset
|
1286 |
by (auto simp add: Lim trivial_limit_def) |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1287 |
|
31343
9983f648f9bb
generalize tendsto and related constants to class metric_space
huffman
parents:
31342
diff
changeset
|
1288 |
lemma Lim_cmul: |
9983f648f9bb
generalize tendsto and related constants to class metric_space
huffman
parents:
31342
diff
changeset
|
1289 |
fixes f :: "'a \<Rightarrow> real ^ 'n::finite" |
9983f648f9bb
generalize tendsto and related constants to class metric_space
huffman
parents:
31342
diff
changeset
|
1290 |
shows "(f ---> l) net ==> ((\<lambda>x. c *s f x) ---> c *s l) net" |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1291 |
apply (rule Lim_linear[where f = f]) |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1292 |
apply simp |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1293 |
apply (rule linear_compose_cmul) |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1294 |
apply (rule linear_id[unfolded id_def]) |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1295 |
done |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1296 |
|
31343
9983f648f9bb
generalize tendsto and related constants to class metric_space
huffman
parents:
31342
diff
changeset
|
1297 |
lemma Lim_neg: |
9983f648f9bb
generalize tendsto and related constants to class metric_space
huffman
parents:
31342
diff
changeset
|
1298 |
fixes f :: "'a \<Rightarrow> 'b::real_normed_vector" |
9983f648f9bb
generalize tendsto and related constants to class metric_space
huffman
parents:
31342
diff
changeset
|
1299 |
shows "(f ---> l) net ==> ((\<lambda>x. -(f x)) ---> -l) net" |
31289 | 1300 |
apply (simp add: Lim dist_norm group_simps) |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1301 |
apply (subst minus_diff_eq[symmetric]) |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1302 |
unfolding norm_minus_cancel by simp |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1303 |
|
31343
9983f648f9bb
generalize tendsto and related constants to class metric_space
huffman
parents:
31342
diff
changeset
|
1304 |
lemma Lim_add: fixes f :: "'a \<Rightarrow> 'b::real_normed_vector" shows |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1305 |
"(f ---> l) net \<Longrightarrow> (g ---> m) net \<Longrightarrow> ((\<lambda>x. f(x) + g(x)) ---> l + m) net" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1306 |
proof- |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1307 |
assume as:"(f ---> l) net" "(g ---> m) net" |
30488 | 1308 |
{ fix e::real |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1309 |
assume "e>0" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1310 |
hence *:"eventually (\<lambda>x. dist (f x) l < e/2) net" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1311 |
"eventually (\<lambda>x. dist (g x) m < e/2) net" using as |
30654 | 1312 |
by (auto intro: tendstoD simp del: less_divide_eq_number_of1) |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1313 |
hence "eventually (\<lambda>x. dist (f x + g x) (l + m) < e) net" |
31347
357d58c5743a
new lemmas about eventually; rewrite Lim proofs to use more abstract properties of eventually
huffman
parents:
31346
diff
changeset
|
1314 |
apply (elim eventually_rev_mp) |
357d58c5743a
new lemmas about eventually; rewrite Lim proofs to use more abstract properties of eventually
huffman
parents:
31346
diff
changeset
|
1315 |
apply (rule always_eventually, clarify) |
357d58c5743a
new lemmas about eventually; rewrite Lim proofs to use more abstract properties of eventually
huffman
parents:
31346
diff
changeset
|
1316 |
apply (rule le_less_trans [OF dist_triangle_add]) |
357d58c5743a
new lemmas about eventually; rewrite Lim proofs to use more abstract properties of eventually
huffman
parents:
31346
diff
changeset
|
1317 |
apply simp |
357d58c5743a
new lemmas about eventually; rewrite Lim proofs to use more abstract properties of eventually
huffman
parents:
31346
diff
changeset
|
1318 |
done |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1319 |
} |
31347
357d58c5743a
new lemmas about eventually; rewrite Lim proofs to use more abstract properties of eventually
huffman
parents:
31346
diff
changeset
|
1320 |
thus ?thesis unfolding tendsto_def by simp |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1321 |
qed |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1322 |
|
31343
9983f648f9bb
generalize tendsto and related constants to class metric_space
huffman
parents:
31342
diff
changeset
|
1323 |
lemma Lim_sub: |
9983f648f9bb
generalize tendsto and related constants to class metric_space
huffman
parents:
31342
diff
changeset
|
1324 |
fixes f :: "'a \<Rightarrow> 'b::real_normed_vector" |
9983f648f9bb
generalize tendsto and related constants to class metric_space
huffman
parents:
31342
diff
changeset
|
1325 |
shows "(f ---> l) net \<Longrightarrow> (g ---> m) net \<Longrightarrow> ((\<lambda>x. f(x) - g(x)) ---> l - m) net" |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1326 |
unfolding diff_minus |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1327 |
by (simp add: Lim_add Lim_neg) |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1328 |
|
31343
9983f648f9bb
generalize tendsto and related constants to class metric_space
huffman
parents:
31342
diff
changeset
|
1329 |
lemma Lim_null: |
9983f648f9bb
generalize tendsto and related constants to class metric_space
huffman
parents:
31342
diff
changeset
|
1330 |
fixes f :: "'a \<Rightarrow> 'b::real_normed_vector" |
9983f648f9bb
generalize tendsto and related constants to class metric_space
huffman
parents:
31342
diff
changeset
|
1331 |
shows "(f ---> l) net \<longleftrightarrow> ((\<lambda>x. f(x) - l) ---> 0) net" by (simp add: Lim dist_norm) |
9983f648f9bb
generalize tendsto and related constants to class metric_space
huffman
parents:
31342
diff
changeset
|
1332 |
|
9983f648f9bb
generalize tendsto and related constants to class metric_space
huffman
parents:
31342
diff
changeset
|
1333 |
lemma Lim_null_norm: |
9983f648f9bb
generalize tendsto and related constants to class metric_space
huffman
parents:
31342
diff
changeset
|
1334 |
fixes f :: "'a \<Rightarrow> 'b::real_normed_vector" |
9983f648f9bb
generalize tendsto and related constants to class metric_space
huffman
parents:
31342
diff
changeset
|
1335 |
shows "(f ---> 0) net \<longleftrightarrow> ((\<lambda>x. vec1(norm(f x))) ---> 0) net" |
31289 | 1336 |
by (simp add: Lim dist_norm norm_vec1) |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1337 |
|
30488 | 1338 |
lemma Lim_null_comparison: |
31343
9983f648f9bb
generalize tendsto and related constants to class metric_space
huffman
parents:
31342
diff
changeset
|
1339 |
fixes f :: "'a \<Rightarrow> 'b::real_normed_vector" |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1340 |
assumes "eventually (\<lambda>x. norm(f x) <= g x) net" "((\<lambda>x. vec1(g x)) ---> 0) net" |
30488 | 1341 |
shows "(f ---> 0) net" |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1342 |
proof(simp add: tendsto_def, rule+) |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1343 |
fix e::real assume "0<e" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1344 |
{ fix x |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1345 |
assume "norm (f x) \<le> g x" "dist (vec1 (g x)) 0 < e" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1346 |
hence "dist (f x) 0 < e" unfolding vec_def using dist_vec1[of "g x" "0"] |
31289 | 1347 |
by (vector dist_norm norm_vec1 real_vector_norm_def dot_def vec1_def) |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1348 |
} |
30488 | 1349 |
thus "eventually (\<lambda>x. dist (f x) 0 < e) net" |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1350 |
using eventually_and[of "\<lambda>x. norm(f x) <= g x" "\<lambda>x. dist (vec1 (g x)) 0 < e" net] |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1351 |
using eventually_mono[of "(\<lambda>x. norm (f x) \<le> g x \<and> dist (vec1 (g x)) 0 < e)" "(\<lambda>x. dist (f x) 0 < e)" net] |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1352 |
using assms `e>0` unfolding tendsto_def by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1353 |
qed |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1354 |
|
30582 | 1355 |
lemma Lim_component: "(f ---> l) net |
1356 |
==> ((\<lambda>a. vec1((f a :: real ^'n::finite)$i)) ---> vec1(l$i)) net" |
|
31348 | 1357 |
unfolding tendsto_def |
1358 |
apply (simp add: dist_norm vec1_sub[symmetric] norm_vec1 vector_minus_component[symmetric] del: vector_minus_component) |
|
30582 | 1359 |
apply (auto simp del: vector_minus_component) |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1360 |
apply (erule_tac x=e in allE) |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1361 |
apply clarify |
31348 | 1362 |
apply (erule eventually_rev_mono) |
30582 | 1363 |
apply (auto simp del: vector_minus_component) |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1364 |
apply (rule order_le_less_trans) |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1365 |
apply (rule component_le_norm) |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1366 |
by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1367 |
|
30488 | 1368 |
lemma Lim_transform_bound: |
31343
9983f648f9bb
generalize tendsto and related constants to class metric_space
huffman
parents:
31342
diff
changeset
|
1369 |
fixes f :: "'a \<Rightarrow> 'b::real_normed_vector" |
9983f648f9bb
generalize tendsto and related constants to class metric_space
huffman
parents:
31342
diff
changeset
|
1370 |
fixes g :: "'a \<Rightarrow> 'c::real_normed_vector" |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1371 |
assumes "eventually (\<lambda>n. norm(f n) <= norm(g n)) net" "(g ---> 0) net" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1372 |
shows "(f ---> 0) net" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1373 |
proof(simp add: tendsto_def, rule+) |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1374 |
fix e::real assume "e>0" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1375 |
{ fix x |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1376 |
assume "norm (f x) \<le> norm (g x)" "dist (g x) 0 < e" |
31343
9983f648f9bb
generalize tendsto and related constants to class metric_space
huffman
parents:
31342
diff
changeset
|
1377 |
hence "dist (f x) 0 < e" by (simp add: dist_norm)} |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1378 |
thus "eventually (\<lambda>x. dist (f x) 0 < e) net" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1379 |
using eventually_and[of "\<lambda>x. norm (f x) \<le> norm (g x)" "\<lambda>x. dist (g x) 0 < e" net] |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1380 |
using eventually_mono[of "\<lambda>x. norm (f x) \<le> norm (g x) \<and> dist (g x) 0 < e" "\<lambda>x. dist (f x) 0 < e" net] |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1381 |
using assms `e>0` unfolding tendsto_def by blast |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1382 |
qed |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1383 |
|
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1384 |
text{* Deducing things about the limit from the elements. *} |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1385 |
|
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1386 |
lemma Lim_in_closed_set: |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1387 |
assumes "closed S" "eventually (\<lambda>x. f(x) \<in> S) net" "\<not>(trivial_limit net)" "(f ---> l) net" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1388 |
shows "l \<in> S" |
31347
357d58c5743a
new lemmas about eventually; rewrite Lim proofs to use more abstract properties of eventually
huffman
parents:
31346
diff
changeset
|
1389 |
proof (rule ccontr) |
357d58c5743a
new lemmas about eventually; rewrite Lim proofs to use more abstract properties of eventually
huffman
parents:
31346
diff
changeset
|
1390 |
assume "l \<notin> S" |
357d58c5743a
new lemmas about eventually; rewrite Lim proofs to use more abstract properties of eventually
huffman
parents:
31346
diff
changeset
|
1391 |
obtain e where e:"e>0" "ball l e \<subseteq> UNIV - S" using assms(1) `l \<notin> S` unfolding closed_def open_contains_ball by auto |
357d58c5743a
new lemmas about eventually; rewrite Lim proofs to use more abstract properties of eventually
huffman
parents:
31346
diff
changeset
|
1392 |
hence *:"\<forall>x. dist l x < e \<longrightarrow> x \<notin> S" by auto |
357d58c5743a
new lemmas about eventually; rewrite Lim proofs to use more abstract properties of eventually
huffman
parents:
31346
diff
changeset
|
1393 |
have "eventually (\<lambda>x. dist (f x) l < e) net" |
357d58c5743a
new lemmas about eventually; rewrite Lim proofs to use more abstract properties of eventually
huffman
parents:
31346
diff
changeset
|
1394 |
using assms(4) `e>0` by (rule tendstoD) |
357d58c5743a
new lemmas about eventually; rewrite Lim proofs to use more abstract properties of eventually
huffman
parents:
31346
diff
changeset
|
1395 |
with assms(2) have "eventually (\<lambda>x. f x \<in> S \<and> dist (f x) l < e) net" |
357d58c5743a
new lemmas about eventually; rewrite Lim proofs to use more abstract properties of eventually
huffman
parents:
31346
diff
changeset
|
1396 |
by (rule eventually_conjI) |
357d58c5743a
new lemmas about eventually; rewrite Lim proofs to use more abstract properties of eventually
huffman
parents:
31346
diff
changeset
|
1397 |
then obtain x where "f x \<in> S" "dist (f x) l < e" |
357d58c5743a
new lemmas about eventually; rewrite Lim proofs to use more abstract properties of eventually
huffman
parents:
31346
diff
changeset
|
1398 |
using assms(3) eventually_happens by auto |
357d58c5743a
new lemmas about eventually; rewrite Lim proofs to use more abstract properties of eventually
huffman
parents:
31346
diff
changeset
|
1399 |
with * show "False" by (simp add: dist_commute) |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1400 |
qed |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1401 |
|
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1402 |
text{* Need to prove closed(cball(x,e)) before deducing this as a corollary. *} |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1403 |
|
30488 | 1404 |
lemma Lim_norm_ubound: |
31343
9983f648f9bb
generalize tendsto and related constants to class metric_space
huffman
parents:
31342
diff
changeset
|
1405 |
fixes f :: "'a \<Rightarrow> 'b::real_normed_vector" |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1406 |
assumes "\<not>(trivial_limit net)" "(f ---> l) net" "eventually (\<lambda>x. norm(f x) <= e) net" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1407 |
shows "norm(l) <= e" |
31347
357d58c5743a
new lemmas about eventually; rewrite Lim proofs to use more abstract properties of eventually
huffman
parents:
31346
diff
changeset
|
1408 |
proof (rule ccontr) |
357d58c5743a
new lemmas about eventually; rewrite Lim proofs to use more abstract properties of eventually
huffman
parents:
31346
diff
changeset
|
1409 |
assume "\<not> norm l \<le> e" |
357d58c5743a
new lemmas about eventually; rewrite Lim proofs to use more abstract properties of eventually
huffman
parents:
31346
diff
changeset
|
1410 |
then have "0 < norm l - e" by simp |
357d58c5743a
new lemmas about eventually; rewrite Lim proofs to use more abstract properties of eventually
huffman
parents:
31346
diff
changeset
|
1411 |
with assms(2) have "eventually (\<lambda>x. dist (f x) l < norm l - e) net" |
357d58c5743a
new lemmas about eventually; rewrite Lim proofs to use more abstract properties of eventually
huffman
parents:
31346
diff
changeset
|
1412 |
by (rule tendstoD) |
357d58c5743a
new lemmas about eventually; rewrite Lim proofs to use more abstract properties of eventually
huffman
parents:
31346
diff
changeset
|
1413 |
with assms(3) have "eventually (\<lambda>x. norm (f x) \<le> e \<and> dist (f x) l < norm l - e) net" |
357d58c5743a
new lemmas about eventually; rewrite Lim proofs to use more abstract properties of eventually
huffman
parents:
31346
diff
changeset
|
1414 |
by (rule eventually_conjI) |
357d58c5743a
new lemmas about eventually; rewrite Lim proofs to use more abstract properties of eventually
huffman
parents:
31346
diff
changeset
|
1415 |
then obtain w where "norm (f w) \<le> e" "dist (f w) l < norm l - e" |
357d58c5743a
new lemmas about eventually; rewrite Lim proofs to use more abstract properties of eventually
huffman
parents:
31346
diff
changeset
|
1416 |
using assms(1) eventually_happens by auto |
357d58c5743a
new lemmas about eventually; rewrite Lim proofs to use more abstract properties of eventually
huffman
parents:
31346
diff
changeset
|
1417 |
hence "norm (f w - l) < norm l - e" "norm (f w) \<le> e" by (simp_all add: dist_norm) |
357d58c5743a
new lemmas about eventually; rewrite Lim proofs to use more abstract properties of eventually
huffman
parents:
31346
diff
changeset
|
1418 |
hence "norm (f w - l) + norm (f w) < norm l" by simp |
357d58c5743a
new lemmas about eventually; rewrite Lim proofs to use more abstract properties of eventually
huffman
parents:
31346
diff
changeset
|
1419 |
hence "norm (f w - l - f w) < norm l" by (rule le_less_trans [OF norm_triangle_ineq4]) |
357d58c5743a
new lemmas about eventually; rewrite Lim proofs to use more abstract properties of eventually
huffman
parents:
31346
diff
changeset
|
1420 |
thus False using `\<not> norm l \<le> e` by simp |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1421 |
qed |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1422 |
|
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1423 |
lemma Lim_norm_lbound: |
31343
9983f648f9bb
generalize tendsto and related constants to class metric_space
huffman
parents:
31342
diff
changeset
|
1424 |
fixes f :: "'a \<Rightarrow> 'b::real_normed_vector" |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1425 |
assumes "\<not> (trivial_limit net)" "(f ---> l) net" "eventually (\<lambda>x. e <= norm(f x)) net" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1426 |
shows "e \<le> norm l" |
31347
357d58c5743a
new lemmas about eventually; rewrite Lim proofs to use more abstract properties of eventually
huffman
parents:
31346
diff
changeset
|
1427 |
proof (rule ccontr) |
357d58c5743a
new lemmas about eventually; rewrite Lim proofs to use more abstract properties of eventually
huffman
parents:
31346
diff
changeset
|
1428 |
assume "\<not> e \<le> norm l" |
357d58c5743a
new lemmas about eventually; rewrite Lim proofs to use more abstract properties of eventually
huffman
parents:
31346
diff
changeset
|
1429 |
then have "0 < e - norm l" by simp |
357d58c5743a
new lemmas about eventually; rewrite Lim proofs to use more abstract properties of eventually
huffman
parents:
31346
diff
changeset
|
1430 |
with assms(2) have "eventually (\<lambda>x. dist (f x) l < e - norm l) net" |
357d58c5743a
new lemmas about eventually; rewrite Lim proofs to use more abstract properties of eventually
huffman
parents:
31346
diff
changeset
|
1431 |
by (rule tendstoD) |
357d58c5743a
new lemmas about eventually; rewrite Lim proofs to use more abstract properties of eventually
huffman
parents:
31346
diff
changeset
|
1432 |
with assms(3) have "eventually (\<lambda>x. e \<le> norm (f x) \<and> dist (f x) l < e - norm l) net" |
357d58c5743a
new lemmas about eventually; rewrite Lim proofs to use more abstract properties of eventually
huffman
parents:
31346
diff
changeset
|
1433 |
by (rule eventually_conjI) |
357d58c5743a
new lemmas about eventually; rewrite Lim proofs to use more abstract properties of eventually
huffman
parents:
31346
diff
changeset
|
1434 |
then obtain w where "e \<le> norm (f w)" "dist (f w) l < e - norm l" |
357d58c5743a
new lemmas about eventually; rewrite Lim proofs to use more abstract properties of eventually
huffman
parents:
31346
diff
changeset
|
1435 |
using assms(1) eventually_happens by auto |
357d58c5743a
new lemmas about eventually; rewrite Lim proofs to use more abstract properties of eventually
huffman
parents:
31346
diff
changeset
|
1436 |
hence "norm (f w - l) + norm l < e" "e \<le> norm (f w)" by (simp_all add: dist_norm) |
357d58c5743a
new lemmas about eventually; rewrite Lim proofs to use more abstract properties of eventually
huffman
parents:
31346
diff
changeset
|
1437 |
hence "norm (f w - l) + norm l < norm (f w)" by (rule less_le_trans) |
357d58c5743a
new lemmas about eventually; rewrite Lim proofs to use more abstract properties of eventually
huffman
parents:
31346
diff
changeset
|
1438 |
hence "norm (f w - l + l) < norm (f w)" by (rule le_less_trans [OF norm_triangle_ineq]) |
357d58c5743a
new lemmas about eventually; rewrite Lim proofs to use more abstract properties of eventually
huffman
parents:
31346
diff
changeset
|
1439 |
thus False by simp |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1440 |
qed |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1441 |
|
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1442 |
text{* Uniqueness of the limit, when nontrivial. *} |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1443 |
|
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1444 |
lemma Lim_unique: |
31397 | 1445 |
fixes f :: "'a \<Rightarrow> 'b::metric_space" |
1446 |
assumes "\<not> trivial_limit net" "(f ---> l) net" "(f ---> l') net" |
|
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1447 |
shows "l = l'" |
31397 | 1448 |
proof (rule ccontr) |
1449 |
let ?d = "dist l l' / 2" |
|
1450 |
assume "l \<noteq> l'" |
|
1451 |
then have "0 < ?d" by (simp add: dist_nz) |
|
1452 |
have "eventually (\<lambda>x. dist (f x) l < ?d) net" |
|
1453 |
using `(f ---> l) net` `0 < ?d` by (rule tendstoD) |
|
1454 |
moreover |
|
1455 |
have "eventually (\<lambda>x. dist (f x) l' < ?d) net" |
|
1456 |
using `(f ---> l') net` `0 < ?d` by (rule tendstoD) |
|
1457 |
ultimately |
|
1458 |
have "eventually (\<lambda>x. False) net" |
|
1459 |
proof (rule eventually_elim2) |
|
1460 |
fix x |
|
1461 |
assume *: "dist (f x) l < ?d" "dist (f x) l' < ?d" |
|
1462 |
have "dist l l' \<le> dist (f x) l + dist (f x) l'" |
|
1463 |
by (rule dist_triangle_alt) |
|
1464 |
also from * have "\<dots> < ?d + ?d" |
|
1465 |
by (rule add_strict_mono) |
|
1466 |
also have "\<dots> = dist l l'" by simp |
|
1467 |
finally show "False" by simp |
|
1468 |
qed |
|
1469 |
with `\<not> trivial_limit net` show "False" |
|
1470 |
by (simp add: eventually_False) |
|
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1471 |
qed |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1472 |
|
30488 | 1473 |
lemma tendsto_Lim: |
31397 | 1474 |
fixes f :: "'a \<Rightarrow> 'b::metric_space" |
31343
9983f648f9bb
generalize tendsto and related constants to class metric_space
huffman
parents:
31342
diff
changeset
|
1475 |
shows "~(trivial_limit net) \<Longrightarrow> (f ---> l) net ==> Lim net f = l" |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1476 |
unfolding Lim_def using Lim_unique[of net f] by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1477 |
|
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1478 |
text{* Limit under bilinear function (surprisingly tedious, but important) *} |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1479 |
|
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1480 |
lemma norm_bound_lemma: |
30582 | 1481 |
"0 < e \<Longrightarrow> \<exists>d>0. \<forall>(x'::real^'b::finite) y'::real^'a::finite. norm(x' - (x::real^'b)) < d \<and> norm(y' - y) < d \<longrightarrow> norm(x') * norm(y' - y) + norm(x' - x) * norm(y) < e" |
30488 | 1482 |
proof- |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1483 |
assume e: "0 < e" |
30488 | 1484 |
have th1: "(2 * norm x + 2 * norm y + 2) > 0" using norm_ge_zero[of x] norm_ge_zero[of y] by norm |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1485 |
hence th0: "0 < e / (2 * norm x + 2 * norm y + 2)" using `e>0` using divide_pos_pos by auto |
30488 | 1486 |
moreover |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1487 |
{ fix x' y' |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1488 |
assume h: "norm (x' - x) < 1" "norm (x' - x) < e / (2 * norm x + 2 * norm y + 2)" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1489 |
"norm (y' - y) < 1" "norm (y' - y) < e / (2 * norm x + 2 * norm y + 2)" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1490 |
have th: "\<And>a b (c::real). a \<ge> 0 \<Longrightarrow> c \<ge> 0 \<Longrightarrow> a + (b + c) < e ==> b < e " by arith |
30488 | 1491 |
from h have thx: "norm (x' - x) * norm y < e / 2" |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1492 |
using th0 th1 apply (simp add: field_simps) |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1493 |
apply (rule th) defer defer apply assumption |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1494 |
by (simp_all add: norm_ge_zero zero_le_mult_iff) |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1495 |
|
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1496 |
have "norm x' - norm x < 1" apply(rule le_less_trans) |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1497 |
using h(1) using norm_triangle_ineq2[of x' x] by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1498 |
hence *:"norm x' < 1 + norm x" by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1499 |
|
30488 | 1500 |
have thy: "norm (y' - y) * norm x' < e / (2 * norm x + 2 * norm y + 2) * (1 + norm x)" |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1501 |
using mult_strict_mono'[OF h(4) * norm_ge_zero norm_ge_zero] by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1502 |
also have "\<dots> \<le> e/2" apply simp unfolding divide_le_eq |
30649
57753e0ec1d4
1. New cancellation simprocs for common factors in inequations
nipkow
parents:
30582
diff
changeset
|
1503 |
using th1 th0 `e>0` by auto |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1504 |
|
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1505 |
finally have "norm x' * norm (y' - y) + norm (x' - x) * norm y < e" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1506 |
using thx and e by (simp add: field_simps) } |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1507 |
ultimately show ?thesis apply(rule_tac x="min 1 (e / 2 / (norm x + norm y + 1))" in exI) by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1508 |
qed |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1509 |
|
30488 | 1510 |
lemma Lim_bilinear: |
30582 | 1511 |
fixes net :: "'a net" and h:: "real ^'m::finite \<Rightarrow> real ^'n::finite \<Rightarrow> real ^'p::finite" |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1512 |
assumes "(f ---> l) net" and "(g ---> m) net" and "bilinear h" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1513 |
shows "((\<lambda>x. h (f x) (g x)) ---> (h l m)) net" |
31347
357d58c5743a
new lemmas about eventually; rewrite Lim proofs to use more abstract properties of eventually
huffman
parents:
31346
diff
changeset
|
1514 |
proof - |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1515 |
obtain B where "B>0" and B:"\<forall>x y. norm (h x y) \<le> B * norm x * norm y" using bilinear_bounded_pos[OF assms(3)] by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1516 |
{ fix e::real assume "e>0" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1517 |
obtain d where "d>0" and d:"\<forall>x' y'. norm (x' - l) < d \<and> norm (y' - m) < d \<longrightarrow> norm x' * norm (y' - m) + norm (x' - l) * norm m < e / B" using `B>0` `e>0` |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1518 |
using norm_bound_lemma[of "e / B" l m] using divide_pos_pos by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1519 |
|
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1520 |
have *:"\<And>x y. h (f x) (g x) - h l m = h (f x) (g x - m) + h (f x - l) m" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1521 |
unfolding bilinear_rsub[OF assms(3)] |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1522 |
unfolding bilinear_lsub[OF assms(3)] by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1523 |
|
31347
357d58c5743a
new lemmas about eventually; rewrite Lim proofs to use more abstract properties of eventually
huffman
parents:
31346
diff
changeset
|
1524 |
have "eventually (\<lambda>x. dist (f x) l < d) net" |
357d58c5743a
new lemmas about eventually; rewrite Lim proofs to use more abstract properties of eventually
huffman
parents:
31346
diff
changeset
|
1525 |
using assms(1) `d>0` by (rule tendstoD) |
357d58c5743a
new lemmas about eventually; rewrite Lim proofs to use more abstract properties of eventually
huffman
parents:
31346
diff
changeset
|
1526 |
moreover |
357d58c5743a
new lemmas about eventually; rewrite Lim proofs to use more abstract properties of eventually
huffman
parents:
31346
diff
changeset
|
1527 |
have "eventually (\<lambda>x. dist (g x) m < d) net" |
357d58c5743a
new lemmas about eventually; rewrite Lim proofs to use more abstract properties of eventually
huffman
parents:
31346
diff
changeset
|
1528 |
using assms(2) `d>0` by (rule tendstoD) |
357d58c5743a
new lemmas about eventually; rewrite Lim proofs to use more abstract properties of eventually
huffman
parents:
31346
diff
changeset
|
1529 |
ultimately |
357d58c5743a
new lemmas about eventually; rewrite Lim proofs to use more abstract properties of eventually
huffman
parents:
31346
diff
changeset
|
1530 |
have "eventually (\<lambda>x. dist (f x) l < d \<and> dist (g x) m < d) net" |
357d58c5743a
new lemmas about eventually; rewrite Lim proofs to use more abstract properties of eventually
huffman
parents:
31346
diff
changeset
|
1531 |
by (rule eventually_conjI) |
357d58c5743a
new lemmas about eventually; rewrite Lim proofs to use more abstract properties of eventually
huffman
parents:
31346
diff
changeset
|
1532 |
moreover |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1533 |
{ fix x assume "dist (f x) l < d \<and> dist (g x) m < d" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1534 |
hence **:"norm (f x) * norm (g x - m) + norm (f x - l) * norm m < e / B" |
31289 | 1535 |
using d[THEN spec[where x="f x"], THEN spec[where x="g x"]] unfolding dist_norm by auto |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1536 |
have "norm (h (f x) (g x - m)) + norm (h (f x - l) m) \<le> B * norm (f x) * norm (g x - m) + B * norm (f x - l) * norm m" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1537 |
using B[THEN spec[where x="f x"], THEN spec[where x="g x - m"]] |
30488 | 1538 |
using B[THEN spec[where x="f x - l"], THEN spec[where x="m"]] by auto |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1539 |
also have "\<dots> < e" using ** and `B>0` by(auto simp add: field_simps) |
31289 | 1540 |
finally have "dist (h (f x) (g x)) (h l m) < e" unfolding dist_norm and * using norm_triangle_lt by auto |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1541 |
} |
31347
357d58c5743a
new lemmas about eventually; rewrite Lim proofs to use more abstract properties of eventually
huffman
parents:
31346
diff
changeset
|
1542 |
ultimately have "eventually (\<lambda>x. dist (h (f x) (g x)) (h l m) < e) net" |
357d58c5743a
new lemmas about eventually; rewrite Lim proofs to use more abstract properties of eventually
huffman
parents:
31346
diff
changeset
|
1543 |
by (auto elim: eventually_rev_mono) |
357d58c5743a
new lemmas about eventually; rewrite Lim proofs to use more abstract properties of eventually
huffman
parents:
31346
diff
changeset
|
1544 |
} |
357d58c5743a
new lemmas about eventually; rewrite Lim proofs to use more abstract properties of eventually
huffman
parents:
31346
diff
changeset
|
1545 |
thus "((\<lambda>x. h (f x) (g x)) ---> h l m) net" |
357d58c5743a
new lemmas about eventually; rewrite Lim proofs to use more abstract properties of eventually
huffman
parents:
31346
diff
changeset
|
1546 |
unfolding tendsto_def by simp |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1547 |
qed |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1548 |
|
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1549 |
text{* These are special for limits out of the same vector space. *} |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1550 |
|
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1551 |
lemma Lim_within_id: "(id ---> a) (at a within s)" by (auto simp add: Lim_within id_def) |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1552 |
lemma Lim_at_id: "(id ---> a) (at a)" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1553 |
apply (subst within_UNIV[symmetric]) by (simp add: Lim_within_id) |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1554 |
|
31346 | 1555 |
lemma Lim_at_zero: |
31391 | 1556 |
fixes a :: "'a::real_normed_vector" |
31346 | 1557 |
shows "(f ---> l) (at a) \<longleftrightarrow> ((\<lambda>x. f(a + x)) ---> l) (at 0)" (is "?lhs = ?rhs") |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1558 |
proof |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1559 |
assume "?lhs" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1560 |
{ fix e::real assume "e>0" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1561 |
with `?lhs` obtain d where d:"d>0" "\<forall>x. 0 < dist x a \<and> dist x a < d \<longrightarrow> dist (f x) l < e" unfolding Lim_at by auto |
31346 | 1562 |
{ fix x::"'a" assume "0 < dist x 0 \<and> dist x 0 < d" |
30488 | 1563 |
hence "dist (f (a + x)) l < e" using d |
31289 | 1564 |
apply(erule_tac x="x+a" in allE) by(auto simp add: comm_monoid_add.mult_commute dist_norm dist_commute) |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1565 |
} |
30488 | 1566 |
hence "\<exists>d>0. \<forall>x. 0 < dist x 0 \<and> dist x 0 < d \<longrightarrow> dist (f (a + x)) l < e" using d(1) by auto |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1567 |
} |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1568 |
thus "?rhs" unfolding Lim_at by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1569 |
next |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1570 |
assume "?rhs" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1571 |
{ fix e::real assume "e>0" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1572 |
with `?rhs` obtain d where d:"d>0" "\<forall>x. 0 < dist x 0 \<and> dist x 0 < d \<longrightarrow> dist (f (a + x)) l < e" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1573 |
unfolding Lim_at by auto |
31346 | 1574 |
{ fix x::"'a" assume "0 < dist x a \<and> dist x a < d" |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1575 |
hence "dist (f x) l < e" using d apply(erule_tac x="x-a" in allE) |
31289 | 1576 |
by(auto simp add: comm_monoid_add.mult_commute dist_norm dist_commute) |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1577 |
} |
30488 | 1578 |
hence "\<exists>d>0. \<forall>x. 0 < dist x a \<and> dist x a < d \<longrightarrow> dist (f x) l < e" using d(1) by auto |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1579 |
} |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1580 |
thus "?lhs" unfolding Lim_at by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1581 |
qed |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1582 |
|
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1583 |
text{* It's also sometimes useful to extract the limit point from the net. *} |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1584 |
|
31390 | 1585 |
definition |
1586 |
netlimit :: "'a::metric_space net \<Rightarrow> 'a" where |
|
1587 |
"netlimit net = (SOME a. \<forall>r>0. \<exists>A\<in>Rep_net net. \<forall>x\<in>A. dist x a < r)" |
|
1588 |
||
1589 |
lemma dist_triangle3: |
|
1590 |
fixes x y :: "'a::metric_space" |
|
1591 |
shows "dist x y \<le> dist a x + dist a y" |
|
1592 |
using dist_triangle2 [of x y a] |
|
1593 |
by (simp add: dist_commute) |
|
1594 |
||
1595 |
lemma netlimit_within: |
|
1596 |
assumes "\<not> trivial_limit (at a within S)" |
|
1597 |
shows "netlimit (at a within S) = a" |
|
1598 |
using assms |
|
1599 |
apply (simp add: trivial_limit_within) |
|
1600 |
apply (simp add: netlimit_def Rep_net_within Rep_net_at) |
|
1601 |
apply (rule some_equality, fast) |
|
1602 |
apply (rename_tac b) |
|
1603 |
apply (rule ccontr) |
|
1604 |
apply (drule_tac x="dist b a / 2" in spec, drule mp, simp add: dist_nz) |
|
1605 |
apply (clarify, rename_tac r) |
|
1606 |
apply (simp only: islimpt_approachable) |
|
1607 |
apply (drule_tac x="min r (dist b a / 2)" in spec, drule mp, simp add: dist_nz) |
|
1608 |
apply (clarify) |
|
1609 |
apply (drule_tac x=x' in bspec, simp add: dist_nz) |
|
1610 |
apply (subgoal_tac "dist b a < dist b a / 2 + dist b a / 2", simp) |
|
1611 |
apply (rule le_less_trans [OF dist_triangle3]) |
|
1612 |
apply (erule add_strict_mono) |
|
1613 |
apply simp |
|
1614 |
done |
|
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1615 |
|
31391 | 1616 |
lemma netlimit_at: |
1617 |
fixes a :: "'a::perfect_space" |
|
1618 |
shows "netlimit (at a) = a" |
|
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1619 |
apply (subst within_UNIV[symmetric]) |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1620 |
using netlimit_within[of a UNIV] |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1621 |
by (simp add: trivial_limit_at within_UNIV) |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1622 |
|
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1623 |
text{* Transformation of limit. *} |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1624 |
|
31343
9983f648f9bb
generalize tendsto and related constants to class metric_space
huffman
parents:
31342
diff
changeset
|
1625 |
lemma Lim_transform: |
9983f648f9bb
generalize tendsto and related constants to class metric_space
huffman
parents:
31342
diff
changeset
|
1626 |
fixes f g :: "'a::type \<Rightarrow> 'b::real_normed_vector" |
9983f648f9bb
generalize tendsto and related constants to class metric_space
huffman
parents:
31342
diff
changeset
|
1627 |
assumes "((\<lambda>x. f x - g x) ---> 0) net" "(f ---> l) net" |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1628 |
shows "(g ---> l) net" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1629 |
proof- |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1630 |
from assms have "((\<lambda>x. f x - g x - f x) ---> 0 - l) net" using Lim_sub[of "\<lambda>x. f x - g x" 0 net f l] by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1631 |
thus "?thesis" using Lim_neg [of "\<lambda> x. - g x" "-l" net] by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1632 |
qed |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1633 |
|
31343
9983f648f9bb
generalize tendsto and related constants to class metric_space
huffman
parents:
31342
diff
changeset
|
1634 |
lemma Lim_transform_eventually: |
31395 | 1635 |
fixes f g :: "'a::type \<Rightarrow> 'b::metric_space" |
31343
9983f648f9bb
generalize tendsto and related constants to class metric_space
huffman
parents:
31342
diff
changeset
|
1636 |
shows "eventually (\<lambda>x. f x = g x) net \<Longrightarrow> (f ---> l) net ==> (g ---> l) net" |
31395 | 1637 |
unfolding tendsto_def |
1638 |
apply (clarify, drule spec, drule (1) mp) |
|
1639 |
apply (erule (1) eventually_elim2, simp) |
|
1640 |
done |
|
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1641 |
|
30488 | 1642 |
lemma Lim_transform_within: |
31395 | 1643 |
fixes f g :: "'a::metric_space \<Rightarrow> 'b::metric_space" |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1644 |
assumes "0 < d" "(\<forall>x'\<in>S. 0 < dist x' x \<and> dist x' x < d \<longrightarrow> f x' = g x')" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1645 |
"(f ---> l) (at x within S)" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1646 |
shows "(g ---> l) (at x within S)" |
31395 | 1647 |
using assms(1,3) unfolding Lim_within |
1648 |
apply - |
|
1649 |
apply (clarify, rename_tac e) |
|
1650 |
apply (drule_tac x=e in spec, clarsimp, rename_tac r) |
|
1651 |
apply (rule_tac x="min d r" in exI, clarsimp, rename_tac y) |
|
1652 |
apply (drule_tac x=y in bspec, assumption, clarsimp) |
|
1653 |
apply (simp add: assms(2)) |
|
1654 |
done |
|
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1655 |
|
31343
9983f648f9bb
generalize tendsto and related constants to class metric_space
huffman
parents:
31342
diff
changeset
|
1656 |
lemma Lim_transform_at: |
31395 | 1657 |
fixes f g :: "'a::metric_space \<Rightarrow> 'b::metric_space" |
31343
9983f648f9bb
generalize tendsto and related constants to class metric_space
huffman
parents:
31342
diff
changeset
|
1658 |
shows "0 < d \<Longrightarrow> (\<forall>x'. 0 < dist x' x \<and> dist x' x < d \<longrightarrow> f x' = g x') \<Longrightarrow> |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1659 |
(f ---> l) (at x) ==> (g ---> l) (at x)" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1660 |
apply (subst within_UNIV[symmetric]) |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1661 |
using Lim_transform_within[of d UNIV x f g l] |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1662 |
by (auto simp add: within_UNIV) |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1663 |
|
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1664 |
text{* Common case assuming being away from some crucial point like 0. *} |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1665 |
|
30488 | 1666 |
lemma Lim_transform_away_within: |
31395 | 1667 |
fixes f:: "'a::metric_space \<Rightarrow> 'b::metric_space" |
30488 | 1668 |
assumes "a\<noteq>b" "\<forall>x\<in> S. x \<noteq> a \<and> x \<noteq> b \<longrightarrow> f x = g x" |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1669 |
and "(f ---> l) (at a within S)" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1670 |
shows "(g ---> l) (at a within S)" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1671 |
proof- |
30488 | 1672 |
have "\<forall>x'\<in>S. 0 < dist x' a \<and> dist x' a < dist a b \<longrightarrow> f x' = g x'" using assms(2) |
31285
0a3f9ee4117c
generalize dist function to class real_normed_vector
huffman
parents:
31275
diff
changeset
|
1673 |
apply auto apply(erule_tac x=x' in ballE) by (auto simp add: dist_commute) |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1674 |
thus ?thesis using Lim_transform_within[of "dist a b" S a f g l] using assms(1,3) unfolding dist_nz by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1675 |
qed |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1676 |
|
30488 | 1677 |
lemma Lim_transform_away_at: |
31395 | 1678 |
fixes f:: "'a::metric_space \<Rightarrow> 'b::metric_space" |
30488 | 1679 |
assumes ab: "a\<noteq>b" and fg: "\<forall>x. x \<noteq> a \<and> x \<noteq> b \<longrightarrow> f x = g x" |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1680 |
and fl: "(f ---> l) (at a)" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1681 |
shows "(g ---> l) (at a)" |
30488 | 1682 |
using Lim_transform_away_within[OF ab, of UNIV f g l] fg fl |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1683 |
by (auto simp add: within_UNIV) |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1684 |
|
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1685 |
text{* Alternatively, within an open set. *} |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1686 |
|
30488 | 1687 |
lemma Lim_transform_within_open: |
31395 | 1688 |
fixes f:: "'a::metric_space \<Rightarrow> 'b::metric_space" |
31346 | 1689 |
(* FIXME: generalize to metric_space *) |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1690 |
assumes "open S" "a \<in> S" "\<forall>x\<in>S. x \<noteq> a \<longrightarrow> f x = g x" "(f ---> l) (at a)" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1691 |
shows "(g ---> l) (at a)" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1692 |
proof- |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1693 |
from assms(1,2) obtain e::real where "e>0" and e:"ball a e \<subseteq> S" unfolding open_contains_ball by auto |
30488 | 1694 |
hence "\<forall>x'. 0 < dist x' a \<and> dist x' a < e \<longrightarrow> f x' = g x'" using assms(3) |
31285
0a3f9ee4117c
generalize dist function to class real_normed_vector
huffman
parents:
31275
diff
changeset
|
1695 |
unfolding ball_def subset_eq apply auto apply(erule_tac x=x' in allE) apply(erule_tac x=x' in ballE) by(auto simp add: dist_commute) |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1696 |
thus ?thesis using Lim_transform_at[of e a f g l] `e>0` assms(4) by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1697 |
qed |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1698 |
|
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1699 |
text{* A congruence rule allowing us to transform limits assuming not at point. *} |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1700 |
|
31395 | 1701 |
(* FIXME: Only one congruence rule for tendsto can be used at a time! *) |
1702 |
||
30488 | 1703 |
lemma Lim_cong_within[cong add]: |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1704 |
"(\<And>x. x \<noteq> a \<Longrightarrow> f x = g x) ==> ((\<lambda>x. f x) ---> l) (at a within S) \<longleftrightarrow> ((g ---> l) (at a within S))" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1705 |
by (simp add: Lim_within dist_nz[symmetric]) |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1706 |
|
30488 | 1707 |
lemma Lim_cong_at[cong add]: |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1708 |
"(\<And>x. x \<noteq> a ==> f x = g x) ==> (((\<lambda>x. f x) ---> l) (at a) \<longleftrightarrow> ((g ---> l) (at a)))" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1709 |
by (simp add: Lim_at dist_nz[symmetric]) |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1710 |
|
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1711 |
text{* Useful lemmas on closure and set of possible sequential limits.*} |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1712 |
|
30488 | 1713 |
lemma closure_sequential: |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1714 |
"l \<in> closure S \<longleftrightarrow> (\<exists>x. (\<forall>n. x n \<in> S) \<and> (x ---> l) sequentially)" (is "?lhs = ?rhs") |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1715 |
proof |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1716 |
assume "?lhs" moreover |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1717 |
{ assume "l \<in> S" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1718 |
hence "?rhs" using Lim_const[of l sequentially] by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1719 |
} moreover |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1720 |
{ assume "l islimpt S" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1721 |
hence "?rhs" unfolding islimpt_sequential by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1722 |
} ultimately |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1723 |
show "?rhs" unfolding closure_def by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1724 |
next |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1725 |
assume "?rhs" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1726 |
thus "?lhs" unfolding closure_def unfolding islimpt_sequential by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1727 |
qed |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1728 |
|
30488 | 1729 |
lemma closed_sequential_limits: |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1730 |
"closed S \<longleftrightarrow> (\<forall>x l. (\<forall>n. x n \<in> S) \<and> (x ---> l) sequentially \<longrightarrow> l \<in> S)" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1731 |
unfolding closed_limpt |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1732 |
by (metis closure_sequential closure_closed closed_limpt islimpt_sequential mem_delete) |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1733 |
|
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1734 |
lemma closure_approachable: "x \<in> closure S \<longleftrightarrow> (\<forall>e>0. \<exists>y\<in>S. dist y x < e)" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1735 |
apply (auto simp add: closure_def islimpt_approachable) |
31285
0a3f9ee4117c
generalize dist function to class real_normed_vector
huffman
parents:
31275
diff
changeset
|
1736 |
by (metis dist_self) |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1737 |
|
31418
9baa48bad81c
generalize some constants and lemmas to class topological_space
huffman
parents:
31402
diff
changeset
|
1738 |
lemma closed_approachable: |
9baa48bad81c
generalize some constants and lemmas to class topological_space
huffman
parents:
31402
diff
changeset
|
1739 |
fixes S :: "'a::metric_space set" |
9baa48bad81c
generalize some constants and lemmas to class topological_space
huffman
parents:
31402
diff
changeset
|
1740 |
shows "closed S ==> (\<forall>e>0. \<exists>y\<in>S. dist y x < e) \<longleftrightarrow> x \<in> S" |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1741 |
by (metis closure_closed closure_approachable) |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1742 |
|
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1743 |
text{* Some other lemmas about sequences. *} |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1744 |
|
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1745 |
lemma seq_offset: "(f ---> l) sequentially ==> ((\<lambda>i. f( i + k)) ---> l) sequentially" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1746 |
apply (auto simp add: Lim_sequentially) |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1747 |
by (metis trans_le_add1 ) |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1748 |
|
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1749 |
lemma seq_offset_neg: "(f ---> l) sequentially ==> ((\<lambda>i. f(i - k)) ---> l) sequentially" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1750 |
apply (simp add: Lim_sequentially) |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1751 |
apply (subgoal_tac "\<And>N k (n::nat). N + k <= n ==> N <= n - k") |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1752 |
apply metis |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1753 |
by arith |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1754 |
|
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1755 |
lemma seq_offset_rev: "((\<lambda>i. f(i + k)) ---> l) sequentially ==> (f ---> l) sequentially" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1756 |
apply (simp add: Lim_sequentially) |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1757 |
apply (subgoal_tac "\<And>N k (n::nat). N + k <= n ==> N <= n - k \<and> (n - k) + k = n") |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1758 |
by metis arith |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1759 |
|
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1760 |
lemma seq_harmonic: "((\<lambda>n. vec1(inverse (real n))) ---> 0) sequentially" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1761 |
proof- |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1762 |
{ fix e::real assume "e>0" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1763 |
hence "\<exists>N::nat. \<forall>n::nat\<ge>N. inverse (real n) < e" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1764 |
using real_arch_inv[of e] apply auto apply(rule_tac x=n in exI) |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1765 |
by (metis dlo_simps(4) le_imp_inverse_le linorder_not_less real_of_nat_gt_zero_cancel_iff real_of_nat_less_iff xt1(7)) |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1766 |
} |
31289 | 1767 |
thus ?thesis unfolding Lim_sequentially dist_norm apply simp unfolding norm_vec1 by auto |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1768 |
qed |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1769 |
|
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1770 |
text{* More properties of closed balls. *} |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1771 |
|
31396 | 1772 |
lemma closed_cball: "closed (cball x e)" |
1773 |
unfolding cball_def closed_def Compl_eq_Diff_UNIV [symmetric] |
|
1774 |
unfolding Collect_neg_eq [symmetric] not_le |
|
31418
9baa48bad81c
generalize some constants and lemmas to class topological_space
huffman
parents:
31402
diff
changeset
|
1775 |
apply (clarsimp simp add: open_dist, rename_tac y) |
31396 | 1776 |
apply (rule_tac x="dist x y - e" in exI, clarsimp) |
1777 |
apply (cut_tac x=x and y=x' and z=y in dist_triangle) |
|
1778 |
apply simp |
|
1779 |
done |
|
30488 | 1780 |
|
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1781 |
lemma open_contains_cball: "open S \<longleftrightarrow> (\<forall>x\<in>S. \<exists>e>0. cball x e \<subseteq> S)" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1782 |
proof- |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1783 |
{ fix x and e::real assume "x\<in>S" "e>0" "ball x e \<subseteq> S" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1784 |
hence "\<exists>d>0. cball x d \<subseteq> S" unfolding subset_eq by (rule_tac x="e/2" in exI, auto) |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1785 |
} moreover |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1786 |
{ fix x and e::real assume "x\<in>S" "e>0" "cball x e \<subseteq> S" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1787 |
hence "\<exists>d>0. ball x d \<subseteq> S" unfolding subset_eq apply(rule_tac x="e/2" in exI) by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1788 |
} ultimately |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1789 |
show ?thesis unfolding open_contains_ball by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1790 |
qed |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1791 |
|
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1792 |
lemma open_contains_cball_eq: "open S ==> (\<forall>x. x \<in> S \<longleftrightarrow> (\<exists>e>0. cball x e \<subseteq> S))" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1793 |
by (metis open_contains_cball subset_eq order_less_imp_le centre_in_cball mem_def) |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1794 |
|
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1795 |
lemma mem_interior_cball: "x \<in> interior S \<longleftrightarrow> (\<exists>e>0. cball x e \<subseteq> S)" |
31345
80667d5bee32
generalize topological notions to class metric_space; add class perfect_space
huffman
parents:
31344
diff
changeset
|
1796 |
apply (simp add: interior_def, safe) |
80667d5bee32
generalize topological notions to class metric_space; add class perfect_space
huffman
parents:
31344
diff
changeset
|
1797 |
apply (force simp add: open_contains_cball) |
80667d5bee32
generalize topological notions to class metric_space; add class perfect_space
huffman
parents:
31344
diff
changeset
|
1798 |
apply (rule_tac x="ball x e" in exI) |
80667d5bee32
generalize topological notions to class metric_space; add class perfect_space
huffman
parents:
31344
diff
changeset
|
1799 |
apply (simp add: open_ball centre_in_ball subset_trans [OF ball_subset_cball]) |
80667d5bee32
generalize topological notions to class metric_space; add class perfect_space
huffman
parents:
31344
diff
changeset
|
1800 |
done |
80667d5bee32
generalize topological notions to class metric_space; add class perfect_space
huffman
parents:
31344
diff
changeset
|
1801 |
|
80667d5bee32
generalize topological notions to class metric_space; add class perfect_space
huffman
parents:
31344
diff
changeset
|
1802 |
lemma islimpt_ball: |
80667d5bee32
generalize topological notions to class metric_space; add class perfect_space
huffman
parents:
31344
diff
changeset
|
1803 |
fixes x y :: "'a::{real_normed_vector,perfect_space}" |
80667d5bee32
generalize topological notions to class metric_space; add class perfect_space
huffman
parents:
31344
diff
changeset
|
1804 |
(* FIXME: generalize to metric_space *) |
80667d5bee32
generalize topological notions to class metric_space; add class perfect_space
huffman
parents:
31344
diff
changeset
|
1805 |
shows "y islimpt ball x e \<longleftrightarrow> 0 < e \<and> y \<in> cball x e" (is "?lhs = ?rhs") |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1806 |
proof |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1807 |
assume "?lhs" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1808 |
{ assume "e \<le> 0" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1809 |
hence *:"ball x e = {}" using ball_eq_empty[of x e] by auto |
30488 | 1810 |
have False using `?lhs` unfolding * using islimpt_EMPTY[of y] by auto |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1811 |
} |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1812 |
hence "e > 0" by (metis dlo_simps(3)) |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1813 |
moreover |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1814 |
have "y \<in> cball x e" using closed_cball[of x e] islimpt_subset[of y "ball x e" "cball x e"] ball_subset_cball[of x e] `?lhs` unfolding closed_limpt by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1815 |
ultimately show "?rhs" by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1816 |
next |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1817 |
assume "?rhs" hence "e>0" by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1818 |
{ fix d::real assume "d>0" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1819 |
have "\<exists>x'\<in>ball x e. x' \<noteq> y \<and> dist x' y < d" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1820 |
proof(cases "d \<le> dist x y") |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1821 |
case True thus "\<exists>x'\<in>ball x e. x' \<noteq> y \<and> dist x' y < d" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1822 |
proof(cases "x=y") |
31285
0a3f9ee4117c
generalize dist function to class real_normed_vector
huffman
parents:
31275
diff
changeset
|
1823 |
case True hence False using `d \<le> dist x y` `d>0` by auto |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1824 |
thus "\<exists>x'\<in>ball x e. x' \<noteq> y \<and> dist x' y < d" by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1825 |
next |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1826 |
case False |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1827 |
|
31345
80667d5bee32
generalize topological notions to class metric_space; add class perfect_space
huffman
parents:
31344
diff
changeset
|
1828 |
have "dist x (y - (d / (2 * dist y x)) *\<^sub>R (y - x)) |
80667d5bee32
generalize topological notions to class metric_space; add class perfect_space
huffman
parents:
31344
diff
changeset
|
1829 |
= norm (x - y + (d / (2 * norm (y - x))) *\<^sub>R (y - x))" |
31289 | 1830 |
unfolding mem_cball mem_ball dist_norm diff_diff_eq2 diff_add_eq[THEN sym] by auto |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1831 |
also have "\<dots> = \<bar>- 1 + d / (2 * norm (x - y))\<bar> * norm (x - y)" |
31345
80667d5bee32
generalize topological notions to class metric_space; add class perfect_space
huffman
parents:
31344
diff
changeset
|
1832 |
using scaleR_left_distrib[of "- 1" "d / (2 * norm (y - x))", THEN sym, of "y - x"] |
80667d5bee32
generalize topological notions to class metric_space; add class perfect_space
huffman
parents:
31344
diff
changeset
|
1833 |
unfolding scaleR_minus_left scaleR_one |
80667d5bee32
generalize topological notions to class metric_space; add class perfect_space
huffman
parents:
31344
diff
changeset
|
1834 |
by (auto simp add: norm_minus_commute norm_scaleR) |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1835 |
also have "\<dots> = \<bar>- norm (x - y) + d / 2\<bar>" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1836 |
unfolding abs_mult_pos[of "norm (x - y)", OF norm_ge_zero[of "x - y"]] |
31289 | 1837 |
unfolding real_add_mult_distrib using `x\<noteq>y`[unfolded dist_nz, unfolded dist_norm] by auto |
1838 |
also have "\<dots> \<le> e - d/2" using `d \<le> dist x y` and `d>0` and `?rhs` by(auto simp add: dist_norm) |
|
31345
80667d5bee32
generalize topological notions to class metric_space; add class perfect_space
huffman
parents:
31344
diff
changeset
|
1839 |
finally have "y - (d / (2 * dist y x)) *\<^sub>R (y - x) \<in> ball x e" using `d>0` by auto |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1840 |
|
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1841 |
moreover |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1842 |
|
31345
80667d5bee32
generalize topological notions to class metric_space; add class perfect_space
huffman
parents:
31344
diff
changeset
|
1843 |
have "(d / (2*dist y x)) *\<^sub>R (y - x) \<noteq> 0" |
80667d5bee32
generalize topological notions to class metric_space; add class perfect_space
huffman
parents:
31344
diff
changeset
|
1844 |
using `x\<noteq>y`[unfolded dist_nz] `d>0` unfolding scaleR_eq_0_iff by (auto simp add: dist_commute) |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1845 |
moreover |
31345
80667d5bee32
generalize topological notions to class metric_space; add class perfect_space
huffman
parents:
31344
diff
changeset
|
1846 |
have "dist (y - (d / (2 * dist y x)) *\<^sub>R (y - x)) y < d" unfolding dist_norm apply simp unfolding norm_minus_cancel norm_scaleR |
31285
0a3f9ee4117c
generalize dist function to class real_normed_vector
huffman
parents:
31275
diff
changeset
|
1847 |
using `d>0` `x\<noteq>y`[unfolded dist_nz] dist_commute[of x y] |
31289 | 1848 |
unfolding dist_norm by auto |
31345
80667d5bee32
generalize topological notions to class metric_space; add class perfect_space
huffman
parents:
31344
diff
changeset
|
1849 |
ultimately show "\<exists>x'\<in>ball x e. x' \<noteq> y \<and> dist x' y < d" by (rule_tac x="y - (d / (2*dist y x)) *\<^sub>R (y - x)" in bexI) auto |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1850 |
qed |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1851 |
next |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1852 |
case False hence "d > dist x y" by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1853 |
show "\<exists>x'\<in>ball x e. x' \<noteq> y \<and> dist x' y < d" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1854 |
proof(cases "x=y") |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1855 |
case True |
31345
80667d5bee32
generalize topological notions to class metric_space; add class perfect_space
huffman
parents:
31344
diff
changeset
|
1856 |
obtain z where **: "z \<noteq> y" "dist z y < min e d" |
80667d5bee32
generalize topological notions to class metric_space; add class perfect_space
huffman
parents:
31344
diff
changeset
|
1857 |
using perfect_choose_dist[of "min e d" y] |
31285
0a3f9ee4117c
generalize dist function to class real_normed_vector
huffman
parents:
31275
diff
changeset
|
1858 |
using `d > 0` `e>0` by auto |
30488 | 1859 |
show "\<exists>x'\<in>ball x e. x' \<noteq> y \<and> dist x' y < d" |
31345
80667d5bee32
generalize topological notions to class metric_space; add class perfect_space
huffman
parents:
31344
diff
changeset
|
1860 |
unfolding `x = y` |
80667d5bee32
generalize topological notions to class metric_space; add class perfect_space
huffman
parents:
31344
diff
changeset
|
1861 |
using `z \<noteq> y` ** |
80667d5bee32
generalize topological notions to class metric_space; add class perfect_space
huffman
parents:
31344
diff
changeset
|
1862 |
by (rule_tac x=z in bexI, auto simp add: dist_commute) |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1863 |
next |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1864 |
case False thus "\<exists>x'\<in>ball x e. x' \<noteq> y \<and> dist x' y < d" |
31285
0a3f9ee4117c
generalize dist function to class real_normed_vector
huffman
parents:
31275
diff
changeset
|
1865 |
using `d>0` `d > dist x y` `?rhs` by(rule_tac x=x in bexI, auto) |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1866 |
qed |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1867 |
qed } |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1868 |
thus "?lhs" unfolding mem_cball islimpt_approachable mem_ball by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1869 |
qed |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1870 |
|
31345
80667d5bee32
generalize topological notions to class metric_space; add class perfect_space
huffman
parents:
31344
diff
changeset
|
1871 |
lemma closure_ball: |
80667d5bee32
generalize topological notions to class metric_space; add class perfect_space
huffman
parents:
31344
diff
changeset
|
1872 |
fixes x y :: "'a::{real_normed_vector,perfect_space}" |
80667d5bee32
generalize topological notions to class metric_space; add class perfect_space
huffman
parents:
31344
diff
changeset
|
1873 |
(* FIXME: generalize to metric_space *) |
80667d5bee32
generalize topological notions to class metric_space; add class perfect_space
huffman
parents:
31344
diff
changeset
|
1874 |
shows "0 < e ==> (closure(ball x e) = cball x e)" |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1875 |
apply (simp add: closure_def islimpt_ball expand_set_eq) |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1876 |
by arith |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1877 |
|
31345
80667d5bee32
generalize topological notions to class metric_space; add class perfect_space
huffman
parents:
31344
diff
changeset
|
1878 |
lemma interior_cball: |
80667d5bee32
generalize topological notions to class metric_space; add class perfect_space
huffman
parents:
31344
diff
changeset
|
1879 |
fixes x :: "real ^ _" (* FIXME: generalize *) |
80667d5bee32
generalize topological notions to class metric_space; add class perfect_space
huffman
parents:
31344
diff
changeset
|
1880 |
shows "interior(cball x e) = ball x e" |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1881 |
proof(cases "e\<ge>0") |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1882 |
case False note cs = this |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1883 |
from cs have "ball x e = {}" using ball_empty[of e x] by auto moreover |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1884 |
{ fix y assume "y \<in> cball x e" |
31285
0a3f9ee4117c
generalize dist function to class real_normed_vector
huffman
parents:
31275
diff
changeset
|
1885 |
hence False unfolding mem_cball using dist_nz[of x y] cs by auto } |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1886 |
hence "cball x e = {}" by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1887 |
hence "interior (cball x e) = {}" using interior_empty by auto |
30488 | 1888 |
ultimately show ?thesis by blast |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1889 |
next |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1890 |
case True note cs = this |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1891 |
have "ball x e \<subseteq> cball x e" using ball_subset_cball by auto moreover |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1892 |
{ fix S y assume as: "S \<subseteq> cball x e" "open S" "y\<in>S" |
31418
9baa48bad81c
generalize some constants and lemmas to class topological_space
huffman
parents:
31402
diff
changeset
|
1893 |
then obtain d where "d>0" and d:"\<forall>x'. dist x' y < d \<longrightarrow> x' \<in> S" unfolding open_dist by blast |
30488 | 1894 |
|
1895 |
then obtain xa where xa:"dist y xa = d / 2" using vector_choose_dist[of "d/2" y] by auto |
|
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1896 |
hence xa_y:"xa \<noteq> y" using dist_nz[of y xa] using `d>0` by auto |
31285
0a3f9ee4117c
generalize dist function to class real_normed_vector
huffman
parents:
31275
diff
changeset
|
1897 |
have "xa\<in>S" using d[THEN spec[where x=xa]] using xa apply(auto simp add: dist_commute) unfolding dist_nz[THEN sym] using xa_y by auto |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1898 |
hence xa_cball:"xa \<in> cball x e" using as(1) by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1899 |
|
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1900 |
hence "y \<in> ball x e" proof(cases "x = y") |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1901 |
case True |
31285
0a3f9ee4117c
generalize dist function to class real_normed_vector
huffman
parents:
31275
diff
changeset
|
1902 |
hence "e>0" using xa_y[unfolded dist_nz] xa_cball[unfolded mem_cball] by (auto simp add: dist_commute) |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1903 |
thus "y \<in> ball x e" using `x = y ` by simp |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1904 |
next |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1905 |
case False |
31289 | 1906 |
have "dist (y + (d / 2 / dist y x) *s (y - x)) y < d" unfolding dist_norm |
30488 | 1907 |
using `d>0` norm_ge_zero[of "y - x"] `x \<noteq> y` by auto |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1908 |
hence *:"y + (d / 2 / dist y x) *s (y - x) \<in> cball x e" using d as(1)[unfolded subset_eq] by blast |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1909 |
have "y - x \<noteq> 0" using `x \<noteq> y` by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1910 |
hence **:"d / (2 * norm (y - x)) > 0" unfolding zero_less_norm_iff[THEN sym] |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1911 |
using `d>0` divide_pos_pos[of d "2*norm (y - x)"] by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1912 |
|
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1913 |
have "dist (y + (d / 2 / dist y x) *s (y - x)) x = norm (y + (d / (2 * norm (y - x))) *s y - (d / (2 * norm (y - x))) *s x - x)" |
31289 | 1914 |
by (auto simp add: dist_norm vector_ssub_ldistrib add_diff_eq) |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1915 |
also have "\<dots> = norm ((1 + d / (2 * norm (y - x))) *s (y - x))" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1916 |
by (auto simp add: vector_sadd_rdistrib vector_smult_lid ring_simps vector_sadd_rdistrib vector_ssub_ldistrib) |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1917 |
also have "\<dots> = \<bar>1 + d / (2 * norm (y - x))\<bar> * norm (y - x)" using ** by auto |
31289 | 1918 |
also have "\<dots> = (dist y x) + d/2"using ** by (auto simp add: left_distrib dist_norm) |
31285
0a3f9ee4117c
generalize dist function to class real_normed_vector
huffman
parents:
31275
diff
changeset
|
1919 |
finally have "e \<ge> dist x y +d/2" using *[unfolded mem_cball] by (auto simp add: dist_commute) |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1920 |
thus "y \<in> ball x e" unfolding mem_ball using `d>0` by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1921 |
qed } |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1922 |
hence "\<forall>S \<subseteq> cball x e. open S \<longrightarrow> S \<subseteq> ball x e" by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1923 |
ultimately show ?thesis using interior_unique[of "ball x e" "cball x e"] using open_ball[of x e] by auto |
30488 | 1924 |
qed |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1925 |
|
31345
80667d5bee32
generalize topological notions to class metric_space; add class perfect_space
huffman
parents:
31344
diff
changeset
|
1926 |
lemma frontier_ball: |
80667d5bee32
generalize topological notions to class metric_space; add class perfect_space
huffman
parents:
31344
diff
changeset
|
1927 |
fixes a :: "real ^ _" (* FIXME: generalize *) |
80667d5bee32
generalize topological notions to class metric_space; add class perfect_space
huffman
parents:
31344
diff
changeset
|
1928 |
shows "0 < e ==> frontier(ball a e) = {x. dist a x = e}" |
30488 | 1929 |
apply (simp add: frontier_def closure_ball interior_open open_ball order_less_imp_le) |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1930 |
apply (simp add: expand_set_eq) |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1931 |
by arith |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1932 |
|
31345
80667d5bee32
generalize topological notions to class metric_space; add class perfect_space
huffman
parents:
31344
diff
changeset
|
1933 |
lemma frontier_cball: |
80667d5bee32
generalize topological notions to class metric_space; add class perfect_space
huffman
parents:
31344
diff
changeset
|
1934 |
fixes a :: "real ^ _" (* FIXME: generalize *) |
80667d5bee32
generalize topological notions to class metric_space; add class perfect_space
huffman
parents:
31344
diff
changeset
|
1935 |
shows "frontier(cball a e) = {x. dist a x = e}" |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1936 |
apply (simp add: frontier_def interior_cball closed_cball closure_closed order_less_imp_le) |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1937 |
apply (simp add: expand_set_eq) |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1938 |
by arith |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1939 |
|
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1940 |
lemma cball_eq_empty: "(cball x e = {}) \<longleftrightarrow> e < 0" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1941 |
apply (simp add: expand_set_eq not_le) |
31285
0a3f9ee4117c
generalize dist function to class real_normed_vector
huffman
parents:
31275
diff
changeset
|
1942 |
by (metis zero_le_dist dist_self order_less_le_trans) |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1943 |
lemma cball_empty: "e < 0 ==> cball x e = {}" by (simp add: cball_eq_empty) |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1944 |
|
31345
80667d5bee32
generalize topological notions to class metric_space; add class perfect_space
huffman
parents:
31344
diff
changeset
|
1945 |
lemma cball_eq_sing: |
80667d5bee32
generalize topological notions to class metric_space; add class perfect_space
huffman
parents:
31344
diff
changeset
|
1946 |
fixes x :: "real ^ _" (* FIXME: generalize *) |
80667d5bee32
generalize topological notions to class metric_space; add class perfect_space
huffman
parents:
31344
diff
changeset
|
1947 |
shows "(cball x e = {x}) \<longleftrightarrow> e = 0" |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1948 |
proof- |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1949 |
{ assume as:"\<forall>xa. (dist x xa \<le> e) = (xa = x)" |
31285
0a3f9ee4117c
generalize dist function to class real_normed_vector
huffman
parents:
31275
diff
changeset
|
1950 |
hence "e \<ge> 0" apply (erule_tac x=x in allE) by auto |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1951 |
then obtain y where y:"dist x y = e" using vector_choose_dist[of e] by auto |
31285
0a3f9ee4117c
generalize dist function to class real_normed_vector
huffman
parents:
31275
diff
changeset
|
1952 |
hence "e = 0" using as apply(erule_tac x=y in allE) by auto |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1953 |
} |
31285
0a3f9ee4117c
generalize dist function to class real_normed_vector
huffman
parents:
31275
diff
changeset
|
1954 |
thus ?thesis unfolding expand_set_eq mem_cball by (auto simp add: dist_nz) |
30488 | 1955 |
qed |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1956 |
|
31345
80667d5bee32
generalize topological notions to class metric_space; add class perfect_space
huffman
parents:
31344
diff
changeset
|
1957 |
lemma cball_sing: |
80667d5bee32
generalize topological notions to class metric_space; add class perfect_space
huffman
parents:
31344
diff
changeset
|
1958 |
fixes x :: "real ^ _" (* FIXME: generalize *) |
80667d5bee32
generalize topological notions to class metric_space; add class perfect_space
huffman
parents:
31344
diff
changeset
|
1959 |
shows "e = 0 ==> cball x e = {x}" by (simp add: cball_eq_sing) |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1960 |
|
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1961 |
text{* For points in the interior, localization of limits makes no difference. *} |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1962 |
|
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1963 |
lemma eventually_within_interior: assumes "x \<in> interior S" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1964 |
shows "eventually P (at x within S) \<longleftrightarrow> eventually P (at x)" (is "?lhs = ?rhs") |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1965 |
proof- |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1966 |
from assms obtain e where e:"e>0" "\<forall>y. dist x y < e \<longrightarrow> y \<in> S" unfolding mem_interior ball_def subset_eq by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1967 |
{ assume "?lhs" then obtain d where "d>0" "\<forall>xa\<in>S. 0 < dist xa x \<and> dist xa x < d \<longrightarrow> P xa" unfolding eventually_within by auto |
31285
0a3f9ee4117c
generalize dist function to class real_normed_vector
huffman
parents:
31275
diff
changeset
|
1968 |
hence "?rhs" unfolding eventually_at using e by (auto simp add: dist_commute intro!: add exI[of _ "min e d"]) |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1969 |
} moreover |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1970 |
{ assume "?rhs" hence "?lhs" unfolding eventually_within eventually_at by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1971 |
} ultimately |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1972 |
show "?thesis" by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1973 |
qed |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1974 |
|
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1975 |
lemma lim_within_interior: "x \<in> interior S ==> ((f ---> l) (at x within S) \<longleftrightarrow> (f ---> l) (at x))" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1976 |
by (simp add: tendsto_def eventually_within_interior) |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1977 |
|
31346 | 1978 |
lemma netlimit_within_interior: |
1979 |
fixes x :: "'a::{perfect_space, real_normed_vector}" |
|
1980 |
(* FIXME: generalize to perfect_space *) |
|
1981 |
assumes "x \<in> interior S" |
|
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1982 |
shows "netlimit(at x within S) = x" (is "?lhs = ?rhs") |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1983 |
proof- |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1984 |
from assms obtain e::real where e:"e>0" "ball x e \<subseteq> S" using open_interior[of S] unfolding open_contains_ball using interior_subset[of S] by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1985 |
hence "\<not> trivial_limit (at x within S)" using islimpt_subset[of x "ball x e" S] unfolding trivial_limit_within islimpt_ball centre_in_cball by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1986 |
thus ?thesis using netlimit_within by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1987 |
qed |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1988 |
|
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1989 |
subsection{* Boundedness. *} |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1990 |
|
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1991 |
(* FIXME: This has to be unified with BSEQ!! *) |
31400 | 1992 |
definition |
1993 |
bounded :: "'a::real_normed_vector set \<Rightarrow> bool" where |
|
1994 |
"bounded S \<longleftrightarrow> (\<exists>a. \<forall>x\<in>S. norm x <= a)" |
|
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1995 |
|
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1996 |
lemma bounded_empty[simp]: "bounded {}" by (simp add: bounded_def) |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1997 |
lemma bounded_subset: "bounded T \<Longrightarrow> S \<subseteq> T ==> bounded S" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1998 |
by (metis bounded_def subset_eq) |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
1999 |
|
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2000 |
lemma bounded_interior[intro]: "bounded S ==> bounded(interior S)" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2001 |
by (metis bounded_subset interior_subset) |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2002 |
|
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2003 |
lemma bounded_closure[intro]: assumes "bounded S" shows "bounded(closure S)" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2004 |
proof- |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2005 |
from assms obtain a where a:"\<forall>x\<in>S. norm x \<le> a" unfolding bounded_def by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2006 |
{ fix x assume "x\<in>closure S" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2007 |
then obtain xa where xa:"\<forall>n. xa n \<in> S" "(xa ---> x) sequentially" unfolding closure_sequential by auto |
31347
357d58c5743a
new lemmas about eventually; rewrite Lim proofs to use more abstract properties of eventually
huffman
parents:
31346
diff
changeset
|
2008 |
have "\<forall>n. xa n \<in> S \<longrightarrow> norm (xa n) \<le> a" using a by simp |
357d58c5743a
new lemmas about eventually; rewrite Lim proofs to use more abstract properties of eventually
huffman
parents:
31346
diff
changeset
|
2009 |
hence "eventually (\<lambda>n. norm (xa n) \<le> a) sequentially" |
357d58c5743a
new lemmas about eventually; rewrite Lim proofs to use more abstract properties of eventually
huffman
parents:
31346
diff
changeset
|
2010 |
by (rule eventually_mono, simp add: xa(1)) |
357d58c5743a
new lemmas about eventually; rewrite Lim proofs to use more abstract properties of eventually
huffman
parents:
31346
diff
changeset
|
2011 |
have "norm x \<le> a" |
357d58c5743a
new lemmas about eventually; rewrite Lim proofs to use more abstract properties of eventually
huffman
parents:
31346
diff
changeset
|
2012 |
apply (rule Lim_norm_ubound[of sequentially xa x a]) |
357d58c5743a
new lemmas about eventually; rewrite Lim proofs to use more abstract properties of eventually
huffman
parents:
31346
diff
changeset
|
2013 |
apply (rule trivial_limit_sequentially) |
357d58c5743a
new lemmas about eventually; rewrite Lim proofs to use more abstract properties of eventually
huffman
parents:
31346
diff
changeset
|
2014 |
apply (rule xa(2)) |
357d58c5743a
new lemmas about eventually; rewrite Lim proofs to use more abstract properties of eventually
huffman
parents:
31346
diff
changeset
|
2015 |
apply fact |
357d58c5743a
new lemmas about eventually; rewrite Lim proofs to use more abstract properties of eventually
huffman
parents:
31346
diff
changeset
|
2016 |
done |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2017 |
} |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2018 |
thus ?thesis unfolding bounded_def by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2019 |
qed |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2020 |
|
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2021 |
lemma bounded_cball[simp,intro]: "bounded (cball x e)" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2022 |
apply (simp add: bounded_def) |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2023 |
apply (rule exI[where x="norm x + e"]) |
31400 | 2024 |
apply (clarsimp simp add: Ball_def dist_norm, rename_tac y) |
2025 |
apply (subgoal_tac "norm y - norm x \<le> e", simp) |
|
2026 |
apply (rule order_trans [OF norm_triangle_ineq2]) |
|
2027 |
apply (simp add: norm_minus_commute) |
|
2028 |
done |
|
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2029 |
|
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2030 |
lemma bounded_ball[simp,intro]: "bounded(ball x e)" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2031 |
by (metis ball_subset_cball bounded_cball bounded_subset) |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2032 |
|
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2033 |
lemma finite_imp_bounded[intro]: assumes "finite S" shows "bounded S" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2034 |
proof- |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2035 |
{ fix x F assume as:"bounded F" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2036 |
then obtain a where "\<forall>x\<in>F. norm x \<le> a" unfolding bounded_def by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2037 |
hence "bounded (insert x F)" unfolding bounded_def by(auto intro!: add exI[of _ "max a (norm x)"]) |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2038 |
} |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2039 |
thus ?thesis using finite_induct[of S bounded] using bounded_empty assms by auto |
30488 | 2040 |
qed |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2041 |
|
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2042 |
lemma bounded_Un[simp]: "bounded (S \<union> T) \<longleftrightarrow> bounded S \<and> bounded T" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2043 |
apply (auto simp add: bounded_def) |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2044 |
by (rule_tac x="max a aa" in exI, auto) |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2045 |
|
30488 | 2046 |
lemma bounded_Union[intro]: "finite F \<Longrightarrow> (\<forall>S\<in>F. bounded S) \<Longrightarrow> bounded(\<Union>F)" |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2047 |
by (induct rule: finite_induct[of F], auto) |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2048 |
|
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2049 |
lemma bounded_pos: "bounded S \<longleftrightarrow> (\<exists>b>0. \<forall>x\<in> S. norm x <= b)" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2050 |
apply (simp add: bounded_def) |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2051 |
apply (subgoal_tac "\<And>x (y::real). 0 < 1 + abs y \<and> (x <= y \<longrightarrow> x <= 1 + abs y)") |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2052 |
by metis arith |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2053 |
|
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2054 |
lemma bounded_Int[intro]: "bounded S \<or> bounded T \<Longrightarrow> bounded (S \<inter> T)" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2055 |
by (metis Int_lower1 Int_lower2 bounded_subset) |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2056 |
|
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2057 |
lemma bounded_diff[intro]: "bounded S ==> bounded (S - T)" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2058 |
apply (metis Diff_subset bounded_subset) |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2059 |
done |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2060 |
|
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2061 |
lemma bounded_insert[intro]:"bounded(insert x S) \<longleftrightarrow> bounded S" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2062 |
by (metis Diff_cancel Un_empty_right Un_insert_right bounded_Un bounded_subset finite.emptyI finite_imp_bounded infinite_remove subset_insertI) |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2063 |
|
30582 | 2064 |
lemma bot_bounded_UNIV[simp, intro]: "~(bounded (UNIV:: (real^'n::finite) set))" |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2065 |
proof(auto simp add: bounded_pos not_le) |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2066 |
fix b::real assume b: "b >0" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2067 |
have b1: "b +1 \<ge> 0" using b by simp |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2068 |
then obtain x:: "real^'n" where "norm x = b + 1" using vector_choose_size[of "b+1"] by blast |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2069 |
hence "norm x > b" using b by simp |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2070 |
then show "\<exists>(x::real^'n). b < norm x" by blast |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2071 |
qed |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2072 |
|
30488 | 2073 |
lemma bounded_linear_image: |
30582 | 2074 |
fixes f :: "real^'m::finite \<Rightarrow> real^'n::finite" |
30488 | 2075 |
assumes "bounded S" "linear f" |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2076 |
shows "bounded(f ` S)" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2077 |
proof- |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2078 |
from assms(1) obtain b where b:"b>0" "\<forall>x\<in>S. norm x \<le> b" unfolding bounded_pos by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2079 |
from assms(2) obtain B where B:"B>0" "\<forall>x. norm (f x) \<le> B * norm x" using linear_bounded_pos by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2080 |
{ fix x assume "x\<in>S" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2081 |
hence "norm x \<le> b" using b by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2082 |
hence "norm (f x) \<le> B * b" using B(2) apply(erule_tac x=x in allE) |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2083 |
by (metis B(1) B(2) real_le_trans real_mult_le_cancel_iff2) |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2084 |
} |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2085 |
thus ?thesis unfolding bounded_pos apply(rule_tac x="b*B" in exI) |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2086 |
using b B real_mult_order[of b B] by (auto simp add: real_mult_commute) |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2087 |
qed |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2088 |
|
31400 | 2089 |
lemma bounded_scaling: |
2090 |
fixes S :: "(real ^ 'n::finite) set" |
|
2091 |
shows "bounded S \<Longrightarrow> bounded ((\<lambda>x. c *s x) ` S)" |
|
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2092 |
apply (rule bounded_linear_image, assumption) |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2093 |
by (rule linear_compose_cmul, rule linear_id[unfolded id_def]) |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2094 |
|
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2095 |
lemma bounded_translation: assumes "bounded S" shows "bounded ((\<lambda>x. a + x) ` S)" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2096 |
proof- |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2097 |
from assms obtain b where b:"b>0" "\<forall>x\<in>S. norm x \<le> b" unfolding bounded_pos by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2098 |
{ fix x assume "x\<in>S" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2099 |
hence "norm (a + x) \<le> b + norm a" using norm_triangle_ineq[of a x] b by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2100 |
} |
30488 | 2101 |
thus ?thesis unfolding bounded_pos using norm_ge_zero[of a] b(1) using add_strict_increasing[of b 0 "norm a"] |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2102 |
by (auto intro!: add exI[of _ "b + norm a"]) |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2103 |
qed |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2104 |
|
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2105 |
|
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2106 |
text{* Some theorems on sups and infs using the notion "bounded". *} |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2107 |
|
31400 | 2108 |
lemma bounded_vec1: |
2109 |
fixes S :: "real set" |
|
2110 |
shows "bounded(vec1 ` S) \<longleftrightarrow> (\<exists>a. \<forall>x\<in>S. abs x <= a)" |
|
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2111 |
by (simp add: bounded_def forall_vec1 norm_vec1 vec1_in_image_vec1) |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2112 |
|
30488 | 2113 |
lemma bounded_has_rsup: assumes "bounded(vec1 ` S)" "S \<noteq> {}" |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2114 |
shows "\<forall>x\<in>S. x <= rsup S" and "\<forall>b. (\<forall>x\<in>S. x <= b) \<longrightarrow> rsup S <= b" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2115 |
proof |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2116 |
fix x assume "x\<in>S" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2117 |
from assms(1) obtain a where a:"\<forall>x\<in>S. \<bar>x\<bar> \<le> a" unfolding bounded_vec1 by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2118 |
hence *:"S *<= a" using setleI[of S a] by (metis abs_le_interval_iff mem_def) |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2119 |
thus "x \<le> rsup S" using rsup[OF `S\<noteq>{}`] using assms(1)[unfolded bounded_vec1] using isLubD2[of UNIV S "rsup S" x] using `x\<in>S` by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2120 |
next |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2121 |
show "\<forall>b. (\<forall>x\<in>S. x \<le> b) \<longrightarrow> rsup S \<le> b" using assms |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2122 |
using rsup[of S, unfolded isLub_def isUb_def leastP_def setle_def setge_def] |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2123 |
apply (auto simp add: bounded_vec1) |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2124 |
by (auto simp add: isLub_def isUb_def leastP_def setle_def setge_def) |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2125 |
qed |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2126 |
|
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2127 |
lemma rsup_insert: assumes "bounded (vec1 ` S)" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2128 |
shows "rsup(insert x S) = (if S = {} then x else max x (rsup S))" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2129 |
proof(cases "S={}") |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2130 |
case True thus ?thesis using rsup_finite_in[of "{x}"] by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2131 |
next |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2132 |
let ?S = "insert x S" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2133 |
case False |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2134 |
hence *:"\<forall>x\<in>S. x \<le> rsup S" using bounded_has_rsup(1)[of S] using assms by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2135 |
hence "insert x S *<= max x (rsup S)" unfolding setle_def by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2136 |
hence "isLub UNIV ?S (rsup ?S)" using rsup[of ?S] by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2137 |
moreover |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2138 |
have **:"isUb UNIV ?S (max x (rsup S))" unfolding isUb_def setle_def using * by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2139 |
{ fix y assume as:"isUb UNIV (insert x S) y" |
30488 | 2140 |
hence "max x (rsup S) \<le> y" unfolding isUb_def using rsup_le[OF `S\<noteq>{}`] |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2141 |
unfolding setle_def by auto } |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2142 |
hence "max x (rsup S) <=* isUb UNIV (insert x S)" unfolding setge_def Ball_def mem_def by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2143 |
hence "isLub UNIV ?S (max x (rsup S))" using ** isLubI2[of UNIV ?S "max x (rsup S)"] unfolding Collect_def by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2144 |
ultimately show ?thesis using real_isLub_unique[of UNIV ?S] using `S\<noteq>{}` by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2145 |
qed |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2146 |
|
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2147 |
lemma sup_insert_finite: "finite S \<Longrightarrow> rsup(insert x S) = (if S = {} then x else max x (rsup S))" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2148 |
apply (rule rsup_insert) |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2149 |
apply (rule finite_imp_bounded) |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2150 |
by simp |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2151 |
|
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2152 |
lemma bounded_has_rinf: |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2153 |
assumes "bounded(vec1 ` S)" "S \<noteq> {}" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2154 |
shows "\<forall>x\<in>S. x >= rinf S" and "\<forall>b. (\<forall>x\<in>S. x >= b) \<longrightarrow> rinf S >= b" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2155 |
proof |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2156 |
fix x assume "x\<in>S" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2157 |
from assms(1) obtain a where a:"\<forall>x\<in>S. \<bar>x\<bar> \<le> a" unfolding bounded_vec1 by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2158 |
hence *:"- a <=* S" using setgeI[of S "-a"] unfolding abs_le_interval_iff by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2159 |
thus "x \<ge> rinf S" using rinf[OF `S\<noteq>{}`] using isGlbD2[of UNIV S "rinf S" x] using `x\<in>S` by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2160 |
next |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2161 |
show "\<forall>b. (\<forall>x\<in>S. x >= b) \<longrightarrow> rinf S \<ge> b" using assms |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2162 |
using rinf[of S, unfolded isGlb_def isLb_def greatestP_def setle_def setge_def] |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2163 |
apply (auto simp add: bounded_vec1) |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2164 |
by (auto simp add: isGlb_def isLb_def greatestP_def setle_def setge_def) |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2165 |
qed |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2166 |
|
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2167 |
(* TODO: Move this to RComplete.thy -- would need to include Glb into RComplete *) |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2168 |
lemma real_isGlb_unique: "[| isGlb R S x; isGlb R S y |] ==> x = (y::real)" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2169 |
apply (frule isGlb_isLb) |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2170 |
apply (frule_tac x = y in isGlb_isLb) |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2171 |
apply (blast intro!: order_antisym dest!: isGlb_le_isLb) |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2172 |
done |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2173 |
|
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2174 |
lemma rinf_insert: assumes "bounded (vec1 ` S)" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2175 |
shows "rinf(insert x S) = (if S = {} then x else min x (rinf S))" (is "?lhs = ?rhs") |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2176 |
proof(cases "S={}") |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2177 |
case True thus ?thesis using rinf_finite_in[of "{x}"] by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2178 |
next |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2179 |
let ?S = "insert x S" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2180 |
case False |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2181 |
hence *:"\<forall>x\<in>S. x \<ge> rinf S" using bounded_has_rinf(1)[of S] using assms by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2182 |
hence "min x (rinf S) <=* insert x S" unfolding setge_def by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2183 |
hence "isGlb UNIV ?S (rinf ?S)" using rinf[of ?S] by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2184 |
moreover |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2185 |
have **:"isLb UNIV ?S (min x (rinf S))" unfolding isLb_def setge_def using * by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2186 |
{ fix y assume as:"isLb UNIV (insert x S) y" |
30488 | 2187 |
hence "min x (rinf S) \<ge> y" unfolding isLb_def using rinf_ge[OF `S\<noteq>{}`] |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2188 |
unfolding setge_def by auto } |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2189 |
hence "isLb UNIV (insert x S) *<= min x (rinf S)" unfolding setle_def Ball_def mem_def by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2190 |
hence "isGlb UNIV ?S (min x (rinf S))" using ** isGlbI2[of UNIV ?S "min x (rinf S)"] unfolding Collect_def by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2191 |
ultimately show ?thesis using real_isGlb_unique[of UNIV ?S] using `S\<noteq>{}` by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2192 |
qed |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2193 |
|
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2194 |
lemma inf_insert_finite: "finite S ==> rinf(insert x S) = (if S = {} then x else min x (rinf S))" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2195 |
by (rule rinf_insert, rule finite_imp_bounded, simp) |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2196 |
|
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2197 |
subsection{* Compactness (the definition is the one based on convegent subsequences). *} |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2198 |
|
30488 | 2199 |
definition "compact S \<longleftrightarrow> |
31401 | 2200 |
(\<forall>f. (\<forall>n::nat. f n \<in> S) \<longrightarrow> |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2201 |
(\<exists>l\<in>S. \<exists>r. (\<forall>m n. m < n \<longrightarrow> r m < r n) \<and> ((f o r) ---> l) sequentially))" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2202 |
|
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2203 |
lemma monotone_bigger: fixes r::"nat\<Rightarrow>nat" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2204 |
assumes "\<forall>m n::nat. m < n --> r m < r n" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2205 |
shows "n \<le> r n" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2206 |
proof(induct n) |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2207 |
show "0 \<le> r 0" by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2208 |
next |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2209 |
fix n assume "n \<le> r n" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2210 |
moreover have "r n < r (Suc n)" using assms by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2211 |
ultimately show "Suc n \<le> r (Suc n)" by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2212 |
qed |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2213 |
|
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2214 |
lemma lim_subsequence: "\<forall>m n. m < n \<longrightarrow> r m < r n \<Longrightarrow> (s ---> l) sequentially \<Longrightarrow> ((s o r) ---> l) sequentially" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2215 |
unfolding Lim_sequentially by (simp, metis monotone_bigger le_trans) |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2216 |
|
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2217 |
lemma num_Axiom: "EX! g. g 0 = e \<and> (\<forall>n. g (Suc n) = f n (g n))" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2218 |
unfolding Ex1_def |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2219 |
apply (rule_tac x="nat_rec e f" in exI) |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2220 |
apply (rule conjI)+ |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2221 |
apply (rule def_nat_rec_0, simp) |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2222 |
apply (rule allI, rule def_nat_rec_Suc, simp) |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2223 |
apply (rule allI, rule impI, rule ext) |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2224 |
apply (erule conjE) |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2225 |
apply (induct_tac x) |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2226 |
apply (simp add: nat_rec_0) |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2227 |
apply (erule_tac x="n" in allE) |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2228 |
apply (simp) |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2229 |
done |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2230 |
|
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2231 |
|
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2232 |
lemma convergent_bounded_increasing: fixes s ::"nat\<Rightarrow>real" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2233 |
assumes "\<forall>m n. m \<le> n --> s m \<le> s n" and "\<forall>n. abs(s n) \<le> b" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2234 |
shows "\<exists> l. \<forall>e::real>0. \<exists> N. \<forall>n \<ge> N. abs(s n - l) < e" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2235 |
proof- |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2236 |
have "isUb UNIV (range s) b" using assms(2) and abs_le_D1 unfolding isUb_def and setle_def by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2237 |
then obtain t where t:"isLub UNIV (range s) t" using reals_complete[of "range s" ] by auto |
30488 | 2238 |
{ fix e::real assume "e>0" and as:"\<forall>N. \<exists>n\<ge>N. \<not> \<bar>s n - t\<bar> < e" |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2239 |
{ fix n::nat |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2240 |
obtain N where "N\<ge>n" and n:"\<bar>s N - t\<bar> \<ge> e" using as[THEN spec[where x=n]] by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2241 |
have "t \<ge> s N" using isLub_isUb[OF t, unfolded isUb_def setle_def] by auto |
30488 | 2242 |
with n have "s N \<le> t - e" using `e>0` by auto |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2243 |
hence "s n \<le> t - e" using assms(1)[THEN spec[where x=n], THEN spec[where x=N]] using `n\<le>N` by auto } |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2244 |
hence "isUb UNIV (range s) (t - e)" unfolding isUb_def and setle_def by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2245 |
hence False using isLub_le_isUb[OF t, of "t - e"] and `e>0` by auto } |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2246 |
thus ?thesis by blast |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2247 |
qed |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2248 |
|
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2249 |
lemma convergent_bounded_monotone: fixes s::"nat \<Rightarrow> real" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2250 |
assumes "\<forall>n. abs(s n) \<le> b" and "(\<forall>m n. m \<le> n --> s m \<le> s n) \<or> (\<forall>m n. m \<le> n --> s n \<le> s m)" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2251 |
shows "\<exists>l. \<forall>e::real>0. \<exists>N. \<forall>n\<ge>N. abs(s n - l) < e" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2252 |
using convergent_bounded_increasing[of s b] assms using convergent_bounded_increasing[of "\<lambda>n. - s n" b] |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2253 |
apply auto unfolding minus_add_distrib[THEN sym, unfolded diff_minus[THEN sym]] |
30488 | 2254 |
unfolding abs_minus_cancel by(rule_tac x="-l" in exI)auto |
2255 |
||
2256 |
lemma compact_real_lemma: |
|
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2257 |
assumes "\<forall>n::nat. abs(s n) \<le> b" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2258 |
shows "\<exists>l r. (\<forall>m n::nat. m < n --> r m < r n) \<and> |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2259 |
(\<forall>e>0::real. \<exists>N. \<forall>n\<ge>N. (abs(s (r n) - l) < e))" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2260 |
proof- |
30488 | 2261 |
obtain r where r:"\<forall>m n::nat. m < n \<longrightarrow> r m < r n" |
2262 |
"(\<forall>m n. m \<le> n \<longrightarrow> s (r m) \<le> s (r n)) \<or> (\<forall>m n. m \<le> n \<longrightarrow> s (r n) \<le> s (r m))" |
|
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2263 |
using seq_monosub[of s] by (auto simp add: subseq_def monoseq_def) |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2264 |
thus ?thesis using convergent_bounded_monotone[of "s o r" b] and assms by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2265 |
qed |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2266 |
|
30488 | 2267 |
lemma compact_lemma: |
30582 | 2268 |
assumes "bounded s" and "\<forall>n. (x::nat \<Rightarrow>real^'a::finite) n \<in> s" |
2269 |
shows "\<forall>d. |
|
2270 |
\<exists>l::(real^'a::finite). \<exists> r. (\<forall>n m::nat. m < n --> r m < r n) \<and> |
|
2271 |
(\<forall>e>0. \<exists>N. \<forall>n\<ge>N. \<forall>i\<in>d. \<bar>x (r n) $ i - l $ i\<bar> < e)" |
|
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2272 |
proof- |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2273 |
obtain b where b:"\<forall>x\<in>s. norm x \<le> b" using assms(1)[unfolded bounded_def] by auto |
30582 | 2274 |
{ { fix i::'a |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2275 |
{ fix n::nat |
30582 | 2276 |
have "\<bar>x n $ i\<bar> \<le> b" using b[THEN bspec[where x="x n"]] and component_le_norm[of "x n" i] and assms(2)[THEN spec[where x=n]] by auto } |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2277 |
hence "\<forall>n. \<bar>x n $ i\<bar> \<le> b" by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2278 |
} note b' = this |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2279 |
|
30582 | 2280 |
fix d::"'a set" have "finite d" by simp |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2281 |
hence "\<exists>l::(real^'a). \<exists> r. (\<forall>n m::nat. m < n --> r m < r n) \<and> |
30582 | 2282 |
(\<forall>e>0. \<exists>N. \<forall>n\<ge>N. \<forall>i\<in>d. \<bar>x (r n) $ i - l $ i\<bar> < e)" |
2283 |
proof(induct d) case empty thus ?case by auto |
|
2284 |
next case (insert k d) |
|
2285 |
obtain l1::"real^'a" and r1 where r1:"\<forall>n m::nat. m < n \<longrightarrow> r1 m < r1 n" and lr1:"\<forall>e>0. \<exists>N. \<forall>n\<ge>N. \<forall>i\<in>d. \<bar>x (r1 n) $ i - l1 $ i\<bar> < e" |
|
2286 |
using insert(3) by auto |
|
2287 |
obtain l2 r2 where r2:"\<forall>m n::nat. m < n \<longrightarrow> r2 m < r2 n" and lr2:"\<forall>e>0. \<exists>N. \<forall>n\<ge>N. \<bar>(x \<circ> r1) (r2 n) $ k - l2\<bar> < e" |
|
2288 |
using b'[of k] and compact_real_lemma[of "\<lambda>i. ((x \<circ> r1) i)$k" b] by auto |
|
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2289 |
def r \<equiv> "r1 \<circ> r2" have r:"\<forall>m n. m < n \<longrightarrow> r m < r n" unfolding r_def o_def using r1 and r2 by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2290 |
moreover |
30582 | 2291 |
def l \<equiv> "(\<chi> i. if i = k then l2 else l1$i)::real^'a" |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2292 |
{ fix e::real assume "e>0" |
30582 | 2293 |
from lr1 obtain N1 where N1:"\<forall>n\<ge>N1. \<forall>i\<in>d. \<bar>x (r1 n) $ i - l1 $ i\<bar> < e" using `e>0` by blast |
2294 |
from lr2 obtain N2 where N2:"\<forall>n\<ge>N2. \<bar>(x \<circ> r1) (r2 n) $ k - l2\<bar> < e" using `e>0` by blast |
|
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2295 |
{ fix n assume n:"n\<ge> N1 + N2" |
30582 | 2296 |
fix i assume i:"i\<in>(insert k d)" |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2297 |
hence "\<bar>x (r n) $ i - l $ i\<bar> < e" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2298 |
using N2[THEN spec[where x="n"]] and n |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2299 |
using N1[THEN spec[where x="r2 n"]] and n |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2300 |
using monotone_bigger[OF r] and i |
30582 | 2301 |
unfolding l_def and r_def |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2302 |
using monotone_bigger[OF r2, of n] by auto } |
30582 | 2303 |
hence "\<exists>N. \<forall>n\<ge>N. \<forall>i\<in>(insert k d). \<bar>x (r n) $ i - l $ i\<bar> < e" by blast } |
2304 |
ultimately show ?case by auto |
|
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2305 |
qed } |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2306 |
thus ?thesis by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2307 |
qed |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2308 |
|
30582 | 2309 |
lemma bounded_closed_imp_compact: fixes s::"(real^'a::finite) set" |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2310 |
assumes "bounded s" and "closed s" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2311 |
shows "compact s" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2312 |
proof- |
30582 | 2313 |
let ?d = "UNIV::'a set" |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2314 |
{ fix f assume as:"\<forall>n::nat. f n \<in> s" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2315 |
obtain l::"real^'a" and r where r:"\<forall>n m::nat. m < n \<longrightarrow> r m < r n" |
30582 | 2316 |
and lr:"\<forall>e>0. \<exists>N. \<forall>n\<ge>N. \<forall>i\<in>?d. \<bar>f (r n) $ i - l $ i\<bar> < e" |
2317 |
using compact_lemma[OF assms(1) as, THEN spec[where x="?d"]] by auto |
|
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2318 |
{ fix e::real assume "e>0" |
30582 | 2319 |
hence "0 < e / (real_of_nat (card ?d))" using zero_less_card_finite using divide_pos_pos[of e, of "real_of_nat (card ?d)"] by auto |
2320 |
then obtain N::nat where N:"\<forall>n\<ge>N. \<forall>i\<in>?d. \<bar>f (r n) $ i - l $ i\<bar> < e / (real_of_nat (card ?d))" using lr[THEN spec[where x="e / (real_of_nat (card ?d))"]] by blast |
|
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2321 |
{ fix n assume n:"n\<ge>N" |
30582 | 2322 |
hence "finite ?d" "?d \<noteq> {}" by auto |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2323 |
moreover |
30582 | 2324 |
{ fix i assume i:"i \<in> ?d" |
2325 |
hence "\<bar>((f \<circ> r) n - l) $ i\<bar> < e / real_of_nat (card ?d)" using `n\<ge>N` using N[THEN spec[where x=n]] |
|
2326 |
by auto } |
|
2327 |
ultimately have "(\<Sum>i \<in> ?d. \<bar>((f \<circ> r) n - l) $ i\<bar>) |
|
2328 |
< (\<Sum>i \<in> ?d. e / real_of_nat (card ?d))" |
|
2329 |
using setsum_strict_mono[of "?d" "\<lambda>i. \<bar>((f \<circ> r) n - l) $ i\<bar>" "\<lambda>i. e / (real_of_nat (card ?d))"] by auto |
|
2330 |
hence "(\<Sum>i \<in> ?d. \<bar>((f \<circ> r) n - l) $ i\<bar>) < e" unfolding setsum_constant by auto |
|
31289 | 2331 |
hence "dist ((f \<circ> r) n) l < e" unfolding dist_norm using norm_le_l1[of "(f \<circ> r) n - l"] by auto } |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2332 |
hence "\<exists>N. \<forall>n\<ge>N. dist ((f \<circ> r) n) l < e" by auto } |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2333 |
hence *:"((f \<circ> r) ---> l) sequentially" unfolding Lim_sequentially by auto |
30488 | 2334 |
moreover have "l\<in>s" |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2335 |
using assms(2)[unfolded closed_sequential_limits, THEN spec[where x="f \<circ> r"], THEN spec[where x=l]] and * and as by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2336 |
ultimately have "\<exists>l\<in>s. \<exists>r. (\<forall>m n. m < n \<longrightarrow> r m < r n) \<and> ((f \<circ> r) ---> l) sequentially" using r by auto } |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2337 |
thus ?thesis unfolding compact_def by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2338 |
qed |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2339 |
|
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2340 |
subsection{* Completeness. *} |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2341 |
|
31341 | 2342 |
lemma cauchy_def: |
2343 |
"Cauchy s \<longleftrightarrow> (\<forall>e>0. \<exists>N. \<forall>m n. m \<ge> N \<and> n \<ge> N --> dist(s m)(s n) < e)" |
|
2344 |
unfolding Cauchy_def by blast |
|
2345 |
||
2346 |
definition complete_def:"complete s \<longleftrightarrow> (\<forall>f::(nat=>real^'a::finite). (\<forall>n. f n \<in> s) \<and> Cauchy f |
|
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2347 |
--> (\<exists>l \<in> s. (f ---> l) sequentially))" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2348 |
|
31341 | 2349 |
lemma cauchy: "Cauchy s \<longleftrightarrow> (\<forall>e>0.\<exists> N::nat. \<forall>n\<ge>N. dist(s n)(s N) < e)" (is "?lhs = ?rhs") |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2350 |
proof- |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2351 |
{ assume ?rhs |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2352 |
{ fix e::real |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2353 |
assume "e>0" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2354 |
with `?rhs` obtain N where N:"\<forall>n\<ge>N. dist (s n) (s N) < e/2" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2355 |
by (erule_tac x="e/2" in allE) auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2356 |
{ fix n m |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2357 |
assume nm:"N \<le> m \<and> N \<le> n" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2358 |
hence "dist (s m) (s n) < e" using N |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2359 |
using dist_triangle_half_l[of "s m" "s N" "e" "s n"] |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2360 |
by blast |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2361 |
} |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2362 |
hence "\<exists>N. \<forall>m n. N \<le> m \<and> N \<le> n \<longrightarrow> dist (s m) (s n) < e" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2363 |
by blast |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2364 |
} |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2365 |
hence ?lhs |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2366 |
unfolding cauchy_def |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2367 |
by blast |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2368 |
} |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2369 |
thus ?thesis |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2370 |
unfolding cauchy_def |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2371 |
using dist_triangle_half_l |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2372 |
by blast |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2373 |
qed |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2374 |
|
30488 | 2375 |
lemma convergent_imp_cauchy: |
31341 | 2376 |
"(s ---> l) sequentially ==> Cauchy s" |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2377 |
proof(simp only: cauchy_def, rule, rule) |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2378 |
fix e::real assume "e>0" "(s ---> l) sequentially" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2379 |
then obtain N::nat where N:"\<forall>n\<ge>N. dist (s n) l < e/2" unfolding Lim_sequentially by(erule_tac x="e/2" in allE) auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2380 |
thus "\<exists>N. \<forall>m n. N \<le> m \<and> N \<le> n \<longrightarrow> dist (s m) (s n) < e" using dist_triangle_half_l[of _ l e _] by (rule_tac x=N in exI) auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2381 |
qed |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2382 |
|
31341 | 2383 |
lemma cauchy_imp_bounded: assumes "Cauchy s" shows "bounded {y. (\<exists>n::nat. y = s n)}" |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2384 |
proof- |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2385 |
from assms obtain N::nat where "\<forall>m n. N \<le> m \<and> N \<le> n \<longrightarrow> dist (s m) (s n) < 1" unfolding cauchy_def apply(erule_tac x= 1 in allE) by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2386 |
hence N:"\<forall>n. N \<le> n \<longrightarrow> dist (s N) (s n) < 1" by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2387 |
{ fix n::nat assume "n\<ge>N" |
31289 | 2388 |
hence "norm (s n) \<le> norm (s N) + 1" using N apply(erule_tac x=n in allE) unfolding dist_norm |
31344
fc09ec06b89b
instance ^ :: (metric_space, finite) metric_space
huffman
parents:
31343
diff
changeset
|
2389 |
using norm_triangle_sub[of "s N" "s n"] by (auto, metis norm_minus_commute le_add_right_mono norm_triangle_sub real_less_def) |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2390 |
} |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2391 |
hence "\<forall>n\<ge>N. norm (s n) \<le> norm (s N) + 1" by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2392 |
moreover |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2393 |
have "bounded (s ` {0..N})" using finite_imp_bounded[of "s ` {1..N}"] by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2394 |
then obtain a where a:"\<forall>x\<in>s ` {0..N}. norm x \<le> a" unfolding bounded_def by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2395 |
ultimately show "?thesis" unfolding bounded_def |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2396 |
apply(rule_tac x="max a (norm (s N) + 1)" in exI) apply auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2397 |
apply(erule_tac x=n in allE) apply(erule_tac x=n in ballE) by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2398 |
qed |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2399 |
|
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2400 |
lemma compact_imp_complete: assumes "compact s" shows "complete s" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2401 |
proof- |
31341 | 2402 |
{ fix f assume as: "(\<forall>n::nat. f n \<in> s)" "Cauchy f" |
30488 | 2403 |
from as(1) obtain l r where lr: "l\<in>s" "(\<forall>m n. m < n \<longrightarrow> r m < r n)" "((f \<circ> r) ---> l) sequentially" using assms unfolding compact_def by blast |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2404 |
|
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2405 |
{ fix n :: nat have lr':"n \<le> r n" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2406 |
proof (induct n) |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2407 |
show "0 \<le> r 0" using lr(2) by blast |
30488 | 2408 |
next fix na assume "na \<le> r na" moreover have "na < Suc na \<longrightarrow> r na < r (Suc na)" using lr(2) by blast |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2409 |
ultimately show "Suc na \<le> r (Suc na)" by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2410 |
qed } note lr' = this |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2411 |
|
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2412 |
{ fix e::real assume "e>0" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2413 |
from as(2) obtain N where N:"\<forall>m n. N \<le> m \<and> N \<le> n \<longrightarrow> dist (f m) (f n) < e/2" unfolding cauchy_def using `e>0` apply (erule_tac x="e/2" in allE) by auto |
30488 | 2414 |
from lr(3)[unfolded Lim_sequentially, THEN spec[where x="e/2"]] obtain M where M:"\<forall>n\<ge>M. dist ((f \<circ> r) n) l < e/2" using `e>0` by auto |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2415 |
{ fix n::nat assume n:"n \<ge> max N M" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2416 |
have "dist ((f \<circ> r) n) l < e/2" using n M by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2417 |
moreover have "r n \<ge> N" using lr'[of n] n by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2418 |
hence "dist (f n) ((f \<circ> r) n) < e / 2" using N using n by auto |
31285
0a3f9ee4117c
generalize dist function to class real_normed_vector
huffman
parents:
31275
diff
changeset
|
2419 |
ultimately have "dist (f n) l < e" using dist_triangle_half_r[of "f (r n)" "f n" e l] by (auto simp add: dist_commute) } |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2420 |
hence "\<exists>N. \<forall>n\<ge>N. dist (f n) l < e" by blast } |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2421 |
hence "\<exists>l\<in>s. (f ---> l) sequentially" using `l\<in>s` unfolding Lim_sequentially by auto } |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2422 |
thus ?thesis unfolding complete_def by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2423 |
qed |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2424 |
|
30488 | 2425 |
lemma complete_univ: |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2426 |
"complete UNIV" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2427 |
proof(simp add: complete_def, rule, rule) |
31341 | 2428 |
fix f::"nat \<Rightarrow> real^'n::finite" assume "Cauchy f" |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2429 |
hence "bounded (f`UNIV)" using cauchy_imp_bounded[of f] unfolding image_def by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2430 |
hence "compact (closure (f`UNIV))" using bounded_closed_imp_compact[of "closure (range f)"] by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2431 |
hence "complete (closure (range f))" using compact_imp_complete by auto |
31341 | 2432 |
thus "\<exists>l. (f ---> l) sequentially" unfolding complete_def[of "closure (range f)"] using `Cauchy f` unfolding closure_def by auto |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2433 |
qed |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2434 |
|
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2435 |
lemma complete_eq_closed: "complete s \<longleftrightarrow> closed s" (is "?lhs = ?rhs") |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2436 |
proof |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2437 |
assume ?lhs |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2438 |
{ fix x assume "x islimpt s" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2439 |
then obtain f where f:"\<forall>n. f n \<in> s - {x}" "(f ---> x) sequentially" unfolding islimpt_sequential by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2440 |
then obtain l where l: "l\<in>s" "(f ---> l) sequentially" using `?lhs`[unfolded complete_def] using convergent_imp_cauchy[of f x] by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2441 |
hence "x \<in> s" using Lim_unique[of sequentially f l x] trivial_limit_sequentially f(2) by auto } |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2442 |
thus ?rhs unfolding closed_limpt by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2443 |
next |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2444 |
assume ?rhs |
31341 | 2445 |
{ fix f assume as:"\<forall>n::nat. f n \<in> s" "Cauchy f" |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2446 |
then obtain l where "(f ---> l) sequentially" using complete_univ[unfolded complete_def, THEN spec[where x=f]] by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2447 |
hence "\<exists>l\<in>s. (f ---> l) sequentially" using `?rhs`[unfolded closed_sequential_limits, THEN spec[where x=f], THEN spec[where x=l]] using as(1) by auto } |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2448 |
thus ?lhs unfolding complete_def by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2449 |
qed |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2450 |
|
31343
9983f648f9bb
generalize tendsto and related constants to class metric_space
huffman
parents:
31342
diff
changeset
|
2451 |
lemma convergent_eq_cauchy: |
9983f648f9bb
generalize tendsto and related constants to class metric_space
huffman
parents:
31342
diff
changeset
|
2452 |
fixes s :: "nat \<Rightarrow> real ^ 'n::finite" |
31400 | 2453 |
(* FIXME: generalize to complete metric spaces *) |
31343
9983f648f9bb
generalize tendsto and related constants to class metric_space
huffman
parents:
31342
diff
changeset
|
2454 |
shows "(\<exists>l. (s ---> l) sequentially) \<longleftrightarrow> Cauchy s" (is "?lhs = ?rhs") |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2455 |
proof |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2456 |
assume ?lhs then obtain l where "(s ---> l) sequentially" by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2457 |
thus ?rhs using convergent_imp_cauchy by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2458 |
next |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2459 |
assume ?rhs thus ?lhs using complete_univ[unfolded complete_def, THEN spec[where x=s]] by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2460 |
qed |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2461 |
|
31400 | 2462 |
lemma convergent_imp_bounded: |
2463 |
fixes s :: "nat \<Rightarrow> real ^ 'n::finite" (* FIXME: generalize *) |
|
2464 |
shows "(s ---> l) sequentially ==> bounded (s ` (UNIV::(nat set)))" |
|
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2465 |
using convergent_eq_cauchy[of s] |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2466 |
using cauchy_imp_bounded[of s] |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2467 |
unfolding image_def |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2468 |
by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2469 |
|
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2470 |
subsection{* Total boundedness. *} |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2471 |
|
31401 | 2472 |
fun helper_1::"('a::metric_space set) \<Rightarrow> real \<Rightarrow> nat \<Rightarrow> 'a" where |
2473 |
"helper_1 s e n = (SOME y::'a. y \<in> s \<and> (\<forall>m<n. \<not> (dist (helper_1 s e m) y < e)))" |
|
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2474 |
declare helper_1.simps[simp del] |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2475 |
|
30488 | 2476 |
lemma compact_imp_totally_bounded: |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2477 |
assumes "compact s" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2478 |
shows "\<forall>e>0. \<exists>k. finite k \<and> k \<subseteq> s \<and> s \<subseteq> (\<Union>((\<lambda>x. ball x e) ` k))" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2479 |
proof(rule, rule, rule ccontr) |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2480 |
fix e::real assume "e>0" and assm:"\<not> (\<exists>k. finite k \<and> k \<subseteq> s \<and> s \<subseteq> \<Union>(\<lambda>x. ball x e) ` k)" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2481 |
def x \<equiv> "helper_1 s e" |
30488 | 2482 |
{ fix n |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2483 |
have "x n \<in> s \<and> (\<forall>m<n. \<not> dist (x m) (x n) < e)" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2484 |
proof(induct_tac rule:nat_less_induct) |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2485 |
fix n def Q \<equiv> "(\<lambda>y. y \<in> s \<and> (\<forall>m<n. \<not> dist (x m) y < e))" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2486 |
assume as:"\<forall>m<n. x m \<in> s \<and> (\<forall>ma<m. \<not> dist (x ma) (x m) < e)" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2487 |
have "\<not> s \<subseteq> (\<Union>x\<in>x ` {0..<n}. ball x e)" using assm apply simp apply(erule_tac x="x ` {0 ..< n}" in allE) using as by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2488 |
then obtain z where z:"z\<in>s" "z \<notin> (\<Union>x\<in>x ` {0..<n}. ball x e)" unfolding subset_eq by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2489 |
have "Q (x n)" unfolding x_def and helper_1.simps[of s e n] |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2490 |
apply(rule someI2[where a=z]) unfolding x_def[symmetric] and Q_def using z by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2491 |
thus "x n \<in> s \<and> (\<forall>m<n. \<not> dist (x m) (x n) < e)" unfolding Q_def by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2492 |
qed } |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2493 |
hence "\<forall>n::nat. x n \<in> s" and x:"\<forall>n. \<forall>m < n. \<not> (dist (x m) (x n) < e)" by blast+ |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2494 |
then obtain l r where "l\<in>s" and r:"\<forall>m n. m < n \<longrightarrow> r m < r n" and "((x \<circ> r) ---> l) sequentially" using assms(1)[unfolded compact_def, THEN spec[where x=x]] by auto |
31341 | 2495 |
from this(3) have "Cauchy (x \<circ> r)" using convergent_imp_cauchy by auto |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2496 |
then obtain N::nat where N:"\<forall>m n. N \<le> m \<and> N \<le> n \<longrightarrow> dist ((x \<circ> r) m) ((x \<circ> r) n) < e" unfolding cauchy_def using `e>0` by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2497 |
show False |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2498 |
using N[THEN spec[where x=N], THEN spec[where x="N+1"]] |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2499 |
using r[THEN spec[where x=N], THEN spec[where x="N+1"]] |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2500 |
using x[THEN spec[where x="r (N+1)"], THEN spec[where x="r (N)"]] by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2501 |
qed |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2502 |
|
30268 | 2503 |
subsection{* Heine-Borel theorem (following Burkill \& Burkill vol. 2) *} |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2504 |
|
31401 | 2505 |
lemma heine_borel_lemma: fixes s::"'a::metric_space set" |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2506 |
assumes "compact s" "s \<subseteq> (\<Union> t)" "\<forall>b \<in> t. open b" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2507 |
shows "\<exists>e>0. \<forall>x \<in> s. \<exists>b \<in> t. ball x e \<subseteq> b" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2508 |
proof(rule ccontr) |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2509 |
assume "\<not> (\<exists>e>0. \<forall>x\<in>s. \<exists>b\<in>t. ball x e \<subseteq> b)" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2510 |
hence cont:"\<forall>e>0. \<exists>x\<in>s. \<forall>xa\<in>t. \<not> (ball x e \<subseteq> xa)" by auto |
30488 | 2511 |
{ fix n::nat |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2512 |
have "1 / real (n + 1) > 0" by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2513 |
hence "\<exists>x. x\<in>s \<and> (\<forall>xa\<in>t. \<not> (ball x (inverse (real (n+1))) \<subseteq> xa))" using cont unfolding Bex_def by auto } |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2514 |
hence "\<forall>n::nat. \<exists>x. x \<in> s \<and> (\<forall>xa\<in>t. \<not> ball x (inverse (real (n + 1))) \<subseteq> xa)" by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2515 |
then obtain f where f:"\<forall>n::nat. f n \<in> s \<and> (\<forall>xa\<in>t. \<not> ball (f n) (inverse (real (n + 1))) \<subseteq> xa)" |
30488 | 2516 |
using choice[of "\<lambda>n::nat. \<lambda>x. x\<in>s \<and> (\<forall>xa\<in>t. \<not> ball x (inverse (real (n + 1))) \<subseteq> xa)"] by auto |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2517 |
|
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2518 |
then obtain l r where l:"l\<in>s" and r:"\<forall>m n. m < n \<longrightarrow> r m < r n" and lr:"((f \<circ> r) ---> l) sequentially" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2519 |
using assms(1)[unfolded compact_def, THEN spec[where x=f]] by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2520 |
|
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2521 |
obtain b where "l\<in>b" "b\<in>t" using assms(2) and l by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2522 |
then obtain e where "e>0" and e:"\<forall>z. dist z l < e \<longrightarrow> z\<in>b" |
31418
9baa48bad81c
generalize some constants and lemmas to class topological_space
huffman
parents:
31402
diff
changeset
|
2523 |
using assms(3)[THEN bspec[where x=b]] unfolding open_dist by auto |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2524 |
|
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2525 |
then obtain N1 where N1:"\<forall>n\<ge>N1. dist ((f \<circ> r) n) l < e / 2" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2526 |
using lr[unfolded Lim_sequentially, THEN spec[where x="e/2"]] by auto |
30488 | 2527 |
|
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2528 |
obtain N2::nat where N2:"N2>0" "inverse (real N2) < e /2" using real_arch_inv[of "e/2"] and `e>0` by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2529 |
have N2':"inverse (real (r (N1 + N2) +1 )) < e/2" |
30488 | 2530 |
apply(rule order_less_trans) apply(rule less_imp_inverse_less) using N2 |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2531 |
using monotone_bigger[OF r, of "N1 + N2"] by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2532 |
|
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2533 |
def x \<equiv> "(f (r (N1 + N2)))" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2534 |
have x:"\<not> ball x (inverse (real (r (N1 + N2) + 1))) \<subseteq> b" unfolding x_def |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2535 |
using f[THEN spec[where x="r (N1 + N2)"]] using `b\<in>t` by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2536 |
have "\<exists>y\<in>ball x (inverse (real (r (N1 + N2) + 1))). y\<notin>b" apply(rule ccontr) using x by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2537 |
then obtain y where y:"y \<in> ball x (inverse (real (r (N1 + N2) + 1)))" "y \<notin> b" by auto |
30488 | 2538 |
|
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2539 |
have "dist x l < e/2" using N1 unfolding x_def o_def by auto |
31285
0a3f9ee4117c
generalize dist function to class real_normed_vector
huffman
parents:
31275
diff
changeset
|
2540 |
hence "dist y l < e" using y N2' using dist_triangle[of y l x]by (auto simp add:dist_commute) |
30488 | 2541 |
|
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2542 |
thus False using e and `y\<notin>b` by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2543 |
qed |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2544 |
|
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2545 |
lemma compact_imp_heine_borel: "compact s ==> (\<forall>f. (\<forall>t \<in> f. open t) \<and> s \<subseteq> (\<Union> f) |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2546 |
\<longrightarrow> (\<exists>f'. f' \<subseteq> f \<and> finite f' \<and> s \<subseteq> (\<Union> f')))" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2547 |
proof clarify |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2548 |
fix f assume "compact s" " \<forall>t\<in>f. open t" "s \<subseteq> \<Union>f" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2549 |
then obtain e::real where "e>0" and "\<forall>x\<in>s. \<exists>b\<in>f. ball x e \<subseteq> b" using heine_borel_lemma[of s f] by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2550 |
hence "\<forall>x\<in>s. \<exists>b. b\<in>f \<and> ball x e \<subseteq> b" by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2551 |
hence "\<exists>bb. \<forall>x\<in>s. bb x \<in>f \<and> ball x e \<subseteq> bb x" using bchoice[of s "\<lambda>x b. b\<in>f \<and> ball x e \<subseteq> b"] by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2552 |
then obtain bb where bb:"\<forall>x\<in>s. (bb x) \<in> f \<and> ball x e \<subseteq> (bb x)" by blast |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2553 |
|
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2554 |
from `compact s` have "\<exists> k. finite k \<and> k \<subseteq> s \<and> s \<subseteq> \<Union>(\<lambda>x. ball x e) ` k" using compact_imp_totally_bounded[of s] `e>0` by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2555 |
then obtain k where k:"finite k" "k \<subseteq> s" "s \<subseteq> \<Union>(\<lambda>x. ball x e) ` k" by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2556 |
|
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2557 |
have "finite (bb ` k)" using k(1) by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2558 |
moreover |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2559 |
{ fix x assume "x\<in>s" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2560 |
hence "x\<in>\<Union>(\<lambda>x. ball x e) ` k" using k(3) unfolding subset_eq by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2561 |
hence "\<exists>X\<in>bb ` k. x \<in> X" using bb k(2) by blast |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2562 |
hence "x \<in> \<Union>(bb ` k)" using Union_iff[of x "bb ` k"] by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2563 |
} |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2564 |
ultimately show "\<exists>f'\<subseteq>f. finite f' \<and> s \<subseteq> \<Union>f'" using bb k(2) by (rule_tac x="bb ` k" in exI) auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2565 |
qed |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2566 |
|
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2567 |
subsection{* Bolzano-Weierstrass property. *} |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2568 |
|
30488 | 2569 |
lemma heine_borel_imp_bolzano_weierstrass: |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2570 |
assumes "\<forall>f. (\<forall>t \<in> f. open t) \<and> s \<subseteq> (\<Union> f) --> (\<exists>f'. f' \<subseteq> f \<and> finite f' \<and> s \<subseteq> (\<Union> f'))" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2571 |
"infinite t" "t \<subseteq> s" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2572 |
shows "\<exists>x \<in> s. x islimpt t" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2573 |
proof(rule ccontr) |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2574 |
assume "\<not> (\<exists>x \<in> s. x islimpt t)" |
30488 | 2575 |
then obtain f where f:"\<forall>x\<in>s. x \<in> f x \<and> open (f x) \<and> (\<forall>y\<in>t. y \<in> f x \<longrightarrow> y = x)" unfolding islimpt_def |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2576 |
using bchoice[of s "\<lambda> x T. x \<in> T \<and> open T \<and> (\<forall>y\<in>t. y \<in> T \<longrightarrow> y = x)"] by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2577 |
obtain g where g:"g\<subseteq>{t. \<exists>x. x \<in> s \<and> t = f x}" "finite g" "s \<subseteq> \<Union>g" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2578 |
using assms(1)[THEN spec[where x="{t. \<exists>x. x\<in>s \<and> t = f x}"]] using f by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2579 |
from g(1,3) have g':"\<forall>x\<in>g. \<exists>xa \<in> s. x = f xa" by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2580 |
{ fix x y assume "x\<in>t" "y\<in>t" "f x = f y" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2581 |
hence "x \<in> f x" "y \<in> f x \<longrightarrow> y = x" using f[THEN bspec[where x=x]] and `t\<subseteq>s` by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2582 |
hence "x = y" using `f x = f y` and f[THEN bspec[where x=y]] and `y\<in>t` and `t\<subseteq>s` by auto } |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2583 |
hence "infinite (f ` t)" using assms(2) using finite_imageD[unfolded inj_on_def, of f t] by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2584 |
moreover |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2585 |
{ fix x assume "x\<in>t" "f x \<notin> g" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2586 |
from g(3) assms(3) `x\<in>t` obtain h where "h\<in>g" and "x\<in>h" by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2587 |
then obtain y where "y\<in>s" "h = f y" using g'[THEN bspec[where x=h]] by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2588 |
hence "y = x" using f[THEN bspec[where x=y]] and `x\<in>t` and `x\<in>h`[unfolded `h = f y`] by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2589 |
hence False using `f x \<notin> g` `h\<in>g` unfolding `h = f y` by auto } |
30488 | 2590 |
hence "f ` t \<subseteq> g" by auto |
2591 |
ultimately show False using g(2) using finite_subset by auto |
|
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2592 |
qed |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2593 |
|
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2594 |
subsection{* Complete the chain of compactness variants. *} |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2595 |
|
31401 | 2596 |
primrec helper_2::"(real \<Rightarrow> 'a::real_normed_vector) \<Rightarrow> nat \<Rightarrow> 'a" where |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2597 |
"helper_2 beyond 0 = beyond 0" | |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2598 |
"helper_2 beyond (Suc n) = beyond (norm (helper_2 beyond n) + 1 )" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2599 |
|
31401 | 2600 |
lemma bolzano_weierstrass_imp_bounded: fixes s::"'a::real_normed_vector set" |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2601 |
assumes "\<forall>t. infinite t \<and> t \<subseteq> s --> (\<exists>x \<in> s. x islimpt t)" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2602 |
shows "bounded s" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2603 |
proof(rule ccontr) |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2604 |
assume "\<not> bounded s" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2605 |
then obtain beyond where "\<forall>a. beyond a \<in>s \<and> \<not> norm (beyond a) \<le> a" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2606 |
unfolding bounded_def apply simp using choice[of "\<lambda>a x. x\<in>s \<and> \<not> norm x \<le> a"] by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2607 |
hence beyond:"\<And>a. beyond a \<in>s" "\<And>a. norm (beyond a) > a" unfolding linorder_not_le by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2608 |
def x \<equiv> "helper_2 beyond" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2609 |
|
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2610 |
{ fix m n ::nat assume "m<n" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2611 |
hence "norm (x m) + 1 < norm (x n)" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2612 |
proof(induct n) |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2613 |
case 0 thus ?case by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2614 |
next |
30488 | 2615 |
case (Suc n) |
2616 |
have *:"norm (x n) + 1 < norm (x (Suc n))" unfolding x_def and helper_2.simps |
|
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2617 |
using beyond(2)[of "norm (helper_2 beyond n) + 1"] by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2618 |
thus ?case proof(cases "m < n") |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2619 |
case True thus ?thesis using Suc and * by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2620 |
next |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2621 |
case False hence "m = n" using Suc(2) by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2622 |
thus ?thesis using * by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2623 |
qed |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2624 |
qed } note * = this |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2625 |
{ fix m n ::nat assume "m\<noteq>n" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2626 |
have "1 < dist (x m) (x n)" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2627 |
proof(cases "m<n") |
30488 | 2628 |
case True |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2629 |
hence "1 < norm (x n) - norm (x m)" using *[of m n] by auto |
31289 | 2630 |
thus ?thesis unfolding dist_commute[of "x m" "x n"] unfolding dist_norm using norm_triangle_sub[of "x n" "x m"] by auto |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2631 |
next |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2632 |
case False hence "n<m" using `m\<noteq>n` by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2633 |
hence "1 < norm (x m) - norm (x n)" using *[of n m] by auto |
31289 | 2634 |
thus ?thesis unfolding dist_commute[of "x n" "x m"] unfolding dist_norm using norm_triangle_sub[of "x m" "x n"] by auto |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2635 |
qed } note ** = this |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2636 |
{ fix a b assume "x a = x b" "a \<noteq> b" |
31285
0a3f9ee4117c
generalize dist function to class real_normed_vector
huffman
parents:
31275
diff
changeset
|
2637 |
hence False using **[of a b] by auto } |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2638 |
hence "inj x" unfolding inj_on_def by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2639 |
moreover |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2640 |
{ fix n::nat |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2641 |
have "x n \<in> s" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2642 |
proof(cases "n = 0") |
30488 | 2643 |
case True thus ?thesis unfolding x_def using beyond by auto |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2644 |
next |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2645 |
case False then obtain z where "n = Suc z" using not0_implies_Suc by auto |
30488 | 2646 |
thus ?thesis unfolding x_def using beyond by auto |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2647 |
qed } |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2648 |
ultimately have "infinite (range x) \<and> range x \<subseteq> s" unfolding x_def using range_inj_infinite[of "helper_2 beyond"] using beyond(1) by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2649 |
|
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2650 |
then obtain l where "l\<in>s" and l:"l islimpt range x" using assms[THEN spec[where x="range x"]] by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2651 |
then obtain y where "x y \<noteq> l" and y:"dist (x y) l < 1/2" unfolding islimpt_approachable apply(erule_tac x="1/2" in allE) by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2652 |
then obtain z where "x z \<noteq> l" and z:"dist (x z) l < dist (x y) l" using l[unfolded islimpt_approachable, THEN spec[where x="dist (x y) l"]] |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2653 |
unfolding dist_nz by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2654 |
show False using y and z and dist_triangle_half_l[of "x y" l 1 "x z"] and **[of y z] by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2655 |
qed |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2656 |
|
30488 | 2657 |
lemma sequence_infinite_lemma: |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2658 |
assumes "\<forall>n::nat. (f n \<noteq> l)" "(f ---> l) sequentially" |
31401 | 2659 |
shows "infinite {y. (\<exists> n. y = f n)}" |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2660 |
proof(rule ccontr) |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2661 |
let ?A = "(\<lambda>x. dist x l) ` {y. \<exists>n. y = f n}" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2662 |
assume "\<not> infinite {y. \<exists>n. y = f n}" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2663 |
hence **:"finite ?A" "?A \<noteq> {}" by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2664 |
obtain k where k:"dist (f k) l = Min ?A" using Min_in[OF **] by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2665 |
have "0 < Min ?A" using assms(1) unfolding dist_nz unfolding Min_gr_iff[OF **] by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2666 |
then obtain N where "dist (f N) l < Min ?A" using assms(2)[unfolded Lim_sequentially, THEN spec[where x="Min ?A"]] by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2667 |
moreover have "dist (f N) l \<in> ?A" by auto |
30488 | 2668 |
ultimately show False using Min_le[OF **(1), of "dist (f N) l"] by auto |
2669 |
qed |
|
2670 |
||
2671 |
lemma sequence_unique_limpt: |
|
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2672 |
assumes "\<forall>n::nat. (f n \<noteq> l)" "(f ---> l) sequentially" "l' islimpt {y. (\<exists>n. y = f n)}" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2673 |
shows "l' = l" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2674 |
proof(rule ccontr) |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2675 |
def e \<equiv> "dist l' l" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2676 |
assume "l' \<noteq> l" hence "e>0" unfolding dist_nz e_def by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2677 |
then obtain N::nat where N:"\<forall>n\<ge>N. dist (f n) l < e / 2" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2678 |
using assms(2)[unfolded Lim_sequentially, THEN spec[where x="e/2"]] by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2679 |
def d \<equiv> "Min (insert (e/2) ((\<lambda>n. if dist (f n) l' = 0 then e/2 else dist (f n) l') ` {0 .. N}))" |
31285
0a3f9ee4117c
generalize dist function to class real_normed_vector
huffman
parents:
31275
diff
changeset
|
2680 |
have "d>0" using `e>0` unfolding d_def e_def using zero_le_dist[of _ l', unfolded order_le_less] by auto |
30488 | 2681 |
obtain k where k:"f k \<noteq> l'" "dist (f k) l' < d" using `d>0` and assms(3)[unfolded islimpt_approachable, THEN spec[where x="d"]] by auto |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2682 |
have "k\<ge>N" using k(1)[unfolded dist_nz] using k(2)[unfolded d_def] |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2683 |
by force |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2684 |
hence "dist l' l < e" using N[THEN spec[where x=k]] using k(2)[unfolded d_def] and dist_triangle_half_r[of "f k" l' e l] by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2685 |
thus False unfolding e_def by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2686 |
qed |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2687 |
|
30488 | 2688 |
lemma bolzano_weierstrass_imp_closed: |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2689 |
assumes "\<forall>t. infinite t \<and> t \<subseteq> s --> (\<exists>x \<in> s. x islimpt t)" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2690 |
shows "closed s" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2691 |
proof- |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2692 |
{ fix x l assume as: "\<forall>n::nat. x n \<in> s" "(x ---> l) sequentially" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2693 |
hence "l \<in> s" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2694 |
proof(cases "\<forall>n. x n \<noteq> l") |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2695 |
case False thus "l\<in>s" using as(1) by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2696 |
next |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2697 |
case True note cas = this |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2698 |
with as(2) have "infinite {y. \<exists>n. y = x n}" using sequence_infinite_lemma[of x l] by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2699 |
then obtain l' where "l'\<in>s" "l' islimpt {y. \<exists>n. y = x n}" using assms[THEN spec[where x="{y. \<exists>n. y = x n}"]] as(1) by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2700 |
thus "l\<in>s" using sequence_unique_limpt[of x l l'] using as cas by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2701 |
qed } |
31401 | 2702 |
thus ?thesis unfolding closed_sequential_limits by auto (* FIXME: simp_depth_limit exceeded *) |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2703 |
qed |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2704 |
|
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2705 |
text{* Hence express everything as an equivalence. *} |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2706 |
|
31401 | 2707 |
lemma compact_eq_heine_borel: |
2708 |
fixes s :: "(real ^ _) set" |
|
2709 |
shows "compact s \<longleftrightarrow> |
|
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2710 |
(\<forall>f. (\<forall>t \<in> f. open t) \<and> s \<subseteq> (\<Union> f) |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2711 |
--> (\<exists>f'. f' \<subseteq> f \<and> finite f' \<and> s \<subseteq> (\<Union> f')))" (is "?lhs = ?rhs") |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2712 |
proof |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2713 |
assume ?lhs thus ?rhs using compact_imp_heine_borel[of s] by blast |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2714 |
next |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2715 |
assume ?rhs |
31401 | 2716 |
hence "\<forall>t. infinite t \<and> t \<subseteq> s \<longrightarrow> (\<exists>x\<in>s. x islimpt t)" |
2717 |
by (blast intro: heine_borel_imp_bolzano_weierstrass[of s]) |
|
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2718 |
thus ?lhs using bolzano_weierstrass_imp_bounded[of s] bolzano_weierstrass_imp_closed[of s] bounded_closed_imp_compact[of s] by blast |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2719 |
qed |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2720 |
|
30488 | 2721 |
lemma compact_eq_bolzano_weierstrass: |
31401 | 2722 |
fixes s :: "(real ^ _) set" |
2723 |
shows "compact s \<longleftrightarrow> (\<forall>t. infinite t \<and> t \<subseteq> s --> (\<exists>x \<in> s. x islimpt t))" (is "?lhs = ?rhs") |
|
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2724 |
proof |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2725 |
assume ?lhs thus ?rhs unfolding compact_eq_heine_borel using heine_borel_imp_bolzano_weierstrass[of s] by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2726 |
next |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2727 |
assume ?rhs thus ?lhs using bolzano_weierstrass_imp_bounded bolzano_weierstrass_imp_closed bounded_closed_imp_compact by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2728 |
qed |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2729 |
|
30488 | 2730 |
lemma compact_eq_bounded_closed: |
31401 | 2731 |
fixes s :: "(real ^ _) set" |
2732 |
shows "compact s \<longleftrightarrow> bounded s \<and> closed s" (is "?lhs = ?rhs") |
|
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2733 |
proof |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2734 |
assume ?lhs thus ?rhs unfolding compact_eq_bolzano_weierstrass using bolzano_weierstrass_imp_bounded bolzano_weierstrass_imp_closed by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2735 |
next |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2736 |
assume ?rhs thus ?lhs using bounded_closed_imp_compact by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2737 |
qed |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2738 |
|
30488 | 2739 |
lemma compact_imp_bounded: |
31401 | 2740 |
fixes s :: "(real^ _) set" |
2741 |
shows "compact s ==> bounded s" |
|
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2742 |
unfolding compact_eq_bounded_closed |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2743 |
by simp |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2744 |
|
30488 | 2745 |
lemma compact_imp_closed: |
31401 | 2746 |
fixes s :: "(real ^ _) set" |
2747 |
shows "compact s ==> closed s" |
|
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2748 |
unfolding compact_eq_bounded_closed |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2749 |
by simp |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2750 |
|
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2751 |
text{* In particular, some common special cases. *} |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2752 |
|
30488 | 2753 |
lemma compact_empty[simp]: |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2754 |
"compact {}" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2755 |
unfolding compact_def |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2756 |
by simp |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2757 |
|
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2758 |
(* FIXME : Rename *) |
30488 | 2759 |
lemma compact_union[intro]: |
31401 | 2760 |
fixes s t :: "(real ^ _) set" |
2761 |
shows "compact s \<Longrightarrow> compact t ==> compact (s \<union> t)" |
|
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2762 |
unfolding compact_eq_bounded_closed |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2763 |
using bounded_Un[of s t] |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2764 |
using closed_Un[of s t] |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2765 |
by simp |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2766 |
|
30488 | 2767 |
lemma compact_inter[intro]: |
31401 | 2768 |
fixes s t :: "(real ^ _) set" |
2769 |
shows "compact s \<Longrightarrow> compact t ==> compact (s \<inter> t)" |
|
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2770 |
unfolding compact_eq_bounded_closed |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2771 |
using bounded_Int[of s t] |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2772 |
using closed_Int[of s t] |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2773 |
by simp |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2774 |
|
30488 | 2775 |
lemma compact_inter_closed[intro]: |
31401 | 2776 |
fixes s t :: "(real ^ _) set" |
2777 |
shows "compact s \<Longrightarrow> closed t ==> compact (s \<inter> t)" |
|
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2778 |
unfolding compact_eq_bounded_closed |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2779 |
using closed_Int[of s t] |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2780 |
using bounded_subset[of "s \<inter> t" s] |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2781 |
by blast |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2782 |
|
30488 | 2783 |
lemma closed_inter_compact[intro]: |
31401 | 2784 |
fixes s t :: "(real ^ _) set" |
2785 |
shows "closed s \<Longrightarrow> compact t ==> compact (s \<inter> t)" |
|
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2786 |
proof- |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2787 |
assume "closed s" "compact t" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2788 |
moreover |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2789 |
have "s \<inter> t = t \<inter> s" by auto ultimately |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2790 |
show ?thesis |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2791 |
using compact_inter_closed[of t s] |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2792 |
by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2793 |
qed |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2794 |
|
30488 | 2795 |
lemma finite_imp_closed: |
31345
80667d5bee32
generalize topological notions to class metric_space; add class perfect_space
huffman
parents:
31344
diff
changeset
|
2796 |
fixes s :: "(real ^ _) set" (* FIXME: generalize *) |
80667d5bee32
generalize topological notions to class metric_space; add class perfect_space
huffman
parents:
31344
diff
changeset
|
2797 |
shows "finite s ==> closed s" |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2798 |
proof- |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2799 |
assume "finite s" hence "\<not>( \<exists>t. t \<subseteq> s \<and> infinite t)" using finite_subset by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2800 |
thus ?thesis using bolzano_weierstrass_imp_closed[of s] by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2801 |
qed |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2802 |
|
30488 | 2803 |
lemma finite_imp_compact: |
31401 | 2804 |
fixes s :: "(real ^ _) set" |
2805 |
shows "finite s ==> compact s" |
|
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2806 |
unfolding compact_eq_bounded_closed |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2807 |
using finite_imp_closed finite_imp_bounded |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2808 |
by blast |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2809 |
|
31401 | 2810 |
lemma compact_sing [simp]: "compact {a}" |
2811 |
unfolding compact_def o_def |
|
2812 |
by (auto simp add: tendsto_const) |
|
2813 |
||
31418
9baa48bad81c
generalize some constants and lemmas to class topological_space
huffman
parents:
31402
diff
changeset
|
2814 |
lemma closed_sing [simp]: |
9baa48bad81c
generalize some constants and lemmas to class topological_space
huffman
parents:
31402
diff
changeset
|
2815 |
fixes a :: "'a::metric_space" |
9baa48bad81c
generalize some constants and lemmas to class topological_space
huffman
parents:
31402
diff
changeset
|
2816 |
shows "closed {a}" |
9baa48bad81c
generalize some constants and lemmas to class topological_space
huffman
parents:
31402
diff
changeset
|
2817 |
apply (clarsimp simp add: closed_def open_dist) |
31401 | 2818 |
apply (rule ccontr) |
2819 |
apply (drule_tac x="dist x a" in spec) |
|
2820 |
apply (simp add: dist_nz dist_commute) |
|
2821 |
done |
|
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2822 |
|
30488 | 2823 |
lemma compact_cball[simp]: |
31401 | 2824 |
fixes x :: "real ^ _" |
2825 |
shows "compact(cball x e)" |
|
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2826 |
using compact_eq_bounded_closed bounded_cball closed_cball |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2827 |
by blast |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2828 |
|
30488 | 2829 |
lemma compact_frontier_bounded[intro]: |
31401 | 2830 |
fixes s :: "(real ^ _) set" |
2831 |
shows "bounded s ==> compact(frontier s)" |
|
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2832 |
unfolding frontier_def |
30488 | 2833 |
using compact_eq_bounded_closed |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2834 |
by blast |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2835 |
|
30488 | 2836 |
lemma compact_frontier[intro]: |
31401 | 2837 |
fixes s :: "(real ^ _) set" |
2838 |
shows "compact s ==> compact (frontier s)" |
|
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2839 |
using compact_eq_bounded_closed compact_frontier_bounded |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2840 |
by blast |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2841 |
|
30488 | 2842 |
lemma frontier_subset_compact: |
31401 | 2843 |
fixes s :: "(real ^ _) set" |
2844 |
shows "compact s ==> frontier s \<subseteq> s" |
|
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2845 |
using frontier_subset_closed compact_eq_bounded_closed |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2846 |
by blast |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2847 |
|
31418
9baa48bad81c
generalize some constants and lemmas to class topological_space
huffman
parents:
31402
diff
changeset
|
2848 |
lemma open_delete: |
9baa48bad81c
generalize some constants and lemmas to class topological_space
huffman
parents:
31402
diff
changeset
|
2849 |
fixes s :: "'a::metric_space set" |
9baa48bad81c
generalize some constants and lemmas to class topological_space
huffman
parents:
31402
diff
changeset
|
2850 |
shows "open s ==> open(s - {x})" |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2851 |
using open_diff[of s "{x}"] closed_sing |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2852 |
by blast |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2853 |
|
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2854 |
text{* Finite intersection property. I could make it an equivalence in fact. *} |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2855 |
|
30488 | 2856 |
lemma compact_imp_fip: |
31401 | 2857 |
fixes s :: "(real ^ _) set" |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2858 |
assumes "compact s" "\<forall>t \<in> f. closed t" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2859 |
"\<forall>f'. finite f' \<and> f' \<subseteq> f --> (s \<inter> (\<Inter> f') \<noteq> {})" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2860 |
shows "s \<inter> (\<Inter> f) \<noteq> {}" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2861 |
proof |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2862 |
assume as:"s \<inter> (\<Inter> f) = {}" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2863 |
hence "s \<subseteq> \<Union>op - UNIV ` f" by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2864 |
moreover have "Ball (op - UNIV ` f) open" using open_diff closed_diff using assms(2) by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2865 |
ultimately obtain f' where f':"f' \<subseteq> op - UNIV ` f" "finite f'" "s \<subseteq> \<Union>f'" using assms(1)[unfolded compact_eq_heine_borel, THEN spec[where x="(\<lambda>t. UNIV - t) ` f"]] by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2866 |
hence "finite (op - UNIV ` f') \<and> op - UNIV ` f' \<subseteq> f" by(auto simp add: Diff_Diff_Int) |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2867 |
hence "s \<inter> \<Inter>op - UNIV ` f' \<noteq> {}" using assms(3)[THEN spec[where x="op - UNIV ` f'"]] by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2868 |
thus False using f'(3) unfolding subset_eq and Union_iff by blast |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2869 |
qed |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2870 |
|
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2871 |
subsection{* Bounded closed nest property (proof does not use Heine-Borel). *} |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2872 |
|
30488 | 2873 |
lemma bounded_closed_nest: |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2874 |
assumes "\<forall>n. closed(s n)" "\<forall>n. (s n \<noteq> {})" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2875 |
"(\<forall>m n. m \<le> n --> s n \<subseteq> s m)" "bounded(s 0)" |
30582 | 2876 |
shows "\<exists> a::real^'a::finite. \<forall>n::nat. a \<in> s(n)" |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2877 |
proof- |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2878 |
from assms(2) obtain x where x:"\<forall>n::nat. x n \<in> s n" using choice[of "\<lambda>n x. x\<in> s n"] by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2879 |
from assms(4,1) have *:"compact (s 0)" using bounded_closed_imp_compact[of "s 0"] by auto |
30488 | 2880 |
|
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2881 |
then obtain l r where lr:"l\<in>s 0" "\<forall>m n. m < n \<longrightarrow> r m < r n" "((x \<circ> r) ---> l) sequentially" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2882 |
unfolding compact_def apply(erule_tac x=x in allE) using x using assms(3) by blast |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2883 |
|
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2884 |
{ fix n::nat |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2885 |
{ fix e::real assume "e>0" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2886 |
with lr(3) obtain N where N:"\<forall>m\<ge>N. dist ((x \<circ> r) m) l < e" unfolding Lim_sequentially by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2887 |
hence "dist ((x \<circ> r) (max N n)) l < e" by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2888 |
moreover |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2889 |
have "r (max N n) \<ge> n" using lr(2) using monotone_bigger[of r "max N n"] by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2890 |
hence "(x \<circ> r) (max N n) \<in> s n" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2891 |
using x apply(erule_tac x=n in allE) |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2892 |
using x apply(erule_tac x="r (max N n)" in allE) |
30488 | 2893 |
using assms(3) apply(erule_tac x=n in allE)apply( erule_tac x="r (max N n)" in allE) by auto |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2894 |
ultimately have "\<exists>y\<in>s n. dist y l < e" by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2895 |
} |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2896 |
hence "l \<in> s n" using closed_approachable[of "s n" l] assms(1) by blast |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2897 |
} |
30488 | 2898 |
thus ?thesis by auto |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2899 |
qed |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2900 |
|
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2901 |
text{* Decreasing case does not even need compactness, just completeness. *} |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2902 |
|
30488 | 2903 |
lemma decreasing_closed_nest: |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2904 |
assumes "\<forall>n. closed(s n)" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2905 |
"\<forall>n. (s n \<noteq> {})" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2906 |
"\<forall>m n. m \<le> n --> s n \<subseteq> s m" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2907 |
"\<forall>e>0. \<exists>n. \<forall>x \<in> (s n). \<forall> y \<in> (s n). dist x y < e" |
30582 | 2908 |
shows "\<exists>a::real^'a::finite. \<forall>n::nat. a \<in> s n" |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2909 |
proof- |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2910 |
have "\<forall>n. \<exists> x. x\<in>s n" using assms(2) by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2911 |
hence "\<exists>t. \<forall>n. t n \<in> s n" using choice[of "\<lambda> n x. x \<in> s n"] by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2912 |
then obtain t where t: "\<forall>n. t n \<in> s n" by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2913 |
{ fix e::real assume "e>0" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2914 |
then obtain N where N:"\<forall>x\<in>s N. \<forall>y\<in>s N. dist x y < e" using assms(4) by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2915 |
{ fix m n ::nat assume "N \<le> m \<and> N \<le> n" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2916 |
hence "t m \<in> s N" "t n \<in> s N" using assms(3) t unfolding subset_eq t by blast+ |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2917 |
hence "dist (t m) (t n) < e" using N by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2918 |
} |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2919 |
hence "\<exists>N. \<forall>m n. N \<le> m \<and> N \<le> n \<longrightarrow> dist (t m) (t n) < e" by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2920 |
} |
31341 | 2921 |
hence "Cauchy t" unfolding cauchy_def by auto |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2922 |
then obtain l where l:"(t ---> l) sequentially" using complete_univ unfolding complete_def by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2923 |
{ fix n::nat |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2924 |
{ fix e::real assume "e>0" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2925 |
then obtain N::nat where N:"\<forall>n\<ge>N. dist (t n) l < e" using l[unfolded Lim_sequentially] by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2926 |
have "t (max n N) \<in> s n" using assms(3) unfolding subset_eq apply(erule_tac x=n in allE) apply (erule_tac x="max n N" in allE) using t by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2927 |
hence "\<exists>y\<in>s n. dist y l < e" apply(rule_tac x="t (max n N)" in bexI) using N by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2928 |
} |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2929 |
hence "l \<in> s n" using closed_approachable[of "s n" l] assms(1) by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2930 |
} |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2931 |
then show ?thesis by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2932 |
qed |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2933 |
|
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2934 |
text{* Strengthen it to the intersection actually being a singleton. *} |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2935 |
|
30488 | 2936 |
lemma decreasing_closed_nest_sing: |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2937 |
assumes "\<forall>n. closed(s n)" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2938 |
"\<forall>n. s n \<noteq> {}" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2939 |
"\<forall>m n. m \<le> n --> s n \<subseteq> s m" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2940 |
"\<forall>e>0. \<exists>n. \<forall>x \<in> (s n). \<forall> y\<in>(s n). dist x y < e" |
30582 | 2941 |
shows "\<exists>a::real^'a::finite. \<Inter> {t. (\<exists>n::nat. t = s n)} = {a}" |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2942 |
proof- |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2943 |
obtain a where a:"\<forall>n. a \<in> s n" using decreasing_closed_nest[of s] using assms by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2944 |
{ fix b assume b:"b \<in> \<Inter>{t. \<exists>n. t = s n}" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2945 |
{ fix e::real assume "e>0" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2946 |
hence "dist a b < e" using assms(4 )using b using a by blast |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2947 |
} |
31285
0a3f9ee4117c
generalize dist function to class real_normed_vector
huffman
parents:
31275
diff
changeset
|
2948 |
hence "dist a b = 0" by (metis dist_eq_0_iff dist_nz real_less_def) |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2949 |
} |
31285
0a3f9ee4117c
generalize dist function to class real_normed_vector
huffman
parents:
31275
diff
changeset
|
2950 |
with a have "\<Inter>{t. \<exists>n. t = s n} = {a}" by auto |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2951 |
thus ?thesis by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2952 |
qed |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2953 |
|
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2954 |
text{* Cauchy-type criteria for uniform convergence. *} |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2955 |
|
30582 | 2956 |
lemma uniformly_convergent_eq_cauchy: fixes s::"nat \<Rightarrow> 'b \<Rightarrow> real^'a::finite" shows |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2957 |
"(\<exists>l. \<forall>e>0. \<exists>N. \<forall>n x. N \<le> n \<and> P x --> dist(s n x)(l x) < e) \<longleftrightarrow> |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2958 |
(\<forall>e>0. \<exists>N. \<forall>m n x. N \<le> m \<and> N \<le> n \<and> P x --> dist (s m x) (s n x) < e)" (is "?lhs = ?rhs") |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2959 |
proof(rule) |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2960 |
assume ?lhs |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2961 |
then obtain l where l:"\<forall>e>0. \<exists>N. \<forall>n x. N \<le> n \<and> P x \<longrightarrow> dist (s n x) (l x) < e" by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2962 |
{ fix e::real assume "e>0" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2963 |
then obtain N::nat where N:"\<forall>n x. N \<le> n \<and> P x \<longrightarrow> dist (s n x) (l x) < e / 2" using l[THEN spec[where x="e/2"]] by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2964 |
{ fix n m::nat and x::"'b" assume "N \<le> m \<and> N \<le> n \<and> P x" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2965 |
hence "dist (s m x) (s n x) < e" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2966 |
using N[THEN spec[where x=m], THEN spec[where x=x]] |
30488 | 2967 |
using N[THEN spec[where x=n], THEN spec[where x=x]] |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2968 |
using dist_triangle_half_l[of "s m x" "l x" e "s n x"] by auto } |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2969 |
hence "\<exists>N. \<forall>m n x. N \<le> m \<and> N \<le> n \<and> P x --> dist (s m x) (s n x) < e" by auto } |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2970 |
thus ?rhs by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2971 |
next |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2972 |
assume ?rhs |
31341 | 2973 |
hence "\<forall>x. P x \<longrightarrow> Cauchy (\<lambda>n. s n x)" unfolding cauchy_def apply auto by (erule_tac x=e in allE)auto |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2974 |
then obtain l where l:"\<forall>x. P x \<longrightarrow> ((\<lambda>n. s n x) ---> l x) sequentially" unfolding convergent_eq_cauchy[THEN sym] |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2975 |
using choice[of "\<lambda>x l. P x \<longrightarrow> ((\<lambda>n. s n x) ---> l) sequentially"] by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2976 |
{ fix e::real assume "e>0" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2977 |
then obtain N where N:"\<forall>m n x. N \<le> m \<and> N \<le> n \<and> P x \<longrightarrow> dist (s m x) (s n x) < e/2" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2978 |
using `?rhs`[THEN spec[where x="e/2"]] by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2979 |
{ fix x assume "P x" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2980 |
then obtain M where M:"\<forall>n\<ge>M. dist (s n x) (l x) < e/2" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2981 |
using l[THEN spec[where x=x], unfolded Lim_sequentially] using `e>0` by(auto elim!: allE[where x="e/2"]) |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2982 |
fix n::nat assume "n\<ge>N" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2983 |
hence "dist(s n x)(l x) < e" using `P x`and N[THEN spec[where x=n], THEN spec[where x="N+M"], THEN spec[where x=x]] |
31285
0a3f9ee4117c
generalize dist function to class real_normed_vector
huffman
parents:
31275
diff
changeset
|
2984 |
using M[THEN spec[where x="N+M"]] and dist_triangle_half_l[of "s n x" "s (N+M) x" e "l x"] by (auto simp add: dist_commute) } |
30488 | 2985 |
hence "\<exists>N. \<forall>n x. N \<le> n \<and> P x \<longrightarrow> dist(s n x)(l x) < e" by auto } |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2986 |
thus ?lhs by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2987 |
qed |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2988 |
|
30488 | 2989 |
lemma uniformly_cauchy_imp_uniformly_convergent: |
31285
0a3f9ee4117c
generalize dist function to class real_normed_vector
huffman
parents:
31275
diff
changeset
|
2990 |
fixes s :: "nat \<Rightarrow> 'a \<Rightarrow> real ^ 'n::finite" |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2991 |
assumes "\<forall>e>0.\<exists>N. \<forall>m (n::nat) x. N \<le> m \<and> N \<le> n \<and> P x --> dist(s m x)(s n x) < e" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2992 |
"\<forall>x. P x --> (\<forall>e>0. \<exists>N. \<forall>n. N \<le> n --> dist(s n x)(l x) < e)" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2993 |
shows "\<forall>e>0. \<exists>N. \<forall>n x. N \<le> n \<and> P x --> dist(s n x)(l x) < e" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2994 |
proof- |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2995 |
obtain l' where l:"\<forall>e>0. \<exists>N. \<forall>n x. N \<le> n \<and> P x \<longrightarrow> dist (s n x) (l' x) < e" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2996 |
using assms(1) unfolding uniformly_convergent_eq_cauchy[THEN sym] by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2997 |
moreover |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2998 |
{ fix x assume "P x" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
2999 |
hence "l x = l' x" using Lim_unique[OF trivial_limit_sequentially, of "\<lambda>n. s n x" "l x" "l' x"] |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3000 |
using l and assms(2) unfolding Lim_sequentially by blast } |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3001 |
ultimately show ?thesis by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3002 |
qed |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3003 |
|
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3004 |
subsection{* Define continuity over a net to take in restrictions of the set. *} |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3005 |
|
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3006 |
definition "continuous net f \<longleftrightarrow> (f ---> f(netlimit net)) net" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3007 |
|
30488 | 3008 |
lemma continuous_trivial_limit: |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3009 |
"trivial_limit net ==> continuous net f" |
31348 | 3010 |
unfolding continuous_def tendsto_def trivial_limit_eq by auto |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3011 |
|
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3012 |
lemma continuous_within: "continuous (at x within s) f \<longleftrightarrow> (f ---> f(x)) (at x within s)" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3013 |
unfolding continuous_def |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3014 |
unfolding tendsto_def |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3015 |
using netlimit_within[of x s] |
31348 | 3016 |
by (cases "trivial_limit (at x within s)") (auto simp add: trivial_limit_eventually) |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3017 |
|
31346 | 3018 |
lemma continuous_at: "continuous (at x) f \<longleftrightarrow> (f ---> f(x)) (at x)" |
3019 |
using continuous_within [of x UNIV f] by (simp add: within_UNIV) |
|
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3020 |
|
30488 | 3021 |
lemma continuous_at_within: |
31391 | 3022 |
fixes x :: "'a::perfect_space" |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3023 |
assumes "continuous (at x) f" shows "continuous (at x within s) f" |
31391 | 3024 |
(* FIXME: generalize *) |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3025 |
proof(cases "x islimpt s") |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3026 |
case True show ?thesis using assms unfolding continuous_def and netlimit_at |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3027 |
using Lim_at_within[of f "f x" x s] |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3028 |
unfolding netlimit_within[unfolded trivial_limit_within not_not, OF True] by blast |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3029 |
next |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3030 |
case False thus ?thesis unfolding continuous_def and netlimit_at |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3031 |
unfolding Lim and trivial_limit_within by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3032 |
qed |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3033 |
|
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3034 |
text{* Derive the epsilon-delta forms, which we often use as "definitions" *} |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3035 |
|
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3036 |
lemma continuous_within_eps_delta: |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3037 |
"continuous (at x within s) f \<longleftrightarrow> (\<forall>e>0. \<exists>d>0. \<forall>x'\<in> s. dist x' x < d --> dist (f x') (f x) < e)" |
30488 | 3038 |
unfolding continuous_within and Lim_within |
3039 |
apply auto unfolding dist_nz[THEN sym] apply(auto elim!:allE) apply(rule_tac x=d in exI) by auto |
|
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3040 |
|
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3041 |
lemma continuous_at_eps_delta: "continuous (at x) f \<longleftrightarrow> (\<forall>e>0. \<exists>d>0. |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3042 |
\<forall>x'. dist x' x < d --> dist(f x')(f x) < e)" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3043 |
using continuous_within_eps_delta[of x UNIV f] |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3044 |
unfolding within_UNIV by blast |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3045 |
|
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3046 |
text{* Versions in terms of open balls. *} |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3047 |
|
30488 | 3048 |
lemma continuous_within_ball: |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3049 |
"continuous (at x within s) f \<longleftrightarrow> (\<forall>e>0. \<exists>d>0. |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3050 |
f ` (ball x d \<inter> s) \<subseteq> ball (f x) e)" (is "?lhs = ?rhs") |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3051 |
proof |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3052 |
assume ?lhs |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3053 |
{ fix e::real assume "e>0" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3054 |
then obtain d where d: "d>0" "\<forall>xa\<in>s. 0 < dist xa x \<and> dist xa x < d \<longrightarrow> dist (f xa) (f x) < e" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3055 |
using `?lhs`[unfolded continuous_within Lim_within] by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3056 |
{ fix y assume "y\<in>f ` (ball x d \<inter> s)" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3057 |
hence "y \<in> ball (f x) e" using d(2) unfolding dist_nz[THEN sym] |
31285
0a3f9ee4117c
generalize dist function to class real_normed_vector
huffman
parents:
31275
diff
changeset
|
3058 |
apply (auto simp add: dist_commute mem_ball) apply(erule_tac x=xa in ballE) apply auto using `e>0` by auto |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3059 |
} |
31285
0a3f9ee4117c
generalize dist function to class real_normed_vector
huffman
parents:
31275
diff
changeset
|
3060 |
hence "\<exists>d>0. f ` (ball x d \<inter> s) \<subseteq> ball (f x) e" using `d>0` unfolding subset_eq ball_def by (auto simp add: dist_commute) } |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3061 |
thus ?rhs by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3062 |
next |
30488 | 3063 |
assume ?rhs thus ?lhs unfolding continuous_within Lim_within ball_def subset_eq |
31285
0a3f9ee4117c
generalize dist function to class real_normed_vector
huffman
parents:
31275
diff
changeset
|
3064 |
apply (auto simp add: dist_commute) apply(erule_tac x=e in allE) by auto |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3065 |
qed |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3066 |
|
31346 | 3067 |
lemma continuous_at_ball: |
3068 |
"continuous (at x) f \<longleftrightarrow> (\<forall>e>0. \<exists>d>0. f ` (ball x d) \<subseteq> ball (f x) e)" (is "?lhs = ?rhs") |
|
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3069 |
proof |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3070 |
assume ?lhs thus ?rhs unfolding continuous_at Lim_at subset_eq Ball_def Bex_def image_iff mem_ball |
31285
0a3f9ee4117c
generalize dist function to class real_normed_vector
huffman
parents:
31275
diff
changeset
|
3071 |
apply auto apply(erule_tac x=e in allE) apply auto apply(rule_tac x=d in exI) apply auto apply(erule_tac x=xa in allE) apply (auto simp add: dist_commute dist_nz) |
0a3f9ee4117c
generalize dist function to class real_normed_vector
huffman
parents:
31275
diff
changeset
|
3072 |
unfolding dist_nz[THEN sym] by auto |
30488 | 3073 |
next |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3074 |
assume ?rhs thus ?lhs unfolding continuous_at Lim_at subset_eq Ball_def Bex_def image_iff mem_ball |
31285
0a3f9ee4117c
generalize dist function to class real_normed_vector
huffman
parents:
31275
diff
changeset
|
3075 |
apply auto apply(erule_tac x=e in allE) apply auto apply(rule_tac x=d in exI) apply auto apply(erule_tac x="f xa" in allE) by (auto simp add: dist_commute dist_nz) |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3076 |
qed |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3077 |
|
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3078 |
text{* For setwise continuity, just start from the epsilon-delta definitions. *} |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3079 |
|
31285
0a3f9ee4117c
generalize dist function to class real_normed_vector
huffman
parents:
31275
diff
changeset
|
3080 |
definition |
31401 | 3081 |
continuous_on :: "'a::metric_space set \<Rightarrow> ('a \<Rightarrow> 'b::metric_space) \<Rightarrow> bool" where |
31285
0a3f9ee4117c
generalize dist function to class real_normed_vector
huffman
parents:
31275
diff
changeset
|
3082 |
"continuous_on s f \<longleftrightarrow> (\<forall>x \<in> s. \<forall>e>0. \<exists>d::real>0. \<forall>x' \<in> s. dist x' x < d --> dist (f x') (f x) < e)" |
0a3f9ee4117c
generalize dist function to class real_normed_vector
huffman
parents:
31275
diff
changeset
|
3083 |
|
0a3f9ee4117c
generalize dist function to class real_normed_vector
huffman
parents:
31275
diff
changeset
|
3084 |
|
0a3f9ee4117c
generalize dist function to class real_normed_vector
huffman
parents:
31275
diff
changeset
|
3085 |
definition |
0a3f9ee4117c
generalize dist function to class real_normed_vector
huffman
parents:
31275
diff
changeset
|
3086 |
uniformly_continuous_on :: |
31402 | 3087 |
"'a::metric_space set \<Rightarrow> ('a \<Rightarrow> 'b::metric_space) \<Rightarrow> bool" where |
31285
0a3f9ee4117c
generalize dist function to class real_normed_vector
huffman
parents:
31275
diff
changeset
|
3088 |
"uniformly_continuous_on s f \<longleftrightarrow> |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3089 |
(\<forall>e>0. \<exists>d>0. \<forall>x\<in>s. \<forall> x'\<in>s. dist x' x < d |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3090 |
--> dist (f x') (f x) < e)" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3091 |
|
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3092 |
text{* Some simple consequential lemmas. *} |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3093 |
|
30488 | 3094 |
lemma uniformly_continuous_imp_continuous: |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3095 |
" uniformly_continuous_on s f ==> continuous_on s f" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3096 |
unfolding uniformly_continuous_on_def continuous_on_def by blast |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3097 |
|
30488 | 3098 |
lemma continuous_at_imp_continuous_within: |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3099 |
"continuous (at x) f ==> continuous (at x within s) f" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3100 |
unfolding continuous_within continuous_at using Lim_at_within by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3101 |
|
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3102 |
lemma continuous_at_imp_continuous_on: assumes "(\<forall>x \<in> s. continuous (at x) f)" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3103 |
shows "continuous_on s f" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3104 |
proof(simp add: continuous_at continuous_on_def, rule, rule, rule) |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3105 |
fix x and e::real assume "x\<in>s" "e>0" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3106 |
hence "eventually (\<lambda>xa. dist (f xa) (f x) < e) (at x)" using assms unfolding continuous_at tendsto_def by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3107 |
then obtain d where d:"d>0" "\<forall>xa. 0 < dist xa x \<and> dist xa x < d \<longrightarrow> dist (f xa) (f x) < e" unfolding eventually_at by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3108 |
{ fix x' assume "\<not> 0 < dist x' x" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3109 |
hence "x=x'" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3110 |
using dist_nz[of x' x] by auto |
31285
0a3f9ee4117c
generalize dist function to class real_normed_vector
huffman
parents:
31275
diff
changeset
|
3111 |
hence "dist (f x') (f x) < e" using `e>0` by auto |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3112 |
} |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3113 |
thus "\<exists>d>0. \<forall>x'\<in>s. dist x' x < d \<longrightarrow> dist (f x') (f x) < e" using d by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3114 |
qed |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3115 |
|
30488 | 3116 |
lemma continuous_on_eq_continuous_within: |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3117 |
"continuous_on s f \<longleftrightarrow> (\<forall>x \<in> s. continuous (at x within s) f)" (is "?lhs = ?rhs") |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3118 |
proof |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3119 |
assume ?rhs |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3120 |
{ fix x assume "x\<in>s" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3121 |
fix e::real assume "e>0" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3122 |
assume "\<exists>d>0. \<forall>xa\<in>s. 0 < dist xa x \<and> dist xa x < d \<longrightarrow> dist (f xa) (f x) < e" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3123 |
then obtain d where "d>0" and d:"\<forall>xa\<in>s. 0 < dist xa x \<and> dist xa x < d \<longrightarrow> dist (f xa) (f x) < e" by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3124 |
{ fix x' assume as:"x'\<in>s" "dist x' x < d" |
31285
0a3f9ee4117c
generalize dist function to class real_normed_vector
huffman
parents:
31275
diff
changeset
|
3125 |
hence "dist (f x') (f x) < e" using `e>0` d `x'\<in>s` dist_eq_0_iff[of x' x] zero_le_dist[of x' x] as(2) by (metis dist_eq_0_iff dist_nz) } |
0a3f9ee4117c
generalize dist function to class real_normed_vector
huffman
parents:
31275
diff
changeset
|
3126 |
hence "\<exists>d>0. \<forall>x'\<in>s. dist x' x < d \<longrightarrow> dist (f x') (f x) < e" using `d>0` by auto |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3127 |
} |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3128 |
thus ?lhs using `?rhs` unfolding continuous_on_def continuous_within Lim_within by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3129 |
next |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3130 |
assume ?lhs |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3131 |
thus ?rhs unfolding continuous_on_def continuous_within Lim_within by blast |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3132 |
qed |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3133 |
|
30488 | 3134 |
lemma continuous_on: |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3135 |
"continuous_on s f \<longleftrightarrow> (\<forall>x \<in> s. (f ---> f(x)) (at x within s))" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3136 |
by (auto simp add: continuous_on_eq_continuous_within continuous_within) |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3137 |
|
30488 | 3138 |
lemma continuous_on_eq_continuous_at: |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3139 |
"open s ==> (continuous_on s f \<longleftrightarrow> (\<forall>x \<in> s. continuous (at x) f))" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3140 |
by (auto simp add: continuous_on continuous_at Lim_within_open) |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3141 |
|
30488 | 3142 |
lemma continuous_within_subset: |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3143 |
"continuous (at x within s) f \<Longrightarrow> t \<subseteq> s |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3144 |
==> continuous (at x within t) f" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3145 |
unfolding continuous_within by(metis Lim_within_subset) |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3146 |
|
30488 | 3147 |
lemma continuous_on_subset: |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3148 |
"continuous_on s f \<Longrightarrow> t \<subseteq> s ==> continuous_on t f" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3149 |
unfolding continuous_on by (metis subset_eq Lim_within_subset) |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3150 |
|
30488 | 3151 |
lemma continuous_on_interior: |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3152 |
"continuous_on s f \<Longrightarrow> x \<in> interior s ==> continuous (at x) f" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3153 |
unfolding interior_def |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3154 |
apply simp |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3155 |
by (meson continuous_on_eq_continuous_at continuous_on_subset) |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3156 |
|
30488 | 3157 |
lemma continuous_on_eq: |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3158 |
"(\<forall>x \<in> s. f x = g x) \<Longrightarrow> continuous_on s f |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3159 |
==> continuous_on s g" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3160 |
by (simp add: continuous_on_def) |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3161 |
|
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3162 |
text{* Characterization of various kinds of continuity in terms of sequences. *} |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3163 |
|
30488 | 3164 |
lemma continuous_within_sequentially: |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3165 |
"continuous (at a within s) f \<longleftrightarrow> |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3166 |
(\<forall>x. (\<forall>n::nat. x n \<in> s) \<and> (x ---> a) sequentially |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3167 |
--> ((f o x) ---> f a) sequentially)" (is "?lhs = ?rhs") |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3168 |
proof |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3169 |
assume ?lhs |
31346 | 3170 |
{ fix x::"nat \<Rightarrow> 'a" assume x:"\<forall>n. x n \<in> s" "\<forall>e>0. \<exists>N. \<forall>n\<ge>N. dist (x n) a < e" |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3171 |
fix e::real assume "e>0" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3172 |
from `?lhs` obtain d where "d>0" and d:"\<forall>x\<in>s. 0 < dist x a \<and> dist x a < d \<longrightarrow> dist (f x) (f a) < e" unfolding continuous_within Lim_within using `e>0` by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3173 |
from x(2) `d>0` obtain N where N:"\<forall>n\<ge>N. dist (x n) a < d" by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3174 |
hence "\<exists>N. \<forall>n\<ge>N. dist ((f \<circ> x) n) (f a) < e" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3175 |
apply(rule_tac x=N in exI) using N d apply auto using x(1) |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3176 |
apply(erule_tac x=n in allE) apply(erule_tac x=n in allE) |
31285
0a3f9ee4117c
generalize dist function to class real_normed_vector
huffman
parents:
31275
diff
changeset
|
3177 |
apply(erule_tac x="x n" in ballE) apply auto unfolding dist_nz[THEN sym] apply auto using `e>0` by auto |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3178 |
} |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3179 |
thus ?rhs unfolding continuous_within unfolding Lim_sequentially by simp |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3180 |
next |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3181 |
assume ?rhs |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3182 |
{ fix e::real assume "e>0" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3183 |
assume "\<not> (\<exists>d>0. \<forall>x\<in>s. 0 < dist x a \<and> dist x a < d \<longrightarrow> dist (f x) (f a) < e)" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3184 |
hence "\<forall>d. \<exists>x. d>0 \<longrightarrow> x\<in>s \<and> (0 < dist x a \<and> dist x a < d \<and> \<not> dist (f x) (f a) < e)" by blast |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3185 |
then obtain x where x:"\<forall>d>0. x d \<in> s \<and> (0 < dist (x d) a \<and> dist (x d) a < d \<and> \<not> dist (f (x d)) (f a) < e)" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3186 |
using choice[of "\<lambda>d x.0<d \<longrightarrow> x\<in>s \<and> (0 < dist x a \<and> dist x a < d \<and> \<not> dist (f x) (f a) < e)"] by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3187 |
{ fix d::real assume "d>0" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3188 |
hence "\<exists>N::nat. inverse (real (N + 1)) < d" using real_arch_inv[of d] by (auto, rule_tac x="n - 1" in exI)auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3189 |
then obtain N::nat where N:"inverse (real (N + 1)) < d" by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3190 |
{ fix n::nat assume n:"n\<ge>N" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3191 |
hence "dist (x (inverse (real (n + 1)))) a < inverse (real (n + 1))" using x[THEN spec[where x="inverse (real (n + 1))"]] by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3192 |
moreover have "inverse (real (n + 1)) < d" using N n by (auto, metis Suc_le_mono le_SucE less_imp_inverse_less nat_le_real_less order_less_trans real_of_nat_Suc real_of_nat_Suc_gt_zero) |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3193 |
ultimately have "dist (x (inverse (real (n + 1)))) a < d" by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3194 |
} |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3195 |
hence "\<exists>N::nat. \<forall>n\<ge>N. dist (x (inverse (real (n + 1)))) a < d" by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3196 |
} |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3197 |
hence "(\<forall>n::nat. x (inverse (real (n + 1))) \<in> s) \<and> (\<forall>e>0. \<exists>N::nat. \<forall>n\<ge>N. dist (x (inverse (real (n + 1)))) a < e)" using x by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3198 |
hence "\<forall>e>0. \<exists>N::nat. \<forall>n\<ge>N. dist (f (x (inverse (real (n + 1))))) (f a) < e" using `?rhs`[THEN spec[where x="\<lambda>n::nat. x (inverse (real (n+1)))"], unfolded Lim_sequentially] by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3199 |
hence "False" apply(erule_tac x=e in allE) using `e>0` using x by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3200 |
} |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3201 |
thus ?lhs unfolding continuous_within unfolding Lim_within unfolding Lim_sequentially by blast |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3202 |
qed |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3203 |
|
30488 | 3204 |
lemma continuous_at_sequentially: |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3205 |
"continuous (at a) f \<longleftrightarrow> (\<forall>x. (x ---> a) sequentially |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3206 |
--> ((f o x) ---> f a) sequentially)" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3207 |
using continuous_within_sequentially[of a UNIV f] unfolding within_UNIV by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3208 |
|
30488 | 3209 |
lemma continuous_on_sequentially: |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3210 |
"continuous_on s f \<longleftrightarrow> (\<forall>x. \<forall>a \<in> s. (\<forall>n. x(n) \<in> s) \<and> (x ---> a) sequentially |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3211 |
--> ((f o x) ---> f(a)) sequentially)" (is "?lhs = ?rhs") |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3212 |
proof |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3213 |
assume ?rhs thus ?lhs using continuous_within_sequentially[of _ s f] unfolding continuous_on_eq_continuous_within by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3214 |
next |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3215 |
assume ?lhs thus ?rhs unfolding continuous_on_eq_continuous_within using continuous_within_sequentially[of _ s f] by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3216 |
qed |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3217 |
|
30488 | 3218 |
lemma uniformly_continuous_on_sequentially: |
31402 | 3219 |
fixes f :: "'a::real_normed_vector \<Rightarrow> 'b::real_normed_vector" |
3220 |
shows "uniformly_continuous_on s f \<longleftrightarrow> (\<forall>x y. (\<forall>n. x n \<in> s) \<and> (\<forall>n. y n \<in> s) \<and> |
|
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3221 |
((\<lambda>n. x n - y n) ---> 0) sequentially |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3222 |
\<longrightarrow> ((\<lambda>n. f(x n) - f(y n)) ---> 0) sequentially)" (is "?lhs = ?rhs") |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3223 |
proof |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3224 |
assume ?lhs |
30488 | 3225 |
{ fix x y assume x:"\<forall>n. x n \<in> s" and y:"\<forall>n. y n \<in> s" and xy:"((\<lambda>n. x n - y n) ---> 0) sequentially" |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3226 |
{ fix e::real assume "e>0" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3227 |
then obtain d where "d>0" and d:"\<forall>x\<in>s. \<forall>x'\<in>s. dist x' x < d \<longrightarrow> dist (f x') (f x) < e" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3228 |
using `?lhs`[unfolded uniformly_continuous_on_def, THEN spec[where x=e]] by auto |
31289 | 3229 |
obtain N where N:"\<forall>n\<ge>N. norm (x n - y n - 0) < d" using xy[unfolded Lim_sequentially dist_norm] and `d>0` by auto |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3230 |
{ fix n assume "n\<ge>N" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3231 |
hence "norm (f (x n) - f (y n) - 0) < e" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3232 |
using N[THEN spec[where x=n]] using d[THEN bspec[where x="x n"], THEN bspec[where x="y n"]] using x and y |
31289 | 3233 |
unfolding dist_commute and dist_norm by simp } |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3234 |
hence "\<exists>N. \<forall>n\<ge>N. norm (f (x n) - f (y n) - 0) < e" by auto } |
31289 | 3235 |
hence "((\<lambda>n. f(x n) - f(y n)) ---> 0) sequentially" unfolding Lim_sequentially and dist_norm by auto } |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3236 |
thus ?rhs by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3237 |
next |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3238 |
assume ?rhs |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3239 |
{ assume "\<not> ?lhs" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3240 |
then obtain e where "e>0" "\<forall>d>0. \<exists>x\<in>s. \<exists>x'\<in>s. dist x' x < d \<and> \<not> dist (f x') (f x) < e" unfolding uniformly_continuous_on_def by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3241 |
then obtain fa where fa:"\<forall>x. 0 < x \<longrightarrow> fst (fa x) \<in> s \<and> snd (fa x) \<in> s \<and> dist (fst (fa x)) (snd (fa x)) < x \<and> \<not> dist (f (fst (fa x))) (f (snd (fa x))) < e" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3242 |
using choice[of "\<lambda>d x. d>0 \<longrightarrow> fst x \<in> s \<and> snd x \<in> s \<and> dist (snd x) (fst x) < d \<and> \<not> dist (f (snd x)) (f (fst x)) < e"] unfolding Bex_def |
31285
0a3f9ee4117c
generalize dist function to class real_normed_vector
huffman
parents:
31275
diff
changeset
|
3243 |
by (auto simp add: dist_commute) |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3244 |
def x \<equiv> "\<lambda>n::nat. fst (fa (inverse (real n + 1)))" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3245 |
def y \<equiv> "\<lambda>n::nat. snd (fa (inverse (real n + 1)))" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3246 |
have xyn:"\<forall>n. x n \<in> s \<and> y n \<in> s" and xy0:"\<forall>n. dist (x n) (y n) < inverse (real n + 1)" and fxy:"\<forall>n. \<not> dist (f (x n)) (f (y n)) < e" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3247 |
unfolding x_def and y_def using fa by auto |
31402 | 3248 |
have 1:"\<And>(x::'a) y. dist (x - y) 0 = dist x y" unfolding dist_norm by auto |
3249 |
have 2:"\<And>(x::'b) y. dist (x - y) 0 = dist x y" unfolding dist_norm by auto |
|
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3250 |
{ fix e::real assume "e>0" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3251 |
then obtain N::nat where "N \<noteq> 0" and N:"0 < inverse (real N) \<and> inverse (real N) < e" unfolding real_arch_inv[of e] by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3252 |
{ fix n::nat assume "n\<ge>N" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3253 |
hence "inverse (real n + 1) < inverse (real N)" using real_of_nat_ge_zero and `N\<noteq>0` by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3254 |
also have "\<dots> < e" using N by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3255 |
finally have "inverse (real n + 1) < e" by auto |
31402 | 3256 |
hence "dist (x n - y n) 0 < e" unfolding 1 using xy0[THEN spec[where x=n]] by auto } |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3257 |
hence "\<exists>N. \<forall>n\<ge>N. dist (x n - y n) 0 < e" by auto } |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3258 |
hence "\<forall>e>0. \<exists>N. \<forall>n\<ge>N. dist (f (x n) - f (y n)) 0 < e" using `?rhs`[THEN spec[where x=x], THEN spec[where x=y]] and xyn unfolding Lim_sequentially by auto |
31402 | 3259 |
hence False unfolding 2 using fxy and `e>0` by auto } |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3260 |
thus ?lhs unfolding uniformly_continuous_on_def by blast |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3261 |
qed |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3262 |
|
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3263 |
text{* The usual transformation theorems. *} |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3264 |
|
30488 | 3265 |
lemma continuous_transform_within: |
31402 | 3266 |
fixes f g :: "'a::metric_space \<Rightarrow> 'b::metric_space" |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3267 |
assumes "0 < d" "x \<in> s" "\<forall>x' \<in> s. dist x' x < d --> f x' = g x'" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3268 |
"continuous (at x within s) f" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3269 |
shows "continuous (at x within s) g" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3270 |
proof- |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3271 |
{ fix e::real assume "e>0" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3272 |
then obtain d' where d':"d'>0" "\<forall>xa\<in>s. 0 < dist xa x \<and> dist xa x < d' \<longrightarrow> dist (f xa) (f x) < e" using assms(4) unfolding continuous_within Lim_within by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3273 |
{ fix x' assume "x'\<in>s" "0 < dist x' x" "dist x' x < (min d d')" |
31285
0a3f9ee4117c
generalize dist function to class real_normed_vector
huffman
parents:
31275
diff
changeset
|
3274 |
hence "dist (f x') (g x) < e" using assms(2,3) apply(erule_tac x=x in ballE) using d' by auto } |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3275 |
hence "\<forall>xa\<in>s. 0 < dist xa x \<and> dist xa x < (min d d') \<longrightarrow> dist (f xa) (g x) < e" by blast |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3276 |
hence "\<exists>d>0. \<forall>xa\<in>s. 0 < dist xa x \<and> dist xa x < d \<longrightarrow> dist (f xa) (g x) < e" using `d>0` `d'>0` by(rule_tac x="min d d'" in exI)auto } |
30488 | 3277 |
hence "(f ---> g x) (at x within s)" unfolding Lim_within using assms(1) by auto |
3278 |
thus ?thesis unfolding continuous_within using Lim_transform_within[of d s x f g "g x"] using assms by blast |
|
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3279 |
qed |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3280 |
|
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3281 |
lemma continuous_transform_at: |
31402 | 3282 |
fixes f g :: "'a::metric_space \<Rightarrow> 'b::metric_space" |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3283 |
assumes "0 < d" "\<forall>x'. dist x' x < d --> f x' = g x'" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3284 |
"continuous (at x) f" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3285 |
shows "continuous (at x) g" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3286 |
proof- |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3287 |
{ fix e::real assume "e>0" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3288 |
then obtain d' where d':"d'>0" "\<forall>xa. 0 < dist xa x \<and> dist xa x < d' \<longrightarrow> dist (f xa) (f x) < e" using assms(3) unfolding continuous_at Lim_at by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3289 |
{ fix x' assume "0 < dist x' x" "dist x' x < (min d d')" |
31285
0a3f9ee4117c
generalize dist function to class real_normed_vector
huffman
parents:
31275
diff
changeset
|
3290 |
hence "dist (f x') (g x) < e" using assms(2) apply(erule_tac x=x in allE) using d' by auto |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3291 |
} |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3292 |
hence "\<forall>xa. 0 < dist xa x \<and> dist xa x < (min d d') \<longrightarrow> dist (f xa) (g x) < e" by blast |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3293 |
hence "\<exists>d>0. \<forall>xa. 0 < dist xa x \<and> dist xa x < d \<longrightarrow> dist (f xa) (g x) < e" using `d>0` `d'>0` by(rule_tac x="min d d'" in exI)auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3294 |
} |
30488 | 3295 |
hence "(f ---> g x) (at x)" unfolding Lim_at using assms(1) by auto |
3296 |
thus ?thesis unfolding continuous_at using Lim_transform_at[of d x f g "g x"] using assms by blast |
|
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3297 |
qed |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3298 |
|
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3299 |
text{* Combination results for pointwise continuity. *} |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3300 |
|
31390 | 3301 |
lemma continuous_const: "continuous net (\<lambda>x. c)" |
31343
9983f648f9bb
generalize tendsto and related constants to class metric_space
huffman
parents:
31342
diff
changeset
|
3302 |
by (auto simp add: continuous_def Lim_const) |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3303 |
|
30488 | 3304 |
lemma continuous_cmul: |
31390 | 3305 |
fixes f :: "'a::metric_space \<Rightarrow> real ^ 'n::finite" |
31343
9983f648f9bb
generalize tendsto and related constants to class metric_space
huffman
parents:
31342
diff
changeset
|
3306 |
shows "continuous net f ==> continuous net (\<lambda>x. c *s f x)" |
9983f648f9bb
generalize tendsto and related constants to class metric_space
huffman
parents:
31342
diff
changeset
|
3307 |
by (auto simp add: continuous_def Lim_cmul) |
30488 | 3308 |
|
3309 |
lemma continuous_neg: |
|
31390 | 3310 |
fixes f :: "'a::metric_space \<Rightarrow> 'b::real_normed_vector" |
31343
9983f648f9bb
generalize tendsto and related constants to class metric_space
huffman
parents:
31342
diff
changeset
|
3311 |
shows "continuous net f ==> continuous net (\<lambda>x. -(f x))" |
9983f648f9bb
generalize tendsto and related constants to class metric_space
huffman
parents:
31342
diff
changeset
|
3312 |
by (auto simp add: continuous_def Lim_neg) |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3313 |
|
30488 | 3314 |
lemma continuous_add: |
31390 | 3315 |
fixes f g :: "'a::metric_space \<Rightarrow> 'b::real_normed_vector" |
31343
9983f648f9bb
generalize tendsto and related constants to class metric_space
huffman
parents:
31342
diff
changeset
|
3316 |
shows "continuous net f \<Longrightarrow> continuous net g \<Longrightarrow> continuous net (\<lambda>x. f x + g x)" |
9983f648f9bb
generalize tendsto and related constants to class metric_space
huffman
parents:
31342
diff
changeset
|
3317 |
by (auto simp add: continuous_def Lim_add) |
30488 | 3318 |
|
3319 |
lemma continuous_sub: |
|
31390 | 3320 |
fixes f g :: "'a::metric_space \<Rightarrow> 'b::real_normed_vector" |
31343
9983f648f9bb
generalize tendsto and related constants to class metric_space
huffman
parents:
31342
diff
changeset
|
3321 |
shows "continuous net f \<Longrightarrow> continuous net g \<Longrightarrow> continuous net (\<lambda>x. f x - g x)" |
9983f648f9bb
generalize tendsto and related constants to class metric_space
huffman
parents:
31342
diff
changeset
|
3322 |
by (auto simp add: continuous_def Lim_sub) |
30488 | 3323 |
|
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3324 |
text{* Same thing for setwise continuity. *} |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3325 |
|
30488 | 3326 |
lemma continuous_on_const: |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3327 |
"continuous_on s (\<lambda>x. c)" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3328 |
unfolding continuous_on_eq_continuous_within using continuous_const by blast |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3329 |
|
30488 | 3330 |
lemma continuous_on_cmul: |
31401 | 3331 |
fixes f :: "'a::metric_space \<Rightarrow> real ^ _" |
3332 |
shows "continuous_on s f ==> continuous_on s (\<lambda>x. c *s (f x))" |
|
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3333 |
unfolding continuous_on_eq_continuous_within using continuous_cmul by blast |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3334 |
|
30488 | 3335 |
lemma continuous_on_neg: |
31401 | 3336 |
fixes f :: "'a::metric_space \<Rightarrow> 'b::real_normed_vector" |
3337 |
shows "continuous_on s f \<Longrightarrow> continuous_on s (\<lambda>x. - f x)" |
|
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3338 |
unfolding continuous_on_eq_continuous_within using continuous_neg by blast |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3339 |
|
30488 | 3340 |
lemma continuous_on_add: |
31401 | 3341 |
fixes f g :: "'a::metric_space \<Rightarrow> 'b::real_normed_vector" |
3342 |
shows "continuous_on s f \<Longrightarrow> continuous_on s g |
|
3343 |
\<Longrightarrow> continuous_on s (\<lambda>x. f x + g x)" |
|
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3344 |
unfolding continuous_on_eq_continuous_within using continuous_add by blast |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3345 |
|
30488 | 3346 |
lemma continuous_on_sub: |
31401 | 3347 |
fixes f g :: "'a::metric_space \<Rightarrow> 'b::real_normed_vector" |
3348 |
shows "continuous_on s f \<Longrightarrow> continuous_on s g |
|
3349 |
\<Longrightarrow> continuous_on s (\<lambda>x. f x - g x)" |
|
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3350 |
unfolding continuous_on_eq_continuous_within using continuous_sub by blast |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3351 |
|
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3352 |
text{* Same thing for uniform continuity, using sequential formulations. *} |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3353 |
|
30488 | 3354 |
lemma uniformly_continuous_on_const: |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3355 |
"uniformly_continuous_on s (\<lambda>x. c)" |
31402 | 3356 |
unfolding uniformly_continuous_on_def by simp |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3357 |
|
30488 | 3358 |
lemma uniformly_continuous_on_cmul: |
31402 | 3359 |
fixes f :: "'a::real_normed_vector \<Rightarrow> real ^ _" |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3360 |
assumes "uniformly_continuous_on s f" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3361 |
shows "uniformly_continuous_on s (\<lambda>x. c *s f(x))" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3362 |
proof- |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3363 |
{ fix x y assume "((\<lambda>n. f (x n) - f (y n)) ---> 0) sequentially" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3364 |
hence "((\<lambda>n. c *s f (x n) - c *s f (y n)) ---> 0) sequentially" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3365 |
using Lim_cmul[of "(\<lambda>n. f (x n) - f (y n))" 0 sequentially c] |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3366 |
unfolding vector_smult_rzero vector_ssub_ldistrib[of c] by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3367 |
} |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3368 |
thus ?thesis using assms unfolding uniformly_continuous_on_sequentially by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3369 |
qed |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3370 |
|
30488 | 3371 |
lemma uniformly_continuous_on_neg: |
31402 | 3372 |
fixes f :: "'a::real_normed_vector \<Rightarrow> real ^ _" (* FIXME: generalize *) |
3373 |
shows "uniformly_continuous_on s f |
|
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3374 |
==> uniformly_continuous_on s (\<lambda>x. -(f x))" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3375 |
using uniformly_continuous_on_cmul[of s f "-1"] unfolding pth_3 by auto |
30488 | 3376 |
|
3377 |
lemma uniformly_continuous_on_add: |
|
31402 | 3378 |
fixes f g :: "'a::real_normed_vector \<Rightarrow> 'b::real_normed_vector" |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3379 |
assumes "uniformly_continuous_on s f" "uniformly_continuous_on s g" |
31402 | 3380 |
shows "uniformly_continuous_on s (\<lambda>x. f x + g x)" |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3381 |
proof- |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3382 |
{ fix x y assume "((\<lambda>n. f (x n) - f (y n)) ---> 0) sequentially" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3383 |
"((\<lambda>n. g (x n) - g (y n)) ---> 0) sequentially" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3384 |
hence "((\<lambda>xa. f (x xa) - f (y xa) + (g (x xa) - g (y xa))) ---> 0 + 0) sequentially" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3385 |
using Lim_add[of "\<lambda> n. f (x n) - f (y n)" 0 sequentially "\<lambda> n. g (x n) - g (y n)" 0] by auto |
31402 | 3386 |
hence "((\<lambda>n. f (x n) + g (x n) - (f (y n) + g (y n))) ---> 0) sequentially" unfolding Lim_sequentially and add_diff_add [symmetric] by auto } |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3387 |
thus ?thesis using assms unfolding uniformly_continuous_on_sequentially by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3388 |
qed |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3389 |
|
30488 | 3390 |
lemma uniformly_continuous_on_sub: |
31402 | 3391 |
fixes f :: "'a::real_normed_vector \<Rightarrow> real ^ _" (* FIXME: generalize *) |
3392 |
shows "uniformly_continuous_on s f \<Longrightarrow> uniformly_continuous_on s g |
|
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3393 |
==> uniformly_continuous_on s (\<lambda>x. f x - g x)" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3394 |
unfolding ab_diff_minus |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3395 |
using uniformly_continuous_on_add[of s f "\<lambda>x. - g x"] |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3396 |
using uniformly_continuous_on_neg[of s g] by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3397 |
|
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3398 |
text{* Identity function is continuous in every sense. *} |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3399 |
|
30488 | 3400 |
lemma continuous_within_id: |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3401 |
"continuous (at a within s) (\<lambda>x. x)" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3402 |
unfolding continuous_within Lim_within by auto |
30488 | 3403 |
|
3404 |
lemma continuous_at_id: |
|
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3405 |
"continuous (at a) (\<lambda>x. x)" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3406 |
unfolding continuous_at Lim_at by auto |
30488 | 3407 |
|
3408 |
lemma continuous_on_id: |
|
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3409 |
"continuous_on s (\<lambda>x. x)" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3410 |
unfolding continuous_on Lim_within by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3411 |
|
30488 | 3412 |
lemma uniformly_continuous_on_id: |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3413 |
"uniformly_continuous_on s (\<lambda>x. x)" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3414 |
unfolding uniformly_continuous_on_def by auto |
30488 | 3415 |
|
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3416 |
text{* Continuity of all kinds is preserved under composition. *} |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3417 |
|
30488 | 3418 |
lemma continuous_within_compose: |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3419 |
assumes "continuous (at x within s) f" "continuous (at (f x) within f ` s) g" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3420 |
shows "continuous (at x within s) (g o f)" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3421 |
proof- |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3422 |
{ fix e::real assume "e>0" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3423 |
with assms(2)[unfolded continuous_within Lim_within] obtain d where "d>0" and d:"\<forall>xa\<in>f ` s. 0 < dist xa (f x) \<and> dist xa (f x) < d \<longrightarrow> dist (g xa) (g (f x)) < e" by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3424 |
from assms(1)[unfolded continuous_within Lim_within] obtain d' where "d'>0" and d':"\<forall>xa\<in>s. 0 < dist xa x \<and> dist xa x < d' \<longrightarrow> dist (f xa) (f x) < d" using `d>0` by auto |
30488 | 3425 |
{ fix y assume as:"y\<in>s" "0 < dist y x" "dist y x < d'" |
31285
0a3f9ee4117c
generalize dist function to class real_normed_vector
huffman
parents:
31275
diff
changeset
|
3426 |
hence "dist (f y) (f x) < d" using d'[THEN bspec[where x=y]] by (auto simp add:dist_commute) |
0a3f9ee4117c
generalize dist function to class real_normed_vector
huffman
parents:
31275
diff
changeset
|
3427 |
hence "dist (g (f y)) (g (f x)) < e" using as(1) d[THEN bspec[where x="f y"]] unfolding dist_nz[THEN sym] using `e>0` by auto } |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3428 |
hence "\<exists>d>0. \<forall>xa\<in>s. 0 < dist xa x \<and> dist xa x < d \<longrightarrow> dist (g (f xa)) (g (f x)) < e" using `d'>0` by auto } |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3429 |
thus ?thesis unfolding continuous_within Lim_within by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3430 |
qed |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3431 |
|
30488 | 3432 |
lemma continuous_at_compose: |
3433 |
assumes "continuous (at x) f" "continuous (at (f x)) g" |
|
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3434 |
shows "continuous (at x) (g o f)" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3435 |
proof- |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3436 |
have " continuous (at (f x) within range f) g" using assms(2) using continuous_within_subset[of "f x" UNIV g "range f", unfolded within_UNIV] by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3437 |
thus ?thesis using assms(1) using continuous_within_compose[of x UNIV f g, unfolded within_UNIV] by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3438 |
qed |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3439 |
|
30488 | 3440 |
lemma continuous_on_compose: |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3441 |
"continuous_on s f \<Longrightarrow> continuous_on (f ` s) g \<Longrightarrow> continuous_on s (g o f)" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3442 |
unfolding continuous_on_eq_continuous_within using continuous_within_compose[of _ s f g] by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3443 |
|
30488 | 3444 |
lemma uniformly_continuous_on_compose: |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3445 |
assumes "uniformly_continuous_on s f" "uniformly_continuous_on (f ` s) g" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3446 |
shows "uniformly_continuous_on s (g o f)" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3447 |
proof- |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3448 |
{ fix e::real assume "e>0" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3449 |
then obtain d where "d>0" and d:"\<forall>x\<in>f ` s. \<forall>x'\<in>f ` s. dist x' x < d \<longrightarrow> dist (g x') (g x) < e" using assms(2) unfolding uniformly_continuous_on_def by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3450 |
obtain d' where "d'>0" "\<forall>x\<in>s. \<forall>x'\<in>s. dist x' x < d' \<longrightarrow> dist (f x') (f x) < d" using `d>0` using assms(1) unfolding uniformly_continuous_on_def by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3451 |
hence "\<exists>d>0. \<forall>x\<in>s. \<forall>x'\<in>s. dist x' x < d \<longrightarrow> dist ((g \<circ> f) x') ((g \<circ> f) x) < e" using `d>0` using d by auto } |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3452 |
thus ?thesis using assms unfolding uniformly_continuous_on_def by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3453 |
qed |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3454 |
|
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3455 |
text{* Continuity in terms of open preimages. *} |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3456 |
|
30488 | 3457 |
lemma continuous_at_open: |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3458 |
"continuous (at x) f \<longleftrightarrow> (\<forall>t. open t \<and> f x \<in> t --> (\<exists>s. open s \<and> x \<in> s \<and> (\<forall>x' \<in> s. (f x') \<in> t)))" (is "?lhs = ?rhs") |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3459 |
proof |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3460 |
assume ?lhs |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3461 |
{ fix t assume as: "open t" "f x \<in> t" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3462 |
then obtain e where "e>0" and e:"ball (f x) e \<subseteq> t" unfolding open_contains_ball by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3463 |
|
31418
9baa48bad81c
generalize some constants and lemmas to class topological_space
huffman
parents:
31402
diff
changeset
|
3464 |
obtain d where "d>0" and d:"\<forall>y. 0 < dist y x \<and> dist y x < d \<longrightarrow> dist (f y) (f x) < e" using `e>0` using `?lhs`[unfolded continuous_at Lim_at open_dist] by auto |
30488 | 3465 |
|
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3466 |
have "open (ball x d)" using open_ball by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3467 |
moreover have "x \<in> ball x d" unfolding centre_in_ball using `d>0` by simp |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3468 |
moreover |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3469 |
{ fix x' assume "x'\<in>ball x d" hence "f x' \<in> t" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3470 |
using e[unfolded subset_eq Ball_def mem_ball, THEN spec[where x="f x'"]] d[THEN spec[where x=x']] |
31285
0a3f9ee4117c
generalize dist function to class real_normed_vector
huffman
parents:
31275
diff
changeset
|
3471 |
unfolding mem_ball apply (auto simp add: dist_commute) |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3472 |
unfolding dist_nz[THEN sym] using as(2) by auto } |
30488 | 3473 |
hence "\<forall>x'\<in>ball x d. f x' \<in> t" by auto |
3474 |
ultimately have "\<exists>s. open s \<and> x \<in> s \<and> (\<forall>x'\<in>s. f x' \<in> t)" |
|
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3475 |
apply(rule_tac x="ball x d" in exI) by simp } |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3476 |
thus ?rhs by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3477 |
next |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3478 |
assume ?rhs |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3479 |
{ fix e::real assume "e>0" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3480 |
then obtain s where s: "open s" "x \<in> s" "\<forall>x'\<in>s. f x' \<in> ball (f x) e" using `?rhs`[unfolded continuous_at Lim_at, THEN spec[where x="ball (f x) e"]] |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3481 |
unfolding centre_in_ball[of "f x" e, THEN sym] by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3482 |
then obtain d where "d>0" and d:"ball x d \<subseteq> s" unfolding open_contains_ball by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3483 |
{ fix y assume "0 < dist y x \<and> dist y x < d" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3484 |
hence "dist (f y) (f x) < e" using d[unfolded subset_eq Ball_def mem_ball, THEN spec[where x=y]] |
31285
0a3f9ee4117c
generalize dist function to class real_normed_vector
huffman
parents:
31275
diff
changeset
|
3485 |
using s(3)[THEN bspec[where x=y], unfolded mem_ball] by (auto simp add: dist_commute) } |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3486 |
hence "\<exists>d>0. \<forall>xa. 0 < dist xa x \<and> dist xa x < d \<longrightarrow> dist (f xa) (f x) < e" using `d>0` by auto } |
30488 | 3487 |
thus ?lhs unfolding continuous_at Lim_at by auto |
3488 |
qed |
|
3489 |
||
3490 |
lemma continuous_on_open: |
|
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3491 |
"continuous_on s f \<longleftrightarrow> |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3492 |
(\<forall>t. openin (subtopology euclidean (f ` s)) t |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3493 |
--> openin (subtopology euclidean s) {x \<in> s. f x \<in> t})" (is "?lhs = ?rhs") |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3494 |
proof |
30488 | 3495 |
assume ?lhs |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3496 |
{ fix t assume as:"openin (subtopology euclidean (f ` s)) t" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3497 |
have "{x \<in> s. f x \<in> t} \<subseteq> s" using as[unfolded openin_euclidean_subtopology_iff] by auto |
30488 | 3498 |
moreover |
3499 |
{ fix x assume as':"x\<in>{x \<in> s. f x \<in> t}" |
|
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3500 |
then obtain e where e: "e>0" "\<forall>x'\<in>f ` s. dist x' (f x) < e \<longrightarrow> x' \<in> t" using as[unfolded openin_euclidean_subtopology_iff, THEN conjunct2, THEN bspec[where x="f x"]] by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3501 |
from this(1) obtain d where d: "d>0" "\<forall>xa\<in>s. 0 < dist xa x \<and> dist xa x < d \<longrightarrow> dist (f xa) (f x) < e" using `?lhs`[unfolded continuous_on Lim_within, THEN bspec[where x=x]] using as' by auto |
31285
0a3f9ee4117c
generalize dist function to class real_normed_vector
huffman
parents:
31275
diff
changeset
|
3502 |
have "\<exists>e>0. \<forall>x'\<in>s. dist x' x < e \<longrightarrow> x' \<in> {x \<in> s. f x \<in> t}" using d e unfolding dist_nz[THEN sym] by (rule_tac x=d in exI, auto) } |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3503 |
ultimately have "openin (subtopology euclidean s) {x \<in> s. f x \<in> t}" unfolding openin_euclidean_subtopology_iff by auto } |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3504 |
thus ?rhs unfolding continuous_on Lim_within using openin by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3505 |
next |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3506 |
assume ?rhs |
30488 | 3507 |
{ fix e::real and x assume "x\<in>s" "e>0" |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3508 |
{ fix xa x' assume "dist (f xa) (f x) < e" "xa \<in> s" "x' \<in> s" "dist (f xa) (f x') < e - dist (f xa) (f x)" |
30488 | 3509 |
hence "dist (f x') (f x) < e" using dist_triangle[of "f x'" "f x" "f xa"] |
31285
0a3f9ee4117c
generalize dist function to class real_normed_vector
huffman
parents:
31275
diff
changeset
|
3510 |
by (auto simp add: dist_commute) } |
30488 | 3511 |
hence "ball (f x) e \<inter> f ` s \<subseteq> f ` s \<and> (\<forall>xa\<in>ball (f x) e \<inter> f ` s. \<exists>ea>0. \<forall>x'\<in>f ` s. dist x' xa < ea \<longrightarrow> x' \<in> ball (f x) e \<inter> f ` s)" apply auto |
31285
0a3f9ee4117c
generalize dist function to class real_normed_vector
huffman
parents:
31275
diff
changeset
|
3512 |
apply(rule_tac x="e - dist (f xa) (f x)" in exI) using `e>0` by (auto simp add: dist_commute) |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3513 |
hence "\<forall>xa\<in>{xa \<in> s. f xa \<in> ball (f x) e \<inter> f ` s}. \<exists>ea>0. \<forall>x'\<in>s. dist x' xa < ea \<longrightarrow> x' \<in> {xa \<in> s. f xa \<in> ball (f x) e \<inter> f ` s}" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3514 |
using `?rhs`[unfolded openin_euclidean_subtopology_iff, THEN spec[where x="ball (f x) e \<inter> f ` s"]] by auto |
31285
0a3f9ee4117c
generalize dist function to class real_normed_vector
huffman
parents:
31275
diff
changeset
|
3515 |
hence "\<exists>d>0. \<forall>xa\<in>s. 0 < dist xa x \<and> dist xa x < d \<longrightarrow> dist (f xa) (f x) < e" apply(erule_tac x=x in ballE) apply auto using `e>0` `x\<in>s` by (auto simp add: dist_commute) } |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3516 |
thus ?lhs unfolding continuous_on Lim_within by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3517 |
qed |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3518 |
|
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3519 |
(* ------------------------------------------------------------------------- *) |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3520 |
(* Similarly in terms of closed sets. *) |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3521 |
(* ------------------------------------------------------------------------- *) |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3522 |
|
30488 | 3523 |
lemma continuous_on_closed: |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3524 |
"continuous_on s f \<longleftrightarrow> (\<forall>t. closedin (subtopology euclidean (f ` s)) t --> closedin (subtopology euclidean s) {x \<in> s. f x \<in> t})" (is "?lhs = ?rhs") |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3525 |
proof |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3526 |
assume ?lhs |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3527 |
{ fix t |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3528 |
have *:"s - {x \<in> s. f x \<in> f ` s - t} = {x \<in> s. f x \<in> t}" by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3529 |
have **:"f ` s - (f ` s - (f ` s - t)) = f ` s - t" by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3530 |
assume as:"closedin (subtopology euclidean (f ` s)) t" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3531 |
hence "closedin (subtopology euclidean (f ` s)) (f ` s - (f ` s - t))" unfolding closedin_def topspace_euclidean_subtopology unfolding ** by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3532 |
hence "closedin (subtopology euclidean s) {x \<in> s. f x \<in> t}" using `?lhs`[unfolded continuous_on_open, THEN spec[where x="(f ` s) - t"]] |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3533 |
unfolding openin_closedin_eq topspace_euclidean_subtopology unfolding * by auto } |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3534 |
thus ?rhs by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3535 |
next |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3536 |
assume ?rhs |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3537 |
{ fix t |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3538 |
have *:"s - {x \<in> s. f x \<in> f ` s - t} = {x \<in> s. f x \<in> t}" by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3539 |
assume as:"openin (subtopology euclidean (f ` s)) t" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3540 |
hence "openin (subtopology euclidean s) {x \<in> s. f x \<in> t}" using `?rhs`[THEN spec[where x="(f ` s) - t"]] |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3541 |
unfolding openin_closedin_eq topspace_euclidean_subtopology *[THEN sym] closedin_subtopology by auto } |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3542 |
thus ?lhs unfolding continuous_on_open by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3543 |
qed |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3544 |
|
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3545 |
text{* Half-global and completely global cases. *} |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3546 |
|
30488 | 3547 |
lemma continuous_open_in_preimage: |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3548 |
assumes "continuous_on s f" "open t" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3549 |
shows "openin (subtopology euclidean s) {x \<in> s. f x \<in> t}" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3550 |
proof- |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3551 |
have *:"\<forall>x. x \<in> s \<and> f x \<in> t \<longleftrightarrow> x \<in> s \<and> f x \<in> (t \<inter> f ` s)" by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3552 |
have "openin (subtopology euclidean (f ` s)) (t \<inter> f ` s)" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3553 |
using openin_open_Int[of t "f ` s", OF assms(2)] unfolding openin_open by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3554 |
thus ?thesis using assms(1)[unfolded continuous_on_open, THEN spec[where x="t \<inter> f ` s"]] using * by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3555 |
qed |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3556 |
|
30488 | 3557 |
lemma continuous_closed_in_preimage: |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3558 |
assumes "continuous_on s f" "closed t" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3559 |
shows "closedin (subtopology euclidean s) {x \<in> s. f x \<in> t}" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3560 |
proof- |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3561 |
have *:"\<forall>x. x \<in> s \<and> f x \<in> t \<longleftrightarrow> x \<in> s \<and> f x \<in> (t \<inter> f ` s)" by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3562 |
have "closedin (subtopology euclidean (f ` s)) (t \<inter> f ` s)" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3563 |
using closedin_closed_Int[of t "f ` s", OF assms(2)] unfolding Int_commute by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3564 |
thus ?thesis |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3565 |
using assms(1)[unfolded continuous_on_closed, THEN spec[where x="t \<inter> f ` s"]] using * by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3566 |
qed |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3567 |
|
30488 | 3568 |
lemma continuous_open_preimage: |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3569 |
assumes "continuous_on s f" "open s" "open t" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3570 |
shows "open {x \<in> s. f x \<in> t}" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3571 |
proof- |
30488 | 3572 |
obtain T where T: "open T" "{x \<in> s. f x \<in> t} = s \<inter> T" |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3573 |
using continuous_open_in_preimage[OF assms(1,3)] unfolding openin_open by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3574 |
thus ?thesis using open_inter[of s T, OF assms(2)] by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3575 |
qed |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3576 |
|
30488 | 3577 |
lemma continuous_closed_preimage: |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3578 |
assumes "continuous_on s f" "closed s" "closed t" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3579 |
shows "closed {x \<in> s. f x \<in> t}" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3580 |
proof- |
30488 | 3581 |
obtain T where T: "closed T" "{x \<in> s. f x \<in> t} = s \<inter> T" |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3582 |
using continuous_closed_in_preimage[OF assms(1,3)] unfolding closedin_closed by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3583 |
thus ?thesis using closed_Int[of s T, OF assms(2)] by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3584 |
qed |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3585 |
|
30488 | 3586 |
lemma continuous_open_preimage_univ: |
31345
80667d5bee32
generalize topological notions to class metric_space; add class perfect_space
huffman
parents:
31344
diff
changeset
|
3587 |
fixes f :: "real ^ _ \<Rightarrow> real ^ _" (* FIXME: generalize *) |
80667d5bee32
generalize topological notions to class metric_space; add class perfect_space
huffman
parents:
31344
diff
changeset
|
3588 |
shows "\<forall>x. continuous (at x) f \<Longrightarrow> open s \<Longrightarrow> open {x. f x \<in> s}" |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3589 |
using continuous_open_preimage[of UNIV f s] open_UNIV continuous_at_imp_continuous_on by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3590 |
|
30488 | 3591 |
lemma continuous_closed_preimage_univ: |
31345
80667d5bee32
generalize topological notions to class metric_space; add class perfect_space
huffman
parents:
31344
diff
changeset
|
3592 |
fixes f :: "real ^ _ \<Rightarrow> real ^ _" (* FIXME: generalize *) |
80667d5bee32
generalize topological notions to class metric_space; add class perfect_space
huffman
parents:
31344
diff
changeset
|
3593 |
shows "(\<forall>x. continuous (at x) f) \<Longrightarrow> closed s ==> closed {x. f x \<in> s}" |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3594 |
using continuous_closed_preimage[of UNIV f s] closed_UNIV continuous_at_imp_continuous_on by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3595 |
|
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3596 |
text{* Equality of continuous functions on closure and related results. *} |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3597 |
|
30488 | 3598 |
lemma continuous_closed_in_preimage_constant: |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3599 |
"continuous_on s f ==> closedin (subtopology euclidean s) {x \<in> s. f x = a}" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3600 |
using continuous_closed_in_preimage[of s f "{a}"] closed_sing by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3601 |
|
30488 | 3602 |
lemma continuous_closed_preimage_constant: |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3603 |
"continuous_on s f \<Longrightarrow> closed s ==> closed {x \<in> s. f x = a}" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3604 |
using continuous_closed_preimage[of s f "{a}"] closed_sing by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3605 |
|
30488 | 3606 |
lemma continuous_constant_on_closure: |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3607 |
assumes "continuous_on (closure s) f" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3608 |
"\<forall>x \<in> s. f x = a" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3609 |
shows "\<forall>x \<in> (closure s). f x = a" |
30488 | 3610 |
using continuous_closed_preimage_constant[of "closure s" f a] |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3611 |
assms closure_minimal[of s "{x \<in> closure s. f x = a}"] closure_subset unfolding subset_eq by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3612 |
|
30488 | 3613 |
lemma image_closure_subset: |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3614 |
assumes "continuous_on (closure s) f" "closed t" "(f ` s) \<subseteq> t" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3615 |
shows "f ` (closure s) \<subseteq> t" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3616 |
proof- |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3617 |
have "s \<subseteq> {x \<in> closure s. f x \<in> t}" using assms(3) closure_subset by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3618 |
moreover have "closed {x \<in> closure s. f x \<in> t}" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3619 |
using continuous_closed_preimage[OF assms(1)] and assms(2) by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3620 |
ultimately have "closure s = {x \<in> closure s . f x \<in> t}" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3621 |
using closure_minimal[of s "{x \<in> closure s. f x \<in> t}"] by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3622 |
thus ?thesis by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3623 |
qed |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3624 |
|
30488 | 3625 |
lemma continuous_on_closure_norm_le: |
31401 | 3626 |
fixes f :: "'a::metric_space \<Rightarrow> 'b::real_normed_vector" |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3627 |
assumes "continuous_on (closure s) f" "\<forall>y \<in> s. norm(f y) \<le> b" "x \<in> (closure s)" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3628 |
shows "norm(f x) \<le> b" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3629 |
proof- |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3630 |
have *:"f ` s \<subseteq> cball 0 b" using assms(2)[unfolded mem_cball_0[THEN sym]] by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3631 |
show ?thesis |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3632 |
using image_closure_subset[OF assms(1) closed_cball[of 0 b] *] assms(3) |
31289 | 3633 |
unfolding subset_eq apply(erule_tac x="f x" in ballE) by (auto simp add: dist_norm) |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3634 |
qed |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3635 |
|
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3636 |
text{* Making a continuous function avoid some value in a neighbourhood. *} |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3637 |
|
30488 | 3638 |
lemma continuous_within_avoid: |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3639 |
assumes "continuous (at x within s) f" "x \<in> s" "f x \<noteq> a" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3640 |
shows "\<exists>e>0. \<forall>y \<in> s. dist x y < e --> f y \<noteq> a" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3641 |
proof- |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3642 |
obtain d where "d>0" and d:"\<forall>xa\<in>s. 0 < dist xa x \<and> dist xa x < d \<longrightarrow> dist (f xa) (f x) < dist (f x) a" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3643 |
using assms(1)[unfolded continuous_within Lim_within, THEN spec[where x="dist (f x) a"]] assms(3)[unfolded dist_nz] by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3644 |
{ fix y assume " y\<in>s" "dist x y < d" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3645 |
hence "f y \<noteq> a" using d[THEN bspec[where x=y]] assms(3)[unfolded dist_nz] |
31285
0a3f9ee4117c
generalize dist function to class real_normed_vector
huffman
parents:
31275
diff
changeset
|
3646 |
apply auto unfolding dist_nz[THEN sym] by (auto simp add: dist_commute) } |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3647 |
thus ?thesis using `d>0` by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3648 |
qed |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3649 |
|
30488 | 3650 |
lemma continuous_at_avoid: |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3651 |
assumes "continuous (at x) f" "f x \<noteq> a" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3652 |
shows "\<exists>e>0. \<forall>y. dist x y < e \<longrightarrow> f y \<noteq> a" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3653 |
using assms using continuous_within_avoid[of x UNIV f a, unfolded within_UNIV] by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3654 |
|
30488 | 3655 |
lemma continuous_on_avoid: |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3656 |
assumes "continuous_on s f" "x \<in> s" "f x \<noteq> a" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3657 |
shows "\<exists>e>0. \<forall>y \<in> s. dist x y < e \<longrightarrow> f y \<noteq> a" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3658 |
using assms(1)[unfolded continuous_on_eq_continuous_within, THEN bspec[where x=x], OF assms(2)] continuous_within_avoid[of x s f a] assms(2,3) by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3659 |
|
30488 | 3660 |
lemma continuous_on_open_avoid: |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3661 |
assumes "continuous_on s f" "open s" "x \<in> s" "f x \<noteq> a" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3662 |
shows "\<exists>e>0. \<forall>y. dist x y < e \<longrightarrow> f y \<noteq> a" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3663 |
using assms(1)[unfolded continuous_on_eq_continuous_at[OF assms(2)], THEN bspec[where x=x], OF assms(3)] continuous_at_avoid[of x f a] assms(3,4) by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3664 |
|
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3665 |
text{* Proving a function is constant by proving open-ness of level set. *} |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3666 |
|
30488 | 3667 |
lemma continuous_levelset_open_in_cases: |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3668 |
"connected s \<Longrightarrow> continuous_on s f \<Longrightarrow> |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3669 |
openin (subtopology euclidean s) {x \<in> s. f x = a} |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3670 |
==> (\<forall>x \<in> s. f x \<noteq> a) \<or> (\<forall>x \<in> s. f x = a)" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3671 |
unfolding connected_clopen using continuous_closed_in_preimage_constant by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3672 |
|
30488 | 3673 |
lemma continuous_levelset_open_in: |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3674 |
"connected s \<Longrightarrow> continuous_on s f \<Longrightarrow> |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3675 |
openin (subtopology euclidean s) {x \<in> s. f x = a} \<Longrightarrow> |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3676 |
(\<exists>x \<in> s. f x = a) ==> (\<forall>x \<in> s. f x = a)" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3677 |
using continuous_levelset_open_in_cases[of s f ] |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3678 |
by meson |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3679 |
|
30488 | 3680 |
lemma continuous_levelset_open: |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3681 |
assumes "connected s" "continuous_on s f" "open {x \<in> s. f x = a}" "\<exists>x \<in> s. f x = a" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3682 |
shows "\<forall>x \<in> s. f x = a" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3683 |
using continuous_levelset_open_in[OF assms(1,2), of a, unfolded openin_open] using assms (3,4) by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3684 |
|
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3685 |
text{* Some arithmetical combinations (more to prove). *} |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3686 |
|
30488 | 3687 |
lemma open_scaling[intro]: |
31345
80667d5bee32
generalize topological notions to class metric_space; add class perfect_space
huffman
parents:
31344
diff
changeset
|
3688 |
fixes s :: "(real ^ _) set" |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3689 |
assumes "c \<noteq> 0" "open s" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3690 |
shows "open((\<lambda>x. c *s x) ` s)" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3691 |
proof- |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3692 |
{ fix x assume "x \<in> s" |
31418
9baa48bad81c
generalize some constants and lemmas to class topological_space
huffman
parents:
31402
diff
changeset
|
3693 |
then obtain e where "e>0" and e:"\<forall>x'. dist x' x < e \<longrightarrow> x' \<in> s" using assms(2)[unfolded open_dist, THEN bspec[where x=x]] by auto |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3694 |
have "e * abs c > 0" using assms(1)[unfolded zero_less_abs_iff[THEN sym]] using real_mult_order[OF `e>0`] by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3695 |
moreover |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3696 |
{ fix y assume "dist y (c *s x) < e * \<bar>c\<bar>" |
31289 | 3697 |
hence "norm ((1 / c) *s y - x) < e" unfolding dist_norm |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3698 |
using norm_mul[of c "(1 / c) *s y - x", unfolded vector_ssub_ldistrib, unfolded vector_smult_assoc] assms(1) |
30649
57753e0ec1d4
1. New cancellation simprocs for common factors in inequations
nipkow
parents:
30582
diff
changeset
|
3699 |
assms(1)[unfolded zero_less_abs_iff[THEN sym]] by (simp del:zero_less_abs_iff) |
31289 | 3700 |
hence "y \<in> op *s c ` s" using rev_image_eqI[of "(1 / c) *s y" s y "op *s c"] e[THEN spec[where x="(1 / c) *s y"]] assms(1) unfolding dist_norm vector_smult_assoc by auto } |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3701 |
ultimately have "\<exists>e>0. \<forall>x'. dist x' (c *s x) < e \<longrightarrow> x' \<in> op *s c ` s" apply(rule_tac x="e * abs c" in exI) by auto } |
31418
9baa48bad81c
generalize some constants and lemmas to class topological_space
huffman
parents:
31402
diff
changeset
|
3702 |
thus ?thesis unfolding open_dist by auto |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3703 |
qed |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3704 |
|
30488 | 3705 |
lemma open_negations: |
31345
80667d5bee32
generalize topological notions to class metric_space; add class perfect_space
huffman
parents:
31344
diff
changeset
|
3706 |
fixes s :: "(real ^ _) set" (* FIXME: generalize *) |
80667d5bee32
generalize topological notions to class metric_space; add class perfect_space
huffman
parents:
31344
diff
changeset
|
3707 |
shows "open s ==> open ((\<lambda> x. -x) ` s)" unfolding pth_3 by auto |
30488 | 3708 |
|
3709 |
lemma open_translation: |
|
31345
80667d5bee32
generalize topological notions to class metric_space; add class perfect_space
huffman
parents:
31344
diff
changeset
|
3710 |
fixes s :: "(real ^ _) set" (* FIXME: generalize *) |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3711 |
assumes "open s" shows "open((\<lambda>x. a + x) ` s)" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3712 |
proof- |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3713 |
{ fix x have "continuous (at x) (\<lambda>x. x - a)" using continuous_sub[of "at x" "\<lambda>x. x" "\<lambda>x. a"] continuous_at_id[of x] continuous_const[of "at x" a] by auto } |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3714 |
moreover have "{x. x - a \<in> s} = op + a ` s" apply auto unfolding image_iff apply(rule_tac x="x - a" in bexI) by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3715 |
ultimately show ?thesis using continuous_open_preimage_univ[of "\<lambda>x. x - a" s] using assms by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3716 |
qed |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3717 |
|
30488 | 3718 |
lemma open_affinity: |
31345
80667d5bee32
generalize topological notions to class metric_space; add class perfect_space
huffman
parents:
31344
diff
changeset
|
3719 |
fixes s :: "(real ^ _) set" |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3720 |
assumes "open s" "c \<noteq> 0" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3721 |
shows "open ((\<lambda>x. a + c *s x) ` s)" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3722 |
proof- |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3723 |
have *:"(\<lambda>x. a + c *s x) = (\<lambda>x. a + x) \<circ> (\<lambda>x. c *s x)" unfolding o_def .. |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3724 |
have "op + a ` op *s c ` s = (op + a \<circ> op *s c) ` s" by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3725 |
thus ?thesis using assms open_translation[of "op *s c ` s" a] unfolding * by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3726 |
qed |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3727 |
|
31345
80667d5bee32
generalize topological notions to class metric_space; add class perfect_space
huffman
parents:
31344
diff
changeset
|
3728 |
lemma interior_translation: |
80667d5bee32
generalize topological notions to class metric_space; add class perfect_space
huffman
parents:
31344
diff
changeset
|
3729 |
fixes s :: "'a::real_normed_vector set" |
80667d5bee32
generalize topological notions to class metric_space; add class perfect_space
huffman
parents:
31344
diff
changeset
|
3730 |
shows "interior ((\<lambda>x. a + x) ` s) = (\<lambda>x. a + x) ` (interior s)" |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3731 |
proof (rule set_ext, rule) |
30488 | 3732 |
fix x assume "x \<in> interior (op + a ` s)" |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3733 |
then obtain e where "e>0" and e:"ball x e \<subseteq> op + a ` s" unfolding mem_interior by auto |
31289 | 3734 |
hence "ball (x - a) e \<subseteq> s" unfolding subset_eq Ball_def mem_ball dist_norm apply auto apply(erule_tac x="a + xa" in allE) unfolding ab_group_add_class.diff_diff_eq[THEN sym] by auto |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3735 |
thus "x \<in> op + a ` interior s" unfolding image_iff apply(rule_tac x="x - a" in bexI) unfolding mem_interior using `e > 0` by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3736 |
next |
30488 | 3737 |
fix x assume "x \<in> op + a ` interior s" |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3738 |
then obtain y e where "e>0" and e:"ball y e \<subseteq> s" and y:"x = a + y" unfolding image_iff Bex_def mem_interior by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3739 |
{ fix z have *:"a + y - z = y + a - z" by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3740 |
assume "z\<in>ball x e" |
31289 | 3741 |
hence "z - a \<in> s" using e[unfolded subset_eq, THEN bspec[where x="z - a"]] unfolding mem_ball dist_norm y ab_group_add_class.diff_diff_eq2 * by auto |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3742 |
hence "z \<in> op + a ` s" unfolding image_iff by(auto intro!: bexI[where x="z - a"]) } |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3743 |
hence "ball x e \<subseteq> op + a ` s" unfolding subset_eq by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3744 |
thus "x \<in> interior (op + a ` s)" unfolding mem_interior using `e>0` by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3745 |
qed |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3746 |
|
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3747 |
subsection {* Preservation of compactness and connectedness under continuous function. *} |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3748 |
|
30488 | 3749 |
lemma compact_continuous_image: |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3750 |
assumes "continuous_on s f" "compact s" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3751 |
shows "compact(f ` s)" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3752 |
proof- |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3753 |
{ fix x assume x:"\<forall>n::nat. x n \<in> f ` s" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3754 |
then obtain y where y:"\<forall>n. y n \<in> s \<and> x n = f (y n)" unfolding image_iff Bex_def using choice[of "\<lambda>n xa. xa \<in> s \<and> x n = f xa"] by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3755 |
then obtain l r where "l\<in>s" and r:"\<forall>m n. m < n \<longrightarrow> r m < r n" and lr:"((y \<circ> r) ---> l) sequentially" using assms(2)[unfolded compact_def, THEN spec[where x=y]] by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3756 |
{ fix e::real assume "e>0" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3757 |
then obtain d where "d>0" and d:"\<forall>x'\<in>s. dist x' l < d \<longrightarrow> dist (f x') (f l) < e" using assms(1)[unfolded continuous_on_def, THEN bspec[where x=l], OF `l\<in>s`] by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3758 |
then obtain N::nat where N:"\<forall>n\<ge>N. dist ((y \<circ> r) n) l < d" using lr[unfolded Lim_sequentially, THEN spec[where x=d]] by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3759 |
{ fix n::nat assume "n\<ge>N" hence "dist ((x \<circ> r) n) (f l) < e" using N[THEN spec[where x=n]] d[THEN bspec[where x="y (r n)"]] y[THEN spec[where x="r n"]] by auto } |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3760 |
hence "\<exists>N. \<forall>n\<ge>N. dist ((x \<circ> r) n) (f l) < e" by auto } |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3761 |
hence "\<exists>l\<in>f ` s. \<exists>r. (\<forall>m n. m < n \<longrightarrow> r m < r n) \<and> ((x \<circ> r) ---> l) sequentially" unfolding Lim_sequentially using r lr `l\<in>s` by auto } |
30488 | 3762 |
thus ?thesis unfolding compact_def by auto |
3763 |
qed |
|
3764 |
||
3765 |
lemma connected_continuous_image: |
|
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3766 |
assumes "continuous_on s f" "connected s" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3767 |
shows "connected(f ` s)" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3768 |
proof- |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3769 |
{ fix T assume as: "T \<noteq> {}" "T \<noteq> f ` s" "openin (subtopology euclidean (f ` s)) T" "closedin (subtopology euclidean (f ` s)) T" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3770 |
have "{x \<in> s. f x \<in> T} = {} \<or> {x \<in> s. f x \<in> T} = s" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3771 |
using assms(1)[unfolded continuous_on_open, THEN spec[where x=T]] |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3772 |
using assms(1)[unfolded continuous_on_closed, THEN spec[where x=T]] |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3773 |
using assms(2)[unfolded connected_clopen, THEN spec[where x="{x \<in> s. f x \<in> T}"]] as(3,4) by auto |
30488 | 3774 |
hence False using as(1,2) |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3775 |
using as(4)[unfolded closedin_def topspace_euclidean_subtopology] by auto } |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3776 |
thus ?thesis unfolding connected_clopen by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3777 |
qed |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3778 |
|
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3779 |
text{* Continuity implies uniform continuity on a compact domain. *} |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3780 |
|
30488 | 3781 |
lemma compact_uniformly_continuous: |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3782 |
assumes "continuous_on s f" "compact s" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3783 |
shows "uniformly_continuous_on s f" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3784 |
proof- |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3785 |
{ fix x assume x:"x\<in>s" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3786 |
hence "\<forall>xa. \<exists>y. 0 < xa \<longrightarrow> (y > 0 \<and> (\<forall>x'\<in>s. dist x' x < y \<longrightarrow> dist (f x') (f x) < xa))" using assms(1)[unfolded continuous_on_def, THEN bspec[where x=x]] by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3787 |
hence "\<exists>fa. \<forall>xa>0. \<forall>x'\<in>s. fa xa > 0 \<and> (dist x' x < fa xa \<longrightarrow> dist (f x') (f x) < xa)" using choice[of "\<lambda>e d. e>0 \<longrightarrow> d>0 \<and>(\<forall>x'\<in>s. (dist x' x < d \<longrightarrow> dist (f x') (f x) < e))"] by auto } |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3788 |
then have "\<forall>x\<in>s. \<exists>y. \<forall>xa. 0 < xa \<longrightarrow> (\<forall>x'\<in>s. y xa > 0 \<and> (dist x' x < y xa \<longrightarrow> dist (f x') (f x) < xa))" by auto |
30488 | 3789 |
then obtain d where d:"\<forall>e>0. \<forall>x\<in>s. \<forall>x'\<in>s. d x e > 0 \<and> (dist x' x < d x e \<longrightarrow> dist (f x') (f x) < e)" |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3790 |
using bchoice[of s "\<lambda>x fa. \<forall>xa>0. \<forall>x'\<in>s. fa xa > 0 \<and> (dist x' x < fa xa \<longrightarrow> dist (f x') (f x) < xa)"] by blast |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3791 |
|
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3792 |
{ fix e::real assume "e>0" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3793 |
|
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3794 |
{ fix x assume "x\<in>s" hence "x \<in> ball x (d x (e / 2))" unfolding centre_in_ball using d[THEN spec[where x="e/2"]] using `e>0` by auto } |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3795 |
hence "s \<subseteq> \<Union>{ball x (d x (e / 2)) |x. x \<in> s}" unfolding subset_eq by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3796 |
moreover |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3797 |
{ fix b assume "b\<in>{ball x (d x (e / 2)) |x. x \<in> s}" hence "open b" by auto } |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3798 |
ultimately obtain ea where "ea>0" and ea:"\<forall>x\<in>s. \<exists>b\<in>{ball x (d x (e / 2)) |x. x \<in> s}. ball x ea \<subseteq> b" using heine_borel_lemma[OF assms(2), of "{ball x (d x (e / 2)) | x. x\<in>s }"] by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3799 |
|
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3800 |
{ fix x y assume "x\<in>s" "y\<in>s" and as:"dist y x < ea" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3801 |
obtain z where "z\<in>s" and z:"ball x ea \<subseteq> ball z (d z (e / 2))" using ea[THEN bspec[where x=x]] and `x\<in>s` by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3802 |
hence "x\<in>ball z (d z (e / 2))" using `ea>0` unfolding subset_eq by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3803 |
hence "dist (f z) (f x) < e / 2" using d[THEN spec[where x="e/2"]] and `e>0` and `x\<in>s` and `z\<in>s` |
31285
0a3f9ee4117c
generalize dist function to class real_normed_vector
huffman
parents:
31275
diff
changeset
|
3804 |
by (auto simp add: dist_commute) |
30488 | 3805 |
moreover have "y\<in>ball z (d z (e / 2))" using as and `ea>0` and z[unfolded subset_eq] |
31285
0a3f9ee4117c
generalize dist function to class real_normed_vector
huffman
parents:
31275
diff
changeset
|
3806 |
by (auto simp add: dist_commute) |
30488 | 3807 |
hence "dist (f z) (f y) < e / 2" using d[THEN spec[where x="e/2"]] and `e>0` and `y\<in>s` and `z\<in>s` |
31285
0a3f9ee4117c
generalize dist function to class real_normed_vector
huffman
parents:
31275
diff
changeset
|
3808 |
by (auto simp add: dist_commute) |
30488 | 3809 |
ultimately have "dist (f y) (f x) < e" using dist_triangle_half_r[of "f z" "f x" e "f y"] |
31285
0a3f9ee4117c
generalize dist function to class real_normed_vector
huffman
parents:
31275
diff
changeset
|
3810 |
by (auto simp add: dist_commute) } |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3811 |
then have "\<exists>d>0. \<forall>x\<in>s. \<forall>x'\<in>s. dist x' x < d \<longrightarrow> dist (f x') (f x) < e" using `ea>0` by auto } |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3812 |
thus ?thesis unfolding uniformly_continuous_on_def by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3813 |
qed |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3814 |
|
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3815 |
text{* Continuity of inverse function on compact domain. *} |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3816 |
|
30488 | 3817 |
lemma continuous_on_inverse: |
31401 | 3818 |
fixes f :: "real ^ _ \<Rightarrow> real ^ _" |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3819 |
assumes "continuous_on s f" "compact s" "\<forall>x \<in> s. g (f x) = x" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3820 |
shows "continuous_on (f ` s) g" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3821 |
proof- |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3822 |
have *:"g ` f ` s = s" using assms(3) by (auto simp add: image_iff) |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3823 |
{ fix t assume t:"closedin (subtopology euclidean (g ` f ` s)) t" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3824 |
then obtain T where T: "closed T" "t = s \<inter> T" unfolding closedin_closed unfolding * by auto |
30488 | 3825 |
have "continuous_on (s \<inter> T) f" using continuous_on_subset[OF assms(1), of "s \<inter> t"] |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3826 |
unfolding T(2) and Int_left_absorb by auto |
30488 | 3827 |
moreover have "compact (s \<inter> T)" |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3828 |
using assms(2) unfolding compact_eq_bounded_closed |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3829 |
using bounded_subset[of s "s \<inter> T"] and T(1) by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3830 |
ultimately have "closed (f ` t)" using T(1) unfolding T(2) |
31401 | 3831 |
using compact_continuous_image [of "s \<inter> T" f] unfolding compact_eq_bounded_closed by auto |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3832 |
moreover have "{x \<in> f ` s. g x \<in> t} = f ` s \<inter> f ` t" using assms(3) unfolding T(2) by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3833 |
ultimately have "closedin (subtopology euclidean (f ` s)) {x \<in> f ` s. g x \<in> t}" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3834 |
unfolding closedin_closed by auto } |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3835 |
thus ?thesis unfolding continuous_on_closed by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3836 |
qed |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3837 |
|
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3838 |
subsection{* A uniformly convergent limit of continuous functions is continuous. *} |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3839 |
|
31401 | 3840 |
lemma norm_triangle_lt: |
3841 |
fixes x y :: "'a::real_normed_vector" |
|
3842 |
shows "norm x + norm y < e \<Longrightarrow> norm (x + y) < e" |
|
3843 |
by (rule le_less_trans [OF norm_triangle_ineq]) |
|
3844 |
||
30488 | 3845 |
lemma continuous_uniform_limit: |
31401 | 3846 |
fixes f :: "'a \<Rightarrow> 'b::metric_space \<Rightarrow> 'c::real_normed_vector" |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3847 |
assumes "\<not> (trivial_limit net)" "eventually (\<lambda>n. continuous_on s (f n)) net" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3848 |
"\<forall>e>0. eventually (\<lambda>n. \<forall>x \<in> s. norm(f n x - g x) < e) net" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3849 |
shows "continuous_on s g" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3850 |
proof- |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3851 |
{ fix x and e::real assume "x\<in>s" "e>0" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3852 |
have "eventually (\<lambda>n. \<forall>x\<in>s. norm (f n x - g x) < e / 3) net" using `e>0` assms(3)[THEN spec[where x="e/3"]] by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3853 |
then obtain n where n:"\<forall>xa\<in>s. norm (f n xa - g xa) < e / 3" "continuous_on s (f n)" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3854 |
using eventually_and[of "(\<lambda>n. \<forall>x\<in>s. norm (f n x - g x) < e / 3)" "(\<lambda>n. continuous_on s (f n))" net] assms(1,2) eventually_happens by blast |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3855 |
have "e / 3 > 0" using `e>0` by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3856 |
then obtain d where "d>0" and d:"\<forall>x'\<in>s. dist x' x < d \<longrightarrow> dist (f n x') (f n x) < e / 3" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3857 |
using n(2)[unfolded continuous_on_def, THEN bspec[where x=x], OF `x\<in>s`, THEN spec[where x="e/3"]] by blast |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3858 |
{ fix y assume "y\<in>s" "dist y x < d" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3859 |
hence "dist (f n y) (f n x) < e / 3" using d[THEN bspec[where x=y]] by auto |
30488 | 3860 |
hence "norm (f n y - g x) < 2 * e / 3" using norm_triangle_lt[of "f n y - f n x" "f n x - g x" "2*e/3"] |
31289 | 3861 |
using n(1)[THEN bspec[where x=x], OF `x\<in>s`] unfolding dist_norm unfolding ab_group_add_class.ab_diff_minus by auto |
3862 |
hence "dist (g y) (g x) < e" unfolding dist_norm using n(1)[THEN bspec[where x=y], OF `y\<in>s`] |
|
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3863 |
unfolding norm_minus_cancel[of "f n y - g y", THEN sym] using norm_triangle_lt[of "f n y - g x" "g y - f n y" e] by (auto simp add: uminus_add_conv_diff) } |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3864 |
hence "\<exists>d>0. \<forall>x'\<in>s. dist x' x < d \<longrightarrow> dist (g x') (g x) < e" using `d>0` by auto } |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3865 |
thus ?thesis unfolding continuous_on_def by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3866 |
qed |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3867 |
|
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3868 |
subsection{* Topological properties of linear functions. *} |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3869 |
|
30582 | 3870 |
lemma linear_lim_0: fixes f::"real^'a::finite \<Rightarrow> real^'b::finite" |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3871 |
assumes "linear f" shows "(f ---> 0) (at (0))" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3872 |
proof- |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3873 |
obtain B where "B>0" and B:"\<forall>x. norm (f x) \<le> B * norm x" using linear_bounded_pos[OF assms] by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3874 |
{ fix e::real assume "e>0" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3875 |
{ fix x::"real^'a" assume "norm x < e / B" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3876 |
hence "B * norm x < e" using `B>0` using mult_strict_right_mono[of "norm x" " e / B" B] unfolding real_mult_commute by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3877 |
hence "norm (f x) < e" using B[THEN spec[where x=x]] `B>0` using order_le_less_trans[of "norm (f x)" "B * norm x" e] by auto } |
30488 | 3878 |
moreover have "e / B > 0" using `e>0` `B>0` divide_pos_pos by auto |
31289 | 3879 |
ultimately have "\<exists>d>0. \<forall>x. 0 < dist x 0 \<and> dist x 0 < d \<longrightarrow> dist (f x) 0 < e" unfolding dist_norm by auto } |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3880 |
thus ?thesis unfolding Lim_at by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3881 |
qed |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3882 |
|
30488 | 3883 |
lemma linear_continuous_at: |
31346 | 3884 |
fixes f :: "real ^ _ \<Rightarrow> real ^ _" |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3885 |
assumes "linear f" shows "continuous (at a) f" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3886 |
unfolding continuous_at Lim_at_zero[of f "f a" a] using linear_lim_0[OF assms] |
30488 | 3887 |
unfolding Lim_null[of "\<lambda>x. f (a + x)"] unfolding linear_sub[OF assms, THEN sym] by auto |
3888 |
||
3889 |
lemma linear_continuous_within: |
|
31346 | 3890 |
fixes f :: "real ^ _ \<Rightarrow> real ^ _" |
3891 |
shows "linear f ==> continuous (at x within s) f" |
|
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3892 |
using continuous_at_imp_continuous_within[of x f s] using linear_continuous_at[of f] by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3893 |
|
30488 | 3894 |
lemma linear_continuous_on: |
31401 | 3895 |
fixes f :: "real ^ _ \<Rightarrow> real ^ _" |
3896 |
shows "linear f ==> continuous_on s f" |
|
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3897 |
using continuous_at_imp_continuous_on[of s f] using linear_continuous_at[of f] by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3898 |
|
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3899 |
text{* Also bilinear functions, in composition form. *} |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3900 |
|
30488 | 3901 |
lemma bilinear_continuous_at_compose: |
31343
9983f648f9bb
generalize tendsto and related constants to class metric_space
huffman
parents:
31342
diff
changeset
|
3902 |
fixes f :: "real ^ _ \<Rightarrow> real ^ _" |
9983f648f9bb
generalize tendsto and related constants to class metric_space
huffman
parents:
31342
diff
changeset
|
3903 |
shows "continuous (at x) f \<Longrightarrow> continuous (at x) g \<Longrightarrow> bilinear h |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3904 |
==> continuous (at x) (\<lambda>x. h (f x) (g x))" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3905 |
unfolding continuous_at using Lim_bilinear[of f "f x" "(at x)" g "g x" h] by auto |
30488 | 3906 |
|
3907 |
lemma bilinear_continuous_within_compose: |
|
31401 | 3908 |
fixes h :: "real ^ _ \<Rightarrow> real ^ _ \<Rightarrow> real ^ _" |
31343
9983f648f9bb
generalize tendsto and related constants to class metric_space
huffman
parents:
31342
diff
changeset
|
3909 |
shows "continuous (at x within s) f \<Longrightarrow> continuous (at x within s) g \<Longrightarrow> bilinear h |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3910 |
==> continuous (at x within s) (\<lambda>x. h (f x) (g x))" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3911 |
unfolding continuous_within using Lim_bilinear[of f "f x"] by auto |
30488 | 3912 |
|
3913 |
lemma bilinear_continuous_on_compose: |
|
31401 | 3914 |
fixes h :: "real ^ _ \<Rightarrow> real ^ _ \<Rightarrow> real ^ _" |
3915 |
shows "continuous_on s f \<Longrightarrow> continuous_on s g \<Longrightarrow> bilinear h |
|
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3916 |
==> continuous_on s (\<lambda>x. h (f x) (g x))" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3917 |
unfolding continuous_on_eq_continuous_within apply auto apply(erule_tac x=x in ballE) apply auto apply(erule_tac x=x in ballE) apply auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3918 |
using bilinear_continuous_within_compose[of _ s f g h] by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3919 |
|
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3920 |
subsection{* Topological stuff lifted from and dropped to R *} |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3921 |
|
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3922 |
|
30488 | 3923 |
lemma open_vec1: |
31345
80667d5bee32
generalize topological notions to class metric_space; add class perfect_space
huffman
parents:
31344
diff
changeset
|
3924 |
fixes s :: "real set" shows |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3925 |
"open(vec1 ` s) \<longleftrightarrow> |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3926 |
(\<forall>x \<in> s. \<exists>e>0. \<forall>x'. abs(x' - x) < e --> x' \<in> s)" (is "?lhs = ?rhs") |
31418
9baa48bad81c
generalize some constants and lemmas to class topological_space
huffman
parents:
31402
diff
changeset
|
3927 |
unfolding open_dist apply simp unfolding forall_vec1 dist_vec1 vec1_in_image_vec1 by simp |
30488 | 3928 |
|
3929 |
lemma islimpt_approachable_vec1: |
|
31345
80667d5bee32
generalize topological notions to class metric_space; add class perfect_space
huffman
parents:
31344
diff
changeset
|
3930 |
fixes s :: "real set" shows |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3931 |
"(vec1 x) islimpt (vec1 ` s) \<longleftrightarrow> |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3932 |
(\<forall>e>0. \<exists>x'\<in> s. x' \<noteq> x \<and> abs(x' - x) < e)" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3933 |
by (auto simp add: islimpt_approachable dist_vec1 vec1_eq) |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3934 |
|
30488 | 3935 |
lemma closed_vec1: |
31345
80667d5bee32
generalize topological notions to class metric_space; add class perfect_space
huffman
parents:
31344
diff
changeset
|
3936 |
fixes s :: "real set" shows |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3937 |
"closed (vec1 ` s) \<longleftrightarrow> |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3938 |
(\<forall>x. (\<forall>e>0. \<exists>x' \<in> s. x' \<noteq> x \<and> abs(x' - x) < e) |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3939 |
--> x \<in> s)" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3940 |
unfolding closed_limpt islimpt_approachable forall_vec1 apply simp |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3941 |
unfolding dist_vec1 vec1_in_image_vec1 abs_minus_commute by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3942 |
|
30488 | 3943 |
lemma continuous_at_vec1_range: |
31343
9983f648f9bb
generalize tendsto and related constants to class metric_space
huffman
parents:
31342
diff
changeset
|
3944 |
fixes f :: "real ^ _ \<Rightarrow> real" |
9983f648f9bb
generalize tendsto and related constants to class metric_space
huffman
parents:
31342
diff
changeset
|
3945 |
shows "continuous (at x) (vec1 o f) \<longleftrightarrow> (\<forall>e>0. \<exists>d>0. |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3946 |
\<forall>x'. norm(x' - x) < d --> abs(f x' - f x) < e)" |
31289 | 3947 |
unfolding continuous_at unfolding Lim_at apply simp unfolding dist_vec1 unfolding dist_nz[THEN sym] unfolding dist_norm apply auto |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3948 |
apply(erule_tac x=e in allE) apply auto apply (rule_tac x=d in exI) apply auto apply (erule_tac x=x' in allE) apply auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3949 |
apply(erule_tac x=e in allE) by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3950 |
|
30488 | 3951 |
lemma continuous_on_vec1_range: |
31401 | 3952 |
fixes f :: "'a::real_normed_vector \<Rightarrow> real" |
3953 |
shows "continuous_on s (vec1 o f) \<longleftrightarrow> (\<forall>x \<in> s. \<forall>e>0. \<exists>d>0. (\<forall>x' \<in> s. norm(x' - x) < d --> abs(f x' - f x) < e))" |
|
31289 | 3954 |
unfolding continuous_on_def apply (simp del: dist_commute) unfolding dist_vec1 unfolding dist_norm .. |
30488 | 3955 |
|
3956 |
lemma continuous_at_vec1_norm: |
|
31346 | 3957 |
fixes x :: "real ^ _" |
3958 |
shows "continuous (at x) (vec1 o norm)" |
|
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3959 |
unfolding continuous_at_vec1_range using real_abs_sub_norm order_le_less_trans by blast |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3960 |
|
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3961 |
lemma continuous_on_vec1_norm: |
31401 | 3962 |
fixes s :: "(real ^ _) set" |
3963 |
shows "continuous_on s (vec1 o norm)" |
|
30488 | 3964 |
unfolding continuous_on_vec1_range norm_vec1[THEN sym] by (metis norm_vec1 order_le_less_trans real_abs_sub_norm) |
3965 |
||
3966 |
lemma continuous_at_vec1_component: |
|
30582 | 3967 |
shows "continuous (at (a::real^'a::finite)) (\<lambda> x. vec1(x$i))" |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3968 |
proof- |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3969 |
{ fix e::real and x assume "0 < dist x a" "dist x a < e" "e>0" |
31289 | 3970 |
hence "\<bar>x $ i - a $ i\<bar> < e" using component_le_norm[of "x - a" i] unfolding dist_norm by auto } |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3971 |
thus ?thesis unfolding continuous_at tendsto_def eventually_at dist_vec1 by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3972 |
qed |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3973 |
|
30488 | 3974 |
lemma continuous_on_vec1_component: |
30582 | 3975 |
shows "continuous_on s (\<lambda> x::real^'a::finite. vec1(x$i))" |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3976 |
proof- |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3977 |
{ fix e::real and x xa assume "x\<in>s" "e>0" "xa\<in>s" "0 < norm (xa - x) \<and> norm (xa - x) < e" |
30582 | 3978 |
hence "\<bar>xa $ i - x $ i\<bar> < e" using component_le_norm[of "xa - x" i] by auto } |
31289 | 3979 |
thus ?thesis unfolding continuous_on Lim_within dist_vec1 unfolding dist_norm by auto |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3980 |
qed |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3981 |
|
30488 | 3982 |
lemma continuous_at_vec1_infnorm: |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3983 |
"continuous (at x) (vec1 o infnorm)" |
31289 | 3984 |
unfolding continuous_at Lim_at o_def unfolding dist_vec1 unfolding dist_norm |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3985 |
apply auto apply (rule_tac x=e in exI) apply auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3986 |
using order_trans[OF real_abs_sub_infnorm infnorm_le_norm, of _ x] by (metis xt1(7)) |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3987 |
|
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3988 |
text{* Hence some handy theorems on distance, diameter etc. of/from a set. *} |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3989 |
|
30488 | 3990 |
lemma compact_attains_sup: |
31401 | 3991 |
fixes s :: "real set" |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3992 |
assumes "compact (vec1 ` s)" "s \<noteq> {}" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3993 |
shows "\<exists>x \<in> s. \<forall>y \<in> s. y \<le> x" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3994 |
proof- |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3995 |
from assms(1) have a:"bounded (vec1 ` s)" "closed (vec1 ` s)" unfolding compact_eq_bounded_closed by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3996 |
{ fix e::real assume as: "\<forall>x\<in>s. x \<le> rsup s" "rsup s \<notin> s" "0 < e" "\<forall>x'\<in>s. x' = rsup s \<or> \<not> rsup s - x' < e" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3997 |
have "isLub UNIV s (rsup s)" using rsup[OF assms(2)] unfolding setle_def using as(1) by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3998 |
moreover have "isUb UNIV s (rsup s - e)" unfolding isUb_def unfolding setle_def using as(4,2) by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
3999 |
ultimately have False using isLub_le_isUb[of UNIV s "rsup s" "rsup s - e"] using `e>0` by auto } |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4000 |
thus ?thesis using bounded_has_rsup(1)[OF a(1) assms(2)] using a(2)[unfolded closed_vec1, THEN spec[where x="rsup s"]] |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4001 |
apply(rule_tac x="rsup s" in bexI) by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4002 |
qed |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4003 |
|
30488 | 4004 |
lemma compact_attains_inf: |
31401 | 4005 |
fixes s :: "real set" |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4006 |
assumes "compact (vec1 ` s)" "s \<noteq> {}" shows "\<exists>x \<in> s. \<forall>y \<in> s. x \<le> y" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4007 |
proof- |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4008 |
from assms(1) have a:"bounded (vec1 ` s)" "closed (vec1 ` s)" unfolding compact_eq_bounded_closed by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4009 |
{ fix e::real assume as: "\<forall>x\<in>s. x \<ge> rinf s" "rinf s \<notin> s" "0 < e" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4010 |
"\<forall>x'\<in>s. x' = rinf s \<or> \<not> abs (x' - rinf s) < e" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4011 |
have "isGlb UNIV s (rinf s)" using rinf[OF assms(2)] unfolding setge_def using as(1) by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4012 |
moreover |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4013 |
{ fix x assume "x \<in> s" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4014 |
hence *:"abs (x - rinf s) = x - rinf s" using as(1)[THEN bspec[where x=x]] by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4015 |
have "rinf s + e \<le> x" using as(4)[THEN bspec[where x=x]] using as(2) `x\<in>s` unfolding * by auto } |
30488 | 4016 |
hence "isLb UNIV s (rinf s + e)" unfolding isLb_def and setge_def by auto |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4017 |
ultimately have False using isGlb_le_isLb[of UNIV s "rinf s" "rinf s + e"] using `e>0` by auto } |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4018 |
thus ?thesis using bounded_has_rinf(1)[OF a(1) assms(2)] using a(2)[unfolded closed_vec1, THEN spec[where x="rinf s"]] |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4019 |
apply(rule_tac x="rinf s" in bexI) by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4020 |
qed |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4021 |
|
30488 | 4022 |
lemma continuous_attains_sup: |
31401 | 4023 |
fixes f :: "'a::metric_space \<Rightarrow> real" |
4024 |
shows "compact s \<Longrightarrow> s \<noteq> {} \<Longrightarrow> continuous_on s (vec1 o f) |
|
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4025 |
==> (\<exists>x \<in> s. \<forall>y \<in> s. f y \<le> f x)" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4026 |
using compact_attains_sup[of "f ` s"] |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4027 |
using compact_continuous_image[of s "vec1 \<circ> f"] unfolding image_compose by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4028 |
|
30488 | 4029 |
lemma continuous_attains_inf: |
31401 | 4030 |
fixes f :: "'a::metric_space \<Rightarrow> real" |
4031 |
shows "compact s \<Longrightarrow> s \<noteq> {} \<Longrightarrow> continuous_on s (vec1 o f) |
|
31282 | 4032 |
\<Longrightarrow> (\<exists>x \<in> s. \<forall>y \<in> s. f x \<le> f y)" |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4033 |
using compact_attains_inf[of "f ` s"] |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4034 |
using compact_continuous_image[of s "vec1 \<circ> f"] unfolding image_compose by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4035 |
|
30488 | 4036 |
lemma distance_attains_sup: |
31401 | 4037 |
fixes s :: "(real ^ _) set" |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4038 |
assumes "compact s" "s \<noteq> {}" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4039 |
shows "\<exists>x \<in> s. \<forall>y \<in> s. dist a y \<le> dist a x" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4040 |
proof- |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4041 |
{ fix x assume "x\<in>s" fix e::real assume "e>0" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4042 |
{ fix x' assume "x'\<in>s" and as:"norm (x' - x) < e" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4043 |
hence "\<bar>norm (x' - a) - norm (x - a)\<bar> < e" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4044 |
using real_abs_sub_norm[of "x' - a" "x - a"] by auto } |
31289 | 4045 |
hence "\<exists>d>0. \<forall>x'\<in>s. norm (x' - x) < d \<longrightarrow> \<bar>dist x' a - dist x a\<bar> < e" using `e>0` unfolding dist_norm by auto } |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4046 |
thus ?thesis using assms |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4047 |
using continuous_attains_sup[of s "\<lambda>x. dist a x"] |
31285
0a3f9ee4117c
generalize dist function to class real_normed_vector
huffman
parents:
31275
diff
changeset
|
4048 |
unfolding continuous_on_vec1_range by (auto simp add: dist_commute) |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4049 |
qed |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4050 |
|
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4051 |
text{* For *minimal* distance, we only need closure, not compactness. *} |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4052 |
|
30488 | 4053 |
lemma distance_attains_inf: |
31345
80667d5bee32
generalize topological notions to class metric_space; add class perfect_space
huffman
parents:
31344
diff
changeset
|
4054 |
fixes a :: "real ^ _" (* FIXME: generalize *) |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4055 |
assumes "closed s" "s \<noteq> {}" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4056 |
shows "\<exists>x \<in> s. \<forall>y \<in> s. dist a x \<le> dist a y" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4057 |
proof- |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4058 |
from assms(2) obtain b where "b\<in>s" by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4059 |
let ?B = "cball a (dist b a) \<inter> s" |
31285
0a3f9ee4117c
generalize dist function to class real_normed_vector
huffman
parents:
31275
diff
changeset
|
4060 |
have "b \<in> ?B" using `b\<in>s` by (simp add: dist_commute) |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4061 |
hence "?B \<noteq> {}" by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4062 |
moreover |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4063 |
{ fix x assume "x\<in>?B" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4064 |
fix e::real assume "e>0" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4065 |
{ fix x' assume "x'\<in>?B" and as:"norm (x' - x) < e" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4066 |
hence "\<bar>norm (x' - a) - norm (x - a)\<bar> < e" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4067 |
using real_abs_sub_norm[of "x' - a" "x - a"] by auto } |
31289 | 4068 |
hence "\<exists>d>0. \<forall>x'\<in>?B. norm (x' - x) < d \<longrightarrow> \<bar>dist x' a - dist x a\<bar> < e" using `e>0` unfolding dist_norm by auto } |
30488 | 4069 |
hence "continuous_on (cball a (dist b a) \<inter> s) (vec1 \<circ> dist a)" unfolding continuous_on_vec1_range |
31285
0a3f9ee4117c
generalize dist function to class real_normed_vector
huffman
parents:
31275
diff
changeset
|
4070 |
by (auto simp add: dist_commute) |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4071 |
moreover have "compact ?B" using compact_cball[of a "dist b a"] unfolding compact_eq_bounded_closed using bounded_Int and closed_Int and assms(1) by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4072 |
ultimately obtain x where "x\<in>cball a (dist b a) \<inter> s" "\<forall>y\<in>cball a (dist b a) \<inter> s. dist a x \<le> dist a y" using continuous_attains_inf[of ?B "dist a"] by fastsimp |
30488 | 4073 |
thus ?thesis by fastsimp |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4074 |
qed |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4075 |
|
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4076 |
subsection{* We can now extend limit compositions to consider the scalar multiplier. *} |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4077 |
|
30488 | 4078 |
lemma Lim_mul: |
31343
9983f648f9bb
generalize tendsto and related constants to class metric_space
huffman
parents:
31342
diff
changeset
|
4079 |
fixes f :: "'a \<Rightarrow> real ^ _" |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4080 |
assumes "((vec1 o c) ---> vec1 d) net" "(f ---> l) net" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4081 |
shows "((\<lambda>x. c(x) *s f x) ---> (d *s l)) net" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4082 |
proof- |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4083 |
have "bilinear (\<lambda>x. op *s (dest_vec1 (x::real^1)))" unfolding bilinear_def linear_def |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4084 |
unfolding dest_vec1_add dest_vec1_cmul |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4085 |
apply vector apply auto unfolding semiring_class.right_distrib semiring_class.left_distrib by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4086 |
thus ?thesis using Lim_bilinear[OF assms, of "\<lambda>x y. (dest_vec1 x) *s y"] by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4087 |
qed |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4088 |
|
30488 | 4089 |
lemma Lim_vmul: |
31343
9983f648f9bb
generalize tendsto and related constants to class metric_space
huffman
parents:
31342
diff
changeset
|
4090 |
fixes c :: "'a \<Rightarrow> real" |
9983f648f9bb
generalize tendsto and related constants to class metric_space
huffman
parents:
31342
diff
changeset
|
4091 |
shows "((vec1 o c) ---> vec1 d) net ==> ((\<lambda>x. c(x) *s v) ---> d *s v) net" |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4092 |
using Lim_mul[of c d net "\<lambda>x. v" v] using Lim_const[of v] by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4093 |
|
30488 | 4094 |
lemma continuous_vmul: |
31390 | 4095 |
fixes c :: "'a::metric_space \<Rightarrow> real" |
31343
9983f648f9bb
generalize tendsto and related constants to class metric_space
huffman
parents:
31342
diff
changeset
|
4096 |
shows "continuous net (vec1 o c) ==> continuous net (\<lambda>x. c(x) *s v)" |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4097 |
unfolding continuous_def using Lim_vmul[of c] by auto |
30488 | 4098 |
|
4099 |
lemma continuous_mul: |
|
31390 | 4100 |
fixes c :: "'a::metric_space \<Rightarrow> real" |
31343
9983f648f9bb
generalize tendsto and related constants to class metric_space
huffman
parents:
31342
diff
changeset
|
4101 |
shows "continuous net (vec1 o c) \<Longrightarrow> continuous net f |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4102 |
==> continuous net (\<lambda>x. c(x) *s f x) " |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4103 |
unfolding continuous_def using Lim_mul[of c] by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4104 |
|
30488 | 4105 |
lemma continuous_on_vmul: |
31401 | 4106 |
fixes c :: "'a::metric_space \<Rightarrow> real" |
4107 |
shows "continuous_on s (vec1 o c) ==> continuous_on s (\<lambda>x. c(x) *s v)" |
|
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4108 |
unfolding continuous_on_eq_continuous_within using continuous_vmul[of _ c] by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4109 |
|
30488 | 4110 |
lemma continuous_on_mul: |
31401 | 4111 |
fixes c :: "'a::metric_space \<Rightarrow> real" |
4112 |
shows "continuous_on s (vec1 o c) \<Longrightarrow> continuous_on s f |
|
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4113 |
==> continuous_on s (\<lambda>x. c(x) *s f x)" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4114 |
unfolding continuous_on_eq_continuous_within using continuous_mul[of _ c] by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4115 |
|
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4116 |
text{* And so we have continuity of inverse. *} |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4117 |
|
30488 | 4118 |
lemma Lim_inv: |
31343
9983f648f9bb
generalize tendsto and related constants to class metric_space
huffman
parents:
31342
diff
changeset
|
4119 |
fixes f :: "'a \<Rightarrow> real" |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4120 |
assumes "((vec1 o f) ---> vec1 l) (net::'a net)" "l \<noteq> 0" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4121 |
shows "((vec1 o inverse o f) ---> vec1(inverse l)) net" |
31347
357d58c5743a
new lemmas about eventually; rewrite Lim proofs to use more abstract properties of eventually
huffman
parents:
31346
diff
changeset
|
4122 |
proof - |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4123 |
{ fix e::real assume "e>0" |
31347
357d58c5743a
new lemmas about eventually; rewrite Lim proofs to use more abstract properties of eventually
huffman
parents:
31346
diff
changeset
|
4124 |
let ?d = "min (\<bar>l\<bar> / 2) (l\<twosuperior> * e / 2)" |
357d58c5743a
new lemmas about eventually; rewrite Lim proofs to use more abstract properties of eventually
huffman
parents:
31346
diff
changeset
|
4125 |
have "0 < ?d" using `l\<noteq>0` `e>0` mult_pos_pos[of "l^2" "e/2"] by auto |
357d58c5743a
new lemmas about eventually; rewrite Lim proofs to use more abstract properties of eventually
huffman
parents:
31346
diff
changeset
|
4126 |
with assms(1) have "eventually (\<lambda>x. dist ((vec1 o f) x) (vec1 l) < ?d) net" |
357d58c5743a
new lemmas about eventually; rewrite Lim proofs to use more abstract properties of eventually
huffman
parents:
31346
diff
changeset
|
4127 |
by (rule tendstoD) |
357d58c5743a
new lemmas about eventually; rewrite Lim proofs to use more abstract properties of eventually
huffman
parents:
31346
diff
changeset
|
4128 |
moreover |
357d58c5743a
new lemmas about eventually; rewrite Lim proofs to use more abstract properties of eventually
huffman
parents:
31346
diff
changeset
|
4129 |
{ fix x assume "dist ((vec1 o f) x) (vec1 l) < ?d" |
357d58c5743a
new lemmas about eventually; rewrite Lim proofs to use more abstract properties of eventually
huffman
parents:
31346
diff
changeset
|
4130 |
hence *:"\<bar>f x - l\<bar> < min (\<bar>l\<bar> / 2) (l\<twosuperior> * e / 2)" unfolding o_def dist_vec1 by auto |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4131 |
hence fx0:"f x \<noteq> 0" using `l \<noteq> 0` by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4132 |
hence fxl0: "(f x) * l \<noteq> 0" using `l \<noteq> 0` by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4133 |
from * have **:"\<bar>f x - l\<bar> < l\<twosuperior> * e / 2" by auto |
30654 | 4134 |
have "\<bar>f x\<bar> * 2 \<ge> \<bar>l\<bar>" using * by (auto simp del: less_divide_eq_number_of1) |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4135 |
hence "\<bar>f x\<bar> * 2 * \<bar>l\<bar> \<ge> \<bar>l\<bar> * \<bar>l\<bar>" unfolding mult_le_cancel_right by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4136 |
hence "\<bar>f x * l\<bar> * 2 \<ge> \<bar>l\<bar>^2" unfolding real_mult_commute and power2_eq_square by auto |
30488 | 4137 |
hence ***:"inverse \<bar>f x * l\<bar> \<le> inverse (l\<twosuperior> / 2)" using fxl0 |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4138 |
using le_imp_inverse_le[of "l^2 / 2" "\<bar>f x * l\<bar>"] by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4139 |
|
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4140 |
have "dist ((vec1 \<circ> inverse \<circ> f) x) (vec1 (inverse l)) < e" unfolding o_def unfolding dist_vec1 |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4141 |
unfolding inverse_diff_inverse[OF fx0 `l\<noteq>0`] apply simp |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4142 |
unfolding mult_commute[of "inverse (f x)"] |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4143 |
unfolding real_divide_def[THEN sym] |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4144 |
unfolding divide_divide_eq_left |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4145 |
unfolding nonzero_abs_divide[OF fxl0] |
30488 | 4146 |
using mult_less_le_imp_less[OF **, of "inverse \<bar>f x * l\<bar>", of "inverse (l^2 / 2)"] using *** using fx0 `l\<noteq>0` |
31347
357d58c5743a
new lemmas about eventually; rewrite Lim proofs to use more abstract properties of eventually
huffman
parents:
31346
diff
changeset
|
4147 |
unfolding inverse_eq_divide using `e>0` by auto |
357d58c5743a
new lemmas about eventually; rewrite Lim proofs to use more abstract properties of eventually
huffman
parents:
31346
diff
changeset
|
4148 |
} |
357d58c5743a
new lemmas about eventually; rewrite Lim proofs to use more abstract properties of eventually
huffman
parents:
31346
diff
changeset
|
4149 |
ultimately |
357d58c5743a
new lemmas about eventually; rewrite Lim proofs to use more abstract properties of eventually
huffman
parents:
31346
diff
changeset
|
4150 |
have "eventually (\<lambda>x. dist ((vec1 o inverse o f) x) (vec1(inverse l)) < e) net" |
357d58c5743a
new lemmas about eventually; rewrite Lim proofs to use more abstract properties of eventually
huffman
parents:
31346
diff
changeset
|
4151 |
by (auto elim: eventually_rev_mono) |
357d58c5743a
new lemmas about eventually; rewrite Lim proofs to use more abstract properties of eventually
huffman
parents:
31346
diff
changeset
|
4152 |
} |
357d58c5743a
new lemmas about eventually; rewrite Lim proofs to use more abstract properties of eventually
huffman
parents:
31346
diff
changeset
|
4153 |
thus ?thesis unfolding tendsto_def by auto |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4154 |
qed |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4155 |
|
30488 | 4156 |
lemma continuous_inv: |
31390 | 4157 |
fixes f :: "'a::metric_space \<Rightarrow> real" |
31343
9983f648f9bb
generalize tendsto and related constants to class metric_space
huffman
parents:
31342
diff
changeset
|
4158 |
shows "continuous net (vec1 o f) \<Longrightarrow> f(netlimit net) \<noteq> 0 |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4159 |
==> continuous net (vec1 o inverse o f)" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4160 |
unfolding continuous_def using Lim_inv by auto |
30488 | 4161 |
|
4162 |
lemma continuous_at_within_inv: |
|
31343
9983f648f9bb
generalize tendsto and related constants to class metric_space
huffman
parents:
31342
diff
changeset
|
4163 |
fixes f :: "real ^ _ \<Rightarrow> real" |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4164 |
assumes "continuous (at a within s) (vec1 o f)" "f a \<noteq> 0" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4165 |
shows "continuous (at a within s) (vec1 o inverse o f)" |
31348 | 4166 |
using assms unfolding continuous_within o_apply |
4167 |
by (rule Lim_inv) |
|
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4168 |
|
30488 | 4169 |
lemma continuous_at_inv: |
31343
9983f648f9bb
generalize tendsto and related constants to class metric_space
huffman
parents:
31342
diff
changeset
|
4170 |
fixes f :: "real ^ _ \<Rightarrow> real" |
9983f648f9bb
generalize tendsto and related constants to class metric_space
huffman
parents:
31342
diff
changeset
|
4171 |
shows "continuous (at a) (vec1 o f) \<Longrightarrow> f a \<noteq> 0 |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4172 |
==> continuous (at a) (vec1 o inverse o f) " |
31346 | 4173 |
using within_UNIV[THEN sym, of "at a"] using continuous_at_within_inv[of a UNIV] by auto |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4174 |
|
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4175 |
subsection{* Preservation properties for pasted sets. *} |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4176 |
|
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4177 |
lemma bounded_pastecart: |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4178 |
assumes "bounded s" "bounded t" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4179 |
shows "bounded { pastecart x y | x y . (x \<in> s \<and> y \<in> t)}" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4180 |
proof- |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4181 |
obtain a b where ab:"\<forall>x\<in>s. norm x \<le> a" "\<forall>x\<in>t. norm x \<le> b" using assms[unfolded bounded_def] by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4182 |
{ fix x y assume "x\<in>s" "y\<in>t" |
30488 | 4183 |
hence "norm x \<le> a" "norm y \<le> b" using ab by auto |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4184 |
hence "norm (pastecart x y) \<le> a + b" using norm_pastecart[of x y] by auto } |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4185 |
thus ?thesis unfolding bounded_def by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4186 |
qed |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4187 |
|
30488 | 4188 |
lemma closed_pastecart: |
31345
80667d5bee32
generalize topological notions to class metric_space; add class perfect_space
huffman
parents:
31344
diff
changeset
|
4189 |
fixes s :: "(real ^ 'a::finite) set" (* FIXME: generalize *) |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4190 |
assumes "closed s" "closed t" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4191 |
shows "closed {pastecart x y | x y . x \<in> s \<and> y \<in> t}" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4192 |
proof- |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4193 |
{ fix x l assume as:"\<forall>n::nat. x n \<in> {pastecart x y |x y. x \<in> s \<and> y \<in> t}" "(x ---> l) sequentially" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4194 |
{ fix n::nat have "fstcart (x n) \<in> s" "sndcart (x n) \<in> t" using as(1)[THEN spec[where x=n]] by auto } note * = this |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4195 |
moreover |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4196 |
{ fix e::real assume "e>0" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4197 |
then obtain N::nat where N:"\<forall>n\<ge>N. dist (x n) l < e" using as(2)[unfolded Lim_sequentially, THEN spec[where x=e]] by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4198 |
{ fix n::nat assume "n\<ge>N" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4199 |
hence "dist (fstcart (x n)) (fstcart l) < e" "dist (sndcart (x n)) (sndcart l) < e" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4200 |
using N[THEN spec[where x=n]] dist_fstcart[of "x n" l] dist_sndcart[of "x n" l] by auto } |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4201 |
hence "\<exists>N. \<forall>n\<ge>N. dist (fstcart (x n)) (fstcart l) < e" "\<exists>N. \<forall>n\<ge>N. dist (sndcart (x n)) (sndcart l) < e" by auto } |
30488 | 4202 |
ultimately have "fstcart l \<in> s" "sndcart l \<in> t" |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4203 |
using assms(1)[unfolded closed_sequential_limits, THEN spec[where x="\<lambda>n. fstcart (x n)"], THEN spec[where x="fstcart l"]] |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4204 |
using assms(2)[unfolded closed_sequential_limits, THEN spec[where x="\<lambda>n. sndcart (x n)"], THEN spec[where x="sndcart l"]] |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4205 |
unfolding Lim_sequentially by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4206 |
hence "l \<in> {pastecart x y |x y. x \<in> s \<and> y \<in> t}" using pastecart_fst_snd[THEN sym, of l] by auto } |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4207 |
thus ?thesis unfolding closed_sequential_limits by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4208 |
qed |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4209 |
|
30488 | 4210 |
lemma compact_pastecart: |
31401 | 4211 |
fixes s t :: "(real ^ _) set" |
4212 |
shows "compact s \<Longrightarrow> compact t ==> compact {pastecart x y | x y . x \<in> s \<and> y \<in> t}" |
|
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4213 |
unfolding compact_eq_bounded_closed using bounded_pastecart[of s t] closed_pastecart[of s t] by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4214 |
|
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4215 |
text{* Hence some useful properties follow quite easily. *} |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4216 |
|
30488 | 4217 |
lemma compact_scaling: |
31401 | 4218 |
fixes s :: "(real ^ _) set" |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4219 |
assumes "compact s" shows "compact ((\<lambda>x. c *s x) ` s)" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4220 |
proof- |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4221 |
let ?f = "\<lambda>x. c *s x" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4222 |
have *:"linear ?f" unfolding linear_def vector_smult_assoc vector_add_ldistrib real_mult_commute by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4223 |
show ?thesis using compact_continuous_image[of s ?f] continuous_at_imp_continuous_on[of s ?f] |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4224 |
using linear_continuous_at[OF *] assms by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4225 |
qed |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4226 |
|
30488 | 4227 |
lemma compact_negations: |
31401 | 4228 |
fixes s :: "(real ^ _) set" |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4229 |
assumes "compact s" shows "compact ((\<lambda>x. -x) ` s)" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4230 |
proof- |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4231 |
have "uminus ` s = (\<lambda>x. -1 *s x) ` s" apply auto unfolding image_iff pth_3 by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4232 |
thus ?thesis using compact_scaling[OF assms, of "-1"] by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4233 |
qed |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4234 |
|
30488 | 4235 |
lemma compact_sums: |
31401 | 4236 |
fixes s t :: "(real ^ _) set" |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4237 |
assumes "compact s" "compact t" shows "compact {x + y | x y. x \<in> s \<and> y \<in> t}" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4238 |
proof- |
30488 | 4239 |
have *:"{x + y | x y. x \<in> s \<and> y \<in> t} =(\<lambda>z. fstcart z + sndcart z) ` {pastecart x y | x y. x \<in> s \<and> y \<in> t}" |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4240 |
apply auto unfolding image_iff apply(rule_tac x="pastecart xa y" in bexI) unfolding fstcart_pastecart sndcart_pastecart by auto |
30582 | 4241 |
have "linear (\<lambda>z::real^('a + 'a). fstcart z + sndcart z)" unfolding linear_def |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4242 |
unfolding fstcart_add sndcart_add apply auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4243 |
unfolding vector_add_ldistrib fstcart_cmul[THEN sym] sndcart_cmul[THEN sym] by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4244 |
hence "continuous_on {pastecart x y |x y. x \<in> s \<and> y \<in> t} (\<lambda>z. fstcart z + sndcart z)" |
30488 | 4245 |
using continuous_at_imp_continuous_on linear_continuous_at by auto |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4246 |
thus ?thesis unfolding * using compact_continuous_image compact_pastecart[OF assms] by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4247 |
qed |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4248 |
|
30488 | 4249 |
lemma compact_differences: |
31401 | 4250 |
fixes s t :: "(real ^ 'a::finite) set" |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4251 |
assumes "compact s" "compact t" shows "compact {x - y | x y. x \<in> s \<and> y \<in> t}" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4252 |
proof- |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4253 |
have "{x - y | x y::real^'a. x\<in>s \<and> y \<in> t} = {x + y | x y. x \<in> s \<and> y \<in> (uminus ` t)}" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4254 |
apply auto apply(rule_tac x= xa in exI) apply auto apply(rule_tac x=xa in exI) by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4255 |
thus ?thesis using compact_sums[OF assms(1) compact_negations[OF assms(2)]] by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4256 |
qed |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4257 |
|
30488 | 4258 |
lemma compact_translation: |
31401 | 4259 |
fixes s :: "(real ^ _) set" |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4260 |
assumes "compact s" shows "compact ((\<lambda>x. a + x) ` s)" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4261 |
proof- |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4262 |
have "{x + y |x y. x \<in> s \<and> y \<in> {a}} = (\<lambda>x. a + x) ` s" by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4263 |
thus ?thesis using compact_sums[OF assms compact_sing[of a]] by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4264 |
qed |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4265 |
|
30488 | 4266 |
lemma compact_affinity: |
31401 | 4267 |
fixes s :: "(real ^ _) set" |
4268 |
assumes "compact s" shows "compact ((\<lambda>x. a + c *s x) ` s)" |
|
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4269 |
proof- |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4270 |
have "op + a ` op *s c ` s = (\<lambda>x. a + c *s x) ` s" by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4271 |
thus ?thesis using compact_translation[OF compact_scaling[OF assms], of a c] by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4272 |
qed |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4273 |
|
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4274 |
text{* Hence we get the following. *} |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4275 |
|
30488 | 4276 |
lemma compact_sup_maxdistance: |
31401 | 4277 |
fixes s :: "(real ^ _) set" |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4278 |
assumes "compact s" "s \<noteq> {}" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4279 |
shows "\<exists>x\<in>s. \<exists>y\<in>s. \<forall>u\<in>s. \<forall>v\<in>s. norm(u - v) \<le> norm(x - y)" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4280 |
proof- |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4281 |
have "{x - y | x y . x\<in>s \<and> y\<in>s} \<noteq> {}" using `s \<noteq> {}` by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4282 |
then obtain x where x:"x\<in>{x - y |x y. x \<in> s \<and> y \<in> s}" "\<forall>y\<in>{x - y |x y. x \<in> s \<and> y \<in> s}. norm y \<le> norm x" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4283 |
using compact_differences[OF assms(1) assms(1)] |
31289 | 4284 |
using distance_attains_sup[unfolded dist_norm, of "{x - y | x y . x\<in>s \<and> y\<in>s}" 0] by(auto simp add: norm_minus_cancel) |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4285 |
from x(1) obtain a b where "a\<in>s" "b\<in>s" "x = a - b" by auto |
30488 | 4286 |
thus ?thesis using x(2)[unfolded `x = a - b`] by blast |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4287 |
qed |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4288 |
|
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4289 |
text{* We can state this in terms of diameter of a set. *} |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4290 |
|
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4291 |
definition "diameter s = (if s = {} then 0::real else rsup {norm(x - y) | x y. x \<in> s \<and> y \<in> s})" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4292 |
|
30488 | 4293 |
lemma diameter_bounded: |
4294 |
assumes "bounded s" |
|
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4295 |
shows "\<forall>x\<in>s. \<forall>y\<in>s. norm(x - y) \<le> diameter s" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4296 |
"\<forall>d>0. d < diameter s --> (\<exists>x\<in>s. \<exists>y\<in>s. norm(x - y) > d)" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4297 |
proof- |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4298 |
let ?D = "{norm (x - y) |x y. x \<in> s \<and> y \<in> s}" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4299 |
obtain a where a:"\<forall>x\<in>s. norm x \<le> a" using assms[unfolded bounded_def] by auto |
30488 | 4300 |
{ fix x y assume "x \<in> s" "y \<in> s" |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4301 |
hence "norm (x - y) \<le> 2 * a" using norm_triangle_ineq[of x "-y", unfolded norm_minus_cancel] a[THEN bspec[where x=x]] a[THEN bspec[where x=y]] by (auto simp add: ring_simps) } |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4302 |
note * = this |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4303 |
{ fix x y assume "x\<in>s" "y\<in>s" hence "s \<noteq> {}" by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4304 |
have lub:"isLub UNIV ?D (rsup ?D)" using * rsup[of ?D] using `s\<noteq>{}` unfolding setle_def by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4305 |
have "norm(x - y) \<le> diameter s" unfolding diameter_def using `s\<noteq>{}` *[OF `x\<in>s` `y\<in>s`] `x\<in>s` `y\<in>s` isLubD1[OF lub] unfolding setle_def by auto } |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4306 |
moreover |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4307 |
{ fix d::real assume "d>0" "d < diameter s" |
30488 | 4308 |
hence "s\<noteq>{}" unfolding diameter_def by auto |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4309 |
hence lub:"isLub UNIV ?D (rsup ?D)" using * rsup[of ?D] unfolding setle_def by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4310 |
have "\<exists>d' \<in> ?D. d' > d" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4311 |
proof(rule ccontr) |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4312 |
assume "\<not> (\<exists>d'\<in>{norm (x - y) |x y. x \<in> s \<and> y \<in> s}. d < d')" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4313 |
hence as:"\<forall>d'\<in>?D. d' \<le> d" apply auto apply(erule_tac x="norm (x - y)" in allE) by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4314 |
hence "isUb UNIV ?D d" unfolding isUb_def unfolding setle_def by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4315 |
thus False using `d < diameter s` `s\<noteq>{}` isLub_le_isUb[OF lub, of d] unfolding diameter_def by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4316 |
qed |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4317 |
hence "\<exists>x\<in>s. \<exists>y\<in>s. norm(x - y) > d" by auto } |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4318 |
ultimately show "\<forall>x\<in>s. \<forall>y\<in>s. norm(x - y) \<le> diameter s" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4319 |
"\<forall>d>0. d < diameter s --> (\<exists>x\<in>s. \<exists>y\<in>s. norm(x - y) > d)" by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4320 |
qed |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4321 |
|
30488 | 4322 |
lemma diameter_bounded_bound: |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4323 |
"bounded s \<Longrightarrow> x \<in> s \<Longrightarrow> y \<in> s ==> norm(x - y) \<le> diameter s" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4324 |
using diameter_bounded by blast |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4325 |
|
30488 | 4326 |
lemma diameter_compact_attained: |
31401 | 4327 |
fixes s :: "(real ^ _) set" |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4328 |
assumes "compact s" "s \<noteq> {}" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4329 |
shows "\<exists>x\<in>s. \<exists>y\<in>s. (norm(x - y) = diameter s)" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4330 |
proof- |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4331 |
have b:"bounded s" using assms(1) compact_eq_bounded_closed by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4332 |
then obtain x y where xys:"x\<in>s" "y\<in>s" and xy:"\<forall>u\<in>s. \<forall>v\<in>s. norm (u - v) \<le> norm (x - y)" using compact_sup_maxdistance[OF assms] by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4333 |
hence "diameter s \<le> norm (x - y)" using rsup_le[of "{norm (x - y) |x y. x \<in> s \<and> y \<in> s}" "norm (x - y)"] |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4334 |
unfolding setle_def and diameter_def by auto |
30488 | 4335 |
thus ?thesis using diameter_bounded(1)[OF b, THEN bspec[where x=x], THEN bspec[where x=y], OF xys] and xys by auto |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4336 |
qed |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4337 |
|
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4338 |
text{* Related results with closure as the conclusion. *} |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4339 |
|
30488 | 4340 |
lemma closed_scaling: |
31345
80667d5bee32
generalize topological notions to class metric_space; add class perfect_space
huffman
parents:
31344
diff
changeset
|
4341 |
fixes s :: "(real ^ _) set" |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4342 |
assumes "closed s" shows "closed ((\<lambda>x. c *s x) ` s)" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4343 |
proof(cases "s={}") |
30488 | 4344 |
case True thus ?thesis by auto |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4345 |
next |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4346 |
case False |
30488 | 4347 |
show ?thesis |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4348 |
proof(cases "c=0") |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4349 |
have *:"(\<lambda>x. 0) ` s = {0}" using `s\<noteq>{}` by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4350 |
case True thus ?thesis apply auto unfolding * using closed_sing by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4351 |
next |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4352 |
case False |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4353 |
{ fix x l assume as:"\<forall>n::nat. x n \<in> op *s c ` s" "(x ---> l) sequentially" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4354 |
{ fix n::nat have "(1 / c) *s x n \<in> s" using as(1)[THEN spec[where x=n]] using `c\<noteq>0` by (auto simp add: vector_smult_assoc) } |
30488 | 4355 |
moreover |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4356 |
{ fix e::real assume "e>0" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4357 |
hence "0 < e *\<bar>c\<bar>" using `c\<noteq>0` mult_pos_pos[of e "abs c"] by auto |
30488 | 4358 |
then obtain N where "\<forall>n\<ge>N. dist (x n) l < e * \<bar>c\<bar>" using as(2)[unfolded Lim_sequentially, THEN spec[where x="e * abs c"]] by auto |
31289 | 4359 |
hence "\<exists>N. \<forall>n\<ge>N. dist ((1 / c) *s x n) ((1 / c) *s l) < e" unfolding dist_norm unfolding vector_ssub_ldistrib[THEN sym] norm_mul |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4360 |
using mult_imp_div_pos_less[of "abs c" _ e] `c\<noteq>0` by auto } |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4361 |
hence "((\<lambda>n. (1 / c) *s x n) ---> (1 / c) *s l) sequentially" unfolding Lim_sequentially by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4362 |
ultimately have "l \<in> op *s c ` s" using assms[unfolded closed_sequential_limits, THEN spec[where x="\<lambda>n. (1/c) *s x n"], THEN spec[where x="(1/c) *s l"]] |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4363 |
unfolding image_iff using `c\<noteq>0` apply(rule_tac x="(1 / c) *s l" in bexI) apply auto unfolding vector_smult_assoc by auto } |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4364 |
thus ?thesis unfolding closed_sequential_limits by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4365 |
qed |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4366 |
qed |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4367 |
|
30488 | 4368 |
lemma closed_negations: |
31345
80667d5bee32
generalize topological notions to class metric_space; add class perfect_space
huffman
parents:
31344
diff
changeset
|
4369 |
fixes s :: "(real ^ _) set" (* FIXME: generalize *) |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4370 |
assumes "closed s" shows "closed ((\<lambda>x. -x) ` s)" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4371 |
using closed_scaling[OF assms, of "-1"] unfolding pth_3 by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4372 |
|
30488 | 4373 |
lemma compact_closed_sums: |
31401 | 4374 |
fixes s :: "(real ^ _) set" |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4375 |
assumes "compact s" "closed t" shows "closed {x + y | x y. x \<in> s \<and> y \<in> t}" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4376 |
proof- |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4377 |
let ?S = "{x + y |x y. x \<in> s \<and> y \<in> t}" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4378 |
{ fix x l assume as:"\<forall>n. x n \<in> ?S" "(x ---> l) sequentially" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4379 |
from as(1) obtain f where f:"\<forall>n. x n = fst (f n) + snd (f n)" "\<forall>n. fst (f n) \<in> s" "\<forall>n. snd (f n) \<in> t" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4380 |
using choice[of "\<lambda>n y. x n = (fst y) + (snd y) \<and> fst y \<in> s \<and> snd y \<in> t"] by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4381 |
obtain l' r where "l'\<in>s" and r:"\<forall>m n. m < n \<longrightarrow> r m < r n" and lr:"(((\<lambda>n. fst (f n)) \<circ> r) ---> l') sequentially" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4382 |
using assms(1)[unfolded compact_def, THEN spec[where x="\<lambda> n. fst (f n)"]] using f(2) by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4383 |
have "((\<lambda>n. snd (f (r n))) ---> l - l') sequentially" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4384 |
using Lim_sub[OF lim_subsequence[OF r as(2)] lr] and f(1) unfolding o_def by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4385 |
hence "l - l' \<in> t" |
30488 | 4386 |
using assms(2)[unfolded closed_sequential_limits, THEN spec[where x="\<lambda> n. snd (f (r n))"], THEN spec[where x="l - l'"]] |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4387 |
using f(3) by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4388 |
hence "l \<in> ?S" using `l' \<in> s` apply auto apply(rule_tac x=l' in exI) apply(rule_tac x="l - l'" in exI) by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4389 |
} |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4390 |
thus ?thesis unfolding closed_sequential_limits by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4391 |
qed |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4392 |
|
30488 | 4393 |
lemma closed_compact_sums: |
31401 | 4394 |
fixes s t :: "(real ^ _) set" |
30488 | 4395 |
assumes "closed s" "compact t" |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4396 |
shows "closed {x + y | x y. x \<in> s \<and> y \<in> t}" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4397 |
proof- |
30488 | 4398 |
have "{x + y |x y. x \<in> t \<and> y \<in> s} = {x + y |x y. x \<in> s \<and> y \<in> t}" apply auto |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4399 |
apply(rule_tac x=y in exI) apply auto apply(rule_tac x=y in exI) by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4400 |
thus ?thesis using compact_closed_sums[OF assms(2,1)] by simp |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4401 |
qed |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4402 |
|
30488 | 4403 |
lemma compact_closed_differences: |
31401 | 4404 |
fixes s t :: "(real ^ _) set" |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4405 |
assumes "compact s" "closed t" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4406 |
shows "closed {x - y | x y. x \<in> s \<and> y \<in> t}" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4407 |
proof- |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4408 |
have "{x + y |x y. x \<in> s \<and> y \<in> uminus ` t} = {x - y |x y. x \<in> s \<and> y \<in> t}" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4409 |
apply auto apply(rule_tac x=xa in exI) apply auto apply(rule_tac x=xa in exI) by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4410 |
thus ?thesis using compact_closed_sums[OF assms(1) closed_negations[OF assms(2)]] by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4411 |
qed |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4412 |
|
30488 | 4413 |
lemma closed_compact_differences: |
31401 | 4414 |
fixes s t :: "(real ^ _) set" |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4415 |
assumes "closed s" "compact t" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4416 |
shows "closed {x - y | x y. x \<in> s \<and> y \<in> t}" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4417 |
proof- |
30488 | 4418 |
have "{x + y |x y. x \<in> s \<and> y \<in> uminus ` t} = {x - y |x y. x \<in> s \<and> y \<in> t}" |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4419 |
apply auto apply(rule_tac x=xa in exI) apply auto apply(rule_tac x=xa in exI) by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4420 |
thus ?thesis using closed_compact_sums[OF assms(1) compact_negations[OF assms(2)]] by simp |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4421 |
qed |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4422 |
|
30488 | 4423 |
lemma closed_translation: |
31345
80667d5bee32
generalize topological notions to class metric_space; add class perfect_space
huffman
parents:
31344
diff
changeset
|
4424 |
fixes s :: "(real ^ _) set" (* FIXME: generalize *) |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4425 |
assumes "closed s" shows "closed ((\<lambda>x. a + x) ` s)" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4426 |
proof- |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4427 |
have "{a + y |y. y \<in> s} = (op + a ` s)" by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4428 |
thus ?thesis using compact_closed_sums[OF compact_sing[of a] assms] by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4429 |
qed |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4430 |
|
30488 | 4431 |
lemma translation_UNIV: |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4432 |
"range (\<lambda>x::real^'a. a + x) = UNIV" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4433 |
apply (auto simp add: image_iff) apply(rule_tac x="x - a" in exI) by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4434 |
|
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4435 |
lemma translation_diff: "(\<lambda>x::real^'a. a + x) ` (s - t) = ((\<lambda>x. a + x) ` s) - ((\<lambda>x. a + x) ` t)" by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4436 |
|
30488 | 4437 |
lemma closure_translation: |
31345
80667d5bee32
generalize topological notions to class metric_space; add class perfect_space
huffman
parents:
31344
diff
changeset
|
4438 |
fixes s :: "(real ^ _) set" (* FIXME: generalize *) |
80667d5bee32
generalize topological notions to class metric_space; add class perfect_space
huffman
parents:
31344
diff
changeset
|
4439 |
shows "closure ((\<lambda>x. a + x) ` s) = (\<lambda>x. a + x) ` (closure s)" |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4440 |
proof- |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4441 |
have *:"op + a ` (UNIV - s) = UNIV - op + a ` s" apply auto unfolding image_iff apply(rule_tac x="x - a" in bexI) by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4442 |
show ?thesis unfolding closure_interior translation_diff translation_UNIV using interior_translation[of a "UNIV - s"] unfolding * by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4443 |
qed |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4444 |
|
30488 | 4445 |
lemma frontier_translation: |
31345
80667d5bee32
generalize topological notions to class metric_space; add class perfect_space
huffman
parents:
31344
diff
changeset
|
4446 |
fixes s :: "(real ^ _) set" (* FIXME: generalize *) |
80667d5bee32
generalize topological notions to class metric_space; add class perfect_space
huffman
parents:
31344
diff
changeset
|
4447 |
shows "frontier((\<lambda>x. a + x) ` s) = (\<lambda>x. a + x) ` (frontier s)" |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4448 |
unfolding frontier_def translation_diff interior_translation closure_translation by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4449 |
|
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4450 |
subsection{* Separation between points and sets. *} |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4451 |
|
30488 | 4452 |
lemma separate_point_closed: |
31345
80667d5bee32
generalize topological notions to class metric_space; add class perfect_space
huffman
parents:
31344
diff
changeset
|
4453 |
fixes s :: "(real ^ _) set" (* FIXME: generalize *) |
80667d5bee32
generalize topological notions to class metric_space; add class perfect_space
huffman
parents:
31344
diff
changeset
|
4454 |
shows "closed s \<Longrightarrow> a \<notin> s ==> (\<exists>d>0. \<forall>x\<in>s. d \<le> dist a x)" |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4455 |
proof(cases "s = {}") |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4456 |
case True |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4457 |
thus ?thesis by(auto intro!: exI[where x=1]) |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4458 |
next |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4459 |
case False |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4460 |
assume "closed s" "a \<notin> s" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4461 |
then obtain x where "x\<in>s" "\<forall>y\<in>s. dist a x \<le> dist a y" using `s \<noteq> {}` distance_attains_inf [of s a] by blast |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4462 |
with `x\<in>s` show ?thesis using dist_pos_lt[of a x] and`a \<notin> s` by blast |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4463 |
qed |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4464 |
|
30488 | 4465 |
lemma separate_compact_closed: |
31401 | 4466 |
fixes s t :: "(real ^ _) set" |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4467 |
assumes "compact s" and "closed t" and "s \<inter> t = {}" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4468 |
shows "\<exists>d>0. \<forall>x\<in>s. \<forall>y\<in>t. d \<le> dist x y" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4469 |
proof- |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4470 |
have "0 \<notin> {x - y |x y. x \<in> s \<and> y \<in> t}" using assms(3) by auto |
30488 | 4471 |
then obtain d where "d>0" and d:"\<forall>x\<in>{x - y |x y. x \<in> s \<and> y \<in> t}. d \<le> dist 0 x" |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4472 |
using separate_point_closed[OF compact_closed_differences[OF assms(1,2)], of 0] by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4473 |
{ fix x y assume "x\<in>s" "y\<in>t" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4474 |
hence "x - y \<in> {x - y |x y. x \<in> s \<and> y \<in> t}" by auto |
31285
0a3f9ee4117c
generalize dist function to class real_normed_vector
huffman
parents:
31275
diff
changeset
|
4475 |
hence "d \<le> dist (x - y) 0" using d[THEN bspec[where x="x - y"]] using dist_commute |
0a3f9ee4117c
generalize dist function to class real_normed_vector
huffman
parents:
31275
diff
changeset
|
4476 |
by (auto simp add: dist_commute) |
31289 | 4477 |
hence "d \<le> dist x y" unfolding dist_norm by auto } |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4478 |
thus ?thesis using `d>0` by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4479 |
qed |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4480 |
|
30488 | 4481 |
lemma separate_closed_compact: |
31401 | 4482 |
fixes s t :: "(real ^ _) set" |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4483 |
assumes "closed s" and "compact t" and "s \<inter> t = {}" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4484 |
shows "\<exists>d>0. \<forall>x\<in>s. \<forall>y\<in>t. d \<le> dist x y" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4485 |
proof- |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4486 |
have *:"t \<inter> s = {}" using assms(3) by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4487 |
show ?thesis using separate_compact_closed[OF assms(2,1) *] |
30488 | 4488 |
apply auto apply(rule_tac x=d in exI) apply auto apply (erule_tac x=y in ballE) |
31285
0a3f9ee4117c
generalize dist function to class real_normed_vector
huffman
parents:
31275
diff
changeset
|
4489 |
by (auto simp add: dist_commute) |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4490 |
qed |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4491 |
|
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4492 |
(* A cute way of denoting open and closed intervals using overloading. *) |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4493 |
|
30582 | 4494 |
lemma interval: fixes a :: "'a::ord^'n::finite" shows |
4495 |
"{a <..< b} = {x::'a^'n. \<forall>i. a$i < x$i \<and> x$i < b$i}" and |
|
4496 |
"{a .. b} = {x::'a^'n. \<forall>i. a$i \<le> x$i \<and> x$i \<le> b$i}" |
|
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4497 |
by (auto simp add: expand_set_eq vector_less_def vector_less_eq_def) |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4498 |
|
30582 | 4499 |
lemma mem_interval: fixes a :: "'a::ord^'n::finite" shows |
4500 |
"x \<in> {a<..<b} \<longleftrightarrow> (\<forall>i. a$i < x$i \<and> x$i < b$i)" |
|
4501 |
"x \<in> {a .. b} \<longleftrightarrow> (\<forall>i. a$i \<le> x$i \<and> x$i \<le> b$i)" |
|
31282 | 4502 |
using interval[of a b] by(auto simp add: expand_set_eq vector_less_def vector_less_eq_def) |
4503 |
||
4504 |
lemma mem_interval_1: fixes x :: "real^1" shows |
|
4505 |
"(x \<in> {a .. b} \<longleftrightarrow> dest_vec1 a \<le> dest_vec1 x \<and> dest_vec1 x \<le> dest_vec1 b)" |
|
4506 |
"(x \<in> {a<..<b} \<longleftrightarrow> dest_vec1 a < dest_vec1 x \<and> dest_vec1 x < dest_vec1 b)" |
|
4507 |
by(simp_all add: Cart_eq vector_less_def vector_less_eq_def dest_vec1_def forall_1) |
|
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4508 |
|
30582 | 4509 |
lemma interval_eq_empty: fixes a :: "real^'n::finite" shows |
4510 |
"({a <..< b} = {} \<longleftrightarrow> (\<exists>i. b$i \<le> a$i))" (is ?th1) and |
|
4511 |
"({a .. b} = {} \<longleftrightarrow> (\<exists>i. b$i < a$i))" (is ?th2) |
|
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4512 |
proof- |
30582 | 4513 |
{ fix i x assume as:"b$i \<le> a$i" and x:"x\<in>{a <..< b}" |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4514 |
hence "a $ i < x $ i \<and> x $ i < b $ i" unfolding mem_interval by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4515 |
hence "a$i < b$i" by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4516 |
hence False using as by auto } |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4517 |
moreover |
30582 | 4518 |
{ assume as:"\<forall>i. \<not> (b$i \<le> a$i)" |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4519 |
let ?x = "(1/2) *s (a + b)" |
30582 | 4520 |
{ fix i |
4521 |
have "a$i < b$i" using as[THEN spec[where x=i]] by auto |
|
30488 | 4522 |
hence "a$i < ((1/2) *s (a+b)) $ i" "((1/2) *s (a+b)) $ i < b$i" |
30582 | 4523 |
unfolding vector_smult_component and vector_add_component |
30654 | 4524 |
by (auto simp add: less_divide_eq_number_of1) } |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4525 |
hence "{a <..< b} \<noteq> {}" using mem_interval(1)[of "?x" a b] by auto } |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4526 |
ultimately show ?th1 by blast |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4527 |
|
30582 | 4528 |
{ fix i x assume as:"b$i < a$i" and x:"x\<in>{a .. b}" |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4529 |
hence "a $ i \<le> x $ i \<and> x $ i \<le> b $ i" unfolding mem_interval by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4530 |
hence "a$i \<le> b$i" by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4531 |
hence False using as by auto } |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4532 |
moreover |
30582 | 4533 |
{ assume as:"\<forall>i. \<not> (b$i < a$i)" |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4534 |
let ?x = "(1/2) *s (a + b)" |
30582 | 4535 |
{ fix i |
4536 |
have "a$i \<le> b$i" using as[THEN spec[where x=i]] by auto |
|
30488 | 4537 |
hence "a$i \<le> ((1/2) *s (a+b)) $ i" "((1/2) *s (a+b)) $ i \<le> b$i" |
30582 | 4538 |
unfolding vector_smult_component and vector_add_component |
30654 | 4539 |
by (auto simp add: less_divide_eq_number_of1) } |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4540 |
hence "{a .. b} \<noteq> {}" using mem_interval(2)[of "?x" a b] by auto } |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4541 |
ultimately show ?th2 by blast |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4542 |
qed |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4543 |
|
30582 | 4544 |
lemma interval_ne_empty: fixes a :: "real^'n::finite" shows |
4545 |
"{a .. b} \<noteq> {} \<longleftrightarrow> (\<forall>i. a$i \<le> b$i)" and |
|
4546 |
"{a <..< b} \<noteq> {} \<longleftrightarrow> (\<forall>i. a$i < b$i)" |
|
4547 |
unfolding interval_eq_empty[of a b] by (auto simp add: not_less not_le) (* BH: Why doesn't just "auto" work here? *) |
|
4548 |
||
4549 |
lemma subset_interval_imp: fixes a :: "real^'n::finite" shows |
|
4550 |
"(\<forall>i. a$i \<le> c$i \<and> d$i \<le> b$i) \<Longrightarrow> {c .. d} \<subseteq> {a .. b}" and |
|
4551 |
"(\<forall>i. a$i < c$i \<and> d$i < b$i) \<Longrightarrow> {c .. d} \<subseteq> {a<..<b}" and |
|
4552 |
"(\<forall>i. a$i \<le> c$i \<and> d$i \<le> b$i) \<Longrightarrow> {c<..<d} \<subseteq> {a .. b}" and |
|
4553 |
"(\<forall>i. a$i \<le> c$i \<and> d$i \<le> b$i) \<Longrightarrow> {c<..<d} \<subseteq> {a<..<b}" |
|
4554 |
unfolding subset_eq[unfolded Ball_def] unfolding mem_interval |
|
4555 |
by (auto intro: order_trans less_le_trans le_less_trans less_imp_le) (* BH: Why doesn't just "auto" work here? *) |
|
4556 |
||
4557 |
lemma interval_sing: fixes a :: "'a::linorder^'n::finite" shows |
|
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4558 |
"{a .. a} = {a} \<and> {a<..<a} = {}" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4559 |
apply(auto simp add: expand_set_eq vector_less_def vector_less_eq_def Cart_eq) |
30582 | 4560 |
apply (simp add: order_eq_iff) |
4561 |
apply (auto simp add: not_less less_imp_le) |
|
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4562 |
done |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4563 |
|
30582 | 4564 |
lemma interval_open_subset_closed: fixes a :: "'a::preorder^'n::finite" shows |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4565 |
"{a<..<b} \<subseteq> {a .. b}" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4566 |
proof(simp add: subset_eq, rule) |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4567 |
fix x |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4568 |
assume x:"x \<in>{a<..<b}" |
30582 | 4569 |
{ fix i |
4570 |
have "a $ i \<le> x $ i" |
|
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4571 |
using x order_less_imp_le[of "a$i" "x$i"] |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4572 |
by(simp add: expand_set_eq vector_less_def vector_less_eq_def Cart_eq) |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4573 |
} |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4574 |
moreover |
30582 | 4575 |
{ fix i |
4576 |
have "x $ i \<le> b $ i" |
|
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4577 |
using x order_less_imp_le[of "x$i" "b$i"] |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4578 |
by(simp add: expand_set_eq vector_less_def vector_less_eq_def Cart_eq) |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4579 |
} |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4580 |
ultimately |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4581 |
show "a \<le> x \<and> x \<le> b" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4582 |
by(simp add: expand_set_eq vector_less_def vector_less_eq_def Cart_eq) |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4583 |
qed |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4584 |
|
30582 | 4585 |
lemma subset_interval: fixes a :: "real^'n::finite" shows |
4586 |
"{c .. d} \<subseteq> {a .. b} \<longleftrightarrow> (\<forall>i. c$i \<le> d$i) --> (\<forall>i. a$i \<le> c$i \<and> d$i \<le> b$i)" (is ?th1) and |
|
4587 |
"{c .. d} \<subseteq> {a<..<b} \<longleftrightarrow> (\<forall>i. c$i \<le> d$i) --> (\<forall>i. a$i < c$i \<and> d$i < b$i)" (is ?th2) and |
|
4588 |
"{c<..<d} \<subseteq> {a .. b} \<longleftrightarrow> (\<forall>i. c$i < d$i) --> (\<forall>i. a$i \<le> c$i \<and> d$i \<le> b$i)" (is ?th3) and |
|
4589 |
"{c<..<d} \<subseteq> {a<..<b} \<longleftrightarrow> (\<forall>i. c$i < d$i) --> (\<forall>i. a$i \<le> c$i \<and> d$i \<le> b$i)" (is ?th4) |
|
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4590 |
proof- |
30582 | 4591 |
show ?th1 unfolding subset_eq and Ball_def and mem_interval by (auto intro: order_trans) |
4592 |
show ?th2 unfolding subset_eq and Ball_def and mem_interval by (auto intro: le_less_trans less_le_trans order_trans less_imp_le) |
|
4593 |
{ assume as: "{c<..<d} \<subseteq> {a .. b}" "\<forall>i. c$i < d$i" |
|
4594 |
hence "{c<..<d} \<noteq> {}" unfolding interval_eq_empty by (auto, drule_tac x=i in spec, simp) (* BH: Why doesn't just "auto" work? *) |
|
4595 |
fix i |
|
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4596 |
(** TODO combine the following two parts as done in the HOL_light version. **) |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4597 |
{ let ?x = "(\<chi> j. (if j=i then ((min (a$j) (d$j))+c$j)/2 else (c$j+d$j)/2))::real^'n" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4598 |
assume as2: "a$i > c$i" |
30582 | 4599 |
{ fix j |
4600 |
have "c $ j < ?x $ j \<and> ?x $ j < d $ j" unfolding Cart_lambda_beta |
|
4601 |
apply(cases "j=i") using as(2)[THEN spec[where x=j]] |
|
30654 | 4602 |
by (auto simp add: less_divide_eq_number_of1 as2) } |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4603 |
hence "?x\<in>{c<..<d}" unfolding mem_interval by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4604 |
moreover |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4605 |
have "?x\<notin>{a .. b}" |
30582 | 4606 |
unfolding mem_interval apply auto apply(rule_tac x=i in exI) |
4607 |
using as(2)[THEN spec[where x=i]] and as2 |
|
30654 | 4608 |
by (auto simp add: less_divide_eq_number_of1) |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4609 |
ultimately have False using as by auto } |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4610 |
hence "a$i \<le> c$i" by(rule ccontr)auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4611 |
moreover |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4612 |
{ let ?x = "(\<chi> j. (if j=i then ((max (b$j) (c$j))+d$j)/2 else (c$j+d$j)/2))::real^'n" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4613 |
assume as2: "b$i < d$i" |
30582 | 4614 |
{ fix j |
4615 |
have "d $ j > ?x $ j \<and> ?x $ j > c $ j" unfolding Cart_lambda_beta |
|
4616 |
apply(cases "j=i") using as(2)[THEN spec[where x=j]] |
|
30654 | 4617 |
by (auto simp add: less_divide_eq_number_of1 as2) } |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4618 |
hence "?x\<in>{c<..<d}" unfolding mem_interval by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4619 |
moreover |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4620 |
have "?x\<notin>{a .. b}" |
30582 | 4621 |
unfolding mem_interval apply auto apply(rule_tac x=i in exI) |
4622 |
using as(2)[THEN spec[where x=i]] and as2 |
|
30654 | 4623 |
by (auto simp add: less_divide_eq_number_of1) |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4624 |
ultimately have False using as by auto } |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4625 |
hence "b$i \<ge> d$i" by(rule ccontr)auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4626 |
ultimately |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4627 |
have "a$i \<le> c$i \<and> d$i \<le> b$i" by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4628 |
} note part1 = this |
30582 | 4629 |
thus ?th3 unfolding subset_eq and Ball_def and mem_interval apply auto apply (erule_tac x=ia in allE, simp)+ by (erule_tac x=i in allE, erule_tac x=i in allE, simp)+ |
4630 |
{ assume as:"{c<..<d} \<subseteq> {a<..<b}" "\<forall>i. c$i < d$i" |
|
4631 |
fix i |
|
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4632 |
from as(1) have "{c<..<d} \<subseteq> {a..b}" using interval_open_subset_closed[of a b] by auto |
30582 | 4633 |
hence "a$i \<le> c$i \<and> d$i \<le> b$i" using part1 and as(2) by auto } note * = this |
4634 |
thus ?th4 unfolding subset_eq and Ball_def and mem_interval apply auto apply (erule_tac x=ia in allE, simp)+ by (erule_tac x=i in allE, erule_tac x=i in allE, simp)+ |
|
4635 |
qed |
|
4636 |
||
4637 |
lemma disjoint_interval: fixes a::"real^'n::finite" shows |
|
4638 |
"{a .. b} \<inter> {c .. d} = {} \<longleftrightarrow> (\<exists>i. (b$i < a$i \<or> d$i < c$i \<or> b$i < c$i \<or> d$i < a$i))" (is ?th1) and |
|
4639 |
"{a .. b} \<inter> {c<..<d} = {} \<longleftrightarrow> (\<exists>i. (b$i < a$i \<or> d$i \<le> c$i \<or> b$i \<le> c$i \<or> d$i \<le> a$i))" (is ?th2) and |
|
4640 |
"{a<..<b} \<inter> {c .. d} = {} \<longleftrightarrow> (\<exists>i. (b$i \<le> a$i \<or> d$i < c$i \<or> b$i \<le> c$i \<or> d$i \<le> a$i))" (is ?th3) and |
|
4641 |
"{a<..<b} \<inter> {c<..<d} = {} \<longleftrightarrow> (\<exists>i. (b$i \<le> a$i \<or> d$i \<le> c$i \<or> b$i \<le> c$i \<or> d$i \<le> a$i))" (is ?th4) |
|
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4642 |
proof- |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4643 |
let ?z = "(\<chi> i. ((max (a$i) (c$i)) + (min (b$i) (d$i))) / 2)::real^'n" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4644 |
show ?th1 ?th2 ?th3 ?th4 |
30582 | 4645 |
unfolding expand_set_eq and Int_iff and empty_iff and mem_interval and all_conj_distrib[THEN sym] and eq_False |
4646 |
apply (auto elim!: allE[where x="?z"]) |
|
4647 |
apply ((rule_tac x=x in exI, force) | (rule_tac x=i in exI, force))+ |
|
4648 |
done |
|
4649 |
qed |
|
4650 |
||
4651 |
lemma inter_interval: fixes a :: "'a::linorder^'n::finite" shows |
|
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4652 |
"{a .. b} \<inter> {c .. d} = {(\<chi> i. max (a$i) (c$i)) .. (\<chi> i. min (b$i) (d$i))}" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4653 |
unfolding expand_set_eq and Int_iff and mem_interval |
30654 | 4654 |
by (auto simp add: less_divide_eq_number_of1 intro!: bexI) |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4655 |
|
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4656 |
(* Moved interval_open_subset_closed a bit upwards *) |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4657 |
|
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4658 |
lemma open_interval_lemma: fixes x :: "real" shows |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4659 |
"a < x \<Longrightarrow> x < b ==> (\<exists>d>0. \<forall>x'. abs(x' - x) < d --> a < x' \<and> x' < b)" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4660 |
by(rule_tac x="min (x - a) (b - x)" in exI, auto) |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4661 |
|
30582 | 4662 |
lemma open_interval: fixes a :: "real^'n::finite" shows "open {a<..<b}" |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4663 |
proof- |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4664 |
{ fix x assume x:"x\<in>{a<..<b}" |
30582 | 4665 |
{ fix i |
4666 |
have "\<exists>d>0. \<forall>x'. abs (x' - (x$i)) < d \<longrightarrow> a$i < x' \<and> x' < b$i" |
|
4667 |
using x[unfolded mem_interval, THEN spec[where x=i]] |
|
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4668 |
using open_interval_lemma[of "a$i" "x$i" "b$i"] by auto } |
30488 | 4669 |
|
30582 | 4670 |
hence "\<forall>i. \<exists>d>0. \<forall>x'. abs (x' - (x$i)) < d \<longrightarrow> a$i < x' \<and> x' < b$i" by auto |
4671 |
then obtain d where d:"\<forall>i. 0 < d i \<and> (\<forall>x'. \<bar>x' - x $ i\<bar> < d i \<longrightarrow> a $ i < x' \<and> x' < b $ i)" |
|
4672 |
using bchoice[of "UNIV" "\<lambda>i d. d>0 \<and> (\<forall>x'. \<bar>x' - x $ i\<bar> < d \<longrightarrow> a $ i < x' \<and> x' < b $ i)"] by auto |
|
4673 |
||
4674 |
let ?d = "Min (range d)" |
|
4675 |
have **:"finite (range d)" "range d \<noteq> {}" by auto |
|
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4676 |
have "?d>0" unfolding Min_gr_iff[OF **] using d by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4677 |
moreover |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4678 |
{ fix x' assume as:"dist x' x < ?d" |
30582 | 4679 |
{ fix i |
30488 | 4680 |
have "\<bar>x'$i - x $ i\<bar> < d i" |
31289 | 4681 |
using norm_bound_component_lt[OF as[unfolded dist_norm], of i] |
30582 | 4682 |
unfolding vector_minus_component and Min_gr_iff[OF **] by auto |
4683 |
hence "a $ i < x' $ i" "x' $ i < b $ i" using d[THEN spec[where x=i]] by auto } |
|
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4684 |
hence "a < x' \<and> x' < b" unfolding vector_less_def by auto } |
30582 | 4685 |
ultimately have "\<exists>e>0. \<forall>x'. dist x' x < e \<longrightarrow> x' \<in> {a<..<b}" by (auto, rule_tac x="?d" in exI, simp) |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4686 |
} |
31418
9baa48bad81c
generalize some constants and lemmas to class topological_space
huffman
parents:
31402
diff
changeset
|
4687 |
thus ?thesis unfolding open_dist using open_interval_lemma by auto |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4688 |
qed |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4689 |
|
30582 | 4690 |
lemma closed_interval: fixes a :: "real^'n::finite" shows "closed {a .. b}" |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4691 |
proof- |
30582 | 4692 |
{ fix x i assume as:"\<forall>e>0. \<exists>x'\<in>{a..b}. x' \<noteq> x \<and> dist x' x < e"(* and xab:"a$i > x$i \<or> b$i < x$i"*) |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4693 |
{ assume xa:"a$i > x$i" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4694 |
with as obtain y where y:"y\<in>{a..b}" "y \<noteq> x" "dist y x < a$i - x$i" by(erule_tac x="a$i - x$i" in allE)auto |
31289 | 4695 |
hence False unfolding mem_interval and dist_norm |
30582 | 4696 |
using component_le_norm[of "y-x" i, unfolded vector_minus_component] and xa by(auto elim!: allE[where x=i]) |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4697 |
} hence "a$i \<le> x$i" by(rule ccontr)auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4698 |
moreover |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4699 |
{ assume xb:"b$i < x$i" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4700 |
with as obtain y where y:"y\<in>{a..b}" "y \<noteq> x" "dist y x < x$i - b$i" by(erule_tac x="x$i - b$i" in allE)auto |
31289 | 4701 |
hence False unfolding mem_interval and dist_norm |
30582 | 4702 |
using component_le_norm[of "y-x" i, unfolded vector_minus_component] and xb by(auto elim!: allE[where x=i]) |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4703 |
} hence "x$i \<le> b$i" by(rule ccontr)auto |
30488 | 4704 |
ultimately |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4705 |
have "a $ i \<le> x $ i \<and> x $ i \<le> b $ i" by auto } |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4706 |
thus ?thesis unfolding closed_limpt islimpt_approachable mem_interval by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4707 |
qed |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4708 |
|
30582 | 4709 |
lemma interior_closed_interval: fixes a :: "real^'n::finite" shows |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4710 |
"interior {a .. b} = {a<..<b}" (is "?L = ?R") |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4711 |
proof(rule subset_antisym) |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4712 |
show "?R \<subseteq> ?L" using interior_maximal[OF interval_open_subset_closed open_interval] by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4713 |
next |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4714 |
{ fix x assume "\<exists>T. open T \<and> x \<in> T \<and> T \<subseteq> {a..b}" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4715 |
then obtain s where s:"open s" "x \<in> s" "s \<subseteq> {a..b}" by auto |
31418
9baa48bad81c
generalize some constants and lemmas to class topological_space
huffman
parents:
31402
diff
changeset
|
4716 |
then obtain e where "e>0" and e:"\<forall>x'. dist x' x < e \<longrightarrow> x' \<in> {a..b}" unfolding open_dist and subset_eq by auto |
30582 | 4717 |
{ fix i |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4718 |
have "dist (x - (e / 2) *s basis i) x < e" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4719 |
"dist (x + (e / 2) *s basis i) x < e" |
31289 | 4720 |
unfolding dist_norm apply auto |
30582 | 4721 |
unfolding norm_minus_cancel and norm_mul using norm_basis[of i] and `e>0` by auto |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4722 |
hence "a $ i \<le> (x - (e / 2) *s basis i) $ i" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4723 |
"(x + (e / 2) *s basis i) $ i \<le> b $ i" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4724 |
using e[THEN spec[where x="x - (e/2) *s basis i"]] |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4725 |
and e[THEN spec[where x="x + (e/2) *s basis i"]] |
30582 | 4726 |
unfolding mem_interval by (auto elim!: allE[where x=i]) |
30488 | 4727 |
hence "a $ i < x $ i" and "x $ i < b $ i" |
30582 | 4728 |
unfolding vector_minus_component and vector_add_component |
4729 |
unfolding vector_smult_component and basis_component using `e>0` by auto } |
|
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4730 |
hence "x \<in> {a<..<b}" unfolding mem_interval by auto } |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4731 |
thus "?L \<subseteq> ?R" unfolding interior_def and subset_eq by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4732 |
qed |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4733 |
|
30582 | 4734 |
lemma bounded_closed_interval: fixes a :: "real^'n::finite" shows |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4735 |
"bounded {a .. b}" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4736 |
proof- |
30582 | 4737 |
let ?b = "\<Sum>i\<in>UNIV. \<bar>a$i\<bar> + \<bar>b$i\<bar>" |
4738 |
{ fix x::"real^'n" assume x:"\<forall>i. a $ i \<le> x $ i \<and> x $ i \<le> b $ i" |
|
4739 |
{ fix i |
|
4740 |
have "\<bar>x$i\<bar> \<le> \<bar>a$i\<bar> + \<bar>b$i\<bar>" using x[THEN spec[where x=i]] by auto } |
|
4741 |
hence "(\<Sum>i\<in>UNIV. \<bar>x $ i\<bar>) \<le> ?b" by(rule setsum_mono) |
|
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4742 |
hence "norm x \<le> ?b" using norm_le_l1[of x] by auto } |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4743 |
thus ?thesis unfolding interval and bounded_def by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4744 |
qed |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4745 |
|
30582 | 4746 |
lemma bounded_interval: fixes a :: "real^'n::finite" shows |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4747 |
"bounded {a .. b} \<and> bounded {a<..<b}" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4748 |
using bounded_closed_interval[of a b] |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4749 |
using interval_open_subset_closed[of a b] |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4750 |
using bounded_subset[of "{a..b}" "{a<..<b}"] |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4751 |
by simp |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4752 |
|
30582 | 4753 |
lemma not_interval_univ: fixes a :: "real^'n::finite" shows |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4754 |
"({a .. b} \<noteq> UNIV) \<and> ({a<..<b} \<noteq> UNIV)" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4755 |
using bounded_interval[of a b] |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4756 |
by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4757 |
|
30582 | 4758 |
lemma compact_interval: fixes a :: "real^'n::finite" shows |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4759 |
"compact {a .. b}" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4760 |
using bounded_closed_imp_compact using bounded_interval[of a b] using closed_interval[of a b] by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4761 |
|
30582 | 4762 |
lemma open_interval_midpoint: fixes a :: "real^'n::finite" |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4763 |
assumes "{a<..<b} \<noteq> {}" shows "((1/2) *s (a + b)) \<in> {a<..<b}" |
30488 | 4764 |
proof- |
30582 | 4765 |
{ fix i |
4766 |
have "a $ i < ((1 / 2) *s (a + b)) $ i \<and> ((1 / 2) *s (a + b)) $ i < b $ i" |
|
4767 |
using assms[unfolded interval_ne_empty, THEN spec[where x=i]] |
|
4768 |
unfolding vector_smult_component and vector_add_component |
|
30654 | 4769 |
by(auto simp add: less_divide_eq_number_of1) } |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4770 |
thus ?thesis unfolding mem_interval by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4771 |
qed |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4772 |
|
30582 | 4773 |
lemma open_closed_interval_convex: fixes x :: "real^'n::finite" |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4774 |
assumes x:"x \<in> {a<..<b}" and y:"y \<in> {a .. b}" and e:"0 < e" "e \<le> 1" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4775 |
shows "(e *s x + (1 - e) *s y) \<in> {a<..<b}" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4776 |
proof- |
30582 | 4777 |
{ fix i |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4778 |
have "a $ i = e * a$i + (1 - e) * a$i" unfolding left_diff_distrib by simp |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4779 |
also have "\<dots> < e * x $ i + (1 - e) * y $ i" apply(rule add_less_le_mono) |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4780 |
using e unfolding mult_less_cancel_left and mult_le_cancel_left apply simp_all |
30582 | 4781 |
using x unfolding mem_interval apply simp |
4782 |
using y unfolding mem_interval apply simp |
|
4783 |
done |
|
4784 |
finally have "a $ i < (e *s x + (1 - e) *s y) $ i" by auto |
|
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4785 |
moreover { |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4786 |
have "b $ i = e * b$i + (1 - e) * b$i" unfolding left_diff_distrib by simp |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4787 |
also have "\<dots> > e * x $ i + (1 - e) * y $ i" apply(rule add_less_le_mono) |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4788 |
using e unfolding mult_less_cancel_left and mult_le_cancel_left apply simp_all |
30582 | 4789 |
using x unfolding mem_interval apply simp |
4790 |
using y unfolding mem_interval apply simp |
|
4791 |
done |
|
4792 |
finally have "(e *s x + (1 - e) *s y) $ i < b $ i" by auto |
|
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4793 |
} ultimately have "a $ i < (e *s x + (1 - e) *s y) $ i \<and> (e *s x + (1 - e) *s y) $ i < b $ i" by auto } |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4794 |
thus ?thesis unfolding mem_interval by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4795 |
qed |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4796 |
|
30582 | 4797 |
lemma closure_open_interval: fixes a :: "real^'n::finite" |
30488 | 4798 |
assumes "{a<..<b} \<noteq> {}" |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4799 |
shows "closure {a<..<b} = {a .. b}" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4800 |
proof- |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4801 |
have ab:"a < b" using assms[unfolded interval_ne_empty] unfolding vector_less_def by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4802 |
let ?c = "(1 / 2) *s (a + b)" |
30488 | 4803 |
{ fix x assume as:"x \<in> {a .. b}" |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4804 |
def f == "\<lambda>n::nat. x + (inverse (real n + 1)) *s (?c - x)" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4805 |
{ fix n assume fn:"f n < b \<longrightarrow> a < f n \<longrightarrow> f n = x" and xc:"x \<noteq> ?c" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4806 |
have *:"0 < inverse (real n + 1)" "inverse (real n + 1) \<le> 1" unfolding inverse_le_1_iff by auto |
31275 | 4807 |
have "(inverse (real n + 1)) *s ((1 / 2) *s (a + b)) + (1 - inverse (real n + 1)) *s x = |
4808 |
x + (inverse (real n + 1)) *s ((1 / 2 *s (a + b)) - x)" by (auto simp add: vector_ssub_ldistrib vector_add_ldistrib field_simps vector_sadd_rdistrib[THEN sym]) |
|
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4809 |
hence "f n < b" and "a < f n" using open_closed_interval_convex[OF open_interval_midpoint[OF assms] as *] unfolding f_def by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4810 |
hence False using fn unfolding f_def using xc by(auto simp add: vector_mul_lcancel vector_ssub_ldistrib) } |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4811 |
moreover |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4812 |
{ assume "\<not> (f ---> x) sequentially" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4813 |
{ fix e::real assume "e>0" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4814 |
hence "\<exists>N::nat. inverse (real (N + 1)) < e" using real_arch_inv[of e] apply (auto simp add: Suc_pred') apply(rule_tac x="n - 1" in exI) by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4815 |
then obtain N::nat where "inverse (real (N + 1)) < e" by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4816 |
hence "\<forall>n\<ge>N. inverse (real n + 1) < e" by (auto, metis Suc_le_mono le_SucE less_imp_inverse_less nat_le_real_less order_less_trans real_of_nat_Suc real_of_nat_Suc_gt_zero) |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4817 |
hence "\<exists>N::nat. \<forall>n\<ge>N. inverse (real n + 1) < e" by auto } |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4818 |
hence "((vec1 \<circ> (\<lambda>n. inverse (real n + 1))) ---> vec1 0) sequentially" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4819 |
unfolding Lim_sequentially by(auto simp add: dist_vec1) |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4820 |
hence "(f ---> x) sequentially" unfolding f_def |
30488 | 4821 |
using Lim_add[OF Lim_const, of "\<lambda>n::nat. (inverse (real n + 1)) *s ((1 / 2) *s (a + b) - x)" 0 sequentially x] |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4822 |
using Lim_vmul[of "\<lambda>n::nat. inverse (real n + 1)" 0 sequentially "((1 / 2) *s (a + b) - x)"] by auto } |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4823 |
ultimately have "x \<in> closure {a<..<b}" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4824 |
using as and open_interval_midpoint[OF assms] unfolding closure_def unfolding islimpt_sequential by(cases "x=?c")auto } |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4825 |
thus ?thesis using closure_minimal[OF interval_open_subset_closed closed_interval, of a b] by blast |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4826 |
qed |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4827 |
|
30582 | 4828 |
lemma bounded_subset_open_interval_symmetric: fixes s::"(real^'n::finite) set" |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4829 |
assumes "bounded s" shows "\<exists>a. s \<subseteq> {-a<..<a}" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4830 |
proof- |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4831 |
obtain b where "b>0" and b:"\<forall>x\<in>s. norm x \<le> b" using assms[unfolded bounded_pos] by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4832 |
def a \<equiv> "(\<chi> i. b+1)::real^'n" |
30488 | 4833 |
{ fix x assume "x\<in>s" |
30582 | 4834 |
fix i |
4835 |
have "(-a)$i < x$i" and "x$i < a$i" using b[THEN bspec[where x=x], OF `x\<in>s`] and component_le_norm[of x i] |
|
4836 |
unfolding vector_uminus_component and a_def and Cart_lambda_beta by auto |
|
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4837 |
} |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4838 |
thus ?thesis by(auto intro: exI[where x=a] simp add: vector_less_def) |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4839 |
qed |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4840 |
|
30488 | 4841 |
lemma bounded_subset_open_interval: |
31400 | 4842 |
fixes s :: "(real ^ 'n::finite) set" |
4843 |
shows "bounded s ==> (\<exists>a b. s \<subseteq> {a<..<b})" |
|
4844 |
by (auto dest!: bounded_subset_open_interval_symmetric) |
|
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4845 |
|
30488 | 4846 |
lemma bounded_subset_closed_interval_symmetric: |
31400 | 4847 |
fixes s :: "(real ^ 'n::finite) set" |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4848 |
assumes "bounded s" shows "\<exists>a. s \<subseteq> {-a .. a}" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4849 |
proof- |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4850 |
obtain a where "s \<subseteq> {- a<..<a}" using bounded_subset_open_interval_symmetric[OF assms] by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4851 |
thus ?thesis using interval_open_subset_closed[of "-a" a] by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4852 |
qed |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4853 |
|
30488 | 4854 |
lemma bounded_subset_closed_interval: |
31400 | 4855 |
fixes s :: "(real ^ 'n::finite) set" |
4856 |
shows "bounded s ==> (\<exists>a b. s \<subseteq> {a .. b})" |
|
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4857 |
using bounded_subset_closed_interval_symmetric[of s] by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4858 |
|
30488 | 4859 |
lemma frontier_closed_interval: |
31345
80667d5bee32
generalize topological notions to class metric_space; add class perfect_space
huffman
parents:
31344
diff
changeset
|
4860 |
fixes a b :: "real ^ _" |
80667d5bee32
generalize topological notions to class metric_space; add class perfect_space
huffman
parents:
31344
diff
changeset
|
4861 |
shows "frontier {a .. b} = {a .. b} - {a<..<b}" |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4862 |
unfolding frontier_def unfolding interior_closed_interval and closure_closed[OF closed_interval] .. |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4863 |
|
30488 | 4864 |
lemma frontier_open_interval: |
31345
80667d5bee32
generalize topological notions to class metric_space; add class perfect_space
huffman
parents:
31344
diff
changeset
|
4865 |
fixes a b :: "real ^ _" |
80667d5bee32
generalize topological notions to class metric_space; add class perfect_space
huffman
parents:
31344
diff
changeset
|
4866 |
shows "frontier {a<..<b} = (if {a<..<b} = {} then {} else {a .. b} - {a<..<b})" |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4867 |
proof(cases "{a<..<b} = {}") |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4868 |
case True thus ?thesis using frontier_empty by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4869 |
next |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4870 |
case False thus ?thesis unfolding frontier_def and closure_open_interval[OF False] and interior_open[OF open_interval] by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4871 |
qed |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4872 |
|
30582 | 4873 |
lemma inter_interval_mixed_eq_empty: fixes a :: "real^'n::finite" |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4874 |
assumes "{c<..<d} \<noteq> {}" shows "{a<..<b} \<inter> {c .. d} = {} \<longleftrightarrow> {a<..<b} \<inter> {c<..<d} = {}" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4875 |
unfolding closure_open_interval[OF assms, THEN sym] unfolding open_inter_closure_eq_empty[OF open_interval] .. |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4876 |
|
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4877 |
|
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4878 |
(* Some special cases for intervals in R^1. *) |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4879 |
|
30582 | 4880 |
lemma all_1: "(\<forall>x::1. P x) \<longleftrightarrow> P 1" |
4881 |
by (metis num1_eq_iff) |
|
4882 |
||
4883 |
lemma ex_1: "(\<exists>x::1. P x) \<longleftrightarrow> P 1" |
|
4884 |
by auto (metis num1_eq_iff) |
|
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4885 |
|
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4886 |
lemma interval_cases_1: fixes x :: "real^1" shows |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4887 |
"x \<in> {a .. b} ==> x \<in> {a<..<b} \<or> (x = a) \<or> (x = b)" |
30582 | 4888 |
by(simp add: Cart_eq vector_less_def vector_less_eq_def all_1, auto) |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4889 |
|
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4890 |
lemma in_interval_1: fixes x :: "real^1" shows |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4891 |
"(x \<in> {a .. b} \<longleftrightarrow> dest_vec1 a \<le> dest_vec1 x \<and> dest_vec1 x \<le> dest_vec1 b) \<and> |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4892 |
(x \<in> {a<..<b} \<longleftrightarrow> dest_vec1 a < dest_vec1 x \<and> dest_vec1 x < dest_vec1 b)" |
30582 | 4893 |
by(simp add: Cart_eq vector_less_def vector_less_eq_def all_1 dest_vec1_def) |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4894 |
|
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4895 |
lemma interval_eq_empty_1: fixes a :: "real^1" shows |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4896 |
"{a .. b} = {} \<longleftrightarrow> dest_vec1 b < dest_vec1 a" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4897 |
"{a<..<b} = {} \<longleftrightarrow> dest_vec1 b \<le> dest_vec1 a" |
30582 | 4898 |
unfolding interval_eq_empty and ex_1 and dest_vec1_def by auto |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4899 |
|
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4900 |
lemma subset_interval_1: fixes a :: "real^1" shows |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4901 |
"({a .. b} \<subseteq> {c .. d} \<longleftrightarrow> dest_vec1 b < dest_vec1 a \<or> |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4902 |
dest_vec1 c \<le> dest_vec1 a \<and> dest_vec1 a \<le> dest_vec1 b \<and> dest_vec1 b \<le> dest_vec1 d)" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4903 |
"({a .. b} \<subseteq> {c<..<d} \<longleftrightarrow> dest_vec1 b < dest_vec1 a \<or> |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4904 |
dest_vec1 c < dest_vec1 a \<and> dest_vec1 a \<le> dest_vec1 b \<and> dest_vec1 b < dest_vec1 d)" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4905 |
"({a<..<b} \<subseteq> {c .. d} \<longleftrightarrow> dest_vec1 b \<le> dest_vec1 a \<or> |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4906 |
dest_vec1 c \<le> dest_vec1 a \<and> dest_vec1 a < dest_vec1 b \<and> dest_vec1 b \<le> dest_vec1 d)" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4907 |
"({a<..<b} \<subseteq> {c<..<d} \<longleftrightarrow> dest_vec1 b \<le> dest_vec1 a \<or> |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4908 |
dest_vec1 c \<le> dest_vec1 a \<and> dest_vec1 a < dest_vec1 b \<and> dest_vec1 b \<le> dest_vec1 d)" |
30582 | 4909 |
unfolding subset_interval[of a b c d] unfolding all_1 and dest_vec1_def by auto |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4910 |
|
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4911 |
lemma eq_interval_1: fixes a :: "real^1" shows |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4912 |
"{a .. b} = {c .. d} \<longleftrightarrow> |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4913 |
dest_vec1 b < dest_vec1 a \<and> dest_vec1 d < dest_vec1 c \<or> |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4914 |
dest_vec1 a = dest_vec1 c \<and> dest_vec1 b = dest_vec1 d" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4915 |
using set_eq_subset[of "{a .. b}" "{c .. d}"] |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4916 |
using subset_interval_1(1)[of a b c d] |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4917 |
using subset_interval_1(1)[of c d a b] |
31341 | 4918 |
by auto (* FIXME: slow *) |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4919 |
|
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4920 |
lemma disjoint_interval_1: fixes a :: "real^1" shows |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4921 |
"{a .. b} \<inter> {c .. d} = {} \<longleftrightarrow> dest_vec1 b < dest_vec1 a \<or> dest_vec1 d < dest_vec1 c \<or> dest_vec1 b < dest_vec1 c \<or> dest_vec1 d < dest_vec1 a" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4922 |
"{a .. b} \<inter> {c<..<d} = {} \<longleftrightarrow> dest_vec1 b < dest_vec1 a \<or> dest_vec1 d \<le> dest_vec1 c \<or> dest_vec1 b \<le> dest_vec1 c \<or> dest_vec1 d \<le> dest_vec1 a" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4923 |
"{a<..<b} \<inter> {c .. d} = {} \<longleftrightarrow> dest_vec1 b \<le> dest_vec1 a \<or> dest_vec1 d < dest_vec1 c \<or> dest_vec1 b \<le> dest_vec1 c \<or> dest_vec1 d \<le> dest_vec1 a" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4924 |
"{a<..<b} \<inter> {c<..<d} = {} \<longleftrightarrow> dest_vec1 b \<le> dest_vec1 a \<or> dest_vec1 d \<le> dest_vec1 c \<or> dest_vec1 b \<le> dest_vec1 c \<or> dest_vec1 d \<le> dest_vec1 a" |
30582 | 4925 |
unfolding disjoint_interval and dest_vec1_def ex_1 by auto |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4926 |
|
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4927 |
lemma open_closed_interval_1: fixes a :: "real^1" shows |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4928 |
"{a<..<b} = {a .. b} - {a, b}" |
30582 | 4929 |
unfolding expand_set_eq apply simp unfolding vector_less_def and vector_less_eq_def and all_1 and dest_vec1_eq[THEN sym] and dest_vec1_def by auto |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4930 |
|
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4931 |
lemma closed_open_interval_1: "dest_vec1 (a::real^1) \<le> dest_vec1 b ==> {a .. b} = {a<..<b} \<union> {a,b}" |
30582 | 4932 |
unfolding expand_set_eq apply simp unfolding vector_less_def and vector_less_eq_def and all_1 and dest_vec1_eq[THEN sym] and dest_vec1_def by auto |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4933 |
|
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4934 |
(* Some stuff for half-infinite intervals too; FIXME: notation? *) |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4935 |
|
30582 | 4936 |
lemma closed_interval_left: fixes b::"real^'n::finite" |
4937 |
shows "closed {x::real^'n. \<forall>i. x$i \<le> b$i}" |
|
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4938 |
proof- |
30582 | 4939 |
{ fix i |
4940 |
fix x::"real^'n" assume x:"\<forall>e>0. \<exists>x'\<in>{x. \<forall>i. x $ i \<le> b $ i}. x' \<noteq> x \<and> dist x' x < e" |
|
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4941 |
{ assume "x$i > b$i" |
30582 | 4942 |
then obtain y where "y $ i \<le> b $ i" "y \<noteq> x" "dist y x < x$i - b$i" using x[THEN spec[where x="x$i - b$i"]] by auto |
31289 | 4943 |
hence False using component_le_norm[of "y - x" i] unfolding dist_norm and vector_minus_component by auto } |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4944 |
hence "x$i \<le> b$i" by(rule ccontr)auto } |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4945 |
thus ?thesis unfolding closed_limpt unfolding islimpt_approachable by blast |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4946 |
qed |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4947 |
|
30582 | 4948 |
lemma closed_interval_right: fixes a::"real^'n::finite" |
4949 |
shows "closed {x::real^'n. \<forall>i. a$i \<le> x$i}" |
|
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4950 |
proof- |
30582 | 4951 |
{ fix i |
4952 |
fix x::"real^'n" assume x:"\<forall>e>0. \<exists>x'\<in>{x. \<forall>i. a $ i \<le> x $ i}. x' \<noteq> x \<and> dist x' x < e" |
|
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4953 |
{ assume "a$i > x$i" |
30582 | 4954 |
then obtain y where "a $ i \<le> y $ i" "y \<noteq> x" "dist y x < a$i - x$i" using x[THEN spec[where x="a$i - x$i"]] by auto |
31289 | 4955 |
hence False using component_le_norm[of "y - x" i] unfolding dist_norm and vector_minus_component by auto } |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4956 |
hence "a$i \<le> x$i" by(rule ccontr)auto } |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4957 |
thus ?thesis unfolding closed_limpt unfolding islimpt_approachable by blast |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4958 |
qed |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4959 |
|
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4960 |
subsection{* Intervals in general, including infinite and mixtures of open and closed. *} |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4961 |
|
31281 | 4962 |
definition "is_interval s \<longleftrightarrow> (\<forall>a\<in>s. \<forall>b\<in>s. \<forall>x. (\<forall>i. ((a$i \<le> x$i \<and> x$i \<le> b$i) \<or> (b$i \<le> x$i \<and> x$i \<le> a$i))) \<longrightarrow> x \<in> s)" |
4963 |
||
4964 |
lemma is_interval_interval: "is_interval {a .. b::real^'n::finite}" (is ?th1) "is_interval {a<..<b}" (is ?th2) proof - |
|
4965 |
have *:"\<And>x y z::real. x < y \<Longrightarrow> y < z \<Longrightarrow> x < z" by auto |
|
4966 |
show ?th1 ?th2 unfolding is_interval_def mem_interval Ball_def atLeastAtMost_iff |
|
4967 |
by(meson real_le_trans le_less_trans less_le_trans *)+ qed |
|
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4968 |
|
30488 | 4969 |
lemma is_interval_empty: |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4970 |
"is_interval {}" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4971 |
unfolding is_interval_def |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4972 |
by simp |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4973 |
|
30488 | 4974 |
lemma is_interval_univ: |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4975 |
"is_interval UNIV" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4976 |
unfolding is_interval_def |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4977 |
by simp |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4978 |
|
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4979 |
subsection{* Closure of halfspaces and hyperplanes. *} |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4980 |
|
30582 | 4981 |
lemma Lim_vec1_dot: fixes f :: "real^'m \<Rightarrow> real^'n::finite" |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4982 |
assumes "(f ---> l) net" shows "((vec1 o (\<lambda>y. a \<bullet> (f y))) ---> vec1(a \<bullet> l)) net" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4983 |
proof(cases "a = vec 0") |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4984 |
case True thus ?thesis using dot_lzero and Lim_const[of 0 net] unfolding vec1_vec and o_def by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4985 |
next |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4986 |
case False |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
4987 |
{ fix e::real |
31347
357d58c5743a
new lemmas about eventually; rewrite Lim proofs to use more abstract properties of eventually
huffman
parents:
31346
diff
changeset
|
4988 |
assume "0 < e" |
357d58c5743a
new lemmas about eventually; rewrite Lim proofs to use more abstract properties of eventually
huffman
parents:
31346
diff
changeset
|
4989 |
with `a \<noteq> vec 0` have "0 < e / norm a" by (simp add: divide_pos_pos) |
357d58c5743a
new lemmas about eventually; rewrite Lim proofs to use more abstract properties of eventually
huffman
parents:
31346
diff
changeset
|
4990 |
with assms(1) have "eventually (\<lambda>x. dist (f x) l < e / norm a) net" |
357d58c5743a
new lemmas about eventually; rewrite Lim proofs to use more abstract properties of eventually
huffman
parents:
31346
diff
changeset
|
4991 |
by (rule tendstoD) |
357d58c5743a
new lemmas about eventually; rewrite Lim proofs to use more abstract properties of eventually
huffman
parents:
31346
diff
changeset
|
4992 |
moreover |
357d58c5743a
new lemmas about eventually; rewrite Lim proofs to use more abstract properties of eventually
huffman
parents:
31346
diff
changeset
|
4993 |
{ fix z assume "dist (f z) l < e / norm a" |
357d58c5743a
new lemmas about eventually; rewrite Lim proofs to use more abstract properties of eventually
huffman
parents:
31346
diff
changeset
|
4994 |
hence "norm a * norm (f z - l) < e" unfolding dist_norm and |
30488 | 4995 |
pos_less_divide_eq[OF False[unfolded vec_0 zero_less_norm_iff[of a, THEN sym]]] and real_mult_commute by auto |
31347
357d58c5743a
new lemmas about eventually; rewrite Lim proofs to use more abstract properties of eventually
huffman
parents:
31346
diff
changeset
|
4996 |
hence "\<bar>a \<bullet> f z - a \<bullet> l\<bar> < e" |
357d58c5743a
new lemmas about eventually; rewrite Lim proofs to use more abstract properties of eventually
huffman
parents:
31346
diff
changeset
|
4997 |
using order_le_less_trans[OF norm_cauchy_schwarz_abs[of a "f z - l"], of e] |
357d58c5743a
new lemmas about eventually; rewrite Lim proofs to use more abstract properties of eventually
huffman
parents:
31346
diff
changeset
|
4998 |
unfolding dot_rsub[symmetric] by auto } |
357d58c5743a
new lemmas about eventually; rewrite Lim proofs to use more abstract properties of eventually
huffman
parents:
31346
diff
changeset
|
4999 |
ultimately have "eventually (\<lambda>x. \<bar>a \<bullet> f x - a \<bullet> l\<bar> < e) net" |
357d58c5743a
new lemmas about eventually; rewrite Lim proofs to use more abstract properties of eventually
huffman
parents:
31346
diff
changeset
|
5000 |
by (auto elim: eventually_rev_mono) |
357d58c5743a
new lemmas about eventually; rewrite Lim proofs to use more abstract properties of eventually
huffman
parents:
31346
diff
changeset
|
5001 |
} |
357d58c5743a
new lemmas about eventually; rewrite Lim proofs to use more abstract properties of eventually
huffman
parents:
31346
diff
changeset
|
5002 |
thus ?thesis unfolding tendsto_def |
357d58c5743a
new lemmas about eventually; rewrite Lim proofs to use more abstract properties of eventually
huffman
parents:
31346
diff
changeset
|
5003 |
by (auto simp add: dist_vec1) |
30488 | 5004 |
qed |
5005 |
||
5006 |
lemma continuous_at_vec1_dot: |
|
31346 | 5007 |
fixes x :: "real ^ _" |
5008 |
shows "continuous (at x) (vec1 o (\<lambda>y. a \<bullet> y))" |
|
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5009 |
proof- |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5010 |
have "((\<lambda>x. x) ---> x) (at x)" unfolding Lim_at by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5011 |
thus ?thesis unfolding continuous_at and o_def using Lim_vec1_dot[of "\<lambda>x. x" x "at x" a] by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5012 |
qed |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5013 |
|
30488 | 5014 |
lemma continuous_on_vec1_dot: |
31401 | 5015 |
fixes s :: "(real ^ _) set" |
5016 |
shows "continuous_on s (vec1 o (\<lambda>y. a \<bullet> y)) " |
|
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5017 |
using continuous_at_imp_continuous_on[of s "vec1 o (\<lambda>y. a \<bullet> y)"] |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5018 |
using continuous_at_vec1_dot |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5019 |
by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5020 |
|
30582 | 5021 |
lemma closed_halfspace_le: fixes a::"real^'n::finite" |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5022 |
shows "closed {x. a \<bullet> x \<le> b}" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5023 |
proof- |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5024 |
have *:"{x \<in> UNIV. (vec1 \<circ> op \<bullet> a) x \<in> vec1 ` {r. \<exists>x. a \<bullet> x = r \<and> r \<le> b}} = {x. a \<bullet> x \<le> b}" by auto |
30582 | 5025 |
let ?T = "{x::real^1. (\<forall>i. x$i \<le> (vec1 b)$i)}" |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5026 |
have "closed ?T" using closed_interval_left[of "vec1 b"] by simp |
30582 | 5027 |
moreover have "vec1 ` {r. \<exists>x. a \<bullet> x = r \<and> r \<le> b} = range (vec1 \<circ> op \<bullet> a) \<inter> ?T" unfolding all_1 |
5028 |
unfolding image_def by auto |
|
30488 | 5029 |
ultimately have "\<exists>T. closed T \<and> vec1 ` {r. \<exists>x. a \<bullet> x = r \<and> r \<le> b} = range (vec1 \<circ> op \<bullet> a) \<inter> T" by auto |
5030 |
hence "closedin euclidean {x \<in> UNIV. (vec1 \<circ> op \<bullet> a) x \<in> vec1 ` {r. \<exists>x. a \<bullet> x = r \<and> r \<le> b}}" |
|
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5031 |
using continuous_on_vec1_dot[of UNIV a, unfolded continuous_on_closed subtopology_UNIV] unfolding closedin_closed |
30488 | 5032 |
by (auto elim!: allE[where x="vec1 ` {r. (\<exists>x. a \<bullet> x = r \<and> r \<le> b)}"]) |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5033 |
thus ?thesis unfolding closed_closedin[THEN sym] and * by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5034 |
qed |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5035 |
|
31345
80667d5bee32
generalize topological notions to class metric_space; add class perfect_space
huffman
parents:
31344
diff
changeset
|
5036 |
lemma closed_halfspace_ge: "closed {x::real^_. a \<bullet> x \<ge> b}" |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5037 |
using closed_halfspace_le[of "-a" "-b"] unfolding dot_lneg by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5038 |
|
31345
80667d5bee32
generalize topological notions to class metric_space; add class perfect_space
huffman
parents:
31344
diff
changeset
|
5039 |
lemma closed_hyperplane: "closed {x::real^_. a \<bullet> x = b}" |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5040 |
proof- |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5041 |
have "{x. a \<bullet> x = b} = {x. a \<bullet> x \<ge> b} \<inter> {x. a \<bullet> x \<le> b}" by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5042 |
thus ?thesis using closed_halfspace_le[of a b] and closed_halfspace_ge[of b a] using closed_Int by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5043 |
qed |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5044 |
|
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5045 |
lemma closed_halfspace_component_le: |
30582 | 5046 |
shows "closed {x::real^'n::finite. x$i \<le> a}" |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5047 |
using closed_halfspace_le[of "(basis i)::real^'n" a] unfolding dot_basis[OF assms] by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5048 |
|
30488 | 5049 |
lemma closed_halfspace_component_ge: |
30582 | 5050 |
shows "closed {x::real^'n::finite. x$i \<ge> a}" |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5051 |
using closed_halfspace_ge[of a "(basis i)::real^'n"] unfolding dot_basis[OF assms] by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5052 |
|
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5053 |
text{* Openness of halfspaces. *} |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5054 |
|
31345
80667d5bee32
generalize topological notions to class metric_space; add class perfect_space
huffman
parents:
31344
diff
changeset
|
5055 |
lemma open_halfspace_lt: "open {x::real^_. a \<bullet> x < b}" |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5056 |
proof- |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5057 |
have "UNIV - {x. b \<le> a \<bullet> x} = {x. a \<bullet> x < b}" by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5058 |
thus ?thesis using closed_halfspace_ge[unfolded closed_def, of b a] by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5059 |
qed |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5060 |
|
31345
80667d5bee32
generalize topological notions to class metric_space; add class perfect_space
huffman
parents:
31344
diff
changeset
|
5061 |
lemma open_halfspace_gt: "open {x::real^_. a \<bullet> x > b}" |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5062 |
proof- |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5063 |
have "UNIV - {x. b \<ge> a \<bullet> x} = {x. a \<bullet> x > b}" by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5064 |
thus ?thesis using closed_halfspace_le[unfolded closed_def, of a b] by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5065 |
qed |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5066 |
|
30488 | 5067 |
lemma open_halfspace_component_lt: |
30582 | 5068 |
shows "open {x::real^'n::finite. x$i < a}" |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5069 |
using open_halfspace_lt[of "(basis i)::real^'n" a] unfolding dot_basis[OF assms] by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5070 |
|
30488 | 5071 |
lemma open_halfspace_component_gt: |
30582 | 5072 |
shows "open {x::real^'n::finite. x$i > a}" |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5073 |
using open_halfspace_gt[of a "(basis i)::real^'n"] unfolding dot_basis[OF assms] by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5074 |
|
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5075 |
text{* This gives a simple derivation of limit component bounds. *} |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5076 |
|
30582 | 5077 |
lemma Lim_component_le: fixes f :: "'a \<Rightarrow> real^'n::finite" |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5078 |
assumes "(f ---> l) net" "\<not> (trivial_limit net)" "eventually (\<lambda>x. f(x)$i \<le> b) net" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5079 |
shows "l$i \<le> b" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5080 |
proof- |
30582 | 5081 |
{ fix x have "x \<in> {x::real^'n. basis i \<bullet> x \<le> b} \<longleftrightarrow> x$i \<le> b" unfolding dot_basis by auto } note * = this |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5082 |
show ?thesis using Lim_in_closed_set[of "{x. basis i \<bullet> x \<le> b}" f net l] unfolding * |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5083 |
using closed_halfspace_le[of "(basis i)::real^'n" b] and assms(1,2,3) by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5084 |
qed |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5085 |
|
30582 | 5086 |
lemma Lim_component_ge: fixes f :: "'a \<Rightarrow> real^'n::finite" |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5087 |
assumes "(f ---> l) net" "\<not> (trivial_limit net)" "eventually (\<lambda>x. b \<le> (f x)$i) net" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5088 |
shows "b \<le> l$i" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5089 |
proof- |
30582 | 5090 |
{ fix x have "x \<in> {x::real^'n. basis i \<bullet> x \<ge> b} \<longleftrightarrow> x$i \<ge> b" unfolding dot_basis by auto } note * = this |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5091 |
show ?thesis using Lim_in_closed_set[of "{x. basis i \<bullet> x \<ge> b}" f net l] unfolding * |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5092 |
using closed_halfspace_ge[of b "(basis i)::real^'n"] and assms(1,2,3) by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5093 |
qed |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5094 |
|
30582 | 5095 |
lemma Lim_component_eq: fixes f :: "'a \<Rightarrow> real^'n::finite" |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5096 |
assumes net:"(f ---> l) net" "~(trivial_limit net)" and ev:"eventually (\<lambda>x. f(x)$i = b) net" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5097 |
shows "l$i = b" |
30582 | 5098 |
using ev[unfolded order_eq_iff eventually_and] using Lim_component_ge[OF net, of b i] and Lim_component_le[OF net, of i b] by auto |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5099 |
|
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5100 |
lemma Lim_drop_le: fixes f :: "'a \<Rightarrow> real^1" shows |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5101 |
"(f ---> l) net \<Longrightarrow> ~(trivial_limit net) \<Longrightarrow> eventually (\<lambda>x. dest_vec1 (f x) \<le> b) net ==> dest_vec1 l \<le> b" |
30582 | 5102 |
using Lim_component_le[of f l net 1 b] unfolding dest_vec1_def by auto |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5103 |
|
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5104 |
lemma Lim_drop_ge: fixes f :: "'a \<Rightarrow> real^1" shows |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5105 |
"(f ---> l) net \<Longrightarrow> ~(trivial_limit net) \<Longrightarrow> eventually (\<lambda>x. b \<le> dest_vec1 (f x)) net ==> b \<le> dest_vec1 l" |
30582 | 5106 |
using Lim_component_ge[of f l net b 1] unfolding dest_vec1_def by auto |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5107 |
|
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5108 |
text{* Limits relative to a union. *} |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5109 |
|
30488 | 5110 |
lemma Lim_within_union: |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5111 |
"(f ---> l) (at x within (s \<union> t)) \<longleftrightarrow> |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5112 |
(f ---> l) (at x within s) \<and> (f ---> l) (at x within t)" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5113 |
unfolding Lim_within apply auto apply blast apply blast |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5114 |
apply(erule_tac x=e in allE)+ apply auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5115 |
apply(rule_tac x="min d da" in exI) by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5116 |
|
30488 | 5117 |
lemma continuous_on_union: |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5118 |
assumes "closed s" "closed t" "continuous_on s f" "continuous_on t f" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5119 |
shows "continuous_on (s \<union> t) f" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5120 |
using assms unfolding continuous_on unfolding Lim_within_union |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5121 |
unfolding Lim unfolding trivial_limit_within unfolding closed_limpt by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5122 |
|
30582 | 5123 |
lemma continuous_on_cases: fixes g :: "real^'m::finite \<Rightarrow> real ^'n::finite" |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5124 |
assumes "closed s" "closed t" "continuous_on s f" "continuous_on t g" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5125 |
"\<forall>x. (x\<in>s \<and> \<not> P x) \<or> (x \<in> t \<and> P x) \<longrightarrow> f x = g x" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5126 |
shows "continuous_on (s \<union> t) (\<lambda>x. if P x then f x else g x)" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5127 |
proof- |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5128 |
let ?h = "(\<lambda>x. if P x then f x else g x)" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5129 |
have "\<forall>x\<in>s. f x = (if P x then f x else g x)" using assms(5) by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5130 |
hence "continuous_on s ?h" using continuous_on_eq[of s f ?h] using assms(3) by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5131 |
moreover |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5132 |
have "\<forall>x\<in>t. g x = (if P x then f x else g x)" using assms(5) by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5133 |
hence "continuous_on t ?h" using continuous_on_eq[of t g ?h] using assms(4) by auto |
30488 | 5134 |
ultimately show ?thesis using continuous_on_union[OF assms(1,2), of ?h] by auto |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5135 |
qed |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5136 |
|
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5137 |
|
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5138 |
text{* Some more convenient intermediate-value theorem formulations. *} |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5139 |
|
30582 | 5140 |
lemma connected_ivt_hyperplane: fixes y :: "real^'n::finite" |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5141 |
assumes "connected s" "x \<in> s" "y \<in> s" "a \<bullet> x \<le> b" "b \<le> a \<bullet> y" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5142 |
shows "\<exists>z \<in> s. a \<bullet> z = b" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5143 |
proof(rule ccontr) |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5144 |
assume as:"\<not> (\<exists>z\<in>s. a \<bullet> z = b)" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5145 |
let ?A = "{x::real^'n. a \<bullet> x < b}" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5146 |
let ?B = "{x::real^'n. a \<bullet> x > b}" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5147 |
have "open ?A" "open ?B" using open_halfspace_lt and open_halfspace_gt by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5148 |
moreover have "?A \<inter> ?B = {}" by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5149 |
moreover have "s \<subseteq> ?A \<union> ?B" using as by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5150 |
ultimately show False using assms(1)[unfolded connected_def not_ex, THEN spec[where x="?A"], THEN spec[where x="?B"]] and assms(2-5) by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5151 |
qed |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5152 |
|
30582 | 5153 |
lemma connected_ivt_component: fixes x::"real^'n::finite" shows |
5154 |
"connected s \<Longrightarrow> x \<in> s \<Longrightarrow> y \<in> s \<Longrightarrow> x$k \<le> a \<Longrightarrow> a \<le> y$k \<Longrightarrow> (\<exists>z\<in>s. z$k = a)" |
|
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5155 |
using connected_ivt_hyperplane[of s x y "(basis k)::real^'n" a] by (auto simp add: dot_basis) |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5156 |
|
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5157 |
text{* Also more convenient formulations of monotone convergence. *} |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5158 |
|
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5159 |
lemma bounded_increasing_convergent: fixes s::"nat \<Rightarrow> real^1" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5160 |
assumes "bounded {s n| n::nat. True}" "\<forall>n. dest_vec1(s n) \<le> dest_vec1(s(Suc n))" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5161 |
shows "\<exists>l. (s ---> l) sequentially" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5162 |
proof- |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5163 |
obtain a where a:"\<forall>n. \<bar>dest_vec1 (s n)\<bar> \<le> a" using assms(1)[unfolded bounded_def abs_dest_vec1] by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5164 |
{ fix m::nat |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5165 |
have "\<And> n. n\<ge>m \<longrightarrow> dest_vec1 (s m) \<le> dest_vec1 (s n)" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5166 |
apply(induct_tac n) apply simp using assms(2) apply(erule_tac x="na" in allE) by(auto simp add: not_less_eq_eq) } |
30488 | 5167 |
hence "\<forall>m n. m \<le> n \<longrightarrow> dest_vec1 (s m) \<le> dest_vec1 (s n)" by auto |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5168 |
then obtain l where "\<forall>e>0. \<exists>N. \<forall>n\<ge>N. \<bar>dest_vec1 (s n) - l\<bar> < e" using convergent_bounded_monotone[OF a] by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5169 |
thus ?thesis unfolding Lim_sequentially apply(rule_tac x="vec1 l" in exI) |
31289 | 5170 |
unfolding dist_norm unfolding abs_dest_vec1 and dest_vec1_sub by auto |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5171 |
qed |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5172 |
|
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5173 |
subsection{* Basic homeomorphism definitions. *} |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5174 |
|
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5175 |
definition "homeomorphism s t f g \<equiv> |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5176 |
(\<forall>x\<in>s. (g(f x) = x)) \<and> (f ` s = t) \<and> continuous_on s f \<and> |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5177 |
(\<forall>y\<in>t. (f(g y) = y)) \<and> (g ` t = s) \<and> continuous_on t g" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5178 |
|
30582 | 5179 |
definition homeomorphic :: "((real^'a::finite) set) \<Rightarrow> ((real^'b::finite) set) \<Rightarrow> bool" (infixr "homeomorphic" 60) where |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5180 |
homeomorphic_def: "s homeomorphic t \<equiv> (\<exists>f g. homeomorphism s t f g)" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5181 |
|
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5182 |
lemma homeomorphic_refl: "s homeomorphic s" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5183 |
unfolding homeomorphic_def |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5184 |
unfolding homeomorphism_def |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5185 |
using continuous_on_id |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5186 |
apply(rule_tac x = "(\<lambda>x::real^'a.x)" in exI) |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5187 |
apply(rule_tac x = "(\<lambda>x::real^'b.x)" in exI) |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5188 |
by blast |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5189 |
|
30488 | 5190 |
lemma homeomorphic_sym: |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5191 |
"s homeomorphic t \<longleftrightarrow> t homeomorphic s" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5192 |
unfolding homeomorphic_def |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5193 |
unfolding homeomorphism_def |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5194 |
by blast |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5195 |
|
30488 | 5196 |
lemma homeomorphic_trans: |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5197 |
assumes "s homeomorphic t" "t homeomorphic u" shows "s homeomorphic u" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5198 |
proof- |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5199 |
obtain f1 g1 where fg1:"\<forall>x\<in>s. g1 (f1 x) = x" "f1 ` s = t" "continuous_on s f1" "\<forall>y\<in>t. f1 (g1 y) = y" "g1 ` t = s" "continuous_on t g1" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5200 |
using assms(1) unfolding homeomorphic_def homeomorphism_def by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5201 |
obtain f2 g2 where fg2:"\<forall>x\<in>t. g2 (f2 x) = x" "f2 ` t = u" "continuous_on t f2" "\<forall>y\<in>u. f2 (g2 y) = y" "g2 ` u = t" "continuous_on u g2" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5202 |
using assms(2) unfolding homeomorphic_def homeomorphism_def by auto |
30488 | 5203 |
|
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5204 |
{ fix x assume "x\<in>s" hence "(g1 \<circ> g2) ((f2 \<circ> f1) x) = x" using fg1(1)[THEN bspec[where x=x]] and fg2(1)[THEN bspec[where x="f1 x"]] and fg1(2) by auto } |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5205 |
moreover have "(f2 \<circ> f1) ` s = u" using fg1(2) fg2(2) by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5206 |
moreover have "continuous_on s (f2 \<circ> f1)" using continuous_on_compose[OF fg1(3)] and fg2(3) unfolding fg1(2) by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5207 |
moreover { fix y assume "y\<in>u" hence "(f2 \<circ> f1) ((g1 \<circ> g2) y) = y" using fg2(4)[THEN bspec[where x=y]] and fg1(4)[THEN bspec[where x="g2 y"]] and fg2(5) by auto } |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5208 |
moreover have "(g1 \<circ> g2) ` u = s" using fg1(5) fg2(5) by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5209 |
moreover have "continuous_on u (g1 \<circ> g2)" using continuous_on_compose[OF fg2(6)] and fg1(6) unfolding fg2(5) by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5210 |
ultimately show ?thesis unfolding homeomorphic_def homeomorphism_def apply(rule_tac x="f2 \<circ> f1" in exI) apply(rule_tac x="g1 \<circ> g2" in exI) by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5211 |
qed |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5212 |
|
30488 | 5213 |
lemma homeomorphic_minimal: |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5214 |
"s homeomorphic t \<longleftrightarrow> |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5215 |
(\<exists>f g. (\<forall>x\<in>s. f(x) \<in> t \<and> (g(f(x)) = x)) \<and> |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5216 |
(\<forall>y\<in>t. g(y) \<in> s \<and> (f(g(y)) = y)) \<and> |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5217 |
continuous_on s f \<and> continuous_on t g)" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5218 |
unfolding homeomorphic_def homeomorphism_def |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5219 |
apply auto apply (rule_tac x=f in exI) apply (rule_tac x=g in exI) |
30488 | 5220 |
apply auto apply (rule_tac x=f in exI) apply (rule_tac x=g in exI) apply auto |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5221 |
unfolding image_iff |
30488 | 5222 |
apply(erule_tac x="g x" in ballE) apply(erule_tac x="x" in ballE) |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5223 |
apply auto apply(rule_tac x="g x" in bexI) apply auto |
30488 | 5224 |
apply(erule_tac x="f x" in ballE) apply(erule_tac x="x" in ballE) |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5225 |
apply auto apply(rule_tac x="f x" in bexI) by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5226 |
|
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5227 |
subsection{* Relatively weak hypotheses if a set is compact. *} |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5228 |
|
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5229 |
definition "inv_on f s = (\<lambda>x. SOME y. y\<in>s \<and> f y = x)" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5230 |
|
30488 | 5231 |
lemma assumes "inj_on f s" "x\<in>s" |
5232 |
shows "inv_on f s (f x) = x" |
|
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5233 |
using assms unfolding inj_on_def inv_on_def by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5234 |
|
30488 | 5235 |
lemma homeomorphism_compact: |
31401 | 5236 |
fixes f :: "real ^ _ \<Rightarrow> real ^ _" |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5237 |
assumes "compact s" "continuous_on s f" "f ` s = t" "inj_on f s" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5238 |
shows "\<exists>g. homeomorphism s t f g" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5239 |
proof- |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5240 |
def g \<equiv> "\<lambda>x. SOME y. y\<in>s \<and> f y = x" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5241 |
have g:"\<forall>x\<in>s. g (f x) = x" using assms(3) assms(4)[unfolded inj_on_def] unfolding g_def by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5242 |
{ fix y assume "y\<in>t" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5243 |
then obtain x where x:"f x = y" "x\<in>s" using assms(3) by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5244 |
hence "g (f x) = x" using g by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5245 |
hence "f (g y) = y" unfolding x(1)[THEN sym] by auto } |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5246 |
hence g':"\<forall>x\<in>t. f (g x) = x" by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5247 |
moreover |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5248 |
{ fix x |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5249 |
have "x\<in>s \<Longrightarrow> x \<in> g ` t" using g[THEN bspec[where x=x]] unfolding image_iff using assms(3) by(auto intro!: bexI[where x="f x"]) |
30488 | 5250 |
moreover |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5251 |
{ assume "x\<in>g ` t" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5252 |
then obtain y where y:"y\<in>t" "g y = x" by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5253 |
then obtain x' where x':"x'\<in>s" "f x' = y" using assms(3) by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5254 |
hence "x \<in> s" unfolding g_def using someI2[of "\<lambda>b. b\<in>s \<and> f b = y" x' "\<lambda>x. x\<in>s"] unfolding y(2)[THEN sym] and g_def by auto } |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5255 |
ultimately have "x\<in>s \<longleftrightarrow> x \<in> g ` t" by auto } |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5256 |
hence "g ` t = s" by auto |
30488 | 5257 |
ultimately |
5258 |
show ?thesis unfolding homeomorphism_def homeomorphic_def |
|
5259 |
apply(rule_tac x=g in exI) using g and assms(3) and continuous_on_inverse[OF assms(2,1), of g, unfolded assms(3)] and assms(2) by auto |
|
5260 |
qed |
|
5261 |
||
5262 |
lemma homeomorphic_compact: |
|
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5263 |
"compact s \<Longrightarrow> continuous_on s f \<Longrightarrow> (f ` s = t) \<Longrightarrow> inj_on f s |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5264 |
\<Longrightarrow> s homeomorphic t" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5265 |
unfolding homeomorphic_def by(metis homeomorphism_compact) |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5266 |
|
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5267 |
text{* Preservation of topological properties. *} |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5268 |
|
30488 | 5269 |
lemma homeomorphic_compactness: |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5270 |
"s homeomorphic t ==> (compact s \<longleftrightarrow> compact t)" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5271 |
unfolding homeomorphic_def homeomorphism_def |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5272 |
by (metis compact_continuous_image) |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5273 |
|
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5274 |
text{* Results on translation, scaling etc. *} |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5275 |
|
30488 | 5276 |
lemma homeomorphic_scaling: |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5277 |
assumes "c \<noteq> 0" shows "s homeomorphic ((\<lambda>x. c *s x) ` s)" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5278 |
unfolding homeomorphic_minimal |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5279 |
apply(rule_tac x="\<lambda>x. c *s x" in exI) |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5280 |
apply(rule_tac x="\<lambda>x. (1 / c) *s x" in exI) |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5281 |
apply auto unfolding vector_smult_assoc using assms apply auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5282 |
using continuous_on_cmul[OF continuous_on_id] by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5283 |
|
30488 | 5284 |
lemma homeomorphic_translation: |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5285 |
"s homeomorphic ((\<lambda>x. a + x) ` s)" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5286 |
unfolding homeomorphic_minimal |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5287 |
apply(rule_tac x="\<lambda>x. a + x" in exI) |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5288 |
apply(rule_tac x="\<lambda>x. -a + x" in exI) |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5289 |
using continuous_on_add[OF continuous_on_const continuous_on_id] by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5290 |
|
30488 | 5291 |
lemma homeomorphic_affinity: |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5292 |
assumes "c \<noteq> 0" shows "s homeomorphic ((\<lambda>x. a + c *s x) ` s)" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5293 |
proof- |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5294 |
have *:"op + a ` op *s c ` s = (\<lambda>x. a + c *s x) ` s" by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5295 |
show ?thesis |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5296 |
using homeomorphic_trans |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5297 |
using homeomorphic_scaling[OF assms, of s] |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5298 |
using homeomorphic_translation[of "(\<lambda>x. c *s x) ` s" a] unfolding * by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5299 |
qed |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5300 |
|
30582 | 5301 |
lemma homeomorphic_balls: fixes a b ::"real^'a::finite" |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5302 |
assumes "0 < d" "0 < e" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5303 |
shows "(ball a d) homeomorphic (ball b e)" (is ?th) |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5304 |
"(cball a d) homeomorphic (cball b e)" (is ?cth) |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5305 |
proof- |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5306 |
have *:"\<bar>e / d\<bar> > 0" "\<bar>d / e\<bar> >0" using assms using divide_pos_pos by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5307 |
show ?th unfolding homeomorphic_minimal |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5308 |
apply(rule_tac x="\<lambda>x. b + (e/d) *s (x - a)" in exI) |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5309 |
apply(rule_tac x="\<lambda>x. a + (d/e) *s (x - b)" in exI) |
31289 | 5310 |
apply (auto simp add: dist_commute) unfolding dist_norm and vector_smult_assoc using assms apply auto |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5311 |
unfolding norm_minus_cancel and norm_mul |
30488 | 5312 |
using continuous_on_add[OF continuous_on_const continuous_on_cmul[OF continuous_on_sub[OF continuous_on_id continuous_on_const]]] |
31285
0a3f9ee4117c
generalize dist function to class real_normed_vector
huffman
parents:
31275
diff
changeset
|
5313 |
apply (auto simp add: dist_commute) |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5314 |
using pos_less_divide_eq[OF *(1), THEN sym] unfolding real_mult_commute[of _ "\<bar>e / d\<bar>"] |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5315 |
using pos_less_divide_eq[OF *(2), THEN sym] unfolding real_mult_commute[of _ "\<bar>d / e\<bar>"] |
31285
0a3f9ee4117c
generalize dist function to class real_normed_vector
huffman
parents:
31275
diff
changeset
|
5316 |
by (auto simp add: dist_commute) |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5317 |
next |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5318 |
have *:"\<bar>e / d\<bar> > 0" "\<bar>d / e\<bar> >0" using assms using divide_pos_pos by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5319 |
show ?cth unfolding homeomorphic_minimal |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5320 |
apply(rule_tac x="\<lambda>x. b + (e/d) *s (x - a)" in exI) |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5321 |
apply(rule_tac x="\<lambda>x. a + (d/e) *s (x - b)" in exI) |
31289 | 5322 |
apply (auto simp add: dist_commute) unfolding dist_norm and vector_smult_assoc using assms apply auto |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5323 |
unfolding norm_minus_cancel and norm_mul |
30488 | 5324 |
using continuous_on_add[OF continuous_on_const continuous_on_cmul[OF continuous_on_sub[OF continuous_on_id continuous_on_const]]] |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5325 |
apply auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5326 |
using pos_le_divide_eq[OF *(1), THEN sym] unfolding real_mult_commute[of _ "\<bar>e / d\<bar>"] |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5327 |
using pos_le_divide_eq[OF *(2), THEN sym] unfolding real_mult_commute[of _ "\<bar>d / e\<bar>"] |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5328 |
by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5329 |
qed |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5330 |
|
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5331 |
text{* "Isometry" (up to constant bounds) of injective linear map etc. *} |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5332 |
|
30488 | 5333 |
lemma cauchy_isometric: |
31341 | 5334 |
fixes x :: "nat \<Rightarrow> real ^ 'n::finite" |
5335 |
assumes e:"0 < e" and s:"subspace s" and f:"linear f" and normf:"\<forall>x\<in>s. norm(f x) \<ge> e * norm(x)" and xs:"\<forall>n::nat. x n \<in> s" and cf:"Cauchy(f o x)" |
|
5336 |
shows "Cauchy x" |
|
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5337 |
proof- |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5338 |
{ fix d::real assume "d>0" |
30488 | 5339 |
then obtain N where N:"\<forall>n\<ge>N. norm (f (x n) - f (x N)) < e * d" |
31289 | 5340 |
using cf[unfolded cauchy o_def dist_norm, THEN spec[where x="e*d"]] and e and mult_pos_pos[of e d] by auto |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5341 |
{ fix n assume "n\<ge>N" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5342 |
hence "norm (f (x n - x N)) < e * d" using N[THEN spec[where x=n]] unfolding linear_sub[OF f, THEN sym] by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5343 |
moreover have "e * norm (x n - x N) \<le> norm (f (x n - x N))" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5344 |
using subspace_sub[OF s, of "x n" "x N"] using xs[THEN spec[where x=N]] and xs[THEN spec[where x=n]] |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5345 |
using normf[THEN bspec[where x="x n - x N"]] by auto |
30488 | 5346 |
ultimately have "norm (x n - x N) < d" using `e>0` |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5347 |
using mult_left_less_imp_less[of e "norm (x n - x N)" d] by auto } |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5348 |
hence "\<exists>N. \<forall>n\<ge>N. norm (x n - x N) < d" by auto } |
31289 | 5349 |
thus ?thesis unfolding cauchy and dist_norm by auto |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5350 |
qed |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5351 |
|
30488 | 5352 |
lemma complete_isometric_image: |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5353 |
assumes "0 < e" and s:"subspace s" and f:"linear f" and normf:"\<forall>x\<in>s. norm(f x) \<ge> e * norm(x)" and cs:"complete s" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5354 |
shows "complete(f ` s)" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5355 |
proof- |
31341 | 5356 |
{ fix g assume as:"\<forall>n::nat. g n \<in> f ` s" and cfg:"Cauchy g" |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5357 |
then obtain x where "\<forall>n. x n \<in> s \<and> g n = f (x n)" unfolding image_iff and Bex_def |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5358 |
using choice[of "\<lambda> n xa. xa \<in> s \<and> g n = f xa"] by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5359 |
hence x:"\<forall>n. x n \<in> s" "\<forall>n. g n = f (x n)" by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5360 |
hence "f \<circ> x = g" unfolding expand_fun_eq by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5361 |
then obtain l where "l\<in>s" and l:"(x ---> l) sequentially" |
30488 | 5362 |
using cs[unfolded complete_def, THEN spec[where x="x"]] |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5363 |
using cauchy_isometric[OF `0<e` s f normf] and cfg and x(1) by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5364 |
hence "\<exists>l\<in>f ` s. (g ---> l) sequentially" |
30488 | 5365 |
using linear_continuous_at[OF f, unfolded continuous_at_sequentially, THEN spec[where x=x], of l] |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5366 |
unfolding `f \<circ> x = g` by auto } |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5367 |
thus ?thesis unfolding complete_def by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5368 |
qed |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5369 |
|
31289 | 5370 |
lemma dist_0_norm: |
5371 |
fixes x :: "'a::real_normed_vector" |
|
5372 |
shows "dist 0 x = norm x" |
|
5373 |
unfolding dist_norm by simp |
|
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5374 |
|
30582 | 5375 |
lemma injective_imp_isometric: fixes f::"real^'m::finite \<Rightarrow> real^'n::finite" |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5376 |
assumes s:"closed s" "subspace s" and f:"linear f" "\<forall>x\<in>s. (f x = 0) \<longrightarrow> (x = 0)" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5377 |
shows "\<exists>e>0. \<forall>x\<in>s. norm (f x) \<ge> e * norm(x)" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5378 |
proof(cases "s \<subseteq> {0::real^'m}") |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5379 |
case True |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5380 |
{ fix x assume "x \<in> s" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5381 |
hence "x = 0" using True by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5382 |
hence "norm x \<le> norm (f x)" by auto } |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5383 |
thus ?thesis by(auto intro!: exI[where x=1]) |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5384 |
next |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5385 |
case False |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5386 |
then obtain a where a:"a\<noteq>0" "a\<in>s" by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5387 |
from False have "s \<noteq> {}" by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5388 |
let ?S = "{f x| x. (x \<in> s \<and> norm x = norm a)}" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5389 |
let ?S' = "{x::real^'m. x\<in>s \<and> norm x = norm a}" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5390 |
let ?S'' = "{x::real^'m. norm x = norm a}" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5391 |
|
31289 | 5392 |
have "?S'' = frontier(cball 0 (norm a))" unfolding frontier_cball and dist_norm by (auto simp add: norm_minus_cancel) |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5393 |
hence "compact ?S''" using compact_frontier[OF compact_cball, of 0 "norm a"] by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5394 |
moreover have "?S' = s \<inter> ?S''" by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5395 |
ultimately have "compact ?S'" using closed_inter_compact[of s ?S''] using s(1) by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5396 |
moreover have *:"f ` ?S' = ?S" by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5397 |
ultimately have "compact ?S" using compact_continuous_image[OF linear_continuous_on[OF f(1)], of ?S'] by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5398 |
hence "closed ?S" using compact_imp_closed by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5399 |
moreover have "?S \<noteq> {}" using a by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5400 |
ultimately obtain b' where "b'\<in>?S" "\<forall>y\<in>?S. norm b' \<le> norm y" using distance_attains_inf[of ?S 0] unfolding dist_0_norm by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5401 |
then obtain b where "b\<in>s" and ba:"norm b = norm a" and b:"\<forall>x\<in>{x \<in> s. norm x = norm a}. norm (f b) \<le> norm (f x)" unfolding *[THEN sym] unfolding image_iff by auto |
30488 | 5402 |
|
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5403 |
let ?e = "norm (f b) / norm b" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5404 |
have "norm b > 0" using ba and a and norm_ge_zero by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5405 |
moreover have "norm (f b) > 0" using f(2)[THEN bspec[where x=b], OF `b\<in>s`] using `norm b >0` unfolding zero_less_norm_iff by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5406 |
ultimately have "0 < norm (f b) / norm b" by(simp only: divide_pos_pos) |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5407 |
moreover |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5408 |
{ fix x assume "x\<in>s" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5409 |
hence "norm (f b) / norm b * norm x \<le> norm (f x)" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5410 |
proof(cases "x=0") |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5411 |
case True thus "norm (f b) / norm b * norm x \<le> norm (f x)" by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5412 |
next |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5413 |
case False |
30488 | 5414 |
hence *:"0 < norm a / norm x" using `a\<noteq>0` unfolding zero_less_norm_iff[THEN sym] by(simp only: divide_pos_pos) |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5415 |
have "\<forall>c. \<forall>x\<in>s. c *s x \<in> s" using s[unfolded subspace_def] by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5416 |
hence "(norm a / norm x) *s x \<in> {x \<in> s. norm x = norm a}" using `x\<in>s` and `x\<noteq>0` by auto |
30488 | 5417 |
thus "norm (f b) / norm b * norm x \<le> norm (f x)" using b[THEN bspec[where x="(norm a / norm x) *s x"]] |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5418 |
unfolding linear_cmul[OF f(1)] and norm_mul and ba using `x\<noteq>0` `a\<noteq>0` |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5419 |
by (auto simp add: real_mult_commute pos_le_divide_eq pos_divide_le_eq) |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5420 |
qed } |
30488 | 5421 |
ultimately |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5422 |
show ?thesis by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5423 |
qed |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5424 |
|
30488 | 5425 |
lemma closed_injective_image_subspace: |
31345
80667d5bee32
generalize topological notions to class metric_space; add class perfect_space
huffman
parents:
31344
diff
changeset
|
5426 |
fixes s :: "(real ^ _) set" |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5427 |
assumes "subspace s" "linear f" "\<forall>x\<in>s. f x = 0 --> x = 0" "closed s" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5428 |
shows "closed(f ` s)" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5429 |
proof- |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5430 |
obtain e where "e>0" and e:"\<forall>x\<in>s. e * norm x \<le> norm (f x)" using injective_imp_isometric[OF assms(4,1,2,3)] by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5431 |
show ?thesis using complete_isometric_image[OF `e>0` assms(1,2) e] and assms(4) |
30488 | 5432 |
unfolding complete_eq_closed[THEN sym] by auto |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5433 |
qed |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5434 |
|
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5435 |
subsection{* Some properties of a canonical subspace. *} |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5436 |
|
30488 | 5437 |
lemma subspace_substandard: |
30582 | 5438 |
"subspace {x::real^'n. (\<forall>i. P i \<longrightarrow> x$i = 0)}" |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5439 |
unfolding subspace_def by(auto simp add: vector_add_component vector_smult_component elim!: ballE) |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5440 |
|
30488 | 5441 |
lemma closed_substandard: |
30582 | 5442 |
"closed {x::real^'n::finite. \<forall>i. P i --> x$i = 0}" (is "closed ?A") |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5443 |
proof- |
30582 | 5444 |
let ?D = "{i. P i}" |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5445 |
let ?Bs = "{{x::real^'n. basis i \<bullet> x = 0}| i. i \<in> ?D}" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5446 |
{ fix x |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5447 |
{ assume "x\<in>?A" |
30582 | 5448 |
hence x:"\<forall>i\<in>?D. x $ i = 0" by auto |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5449 |
hence "x\<in> \<Inter> ?Bs" by(auto simp add: dot_basis x) } |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5450 |
moreover |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5451 |
{ assume x:"x\<in>\<Inter>?Bs" |
30582 | 5452 |
{ fix i assume i:"i \<in> ?D" |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5453 |
then obtain B where BB:"B \<in> ?Bs" and B:"B = {x::real^'n. basis i \<bullet> x = 0}" by auto |
30582 | 5454 |
hence "x $ i = 0" unfolding B using x unfolding dot_basis by auto } |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5455 |
hence "x\<in>?A" by auto } |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5456 |
ultimately have "x\<in>?A \<longleftrightarrow> x\<in> \<Inter>?Bs" by auto } |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5457 |
hence "?A = \<Inter> ?Bs" by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5458 |
thus ?thesis by(auto simp add: closed_Inter closed_hyperplane) |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5459 |
qed |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5460 |
|
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5461 |
lemma dim_substandard: |
30582 | 5462 |
shows "dim {x::real^'n::finite. \<forall>i. i \<notin> d \<longrightarrow> x$i = 0} = card d" (is "dim ?A = _") |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5463 |
proof- |
30582 | 5464 |
let ?D = "UNIV::'n set" |
5465 |
let ?B = "(basis::'n\<Rightarrow>real^'n) ` d" |
|
5466 |
||
5467 |
let ?bas = "basis::'n \<Rightarrow> real^'n" |
|
5468 |
||
5469 |
have "?B \<subseteq> ?A" by auto |
|
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5470 |
|
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5471 |
moreover |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5472 |
{ fix x::"real^'n" assume "x\<in>?A" |
30582 | 5473 |
with finite[of d] |
5474 |
have "x\<in> span ?B" |
|
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5475 |
proof(induct d arbitrary: x) |
30582 | 5476 |
case empty hence "x=0" unfolding Cart_eq by auto |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5477 |
thus ?case using subspace_0[OF subspace_span[of "{}"]] by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5478 |
next |
30582 | 5479 |
case (insert k F) |
5480 |
hence *:"\<forall>i. i \<notin> insert k F \<longrightarrow> x $ i = 0" by auto |
|
5481 |
have **:"F \<subseteq> insert k F" by auto |
|
5482 |
def y \<equiv> "x - x$k *s basis k" |
|
5483 |
have y:"x = y + (x$k) *s basis k" unfolding y_def by auto |
|
5484 |
{ fix i assume i':"i \<notin> F" |
|
5485 |
hence "y $ i = 0" unfolding y_def unfolding vector_minus_component |
|
5486 |
and vector_smult_component and basis_component |
|
5487 |
using *[THEN spec[where x=i]] by auto } |
|
5488 |
hence "y \<in> span (basis ` (insert k F))" using insert(3) |
|
5489 |
using span_mono[of "?bas ` F" "?bas ` (insert k F)"] |
|
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5490 |
using image_mono[OF **, of basis] by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5491 |
moreover |
30582 | 5492 |
have "basis k \<in> span (?bas ` (insert k F))" by(rule span_superset, auto) |
5493 |
hence "x$k *s basis k \<in> span (?bas ` (insert k F))" using span_mul by auto |
|
30488 | 5494 |
ultimately |
30582 | 5495 |
have "y + x$k *s basis k \<in> span (?bas ` (insert k F))" |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5496 |
using span_add by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5497 |
thus ?case using y by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5498 |
qed |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5499 |
} |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5500 |
hence "?A \<subseteq> span ?B" by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5501 |
|
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5502 |
moreover |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5503 |
{ fix x assume "x \<in> ?B" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5504 |
hence "x\<in>{(basis i)::real^'n |i. i \<in> ?D}" using assms by auto } |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5505 |
hence "independent ?B" using independent_mono[OF independent_stdbasis, of ?B] and assms by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5506 |
|
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5507 |
moreover |
30582 | 5508 |
have "d \<subseteq> ?D" unfolding subset_eq using assms by auto |
5509 |
hence *:"inj_on (basis::'n\<Rightarrow>real^'n) d" using subset_inj_on[OF basis_inj, of "d"] by auto |
|
5510 |
have "?B hassize (card d)" unfolding hassize_def and card_image[OF *] by auto |
|
5511 |
||
5512 |
ultimately show ?thesis using dim_unique[of "basis ` d" ?A] by auto |
|
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5513 |
qed |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5514 |
|
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5515 |
text{* Hence closure and completeness of all subspaces. *} |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5516 |
|
30582 | 5517 |
lemma closed_subspace_lemma: "n \<le> card (UNIV::'n::finite set) \<Longrightarrow> \<exists>A::'n set. card A = n" |
5518 |
apply (induct n) |
|
5519 |
apply (rule_tac x="{}" in exI, simp) |
|
5520 |
apply clarsimp |
|
5521 |
apply (subgoal_tac "\<exists>x. x \<notin> A") |
|
5522 |
apply (erule exE) |
|
5523 |
apply (rule_tac x="insert x A" in exI, simp) |
|
5524 |
apply (subgoal_tac "A \<noteq> UNIV", auto) |
|
5525 |
done |
|
5526 |
||
5527 |
lemma closed_subspace: fixes s::"(real^'n::finite) set" |
|
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5528 |
assumes "subspace s" shows "closed s" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5529 |
proof- |
30582 | 5530 |
have "dim s \<le> card (UNIV :: 'n set)" using dim_subset_univ by auto |
5531 |
then obtain d::"'n set" where t: "card d = dim s" |
|
5532 |
using closed_subspace_lemma by auto |
|
5533 |
let ?t = "{x::real^'n. \<forall>i. i \<notin> d \<longrightarrow> x$i = 0}" |
|
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5534 |
obtain f where f:"linear f" "f ` ?t = s" "inj_on f ?t" |
30582 | 5535 |
using subspace_isomorphism[OF subspace_substandard[of "\<lambda>i. i \<notin> d"] assms] |
5536 |
using dim_substandard[of d] and t by auto |
|
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5537 |
have "\<forall>x\<in>?t. f x = 0 \<longrightarrow> x = 0" using linear_0[OF f(1)] using f(3)[unfolded inj_on_def] |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5538 |
by(erule_tac x=0 in ballE) auto |
30582 | 5539 |
moreover have "closed ?t" using closed_substandard . |
5540 |
moreover have "subspace ?t" using subspace_substandard . |
|
30488 | 5541 |
ultimately show ?thesis using closed_injective_image_subspace[of ?t f] |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5542 |
unfolding f(2) using f(1) by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5543 |
qed |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5544 |
|
30488 | 5545 |
lemma complete_subspace: |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5546 |
"subspace s ==> complete s" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5547 |
using complete_eq_closed closed_subspace |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5548 |
by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5549 |
|
30488 | 5550 |
lemma dim_closure: |
31345
80667d5bee32
generalize topological notions to class metric_space; add class perfect_space
huffman
parents:
31344
diff
changeset
|
5551 |
fixes s :: "(real ^ _) set" |
80667d5bee32
generalize topological notions to class metric_space; add class perfect_space
huffman
parents:
31344
diff
changeset
|
5552 |
shows "dim(closure s) = dim s" (is "?dc = ?d") |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5553 |
proof- |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5554 |
have "?dc \<le> ?d" using closure_minimal[OF span_inc, of s] |
30488 | 5555 |
using closed_subspace[OF subspace_span, of s] |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5556 |
using dim_subset[of "closure s" "span s"] unfolding dim_span by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5557 |
thus ?thesis using dim_subset[OF closure_subset, of s] by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5558 |
qed |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5559 |
|
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5560 |
text{* Affine transformations of intervals. *} |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5561 |
|
30488 | 5562 |
lemma affinity_inverses: |
5563 |
assumes m0: "m \<noteq> (0::'a::field)" |
|
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5564 |
shows "(\<lambda>x. m *s x + c) o (\<lambda>x. inverse(m) *s x + (-(inverse(m) *s c))) = id" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5565 |
"(\<lambda>x. inverse(m) *s x + (-(inverse(m) *s c))) o (\<lambda>x. m *s x + c) = id" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5566 |
using m0 |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5567 |
apply (auto simp add: expand_fun_eq vector_add_ldistrib vector_smult_assoc) |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5568 |
by (simp add: vector_smult_lneg[symmetric] vector_smult_assoc vector_sneg_minus1[symmetric]) |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5569 |
|
30488 | 5570 |
lemma real_affinity_le: |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5571 |
"0 < (m::'a::ordered_field) ==> (m * x + c \<le> y \<longleftrightarrow> x \<le> inverse(m) * y + -(c / m))" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5572 |
by (simp add: field_simps inverse_eq_divide) |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5573 |
|
30488 | 5574 |
lemma real_le_affinity: |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5575 |
"0 < (m::'a::ordered_field) ==> (y \<le> m * x + c \<longleftrightarrow> inverse(m) * y + -(c / m) \<le> x)" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5576 |
by (simp add: field_simps inverse_eq_divide) |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5577 |
|
30488 | 5578 |
lemma real_affinity_lt: |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5579 |
"0 < (m::'a::ordered_field) ==> (m * x + c < y \<longleftrightarrow> x < inverse(m) * y + -(c / m))" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5580 |
by (simp add: field_simps inverse_eq_divide) |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5581 |
|
30488 | 5582 |
lemma real_lt_affinity: |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5583 |
"0 < (m::'a::ordered_field) ==> (y < m * x + c \<longleftrightarrow> inverse(m) * y + -(c / m) < x)" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5584 |
by (simp add: field_simps inverse_eq_divide) |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5585 |
|
30488 | 5586 |
lemma real_affinity_eq: |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5587 |
"(m::'a::ordered_field) \<noteq> 0 ==> (m * x + c = y \<longleftrightarrow> x = inverse(m) * y + -(c / m))" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5588 |
by (simp add: field_simps inverse_eq_divide) |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5589 |
|
30488 | 5590 |
lemma real_eq_affinity: |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5591 |
"(m::'a::ordered_field) \<noteq> 0 ==> (y = m * x + c \<longleftrightarrow> inverse(m) * y + -(c / m) = x)" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5592 |
by (simp add: field_simps inverse_eq_divide) |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5593 |
|
30488 | 5594 |
lemma vector_affinity_eq: |
5595 |
assumes m0: "(m::'a::field) \<noteq> 0" |
|
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5596 |
shows "m *s x + c = y \<longleftrightarrow> x = inverse m *s y + -(inverse m *s c)" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5597 |
proof |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5598 |
assume h: "m *s x + c = y" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5599 |
hence "m *s x = y - c" by (simp add: ring_simps) |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5600 |
hence "inverse m *s (m *s x) = inverse m *s (y - c)" by simp |
30488 | 5601 |
then show "x = inverse m *s y + - (inverse m *s c)" |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5602 |
using m0 by (simp add: vector_smult_assoc vector_ssub_ldistrib) |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5603 |
next |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5604 |
assume h: "x = inverse m *s y + - (inverse m *s c)" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5605 |
show "m *s x + c = y" unfolding h diff_minus[symmetric] |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5606 |
using m0 by (simp add: vector_smult_assoc vector_ssub_ldistrib) |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5607 |
qed |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5608 |
|
30488 | 5609 |
lemma vector_eq_affinity: |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5610 |
"(m::'a::field) \<noteq> 0 ==> (y = m *s x + c \<longleftrightarrow> inverse(m) *s y + -(inverse(m) *s c) = x)" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5611 |
using vector_affinity_eq[where m=m and x=x and y=y and c=c] |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5612 |
by metis |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5613 |
|
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5614 |
lemma image_affinity_interval: fixes m::real |
30582 | 5615 |
fixes a b c :: "real^'n::finite" |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5616 |
shows "(\<lambda>x. m *s x + c) ` {a .. b} = |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5617 |
(if {a .. b} = {} then {} |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5618 |
else (if 0 \<le> m then {m *s a + c .. m *s b + c} |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5619 |
else {m *s b + c .. m *s a + c}))" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5620 |
proof(cases "m=0") |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5621 |
{ fix x assume "x \<le> c" "c \<le> x" |
30582 | 5622 |
hence "x=c" unfolding vector_less_eq_def and Cart_eq by (auto intro: order_antisym) } |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5623 |
moreover case True |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5624 |
moreover have "c \<in> {m *s a + c..m *s b + c}" unfolding True by(auto simp add: vector_less_eq_def) |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5625 |
ultimately show ?thesis by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5626 |
next |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5627 |
case False |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5628 |
{ fix y assume "a \<le> y" "y \<le> b" "m > 0" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5629 |
hence "m *s a + c \<le> m *s y + c" "m *s y + c \<le> m *s b + c" |
30488 | 5630 |
unfolding vector_less_eq_def by(auto simp add: vector_smult_component vector_add_component) |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5631 |
} moreover |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5632 |
{ fix y assume "a \<le> y" "y \<le> b" "m < 0" |
30488 | 5633 |
hence "m *s b + c \<le> m *s y + c" "m *s y + c \<le> m *s a + c" |
5634 |
unfolding vector_less_eq_def by(auto simp add: vector_smult_component vector_add_component mult_left_mono_neg elim!:ballE) |
|
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5635 |
} moreover |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5636 |
{ fix y assume "m > 0" "m *s a + c \<le> y" "y \<le> m *s b + c" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5637 |
hence "y \<in> (\<lambda>x. m *s x + c) ` {a..b}" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5638 |
unfolding image_iff Bex_def mem_interval vector_less_eq_def |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5639 |
apply(auto simp add: vector_smult_component vector_add_component vector_minus_component vector_smult_assoc pth_3[symmetric] |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5640 |
intro!: exI[where x="(1 / m) *s (y - c)"]) |
30582 | 5641 |
by(auto simp add: pos_le_divide_eq pos_divide_le_eq real_mult_commute diff_le_iff) |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5642 |
} moreover |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5643 |
{ fix y assume "m *s b + c \<le> y" "y \<le> m *s a + c" "m < 0" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5644 |
hence "y \<in> (\<lambda>x. m *s x + c) ` {a..b}" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5645 |
unfolding image_iff Bex_def mem_interval vector_less_eq_def |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5646 |
apply(auto simp add: vector_smult_component vector_add_component vector_minus_component vector_smult_assoc pth_3[symmetric] |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5647 |
intro!: exI[where x="(1 / m) *s (y - c)"]) |
30582 | 5648 |
by(auto simp add: neg_le_divide_eq neg_divide_le_eq real_mult_commute diff_le_iff) |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5649 |
} |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5650 |
ultimately show ?thesis using False by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5651 |
qed |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5652 |
|
31282 | 5653 |
lemma image_smult_interval:"(\<lambda>x. m *s (x::real^'n::finite)) ` {a..b} = |
5654 |
(if {a..b} = {} then {} else if 0 \<le> m then {m *s a..m *s b} else {m *s b..m *s a})" |
|
5655 |
using image_affinity_interval[of m 0 a b] by auto |
|
5656 |
||
5657 |
subsection{* Banach fixed point theorem (not really topological...) *} |
|
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5658 |
|
30488 | 5659 |
lemma banach_fix: |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5660 |
assumes s:"complete s" "s \<noteq> {}" and c:"0 \<le> c" "c < 1" and f:"(f ` s) \<subseteq> s" and |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5661 |
lipschitz:"\<forall>x\<in>s. \<forall>y\<in>s. dist (f x) (f y) \<le> c * dist x y" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5662 |
shows "\<exists>! x\<in>s. (f x = x)" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5663 |
proof- |
30488 | 5664 |
have "1 - c > 0" using c by auto |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5665 |
|
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5666 |
from s(2) obtain z0 where "z0 \<in> s" by auto |
30974 | 5667 |
def z \<equiv> "\<lambda>n. (f ^^ n) z0" |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5668 |
{ fix n::nat |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5669 |
have "z n \<in> s" unfolding z_def |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5670 |
proof(induct n) case 0 thus ?case using `z0 \<in>s` by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5671 |
next case Suc thus ?case using f by auto qed } |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5672 |
note z_in_s = this |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5673 |
|
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5674 |
def d \<equiv> "dist (z 0) (z 1)" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5675 |
|
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5676 |
have fzn:"\<And>n. f (z n) = z (Suc n)" unfolding z_def by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5677 |
{ fix n::nat |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5678 |
have "dist (z n) (z (Suc n)) \<le> (c ^ n) * d" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5679 |
proof(induct n) |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5680 |
case 0 thus ?case unfolding d_def by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5681 |
next |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5682 |
case (Suc m) |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5683 |
hence "c * dist (z m) (z (Suc m)) \<le> c ^ Suc m * d" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5684 |
using `0 \<le> c` using mult_mono1_class.mult_mono1[of "dist (z m) (z (Suc m))" "c ^ m * d" c] by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5685 |
thus ?case using lipschitz[THEN bspec[where x="z m"], OF z_in_s, THEN bspec[where x="z (Suc m)"], OF z_in_s] |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5686 |
unfolding fzn and mult_le_cancel_left by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5687 |
qed |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5688 |
} note cf_z = this |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5689 |
|
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5690 |
{ fix n m::nat |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5691 |
have "(1 - c) * dist (z m) (z (m+n)) \<le> (c ^ m) * d * (1 - c ^ n)" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5692 |
proof(induct n) |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5693 |
case 0 show ?case by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5694 |
next |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5695 |
case (Suc k) |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5696 |
have "(1 - c) * dist (z m) (z (m + Suc k)) \<le> (1 - c) * (dist (z m) (z (m + k)) + dist (z (m + k)) (z (Suc (m + k))))" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5697 |
using dist_triangle and c by(auto simp add: dist_triangle) |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5698 |
also have "\<dots> \<le> (1 - c) * (dist (z m) (z (m + k)) + c ^ (m + k) * d)" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5699 |
using cf_z[of "m + k"] and c by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5700 |
also have "\<dots> \<le> c ^ m * d * (1 - c ^ k) + (1 - c) * c ^ (m + k) * d" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5701 |
using Suc by (auto simp add: ring_simps) |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5702 |
also have "\<dots> = (c ^ m) * (d * (1 - c ^ k) + (1 - c) * c ^ k * d)" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5703 |
unfolding power_add by (auto simp add: ring_simps) |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5704 |
also have "\<dots> \<le> (c ^ m) * d * (1 - c ^ Suc k)" |
31285
0a3f9ee4117c
generalize dist function to class real_normed_vector
huffman
parents:
31275
diff
changeset
|
5705 |
using c by (auto simp add: ring_simps) |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5706 |
finally show ?case by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5707 |
qed |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5708 |
} note cf_z2 = this |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5709 |
{ fix e::real assume "e>0" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5710 |
hence "\<exists>N. \<forall>m n. N \<le> m \<and> N \<le> n \<longrightarrow> dist (z m) (z n) < e" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5711 |
proof(cases "d = 0") |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5712 |
case True |
31285
0a3f9ee4117c
generalize dist function to class real_normed_vector
huffman
parents:
31275
diff
changeset
|
5713 |
hence "\<And>n. z n = z0" using cf_z2[of 0] and c unfolding z_def by (auto simp add: pos_prod_le[OF `1 - c > 0`]) |
30488 | 5714 |
thus ?thesis using `e>0` by auto |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5715 |
next |
31285
0a3f9ee4117c
generalize dist function to class real_normed_vector
huffman
parents:
31275
diff
changeset
|
5716 |
case False hence "d>0" unfolding d_def using zero_le_dist[of "z 0" "z 1"] |
30488 | 5717 |
by (metis False d_def real_less_def) |
5718 |
hence "0 < e * (1 - c) / d" using `e>0` and `1-c>0` |
|
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5719 |
using divide_pos_pos[of "e * (1 - c)" d] and mult_pos_pos[of e "1 - c"] by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5720 |
then obtain N where N:"c ^ N < e * (1 - c) / d" using real_arch_pow_inv[of "e * (1 - c) / d" c] and c by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5721 |
{ fix m n::nat assume "m>n" and as:"m\<ge>N" "n\<ge>N" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5722 |
have *:"c ^ n \<le> c ^ N" using `n\<ge>N` and c using power_decreasing[OF `n\<ge>N`, of c] by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5723 |
have "1 - c ^ (m - n) > 0" using c and power_strict_mono[of c 1 "m - n"] using `m>n` by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5724 |
hence **:"d * (1 - c ^ (m - n)) / (1 - c) > 0" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5725 |
using real_mult_order[OF `d>0`, of "1 - c ^ (m - n)"] |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5726 |
using divide_pos_pos[of "d * (1 - c ^ (m - n))" "1 - c"] |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5727 |
using `0 < 1 - c` by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5728 |
|
30488 | 5729 |
have "dist (z m) (z n) \<le> c ^ n * d * (1 - c ^ (m - n)) / (1 - c)" |
5730 |
using cf_z2[of n "m - n"] and `m>n` unfolding pos_le_divide_eq[OF `1-c>0`] |
|
31285
0a3f9ee4117c
generalize dist function to class real_normed_vector
huffman
parents:
31275
diff
changeset
|
5731 |
by (auto simp add: real_mult_commute dist_commute) |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5732 |
also have "\<dots> \<le> c ^ N * d * (1 - c ^ (m - n)) / (1 - c)" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5733 |
using mult_right_mono[OF * order_less_imp_le[OF **]] |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5734 |
unfolding real_mult_assoc by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5735 |
also have "\<dots> < (e * (1 - c) / d) * d * (1 - c ^ (m - n)) / (1 - c)" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5736 |
using mult_strict_right_mono[OF N **] unfolding real_mult_assoc by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5737 |
also have "\<dots> = e * (1 - c ^ (m - n))" using c and `d>0` and `1 - c > 0` by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5738 |
also have "\<dots> \<le> e" using c and `1 - c ^ (m - n) > 0` and `e>0` using mult_right_le_one_le[of e "1 - c ^ (m - n)"] by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5739 |
finally have "dist (z m) (z n) < e" by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5740 |
} note * = this |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5741 |
{ fix m n::nat assume as:"N\<le>m" "N\<le>n" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5742 |
hence "dist (z n) (z m) < e" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5743 |
proof(cases "n = m") |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5744 |
case True thus ?thesis using `e>0` by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5745 |
next |
31285
0a3f9ee4117c
generalize dist function to class real_normed_vector
huffman
parents:
31275
diff
changeset
|
5746 |
case False thus ?thesis using as and *[of n m] *[of m n] unfolding nat_neq_iff by (auto simp add: dist_commute) |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5747 |
qed } |
30488 | 5748 |
thus ?thesis by auto |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5749 |
qed |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5750 |
} |
31341 | 5751 |
hence "Cauchy z" unfolding cauchy_def by auto |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5752 |
then obtain x where "x\<in>s" and x:"(z ---> x) sequentially" using s(1)[unfolded compact_def complete_def, THEN spec[where x=z]] and z_in_s by auto |
30488 | 5753 |
|
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5754 |
def e \<equiv> "dist (f x) x" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5755 |
have "e = 0" proof(rule ccontr) |
31285
0a3f9ee4117c
generalize dist function to class real_normed_vector
huffman
parents:
31275
diff
changeset
|
5756 |
assume "e \<noteq> 0" hence "e>0" unfolding e_def using zero_le_dist[of "f x" x] |
0a3f9ee4117c
generalize dist function to class real_normed_vector
huffman
parents:
31275
diff
changeset
|
5757 |
by (metis dist_eq_0_iff dist_nz e_def) |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5758 |
then obtain N where N:"\<forall>n\<ge>N. dist (z n) x < e / 2" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5759 |
using x[unfolded Lim_sequentially, THEN spec[where x="e/2"]] by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5760 |
hence N':"dist (z N) x < e / 2" by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5761 |
|
30488 | 5762 |
have *:"c * dist (z N) x \<le> dist (z N) x" unfolding mult_le_cancel_right2 |
31285
0a3f9ee4117c
generalize dist function to class real_normed_vector
huffman
parents:
31275
diff
changeset
|
5763 |
using zero_le_dist[of "z N" x] and c |
0a3f9ee4117c
generalize dist function to class real_normed_vector
huffman
parents:
31275
diff
changeset
|
5764 |
by (metis dist_eq_0_iff dist_nz order_less_asym real_less_def) |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5765 |
have "dist (f (z N)) (f x) \<le> c * dist (z N) x" using lipschitz[THEN bspec[where x="z N"], THEN bspec[where x=x]] |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5766 |
using z_in_s[of N] `x\<in>s` using c by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5767 |
also have "\<dots> < e / 2" using N' and c using * by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5768 |
finally show False unfolding fzn |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5769 |
using N[THEN spec[where x="Suc N"]] and dist_triangle_half_r[of "z (Suc N)" "f x" e x] |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5770 |
unfolding e_def by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5771 |
qed |
31285
0a3f9ee4117c
generalize dist function to class real_normed_vector
huffman
parents:
31275
diff
changeset
|
5772 |
hence "f x = x" unfolding e_def by auto |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5773 |
moreover |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5774 |
{ fix y assume "f y = y" "y\<in>s" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5775 |
hence "dist x y \<le> c * dist x y" using lipschitz[THEN bspec[where x=x], THEN bspec[where x=y]] |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5776 |
using `x\<in>s` and `f x = x` by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5777 |
hence "dist x y = 0" unfolding mult_le_cancel_right1 |
31285
0a3f9ee4117c
generalize dist function to class real_normed_vector
huffman
parents:
31275
diff
changeset
|
5778 |
using c and zero_le_dist[of x y] by auto |
0a3f9ee4117c
generalize dist function to class real_normed_vector
huffman
parents:
31275
diff
changeset
|
5779 |
hence "y = x" by auto |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5780 |
} |
30488 | 5781 |
ultimately show ?thesis unfolding Bex1_def using `x\<in>s` by blast+ |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5782 |
qed |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5783 |
|
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5784 |
subsection{* Edelstein fixed point theorem. *} |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5785 |
|
30488 | 5786 |
lemma edelstein_fix: |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5787 |
assumes s:"compact s" "s \<noteq> {}" and gs:"(g ` s) \<subseteq> s" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5788 |
and dist:"\<forall>x\<in>s. \<forall>y\<in>s. x \<noteq> y \<longrightarrow> dist (g x) (g y) < dist x y" |
30582 | 5789 |
shows "\<exists>! x::real^'a::finite\<in>s. g x = x" |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5790 |
proof(cases "\<exists>x\<in>s. g x \<noteq> x") |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5791 |
obtain x where "x\<in>s" using s(2) by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5792 |
case False hence g:"\<forall>x\<in>s. g x = x" by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5793 |
{ fix y assume "y\<in>s" |
30488 | 5794 |
hence "x = y" using `x\<in>s` and dist[THEN bspec[where x=x], THEN bspec[where x=y]] |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5795 |
unfolding g[THEN bspec[where x=x], OF `x\<in>s`] |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5796 |
unfolding g[THEN bspec[where x=y], OF `y\<in>s`] by auto } |
30488 | 5797 |
thus ?thesis unfolding Bex1_def using `x\<in>s` and g by blast+ |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5798 |
next |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5799 |
case True |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5800 |
then obtain x where [simp]:"x\<in>s" and "g x \<noteq> x" by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5801 |
{ fix x y assume "x \<in> s" "y \<in> s" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5802 |
hence "dist (g x) (g y) \<le> dist x y" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5803 |
using dist[THEN bspec[where x=x], THEN bspec[where x=y]] by auto } note dist' = this |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5804 |
def y \<equiv> "g x" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5805 |
have [simp]:"y\<in>s" unfolding y_def using gs[unfolded image_subset_iff] and `x\<in>s` by blast |
30974 | 5806 |
def f \<equiv> "\<lambda>n. g ^^ n" |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5807 |
have [simp]:"\<And>n z. g (f n z) = f (Suc n) z" unfolding f_def by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5808 |
have [simp]:"\<And>z. f 0 z = z" unfolding f_def by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5809 |
{ fix n::nat and z assume "z\<in>s" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5810 |
have "f n z \<in> s" unfolding f_def |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5811 |
proof(induct n) |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5812 |
case 0 thus ?case using `z\<in>s` by simp |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5813 |
next |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5814 |
case (Suc n) thus ?case using gs[unfolded image_subset_iff] by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5815 |
qed } note fs = this |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5816 |
{ fix m n ::nat assume "m\<le>n" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5817 |
fix w z assume "w\<in>s" "z\<in>s" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5818 |
have "dist (f n w) (f n z) \<le> dist (f m w) (f m z)" using `m\<le>n` |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5819 |
proof(induct n) |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5820 |
case 0 thus ?case by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5821 |
next |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5822 |
case (Suc n) |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5823 |
thus ?case proof(cases "m\<le>n") |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5824 |
case True thus ?thesis using Suc(1) |
30488 | 5825 |
using dist'[OF fs fs, OF `w\<in>s` `z\<in>s`, of n n] by auto |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5826 |
next |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5827 |
case False hence mn:"m = Suc n" using Suc(2) by simp |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5828 |
show ?thesis unfolding mn by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5829 |
qed |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5830 |
qed } note distf = this |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5831 |
|
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5832 |
def h \<equiv> "\<lambda>n. pastecart (f n x) (f n y)" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5833 |
let ?s2 = "{pastecart x y |x y. x \<in> s \<and> y \<in> s}" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5834 |
obtain l r where "l\<in>?s2" and r:"\<forall>m n. m < n \<longrightarrow> r m < r n" and lr:"((h \<circ> r) ---> l) sequentially" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5835 |
using compact_pastecart[OF s(1) s(1), unfolded compact_def, THEN spec[where x=h]] unfolding h_def |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5836 |
using fs[OF `x\<in>s`] and fs[OF `y\<in>s`] by blast |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5837 |
def a \<equiv> "fstcart l" def b \<equiv> "sndcart l" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5838 |
have lab:"l = pastecart a b" unfolding a_def b_def and pastecart_fst_snd by simp |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5839 |
have [simp]:"a\<in>s" "b\<in>s" unfolding a_def b_def using `l\<in>?s2` by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5840 |
|
31401 | 5841 |
have "continuous_on (UNIV :: (real ^ _) set) fstcart" |
5842 |
and "continuous_on (UNIV :: (real ^ _) set) sndcart" |
|
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5843 |
using linear_continuous_on using linear_fstcart and linear_sndcart by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5844 |
hence lima:"((fstcart \<circ> (h \<circ> r)) ---> a) sequentially" and limb:"((sndcart \<circ> (h \<circ> r)) ---> b) sequentially" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5845 |
unfolding atomize_conj unfolding continuous_on_sequentially |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5846 |
apply(erule_tac x="h \<circ> r" in allE) apply(erule_tac x="h \<circ> r" in allE) using lr |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5847 |
unfolding o_def and h_def a_def b_def by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5848 |
|
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5849 |
{ fix n::nat |
31289 | 5850 |
have *:"\<And>fx fy (x::real^_) y. dist fx fy \<le> dist x y \<Longrightarrow> \<not> (dist (fx - fy) (a - b) < dist a b - dist x y)" unfolding dist_norm by norm |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5851 |
{ fix x y ::"real^'a" |
31289 | 5852 |
have "dist (-x) (-y) = dist x y" unfolding dist_norm |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5853 |
using norm_minus_cancel[of "x - y"] by (auto simp add: uminus_add_conv_diff) } note ** = this |
30488 | 5854 |
|
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5855 |
{ assume as:"dist a b > dist (f n x) (f n y)" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5856 |
then obtain Na Nb where "\<forall>m\<ge>Na. dist (f (r m) x) a < (dist a b - dist (f n x) (f n y)) / 2" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5857 |
and "\<forall>m\<ge>Nb. dist (f (r m) y) b < (dist a b - dist (f n x) (f n y)) / 2" |
30654 | 5858 |
using lima limb unfolding h_def Lim_sequentially by (fastsimp simp del: less_divide_eq_number_of1) |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5859 |
hence "dist (f (r (Na + Nb + n)) x - f (r (Na + Nb + n)) y) (a - b) < dist a b - dist (f n x) (f n y)" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5860 |
apply(erule_tac x="Na+Nb+n" in allE) |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5861 |
apply(erule_tac x="Na+Nb+n" in allE) apply simp |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5862 |
using dist_triangle_add_half[of a "f (r (Na + Nb + n)) x" "dist a b - dist (f n x) (f n y)" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5863 |
"-b" "- f (r (Na + Nb + n)) y"] |
31285
0a3f9ee4117c
generalize dist function to class real_normed_vector
huffman
parents:
31275
diff
changeset
|
5864 |
unfolding ** unfolding group_simps(12) by (auto simp add: dist_commute) |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5865 |
moreover |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5866 |
have "dist (f (r (Na + Nb + n)) x - f (r (Na + Nb + n)) y) (a - b) \<ge> dist a b - dist (f n x) (f n y)" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5867 |
using distf[of n "r (Na+Nb+n)", OF _ `x\<in>s` `y\<in>s`] |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5868 |
using monotone_bigger[OF r, of "Na+Nb+n"] |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5869 |
using *[of "f (r (Na + Nb + n)) x" "f (r (Na + Nb + n)) y" "f n x" "f n y"] by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5870 |
ultimately have False by simp |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5871 |
} |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5872 |
hence "dist a b \<le> dist (f n x) (f n y)" by(rule ccontr)auto } |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5873 |
note ab_fn = this |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5874 |
|
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5875 |
have [simp]:"a = b" proof(rule ccontr) |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5876 |
def e \<equiv> "dist a b - dist (g a) (g b)" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5877 |
assume "a\<noteq>b" hence "e > 0" unfolding e_def using dist by fastsimp |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5878 |
hence "\<exists>n. dist (f n x) a < e/2 \<and> dist (f n y) b < e/2" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5879 |
using lima limb unfolding Lim_sequentially |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5880 |
apply (auto elim!: allE[where x="e/2"]) apply(rule_tac x="r (max N Na)" in exI) unfolding h_def by fastsimp |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5881 |
then obtain n where n:"dist (f n x) a < e/2 \<and> dist (f n y) b < e/2" by auto |
30488 | 5882 |
have "dist (f (Suc n) x) (g a) \<le> dist (f n x) a" |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5883 |
using dist[THEN bspec[where x="f n x"], THEN bspec[where x="a"]] and fs by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5884 |
moreover have "dist (f (Suc n) y) (g b) \<le> dist (f n y) b" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5885 |
using dist[THEN bspec[where x="f n y"], THEN bspec[where x="b"]] and fs by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5886 |
ultimately have "dist (f (Suc n) x) (g a) + dist (f (Suc n) y) (g b) < e" using n by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5887 |
thus False unfolding e_def using ab_fn[of "Suc n"] by norm |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5888 |
qed |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5889 |
|
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5890 |
have [simp]:"\<And>n. f (Suc n) x = f n y" unfolding f_def y_def by(induct_tac n)auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5891 |
{ fix x y assume "x\<in>s" "y\<in>s" moreover |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5892 |
fix e::real assume "e>0" ultimately |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5893 |
have "dist y x < e \<longrightarrow> dist (g y) (g x) < e" using dist by fastsimp } |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5894 |
hence "continuous_on s g" unfolding continuous_on_def by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5895 |
|
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5896 |
hence "((sndcart \<circ> h \<circ> r) ---> g a) sequentially" unfolding continuous_on_sequentially |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5897 |
apply (rule allE[where x="\<lambda>n. (fstcart \<circ> h \<circ> r) n"]) apply (erule ballE[where x=a]) |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5898 |
using lima unfolding h_def o_def using fs[OF `x\<in>s`] by (auto simp add: y_def) |
30488 | 5899 |
hence "g a = a" using Lim_unique[OF trivial_limit_sequentially limb, of "g a"] |
30262
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5900 |
unfolding `a=b` and o_assoc by auto |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5901 |
moreover |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5902 |
{ fix x assume "x\<in>s" "g x = x" "x\<noteq>a" |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5903 |
hence "False" using dist[THEN bspec[where x=a], THEN bspec[where x=x]] |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5904 |
using `g a = a` and `a\<in>s` by auto } |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5905 |
ultimately show "\<exists>!x\<in>s. g x = x" unfolding Bex1_def using `a\<in>s` by blast |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5906 |
qed |
5794fee816c3
A formalization of Topology on Euclidean spaces, Includes limits (nets) , continuity, fixpoint theorems, homeomorphisms
chaieb
parents:
diff
changeset
|
5907 |
|
30488 | 5908 |
end |