author | wenzelm |
Tue, 17 Sep 2013 00:13:20 +0200 | |
changeset 53674 | 7ac7b2eaa5e6 |
parent 53252 | 4766fbe322b5 |
child 53688 | 63892cfef47f |
permissions | -rw-r--r-- |
53674 | 1 |
(* Author: John Harrison |
2 |
Author: Robert Himmelmann, TU Muenchen (Translation from HOL light) |
|
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 |
(* ========================================================================= *) |
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
6 |
(* Results connected with topological dimension. *) |
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
7 |
(* *) |
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
8 |
(* 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
|
9 |
(* 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
|
10 |
(* 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
|
11 |
(* *) |
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
12 |
(* 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
|
13 |
(* 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
|
14 |
(* 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
|
15 |
(* *) |
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
16 |
(* (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
|
17 |
(* ========================================================================= *) |
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
18 |
|
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
19 |
header {* Results connected with topological dimension. *} |
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
20 |
|
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
21 |
theory Brouwer_Fixpoint |
53674 | 22 |
imports Convex_Euclidean_Space |
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
23 |
begin |
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
24 |
|
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
|
25 |
(** move this **) |
53185 | 26 |
lemma divide_nonneg_nonneg: |
53674 | 27 |
assumes "a \<ge> 0" |
28 |
and "b \<ge> 0" |
|
53185 | 29 |
shows "0 \<le> a / (b::real)" |
53674 | 30 |
proof (cases "b = 0") |
31 |
case True |
|
32 |
then show ?thesis by auto |
|
33 |
next |
|
34 |
case False |
|
35 |
show ?thesis |
|
36 |
apply (rule divide_nonneg_pos) |
|
37 |
using assms False |
|
38 |
apply auto |
|
39 |
done |
|
40 |
qed |
|
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
|
41 |
|
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
42 |
lemma brouwer_compactness_lemma: |
50884
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50526
diff
changeset
|
43 |
fixes f :: "'a::metric_space \<Rightarrow> 'b::euclidean_space" |
53674 | 44 |
assumes "compact s" |
45 |
and "continuous_on s f" |
|
46 |
and "\<not> (\<exists>x\<in>s. (f x = 0))" |
|
47 |
obtains d where "0 < d" and "\<forall>x\<in>s. d \<le> norm (f x)" |
|
53185 | 48 |
proof (cases "s = {}") |
53674 | 49 |
case True |
50 |
show thesis by (rule that [of 1]) (auto simp: True) |
|
51 |
next |
|
49374 | 52 |
case False |
53 |
have "continuous_on s (norm \<circ> f)" |
|
49555 | 54 |
by (rule continuous_on_intros continuous_on_norm assms(2))+ |
53674 | 55 |
with False obtain x where x: "x \<in> s" "\<forall>y\<in>s. (norm \<circ> f) x \<le> (norm \<circ> f) y" |
56 |
using continuous_attains_inf[OF assms(1), of "norm \<circ> f"] |
|
57 |
unfolding o_def |
|
58 |
by auto |
|
59 |
have "(norm \<circ> f) x > 0" |
|
60 |
using assms(3) and x(1) |
|
61 |
by auto |
|
62 |
then show ?thesis |
|
63 |
by (rule that) (insert x(2), auto simp: o_def) |
|
49555 | 64 |
qed |
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
65 |
|
49555 | 66 |
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
|
67 |
fixes P Q :: "'a::euclidean_space \<Rightarrow> bool" |
899c9c4e4a4c
Remove the indexed basis from the definition of euclidean spaces and only use the set of Basis vectors
hoelzl
parents:
50514
diff
changeset
|
68 |
assumes "(\<forall>x. P x \<longrightarrow> P (f x))" |
899c9c4e4a4c
Remove the indexed basis from the definition of euclidean spaces and only use the set of Basis vectors
hoelzl
parents:
50514
diff
changeset
|
69 |
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
|
70 |
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
|
71 |
(\<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
|
72 |
(\<forall>x.\<forall>i\<in>Basis. P x \<and> Q i \<and> (x\<bullet>i = 1) \<longrightarrow> (l x i = 1)) \<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
|
73 |
(\<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> |
899c9c4e4a4c
Remove the indexed basis from the definition of euclidean spaces and only use the set of Basis vectors
hoelzl
parents:
50514
diff
changeset
|
74 |
(\<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 | 75 |
proof - |
76 |
have and_forall_thm:"\<And>P Q. (\<forall>x. P x) \<and> (\<forall>x. Q x) \<longleftrightarrow> (\<forall>x. P x \<and> Q x)" |
|
77 |
by auto |
|
49555 | 78 |
have *: "\<forall>x y::real. 0 \<le> x \<and> x \<le> 1 \<and> 0 \<le> y \<and> y \<le> 1 \<longrightarrow> (x \<noteq> 1 \<and> x \<le> y \<or> x \<noteq> 0 \<and> y \<le> x)" |
49374 | 79 |
by auto |
80 |
show ?thesis |
|
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
|
81 |
unfolding and_forall_thm Ball_def |
53185 | 82 |
apply (subst choice_iff[symmetric])+ |
49374 | 83 |
apply rule |
84 |
apply rule |
|
85 |
proof - |
|
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
|
86 |
case (goal1 x) |
899c9c4e4a4c
Remove the indexed basis from the definition of euclidean spaces and only use the set of Basis vectors
hoelzl
parents:
50514
diff
changeset
|
87 |
let ?R = "\<lambda>y. (P x \<and> Q xa \<and> x \<bullet> xa = 0 \<longrightarrow> y = (0::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
|
88 |
(P x \<and> Q xa \<and> x \<bullet> xa = 1 \<longrightarrow> y = 1) \<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
|
89 |
(P x \<and> Q xa \<and> y = 0 \<longrightarrow> x \<bullet> xa \<le> f x \<bullet> xa) \<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
|
90 |
(P x \<and> Q xa \<and> y = 1 \<longrightarrow> f x \<bullet> xa \<le> x \<bullet> xa)" |
49374 | 91 |
{ |
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
|
92 |
assume "P x" "Q xa" "xa\<in>Basis" |
899c9c4e4a4c
Remove the indexed basis from the definition of euclidean spaces and only use the set of Basis vectors
hoelzl
parents:
50514
diff
changeset
|
93 |
then have "0 \<le> f x \<bullet> xa \<and> f x \<bullet> xa \<le> 1" |
49374 | 94 |
using assms(2)[rule_format,of "f x" xa] |
95 |
apply (drule_tac assms(1)[rule_format]) |
|
96 |
apply auto |
|
97 |
done |
|
98 |
} |
|
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
|
99 |
then have "xa\<in>Basis \<Longrightarrow> ?R 0 \<or> ?R 1" by auto |
49374 | 100 |
then show ?case by auto |
101 |
qed |
|
102 |
qed |
|
103 |
||
53185 | 104 |
|
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
105 |
subsection {* The key "counting" observation, somewhat abstracted. *} |
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
106 |
|
49374 | 107 |
lemma setsum_Un_disjoint': |
108 |
assumes "finite A" "finite B" "A \<inter> B = {}" "A \<union> B = C" |
|
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
109 |
shows "setsum g C = setsum g A + setsum g B" |
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
110 |
using setsum_Un_disjoint[OF assms(1-3)] and assms(4) by auto |
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
111 |
|
53252 | 112 |
lemma kuhn_counting_lemma: |
113 |
assumes |
|
114 |
"finite faces" |
|
115 |
"finite simplices" |
|
116 |
"\<forall>f\<in>faces. bnd f \<longrightarrow> (card {s \<in> simplices. face f s} = 1)" |
|
117 |
"\<forall>f\<in>faces. \<not> bnd f \<longrightarrow> (card {s \<in> simplices. face f s} = 2)" |
|
118 |
"\<forall>s\<in>simplices. compo s \<longrightarrow> (card {f \<in> faces. face f s \<and> compo' f} = 1)" |
|
119 |
"\<forall>s\<in>simplices. \<not> compo s \<longrightarrow> |
|
120 |
(card {f \<in> faces. face f s \<and> compo' f} = 0) \<or> (card {f \<in> faces. face f s \<and> compo' f} = 2)" |
|
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
121 |
"odd(card {f \<in> faces. compo' f \<and> bnd f})" |
49374 | 122 |
shows "odd(card {s \<in> simplices. compo s})" |
123 |
proof - |
|
124 |
have "\<And>x. {f\<in>faces. compo' f \<and> bnd f \<and> face f x} \<union> {f\<in>faces. compo' f \<and> \<not>bnd f \<and> face f x} = |
|
125 |
{f\<in>faces. compo' f \<and> face f x}" |
|
126 |
"\<And>x. {f \<in> faces. compo' f \<and> bnd f \<and> face f x} \<inter> {f \<in> faces. compo' f \<and> \<not> bnd f \<and> face f x} = {}" |
|
127 |
by auto |
|
53674 | 128 |
then have lem1:"setsum (\<lambda>s. (card {f \<in> faces. face f s \<and> compo' f})) simplices = |
49374 | 129 |
setsum (\<lambda>s. card {f \<in> {f \<in> faces. compo' f \<and> bnd f}. face f s}) simplices + |
130 |
setsum (\<lambda>s. card {f \<in> {f \<in> faces. compo' f \<and> \<not> (bnd f)}. face f s}) simplices" |
|
53185 | 131 |
unfolding setsum_addf[symmetric] |
49374 | 132 |
apply - |
133 |
apply(rule setsum_cong2) |
|
134 |
using assms(1) |
|
135 |
apply (auto simp add: card_Un_Int, auto simp add:conj_commute) |
|
136 |
done |
|
53252 | 137 |
have lem2: |
138 |
"setsum (\<lambda>j. card {f \<in> {f \<in> faces. compo' f \<and> bnd f}. face f j}) simplices = |
|
139 |
1 * card {f \<in> faces. compo' f \<and> bnd f}" |
|
140 |
"setsum (\<lambda>j. card {f \<in> {f \<in> faces. compo' f \<and> \<not> bnd f}. face f j}) simplices = |
|
141 |
2 * card {f \<in> faces. compo' f \<and> \<not> bnd f}" |
|
49374 | 142 |
apply(rule_tac[!] setsum_multicount) |
143 |
using assms |
|
144 |
apply auto |
|
145 |
done |
|
53252 | 146 |
have lem3: |
147 |
"setsum (\<lambda>s. card {f \<in> faces. face f s \<and> compo' f}) simplices = |
|
148 |
setsum (\<lambda>s. card {f \<in> faces. face f s \<and> compo' f}) {s \<in> simplices. compo s}+ |
|
149 |
setsum (\<lambda>s. card {f \<in> faces. face f s \<and> compo' f}) {s \<in> simplices. \<not> compo s}" |
|
150 |
apply (rule setsum_Un_disjoint') |
|
151 |
using assms(2) |
|
152 |
apply auto |
|
153 |
done |
|
154 |
have lem4: "setsum (\<lambda>s. card {f \<in> faces. face f s \<and> compo' f}) {s \<in> simplices. compo s} = |
|
155 |
setsum (\<lambda>s. 1) {s \<in> simplices. compo s}" |
|
156 |
apply (rule setsum_cong2) |
|
157 |
using assms(5) |
|
158 |
apply auto |
|
159 |
done |
|
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
160 |
have lem5: "setsum (\<lambda>s. card {f \<in> faces. face f s \<and> compo' f}) {s \<in> simplices. \<not> compo s} = |
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
161 |
setsum (\<lambda>s. card {f \<in> faces. face f s \<and> compo' f}) |
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
162 |
{s \<in> simplices. (\<not> compo s) \<and> (card {f \<in> faces. face f s \<and> compo' f} = 0)} + |
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
163 |
setsum (\<lambda>s. card {f \<in> faces. face f s \<and> compo' f}) |
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
164 |
{s \<in> simplices. (\<not> compo s) \<and> (card {f \<in> faces. face f s \<and> compo' f} = 2)}" |
53252 | 165 |
apply (rule setsum_Un_disjoint') |
166 |
using assms(2,6) |
|
167 |
apply auto |
|
168 |
done |
|
169 |
have *: "int (\<Sum>s\<in>{s \<in> simplices. compo s}. card {f \<in> faces. face f s \<and> compo' f}) = |
|
53185 | 170 |
int (card {f \<in> faces. compo' f \<and> bnd f} + 2 * card {f \<in> faces. compo' f \<and> \<not> bnd f}) - |
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
171 |
int (card {s \<in> simplices. \<not> compo s \<and> card {f \<in> faces. face f s \<and> compo' f} = 2} * 2)" |
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
172 |
using lem1[unfolded lem3 lem2 lem5] by auto |
49374 | 173 |
have even_minus_odd:"\<And>x y. even x \<Longrightarrow> odd (y::int) \<Longrightarrow> odd (x - y)" |
174 |
using assms by auto |
|
175 |
have odd_minus_even:"\<And>x y. odd x \<Longrightarrow> even (y::int) \<Longrightarrow> odd (x - y)" |
|
176 |
using assms by auto |
|
177 |
show ?thesis |
|
53185 | 178 |
unfolding even_nat_def card_eq_setsum and lem4[symmetric] and *[unfolded card_eq_setsum] |
179 |
unfolding card_eq_setsum[symmetric] |
|
49374 | 180 |
apply (rule odd_minus_even) |
181 |
unfolding of_nat_add |
|
182 |
apply(rule odd_plus_even) |
|
183 |
apply(rule assms(7)[unfolded even_nat_def]) |
|
184 |
unfolding int_mult |
|
185 |
apply auto |
|
186 |
done |
|
187 |
qed |
|
188 |
||
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
189 |
|
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
190 |
subsection {* The odd/even result for faces of complete vertices, generalized. *} |
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
191 |
|
49374 | 192 |
lemma card_1_exists: "card s = 1 \<longleftrightarrow> (\<exists>!x. x \<in> s)" |
193 |
unfolding One_nat_def |
|
194 |
apply rule |
|
195 |
apply (drule card_eq_SucD) |
|
196 |
defer |
|
49555 | 197 |
apply (erule ex1E) |
49374 | 198 |
proof - |
53186 | 199 |
fix x |
200 |
assume as: "x \<in> s" "\<forall>y. y \<in> s \<longrightarrow> y = x" |
|
49374 | 201 |
have *: "s = insert x {}" |
49555 | 202 |
apply (rule set_eqI, rule) unfolding singleton_iff |
49374 | 203 |
apply (rule as(2)[rule_format]) using as(1) |
204 |
apply auto |
|
205 |
done |
|
53248 | 206 |
show "card s = Suc 0" |
207 |
unfolding * using card_insert by auto |
|
49374 | 208 |
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
|
209 |
|
49374 | 210 |
lemma card_2_exists: "card s = 2 \<longleftrightarrow> (\<exists>x\<in>s. \<exists>y\<in>s. x \<noteq> y \<and> (\<forall>z\<in>s. (z = x) \<or> (z = y)))" |
211 |
proof |
|
212 |
assume "card s = 2" |
|
53186 | 213 |
then obtain x y where s: "s = {x, y}" "x\<noteq>y" unfolding numeral_2_eq_2 |
214 |
apply - |
|
215 |
apply (erule exE conjE | drule card_eq_SucD)+ |
|
216 |
apply auto |
|
217 |
done |
|
218 |
show "\<exists>x\<in>s. \<exists>y\<in>s. x \<noteq> y \<and> (\<forall>z\<in>s. z = x \<or> z = y)" |
|
219 |
using s by auto |
|
49555 | 220 |
next |
49374 | 221 |
assume "\<exists>x\<in>s. \<exists>y\<in>s. x \<noteq> y \<and> (\<forall>z\<in>s. z = x \<or> z = y)" |
53186 | 222 |
then obtain x y where "x\<in>s" "y\<in>s" "x \<noteq> y" "\<forall>z\<in>s. z = x \<or> z = y" |
223 |
by auto |
|
49555 | 224 |
then have "s = {x, y}" by auto |
225 |
with `x \<noteq> y` show "card s = 2" by auto |
|
226 |
qed |
|
227 |
||
228 |
lemma image_lemma_0: |
|
229 |
assumes "card {a\<in>s. f ` (s - {a}) = t - {b}} = n" |
|
230 |
shows "card {s'. \<exists>a\<in>s. (s' = s - {a}) \<and> (f ` s' = t - {b})} = n" |
|
231 |
proof - |
|
53185 | 232 |
have *: "{s'. \<exists>a\<in>s. (s' = s - {a}) \<and> (f ` s' = t - {b})} = |
233 |
(\<lambda>a. s - {a}) ` {a\<in>s. f ` (s - {a}) = t - {b}}" |
|
49555 | 234 |
by auto |
53185 | 235 |
show ?thesis |
236 |
unfolding * |
|
237 |
unfolding assms[symmetric] |
|
238 |
apply (rule card_image) |
|
239 |
unfolding inj_on_def |
|
240 |
apply (rule, rule, rule) |
|
241 |
unfolding mem_Collect_eq |
|
242 |
apply auto |
|
243 |
done |
|
49555 | 244 |
qed |
245 |
||
246 |
lemma image_lemma_1: |
|
247 |
assumes "finite s" "finite t" "card s = card t" "f ` s = t" "b \<in> t" |
|
248 |
shows "card {s'. \<exists>a\<in>s. s' = s - {a} \<and> f ` s' = t - {b}} = 1" |
|
249 |
proof - |
|
250 |
obtain a where a: "b = f a" "a\<in>s" using assms(4-5) by auto |
|
53185 | 251 |
have inj: "inj_on f s" |
252 |
apply (rule eq_card_imp_inj_on) |
|
253 |
using assms(1-4) apply auto |
|
254 |
done |
|
255 |
have *: "{a \<in> s. f ` (s - {a}) = t - {b}} = {a}" |
|
256 |
apply (rule set_eqI) |
|
257 |
unfolding singleton_iff |
|
49555 | 258 |
apply (rule, rule inj[unfolded inj_on_def, rule_format]) |
53252 | 259 |
unfolding a using a(2) and assms and inj[unfolded inj_on_def] |
260 |
apply auto |
|
49555 | 261 |
done |
53185 | 262 |
show ?thesis |
263 |
apply (rule image_lemma_0) |
|
264 |
unfolding * |
|
265 |
apply auto |
|
266 |
done |
|
49374 | 267 |
qed |
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
268 |
|
49555 | 269 |
lemma image_lemma_2: |
270 |
assumes "finite s" "finite t" "card s = card t" "f ` s \<subseteq> t" "f ` s \<noteq> t" "b \<in> t" |
|
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
271 |
shows "(card {s'. \<exists>a\<in>s. (s' = s - {a}) \<and> f ` s' = t - {b}} = 0) \<or> |
49555 | 272 |
(card {s'. \<exists>a\<in>s. (s' = s - {a}) \<and> f ` s' = t - {b}} = 2)" |
273 |
proof (cases "{a\<in>s. f ` (s - {a}) = t - {b}} = {}") |
|
274 |
case True |
|
275 |
then show ?thesis |
|
276 |
apply - |
|
53185 | 277 |
apply (rule disjI1, rule image_lemma_0) |
53252 | 278 |
using assms(1) |
279 |
apply auto |
|
53185 | 280 |
done |
49555 | 281 |
next |
282 |
let ?M = "{a\<in>s. f ` (s - {a}) = t - {b}}" |
|
283 |
case False |
|
284 |
then obtain a where "a\<in>?M" by auto |
|
285 |
then have a: "a\<in>s" "f ` (s - {a}) = t - {b}" 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
|
286 |
have "f a \<in> t - {b}" using a and assms by auto |
53186 | 287 |
then have "\<exists>c \<in> s - {a}. f a = f c" |
288 |
unfolding image_iff[symmetric] and a by auto |
|
289 |
then obtain c where c: "c \<in> s" "a \<noteq> c" "f a = f c" by auto |
|
49555 | 290 |
then have *: "f ` (s - {c}) = f ` (s - {a})" |
291 |
apply - |
|
292 |
apply (rule set_eqI, rule) |
|
293 |
proof - |
|
294 |
fix x |
|
295 |
assume "x \<in> f ` (s - {a})" |
|
296 |
then obtain y where y: "f y = x" "y\<in>s- {a}" by auto |
|
297 |
then show "x \<in> f ` (s - {c})" |
|
298 |
unfolding image_iff |
|
299 |
apply (rule_tac x = "if y = c then a else y" in bexI) |
|
300 |
using c a apply auto done |
|
301 |
qed auto |
|
53186 | 302 |
have "c\<in>?M" |
303 |
unfolding mem_Collect_eq and * |
|
304 |
using a and c(1) by auto |
|
49555 | 305 |
show ?thesis |
306 |
apply (rule disjI2, rule image_lemma_0) unfolding card_2_exists |
|
53186 | 307 |
apply (rule bexI[OF _ `a\<in>?M`], rule bexI[OF _ `c\<in>?M`], rule, rule `a\<noteq>c`) |
49555 | 308 |
proof (rule, unfold mem_Collect_eq, erule conjE) |
309 |
fix z |
|
310 |
assume as: "z \<in> s" "f ` (s - {z}) = t - {b}" |
|
311 |
have inj: "inj_on f (s - {z})" |
|
312 |
apply (rule eq_card_imp_inj_on) |
|
53186 | 313 |
unfolding as using as(1) and assms |
314 |
apply auto |
|
49555 | 315 |
done |
316 |
show "z = a \<or> z = c" |
|
317 |
proof (rule ccontr) |
|
318 |
assume "\<not> ?thesis" |
|
319 |
then show False |
|
320 |
using inj[unfolded inj_on_def, THEN bspec[where x=a], THEN bspec[where x=c]] |
|
53186 | 321 |
using `a\<in>s` `c\<in>s` `f a = f c` `a\<noteq>c` |
322 |
apply auto |
|
49555 | 323 |
done |
324 |
qed |
|
325 |
qed |
|
326 |
qed |
|
327 |
||
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
328 |
|
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
329 |
subsection {* Combine this with the basic counting lemma. *} |
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
330 |
|
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
331 |
lemma kuhn_complete_lemma: |
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
332 |
assumes "finite simplices" |
49555 | 333 |
"\<forall>f s. face f s \<longleftrightarrow> (\<exists>a\<in>s. f = s - {a})" |
334 |
"\<forall>s\<in>simplices. card s = n + 2" "\<forall>s\<in>simplices. (rl ` s) \<subseteq> {0..n+1}" |
|
335 |
"\<forall>f\<in> {f. \<exists>s\<in>simplices. face f s}. bnd f \<longrightarrow> (card {s\<in>simplices. face f s} = 1)" |
|
336 |
"\<forall>f\<in> {f. \<exists>s\<in>simplices. face f s}. \<not>bnd f \<longrightarrow> (card {s\<in>simplices. face f s} = 2)" |
|
337 |
"odd(card {f\<in>{f. \<exists>s\<in>simplices. face f s}. rl ` f = {0..n} \<and> bnd f})" |
|
53185 | 338 |
shows "odd (card {s\<in>simplices. (rl ` s = {0..n+1})})" |
49555 | 339 |
apply (rule kuhn_counting_lemma) |
340 |
defer |
|
341 |
apply (rule assms)+ |
|
342 |
prefer 3 |
|
343 |
apply (rule assms) |
|
344 |
proof (rule_tac[1-2] ballI impI)+ |
|
345 |
have *: "{f. \<exists>s\<in>simplices. \<exists>a\<in>s. f = s - {a}} = (\<Union>s\<in>simplices. {f. \<exists>a\<in>s. (f = s - {a})})" |
|
346 |
by auto |
|
347 |
have **: "\<forall>s\<in>simplices. card s = n + 2 \<and> finite s" |
|
348 |
using assms(3) by (auto intro: card_ge_0_finite) |
|
349 |
show "finite {f. \<exists>s\<in>simplices. face f s}" |
|
350 |
unfolding assms(2)[rule_format] and * |
|
53252 | 351 |
apply (rule finite_UN_I[OF assms(1)]) |
352 |
using ** |
|
353 |
apply auto |
|
49555 | 354 |
done |
355 |
have *: "\<And>P f s. s\<in>simplices \<Longrightarrow> (f \<in> {f. \<exists>s\<in>simplices. \<exists>a\<in>s. f = s - {a}}) \<and> |
|
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
356 |
(\<exists>a\<in>s. (f = s - {a})) \<and> P f \<longleftrightarrow> (\<exists>a\<in>s. (f = s - {a}) \<and> P f)" by auto |
49555 | 357 |
fix s assume s: "s\<in>simplices" |
358 |
let ?S = "{f \<in> {f. \<exists>s\<in>simplices. face f s}. face f s \<and> rl ` f = {0..n}}" |
|
359 |
have "{0..n + 1} - {n + 1} = {0..n}" by auto |
|
360 |
then have S: "?S = {s'. \<exists>a\<in>s. s' = s - {a} \<and> rl ` s' = {0..n + 1} - {n + 1}}" |
|
361 |
apply - |
|
362 |
apply (rule set_eqI) |
|
53185 | 363 |
unfolding assms(2)[rule_format] mem_Collect_eq |
364 |
unfolding *[OF s, unfolded mem_Collect_eq, where P="\<lambda>x. rl ` x = {0..n}"] |
|
49555 | 365 |
apply auto |
366 |
done |
|
367 |
show "rl ` s = {0..n+1} \<Longrightarrow> card ?S = 1" "rl ` s \<noteq> {0..n+1} \<Longrightarrow> card ?S = 0 \<or> card ?S = 2" |
|
368 |
unfolding S |
|
369 |
apply(rule_tac[!] image_lemma_1 image_lemma_2) |
|
53252 | 370 |
using ** assms(4) and s |
371 |
apply auto |
|
49555 | 372 |
done |
373 |
qed |
|
374 |
||
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
375 |
|
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
376 |
subsection {*We use the following notion of ordering rather than pointwise indexing. *} |
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
377 |
|
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
378 |
definition "kle n x y \<longleftrightarrow> (\<exists>k\<subseteq>{1..n::nat}. (\<forall>j. y(j) = x(j) + (if j \<in> k then (1::nat) else 0)))" |
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
379 |
|
53185 | 380 |
lemma kle_refl [intro]: "kle n x x" |
381 |
unfolding kle_def 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
|
382 |
|
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
383 |
lemma kle_antisym: "kle n x y \<and> kle n y x \<longleftrightarrow> (x = y)" |
53185 | 384 |
unfolding kle_def |
385 |
apply rule |
|
386 |
apply auto |
|
387 |
done |
|
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
388 |
|
53185 | 389 |
lemma pointwise_minimal_pointwise_maximal: |
390 |
fixes s :: "(nat \<Rightarrow> nat) set" |
|
49555 | 391 |
assumes "finite s" "s \<noteq> {}" "\<forall>x\<in>s. \<forall>y\<in>s. (\<forall>j. x j \<le> y j) \<or> (\<forall>j. y j \<le> x j)" |
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
392 |
shows "\<exists>a\<in>s. \<forall>x\<in>s. \<forall>j. a j \<le> x j" "\<exists>a\<in>s. \<forall>x\<in>s. \<forall>j. x j \<le> a j" |
49555 | 393 |
using assms unfolding atomize_conj |
53185 | 394 |
proof (induct s rule: finite_induct) |
49555 | 395 |
fix x and F::"(nat\<Rightarrow>nat) set" |
53185 | 396 |
assume as:"finite F" "x \<notin> F" |
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
397 |
"\<lbrakk>F \<noteq> {}; \<forall>x\<in>F. \<forall>y\<in>F. (\<forall>j. x j \<le> y j) \<or> (\<forall>j. y j \<le> x j)\<rbrakk> |
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
398 |
\<Longrightarrow> (\<exists>a\<in>F. \<forall>x\<in>F. \<forall>j. a j \<le> x j) \<and> (\<exists>a\<in>F. \<forall>x\<in>F. \<forall>j. x j \<le> a j)" "insert x F \<noteq> {}" |
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
399 |
"\<forall>xa\<in>insert x F. \<forall>y\<in>insert x F. (\<forall>j. xa j \<le> y j) \<or> (\<forall>j. y j \<le> xa j)" |
49555 | 400 |
show "(\<exists>a\<in>insert x F. \<forall>x\<in>insert x F. \<forall>j. a j \<le> x j) \<and> (\<exists>a\<in>insert x F. \<forall>x\<in>insert x F. \<forall>j. x j \<le> a j)" |
401 |
proof (cases "F = {}") |
|
402 |
case True |
|
403 |
then show ?thesis |
|
404 |
apply - |
|
405 |
apply (rule, rule_tac[!] x=x in bexI) |
|
406 |
apply auto |
|
407 |
done |
|
408 |
next |
|
409 |
case False |
|
53186 | 410 |
obtain a b where a: "a\<in>insert x F" "\<forall>x\<in>F. \<forall>j. a j \<le> x j" |
411 |
and b: "b \<in> insert x F" "\<forall>x\<in>F. \<forall>j. x j \<le> b j" |
|
412 |
using as(3)[OF False] using as(5) by auto |
|
413 |
have "\<exists>a \<in> insert x F. \<forall>x \<in> insert x F. \<forall>j. a j \<le> x j" |
|
49555 | 414 |
using as(5)[rule_format,OF a(1) insertI1] |
415 |
apply - |
|
416 |
proof (erule disjE) |
|
417 |
assume "\<forall>j. a j \<le> x j" |
|
418 |
then show ?thesis |
|
53185 | 419 |
apply (rule_tac x=a in bexI) |
420 |
using a apply auto |
|
421 |
done |
|
49555 | 422 |
next |
423 |
assume "\<forall>j. x j \<le> a j" |
|
424 |
then show ?thesis |
|
425 |
apply (rule_tac x=x in bexI) |
|
53185 | 426 |
apply (rule, rule) |
427 |
apply (insert a) |
|
49555 | 428 |
apply (erule_tac x=xa in ballE) |
429 |
apply (erule_tac x=j in allE)+ |
|
430 |
apply auto |
|
431 |
done |
|
432 |
qed |
|
433 |
moreover |
|
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
434 |
have "\<exists>b\<in>insert x F. \<forall>x\<in>insert x F. \<forall>j. x j \<le> b j" |
53186 | 435 |
using as(5)[rule_format,OF b(1) insertI1] |
436 |
apply - |
|
49555 | 437 |
proof (erule disjE) |
438 |
assume "\<forall>j. x j \<le> b j" |
|
439 |
then show ?thesis |
|
440 |
apply(rule_tac x=b in bexI) using b |
|
441 |
apply auto |
|
442 |
done |
|
443 |
next |
|
444 |
assume "\<forall>j. b j \<le> x j" |
|
445 |
then show ?thesis |
|
446 |
apply (rule_tac x=x in bexI) |
|
53185 | 447 |
apply (rule, rule) |
448 |
apply (insert b) |
|
49555 | 449 |
apply (erule_tac x=xa in ballE) |
450 |
apply (erule_tac x=j in allE)+ |
|
451 |
apply auto |
|
452 |
done |
|
453 |
qed |
|
454 |
ultimately show ?thesis by auto |
|
455 |
qed |
|
456 |
qed auto |
|
457 |
||
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
458 |
|
53186 | 459 |
lemma kle_imp_pointwise: "kle n x y \<Longrightarrow> (\<forall>j. x j \<le> y j)" |
460 |
unfolding kle_def 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
|
461 |
|
49555 | 462 |
lemma pointwise_antisym: |
463 |
fixes x :: "nat \<Rightarrow> nat" |
|
53252 | 464 |
shows "(\<forall>j. x j \<le> y j) \<and> (\<forall>j. y j \<le> x j) \<longleftrightarrow> x = y" |
49555 | 465 |
apply (rule, rule ext, erule conjE) |
53252 | 466 |
apply (erule_tac x = xa in allE)+ |
49555 | 467 |
apply auto |
468 |
done |
|
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
469 |
|
49555 | 470 |
lemma kle_trans: |
471 |
assumes "kle n x y" "kle n y z" "kle n x z \<or> kle n z x" |
|
472 |
shows "kle n x z" |
|
473 |
using assms |
|
474 |
apply - |
|
475 |
apply (erule disjE) |
|
476 |
apply assumption |
|
477 |
proof - |
|
478 |
case goal1 |
|
479 |
then have "x = z" |
|
480 |
apply - |
|
481 |
apply (rule ext) |
|
482 |
apply (drule kle_imp_pointwise)+ |
|
483 |
apply (erule_tac x=xa in allE)+ |
|
484 |
apply auto |
|
485 |
done |
|
486 |
then show ?case by auto |
|
487 |
qed |
|
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
488 |
|
49555 | 489 |
lemma kle_strict: |
490 |
assumes "kle n x y" "x \<noteq> y" |
|
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
491 |
shows "\<forall>j. x j \<le> y j" "\<exists>k. 1 \<le> k \<and> k \<le> n \<and> x(k) < y(k)" |
49555 | 492 |
apply (rule kle_imp_pointwise[OF assms(1)]) |
493 |
proof - |
|
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
494 |
guess k using assms(1)[unfolded kle_def] .. note k = this |
49555 | 495 |
show "\<exists>k. 1 \<le> k \<and> k \<le> n \<and> x(k) < y(k)" |
53186 | 496 |
proof (cases "k = {}") |
49555 | 497 |
case True |
498 |
then have "x = y" |
|
499 |
apply - |
|
500 |
apply (rule ext) |
|
501 |
using k apply auto |
|
502 |
done |
|
503 |
then show ?thesis using assms(2) by auto |
|
504 |
next |
|
505 |
case False |
|
506 |
then have "(SOME k'. k' \<in> k) \<in> k" |
|
507 |
apply - |
|
508 |
apply (rule someI_ex) |
|
509 |
apply auto |
|
510 |
done |
|
511 |
then show ?thesis |
|
512 |
apply (rule_tac x = "SOME k'. k' \<in> k" in exI) |
|
513 |
using k apply auto |
|
514 |
done |
|
515 |
qed |
|
516 |
qed |
|
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
517 |
|
53185 | 518 |
lemma kle_minimal: |
519 |
assumes "finite s" "s \<noteq> {}" "\<forall>x\<in>s. \<forall>y\<in>s. kle n x y \<or> kle n y x" |
|
520 |
shows "\<exists>a\<in>s. \<forall>x\<in>s. kle n a x" |
|
521 |
proof - |
|
522 |
have "\<exists>a\<in>s. \<forall>x\<in>s. \<forall>j. a j \<le> x j" |
|
523 |
apply (rule pointwise_minimal_pointwise_maximal(1)[OF assms(1-2)]) |
|
524 |
apply (rule, rule) |
|
525 |
apply (drule_tac assms(3)[rule_format], assumption) |
|
53252 | 526 |
using kle_imp_pointwise |
527 |
apply auto |
|
53185 | 528 |
done |
529 |
then guess a .. note a = this |
|
530 |
show ?thesis |
|
53252 | 531 |
apply (rule_tac x = a in bexI) |
53185 | 532 |
proof |
533 |
fix x |
|
534 |
assume "x \<in> s" |
|
535 |
show "kle n a x" |
|
536 |
using assms(3)[rule_format,OF a(1) `x\<in>s`] |
|
537 |
apply - |
|
538 |
proof (erule disjE) |
|
539 |
assume "kle n x a" |
|
53252 | 540 |
then have "x = a" |
53185 | 541 |
apply - |
542 |
unfolding pointwise_antisym[symmetric] |
|
543 |
apply (drule kle_imp_pointwise) |
|
53252 | 544 |
using a(2)[rule_format,OF `x\<in>s`] |
545 |
apply auto |
|
53185 | 546 |
done |
53252 | 547 |
then show ?thesis using kle_refl by auto |
53185 | 548 |
qed |
549 |
qed (insert a, auto) |
|
550 |
qed |
|
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
551 |
|
53185 | 552 |
lemma kle_maximal: |
553 |
assumes "finite s" "s \<noteq> {}" "\<forall>x\<in>s. \<forall>y\<in>s. kle n x y \<or> kle n y x" |
|
554 |
shows "\<exists>a\<in>s. \<forall>x\<in>s. kle n x a" |
|
555 |
proof - |
|
556 |
have "\<exists>a\<in>s. \<forall>x\<in>s. \<forall>j. a j \<ge> x j" |
|
557 |
apply (rule pointwise_minimal_pointwise_maximal(2)[OF assms(1-2)]) |
|
558 |
apply (rule, rule) |
|
559 |
apply (drule_tac assms(3)[rule_format],assumption) |
|
560 |
using kle_imp_pointwise apply auto |
|
561 |
done |
|
562 |
then guess a .. note a = this |
|
563 |
show ?thesis |
|
53186 | 564 |
apply (rule_tac x = a in bexI) |
53185 | 565 |
proof |
566 |
fix x |
|
567 |
assume "x \<in> s" |
|
568 |
show "kle n x a" |
|
569 |
using assms(3)[rule_format,OF a(1) `x\<in>s`] |
|
570 |
apply - |
|
571 |
proof (erule disjE) |
|
572 |
assume "kle n a x" |
|
53674 | 573 |
then have "x = a" |
53185 | 574 |
apply - |
575 |
unfolding pointwise_antisym[symmetric] |
|
576 |
apply (drule kle_imp_pointwise) |
|
577 |
using a(2)[rule_format,OF `x\<in>s`] apply auto |
|
578 |
done |
|
53674 | 579 |
then show ?thesis using kle_refl by auto |
53185 | 580 |
qed |
581 |
qed (insert a, auto) |
|
582 |
qed |
|
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
583 |
|
53185 | 584 |
lemma kle_strict_set: |
585 |
assumes "kle n x y" "x \<noteq> y" |
|
586 |
shows "1 \<le> card {k\<in>{1..n}. x k < y k}" |
|
587 |
proof - |
|
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
588 |
guess i using kle_strict(2)[OF assms] .. |
53674 | 589 |
then have "card {i} \<le> card {k\<in>{1..n}. x k < y k}" |
53185 | 590 |
apply - |
591 |
apply (rule card_mono) |
|
592 |
apply auto |
|
593 |
done |
|
53674 | 594 |
then show ?thesis by auto |
53185 | 595 |
qed |
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
596 |
|
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
597 |
lemma kle_range_combine: |
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
598 |
assumes "kle n x y" "kle n y z" "kle n x z \<or> kle n z x" |
53185 | 599 |
"m1 \<le> card {k\<in>{1..n}. x k < y k}" |
600 |
"m2 \<le> card {k\<in>{1..n}. y k < z k}" |
|
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
601 |
shows "kle n x z \<and> m1 + m2 \<le> card {k\<in>{1..n}. x k < z k}" |
53252 | 602 |
apply (rule, rule kle_trans[OF assms(1-3)]) |
53185 | 603 |
proof - |
604 |
have "\<And>j. x j < y j \<Longrightarrow> x j < z j" |
|
605 |
apply (rule less_le_trans) |
|
53252 | 606 |
using kle_imp_pointwise[OF assms(2)] |
607 |
apply auto |
|
53185 | 608 |
done |
609 |
moreover |
|
610 |
have "\<And>j. y j < z j \<Longrightarrow> x j < z j" |
|
611 |
apply (rule le_less_trans) |
|
53252 | 612 |
using kle_imp_pointwise[OF assms(1)] |
613 |
apply auto |
|
53185 | 614 |
done |
615 |
ultimately |
|
616 |
have *: "{k\<in>{1..n}. x k < y k} \<union> {k\<in>{1..n}. y k < z k} = {k\<in>{1..n}. x k < z k}" |
|
617 |
by auto |
|
618 |
have **: "{k \<in> {1..n}. x k < y k} \<inter> {k \<in> {1..n}. y k < z k} = {}" |
|
619 |
unfolding disjoint_iff_not_equal |
|
620 |
apply (rule, rule, unfold mem_Collect_eq, rule ccontr) |
|
621 |
apply (erule conjE)+ |
|
622 |
proof - |
|
623 |
fix i j |
|
624 |
assume as: "i \<in> {1..n}" "x i < y i" "j \<in> {1..n}" "y j < z j" "\<not> i \<noteq> j" |
|
625 |
guess kx using assms(1)[unfolded kle_def] .. note kx = this |
|
626 |
have "x i < y i" using as by auto |
|
53674 | 627 |
then have "i \<in> kx" using as(1) kx |
53185 | 628 |
apply (rule_tac ccontr) |
629 |
apply auto |
|
630 |
done |
|
53674 | 631 |
then have "x i + 1 = y i" using kx by auto |
53185 | 632 |
moreover |
633 |
guess ky using assms(2)[unfolded kle_def] .. note ky = this |
|
634 |
have "y i < z i" using as by auto |
|
53674 | 635 |
then have "i \<in> ky" using as(1) ky |
53185 | 636 |
apply (rule_tac ccontr) |
637 |
apply auto |
|
638 |
done |
|
53674 | 639 |
then have "y i + 1 = z i" using ky by auto |
53185 | 640 |
ultimately |
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
641 |
have "z i = x i + 2" by auto |
53674 | 642 |
then show False using assms(3) unfolding kle_def |
53185 | 643 |
by (auto simp add: split_if_eq1) |
644 |
qed |
|
645 |
have fin: "\<And>P. finite {x\<in>{1..n::nat}. P x}" by auto |
|
646 |
have "m1 + m2 \<le> card {k\<in>{1..n}. x k < y k} + card {k\<in>{1..n}. y k < z k}" |
|
647 |
using assms(4-5) by auto |
|
648 |
also have "\<dots> \<le> card {k\<in>{1..n}. x k < z k}" |
|
649 |
unfolding card_Un_Int[OF fin fin] unfolding * ** by auto |
|
650 |
finally show " m1 + m2 \<le> card {k \<in> {1..n}. x k < z k}" by auto |
|
651 |
qed |
|
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
652 |
|
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
653 |
lemma kle_range_combine_l: |
53185 | 654 |
assumes "kle n x y" |
655 |
and "kle n y z" |
|
656 |
and "kle n x z \<or> kle n z x" |
|
657 |
and "m \<le> card {k\<in>{1..n}. y(k) < z(k)}" |
|
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
658 |
shows "kle n x z \<and> m \<le> card {k\<in>{1..n}. x(k) < z(k)}" |
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
659 |
using kle_range_combine[OF assms(1-3) _ assms(4), of 0] by auto |
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
660 |
|
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
661 |
lemma kle_range_combine_r: |
53185 | 662 |
assumes "kle n x y" |
663 |
and "kle n y z" |
|
664 |
and "kle n x z \<or> kle n z x" "m \<le> card {k\<in>{1..n}. x k < y k}" |
|
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
665 |
shows "kle n x z \<and> m \<le> card {k\<in>{1..n}. x(k) < z(k)}" |
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
666 |
using kle_range_combine[OF assms(1-3) assms(4), of 0] by auto |
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
667 |
|
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
668 |
lemma kle_range_induct: |
53185 | 669 |
assumes "card s = Suc m" |
670 |
and "\<forall>x\<in>s. \<forall>y\<in>s. kle n x y \<or> kle n y x" |
|
671 |
shows "\<exists>x\<in>s. \<exists>y\<in>s. kle n x y \<and> m \<le> card {k\<in>{1..n}. x k < y k}" |
|
672 |
proof - |
|
673 |
have "finite s" "s\<noteq>{}" using assms(1) |
|
674 |
by (auto intro: card_ge_0_finite) |
|
53674 | 675 |
then show ?thesis using assms |
53185 | 676 |
proof (induct m arbitrary: s) |
677 |
case 0 |
|
53674 | 678 |
then show ?case using kle_refl by auto |
53185 | 679 |
next |
680 |
case (Suc m) |
|
681 |
then obtain a where a: "a \<in> s" "\<forall>x\<in>s. kle n a x" |
|
682 |
using kle_minimal[of s n] by auto |
|
683 |
show ?case |
|
684 |
proof (cases "s \<subseteq> {a}") |
|
685 |
case False |
|
53674 | 686 |
then have "card (s - {a}) = Suc m" "s - {a} \<noteq> {}" |
53185 | 687 |
using card_Diff_singleton[OF _ a(1)] Suc(4) `finite s` by auto |
688 |
then obtain x b where xb:"x\<in>s - {a}" "b\<in>s - {a}" |
|
689 |
"kle n x b" "m \<le> card {k \<in> {1..n}. x k < b k}" |
|
690 |
using Suc(1)[of "s - {a}"] using Suc(5) `finite s` by auto |
|
691 |
have "1 \<le> card {k \<in> {1..n}. a k < x k}" "m \<le> card {k \<in> {1..n}. x k < b k}" |
|
692 |
apply (rule kle_strict_set) |
|
693 |
apply (rule a(2)[rule_format]) |
|
53248 | 694 |
using a and xb |
695 |
apply auto |
|
53185 | 696 |
done |
53674 | 697 |
then show ?thesis |
53185 | 698 |
apply (rule_tac x=a in bexI, rule_tac x=b in bexI) |
699 |
using kle_range_combine[OF a(2)[rule_format] xb(3) Suc(5)[rule_format], of 1 "m"] |
|
53248 | 700 |
using a(1) xb(1-2) |
701 |
apply auto |
|
53185 | 702 |
done |
703 |
next |
|
704 |
case True |
|
53674 | 705 |
then have "s = {a}" using Suc(3) by auto |
706 |
then have "card s = 1" by auto |
|
707 |
then have False using Suc(4) `finite s` by auto |
|
708 |
then show ?thesis by auto |
|
53185 | 709 |
qed |
710 |
qed |
|
711 |
qed |
|
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
712 |
|
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
713 |
lemma kle_Suc: "kle n x y \<Longrightarrow> kle (n + 1) x y" |
53185 | 714 |
unfolding kle_def |
715 |
apply (erule exE) |
|
716 |
apply (rule_tac x=k in exI) |
|
717 |
apply auto |
|
718 |
done |
|
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
719 |
|
53185 | 720 |
lemma kle_trans_1: |
721 |
assumes "kle n x y" |
|
722 |
shows "x j \<le> y j" "y j \<le> x j + 1" |
|
723 |
using assms[unfolded kle_def] 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
|
724 |
|
53185 | 725 |
lemma kle_trans_2: |
726 |
assumes "kle n a b" "kle n b c" "\<forall>j. c j \<le> a j + 1" |
|
727 |
shows "kle n a c" |
|
728 |
proof - |
|
729 |
guess kk1 using assms(1)[unfolded kle_def] .. note kk1 = this |
|
730 |
guess kk2 using assms(2)[unfolded kle_def] .. note kk2 = this |
|
731 |
show ?thesis |
|
732 |
unfolding kle_def |
|
733 |
apply (rule_tac x="kk1 \<union> kk2" in exI) |
|
53252 | 734 |
apply rule |
735 |
defer |
|
53185 | 736 |
proof |
737 |
fix i |
|
738 |
show "c i = a i + (if i \<in> kk1 \<union> kk2 then 1 else 0)" |
|
739 |
proof (cases "i \<in> kk1 \<union> kk2") |
|
740 |
case True |
|
53674 | 741 |
then have "c i \<ge> a i + (if i \<in> kk1 \<union> kk2 then 1 else 0)" |
53185 | 742 |
unfolding kk1[THEN conjunct2,rule_format,of i] kk2[THEN conjunct2,rule_format,of i] |
743 |
by auto |
|
744 |
moreover |
|
745 |
have "c i \<le> a i + (if i \<in> kk1 \<union> kk2 then 1 else 0)" |
|
746 |
using True assms(3) by auto |
|
747 |
ultimately show ?thesis by auto |
|
748 |
next |
|
749 |
case False |
|
53674 | 750 |
then show ?thesis using kk1 kk2 by auto |
53185 | 751 |
qed |
752 |
qed (insert kk1 kk2, auto) |
|
753 |
qed |
|
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
754 |
|
53185 | 755 |
lemma kle_between_r: |
756 |
assumes "kle n a b" "kle n b c" "kle n a x" "kle n c x" |
|
757 |
shows "kle n b x" |
|
758 |
apply (rule kle_trans_2[OF assms(2,4)]) |
|
759 |
proof |
|
760 |
have *: "\<And>c b x::nat. x \<le> c + 1 \<Longrightarrow> c \<le> b \<Longrightarrow> x \<le> b + 1" by auto |
|
761 |
fix j |
|
762 |
show "x j \<le> b j + 1" |
|
763 |
apply (rule *) |
|
53186 | 764 |
using kle_trans_1[OF assms(1),of j] kle_trans_1[OF assms(3), of j] |
765 |
apply auto |
|
53185 | 766 |
done |
767 |
qed |
|
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
768 |
|
53185 | 769 |
lemma kle_between_l: |
770 |
assumes "kle n a b" "kle n b c" "kle n x a" "kle n x c" |
|
771 |
shows "kle n x b" |
|
772 |
apply (rule kle_trans_2[OF assms(3,1)]) |
|
773 |
proof |
|
774 |
have *: "\<And>c b x::nat. c \<le> x + 1 \<Longrightarrow> b \<le> c \<Longrightarrow> b \<le> x + 1" |
|
775 |
by auto |
|
776 |
fix j |
|
777 |
show "b j \<le> x j + 1" |
|
778 |
apply (rule *) |
|
53186 | 779 |
using kle_trans_1[OF assms(2),of j] kle_trans_1[OF assms(4), of j] |
780 |
apply auto |
|
53185 | 781 |
done |
782 |
qed |
|
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
783 |
|
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
784 |
lemma kle_adjacent: |
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
785 |
assumes "\<forall>j. b j = (if j = k then a(j) + 1 else a j)" "kle n a x" "kle n x b" |
53252 | 786 |
shows "x = a \<or> x = b" |
53185 | 787 |
proof (cases "x k = a k") |
788 |
case True |
|
789 |
show ?thesis |
|
53186 | 790 |
apply (rule disjI1) |
791 |
apply (rule ext) |
|
53185 | 792 |
proof - |
793 |
fix j |
|
794 |
have "x j \<le> a j" using kle_imp_pointwise[OF assms(3),THEN spec[where x=j]] |
|
53186 | 795 |
unfolding assms(1)[rule_format] |
796 |
apply - |
|
797 |
apply(cases "j = k") |
|
798 |
using True |
|
799 |
apply auto |
|
800 |
done |
|
53252 | 801 |
then show "x j = a j" |
802 |
using kle_imp_pointwise[OF assms(2),THEN spec[where x=j]] by auto |
|
53185 | 803 |
qed |
804 |
next |
|
805 |
case False |
|
806 |
show ?thesis apply(rule disjI2,rule ext) |
|
807 |
proof - |
|
808 |
fix j |
|
53248 | 809 |
have "x j \<ge> b j" |
810 |
using kle_imp_pointwise[OF assms(2),THEN spec[where x=j]] |
|
811 |
unfolding assms(1)[rule_format] |
|
812 |
apply - |
|
813 |
apply(cases "j = k") |
|
53185 | 814 |
using False by auto |
53252 | 815 |
then show "x j = b j" |
53248 | 816 |
using kle_imp_pointwise[OF assms(3),THEN spec[where x=j]] |
53185 | 817 |
by auto |
818 |
qed |
|
819 |
qed |
|
820 |
||
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
821 |
|
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
822 |
subsection {* kuhn's notion of a simplex (a reformulation to avoid so much indexing). *} |
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
823 |
|
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
824 |
definition "ksimplex p n (s::(nat \<Rightarrow> nat) set) \<longleftrightarrow> |
53674 | 825 |
card s = n + 1 \<and> |
826 |
(\<forall>x\<in>s. \<forall>j. x j \<le> p) \<and> |
|
827 |
(\<forall>x\<in>s. \<forall>j. j \<notin> {1..n} \<longrightarrow> x j = p) \<and> |
|
828 |
(\<forall>x\<in>s. \<forall>y\<in>s. kle n x y \<or> kle n y x)" |
|
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
829 |
|
53185 | 830 |
lemma ksimplexI: |
831 |
"card s = n + 1 \<Longrightarrow> |
|
832 |
\<forall>x\<in>s. \<forall>j. x j \<le> p \<Longrightarrow> |
|
833 |
\<forall>x\<in>s. \<forall>j. j \<notin> {1..n} \<longrightarrow> x j = p \<Longrightarrow> |
|
834 |
\<forall>x\<in>s. \<forall>y\<in>s. kle n x y \<or> kle n y x \<Longrightarrow> |
|
835 |
ksimplex p n s" |
|
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
836 |
unfolding ksimplex_def by auto |
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
837 |
|
53185 | 838 |
lemma ksimplex_eq: |
839 |
"ksimplex p n (s::(nat \<Rightarrow> nat) set) \<longleftrightarrow> |
|
840 |
(card s = n + 1 \<and> finite s \<and> |
|
841 |
(\<forall>x\<in>s. \<forall>j. x(j) \<le> p) \<and> |
|
842 |
(\<forall>x\<in>s. \<forall>j. j\<notin>{1..n} \<longrightarrow> (x j = p)) \<and> |
|
843 |
(\<forall>x\<in>s. \<forall>y\<in>s. kle n x y \<or> kle n y x))" |
|
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
844 |
unfolding ksimplex_def by (auto intro: card_ge_0_finite) |
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
845 |
|
53185 | 846 |
lemma ksimplex_extrema: |
847 |
assumes "ksimplex p n s" |
|
848 |
obtains a b where "a \<in> s" "b \<in> s" |
|
849 |
"\<forall>x\<in>s. kle n a x \<and> kle n x b" "\<forall>i. b(i) = (if i \<in> {1..n} then a(i) + 1 else a(i))" |
|
850 |
proof (cases "n = 0") |
|
851 |
case True |
|
852 |
obtain x where *: "s = {x}" |
|
853 |
using assms[unfolded ksimplex_eq True,THEN conjunct1] |
|
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
854 |
unfolding add_0_left card_1_exists by auto |
53185 | 855 |
show ?thesis |
856 |
apply (rule that[of x x]) unfolding * True |
|
857 |
apply auto |
|
858 |
done |
|
859 |
next |
|
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
860 |
note assm = assms[unfolded ksimplex_eq] |
53185 | 861 |
case False |
862 |
have "s\<noteq>{}" using assm by auto |
|
863 |
obtain a where a: "a \<in> s" "\<forall>x\<in>s. kle n a x" |
|
864 |
using `s\<noteq>{}` assm using kle_minimal[of s n] by auto |
|
865 |
obtain b where b: "b \<in> s" "\<forall>x\<in>s. kle n x b" |
|
866 |
using `s\<noteq>{}` assm using kle_maximal[of s n] by auto |
|
53248 | 867 |
obtain c d where c_d: "c \<in> s" "d \<in> s" "kle n c d" "n \<le> card {k \<in> {1..n}. c k < d k}" |
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
868 |
using kle_range_induct[of s n n] using assm by auto |
53185 | 869 |
have "kle n c b \<and> n \<le> card {k \<in> {1..n}. c k < b k}" |
870 |
apply (rule kle_range_combine_r[where y=d]) |
|
53252 | 871 |
using c_d a b |
872 |
apply auto |
|
53185 | 873 |
done |
53674 | 874 |
then have "kle n a b \<and> n \<le> card {k\<in>{1..n}. a(k) < b(k)}" |
53185 | 875 |
apply - |
876 |
apply (rule kle_range_combine_l[where y=c]) |
|
53252 | 877 |
using a `c \<in> s` `b \<in> s` |
878 |
apply auto |
|
53185 | 879 |
done |
880 |
moreover |
|
881 |
have "card {1..n} \<ge> card {k\<in>{1..n}. a(k) < b(k)}" |
|
882 |
by (rule card_mono) auto |
|
883 |
ultimately |
|
884 |
have *: "{k\<in>{1 .. n}. a k < b k} = {1..n}" |
|
885 |
apply - |
|
886 |
apply (rule card_subset_eq) |
|
887 |
apply auto |
|
888 |
done |
|
889 |
show ?thesis |
|
890 |
apply (rule that[OF a(1) b(1)]) |
|
891 |
defer |
|
892 |
apply (subst *[symmetric]) unfolding mem_Collect_eq |
|
893 |
proof |
|
894 |
guess k using a(2)[rule_format,OF b(1),unfolded kle_def] .. note k = this |
|
895 |
fix i |
|
896 |
show "b i = (if i \<in> {1..n} \<and> a i < b i then a i + 1 else a i)" |
|
897 |
proof (cases "i \<in> {1..n}") |
|
898 |
case True |
|
53674 | 899 |
then show ?thesis unfolding k[THEN conjunct2,rule_format] by auto |
53185 | 900 |
next |
901 |
case False |
|
902 |
have "a i = p" using assm and False `a\<in>s` by auto |
|
903 |
moreover have "b i = p" using assm and False `b\<in>s` by auto |
|
904 |
ultimately show ?thesis by auto |
|
905 |
qed |
|
906 |
qed(insert a(2) b(2) assm, auto) |
|
907 |
qed |
|
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
908 |
|
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
909 |
lemma ksimplex_extrema_strong: |
53185 | 910 |
assumes "ksimplex p n s" "n \<noteq> 0" |
911 |
obtains a b where "a \<in> s" "b \<in> s" "a \<noteq> b" |
|
912 |
"\<forall>x\<in>s. kle n a x \<and> kle n x b" "\<forall>i. b(i) = (if i \<in> {1..n} then a(i) + 1 else a(i))" |
|
913 |
proof - |
|
914 |
obtain a b where ab: "a \<in> s" "b \<in> s" |
|
915 |
"\<forall>x\<in>s. kle n a x \<and> kle n x b" "\<forall>i. b(i) = (if i \<in> {1..n} then a(i) + 1 else a(i))" |
|
916 |
apply (rule ksimplex_extrema[OF assms(1)]) |
|
917 |
apply auto |
|
918 |
done |
|
919 |
have "a \<noteq> b" |
|
920 |
apply (rule notI) |
|
921 |
apply (drule cong[of _ _ 1 1]) |
|
922 |
using ab(4) assms(2) apply auto |
|
923 |
done |
|
53674 | 924 |
then show ?thesis |
53185 | 925 |
apply (rule_tac that[of a b]) |
926 |
using ab apply auto |
|
927 |
done |
|
928 |
qed |
|
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
929 |
|
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
930 |
lemma ksimplexD: |
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
931 |
assumes "ksimplex p n s" |
53185 | 932 |
shows "card s = n + 1" "finite s" "card s = n + 1" |
933 |
"\<forall>x\<in>s. \<forall>j. x j \<le> p" "\<forall>x\<in>s. \<forall>j. j \<notin> {1..n} \<longrightarrow> x j = p" |
|
934 |
"\<forall>x\<in>s. \<forall>y\<in>s. kle n x y \<or> kle n y x" |
|
935 |
using assms unfolding ksimplex_eq 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
|
936 |
|
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
937 |
lemma ksimplex_successor: |
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
938 |
assumes "ksimplex p n s" "a \<in> s" |
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
939 |
shows "(\<forall>x\<in>s. kle n x a) \<or> (\<exists>y\<in>s. \<exists>k\<in>{1..n}. \<forall>j. y(j) = (if j = k then a(j) + 1 else a(j)))" |
53185 | 940 |
proof (cases "\<forall>x\<in>s. kle n x a") |
941 |
case True |
|
53674 | 942 |
then show ?thesis by auto |
53185 | 943 |
next |
944 |
note assm = ksimplexD[OF assms(1)] |
|
945 |
case False |
|
946 |
then obtain b where b: "b\<in>s" "\<not> kle n b a" "\<forall>x\<in>{x \<in> s. \<not> kle n x a}. kle n b x" |
|
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
947 |
using kle_minimal[of "{x\<in>s. \<not> kle n x a}" n] and assm by auto |
53252 | 948 |
then have **: "1 \<le> card {k\<in>{1..n}. a k < b k}" |
53185 | 949 |
apply - |
950 |
apply (rule kle_strict_set) |
|
53252 | 951 |
using assm(6) and `a\<in>s` |
952 |
apply (auto simp add:kle_refl) |
|
53185 | 953 |
done |
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
954 |
|
53185 | 955 |
let ?kle1 = "{x \<in> s. \<not> kle n x a}" |
956 |
have "card ?kle1 > 0" |
|
957 |
apply (rule ccontr) |
|
53252 | 958 |
using assm(2) and False |
959 |
apply auto |
|
53185 | 960 |
done |
53674 | 961 |
then have sizekle1: "card ?kle1 = Suc (card ?kle1 - 1)" |
53185 | 962 |
using assm(2) by auto |
963 |
obtain c d where c_d: "c \<in> s" "\<not> kle n c a" "d \<in> s" "\<not> kle n d a" |
|
964 |
"kle n c d" "card ?kle1 - 1 \<le> card {k \<in> {1..n}. c k < d k}" |
|
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
965 |
using kle_range_induct[OF sizekle1, of n] using assm by auto |
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
966 |
|
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
967 |
let ?kle2 = "{x \<in> s. kle n x a}" |
53185 | 968 |
have "card ?kle2 > 0" |
969 |
apply (rule ccontr) |
|
53252 | 970 |
using assm(6)[rule_format,of a a] and `a\<in>s` and assm(2) |
971 |
apply auto |
|
53185 | 972 |
done |
53674 | 973 |
then have sizekle2: "card ?kle2 = Suc (card ?kle2 - 1)" |
53185 | 974 |
using assm(2) by auto |
975 |
obtain e f where e_f: "e \<in> s" "kle n e a" "f \<in> s" "kle n f a" |
|
976 |
"kle n e f" "card ?kle2 - 1 \<le> card {k \<in> {1..n}. e k < f k}" |
|
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
977 |
using kle_range_induct[OF sizekle2, of n] using assm by auto |
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
978 |
|
53185 | 979 |
have "card {k\<in>{1..n}. a k < b k} = 1" |
980 |
proof (rule ccontr) |
|
981 |
case goal1 |
|
53674 | 982 |
then have as: "card {k\<in>{1..n}. a k < b k} \<ge> 2" |
53185 | 983 |
using ** by auto |
984 |
have *: "finite ?kle2" "finite ?kle1" "?kle2 \<union> ?kle1 = s" "?kle2 \<inter> ?kle1 = {}" |
|
985 |
using assm(2) by auto |
|
986 |
have "(card ?kle2 - 1) + 2 + (card ?kle1 - 1) = card ?kle2 + card ?kle1" |
|
987 |
using sizekle1 sizekle2 by auto |
|
988 |
also have "\<dots> = n + 1" |
|
989 |
unfolding card_Un_Int[OF *(1-2)] *(3-) using assm(3) by auto |
|
990 |
finally have n: "(card ?kle2 - 1) + (2 + (card ?kle1 - 1)) = n + 1" |
|
991 |
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
|
992 |
have "kle n e a \<and> card {x \<in> s. kle n x a} - 1 \<le> card {k \<in> {1..n}. e k < a k}" |
53185 | 993 |
apply (rule kle_range_combine_r[where y=f]) |
53252 | 994 |
using e_f using `a\<in>s` assm(6) |
995 |
apply auto |
|
53185 | 996 |
done |
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
997 |
moreover have "kle n b d \<and> card {x \<in> s. \<not> kle n x a} - 1 \<le> card {k \<in> {1..n}. b k < d k}" |
53185 | 998 |
apply (rule kle_range_combine_l[where y=c]) |
53252 | 999 |
using c_d using assm(6) and b |
1000 |
apply auto |
|
53185 | 1001 |
done |
53674 | 1002 |
then have "kle n a d \<and> 2 + (card {x \<in> s. \<not> kle n x a} - 1) \<le> card {k \<in> {1..n}. a k < d k}" |
53185 | 1003 |
apply - |
1004 |
apply (rule kle_range_combine[where y=b]) using as and b assm(6) `a\<in>s` `d\<in>s` |
|
1005 |
apply blast+ |
|
1006 |
done |
|
1007 |
ultimately |
|
1008 |
have "kle n e d \<and> (card ?kle2 - 1) + (2 + (card ?kle1 - 1)) \<le> card {k\<in>{1..n}. e k < d k}" |
|
1009 |
apply - |
|
1010 |
apply (rule kle_range_combine[where y=a]) using assm(6)[rule_format,OF `e\<in>s` `d\<in>s`] |
|
1011 |
apply blast+ |
|
1012 |
done |
|
1013 |
moreover have "card {k \<in> {1..n}. e k < d k} \<le> card {1..n}" |
|
1014 |
by (rule card_mono) auto |
|
1015 |
ultimately show False unfolding n by auto |
|
1016 |
qed |
|
1017 |
then guess k unfolding card_1_exists .. note k = this[unfolded mem_Collect_eq] |
|
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
1018 |
|
53185 | 1019 |
show ?thesis |
1020 |
apply (rule disjI2) |
|
1021 |
apply (rule_tac x=b in bexI, rule_tac x=k in bexI) |
|
1022 |
proof |
|
1023 |
fix j :: nat |
|
1024 |
have "kle n a b" |
|
1025 |
using b and assm(6)[rule_format, OF `a\<in>s` `b\<in>s`] by auto |
|
1026 |
then guess kk unfolding kle_def .. note kk_raw = this |
|
1027 |
note kk = this[THEN conjunct2, rule_format] |
|
1028 |
have kkk: "k \<in> kk" |
|
1029 |
apply (rule ccontr) |
|
1030 |
using k(1) |
|
53252 | 1031 |
unfolding kk |
1032 |
apply auto |
|
53185 | 1033 |
done |
1034 |
show "b j = (if j = k then a j + 1 else a j)" |
|
1035 |
proof (cases "j \<in> kk") |
|
1036 |
case True |
|
53252 | 1037 |
then have "j = k" |
1038 |
apply - |
|
1039 |
apply (rule k(2)[rule_format]) |
|
1040 |
using kk_raw kkk |
|
1041 |
apply auto |
|
1042 |
done |
|
1043 |
then show ?thesis unfolding kk using kkk by auto |
|
53185 | 1044 |
next |
1045 |
case False |
|
53252 | 1046 |
then have "j \<noteq> k" |
53185 | 1047 |
using k(2)[rule_format, of j k] and kk_raw kkk by auto |
53252 | 1048 |
then show ?thesis unfolding kk using kkk and False |
53185 | 1049 |
by auto |
1050 |
qed |
|
53252 | 1051 |
qed (insert k(1) `b\<in>s`, auto) |
53185 | 1052 |
qed |
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
1053 |
|
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
1054 |
lemma ksimplex_predecessor: |
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
1055 |
assumes "ksimplex p n s" "a \<in> s" |
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
1056 |
shows "(\<forall>x\<in>s. kle n a x) \<or> (\<exists>y\<in>s. \<exists>k\<in>{1..n}. \<forall>j. a(j) = (if j = k then y(j) + 1 else y(j)))" |
53185 | 1057 |
proof (cases "\<forall>x\<in>s. kle n a x") |
1058 |
case True |
|
53674 | 1059 |
then show ?thesis by auto |
53185 | 1060 |
next |
1061 |
note assm = ksimplexD[OF assms(1)] |
|
1062 |
case False |
|
1063 |
then obtain b where b:"b\<in>s" "\<not> kle n a b" "\<forall>x\<in>{x \<in> s. \<not> kle n a x}. kle n x b" |
|
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
1064 |
using kle_maximal[of "{x\<in>s. \<not> kle n a x}" n] and assm by auto |
53674 | 1065 |
then have **: "1 \<le> card {k\<in>{1..n}. a k > b k}" |
53185 | 1066 |
apply - |
1067 |
apply (rule kle_strict_set) |
|
53252 | 1068 |
using assm(6) and `a\<in>s` |
1069 |
apply (auto simp add: kle_refl) |
|
53185 | 1070 |
done |
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
1071 |
|
53185 | 1072 |
let ?kle1 = "{x \<in> s. \<not> kle n a x}" |
1073 |
have "card ?kle1 > 0" |
|
1074 |
apply (rule ccontr) |
|
53252 | 1075 |
using assm(2) and False |
1076 |
apply auto |
|
53185 | 1077 |
done |
53674 | 1078 |
then have sizekle1: "card ?kle1 = Suc (card ?kle1 - 1)" |
53185 | 1079 |
using assm(2) by auto |
1080 |
obtain c d where c_d: "c \<in> s" "\<not> kle n a c" "d \<in> s" "\<not> kle n a d" |
|
1081 |
"kle n d c" "card ?kle1 - 1 \<le> card {k \<in> {1..n}. c k > d k}" |
|
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
1082 |
using kle_range_induct[OF sizekle1, of n] using assm by auto |
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
1083 |
|
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
1084 |
let ?kle2 = "{x \<in> s. kle n a x}" |
53185 | 1085 |
have "card ?kle2 > 0" |
1086 |
apply (rule ccontr) |
|
53252 | 1087 |
using assm(6)[rule_format,of a a] and `a\<in>s` and assm(2) |
1088 |
apply auto |
|
53185 | 1089 |
done |
53674 | 1090 |
then have sizekle2:"card ?kle2 = Suc (card ?kle2 - 1)" |
53185 | 1091 |
using assm(2) by auto |
1092 |
obtain e f where e_f: "e \<in> s" "kle n a e" "f \<in> s" "kle n a f" |
|
1093 |
"kle n f e" "card ?kle2 - 1 \<le> card {k \<in> {1..n}. e k > f k}" |
|
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
1094 |
using kle_range_induct[OF sizekle2, of n] using assm by auto |
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
1095 |
|
53185 | 1096 |
have "card {k\<in>{1..n}. a k > b k} = 1" |
1097 |
proof (rule ccontr) |
|
1098 |
case goal1 |
|
53674 | 1099 |
then have as: "card {k\<in>{1..n}. a k > b k} \<ge> 2" |
53185 | 1100 |
using ** by auto |
1101 |
have *: "finite ?kle2" "finite ?kle1" "?kle2 \<union> ?kle1 = s" "?kle2 \<inter> ?kle1 = {}" |
|
1102 |
using assm(2) by auto |
|
1103 |
have "(card ?kle2 - 1) + 2 + (card ?kle1 - 1) = card ?kle2 + card ?kle1" |
|
1104 |
using sizekle1 sizekle2 by auto |
|
1105 |
also have "\<dots> = n + 1" |
|
1106 |
unfolding card_Un_Int[OF *(1-2)] *(3-) using assm(3) by auto |
|
1107 |
finally have n: "(card ?kle1 - 1) + 2 + (card ?kle2 - 1) = n + 1" |
|
1108 |
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
|
1109 |
have "kle n a e \<and> card {x \<in> s. kle n a x} - 1 \<le> card {k \<in> {1..n}. e k > a k}" |
53185 | 1110 |
apply (rule kle_range_combine_l[where y=f]) |
53252 | 1111 |
using e_f and `a\<in>s` assm(6) |
1112 |
apply auto |
|
53185 | 1113 |
done |
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
1114 |
moreover have "kle n d b \<and> card {x \<in> s. \<not> kle n a x} - 1 \<le> card {k \<in> {1..n}. b k > d k}" |
53185 | 1115 |
apply (rule kle_range_combine_r[where y=c]) |
53252 | 1116 |
using c_d and assm(6) and b |
1117 |
apply auto |
|
53185 | 1118 |
done |
53674 | 1119 |
then have "kle n d a \<and> (card {x \<in> s. \<not> kle n a x} - 1) + 2 \<le> card {k \<in> {1..n}. a k > d k}" |
53185 | 1120 |
apply - |
1121 |
apply (rule kle_range_combine[where y=b]) using as and b assm(6) `a\<in>s` `d\<in>s` |
|
1122 |
apply blast+ |
|
1123 |
done |
|
1124 |
ultimately have "kle n d e \<and> (card ?kle1 - 1 + 2) + (card ?kle2 - 1) \<le> card {k\<in>{1..n}. e k > d k}" |
|
1125 |
apply - |
|
1126 |
apply (rule kle_range_combine[where y=a]) |
|
53252 | 1127 |
using assm(6)[rule_format,OF `e\<in>s` `d\<in>s`] |
1128 |
apply blast+ |
|
53185 | 1129 |
done |
1130 |
moreover have "card {k \<in> {1..n}. e k > d k} \<le> card {1..n}" |
|
1131 |
by (rule card_mono) auto |
|
1132 |
ultimately show False unfolding n by auto |
|
1133 |
qed |
|
1134 |
then guess k unfolding card_1_exists .. note k = this[unfolded mem_Collect_eq] |
|
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
1135 |
|
53185 | 1136 |
show ?thesis |
1137 |
apply (rule disjI2) |
|
1138 |
apply (rule_tac x=b in bexI,rule_tac x=k in bexI) |
|
1139 |
proof |
|
1140 |
fix j :: nat |
|
1141 |
have "kle n b a" |
|
1142 |
using b and assm(6)[rule_format, OF `a\<in>s` `b\<in>s`] by auto |
|
1143 |
then guess kk unfolding kle_def .. note kk_raw = this |
|
1144 |
note kk = this[THEN conjunct2,rule_format] |
|
1145 |
have kkk: "k \<in> kk" |
|
1146 |
apply (rule ccontr) |
|
1147 |
using k(1) |
|
1148 |
unfolding kk |
|
1149 |
apply auto |
|
1150 |
done |
|
1151 |
show "a j = (if j = k then b j + 1 else b j)" |
|
1152 |
proof (cases "j \<in> kk") |
|
1153 |
case True |
|
53674 | 1154 |
then have "j = k" |
53185 | 1155 |
apply - |
1156 |
apply (rule k(2)[rule_format]) |
|
53252 | 1157 |
using kk_raw kkk |
1158 |
apply auto |
|
53185 | 1159 |
done |
53674 | 1160 |
then show ?thesis unfolding kk using kkk by auto |
53185 | 1161 |
next |
1162 |
case False |
|
53674 | 1163 |
then have "j \<noteq> k" using k(2)[rule_format, of j k] |
53185 | 1164 |
using kk_raw kkk by auto |
53674 | 1165 |
then show ?thesis unfolding kk |
53185 | 1166 |
using kkk and False by auto |
1167 |
qed |
|
53186 | 1168 |
qed (insert k(1) `b\<in>s`, auto) |
53185 | 1169 |
qed |
1170 |
||
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
1171 |
|
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
1172 |
subsection {* The lemmas about simplices that we need. *} |
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
1173 |
|
53185 | 1174 |
(* FIXME: These are clones of lemmas in Library/FuncSet *) |
1175 |
lemma card_funspace': |
|
1176 |
assumes "finite s" "finite t" "card s = m" "card t = n" |
|
1177 |
shows "card {f. (\<forall>x\<in>s. f x \<in> t) \<and> (\<forall>x\<in>UNIV - s. f x = d)} = n ^ m" (is "card (?M s) = _") |
|
1178 |
using assms |
|
1179 |
apply - |
|
1180 |
proof (induct m arbitrary: s) |
|
53252 | 1181 |
case 0 |
1182 |
have [simp]: "{f. \<forall>x. f x = d} = {\<lambda>x. d}" |
|
53185 | 1183 |
apply (rule set_eqI,rule) |
1184 |
unfolding mem_Collect_eq |
|
1185 |
apply (rule, rule ext) |
|
1186 |
apply auto |
|
1187 |
done |
|
53252 | 1188 |
from 0 show ?case by auto |
53185 | 1189 |
next |
1190 |
case (Suc m) |
|
1191 |
guess a using card_eq_SucD[OF Suc(4)] .. |
|
1192 |
then guess s0 by (elim exE conjE) note as0 = this |
|
1193 |
have **: "card s0 = m" |
|
1194 |
using as0 using Suc(2) Suc(4) by auto |
|
1195 |
let ?l = "(\<lambda>(b, g) x. if x = a then b else g x)" |
|
1196 |
have *: "?M (insert a s0) = ?l ` {(b,g). b\<in>t \<and> g\<in>?M s0}" |
|
1197 |
apply (rule set_eqI, rule) |
|
1198 |
unfolding mem_Collect_eq image_iff |
|
1199 |
apply (erule conjE) |
|
1200 |
apply (rule_tac x="(x a, \<lambda>y. if y\<in>s0 then x y else d)" in bexI) |
|
1201 |
apply (rule ext) |
|
1202 |
prefer 3 |
|
1203 |
apply rule |
|
1204 |
defer |
|
53186 | 1205 |
apply (erule bexE, rule) |
53185 | 1206 |
unfolding mem_Collect_eq |
1207 |
apply (erule splitE)+ |
|
1208 |
apply (erule conjE)+ |
|
1209 |
proof - |
|
1210 |
fix x xa xb xc y |
|
1211 |
assume as: "x = (\<lambda>(b, g) x. if x = a then b else g x) xa" |
|
1212 |
"xb \<in> UNIV - insert a s0" "xa = (xc, y)" "xc \<in> t" |
|
1213 |
"\<forall>x\<in>s0. y x \<in> t" "\<forall>x\<in>UNIV - s0. y x = d" |
|
53674 | 1214 |
then show "x xb = d" unfolding as by auto |
53185 | 1215 |
qed auto |
1216 |
have inj: "inj_on ?l {(b,g). b\<in>t \<and> g\<in>?M s0}" |
|
1217 |
unfolding inj_on_def |
|
1218 |
apply (rule, rule, rule) |
|
1219 |
unfolding mem_Collect_eq |
|
1220 |
apply (erule splitE conjE)+ |
|
1221 |
proof - |
|
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
1222 |
case goal1 note as = this(1,4-)[unfolded goal1 split_conv] |
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
1223 |
have "xa = xb" using as(1)[THEN cong[of _ _ a]] by auto |
53185 | 1224 |
moreover have "ya = yb" |
1225 |
proof (rule ext) |
|
1226 |
fix x |
|
1227 |
show "ya x = yb x" |
|
1228 |
proof (cases "x = a") |
|
1229 |
case False |
|
53674 | 1230 |
then show ?thesis using as(1)[THEN cong[of _ _ x x]] by auto |
53185 | 1231 |
next |
1232 |
case True |
|
53674 | 1233 |
then show ?thesis using as(5,7) using as0(2) by auto |
53185 | 1234 |
qed |
1235 |
qed |
|
1236 |
ultimately show ?case unfolding goal1 by auto |
|
1237 |
qed |
|
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
1238 |
have "finite s0" using `finite s` unfolding as0 by simp |
53185 | 1239 |
show ?case |
1240 |
unfolding as0 * card_image[OF inj] |
|
1241 |
using assms |
|
1242 |
unfolding SetCompr_Sigma_eq |
|
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
1243 |
unfolding card_cartesian_product |
53185 | 1244 |
using Suc(1)[OF `finite s0` `finite t` ** `card t = n`] |
1245 |
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
|
1246 |
qed |
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
1247 |
|
53185 | 1248 |
lemma card_funspace: |
1249 |
assumes "finite s" "finite t" |
|
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
1250 |
shows "card {f. (\<forall>x\<in>s. f x \<in> t) \<and> (\<forall>x\<in>UNIV - s. f x = d)} = (card t) ^ (card s)" |
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
1251 |
using assms by (auto intro: card_funspace') |
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
1252 |
|
53185 | 1253 |
lemma finite_funspace: |
1254 |
assumes "finite s" "finite t" |
|
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
1255 |
shows "finite {f. (\<forall>x\<in>s. f x \<in> t) \<and> (\<forall>x\<in>UNIV - s. f x = d)}" (is "finite ?S") |
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
1256 |
proof (cases "card t > 0") |
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
1257 |
case True |
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
1258 |
have "card ?S = (card t) ^ (card s)" |
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
1259 |
using assms by (auto intro!: card_funspace) |
53674 | 1260 |
then show ?thesis using True by (rule_tac card_ge_0_finite) simp |
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
1261 |
next |
53674 | 1262 |
case False then have "t = {}" using `finite t` 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
|
1263 |
show ?thesis |
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
1264 |
proof (cases "s = {}") |
53186 | 1265 |
have *: "{f. \<forall>x. f x = d} = {\<lambda>x. d}" by auto |
53185 | 1266 |
case True |
53674 | 1267 |
then show ?thesis using `t = {}` by (auto simp: *) |
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
1268 |
next |
53185 | 1269 |
case False |
53674 | 1270 |
then show ?thesis using `t = {}` by simp |
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
1271 |
qed |
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
1272 |
qed |
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
1273 |
|
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
1274 |
lemma finite_simplices: "finite {s. ksimplex p n s}" |
53185 | 1275 |
apply (rule finite_subset[of _ "{s. s\<subseteq>{f. (\<forall>i\<in>{1..n}. f i \<in> {0..p}) \<and> (\<forall>i\<in>UNIV-{1..n}. f i = p)}}"]) |
1276 |
unfolding ksimplex_def |
|
1277 |
defer |
|
1278 |
apply (rule finite_Collect_subsets) |
|
1279 |
apply (rule finite_funspace) |
|
1280 |
apply auto |
|
1281 |
done |
|
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
1282 |
|
53185 | 1283 |
lemma simplex_top_face: |
1284 |
assumes "0 < p" "\<forall>x\<in>f. x (n + 1) = p" |
|
1285 |
shows "(\<exists>s a. ksimplex p (n + 1) s \<and> a \<in> s \<and> (f = s - {a})) \<longleftrightarrow> ksimplex p n f" (is "?ls = ?rs") |
|
1286 |
proof |
|
1287 |
assume ?ls |
|
1288 |
then guess s .. |
|
1289 |
then guess a by (elim exE conjE) note sa = this |
|
1290 |
show ?rs |
|
1291 |
unfolding ksimplex_def sa(3) |
|
1292 |
apply rule |
|
1293 |
defer |
|
1294 |
apply rule |
|
1295 |
defer |
|
1296 |
apply (rule, rule, rule, rule) |
|
1297 |
defer |
|
1298 |
apply (rule, rule) |
|
1299 |
proof - |
|
1300 |
fix x y |
|
1301 |
assume as: "x \<in>s - {a}" "y \<in>s - {a}" |
|
1302 |
have xyp: "x (n + 1) = y (n + 1)" |
|
1303 |
using as(1)[unfolded sa(3)[symmetric], THEN assms(2)[rule_format]] |
|
1304 |
using as(2)[unfolded sa(3)[symmetric], THEN assms(2)[rule_format]] |
|
1305 |
by auto |
|
1306 |
show "kle n x y \<or> kle n y x" |
|
1307 |
proof (cases "kle (n + 1) x y") |
|
1308 |
case True |
|
1309 |
then guess k unfolding kle_def .. note k = this |
|
53674 | 1310 |
then have *: "n + 1 \<notin> k" using xyp by auto |
53185 | 1311 |
have "\<not> (\<exists>x\<in>k. x\<notin>{1..n})" |
53252 | 1312 |
apply (rule notI) |
1313 |
apply (erule bexE) |
|
53185 | 1314 |
proof - |
1315 |
fix x |
|
1316 |
assume as: "x \<in> k" "x \<notin> {1..n}" |
|
1317 |
have "x \<noteq> n + 1" using as and * by auto |
|
53674 | 1318 |
then show False using as and k[THEN conjunct1,unfolded subset_eq] by auto |
53185 | 1319 |
qed |
53674 | 1320 |
then show ?thesis |
53185 | 1321 |
apply - |
1322 |
apply (rule disjI1) |
|
1323 |
unfolding kle_def |
|
1324 |
using k |
|
1325 |
apply (rule_tac x=k in exI) |
|
1326 |
apply auto |
|
1327 |
done |
|
1328 |
next |
|
1329 |
case False |
|
53674 | 1330 |
then have "kle (n + 1) y x" |
53185 | 1331 |
using ksimplexD(6)[OF sa(1),rule_format, of x y] and as by auto |
1332 |
then guess k unfolding kle_def .. note k = this |
|
53252 | 1333 |
then have *: "n + 1 \<notin> k" using xyp by auto |
1334 |
then have "\<not> (\<exists>x\<in>k. x\<notin>{1..n})" |
|
53185 | 1335 |
apply - |
53252 | 1336 |
apply (rule notI) |
53185 | 1337 |
apply (erule bexE) |
1338 |
proof - |
|
1339 |
fix x |
|
1340 |
assume as: "x \<in> k" "x \<notin> {1..n}" |
|
1341 |
have "x \<noteq> n + 1" using as and * by auto |
|
53252 | 1342 |
then show False using as and k[THEN conjunct1,unfolded subset_eq] by auto |
53185 | 1343 |
qed |
53252 | 1344 |
then show ?thesis |
53185 | 1345 |
apply - |
1346 |
apply (rule disjI2) |
|
1347 |
unfolding kle_def |
|
53252 | 1348 |
using k |
1349 |
apply (rule_tac x = k in exI) |
|
1350 |
apply auto |
|
1351 |
done |
|
53185 | 1352 |
qed |
1353 |
next |
|
1354 |
fix x j |
|
1355 |
assume as: "x \<in> s - {a}" "j\<notin>{1..n}" |
|
53674 | 1356 |
then show "x j = p" |
53185 | 1357 |
using as(1)[unfolded sa(3)[symmetric], THEN assms(2)[rule_format]] |
1358 |
apply (cases "j = n+1") |
|
1359 |
using sa(1)[unfolded ksimplex_def] |
|
1360 |
apply auto |
|
1361 |
done |
|
1362 |
qed (insert sa ksimplexD[OF sa(1)], auto) |
|
1363 |
next |
|
1364 |
assume ?rs note rs=ksimplexD[OF this] |
|
53252 | 1365 |
guess a b by (rule ksimplex_extrema[OF `?rs`]) note ab = this |
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
1366 |
def c \<equiv> "\<lambda>i. if i = (n + 1) then p - 1 else a i" |
53185 | 1367 |
have "c \<notin> f" |
53252 | 1368 |
apply (rule notI) |
53185 | 1369 |
apply (drule assms(2)[rule_format]) |
1370 |
unfolding c_def |
|
53252 | 1371 |
using assms(1) |
1372 |
apply auto |
|
53185 | 1373 |
done |
53674 | 1374 |
then show ?ls |
53185 | 1375 |
apply (rule_tac x = "insert c f" in exI, rule_tac x = c in exI) |
1376 |
unfolding ksimplex_def conj_assoc |
|
1377 |
apply (rule conjI) |
|
1378 |
defer |
|
1379 |
apply (rule conjI) |
|
1380 |
defer |
|
1381 |
apply (rule conjI) |
|
1382 |
defer |
|
1383 |
apply (rule conjI) |
|
1384 |
defer |
|
1385 |
proof (rule_tac[3-5] ballI allI)+ |
|
1386 |
fix x j |
|
1387 |
assume x: "x \<in> insert c f" |
|
53674 | 1388 |
then show "x j \<le> p" |
53185 | 1389 |
proof (cases "x=c") |
1390 |
case True |
|
1391 |
show ?thesis |
|
1392 |
unfolding True c_def |
|
1393 |
apply (cases "j=n+1") |
|
53252 | 1394 |
using ab(1) and rs(4) |
1395 |
apply auto |
|
53185 | 1396 |
done |
1397 |
qed (insert x rs(4), auto simp add:c_def) |
|
1398 |
show "j \<notin> {1..n + 1} \<longrightarrow> x j = p" |
|
1399 |
apply (cases "x = c") |
|
53252 | 1400 |
using x ab(1) rs(5) |
1401 |
unfolding c_def |
|
1402 |
apply auto |
|
1403 |
done |
|
53185 | 1404 |
{ |
1405 |
fix z |
|
1406 |
assume z: "z \<in> insert c f" |
|
53674 | 1407 |
then have "kle (n + 1) c z" |
53185 | 1408 |
apply (cases "z = c") (*defer apply(rule kle_Suc)*) |
1409 |
proof - |
|
1410 |
case False |
|
53674 | 1411 |
then have "z \<in> f" using z by auto |
53185 | 1412 |
then guess k |
1413 |
apply (drule_tac ab(3)[THEN bspec[where x=z], THEN conjunct1]) |
|
1414 |
unfolding kle_def |
|
1415 |
apply (erule exE) |
|
1416 |
done |
|
53674 | 1417 |
then show "kle (n + 1) c z" |
53185 | 1418 |
unfolding kle_def |
1419 |
apply (rule_tac x="insert (n + 1) k" in exI) |
|
1420 |
unfolding c_def |
|
1421 |
using ab |
|
1422 |
using rs(5)[rule_format,OF ab(1),of "n + 1"] assms(1) |
|
1423 |
apply auto |
|
1424 |
done |
|
1425 |
qed auto |
|
1426 |
} note * = this |
|
1427 |
fix y |
|
1428 |
assume y: "y \<in> insert c f" |
|
1429 |
show "kle (n + 1) x y \<or> kle (n + 1) y x" |
|
1430 |
proof (cases "x = c \<or> y = c") |
|
53674 | 1431 |
case False then have **: "x \<in> f" "y \<in> f" using x y by auto |
53185 | 1432 |
show ?thesis using rs(6)[rule_format,OF **] |
53252 | 1433 |
by (auto dest: kle_Suc) |
53185 | 1434 |
qed (insert * x y, auto) |
1435 |
qed (insert rs, auto) |
|
1436 |
qed |
|
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
1437 |
|
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
1438 |
lemma ksimplex_fix_plane: |
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
1439 |
assumes "a \<in> s" "j\<in>{1..n::nat}" "\<forall>x\<in>s - {a}. x j = q" "a0 \<in> s" "a1 \<in> s" |
53185 | 1440 |
"\<forall>i. a1 i = ((if i\<in>{1..n} then a0 i + 1 else a0 i)::nat)" |
1441 |
shows "(a = a0) \<or> (a = a1)" |
|
1442 |
proof - |
|
1443 |
have *: "\<And>P A x y. \<forall>x\<in>A. P x \<Longrightarrow> x\<in>A \<Longrightarrow> y\<in>A \<Longrightarrow> P x \<and> P y" |
|
1444 |
by auto |
|
1445 |
show ?thesis |
|
1446 |
apply (rule ccontr) |
|
1447 |
using *[OF assms(3), of a0 a1] |
|
1448 |
unfolding assms(6)[THEN spec[where x=j]] |
|
53252 | 1449 |
using assms(1-2,4-5) |
1450 |
apply auto |
|
1451 |
done |
|
53185 | 1452 |
qed |
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
1453 |
|
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
1454 |
lemma ksimplex_fix_plane_0: |
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
1455 |
assumes "a \<in> s" "j\<in>{1..n::nat}" "\<forall>x\<in>s - {a}. x j = 0" "a0 \<in> s" "a1 \<in> s" |
53185 | 1456 |
"\<forall>i. a1 i = ((if i\<in>{1..n} then a0 i + 1 else a0 i)::nat)" |
1457 |
shows "a = a1" |
|
1458 |
apply (rule ccontr) |
|
1459 |
using ksimplex_fix_plane[OF assms] |
|
1460 |
using assms(3)[THEN bspec[where x=a1]] |
|
1461 |
using assms(2,5) |
|
1462 |
unfolding assms(6)[THEN spec[where x=j]] |
|
1463 |
apply simp |
|
1464 |
done |
|
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
1465 |
|
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
1466 |
lemma ksimplex_fix_plane_p: |
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
1467 |
assumes "ksimplex p n s" "a \<in> s" "j\<in>{1..n}" "\<forall>x\<in>s - {a}. x j = p" "a0 \<in> s" "a1 \<in> s" |
53185 | 1468 |
"\<forall>i. a1 i = (if i\<in>{1..n} then a0 i + 1 else a0 i)" |
1469 |
shows "a = a0" |
|
1470 |
proof (rule ccontr) |
|
1471 |
note s = ksimplexD[OF assms(1),rule_format] |
|
1472 |
assume as: "a \<noteq> a0" |
|
53252 | 1473 |
then have *: "a0 \<in> s - {a}" |
53185 | 1474 |
using assms(5) by auto |
53252 | 1475 |
then have "a1 = a" |
53185 | 1476 |
using ksimplex_fix_plane[OF assms(2-)] by auto |
53252 | 1477 |
then show False |
53185 | 1478 |
using as and assms(3,5) and assms(7)[rule_format,of j] |
1479 |
unfolding assms(4)[rule_format,OF *] |
|
1480 |
using s(4)[OF assms(6), of j] |
|
1481 |
by auto |
|
1482 |
qed |
|
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
1483 |
|
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
1484 |
lemma ksimplex_replace_0: |
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
1485 |
assumes "ksimplex p n s" "a \<in> s" "n \<noteq> 0" "j\<in>{1..n}" "\<forall>x\<in>s - {a}. x j = 0" |
53185 | 1486 |
shows "card {s'. ksimplex p n s' \<and> (\<exists>b\<in>s'. s' - {b} = s - {a})} = 1" |
1487 |
proof - |
|
1488 |
have *: "\<And>s' a a'. s' - {a'} = s - {a} \<Longrightarrow> a' = a \<Longrightarrow> a' \<in> s' \<Longrightarrow> a \<in> s \<Longrightarrow> (s' = s)" |
|
1489 |
by auto |
|
1490 |
have **: "\<And>s' a'. ksimplex p n s' \<Longrightarrow> a' \<in> s' \<Longrightarrow> s' - {a'} = s - {a} \<Longrightarrow> s' = s" |
|
1491 |
proof - |
|
1492 |
case goal1 |
|
1493 |
guess a0 a1 by (rule ksimplex_extrema_strong[OF assms(1,3)]) note exta = this[rule_format] |
|
1494 |
have a:"a = a1" |
|
1495 |
apply (rule ksimplex_fix_plane_0[OF assms(2,4-5)]) |
|
53252 | 1496 |
using exta(1-2,5) |
1497 |
apply auto |
|
53185 | 1498 |
done |
1499 |
moreover |
|
1500 |
guess b0 b1 by (rule ksimplex_extrema_strong[OF goal1(1) assms(3)]) |
|
1501 |
note extb = this[rule_format] |
|
1502 |
have a': "a' = b1" |
|
1503 |
apply (rule ksimplex_fix_plane_0[OF goal1(2) assms(4), of b0]) |
|
1504 |
unfolding goal1(3) |
|
53252 | 1505 |
using assms extb goal1 |
1506 |
apply auto |
|
1507 |
done |
|
53185 | 1508 |
moreover |
1509 |
have "b0 = a0" |
|
1510 |
unfolding kle_antisym[symmetric, of b0 a0 n] |
|
1511 |
using exta extb and goal1(3) |
|
1512 |
unfolding a a' by blast |
|
53674 | 1513 |
then have "b1 = a1" |
53185 | 1514 |
apply - |
1515 |
apply (rule ext) |
|
1516 |
unfolding exta(5) extb(5) |
|
1517 |
apply auto |
|
1518 |
done |
|
1519 |
ultimately |
|
1520 |
show "s' = s" |
|
1521 |
apply - |
|
1522 |
apply (rule *[of _ a1 b1]) |
|
53252 | 1523 |
using exta(1-2) extb(1-2) goal1 |
1524 |
apply auto |
|
53185 | 1525 |
done |
1526 |
qed |
|
1527 |
show ?thesis |
|
1528 |
unfolding card_1_exists |
|
1529 |
apply - |
|
1530 |
apply(rule ex1I[of _ s]) |
|
1531 |
unfolding mem_Collect_eq |
|
1532 |
defer |
|
1533 |
apply (erule conjE bexE)+ |
|
1534 |
apply (rule_tac a'=b in **) |
|
53252 | 1535 |
using assms(1,2) |
1536 |
apply auto |
|
53185 | 1537 |
done |
1538 |
qed |
|
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
1539 |
|
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
1540 |
lemma ksimplex_replace_1: |
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
1541 |
assumes "ksimplex p n s" "a \<in> s" "n \<noteq> 0" "j\<in>{1..n}" "\<forall>x\<in>s - {a}. x j = p" |
53186 | 1542 |
shows "card {s'. ksimplex p n s' \<and> (\<exists>b\<in>s'. s' - {b} = s - {a})} = 1" |
1543 |
proof - |
|
1544 |
have lem: "\<And>a a' s'. s' - {a'} = s - {a} \<Longrightarrow> a' = a \<Longrightarrow> a' \<in> s' \<Longrightarrow> a \<in> s \<Longrightarrow> s' = s" |
|
1545 |
by auto |
|
1546 |
have lem: "\<And>s' a'. ksimplex p n s' \<Longrightarrow> a'\<in>s' \<Longrightarrow> s' - {a'} = s - {a} \<Longrightarrow> s' = s" |
|
1547 |
proof - |
|
1548 |
case goal1 |
|
1549 |
guess a0 a1 by (rule ksimplex_extrema_strong[OF assms(1,3)]) note exta = this [rule_format] |
|
1550 |
have a: "a = a0" |
|
1551 |
apply (rule ksimplex_fix_plane_p[OF assms(1-2,4-5) exta(1,2)]) |
|
1552 |
unfolding exta |
|
1553 |
apply auto |
|
1554 |
done |
|
1555 |
moreover |
|
1556 |
guess b0 b1 by (rule ksimplex_extrema_strong[OF goal1(1) assms(3)]) |
|
1557 |
note extb = this [rule_format] |
|
1558 |
have a': "a' = b0" |
|
1559 |
apply (rule ksimplex_fix_plane_p[OF goal1(1-2) assms(4), of _ b1]) |
|
1560 |
unfolding goal1 extb |
|
1561 |
using extb(1,2) assms(5) |
|
1562 |
apply auto |
|
1563 |
done |
|
1564 |
moreover |
|
1565 |
have *: "b1 = a1" |
|
1566 |
unfolding kle_antisym[symmetric, of b1 a1 n] |
|
1567 |
using exta extb |
|
1568 |
using goal1(3) |
|
1569 |
unfolding a a' |
|
1570 |
by blast |
|
1571 |
moreover |
|
1572 |
have "a0 = b0" |
|
1573 |
apply (rule ext) |
|
1574 |
proof - |
|
1575 |
case goal1 |
|
1576 |
show "a0 x = b0 x" |
|
1577 |
using *[THEN cong, of x x] |
|
1578 |
unfolding exta extb |
|
1579 |
apply - |
|
1580 |
apply (cases "x \<in> {1..n}") |
|
1581 |
apply auto |
|
1582 |
done |
|
1583 |
qed |
|
1584 |
ultimately |
|
1585 |
show "s' = s" |
|
1586 |
apply - |
|
1587 |
apply (rule lem[OF goal1(3) _ goal1(2) assms(2)]) |
|
1588 |
apply auto |
|
1589 |
done |
|
1590 |
qed |
|
1591 |
show ?thesis |
|
1592 |
unfolding card_1_exists |
|
1593 |
apply (rule ex1I[of _ s]) |
|
1594 |
unfolding mem_Collect_eq |
|
1595 |
apply (rule, rule assms(1)) |
|
1596 |
apply (rule_tac x = a in bexI) |
|
1597 |
prefer 3 |
|
1598 |
apply (erule conjE bexE)+ |
|
1599 |
apply (rule_tac a'=b in lem) |
|
1600 |
using assms(1-2) |
|
1601 |
apply auto |
|
1602 |
done |
|
1603 |
qed |
|
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
1604 |
|
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
1605 |
lemma ksimplex_replace_2: |
53186 | 1606 |
assumes "ksimplex p n s" "a \<in> s" |
1607 |
"n \<noteq> 0" |
|
1608 |
"~(\<exists>j\<in>{1..n}. \<forall>x\<in>s - {a}. x j = 0)" |
|
1609 |
"~(\<exists>j\<in>{1..n}. \<forall>x\<in>s - {a}. x j = p)" |
|
1610 |
shows "card {s'. ksimplex p n s' \<and> (\<exists>b\<in>s'. s' - {b} = s - {a})} = 2" |
|
1611 |
(is "card ?A = 2") |
|
1612 |
proof - |
|
1613 |
have lem1: "\<And>a a' s s'. s' - {a'} = s - {a} \<Longrightarrow> a' = a \<Longrightarrow> a' \<in> s' \<Longrightarrow> a \<in> s \<Longrightarrow> s' = s" |
|
1614 |
by auto |
|
1615 |
have lem2: "\<And>a b. a\<in>s \<Longrightarrow> b\<noteq>a \<Longrightarrow> s \<noteq> insert b (s - {a})" |
|
1616 |
proof |
|
1617 |
case goal1 |
|
53674 | 1618 |
then have "a \<in> insert b (s - {a})" by auto |
1619 |
then have "a \<in> s - {a}" unfolding insert_iff using goal1 by auto |
|
1620 |
then show False by auto |
|
53186 | 1621 |
qed |
1622 |
guess a0 a1 by (rule ksimplex_extrema_strong[OF assms(1,3)]) note a0a1 = this |
|
1623 |
{ |
|
1624 |
assume "a = a0" |
|
1625 |
have *: "\<And>P Q. (P \<or> Q) \<Longrightarrow> \<not> P \<Longrightarrow> Q" by auto |
|
1626 |
have "\<exists>x\<in>s. \<not> kle n x a0" |
|
1627 |
apply (rule_tac x=a1 in bexI) |
|
1628 |
proof |
|
1629 |
assume as: "kle n a1 a0" |
|
1630 |
show False |
|
1631 |
using kle_imp_pointwise[OF as,THEN spec[where x=1]] |
|
1632 |
unfolding a0a1(5)[THEN spec[where x=1]] |
|
1633 |
using assms(3) by auto |
|
1634 |
qed (insert a0a1, auto) |
|
53674 | 1635 |
then have "\<exists>y\<in>s. \<exists>k\<in>{1..n}. \<forall>j. y j = (if j = k then a0 j + 1 else a0 j)" |
53186 | 1636 |
apply (rule_tac *[OF ksimplex_successor[OF assms(1-2),unfolded `a=a0`]]) |
1637 |
apply auto |
|
1638 |
done |
|
1639 |
then guess a2 .. |
|
1640 |
from this(2) guess k .. note k = this note a2 =`a2 \<in> s` |
|
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
1641 |
def a3 \<equiv> "\<lambda>j. if j = k then a1 j + 1 else a1 j" |
53186 | 1642 |
have "a3 \<notin> s" |
1643 |
proof |
|
1644 |
assume "a3\<in>s" |
|
53674 | 1645 |
then have "kle n a3 a1" |
53186 | 1646 |
using a0a1(4) by auto |
53674 | 1647 |
then show False |
53186 | 1648 |
apply (drule_tac kle_imp_pointwise) unfolding a3_def |
1649 |
apply (erule_tac x = k in allE) |
|
1650 |
apply auto |
|
1651 |
done |
|
1652 |
qed |
|
53674 | 1653 |
then have "a3 \<noteq> a0" "a3 \<noteq> a1" using a0a1 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
|
1654 |
have "a2 \<noteq> a0" using k(2)[THEN spec[where x=k]] by auto |
53186 | 1655 |
have lem3: "\<And>x. x\<in>(s - {a0}) \<Longrightarrow> kle n a2 x" |
1656 |
proof (rule ccontr) |
|
1657 |
case goal1 |
|
53674 | 1658 |
then have as: "x\<in>s" "x\<noteq>a0" by auto |
53186 | 1659 |
have "kle n a2 x \<or> kle n x a2" |
1660 |
using ksimplexD(6)[OF assms(1)] and as `a2\<in>s` by auto |
|
1661 |
moreover |
|
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
1662 |
have "kle n a0 x" using a0a1(4) as by auto |
53186 | 1663 |
ultimately have "x = a0 \<or> x = a2" |
1664 |
apply - |
|
1665 |
apply (rule kle_adjacent[OF k(2)]) |
|
1666 |
using goal1(2) |
|
1667 |
apply auto |
|
1668 |
done |
|
53674 | 1669 |
then have "x = a2" using as by auto |
1670 |
then show False using goal1(2) using kle_refl by auto |
|
53186 | 1671 |
qed |
1672 |
let ?s = "insert a3 (s - {a0})" |
|
1673 |
have "ksimplex p n ?s" |
|
1674 |
apply (rule ksimplexI) |
|
1675 |
proof (rule_tac[2-] ballI,rule_tac[4] ballI) |
|
1676 |
show "card ?s = n + 1" |
|
1677 |
using ksimplexD(2-3)[OF assms(1)] |
|
1678 |
using `a3\<noteq>a0` `a3\<notin>s` `a0\<in>s` |
|
1679 |
by (auto simp add:card_insert_if) |
|
1680 |
fix x |
|
1681 |
assume x: "x \<in> insert a3 (s - {a0})" |
|
1682 |
show "\<forall>j. x j \<le> p" |
|
1683 |
proof (rule, cases "x = a3") |
|
1684 |
fix j |
|
1685 |
case False |
|
53674 | 1686 |
then show "x j\<le>p" using x ksimplexD(4)[OF assms(1)] by auto |
53186 | 1687 |
next |
1688 |
fix j |
|
1689 |
case True |
|
1690 |
show "x j\<le>p" unfolding True |
|
1691 |
proof (cases "j = k") |
|
1692 |
case False |
|
53674 | 1693 |
then show "a3 j \<le>p" unfolding True a3_def |
53186 | 1694 |
using `a1\<in>s` ksimplexD(4)[OF assms(1)] by auto |
1695 |
next |
|
1696 |
guess a4 using assms(5)[unfolded bex_simps ball_simps,rule_format,OF k(1)] .. |
|
1697 |
note a4 = this |
|
1698 |
have "a2 k \<le> a4 k" |
|
1699 |
using lem3[OF a4(1)[unfolded `a=a0`],THEN kle_imp_pointwise] by auto |
|
1700 |
also have "\<dots> < p" |
|
1701 |
using ksimplexD(4)[OF assms(1),rule_format,of a4 k] using a4 by auto |
|
1702 |
finally have *:"a0 k + 1 < p" |
|
1703 |
unfolding k(2)[rule_format] by auto |
|
1704 |
case True |
|
53674 | 1705 |
then show "a3 j \<le>p" unfolding a3_def unfolding a0a1(5)[rule_format] |
53186 | 1706 |
using k(1) k(2)assms(5) using * by simp |
1707 |
qed |
|
1708 |
qed |
|
1709 |
show "\<forall>j. j \<notin> {1..n} \<longrightarrow> x j = p" |
|
1710 |
proof (rule, rule, cases "x=a3") |
|
1711 |
fix j :: nat |
|
1712 |
assume j: "j \<notin> {1..n}" |
|
1713 |
{ |
|
1714 |
case False |
|
53674 | 1715 |
then show "x j = p" using j x ksimplexD(5)[OF assms(1)] by auto |
53186 | 1716 |
} |
1717 |
case True |
|
1718 |
show "x j = p" |
|
1719 |
unfolding True a3_def |
|
1720 |
using j k(1) |
|
1721 |
using ksimplexD(5)[OF assms(1),rule_format,OF `a1\<in>s` j] by auto |
|
1722 |
qed |
|
1723 |
fix y |
|
1724 |
assume y: "y \<in> insert a3 (s - {a0})" |
|
1725 |
have lem4: "\<And>x. x\<in>s \<Longrightarrow> x\<noteq>a0 \<Longrightarrow> kle n x a3" |
|
1726 |
proof - |
|
1727 |
case goal1 |
|
1728 |
guess kk using a0a1(4)[rule_format, OF `x\<in>s`,THEN conjunct2,unfolded kle_def] |
|
1729 |
by (elim exE conjE) |
|
1730 |
note kk = this |
|
1731 |
have "k \<notin> kk" |
|
1732 |
proof |
|
1733 |
assume "k \<in> kk" |
|
53674 | 1734 |
then have "a1 k = x k + 1" using kk by auto |
1735 |
then have "a0 k = x k" unfolding a0a1(5)[rule_format] using k(1) by auto |
|
1736 |
then have "a2 k = x k + 1" unfolding k(2)[rule_format] by auto |
|
53186 | 1737 |
moreover |
53185 | 1738 |
have "a2 k \<le> x k" using lem3[of x,THEN kle_imp_pointwise] goal1 by auto |
53186 | 1739 |
ultimately show False by auto |
1740 |
qed |
|
53674 | 1741 |
then show ?case |
53186 | 1742 |
unfolding kle_def |
1743 |
apply (rule_tac x="insert k kk" in exI) |
|
1744 |
using kk(1) |
|
1745 |
unfolding a3_def kle_def kk(2)[rule_format] |
|
1746 |
using k(1) |
|
1747 |
apply auto |
|
1748 |
done |
|
1749 |
qed |
|
1750 |
show "kle n x y \<or> kle n y x" |
|
1751 |
proof (cases "y = a3") |
|
1752 |
case True |
|
1753 |
show ?thesis |
|
1754 |
unfolding True |
|
1755 |
apply (cases "x = a3") |
|
1756 |
defer |
|
1757 |
apply (rule disjI1, rule lem4) |
|
1758 |
using x |
|
1759 |
apply auto |
|
1760 |
done |
|
1761 |
next |
|
1762 |
case False |
|
1763 |
show ?thesis |
|
1764 |
proof (cases "x = a3") |
|
1765 |
case True |
|
1766 |
show ?thesis |
|
1767 |
unfolding True |
|
1768 |
apply (rule disjI2, rule lem4) |
|
1769 |
using y False |
|
1770 |
apply auto |
|
1771 |
done |
|
1772 |
next |
|
1773 |
case False |
|
53674 | 1774 |
then show ?thesis |
53186 | 1775 |
apply (rule_tac ksimplexD(6)[OF assms(1),rule_format]) |
1776 |
using x y `y \<noteq> a3` |
|
1777 |
apply auto |
|
1778 |
done |
|
1779 |
qed |
|
1780 |
qed |
|
1781 |
qed |
|
53674 | 1782 |
then have "insert a3 (s - {a0}) \<in> ?A" |
53186 | 1783 |
unfolding mem_Collect_eq |
1784 |
apply - |
|
1785 |
apply (rule, assumption) |
|
1786 |
apply (rule_tac x = "a3" in bexI) |
|
1787 |
unfolding `a = a0` |
|
1788 |
using `a3 \<notin> s` |
|
1789 |
apply auto |
|
1790 |
done |
|
1791 |
moreover |
|
1792 |
have "s \<in> ?A" using assms(1,2) by auto |
|
1793 |
ultimately have "?A \<supseteq> {s, insert a3 (s - {a0})}" by auto |
|
1794 |
moreover |
|
1795 |
have "?A \<subseteq> {s, insert a3 (s - {a0})}" |
|
1796 |
apply rule |
|
1797 |
unfolding mem_Collect_eq |
|
1798 |
proof (erule conjE) |
|
1799 |
fix s' |
|
1800 |
assume as: "ksimplex p n s'" and "\<exists>b\<in>s'. s' - {b} = s - {a}" |
|
1801 |
from this(2) guess a' .. note a' = this |
|
1802 |
guess a_min a_max by (rule ksimplex_extrema_strong[OF as assms(3)]) note min_max = this |
|
1803 |
have *: "\<forall>x\<in>s' - {a'}. x k = a2 k" |
|
1804 |
unfolding a' |
|
1805 |
proof |
|
1806 |
fix x |
|
1807 |
assume x: "x \<in> s - {a}" |
|
53674 | 1808 |
then have "kle n a2 x" |
53186 | 1809 |
apply - |
1810 |
apply (rule lem3) |
|
1811 |
using `a = a0` |
|
1812 |
apply auto |
|
1813 |
done |
|
53674 | 1814 |
then have "a2 k \<le> x k" |
53186 | 1815 |
apply (drule_tac kle_imp_pointwise) |
1816 |
apply auto |
|
1817 |
done |
|
1818 |
moreover |
|
1819 |
have "x k \<le> a2 k" |
|
1820 |
unfolding k(2)[rule_format] |
|
1821 |
using a0a1(4)[rule_format,of x, THEN conjunct1] |
|
1822 |
unfolding kle_def using x by auto |
|
1823 |
ultimately show "x k = a2 k" by auto |
|
1824 |
qed |
|
1825 |
have **: "a' = a_min \<or> a' = a_max" |
|
1826 |
apply (rule ksimplex_fix_plane[OF a'(1) k(1) *]) |
|
1827 |
using min_max |
|
1828 |
apply auto |
|
1829 |
done |
|
1830 |
show "s' \<in> {s, insert a3 (s - {a0})}" |
|
1831 |
proof (cases "a' = a_min") |
|
1832 |
case True |
|
1833 |
have "a_max = a1" |
|
1834 |
unfolding kle_antisym[symmetric,of a_max a1 n] |
|
1835 |
apply rule |
|
1836 |
apply (rule a0a1(4)[rule_format,THEN conjunct2]) |
|
1837 |
defer |
|
1838 |
proof (rule min_max(4)[rule_format,THEN conjunct2]) |
|
41958 | 1839 |
show "a1\<in>s'" using a' unfolding `a=a0` using a0a1 by auto |
53186 | 1840 |
show "a_max \<in> s" |
1841 |
proof (rule ccontr) |
|
1842 |
assume "a_max \<notin> s" |
|
53674 | 1843 |
then have "a_max = a'" using a' min_max by auto |
1844 |
then show False unfolding True using min_max by auto |
|
53186 | 1845 |
qed |
1846 |
qed |
|
53674 | 1847 |
then have "\<forall>i. a_max i = a1 i" by auto |
1848 |
then have "a' = a" unfolding True `a = a0` |
|
53186 | 1849 |
apply - |
1850 |
apply (subst fun_eq_iff, rule) |
|
1851 |
apply (erule_tac x=x in allE) |
|
1852 |
unfolding a0a1(5)[rule_format] min_max(5)[rule_format] |
|
1853 |
proof - |
|
1854 |
case goal1 |
|
53674 | 1855 |
then show ?case by (cases "x\<in>{1..n}") auto |
53186 | 1856 |
qed |
53674 | 1857 |
then have "s' = s" |
53186 | 1858 |
apply - |
1859 |
apply (rule lem1[OF a'(2)]) |
|
1860 |
using `a\<in>s` `a'\<in>s'` |
|
1861 |
apply auto |
|
1862 |
done |
|
53674 | 1863 |
then show ?thesis by auto |
53186 | 1864 |
next |
1865 |
case False |
|
53674 | 1866 |
then have as:"a' = a_max" using ** by auto |
53186 | 1867 |
have "a_min = a2" unfolding kle_antisym[symmetric, of _ _ n] |
1868 |
apply rule |
|
1869 |
apply (rule min_max(4)[rule_format,THEN conjunct1]) |
|
1870 |
defer |
|
1871 |
proof (rule lem3) |
|
1872 |
show "a_min \<in> s - {a0}" |
|
1873 |
unfolding a'(2)[symmetric,unfolded `a = a0`] |
|
41958 | 1874 |
unfolding as using min_max(1-3) by auto |
53186 | 1875 |
have "a2 \<noteq> a" |
1876 |
unfolding `a = a0` using k(2)[rule_format,of k] by auto |
|
53674 | 1877 |
then have "a2 \<in> s - {a}" |
53186 | 1878 |
using a2 by auto |
53674 | 1879 |
then show "a2 \<in> s'" unfolding a'(2)[symmetric] by auto |
53186 | 1880 |
qed |
53674 | 1881 |
then have "\<forall>i. a_min i = a2 i" by auto |
1882 |
then have "a' = a3" |
|
53186 | 1883 |
unfolding as `a = a0` |
1884 |
apply - |
|
1885 |
apply (subst fun_eq_iff, rule) |
|
1886 |
apply (erule_tac x=x in allE) |
|
1887 |
unfolding a0a1(5)[rule_format] min_max(5)[rule_format] |
|
1888 |
unfolding a3_def k(2)[rule_format] |
|
1889 |
unfolding a0a1(5)[rule_format] |
|
1890 |
proof - |
|
1891 |
case goal1 |
|
1892 |
show ?case |
|
1893 |
unfolding goal1 |
|
1894 |
apply (cases "x\<in>{1..n}") |
|
1895 |
defer |
|
1896 |
apply (cases "x = k") |
|
1897 |
using `k\<in>{1..n}` |
|
1898 |
apply auto |
|
1899 |
done |
|
1900 |
qed |
|
53674 | 1901 |
then have "s' = insert a3 (s - {a0})" |
53186 | 1902 |
apply - |
1903 |
apply (rule lem1) |
|
1904 |
defer |
|
1905 |
apply assumption |
|
1906 |
apply (rule a'(1)) |
|
1907 |
unfolding a' `a = a0` |
|
1908 |
using `a3 \<notin> s` |
|
1909 |
apply auto |
|
1910 |
done |
|
53674 | 1911 |
then show ?thesis by auto |
53186 | 1912 |
qed |
1913 |
qed |
|
1914 |
ultimately have *: "?A = {s, insert a3 (s - {a0})}" by blast |
|
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
1915 |
have "s \<noteq> insert a3 (s - {a0})" using `a3\<notin>s` by auto |
53674 | 1916 |
then have ?thesis unfolding * by auto |
53186 | 1917 |
} |
1918 |
moreover |
|
1919 |
{ |
|
1920 |
assume "a = a1" |
|
1921 |
have *: "\<And>P Q. (P \<or> Q) \<Longrightarrow> \<not> P \<Longrightarrow> Q" by auto |
|
1922 |
have "\<exists>x\<in>s. \<not> kle n a1 x" |
|
1923 |
apply (rule_tac x=a0 in bexI) |
|
1924 |
proof |
|
1925 |
assume as: "kle n a1 a0" |
|
1926 |
show False |
|
1927 |
using kle_imp_pointwise[OF as,THEN spec[where x=1]] |
|
1928 |
unfolding a0a1(5)[THEN spec[where x=1]] |
|
1929 |
using assms(3) |
|
1930 |
by auto |
|
1931 |
qed (insert a0a1, auto) |
|
53674 | 1932 |
then have "\<exists>y\<in>s. \<exists>k\<in>{1..n}. \<forall>j. a1 j = (if j = k then y j + 1 else y j)" |
53186 | 1933 |
apply (rule_tac *[OF ksimplex_predecessor[OF assms(1-2),unfolded `a=a1`]]) |
1934 |
apply auto |
|
1935 |
done |
|
1936 |
then guess a2 .. from this(2) guess k .. note k=this note a2 = `a2 \<in> s` |
|
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
1937 |
def a3 \<equiv> "\<lambda>j. if j = k then a0 j - 1 else a0 j" |
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
1938 |
have "a2 \<noteq> a1" using k(2)[THEN spec[where x=k]] by auto |
53186 | 1939 |
have lem3: "\<And>x. x\<in>(s - {a1}) \<Longrightarrow> kle n x a2" |
1940 |
proof (rule ccontr) |
|
1941 |
case goal1 |
|
53674 | 1942 |
then have as: "x\<in>s" "x\<noteq>a1" by auto |
53186 | 1943 |
have "kle n a2 x \<or> kle n x a2" |
1944 |
using ksimplexD(6)[OF assms(1)] and as `a2\<in>s` by auto |
|
1945 |
moreover |
|
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
1946 |
have "kle n x a1" using a0a1(4) as by auto |
53186 | 1947 |
ultimately have "x = a2 \<or> x = a1" |
1948 |
apply - |
|
1949 |
apply (rule kle_adjacent[OF k(2)]) |
|
1950 |
using goal1(2) |
|
1951 |
apply auto |
|
1952 |
done |
|
53674 | 1953 |
then have "x = a2" using as by auto |
1954 |
then show False using goal1(2) using kle_refl by auto |
|
53186 | 1955 |
qed |
1956 |
have "a0 k \<noteq> 0" |
|
1957 |
proof - |
|
1958 |
guess a4 using assms(4)[unfolded bex_simps ball_simps,rule_format,OF `k\<in>{1..n}`] .. |
|
1959 |
note a4 = this |
|
1960 |
have "a4 k \<le> a2 k" using lem3[OF a4(1)[unfolded `a=a1`],THEN kle_imp_pointwise] |
|
1961 |
by auto |
|
1962 |
moreover have "a4 k > 0" using a4 by auto |
|
1963 |
ultimately have "a2 k > 0" by auto |
|
53674 | 1964 |
then have "a1 k > 1" unfolding k(2)[rule_format] by simp |
1965 |
then show ?thesis unfolding a0a1(5)[rule_format] using k(1) by simp |
|
53186 | 1966 |
qed |
53674 | 1967 |
then have lem4: "\<forall>j. a0 j = (if j=k then a3 j + 1 else a3 j)" |
53186 | 1968 |
unfolding a3_def by simp |
1969 |
have "\<not> kle n a0 a3" |
|
1970 |
apply (rule ccontr) |
|
1971 |
unfolding not_not |
|
1972 |
apply (drule kle_imp_pointwise) |
|
1973 |
unfolding lem4[rule_format] |
|
1974 |
apply (erule_tac x=k in allE) |
|
1975 |
apply auto |
|
1976 |
done |
|
53674 | 1977 |
then have "a3 \<notin> s" using a0a1(4) by auto |
1978 |
then have "a3 \<noteq> a1" "a3 \<noteq> a0" using a0a1 by auto |
|
53186 | 1979 |
let ?s = "insert a3 (s - {a1})" |
1980 |
have "ksimplex p n ?s" |
|
1981 |
apply (rule ksimplexI) |
|
1982 |
proof (rule_tac[2-] ballI,rule_tac[4] ballI) |
|
1983 |
show "card ?s = n+1" |
|
1984 |
using ksimplexD(2-3)[OF assms(1)] |
|
1985 |
using `a3\<noteq>a0` `a3\<notin>s` `a1\<in>s` |
|
1986 |
by(auto simp add:card_insert_if) |
|
1987 |
fix x |
|
1988 |
assume x: "x \<in> insert a3 (s - {a1})" |
|
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
1989 |
show "\<forall>j. x j \<le> p" proof(rule,cases "x = a3") |
53186 | 1990 |
fix j |
1991 |
case False |
|
53674 | 1992 |
then show "x j\<le>p" using x ksimplexD(4)[OF assms(1)] by auto |
53186 | 1993 |
next |
1994 |
fix j |
|
1995 |
case True |
|
1996 |
show "x j\<le>p" unfolding True |
|
1997 |
proof (cases "j = k") |
|
1998 |
case False |
|
53674 | 1999 |
then show "a3 j \<le>p" |
53186 | 2000 |
unfolding True a3_def |
2001 |
using `a0\<in>s` ksimplexD(4)[OF assms(1)] |
|
2002 |
by auto |
|
2003 |
next |
|
2004 |
guess a4 using assms(5)[unfolded bex_simps ball_simps,rule_format,OF k(1)] .. |
|
2005 |
note a4 = this |
|
2006 |
case True have "a3 k \<le> a0 k" |
|
2007 |
unfolding lem4[rule_format] by auto |
|
2008 |
also have "\<dots> \<le> p" |
|
2009 |
using ksimplexD(4)[OF assms(1),rule_format,of a0 k] a0a1 by auto |
|
2010 |
finally show "a3 j \<le> p" |
|
2011 |
unfolding True by auto |
|
2012 |
qed |
|
2013 |
qed |
|
2014 |
show "\<forall>j. j \<notin> {1..n} \<longrightarrow> x j = p" |
|
2015 |
proof (rule, rule, cases "x = a3") |
|
2016 |
fix j :: nat |
|
2017 |
assume j: "j \<notin> {1..n}" |
|
2018 |
{ |
|
2019 |
case False |
|
53674 | 2020 |
then show "x j = p" using j x ksimplexD(5)[OF assms(1)] by auto |
53186 | 2021 |
next |
2022 |
case True |
|
2023 |
show "x j = p" unfolding True a3_def using j k(1) |
|
2024 |
using ksimplexD(5)[OF assms(1),rule_format,OF `a0\<in>s` j] by auto |
|
2025 |
} |
|
2026 |
qed |
|
2027 |
fix y |
|
2028 |
assume y: "y\<in>insert a3 (s - {a1})" |
|
2029 |
have lem4: "\<And>x. x\<in>s \<Longrightarrow> x \<noteq> a1 \<Longrightarrow> kle n a3 x" |
|
2030 |
proof - |
|
2031 |
case goal1 |
|
53674 | 2032 |
then have *: "x\<in>s - {a1}" by auto |
53186 | 2033 |
have "kle n a3 a2" |
2034 |
proof - |
|
2035 |
have "kle n a0 a1" |
|
2036 |
using a0a1 by auto then guess kk unfolding kle_def .. |
|
53674 | 2037 |
then show ?thesis |
53186 | 2038 |
unfolding kle_def |
2039 |
apply (rule_tac x=kk in exI) |
|
2040 |
unfolding lem4[rule_format] k(2)[rule_format] |
|
2041 |
apply rule |
|
2042 |
defer |
|
2043 |
proof rule |
|
2044 |
case goal1 |
|
53674 | 2045 |
then show ?case |
53186 | 2046 |
apply - |
2047 |
apply (erule conjE) |
|
2048 |
apply (erule_tac[!] x=j in allE) |
|
2049 |
apply (cases "j \<in> kk") |
|
2050 |
apply (case_tac[!] "j=k") |
|
2051 |
apply auto |
|
2052 |
done |
|
2053 |
qed auto |
|
2054 |
qed |
|
2055 |
moreover |
|
2056 |
have "kle n a3 a0" |
|
2057 |
unfolding kle_def lem4[rule_format] |
|
2058 |
apply (rule_tac x="{k}" in exI) |
|
2059 |
using k(1) |
|
2060 |
apply auto |
|
2061 |
done |
|
2062 |
ultimately |
|
2063 |
show ?case |
|
2064 |
apply - |
|
2065 |
apply (rule kle_between_l[of _ a0 _ a2]) |
|
2066 |
using lem3[OF *] |
|
2067 |
using a0a1(4)[rule_format,OF goal1(1)] |
|
2068 |
apply auto |
|
2069 |
done |
|
2070 |
qed |
|
2071 |
show "kle n x y \<or> kle n y x" |
|
2072 |
proof (cases "y = a3") |
|
2073 |
case True |
|
2074 |
show ?thesis |
|
2075 |
unfolding True |
|
2076 |
apply (cases "x = a3") |
|
2077 |
defer |
|
2078 |
apply (rule disjI2, rule lem4) |
|
2079 |
using x |
|
2080 |
apply auto |
|
2081 |
done |
|
2082 |
next |
|
2083 |
case False |
|
2084 |
show ?thesis |
|
2085 |
proof (cases "x = a3") |
|
2086 |
case True |
|
2087 |
show ?thesis |
|
2088 |
unfolding True |
|
2089 |
apply (rule disjI1, rule lem4) |
|
2090 |
using y False |
|
2091 |
apply auto |
|
2092 |
done |
|
2093 |
next |
|
2094 |
case False |
|
53674 | 2095 |
then show ?thesis |
53186 | 2096 |
apply (rule_tac ksimplexD(6)[OF assms(1),rule_format]) |
2097 |
using x y `y\<noteq>a3` |
|
2098 |
apply auto |
|
2099 |
done |
|
2100 |
qed |
|
2101 |
qed |
|
2102 |
qed |
|
53674 | 2103 |
then have "insert a3 (s - {a1}) \<in> ?A" |
53186 | 2104 |
unfolding mem_Collect_eq |
2105 |
apply - |
|
2106 |
apply (rule, assumption) |
|
2107 |
apply (rule_tac x = "a3" in bexI) |
|
2108 |
unfolding `a = a1` |
|
2109 |
using `a3 \<notin> s` |
|
2110 |
apply auto |
|
2111 |
done |
|
2112 |
moreover |
|
2113 |
have "s \<in> ?A" using assms(1,2) by auto |
|
2114 |
ultimately have "?A \<supseteq> {s, insert a3 (s - {a1})}" by auto |
|
2115 |
moreover have "?A \<subseteq> {s, insert a3 (s - {a1})}" |
|
2116 |
apply rule |
|
2117 |
unfolding mem_Collect_eq |
|
2118 |
proof (erule conjE) |
|
2119 |
fix s' |
|
2120 |
assume as: "ksimplex p n s'" and "\<exists>b\<in>s'. s' - {b} = s - {a}" |
|
2121 |
from this(2) guess a' .. note a' = this |
|
2122 |
guess a_min a_max by (rule ksimplex_extrema_strong[OF as assms(3)]) note min_max = this |
|
2123 |
have *: "\<forall>x\<in>s' - {a'}. x k = a2 k" unfolding a' |
|
2124 |
proof |
|
2125 |
fix x |
|
2126 |
assume x: "x \<in> s - {a}" |
|
53674 | 2127 |
then have "kle n x a2" |
53186 | 2128 |
apply - |
2129 |
apply (rule lem3) |
|
2130 |
using `a = a1` |
|
2131 |
apply auto |
|
2132 |
done |
|
53674 | 2133 |
then have "x k \<le> a2 k" |
53186 | 2134 |
apply (drule_tac kle_imp_pointwise) |
2135 |
apply auto |
|
2136 |
done |
|
2137 |
moreover |
|
2138 |
{ |
|
2139 |
have "a2 k \<le> a0 k" |
|
2140 |
using k(2)[rule_format,of k] |
|
2141 |
unfolding a0a1(5)[rule_format] |
|
2142 |
using k(1) |
|
2143 |
by simp |
|
2144 |
also have "\<dots> \<le> x k" |
|
2145 |
using a0a1(4)[rule_format,of x,THEN conjunct1,THEN kle_imp_pointwise] x |
|
2146 |
by auto |
|
2147 |
finally have "a2 k \<le> x k" . |
|
2148 |
} |
|
2149 |
ultimately show "x k = a2 k" by auto |
|
2150 |
qed |
|
2151 |
have **: "a' = a_min \<or> a' = a_max" |
|
2152 |
apply (rule ksimplex_fix_plane[OF a'(1) k(1) *]) |
|
2153 |
using min_max |
|
2154 |
apply auto |
|
2155 |
done |
|
2156 |
have "a2 \<noteq> a1" |
|
2157 |
proof |
|
2158 |
assume as: "a2 = a1" |
|
2159 |
show False |
|
2160 |
using k(2) |
|
2161 |
unfolding as |
|
2162 |
apply (erule_tac x = k in allE) |
|
2163 |
apply auto |
|
2164 |
done |
|
2165 |
qed |
|
53674 | 2166 |
then have a2': "a2 \<in> s' - {a'}" |
53186 | 2167 |
unfolding a' |
2168 |
using a2 |
|
2169 |
unfolding `a = a1` |
|
2170 |
by auto |
|
2171 |
show "s' \<in> {s, insert a3 (s - {a1})}" |
|
2172 |
proof (cases "a' = a_min") |
|
2173 |
case True |
|
2174 |
have "a_max \<in> s - {a1}" |
|
2175 |
using min_max |
|
2176 |
unfolding a'(2)[unfolded `a=a1`,symmetric] True |
|
2177 |
by auto |
|
53674 | 2178 |
then have "a_max = a2" |
53186 | 2179 |
unfolding kle_antisym[symmetric,of a_max a2 n] |
2180 |
apply - |
|
2181 |
apply rule |
|
2182 |
apply (rule lem3,assumption) |
|
2183 |
apply (rule min_max(4)[rule_format,THEN conjunct2]) |
|
2184 |
using a2' |
|
2185 |
apply auto |
|
2186 |
done |
|
53674 | 2187 |
then have a_max:"\<forall>i. a_max i = a2 i" by auto |
53186 | 2188 |
have *: "\<forall>j. a2 j = (if j\<in>{1..n} then a3 j + 1 else a3 j)" |
2189 |
using k(2) |
|
2190 |
unfolding lem4[rule_format] a0a1(5)[rule_format] |
|
2191 |
apply - |
|
2192 |
apply (rule,erule_tac x=j in allE) |
|
2193 |
proof - |
|
2194 |
case goal1 |
|
53674 | 2195 |
then show ?case by (cases "j\<in>{1..n}",case_tac[!] "j=k") auto |
53186 | 2196 |
qed |
2197 |
have "\<forall>i. a_min i = a3 i" |
|
2198 |
using a_max |
|
2199 |
apply - |
|
2200 |
apply (rule,erule_tac x=i in allE) |
|
2201 |
unfolding min_max(5)[rule_format] *[rule_format] |
|
2202 |
proof - |
|
2203 |
case goal1 |
|
53674 | 2204 |
then show ?case by (cases "i\<in>{1..n}") auto |
53186 | 2205 |
qed |
53674 | 2206 |
then have "a_min = a3" unfolding fun_eq_iff . |
2207 |
then have "s' = insert a3 (s - {a1})" |
|
53186 | 2208 |
using a' unfolding `a = a1` True by auto |
53674 | 2209 |
then show ?thesis by auto |
53186 | 2210 |
next |
53674 | 2211 |
case False then have as:"a'=a_max" using ** by auto |
53186 | 2212 |
have "a_min = a0" |
2213 |
unfolding kle_antisym[symmetric,of _ _ n] |
|
2214 |
apply rule |
|
2215 |
apply (rule min_max(4)[rule_format,THEN conjunct1]) |
|
2216 |
defer |
|
2217 |
apply (rule a0a1(4)[rule_format,THEN conjunct1]) |
|
2218 |
proof - |
|
2219 |
have "a_min \<in> s - {a1}" |
|
2220 |
using min_max(1,3) |
|
2221 |
unfolding a'(2)[symmetric,unfolded `a=a1`] as |
|
2222 |
by auto |
|
53674 | 2223 |
then show "a_min \<in> s" by auto |
53186 | 2224 |
have "a0 \<in> s - {a1}" using a0a1(1-3) by auto |
53674 | 2225 |
then show "a0 \<in> s'" unfolding a'(2)[symmetric,unfolded `a=a1`] by auto |
53186 | 2226 |
qed |
53674 | 2227 |
then have "\<forall>i. a_max i = a1 i" |
53186 | 2228 |
unfolding a0a1(5)[rule_format] min_max(5)[rule_format] by auto |
53674 | 2229 |
then have "s' = s" |
53186 | 2230 |
apply - |
2231 |
apply (rule lem1[OF a'(2)]) |
|
2232 |
using `a \<in> s` `a' \<in> s'` |
|
2233 |
unfolding as `a = a1` |
|
2234 |
unfolding fun_eq_iff |
|
2235 |
apply auto |
|
2236 |
done |
|
53674 | 2237 |
then show ?thesis by auto |
53186 | 2238 |
qed |
2239 |
qed |
|
2240 |
ultimately have *: "?A = {s, insert a3 (s - {a1})}" by blast |
|
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
2241 |
have "s \<noteq> insert a3 (s - {a1})" using `a3\<notin>s` by auto |
53674 | 2242 |
then have ?thesis unfolding * by auto |
53186 | 2243 |
} |
2244 |
moreover |
|
2245 |
{ |
|
2246 |
assume as: "a \<noteq> a0" "a \<noteq> a1" have "\<not> (\<forall>x\<in>s. kle n a x)" |
|
2247 |
proof |
|
2248 |
case goal1 |
|
2249 |
have "a = a0" |
|
2250 |
unfolding kle_antisym[symmetric,of _ _ n] |
|
2251 |
apply rule |
|
2252 |
using goal1 a0a1 assms(2) |
|
2253 |
apply auto |
|
2254 |
done |
|
53674 | 2255 |
then show False using as by auto |
53186 | 2256 |
qed |
53674 | 2257 |
then have "\<exists>y\<in>s. \<exists>k\<in>{1..n}. \<forall>j. a j = (if j = k then y j + 1 else y j)" |
53186 | 2258 |
using ksimplex_predecessor[OF assms(1-2)] by blast |
2259 |
then guess u .. from this(2) guess k .. note k = this[rule_format] |
|
2260 |
note u = `u \<in> s` |
|
2261 |
have "\<not> (\<forall>x\<in>s. kle n x a)" |
|
2262 |
proof |
|
2263 |
case goal1 |
|
2264 |
have "a = a1" |
|
2265 |
unfolding kle_antisym[symmetric,of _ _ n] |
|
2266 |
apply rule |
|
2267 |
using goal1 a0a1 assms(2) |
|
2268 |
apply auto |
|
2269 |
done |
|
53674 | 2270 |
then show False using as by auto |
53186 | 2271 |
qed |
53674 | 2272 |
then have "\<exists>y\<in>s. \<exists>k\<in>{1..n}. \<forall>j. y j = (if j = k then a j + 1 else a j)" |
53186 | 2273 |
using ksimplex_successor[OF assms(1-2)] by blast |
2274 |
then guess v .. from this(2) guess l .. |
|
2275 |
note l = this[rule_format] |
|
2276 |
note v = `v\<in>s` |
|
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
2277 |
def a' \<equiv> "\<lambda>j. if j = l then u j + 1 else u j" |
53186 | 2278 |
have kl: "k \<noteq> l" |
2279 |
proof |
|
2280 |
assume "k = l" |
|
2281 |
have *: "\<And>P. (if P then (1::nat) else 0) \<noteq> 2" by auto |
|
53674 | 2282 |
then show False using ksimplexD(6)[OF assms(1),rule_format,OF u v] unfolding kle_def |
53186 | 2283 |
unfolding l(2) k(2) `k = l` |
2284 |
apply - |
|
2285 |
apply (erule disjE) |
|
2286 |
apply (erule_tac[!] exE conjE)+ |
|
2287 |
apply (erule_tac[!] x = l in allE)+ |
|
2288 |
apply (auto simp add: *) |
|
2289 |
done |
|
2290 |
qed |
|
53674 | 2291 |
then have aa': "a' \<noteq> a" |
53186 | 2292 |
apply - |
2293 |
apply rule |
|
2294 |
unfolding fun_eq_iff |
|
2295 |
unfolding a'_def k(2) |
|
2296 |
apply (erule_tac x=l in allE) |
|
2297 |
apply auto |
|
2298 |
done |
|
2299 |
have "a' \<notin> s" |
|
2300 |
apply rule |
|
2301 |
apply (drule ksimplexD(6)[OF assms(1),rule_format,OF `a\<in>s`]) |
|
2302 |
proof (cases "kle n a a'") |
|
2303 |
case goal2 |
|
53674 | 2304 |
then have "kle n a' a" by auto |
2305 |
then show False |
|
53186 | 2306 |
apply (drule_tac kle_imp_pointwise) |
2307 |
apply (erule_tac x=l in allE) |
|
2308 |
unfolding a'_def k(2) |
|
2309 |
using kl |
|
2310 |
apply auto |
|
2311 |
done |
|
2312 |
next |
|
2313 |
case True |
|
53674 | 2314 |
then show False |
53186 | 2315 |
apply (drule_tac kle_imp_pointwise) |
2316 |
apply (erule_tac x=k in allE) |
|
2317 |
unfolding a'_def k(2) |
|
2318 |
using kl |
|
2319 |
apply auto |
|
2320 |
done |
|
2321 |
qed |
|
2322 |
have kle_uv: "kle n u a" "kle n u a'" "kle n a v" "kle n a' v" |
|
2323 |
unfolding kle_def |
|
2324 |
apply - |
|
2325 |
apply (rule_tac[1] x="{k}" in exI,rule_tac[2] x="{l}" in exI) |
|
2326 |
apply (rule_tac[3] x="{l}" in exI,rule_tac[4] x="{k}" in exI) |
|
2327 |
unfolding l(2) k(2) a'_def |
|
2328 |
using l(1) k(1) |
|
2329 |
apply auto |
|
2330 |
done |
|
2331 |
have uxv: "\<And>x. kle n u x \<Longrightarrow> kle n x v \<Longrightarrow> x = u \<or> x = a \<or> x = a' \<or> x = v" |
|
2332 |
proof - |
|
2333 |
case goal1 |
|
53674 | 2334 |
then show ?case |
53186 | 2335 |
proof (cases "x k = u k", case_tac[!] "x l = u l") |
2336 |
assume as: "x l = u l" "x k = u k" |
|
2337 |
have "x = u" unfolding fun_eq_iff |
|
2338 |
using goal1(2)[THEN kle_imp_pointwise,unfolded l(2)] unfolding k(2) |
|
2339 |
apply - |
|
2340 |
using goal1(1)[THEN kle_imp_pointwise] |
|
2341 |
apply - |
|
2342 |
apply rule |
|
2343 |
apply (erule_tac x=xa in allE)+ |
|
2344 |
proof - |
|
2345 |
case goal1 |
|
53674 | 2346 |
then show ?case |
53186 | 2347 |
apply (cases "x = l") |
2348 |
apply (case_tac[!] "x = k") |
|
2349 |
using as by auto |
|
2350 |
qed |
|
53674 | 2351 |
then show ?case by auto |
53186 | 2352 |
next |
2353 |
assume as: "x l \<noteq> u l" "x k = u k" |
|
2354 |
have "x = a'" |
|
2355 |
unfolding fun_eq_iff |
|
2356 |
unfolding a'_def |
|
2357 |
using goal1(2)[THEN kle_imp_pointwise] |
|
2358 |
unfolding l(2) k(2) |
|
2359 |
using goal1(1)[THEN kle_imp_pointwise] |
|
2360 |
apply - |
|
2361 |
apply rule |
|
2362 |
apply (erule_tac x = xa in allE)+ |
|
2363 |
proof - |
|
2364 |
case goal1 |
|
53674 | 2365 |
then show ?case |
53186 | 2366 |
apply (cases "x = l") |
2367 |
apply (case_tac[!] "x = k") |
|
2368 |
using as |
|
2369 |
apply auto |
|
2370 |
done |
|
2371 |
qed |
|
53674 | 2372 |
then show ?case by auto |
53186 | 2373 |
next |
2374 |
assume as: "x l = u l" "x k \<noteq> u k" |
|
2375 |
have "x = a" |
|
2376 |
unfolding fun_eq_iff |
|
2377 |
using goal1(2)[THEN kle_imp_pointwise] |
|
2378 |
unfolding l(2) k(2) |
|
2379 |
using goal1(1)[THEN kle_imp_pointwise] |
|
2380 |
apply - |
|
2381 |
apply rule |
|
2382 |
apply (erule_tac x=xa in allE)+ |
|
2383 |
proof - |
|
2384 |
case goal1 |
|
53674 | 2385 |
then show ?case |
53186 | 2386 |
apply (cases "x = l") |
2387 |
apply (case_tac[!] "x = k") |
|
2388 |
using as |
|
2389 |
apply auto |
|
2390 |
done |
|
2391 |
qed |
|
53674 | 2392 |
then show ?case by auto |
53186 | 2393 |
next |
2394 |
assume as: "x l \<noteq> u l" "x k \<noteq> u k" |
|
2395 |
have "x = v" |
|
2396 |
unfolding fun_eq_iff |
|
2397 |
using goal1(2)[THEN kle_imp_pointwise] |
|
2398 |
unfolding l(2) k(2) |
|
2399 |
using goal1(1)[THEN kle_imp_pointwise] |
|
2400 |
apply - |
|
2401 |
apply rule |
|
2402 |
apply (erule_tac x=xa in allE)+ |
|
2403 |
proof - |
|
2404 |
case goal1 |
|
53674 | 2405 |
then show ?case |
53186 | 2406 |
apply (cases "x = l") |
2407 |
apply (case_tac[!] "x = k") |
|
2408 |
using as `k \<noteq> l` |
|
2409 |
apply auto |
|
2410 |
done |
|
2411 |
qed |
|
53674 | 2412 |
then show ?case by auto |
53186 | 2413 |
qed |
2414 |
qed |
|
2415 |
have uv: "kle n u v" |
|
2416 |
apply (rule kle_trans[OF kle_uv(1,3)]) |
|
2417 |
using ksimplexD(6)[OF assms(1)] |
|
2418 |
using u v |
|
2419 |
apply auto |
|
2420 |
done |
|
2421 |
have lem3: "\<And>x. x \<in> s \<Longrightarrow> kle n v x \<Longrightarrow> kle n a' x" |
|
2422 |
apply (rule kle_between_r[of _ u _ v]) |
|
2423 |
prefer 3 |
|
2424 |
apply (rule kle_trans[OF uv]) |
|
2425 |
defer |
|
2426 |
apply (rule ksimplexD(6)[OF assms(1), rule_format]) |
|
2427 |
using kle_uv `u\<in>s` |
|
2428 |
apply auto |
|
2429 |
done |
|
2430 |
have lem4: "\<And>x. x\<in>s \<Longrightarrow> kle n x u \<Longrightarrow> kle n x a'" |
|
2431 |
apply (rule kle_between_l[of _ u _ v]) |
|
2432 |
prefer 4 |
|
2433 |
apply (rule kle_trans[OF _ uv]) |
|
2434 |
defer |
|
2435 |
apply (rule ksimplexD(6)[OF assms(1), rule_format]) |
|
2436 |
using kle_uv `v\<in>s` |
|
2437 |
apply auto |
|
2438 |
done |
|
2439 |
have lem5: "\<And>x. x \<in> s \<Longrightarrow> x \<noteq> a \<Longrightarrow> kle n x a' \<or> kle n a' x" |
|
2440 |
proof - |
|
2441 |
case goal1 |
|
53674 | 2442 |
then show ?case |
53186 | 2443 |
proof (cases "kle n v x \<or> kle n x u") |
2444 |
case True |
|
53674 | 2445 |
then show ?thesis using goal1 by(auto intro:lem3 lem4) |
53186 | 2446 |
next |
2447 |
case False |
|
53674 | 2448 |
then have *: "kle n u x" "kle n x v" |
53186 | 2449 |
using ksimplexD(6)[OF assms(1)] |
2450 |
using goal1 `u\<in>s` `v\<in>s` |
|
2451 |
by auto |
|
2452 |
show ?thesis |
|
2453 |
using uxv[OF *] |
|
2454 |
using kle_uv |
|
2455 |
using goal1 |
|
2456 |
by auto |
|
2457 |
qed |
|
2458 |
qed |
|
2459 |
have "ksimplex p n (insert a' (s - {a}))" |
|
2460 |
apply (rule ksimplexI) |
|
2461 |
proof (rule_tac[2-] ballI, rule_tac[4] ballI) |
|
2462 |
show "card (insert a' (s - {a})) = n + 1" |
|
2463 |
using ksimplexD(2-3)[OF assms(1)] |
|
2464 |
using `a' \<noteq> a` `a' \<notin> s` `a \<in> s` |
|
2465 |
by (auto simp add:card_insert_if) |
|
2466 |
fix x |
|
2467 |
assume x: "x \<in> insert a' (s - {a})" |
|
2468 |
show "\<forall>j. x j \<le> p" |
|
2469 |
proof (rule, cases "x = a'") |
|
2470 |
fix j |
|
2471 |
case False |
|
53674 | 2472 |
then show "x j\<le>p" using x ksimplexD(4)[OF assms(1)] by auto |
53186 | 2473 |
next |
2474 |
fix j |
|
2475 |
case True |
|
2476 |
show "x j\<le>p" unfolding True |
|
2477 |
proof (cases "j = l") |
|
2478 |
case False |
|
53674 | 2479 |
then show "a' j \<le>p" |
53186 | 2480 |
unfolding True a'_def using `u\<in>s` ksimplexD(4)[OF assms(1)] by auto |
2481 |
next |
|
2482 |
case True |
|
2483 |
have *: "a l = u l" "v l = a l + 1" |
|
2484 |
using k(2)[of l] l(2)[of l] `k\<noteq>l` by auto |
|
2485 |
have "u l + 1 \<le> p" |
|
2486 |
unfolding *[symmetric] using ksimplexD(4)[OF assms(1)] using `v\<in>s` by auto |
|
53674 | 2487 |
then show "a' j \<le>p" unfolding a'_def True by auto |
53186 | 2488 |
qed |
2489 |
qed |
|
2490 |
show "\<forall>j. j \<notin> {1..n} \<longrightarrow> x j = p" |
|
2491 |
proof (rule, rule,cases "x = a'") |
|
2492 |
fix j :: nat |
|
2493 |
assume j: "j \<notin> {1..n}" |
|
2494 |
{ |
|
2495 |
case False |
|
53674 | 2496 |
then show "x j = p" using j x ksimplexD(5)[OF assms(1)] by auto |
53186 | 2497 |
next |
2498 |
case True |
|
2499 |
show "x j = p" |
|
2500 |
unfolding True a'_def |
|
2501 |
using j l(1) |
|
2502 |
using ksimplexD(5)[OF assms(1),rule_format,OF `u\<in>s` j] |
|
2503 |
by auto |
|
2504 |
} |
|
2505 |
qed |
|
2506 |
fix y |
|
2507 |
assume y: "y\<in>insert a' (s - {a})" |
|
2508 |
show "kle n x y \<or> kle n y x" |
|
2509 |
proof (cases "y = a'") |
|
2510 |
case True |
|
2511 |
show ?thesis |
|
2512 |
unfolding True |
|
2513 |
apply (cases "x = a'") |
|
2514 |
defer |
|
2515 |
apply (rule lem5) |
|
2516 |
using x |
|
2517 |
apply auto |
|
2518 |
done |
|
2519 |
next |
|
2520 |
case False |
|
2521 |
show ?thesis |
|
2522 |
proof (cases "x = a'") |
|
2523 |
case True |
|
2524 |
show ?thesis |
|
2525 |
unfolding True |
|
2526 |
using lem5[of y] using y by auto |
|
2527 |
next |
|
2528 |
case False |
|
53674 | 2529 |
then show ?thesis |
53186 | 2530 |
apply (rule_tac ksimplexD(6)[OF assms(1),rule_format]) |
2531 |
using x y `y\<noteq>a'` |
|
2532 |
apply auto |
|
2533 |
done |
|
2534 |
qed |
|
2535 |
qed |
|
2536 |
qed |
|
53674 | 2537 |
then have "insert a' (s - {a}) \<in> ?A" |
53186 | 2538 |
unfolding mem_Collect_eq |
2539 |
apply - |
|
2540 |
apply (rule, assumption) |
|
2541 |
apply (rule_tac x = "a'" in bexI) |
|
2542 |
using aa' `a' \<notin> s` |
|
2543 |
apply auto |
|
2544 |
done |
|
2545 |
moreover |
|
2546 |
have "s \<in> ?A" using assms(1,2) by auto |
|
2547 |
ultimately have "?A \<supseteq> {s, insert a' (s - {a})}" by auto |
|
2548 |
moreover |
|
2549 |
have "?A \<subseteq> {s, insert a' (s - {a})}" |
|
2550 |
apply rule unfolding mem_Collect_eq |
|
2551 |
proof (erule conjE) |
|
2552 |
fix s' |
|
2553 |
assume as: "ksimplex p n s'" and "\<exists>b\<in>s'. s' - {b} = s - {a}" |
|
2554 |
from this(2) guess a'' .. note a'' = this |
|
2555 |
have "u \<noteq> v" unfolding fun_eq_iff unfolding l(2) k(2) by auto |
|
53674 | 2556 |
then have uv': "\<not> kle n v u" using uv using kle_antisym by auto |
53186 | 2557 |
have "u \<noteq> a" "v \<noteq> a" unfolding fun_eq_iff k(2) l(2) by auto |
53674 | 2558 |
then have uvs': "u \<in> s'" "v \<in> s'" using `u \<in> s` `v \<in> s` using a'' by auto |
53186 | 2559 |
have lem6: "a \<in> s' \<or> a' \<in> s'" |
2560 |
proof (cases "\<forall>x\<in>s'. kle n x u \<or> kle n v x") |
|
2561 |
case False |
|
2562 |
then guess w unfolding ball_simps .. note w = this |
|
53674 | 2563 |
then have "kle n u w" "kle n w v" |
53186 | 2564 |
using ksimplexD(6)[OF as] uvs' by auto |
53674 | 2565 |
then have "w = a' \<or> w = a" |
53186 | 2566 |
using uxv[of w] uvs' w by auto |
53674 | 2567 |
then show ?thesis using w by auto |
53186 | 2568 |
next |
2569 |
case True |
|
2570 |
have "\<not> (\<forall>x\<in>s'. kle n x u)" |
|
2571 |
unfolding ball_simps |
|
2572 |
apply (rule_tac x=v in bexI) |
|
2573 |
using uv `u \<noteq> v` |
|
2574 |
unfolding kle_antisym [of n u v,symmetric] |
|
2575 |
using `v\<in>s'` |
|
2576 |
apply auto |
|
2577 |
done |
|
53674 | 2578 |
then have "\<exists>y\<in>s'. \<exists>k\<in>{1..n}. \<forall>j. y j = (if j = k then u j + 1 else u j)" |
53186 | 2579 |
using ksimplex_successor[OF as `u\<in>s'`] by blast |
2580 |
then guess w .. note w = this |
|
2581 |
from this(2) guess kk .. note kk = this[rule_format] |
|
2582 |
have "\<not> kle n w u" |
|
2583 |
apply - |
|
2584 |
apply (rule, drule kle_imp_pointwise) |
|
2585 |
apply (erule_tac x = kk in allE) |
|
2586 |
unfolding kk |
|
2587 |
apply auto |
|
2588 |
done |
|
53674 | 2589 |
then have *: "kle n v w" |
53186 | 2590 |
using True[rule_format,OF w(1)] by auto |
53674 | 2591 |
then have False |
53186 | 2592 |
proof (cases "kk \<noteq> l") |
2593 |
case True |
|
53674 | 2594 |
then show False using *[THEN kle_imp_pointwise, unfolded l(2) kk k(2)] |
53186 | 2595 |
apply (erule_tac x=l in allE) |
2596 |
using `k \<noteq> l` |
|
2597 |
apply auto |
|
2598 |
done |
|
2599 |
next |
|
2600 |
case False |
|
53674 | 2601 |
then have "kk \<noteq> k" using `k \<noteq> l` by auto |
2602 |
then show False using *[THEN kle_imp_pointwise, unfolded l(2) kk k(2)] |
|
53186 | 2603 |
apply (erule_tac x=k in allE) |
2604 |
using `k \<noteq> l` |
|
2605 |
apply auto |
|
2606 |
done |
|
2607 |
qed |
|
53674 | 2608 |
then show ?thesis by auto |
53186 | 2609 |
qed |
53674 | 2610 |
then show "s' \<in> {s, insert a' (s - {a})}" proof(cases "a\<in>s'") |
53186 | 2611 |
case True |
53674 | 2612 |
then have "s' = s" |
53186 | 2613 |
apply - |
2614 |
apply (rule lem1[OF a''(2)]) |
|
2615 |
using a'' `a \<in> s` |
|
2616 |
apply auto |
|
2617 |
done |
|
53674 | 2618 |
then show ?thesis by auto |
53186 | 2619 |
next |
53674 | 2620 |
case False then have "a'\<in>s'" using lem6 by auto |
2621 |
then have "s' = insert a' (s - {a})" |
|
53186 | 2622 |
apply - |
2623 |
apply (rule lem1[of _ a'' _ a']) |
|
2624 |
unfolding a''(2)[symmetric] using a'' and `a'\<notin>s` by auto |
|
53674 | 2625 |
then show ?thesis by auto |
53186 | 2626 |
qed |
2627 |
qed |
|
2628 |
ultimately have *: "?A = {s, insert a' (s - {a})}" by blast |
|
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
2629 |
have "s \<noteq> insert a' (s - {a})" using `a'\<notin>s` by auto |
53674 | 2630 |
then have ?thesis unfolding * by auto |
53186 | 2631 |
} |
2632 |
ultimately show ?thesis by auto |
|
2633 |
qed |
|
2634 |
||
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
2635 |
|
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
2636 |
subsection {* Hence another step towards concreteness. *} |
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
2637 |
|
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
2638 |
lemma kuhn_simplex_lemma: |
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
2639 |
assumes "\<forall>s. ksimplex p (n + 1) s \<longrightarrow> (rl ` s \<subseteq>{0..n+1})" |
53186 | 2640 |
"odd (card{f. \<exists>s a. ksimplex p (n + 1) s \<and> a \<in> s \<and> (f = s - {a}) \<and> |
2641 |
(rl ` f = {0 .. n}) \<and> ((\<exists>j\<in>{1..n+1}.\<forall>x\<in>f. x j = 0) \<or> (\<exists>j\<in>{1..n+1}.\<forall>x\<in>f. x j = p))})" |
|
2642 |
shows "odd(card {s\<in>{s. ksimplex p (n + 1) s}. rl ` s = {0..n+1} })" |
|
2643 |
proof - |
|
2644 |
have *: "\<And>x y. x = y \<Longrightarrow> odd (card x) \<Longrightarrow> odd (card y)" |
|
2645 |
by auto |
|
2646 |
have *: "odd(card {f\<in>{f. \<exists>s\<in>{s. ksimplex p (n + 1) s}. (\<exists>a\<in>s. f = s - {a})}. |
|
2647 |
(rl ` f = {0..n}) \<and> |
|
2648 |
((\<exists>j\<in>{1..n+1}. \<forall>x\<in>f. x j = 0) \<or> |
|
2649 |
(\<exists>j\<in>{1..n+1}. \<forall>x\<in>f. x j = p))})" |
|
2650 |
apply (rule *[OF _ assms(2)]) |
|
2651 |
apply auto |
|
2652 |
done |
|
2653 |
show ?thesis |
|
2654 |
apply (rule kuhn_complete_lemma[OF finite_simplices]) |
|
2655 |
prefer 6 |
|
2656 |
apply (rule *) |
|
2657 |
apply (rule, rule, rule) |
|
2658 |
apply (subst ksimplex_def) |
|
2659 |
defer |
|
2660 |
apply (rule, rule assms(1)[rule_format]) |
|
2661 |
unfolding mem_Collect_eq |
|
2662 |
apply assumption |
|
2663 |
apply default+ |
|
2664 |
unfolding mem_Collect_eq |
|
2665 |
apply (erule disjE bexE)+ |
|
2666 |
defer |
|
2667 |
apply (erule disjE bexE)+ |
|
2668 |
defer |
|
2669 |
apply default+ |
|
2670 |
unfolding mem_Collect_eq |
|
2671 |
apply (erule disjE bexE)+ |
|
2672 |
unfolding mem_Collect_eq |
|
2673 |
proof - |
|
2674 |
fix f s a |
|
2675 |
assume as: "ksimplex p (n + 1) s" "a\<in>s" "f = s - {a}" |
|
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
2676 |
let ?S = "{s. ksimplex p (n + 1) s \<and> (\<exists>a\<in>s. f = s - {a})}" |
53186 | 2677 |
have S: "?S = {s'. ksimplex p (n + 1) s' \<and> (\<exists>b\<in>s'. s' - {b} = s - {a})}" |
2678 |
unfolding as by blast |
|
2679 |
{ |
|
2680 |
fix j |
|
2681 |
assume j: "j \<in> {1..n + 1}" "\<forall>x\<in>f. x j = 0" |
|
53674 | 2682 |
then show "card {s. ksimplex p (n + 1) s \<and> (\<exists>a\<in>s. f = s - {a})} = 1" |
53186 | 2683 |
unfolding S |
2684 |
apply - |
|
2685 |
apply (rule ksimplex_replace_0) |
|
2686 |
apply (rule as)+ |
|
2687 |
unfolding as |
|
2688 |
apply auto |
|
2689 |
done |
|
2690 |
} |
|
2691 |
{ |
|
2692 |
fix j |
|
2693 |
assume j: "j \<in> {1..n + 1}" "\<forall>x\<in>f. x j = p" |
|
53674 | 2694 |
then show "card {s. ksimplex p (n + 1) s \<and> (\<exists>a\<in>s. f = s - {a})} = 1" |
53186 | 2695 |
unfolding S |
2696 |
apply - |
|
2697 |
apply (rule ksimplex_replace_1) |
|
2698 |
apply (rule as)+ |
|
2699 |
unfolding as |
|
2700 |
apply auto |
|
2701 |
done |
|
2702 |
} |
|
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
2703 |
show "\<not> ((\<exists>j\<in>{1..n+1}. \<forall>x\<in>f. x j = 0) \<or> (\<exists>j\<in>{1..n+1}. \<forall>x\<in>f. x j = p)) \<Longrightarrow> card ?S = 2" |
53186 | 2704 |
unfolding S |
2705 |
apply (rule ksimplex_replace_2) |
|
2706 |
apply (rule as)+ |
|
2707 |
unfolding as |
|
2708 |
apply auto |
|
2709 |
done |
|
2710 |
qed auto |
|
2711 |
qed |
|
2712 |
||
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
2713 |
|
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
2714 |
subsection {* Reduced labelling. *} |
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
2715 |
|
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
2716 |
definition "reduced label (n::nat) (x::nat\<Rightarrow>nat) = |
53186 | 2717 |
(SOME k. k \<le> n \<and> (\<forall>i. 1\<le>i \<and> i<k+1 \<longrightarrow> label x i = 0) \<and> |
2718 |
(k = n \<or> label x (k + 1) \<noteq> (0::nat)))" |
|
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
2719 |
|
53186 | 2720 |
lemma reduced_labelling: |
2721 |
shows "reduced label n x \<le> n" (is ?t1) |
|
2722 |
and "\<forall>i. 1\<le>i \<and> i < reduced label n x + 1 \<longrightarrow> (label x i = 0)" (is ?t2) |
|
2723 |
and "(reduced label n x = n) \<or> (label x (reduced label n x + 1) \<noteq> 0)" (is ?t3) |
|
2724 |
proof - |
|
2725 |
have num_WOP: "\<And>P k. P (k::nat) \<Longrightarrow> \<exists>n. P n \<and> (\<forall>m<n. \<not> P m)" |
|
2726 |
apply (drule ex_has_least_nat[where m="\<lambda>x. x"]) |
|
2727 |
apply (erule exE,rule_tac x=x in exI) |
|
2728 |
apply auto |
|
2729 |
done |
|
2730 |
have *: "n \<le> n \<and> (label x (n + 1) \<noteq> 0 \<or> n = n)" by auto |
|
2731 |
then guess N |
|
2732 |
apply (drule_tac num_WOP[of "\<lambda>j. j\<le>n \<and> (label x (j+1) \<noteq> 0 \<or> n = j)"]) |
|
2733 |
apply (erule exE) |
|
2734 |
done |
|
2735 |
note N = this |
|
2736 |
have N': "N \<le> n" |
|
2737 |
"\<forall>i. 1 \<le> i \<and> i < N + 1 \<longrightarrow> label x i = 0" "N = n \<or> label x (N + 1) \<noteq> 0" |
|
2738 |
defer |
|
2739 |
proof (rule, rule) |
|
2740 |
fix i |
|
2741 |
assume i: "1\<le>i \<and> i<N+1" |
|
53674 | 2742 |
then show "label x i = 0" |
53186 | 2743 |
using N[THEN conjunct2,THEN spec[where x="i - 1"]] |
2744 |
using N by auto |
|
2745 |
qed (insert N, auto) |
|
2746 |
show ?t1 ?t2 ?t3 |
|
2747 |
unfolding reduced_def |
|
2748 |
apply (rule_tac[!] someI2_ex) |
|
2749 |
using N' |
|
2750 |
apply (auto intro!: exI[where x=N]) |
|
2751 |
done |
|
2752 |
qed |
|
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
2753 |
|
53186 | 2754 |
lemma reduced_labelling_unique: |
2755 |
fixes x :: "nat \<Rightarrow> nat" |
|
2756 |
assumes "r \<le> n" |
|
2757 |
"\<forall>i. 1 \<le> i \<and> i < r + 1 \<longrightarrow> (label x i = 0)" "(r = n) \<or> (label x (r + 1) \<noteq> 0)" |
|
2758 |
shows "reduced label n x = r" |
|
2759 |
apply (rule le_antisym) |
|
2760 |
apply (rule_tac[!] ccontr) |
|
2761 |
unfolding not_le |
|
2762 |
using reduced_labelling[of label n x] |
|
2763 |
using assms |
|
2764 |
apply auto |
|
2765 |
done |
|
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
2766 |
|
53186 | 2767 |
lemma reduced_labelling_zero: |
2768 |
assumes "j\<in>{1..n}" "label x j = 0" |
|
2769 |
shows "reduced label n x \<noteq> j - 1" |
|
2770 |
using reduced_labelling[of label n x] |
|
2771 |
using assms by fastforce |
|
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
2772 |
|
53186 | 2773 |
lemma reduced_labelling_nonzero: |
2774 |
assumes "j\<in>{1..n}" "label x j \<noteq> 0" |
|
2775 |
shows "reduced label n x < j" |
|
2776 |
using assms and reduced_labelling[of label n x] |
|
2777 |
apply (erule_tac x=j in allE) |
|
2778 |
apply auto |
|
2779 |
done |
|
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
2780 |
|
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
2781 |
lemma reduced_labelling_Suc: |
53186 | 2782 |
assumes "reduced lab (n + 1) x \<noteq> n + 1" |
2783 |
shows "reduced lab (n + 1) x = reduced lab n x" |
|
2784 |
apply (subst eq_commute) |
|
2785 |
apply (rule reduced_labelling_unique) |
|
2786 |
using reduced_labelling[of lab "n+1" x] and assms |
|
2787 |
apply auto |
|
2788 |
done |
|
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
2789 |
|
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
2790 |
lemma complete_face_top: |
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
2791 |
assumes "\<forall>x\<in>f. \<forall>j\<in>{1..n+1}. x j = 0 \<longrightarrow> lab x j = 0" |
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
2792 |
"\<forall>x\<in>f. \<forall>j\<in>{1..n+1}. x j = p \<longrightarrow> lab x j = 1" |
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
2793 |
shows "((reduced lab (n + 1)) ` f = {0..n}) \<and> ((\<exists>j\<in>{1..n+1}. \<forall>x\<in>f. x j = 0) \<or> (\<exists>j\<in>{1..n+1}. \<forall>x\<in>f. x j = p)) \<longleftrightarrow> |
53186 | 2794 |
((reduced lab (n + 1)) ` f = {0..n}) \<and> (\<forall>x\<in>f. x (n + 1) = p)" (is "?l = ?r") |
2795 |
proof |
|
2796 |
assume ?l (is "?as \<and> (?a \<or> ?b)") |
|
53674 | 2797 |
then show ?r |
53186 | 2798 |
apply - |
2799 |
apply (rule, erule conjE, assumption) |
|
2800 |
proof (cases ?a) |
|
2801 |
case True |
|
2802 |
then guess j .. note j = this |
|
2803 |
{ |
|
2804 |
fix x |
|
2805 |
assume x: "x \<in> f" |
|
2806 |
have "reduced lab (n + 1) x \<noteq> j - 1" |
|
2807 |
using j |
|
2808 |
apply - |
|
2809 |
apply (rule reduced_labelling_zero) |
|
2810 |
defer |
|
2811 |
apply (rule assms(1)[rule_format]) |
|
2812 |
using x |
|
2813 |
apply auto |
|
2814 |
done |
|
2815 |
} |
|
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
2816 |
moreover have "j - 1 \<in> {0..n}" using j by auto |
53185 | 2817 |
then guess y unfolding `?l`[THEN conjunct1,symmetric] and image_iff .. note y = this |
53186 | 2818 |
ultimately have False by auto |
53674 | 2819 |
then show "\<forall>x\<in>f. x (n + 1) = p" by auto |
53186 | 2820 |
next |
2821 |
case False |
|
53674 | 2822 |
then have ?b using `?l` by blast |
53186 | 2823 |
then guess j .. note j = this |
2824 |
{ |
|
2825 |
fix x |
|
2826 |
assume x: "x \<in> f" |
|
2827 |
have "reduced lab (n + 1) x < j" |
|
2828 |
using j |
|
2829 |
apply - |
|
2830 |
apply (rule reduced_labelling_nonzero) |
|
2831 |
using assms(2)[rule_format,of x j] and x |
|
2832 |
apply auto |
|
2833 |
done |
|
2834 |
} note * = this |
|
2835 |
have "j = n + 1" |
|
2836 |
proof (rule ccontr) |
|
2837 |
case goal1 |
|
53674 | 2838 |
then have "j < n + 1" using j by auto |
53186 | 2839 |
moreover |
2840 |
have "n \<in> {0..n}" by auto |
|
2841 |
then guess y unfolding `?l`[THEN conjunct1,symmetric] image_iff .. |
|
2842 |
ultimately show False using *[of y] by auto |
|
2843 |
qed |
|
53674 | 2844 |
then show "\<forall>x\<in>f. x (n + 1) = p" using j by auto |
53186 | 2845 |
qed |
2846 |
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
|
2847 |
|
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
2848 |
|
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
2849 |
subsection {* Hence we get just about the nice induction. *} |
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
2850 |
|
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
2851 |
lemma kuhn_induction: |
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
2852 |
assumes "0 < p" "\<forall>x. \<forall>j\<in>{1..n+1}. (\<forall>j. x j \<le> p) \<and> (x j = 0) \<longrightarrow> (lab x j = 0)" |
53248 | 2853 |
"\<forall>x. \<forall>j\<in>{1..n+1}. (\<forall>j. x j \<le> p) \<and> (x j = p) \<longrightarrow> (lab x j = 1)" |
2854 |
"odd (card {f. ksimplex p n f \<and> ((reduced lab n) ` f = {0..n})})" |
|
2855 |
shows "odd (card {s. ksimplex p (n+1) s \<and>((reduced lab (n+1)) ` s = {0..n+1})})" |
|
2856 |
proof - |
|
2857 |
have *: "\<And>s t. odd (card s) \<Longrightarrow> s = t \<Longrightarrow> odd (card t)" |
|
2858 |
"\<And>s f. (\<And>x. f x \<le> n +1 ) \<Longrightarrow> f ` s \<subseteq> {0..n+1}" by auto |
|
2859 |
show ?thesis |
|
2860 |
apply (rule kuhn_simplex_lemma[unfolded mem_Collect_eq]) |
|
2861 |
apply (rule, rule, rule *, rule reduced_labelling) |
|
2862 |
apply (rule *(1)[OF assms(4)]) |
|
2863 |
apply (rule set_eqI) |
|
2864 |
unfolding mem_Collect_eq |
|
2865 |
apply (rule, erule conjE) |
|
2866 |
defer |
|
2867 |
apply rule |
|
2868 |
proof - |
|
2869 |
fix f |
|
2870 |
assume as: "ksimplex p n f" "reduced lab n ` f = {0..n}" |
|
2871 |
have *: "\<forall>x\<in>f. \<forall>j\<in>{1..n + 1}. x j = 0 \<longrightarrow> lab x j = 0" |
|
2872 |
"\<forall>x\<in>f. \<forall>j\<in>{1..n + 1}. x j = p \<longrightarrow> lab x j = 1" |
|
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
2873 |
using assms(2-3) using as(1)[unfolded ksimplex_def] by auto |
53248 | 2874 |
have allp: "\<forall>x\<in>f. x (n + 1) = p" |
2875 |
using assms(2) using as(1)[unfolded ksimplex_def] by auto |
|
2876 |
{ |
|
2877 |
fix x |
|
2878 |
assume "x \<in> f" |
|
53674 | 2879 |
then have "reduced lab (n + 1) x < n + 1" |
53248 | 2880 |
apply - |
2881 |
apply (rule reduced_labelling_nonzero) |
|
2882 |
defer using assms(3) using as(1)[unfolded ksimplex_def] |
|
2883 |
apply auto |
|
2884 |
done |
|
53674 | 2885 |
then have "reduced lab (n + 1) x = reduced lab n x" |
53248 | 2886 |
apply - |
2887 |
apply (rule reduced_labelling_Suc) |
|
2888 |
using reduced_labelling(1) |
|
2889 |
apply auto |
|
2890 |
done |
|
2891 |
} |
|
53674 | 2892 |
then have "reduced lab (n + 1) ` f = {0..n}" |
53248 | 2893 |
unfolding as(2)[symmetric] |
2894 |
apply - |
|
2895 |
apply (rule set_eqI) |
|
2896 |
unfolding image_iff |
|
2897 |
apply auto |
|
2898 |
done |
|
2899 |
moreover guess s using as(1)[unfolded simplex_top_face[OF assms(1) allp,symmetric]] .. |
|
2900 |
then guess a .. |
|
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
2901 |
ultimately show "\<exists>s a. ksimplex p (n + 1) s \<and> |
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
2902 |
a \<in> s \<and> f = s - {a} \<and> reduced lab (n + 1) ` f = {0..n} \<and> ((\<exists>j\<in>{1..n + 1}. \<forall>x\<in>f. x j = 0) \<or> (\<exists>j\<in>{1..n + 1}. \<forall>x\<in>f. x j = p))" (is ?ex) |
53248 | 2903 |
apply (rule_tac x = s in exI) |
2904 |
apply (rule_tac x = a in exI) |
|
2905 |
unfolding complete_face_top[OF *] |
|
2906 |
using allp as(1) |
|
2907 |
apply auto |
|
2908 |
done |
|
2909 |
next |
|
2910 |
fix f |
|
2911 |
assume as: "\<exists>s a. ksimplex p (n + 1) s \<and> |
|
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
2912 |
a \<in> s \<and> f = s - {a} \<and> reduced lab (n + 1) ` f = {0..n} \<and> ((\<exists>j\<in>{1..n + 1}. \<forall>x\<in>f. x j = 0) \<or> (\<exists>j\<in>{1..n + 1}. \<forall>x\<in>f. x j = p))" (is ?ex) |
53248 | 2913 |
then guess s .. |
2914 |
then guess a |
|
2915 |
apply - |
|
2916 |
apply (erule exE,(erule conjE)+) |
|
2917 |
done |
|
2918 |
note sa = this |
|
2919 |
{ |
|
2920 |
fix x |
|
2921 |
assume "x \<in> f" |
|
53674 | 2922 |
then have "reduced lab (n + 1) x \<in> reduced lab (n + 1) ` f" |
53248 | 2923 |
by auto |
53674 | 2924 |
then have "reduced lab (n + 1) x < n + 1" |
53248 | 2925 |
using sa(4) by auto |
53674 | 2926 |
then have "reduced lab (n + 1) x = reduced lab n x" |
53248 | 2927 |
apply - |
2928 |
apply (rule reduced_labelling_Suc) |
|
2929 |
using reduced_labelling(1) |
|
2930 |
apply auto |
|
2931 |
done |
|
2932 |
} |
|
53674 | 2933 |
then show part1: "reduced lab n ` f = {0..n}" |
53248 | 2934 |
unfolding sa(4)[symmetric] |
2935 |
apply - |
|
2936 |
apply (rule set_eqI) |
|
2937 |
unfolding image_iff |
|
2938 |
apply auto |
|
2939 |
done |
|
2940 |
have *: "\<forall>x\<in>f. x (n + 1) = p" |
|
2941 |
proof (cases "\<exists>j\<in>{1..n + 1}. \<forall>x\<in>f. x j = 0") |
|
2942 |
case True |
|
2943 |
then guess j .. |
|
53674 | 2944 |
then have "\<And>x. x \<in> f \<Longrightarrow> reduced lab (n + 1) x \<noteq> j - 1" |
53248 | 2945 |
apply - |
2946 |
apply (rule reduced_labelling_zero) |
|
2947 |
apply assumption |
|
2948 |
apply (rule assms(2)[rule_format]) |
|
2949 |
using sa(1)[unfolded ksimplex_def] |
|
2950 |
unfolding sa |
|
2951 |
apply auto |
|
2952 |
done |
|
2953 |
moreover |
|
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
2954 |
have "j - 1 \<in> {0..n}" using `j\<in>{1..n+1}` by auto |
53248 | 2955 |
ultimately have False |
2956 |
unfolding sa(4)[symmetric] |
|
2957 |
unfolding image_iff |
|
2958 |
by fastforce |
|
53674 | 2959 |
then show ?thesis by auto |
53248 | 2960 |
next |
2961 |
case False |
|
53674 | 2962 |
then have "\<exists>j\<in>{1..n + 1}. \<forall>x\<in>f. x j = p" |
53248 | 2963 |
using sa(5) by fastforce then guess j .. note j=this |
53674 | 2964 |
then show ?thesis |
53248 | 2965 |
proof (cases "j = n + 1") |
53674 | 2966 |
case False then have *: "j \<in> {1..n}" |
53248 | 2967 |
using j by auto |
53674 | 2968 |
then have "\<And>x. x \<in> f \<Longrightarrow> reduced lab n x < j" |
53248 | 2969 |
apply (rule reduced_labelling_nonzero) |
2970 |
proof - |
|
2971 |
fix x |
|
2972 |
assume "x \<in> f" |
|
53674 | 2973 |
then have "lab x j = 1" |
53248 | 2974 |
apply - |
2975 |
apply (rule assms(3)[rule_format,OF j(1)]) |
|
2976 |
using sa(1)[unfolded ksimplex_def] |
|
2977 |
using j |
|
2978 |
unfolding sa |
|
2979 |
apply auto |
|
2980 |
done |
|
53674 | 2981 |
then show "lab x j \<noteq> 0" by auto |
53248 | 2982 |
qed |
2983 |
moreover have "j \<in> {0..n}" using * by auto |
|
2984 |
ultimately have False |
|
2985 |
unfolding part1[symmetric] |
|
2986 |
using * unfolding image_iff |
|
2987 |
by auto |
|
53674 | 2988 |
then show ?thesis by auto |
53248 | 2989 |
qed auto |
2990 |
qed |
|
53674 | 2991 |
then show "ksimplex p n f" |
53248 | 2992 |
using as unfolding simplex_top_face[OF assms(1) *,symmetric] by auto |
2993 |
qed |
|
2994 |
qed |
|
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
2995 |
|
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
2996 |
lemma kuhn_induction_Suc: |
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
2997 |
assumes "0 < p" "\<forall>x. \<forall>j\<in>{1..Suc n}. (\<forall>j. x j \<le> p) \<and> (x j = 0) \<longrightarrow> (lab x j = 0)" |
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
2998 |
"\<forall>x. \<forall>j\<in>{1..Suc n}. (\<forall>j. x j \<le> p) \<and> (x j = p) \<longrightarrow> (lab x j = 1)" |
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
2999 |
"odd (card {f. ksimplex p n f \<and> ((reduced lab n) ` f = {0..n})})" |
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
3000 |
shows "odd (card {s. ksimplex p (Suc n) s \<and>((reduced lab (Suc n)) ` s = {0..Suc n})})" |
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
3001 |
using assms unfolding Suc_eq_plus1 by(rule kuhn_induction) |
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
3002 |
|
53248 | 3003 |
|
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
3004 |
subsection {* And so we get the final combinatorial result. *} |
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
3005 |
|
53248 | 3006 |
lemma ksimplex_0: "ksimplex p 0 s \<longleftrightarrow> s = {(\<lambda>x. p)}" (is "?l = ?r") |
3007 |
proof |
|
3008 |
assume l: ?l |
|
3009 |
guess a using ksimplexD(3)[OF l, unfolded add_0] unfolding card_1_exists .. note a = this |
|
3010 |
have "a = (\<lambda>x. p)" |
|
3011 |
using ksimplexD(5)[OF l, rule_format, OF a(1)] by rule auto |
|
53674 | 3012 |
then show ?r using a by auto |
53248 | 3013 |
next |
3014 |
assume r: ?r |
|
3015 |
show ?l unfolding r ksimplex_eq by auto |
|
3016 |
qed |
|
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
3017 |
|
53248 | 3018 |
lemma reduce_labelling_zero[simp]: "reduced lab 0 x = 0" |
3019 |
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
|
3020 |
|
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
3021 |
lemma kuhn_combinatorial: |
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
3022 |
assumes "0 < p" "\<forall>x j. (\<forall>j. x(j) \<le> p) \<and> 1 \<le> j \<and> j \<le> n \<and> (x j = 0) \<longrightarrow> (lab x j = 0)" |
53248 | 3023 |
"\<forall>x j. (\<forall>j. x(j) \<le> p) \<and> 1 \<le> j \<and> j \<le> n \<and> (x j = p) \<longrightarrow> (lab x j = 1)" |
3024 |
shows " odd (card {s. ksimplex p n s \<and> ((reduced lab n) ` s = {0..n})})" |
|
3025 |
using assms |
|
3026 |
proof (induct n) |
|
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
3027 |
let ?M = "\<lambda>n. {s. ksimplex p n s \<and> ((reduced lab n) ` s = {0..n})}" |
53248 | 3028 |
{ |
3029 |
case 0 |
|
3030 |
have *: "?M 0 = {{(\<lambda>x. p)}}" |
|
3031 |
unfolding ksimplex_0 by auto |
|
3032 |
show ?case unfolding * by auto |
|
3033 |
next |
|
3034 |
case (Suc n) |
|
3035 |
have "odd (card (?M n))" |
|
3036 |
apply (rule Suc(1)[OF Suc(2)]) |
|
3037 |
using Suc(3-) |
|
3038 |
apply auto |
|
3039 |
done |
|
53674 | 3040 |
then show ?case |
53248 | 3041 |
apply - |
3042 |
apply (rule kuhn_induction_Suc) |
|
3043 |
using Suc(2-) |
|
3044 |
apply auto |
|
3045 |
done |
|
3046 |
} |
|
3047 |
qed |
|
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
3048 |
|
53248 | 3049 |
lemma kuhn_lemma: |
3050 |
assumes "0 < (p::nat)" "0 < (n::nat)" |
|
3051 |
"\<forall>x. (\<forall>i\<in>{1..n}. x i \<le> p) \<longrightarrow> (\<forall>i\<in>{1..n}. (label x i = (0::nat)) \<or> (label x i = 1))" |
|
3052 |
"\<forall>x. (\<forall>i\<in>{1..n}. x i \<le> p) \<longrightarrow> (\<forall>i\<in>{1..n}. (x i = 0) \<longrightarrow> (label x i = 0))" |
|
3053 |
"\<forall>x. (\<forall>i\<in>{1..n}. x i \<le> p) \<longrightarrow> (\<forall>i\<in>{1..n}. (x i = p) \<longrightarrow> (label x i = 1))" |
|
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
3054 |
obtains q where "\<forall>i\<in>{1..n}. q i < p" |
53248 | 3055 |
"\<forall>i\<in>{1..n}. \<exists>r s. (\<forall>j\<in>{1..n}. q(j) \<le> r(j) \<and> r(j) \<le> q(j) + 1) \<and> |
3056 |
(\<forall>j\<in>{1..n}. q(j) \<le> s(j) \<and> s(j) \<le> q(j) + 1) \<and> |
|
3057 |
~(label r i = label s i)" |
|
3058 |
proof - |
|
3059 |
let ?A = "{s. ksimplex p n s \<and> reduced label n ` s = {0..n}}" |
|
3060 |
have "n \<noteq> 0" using assms by auto |
|
3061 |
have conjD:"\<And>P Q. P \<and> Q \<Longrightarrow> P" "\<And>P Q. P \<and> Q \<Longrightarrow> Q" |
|
3062 |
by auto |
|
3063 |
have "odd (card ?A)" |
|
3064 |
apply (rule kuhn_combinatorial[of p n label]) |
|
3065 |
using assms |
|
3066 |
apply auto |
|
3067 |
done |
|
53674 | 3068 |
then have "card ?A \<noteq> 0" |
53248 | 3069 |
apply - |
3070 |
apply (rule ccontr) |
|
3071 |
apply auto |
|
3072 |
done |
|
53674 | 3073 |
then have "?A \<noteq> {}" unfolding card_eq_0_iff by auto |
53248 | 3074 |
then obtain s where "s \<in> ?A" |
3075 |
by auto note s=conjD[OF this[unfolded mem_Collect_eq]] |
|
3076 |
guess a b by (rule ksimplex_extrema_strong[OF s(1) `n\<noteq>0`]) note ab = this |
|
3077 |
show ?thesis |
|
3078 |
apply (rule that[of a]) |
|
3079 |
apply (rule_tac[!] ballI) |
|
3080 |
proof - |
|
3081 |
fix i |
|
3082 |
assume "i\<in>{1..n}" |
|
53674 | 3083 |
then have "a i + 1 \<le> p" |
53248 | 3084 |
apply - |
3085 |
apply (rule order_trans[of _ "b i"]) |
|
3086 |
apply (subst ab(5)[THEN spec[where x=i]]) |
|
3087 |
using s(1)[unfolded ksimplex_def] |
|
3088 |
defer |
|
3089 |
apply - |
|
3090 |
apply (erule conjE)+ |
|
3091 |
apply (drule_tac bspec[OF _ ab(2)])+ |
|
3092 |
apply auto |
|
3093 |
done |
|
53674 | 3094 |
then show "a i < p" by auto |
53248 | 3095 |
next |
3096 |
case goal2 |
|
53674 | 3097 |
then have "i \<in> reduced label n ` s" using s by auto |
53248 | 3098 |
then guess u unfolding image_iff .. note u = this |
3099 |
from goal2 have "i - 1 \<in> reduced label n ` s" |
|
3100 |
using s by auto |
|
3101 |
then guess v unfolding image_iff .. note v = this |
|
3102 |
show ?case |
|
3103 |
apply (rule_tac x = u in exI) |
|
3104 |
apply (rule_tac x = v in exI) |
|
3105 |
apply (rule conjI) |
|
3106 |
defer |
|
3107 |
apply (rule conjI) |
|
3108 |
defer 2 |
|
3109 |
apply (rule_tac[1-2] ballI) |
|
3110 |
proof - |
|
3111 |
show "label u i \<noteq> label v i" |
|
3112 |
using reduced_labelling [of label n u] reduced_labelling [of label n v] |
|
3113 |
unfolding u(2)[symmetric] v(2)[symmetric] |
|
3114 |
using goal2 |
|
3115 |
apply auto |
|
3116 |
done |
|
3117 |
fix j |
|
3118 |
assume j: "j \<in> {1..n}" |
|
3119 |
show "a j \<le> u j \<and> u j \<le> a j + 1" "a j \<le> v j \<and> v j \<le> a j + 1" |
|
3120 |
using conjD[OF ab(4)[rule_format, OF u(1)]] |
|
3121 |
and conjD[OF ab(4)[rule_format, OF v(1)]] |
|
3122 |
apply - |
|
3123 |
apply (drule_tac[!] kle_imp_pointwise)+ |
|
3124 |
apply (erule_tac[!] x=j in allE)+ |
|
3125 |
unfolding ab(5)[rule_format] |
|
3126 |
using j |
|
3127 |
apply auto |
|
3128 |
done |
|
3129 |
qed |
|
3130 |
qed |
|
3131 |
qed |
|
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
3132 |
|
53185 | 3133 |
|
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
3134 |
subsection {* The main result for the unit cube. *} |
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
3135 |
|
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
3136 |
lemma kuhn_labelling_lemma': |
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
3137 |
assumes "(\<forall>x::nat\<Rightarrow>real. P x \<longrightarrow> P (f x))" "\<forall>x. P x \<longrightarrow> (\<forall>i::nat. Q i \<longrightarrow> 0 \<le> x i \<and> x i \<le> 1)" |
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
3138 |
shows "\<exists>l. (\<forall>x i. l x i \<le> (1::nat)) \<and> |
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
3139 |
(\<forall>x i. P x \<and> Q i \<and> (x i = 0) \<longrightarrow> (l x i = 0)) \<and> |
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
3140 |
(\<forall>x i. P x \<and> Q i \<and> (x i = 1) \<longrightarrow> (l x i = 1)) \<and> |
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
3141 |
(\<forall>x i. P x \<and> Q i \<and> (l x i = 0) \<longrightarrow> x i \<le> f(x) i) \<and> |
53185 | 3142 |
(\<forall>x i. P x \<and> Q i \<and> (l x i = 1) \<longrightarrow> f(x) i \<le> x i)" |
3143 |
proof - |
|
3144 |
have and_forall_thm: "\<And>P Q. (\<forall>x. P x) \<and> (\<forall>x. Q x) \<longleftrightarrow> (\<forall>x. P x \<and> Q x)" by auto |
|
3145 |
have *: "\<forall>x y::real. 0 \<le> x \<and> x \<le> 1 \<and> 0 \<le> y \<and> y \<le> 1 \<longrightarrow> (x \<noteq> 1 \<and> x \<le> y \<or> x \<noteq> 0 \<and> y \<le> x)" |
|
3146 |
by auto |
|
3147 |
show ?thesis |
|
3148 |
unfolding and_forall_thm |
|
3149 |
apply (subst choice_iff[symmetric])+ |
|
3150 |
proof (rule, rule) |
|
3151 |
case goal1 |
|
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
3152 |
let ?R = "\<lambda>y. (P x \<and> Q xa \<and> x xa = 0 \<longrightarrow> y = (0::nat)) \<and> |
53185 | 3153 |
(P x \<and> Q xa \<and> x xa = 1 \<longrightarrow> y = 1) \<and> |
3154 |
(P x \<and> Q xa \<and> y = 0 \<longrightarrow> x xa \<le> (f x) xa) \<and> |
|
3155 |
(P x \<and> Q xa \<and> y = 1 \<longrightarrow> (f x) xa \<le> x xa)" |
|
3156 |
{ |
|
3157 |
assume "P x" "Q xa" |
|
53674 | 3158 |
then have "0 \<le> (f x) xa \<and> (f x) xa \<le> 1" |
53185 | 3159 |
using assms(2)[rule_format,of "f x" xa] |
3160 |
apply (drule_tac assms(1)[rule_format]) |
|
3161 |
apply auto |
|
3162 |
done |
|
3163 |
} |
|
53674 | 3164 |
then have "?R 0 \<or> ?R 1" by auto |
3165 |
then show ?case by auto |
|
53185 | 3166 |
qed |
3167 |
qed |
|
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
3168 |
|
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
|
3169 |
lemma brouwer_cube: |
53185 | 3170 |
fixes f :: "'a::ordered_euclidean_space \<Rightarrow> 'a::ordered_euclidean_space" |
53674 | 3171 |
assumes "continuous_on {0..(\<Sum>Basis)} f" |
3172 |
and "f ` {0..(\<Sum>Basis)} \<subseteq> {0..(\<Sum>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
|
3173 |
shows "\<exists>x\<in>{0..(\<Sum>Basis)}. f x = x" |
53185 | 3174 |
proof (rule ccontr) |
3175 |
def n \<equiv> "DIM('a)" |
|
3176 |
have n: "1 \<le> n" "0 < n" "n \<noteq> 0" |
|
3177 |
unfolding n_def by (auto simp add: Suc_le_eq DIM_positive) |
|
53674 | 3178 |
assume "\<not> ?thesis" |
3179 |
then have *: "\<not> (\<exists>x\<in>{0..\<Sum>Basis}. f x - x = 0)" |
|
3180 |
by auto |
|
53185 | 3181 |
guess d |
3182 |
apply (rule brouwer_compactness_lemma[OF compact_interval _ *]) |
|
3183 |
apply (rule continuous_on_intros assms)+ |
|
3184 |
done |
|
3185 |
note d = this [rule_format] |
|
3186 |
have *: "\<forall>x. x \<in> {0..\<Sum>Basis} \<longrightarrow> f x \<in> {0..\<Sum>Basis}" "\<forall>x. x \<in> {0..(\<Sum>Basis)::'a} \<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
|
3187 |
(\<forall>i\<in>Basis. True \<longrightarrow> 0 \<le> x \<bullet> i \<and> x \<bullet> i \<le> 1)" |
53185 | 3188 |
using assms(2)[unfolded image_subset_iff Ball_def] |
3189 |
unfolding mem_interval by auto |
|
3190 |
guess label using kuhn_labelling_lemma[OF *] by (elim exE conjE) |
|
3191 |
note label = this [rule_format] |
|
53674 | 3192 |
have lem1: "\<forall>x\<in>{0..\<Sum>Basis}.\<forall>y\<in>{0..\<Sum>Basis}.\<forall>i\<in>Basis. label x i \<noteq> label y i \<longrightarrow> |
3193 |
abs (f x \<bullet> i - x \<bullet> i) \<le> norm (f y - f x) + norm (y - x)" |
|
53185 | 3194 |
proof safe |
3195 |
fix x y :: 'a |
|
53674 | 3196 |
assume x: "x\<in>{0..\<Sum>Basis}" |
3197 |
assume y: "y\<in>{0..\<Sum>Basis}" |
|
53185 | 3198 |
fix i |
3199 |
assume i: "label x i \<noteq> label y i" "i \<in> Basis" |
|
3200 |
have *: "\<And>x y fx fy :: real. x \<le> fx \<and> fy \<le> y \<or> fx \<le> x \<and> y \<le> fy \<Longrightarrow> |
|
3201 |
abs (fx - x) \<le> abs (fy - fx) + abs (y - x)" 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
|
3202 |
have "\<bar>(f x - x) \<bullet> i\<bar> \<le> abs((f y - f x)\<bullet>i) + abs((y - x)\<bullet>i)" |
899c9c4e4a4c
Remove the indexed basis from the definition of euclidean spaces and only use the set of Basis vectors
hoelzl
parents:
50514
diff
changeset
|
3203 |
unfolding inner_simps |
53185 | 3204 |
apply (rule *) |
3205 |
apply (cases "label x i = 0") |
|
3206 |
apply (rule disjI1, rule) |
|
3207 |
prefer 3 |
|
3208 |
proof (rule disjI2, rule) |
|
3209 |
assume lx: "label x i = 0" |
|
53674 | 3210 |
then have ly: "label y i = 1" |
53185 | 3211 |
using i label(1)[of i y] by auto |
3212 |
show "x \<bullet> i \<le> f x \<bullet> i" |
|
3213 |
apply (rule label(4)[rule_format]) |
|
53674 | 3214 |
using x y lx i(2) |
53252 | 3215 |
apply auto |
53185 | 3216 |
done |
3217 |
show "f y \<bullet> i \<le> y \<bullet> i" |
|
3218 |
apply (rule label(5)[rule_format]) |
|
53674 | 3219 |
using x y ly i(2) |
53252 | 3220 |
apply auto |
53185 | 3221 |
done |
3222 |
next |
|
3223 |
assume "label x i \<noteq> 0" |
|
53674 | 3224 |
then have l:"label x i = 1" "label y i = 0" |
37489
44e42d392c6e
Introduce a type class for euclidean spaces, port most lemmas from real^'n to this type class.
hoelzl
parents:
36587
diff
changeset
|
3225 |
using i label(1)[of i x] label(1)[of i y] by auto |
53185 | 3226 |
show "f x \<bullet> i \<le> x \<bullet> i" |
3227 |
apply (rule label(5)[rule_format]) |
|
53674 | 3228 |
using x y l i(2) |
53252 | 3229 |
apply auto |
53185 | 3230 |
done |
3231 |
show "y \<bullet> i \<le> f y \<bullet> i" |
|
3232 |
apply (rule label(4)[rule_format]) |
|
53674 | 3233 |
using x y l i(2) |
53252 | 3234 |
apply auto |
53185 | 3235 |
done |
3236 |
qed |
|
3237 |
also have "\<dots> \<le> norm (f y - f x) + norm (y - x)" |
|
3238 |
apply (rule add_mono) |
|
3239 |
apply (rule Basis_le_norm[OF i(2)])+ |
|
3240 |
done |
|
3241 |
finally show "\<bar>f x \<bullet> i - x \<bullet> i\<bar> \<le> norm (f y - f x) + norm (y - x)" |
|
3242 |
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
|
3243 |
qed |
899c9c4e4a4c
Remove the indexed basis from the definition of euclidean spaces and only use the set of Basis vectors
hoelzl
parents:
50514
diff
changeset
|
3244 |
have "\<exists>e>0. \<forall>x\<in>{0..\<Sum>Basis}. \<forall>y\<in>{0..\<Sum>Basis}. \<forall>z\<in>{0..\<Sum>Basis}. \<forall>i\<in>Basis. |
53185 | 3245 |
norm(x - z) < e \<and> norm(y - z) < e \<and> label x i \<noteq> label y i \<longrightarrow> abs((f(z) - z)\<bullet>i) < d / (real n)" |
3246 |
proof - |
|
3247 |
have d':"d / real n / 8 > 0" |
|
3248 |
apply (rule divide_pos_pos)+ |
|
3249 |
using d(1) unfolding n_def |
|
3250 |
apply (auto simp: DIM_positive) |
|
3251 |
done |
|
3252 |
have *: "uniformly_continuous_on {0..\<Sum>Basis} f" |
|
3253 |
by (rule compact_uniformly_continuous[OF assms(1) compact_interval]) |
|
3254 |
guess e using *[unfolded uniformly_continuous_on_def,rule_format,OF d'] by (elim exE conjE) |
|
36587 | 3255 |
note e=this[rule_format,unfolded dist_norm] |
53185 | 3256 |
show ?thesis |
3257 |
apply (rule_tac x="min (e/2) (d/real n/8)" in exI) |
|
53248 | 3258 |
apply safe |
3259 |
proof - |
|
53185 | 3260 |
show "0 < min (e / 2) (d / real n / 8)" |
3261 |
using d' e by auto |
|
3262 |
fix x y z i |
|
3263 |
assume as: "x \<in> {0..\<Sum>Basis}" "y \<in> {0..\<Sum>Basis}" "z \<in> {0..\<Sum>Basis}" |
|
37489
44e42d392c6e
Introduce a type class for euclidean spaces, port most lemmas from real^'n to this type class.
hoelzl
parents:
36587
diff
changeset
|
3264 |
"norm (x - z) < min (e / 2) (d / real n / 8)" |
53185 | 3265 |
"norm (y - z) < min (e / 2) (d / real n / 8)" "label x i \<noteq> label y i" |
3266 |
and i: "i \<in> Basis" |
|
3267 |
have *: "\<And>z fz x fx n1 n2 n3 n4 d4 d :: real. abs(fx - x) \<le> n1 + n2 \<Longrightarrow> |
|
3268 |
abs(fx - fz) \<le> n3 \<Longrightarrow> abs(x - z) \<le> n4 \<Longrightarrow> |
|
3269 |
n1 < d4 \<Longrightarrow> n2 < 2 * d4 \<Longrightarrow> n3 < d4 \<Longrightarrow> n4 < d4 \<Longrightarrow> |
|
3270 |
(8 * d4 = d) \<Longrightarrow> abs(fz - z) < d" by auto |
|
3271 |
show "\<bar>(f z - z) \<bullet> i\<bar> < d / real n" unfolding inner_simps |
|
3272 |
proof (rule *) |
|
3273 |
show "\<bar>f x \<bullet> i - x \<bullet> i\<bar> \<le> norm (f y -f x) + norm (y - x)" |
|
3274 |
apply (rule lem1[rule_format]) |
|
3275 |
using as i apply auto |
|
3276 |
done |
|
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
|
3277 |
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)" |
53185 | 3278 |
unfolding inner_diff_left[symmetric] by(rule Basis_le_norm[OF i])+ |
3279 |
have tria:"norm (y - x) \<le> norm (y - z) + norm (x - z)" |
|
3280 |
using dist_triangle[of y x z, unfolded dist_norm] |
|
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
3281 |
unfolding norm_minus_commute by auto |
53185 | 3282 |
also have "\<dots> < e / 2 + e / 2" |
3283 |
apply (rule add_strict_mono) |
|
53252 | 3284 |
using as(4,5) |
3285 |
apply auto |
|
53185 | 3286 |
done |
3287 |
finally show "norm (f y - f x) < d / real n / 8" |
|
3288 |
apply - |
|
3289 |
apply (rule e(2)) |
|
53252 | 3290 |
using as |
3291 |
apply auto |
|
53185 | 3292 |
done |
3293 |
have "norm (y - z) + norm (x - z) < d / real n / 8 + d / real n / 8" |
|
3294 |
apply (rule add_strict_mono) |
|
53252 | 3295 |
using as |
3296 |
apply auto |
|
53185 | 3297 |
done |
53674 | 3298 |
then show "norm (y - x) < 2 * (d / real n / 8)" using tria by auto |
53185 | 3299 |
show "norm (f x - f z) < d / real n / 8" |
3300 |
apply (rule e(2)) |
|
53252 | 3301 |
using as e(1) |
3302 |
apply auto |
|
53185 | 3303 |
done |
3304 |
qed (insert as, auto) |
|
3305 |
qed |
|
3306 |
qed |
|
3307 |
then guess e by (elim exE conjE) note e=this[rule_format] |
|
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
3308 |
guess p using real_arch_simple[of "1 + real n / e"] .. note p=this |
53185 | 3309 |
have "1 + real n / e > 0" |
3310 |
apply (rule add_pos_pos) |
|
3311 |
defer |
|
3312 |
apply (rule divide_pos_pos) |
|
53252 | 3313 |
using e(1) n |
3314 |
apply auto |
|
53185 | 3315 |
done |
53252 | 3316 |
then have "p > 0" 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
|
3317 |
|
899c9c4e4a4c
Remove the indexed basis from the definition of euclidean spaces and only use the set of Basis vectors
hoelzl
parents:
50514
diff
changeset
|
3318 |
obtain b :: "nat \<Rightarrow> 'a" where b: "bij_betw b {1..n} Basis" |
899c9c4e4a4c
Remove the indexed basis from the definition of euclidean spaces and only use the set of Basis vectors
hoelzl
parents:
50514
diff
changeset
|
3319 |
by atomize_elim (auto simp: n_def intro!: finite_same_card_bij) |
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
3320 |
def b' \<equiv> "inv_into {1..n} b" |
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
|
3321 |
then have b': "bij_betw b' Basis {1..n}" |
899c9c4e4a4c
Remove the indexed basis from the definition of euclidean spaces and only use the set of Basis vectors
hoelzl
parents:
50514
diff
changeset
|
3322 |
using bij_betw_inv_into[OF b] by auto |
899c9c4e4a4c
Remove the indexed basis from the definition of euclidean spaces and only use the set of Basis vectors
hoelzl
parents:
50514
diff
changeset
|
3323 |
then have b'_Basis: "\<And>i. i \<in> Basis \<Longrightarrow> b' i \<in> {Suc 0 .. n}" |
899c9c4e4a4c
Remove the indexed basis from the definition of euclidean spaces and only use the set of Basis vectors
hoelzl
parents:
50514
diff
changeset
|
3324 |
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
|
3325 |
have bb'[simp]:"\<And>i. i \<in> Basis \<Longrightarrow> b (b' i) = i" |
899c9c4e4a4c
Remove the indexed basis from the definition of euclidean spaces and only use the set of Basis vectors
hoelzl
parents:
50514
diff
changeset
|
3326 |
unfolding b'_def using b by (auto simp: f_inv_into_f bij_betw_def) |
899c9c4e4a4c
Remove the indexed basis from the definition of euclidean spaces and only use the set of Basis vectors
hoelzl
parents:
50514
diff
changeset
|
3327 |
have b'b[simp]:"\<And>i. i \<in> {1..n} \<Longrightarrow> b' (b i) = i" |
899c9c4e4a4c
Remove the indexed basis from the definition of euclidean spaces and only use the set of Basis vectors
hoelzl
parents:
50514
diff
changeset
|
3328 |
unfolding b'_def using b by (auto simp: inv_into_f_eq bij_betw_def) |
53185 | 3329 |
have *: "\<And>x :: nat. x=0 \<or> x=1 \<longleftrightarrow> x\<le>1" by auto |
3330 |
have b'': "\<And>j. j \<in> {Suc 0..n} \<Longrightarrow> b j \<in> Basis" |
|
3331 |
using b unfolding bij_betw_def by auto |
|
3332 |
have q1: "0 < p" "0 < n" "\<forall>x. (\<forall>i\<in>{1..n}. x i \<le> 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
|
3333 |
(\<forall>i\<in>{1..n}. (label (\<Sum>i\<in>Basis. (real (x (b' i)) / real p) *\<^sub>R i) \<circ> b) i = 0 \<or> |
899c9c4e4a4c
Remove the indexed basis from the definition of euclidean spaces and only use the set of Basis vectors
hoelzl
parents:
50514
diff
changeset
|
3334 |
(label (\<Sum>i\<in>Basis. (real (x (b' i)) / real p) *\<^sub>R i) \<circ> b) i = 1)" |
53185 | 3335 |
unfolding * using `p>0` `n>0` using label(1)[OF b''] by auto |
3336 |
have q2: "\<forall>x. (\<forall>i\<in>{1..n}. x i \<le> p) \<longrightarrow> (\<forall>i\<in>{1..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
|
3337 |
(label (\<Sum>i\<in>Basis. (real (x (b' i)) / real p) *\<^sub>R i) \<circ> b) i = 0)" |
899c9c4e4a4c
Remove the indexed basis from the definition of euclidean spaces and only use the set of Basis vectors
hoelzl
parents:
50514
diff
changeset
|
3338 |
"\<forall>x. (\<forall>i\<in>{1..n}. x i \<le> p) \<longrightarrow> (\<forall>i\<in>{1..n}. x i = p \<longrightarrow> |
899c9c4e4a4c
Remove the indexed basis from the definition of euclidean spaces and only use the set of Basis vectors
hoelzl
parents:
50514
diff
changeset
|
3339 |
(label (\<Sum>i\<in>Basis. (real (x (b' i)) / real p) *\<^sub>R i) \<circ> b) i = 1)" |
53185 | 3340 |
apply (rule, rule, rule, rule) |
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
|
3341 |
defer |
53185 | 3342 |
proof (rule, rule, rule, rule) |
3343 |
fix x i |
|
3344 |
assume as: "\<forall>i\<in>{1..n}. x i \<le> p" "i \<in> {1..n}" |
|
3345 |
{ |
|
3346 |
assume "x i = p \<or> x i = 0" |
|
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
|
3347 |
have "(\<Sum>i\<in>Basis. (real (x (b' i)) / real p) *\<^sub>R i) \<in> {0::'a..\<Sum>Basis}" |
899c9c4e4a4c
Remove the indexed basis from the definition of euclidean spaces and only use the set of Basis vectors
hoelzl
parents:
50514
diff
changeset
|
3348 |
unfolding mem_interval using as b'_Basis |
53185 | 3349 |
by (auto simp add: inner_simps bij_betw_def zero_le_divide_iff divide_le_eq_1) |
3350 |
} |
|
3351 |
note cube = this |
|
3352 |
{ |
|
3353 |
assume "x i = p" |
|
53674 | 3354 |
then show "(label (\<Sum>i\<in>Basis. (real (x (b' i)) / real p) *\<^sub>R i) \<circ> b) i = 1" |
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
|
3355 |
unfolding o_def using cube as `p>0` |
53185 | 3356 |
by (intro label(3)) (auto simp add: b'') |
3357 |
} |
|
3358 |
{ |
|
3359 |
assume "x i = 0" |
|
53674 | 3360 |
then show "(label (\<Sum>i\<in>Basis. (real (x (b' i)) / real p) *\<^sub>R i) \<circ> b) i = 0" |
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
|
3361 |
unfolding o_def using cube as `p>0` |
53185 | 3362 |
by (intro label(2)) (auto simp add: b'') |
3363 |
} |
|
37489
44e42d392c6e
Introduce a type class for euclidean spaces, port most lemmas from real^'n to this type class.
hoelzl
parents:
36587
diff
changeset
|
3364 |
qed |
53185 | 3365 |
guess q by (rule kuhn_lemma[OF q1 q2]) note q = this |
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
|
3366 |
def z \<equiv> "(\<Sum>i\<in>Basis. (real (q (b' i)) / real p) *\<^sub>R i)::'a" |
899c9c4e4a4c
Remove the indexed basis from the definition of euclidean spaces and only use the set of Basis vectors
hoelzl
parents:
50514
diff
changeset
|
3367 |
have "\<exists>i\<in>Basis. d / real n \<le> abs((f z - z)\<bullet>i)" |
53185 | 3368 |
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
|
3369 |
have "\<forall>i\<in>Basis. q (b' i) \<in> {0..p}" |
899c9c4e4a4c
Remove the indexed basis from the definition of euclidean spaces and only use the set of Basis vectors
hoelzl
parents:
50514
diff
changeset
|
3370 |
using q(1) b' by (auto intro: less_imp_le simp: bij_betw_def) |
53674 | 3371 |
then have "z\<in>{0..\<Sum>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
|
3372 |
unfolding z_def mem_interval using b'_Basis |
899c9c4e4a4c
Remove the indexed basis from the definition of euclidean spaces and only use the set of Basis vectors
hoelzl
parents:
50514
diff
changeset
|
3373 |
by (auto simp add: inner_simps bij_betw_def zero_le_divide_iff divide_le_eq_1) |
53674 | 3374 |
then have d_fz_z:"d \<le> norm (f z - z)" by (rule d) |
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
|
3375 |
case goal1 |
53674 | 3376 |
then have as: "\<forall>i\<in>Basis. \<bar>f z \<bullet> i - z \<bullet> i\<bar> < d / real n" |
53185 | 3377 |
using `n > 0` by (auto simp add: not_le 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
|
3378 |
have "norm (f z - z) \<le> (\<Sum>i\<in>Basis. \<bar>f z \<bullet> i - z \<bullet> i\<bar>)" |
899c9c4e4a4c
Remove the indexed basis from the definition of euclidean spaces and only use the set of Basis vectors
hoelzl
parents:
50514
diff
changeset
|
3379 |
unfolding inner_diff_left[symmetric] by(rule norm_le_l1) |
53185 | 3380 |
also have "\<dots> < (\<Sum>(i::'a) \<in> Basis. d / real n)" |
3381 |
apply (rule setsum_strict_mono) |
|
3382 |
using as apply auto |
|
3383 |
done |
|
3384 |
also have "\<dots> = d" |
|
3385 |
using DIM_positive[where 'a='a] by (auto simp: real_eq_of_nat n_def) |
|
3386 |
finally show False using d_fz_z by auto |
|
3387 |
qed |
|
3388 |
then guess i .. note i = this |
|
3389 |
have *: "b' i \<in> {1..n}" |
|
3390 |
using i using b'[unfolded bij_betw_def] by auto |
|
3391 |
guess r using q(2)[rule_format,OF *] .. |
|
3392 |
then guess s by (elim exE conjE) note rs = this[rule_format] |
|
3393 |
have b'_im: "\<And>i. i \<in> Basis \<Longrightarrow> b' i \<in> {1..n}" |
|
3394 |
using b' unfolding bij_betw_def 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
|
3395 |
def r' \<equiv> "(\<Sum>i\<in>Basis. (real (r (b' i)) / real p) *\<^sub>R i)::'a" |
53185 | 3396 |
have "\<And>i. i \<in> Basis \<Longrightarrow> r (b' i) \<le> p" |
3397 |
apply (rule order_trans) |
|
3398 |
apply (rule rs(1)[OF b'_im,THEN conjunct2]) |
|
53252 | 3399 |
using q(1)[rule_format,OF b'_im] |
3400 |
apply (auto simp add: Suc_le_eq) |
|
53185 | 3401 |
done |
53674 | 3402 |
then have "r' \<in> {0..\<Sum>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
|
3403 |
unfolding r'_def mem_interval using b'_Basis |
899c9c4e4a4c
Remove the indexed basis from the definition of euclidean spaces and only use the set of Basis vectors
hoelzl
parents:
50514
diff
changeset
|
3404 |
by (auto simp add: inner_simps bij_betw_def zero_le_divide_iff divide_le_eq_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
|
3405 |
def s' \<equiv> "(\<Sum>i\<in>Basis. (real (s (b' i)) / real p) *\<^sub>R i)::'a" |
53185 | 3406 |
have "\<And>i. i\<in>Basis \<Longrightarrow> s (b' i) \<le> p" |
3407 |
apply (rule order_trans) |
|
3408 |
apply (rule rs(2)[OF b'_im, THEN conjunct2]) |
|
53252 | 3409 |
using q(1)[rule_format,OF b'_im] |
3410 |
apply (auto simp add: Suc_le_eq) |
|
53185 | 3411 |
done |
53674 | 3412 |
then have "s' \<in> {0..\<Sum>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
|
3413 |
unfolding s'_def mem_interval using b'_Basis |
899c9c4e4a4c
Remove the indexed basis from the definition of euclidean spaces and only use the set of Basis vectors
hoelzl
parents:
50514
diff
changeset
|
3414 |
by (auto simp add: inner_simps bij_betw_def zero_le_divide_iff divide_le_eq_1) |
53185 | 3415 |
have "z \<in> {0..\<Sum>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
|
3416 |
unfolding z_def mem_interval using b'_Basis q(1)[rule_format,OF b'_im] `p>0` |
899c9c4e4a4c
Remove the indexed basis from the definition of euclidean spaces and only use the set of Basis vectors
hoelzl
parents:
50514
diff
changeset
|
3417 |
by (auto simp add: inner_simps bij_betw_def zero_le_divide_iff divide_le_eq_1 less_imp_le) |
53185 | 3418 |
have *: "\<And>x. 1 + real x = real (Suc x)" by auto |
3419 |
{ have "(\<Sum>i\<in>Basis. \<bar>real (r (b' i)) - real (q (b' i))\<bar>) \<le> (\<Sum>(i::'a)\<in>Basis. 1)" |
|
3420 |
apply (rule setsum_mono) |
|
53252 | 3421 |
using rs(1)[OF b'_im] |
3422 |
apply (auto simp add:* field_simps) |
|
53185 | 3423 |
done |
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
|
3424 |
also have "\<dots> < e * real p" using p `e>0` `p>0` |
53185 | 3425 |
by (auto simp add: field_simps n_def real_of_nat_def) |
3426 |
finally have "(\<Sum>i\<in>Basis. \<bar>real (r (b' i)) - real (q (b' i))\<bar>) < e * real p" . |
|
3427 |
} |
|
3428 |
moreover |
|
3429 |
{ have "(\<Sum>i\<in>Basis. \<bar>real (s (b' i)) - real (q (b' i))\<bar>) \<le> (\<Sum>(i::'a)\<in>Basis. 1)" |
|
3430 |
apply (rule setsum_mono) |
|
53252 | 3431 |
using rs(2)[OF b'_im] |
3432 |
apply (auto simp add:* field_simps) |
|
53185 | 3433 |
done |
3434 |
also have "\<dots> < e * real p" using p `e > 0` `p > 0` |
|
3435 |
by (auto simp add: field_simps n_def real_of_nat_def) |
|
3436 |
finally have "(\<Sum>i\<in>Basis. \<bar>real (s (b' i)) - real (q (b' i))\<bar>) < e * real p" . |
|
3437 |
} |
|
3438 |
ultimately |
|
3439 |
have "norm (r' - z) < e" "norm (s' - z) < e" |
|
3440 |
unfolding r'_def s'_def z_def |
|
3441 |
using `p>0` |
|
3442 |
apply (rule_tac[!] le_less_trans[OF norm_le_l1]) |
|
3443 |
apply (auto simp add: field_simps setsum_divide_distrib[symmetric] inner_diff_left) |
|
3444 |
done |
|
53674 | 3445 |
then have "\<bar>(f z - z) \<bullet> i\<bar> < d / real 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
|
3446 |
using rs(3) i unfolding r'_def[symmetric] s'_def[symmetric] o_def bb' |
899c9c4e4a4c
Remove the indexed basis from the definition of euclidean spaces and only use the set of Basis vectors
hoelzl
parents:
50514
diff
changeset
|
3447 |
by (intro e(2)[OF `r'\<in>{0..\<Sum>Basis}` `s'\<in>{0..\<Sum>Basis}` `z\<in>{0..\<Sum>Basis}`]) auto |
53674 | 3448 |
then show False 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
|
3449 |
qed |
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
3450 |
|
53185 | 3451 |
|
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
3452 |
subsection {* Retractions. *} |
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
3453 |
|
37489
44e42d392c6e
Introduce a type class for euclidean spaces, port most lemmas from real^'n to this type class.
hoelzl
parents:
36587
diff
changeset
|
3454 |
definition "retraction s t r \<longleftrightarrow> |
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
3455 |
t \<subseteq> s \<and> continuous_on s r \<and> (r ` s \<subseteq> t) \<and> (\<forall>x\<in>t. r x = x)" |
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
3456 |
|
53185 | 3457 |
definition retract_of (infixl "retract'_of" 12) |
3458 |
where "(t retract_of s) \<longleftrightarrow> (\<exists>r. retraction s t r)" |
|
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
3459 |
|
53674 | 3460 |
lemma retraction_idempotent: "retraction s t r \<Longrightarrow> x \<in> s \<Longrightarrow> r (r x) = r x" |
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
3461 |
unfolding retraction_def by auto |
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
3462 |
|
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
3463 |
subsection {*preservation of fixpoints under (more general notion of) retraction. *} |
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
3464 |
|
53185 | 3465 |
lemma invertible_fixpoint_property: |
53674 | 3466 |
fixes s :: "'a::euclidean_space set" |
3467 |
and t :: "'b::euclidean_space set" |
|
3468 |
assumes "continuous_on t i" |
|
3469 |
and "i ` t \<subseteq> s" |
|
3470 |
and "continuous_on s r" "r ` s \<subseteq> t" |
|
3471 |
and "\<forall>y\<in>t. r (i y) = y" |
|
3472 |
and "\<forall>f. continuous_on s f \<and> f ` s \<subseteq> s \<longrightarrow> (\<exists>x\<in>s. f x = x)" |
|
3473 |
and "continuous_on t g" |
|
3474 |
and "g ` t \<subseteq> t" |
|
3475 |
obtains y where "y \<in> t" and "g y = y" |
|
53185 | 3476 |
proof - |
3477 |
have "\<exists>x\<in>s. (i \<circ> g \<circ> r) x = x" |
|
3478 |
apply (rule assms(6)[rule_format], rule) |
|
3479 |
apply (rule continuous_on_compose assms)+ |
|
3480 |
apply ((rule continuous_on_subset)?,rule assms)+ |
|
3481 |
using assms(2,4,8) unfolding image_compose |
|
3482 |
apply auto |
|
3483 |
apply blast |
|
3484 |
done |
|
3485 |
then guess x .. note x = this |
|
53674 | 3486 |
then have *: "g (r x) \<in> t" |
3487 |
using assms(4,8) by auto |
|
3488 |
have "r ((i \<circ> g \<circ> r) x) = r x" |
|
3489 |
using x by auto |
|
3490 |
then show ?thesis |
|
53185 | 3491 |
apply (rule_tac that[of "r x"]) |
53674 | 3492 |
using x |
3493 |
unfolding o_def |
|
3494 |
unfolding assms(5)[rule_format,OF *] |
|
3495 |
using assms(4) |
|
53185 | 3496 |
apply auto |
3497 |
done |
|
3498 |
qed |
|
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
3499 |
|
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
3500 |
lemma homeomorphic_fixpoint_property: |
53674 | 3501 |
fixes s :: "'a::euclidean_space set" |
3502 |
and t :: "'b::euclidean_space set" |
|
53185 | 3503 |
assumes "s homeomorphic t" |
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
3504 |
shows "(\<forall>f. continuous_on s f \<and> f ` s \<subseteq> s \<longrightarrow> (\<exists>x\<in>s. f x = x)) \<longleftrightarrow> |
53248 | 3505 |
(\<forall>g. continuous_on t g \<and> g ` t \<subseteq> t \<longrightarrow> (\<exists>y\<in>t. g y = y))" |
53185 | 3506 |
proof - |
3507 |
guess r using assms[unfolded homeomorphic_def homeomorphism_def] .. |
|
3508 |
then guess i .. |
|
53674 | 3509 |
then show ?thesis |
53185 | 3510 |
apply - |
3511 |
apply rule |
|
3512 |
apply (rule_tac[!] allI impI)+ |
|
3513 |
apply (rule_tac g=g in invertible_fixpoint_property[of t i s r]) |
|
3514 |
prefer 10 |
|
3515 |
apply (rule_tac g=f in invertible_fixpoint_property[of s r t i]) |
|
3516 |
apply auto |
|
3517 |
done |
|
3518 |
qed |
|
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
3519 |
|
53185 | 3520 |
lemma retract_fixpoint_property: |
53674 | 3521 |
fixes f :: "'a::euclidean_space => 'b::euclidean_space" |
3522 |
and s :: "'a set" |
|
53185 | 3523 |
assumes "t retract_of s" |
53674 | 3524 |
and "\<forall>f. continuous_on s f \<and> f ` s \<subseteq> s \<longrightarrow> (\<exists>x\<in>s. f x = x)" |
3525 |
and "continuous_on t g" |
|
3526 |
and "g ` t \<subseteq> t" |
|
3527 |
obtains y where "y \<in> t" and "g y = y" |
|
53185 | 3528 |
proof - |
3529 |
guess h using assms(1) unfolding retract_of_def .. |
|
53674 | 3530 |
then show ?thesis |
53185 | 3531 |
unfolding retraction_def |
3532 |
apply - |
|
3533 |
apply (rule invertible_fixpoint_property[OF continuous_on_id _ _ _ _ assms(2), of t h g]) |
|
3534 |
prefer 7 |
|
53248 | 3535 |
apply (rule_tac y = y in that) |
3536 |
using assms |
|
3537 |
apply auto |
|
53185 | 3538 |
done |
3539 |
qed |
|
3540 |
||
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
3541 |
|
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
3542 |
subsection {*So the Brouwer theorem for any set with nonempty interior. *} |
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
3543 |
|
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
|
3544 |
lemma brouwer_weak: |
53248 | 3545 |
fixes f :: "'a::ordered_euclidean_space \<Rightarrow> 'a::ordered_euclidean_space" |
53674 | 3546 |
assumes "compact s" |
3547 |
and "convex s" |
|
3548 |
and "interior s \<noteq> {}" |
|
3549 |
and "continuous_on s f" |
|
3550 |
and "f ` s \<subseteq> s" |
|
3551 |
obtains x where "x \<in> s" and "f x = x" |
|
53185 | 3552 |
proof - |
3553 |
have *: "interior {0::'a..\<Sum>Basis} \<noteq> {}" |
|
53674 | 3554 |
unfolding interior_closed_interval interval_eq_empty |
3555 |
by auto |
|
53185 | 3556 |
have *: "{0::'a..\<Sum>Basis} homeomorphic s" |
3557 |
using homeomorphic_convex_compact[OF convex_interval(1) compact_interval * assms(2,1,3)] . |
|
3558 |
have "\<forall>f. continuous_on {0::'a..\<Sum>Basis} f \<and> f ` {0::'a..\<Sum>Basis} \<subseteq> {0::'a..\<Sum>Basis} \<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
|
3559 |
(\<exists>x\<in>{0::'a..\<Sum>Basis}. 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
|
3560 |
using brouwer_cube by auto |
53674 | 3561 |
then show ?thesis |
53185 | 3562 |
unfolding homeomorphic_fixpoint_property[OF *] |
3563 |
apply (erule_tac x=f in allE) |
|
3564 |
apply (erule impE) |
|
3565 |
defer |
|
3566 |
apply (erule bexE) |
|
3567 |
apply (rule_tac x=y in that) |
|
53252 | 3568 |
using assms |
3569 |
apply auto |
|
53185 | 3570 |
done |
3571 |
qed |
|
3572 |
||
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
3573 |
|
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
3574 |
subsection {* And in particular for a closed ball. *} |
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
3575 |
|
53185 | 3576 |
lemma brouwer_ball: |
3577 |
fixes f :: "'a::ordered_euclidean_space \<Rightarrow> 'a" |
|
53674 | 3578 |
assumes "e > 0" |
3579 |
and "continuous_on (cball a e) f" |
|
3580 |
and "f ` (cball a e) \<subseteq> cball a e" |
|
3581 |
obtains x where "x \<in> cball a e" and "f x = x" |
|
53185 | 3582 |
using brouwer_weak[OF compact_cball convex_cball, of a e f] |
3583 |
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
|
3584 |
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
|
3585 |
|
53185 | 3586 |
text {*Still more general form; could derive this directly without using the |
36334 | 3587 |
rather involved @{text "HOMEOMORPHIC_CONVEX_COMPACT"} theorem, just using |
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
3588 |
a scaling and translation to put the set inside the unit cube. *} |
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
3589 |
|
53248 | 3590 |
lemma brouwer: |
53674 | 3591 |
fixes f :: "'a::ordered_euclidean_space \<Rightarrow> 'a" |
3592 |
assumes "compact s" |
|
3593 |
and "convex s" |
|
3594 |
and "s \<noteq> {}" |
|
3595 |
and "continuous_on s f" |
|
3596 |
and "f ` s \<subseteq> s" |
|
3597 |
obtains x where "x \<in> s" and "f x = x" |
|
53185 | 3598 |
proof - |
3599 |
have "\<exists>e>0. s \<subseteq> cball 0 e" |
|
3600 |
using compact_imp_bounded[OF assms(1)] unfolding bounded_pos |
|
53674 | 3601 |
apply (erule_tac exE) |
3602 |
apply (rule_tac x=b in exI) |
|
53185 | 3603 |
apply (auto simp add: dist_norm) |
3604 |
done |
|
3605 |
then guess e by (elim exE conjE) |
|
3606 |
note e = this |
|
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
3607 |
have "\<exists>x\<in> cball 0 e. (f \<circ> closest_point s) x = x" |
53185 | 3608 |
apply (rule_tac brouwer_ball[OF e(1), of 0 "f \<circ> closest_point s"]) |
3609 |
apply (rule continuous_on_compose ) |
|
3610 |
apply (rule continuous_on_closest_point[OF assms(2) compact_imp_closed[OF assms(1)] assms(3)]) |
|
3611 |
apply (rule continuous_on_subset[OF assms(4)]) |
|
3612 |
apply (insert closest_point_in_set[OF compact_imp_closed[OF assms(1)] assms(3)]) |
|
3613 |
defer |
|
3614 |
using assms(5)[unfolded subset_eq] |
|
3615 |
using e(2)[unfolded subset_eq mem_cball] |
|
3616 |
apply (auto simp add: dist_norm) |
|
3617 |
done |
|
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
3618 |
then guess x .. note x=this |
53185 | 3619 |
have *: "closest_point s x = x" |
3620 |
apply (rule closest_point_self) |
|
3621 |
apply (rule assms(5)[unfolded subset_eq,THEN bspec[where x="x"], unfolded image_iff]) |
|
3622 |
apply (rule_tac x="closest_point s x" in bexI) |
|
3623 |
using x |
|
3624 |
unfolding o_def |
|
3625 |
using closest_point_in_set[OF compact_imp_closed[OF assms(1)] assms(3), of x] |
|
3626 |
apply auto |
|
3627 |
done |
|
3628 |
show thesis |
|
3629 |
apply (rule_tac x="closest_point s x" in that) |
|
3630 |
unfolding x(2)[unfolded o_def] |
|
3631 |
apply (rule closest_point_in_set[OF compact_imp_closed[OF assms(1)] assms(3)]) |
|
53674 | 3632 |
using * |
3633 |
apply auto |
|
3634 |
done |
|
53185 | 3635 |
qed |
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
3636 |
|
37489
44e42d392c6e
Introduce a type class for euclidean spaces, port most lemmas from real^'n to this type class.
hoelzl
parents:
36587
diff
changeset
|
3637 |
text {*So we get the no-retraction theorem. *} |
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
3638 |
|
53185 | 3639 |
lemma no_retraction_cball: |
53674 | 3640 |
fixes a :: "'a::ordered_euclidean_space" |
3641 |
assumes "e > 0" |
|
3642 |
shows "\<not> (frontier (cball a e) retract_of (cball a e))" |
|
53185 | 3643 |
proof |
3644 |
case goal1 |
|
53674 | 3645 |
have *: "\<And>xa. a - (2 *\<^sub>R a - xa) = - (a - xa)" |
53185 | 3646 |
using scaleR_left_distrib[of 1 1 a] by auto |
3647 |
guess x |
|
3648 |
apply (rule retract_fixpoint_property[OF goal1, of "\<lambda>x. scaleR 2 a - x"]) |
|
53674 | 3649 |
apply rule |
3650 |
apply rule |
|
3651 |
apply (erule conjE) |
|
53185 | 3652 |
apply (rule brouwer_ball[OF assms]) |
3653 |
apply assumption+ |
|
3654 |
apply (rule_tac x=x in bexI) |
|
3655 |
apply assumption+ |
|
3656 |
apply (rule continuous_on_intros)+ |
|
3657 |
unfolding frontier_cball subset_eq Ball_def image_iff |
|
53674 | 3658 |
apply rule |
3659 |
apply rule |
|
3660 |
apply (erule bexE) |
|
53185 | 3661 |
unfolding dist_norm |
3662 |
apply (simp add: * norm_minus_commute) |
|
3663 |
done |
|
3664 |
note x = this |
|
53674 | 3665 |
then have "scaleR 2 a = scaleR 1 x + scaleR 1 x" |
53248 | 3666 |
by (auto simp add: algebra_simps) |
53674 | 3667 |
then have "a = x" |
3668 |
unfolding scaleR_left_distrib[symmetric] by auto |
|
3669 |
then show False |
|
3670 |
using x assms by auto |
|
53185 | 3671 |
qed |
3672 |
||
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
3673 |
|
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
3674 |
subsection {*Bijections between intervals. *} |
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
3675 |
|
53248 | 3676 |
definition interval_bij :: "'a \<times> 'a \<Rightarrow> 'a \<times> 'a \<Rightarrow> 'a \<Rightarrow> 'a::ordered_euclidean_space" |
3677 |
where "interval_bij = |
|
3678 |
(\<lambda>(a, b) (u, v) x. (\<Sum>i\<in>Basis. (u\<bullet>i + (x\<bullet>i - a\<bullet>i) / (b\<bullet>i - a\<bullet>i) * (v\<bullet>i - u\<bullet>i)) *\<^sub>R i))" |
|
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
3679 |
|
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
3680 |
lemma interval_bij_affine: |
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
|
3681 |
"interval_bij (a,b) (u,v) = (\<lambda>x. (\<Sum>i\<in>Basis. ((v\<bullet>i - u\<bullet>i) / (b\<bullet>i - a\<bullet>i) * (x\<bullet>i)) *\<^sub>R i) + |
899c9c4e4a4c
Remove the indexed basis from the definition of euclidean spaces and only use the set of Basis vectors
hoelzl
parents:
50514
diff
changeset
|
3682 |
(\<Sum>i\<in>Basis. (u\<bullet>i - (v\<bullet>i - u\<bullet>i) / (b\<bullet>i - a\<bullet>i) * (a\<bullet>i)) *\<^sub>R i))" |
899c9c4e4a4c
Remove the indexed basis from the definition of euclidean spaces and only use the set of Basis vectors
hoelzl
parents:
50514
diff
changeset
|
3683 |
by (auto simp: setsum_addf[symmetric] scaleR_add_left[symmetric] interval_bij_def fun_eq_iff |
53248 | 3684 |
field_simps inner_simps add_divide_distrib[symmetric] intro!: setsum_cong) |
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
3685 |
|
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
3686 |
lemma continuous_interval_bij: |
53674 | 3687 |
fixes a b :: "'a::ordered_euclidean_space" |
3688 |
shows "continuous (at x) (interval_bij (a, b) (u, v))" |
|
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
|
3689 |
by (auto simp add: divide_inverse interval_bij_def intro!: continuous_setsum continuous_intros) |
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
3690 |
|
53674 | 3691 |
lemma continuous_on_interval_bij: "continuous_on s (interval_bij (a, b) (u, v))" |
53185 | 3692 |
apply(rule continuous_at_imp_continuous_on) |
3693 |
apply (rule, rule continuous_interval_bij) |
|
3694 |
done |
|
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
3695 |
|
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
|
3696 |
lemma in_interval_interval_bij: |
899c9c4e4a4c
Remove the indexed basis from the definition of euclidean spaces and only use the set of Basis vectors
hoelzl
parents:
50514
diff
changeset
|
3697 |
fixes a b u v x :: "'a::ordered_euclidean_space" |
53674 | 3698 |
assumes "x \<in> {a..b}" |
3699 |
and "{u..v} \<noteq> {}" |
|
53185 | 3700 |
shows "interval_bij (a,b) (u,v) x \<in> {u..v}" |
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
|
3701 |
apply (simp only: interval_bij_def split_conv mem_interval inner_setsum_left_Basis cong: ball_cong) |
53248 | 3702 |
apply safe |
3703 |
proof - |
|
53185 | 3704 |
fix i :: 'a |
3705 |
assume i: "i \<in> Basis" |
|
53674 | 3706 |
have "{a..b} \<noteq> {}" |
3707 |
using assms 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
|
3708 |
with i have *: "a\<bullet>i \<le> b\<bullet>i" "u\<bullet>i \<le> v\<bullet>i" |
899c9c4e4a4c
Remove the indexed basis from the definition of euclidean spaces and only use the set of Basis vectors
hoelzl
parents:
50514
diff
changeset
|
3709 |
using assms(2) by (auto simp add: interval_eq_empty not_less) |
899c9c4e4a4c
Remove the indexed basis from the definition of euclidean spaces and only use the set of Basis vectors
hoelzl
parents:
50514
diff
changeset
|
3710 |
have x: "a\<bullet>i\<le>x\<bullet>i" "x\<bullet>i\<le>b\<bullet>i" |
899c9c4e4a4c
Remove the indexed basis from the definition of euclidean spaces and only use the set of Basis vectors
hoelzl
parents:
50514
diff
changeset
|
3711 |
using assms(1)[unfolded mem_interval] using i by auto |
899c9c4e4a4c
Remove the indexed basis from the definition of euclidean spaces and only use the set of Basis vectors
hoelzl
parents:
50514
diff
changeset
|
3712 |
have "0 \<le> (x \<bullet> i - a \<bullet> i) / (b \<bullet> i - a \<bullet> i) * (v \<bullet> i - u \<bullet> i)" |
899c9c4e4a4c
Remove the indexed basis from the definition of euclidean spaces and only use the set of Basis vectors
hoelzl
parents:
50514
diff
changeset
|
3713 |
using * x by (auto intro!: mult_nonneg_nonneg divide_nonneg_nonneg) |
53674 | 3714 |
then show "u \<bullet> i \<le> u \<bullet> i + (x \<bullet> i - a \<bullet> i) / (b \<bullet> i - a \<bullet> i) * (v \<bullet> i - u \<bullet> i)" |
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
|
3715 |
using * by auto |
899c9c4e4a4c
Remove the indexed basis from the definition of euclidean spaces and only use the set of Basis vectors
hoelzl
parents:
50514
diff
changeset
|
3716 |
have "((x \<bullet> i - a \<bullet> i) / (b \<bullet> i - a \<bullet> i)) * (v \<bullet> i - u \<bullet> i) \<le> 1 * (v \<bullet> i - u \<bullet> i)" |
53185 | 3717 |
apply (rule mult_right_mono) |
3718 |
unfolding divide_le_eq_1 |
|
53252 | 3719 |
using * x |
3720 |
apply auto |
|
53185 | 3721 |
done |
53674 | 3722 |
then show "u \<bullet> i + (x \<bullet> i - a \<bullet> i) / (b \<bullet> i - a \<bullet> i) * (v \<bullet> i - u \<bullet> i) \<le> v \<bullet> i" |
53185 | 3723 |
using * by auto |
37489
44e42d392c6e
Introduce a type class for euclidean spaces, port most lemmas from real^'n to this type class.
hoelzl
parents:
36587
diff
changeset
|
3724 |
qed |
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
3725 |
|
53185 | 3726 |
lemma interval_bij_bij: |
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
|
3727 |
"\<forall>(i::'a::ordered_euclidean_space)\<in>Basis. a\<bullet>i < b\<bullet>i \<and> u\<bullet>i < v\<bullet>i \<Longrightarrow> |
899c9c4e4a4c
Remove the indexed basis from the definition of euclidean spaces and only use the set of Basis vectors
hoelzl
parents:
50514
diff
changeset
|
3728 |
interval_bij (a,b) (u,v) (interval_bij (u,v) (a,b) x) = x" |
899c9c4e4a4c
Remove the indexed basis from the definition of euclidean spaces and only use the set of Basis vectors
hoelzl
parents:
50514
diff
changeset
|
3729 |
by (auto simp: interval_bij_def euclidean_eq_iff[where 'a='a]) |
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
3730 |
|
34291
4e896680897e
finite annotation on cartesian product is now implicit.
hoelzl
parents:
34289
diff
changeset
|
3731 |
end |