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