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