author | wenzelm |
Thu, 02 Mar 2023 13:19:21 +0100 | |
changeset 77473 | 362bf802013e |
parent 76786 | 50672d2d78db |
child 78248 | 740b23f1138a |
permissions | -rw-r--r-- |
53674 | 1 |
(* Author: John Harrison |
63305
3b6975875633
Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents:
63301
diff
changeset
|
2 |
Author: Robert Himmelmann, TU Muenchen (Translation from HOL light) and LCP |
53674 | 3 |
*) |
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
4 |
|
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
5 |
(* At the moment this is just Brouwer's fixpoint theorem. The proof is from *) |
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
6 |
(* Kuhn: "some combinatorial lemmas in topology", IBM J. v4. (1960) p. 518 *) |
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
7 |
(* See "http://www.research.ibm.com/journal/rd/045/ibmrd0405K.pdf". *) |
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
8 |
(* *) |
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
9 |
(* The script below is quite messy, but at least we avoid formalizing any *) |
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
10 |
(* topological machinery; we don't even use barycentric subdivision; this is *) |
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
11 |
(* the big advantage of Kuhn's proof over the usual Sperner's lemma one. *) |
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
12 |
(* *) |
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
13 |
(* (c) Copyright, John Harrison 1998-2008 *) |
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
14 |
|
68617 | 15 |
section \<open>Brouwer's Fixed Point Theorem\<close> |
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
16 |
|
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
17 |
theory Brouwer_Fixpoint |
70643
93a7a85de312
Removal of the redundant ancestor Continuous_Extension
paulson <lp15@cam.ac.uk>
parents:
70642
diff
changeset
|
18 |
imports Homeomorphism Derivative |
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
19 |
begin |
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
20 |
|
68617 | 21 |
subsection \<open>Retractions\<close> |
22 |
||
23 |
lemma retract_of_contractible: |
|
24 |
assumes "contractible T" "S retract_of T" |
|
25 |
shows "contractible S" |
|
26 |
using assms |
|
27 |
apply (clarsimp simp add: retract_of_def contractible_def retraction_def homotopic_with) |
|
28 |
apply (rule_tac x="r a" in exI) |
|
29 |
apply (rule_tac x="r \<circ> h" in exI) |
|
30 |
apply (intro conjI continuous_intros continuous_on_compose) |
|
31 |
apply (erule continuous_on_subset | force)+ |
|
32 |
done |
|
33 |
||
34 |
lemma retract_of_path_connected: |
|
35 |
"\<lbrakk>path_connected T; S retract_of T\<rbrakk> \<Longrightarrow> path_connected S" |
|
36 |
by (metis path_connected_continuous_image retract_of_def retraction) |
|
37 |
||
38 |
lemma retract_of_simply_connected: |
|
39 |
"\<lbrakk>simply_connected T; S retract_of T\<rbrakk> \<Longrightarrow> simply_connected S" |
|
40 |
apply (simp add: retract_of_def retraction_def, clarify) |
|
41 |
apply (rule simply_connected_retraction_gen) |
|
69738 | 42 |
apply (force elim!: continuous_on_subset)+ |
68617 | 43 |
done |
44 |
||
45 |
lemma retract_of_homotopically_trivial: |
|
46 |
assumes ts: "T retract_of S" |
|
47 |
and hom: "\<And>f g. \<lbrakk>continuous_on U f; f ` U \<subseteq> S; |
|
48 |
continuous_on U g; g ` U \<subseteq> S\<rbrakk> |
|
69986
f2d327275065
generalised homotopic_with to topologies; homotopic_with_canon is the old version
paulson <lp15@cam.ac.uk>
parents:
69945
diff
changeset
|
49 |
\<Longrightarrow> homotopic_with_canon (\<lambda>x. True) U S f g" |
68617 | 50 |
and "continuous_on U f" "f ` U \<subseteq> T" |
51 |
and "continuous_on U g" "g ` U \<subseteq> T" |
|
69986
f2d327275065
generalised homotopic_with to topologies; homotopic_with_canon is the old version
paulson <lp15@cam.ac.uk>
parents:
69945
diff
changeset
|
52 |
shows "homotopic_with_canon (\<lambda>x. True) U T f g" |
68617 | 53 |
proof - |
54 |
obtain r where "r ` S \<subseteq> S" "continuous_on S r" "\<forall>x\<in>S. r (r x) = r x" "T = r ` S" |
|
55 |
using ts by (auto simp: retract_of_def retraction) |
|
56 |
then obtain k where "Retracts S r T k" |
|
57 |
unfolding Retracts_def |
|
58 |
by (metis continuous_on_subset dual_order.trans image_iff image_mono) |
|
59 |
then show ?thesis |
|
60 |
apply (rule Retracts.homotopically_trivial_retraction_gen) |
|
61 |
using assms |
|
62 |
apply (force simp: hom)+ |
|
63 |
done |
|
64 |
qed |
|
65 |
||
66 |
lemma retract_of_homotopically_trivial_null: |
|
67 |
assumes ts: "T retract_of S" |
|
68 |
and hom: "\<And>f. \<lbrakk>continuous_on U f; f ` U \<subseteq> S\<rbrakk> |
|
69986
f2d327275065
generalised homotopic_with to topologies; homotopic_with_canon is the old version
paulson <lp15@cam.ac.uk>
parents:
69945
diff
changeset
|
69 |
\<Longrightarrow> \<exists>c. homotopic_with_canon (\<lambda>x. True) U S f (\<lambda>x. c)" |
68617 | 70 |
and "continuous_on U f" "f ` U \<subseteq> T" |
69986
f2d327275065
generalised homotopic_with to topologies; homotopic_with_canon is the old version
paulson <lp15@cam.ac.uk>
parents:
69945
diff
changeset
|
71 |
obtains c where "homotopic_with_canon (\<lambda>x. True) U T f (\<lambda>x. c)" |
68617 | 72 |
proof - |
73 |
obtain r where "r ` S \<subseteq> S" "continuous_on S r" "\<forall>x\<in>S. r (r x) = r x" "T = r ` S" |
|
74 |
using ts by (auto simp: retract_of_def retraction) |
|
75 |
then obtain k where "Retracts S r T k" |
|
76 |
unfolding Retracts_def |
|
77 |
by (metis continuous_on_subset dual_order.trans image_iff image_mono) |
|
78 |
then show ?thesis |
|
79 |
apply (rule Retracts.homotopically_trivial_retraction_null_gen) |
|
80 |
apply (rule TrueI refl assms that | assumption)+ |
|
81 |
done |
|
82 |
qed |
|
83 |
||
69945
35ba13ac6e5c
New abstract topological material
paulson <lp15@cam.ac.uk>
parents:
69922
diff
changeset
|
84 |
lemma retraction_openin_vimage_iff: |
69922
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
paulson <lp15@cam.ac.uk>
parents:
69738
diff
changeset
|
85 |
"openin (top_of_set S) (S \<inter> r -` U) \<longleftrightarrow> openin (top_of_set T) U" |
76786 | 86 |
if "retraction S T r" and "U \<subseteq> T" |
87 |
by (simp add: retraction_openin_vimage_iff that) |
|
68617 | 88 |
|
89 |
lemma retract_of_locally_compact: |
|
90 |
fixes S :: "'a :: {heine_borel,real_normed_vector} set" |
|
91 |
shows "\<lbrakk> locally compact S; T retract_of S\<rbrakk> \<Longrightarrow> locally compact T" |
|
92 |
by (metis locally_compact_closedin closedin_retract) |
|
93 |
||
94 |
lemma homotopic_into_retract: |
|
69986
f2d327275065
generalised homotopic_with to topologies; homotopic_with_canon is the old version
paulson <lp15@cam.ac.uk>
parents:
69945
diff
changeset
|
95 |
"\<lbrakk>f ` S \<subseteq> T; g ` S \<subseteq> T; T retract_of U; homotopic_with_canon (\<lambda>x. True) S U f g\<rbrakk> |
f2d327275065
generalised homotopic_with to topologies; homotopic_with_canon is the old version
paulson <lp15@cam.ac.uk>
parents:
69945
diff
changeset
|
96 |
\<Longrightarrow> homotopic_with_canon (\<lambda>x. True) S T f g" |
68617 | 97 |
apply (subst (asm) homotopic_with_def) |
98 |
apply (simp add: homotopic_with retract_of_def retraction_def, clarify) |
|
99 |
apply (rule_tac x="r \<circ> h" in exI) |
|
100 |
apply (rule conjI continuous_intros | erule continuous_on_subset | force simp: image_subset_iff)+ |
|
101 |
done |
|
102 |
||
103 |
lemma retract_of_locally_connected: |
|
104 |
assumes "locally connected T" "S retract_of T" |
|
69661 | 105 |
shows "locally connected S" |
68617 | 106 |
using assms |
69945
35ba13ac6e5c
New abstract topological material
paulson <lp15@cam.ac.uk>
parents:
69922
diff
changeset
|
107 |
by (auto simp: idempotent_imp_retraction intro!: retraction_openin_vimage_iff elim!: locally_connected_quotient_image retract_ofE) |
68617 | 108 |
|
109 |
lemma retract_of_locally_path_connected: |
|
110 |
assumes "locally path_connected T" "S retract_of T" |
|
69661 | 111 |
shows "locally path_connected S" |
68617 | 112 |
using assms |
69945
35ba13ac6e5c
New abstract topological material
paulson <lp15@cam.ac.uk>
parents:
69922
diff
changeset
|
113 |
by (auto simp: idempotent_imp_retraction intro!: retraction_openin_vimage_iff elim!: locally_path_connected_quotient_image retract_ofE) |
68617 | 114 |
|
115 |
text \<open>A few simple lemmas about deformation retracts\<close> |
|
116 |
||
117 |
lemma deformation_retract_imp_homotopy_eqv: |
|
118 |
fixes S :: "'a::euclidean_space set" |
|
69986
f2d327275065
generalised homotopic_with to topologies; homotopic_with_canon is the old version
paulson <lp15@cam.ac.uk>
parents:
69945
diff
changeset
|
119 |
assumes "homotopic_with_canon (\<lambda>x. True) S S id r" and r: "retraction S T r" |
68617 | 120 |
shows "S homotopy_eqv T" |
121 |
proof - |
|
69986
f2d327275065
generalised homotopic_with to topologies; homotopic_with_canon is the old version
paulson <lp15@cam.ac.uk>
parents:
69945
diff
changeset
|
122 |
have "homotopic_with_canon (\<lambda>x. True) S S (id \<circ> r) id" |
68617 | 123 |
by (simp add: assms(1) homotopic_with_symD) |
69986
f2d327275065
generalised homotopic_with to topologies; homotopic_with_canon is the old version
paulson <lp15@cam.ac.uk>
parents:
69945
diff
changeset
|
124 |
moreover have "homotopic_with_canon (\<lambda>x. True) T T (r \<circ> id) id" |
68617 | 125 |
using r unfolding retraction_def |
69986
f2d327275065
generalised homotopic_with to topologies; homotopic_with_canon is the old version
paulson <lp15@cam.ac.uk>
parents:
69945
diff
changeset
|
126 |
by (metis eq_id_iff homotopic_with_id2 topspace_euclidean_subtopology) |
68617 | 127 |
ultimately |
128 |
show ?thesis |
|
69986
f2d327275065
generalised homotopic_with to topologies; homotopic_with_canon is the old version
paulson <lp15@cam.ac.uk>
parents:
69945
diff
changeset
|
129 |
unfolding homotopy_equivalent_space_def |
f2d327275065
generalised homotopic_with to topologies; homotopic_with_canon is the old version
paulson <lp15@cam.ac.uk>
parents:
69945
diff
changeset
|
130 |
by (metis (no_types, lifting) continuous_map_subtopology_eu continuous_on_id' id_def image_id r retraction_def) |
68617 | 131 |
qed |
132 |
||
133 |
lemma deformation_retract: |
|
134 |
fixes S :: "'a::euclidean_space set" |
|
69986
f2d327275065
generalised homotopic_with to topologies; homotopic_with_canon is the old version
paulson <lp15@cam.ac.uk>
parents:
69945
diff
changeset
|
135 |
shows "(\<exists>r. homotopic_with_canon (\<lambda>x. True) S S id r \<and> retraction S T r) \<longleftrightarrow> |
f2d327275065
generalised homotopic_with to topologies; homotopic_with_canon is the old version
paulson <lp15@cam.ac.uk>
parents:
69945
diff
changeset
|
136 |
T retract_of S \<and> (\<exists>f. homotopic_with_canon (\<lambda>x. True) S S id f \<and> f ` S \<subseteq> T)" |
68617 | 137 |
(is "?lhs = ?rhs") |
138 |
proof |
|
139 |
assume ?lhs |
|
140 |
then show ?rhs |
|
141 |
by (auto simp: retract_of_def retraction_def) |
|
142 |
next |
|
143 |
assume ?rhs |
|
144 |
then show ?lhs |
|
145 |
apply (clarsimp simp add: retract_of_def retraction_def) |
|
146 |
apply (rule_tac x=r in exI, simp) |
|
147 |
apply (rule homotopic_with_trans, assumption) |
|
148 |
apply (rule_tac f = "r \<circ> f" and g="r \<circ> id" in homotopic_with_eq) |
|
71745 | 149 |
apply (rule_tac Y=S in homotopic_with_compose_continuous_left) |
68617 | 150 |
apply (auto simp: homotopic_with_sym) |
151 |
done |
|
152 |
qed |
|
153 |
||
154 |
lemma deformation_retract_of_contractible_sing: |
|
155 |
fixes S :: "'a::euclidean_space set" |
|
156 |
assumes "contractible S" "a \<in> S" |
|
69986
f2d327275065
generalised homotopic_with to topologies; homotopic_with_canon is the old version
paulson <lp15@cam.ac.uk>
parents:
69945
diff
changeset
|
157 |
obtains r where "homotopic_with_canon (\<lambda>x. True) S S id r" "retraction S {a} r" |
68617 | 158 |
proof - |
159 |
have "{a} retract_of S" |
|
160 |
by (simp add: \<open>a \<in> S\<close>) |
|
69986
f2d327275065
generalised homotopic_with to topologies; homotopic_with_canon is the old version
paulson <lp15@cam.ac.uk>
parents:
69945
diff
changeset
|
161 |
moreover have "homotopic_with_canon (\<lambda>x. True) S S id (\<lambda>x. a)" |
68617 | 162 |
using assms |
69738 | 163 |
by (auto simp: contractible_def homotopic_into_contractible image_subset_iff) |
68617 | 164 |
moreover have "(\<lambda>x. a) ` S \<subseteq> {a}" |
165 |
by (simp add: image_subsetI) |
|
166 |
ultimately show ?thesis |
|
167 |
using that deformation_retract by metis |
|
168 |
qed |
|
169 |
||
170 |
||
171 |
lemma continuous_on_compact_surface_projection_aux: |
|
172 |
fixes S :: "'a::t2_space set" |
|
173 |
assumes "compact S" "S \<subseteq> T" "image q T \<subseteq> S" |
|
174 |
and contp: "continuous_on T p" |
|
175 |
and "\<And>x. x \<in> S \<Longrightarrow> q x = x" |
|
176 |
and [simp]: "\<And>x. x \<in> T \<Longrightarrow> q(p x) = q x" |
|
177 |
and "\<And>x. x \<in> T \<Longrightarrow> p(q x) = p x" |
|
178 |
shows "continuous_on T q" |
|
179 |
proof - |
|
180 |
have *: "image p T = image p S" |
|
181 |
using assms by auto (metis imageI subset_iff) |
|
182 |
have contp': "continuous_on S p" |
|
183 |
by (rule continuous_on_subset [OF contp \<open>S \<subseteq> T\<close>]) |
|
184 |
have "continuous_on (p ` T) q" |
|
185 |
by (simp add: "*" assms(1) assms(2) assms(5) continuous_on_inv contp' rev_subsetD) |
|
186 |
then have "continuous_on T (q \<circ> p)" |
|
187 |
by (rule continuous_on_compose [OF contp]) |
|
188 |
then show ?thesis |
|
189 |
by (rule continuous_on_eq [of _ "q \<circ> p"]) (simp add: o_def) |
|
190 |
qed |
|
191 |
||
192 |
lemma continuous_on_compact_surface_projection: |
|
193 |
fixes S :: "'a::real_normed_vector set" |
|
194 |
assumes "compact S" |
|
195 |
and S: "S \<subseteq> V - {0}" and "cone V" |
|
196 |
and iff: "\<And>x k. x \<in> V - {0} \<Longrightarrow> 0 < k \<and> (k *\<^sub>R x) \<in> S \<longleftrightarrow> d x = k" |
|
197 |
shows "continuous_on (V - {0}) (\<lambda>x. d x *\<^sub>R x)" |
|
198 |
proof (rule continuous_on_compact_surface_projection_aux [OF \<open>compact S\<close> S]) |
|
199 |
show "(\<lambda>x. d x *\<^sub>R x) ` (V - {0}) \<subseteq> S" |
|
200 |
using iff by auto |
|
201 |
show "continuous_on (V - {0}) (\<lambda>x. inverse(norm x) *\<^sub>R x)" |
|
202 |
by (intro continuous_intros) force |
|
203 |
show "\<And>x. x \<in> S \<Longrightarrow> d x *\<^sub>R x = x" |
|
204 |
by (metis S zero_less_one local.iff scaleR_one subset_eq) |
|
205 |
show "d (x /\<^sub>R norm x) *\<^sub>R (x /\<^sub>R norm x) = d x *\<^sub>R x" if "x \<in> V - {0}" for x |
|
206 |
using iff [of "inverse(norm x) *\<^sub>R x" "norm x * d x", symmetric] iff that \<open>cone V\<close> |
|
207 |
by (simp add: field_simps cone_def zero_less_mult_iff) |
|
208 |
show "d x *\<^sub>R x /\<^sub>R norm (d x *\<^sub>R x) = x /\<^sub>R norm x" if "x \<in> V - {0}" for x |
|
209 |
proof - |
|
210 |
have "0 < d x" |
|
211 |
using local.iff that by blast |
|
212 |
then show ?thesis |
|
213 |
by simp |
|
214 |
qed |
|
215 |
qed |
|
216 |
||
217 |
subsection \<open>Kuhn Simplices\<close> |
|
218 |
||
56273
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
219 |
lemma bij_betw_singleton_eq: |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
220 |
assumes f: "bij_betw f A B" and g: "bij_betw g A B" and a: "a \<in> A" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
221 |
assumes eq: "(\<And>x. x \<in> A \<Longrightarrow> x \<noteq> a \<Longrightarrow> f x = g x)" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
222 |
shows "f a = g a" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
223 |
proof - |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
224 |
have "f ` (A - {a}) = g ` (A - {a})" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
225 |
by (intro image_cong) (simp_all add: eq) |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
226 |
then have "B - {f a} = B - {g a}" |
69286 | 227 |
using f g a by (auto simp: bij_betw_def inj_on_image_set_diff set_eq_iff) |
56273
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
228 |
moreover have "f a \<in> B" "g a \<in> B" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
229 |
using f g a by (auto simp: bij_betw_def) |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
230 |
ultimately show ?thesis |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
231 |
by auto |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
232 |
qed |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
233 |
|
63365 | 234 |
lemmas swap_apply1 = swap_apply(1) |
235 |
lemmas swap_apply2 = swap_apply(2) |
|
56273
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
236 |
|
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
237 |
lemma pointwise_minimal_pointwise_maximal: |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
238 |
fixes s :: "(nat \<Rightarrow> nat) set" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
239 |
assumes "finite s" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
240 |
and "s \<noteq> {}" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
241 |
and "\<forall>x\<in>s. \<forall>y\<in>s. x \<le> y \<or> y \<le> x" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
242 |
shows "\<exists>a\<in>s. \<forall>x\<in>s. a \<le> x" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
243 |
and "\<exists>a\<in>s. \<forall>x\<in>s. x \<le> a" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
244 |
using assms |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
245 |
proof (induct s rule: finite_ne_induct) |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
246 |
case (insert b s) |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
247 |
assume *: "\<forall>x\<in>insert b s. \<forall>y\<in>insert b s. x \<le> y \<or> y \<le> x" |
63540 | 248 |
then obtain u l where "l \<in> s" "\<forall>b\<in>s. l \<le> b" "u \<in> s" "\<forall>b\<in>s. b \<le> u" |
56273
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
249 |
using insert by auto |
63540 | 250 |
with * show "\<exists>a\<in>insert b s. \<forall>x\<in>insert b s. a \<le> x" "\<exists>a\<in>insert b s. \<forall>x\<in>insert b s. x \<le> a" |
76786 | 251 |
by (metis insert_iff order.trans)+ |
56273
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
252 |
qed auto |
50526
899c9c4e4a4c
Remove the indexed basis from the definition of euclidean spaces and only use the set of Basis vectors
hoelzl
parents:
50514
diff
changeset
|
253 |
|
49555 | 254 |
lemma kuhn_labelling_lemma: |
50526
899c9c4e4a4c
Remove the indexed basis from the definition of euclidean spaces and only use the set of Basis vectors
hoelzl
parents:
50514
diff
changeset
|
255 |
fixes P Q :: "'a::euclidean_space \<Rightarrow> bool" |
56273
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
256 |
assumes "\<forall>x. P x \<longrightarrow> P (f x)" |
50526
899c9c4e4a4c
Remove the indexed basis from the definition of euclidean spaces and only use the set of Basis vectors
hoelzl
parents:
50514
diff
changeset
|
257 |
and "\<forall>x. P x \<longrightarrow> (\<forall>i\<in>Basis. Q i \<longrightarrow> 0 \<le> x\<bullet>i \<and> x\<bullet>i \<le> 1)" |
899c9c4e4a4c
Remove the indexed basis from the definition of euclidean spaces and only use the set of Basis vectors
hoelzl
parents:
50514
diff
changeset
|
258 |
shows "\<exists>l. (\<forall>x.\<forall>i\<in>Basis. l x i \<le> (1::nat)) \<and> |
899c9c4e4a4c
Remove the indexed basis from the definition of euclidean spaces and only use the set of Basis vectors
hoelzl
parents:
50514
diff
changeset
|
259 |
(\<forall>x.\<forall>i\<in>Basis. P x \<and> Q i \<and> (x\<bullet>i = 0) \<longrightarrow> (l x i = 0)) \<and> |
899c9c4e4a4c
Remove the indexed basis from the definition of euclidean spaces and only use the set of Basis vectors
hoelzl
parents:
50514
diff
changeset
|
260 |
(\<forall>x.\<forall>i\<in>Basis. P x \<and> Q i \<and> (x\<bullet>i = 1) \<longrightarrow> (l x i = 1)) \<and> |
56273
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
261 |
(\<forall>x.\<forall>i\<in>Basis. P x \<and> Q i \<and> (l x i = 0) \<longrightarrow> x\<bullet>i \<le> f x\<bullet>i) \<and> |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
262 |
(\<forall>x.\<forall>i\<in>Basis. P x \<and> Q i \<and> (l x i = 1) \<longrightarrow> f x\<bullet>i \<le> x\<bullet>i)" |
49374 | 263 |
proof - |
56273
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
264 |
{ fix x i |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
265 |
let ?R = "\<lambda>y. (P x \<and> Q i \<and> x \<bullet> i = 0 \<longrightarrow> y = (0::nat)) \<and> |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
266 |
(P x \<and> Q i \<and> x \<bullet> i = 1 \<longrightarrow> y = 1) \<and> |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
267 |
(P x \<and> Q i \<and> y = 0 \<longrightarrow> x \<bullet> i \<le> f x \<bullet> i) \<and> |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
268 |
(P x \<and> Q i \<and> y = 1 \<longrightarrow> f x \<bullet> i \<le> x \<bullet> i)" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
269 |
{ assume "P x" "Q i" "i \<in> Basis" with assms have "0 \<le> f x \<bullet> i \<and> f x \<bullet> i \<le> 1" by auto } |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
270 |
then have "i \<in> Basis \<Longrightarrow> ?R 0 \<or> ?R 1" by auto } |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
271 |
then show ?thesis |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
272 |
unfolding all_conj_distrib[symmetric] Ball_def (* FIXME: shouldn't this work by metis? *) |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
273 |
by (subst choice_iff[symmetric])+ blast |
49374 | 274 |
qed |
275 |
||
53185 | 276 |
|
68617 | 277 |
subsubsection \<open>The key "counting" observation, somewhat abstracted\<close> |
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
278 |
|
53252 | 279 |
lemma kuhn_counting_lemma: |
56273
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
280 |
fixes bnd compo compo' face S F |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
281 |
defines "nF s == card {f\<in>F. face f s \<and> compo' f}" |
67443
3abf6a722518
standardized towards new-style formal comments: isabelle update_comments;
wenzelm
parents:
67399
diff
changeset
|
282 |
assumes [simp, intro]: "finite F" \<comment> \<open>faces\<close> and [simp, intro]: "finite S" \<comment> \<open>simplices\<close> |
56273
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
283 |
and "\<And>f. f \<in> F \<Longrightarrow> bnd f \<Longrightarrow> card {s\<in>S. face f s} = 1" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
284 |
and "\<And>f. f \<in> F \<Longrightarrow> \<not> bnd f \<Longrightarrow> card {s\<in>S. face f s} = 2" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
285 |
and "\<And>s. s \<in> S \<Longrightarrow> compo s \<Longrightarrow> nF s = 1" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
286 |
and "\<And>s. s \<in> S \<Longrightarrow> \<not> compo s \<Longrightarrow> nF s = 0 \<or> nF s = 2" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
287 |
and "odd (card {f\<in>F. compo' f \<and> bnd f})" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
288 |
shows "odd (card {s\<in>S. compo s})" |
53185 | 289 |
proof - |
56273
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
290 |
have "(\<Sum>s | s \<in> S \<and> \<not> compo s. nF s) + (\<Sum>s | s \<in> S \<and> compo s. nF s) = (\<Sum>s\<in>S. nF s)" |
64267 | 291 |
by (subst sum.union_disjoint[symmetric]) (auto intro!: sum.cong) |
56273
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
292 |
also have "\<dots> = (\<Sum>s\<in>S. card {f \<in> {f\<in>F. compo' f \<and> bnd f}. face f s}) + |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
293 |
(\<Sum>s\<in>S. card {f \<in> {f\<in>F. compo' f \<and> \<not> bnd f}. face f s})" |
64267 | 294 |
unfolding sum.distrib[symmetric] |
56273
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
295 |
by (subst card_Un_disjoint[symmetric]) |
64267 | 296 |
(auto simp: nF_def intro!: sum.cong arg_cong[where f=card]) |
56273
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
297 |
also have "\<dots> = 1 * card {f\<in>F. compo' f \<and> bnd f} + 2 * card {f\<in>F. compo' f \<and> \<not> bnd f}" |
67399 | 298 |
using assms(4,5) by (fastforce intro!: arg_cong2[where f="(+)"] sum_multicount) |
56273
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
299 |
finally have "odd ((\<Sum>s | s \<in> S \<and> \<not> compo s. nF s) + card {s\<in>S. compo s})" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
300 |
using assms(6,8) by simp |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
301 |
moreover have "(\<Sum>s | s \<in> S \<and> \<not> compo s. nF s) = |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
302 |
(\<Sum>s | s \<in> S \<and> \<not> compo s \<and> nF s = 0. nF s) + (\<Sum>s | s \<in> S \<and> \<not> compo s \<and> nF s = 2. nF s)" |
64267 | 303 |
using assms(7) by (subst sum.union_disjoint[symmetric]) (fastforce intro!: sum.cong)+ |
53688 | 304 |
ultimately show ?thesis |
305 |
by auto |
|
53186 | 306 |
qed |
307 |
||
68617 | 308 |
subsubsection \<open>The odd/even result for faces of complete vertices, generalized\<close> |
56273
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
309 |
|
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
310 |
lemma kuhn_complete_lemma: |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
311 |
assumes [simp]: "finite simplices" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
312 |
and face: "\<And>f s. face f s \<longleftrightarrow> (\<exists>a\<in>s. f = s - {a})" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
313 |
and card_s[simp]: "\<And>s. s \<in> simplices \<Longrightarrow> card s = n + 2" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
314 |
and rl_bd: "\<And>s. s \<in> simplices \<Longrightarrow> rl ` s \<subseteq> {..Suc n}" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
315 |
and bnd: "\<And>f s. s \<in> simplices \<Longrightarrow> face f s \<Longrightarrow> bnd f \<Longrightarrow> card {s\<in>simplices. face f s} = 1" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
316 |
and nbnd: "\<And>f s. s \<in> simplices \<Longrightarrow> face f s \<Longrightarrow> \<not> bnd f \<Longrightarrow> card {s\<in>simplices. face f s} = 2" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
317 |
and odd_card: "odd (card {f. (\<exists>s\<in>simplices. face f s) \<and> rl ` f = {..n} \<and> bnd f})" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
318 |
shows "odd (card {s\<in>simplices. (rl ` s = {..Suc n})})" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
319 |
proof (rule kuhn_counting_lemma) |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
320 |
have finite_s[simp]: "\<And>s. s \<in> simplices \<Longrightarrow> finite s" |
72302
d7d90ed4c74e
fixed some remarkably ugly proofs
paulson <lp15@cam.ac.uk>
parents:
71745
diff
changeset
|
321 |
by (metis add_is_0 zero_neq_numeral card.infinite assms(3)) |
56273
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
322 |
|
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
323 |
let ?F = "{f. \<exists>s\<in>simplices. face f s}" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
324 |
have F_eq: "?F = (\<Union>s\<in>simplices. \<Union>a\<in>s. {s - {a}})" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
325 |
by (auto simp: face) |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
326 |
show "finite ?F" |
60420 | 327 |
using \<open>finite simplices\<close> unfolding F_eq by auto |
56273
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
328 |
|
60421 | 329 |
show "card {s \<in> simplices. face f s} = 1" if "f \<in> ?F" "bnd f" for f |
60449 | 330 |
using bnd that by auto |
56273
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
331 |
|
60421 | 332 |
show "card {s \<in> simplices. face f s} = 2" if "f \<in> ?F" "\<not> bnd f" for f |
60449 | 333 |
using nbnd that by auto |
56273
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
334 |
|
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
335 |
show "odd (card {f \<in> {f. \<exists>s\<in>simplices. face f s}. rl ` f = {..n} \<and> bnd f})" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
336 |
using odd_card by simp |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
337 |
|
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
338 |
fix s assume s[simp]: "s \<in> simplices" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
339 |
let ?S = "{f \<in> {f. \<exists>s\<in>simplices. face f s}. face f s \<and> rl ` f = {..n}}" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
340 |
have "?S = (\<lambda>a. s - {a}) ` {a\<in>s. rl ` (s - {a}) = {..n}}" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
341 |
using s by (fastforce simp: face) |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
342 |
then have card_S: "card ?S = card {a\<in>s. rl ` (s - {a}) = {..n}}" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
343 |
by (auto intro!: card_image inj_onI) |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
344 |
|
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
345 |
{ assume rl: "rl ` s = {..Suc n}" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
346 |
then have inj_rl: "inj_on rl s" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
347 |
by (intro eq_card_imp_inj_on) auto |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
348 |
moreover obtain a where "rl a = Suc n" "a \<in> s" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
349 |
by (metis atMost_iff image_iff le_Suc_eq rl) |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
350 |
ultimately have n: "{..n} = rl ` (s - {a})" |
69286 | 351 |
by (auto simp: inj_on_image_set_diff rl) |
56273
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
352 |
have "{a\<in>s. rl ` (s - {a}) = {..n}} = {a}" |
69286 | 353 |
using inj_rl \<open>a \<in> s\<close> by (auto simp: n inj_on_image_eq_iff[OF inj_rl]) |
56273
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
354 |
then show "card ?S = 1" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
355 |
unfolding card_S by simp } |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
356 |
|
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
357 |
{ assume rl: "rl ` s \<noteq> {..Suc n}" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
358 |
show "card ?S = 0 \<or> card ?S = 2" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
359 |
proof cases |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
360 |
assume *: "{..n} \<subseteq> rl ` s" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
361 |
with rl rl_bd[OF s] have rl_s: "rl ` s = {..n}" |
68022 | 362 |
by (auto simp: atMost_Suc subset_insert_iff split: if_split_asm) |
56273
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
363 |
then have "\<not> inj_on rl s" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
364 |
by (intro pigeonhole) simp |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
365 |
then obtain a b where ab: "a \<in> s" "b \<in> s" "rl a = rl b" "a \<noteq> b" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
366 |
by (auto simp: inj_on_def) |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
367 |
then have eq: "rl ` (s - {a}) = rl ` s" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
368 |
by auto |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
369 |
with ab have inj: "inj_on rl (s - {a})" |
68022 | 370 |
by (intro eq_card_imp_inj_on) (auto simp: rl_s card_Diff_singleton_if) |
56273
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
371 |
|
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
372 |
{ fix x assume "x \<in> s" "x \<notin> {a, b}" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
373 |
then have "rl ` s - {rl x} = rl ` ((s - {a}) - {x})" |
69286 | 374 |
by (auto simp: eq inj_on_image_set_diff[OF inj]) |
56273
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
375 |
also have "\<dots> = rl ` (s - {x})" |
60420 | 376 |
using ab \<open>x \<notin> {a, b}\<close> by auto |
56273
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
377 |
also assume "\<dots> = rl ` s" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
378 |
finally have False |
60420 | 379 |
using \<open>x\<in>s\<close> by auto } |
56273
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
380 |
moreover |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
381 |
{ fix x assume "x \<in> {a, b}" with ab have "x \<in> s \<and> rl ` (s - {x}) = rl ` s" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
382 |
by (simp add: set_eq_iff image_iff Bex_def) metis } |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
383 |
ultimately have "{a\<in>s. rl ` (s - {a}) = {..n}} = {a, b}" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
384 |
unfolding rl_s[symmetric] by fastforce |
60420 | 385 |
with \<open>a \<noteq> b\<close> show "card ?S = 0 \<or> card ?S = 2" |
56273
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
386 |
unfolding card_S by simp |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
387 |
next |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
388 |
assume "\<not> {..n} \<subseteq> rl ` s" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
389 |
then have "\<And>x. rl ` (s - {x}) \<noteq> {..n}" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
390 |
by auto |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
391 |
then show "card ?S = 0 \<or> card ?S = 2" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
392 |
unfolding card_S by simp |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
393 |
qed } |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
394 |
qed fact |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
395 |
|
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
396 |
locale kuhn_simplex = |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
397 |
fixes p n and base upd and s :: "(nat \<Rightarrow> nat) set" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
398 |
assumes base: "base \<in> {..< n} \<rightarrow> {..< p}" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
399 |
assumes base_out: "\<And>i. n \<le> i \<Longrightarrow> base i = p" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
400 |
assumes upd: "bij_betw upd {..< n} {..< n}" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
401 |
assumes s_pre: "s = (\<lambda>i j. if j \<in> upd`{..< i} then Suc (base j) else base j) ` {.. n}" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
402 |
begin |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
403 |
|
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
404 |
definition "enum i j = (if j \<in> upd`{..< i} then Suc (base j) else base j)" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
405 |
|
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
406 |
lemma s_eq: "s = enum ` {.. n}" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
407 |
unfolding s_pre enum_def[abs_def] .. |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
408 |
|
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
409 |
lemma upd_space: "i < n \<Longrightarrow> upd i < n" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
410 |
using upd by (auto dest!: bij_betwE) |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
411 |
|
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
412 |
lemma s_space: "s \<subseteq> {..< n} \<rightarrow> {.. p}" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
413 |
proof - |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
414 |
{ fix i assume "i \<le> n" then have "enum i \<in> {..< n} \<rightarrow> {.. p}" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
415 |
proof (induct i) |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
416 |
case 0 then show ?case |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
417 |
using base by (auto simp: Pi_iff less_imp_le enum_def) |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
418 |
next |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
419 |
case (Suc i) with base show ?case |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
420 |
by (auto simp: Pi_iff Suc_le_eq less_imp_le enum_def intro: upd_space) |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
421 |
qed } |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
422 |
then show ?thesis |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
423 |
by (auto simp: s_eq) |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
424 |
qed |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
425 |
|
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
426 |
lemma inj_upd: "inj_on upd {..< n}" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
427 |
using upd by (simp add: bij_betw_def) |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
428 |
|
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
429 |
lemma inj_enum: "inj_on enum {.. n}" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
430 |
proof - |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
431 |
{ fix x y :: nat assume "x \<noteq> y" "x \<le> n" "y \<le> n" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
432 |
with upd have "upd ` {..< x} \<noteq> upd ` {..< y}" |
61609
77b453bd616f
Coercion "real" now has type nat => real only and is no longer overloaded. Type class "real_of" is gone. Many duplicate theorems removed.
paulson <lp15@cam.ac.uk>
parents:
61520
diff
changeset
|
433 |
by (subst inj_on_image_eq_iff[where C="{..< n}"]) (auto simp: bij_betw_def) |
56273
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
434 |
then have "enum x \<noteq> enum y" |
68022 | 435 |
by (auto simp: enum_def fun_eq_iff) } |
56273
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
436 |
then show ?thesis |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
437 |
by (auto simp: inj_on_def) |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
438 |
qed |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
439 |
|
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
440 |
lemma enum_0: "enum 0 = base" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
441 |
by (simp add: enum_def[abs_def]) |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
442 |
|
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
443 |
lemma base_in_s: "base \<in> s" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
444 |
unfolding s_eq by (subst enum_0[symmetric]) auto |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
445 |
|
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
446 |
lemma enum_in: "i \<le> n \<Longrightarrow> enum i \<in> s" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
447 |
unfolding s_eq by auto |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
448 |
|
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
449 |
lemma one_step: |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
450 |
assumes a: "a \<in> s" "j < n" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
451 |
assumes *: "\<And>a'. a' \<in> s \<Longrightarrow> a' \<noteq> a \<Longrightarrow> a' j = p'" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
452 |
shows "a j \<noteq> p'" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
453 |
proof |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
454 |
assume "a j = p'" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
455 |
with * a have "\<And>a'. a' \<in> s \<Longrightarrow> a' j = p'" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
456 |
by auto |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
457 |
then have "\<And>i. i \<le> n \<Longrightarrow> enum i j = p'" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
458 |
unfolding s_eq by auto |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
459 |
from this[of 0] this[of n] have "j \<notin> upd ` {..< n}" |
62390 | 460 |
by (auto simp: enum_def fun_eq_iff split: if_split_asm) |
60420 | 461 |
with upd \<open>j < n\<close> show False |
56273
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
462 |
by (auto simp: bij_betw_def) |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
463 |
qed |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
464 |
|
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
465 |
lemma upd_inj: "i < n \<Longrightarrow> j < n \<Longrightarrow> upd i = upd j \<longleftrightarrow> i = j" |
61520
8f85bb443d33
Cauchy's integral formula, required lemmas, and a bit of reorganisation
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
466 |
using upd by (auto simp: bij_betw_def inj_on_eq_iff) |
56273
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
467 |
|
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
468 |
lemma upd_surj: "upd ` {..< n} = {..< n}" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
469 |
using upd by (auto simp: bij_betw_def) |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
470 |
|
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
471 |
lemma in_upd_image: "A \<subseteq> {..< n} \<Longrightarrow> i < n \<Longrightarrow> upd i \<in> upd ` A \<longleftrightarrow> i \<in> A" |
61520
8f85bb443d33
Cauchy's integral formula, required lemmas, and a bit of reorganisation
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
472 |
using inj_on_image_mem_iff[of upd "{..< n}"] upd |
56273
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
473 |
by (auto simp: bij_betw_def) |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
474 |
|
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
475 |
lemma enum_inj: "i \<le> n \<Longrightarrow> j \<le> n \<Longrightarrow> enum i = enum j \<longleftrightarrow> i = j" |
61520
8f85bb443d33
Cauchy's integral formula, required lemmas, and a bit of reorganisation
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
476 |
using inj_enum by (auto simp: inj_on_eq_iff) |
56273
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
477 |
|
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
478 |
lemma in_enum_image: "A \<subseteq> {.. n} \<Longrightarrow> i \<le> n \<Longrightarrow> enum i \<in> enum ` A \<longleftrightarrow> i \<in> A" |
61520
8f85bb443d33
Cauchy's integral formula, required lemmas, and a bit of reorganisation
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
479 |
using inj_on_image_mem_iff[OF inj_enum] by auto |
56273
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
480 |
|
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
481 |
lemma enum_mono: "i \<le> n \<Longrightarrow> j \<le> n \<Longrightarrow> enum i \<le> enum j \<longleftrightarrow> i \<le> j" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
482 |
by (auto simp: enum_def le_fun_def in_upd_image Ball_def[symmetric]) |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
483 |
|
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
484 |
lemma enum_strict_mono: "i \<le> n \<Longrightarrow> j \<le> n \<Longrightarrow> enum i < enum j \<longleftrightarrow> i < j" |
68022 | 485 |
using enum_mono[of i j] enum_inj[of i j] by (auto simp: le_less) |
56273
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
486 |
|
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
487 |
lemma chain: "a \<in> s \<Longrightarrow> b \<in> s \<Longrightarrow> a \<le> b \<or> b \<le> a" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
488 |
by (auto simp: s_eq enum_mono) |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
489 |
|
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
490 |
lemma less: "a \<in> s \<Longrightarrow> b \<in> s \<Longrightarrow> a i < b i \<Longrightarrow> a < b" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
491 |
using chain[of a b] by (auto simp: less_fun_def le_fun_def not_le[symmetric]) |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
492 |
|
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
493 |
lemma enum_0_bot: "a \<in> s \<Longrightarrow> a = enum 0 \<longleftrightarrow> (\<forall>a'\<in>s. a \<le> a')" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
494 |
unfolding s_eq by (auto simp: enum_mono Ball_def) |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
495 |
|
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
496 |
lemma enum_n_top: "a \<in> s \<Longrightarrow> a = enum n \<longleftrightarrow> (\<forall>a'\<in>s. a' \<le> a)" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
497 |
unfolding s_eq by (auto simp: enum_mono Ball_def) |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
498 |
|
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
499 |
lemma enum_Suc: "i < n \<Longrightarrow> enum (Suc i) = (enum i)(upd i := Suc (enum i (upd i)))" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
500 |
by (auto simp: fun_eq_iff enum_def upd_inj) |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
501 |
|
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
502 |
lemma enum_eq_p: "i \<le> n \<Longrightarrow> n \<le> j \<Longrightarrow> enum i j = p" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
503 |
by (induct i) (auto simp: enum_Suc enum_0 base_out upd_space not_less[symmetric]) |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
504 |
|
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
505 |
lemma out_eq_p: "a \<in> s \<Longrightarrow> n \<le> j \<Longrightarrow> a j = p" |
68022 | 506 |
unfolding s_eq by (auto simp: enum_eq_p) |
56273
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
507 |
|
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
508 |
lemma s_le_p: "a \<in> s \<Longrightarrow> a j \<le> p" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
509 |
using out_eq_p[of a j] s_space by (cases "j < n") auto |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
510 |
|
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
511 |
lemma le_Suc_base: "a \<in> s \<Longrightarrow> a j \<le> Suc (base j)" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
512 |
unfolding s_eq by (auto simp: enum_def) |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
513 |
|
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
514 |
lemma base_le: "a \<in> s \<Longrightarrow> base j \<le> a j" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
515 |
unfolding s_eq by (auto simp: enum_def) |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
516 |
|
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
517 |
lemma enum_le_p: "i \<le> n \<Longrightarrow> j < n \<Longrightarrow> enum i j \<le> p" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
518 |
using enum_in[of i] s_space by auto |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
519 |
|
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
520 |
lemma enum_less: "a \<in> s \<Longrightarrow> i < n \<Longrightarrow> enum i < a \<longleftrightarrow> enum (Suc i) \<le> a" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
521 |
unfolding s_eq by (auto simp: enum_strict_mono enum_mono) |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
522 |
|
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
523 |
lemma ksimplex_0: |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
524 |
"n = 0 \<Longrightarrow> s = {(\<lambda>x. p)}" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
525 |
using s_eq enum_def base_out by auto |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
526 |
|
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
527 |
lemma replace_0: |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
528 |
assumes "j < n" "a \<in> s" and p: "\<forall>x\<in>s - {a}. x j = 0" and "x \<in> s" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
529 |
shows "x \<le> a" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
530 |
proof cases |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
531 |
assume "x \<noteq> a" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
532 |
have "a j \<noteq> 0" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
533 |
using assms by (intro one_step[where a=a]) auto |
60420 | 534 |
with less[OF \<open>x\<in>s\<close> \<open>a\<in>s\<close>, of j] p[rule_format, of x] \<open>x \<in> s\<close> \<open>x \<noteq> a\<close> |
56273
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
535 |
show ?thesis |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
536 |
by auto |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
537 |
qed simp |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
538 |
|
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
539 |
lemma replace_1: |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
540 |
assumes "j < n" "a \<in> s" and p: "\<forall>x\<in>s - {a}. x j = p" and "x \<in> s" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
541 |
shows "a \<le> x" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
542 |
proof cases |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
543 |
assume "x \<noteq> a" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
544 |
have "a j \<noteq> p" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
545 |
using assms by (intro one_step[where a=a]) auto |
60420 | 546 |
with enum_le_p[of _ j] \<open>j < n\<close> \<open>a\<in>s\<close> |
56273
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
547 |
have "a j < p" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
548 |
by (auto simp: less_le s_eq) |
60420 | 549 |
with less[OF \<open>a\<in>s\<close> \<open>x\<in>s\<close>, of j] p[rule_format, of x] \<open>x \<in> s\<close> \<open>x \<noteq> a\<close> |
56273
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
550 |
show ?thesis |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
551 |
by auto |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
552 |
qed simp |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
553 |
|
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
554 |
end |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
555 |
|
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
556 |
locale kuhn_simplex_pair = s: kuhn_simplex p n b_s u_s s + t: kuhn_simplex p n b_t u_t t |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
557 |
for p n b_s u_s s b_t u_t t |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
558 |
begin |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
559 |
|
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
560 |
lemma enum_eq: |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
561 |
assumes l: "i \<le> l" "l \<le> j" and "j + d \<le> n" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
562 |
assumes eq: "s.enum ` {i .. j} = t.enum ` {i + d .. j + d}" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
563 |
shows "s.enum l = t.enum (l + d)" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
564 |
using l proof (induct l rule: dec_induct) |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
565 |
case base |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
566 |
then have s: "s.enum i \<in> t.enum ` {i + d .. j + d}" and t: "t.enum (i + d) \<in> s.enum ` {i .. j}" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
567 |
using eq by auto |
60420 | 568 |
from t \<open>i \<le> j\<close> \<open>j + d \<le> n\<close> have "s.enum i \<le> t.enum (i + d)" |
56273
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
569 |
by (auto simp: s.enum_mono) |
60420 | 570 |
moreover from s \<open>i \<le> j\<close> \<open>j + d \<le> n\<close> have "t.enum (i + d) \<le> s.enum i" |
56273
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
571 |
by (auto simp: t.enum_mono) |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
572 |
ultimately show ?case |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
573 |
by auto |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
574 |
next |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
575 |
case (step l) |
60420 | 576 |
moreover from step.prems \<open>j + d \<le> n\<close> have |
56273
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
577 |
"s.enum l < s.enum (Suc l)" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
578 |
"t.enum (l + d) < t.enum (Suc l + d)" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
579 |
by (simp_all add: s.enum_strict_mono t.enum_strict_mono) |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
580 |
moreover have |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
581 |
"s.enum (Suc l) \<in> t.enum ` {i + d .. j + d}" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
582 |
"t.enum (Suc l + d) \<in> s.enum ` {i .. j}" |
60420 | 583 |
using step \<open>j + d \<le> n\<close> eq by (auto simp: s.enum_inj t.enum_inj) |
56273
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
584 |
ultimately have "s.enum (Suc l) = t.enum (Suc (l + d))" |
60420 | 585 |
using \<open>j + d \<le> n\<close> |
61609
77b453bd616f
Coercion "real" now has type nat => real only and is no longer overloaded. Type class "real_of" is gone. Many duplicate theorems removed.
paulson <lp15@cam.ac.uk>
parents:
61520
diff
changeset
|
586 |
by (intro antisym s.enum_less[THEN iffD1] t.enum_less[THEN iffD1]) |
56273
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
587 |
(auto intro!: s.enum_in t.enum_in) |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
588 |
then show ?case by simp |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
589 |
qed |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
590 |
|
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
591 |
lemma ksimplex_eq_bot: |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
592 |
assumes a: "a \<in> s" "\<And>a'. a' \<in> s \<Longrightarrow> a \<le> a'" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
593 |
assumes b: "b \<in> t" "\<And>b'. b' \<in> t \<Longrightarrow> b \<le> b'" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
594 |
assumes eq: "s - {a} = t - {b}" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
595 |
shows "s = t" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
596 |
proof cases |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
597 |
assume "n = 0" with s.ksimplex_0 t.ksimplex_0 show ?thesis by simp |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
598 |
next |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
599 |
assume "n \<noteq> 0" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
600 |
have "s.enum 0 = (s.enum (Suc 0)) (u_s 0 := s.enum (Suc 0) (u_s 0) - 1)" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
601 |
"t.enum 0 = (t.enum (Suc 0)) (u_t 0 := t.enum (Suc 0) (u_t 0) - 1)" |
60420 | 602 |
using \<open>n \<noteq> 0\<close> by (simp_all add: s.enum_Suc t.enum_Suc) |
56273
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
603 |
moreover have e0: "a = s.enum 0" "b = t.enum 0" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
604 |
using a b by (simp_all add: s.enum_0_bot t.enum_0_bot) |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
605 |
moreover |
61609
77b453bd616f
Coercion "real" now has type nat => real only and is no longer overloaded. Type class "real_of" is gone. Many duplicate theorems removed.
paulson <lp15@cam.ac.uk>
parents:
61520
diff
changeset
|
606 |
{ fix j assume "0 < j" "j \<le> n" |
56273
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
607 |
moreover have "s - {a} = s.enum ` {Suc 0 .. n}" "t - {b} = t.enum ` {Suc 0 .. n}" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
608 |
unfolding s.s_eq t.s_eq e0 by (auto simp: s.enum_inj t.enum_inj) |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
609 |
ultimately have "s.enum j = t.enum j" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
610 |
using enum_eq[of "1" j n 0] eq by auto } |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
611 |
note enum_eq = this |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
612 |
then have "s.enum (Suc 0) = t.enum (Suc 0)" |
60420 | 613 |
using \<open>n \<noteq> 0\<close> by auto |
56273
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
614 |
moreover |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
615 |
{ fix j assume "Suc j < n" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
616 |
with enum_eq[of "Suc j"] enum_eq[of "Suc (Suc j)"] |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
617 |
have "u_s (Suc j) = u_t (Suc j)" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
618 |
using s.enum_Suc[of "Suc j"] t.enum_Suc[of "Suc j"] |
62390 | 619 |
by (auto simp: fun_eq_iff split: if_split_asm) } |
56273
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
620 |
then have "\<And>j. 0 < j \<Longrightarrow> j < n \<Longrightarrow> u_s j = u_t j" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
621 |
by (auto simp: gr0_conv_Suc) |
60420 | 622 |
with \<open>n \<noteq> 0\<close> have "u_t 0 = u_s 0" |
56273
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
623 |
by (intro bij_betw_singleton_eq[OF t.upd s.upd, of 0]) auto |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
624 |
ultimately have "a = b" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
625 |
by simp |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
626 |
with assms show "s = t" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
627 |
by auto |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
628 |
qed |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
629 |
|
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
630 |
lemma ksimplex_eq_top: |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
631 |
assumes a: "a \<in> s" "\<And>a'. a' \<in> s \<Longrightarrow> a' \<le> a" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
632 |
assumes b: "b \<in> t" "\<And>b'. b' \<in> t \<Longrightarrow> b' \<le> b" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
633 |
assumes eq: "s - {a} = t - {b}" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
634 |
shows "s = t" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
635 |
proof (cases n) |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
636 |
assume "n = 0" with s.ksimplex_0 t.ksimplex_0 show ?thesis by simp |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
637 |
next |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
638 |
case (Suc n') |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
639 |
have "s.enum n = (s.enum n') (u_s n' := Suc (s.enum n' (u_s n')))" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
640 |
"t.enum n = (t.enum n') (u_t n' := Suc (t.enum n' (u_t n')))" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
641 |
using Suc by (simp_all add: s.enum_Suc t.enum_Suc) |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
642 |
moreover have en: "a = s.enum n" "b = t.enum n" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
643 |
using a b by (simp_all add: s.enum_n_top t.enum_n_top) |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
644 |
moreover |
61609
77b453bd616f
Coercion "real" now has type nat => real only and is no longer overloaded. Type class "real_of" is gone. Many duplicate theorems removed.
paulson <lp15@cam.ac.uk>
parents:
61520
diff
changeset
|
645 |
{ fix j assume "j < n" |
56273
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
646 |
moreover have "s - {a} = s.enum ` {0 .. n'}" "t - {b} = t.enum ` {0 .. n'}" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
647 |
unfolding s.s_eq t.s_eq en by (auto simp: s.enum_inj t.enum_inj Suc) |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
648 |
ultimately have "s.enum j = t.enum j" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
649 |
using enum_eq[of "0" j n' 0] eq Suc by auto } |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
650 |
note enum_eq = this |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
651 |
then have "s.enum n' = t.enum n'" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
652 |
using Suc by auto |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
653 |
moreover |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
654 |
{ fix j assume "j < n'" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
655 |
with enum_eq[of j] enum_eq[of "Suc j"] |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
656 |
have "u_s j = u_t j" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
657 |
using s.enum_Suc[of j] t.enum_Suc[of j] |
62390 | 658 |
by (auto simp: Suc fun_eq_iff split: if_split_asm) } |
56273
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
659 |
then have "\<And>j. j < n' \<Longrightarrow> u_s j = u_t j" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
660 |
by (auto simp: gr0_conv_Suc) |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
661 |
then have "u_t n' = u_s n'" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
662 |
by (intro bij_betw_singleton_eq[OF t.upd s.upd, of n']) (auto simp: Suc) |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
663 |
ultimately have "a = b" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
664 |
by simp |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
665 |
with assms show "s = t" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
666 |
by auto |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
667 |
qed |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
668 |
|
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
669 |
end |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
670 |
|
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
671 |
inductive ksimplex for p n :: nat where |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
672 |
ksimplex: "kuhn_simplex p n base upd s \<Longrightarrow> ksimplex p n s" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
673 |
|
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
674 |
lemma finite_ksimplexes: "finite {s. ksimplex p n s}" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
675 |
proof (rule finite_subset) |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
676 |
{ fix a s assume "ksimplex p n s" "a \<in> s" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
677 |
then obtain b u where "kuhn_simplex p n b u s" by (auto elim: ksimplex.cases) |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
678 |
then interpret kuhn_simplex p n b u s . |
60420 | 679 |
from s_space \<open>a \<in> s\<close> out_eq_p[OF \<open>a \<in> s\<close>] |
56273
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
680 |
have "a \<in> (\<lambda>f x. if n \<le> x then p else f x) ` ({..< n} \<rightarrow>\<^sub>E {.. p})" |
62390 | 681 |
by (auto simp: image_iff subset_eq Pi_iff split: if_split_asm |
56273
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
682 |
intro!: bexI[of _ "restrict a {..< n}"]) } |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
683 |
then show "{s. ksimplex p n s} \<subseteq> Pow ((\<lambda>f x. if n \<le> x then p else f x) ` ({..< n} \<rightarrow>\<^sub>E {.. p}))" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
684 |
by auto |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
685 |
qed (simp add: finite_PiE) |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
686 |
|
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
687 |
lemma ksimplex_card: |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
688 |
assumes "ksimplex p n s" shows "card s = Suc n" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
689 |
using assms proof cases |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
690 |
case (ksimplex u b) |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
691 |
then interpret kuhn_simplex p n u b s . |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
692 |
show ?thesis |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
693 |
by (simp add: card_image s_eq inj_enum) |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
694 |
qed |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
695 |
|
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
696 |
lemma simplex_top_face: |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
697 |
assumes "0 < p" "\<forall>x\<in>s'. x n = p" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
698 |
shows "ksimplex p n s' \<longleftrightarrow> (\<exists>s a. ksimplex p (Suc n) s \<and> a \<in> s \<and> s' = s - {a})" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
699 |
using assms |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
700 |
proof safe |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
701 |
fix s a assume "ksimplex p (Suc n) s" and a: "a \<in> s" and na: "\<forall>x\<in>s - {a}. x n = p" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
702 |
then show "ksimplex p n (s - {a})" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
703 |
proof cases |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
704 |
case (ksimplex base upd) |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
705 |
then interpret kuhn_simplex p "Suc n" base upd "s" . |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
706 |
|
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
707 |
have "a n < p" |
60420 | 708 |
using one_step[of a n p] na \<open>a\<in>s\<close> s_space by (auto simp: less_le) |
56273
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
709 |
then have "a = enum 0" |
60420 | 710 |
using \<open>a \<in> s\<close> na by (subst enum_0_bot) (auto simp: le_less intro!: less[of a _ n]) |
56273
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
711 |
then have s_eq: "s - {a} = enum ` Suc ` {.. n}" |
71172 | 712 |
using s_eq by (simp add: atMost_Suc_eq_insert_0 insert_ident in_enum_image subset_eq) |
56273
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
713 |
then have "enum 1 \<in> s - {a}" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
714 |
by auto |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
715 |
then have "upd 0 = n" |
60420 | 716 |
using \<open>a n < p\<close> \<open>a = enum 0\<close> na[rule_format, of "enum 1"] |
62390 | 717 |
by (auto simp: fun_eq_iff enum_Suc split: if_split_asm) |
56273
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
718 |
then have "bij_betw upd (Suc ` {..< n}) {..< n}" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
719 |
using upd |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
720 |
by (subst notIn_Un_bij_betw3[where b=0]) |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
721 |
(auto simp: lessThan_Suc[symmetric] lessThan_Suc_eq_insert_0) |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
722 |
then have "bij_betw (upd\<circ>Suc) {..<n} {..<n}" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
723 |
by (rule bij_betw_trans[rotated]) (auto simp: bij_betw_def) |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
724 |
|
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
725 |
have "a n = p - 1" |
60420 | 726 |
using enum_Suc[of 0] na[rule_format, OF \<open>enum 1 \<in> s - {a}\<close>] \<open>a = enum 0\<close> by (auto simp: \<open>upd 0 = n\<close>) |
56273
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
727 |
|
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
728 |
show ?thesis |
61169 | 729 |
proof (rule ksimplex.intros, standard) |
56273
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
730 |
show "bij_betw (upd\<circ>Suc) {..< n} {..< n}" by fact |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
731 |
show "base(n := p) \<in> {..<n} \<rightarrow> {..<p}" "\<And>i. n\<le>i \<Longrightarrow> (base(n := p)) i = p" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
732 |
using base base_out by (auto simp: Pi_iff) |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
733 |
|
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
734 |
have "\<And>i. Suc ` {..< i} = {..< Suc i} - {0}" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
735 |
by (auto simp: image_iff Ball_def) arith |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
736 |
then have upd_Suc: "\<And>i. i \<le> n \<Longrightarrow> (upd\<circ>Suc) ` {..< i} = upd ` {..< Suc i} - {n}" |
69661 | 737 |
using \<open>upd 0 = n\<close> upd_inj by (auto simp add: image_iff less_Suc_eq_0_disj) |
56273
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
738 |
have n_in_upd: "\<And>i. n \<in> upd ` {..< Suc i}" |
60420 | 739 |
using \<open>upd 0 = n\<close> by auto |
56273
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
740 |
|
63040 | 741 |
define f' where "f' i j = |
742 |
(if j \<in> (upd\<circ>Suc)`{..< i} then Suc ((base(n := p)) j) else (base(n := p)) j)" for i j |
|
69661 | 743 |
{ fix x i |
744 |
assume i [arith]: "i \<le> n" |
|
745 |
with upd_Suc have "(upd \<circ> Suc) ` {..<i} = upd ` {..<Suc i} - {n}" . |
|
746 |
with \<open>a n < p\<close> \<open>a = enum 0\<close> \<open>upd 0 = n\<close> \<open>a n = p - 1\<close> |
|
747 |
have "enum (Suc i) x = f' i x" |
|
748 |
by (auto simp add: f'_def enum_def) } |
|
56273
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
749 |
then show "s - {a} = f' ` {.. n}" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
750 |
unfolding s_eq image_comp by (intro image_cong) auto |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
751 |
qed |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
752 |
qed |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
753 |
next |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
754 |
assume "ksimplex p n s'" and *: "\<forall>x\<in>s'. x n = p" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
755 |
then show "\<exists>s a. ksimplex p (Suc n) s \<and> a \<in> s \<and> s' = s - {a}" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
756 |
proof cases |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
757 |
case (ksimplex base upd) |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
758 |
then interpret kuhn_simplex p n base upd s' . |
63040 | 759 |
define b where "b = base (n := p - 1)" |
760 |
define u where "u i = (case i of 0 \<Rightarrow> n | Suc i \<Rightarrow> upd i)" for i |
|
56273
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
761 |
|
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
762 |
have "ksimplex p (Suc n) (s' \<union> {b})" |
61169 | 763 |
proof (rule ksimplex.intros, standard) |
56273
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
764 |
show "b \<in> {..<Suc n} \<rightarrow> {..<p}" |
60420 | 765 |
using base \<open>0 < p\<close> unfolding lessThan_Suc b_def by (auto simp: PiE_iff) |
56273
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
766 |
show "\<And>i. Suc n \<le> i \<Longrightarrow> b i = p" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
767 |
using base_out by (auto simp: b_def) |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
768 |
|
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
769 |
have "bij_betw u (Suc ` {..< n} \<union> {0}) ({..<n} \<union> {u 0})" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
770 |
using upd |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
771 |
by (intro notIn_Un_bij_betw) (auto simp: u_def bij_betw_def image_comp comp_def inj_on_def) |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
772 |
then show "bij_betw u {..<Suc n} {..<Suc n}" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
773 |
by (simp add: u_def lessThan_Suc[symmetric] lessThan_Suc_eq_insert_0) |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
774 |
|
63040 | 775 |
define f' where "f' i j = (if j \<in> u`{..< i} then Suc (b j) else b j)" for i j |
56273
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
776 |
|
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
777 |
have u_eq: "\<And>i. i \<le> n \<Longrightarrow> u ` {..< Suc i} = upd ` {..< i} \<union> { n }" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
778 |
by (auto simp: u_def image_iff upd_inj Ball_def split: nat.split) arith |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
779 |
|
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
780 |
{ fix x have "x \<le> n \<Longrightarrow> n \<notin> upd ` {..<x}" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
781 |
using upd_space by (simp add: image_iff neq_iff) } |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
782 |
note n_not_upd = this |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
783 |
|
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
784 |
have *: "f' ` {.. Suc n} = f' ` (Suc ` {.. n} \<union> {0})" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
785 |
unfolding atMost_Suc_eq_insert_0 by simp |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
786 |
also have "\<dots> = (f' \<circ> Suc) ` {.. n} \<union> {b}" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
787 |
by (auto simp: f'_def) |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
788 |
also have "(f' \<circ> Suc) ` {.. n} = s'" |
60420 | 789 |
using \<open>0 < p\<close> base_out[of n] |
56273
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
790 |
unfolding s_eq enum_def[abs_def] f'_def[abs_def] upd_space |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
791 |
by (intro image_cong) (simp_all add: u_eq b_def fun_eq_iff n_not_upd) |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
792 |
finally show "s' \<union> {b} = f' ` {.. Suc n}" .. |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
793 |
qed |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
794 |
moreover have "b \<notin> s'" |
60420 | 795 |
using * \<open>0 < p\<close> by (auto simp: b_def) |
56273
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
796 |
ultimately show ?thesis by auto |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
797 |
qed |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
798 |
qed |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
799 |
|
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
800 |
lemma ksimplex_replace_0: |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
801 |
assumes s: "ksimplex p n s" and a: "a \<in> s" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
802 |
assumes j: "j < n" and p: "\<forall>x\<in>s - {a}. x j = 0" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
803 |
shows "card {s'. ksimplex p n s' \<and> (\<exists>b\<in>s'. s' - {b} = s - {a})} = 1" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
804 |
using s |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
805 |
proof cases |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
806 |
case (ksimplex b_s u_s) |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
807 |
|
61609
77b453bd616f
Coercion "real" now has type nat => real only and is no longer overloaded. Type class "real_of" is gone. Many duplicate theorems removed.
paulson <lp15@cam.ac.uk>
parents:
61520
diff
changeset
|
808 |
{ fix t b assume "ksimplex p n t" |
56273
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
809 |
then obtain b_t u_t where "kuhn_simplex p n b_t u_t t" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
810 |
by (auto elim: ksimplex.cases) |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
811 |
interpret kuhn_simplex_pair p n b_s u_s s b_t u_t t |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
812 |
by intro_locales fact+ |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
813 |
|
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
814 |
assume b: "b \<in> t" "t - {b} = s - {a}" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
815 |
with a j p s.replace_0[of _ a] t.replace_0[of _ b] have "s = t" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
816 |
by (intro ksimplex_eq_top[of a b]) auto } |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
817 |
then have "{s'. ksimplex p n s' \<and> (\<exists>b\<in>s'. s' - {b} = s - {a})} = {s}" |
60420 | 818 |
using s \<open>a \<in> s\<close> by auto |
56273
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
819 |
then show ?thesis |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
820 |
by simp |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
821 |
qed |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
822 |
|
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
823 |
lemma ksimplex_replace_1: |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
824 |
assumes s: "ksimplex p n s" and a: "a \<in> s" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
825 |
assumes j: "j < n" and p: "\<forall>x\<in>s - {a}. x j = p" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
826 |
shows "card {s'. ksimplex p n s' \<and> (\<exists>b\<in>s'. s' - {b} = s - {a})} = 1" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
827 |
using s |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
828 |
proof cases |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
829 |
case (ksimplex b_s u_s) |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
830 |
|
61609
77b453bd616f
Coercion "real" now has type nat => real only and is no longer overloaded. Type class "real_of" is gone. Many duplicate theorems removed.
paulson <lp15@cam.ac.uk>
parents:
61520
diff
changeset
|
831 |
{ fix t b assume "ksimplex p n t" |
56273
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
832 |
then obtain b_t u_t where "kuhn_simplex p n b_t u_t t" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
833 |
by (auto elim: ksimplex.cases) |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
834 |
interpret kuhn_simplex_pair p n b_s u_s s b_t u_t t |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
835 |
by intro_locales fact+ |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
836 |
|
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
837 |
assume b: "b \<in> t" "t - {b} = s - {a}" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
838 |
with a j p s.replace_1[of _ a] t.replace_1[of _ b] have "s = t" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
839 |
by (intro ksimplex_eq_bot[of a b]) auto } |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
840 |
then have "{s'. ksimplex p n s' \<and> (\<exists>b\<in>s'. s' - {b} = s - {a})} = {s}" |
60420 | 841 |
using s \<open>a \<in> s\<close> by auto |
56273
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
842 |
then show ?thesis |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
843 |
by simp |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
844 |
qed |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
845 |
|
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
846 |
lemma ksimplex_replace_2: |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
847 |
assumes s: "ksimplex p n s" and "a \<in> s" and "n \<noteq> 0" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
848 |
and lb: "\<forall>j<n. \<exists>x\<in>s - {a}. x j \<noteq> 0" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
849 |
and ub: "\<forall>j<n. \<exists>x\<in>s - {a}. x j \<noteq> p" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
850 |
shows "card {s'. ksimplex p n s' \<and> (\<exists>b\<in>s'. s' - {b} = s - {a})} = 2" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
851 |
using s |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
852 |
proof cases |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
853 |
case (ksimplex base upd) |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
854 |
then interpret kuhn_simplex p n base upd s . |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
855 |
|
60420 | 856 |
from \<open>a \<in> s\<close> obtain i where "i \<le> n" "a = enum i" |
56273
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
857 |
unfolding s_eq by auto |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
858 |
|
60420 | 859 |
from \<open>i \<le> n\<close> have "i = 0 \<or> i = n \<or> (0 < i \<and> i < n)" |
56273
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
860 |
by linarith |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
861 |
then have "\<exists>!s'. s' \<noteq> s \<and> ksimplex p n s' \<and> (\<exists>b\<in>s'. s - {a} = s'- {b})" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
862 |
proof (elim disjE conjE) |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
863 |
assume "i = 0" |
63040 | 864 |
define rot where [abs_def]: "rot i = (if i + 1 = n then 0 else i + 1)" for i |
56273
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
865 |
let ?upd = "upd \<circ> rot" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
866 |
|
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
867 |
have rot: "bij_betw rot {..< n} {..< n}" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
868 |
by (auto simp: bij_betw_def inj_on_def image_iff Ball_def rot_def) |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
869 |
arith+ |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
870 |
from rot upd have "bij_betw ?upd {..<n} {..<n}" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
871 |
by (rule bij_betw_trans) |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
872 |
|
63040 | 873 |
define f' where [abs_def]: "f' i j = |
874 |
(if j \<in> ?upd`{..< i} then Suc (enum (Suc 0) j) else enum (Suc 0) j)" for i j |
|
56273
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
875 |
|
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
876 |
interpret b: kuhn_simplex p n "enum (Suc 0)" "upd \<circ> rot" "f' ` {.. n}" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
877 |
proof |
60420 | 878 |
from \<open>a = enum i\<close> ub \<open>n \<noteq> 0\<close> \<open>i = 0\<close> |
56273
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
879 |
obtain i' where "i' \<le> n" "enum i' \<noteq> enum 0" "enum i' (upd 0) \<noteq> p" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
880 |
unfolding s_eq by (auto intro: upd_space simp: enum_inj) |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
881 |
then have "enum 1 \<le> enum i'" "enum i' (upd 0) < p" |
68022 | 882 |
using enum_le_p[of i' "upd 0"] by (auto simp: enum_inj enum_mono upd_space) |
56273
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
883 |
then have "enum 1 (upd 0) < p" |
68022 | 884 |
by (auto simp: le_fun_def intro: le_less_trans) |
56273
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
885 |
then show "enum (Suc 0) \<in> {..<n} \<rightarrow> {..<p}" |
68022 | 886 |
using base \<open>n \<noteq> 0\<close> by (auto simp: enum_0 enum_Suc PiE_iff extensional_def upd_space) |
56273
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
887 |
|
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
888 |
{ fix i assume "n \<le> i" then show "enum (Suc 0) i = p" |
60420 | 889 |
using \<open>n \<noteq> 0\<close> by (auto simp: enum_eq_p) } |
56273
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
890 |
show "bij_betw ?upd {..<n} {..<n}" by fact |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
891 |
qed (simp add: f'_def) |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
892 |
have ks_f': "ksimplex p n (f' ` {.. n})" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
893 |
by rule unfold_locales |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
894 |
|
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
895 |
have b_enum: "b.enum = f'" unfolding f'_def b.enum_def[abs_def] .. |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
896 |
with b.inj_enum have inj_f': "inj_on f' {.. n}" by simp |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
897 |
|
69661 | 898 |
have f'_eq_enum: "f' j = enum (Suc j)" if "j < n" for j |
899 |
proof - |
|
900 |
from that have "rot ` {..< j} = {0 <..< Suc j}" |
|
901 |
by (auto simp: rot_def image_Suc_lessThan cong: image_cong_simp) |
|
902 |
with that \<open>n \<noteq> 0\<close> show ?thesis |
|
903 |
by (simp only: f'_def enum_def fun_eq_iff image_comp [symmetric]) |
|
904 |
(auto simp add: upd_inj) |
|
905 |
qed |
|
56273
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
906 |
then have "enum ` Suc ` {..< n} = f' ` {..< n}" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
907 |
by (force simp: enum_inj) |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
908 |
also have "Suc ` {..< n} = {.. n} - {0}" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
909 |
by (auto simp: image_iff Ball_def) arith |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
910 |
also have "{..< n} = {.. n} - {n}" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
911 |
by auto |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
912 |
finally have eq: "s - {a} = f' ` {.. n} - {f' n}" |
60420 | 913 |
unfolding s_eq \<open>a = enum i\<close> \<open>i = 0\<close> |
69286 | 914 |
by (simp add: inj_on_image_set_diff[OF inj_enum] inj_on_image_set_diff[OF inj_f']) |
56273
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
915 |
|
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
916 |
have "enum 0 < f' 0" |
60420 | 917 |
using \<open>n \<noteq> 0\<close> by (simp add: enum_strict_mono f'_eq_enum) |
56273
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
918 |
also have "\<dots> < f' n" |
60420 | 919 |
using \<open>n \<noteq> 0\<close> b.enum_strict_mono[of 0 n] unfolding b_enum by simp |
56273
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
920 |
finally have "a \<noteq> f' n" |
60420 | 921 |
using \<open>a = enum i\<close> \<open>i = 0\<close> by auto |
56273
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
922 |
|
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
923 |
{ fix t c assume "ksimplex p n t" "c \<in> t" and eq_sma: "s - {a} = t - {c}" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
924 |
obtain b u where "kuhn_simplex p n b u t" |
60420 | 925 |
using \<open>ksimplex p n t\<close> by (auto elim: ksimplex.cases) |
56273
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
926 |
then interpret t: kuhn_simplex p n b u t . |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
927 |
|
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
928 |
{ fix x assume "x \<in> s" "x \<noteq> a" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
929 |
then have "x (upd 0) = enum (Suc 0) (upd 0)" |
60420 | 930 |
by (auto simp: \<open>a = enum i\<close> \<open>i = 0\<close> s_eq enum_def enum_inj) } |
56273
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
931 |
then have eq_upd0: "\<forall>x\<in>t-{c}. x (upd 0) = enum (Suc 0) (upd 0)" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
932 |
unfolding eq_sma[symmetric] by auto |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
933 |
then have "c (upd 0) \<noteq> enum (Suc 0) (upd 0)" |
60420 | 934 |
using \<open>n \<noteq> 0\<close> by (intro t.one_step[OF \<open>c\<in>t\<close> ]) (auto simp: upd_space) |
56273
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
935 |
then have "c (upd 0) < enum (Suc 0) (upd 0) \<or> c (upd 0) > enum (Suc 0) (upd 0)" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
936 |
by auto |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
937 |
then have "t = s \<or> t = f' ` {..n}" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
938 |
proof (elim disjE conjE) |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
939 |
assume *: "c (upd 0) < enum (Suc 0) (upd 0)" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
940 |
interpret st: kuhn_simplex_pair p n base upd s b u t .. |
60420 | 941 |
{ fix x assume "x \<in> t" with * \<open>c\<in>t\<close> eq_upd0[rule_format, of x] have "c \<le> x" |
56273
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
942 |
by (auto simp: le_less intro!: t.less[of _ _ "upd 0"]) } |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
943 |
note top = this |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
944 |
have "s = t" |
60420 | 945 |
using \<open>a = enum i\<close> \<open>i = 0\<close> \<open>c \<in> t\<close> |
56273
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
946 |
by (intro st.ksimplex_eq_bot[OF _ _ _ _ eq_sma]) |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
947 |
(auto simp: s_eq enum_mono t.s_eq t.enum_mono top) |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
948 |
then show ?thesis by simp |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
949 |
next |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
950 |
assume *: "c (upd 0) > enum (Suc 0) (upd 0)" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
951 |
interpret st: kuhn_simplex_pair p n "enum (Suc 0)" "upd \<circ> rot" "f' ` {.. n}" b u t .. |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
952 |
have eq: "f' ` {..n} - {f' n} = t - {c}" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
953 |
using eq_sma eq by simp |
60420 | 954 |
{ fix x assume "x \<in> t" with * \<open>c\<in>t\<close> eq_upd0[rule_format, of x] have "x \<le> c" |
56273
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
955 |
by (auto simp: le_less intro!: t.less[of _ _ "upd 0"]) } |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
956 |
note top = this |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
957 |
have "f' ` {..n} = t" |
60420 | 958 |
using \<open>a = enum i\<close> \<open>i = 0\<close> \<open>c \<in> t\<close> |
56273
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
959 |
by (intro st.ksimplex_eq_top[OF _ _ _ _ eq]) |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
960 |
(auto simp: b.s_eq b.enum_mono t.s_eq t.enum_mono b_enum[symmetric] top) |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
961 |
then show ?thesis by simp |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
962 |
qed } |
60420 | 963 |
with ks_f' eq \<open>a \<noteq> f' n\<close> \<open>n \<noteq> 0\<close> show ?thesis |
56273
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
964 |
apply (intro ex1I[of _ "f' ` {.. n}"]) |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
965 |
apply auto [] |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
966 |
apply metis |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
967 |
done |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
968 |
next |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
969 |
assume "i = n" |
60420 | 970 |
from \<open>n \<noteq> 0\<close> obtain n' where n': "n = Suc n'" |
56273
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
971 |
by (cases n) auto |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
972 |
|
63040 | 973 |
define rot where "rot i = (case i of 0 \<Rightarrow> n' | Suc i \<Rightarrow> i)" for i |
56273
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
974 |
let ?upd = "upd \<circ> rot" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
975 |
|
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
976 |
have rot: "bij_betw rot {..< n} {..< n}" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
977 |
by (auto simp: bij_betw_def inj_on_def image_iff Bex_def rot_def n' split: nat.splits) |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
978 |
arith |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
979 |
from rot upd have "bij_betw ?upd {..<n} {..<n}" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
980 |
by (rule bij_betw_trans) |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
981 |
|
63040 | 982 |
define b where "b = base (upd n' := base (upd n') - 1)" |
983 |
define f' where [abs_def]: "f' i j = (if j \<in> ?upd`{..< i} then Suc (b j) else b j)" for i j |
|
56273
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
984 |
|
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
985 |
interpret b: kuhn_simplex p n b "upd \<circ> rot" "f' ` {.. n}" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
986 |
proof |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
987 |
{ fix i assume "n \<le> i" then show "b i = p" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
988 |
using base_out[of i] upd_space[of n'] by (auto simp: b_def n') } |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
989 |
show "b \<in> {..<n} \<rightarrow> {..<p}" |
60420 | 990 |
using base \<open>n \<noteq> 0\<close> upd_space[of n'] |
56273
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
991 |
by (auto simp: b_def PiE_def Pi_iff Ball_def upd_space extensional_def n') |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
992 |
|
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
993 |
show "bij_betw ?upd {..<n} {..<n}" by fact |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
994 |
qed (simp add: f'_def) |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
995 |
have f': "b.enum = f'" unfolding f'_def b.enum_def[abs_def] .. |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
996 |
have ks_f': "ksimplex p n (b.enum ` {.. n})" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
997 |
unfolding f' by rule unfold_locales |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
998 |
|
61609
77b453bd616f
Coercion "real" now has type nat => real only and is no longer overloaded. Type class "real_of" is gone. Many duplicate theorems removed.
paulson <lp15@cam.ac.uk>
parents:
61520
diff
changeset
|
999 |
have "0 < n" |
60420 | 1000 |
using \<open>n \<noteq> 0\<close> by auto |
56273
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1001 |
|
60420 | 1002 |
{ from \<open>a = enum i\<close> \<open>n \<noteq> 0\<close> \<open>i = n\<close> lb upd_space[of n'] |
56273
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1003 |
obtain i' where "i' \<le> n" "enum i' \<noteq> enum n" "0 < enum i' (upd n')" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1004 |
unfolding s_eq by (auto simp: enum_inj n') |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1005 |
moreover have "enum i' (upd n') = base (upd n')" |
60420 | 1006 |
unfolding enum_def using \<open>i' \<le> n\<close> \<open>enum i' \<noteq> enum n\<close> by (auto simp: n' upd_inj enum_inj) |
56273
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1007 |
ultimately have "0 < base (upd n')" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1008 |
by auto } |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1009 |
then have benum1: "b.enum (Suc 0) = base" |
60420 | 1010 |
unfolding b.enum_Suc[OF \<open>0<n\<close>] b.enum_0 by (auto simp: b_def rot_def) |
56273
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1011 |
|
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1012 |
have [simp]: "\<And>j. Suc j < n \<Longrightarrow> rot ` {..< Suc j} = {n'} \<union> {..< j}" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1013 |
by (auto simp: rot_def image_iff Ball_def split: nat.splits) |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1014 |
have rot_simps: "\<And>j. rot (Suc j) = j" "rot 0 = n'" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1015 |
by (simp_all add: rot_def) |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1016 |
|
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1017 |
{ fix j assume j: "Suc j \<le> n" then have "b.enum (Suc j) = enum j" |
68022 | 1018 |
by (induct j) (auto simp: benum1 enum_0 b.enum_Suc enum_Suc rot_simps) } |
56273
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1019 |
note b_enum_eq_enum = this |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1020 |
then have "enum ` {..< n} = b.enum ` Suc ` {..< n}" |
68022 | 1021 |
by (auto simp: image_comp intro!: image_cong) |
56273
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1022 |
also have "Suc ` {..< n} = {.. n} - {0}" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1023 |
by (auto simp: image_iff Ball_def) arith |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1024 |
also have "{..< n} = {.. n} - {n}" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1025 |
by auto |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1026 |
finally have eq: "s - {a} = b.enum ` {.. n} - {b.enum 0}" |
60420 | 1027 |
unfolding s_eq \<open>a = enum i\<close> \<open>i = n\<close> |
60303 | 1028 |
using inj_on_image_set_diff[OF inj_enum Diff_subset, of "{n}"] |
1029 |
inj_on_image_set_diff[OF b.inj_enum Diff_subset, of "{0}"] |
|
68022 | 1030 |
by (simp add: comp_def) |
56273
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1031 |
|
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1032 |
have "b.enum 0 \<le> b.enum n" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1033 |
by (simp add: b.enum_mono) |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1034 |
also have "b.enum n < enum n" |
60420 | 1035 |
using \<open>n \<noteq> 0\<close> by (simp add: enum_strict_mono b_enum_eq_enum n') |
56273
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1036 |
finally have "a \<noteq> b.enum 0" |
60420 | 1037 |
using \<open>a = enum i\<close> \<open>i = n\<close> by auto |
56273
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1038 |
|
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1039 |
{ fix t c assume "ksimplex p n t" "c \<in> t" and eq_sma: "s - {a} = t - {c}" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1040 |
obtain b' u where "kuhn_simplex p n b' u t" |
60420 | 1041 |
using \<open>ksimplex p n t\<close> by (auto elim: ksimplex.cases) |
56273
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1042 |
then interpret t: kuhn_simplex p n b' u t . |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1043 |
|
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1044 |
{ fix x assume "x \<in> s" "x \<noteq> a" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1045 |
then have "x (upd n') = enum n' (upd n')" |
60420 | 1046 |
by (auto simp: \<open>a = enum i\<close> n' \<open>i = n\<close> s_eq enum_def enum_inj in_upd_image) } |
56273
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1047 |
then have eq_upd0: "\<forall>x\<in>t-{c}. x (upd n') = enum n' (upd n')" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1048 |
unfolding eq_sma[symmetric] by auto |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1049 |
then have "c (upd n') \<noteq> enum n' (upd n')" |
60420 | 1050 |
using \<open>n \<noteq> 0\<close> by (intro t.one_step[OF \<open>c\<in>t\<close> ]) (auto simp: n' upd_space[unfolded n']) |
56273
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1051 |
then have "c (upd n') < enum n' (upd n') \<or> c (upd n') > enum n' (upd n')" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1052 |
by auto |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1053 |
then have "t = s \<or> t = b.enum ` {..n}" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1054 |
proof (elim disjE conjE) |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1055 |
assume *: "c (upd n') > enum n' (upd n')" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1056 |
interpret st: kuhn_simplex_pair p n base upd s b' u t .. |
60420 | 1057 |
{ fix x assume "x \<in> t" with * \<open>c\<in>t\<close> eq_upd0[rule_format, of x] have "x \<le> c" |
56273
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1058 |
by (auto simp: le_less intro!: t.less[of _ _ "upd n'"]) } |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1059 |
note top = this |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1060 |
have "s = t" |
60420 | 1061 |
using \<open>a = enum i\<close> \<open>i = n\<close> \<open>c \<in> t\<close> |
56273
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1062 |
by (intro st.ksimplex_eq_top[OF _ _ _ _ eq_sma]) |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1063 |
(auto simp: s_eq enum_mono t.s_eq t.enum_mono top) |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1064 |
then show ?thesis by simp |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1065 |
next |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1066 |
assume *: "c (upd n') < enum n' (upd n')" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1067 |
interpret st: kuhn_simplex_pair p n b "upd \<circ> rot" "f' ` {.. n}" b' u t .. |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1068 |
have eq: "f' ` {..n} - {b.enum 0} = t - {c}" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1069 |
using eq_sma eq f' by simp |
60420 | 1070 |
{ fix x assume "x \<in> t" with * \<open>c\<in>t\<close> eq_upd0[rule_format, of x] have "c \<le> x" |
56273
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1071 |
by (auto simp: le_less intro!: t.less[of _ _ "upd n'"]) } |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1072 |
note bot = this |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1073 |
have "f' ` {..n} = t" |
60420 | 1074 |
using \<open>a = enum i\<close> \<open>i = n\<close> \<open>c \<in> t\<close> |
56273
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1075 |
by (intro st.ksimplex_eq_bot[OF _ _ _ _ eq]) |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1076 |
(auto simp: b.s_eq b.enum_mono t.s_eq t.enum_mono bot) |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1077 |
with f' show ?thesis by simp |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1078 |
qed } |
60420 | 1079 |
with ks_f' eq \<open>a \<noteq> b.enum 0\<close> \<open>n \<noteq> 0\<close> show ?thesis |
56273
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1080 |
apply (intro ex1I[of _ "b.enum ` {.. n}"]) |
76786 | 1081 |
apply fastforce |
56273
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1082 |
apply metis |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1083 |
done |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1084 |
next |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1085 |
assume i: "0 < i" "i < n" |
63040 | 1086 |
define i' where "i' = i - 1" |
56273
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1087 |
with i have "Suc i' < n" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1088 |
by simp |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1089 |
with i have Suc_i': "Suc i' = i" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1090 |
by (simp add: i'_def) |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1091 |
|
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1092 |
let ?upd = "Fun.swap i' i upd" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1093 |
from i upd have "bij_betw ?upd {..< n} {..< n}" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1094 |
by (subst bij_betw_swap_iff) (auto simp: i'_def) |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1095 |
|
63040 | 1096 |
define f' where [abs_def]: "f' i j = (if j \<in> ?upd`{..< i} then Suc (base j) else base j)" |
1097 |
for i j |
|
56273
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1098 |
interpret b: kuhn_simplex p n base ?upd "f' ` {.. n}" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1099 |
proof |
67682
00c436488398
tuned proofs -- prefer explicit names for facts from 'interpret';
wenzelm
parents:
67673
diff
changeset
|
1100 |
show "base \<in> {..<n} \<rightarrow> {..<p}" by (rule base) |
00c436488398
tuned proofs -- prefer explicit names for facts from 'interpret';
wenzelm
parents:
67673
diff
changeset
|
1101 |
{ fix i assume "n \<le> i" then show "base i = p" by (rule base_out) } |
56273
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1102 |
show "bij_betw ?upd {..<n} {..<n}" by fact |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1103 |
qed (simp add: f'_def) |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1104 |
have f': "b.enum = f'" unfolding f'_def b.enum_def[abs_def] .. |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1105 |
have ks_f': "ksimplex p n (b.enum ` {.. n})" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1106 |
unfolding f' by rule unfold_locales |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1107 |
|
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1108 |
have "{i} \<subseteq> {..n}" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1109 |
using i by auto |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1110 |
{ fix j assume "j \<le> n" |
76786 | 1111 |
with i Suc_i' have "enum j = b.enum j \<longleftrightarrow> j \<noteq> i" |
1112 |
unfolding fun_eq_iff enum_def b.enum_def image_comp [symmetric] |
|
73648 | 1113 |
apply (cases \<open>i = j\<close>) |
76786 | 1114 |
apply (metis imageI in_upd_image lessI lessThan_iff lessThan_subset_iff order_less_le transpose_apply_first) |
1115 |
by (metis lessThan_iff linorder_not_less not_less_eq_eq order_less_le transpose_image_eq) |
|
73648 | 1116 |
} |
56273
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1117 |
note enum_eq_benum = this |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1118 |
then have "enum ` ({.. n} - {i}) = b.enum ` ({.. n} - {i})" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1119 |
by (intro image_cong) auto |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1120 |
then have eq: "s - {a} = b.enum ` {.. n} - {b.enum i}" |
60420 | 1121 |
unfolding s_eq \<open>a = enum i\<close> |
1122 |
using inj_on_image_set_diff[OF inj_enum Diff_subset \<open>{i} \<subseteq> {..n}\<close>] |
|
1123 |
inj_on_image_set_diff[OF b.inj_enum Diff_subset \<open>{i} \<subseteq> {..n}\<close>] |
|
56273
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1124 |
by (simp add: comp_def) |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1125 |
|
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1126 |
have "a \<noteq> b.enum i" |
60420 | 1127 |
using \<open>a = enum i\<close> enum_eq_benum i by auto |
56273
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1128 |
|
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1129 |
{ fix t c assume "ksimplex p n t" "c \<in> t" and eq_sma: "s - {a} = t - {c}" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1130 |
obtain b' u where "kuhn_simplex p n b' u t" |
60420 | 1131 |
using \<open>ksimplex p n t\<close> by (auto elim: ksimplex.cases) |
56273
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1132 |
then interpret t: kuhn_simplex p n b' u t . |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1133 |
have "enum i' \<in> s - {a}" "enum (i + 1) \<in> s - {a}" |
60420 | 1134 |
using \<open>a = enum i\<close> i enum_in by (auto simp: enum_inj i'_def) |
56273
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1135 |
then obtain l k where |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1136 |
l: "t.enum l = enum i'" "l \<le> n" "t.enum l \<noteq> c" and |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1137 |
k: "t.enum k = enum (i + 1)" "k \<le> n" "t.enum k \<noteq> c" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1138 |
unfolding eq_sma by (auto simp: t.s_eq) |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1139 |
with i have "t.enum l < t.enum k" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1140 |
by (simp add: enum_strict_mono i'_def) |
60420 | 1141 |
with \<open>l \<le> n\<close> \<open>k \<le> n\<close> have "l < k" |
56273
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1142 |
by (simp add: t.enum_strict_mono) |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1143 |
{ assume "Suc l = k" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1144 |
have "enum (Suc (Suc i')) = t.enum (Suc l)" |
60420 | 1145 |
using i by (simp add: k \<open>Suc l = k\<close> i'_def) |
56273
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1146 |
then have False |
60420 | 1147 |
using \<open>l < k\<close> \<open>k \<le> n\<close> \<open>Suc i' < n\<close> |
62390 | 1148 |
by (auto simp: t.enum_Suc enum_Suc l upd_inj fun_eq_iff split: if_split_asm) |
56273
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1149 |
(metis Suc_lessD n_not_Suc_n upd_inj) } |
60420 | 1150 |
with \<open>l < k\<close> have "Suc l < k" |
56273
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1151 |
by arith |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1152 |
have c_eq: "c = t.enum (Suc l)" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1153 |
proof (rule ccontr) |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1154 |
assume "c \<noteq> t.enum (Suc l)" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1155 |
then have "t.enum (Suc l) \<in> s - {a}" |
60420 | 1156 |
using \<open>l < k\<close> \<open>k \<le> n\<close> by (simp add: t.s_eq eq_sma) |
56273
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1157 |
then obtain j where "t.enum (Suc l) = enum j" "j \<le> n" "enum j \<noteq> enum i" |
60420 | 1158 |
unfolding s_eq \<open>a = enum i\<close> by auto |
56273
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1159 |
with i have "t.enum (Suc l) \<le> t.enum l \<or> t.enum k \<le> t.enum (Suc l)" |
68022 | 1160 |
by (auto simp: i'_def enum_mono enum_inj l k) |
60420 | 1161 |
with \<open>Suc l < k\<close> \<open>k \<le> n\<close> show False |
56273
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1162 |
by (simp add: t.enum_mono) |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1163 |
qed |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1164 |
|
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1165 |
{ have "t.enum (Suc (Suc l)) \<in> s - {a}" |
60420 | 1166 |
unfolding eq_sma c_eq t.s_eq using \<open>Suc l < k\<close> \<open>k \<le> n\<close> by (auto simp: t.enum_inj) |
56273
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1167 |
then obtain j where eq: "t.enum (Suc (Suc l)) = enum j" and "j \<le> n" "j \<noteq> i" |
60420 | 1168 |
by (auto simp: s_eq \<open>a = enum i\<close>) |
56273
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1169 |
moreover have "enum i' < t.enum (Suc (Suc l))" |
60420 | 1170 |
unfolding l(1)[symmetric] using \<open>Suc l < k\<close> \<open>k \<le> n\<close> by (auto simp: t.enum_strict_mono) |
56273
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1171 |
ultimately have "i' < j" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1172 |
using i by (simp add: enum_strict_mono i'_def) |
60420 | 1173 |
with \<open>j \<noteq> i\<close> \<open>j \<le> n\<close> have "t.enum k \<le> t.enum (Suc (Suc l))" |
56273
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1174 |
unfolding i'_def by (simp add: enum_mono k eq) |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1175 |
then have "k \<le> Suc (Suc l)" |
60420 | 1176 |
using \<open>k \<le> n\<close> \<open>Suc l < k\<close> by (simp add: t.enum_mono) } |
1177 |
with \<open>Suc l < k\<close> have "Suc (Suc l) = k" by simp |
|
56273
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1178 |
then have "enum (Suc (Suc i')) = t.enum (Suc (Suc l))" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1179 |
using i by (simp add: k i'_def) |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1180 |
also have "\<dots> = (enum i') (u l := Suc (enum i' (u l)), u (Suc l) := Suc (enum i' (u (Suc l))))" |
60420 | 1181 |
using \<open>Suc l < k\<close> \<open>k \<le> n\<close> by (simp add: t.enum_Suc l t.upd_inj) |
61609
77b453bd616f
Coercion "real" now has type nat => real only and is no longer overloaded. Type class "real_of" is gone. Many duplicate theorems removed.
paulson <lp15@cam.ac.uk>
parents:
61520
diff
changeset
|
1182 |
finally have "(u l = upd i' \<and> u (Suc l) = upd (Suc i')) \<or> |
56273
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1183 |
(u l = upd (Suc i') \<and> u (Suc l) = upd i')" |
62390 | 1184 |
using \<open>Suc i' < n\<close> by (auto simp: enum_Suc fun_eq_iff split: if_split_asm) |
56273
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1185 |
|
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1186 |
then have "t = s \<or> t = b.enum ` {..n}" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1187 |
proof (elim disjE conjE) |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1188 |
assume u: "u l = upd i'" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1189 |
have "c = t.enum (Suc l)" unfolding c_eq .. |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1190 |
also have "t.enum (Suc l) = enum (Suc i')" |
60420 | 1191 |
using u \<open>l < k\<close> \<open>k \<le> n\<close> \<open>Suc i' < n\<close> by (simp add: enum_Suc t.enum_Suc l) |
56273
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1192 |
also have "\<dots> = a" |
60420 | 1193 |
using \<open>a = enum i\<close> i by (simp add: i'_def) |
56273
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1194 |
finally show ?thesis |
60420 | 1195 |
using eq_sma \<open>a \<in> s\<close> \<open>c \<in> t\<close> by auto |
56273
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1196 |
next |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1197 |
assume u: "u l = upd (Suc i')" |
63040 | 1198 |
define B where "B = b.enum ` {..n}" |
56273
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1199 |
have "b.enum i' = enum i'" |
68022 | 1200 |
using enum_eq_benum[of i'] i by (auto simp: i'_def gr0_conv_Suc) |
56273
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1201 |
have "c = t.enum (Suc l)" unfolding c_eq .. |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1202 |
also have "t.enum (Suc l) = b.enum (Suc i')" |
60420 | 1203 |
using u \<open>l < k\<close> \<open>k \<le> n\<close> \<open>Suc i' < n\<close> |
71172 | 1204 |
by (simp_all add: enum_Suc t.enum_Suc l b.enum_Suc \<open>b.enum i' = enum i'\<close>) |
56273
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1205 |
(simp add: Suc_i') |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1206 |
also have "\<dots> = b.enum i" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1207 |
using i by (simp add: i'_def) |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1208 |
finally have "c = b.enum i" . |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1209 |
then have "t - {c} = B - {c}" "c \<in> B" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1210 |
unfolding eq_sma[symmetric] eq B_def using i by auto |
60420 | 1211 |
with \<open>c \<in> t\<close> have "t = B" |
56273
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1212 |
by auto |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1213 |
then show ?thesis |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1214 |
by (simp add: B_def) |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1215 |
qed } |
60420 | 1216 |
with ks_f' eq \<open>a \<noteq> b.enum i\<close> \<open>n \<noteq> 0\<close> \<open>i \<le> n\<close> show ?thesis |
56273
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1217 |
apply (intro ex1I[of _ "b.enum ` {.. n}"]) |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1218 |
apply auto [] |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1219 |
apply metis |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1220 |
done |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1221 |
qed |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1222 |
then show ?thesis |
71449
3cf130a896a3
lemmas about "card A = 2"; prefer iff to implications
nipkow
parents:
71172
diff
changeset
|
1223 |
using s \<open>a \<in> s\<close> by (simp add: card_2_iff' Ex1_def) metis |
56273
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1224 |
qed |
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
1225 |
|
60420 | 1226 |
text \<open>Hence another step towards concreteness.\<close> |
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
1227 |
|
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
1228 |
lemma kuhn_simplex_lemma: |
56273
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1229 |
assumes "\<forall>s. ksimplex p (Suc n) s \<longrightarrow> rl ` s \<subseteq> {.. Suc n}" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1230 |
and "odd (card {f. \<exists>s a. ksimplex p (Suc n) s \<and> a \<in> s \<and> (f = s - {a}) \<and> |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1231 |
rl ` f = {..n} \<and> ((\<exists>j\<le>n. \<forall>x\<in>f. x j = 0) \<or> (\<exists>j\<le>n. \<forall>x\<in>f. x j = p))})" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1232 |
shows "odd (card {s. ksimplex p (Suc n) s \<and> rl ` s = {..Suc n}})" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1233 |
proof (rule kuhn_complete_lemma[OF finite_ksimplexes refl, unfolded mem_Collect_eq, |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1234 |
where bnd="\<lambda>f. (\<exists>j\<in>{..n}. \<forall>x\<in>f. x j = 0) \<or> (\<exists>j\<in>{..n}. \<forall>x\<in>f. x j = p)"], |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1235 |
safe del: notI) |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1236 |
|
53186 | 1237 |
have *: "\<And>x y. x = y \<Longrightarrow> odd (card x) \<Longrightarrow> odd (card y)" |
1238 |
by auto |
|
56273
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1239 |
show "odd (card {f. (\<exists>s\<in>{s. ksimplex p (Suc n) s}. \<exists>a\<in>s. f = s - {a}) \<and> |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1240 |
rl ` f = {..n} \<and> ((\<exists>j\<in>{..n}. \<forall>x\<in>f. x j = 0) \<or> (\<exists>j\<in>{..n}. \<forall>x\<in>f. x j = p))})" |
53186 | 1241 |
apply (rule *[OF _ assms(2)]) |
56273
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1242 |
apply (auto simp: atLeast0AtMost) |
53186 | 1243 |
done |
56273
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1244 |
|
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1245 |
next |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1246 |
|
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1247 |
fix s assume s: "ksimplex p (Suc n) s" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1248 |
then show "card s = n + 2" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1249 |
by (simp add: ksimplex_card) |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1250 |
|
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1251 |
fix a assume a: "a \<in> s" then show "rl a \<le> Suc n" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1252 |
using assms(1) s by (auto simp: subset_eq) |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1253 |
|
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1254 |
let ?S = "{t. ksimplex p (Suc n) t \<and> (\<exists>b\<in>t. s - {a} = t - {b})}" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1255 |
{ fix j assume j: "j \<le> n" "\<forall>x\<in>s - {a}. x j = 0" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1256 |
with s a show "card ?S = 1" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1257 |
using ksimplex_replace_0[of p "n + 1" s a j] |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1258 |
by (subst eq_commute) simp } |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1259 |
|
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1260 |
{ fix j assume j: "j \<le> n" "\<forall>x\<in>s - {a}. x j = p" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1261 |
with s a show "card ?S = 1" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1262 |
using ksimplex_replace_1[of p "n + 1" s a j] |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1263 |
by (subst eq_commute) simp } |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1264 |
|
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1265 |
{ assume "card ?S \<noteq> 2" "\<not> (\<exists>j\<in>{..n}. \<forall>x\<in>s - {a}. x j = p)" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1266 |
with s a show "\<exists>j\<in>{..n}. \<forall>x\<in>s - {a}. x j = 0" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1267 |
using ksimplex_replace_2[of p "n + 1" s a] |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1268 |
by (subst (asm) eq_commute) auto } |
53186 | 1269 |
qed |
1270 |
||
68617 | 1271 |
subsubsection \<open>Reduced labelling\<close> |
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
1272 |
|
56273
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1273 |
definition reduced :: "nat \<Rightarrow> (nat \<Rightarrow> nat) \<Rightarrow> nat" where "reduced n x = (LEAST k. k = n \<or> x k \<noteq> 0)" |
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
1274 |
|
53186 | 1275 |
lemma reduced_labelling: |
56273
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1276 |
shows "reduced n x \<le> n" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1277 |
and "\<forall>i<reduced n x. x i = 0" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1278 |
and "reduced n x = n \<or> x (reduced n x) \<noteq> 0" |
53186 | 1279 |
proof - |
56273
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1280 |
show "reduced n x \<le> n" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1281 |
unfolding reduced_def by (rule LeastI2_wellorder[where a=n]) auto |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1282 |
show "\<forall>i<reduced n x. x i = 0" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1283 |
unfolding reduced_def by (rule LeastI2_wellorder[where a=n]) fastforce+ |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1284 |
show "reduced n x = n \<or> x (reduced n x) \<noteq> 0" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1285 |
unfolding reduced_def by (rule LeastI2_wellorder[where a=n]) fastforce+ |
53186 | 1286 |
qed |
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
1287 |
|
53186 | 1288 |
lemma reduced_labelling_unique: |
56273
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1289 |
"r \<le> n \<Longrightarrow> \<forall>i<r. x i = 0 \<Longrightarrow> r = n \<or> x r \<noteq> 0 \<Longrightarrow> reduced n x = r" |
76786 | 1290 |
by (metis linorder_less_linear linorder_not_le reduced_labelling) |
56273
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1291 |
|
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1292 |
lemma reduced_labelling_zero: "j < n \<Longrightarrow> x j = 0 \<Longrightarrow> reduced n x \<noteq> j" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1293 |
using reduced_labelling[of n x] by auto |
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
1294 |
|
56273
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1295 |
lemma reduce_labelling_zero[simp]: "reduced 0 x = 0" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1296 |
by (rule reduced_labelling_unique) auto |
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
1297 |
|
56273
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1298 |
lemma reduced_labelling_nonzero: "j < n \<Longrightarrow> x j \<noteq> 0 \<Longrightarrow> reduced n x \<le> j" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1299 |
using reduced_labelling[of n x] by (elim allE[where x=j]) auto |
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
1300 |
|
56273
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1301 |
lemma reduced_labelling_Suc: "reduced (Suc n) x \<noteq> Suc n \<Longrightarrow> reduced (Suc n) x = reduced n x" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1302 |
using reduced_labelling[of "Suc n" x] |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1303 |
by (intro reduced_labelling_unique[symmetric]) auto |
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
1304 |
|
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
1305 |
lemma complete_face_top: |
56273
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1306 |
assumes "\<forall>x\<in>f. \<forall>j\<le>n. x j = 0 \<longrightarrow> lab x j = 0" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1307 |
and "\<forall>x\<in>f. \<forall>j\<le>n. x j = p \<longrightarrow> lab x j = 1" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1308 |
and eq: "(reduced (Suc n) \<circ> lab) ` f = {..n}" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1309 |
shows "((\<exists>j\<le>n. \<forall>x\<in>f. x j = 0) \<or> (\<exists>j\<le>n. \<forall>x\<in>f. x j = p)) \<longleftrightarrow> (\<forall>x\<in>f. x n = p)" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1310 |
proof (safe del: disjCI) |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1311 |
fix x j assume j: "j \<le> n" "\<forall>x\<in>f. x j = 0" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1312 |
{ fix x assume "x \<in> f" with assms j have "reduced (Suc n) (lab x) \<noteq> j" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1313 |
by (intro reduced_labelling_zero) auto } |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1314 |
moreover have "j \<in> (reduced (Suc n) \<circ> lab) ` f" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1315 |
using j eq by auto |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1316 |
ultimately show "x n = p" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1317 |
by force |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1318 |
next |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1319 |
fix x j assume j: "j \<le> n" "\<forall>x\<in>f. x j = p" and x: "x \<in> f" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1320 |
have "j = n" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1321 |
proof (rule ccontr) |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1322 |
assume "\<not> ?thesis" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1323 |
{ fix x assume "x \<in> f" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1324 |
with assms j have "reduced (Suc n) (lab x) \<le> j" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1325 |
by (intro reduced_labelling_nonzero) auto |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1326 |
then have "reduced (Suc n) (lab x) \<noteq> n" |
60420 | 1327 |
using \<open>j \<noteq> n\<close> \<open>j \<le> n\<close> by simp } |
56273
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1328 |
moreover |
61609
77b453bd616f
Coercion "real" now has type nat => real only and is no longer overloaded. Type class "real_of" is gone. Many duplicate theorems removed.
paulson <lp15@cam.ac.uk>
parents:
61520
diff
changeset
|
1329 |
have "n \<in> (reduced (Suc n) \<circ> lab) ` f" |
56273
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1330 |
using eq by auto |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1331 |
ultimately show False |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1332 |
by force |
53186 | 1333 |
qed |
56273
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1334 |
moreover have "j \<in> (reduced (Suc n) \<circ> lab) ` f" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1335 |
using j eq by auto |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1336 |
ultimately show "x n = p" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1337 |
using j x by auto |
53688 | 1338 |
qed auto |
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
1339 |
|
60420 | 1340 |
text \<open>Hence we get just about the nice induction.\<close> |
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
1341 |
|
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
1342 |
lemma kuhn_induction: |
53688 | 1343 |
assumes "0 < p" |
56273
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1344 |
and lab_0: "\<forall>x. \<forall>j\<le>n. (\<forall>j. x j \<le> p) \<and> x j = 0 \<longrightarrow> lab x j = 0" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1345 |
and lab_1: "\<forall>x. \<forall>j\<le>n. (\<forall>j. x j \<le> p) \<and> x j = p \<longrightarrow> lab x j = 1" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1346 |
and odd: "odd (card {s. ksimplex p n s \<and> (reduced n\<circ>lab) ` s = {..n}})" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1347 |
shows "odd (card {s. ksimplex p (Suc n) s \<and> (reduced (Suc n)\<circ>lab) ` s = {..Suc n}})" |
53248 | 1348 |
proof - |
56273
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1349 |
let ?rl = "reduced (Suc n) \<circ> lab" and ?ext = "\<lambda>f v. \<exists>j\<le>n. \<forall>x\<in>f. x j = v" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1350 |
let ?ext = "\<lambda>s. (\<exists>j\<le>n. \<forall>x\<in>s. x j = 0) \<or> (\<exists>j\<le>n. \<forall>x\<in>s. x j = p)" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1351 |
have "\<forall>s. ksimplex p (Suc n) s \<longrightarrow> ?rl ` s \<subseteq> {..Suc n}" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1352 |
by (simp add: reduced_labelling subset_eq) |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1353 |
moreover |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1354 |
have "{s. ksimplex p n s \<and> (reduced n \<circ> lab) ` s = {..n}} = |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1355 |
{f. \<exists>s a. ksimplex p (Suc n) s \<and> a \<in> s \<and> f = s - {a} \<and> ?rl ` f = {..n} \<and> ?ext f}" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1356 |
proof (intro set_eqI, safe del: disjCI equalityI disjE) |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1357 |
fix s assume s: "ksimplex p n s" and rl: "(reduced n \<circ> lab) ` s = {..n}" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1358 |
from s obtain u b where "kuhn_simplex p n u b s" by (auto elim: ksimplex.cases) |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1359 |
then interpret kuhn_simplex p n u b s . |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1360 |
have all_eq_p: "\<forall>x\<in>s. x n = p" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1361 |
by (auto simp: out_eq_p) |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1362 |
moreover |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1363 |
{ fix x assume "x \<in> s" |
76786 | 1364 |
with lab_1[rule_format, of n x] all_eq_p s_le_p[of x] |
56273
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1365 |
have "?rl x \<le> n" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1366 |
by (auto intro!: reduced_labelling_nonzero) |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1367 |
then have "?rl x = reduced n (lab x)" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1368 |
by (auto intro!: reduced_labelling_Suc) } |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1369 |
then have "?rl ` s = {..n}" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1370 |
using rl by (simp cong: image_cong) |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1371 |
moreover |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1372 |
obtain t a where "ksimplex p (Suc n) t" "a \<in> t" "s = t - {a}" |
60420 | 1373 |
using s unfolding simplex_top_face[OF \<open>0 < p\<close> all_eq_p] by auto |
56273
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1374 |
ultimately |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1375 |
show "\<exists>t a. ksimplex p (Suc n) t \<and> a \<in> t \<and> s = t - {a} \<and> ?rl ` s = {..n} \<and> ?ext s" |
53688 | 1376 |
by auto |
53248 | 1377 |
next |
56273
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1378 |
fix x s a assume s: "ksimplex p (Suc n) s" and rl: "?rl ` (s - {a}) = {.. n}" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1379 |
and a: "a \<in> s" and "?ext (s - {a})" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1380 |
from s obtain u b where "kuhn_simplex p (Suc n) u b s" by (auto elim: ksimplex.cases) |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1381 |
then interpret kuhn_simplex p "Suc n" u b s . |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1382 |
have all_eq_p: "\<forall>x\<in>s. x (Suc n) = p" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1383 |
by (auto simp: out_eq_p) |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1384 |
|
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1385 |
{ fix x assume "x \<in> s - {a}" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1386 |
then have "?rl x \<in> ?rl ` (s - {a})" |
53248 | 1387 |
by auto |
56273
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1388 |
then have "?rl x \<le> n" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1389 |
unfolding rl by auto |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1390 |
then have "?rl x = reduced n (lab x)" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1391 |
by (auto intro!: reduced_labelling_Suc) } |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1392 |
then show rl': "(reduced n\<circ>lab) ` (s - {a}) = {..n}" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1393 |
unfolding rl[symmetric] by (intro image_cong) auto |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1394 |
|
60420 | 1395 |
from \<open>?ext (s - {a})\<close> |
56273
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1396 |
have all_eq_p: "\<forall>x\<in>s - {a}. x n = p" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1397 |
proof (elim disjE exE conjE) |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1398 |
fix j assume "j \<le> n" "\<forall>x\<in>s - {a}. x j = 0" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1399 |
with lab_0[rule_format, of j] all_eq_p s_le_p |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1400 |
have "\<And>x. x \<in> s - {a} \<Longrightarrow> reduced (Suc n) (lab x) \<noteq> j" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1401 |
by (intro reduced_labelling_zero) auto |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1402 |
moreover have "j \<in> ?rl ` (s - {a})" |
60420 | 1403 |
using \<open>j \<le> n\<close> unfolding rl by auto |
56273
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1404 |
ultimately show ?thesis |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1405 |
by force |
53248 | 1406 |
next |
56273
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1407 |
fix j assume "j \<le> n" and eq_p: "\<forall>x\<in>s - {a}. x j = p" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1408 |
show ?thesis |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1409 |
proof cases |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1410 |
assume "j = n" with eq_p show ?thesis by simp |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1411 |
next |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1412 |
assume "j \<noteq> n" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1413 |
{ fix x assume x: "x \<in> s - {a}" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1414 |
have "reduced n (lab x) \<le> j" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1415 |
proof (rule reduced_labelling_nonzero) |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1416 |
show "lab x j \<noteq> 0" |
60420 | 1417 |
using lab_1[rule_format, of j x] x s_le_p[of x] eq_p \<open>j \<le> n\<close> by auto |
56273
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1418 |
show "j < n" |
60420 | 1419 |
using \<open>j \<le> n\<close> \<open>j \<noteq> n\<close> by simp |
56273
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1420 |
qed |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1421 |
then have "reduced n (lab x) \<noteq> n" |
60420 | 1422 |
using \<open>j \<le> n\<close> \<open>j \<noteq> n\<close> by simp } |
56273
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1423 |
moreover have "n \<in> (reduced n\<circ>lab) ` (s - {a})" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1424 |
unfolding rl' by auto |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1425 |
ultimately show ?thesis |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1426 |
by force |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1427 |
qed |
53248 | 1428 |
qed |
56273
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1429 |
show "ksimplex p n (s - {a})" |
60420 | 1430 |
unfolding simplex_top_face[OF \<open>0 < p\<close> all_eq_p] using s a by auto |
53248 | 1431 |
qed |
56273
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1432 |
ultimately show ?thesis |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1433 |
using assms by (intro kuhn_simplex_lemma) auto |
53248 | 1434 |
qed |
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
1435 |
|
60420 | 1436 |
text \<open>And so we get the final combinatorial result.\<close> |
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
1437 |
|
53688 | 1438 |
lemma ksimplex_0: "ksimplex p 0 s \<longleftrightarrow> s = {(\<lambda>x. p)}" |
53248 | 1439 |
proof |
56273
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1440 |
assume "ksimplex p 0 s" then show "s = {(\<lambda>x. p)}" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1441 |
by (blast dest: kuhn_simplex.ksimplex_0 elim: ksimplex.cases) |
53248 | 1442 |
next |
56273
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1443 |
assume s: "s = {(\<lambda>x. p)}" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1444 |
show "ksimplex p 0 s" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1445 |
proof (intro ksimplex, unfold_locales) |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1446 |
show "(\<lambda>_. p) \<in> {..<0::nat} \<rightarrow> {..<p}" by auto |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1447 |
show "bij_betw id {..<0} {..<0}" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1448 |
by simp |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1449 |
qed (auto simp: s) |
53248 | 1450 |
qed |
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
1451 |
|
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
1452 |
lemma kuhn_combinatorial: |
53688 | 1453 |
assumes "0 < p" |
56273
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1454 |
and "\<forall>x j. (\<forall>j. x j \<le> p) \<and> j < n \<and> x j = 0 \<longrightarrow> lab x j = 0" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1455 |
and "\<forall>x j. (\<forall>j. x j \<le> p) \<and> j < n \<and> x j = p \<longrightarrow> lab x j = 1" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1456 |
shows "odd (card {s. ksimplex p n s \<and> (reduced n\<circ>lab) ` s = {..n}})" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1457 |
(is "odd (card (?M n))") |
53248 | 1458 |
using assms |
1459 |
proof (induct n) |
|
56273
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1460 |
case 0 then show ?case |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1461 |
by (simp add: ksimplex_0 cong: conj_cong) |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1462 |
next |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1463 |
case (Suc n) |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1464 |
then have "odd (card (?M n))" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1465 |
by force |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1466 |
with Suc show ?case |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1467 |
using kuhn_induction[of p n] by (auto simp: comp_def) |
53248 | 1468 |
qed |
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
1469 |
|
53248 | 1470 |
lemma kuhn_lemma: |
53688 | 1471 |
fixes n p :: nat |
1472 |
assumes "0 < p" |
|
56273
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1473 |
and "\<forall>x. (\<forall>i<n. x i \<le> p) \<longrightarrow> (\<forall>i<n. label x i = (0::nat) \<or> label x i = 1)" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1474 |
and "\<forall>x. (\<forall>i<n. x i \<le> p) \<longrightarrow> (\<forall>i<n. x i = 0 \<longrightarrow> label x i = 0)" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1475 |
and "\<forall>x. (\<forall>i<n. x i \<le> p) \<longrightarrow> (\<forall>i<n. x i = p \<longrightarrow> label x i = 1)" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1476 |
obtains q where "\<forall>i<n. q i < p" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1477 |
and "\<forall>i<n. \<exists>r s. (\<forall>j<n. q j \<le> r j \<and> r j \<le> q j + 1) \<and> (\<forall>j<n. q j \<le> s j \<and> s j \<le> q j + 1) \<and> label r i \<noteq> label s i" |
53248 | 1478 |
proof - |
60580 | 1479 |
let ?rl = "reduced n \<circ> label" |
56273
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1480 |
let ?A = "{s. ksimplex p n s \<and> ?rl ` s = {..n}}" |
53248 | 1481 |
have "odd (card ?A)" |
56273
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1482 |
using assms by (intro kuhn_combinatorial[of p n label]) auto |
53688 | 1483 |
then have "?A \<noteq> {}" |
69661 | 1484 |
by (rule odd_card_imp_not_empty) |
56273
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1485 |
then obtain s b u where "kuhn_simplex p n b u s" and rl: "?rl ` s = {..n}" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1486 |
by (auto elim: ksimplex.cases) |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1487 |
interpret kuhn_simplex p n b u s by fact |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1488 |
|
53248 | 1489 |
show ?thesis |
56273
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1490 |
proof (intro that[of b] allI impI) |
60580 | 1491 |
fix i |
1492 |
assume "i < n" |
|
1493 |
then show "b i < p" |
|
56273
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1494 |
using base by auto |
53248 | 1495 |
next |
60580 | 1496 |
fix i |
1497 |
assume "i < n" |
|
56273
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1498 |
then have "i \<in> {.. n}" "Suc i \<in> {.. n}" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1499 |
by auto |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1500 |
then obtain u v where u: "u \<in> s" "Suc i = ?rl u" and v: "v \<in> s" "i = ?rl v" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1501 |
unfolding rl[symmetric] by blast |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1502 |
|
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1503 |
have "label u i \<noteq> label v i" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1504 |
using reduced_labelling [of n "label u"] reduced_labelling [of n "label v"] |
60420 | 1505 |
u(2)[symmetric] v(2)[symmetric] \<open>i < n\<close> |
56273
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1506 |
by auto |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1507 |
moreover |
60580 | 1508 |
have "b j \<le> u j" "u j \<le> b j + 1" "b j \<le> v j" "v j \<le> b j + 1" if "j < n" for j |
1509 |
using that base_le[OF \<open>u\<in>s\<close>] le_Suc_base[OF \<open>u\<in>s\<close>] base_le[OF \<open>v\<in>s\<close>] le_Suc_base[OF \<open>v\<in>s\<close>] |
|
1510 |
by auto |
|
1511 |
ultimately show "\<exists>r s. (\<forall>j<n. b j \<le> r j \<and> r j \<le> b j + 1) \<and> |
|
1512 |
(\<forall>j<n. b j \<le> s j \<and> s j \<le> b j + 1) \<and> label r i \<noteq> label s i" |
|
56273
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1513 |
by blast |
53248 | 1514 |
qed |
1515 |
qed |
|
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
1516 |
|
68617 | 1517 |
subsubsection \<open>Main result for the unit cube\<close> |
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
1518 |
|
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
1519 |
lemma kuhn_labelling_lemma': |
53688 | 1520 |
assumes "(\<forall>x::nat\<Rightarrow>real. P x \<longrightarrow> P (f x))" |
1521 |
and "\<forall>x. P x \<longrightarrow> (\<forall>i::nat. Q i \<longrightarrow> 0 \<le> x i \<and> x i \<le> 1)" |
|
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
1522 |
shows "\<exists>l. (\<forall>x i. l x i \<le> (1::nat)) \<and> |
53688 | 1523 |
(\<forall>x i. P x \<and> Q i \<and> x i = 0 \<longrightarrow> l x i = 0) \<and> |
1524 |
(\<forall>x i. P x \<and> Q i \<and> x i = 1 \<longrightarrow> l x i = 1) \<and> |
|
1525 |
(\<forall>x i. P x \<and> Q i \<and> l x i = 0 \<longrightarrow> x i \<le> f x i) \<and> |
|
1526 |
(\<forall>x i. P x \<and> Q i \<and> l x i = 1 \<longrightarrow> f x i \<le> x i)" |
|
76786 | 1527 |
unfolding all_conj_distrib [symmetric] |
1528 |
apply (subst choice_iff[symmetric])+ |
|
1529 |
by (metis assms bot_nat_0.extremum nle_le zero_neq_one) |
|
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
1530 |
|
68617 | 1531 |
subsection \<open>Brouwer's fixed point theorem\<close> |
1532 |
||
68621 | 1533 |
text \<open>We start proving Brouwer's fixed point theorem for the unit cube = \<open>cbox 0 One\<close>.\<close> |
56117
2dbf84ee3deb
remove ordered_euclidean_space constraint from brouwer/derivative lemmas;
huffman
parents:
55522
diff
changeset
|
1534 |
|
50526
899c9c4e4a4c
Remove the indexed basis from the definition of euclidean spaces and only use the set of Basis vectors
hoelzl
parents:
50514
diff
changeset
|
1535 |
lemma brouwer_cube: |
56117
2dbf84ee3deb
remove ordered_euclidean_space constraint from brouwer/derivative lemmas;
huffman
parents:
55522
diff
changeset
|
1536 |
fixes f :: "'a::euclidean_space \<Rightarrow> 'a" |
68621 | 1537 |
assumes "continuous_on (cbox 0 One) f" |
1538 |
and "f ` cbox 0 One \<subseteq> cbox 0 One" |
|
1539 |
shows "\<exists>x\<in>cbox 0 One. f x = x" |
|
53185 | 1540 |
proof (rule ccontr) |
63040 | 1541 |
define n where "n = DIM('a)" |
53185 | 1542 |
have n: "1 \<le> n" "0 < n" "n \<noteq> 0" |
71172 | 1543 |
unfolding n_def by (auto simp: Suc_le_eq) |
53674 | 1544 |
assume "\<not> ?thesis" |
68621 | 1545 |
then have *: "\<not> (\<exists>x\<in>cbox 0 One. f x - x = 0)" |
53674 | 1546 |
by auto |
55522 | 1547 |
obtain d where |
68621 | 1548 |
d: "d > 0" "\<And>x. x \<in> cbox 0 One \<Longrightarrow> d \<le> norm (f x - x)" |
1549 |
apply (rule brouwer_compactness_lemma[OF compact_cbox _ *]) |
|
56371
fb9ae0727548
extend continuous_intros; remove continuous_on_intros and isCont_intros
hoelzl
parents:
56273
diff
changeset
|
1550 |
apply (rule continuous_intros assms)+ |
55522 | 1551 |
apply blast |
53185 | 1552 |
done |
68621 | 1553 |
have *: "\<forall>x. x \<in> cbox 0 One \<longrightarrow> f x \<in> cbox 0 One" |
1554 |
"\<forall>x. x \<in> (cbox 0 One::'a set) \<longrightarrow> (\<forall>i\<in>Basis. True \<longrightarrow> 0 \<le> x \<bullet> i \<and> x \<bullet> i \<le> 1)" |
|
53185 | 1555 |
using assms(2)[unfolded image_subset_iff Ball_def] |
68621 | 1556 |
unfolding cbox_def |
55522 | 1557 |
by auto |
68022 | 1558 |
obtain label :: "'a \<Rightarrow> 'a \<Rightarrow> nat" where label [rule_format]: |
55522 | 1559 |
"\<forall>x. \<forall>i\<in>Basis. label x i \<le> 1" |
68621 | 1560 |
"\<forall>x. \<forall>i\<in>Basis. x \<in> cbox 0 One \<and> x \<bullet> i = 0 \<longrightarrow> label x i = 0" |
1561 |
"\<forall>x. \<forall>i\<in>Basis. x \<in> cbox 0 One \<and> x \<bullet> i = 1 \<longrightarrow> label x i = 1" |
|
1562 |
"\<forall>x. \<forall>i\<in>Basis. x \<in> cbox 0 One \<and> label x i = 0 \<longrightarrow> x \<bullet> i \<le> f x \<bullet> i" |
|
1563 |
"\<forall>x. \<forall>i\<in>Basis. x \<in> cbox 0 One \<and> label x i = 1 \<longrightarrow> f x \<bullet> i \<le> x \<bullet> i" |
|
68022 | 1564 |
using kuhn_labelling_lemma[OF *] by auto |
53185 | 1565 |
note label = this [rule_format] |
68621 | 1566 |
have lem1: "\<forall>x\<in>cbox 0 One. \<forall>y\<in>cbox 0 One. \<forall>i\<in>Basis. label x i \<noteq> label y i \<longrightarrow> |
61945 | 1567 |
\<bar>f x \<bullet> i - x \<bullet> i\<bar> \<le> norm (f y - f x) + norm (y - x)" |
53185 | 1568 |
proof safe |
1569 |
fix x y :: 'a |
|
68621 | 1570 |
assume x: "x \<in> cbox 0 One" and y: "y \<in> cbox 0 One" |
53185 | 1571 |
fix i |
1572 |
assume i: "label x i \<noteq> label y i" "i \<in> Basis" |
|
1573 |
have *: "\<And>x y fx fy :: real. x \<le> fx \<and> fy \<le> y \<or> fx \<le> x \<and> y \<le> fy \<Longrightarrow> |
|
61945 | 1574 |
\<bar>fx - x\<bar> \<le> \<bar>fy - fx\<bar> + \<bar>y - x\<bar>" by auto |
1575 |
have "\<bar>(f x - x) \<bullet> i\<bar> \<le> \<bar>(f y - f x)\<bullet>i\<bar> + \<bar>(y - x)\<bullet>i\<bar>" |
|
68022 | 1576 |
proof (cases "label x i = 0") |
1577 |
case True |
|
1578 |
then have fxy: "\<not> f y \<bullet> i \<le> y \<bullet> i \<Longrightarrow> f x \<bullet> i \<le> x \<bullet> i" |
|
1579 |
by (metis True i label(1) label(5) le_antisym less_one not_le_imp_less y) |
|
1580 |
show ?thesis |
|
1581 |
unfolding inner_simps |
|
1582 |
by (rule *) (auto simp: True i label x y fxy) |
|
53185 | 1583 |
next |
68022 | 1584 |
case False |
1585 |
then show ?thesis |
|
1586 |
using label [OF \<open>i \<in> Basis\<close>] i(1) x y |
|
1587 |
apply (auto simp: inner_diff_left le_Suc_eq) |
|
1588 |
by (metis "*") |
|
53185 | 1589 |
qed |
1590 |
also have "\<dots> \<le> norm (f y - f x) + norm (y - x)" |
|
68022 | 1591 |
by (simp add: add_mono i(2) norm_bound_Basis_le) |
53185 | 1592 |
finally show "\<bar>f x \<bullet> i - x \<bullet> i\<bar> \<le> norm (f y - f x) + norm (y - x)" |
1593 |
unfolding inner_simps . |
|
50526
899c9c4e4a4c
Remove the indexed basis from the definition of euclidean spaces and only use the set of Basis vectors
hoelzl
parents:
50514
diff
changeset
|
1594 |
qed |
68621 | 1595 |
have "\<exists>e>0. \<forall>x\<in>cbox 0 One. \<forall>y\<in>cbox 0 One. \<forall>z\<in>cbox 0 One. \<forall>i\<in>Basis. |
68022 | 1596 |
norm (x - z) < e \<longrightarrow> norm (y - z) < e \<longrightarrow> label x i \<noteq> label y i \<longrightarrow> |
61945 | 1597 |
\<bar>(f(z) - z)\<bullet>i\<bar> < d / (real n)" |
53185 | 1598 |
proof - |
53688 | 1599 |
have d': "d / real n / 8 > 0" |
71172 | 1600 |
using d(1) by (simp add: n_def) |
68621 | 1601 |
have *: "uniformly_continuous_on (cbox 0 One) f" |
1602 |
by (rule compact_uniformly_continuous[OF assms(1) compact_cbox]) |
|
55522 | 1603 |
obtain e where e: |
1604 |
"e > 0" |
|
68621 | 1605 |
"\<And>x x'. x \<in> cbox 0 One \<Longrightarrow> |
1606 |
x' \<in> cbox 0 One \<Longrightarrow> |
|
55522 | 1607 |
norm (x' - x) < e \<Longrightarrow> |
1608 |
norm (f x' - f x) < d / real n / 8" |
|
1609 |
using *[unfolded uniformly_continuous_on_def,rule_format,OF d'] |
|
1610 |
unfolding dist_norm |
|
1611 |
by blast |
|
53185 | 1612 |
show ?thesis |
68022 | 1613 |
proof (intro exI conjI ballI impI) |
53185 | 1614 |
show "0 < min (e / 2) (d / real n / 8)" |
1615 |
using d' e by auto |
|
1616 |
fix x y z i |
|
53688 | 1617 |
assume as: |
68621 | 1618 |
"x \<in> cbox 0 One" "y \<in> cbox 0 One" "z \<in> cbox 0 One" |
37489
44e42d392c6e
Introduce a type class for euclidean spaces, port most lemmas from real^'n to this type class.
hoelzl
parents:
36587
diff
changeset
|
1619 |
"norm (x - z) < min (e / 2) (d / real n / 8)" |
53688 | 1620 |
"norm (y - z) < min (e / 2) (d / real n / 8)" |
1621 |
"label x i \<noteq> label y i" |
|
1622 |
assume i: "i \<in> Basis" |
|
61945 | 1623 |
have *: "\<And>z fz x fx n1 n2 n3 n4 d4 d :: real. \<bar>fx - x\<bar> \<le> n1 + n2 \<Longrightarrow> |
1624 |
\<bar>fx - fz\<bar> \<le> n3 \<Longrightarrow> \<bar>x - z\<bar> \<le> n4 \<Longrightarrow> |
|
53185 | 1625 |
n1 < d4 \<Longrightarrow> n2 < 2 * d4 \<Longrightarrow> n3 < d4 \<Longrightarrow> n4 < d4 \<Longrightarrow> |
61945 | 1626 |
(8 * d4 = d) \<Longrightarrow> \<bar>fz - z\<bar> < d" |
53688 | 1627 |
by auto |
1628 |
show "\<bar>(f z - z) \<bullet> i\<bar> < d / real n" |
|
1629 |
unfolding inner_simps |
|
53185 | 1630 |
proof (rule *) |
1631 |
show "\<bar>f x \<bullet> i - x \<bullet> i\<bar> \<le> norm (f y -f x) + norm (y - x)" |
|
68022 | 1632 |
using as(1) as(2) as(6) i lem1 by blast |
1633 |
show "norm (f x - f z) < d / real n / 8" |
|
1634 |
using d' e as by auto |
|
50526
899c9c4e4a4c
Remove the indexed basis from the definition of euclidean spaces and only use the set of Basis vectors
hoelzl
parents:
50514
diff
changeset
|
1635 |
show "\<bar>f x \<bullet> i - f z \<bullet> i\<bar> \<le> norm (f x - f z)" "\<bar>x \<bullet> i - z \<bullet> i\<bar> \<le> norm (x - z)" |
55522 | 1636 |
unfolding inner_diff_left[symmetric] |
53688 | 1637 |
by (rule Basis_le_norm[OF i])+ |
1638 |
have tria: "norm (y - x) \<le> norm (y - z) + norm (x - z)" |
|
53185 | 1639 |
using dist_triangle[of y x z, unfolded dist_norm] |
53688 | 1640 |
unfolding norm_minus_commute |
1641 |
by auto |
|
53185 | 1642 |
also have "\<dots> < e / 2 + e / 2" |
68022 | 1643 |
using as(4) as(5) by auto |
53185 | 1644 |
finally show "norm (f y - f x) < d / real n / 8" |
68022 | 1645 |
using as(1) as(2) e(2) by auto |
53185 | 1646 |
have "norm (y - z) + norm (x - z) < d / real n / 8 + d / real n / 8" |
68022 | 1647 |
using as(4) as(5) by auto |
1648 |
with tria show "norm (y - x) < 2 * (d / real n / 8)" |
|
53688 | 1649 |
by auto |
68022 | 1650 |
qed (use as in auto) |
53185 | 1651 |
qed |
1652 |
qed |
|
55522 | 1653 |
then |
1654 |
obtain e where e: |
|
1655 |
"e > 0" |
|
68621 | 1656 |
"\<And>x y z i. x \<in> cbox 0 One \<Longrightarrow> |
1657 |
y \<in> cbox 0 One \<Longrightarrow> |
|
1658 |
z \<in> cbox 0 One \<Longrightarrow> |
|
55522 | 1659 |
i \<in> Basis \<Longrightarrow> |
1660 |
norm (x - z) < e \<and> norm (y - z) < e \<and> label x i \<noteq> label y i \<Longrightarrow> |
|
1661 |
\<bar>(f z - z) \<bullet> i\<bar> < d / real n" |
|
1662 |
by blast |
|
1663 |
obtain p :: nat where p: "1 + real n / e \<le> real p" |
|
1664 |
using real_arch_simple .. |
|
53185 | 1665 |
have "1 + real n / e > 0" |
56541 | 1666 |
using e(1) n by (simp add: add_pos_pos) |
53688 | 1667 |
then have "p > 0" |
1668 |
using p by auto |
|
50526
899c9c4e4a4c
Remove the indexed basis from the definition of euclidean spaces and only use the set of Basis vectors
hoelzl
parents:
50514
diff
changeset
|
1669 |
|
56273
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1670 |
obtain b :: "nat \<Rightarrow> 'a" where b: "bij_betw b {..< n} Basis" |
50526
899c9c4e4a4c
Remove the indexed basis from the definition of euclidean spaces and only use the set of Basis vectors
hoelzl
parents:
50514
diff
changeset
|
1671 |
by atomize_elim (auto simp: n_def intro!: finite_same_card_bij) |
63040 | 1672 |
define b' where "b' = inv_into {..< n} b" |
56273
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1673 |
then have b': "bij_betw b' Basis {..< n}" |
50526
899c9c4e4a4c
Remove the indexed basis from the definition of euclidean spaces and only use the set of Basis vectors
hoelzl
parents:
50514
diff
changeset
|
1674 |
using bij_betw_inv_into[OF b] by auto |
56273
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1675 |
then have b'_Basis: "\<And>i. i \<in> Basis \<Longrightarrow> b' i \<in> {..< n}" |
50526
899c9c4e4a4c
Remove the indexed basis from the definition of euclidean spaces and only use the set of Basis vectors
hoelzl
parents:
50514
diff
changeset
|
1676 |
unfolding bij_betw_def by (auto simp: set_eq_iff) |
899c9c4e4a4c
Remove the indexed basis from the definition of euclidean spaces and only use the set of Basis vectors
hoelzl
parents:
50514
diff
changeset
|
1677 |
have bb'[simp]:"\<And>i. i \<in> Basis \<Longrightarrow> b (b' i) = i" |
53688 | 1678 |
unfolding b'_def |
1679 |
using b |
|
1680 |
by (auto simp: f_inv_into_f bij_betw_def) |
|
56273
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1681 |
have b'b[simp]:"\<And>i. i < n \<Longrightarrow> b' (b i) = i" |
53688 | 1682 |
unfolding b'_def |
1683 |
using b |
|
1684 |
by (auto simp: inv_into_f_eq bij_betw_def) |
|
1685 |
have *: "\<And>x :: nat. x = 0 \<or> x = 1 \<longleftrightarrow> x \<le> 1" |
|
1686 |
by auto |
|
56273
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1687 |
have b'': "\<And>j. j < n \<Longrightarrow> b j \<in> Basis" |
53185 | 1688 |
using b unfolding bij_betw_def by auto |
56273
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1689 |
have q1: "0 < p" "\<forall>x. (\<forall>i<n. x i \<le> p) \<longrightarrow> |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1690 |
(\<forall>i<n. (label (\<Sum>i\<in>Basis. (real (x (b' i)) / real p) *\<^sub>R i) \<circ> b) i = 0 \<or> |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1691 |
(label (\<Sum>i\<in>Basis. (real (x (b' i)) / real p) *\<^sub>R i) \<circ> b) i = 1)" |
53688 | 1692 |
unfolding * |
60420 | 1693 |
using \<open>p > 0\<close> \<open>n > 0\<close> |
53688 | 1694 |
using label(1)[OF b''] |
1695 |
by auto |
|
56273
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1696 |
{ fix x :: "nat \<Rightarrow> nat" and i assume "\<forall>i<n. x i \<le> p" "i < n" "x i = p \<or> x i = 0" |
68621 | 1697 |
then have "(\<Sum>i\<in>Basis. (real (x (b' i)) / real p) *\<^sub>R i) \<in> (cbox 0 One::'a set)" |
56273
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1698 |
using b'_Basis |
71172 | 1699 |
by (auto simp: cbox_def bij_betw_def zero_le_divide_iff divide_le_eq_1) } |
56273
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1700 |
note cube = this |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1701 |
have q2: "\<forall>x. (\<forall>i<n. x i \<le> p) \<longrightarrow> (\<forall>i<n. x i = 0 \<longrightarrow> |
50526
899c9c4e4a4c
Remove the indexed basis from the definition of euclidean spaces and only use the set of Basis vectors
hoelzl
parents:
50514
diff
changeset
|
1702 |
(label (\<Sum>i\<in>Basis. (real (x (b' i)) / real p) *\<^sub>R i) \<circ> b) i = 0)" |
68022 | 1703 |
unfolding o_def using cube \<open>p > 0\<close> by (intro allI impI label(2)) (auto simp: b'') |
61609
77b453bd616f
Coercion "real" now has type nat => real only and is no longer overloaded. Type class "real_of" is gone. Many duplicate theorems removed.
paulson <lp15@cam.ac.uk>
parents:
61520
diff
changeset
|
1704 |
have q3: "\<forall>x. (\<forall>i<n. x i \<le> p) \<longrightarrow> (\<forall>i<n. x i = p \<longrightarrow> |
50526
899c9c4e4a4c
Remove the indexed basis from the definition of euclidean spaces and only use the set of Basis vectors
hoelzl
parents:
50514
diff
changeset
|
1705 |
(label (\<Sum>i\<in>Basis. (real (x (b' i)) / real p) *\<^sub>R i) \<circ> b) i = 1)" |
68022 | 1706 |
using cube \<open>p > 0\<close> unfolding o_def by (intro allI impI label(3)) (auto simp: b'') |
55522 | 1707 |
obtain q where q: |
56273
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1708 |
"\<forall>i<n. q i < p" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1709 |
"\<forall>i<n. |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1710 |
\<exists>r s. (\<forall>j<n. q j \<le> r j \<and> r j \<le> q j + 1) \<and> |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1711 |
(\<forall>j<n. q j \<le> s j \<and> s j \<le> q j + 1) \<and> |
55522 | 1712 |
(label (\<Sum>i\<in>Basis. (real (r (b' i)) / real p) *\<^sub>R i) \<circ> b) i \<noteq> |
1713 |
(label (\<Sum>i\<in>Basis. (real (s (b' i)) / real p) *\<^sub>R i) \<circ> b) i" |
|
56273
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1714 |
by (rule kuhn_lemma[OF q1 q2 q3]) |
63040 | 1715 |
define z :: 'a where "z = (\<Sum>i\<in>Basis. (real (q (b' i)) / real p) *\<^sub>R i)" |
61945 | 1716 |
have "\<exists>i\<in>Basis. d / real n \<le> \<bar>(f z - z)\<bullet>i\<bar>" |
53185 | 1717 |
proof (rule ccontr) |
50526
899c9c4e4a4c
Remove the indexed basis from the definition of euclidean spaces and only use the set of Basis vectors
hoelzl
parents:
50514
diff
changeset
|
1718 |
have "\<forall>i\<in>Basis. q (b' i) \<in> {0..p}" |
53688 | 1719 |
using q(1) b' |
1720 |
by (auto intro: less_imp_le simp: bij_betw_def) |
|
68621 | 1721 |
then have "z \<in> cbox 0 One" |
1722 |
unfolding z_def cbox_def |
|
53688 | 1723 |
using b'_Basis |
68022 | 1724 |
by (auto simp: bij_betw_def zero_le_divide_iff divide_le_eq_1) |
53688 | 1725 |
then have d_fz_z: "d \<le> norm (f z - z)" |
1726 |
by (rule d) |
|
1727 |
assume "\<not> ?thesis" |
|
53674 | 1728 |
then have as: "\<forall>i\<in>Basis. \<bar>f z \<bullet> i - z \<bullet> i\<bar> < d / real n" |
60420 | 1729 |
using \<open>n > 0\<close> |
68022 | 1730 |
by (auto simp: not_le inner_diff) |
50526
899c9c4e4a4c
Remove the indexed basis from the definition of euclidean spaces and only use the set of Basis vectors
hoelzl
parents:
50514
diff
changeset
|
1731 |
have "norm (f z - z) \<le> (\<Sum>i\<in>Basis. \<bar>f z \<bullet> i - z \<bullet> i\<bar>)" |
53688 | 1732 |
unfolding inner_diff_left[symmetric] |
1733 |
by (rule norm_le_l1) |
|
53185 | 1734 |
also have "\<dots> < (\<Sum>(i::'a) \<in> Basis. d / real n)" |
68022 | 1735 |
by (meson as finite_Basis nonempty_Basis sum_strict_mono) |
53185 | 1736 |
also have "\<dots> = d" |
68022 | 1737 |
using DIM_positive[where 'a='a] by (auto simp: n_def) |
53688 | 1738 |
finally show False |
1739 |
using d_fz_z by auto |
|
53185 | 1740 |
qed |
55522 | 1741 |
then obtain i where i: "i \<in> Basis" "d / real n \<le> \<bar>(f z - z) \<bullet> i\<bar>" .. |
56273
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1742 |
have *: "b' i < n" |
55522 | 1743 |
using i and b'[unfolded bij_betw_def] |
53688 | 1744 |
by auto |
55522 | 1745 |
obtain r s where rs: |
56273
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1746 |
"\<And>j. j < n \<Longrightarrow> q j \<le> r j \<and> r j \<le> q j + 1" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1747 |
"\<And>j. j < n \<Longrightarrow> q j \<le> s j \<and> s j \<le> q j + 1" |
55522 | 1748 |
"(label (\<Sum>i\<in>Basis. (real (r (b' i)) / real p) *\<^sub>R i) \<circ> b) (b' i) \<noteq> |
1749 |
(label (\<Sum>i\<in>Basis. (real (s (b' i)) / real p) *\<^sub>R i) \<circ> b) (b' i)" |
|
1750 |
using q(2)[rule_format,OF *] by blast |
|
56273
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1751 |
have b'_im: "\<And>i. i \<in> Basis \<Longrightarrow> b' i < n" |
53185 | 1752 |
using b' unfolding bij_betw_def by auto |
63040 | 1753 |
define r' ::'a where "r' = (\<Sum>i\<in>Basis. (real (r (b' i)) / real p) *\<^sub>R i)" |
53185 | 1754 |
have "\<And>i. i \<in> Basis \<Longrightarrow> r (b' i) \<le> p" |
76786 | 1755 |
using b'_im q(1) rs(1) by fastforce |
68621 | 1756 |
then have "r' \<in> cbox 0 One" |
1757 |
unfolding r'_def cbox_def |
|
53688 | 1758 |
using b'_Basis |
68022 | 1759 |
by (auto simp: bij_betw_def zero_le_divide_iff divide_le_eq_1) |
63040 | 1760 |
define s' :: 'a where "s' = (\<Sum>i\<in>Basis. (real (s (b' i)) / real p) *\<^sub>R i)" |
53688 | 1761 |
have "\<And>i. i \<in> Basis \<Longrightarrow> s (b' i) \<le> p" |
68022 | 1762 |
using b'_im q(1) rs(2) by fastforce |
68621 | 1763 |
then have "s' \<in> cbox 0 One" |
1764 |
unfolding s'_def cbox_def |
|
68022 | 1765 |
using b'_Basis by (auto simp: bij_betw_def zero_le_divide_iff divide_le_eq_1) |
68621 | 1766 |
have "z \<in> cbox 0 One" |
1767 |
unfolding z_def cbox_def |
|
60420 | 1768 |
using b'_Basis q(1)[rule_format,OF b'_im] \<open>p > 0\<close> |
68022 | 1769 |
by (auto simp: bij_betw_def zero_le_divide_iff divide_le_eq_1 less_imp_le) |
53688 | 1770 |
{ |
1771 |
have "(\<Sum>i\<in>Basis. \<bar>real (r (b' i)) - real (q (b' i))\<bar>) \<le> (\<Sum>(i::'a)\<in>Basis. 1)" |
|
68022 | 1772 |
by (rule sum_mono) (use rs(1)[OF b'_im] in force) |
53688 | 1773 |
also have "\<dots> < e * real p" |
60420 | 1774 |
using p \<open>e > 0\<close> \<open>p > 0\<close> |
68022 | 1775 |
by (auto simp: field_simps n_def) |
53185 | 1776 |
finally have "(\<Sum>i\<in>Basis. \<bar>real (r (b' i)) - real (q (b' i))\<bar>) < e * real p" . |
1777 |
} |
|
1778 |
moreover |
|
53688 | 1779 |
{ |
1780 |
have "(\<Sum>i\<in>Basis. \<bar>real (s (b' i)) - real (q (b' i))\<bar>) \<le> (\<Sum>(i::'a)\<in>Basis. 1)" |
|
68022 | 1781 |
by (rule sum_mono) (use rs(2)[OF b'_im] in force) |
53688 | 1782 |
also have "\<dots> < e * real p" |
60420 | 1783 |
using p \<open>e > 0\<close> \<open>p > 0\<close> |
68022 | 1784 |
by (auto simp: field_simps n_def) |
53185 | 1785 |
finally have "(\<Sum>i\<in>Basis. \<bar>real (s (b' i)) - real (q (b' i))\<bar>) < e * real p" . |
1786 |
} |
|
1787 |
ultimately |
|
53688 | 1788 |
have "norm (r' - z) < e" and "norm (s' - z) < e" |
53185 | 1789 |
unfolding r'_def s'_def z_def |
60420 | 1790 |
using \<open>p > 0\<close> |
53185 | 1791 |
apply (rule_tac[!] le_less_trans[OF norm_le_l1]) |
68022 | 1792 |
apply (auto simp: field_simps sum_divide_distrib[symmetric] inner_diff_left) |
53185 | 1793 |
done |
53674 | 1794 |
then have "\<bar>(f z - z) \<bullet> i\<bar> < d / real n" |
53688 | 1795 |
using rs(3) i |
1796 |
unfolding r'_def[symmetric] s'_def[symmetric] o_def bb' |
|
68621 | 1797 |
by (intro e(2)[OF \<open>r'\<in>cbox 0 One\<close> \<open>s'\<in>cbox 0 One\<close> \<open>z\<in>cbox 0 One\<close>]) auto |
53688 | 1798 |
then show False |
1799 |
using i by auto |
|
50526
899c9c4e4a4c
Remove the indexed basis from the definition of euclidean spaces and only use the set of Basis vectors
hoelzl
parents:
50514
diff
changeset
|
1800 |
qed |
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
1801 |
|
68617 | 1802 |
text \<open>Next step is to prove it for nonempty interiors.\<close> |
56117
2dbf84ee3deb
remove ordered_euclidean_space constraint from brouwer/derivative lemmas;
huffman
parents:
55522
diff
changeset
|
1803 |
|
50526
899c9c4e4a4c
Remove the indexed basis from the definition of euclidean spaces and only use the set of Basis vectors
hoelzl
parents:
50514
diff
changeset
|
1804 |
lemma brouwer_weak: |
56117
2dbf84ee3deb
remove ordered_euclidean_space constraint from brouwer/derivative lemmas;
huffman
parents:
55522
diff
changeset
|
1805 |
fixes f :: "'a::euclidean_space \<Rightarrow> 'a" |
68022 | 1806 |
assumes "compact S" |
1807 |
and "convex S" |
|
1808 |
and "interior S \<noteq> {}" |
|
1809 |
and "continuous_on S f" |
|
1810 |
and "f ` S \<subseteq> S" |
|
1811 |
obtains x where "x \<in> S" and "f x = x" |
|
53185 | 1812 |
proof - |
68621 | 1813 |
let ?U = "cbox 0 One :: 'a set" |
56117
2dbf84ee3deb
remove ordered_euclidean_space constraint from brouwer/derivative lemmas;
huffman
parents:
55522
diff
changeset
|
1814 |
have "\<Sum>Basis /\<^sub>R 2 \<in> interior ?U" |
2dbf84ee3deb
remove ordered_euclidean_space constraint from brouwer/derivative lemmas;
huffman
parents:
55522
diff
changeset
|
1815 |
proof (rule interiorI) |
2dbf84ee3deb
remove ordered_euclidean_space constraint from brouwer/derivative lemmas;
huffman
parents:
55522
diff
changeset
|
1816 |
let ?I = "(\<Inter>i\<in>Basis. {x::'a. 0 < x \<bullet> i} \<inter> {x. x \<bullet> i < 1})" |
2dbf84ee3deb
remove ordered_euclidean_space constraint from brouwer/derivative lemmas;
huffman
parents:
55522
diff
changeset
|
1817 |
show "open ?I" |
71172 | 1818 |
by (intro open_INT finite_Basis ballI open_Int, auto intro: open_Collect_less simp: continuous_on_inner) |
56117
2dbf84ee3deb
remove ordered_euclidean_space constraint from brouwer/derivative lemmas;
huffman
parents:
55522
diff
changeset
|
1819 |
show "\<Sum>Basis /\<^sub>R 2 \<in> ?I" |
2dbf84ee3deb
remove ordered_euclidean_space constraint from brouwer/derivative lemmas;
huffman
parents:
55522
diff
changeset
|
1820 |
by simp |
68621 | 1821 |
show "?I \<subseteq> cbox 0 One" |
1822 |
unfolding cbox_def by force |
|
56117
2dbf84ee3deb
remove ordered_euclidean_space constraint from brouwer/derivative lemmas;
huffman
parents:
55522
diff
changeset
|
1823 |
qed |
2dbf84ee3deb
remove ordered_euclidean_space constraint from brouwer/derivative lemmas;
huffman
parents:
55522
diff
changeset
|
1824 |
then have *: "interior ?U \<noteq> {}" by fast |
68022 | 1825 |
have *: "?U homeomorphic S" |
68621 | 1826 |
using homeomorphic_convex_compact[OF convex_box(1) compact_cbox * assms(2,1,3)] . |
56117
2dbf84ee3deb
remove ordered_euclidean_space constraint from brouwer/derivative lemmas;
huffman
parents:
55522
diff
changeset
|
1827 |
have "\<forall>f. continuous_on ?U f \<and> f ` ?U \<subseteq> ?U \<longrightarrow> |
2dbf84ee3deb
remove ordered_euclidean_space constraint from brouwer/derivative lemmas;
huffman
parents:
55522
diff
changeset
|
1828 |
(\<exists>x\<in>?U. f x = x)" |
37489
44e42d392c6e
Introduce a type class for euclidean spaces, port most lemmas from real^'n to this type class.
hoelzl
parents:
36587
diff
changeset
|
1829 |
using brouwer_cube by auto |
53674 | 1830 |
then show ?thesis |
53185 | 1831 |
unfolding homeomorphic_fixpoint_property[OF *] |
53252 | 1832 |
using assms |
68022 | 1833 |
by (auto intro: that) |
53185 | 1834 |
qed |
1835 |
||
68617 | 1836 |
text \<open>Then the particular case for closed balls.\<close> |
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
1837 |
|
53185 | 1838 |
lemma brouwer_ball: |
56117
2dbf84ee3deb
remove ordered_euclidean_space constraint from brouwer/derivative lemmas;
huffman
parents:
55522
diff
changeset
|
1839 |
fixes f :: "'a::euclidean_space \<Rightarrow> 'a" |
53674 | 1840 |
assumes "e > 0" |
1841 |
and "continuous_on (cball a e) f" |
|
53688 | 1842 |
and "f ` cball a e \<subseteq> cball a e" |
53674 | 1843 |
obtains x where "x \<in> cball a e" and "f x = x" |
53185 | 1844 |
using brouwer_weak[OF compact_cball convex_cball, of a e f] |
1845 |
unfolding interior_cball ball_eq_empty |
|
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
1846 |
using assms by auto |
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
1847 |
|
68617 | 1848 |
text \<open>And finally we prove Brouwer's fixed point theorem in its general version.\<close> |
1849 |
||
1850 |
theorem brouwer: |
|
56117
2dbf84ee3deb
remove ordered_euclidean_space constraint from brouwer/derivative lemmas;
huffman
parents:
55522
diff
changeset
|
1851 |
fixes f :: "'a::euclidean_space \<Rightarrow> 'a" |
68022 | 1852 |
assumes S: "compact S" "convex S" "S \<noteq> {}" |
1853 |
and contf: "continuous_on S f" |
|
1854 |
and fim: "f ` S \<subseteq> S" |
|
1855 |
obtains x where "x \<in> S" and "f x = x" |
|
53185 | 1856 |
proof - |
68022 | 1857 |
have "\<exists>e>0. S \<subseteq> cball 0 e" |
1858 |
using compact_imp_bounded[OF \<open>compact S\<close>] unfolding bounded_pos |
|
1859 |
by auto |
|
1860 |
then obtain e where e: "e > 0" "S \<subseteq> cball 0 e" |
|
55522 | 1861 |
by blast |
68022 | 1862 |
have "\<exists>x\<in> cball 0 e. (f \<circ> closest_point S) x = x" |
1863 |
proof (rule_tac brouwer_ball[OF e(1)]) |
|
1864 |
show "continuous_on (cball 0 e) (f \<circ> closest_point S)" |
|
76786 | 1865 |
by (meson assms closest_point_in_set compact_eq_bounded_closed contf continuous_on_closest_point |
1866 |
continuous_on_compose continuous_on_subset image_subsetI) |
|
68022 | 1867 |
show "(f \<circ> closest_point S) ` cball 0 e \<subseteq> cball 0 e" |
1868 |
by clarsimp (metis S fim closest_point_exists(1) compact_eq_bounded_closed e(2) image_subset_iff mem_cball_0 subsetCE) |
|
1869 |
qed (use assms in auto) |
|
1870 |
then obtain x where x: "x \<in> cball 0 e" "(f \<circ> closest_point S) x = x" .. |
|
1871 |
have "x \<in> S" |
|
1872 |
by (metis closest_point_in_set comp_apply compact_imp_closed fim image_eqI S(1) S(3) subset_iff x(2)) |
|
1873 |
then have *: "closest_point S x = x" |
|
1874 |
by (rule closest_point_self) |
|
53185 | 1875 |
show thesis |
68022 | 1876 |
proof |
1877 |
show "closest_point S x \<in> S" |
|
1878 |
by (simp add: "*" \<open>x \<in> S\<close>) |
|
1879 |
show "f (closest_point S x) = closest_point S x" |
|
1880 |
using "*" x(2) by auto |
|
1881 |
qed |
|
53185 | 1882 |
qed |
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
1883 |
|
68617 | 1884 |
subsection \<open>Applications\<close> |
1885 |
||
60420 | 1886 |
text \<open>So we get the no-retraction theorem.\<close> |
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
1887 |
|
68617 | 1888 |
corollary no_retraction_cball: |
56117
2dbf84ee3deb
remove ordered_euclidean_space constraint from brouwer/derivative lemmas;
huffman
parents:
55522
diff
changeset
|
1889 |
fixes a :: "'a::euclidean_space" |
53674 | 1890 |
assumes "e > 0" |
1891 |
shows "\<not> (frontier (cball a e) retract_of (cball a e))" |
|
53185 | 1892 |
proof |
60580 | 1893 |
assume *: "frontier (cball a e) retract_of (cball a e)" |
1894 |
have **: "\<And>xa. a - (2 *\<^sub>R a - xa) = - (a - xa)" |
|
53185 | 1895 |
using scaleR_left_distrib[of 1 1 a] by auto |
68022 | 1896 |
obtain x where x: "x \<in> {x. norm (a - x) = e}" "2 *\<^sub>R a - x = x" |
1897 |
proof (rule retract_fixpoint_property[OF *, of "\<lambda>x. scaleR 2 a - x"]) |
|
1898 |
show "continuous_on (frontier (cball a e)) ((-) (2 *\<^sub>R a))" |
|
1899 |
by (intro continuous_intros) |
|
1900 |
show "(-) (2 *\<^sub>R a) ` frontier (cball a e) \<subseteq> frontier (cball a e)" |
|
1901 |
by clarsimp (metis "**" dist_norm norm_minus_cancel) |
|
1902 |
qed (auto simp: dist_norm intro: brouwer_ball[OF assms]) |
|
53674 | 1903 |
then have "scaleR 2 a = scaleR 1 x + scaleR 1 x" |
68022 | 1904 |
by (auto simp: algebra_simps) |
53674 | 1905 |
then have "a = x" |
53688 | 1906 |
unfolding scaleR_left_distrib[symmetric] |
1907 |
by auto |
|
53674 | 1908 |
then show False |
1909 |
using x assms by auto |
|
53185 | 1910 |
qed |
1911 |
||
64006
0de4736dad8b
new theorems including the theory FurtherTopology
paulson <lp15@cam.ac.uk>
parents:
63928
diff
changeset
|
1912 |
corollary contractible_sphere: |
0de4736dad8b
new theorems including the theory FurtherTopology
paulson <lp15@cam.ac.uk>
parents:
63928
diff
changeset
|
1913 |
fixes a :: "'a::euclidean_space" |
0de4736dad8b
new theorems including the theory FurtherTopology
paulson <lp15@cam.ac.uk>
parents:
63928
diff
changeset
|
1914 |
shows "contractible(sphere a r) \<longleftrightarrow> r \<le> 0" |
0de4736dad8b
new theorems including the theory FurtherTopology
paulson <lp15@cam.ac.uk>
parents:
63928
diff
changeset
|
1915 |
proof (cases "0 < r") |
0de4736dad8b
new theorems including the theory FurtherTopology
paulson <lp15@cam.ac.uk>
parents:
63928
diff
changeset
|
1916 |
case True |
0de4736dad8b
new theorems including the theory FurtherTopology
paulson <lp15@cam.ac.uk>
parents:
63928
diff
changeset
|
1917 |
then show ?thesis |
0de4736dad8b
new theorems including the theory FurtherTopology
paulson <lp15@cam.ac.uk>
parents:
63928
diff
changeset
|
1918 |
unfolding contractible_def nullhomotopic_from_sphere_extension |
0de4736dad8b
new theorems including the theory FurtherTopology
paulson <lp15@cam.ac.uk>
parents:
63928
diff
changeset
|
1919 |
using no_retraction_cball [OF True, of a] |
0de4736dad8b
new theorems including the theory FurtherTopology
paulson <lp15@cam.ac.uk>
parents:
63928
diff
changeset
|
1920 |
by (auto simp: retract_of_def retraction_def) |
0de4736dad8b
new theorems including the theory FurtherTopology
paulson <lp15@cam.ac.uk>
parents:
63928
diff
changeset
|
1921 |
next |
0de4736dad8b
new theorems including the theory FurtherTopology
paulson <lp15@cam.ac.uk>
parents:
63928
diff
changeset
|
1922 |
case False |
0de4736dad8b
new theorems including the theory FurtherTopology
paulson <lp15@cam.ac.uk>
parents:
63928
diff
changeset
|
1923 |
then show ?thesis |
0de4736dad8b
new theorems including the theory FurtherTopology
paulson <lp15@cam.ac.uk>
parents:
63928
diff
changeset
|
1924 |
unfolding contractible_def nullhomotopic_from_sphere_extension |
71172 | 1925 |
using less_eq_real_def by auto |
64006
0de4736dad8b
new theorems including the theory FurtherTopology
paulson <lp15@cam.ac.uk>
parents:
63928
diff
changeset
|
1926 |
qed |
0de4736dad8b
new theorems including the theory FurtherTopology
paulson <lp15@cam.ac.uk>
parents:
63928
diff
changeset
|
1927 |
|
68617 | 1928 |
corollary connected_sphere_eq: |
64789
6440577e34ee
connectedness, circles not simply connected , punctured universe
paulson <lp15@cam.ac.uk>
parents:
64394
diff
changeset
|
1929 |
fixes a :: "'a :: euclidean_space" |
6440577e34ee
connectedness, circles not simply connected , punctured universe
paulson <lp15@cam.ac.uk>
parents:
64394
diff
changeset
|
1930 |
shows "connected(sphere a r) \<longleftrightarrow> 2 \<le> DIM('a) \<or> r \<le> 0" |
6440577e34ee
connectedness, circles not simply connected , punctured universe
paulson <lp15@cam.ac.uk>
parents:
64394
diff
changeset
|
1931 |
(is "?lhs = ?rhs") |
6440577e34ee
connectedness, circles not simply connected , punctured universe
paulson <lp15@cam.ac.uk>
parents:
64394
diff
changeset
|
1932 |
proof (cases r "0::real" rule: linorder_cases) |
6440577e34ee
connectedness, circles not simply connected , punctured universe
paulson <lp15@cam.ac.uk>
parents:
64394
diff
changeset
|
1933 |
case less |
6440577e34ee
connectedness, circles not simply connected , punctured universe
paulson <lp15@cam.ac.uk>
parents:
64394
diff
changeset
|
1934 |
then show ?thesis by auto |
6440577e34ee
connectedness, circles not simply connected , punctured universe
paulson <lp15@cam.ac.uk>
parents:
64394
diff
changeset
|
1935 |
next |
6440577e34ee
connectedness, circles not simply connected , punctured universe
paulson <lp15@cam.ac.uk>
parents:
64394
diff
changeset
|
1936 |
case equal |
6440577e34ee
connectedness, circles not simply connected , punctured universe
paulson <lp15@cam.ac.uk>
parents:
64394
diff
changeset
|
1937 |
then show ?thesis by auto |
6440577e34ee
connectedness, circles not simply connected , punctured universe
paulson <lp15@cam.ac.uk>
parents:
64394
diff
changeset
|
1938 |
next |
6440577e34ee
connectedness, circles not simply connected , punctured universe
paulson <lp15@cam.ac.uk>
parents:
64394
diff
changeset
|
1939 |
case greater |
6440577e34ee
connectedness, circles not simply connected , punctured universe
paulson <lp15@cam.ac.uk>
parents:
64394
diff
changeset
|
1940 |
show ?thesis |
6440577e34ee
connectedness, circles not simply connected , punctured universe
paulson <lp15@cam.ac.uk>
parents:
64394
diff
changeset
|
1941 |
proof |
6440577e34ee
connectedness, circles not simply connected , punctured universe
paulson <lp15@cam.ac.uk>
parents:
64394
diff
changeset
|
1942 |
assume L: ?lhs |
6440577e34ee
connectedness, circles not simply connected , punctured universe
paulson <lp15@cam.ac.uk>
parents:
64394
diff
changeset
|
1943 |
have "False" if 1: "DIM('a) = 1" |
6440577e34ee
connectedness, circles not simply connected , punctured universe
paulson <lp15@cam.ac.uk>
parents:
64394
diff
changeset
|
1944 |
proof - |
6440577e34ee
connectedness, circles not simply connected , punctured universe
paulson <lp15@cam.ac.uk>
parents:
64394
diff
changeset
|
1945 |
obtain x y where xy: "sphere a r = {x,y}" "x \<noteq> y" |
6440577e34ee
connectedness, circles not simply connected , punctured universe
paulson <lp15@cam.ac.uk>
parents:
64394
diff
changeset
|
1946 |
using sphere_1D_doubleton [OF 1 greater] |
6440577e34ee
connectedness, circles not simply connected , punctured universe
paulson <lp15@cam.ac.uk>
parents:
64394
diff
changeset
|
1947 |
by (metis dist_self greater insertI1 less_add_same_cancel1 mem_sphere mult_2 not_le zero_le_dist) |
6440577e34ee
connectedness, circles not simply connected , punctured universe
paulson <lp15@cam.ac.uk>
parents:
64394
diff
changeset
|
1948 |
then have "finite (sphere a r)" |
6440577e34ee
connectedness, circles not simply connected , punctured universe
paulson <lp15@cam.ac.uk>
parents:
64394
diff
changeset
|
1949 |
by auto |
68022 | 1950 |
with L \<open>r > 0\<close> xy show "False" |
1951 |
using connected_finite_iff_sing by auto |
|
64789
6440577e34ee
connectedness, circles not simply connected , punctured universe
paulson <lp15@cam.ac.uk>
parents:
64394
diff
changeset
|
1952 |
qed |
6440577e34ee
connectedness, circles not simply connected , punctured universe
paulson <lp15@cam.ac.uk>
parents:
64394
diff
changeset
|
1953 |
with greater show ?rhs |
6440577e34ee
connectedness, circles not simply connected , punctured universe
paulson <lp15@cam.ac.uk>
parents:
64394
diff
changeset
|
1954 |
by (metis DIM_ge_Suc0 One_nat_def Suc_1 le_antisym not_less_eq_eq) |
6440577e34ee
connectedness, circles not simply connected , punctured universe
paulson <lp15@cam.ac.uk>
parents:
64394
diff
changeset
|
1955 |
next |
6440577e34ee
connectedness, circles not simply connected , punctured universe
paulson <lp15@cam.ac.uk>
parents:
64394
diff
changeset
|
1956 |
assume ?rhs |
6440577e34ee
connectedness, circles not simply connected , punctured universe
paulson <lp15@cam.ac.uk>
parents:
64394
diff
changeset
|
1957 |
then show ?lhs |
6440577e34ee
connectedness, circles not simply connected , punctured universe
paulson <lp15@cam.ac.uk>
parents:
64394
diff
changeset
|
1958 |
using connected_sphere greater by auto |
6440577e34ee
connectedness, circles not simply connected , punctured universe
paulson <lp15@cam.ac.uk>
parents:
64394
diff
changeset
|
1959 |
qed |
6440577e34ee
connectedness, circles not simply connected , punctured universe
paulson <lp15@cam.ac.uk>
parents:
64394
diff
changeset
|
1960 |
qed |
6440577e34ee
connectedness, circles not simply connected , punctured universe
paulson <lp15@cam.ac.uk>
parents:
64394
diff
changeset
|
1961 |
|
68617 | 1962 |
corollary path_connected_sphere_eq: |
64789
6440577e34ee
connectedness, circles not simply connected , punctured universe
paulson <lp15@cam.ac.uk>
parents:
64394
diff
changeset
|
1963 |
fixes a :: "'a :: euclidean_space" |
6440577e34ee
connectedness, circles not simply connected , punctured universe
paulson <lp15@cam.ac.uk>
parents:
64394
diff
changeset
|
1964 |
shows "path_connected(sphere a r) \<longleftrightarrow> 2 \<le> DIM('a) \<or> r \<le> 0" |
6440577e34ee
connectedness, circles not simply connected , punctured universe
paulson <lp15@cam.ac.uk>
parents:
64394
diff
changeset
|
1965 |
(is "?lhs = ?rhs") |
6440577e34ee
connectedness, circles not simply connected , punctured universe
paulson <lp15@cam.ac.uk>
parents:
64394
diff
changeset
|
1966 |
proof |
6440577e34ee
connectedness, circles not simply connected , punctured universe
paulson <lp15@cam.ac.uk>
parents:
64394
diff
changeset
|
1967 |
assume ?lhs |
6440577e34ee
connectedness, circles not simply connected , punctured universe
paulson <lp15@cam.ac.uk>
parents:
64394
diff
changeset
|
1968 |
then show ?rhs |
6440577e34ee
connectedness, circles not simply connected , punctured universe
paulson <lp15@cam.ac.uk>
parents:
64394
diff
changeset
|
1969 |
using connected_sphere_eq path_connected_imp_connected by blast |
6440577e34ee
connectedness, circles not simply connected , punctured universe
paulson <lp15@cam.ac.uk>
parents:
64394
diff
changeset
|
1970 |
next |
6440577e34ee
connectedness, circles not simply connected , punctured universe
paulson <lp15@cam.ac.uk>
parents:
64394
diff
changeset
|
1971 |
assume R: ?rhs |
6440577e34ee
connectedness, circles not simply connected , punctured universe
paulson <lp15@cam.ac.uk>
parents:
64394
diff
changeset
|
1972 |
then show ?lhs |
6440577e34ee
connectedness, circles not simply connected , punctured universe
paulson <lp15@cam.ac.uk>
parents:
64394
diff
changeset
|
1973 |
by (auto simp: contractible_imp_path_connected contractible_sphere path_connected_sphere) |
6440577e34ee
connectedness, circles not simply connected , punctured universe
paulson <lp15@cam.ac.uk>
parents:
64394
diff
changeset
|
1974 |
qed |
6440577e34ee
connectedness, circles not simply connected , punctured universe
paulson <lp15@cam.ac.uk>
parents:
64394
diff
changeset
|
1975 |
|
64122 | 1976 |
proposition frontier_subset_retraction: |
1977 |
fixes S :: "'a::euclidean_space set" |
|
1978 |
assumes "bounded S" and fros: "frontier S \<subseteq> T" |
|
1979 |
and contf: "continuous_on (closure S) f" |
|
1980 |
and fim: "f ` S \<subseteq> T" |
|
1981 |
and fid: "\<And>x. x \<in> T \<Longrightarrow> f x = x" |
|
1982 |
shows "S \<subseteq> T" |
|
1983 |
proof (rule ccontr) |
|
1984 |
assume "\<not> S \<subseteq> T" |
|
1985 |
then obtain a where "a \<in> S" "a \<notin> T" by blast |
|
1986 |
define g where "g \<equiv> \<lambda>z. if z \<in> closure S then f z else z" |
|
1987 |
have "continuous_on (closure S \<union> closure(-S)) g" |
|
1988 |
unfolding g_def |
|
1989 |
apply (rule continuous_on_cases) |
|
71172 | 1990 |
using fros fid frontier_closures by (auto simp: contf) |
64122 | 1991 |
moreover have "closure S \<union> closure(- S) = UNIV" |
1992 |
using closure_Un by fastforce |
|
1993 |
ultimately have contg: "continuous_on UNIV g" by metis |
|
1994 |
obtain B where "0 < B" and B: "closure S \<subseteq> ball a B" |
|
1995 |
using \<open>bounded S\<close> bounded_subset_ballD by blast |
|
1996 |
have notga: "g x \<noteq> a" for x |
|
1997 |
unfolding g_def using fros fim \<open>a \<notin> T\<close> |
|
76786 | 1998 |
by (metis Un_iff \<open>a \<in> S\<close> closure_Un_frontier fid imageI subset_eq) |
64122 | 1999 |
define h where "h \<equiv> (\<lambda>y. a + (B / norm(y - a)) *\<^sub>R (y - a)) \<circ> g" |
2000 |
have "\<not> (frontier (cball a B) retract_of (cball a B))" |
|
2001 |
by (metis no_retraction_cball \<open>0 < B\<close>) |
|
2002 |
then have "\<And>k. \<not> retraction (cball a B) (frontier (cball a B)) k" |
|
2003 |
by (simp add: retract_of_def) |
|
2004 |
moreover have "retraction (cball a B) (frontier (cball a B)) h" |
|
2005 |
unfolding retraction_def |
|
2006 |
proof (intro conjI ballI) |
|
2007 |
show "frontier (cball a B) \<subseteq> cball a B" |
|
68022 | 2008 |
by force |
64122 | 2009 |
show "continuous_on (cball a B) h" |
2010 |
unfolding h_def |
|
68022 | 2011 |
by (intro continuous_intros) (use contg continuous_on_subset notga in auto) |
64122 | 2012 |
show "h ` cball a B \<subseteq> frontier (cball a B)" |
2013 |
using \<open>0 < B\<close> by (auto simp: h_def notga dist_norm) |
|
2014 |
show "\<And>x. x \<in> frontier (cball a B) \<Longrightarrow> h x = x" |
|
2015 |
apply (auto simp: h_def algebra_simps) |
|
2016 |
apply (simp add: vector_add_divide_simps notga) |
|
73932
fd21b4a93043
added opaque_combs and renamed hide_lams to opaque_lifting
desharna
parents:
73648
diff
changeset
|
2017 |
by (metis (no_types, opaque_lifting) B add.commute dist_commute dist_norm g_def mem_ball not_less_iff_gr_or_eq subset_eq) |
64122 | 2018 |
qed |
2019 |
ultimately show False by simp |
|
2020 |
qed |
|
2021 |
||
68617 | 2022 |
subsubsection \<open>Punctured affine hulls, etc\<close> |
2023 |
||
2024 |
lemma rel_frontier_deformation_retract_of_punctured_convex: |
|
63492
a662e8139804
More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents:
63469
diff
changeset
|
2025 |
fixes S :: "'a::euclidean_space set" |
a662e8139804
More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents:
63469
diff
changeset
|
2026 |
assumes "convex S" "convex T" "bounded S" |
a662e8139804
More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents:
63469
diff
changeset
|
2027 |
and arelS: "a \<in> rel_interior S" |
a662e8139804
More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents:
63469
diff
changeset
|
2028 |
and relS: "rel_frontier S \<subseteq> T" |
a662e8139804
More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents:
63469
diff
changeset
|
2029 |
and affS: "T \<subseteq> affine hull S" |
69986
f2d327275065
generalised homotopic_with to topologies; homotopic_with_canon is the old version
paulson <lp15@cam.ac.uk>
parents:
69945
diff
changeset
|
2030 |
obtains r where "homotopic_with_canon (\<lambda>x. True) (T - {a}) (T - {a}) id r" |
63492
a662e8139804
More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents:
63469
diff
changeset
|
2031 |
"retraction (T - {a}) (rel_frontier S) r" |
a662e8139804
More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents:
63469
diff
changeset
|
2032 |
proof - |
a662e8139804
More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents:
63469
diff
changeset
|
2033 |
have "\<exists>d. 0 < d \<and> (a + d *\<^sub>R l) \<in> rel_frontier S \<and> |
a662e8139804
More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents:
63469
diff
changeset
|
2034 |
(\<forall>e. 0 \<le> e \<and> e < d \<longrightarrow> (a + e *\<^sub>R l) \<in> rel_interior S)" |
a662e8139804
More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents:
63469
diff
changeset
|
2035 |
if "(a + l) \<in> affine hull S" "l \<noteq> 0" for l |
a662e8139804
More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents:
63469
diff
changeset
|
2036 |
apply (rule ray_to_rel_frontier [OF \<open>bounded S\<close> arelS]) |
a662e8139804
More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents:
63469
diff
changeset
|
2037 |
apply (rule that)+ |
a662e8139804
More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents:
63469
diff
changeset
|
2038 |
by metis |
a662e8139804
More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents:
63469
diff
changeset
|
2039 |
then obtain dd |
a662e8139804
More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents:
63469
diff
changeset
|
2040 |
where dd1: "\<And>l. \<lbrakk>(a + l) \<in> affine hull S; l \<noteq> 0\<rbrakk> \<Longrightarrow> 0 < dd l \<and> (a + dd l *\<^sub>R l) \<in> rel_frontier S" |
a662e8139804
More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents:
63469
diff
changeset
|
2041 |
and dd2: "\<And>l e. \<lbrakk>(a + l) \<in> affine hull S; e < dd l; 0 \<le> e; l \<noteq> 0\<rbrakk> |
a662e8139804
More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents:
63469
diff
changeset
|
2042 |
\<Longrightarrow> (a + e *\<^sub>R l) \<in> rel_interior S" |
a662e8139804
More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents:
63469
diff
changeset
|
2043 |
by metis+ |
a662e8139804
More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents:
63469
diff
changeset
|
2044 |
have aaffS: "a \<in> affine hull S" |
a662e8139804
More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents:
63469
diff
changeset
|
2045 |
by (meson arelS subsetD hull_inc rel_interior_subset) |
a662e8139804
More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents:
63469
diff
changeset
|
2046 |
have "((\<lambda>z. z - a) ` (affine hull S - {a})) = ((\<lambda>z. z - a) ` (affine hull S)) - {0}" |
68022 | 2047 |
by auto |
63492
a662e8139804
More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents:
63469
diff
changeset
|
2048 |
moreover have "continuous_on (((\<lambda>z. z - a) ` (affine hull S)) - {0}) (\<lambda>x. dd x *\<^sub>R x)" |
a662e8139804
More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents:
63469
diff
changeset
|
2049 |
proof (rule continuous_on_compact_surface_projection) |
a662e8139804
More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents:
63469
diff
changeset
|
2050 |
show "compact (rel_frontier ((\<lambda>z. z - a) ` S))" |
a662e8139804
More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents:
63469
diff
changeset
|
2051 |
by (simp add: \<open>bounded S\<close> bounded_translation_minus compact_rel_frontier_bounded) |
a662e8139804
More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents:
63469
diff
changeset
|
2052 |
have releq: "rel_frontier ((\<lambda>z. z - a) ` S) = (\<lambda>z. z - a) ` rel_frontier S" |
a662e8139804
More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents:
63469
diff
changeset
|
2053 |
using rel_frontier_translation [of "-a"] add.commute by simp |
68022 | 2054 |
also have "\<dots> \<subseteq> (\<lambda>z. z - a) ` (affine hull S) - {0}" |
63492
a662e8139804
More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents:
63469
diff
changeset
|
2055 |
using rel_frontier_affine_hull arelS rel_frontier_def by fastforce |
a662e8139804
More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents:
63469
diff
changeset
|
2056 |
finally show "rel_frontier ((\<lambda>z. z - a) ` S) \<subseteq> (\<lambda>z. z - a) ` (affine hull S) - {0}" . |
a662e8139804
More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents:
63469
diff
changeset
|
2057 |
show "cone ((\<lambda>z. z - a) ` (affine hull S))" |
68022 | 2058 |
by (rule subspace_imp_cone) |
2059 |
(use aaffS in \<open>simp add: subspace_affine image_comp o_def affine_translation_aux [of a]\<close>) |
|
63492
a662e8139804
More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents:
63469
diff
changeset
|
2060 |
show "(0 < k \<and> k *\<^sub>R x \<in> rel_frontier ((\<lambda>z. z - a) ` S)) \<longleftrightarrow> (dd x = k)" |
a662e8139804
More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents:
63469
diff
changeset
|
2061 |
if x: "x \<in> (\<lambda>z. z - a) ` (affine hull S) - {0}" for k x |
a662e8139804
More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents:
63469
diff
changeset
|
2062 |
proof |
a662e8139804
More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents:
63469
diff
changeset
|
2063 |
show "dd x = k \<Longrightarrow> 0 < k \<and> k *\<^sub>R x \<in> rel_frontier ((\<lambda>z. z - a) ` S)" |
a662e8139804
More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents:
63469
diff
changeset
|
2064 |
using dd1 [of x] that image_iff by (fastforce simp add: releq) |
a662e8139804
More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents:
63469
diff
changeset
|
2065 |
next |
a662e8139804
More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents:
63469
diff
changeset
|
2066 |
assume k: "0 < k \<and> k *\<^sub>R x \<in> rel_frontier ((\<lambda>z. z - a) ` S)" |
a662e8139804
More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents:
63469
diff
changeset
|
2067 |
have False if "dd x < k" |
a662e8139804
More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents:
63469
diff
changeset
|
2068 |
proof - |
a662e8139804
More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents:
63469
diff
changeset
|
2069 |
have "k \<noteq> 0" "a + k *\<^sub>R x \<in> closure S" |
a662e8139804
More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents:
63469
diff
changeset
|
2070 |
using k closure_translation [of "-a"] |
69661 | 2071 |
by (auto simp: rel_frontier_def cong: image_cong_simp) |
63492
a662e8139804
More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents:
63469
diff
changeset
|
2072 |
then have segsub: "open_segment a (a + k *\<^sub>R x) \<subseteq> rel_interior S" |
a662e8139804
More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents:
63469
diff
changeset
|
2073 |
by (metis rel_interior_closure_convex_segment [OF \<open>convex S\<close> arelS]) |
a662e8139804
More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents:
63469
diff
changeset
|
2074 |
have "x \<noteq> 0" and xaffS: "a + x \<in> affine hull S" |
68022 | 2075 |
using x by auto |
63492
a662e8139804
More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents:
63469
diff
changeset
|
2076 |
then have "0 < dd x" and inS: "a + dd x *\<^sub>R x \<in> rel_frontier S" |
a662e8139804
More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents:
63469
diff
changeset
|
2077 |
using dd1 by auto |
a662e8139804
More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents:
63469
diff
changeset
|
2078 |
moreover have "a + dd x *\<^sub>R x \<in> open_segment a (a + k *\<^sub>R x)" |
a662e8139804
More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents:
63469
diff
changeset
|
2079 |
using k \<open>x \<noteq> 0\<close> \<open>0 < dd x\<close> |
a662e8139804
More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents:
63469
diff
changeset
|
2080 |
apply (simp add: in_segment) |
a662e8139804
More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents:
63469
diff
changeset
|
2081 |
apply (rule_tac x = "dd x / k" in exI) |
76786 | 2082 |
apply (simp add: that vector_add_divide_simps algebra_simps) |
63492
a662e8139804
More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents:
63469
diff
changeset
|
2083 |
done |
a662e8139804
More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents:
63469
diff
changeset
|
2084 |
ultimately show ?thesis |
68022 | 2085 |
using segsub by (auto simp: rel_frontier_def) |
63492
a662e8139804
More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents:
63469
diff
changeset
|
2086 |
qed |
a662e8139804
More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents:
63469
diff
changeset
|
2087 |
moreover have False if "k < dd x" |
a662e8139804
More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents:
63469
diff
changeset
|
2088 |
using x k that rel_frontier_def |
a662e8139804
More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents:
63469
diff
changeset
|
2089 |
by (fastforce simp: algebra_simps releq dest!: dd2) |
a662e8139804
More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents:
63469
diff
changeset
|
2090 |
ultimately show "dd x = k" |
a662e8139804
More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents:
63469
diff
changeset
|
2091 |
by fastforce |
a662e8139804
More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents:
63469
diff
changeset
|
2092 |
qed |
a662e8139804
More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents:
63469
diff
changeset
|
2093 |
qed |
a662e8139804
More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents:
63469
diff
changeset
|
2094 |
ultimately have *: "continuous_on ((\<lambda>z. z - a) ` (affine hull S - {a})) (\<lambda>x. dd x *\<^sub>R x)" |
a662e8139804
More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents:
63469
diff
changeset
|
2095 |
by auto |
a662e8139804
More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents:
63469
diff
changeset
|
2096 |
have "continuous_on (affine hull S - {a}) ((\<lambda>x. a + dd x *\<^sub>R x) \<circ> (\<lambda>z. z - a))" |
a662e8139804
More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents:
63469
diff
changeset
|
2097 |
by (intro * continuous_intros continuous_on_compose) |
a662e8139804
More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents:
63469
diff
changeset
|
2098 |
with affS have contdd: "continuous_on (T - {a}) ((\<lambda>x. a + dd x *\<^sub>R x) \<circ> (\<lambda>z. z - a))" |
68022 | 2099 |
by (blast intro: continuous_on_subset) |
63492
a662e8139804
More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents:
63469
diff
changeset
|
2100 |
show ?thesis |
a662e8139804
More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents:
63469
diff
changeset
|
2101 |
proof |
69986
f2d327275065
generalised homotopic_with to topologies; homotopic_with_canon is the old version
paulson <lp15@cam.ac.uk>
parents:
69945
diff
changeset
|
2102 |
show "homotopic_with_canon (\<lambda>x. True) (T - {a}) (T - {a}) id (\<lambda>x. a + dd (x - a) *\<^sub>R (x - a))" |
63492
a662e8139804
More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents:
63469
diff
changeset
|
2103 |
proof (rule homotopic_with_linear) |
a662e8139804
More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents:
63469
diff
changeset
|
2104 |
show "continuous_on (T - {a}) id" |
a662e8139804
More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents:
63469
diff
changeset
|
2105 |
by (intro continuous_intros continuous_on_compose) |
a662e8139804
More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents:
63469
diff
changeset
|
2106 |
show "continuous_on (T - {a}) (\<lambda>x. a + dd (x - a) *\<^sub>R (x - a))" |
a662e8139804
More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents:
63469
diff
changeset
|
2107 |
using contdd by (simp add: o_def) |
a662e8139804
More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents:
63469
diff
changeset
|
2108 |
show "closed_segment (id x) (a + dd (x - a) *\<^sub>R (x - a)) \<subseteq> T - {a}" |
a662e8139804
More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents:
63469
diff
changeset
|
2109 |
if "x \<in> T - {a}" for x |
a662e8139804
More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents:
63469
diff
changeset
|
2110 |
proof (clarsimp simp: in_segment, intro conjI) |
a662e8139804
More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents:
63469
diff
changeset
|
2111 |
fix u::real assume u: "0 \<le> u" "u \<le> 1" |
68022 | 2112 |
have "a + dd (x - a) *\<^sub>R (x - a) \<in> T" |
2113 |
by (metis DiffD1 DiffD2 add.commute add.right_neutral affS dd1 diff_add_cancel relS singletonI subsetCE that) |
|
2114 |
then show "(1 - u) *\<^sub>R x + u *\<^sub>R (a + dd (x - a) *\<^sub>R (x - a)) \<in> T" |
|
2115 |
using convexD [OF \<open>convex T\<close>] that u by simp |
|
63492
a662e8139804
More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents:
63469
diff
changeset
|
2116 |
have iff: "(1 - u) *\<^sub>R x + u *\<^sub>R (a + d *\<^sub>R (x - a)) = a \<longleftrightarrow> |
a662e8139804
More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents:
63469
diff
changeset
|
2117 |
(1 - u + u * d) *\<^sub>R (x - a) = 0" for d |
a662e8139804
More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents:
63469
diff
changeset
|
2118 |
by (auto simp: algebra_simps) |
a662e8139804
More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents:
63469
diff
changeset
|
2119 |
have "x \<in> T" "x \<noteq> a" using that by auto |
a662e8139804
More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents:
63469
diff
changeset
|
2120 |
then have axa: "a + (x - a) \<in> affine hull S" |
69712 | 2121 |
by (metis (no_types) add.commute affS diff_add_cancel rev_subsetD) |
63492
a662e8139804
More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents:
63469
diff
changeset
|
2122 |
then have "\<not> dd (x - a) \<le> 0 \<and> a + dd (x - a) *\<^sub>R (x - a) \<in> rel_frontier S" |
a662e8139804
More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents:
63469
diff
changeset
|
2123 |
using \<open>x \<noteq> a\<close> dd1 by fastforce |
a662e8139804
More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents:
63469
diff
changeset
|
2124 |
with \<open>x \<noteq> a\<close> show "(1 - u) *\<^sub>R x + u *\<^sub>R (a + dd (x - a) *\<^sub>R (x - a)) \<noteq> a" |
76786 | 2125 |
using less_eq_real_def mult_le_0_iff not_less u by (fastforce simp: iff) |
63492
a662e8139804
More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents:
63469
diff
changeset
|
2126 |
qed |
a662e8139804
More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents:
63469
diff
changeset
|
2127 |
qed |
a662e8139804
More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents:
63469
diff
changeset
|
2128 |
show "retraction (T - {a}) (rel_frontier S) (\<lambda>x. a + dd (x - a) *\<^sub>R (x - a))" |
a662e8139804
More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents:
63469
diff
changeset
|
2129 |
proof (simp add: retraction_def, intro conjI ballI) |
a662e8139804
More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents:
63469
diff
changeset
|
2130 |
show "rel_frontier S \<subseteq> T - {a}" |
a662e8139804
More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents:
63469
diff
changeset
|
2131 |
using arelS relS rel_frontier_def by fastforce |
a662e8139804
More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents:
63469
diff
changeset
|
2132 |
show "continuous_on (T - {a}) (\<lambda>x. a + dd (x - a) *\<^sub>R (x - a))" |
a662e8139804
More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents:
63469
diff
changeset
|
2133 |
using contdd by (simp add: o_def) |
a662e8139804
More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents:
63469
diff
changeset
|
2134 |
show "(\<lambda>x. a + dd (x - a) *\<^sub>R (x - a)) ` (T - {a}) \<subseteq> rel_frontier S" |
a662e8139804
More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents:
63469
diff
changeset
|
2135 |
apply (auto simp: rel_frontier_def) |
a662e8139804
More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents:
63469
diff
changeset
|
2136 |
apply (metis Diff_subset add.commute affS dd1 diff_add_cancel eq_iff_diff_eq_0 rel_frontier_def subset_iff) |
a662e8139804
More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents:
63469
diff
changeset
|
2137 |
by (metis DiffE add.commute affS dd1 diff_add_cancel eq_iff_diff_eq_0 rel_frontier_def rev_subsetD) |
a662e8139804
More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents:
63469
diff
changeset
|
2138 |
show "a + dd (x - a) *\<^sub>R (x - a) = x" if x: "x \<in> rel_frontier S" for x |
a662e8139804
More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents:
63469
diff
changeset
|
2139 |
proof - |
a662e8139804
More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents:
63469
diff
changeset
|
2140 |
have "x \<noteq> a" |
68022 | 2141 |
using that arelS by (auto simp: rel_frontier_def) |
63492
a662e8139804
More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents:
63469
diff
changeset
|
2142 |
have False if "dd (x - a) < 1" |
a662e8139804
More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents:
63469
diff
changeset
|
2143 |
proof - |
a662e8139804
More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents:
63469
diff
changeset
|
2144 |
have "x \<in> closure S" |
a662e8139804
More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents:
63469
diff
changeset
|
2145 |
using x by (auto simp: rel_frontier_def) |
a662e8139804
More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents:
63469
diff
changeset
|
2146 |
then have segsub: "open_segment a x \<subseteq> rel_interior S" |
a662e8139804
More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents:
63469
diff
changeset
|
2147 |
by (metis rel_interior_closure_convex_segment [OF \<open>convex S\<close> arelS]) |
a662e8139804
More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents:
63469
diff
changeset
|
2148 |
have xaffS: "x \<in> affine hull S" |
a662e8139804
More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents:
63469
diff
changeset
|
2149 |
using affS relS x by auto |
a662e8139804
More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents:
63469
diff
changeset
|
2150 |
then have "0 < dd (x - a)" and inS: "a + dd (x - a) *\<^sub>R (x - a) \<in> rel_frontier S" |
68022 | 2151 |
using dd1 by (auto simp: \<open>x \<noteq> a\<close>) |
63492
a662e8139804
More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents:
63469
diff
changeset
|
2152 |
moreover have "a + dd (x - a) *\<^sub>R (x - a) \<in> open_segment a x" |
a662e8139804
More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents:
63469
diff
changeset
|
2153 |
using \<open>x \<noteq> a\<close> \<open>0 < dd (x - a)\<close> |
a662e8139804
More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents:
63469
diff
changeset
|
2154 |
apply (simp add: in_segment) |
a662e8139804
More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents:
63469
diff
changeset
|
2155 |
apply (rule_tac x = "dd (x - a)" in exI) |
a662e8139804
More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents:
63469
diff
changeset
|
2156 |
apply (simp add: algebra_simps that) |
a662e8139804
More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents:
63469
diff
changeset
|
2157 |
done |
a662e8139804
More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents:
63469
diff
changeset
|
2158 |
ultimately show ?thesis |
68022 | 2159 |
using segsub by (auto simp: rel_frontier_def) |
63492
a662e8139804
More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents:
63469
diff
changeset
|
2160 |
qed |
a662e8139804
More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents:
63469
diff
changeset
|
2161 |
moreover have False if "1 < dd (x - a)" |
a662e8139804
More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents:
63469
diff
changeset
|
2162 |
using x that dd2 [of "x - a" 1] \<open>x \<noteq> a\<close> closure_affine_hull |
a662e8139804
More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents:
63469
diff
changeset
|
2163 |
by (auto simp: rel_frontier_def) |
67443
3abf6a722518
standardized towards new-style formal comments: isabelle update_comments;
wenzelm
parents:
67399
diff
changeset
|
2164 |
ultimately have "dd (x - a) = 1" \<comment> \<open>similar to another proof above\<close> |
63492
a662e8139804
More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents:
63469
diff
changeset
|
2165 |
by fastforce |
a662e8139804
More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents:
63469
diff
changeset
|
2166 |
with that show ?thesis |
a662e8139804
More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents:
63469
diff
changeset
|
2167 |
by (simp add: rel_frontier_def) |
a662e8139804
More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents:
63469
diff
changeset
|
2168 |
qed |
a662e8139804
More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents:
63469
diff
changeset
|
2169 |
qed |
a662e8139804
More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents:
63469
diff
changeset
|
2170 |
qed |
a662e8139804
More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents:
63469
diff
changeset
|
2171 |
qed |
a662e8139804
More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents:
63469
diff
changeset
|
2172 |
|
a662e8139804
More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents:
63469
diff
changeset
|
2173 |
corollary rel_frontier_retract_of_punctured_affine_hull: |
a662e8139804
More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents:
63469
diff
changeset
|
2174 |
fixes S :: "'a::euclidean_space set" |
a662e8139804
More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents:
63469
diff
changeset
|
2175 |
assumes "bounded S" "convex S" "a \<in> rel_interior S" |
a662e8139804
More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents:
63469
diff
changeset
|
2176 |
shows "rel_frontier S retract_of (affine hull S - {a})" |
76786 | 2177 |
by (meson assms convex_affine_hull dual_order.refl rel_frontier_affine_hull |
2178 |
rel_frontier_deformation_retract_of_punctured_convex retract_of_def) |
|
63492
a662e8139804
More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents:
63469
diff
changeset
|
2179 |
|
a662e8139804
More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents:
63469
diff
changeset
|
2180 |
corollary rel_boundary_retract_of_punctured_affine_hull: |
a662e8139804
More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents:
63469
diff
changeset
|
2181 |
fixes S :: "'a::euclidean_space set" |
a662e8139804
More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents:
63469
diff
changeset
|
2182 |
assumes "compact S" "convex S" "a \<in> rel_interior S" |
a662e8139804
More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents:
63469
diff
changeset
|
2183 |
shows "(S - rel_interior S) retract_of (affine hull S - {a})" |
a662e8139804
More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents:
63469
diff
changeset
|
2184 |
by (metis assms closure_closed compact_eq_bounded_closed rel_frontier_def |
a662e8139804
More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents:
63469
diff
changeset
|
2185 |
rel_frontier_retract_of_punctured_affine_hull) |
a662e8139804
More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents:
63469
diff
changeset
|
2186 |
|
64789
6440577e34ee
connectedness, circles not simply connected , punctured universe
paulson <lp15@cam.ac.uk>
parents:
64394
diff
changeset
|
2187 |
lemma homotopy_eqv_rel_frontier_punctured_convex: |
6440577e34ee
connectedness, circles not simply connected , punctured universe
paulson <lp15@cam.ac.uk>
parents:
64394
diff
changeset
|
2188 |
fixes S :: "'a::euclidean_space set" |
6440577e34ee
connectedness, circles not simply connected , punctured universe
paulson <lp15@cam.ac.uk>
parents:
64394
diff
changeset
|
2189 |
assumes "convex S" "bounded S" "a \<in> rel_interior S" "convex T" "rel_frontier S \<subseteq> T" "T \<subseteq> affine hull S" |
6440577e34ee
connectedness, circles not simply connected , punctured universe
paulson <lp15@cam.ac.uk>
parents:
64394
diff
changeset
|
2190 |
shows "(rel_frontier S) homotopy_eqv (T - {a})" |
76786 | 2191 |
by (meson assms deformation_retract_imp_homotopy_eqv homotopy_equivalent_space_sym |
2192 |
rel_frontier_deformation_retract_of_punctured_convex[of S T]) |
|
64789
6440577e34ee
connectedness, circles not simply connected , punctured universe
paulson <lp15@cam.ac.uk>
parents:
64394
diff
changeset
|
2193 |
|
6440577e34ee
connectedness, circles not simply connected , punctured universe
paulson <lp15@cam.ac.uk>
parents:
64394
diff
changeset
|
2194 |
lemma homotopy_eqv_rel_frontier_punctured_affine_hull: |
6440577e34ee
connectedness, circles not simply connected , punctured universe
paulson <lp15@cam.ac.uk>
parents:
64394
diff
changeset
|
2195 |
fixes S :: "'a::euclidean_space set" |
6440577e34ee
connectedness, circles not simply connected , punctured universe
paulson <lp15@cam.ac.uk>
parents:
64394
diff
changeset
|
2196 |
assumes "convex S" "bounded S" "a \<in> rel_interior S" |
6440577e34ee
connectedness, circles not simply connected , punctured universe
paulson <lp15@cam.ac.uk>
parents:
64394
diff
changeset
|
2197 |
shows "(rel_frontier S) homotopy_eqv (affine hull S - {a})" |
76786 | 2198 |
by (simp add: assms homotopy_eqv_rel_frontier_punctured_convex rel_frontier_affine_hull) |
64789
6440577e34ee
connectedness, circles not simply connected , punctured universe
paulson <lp15@cam.ac.uk>
parents:
64394
diff
changeset
|
2199 |
|
64394 | 2200 |
lemma path_connected_sphere_gen: |
2201 |
assumes "convex S" "bounded S" "aff_dim S \<noteq> 1" |
|
2202 |
shows "path_connected(rel_frontier S)" |
|
76786 | 2203 |
proof - |
2204 |
have "convex (closure S)" |
|
2205 |
using assms by auto |
|
64394 | 2206 |
then show ?thesis |
76786 | 2207 |
by (metis Diff_empty aff_dim_affine_hull assms convex_affine_hull convex_imp_path_connected equals0I |
2208 |
path_connected_punctured_convex rel_frontier_def rel_frontier_retract_of_punctured_affine_hull retract_of_path_connected) |
|
64394 | 2209 |
qed |
2210 |
||
2211 |
lemma connected_sphere_gen: |
|
2212 |
assumes "convex S" "bounded S" "aff_dim S \<noteq> 1" |
|
2213 |
shows "connected(rel_frontier S)" |
|
2214 |
by (simp add: assms path_connected_imp_connected path_connected_sphere_gen) |
|
2215 |
||
68617 | 2216 |
subsubsection\<open>Borsuk-style characterization of separation\<close> |
63301 | 2217 |
|
2218 |
lemma continuous_on_Borsuk_map: |
|
2219 |
"a \<notin> s \<Longrightarrow> continuous_on s (\<lambda>x. inverse(norm (x - a)) *\<^sub>R (x - a))" |
|
2220 |
by (rule continuous_intros | force)+ |
|
2221 |
||
2222 |
lemma Borsuk_map_into_sphere: |
|
2223 |
"(\<lambda>x. inverse(norm (x - a)) *\<^sub>R (x - a)) ` s \<subseteq> sphere 0 1 \<longleftrightarrow> (a \<notin> s)" |
|
2224 |
by auto (metis eq_iff_diff_eq_0 left_inverse norm_eq_zero) |
|
2225 |
||
2226 |
lemma Borsuk_maps_homotopic_in_path_component: |
|
2227 |
assumes "path_component (- s) a b" |
|
69986
f2d327275065
generalised homotopic_with to topologies; homotopic_with_canon is the old version
paulson <lp15@cam.ac.uk>
parents:
69945
diff
changeset
|
2228 |
shows "homotopic_with_canon (\<lambda>x. True) s (sphere 0 1) |
63301 | 2229 |
(\<lambda>x. inverse(norm(x - a)) *\<^sub>R (x - a)) |
2230 |
(\<lambda>x. inverse(norm(x - b)) *\<^sub>R (x - b))" |
|
2231 |
proof - |
|
2232 |
obtain g where "path g" "path_image g \<subseteq> -s" "pathstart g = a" "pathfinish g = b" |
|
2233 |
using assms by (auto simp: path_component_def) |
|
2234 |
then show ?thesis |
|
2235 |
apply (simp add: path_def path_image_def pathstart_def pathfinish_def homotopic_with_def) |
|
68022 | 2236 |
apply (rule_tac x = "\<lambda>z. inverse(norm(snd z - (g \<circ> fst)z)) *\<^sub>R (snd z - (g \<circ> fst)z)" in exI) |
76786 | 2237 |
apply (rule conjI continuous_intros | erule continuous_on_subset | fastforce simp: divide_simps sphere_def)+ |
63301 | 2238 |
done |
2239 |
qed |
|
2240 |
||
2241 |
lemma non_extensible_Borsuk_map: |
|
2242 |
fixes a :: "'a :: euclidean_space" |
|
2243 |
assumes "compact s" and cin: "c \<in> components(- s)" and boc: "bounded c" and "a \<in> c" |
|
69508 | 2244 |
shows "\<not> (\<exists>g. continuous_on (s \<union> c) g \<and> |
63301 | 2245 |
g ` (s \<union> c) \<subseteq> sphere 0 1 \<and> |
2246 |
(\<forall>x \<in> s. g x = inverse(norm(x - a)) *\<^sub>R (x - a)))" |
|
2247 |
proof - |
|
2248 |
have "closed s" using assms by (simp add: compact_imp_closed) |
|
2249 |
have "c \<subseteq> -s" |
|
2250 |
using assms by (simp add: in_components_subset) |
|
2251 |
with \<open>a \<in> c\<close> have "a \<notin> s" by blast |
|
2252 |
then have ceq: "c = connected_component_set (- s) a" |
|
2253 |
by (metis \<open>a \<in> c\<close> cin components_iff connected_component_eq) |
|
2254 |
then have "bounded (s \<union> connected_component_set (- s) a)" |
|
2255 |
using \<open>compact s\<close> boc compact_imp_bounded by auto |
|
2256 |
with bounded_subset_ballD obtain r where "0 < r" and r: "(s \<union> connected_component_set (- s) a) \<subseteq> ball a r" |
|
2257 |
by blast |
|
2258 |
{ fix g |
|
2259 |
assume "continuous_on (s \<union> c) g" |
|
2260 |
"g ` (s \<union> c) \<subseteq> sphere 0 1" |
|
2261 |
and [simp]: "\<And>x. x \<in> s \<Longrightarrow> g x = (x - a) /\<^sub>R norm (x - a)" |
|
2262 |
then have [simp]: "\<And>x. x \<in> s \<union> c \<Longrightarrow> norm (g x) = 1" |
|
2263 |
by force |
|
2264 |
have cb_eq: "cball a r = (s \<union> connected_component_set (- s) a) \<union> |
|
2265 |
(cball a r - connected_component_set (- s) a)" |
|
2266 |
using ball_subset_cball [of a r] r by auto |
|
2267 |
have cont1: "continuous_on (s \<union> connected_component_set (- s) a) |
|
2268 |
(\<lambda>x. a + r *\<^sub>R g x)" |
|
76786 | 2269 |
using \<open>continuous_on (s \<union> c) g\<close> ceq |
2270 |
by (intro continuous_intros) blast |
|
63301 | 2271 |
have cont2: "continuous_on (cball a r - connected_component_set (- s) a) |
2272 |
(\<lambda>x. a + r *\<^sub>R ((x - a) /\<^sub>R norm (x - a)))" |
|
2273 |
by (rule continuous_intros | force simp: \<open>a \<notin> s\<close>)+ |
|
2274 |
have 1: "continuous_on (cball a r) |
|
2275 |
(\<lambda>x. if connected_component (- s) a x |
|
2276 |
then a + r *\<^sub>R g x |
|
2277 |
else a + r *\<^sub>R ((x - a) /\<^sub>R norm (x - a)))" |
|
2278 |
apply (subst cb_eq) |
|
2279 |
apply (rule continuous_on_cases [OF _ _ cont1 cont2]) |
|
76786 | 2280 |
using \<open>closed s\<close> ceq cin |
2281 |
by (force simp: closed_Diff open_Compl closed_Un_complement_component open_connected_component)+ |
|
63301 | 2282 |
have 2: "(\<lambda>x. a + r *\<^sub>R g x) ` (cball a r \<inter> connected_component_set (- s) a) |
2283 |
\<subseteq> sphere a r " |
|
2284 |
using \<open>0 < r\<close> by (force simp: dist_norm ceq) |
|
2285 |
have "retraction (cball a r) (sphere a r) |
|
2286 |
(\<lambda>x. if x \<in> connected_component_set (- s) a |
|
2287 |
then a + r *\<^sub>R g x |
|
2288 |
else a + r *\<^sub>R ((x - a) /\<^sub>R norm (x - a)))" |
|
2289 |
using \<open>0 < r\<close> |
|
2290 |
apply (simp add: retraction_def dist_norm 1 2, safe) |
|
2291 |
apply (force simp: dist_norm abs_if mult_less_0_iff divide_simps \<open>a \<notin> s\<close>) |
|
2292 |
using r |
|
2293 |
by (auto simp: dist_norm norm_minus_commute) |
|
2294 |
then have False |
|
2295 |
using no_retraction_cball |
|
2296 |
[OF \<open>0 < r\<close>, of a, unfolded retract_of_def, simplified, rule_format, |
|
2297 |
of "\<lambda>x. if x \<in> connected_component_set (- s) a |
|
2298 |
then a + r *\<^sub>R g x |
|
2299 |
else a + r *\<^sub>R inverse(norm(x - a)) *\<^sub>R (x - a)"] |
|
2300 |
by blast |
|
2301 |
} |
|
2302 |
then show ?thesis |
|
2303 |
by blast |
|
2304 |
qed |
|
2305 |
||
70620
f95193669ad7
removed Brouwer_Fixpoint from imports of Derivative
immler
parents:
70136
diff
changeset
|
2306 |
subsubsection \<open>Proving surjectivity via Brouwer fixpoint theorem\<close> |
f95193669ad7
removed Brouwer_Fixpoint from imports of Derivative
immler
parents:
70136
diff
changeset
|
2307 |
|
f95193669ad7
removed Brouwer_Fixpoint from imports of Derivative
immler
parents:
70136
diff
changeset
|
2308 |
lemma brouwer_surjective: |
f95193669ad7
removed Brouwer_Fixpoint from imports of Derivative
immler
parents:
70136
diff
changeset
|
2309 |
fixes f :: "'n::euclidean_space \<Rightarrow> 'n" |
f95193669ad7
removed Brouwer_Fixpoint from imports of Derivative
immler
parents:
70136
diff
changeset
|
2310 |
assumes "compact T" |
f95193669ad7
removed Brouwer_Fixpoint from imports of Derivative
immler
parents:
70136
diff
changeset
|
2311 |
and "convex T" |
f95193669ad7
removed Brouwer_Fixpoint from imports of Derivative
immler
parents:
70136
diff
changeset
|
2312 |
and "T \<noteq> {}" |
f95193669ad7
removed Brouwer_Fixpoint from imports of Derivative
immler
parents:
70136
diff
changeset
|
2313 |
and "continuous_on T f" |
f95193669ad7
removed Brouwer_Fixpoint from imports of Derivative
immler
parents:
70136
diff
changeset
|
2314 |
and "\<And>x y. \<lbrakk>x\<in>S; y\<in>T\<rbrakk> \<Longrightarrow> x + (y - f y) \<in> T" |
f95193669ad7
removed Brouwer_Fixpoint from imports of Derivative
immler
parents:
70136
diff
changeset
|
2315 |
and "x \<in> S" |
f95193669ad7
removed Brouwer_Fixpoint from imports of Derivative
immler
parents:
70136
diff
changeset
|
2316 |
shows "\<exists>y\<in>T. f y = x" |
f95193669ad7
removed Brouwer_Fixpoint from imports of Derivative
immler
parents:
70136
diff
changeset
|
2317 |
proof - |
f95193669ad7
removed Brouwer_Fixpoint from imports of Derivative
immler
parents:
70136
diff
changeset
|
2318 |
have *: "\<And>x y. f y = x \<longleftrightarrow> x + (y - f y) = y" |
f95193669ad7
removed Brouwer_Fixpoint from imports of Derivative
immler
parents:
70136
diff
changeset
|
2319 |
by (auto simp add: algebra_simps) |
f95193669ad7
removed Brouwer_Fixpoint from imports of Derivative
immler
parents:
70136
diff
changeset
|
2320 |
show ?thesis |
f95193669ad7
removed Brouwer_Fixpoint from imports of Derivative
immler
parents:
70136
diff
changeset
|
2321 |
unfolding * |
f95193669ad7
removed Brouwer_Fixpoint from imports of Derivative
immler
parents:
70136
diff
changeset
|
2322 |
apply (rule brouwer[OF assms(1-3), of "\<lambda>y. x + (y - f y)"]) |
f95193669ad7
removed Brouwer_Fixpoint from imports of Derivative
immler
parents:
70136
diff
changeset
|
2323 |
apply (intro continuous_intros) |
f95193669ad7
removed Brouwer_Fixpoint from imports of Derivative
immler
parents:
70136
diff
changeset
|
2324 |
using assms |
f95193669ad7
removed Brouwer_Fixpoint from imports of Derivative
immler
parents:
70136
diff
changeset
|
2325 |
apply auto |
f95193669ad7
removed Brouwer_Fixpoint from imports of Derivative
immler
parents:
70136
diff
changeset
|
2326 |
done |
f95193669ad7
removed Brouwer_Fixpoint from imports of Derivative
immler
parents:
70136
diff
changeset
|
2327 |
qed |
f95193669ad7
removed Brouwer_Fixpoint from imports of Derivative
immler
parents:
70136
diff
changeset
|
2328 |
|
f95193669ad7
removed Brouwer_Fixpoint from imports of Derivative
immler
parents:
70136
diff
changeset
|
2329 |
lemma brouwer_surjective_cball: |
f95193669ad7
removed Brouwer_Fixpoint from imports of Derivative
immler
parents:
70136
diff
changeset
|
2330 |
fixes f :: "'n::euclidean_space \<Rightarrow> 'n" |
f95193669ad7
removed Brouwer_Fixpoint from imports of Derivative
immler
parents:
70136
diff
changeset
|
2331 |
assumes "continuous_on (cball a e) f" |
f95193669ad7
removed Brouwer_Fixpoint from imports of Derivative
immler
parents:
70136
diff
changeset
|
2332 |
and "e > 0" |
f95193669ad7
removed Brouwer_Fixpoint from imports of Derivative
immler
parents:
70136
diff
changeset
|
2333 |
and "x \<in> S" |
f95193669ad7
removed Brouwer_Fixpoint from imports of Derivative
immler
parents:
70136
diff
changeset
|
2334 |
and "\<And>x y. \<lbrakk>x\<in>S; y\<in>cball a e\<rbrakk> \<Longrightarrow> x + (y - f y) \<in> cball a e" |
f95193669ad7
removed Brouwer_Fixpoint from imports of Derivative
immler
parents:
70136
diff
changeset
|
2335 |
shows "\<exists>y\<in>cball a e. f y = x" |
76786 | 2336 |
by (smt (verit, best) assms brouwer_surjective cball_eq_empty compact_cball convex_cball) |
70620
f95193669ad7
removed Brouwer_Fixpoint from imports of Derivative
immler
parents:
70136
diff
changeset
|
2337 |
|
f95193669ad7
removed Brouwer_Fixpoint from imports of Derivative
immler
parents:
70136
diff
changeset
|
2338 |
subsubsection \<open>Inverse function theorem\<close> |
f95193669ad7
removed Brouwer_Fixpoint from imports of Derivative
immler
parents:
70136
diff
changeset
|
2339 |
|
f95193669ad7
removed Brouwer_Fixpoint from imports of Derivative
immler
parents:
70136
diff
changeset
|
2340 |
text \<open>See Sussmann: "Multidifferential calculus", Theorem 2.1.1\<close> |
f95193669ad7
removed Brouwer_Fixpoint from imports of Derivative
immler
parents:
70136
diff
changeset
|
2341 |
|
f95193669ad7
removed Brouwer_Fixpoint from imports of Derivative
immler
parents:
70136
diff
changeset
|
2342 |
lemma sussmann_open_mapping: |
f95193669ad7
removed Brouwer_Fixpoint from imports of Derivative
immler
parents:
70136
diff
changeset
|
2343 |
fixes f :: "'a::real_normed_vector \<Rightarrow> 'b::euclidean_space" |
f95193669ad7
removed Brouwer_Fixpoint from imports of Derivative
immler
parents:
70136
diff
changeset
|
2344 |
assumes "open S" |
f95193669ad7
removed Brouwer_Fixpoint from imports of Derivative
immler
parents:
70136
diff
changeset
|
2345 |
and contf: "continuous_on S f" |
f95193669ad7
removed Brouwer_Fixpoint from imports of Derivative
immler
parents:
70136
diff
changeset
|
2346 |
and "x \<in> S" |
f95193669ad7
removed Brouwer_Fixpoint from imports of Derivative
immler
parents:
70136
diff
changeset
|
2347 |
and derf: "(f has_derivative f') (at x)" |
f95193669ad7
removed Brouwer_Fixpoint from imports of Derivative
immler
parents:
70136
diff
changeset
|
2348 |
and "bounded_linear g'" "f' \<circ> g' = id" |
f95193669ad7
removed Brouwer_Fixpoint from imports of Derivative
immler
parents:
70136
diff
changeset
|
2349 |
and "T \<subseteq> S" |
f95193669ad7
removed Brouwer_Fixpoint from imports of Derivative
immler
parents:
70136
diff
changeset
|
2350 |
and x: "x \<in> interior T" |
f95193669ad7
removed Brouwer_Fixpoint from imports of Derivative
immler
parents:
70136
diff
changeset
|
2351 |
shows "f x \<in> interior (f ` T)" |
f95193669ad7
removed Brouwer_Fixpoint from imports of Derivative
immler
parents:
70136
diff
changeset
|
2352 |
proof - |
f95193669ad7
removed Brouwer_Fixpoint from imports of Derivative
immler
parents:
70136
diff
changeset
|
2353 |
interpret f': bounded_linear f' |
f95193669ad7
removed Brouwer_Fixpoint from imports of Derivative
immler
parents:
70136
diff
changeset
|
2354 |
using assms unfolding has_derivative_def by auto |
f95193669ad7
removed Brouwer_Fixpoint from imports of Derivative
immler
parents:
70136
diff
changeset
|
2355 |
interpret g': bounded_linear g' |
f95193669ad7
removed Brouwer_Fixpoint from imports of Derivative
immler
parents:
70136
diff
changeset
|
2356 |
using assms by auto |
f95193669ad7
removed Brouwer_Fixpoint from imports of Derivative
immler
parents:
70136
diff
changeset
|
2357 |
obtain B where B: "0 < B" "\<forall>x. norm (g' x) \<le> norm x * B" |
f95193669ad7
removed Brouwer_Fixpoint from imports of Derivative
immler
parents:
70136
diff
changeset
|
2358 |
using bounded_linear.pos_bounded[OF assms(5)] by blast |
f95193669ad7
removed Brouwer_Fixpoint from imports of Derivative
immler
parents:
70136
diff
changeset
|
2359 |
hence *: "1 / (2 * B) > 0" by auto |
f95193669ad7
removed Brouwer_Fixpoint from imports of Derivative
immler
parents:
70136
diff
changeset
|
2360 |
obtain e0 where e0: |
f95193669ad7
removed Brouwer_Fixpoint from imports of Derivative
immler
parents:
70136
diff
changeset
|
2361 |
"0 < e0" |
f95193669ad7
removed Brouwer_Fixpoint from imports of Derivative
immler
parents:
70136
diff
changeset
|
2362 |
"\<forall>y. norm (y - x) < e0 \<longrightarrow> norm (f y - f x - f' (y - x)) \<le> 1 / (2 * B) * norm (y - x)" |
f95193669ad7
removed Brouwer_Fixpoint from imports of Derivative
immler
parents:
70136
diff
changeset
|
2363 |
using derf unfolding has_derivative_at_alt |
f95193669ad7
removed Brouwer_Fixpoint from imports of Derivative
immler
parents:
70136
diff
changeset
|
2364 |
using * by blast |
f95193669ad7
removed Brouwer_Fixpoint from imports of Derivative
immler
parents:
70136
diff
changeset
|
2365 |
obtain e1 where e1: "0 < e1" "cball x e1 \<subseteq> T" |
f95193669ad7
removed Brouwer_Fixpoint from imports of Derivative
immler
parents:
70136
diff
changeset
|
2366 |
using mem_interior_cball x by blast |
f95193669ad7
removed Brouwer_Fixpoint from imports of Derivative
immler
parents:
70136
diff
changeset
|
2367 |
have *: "0 < e0 / B" "0 < e1 / B" using e0 e1 B by auto |
f95193669ad7
removed Brouwer_Fixpoint from imports of Derivative
immler
parents:
70136
diff
changeset
|
2368 |
obtain e where e: "0 < e" "e < e0 / B" "e < e1 / B" |
f95193669ad7
removed Brouwer_Fixpoint from imports of Derivative
immler
parents:
70136
diff
changeset
|
2369 |
using field_lbound_gt_zero[OF *] by blast |
f95193669ad7
removed Brouwer_Fixpoint from imports of Derivative
immler
parents:
70136
diff
changeset
|
2370 |
have lem: "\<exists>y\<in>cball (f x) e. f (x + g' (y - f x)) = z" if "z\<in>cball (f x) (e / 2)" for z |
f95193669ad7
removed Brouwer_Fixpoint from imports of Derivative
immler
parents:
70136
diff
changeset
|
2371 |
proof (rule brouwer_surjective_cball) |
f95193669ad7
removed Brouwer_Fixpoint from imports of Derivative
immler
parents:
70136
diff
changeset
|
2372 |
have z: "z \<in> S" if as: "y \<in>cball (f x) e" "z = x + (g' y - g' (f x))" for y z |
f95193669ad7
removed Brouwer_Fixpoint from imports of Derivative
immler
parents:
70136
diff
changeset
|
2373 |
proof- |
f95193669ad7
removed Brouwer_Fixpoint from imports of Derivative
immler
parents:
70136
diff
changeset
|
2374 |
have "dist x z = norm (g' (f x) - g' y)" |
f95193669ad7
removed Brouwer_Fixpoint from imports of Derivative
immler
parents:
70136
diff
changeset
|
2375 |
unfolding as(2) and dist_norm by auto |
f95193669ad7
removed Brouwer_Fixpoint from imports of Derivative
immler
parents:
70136
diff
changeset
|
2376 |
also have "\<dots> \<le> norm (f x - y) * B" |
f95193669ad7
removed Brouwer_Fixpoint from imports of Derivative
immler
parents:
70136
diff
changeset
|
2377 |
by (metis B(2) g'.diff) |
f95193669ad7
removed Brouwer_Fixpoint from imports of Derivative
immler
parents:
70136
diff
changeset
|
2378 |
also have "\<dots> \<le> e * B" |
72569
d56e4eeae967
mult_le_cancel_iff1, mult_le_cancel_iff2, mult_less_iff1 generalised from the real_ versions
paulson <lp15@cam.ac.uk>
parents:
72302
diff
changeset
|
2379 |
by (metis B(1) dist_norm mem_cball mult_le_cancel_iff1 that(1)) |
70620
f95193669ad7
removed Brouwer_Fixpoint from imports of Derivative
immler
parents:
70136
diff
changeset
|
2380 |
also have "\<dots> \<le> e1" |
f95193669ad7
removed Brouwer_Fixpoint from imports of Derivative
immler
parents:
70136
diff
changeset
|
2381 |
using B(1) e(3) pos_less_divide_eq by fastforce |
f95193669ad7
removed Brouwer_Fixpoint from imports of Derivative
immler
parents:
70136
diff
changeset
|
2382 |
finally have "z \<in> cball x e1" |
f95193669ad7
removed Brouwer_Fixpoint from imports of Derivative
immler
parents:
70136
diff
changeset
|
2383 |
by force |
f95193669ad7
removed Brouwer_Fixpoint from imports of Derivative
immler
parents:
70136
diff
changeset
|
2384 |
then show "z \<in> S" |
f95193669ad7
removed Brouwer_Fixpoint from imports of Derivative
immler
parents:
70136
diff
changeset
|
2385 |
using e1 assms(7) by auto |
f95193669ad7
removed Brouwer_Fixpoint from imports of Derivative
immler
parents:
70136
diff
changeset
|
2386 |
qed |
f95193669ad7
removed Brouwer_Fixpoint from imports of Derivative
immler
parents:
70136
diff
changeset
|
2387 |
show "continuous_on (cball (f x) e) (\<lambda>y. f (x + g' (y - f x)))" |
f95193669ad7
removed Brouwer_Fixpoint from imports of Derivative
immler
parents:
70136
diff
changeset
|
2388 |
unfolding g'.diff |
f95193669ad7
removed Brouwer_Fixpoint from imports of Derivative
immler
parents:
70136
diff
changeset
|
2389 |
proof (rule continuous_on_compose2 [OF _ _ order_refl, of _ _ f]) |
f95193669ad7
removed Brouwer_Fixpoint from imports of Derivative
immler
parents:
70136
diff
changeset
|
2390 |
show "continuous_on ((\<lambda>y. x + (g' y - g' (f x))) ` cball (f x) e) f" |
f95193669ad7
removed Brouwer_Fixpoint from imports of Derivative
immler
parents:
70136
diff
changeset
|
2391 |
by (rule continuous_on_subset[OF contf]) (use z in blast) |
f95193669ad7
removed Brouwer_Fixpoint from imports of Derivative
immler
parents:
70136
diff
changeset
|
2392 |
show "continuous_on (cball (f x) e) (\<lambda>y. x + (g' y - g' (f x)))" |
f95193669ad7
removed Brouwer_Fixpoint from imports of Derivative
immler
parents:
70136
diff
changeset
|
2393 |
by (intro continuous_intros linear_continuous_on[OF \<open>bounded_linear g'\<close>]) |
f95193669ad7
removed Brouwer_Fixpoint from imports of Derivative
immler
parents:
70136
diff
changeset
|
2394 |
qed |
f95193669ad7
removed Brouwer_Fixpoint from imports of Derivative
immler
parents:
70136
diff
changeset
|
2395 |
next |
f95193669ad7
removed Brouwer_Fixpoint from imports of Derivative
immler
parents:
70136
diff
changeset
|
2396 |
fix y z |
f95193669ad7
removed Brouwer_Fixpoint from imports of Derivative
immler
parents:
70136
diff
changeset
|
2397 |
assume y: "y \<in> cball (f x) (e / 2)" and z: "z \<in> cball (f x) e" |
f95193669ad7
removed Brouwer_Fixpoint from imports of Derivative
immler
parents:
70136
diff
changeset
|
2398 |
have "norm (g' (z - f x)) \<le> norm (z - f x) * B" |
f95193669ad7
removed Brouwer_Fixpoint from imports of Derivative
immler
parents:
70136
diff
changeset
|
2399 |
using B by auto |
f95193669ad7
removed Brouwer_Fixpoint from imports of Derivative
immler
parents:
70136
diff
changeset
|
2400 |
also have "\<dots> \<le> e * B" |
72569
d56e4eeae967
mult_le_cancel_iff1, mult_le_cancel_iff2, mult_less_iff1 generalised from the real_ versions
paulson <lp15@cam.ac.uk>
parents:
72302
diff
changeset
|
2401 |
by (metis B(1) z dist_norm mem_cball norm_minus_commute mult_le_cancel_iff1) |
70620
f95193669ad7
removed Brouwer_Fixpoint from imports of Derivative
immler
parents:
70136
diff
changeset
|
2402 |
also have "\<dots> < e0" |
f95193669ad7
removed Brouwer_Fixpoint from imports of Derivative
immler
parents:
70136
diff
changeset
|
2403 |
using B(1) e(2) pos_less_divide_eq by blast |
f95193669ad7
removed Brouwer_Fixpoint from imports of Derivative
immler
parents:
70136
diff
changeset
|
2404 |
finally have *: "norm (x + g' (z - f x) - x) < e0" |
f95193669ad7
removed Brouwer_Fixpoint from imports of Derivative
immler
parents:
70136
diff
changeset
|
2405 |
by auto |
f95193669ad7
removed Brouwer_Fixpoint from imports of Derivative
immler
parents:
70136
diff
changeset
|
2406 |
have **: "f x + f' (x + g' (z - f x) - x) = z" |
f95193669ad7
removed Brouwer_Fixpoint from imports of Derivative
immler
parents:
70136
diff
changeset
|
2407 |
using assms(6)[unfolded o_def id_def,THEN cong] |
f95193669ad7
removed Brouwer_Fixpoint from imports of Derivative
immler
parents:
70136
diff
changeset
|
2408 |
by auto |
f95193669ad7
removed Brouwer_Fixpoint from imports of Derivative
immler
parents:
70136
diff
changeset
|
2409 |
have "norm (f x - (y + (z - f (x + g' (z - f x))))) \<le> |
f95193669ad7
removed Brouwer_Fixpoint from imports of Derivative
immler
parents:
70136
diff
changeset
|
2410 |
norm (f (x + g' (z - f x)) - z) + norm (f x - y)" |
f95193669ad7
removed Brouwer_Fixpoint from imports of Derivative
immler
parents:
70136
diff
changeset
|
2411 |
using norm_triangle_ineq[of "f (x + g'(z - f x)) - z" "f x - y"] |
f95193669ad7
removed Brouwer_Fixpoint from imports of Derivative
immler
parents:
70136
diff
changeset
|
2412 |
by (auto simp add: algebra_simps) |
f95193669ad7
removed Brouwer_Fixpoint from imports of Derivative
immler
parents:
70136
diff
changeset
|
2413 |
also have "\<dots> \<le> 1 / (B * 2) * norm (g' (z - f x)) + norm (f x - y)" |
f95193669ad7
removed Brouwer_Fixpoint from imports of Derivative
immler
parents:
70136
diff
changeset
|
2414 |
using e0(2)[rule_format, OF *] |
f95193669ad7
removed Brouwer_Fixpoint from imports of Derivative
immler
parents:
70136
diff
changeset
|
2415 |
by (simp only: algebra_simps **) auto |
f95193669ad7
removed Brouwer_Fixpoint from imports of Derivative
immler
parents:
70136
diff
changeset
|
2416 |
also have "\<dots> \<le> 1 / (B * 2) * norm (g' (z - f x)) + e/2" |
f95193669ad7
removed Brouwer_Fixpoint from imports of Derivative
immler
parents:
70136
diff
changeset
|
2417 |
using y by (auto simp: dist_norm) |
f95193669ad7
removed Brouwer_Fixpoint from imports of Derivative
immler
parents:
70136
diff
changeset
|
2418 |
also have "\<dots> \<le> 1 / (B * 2) * B * norm (z - f x) + e/2" |
f95193669ad7
removed Brouwer_Fixpoint from imports of Derivative
immler
parents:
70136
diff
changeset
|
2419 |
using * B by (auto simp add: field_simps) |
f95193669ad7
removed Brouwer_Fixpoint from imports of Derivative
immler
parents:
70136
diff
changeset
|
2420 |
also have "\<dots> \<le> 1 / 2 * norm (z - f x) + e/2" |
f95193669ad7
removed Brouwer_Fixpoint from imports of Derivative
immler
parents:
70136
diff
changeset
|
2421 |
by auto |
f95193669ad7
removed Brouwer_Fixpoint from imports of Derivative
immler
parents:
70136
diff
changeset
|
2422 |
also have "\<dots> \<le> e/2 + e/2" |
f95193669ad7
removed Brouwer_Fixpoint from imports of Derivative
immler
parents:
70136
diff
changeset
|
2423 |
using B(1) \<open>norm (z - f x) * B \<le> e * B\<close> by auto |
f95193669ad7
removed Brouwer_Fixpoint from imports of Derivative
immler
parents:
70136
diff
changeset
|
2424 |
finally show "y + (z - f (x + g' (z - f x))) \<in> cball (f x) e" |
f95193669ad7
removed Brouwer_Fixpoint from imports of Derivative
immler
parents:
70136
diff
changeset
|
2425 |
by (auto simp: dist_norm) |
f95193669ad7
removed Brouwer_Fixpoint from imports of Derivative
immler
parents:
70136
diff
changeset
|
2426 |
qed (use e that in auto) |
f95193669ad7
removed Brouwer_Fixpoint from imports of Derivative
immler
parents:
70136
diff
changeset
|
2427 |
show ?thesis |
f95193669ad7
removed Brouwer_Fixpoint from imports of Derivative
immler
parents:
70136
diff
changeset
|
2428 |
unfolding mem_interior |
f95193669ad7
removed Brouwer_Fixpoint from imports of Derivative
immler
parents:
70136
diff
changeset
|
2429 |
proof (intro exI conjI subsetI) |
f95193669ad7
removed Brouwer_Fixpoint from imports of Derivative
immler
parents:
70136
diff
changeset
|
2430 |
fix y |
f95193669ad7
removed Brouwer_Fixpoint from imports of Derivative
immler
parents:
70136
diff
changeset
|
2431 |
assume "y \<in> ball (f x) (e / 2)" |
f95193669ad7
removed Brouwer_Fixpoint from imports of Derivative
immler
parents:
70136
diff
changeset
|
2432 |
then have *: "y \<in> cball (f x) (e / 2)" |
f95193669ad7
removed Brouwer_Fixpoint from imports of Derivative
immler
parents:
70136
diff
changeset
|
2433 |
by auto |
f95193669ad7
removed Brouwer_Fixpoint from imports of Derivative
immler
parents:
70136
diff
changeset
|
2434 |
obtain z where z: "z \<in> cball (f x) e" "f (x + g' (z - f x)) = y" |
f95193669ad7
removed Brouwer_Fixpoint from imports of Derivative
immler
parents:
70136
diff
changeset
|
2435 |
using lem * by blast |
f95193669ad7
removed Brouwer_Fixpoint from imports of Derivative
immler
parents:
70136
diff
changeset
|
2436 |
then have "norm (g' (z - f x)) \<le> norm (z - f x) * B" |
f95193669ad7
removed Brouwer_Fixpoint from imports of Derivative
immler
parents:
70136
diff
changeset
|
2437 |
using B |
f95193669ad7
removed Brouwer_Fixpoint from imports of Derivative
immler
parents:
70136
diff
changeset
|
2438 |
by (auto simp add: field_simps) |
f95193669ad7
removed Brouwer_Fixpoint from imports of Derivative
immler
parents:
70136
diff
changeset
|
2439 |
also have "\<dots> \<le> e * B" |
72569
d56e4eeae967
mult_le_cancel_iff1, mult_le_cancel_iff2, mult_less_iff1 generalised from the real_ versions
paulson <lp15@cam.ac.uk>
parents:
72302
diff
changeset
|
2440 |
by (metis B(1) dist_norm mem_cball norm_minus_commute mult_le_cancel_iff1 z(1)) |
70620
f95193669ad7
removed Brouwer_Fixpoint from imports of Derivative
immler
parents:
70136
diff
changeset
|
2441 |
also have "\<dots> \<le> e1" |
f95193669ad7
removed Brouwer_Fixpoint from imports of Derivative
immler
parents:
70136
diff
changeset
|
2442 |
using e B unfolding less_divide_eq by auto |
f95193669ad7
removed Brouwer_Fixpoint from imports of Derivative
immler
parents:
70136
diff
changeset
|
2443 |
finally have "x + g'(z - f x) \<in> T" |
f95193669ad7
removed Brouwer_Fixpoint from imports of Derivative
immler
parents:
70136
diff
changeset
|
2444 |
by (metis add_diff_cancel diff_diff_add dist_norm e1(2) mem_cball norm_minus_commute subset_eq) |
f95193669ad7
removed Brouwer_Fixpoint from imports of Derivative
immler
parents:
70136
diff
changeset
|
2445 |
then show "y \<in> f ` T" |
f95193669ad7
removed Brouwer_Fixpoint from imports of Derivative
immler
parents:
70136
diff
changeset
|
2446 |
using z by auto |
f95193669ad7
removed Brouwer_Fixpoint from imports of Derivative
immler
parents:
70136
diff
changeset
|
2447 |
qed (use e in auto) |
f95193669ad7
removed Brouwer_Fixpoint from imports of Derivative
immler
parents:
70136
diff
changeset
|
2448 |
qed |
f95193669ad7
removed Brouwer_Fixpoint from imports of Derivative
immler
parents:
70136
diff
changeset
|
2449 |
|
f95193669ad7
removed Brouwer_Fixpoint from imports of Derivative
immler
parents:
70136
diff
changeset
|
2450 |
text \<open>Hence the following eccentric variant of the inverse function theorem. |
f95193669ad7
removed Brouwer_Fixpoint from imports of Derivative
immler
parents:
70136
diff
changeset
|
2451 |
This has no continuity assumptions, but we do need the inverse function. |
f95193669ad7
removed Brouwer_Fixpoint from imports of Derivative
immler
parents:
70136
diff
changeset
|
2452 |
We could put \<open>f' \<circ> g = I\<close> but this happens to fit with the minimal linear |
f95193669ad7
removed Brouwer_Fixpoint from imports of Derivative
immler
parents:
70136
diff
changeset
|
2453 |
algebra theory I've set up so far.\<close> |
f95193669ad7
removed Brouwer_Fixpoint from imports of Derivative
immler
parents:
70136
diff
changeset
|
2454 |
|
f95193669ad7
removed Brouwer_Fixpoint from imports of Derivative
immler
parents:
70136
diff
changeset
|
2455 |
lemma has_derivative_inverse_strong: |
f95193669ad7
removed Brouwer_Fixpoint from imports of Derivative
immler
parents:
70136
diff
changeset
|
2456 |
fixes f :: "'n::euclidean_space \<Rightarrow> 'n" |
76786 | 2457 |
assumes S: "open S" "x \<in> S" |
70620
f95193669ad7
removed Brouwer_Fixpoint from imports of Derivative
immler
parents:
70136
diff
changeset
|
2458 |
and contf: "continuous_on S f" |
f95193669ad7
removed Brouwer_Fixpoint from imports of Derivative
immler
parents:
70136
diff
changeset
|
2459 |
and gf: "\<And>x. x \<in> S \<Longrightarrow> g (f x) = x" |
f95193669ad7
removed Brouwer_Fixpoint from imports of Derivative
immler
parents:
70136
diff
changeset
|
2460 |
and derf: "(f has_derivative f') (at x)" |
f95193669ad7
removed Brouwer_Fixpoint from imports of Derivative
immler
parents:
70136
diff
changeset
|
2461 |
and id: "f' \<circ> g' = id" |
f95193669ad7
removed Brouwer_Fixpoint from imports of Derivative
immler
parents:
70136
diff
changeset
|
2462 |
shows "(g has_derivative g') (at (f x))" |
f95193669ad7
removed Brouwer_Fixpoint from imports of Derivative
immler
parents:
70136
diff
changeset
|
2463 |
proof - |
f95193669ad7
removed Brouwer_Fixpoint from imports of Derivative
immler
parents:
70136
diff
changeset
|
2464 |
have linf: "bounded_linear f'" |
f95193669ad7
removed Brouwer_Fixpoint from imports of Derivative
immler
parents:
70136
diff
changeset
|
2465 |
using derf unfolding has_derivative_def by auto |
f95193669ad7
removed Brouwer_Fixpoint from imports of Derivative
immler
parents:
70136
diff
changeset
|
2466 |
then have ling: "bounded_linear g'" |
f95193669ad7
removed Brouwer_Fixpoint from imports of Derivative
immler
parents:
70136
diff
changeset
|
2467 |
unfolding linear_conv_bounded_linear[symmetric] |
f95193669ad7
removed Brouwer_Fixpoint from imports of Derivative
immler
parents:
70136
diff
changeset
|
2468 |
using id right_inverse_linear by blast |
f95193669ad7
removed Brouwer_Fixpoint from imports of Derivative
immler
parents:
70136
diff
changeset
|
2469 |
moreover have "g' \<circ> f' = id" |
76786 | 2470 |
using id linear_inverse_left linear_linear linf ling by blast |
70620
f95193669ad7
removed Brouwer_Fixpoint from imports of Derivative
immler
parents:
70136
diff
changeset
|
2471 |
moreover have *: "\<And>T. \<lbrakk>T \<subseteq> S; x \<in> interior T\<rbrakk> \<Longrightarrow> f x \<in> interior (f ` T)" |
76786 | 2472 |
using S derf contf id ling sussmann_open_mapping by blast |
70620
f95193669ad7
removed Brouwer_Fixpoint from imports of Derivative
immler
parents:
70136
diff
changeset
|
2473 |
have "continuous (at (f x)) g" |
f95193669ad7
removed Brouwer_Fixpoint from imports of Derivative
immler
parents:
70136
diff
changeset
|
2474 |
unfolding continuous_at Lim_at |
76786 | 2475 |
proof (intro strip) |
70620
f95193669ad7
removed Brouwer_Fixpoint from imports of Derivative
immler
parents:
70136
diff
changeset
|
2476 |
fix e :: real |
f95193669ad7
removed Brouwer_Fixpoint from imports of Derivative
immler
parents:
70136
diff
changeset
|
2477 |
assume "e > 0" |
f95193669ad7
removed Brouwer_Fixpoint from imports of Derivative
immler
parents:
70136
diff
changeset
|
2478 |
then have "f x \<in> interior (f ` (ball x e \<inter> S))" |
76786 | 2479 |
by (simp add: "*" S interior_open) |
70620
f95193669ad7
removed Brouwer_Fixpoint from imports of Derivative
immler
parents:
70136
diff
changeset
|
2480 |
then obtain d where d: "0 < d" "ball (f x) d \<subseteq> f ` (ball x e \<inter> S)" |
f95193669ad7
removed Brouwer_Fixpoint from imports of Derivative
immler
parents:
70136
diff
changeset
|
2481 |
unfolding mem_interior by blast |
f95193669ad7
removed Brouwer_Fixpoint from imports of Derivative
immler
parents:
70136
diff
changeset
|
2482 |
show "\<exists>d>0. \<forall>y. 0 < dist y (f x) \<and> dist y (f x) < d \<longrightarrow> dist (g y) (g (f x)) < e" |
f95193669ad7
removed Brouwer_Fixpoint from imports of Derivative
immler
parents:
70136
diff
changeset
|
2483 |
proof (intro exI allI impI conjI) |
f95193669ad7
removed Brouwer_Fixpoint from imports of Derivative
immler
parents:
70136
diff
changeset
|
2484 |
fix y |
f95193669ad7
removed Brouwer_Fixpoint from imports of Derivative
immler
parents:
70136
diff
changeset
|
2485 |
assume "0 < dist y (f x) \<and> dist y (f x) < d" |
f95193669ad7
removed Brouwer_Fixpoint from imports of Derivative
immler
parents:
70136
diff
changeset
|
2486 |
then have "g y \<in> g ` f ` (ball x e \<inter> S)" |
f95193669ad7
removed Brouwer_Fixpoint from imports of Derivative
immler
parents:
70136
diff
changeset
|
2487 |
by (metis d(2) dist_commute mem_ball rev_image_eqI subset_iff) |
f95193669ad7
removed Brouwer_Fixpoint from imports of Derivative
immler
parents:
70136
diff
changeset
|
2488 |
then show "dist (g y) (g (f x)) < e" |
76786 | 2489 |
using \<open>x \<in> S\<close> by (simp add: gf dist_commute image_iff) |
70620
f95193669ad7
removed Brouwer_Fixpoint from imports of Derivative
immler
parents:
70136
diff
changeset
|
2490 |
qed (use d in auto) |
f95193669ad7
removed Brouwer_Fixpoint from imports of Derivative
immler
parents:
70136
diff
changeset
|
2491 |
qed |
f95193669ad7
removed Brouwer_Fixpoint from imports of Derivative
immler
parents:
70136
diff
changeset
|
2492 |
moreover have "f x \<in> interior (f ` S)" |
76786 | 2493 |
using "*" S interior_eq by blast |
70620
f95193669ad7
removed Brouwer_Fixpoint from imports of Derivative
immler
parents:
70136
diff
changeset
|
2494 |
moreover have "f (g y) = y" if "y \<in> interior (f ` S)" for y |
f95193669ad7
removed Brouwer_Fixpoint from imports of Derivative
immler
parents:
70136
diff
changeset
|
2495 |
by (metis gf imageE interiorE subsetD that) |
f95193669ad7
removed Brouwer_Fixpoint from imports of Derivative
immler
parents:
70136
diff
changeset
|
2496 |
ultimately show ?thesis using assms |
f95193669ad7
removed Brouwer_Fixpoint from imports of Derivative
immler
parents:
70136
diff
changeset
|
2497 |
by (metis has_derivative_inverse_basic_x open_interior) |
f95193669ad7
removed Brouwer_Fixpoint from imports of Derivative
immler
parents:
70136
diff
changeset
|
2498 |
qed |
f95193669ad7
removed Brouwer_Fixpoint from imports of Derivative
immler
parents:
70136
diff
changeset
|
2499 |
|
f95193669ad7
removed Brouwer_Fixpoint from imports of Derivative
immler
parents:
70136
diff
changeset
|
2500 |
text \<open>A rewrite based on the other domain.\<close> |
f95193669ad7
removed Brouwer_Fixpoint from imports of Derivative
immler
parents:
70136
diff
changeset
|
2501 |
|
f95193669ad7
removed Brouwer_Fixpoint from imports of Derivative
immler
parents:
70136
diff
changeset
|
2502 |
lemma has_derivative_inverse_strong_x: |
f95193669ad7
removed Brouwer_Fixpoint from imports of Derivative
immler
parents:
70136
diff
changeset
|
2503 |
fixes f :: "'a::euclidean_space \<Rightarrow> 'a" |
f95193669ad7
removed Brouwer_Fixpoint from imports of Derivative
immler
parents:
70136
diff
changeset
|
2504 |
assumes "open S" |
f95193669ad7
removed Brouwer_Fixpoint from imports of Derivative
immler
parents:
70136
diff
changeset
|
2505 |
and "g y \<in> S" |
f95193669ad7
removed Brouwer_Fixpoint from imports of Derivative
immler
parents:
70136
diff
changeset
|
2506 |
and "continuous_on S f" |
f95193669ad7
removed Brouwer_Fixpoint from imports of Derivative
immler
parents:
70136
diff
changeset
|
2507 |
and "\<And>x. x \<in> S \<Longrightarrow> g (f x) = x" |
f95193669ad7
removed Brouwer_Fixpoint from imports of Derivative
immler
parents:
70136
diff
changeset
|
2508 |
and "(f has_derivative f') (at (g y))" |
f95193669ad7
removed Brouwer_Fixpoint from imports of Derivative
immler
parents:
70136
diff
changeset
|
2509 |
and "f' \<circ> g' = id" |
76786 | 2510 |
and f: "f (g y) = y" |
70620
f95193669ad7
removed Brouwer_Fixpoint from imports of Derivative
immler
parents:
70136
diff
changeset
|
2511 |
shows "(g has_derivative g') (at y)" |
76786 | 2512 |
using has_derivative_inverse_strong[OF assms(1-6)] by (simp add: f) |
70620
f95193669ad7
removed Brouwer_Fixpoint from imports of Derivative
immler
parents:
70136
diff
changeset
|
2513 |
|
f95193669ad7
removed Brouwer_Fixpoint from imports of Derivative
immler
parents:
70136
diff
changeset
|
2514 |
text \<open>On a region.\<close> |
f95193669ad7
removed Brouwer_Fixpoint from imports of Derivative
immler
parents:
70136
diff
changeset
|
2515 |
|
f95193669ad7
removed Brouwer_Fixpoint from imports of Derivative
immler
parents:
70136
diff
changeset
|
2516 |
theorem has_derivative_inverse_on: |
f95193669ad7
removed Brouwer_Fixpoint from imports of Derivative
immler
parents:
70136
diff
changeset
|
2517 |
fixes f :: "'n::euclidean_space \<Rightarrow> 'n" |
f95193669ad7
removed Brouwer_Fixpoint from imports of Derivative
immler
parents:
70136
diff
changeset
|
2518 |
assumes "open S" |
76786 | 2519 |
and "\<And>x. x \<in> S \<Longrightarrow> (f has_derivative f'(x)) (at x)" |
70620
f95193669ad7
removed Brouwer_Fixpoint from imports of Derivative
immler
parents:
70136
diff
changeset
|
2520 |
and "\<And>x. x \<in> S \<Longrightarrow> g (f x) = x" |
f95193669ad7
removed Brouwer_Fixpoint from imports of Derivative
immler
parents:
70136
diff
changeset
|
2521 |
and "f' x \<circ> g' x = id" |
f95193669ad7
removed Brouwer_Fixpoint from imports of Derivative
immler
parents:
70136
diff
changeset
|
2522 |
and "x \<in> S" |
f95193669ad7
removed Brouwer_Fixpoint from imports of Derivative
immler
parents:
70136
diff
changeset
|
2523 |
shows "(g has_derivative g'(x)) (at (f x))" |
76786 | 2524 |
by (meson assms continuous_on_eq_continuous_at has_derivative_continuous has_derivative_inverse_strong) |
70620
f95193669ad7
removed Brouwer_Fixpoint from imports of Derivative
immler
parents:
70136
diff
changeset
|
2525 |
|
34291
4e896680897e
finite annotation on cartesian product is now implicit.
hoelzl
parents:
34289
diff
changeset
|
2526 |
end |