author | wenzelm |
Fri, 24 Apr 2015 16:12:20 +0200 | |
changeset 60196 | e12973f1899e |
parent 59765 | 26d1c71784f1 |
child 60303 | 00c06f1315d0 |
permissions | -rw-r--r-- |
53674 | 1 |
(* Author: John Harrison |
2 |
Author: Robert Himmelmann, TU Muenchen (Translation from HOL light) |
|
3 |
*) |
|
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
4 |
|
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
5 |
(* ========================================================================= *) |
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
6 |
(* Results connected with topological dimension. *) |
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
7 |
(* *) |
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
8 |
(* At the moment this is just Brouwer's fixpoint theorem. The proof is from *) |
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
9 |
(* Kuhn: "some combinatorial lemmas in topology", IBM J. v4. (1960) p. 518 *) |
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
10 |
(* See "http://www.research.ibm.com/journal/rd/045/ibmrd0405K.pdf". *) |
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
11 |
(* *) |
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
12 |
(* The script below is quite messy, but at least we avoid formalizing any *) |
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
13 |
(* topological machinery; we don't even use barycentric subdivision; this is *) |
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
14 |
(* the big advantage of Kuhn's proof over the usual Sperner's lemma one. *) |
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
15 |
(* *) |
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
16 |
(* (c) Copyright, John Harrison 1998-2008 *) |
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
17 |
(* ========================================================================= *) |
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
18 |
|
58877 | 19 |
section {* Results connected with topological dimension. *} |
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
20 |
|
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
21 |
theory Brouwer_Fixpoint |
53674 | 22 |
imports Convex_Euclidean_Space |
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
23 |
begin |
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
24 |
|
56273
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
25 |
lemma bij_betw_singleton_eq: |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
26 |
assumes f: "bij_betw f A B" and g: "bij_betw g A B" and a: "a \<in> A" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
27 |
assumes eq: "(\<And>x. x \<in> A \<Longrightarrow> x \<noteq> a \<Longrightarrow> f x = g x)" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
28 |
shows "f a = g a" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
29 |
proof - |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
30 |
have "f ` (A - {a}) = g ` (A - {a})" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
31 |
by (intro image_cong) (simp_all add: eq) |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
32 |
then have "B - {f a} = B - {g a}" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
33 |
using f g a by (auto simp: bij_betw_def inj_on_image_set_diff set_eq_iff) |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
34 |
moreover have "f a \<in> B" "g a \<in> B" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
35 |
using f g a by (auto simp: bij_betw_def) |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
36 |
ultimately show ?thesis |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
37 |
by auto |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
38 |
qed |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
39 |
|
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
40 |
lemma swap_image: |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
41 |
"Fun.swap i j f ` A = (if i \<in> A then (if j \<in> A then f ` A else f ` ((A - {i}) \<union> {j})) |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
42 |
else (if j \<in> A then f ` ((A - {j}) \<union> {i}) else f ` A))" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
43 |
apply (auto simp: Fun.swap_def image_iff) |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
44 |
apply metis |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
45 |
apply (metis member_remove remove_def) |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
46 |
apply (metis member_remove remove_def) |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
47 |
done |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
48 |
|
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
49 |
lemma swap_apply1: "Fun.swap x y f x = f y" |
56545 | 50 |
by (simp add: Fun.swap_def) |
56273
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
51 |
|
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
52 |
lemma swap_apply2: "Fun.swap x y f y = f x" |
56545 | 53 |
by (simp add: Fun.swap_def) |
56273
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
54 |
|
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
55 |
lemma (in -) lessThan_empty_iff: "{..< n::nat} = {} \<longleftrightarrow> n = 0" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
56 |
by auto |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
57 |
|
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
58 |
lemma Zero_notin_Suc: "0 \<notin> Suc ` A" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
59 |
by auto |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
60 |
|
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
61 |
lemma atMost_Suc_eq_insert_0: "{.. Suc n} = insert 0 (Suc ` {.. n})" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
62 |
apply auto |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
63 |
apply (case_tac x) |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
64 |
apply auto |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
65 |
done |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
66 |
|
57418 | 67 |
lemma setsum_union_disjoint': |
56273
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
68 |
assumes "finite A" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
69 |
and "finite B" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
70 |
and "A \<inter> B = {}" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
71 |
and "A \<union> B = C" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
72 |
shows "setsum g C = setsum g A + setsum g B" |
57418 | 73 |
using setsum.union_disjoint[OF assms(1-3)] and assms(4) by auto |
56273
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
74 |
|
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
75 |
lemma pointwise_minimal_pointwise_maximal: |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
76 |
fixes s :: "(nat \<Rightarrow> nat) set" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
77 |
assumes "finite s" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
78 |
and "s \<noteq> {}" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
79 |
and "\<forall>x\<in>s. \<forall>y\<in>s. x \<le> y \<or> y \<le> x" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
80 |
shows "\<exists>a\<in>s. \<forall>x\<in>s. a \<le> x" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
81 |
and "\<exists>a\<in>s. \<forall>x\<in>s. x \<le> a" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
82 |
using assms |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
83 |
proof (induct s rule: finite_ne_induct) |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
84 |
case (insert b s) |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
85 |
assume *: "\<forall>x\<in>insert b s. \<forall>y\<in>insert b s. x \<le> y \<or> y \<le> x" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
86 |
moreover then obtain u l where "l \<in> s" "\<forall>b\<in>s. l \<le> b" "u \<in> s" "\<forall>b\<in>s. b \<le> u" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
87 |
using insert by auto |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
88 |
ultimately show "\<exists>a\<in>insert b s. \<forall>x\<in>insert b s. a \<le> x" "\<exists>a\<in>insert b s. \<forall>x\<in>insert b s. x \<le> a" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
89 |
using *[rule_format, of b u] *[rule_format, of b l] by (metis insert_iff order.trans)+ |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
90 |
qed auto |
50526
899c9c4e4a4c
Remove the indexed basis from the definition of euclidean spaces and only use the set of Basis vectors
hoelzl
parents:
50514
diff
changeset
|
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 |
lemma brouwer_compactness_lemma: |
56226 | 93 |
fixes f :: "'a::metric_space \<Rightarrow> 'b::real_normed_vector" |
53674 | 94 |
assumes "compact s" |
95 |
and "continuous_on s f" |
|
53688 | 96 |
and "\<not> (\<exists>x\<in>s. f x = 0)" |
53674 | 97 |
obtains d where "0 < d" and "\<forall>x\<in>s. d \<le> norm (f x)" |
53185 | 98 |
proof (cases "s = {}") |
53674 | 99 |
case True |
53688 | 100 |
show thesis |
101 |
by (rule that [of 1]) (auto simp: True) |
|
53674 | 102 |
next |
49374 | 103 |
case False |
104 |
have "continuous_on s (norm \<circ> f)" |
|
56371
fb9ae0727548
extend continuous_intros; remove continuous_on_intros and isCont_intros
hoelzl
parents:
56273
diff
changeset
|
105 |
by (rule continuous_intros continuous_on_norm assms(2))+ |
53674 | 106 |
with False obtain x where x: "x \<in> s" "\<forall>y\<in>s. (norm \<circ> f) x \<le> (norm \<circ> f) y" |
107 |
using continuous_attains_inf[OF assms(1), of "norm \<circ> f"] |
|
108 |
unfolding o_def |
|
109 |
by auto |
|
110 |
have "(norm \<circ> f) x > 0" |
|
111 |
using assms(3) and x(1) |
|
112 |
by auto |
|
113 |
then show ?thesis |
|
114 |
by (rule that) (insert x(2), auto simp: o_def) |
|
49555 | 115 |
qed |
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
116 |
|
49555 | 117 |
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
|
118 |
fixes P Q :: "'a::euclidean_space \<Rightarrow> bool" |
56273
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
119 |
assumes "\<forall>x. P x \<longrightarrow> P (f x)" |
50526
899c9c4e4a4c
Remove the indexed basis from the definition of euclidean spaces and only use the set of Basis vectors
hoelzl
parents:
50514
diff
changeset
|
120 |
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
|
121 |
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
|
122 |
(\<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
|
123 |
(\<forall>x.\<forall>i\<in>Basis. P x \<and> Q i \<and> (x\<bullet>i = 1) \<longrightarrow> (l x i = 1)) \<and> |
56273
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
124 |
(\<forall>x.\<forall>i\<in>Basis. P x \<and> Q i \<and> (l x i = 0) \<longrightarrow> x\<bullet>i \<le> f x\<bullet>i) \<and> |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
125 |
(\<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 | 126 |
proof - |
56273
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
127 |
{ fix x i |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
128 |
let ?R = "\<lambda>y. (P x \<and> Q i \<and> x \<bullet> i = 0 \<longrightarrow> y = (0::nat)) \<and> |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
129 |
(P x \<and> Q i \<and> x \<bullet> i = 1 \<longrightarrow> y = 1) \<and> |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
130 |
(P x \<and> Q i \<and> y = 0 \<longrightarrow> x \<bullet> i \<le> f x \<bullet> i) \<and> |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
131 |
(P x \<and> Q i \<and> y = 1 \<longrightarrow> f x \<bullet> i \<le> x \<bullet> i)" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
132 |
{ assume "P x" "Q i" "i \<in> Basis" with assms have "0 \<le> f x \<bullet> i \<and> f x \<bullet> i \<le> 1" by auto } |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
133 |
then have "i \<in> Basis \<Longrightarrow> ?R 0 \<or> ?R 1" by auto } |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
134 |
then show ?thesis |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
135 |
unfolding all_conj_distrib[symmetric] Ball_def (* FIXME: shouldn't this work by metis? *) |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
136 |
by (subst choice_iff[symmetric])+ blast |
49374 | 137 |
qed |
138 |
||
53185 | 139 |
|
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
140 |
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
|
141 |
|
53252 | 142 |
lemma kuhn_counting_lemma: |
56273
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
143 |
fixes bnd compo compo' face S F |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
144 |
defines "nF s == card {f\<in>F. face f s \<and> compo' f}" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
145 |
assumes [simp, intro]: "finite F" -- "faces" and [simp, intro]: "finite S" -- "simplices" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
146 |
and "\<And>f. f \<in> F \<Longrightarrow> bnd f \<Longrightarrow> card {s\<in>S. face f s} = 1" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
147 |
and "\<And>f. f \<in> F \<Longrightarrow> \<not> bnd f \<Longrightarrow> card {s\<in>S. face f s} = 2" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
148 |
and "\<And>s. s \<in> S \<Longrightarrow> compo s \<Longrightarrow> nF s = 1" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
149 |
and "\<And>s. s \<in> S \<Longrightarrow> \<not> compo s \<Longrightarrow> nF s = 0 \<or> nF s = 2" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
150 |
and "odd (card {f\<in>F. compo' f \<and> bnd f})" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
151 |
shows "odd (card {s\<in>S. compo s})" |
53185 | 152 |
proof - |
56273
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
153 |
have "(\<Sum>s | s \<in> S \<and> \<not> compo s. nF s) + (\<Sum>s | s \<in> S \<and> compo s. nF s) = (\<Sum>s\<in>S. nF s)" |
57418 | 154 |
by (subst setsum.union_disjoint[symmetric]) (auto intro!: setsum.cong) |
56273
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
155 |
also have "\<dots> = (\<Sum>s\<in>S. card {f \<in> {f\<in>F. compo' f \<and> bnd f}. face f s}) + |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
156 |
(\<Sum>s\<in>S. card {f \<in> {f\<in>F. compo' f \<and> \<not> bnd f}. face f s})" |
57418 | 157 |
unfolding setsum.distrib[symmetric] |
56273
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
158 |
by (subst card_Un_disjoint[symmetric]) |
57418 | 159 |
(auto simp: nF_def intro!: setsum.cong arg_cong[where f=card]) |
56273
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
160 |
also have "\<dots> = 1 * card {f\<in>F. compo' f \<and> bnd f} + 2 * card {f\<in>F. compo' f \<and> \<not> bnd f}" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
161 |
using assms(4,5) by (fastforce intro!: arg_cong2[where f="op +"] setsum_multicount) |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
162 |
finally have "odd ((\<Sum>s | s \<in> S \<and> \<not> compo s. nF s) + card {s\<in>S. compo s})" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
163 |
using assms(6,8) by simp |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
164 |
moreover have "(\<Sum>s | s \<in> S \<and> \<not> compo s. nF s) = |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
165 |
(\<Sum>s | s \<in> S \<and> \<not> compo s \<and> nF s = 0. nF s) + (\<Sum>s | s \<in> S \<and> \<not> compo s \<and> nF s = 2. nF s)" |
57418 | 166 |
using assms(7) by (subst setsum.union_disjoint[symmetric]) (fastforce intro!: setsum.cong)+ |
53688 | 167 |
ultimately show ?thesis |
168 |
by auto |
|
53186 | 169 |
qed |
170 |
||
56273
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
171 |
subsection {* The odd/even result for faces of complete vertices, generalized. *} |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
172 |
|
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
173 |
lemma kuhn_complete_lemma: |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
174 |
assumes [simp]: "finite simplices" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
175 |
and face: "\<And>f s. face f s \<longleftrightarrow> (\<exists>a\<in>s. f = s - {a})" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
176 |
and card_s[simp]: "\<And>s. s \<in> simplices \<Longrightarrow> card s = n + 2" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
177 |
and rl_bd: "\<And>s. s \<in> simplices \<Longrightarrow> rl ` s \<subseteq> {..Suc n}" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
178 |
and bnd: "\<And>f s. s \<in> simplices \<Longrightarrow> face f s \<Longrightarrow> bnd f \<Longrightarrow> card {s\<in>simplices. face f s} = 1" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
179 |
and nbnd: "\<And>f s. s \<in> simplices \<Longrightarrow> face f s \<Longrightarrow> \<not> bnd f \<Longrightarrow> card {s\<in>simplices. face f s} = 2" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
180 |
and odd_card: "odd (card {f. (\<exists>s\<in>simplices. face f s) \<and> rl ` f = {..n} \<and> bnd f})" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
181 |
shows "odd (card {s\<in>simplices. (rl ` s = {..Suc n})})" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
182 |
proof (rule kuhn_counting_lemma) |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
183 |
have finite_s[simp]: "\<And>s. s \<in> simplices \<Longrightarrow> finite s" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
184 |
by (metis add_is_0 zero_neq_numeral card_infinite assms(3)) |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
185 |
|
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
186 |
let ?F = "{f. \<exists>s\<in>simplices. face f s}" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
187 |
have F_eq: "?F = (\<Union>s\<in>simplices. \<Union>a\<in>s. {s - {a}})" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
188 |
by (auto simp: face) |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
189 |
show "finite ?F" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
190 |
using `finite simplices` unfolding F_eq by auto |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
191 |
|
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
192 |
{ fix f assume "f \<in> ?F" "bnd f" then show "card {s \<in> simplices. face f s} = 1" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
193 |
using bnd by auto } |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
194 |
|
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
195 |
{ fix f assume "f \<in> ?F" "\<not> bnd f" then show "card {s \<in> simplices. face f s} = 2" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
196 |
using nbnd by auto } |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
197 |
|
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
198 |
show "odd (card {f \<in> {f. \<exists>s\<in>simplices. face f s}. rl ` f = {..n} \<and> bnd f})" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
199 |
using odd_card by simp |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
200 |
|
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
201 |
fix s assume s[simp]: "s \<in> simplices" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
202 |
let ?S = "{f \<in> {f. \<exists>s\<in>simplices. face f s}. face f s \<and> rl ` f = {..n}}" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
203 |
have "?S = (\<lambda>a. s - {a}) ` {a\<in>s. rl ` (s - {a}) = {..n}}" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
204 |
using s by (fastforce simp: face) |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
205 |
then have card_S: "card ?S = card {a\<in>s. rl ` (s - {a}) = {..n}}" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
206 |
by (auto intro!: card_image inj_onI) |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
207 |
|
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
208 |
{ assume rl: "rl ` s = {..Suc n}" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
209 |
then have inj_rl: "inj_on rl s" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
210 |
by (intro eq_card_imp_inj_on) auto |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
211 |
moreover obtain a where "rl a = Suc n" "a \<in> s" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
212 |
by (metis atMost_iff image_iff le_Suc_eq rl) |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
213 |
ultimately have n: "{..n} = rl ` (s - {a})" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
214 |
by (auto simp add: inj_on_image_set_diff rl) |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
215 |
have "{a\<in>s. rl ` (s - {a}) = {..n}} = {a}" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
216 |
using inj_rl `a \<in> s` by (auto simp add: n inj_on_image_eq_iff[OF inj_rl] Diff_subset) |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
217 |
then show "card ?S = 1" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
218 |
unfolding card_S by simp } |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
219 |
|
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
220 |
{ assume rl: "rl ` s \<noteq> {..Suc n}" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
221 |
show "card ?S = 0 \<or> card ?S = 2" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
222 |
proof cases |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
223 |
assume *: "{..n} \<subseteq> rl ` s" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
224 |
with rl rl_bd[OF s] have rl_s: "rl ` s = {..n}" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
225 |
by (auto simp add: atMost_Suc subset_insert_iff split: split_if_asm) |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
226 |
then have "\<not> inj_on rl s" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
227 |
by (intro pigeonhole) simp |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
228 |
then obtain a b where ab: "a \<in> s" "b \<in> s" "rl a = rl b" "a \<noteq> b" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
229 |
by (auto simp: inj_on_def) |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
230 |
then have eq: "rl ` (s - {a}) = rl ` s" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
231 |
by auto |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
232 |
with ab have inj: "inj_on rl (s - {a})" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
233 |
by (intro eq_card_imp_inj_on) (auto simp add: rl_s card_Diff_singleton_if) |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
234 |
|
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
235 |
{ fix x assume "x \<in> s" "x \<notin> {a, b}" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
236 |
then have "rl ` s - {rl x} = rl ` ((s - {a}) - {x})" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
237 |
by (auto simp: eq inj_on_image_set_diff[OF inj]) |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
238 |
also have "\<dots> = rl ` (s - {x})" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
239 |
using ab `x \<notin> {a, b}` by auto |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
240 |
also assume "\<dots> = rl ` s" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
241 |
finally have False |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
242 |
using `x\<in>s` by auto } |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
243 |
moreover |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
244 |
{ fix x assume "x \<in> {a, b}" with ab have "x \<in> s \<and> rl ` (s - {x}) = rl ` s" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
245 |
by (simp add: set_eq_iff image_iff Bex_def) metis } |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
246 |
ultimately have "{a\<in>s. rl ` (s - {a}) = {..n}} = {a, b}" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
247 |
unfolding rl_s[symmetric] by fastforce |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
248 |
with `a \<noteq> b` show "card ?S = 0 \<or> card ?S = 2" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
249 |
unfolding card_S by simp |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
250 |
next |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
251 |
assume "\<not> {..n} \<subseteq> rl ` s" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
252 |
then have "\<And>x. rl ` (s - {x}) \<noteq> {..n}" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
253 |
by auto |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
254 |
then show "card ?S = 0 \<or> card ?S = 2" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
255 |
unfolding card_S by simp |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
256 |
qed } |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
257 |
qed fact |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
258 |
|
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
259 |
locale kuhn_simplex = |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
260 |
fixes p n and base upd and s :: "(nat \<Rightarrow> nat) set" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
261 |
assumes base: "base \<in> {..< n} \<rightarrow> {..< p}" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
262 |
assumes base_out: "\<And>i. n \<le> i \<Longrightarrow> base i = p" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
263 |
assumes upd: "bij_betw upd {..< n} {..< n}" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
264 |
assumes s_pre: "s = (\<lambda>i j. if j \<in> upd`{..< i} then Suc (base j) else base j) ` {.. n}" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
265 |
begin |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
266 |
|
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
267 |
definition "enum i j = (if j \<in> upd`{..< i} then Suc (base j) else base j)" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
268 |
|
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
269 |
lemma s_eq: "s = enum ` {.. n}" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
270 |
unfolding s_pre enum_def[abs_def] .. |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
271 |
|
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
272 |
lemma upd_space: "i < n \<Longrightarrow> upd i < n" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
273 |
using upd by (auto dest!: bij_betwE) |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
274 |
|
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
275 |
lemma s_space: "s \<subseteq> {..< n} \<rightarrow> {.. p}" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
276 |
proof - |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
277 |
{ fix i assume "i \<le> n" then have "enum i \<in> {..< n} \<rightarrow> {.. p}" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
278 |
proof (induct i) |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
279 |
case 0 then show ?case |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
280 |
using base by (auto simp: Pi_iff less_imp_le enum_def) |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
281 |
next |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
282 |
case (Suc i) with base show ?case |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
283 |
by (auto simp: Pi_iff Suc_le_eq less_imp_le enum_def intro: upd_space) |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
284 |
qed } |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
285 |
then show ?thesis |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
286 |
by (auto simp: s_eq) |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
287 |
qed |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
288 |
|
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
289 |
lemma inj_upd: "inj_on upd {..< n}" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
290 |
using upd by (simp add: bij_betw_def) |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
291 |
|
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
292 |
lemma inj_enum: "inj_on enum {.. n}" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
293 |
proof - |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
294 |
{ fix x y :: nat assume "x \<noteq> y" "x \<le> n" "y \<le> n" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
295 |
with upd have "upd ` {..< x} \<noteq> upd ` {..< y}" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
296 |
by (subst inj_on_image_eq_iff[where C="{..< n}"]) (auto simp: bij_betw_def) |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
297 |
then have "enum x \<noteq> enum y" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
298 |
by (auto simp add: enum_def fun_eq_iff) } |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
299 |
then show ?thesis |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
300 |
by (auto simp: inj_on_def) |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
301 |
qed |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
302 |
|
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
303 |
lemma enum_0: "enum 0 = base" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
304 |
by (simp add: enum_def[abs_def]) |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
305 |
|
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
306 |
lemma base_in_s: "base \<in> s" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
307 |
unfolding s_eq by (subst enum_0[symmetric]) auto |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
308 |
|
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
309 |
lemma enum_in: "i \<le> n \<Longrightarrow> enum i \<in> s" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
310 |
unfolding s_eq by auto |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
311 |
|
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
312 |
lemma one_step: |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
313 |
assumes a: "a \<in> s" "j < n" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
314 |
assumes *: "\<And>a'. a' \<in> s \<Longrightarrow> a' \<noteq> a \<Longrightarrow> a' j = p'" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
315 |
shows "a j \<noteq> p'" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
316 |
proof |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
317 |
assume "a j = p'" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
318 |
with * a have "\<And>a'. a' \<in> s \<Longrightarrow> a' j = p'" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
319 |
by auto |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
320 |
then have "\<And>i. i \<le> n \<Longrightarrow> enum i j = p'" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
321 |
unfolding s_eq by auto |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
322 |
from this[of 0] this[of n] have "j \<notin> upd ` {..< n}" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
323 |
by (auto simp: enum_def fun_eq_iff split: split_if_asm) |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
324 |
with upd `j < n` show False |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
325 |
by (auto simp: bij_betw_def) |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
326 |
qed |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
327 |
|
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
328 |
lemma upd_inj: "i < n \<Longrightarrow> j < n \<Longrightarrow> upd i = upd j \<longleftrightarrow> i = j" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
329 |
using upd by (auto simp: bij_betw_def inj_on_iff) |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
330 |
|
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
331 |
lemma upd_surj: "upd ` {..< n} = {..< n}" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
332 |
using upd by (auto simp: bij_betw_def) |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
333 |
|
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
334 |
lemma in_upd_image: "A \<subseteq> {..< n} \<Longrightarrow> i < n \<Longrightarrow> upd i \<in> upd ` A \<longleftrightarrow> i \<in> A" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
335 |
using inj_on_image_mem_iff[of upd "{..< n}" A i ] upd |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
336 |
by (auto simp: bij_betw_def) |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
337 |
|
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
338 |
lemma enum_inj: "i \<le> n \<Longrightarrow> j \<le> n \<Longrightarrow> enum i = enum j \<longleftrightarrow> i = j" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
339 |
using inj_enum by (auto simp: inj_on_iff) |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
340 |
|
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
341 |
lemma in_enum_image: "A \<subseteq> {.. n} \<Longrightarrow> i \<le> n \<Longrightarrow> enum i \<in> enum ` A \<longleftrightarrow> i \<in> A" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
342 |
using inj_on_image_mem_iff[OF inj_enum, of A i] by auto |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
343 |
|
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
344 |
lemma enum_mono: "i \<le> n \<Longrightarrow> j \<le> n \<Longrightarrow> enum i \<le> enum j \<longleftrightarrow> i \<le> j" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
345 |
by (auto simp: enum_def le_fun_def in_upd_image Ball_def[symmetric]) |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
346 |
|
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
347 |
lemma enum_strict_mono: "i \<le> n \<Longrightarrow> j \<le> n \<Longrightarrow> enum i < enum j \<longleftrightarrow> i < j" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
348 |
using enum_mono[of i j] enum_inj[of i j] by (auto simp add: le_less) |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
349 |
|
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
350 |
lemma chain: "a \<in> s \<Longrightarrow> b \<in> s \<Longrightarrow> a \<le> b \<or> b \<le> a" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
351 |
by (auto simp: s_eq enum_mono) |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
352 |
|
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
353 |
lemma less: "a \<in> s \<Longrightarrow> b \<in> s \<Longrightarrow> a i < b i \<Longrightarrow> a < b" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
354 |
using chain[of a b] by (auto simp: less_fun_def le_fun_def not_le[symmetric]) |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
355 |
|
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
356 |
lemma enum_0_bot: "a \<in> s \<Longrightarrow> a = enum 0 \<longleftrightarrow> (\<forall>a'\<in>s. a \<le> a')" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
357 |
unfolding s_eq by (auto simp: enum_mono Ball_def) |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
358 |
|
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
359 |
lemma enum_n_top: "a \<in> s \<Longrightarrow> a = enum n \<longleftrightarrow> (\<forall>a'\<in>s. a' \<le> a)" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
360 |
unfolding s_eq by (auto simp: enum_mono Ball_def) |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
361 |
|
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
362 |
lemma enum_Suc: "i < n \<Longrightarrow> enum (Suc i) = (enum i)(upd i := Suc (enum i (upd i)))" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
363 |
by (auto simp: fun_eq_iff enum_def upd_inj) |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
364 |
|
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
365 |
lemma enum_eq_p: "i \<le> n \<Longrightarrow> n \<le> j \<Longrightarrow> enum i j = p" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
366 |
by (induct i) (auto simp: enum_Suc enum_0 base_out upd_space not_less[symmetric]) |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
367 |
|
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
368 |
lemma out_eq_p: "a \<in> s \<Longrightarrow> n \<le> j \<Longrightarrow> a j = p" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
369 |
unfolding s_eq by (auto simp add: enum_eq_p) |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
370 |
|
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
371 |
lemma s_le_p: "a \<in> s \<Longrightarrow> a j \<le> p" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
372 |
using out_eq_p[of a j] s_space by (cases "j < n") auto |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
373 |
|
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
374 |
lemma le_Suc_base: "a \<in> s \<Longrightarrow> a j \<le> Suc (base j)" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
375 |
unfolding s_eq by (auto simp: enum_def) |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
376 |
|
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
377 |
lemma base_le: "a \<in> s \<Longrightarrow> base j \<le> a j" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
378 |
unfolding s_eq by (auto simp: enum_def) |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
379 |
|
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
380 |
lemma enum_le_p: "i \<le> n \<Longrightarrow> j < n \<Longrightarrow> enum i j \<le> p" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
381 |
using enum_in[of i] s_space by auto |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
382 |
|
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
383 |
lemma enum_less: "a \<in> s \<Longrightarrow> i < n \<Longrightarrow> enum i < a \<longleftrightarrow> enum (Suc i) \<le> a" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
384 |
unfolding s_eq by (auto simp: enum_strict_mono enum_mono) |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
385 |
|
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
386 |
lemma ksimplex_0: |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
387 |
"n = 0 \<Longrightarrow> s = {(\<lambda>x. p)}" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
388 |
using s_eq enum_def base_out by auto |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
389 |
|
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
390 |
lemma replace_0: |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
391 |
assumes "j < n" "a \<in> s" and p: "\<forall>x\<in>s - {a}. x j = 0" and "x \<in> s" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
392 |
shows "x \<le> a" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
393 |
proof cases |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
394 |
assume "x \<noteq> a" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
395 |
have "a j \<noteq> 0" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
396 |
using assms by (intro one_step[where a=a]) auto |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
397 |
with less[OF `x\<in>s` `a\<in>s`, of j] p[rule_format, of x] `x \<in> s` `x \<noteq> a` |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
398 |
show ?thesis |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
399 |
by auto |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
400 |
qed simp |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
401 |
|
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
402 |
lemma replace_1: |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
403 |
assumes "j < n" "a \<in> s" and p: "\<forall>x\<in>s - {a}. x j = p" and "x \<in> s" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
404 |
shows "a \<le> x" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
405 |
proof cases |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
406 |
assume "x \<noteq> a" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
407 |
have "a j \<noteq> p" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
408 |
using assms by (intro one_step[where a=a]) auto |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
409 |
with enum_le_p[of _ j] `j < n` `a\<in>s` |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
410 |
have "a j < p" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
411 |
by (auto simp: less_le s_eq) |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
412 |
with less[OF `a\<in>s` `x\<in>s`, of j] p[rule_format, of x] `x \<in> s` `x \<noteq> a` |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
413 |
show ?thesis |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
414 |
by auto |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
415 |
qed simp |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
416 |
|
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
417 |
end |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
418 |
|
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
419 |
locale kuhn_simplex_pair = s: kuhn_simplex p n b_s u_s s + t: kuhn_simplex p n b_t u_t t |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
420 |
for p n b_s u_s s b_t u_t t |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
421 |
begin |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
422 |
|
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
423 |
lemma enum_eq: |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
424 |
assumes l: "i \<le> l" "l \<le> j" and "j + d \<le> n" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
425 |
assumes eq: "s.enum ` {i .. j} = t.enum ` {i + d .. j + d}" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
426 |
shows "s.enum l = t.enum (l + d)" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
427 |
using l proof (induct l rule: dec_induct) |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
428 |
case base |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
429 |
then have s: "s.enum i \<in> t.enum ` {i + d .. j + d}" and t: "t.enum (i + d) \<in> s.enum ` {i .. j}" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
430 |
using eq by auto |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
431 |
from t `i \<le> j` `j + d \<le> n` have "s.enum i \<le> t.enum (i + d)" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
432 |
by (auto simp: s.enum_mono) |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
433 |
moreover from s `i \<le> j` `j + d \<le> n` have "t.enum (i + d) \<le> s.enum i" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
434 |
by (auto simp: t.enum_mono) |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
435 |
ultimately show ?case |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
436 |
by auto |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
437 |
next |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
438 |
case (step l) |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
439 |
moreover from step.prems `j + d \<le> n` have |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
440 |
"s.enum l < s.enum (Suc l)" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
441 |
"t.enum (l + d) < t.enum (Suc l + d)" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
442 |
by (simp_all add: s.enum_strict_mono t.enum_strict_mono) |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
443 |
moreover have |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
444 |
"s.enum (Suc l) \<in> t.enum ` {i + d .. j + d}" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
445 |
"t.enum (Suc l + d) \<in> s.enum ` {i .. j}" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
446 |
using step `j + d \<le> n` eq by (auto simp: s.enum_inj t.enum_inj) |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
447 |
ultimately have "s.enum (Suc l) = t.enum (Suc (l + d))" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
448 |
using `j + d \<le> n` |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
449 |
by (intro antisym s.enum_less[THEN iffD1] t.enum_less[THEN iffD1]) |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
450 |
(auto intro!: s.enum_in t.enum_in) |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
451 |
then show ?case by simp |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
452 |
qed |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
453 |
|
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
454 |
lemma ksimplex_eq_bot: |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
455 |
assumes a: "a \<in> s" "\<And>a'. a' \<in> s \<Longrightarrow> a \<le> a'" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
456 |
assumes b: "b \<in> t" "\<And>b'. b' \<in> t \<Longrightarrow> b \<le> b'" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
457 |
assumes eq: "s - {a} = t - {b}" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
458 |
shows "s = t" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
459 |
proof cases |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
460 |
assume "n = 0" with s.ksimplex_0 t.ksimplex_0 show ?thesis by simp |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
461 |
next |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
462 |
assume "n \<noteq> 0" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
463 |
have "s.enum 0 = (s.enum (Suc 0)) (u_s 0 := s.enum (Suc 0) (u_s 0) - 1)" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
464 |
"t.enum 0 = (t.enum (Suc 0)) (u_t 0 := t.enum (Suc 0) (u_t 0) - 1)" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
465 |
using `n \<noteq> 0` by (simp_all add: s.enum_Suc t.enum_Suc) |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
466 |
moreover have e0: "a = s.enum 0" "b = t.enum 0" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
467 |
using a b by (simp_all add: s.enum_0_bot t.enum_0_bot) |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
468 |
moreover |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
469 |
{ fix j assume "0 < j" "j \<le> n" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
470 |
moreover have "s - {a} = s.enum ` {Suc 0 .. n}" "t - {b} = t.enum ` {Suc 0 .. n}" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
471 |
unfolding s.s_eq t.s_eq e0 by (auto simp: s.enum_inj t.enum_inj) |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
472 |
ultimately have "s.enum j = t.enum j" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
473 |
using enum_eq[of "1" j n 0] eq by auto } |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
474 |
note enum_eq = this |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
475 |
then have "s.enum (Suc 0) = t.enum (Suc 0)" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
476 |
using `n \<noteq> 0` by auto |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
477 |
moreover |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
478 |
{ fix j assume "Suc j < n" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
479 |
with enum_eq[of "Suc j"] enum_eq[of "Suc (Suc j)"] |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
480 |
have "u_s (Suc j) = u_t (Suc j)" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
481 |
using s.enum_Suc[of "Suc j"] t.enum_Suc[of "Suc j"] |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
482 |
by (auto simp: fun_eq_iff split: split_if_asm) } |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
483 |
then have "\<And>j. 0 < j \<Longrightarrow> j < n \<Longrightarrow> u_s j = u_t j" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
484 |
by (auto simp: gr0_conv_Suc) |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
485 |
with `n \<noteq> 0` have "u_t 0 = u_s 0" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
486 |
by (intro bij_betw_singleton_eq[OF t.upd s.upd, of 0]) auto |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
487 |
ultimately have "a = b" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
488 |
by simp |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
489 |
with assms show "s = t" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
490 |
by auto |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
491 |
qed |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
492 |
|
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
493 |
lemma ksimplex_eq_top: |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
494 |
assumes a: "a \<in> s" "\<And>a'. a' \<in> s \<Longrightarrow> a' \<le> a" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
495 |
assumes b: "b \<in> t" "\<And>b'. b' \<in> t \<Longrightarrow> b' \<le> b" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
496 |
assumes eq: "s - {a} = t - {b}" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
497 |
shows "s = t" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
498 |
proof (cases n) |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
499 |
assume "n = 0" with s.ksimplex_0 t.ksimplex_0 show ?thesis by simp |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
500 |
next |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
501 |
case (Suc n') |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
502 |
have "s.enum n = (s.enum n') (u_s n' := Suc (s.enum n' (u_s n')))" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
503 |
"t.enum n = (t.enum n') (u_t n' := Suc (t.enum n' (u_t n')))" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
504 |
using Suc by (simp_all add: s.enum_Suc t.enum_Suc) |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
505 |
moreover have en: "a = s.enum n" "b = t.enum n" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
506 |
using a b by (simp_all add: s.enum_n_top t.enum_n_top) |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
507 |
moreover |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
508 |
{ fix j assume "j < n" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
509 |
moreover have "s - {a} = s.enum ` {0 .. n'}" "t - {b} = t.enum ` {0 .. n'}" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
510 |
unfolding s.s_eq t.s_eq en by (auto simp: s.enum_inj t.enum_inj Suc) |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
511 |
ultimately have "s.enum j = t.enum j" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
512 |
using enum_eq[of "0" j n' 0] eq Suc by auto } |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
513 |
note enum_eq = this |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
514 |
then have "s.enum n' = t.enum n'" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
515 |
using Suc by auto |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
516 |
moreover |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
517 |
{ fix j assume "j < n'" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
518 |
with enum_eq[of j] enum_eq[of "Suc j"] |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
519 |
have "u_s j = u_t j" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
520 |
using s.enum_Suc[of j] t.enum_Suc[of j] |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
521 |
by (auto simp: Suc fun_eq_iff split: split_if_asm) } |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
522 |
then have "\<And>j. j < n' \<Longrightarrow> u_s j = u_t j" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
523 |
by (auto simp: gr0_conv_Suc) |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
524 |
then have "u_t n' = u_s n'" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
525 |
by (intro bij_betw_singleton_eq[OF t.upd s.upd, of n']) (auto simp: Suc) |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
526 |
ultimately have "a = b" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
527 |
by simp |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
528 |
with assms show "s = t" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
529 |
by auto |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
530 |
qed |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
531 |
|
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
532 |
end |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
533 |
|
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
534 |
inductive ksimplex for p n :: nat where |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
535 |
ksimplex: "kuhn_simplex p n base upd s \<Longrightarrow> ksimplex p n s" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
536 |
|
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
537 |
lemma finite_ksimplexes: "finite {s. ksimplex p n s}" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
538 |
proof (rule finite_subset) |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
539 |
{ fix a s assume "ksimplex p n s" "a \<in> s" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
540 |
then obtain b u where "kuhn_simplex p n b u s" by (auto elim: ksimplex.cases) |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
541 |
then interpret kuhn_simplex p n b u s . |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
542 |
from s_space `a \<in> s` out_eq_p[OF `a \<in> s`] |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
543 |
have "a \<in> (\<lambda>f x. if n \<le> x then p else f x) ` ({..< n} \<rightarrow>\<^sub>E {.. p})" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
544 |
by (auto simp: image_iff subset_eq Pi_iff split: split_if_asm |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
545 |
intro!: bexI[of _ "restrict a {..< n}"]) } |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
546 |
then show "{s. ksimplex p n s} \<subseteq> Pow ((\<lambda>f x. if n \<le> x then p else f x) ` ({..< n} \<rightarrow>\<^sub>E {.. p}))" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
547 |
by auto |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
548 |
qed (simp add: finite_PiE) |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
549 |
|
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
550 |
lemma ksimplex_card: |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
551 |
assumes "ksimplex p n s" shows "card s = Suc n" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
552 |
using assms proof cases |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
553 |
case (ksimplex u b) |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
554 |
then interpret kuhn_simplex p n u b s . |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
555 |
show ?thesis |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
556 |
by (simp add: card_image s_eq inj_enum) |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
557 |
qed |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
558 |
|
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
559 |
lemma simplex_top_face: |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
560 |
assumes "0 < p" "\<forall>x\<in>s'. x n = p" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
561 |
shows "ksimplex p n s' \<longleftrightarrow> (\<exists>s a. ksimplex p (Suc n) s \<and> a \<in> s \<and> s' = s - {a})" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
562 |
using assms |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
563 |
proof safe |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
564 |
fix s a assume "ksimplex p (Suc n) s" and a: "a \<in> s" and na: "\<forall>x\<in>s - {a}. x n = p" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
565 |
then show "ksimplex p n (s - {a})" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
566 |
proof cases |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
567 |
case (ksimplex base upd) |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
568 |
then interpret kuhn_simplex p "Suc n" base upd "s" . |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
569 |
|
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
570 |
have "a n < p" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
571 |
using one_step[of a n p] na `a\<in>s` s_space by (auto simp: less_le) |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
572 |
then have "a = enum 0" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
573 |
using `a \<in> s` na by (subst enum_0_bot) (auto simp: le_less intro!: less[of a _ n]) |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
574 |
then have s_eq: "s - {a} = enum ` Suc ` {.. n}" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
575 |
using s_eq by (simp add: atMost_Suc_eq_insert_0 insert_ident Zero_notin_Suc in_enum_image subset_eq) |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
576 |
then have "enum 1 \<in> s - {a}" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
577 |
by auto |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
578 |
then have "upd 0 = n" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
579 |
using `a n < p` `a = enum 0` na[rule_format, of "enum 1"] |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
580 |
by (auto simp: fun_eq_iff enum_Suc split: split_if_asm) |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
581 |
then have "bij_betw upd (Suc ` {..< n}) {..< n}" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
582 |
using upd |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
583 |
by (subst notIn_Un_bij_betw3[where b=0]) |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
584 |
(auto simp: lessThan_Suc[symmetric] lessThan_Suc_eq_insert_0) |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
585 |
then have "bij_betw (upd\<circ>Suc) {..<n} {..<n}" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
586 |
by (rule bij_betw_trans[rotated]) (auto simp: bij_betw_def) |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
587 |
|
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
588 |
have "a n = p - 1" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
589 |
using enum_Suc[of 0] na[rule_format, OF `enum 1 \<in> s - {a}`] `a = enum 0` by (auto simp: `upd 0 = n`) |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
590 |
|
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
591 |
show ?thesis |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
592 |
proof (rule ksimplex.intros, default) |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
593 |
show "bij_betw (upd\<circ>Suc) {..< n} {..< n}" by fact |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
594 |
show "base(n := p) \<in> {..<n} \<rightarrow> {..<p}" "\<And>i. n\<le>i \<Longrightarrow> (base(n := p)) i = p" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
595 |
using base base_out by (auto simp: Pi_iff) |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
596 |
|
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
597 |
have "\<And>i. Suc ` {..< i} = {..< Suc i} - {0}" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
598 |
by (auto simp: image_iff Ball_def) arith |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
599 |
then have upd_Suc: "\<And>i. i \<le> n \<Longrightarrow> (upd\<circ>Suc) ` {..< i} = upd ` {..< Suc i} - {n}" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
600 |
using `upd 0 = n` |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
601 |
by (simp add: image_comp[symmetric] inj_on_image_set_diff[OF inj_upd]) |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
602 |
have n_in_upd: "\<And>i. n \<in> upd ` {..< Suc i}" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
603 |
using `upd 0 = n` by auto |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
604 |
|
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
605 |
def f' \<equiv> "\<lambda>i j. if j \<in> (upd\<circ>Suc)`{..< i} then Suc ((base(n := p)) j) else (base(n := p)) j" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
606 |
{ fix x i assume i[arith]: "i \<le> n" then have "enum (Suc i) x = f' i x" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
607 |
unfolding f'_def enum_def using `a n < p` `a = enum 0` `upd 0 = n` `a n = p - 1` |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
608 |
by (simp add: upd_Suc enum_0 n_in_upd) } |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
609 |
then show "s - {a} = f' ` {.. n}" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
610 |
unfolding s_eq image_comp by (intro image_cong) auto |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
611 |
qed |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
612 |
qed |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
613 |
next |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
614 |
assume "ksimplex p n s'" and *: "\<forall>x\<in>s'. x n = p" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
615 |
then show "\<exists>s a. ksimplex p (Suc n) s \<and> a \<in> s \<and> s' = s - {a}" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
616 |
proof cases |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
617 |
case (ksimplex base upd) |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
618 |
then interpret kuhn_simplex p n base upd s' . |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
619 |
def b \<equiv> "base (n := p - 1)" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
620 |
def u \<equiv> "\<lambda>i. case i of 0 \<Rightarrow> n | Suc i \<Rightarrow> upd i" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
621 |
|
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
622 |
have "ksimplex p (Suc n) (s' \<union> {b})" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
623 |
proof (rule ksimplex.intros, default) |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
624 |
show "b \<in> {..<Suc n} \<rightarrow> {..<p}" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
625 |
using base `0 < p` unfolding lessThan_Suc b_def by (auto simp: PiE_iff) |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
626 |
show "\<And>i. Suc n \<le> i \<Longrightarrow> b i = p" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
627 |
using base_out by (auto simp: b_def) |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
628 |
|
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
629 |
have "bij_betw u (Suc ` {..< n} \<union> {0}) ({..<n} \<union> {u 0})" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
630 |
using upd |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
631 |
by (intro notIn_Un_bij_betw) (auto simp: u_def bij_betw_def image_comp comp_def inj_on_def) |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
632 |
then show "bij_betw u {..<Suc n} {..<Suc n}" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
633 |
by (simp add: u_def lessThan_Suc[symmetric] lessThan_Suc_eq_insert_0) |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
634 |
|
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
635 |
def f' \<equiv> "\<lambda>i j. if j \<in> u`{..< i} then Suc (b j) else b j" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
636 |
|
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
637 |
have u_eq: "\<And>i. i \<le> n \<Longrightarrow> u ` {..< Suc i} = upd ` {..< i} \<union> { n }" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
638 |
by (auto simp: u_def image_iff upd_inj Ball_def split: nat.split) arith |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
639 |
|
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
640 |
{ fix x have "x \<le> n \<Longrightarrow> n \<notin> upd ` {..<x}" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
641 |
using upd_space by (simp add: image_iff neq_iff) } |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
642 |
note n_not_upd = this |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
643 |
|
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
644 |
have *: "f' ` {.. Suc n} = f' ` (Suc ` {.. n} \<union> {0})" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
645 |
unfolding atMost_Suc_eq_insert_0 by simp |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
646 |
also have "\<dots> = (f' \<circ> Suc) ` {.. n} \<union> {b}" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
647 |
by (auto simp: f'_def) |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
648 |
also have "(f' \<circ> Suc) ` {.. n} = s'" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
649 |
using `0 < p` base_out[of n] |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
650 |
unfolding s_eq enum_def[abs_def] f'_def[abs_def] upd_space |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
651 |
by (intro image_cong) (simp_all add: u_eq b_def fun_eq_iff n_not_upd) |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
652 |
finally show "s' \<union> {b} = f' ` {.. Suc n}" .. |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
653 |
qed |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
654 |
moreover have "b \<notin> s'" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
655 |
using * `0 < p` by (auto simp: b_def) |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
656 |
ultimately show ?thesis by auto |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
657 |
qed |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
658 |
qed |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
659 |
|
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
660 |
lemma ksimplex_replace_0: |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
661 |
assumes s: "ksimplex p n s" and a: "a \<in> s" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
662 |
assumes j: "j < n" and p: "\<forall>x\<in>s - {a}. x j = 0" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
663 |
shows "card {s'. ksimplex p n s' \<and> (\<exists>b\<in>s'. s' - {b} = s - {a})} = 1" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
664 |
using s |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
665 |
proof cases |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
666 |
case (ksimplex b_s u_s) |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
667 |
|
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
668 |
{ fix t b assume "ksimplex p n t" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
669 |
then obtain b_t u_t where "kuhn_simplex p n b_t u_t t" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
670 |
by (auto elim: ksimplex.cases) |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
671 |
interpret kuhn_simplex_pair p n b_s u_s s b_t u_t t |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
672 |
by intro_locales fact+ |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
673 |
|
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
674 |
assume b: "b \<in> t" "t - {b} = s - {a}" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
675 |
with a j p s.replace_0[of _ a] t.replace_0[of _ b] have "s = t" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
676 |
by (intro ksimplex_eq_top[of a b]) auto } |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
677 |
then have "{s'. ksimplex p n s' \<and> (\<exists>b\<in>s'. s' - {b} = s - {a})} = {s}" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
678 |
using s `a \<in> s` by auto |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
679 |
then show ?thesis |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
680 |
by simp |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
681 |
qed |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
682 |
|
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
683 |
lemma ksimplex_replace_1: |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
684 |
assumes s: "ksimplex p n s" and a: "a \<in> s" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
685 |
assumes j: "j < n" and p: "\<forall>x\<in>s - {a}. x j = p" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
686 |
shows "card {s'. ksimplex p n s' \<and> (\<exists>b\<in>s'. s' - {b} = s - {a})} = 1" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
687 |
using s |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
688 |
proof cases |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
689 |
case (ksimplex b_s u_s) |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
690 |
|
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
691 |
{ fix t b assume "ksimplex p n t" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
692 |
then obtain b_t u_t where "kuhn_simplex p n b_t u_t t" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
693 |
by (auto elim: ksimplex.cases) |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
694 |
interpret kuhn_simplex_pair p n b_s u_s s b_t u_t t |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
695 |
by intro_locales fact+ |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
696 |
|
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
697 |
assume b: "b \<in> t" "t - {b} = s - {a}" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
698 |
with a j p s.replace_1[of _ a] t.replace_1[of _ b] have "s = t" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
699 |
by (intro ksimplex_eq_bot[of a b]) auto } |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
700 |
then have "{s'. ksimplex p n s' \<and> (\<exists>b\<in>s'. s' - {b} = s - {a})} = {s}" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
701 |
using s `a \<in> s` by auto |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
702 |
then show ?thesis |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
703 |
by simp |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
704 |
qed |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
705 |
|
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
706 |
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))" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
707 |
by (auto simp add: card_Suc_eq eval_nat_numeral) |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
708 |
|
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
709 |
lemma ksimplex_replace_2: |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
710 |
assumes s: "ksimplex p n s" and "a \<in> s" and "n \<noteq> 0" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
711 |
and lb: "\<forall>j<n. \<exists>x\<in>s - {a}. x j \<noteq> 0" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
712 |
and ub: "\<forall>j<n. \<exists>x\<in>s - {a}. x j \<noteq> p" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
713 |
shows "card {s'. ksimplex p n s' \<and> (\<exists>b\<in>s'. s' - {b} = s - {a})} = 2" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
714 |
using s |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
715 |
proof cases |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
716 |
case (ksimplex base upd) |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
717 |
then interpret kuhn_simplex p n base upd s . |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
718 |
|
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
719 |
from `a \<in> s` obtain i where "i \<le> n" "a = enum i" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
720 |
unfolding s_eq by auto |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
721 |
|
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
722 |
from `i \<le> n` have "i = 0 \<or> i = n \<or> (0 < i \<and> i < n)" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
723 |
by linarith |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
724 |
then have "\<exists>!s'. s' \<noteq> s \<and> ksimplex p n s' \<and> (\<exists>b\<in>s'. s - {a} = s'- {b})" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
725 |
proof (elim disjE conjE) |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
726 |
assume "i = 0" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
727 |
def rot \<equiv> "\<lambda>i. if i + 1 = n then 0 else i + 1" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
728 |
let ?upd = "upd \<circ> rot" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
729 |
|
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
730 |
have rot: "bij_betw rot {..< n} {..< n}" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
731 |
by (auto simp: bij_betw_def inj_on_def image_iff Ball_def rot_def) |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
732 |
arith+ |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
733 |
from rot upd have "bij_betw ?upd {..<n} {..<n}" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
734 |
by (rule bij_betw_trans) |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
735 |
|
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
736 |
def f' \<equiv> "\<lambda>i j. if j \<in> ?upd`{..< i} then Suc (enum (Suc 0) j) else enum (Suc 0) j" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
737 |
|
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
738 |
interpret b: kuhn_simplex p n "enum (Suc 0)" "upd \<circ> rot" "f' ` {.. n}" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
739 |
proof |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
740 |
from `a = enum i` ub `n \<noteq> 0` `i = 0` |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
741 |
obtain i' where "i' \<le> n" "enum i' \<noteq> enum 0" "enum i' (upd 0) \<noteq> p" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
742 |
unfolding s_eq by (auto intro: upd_space simp: enum_inj) |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
743 |
then have "enum 1 \<le> enum i'" "enum i' (upd 0) < p" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
744 |
using enum_le_p[of i' "upd 0"] by (auto simp add: enum_inj enum_mono upd_space) |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
745 |
then have "enum 1 (upd 0) < p" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
746 |
by (auto simp add: le_fun_def intro: le_less_trans) |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
747 |
then show "enum (Suc 0) \<in> {..<n} \<rightarrow> {..<p}" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
748 |
using base `n \<noteq> 0` by (auto simp add: enum_0 enum_Suc PiE_iff extensional_def upd_space) |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
749 |
|
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
750 |
{ fix i assume "n \<le> i" then show "enum (Suc 0) i = p" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
751 |
using `n \<noteq> 0` by (auto simp: enum_eq_p) } |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
752 |
show "bij_betw ?upd {..<n} {..<n}" by fact |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
753 |
qed (simp add: f'_def) |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
754 |
have ks_f': "ksimplex p n (f' ` {.. n})" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
755 |
by rule unfold_locales |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
756 |
|
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
757 |
have b_enum: "b.enum = f'" unfolding f'_def b.enum_def[abs_def] .. |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
758 |
with b.inj_enum have inj_f': "inj_on f' {.. n}" by simp |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
759 |
|
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
760 |
have [simp]: "\<And>j. j < n \<Longrightarrow> rot ` {..< j} = {0 <..< Suc j}" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
761 |
by (auto simp: rot_def image_iff Ball_def) |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
762 |
arith |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
763 |
|
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
764 |
{ fix j assume j: "j < n" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
765 |
from j `n \<noteq> 0` have "f' j = enum (Suc j)" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
766 |
by (auto simp add: f'_def enum_def upd_inj in_upd_image image_comp[symmetric] fun_eq_iff) } |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
767 |
note f'_eq_enum = this |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
768 |
then have "enum ` Suc ` {..< n} = f' ` {..< n}" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
769 |
by (force simp: enum_inj) |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
770 |
also have "Suc ` {..< n} = {.. n} - {0}" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
771 |
by (auto simp: image_iff Ball_def) arith |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
772 |
also have "{..< n} = {.. n} - {n}" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
773 |
by auto |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
774 |
finally have eq: "s - {a} = f' ` {.. n} - {f' n}" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
775 |
unfolding s_eq `a = enum i` `i = 0` |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
776 |
by (simp add: inj_on_image_set_diff[OF inj_enum] inj_on_image_set_diff[OF inj_f']) |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
777 |
|
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
778 |
have "enum 0 < f' 0" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
779 |
using `n \<noteq> 0` by (simp add: enum_strict_mono f'_eq_enum) |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
780 |
also have "\<dots> < f' n" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
781 |
using `n \<noteq> 0` b.enum_strict_mono[of 0 n] unfolding b_enum by simp |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
782 |
finally have "a \<noteq> f' n" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
783 |
using `a = enum i` `i = 0` by auto |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
784 |
|
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
785 |
{ fix t c assume "ksimplex p n t" "c \<in> t" and eq_sma: "s - {a} = t - {c}" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
786 |
obtain b u where "kuhn_simplex p n b u t" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
787 |
using `ksimplex p n t` by (auto elim: ksimplex.cases) |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
788 |
then interpret t: kuhn_simplex p n b u t . |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
789 |
|
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
790 |
{ fix x assume "x \<in> s" "x \<noteq> a" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
791 |
then have "x (upd 0) = enum (Suc 0) (upd 0)" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
792 |
by (auto simp: `a = enum i` `i = 0` s_eq enum_def enum_inj) } |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
793 |
then have eq_upd0: "\<forall>x\<in>t-{c}. x (upd 0) = enum (Suc 0) (upd 0)" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
794 |
unfolding eq_sma[symmetric] by auto |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
795 |
then have "c (upd 0) \<noteq> enum (Suc 0) (upd 0)" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
796 |
using `n \<noteq> 0` by (intro t.one_step[OF `c\<in>t` ]) (auto simp: upd_space) |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
797 |
then have "c (upd 0) < enum (Suc 0) (upd 0) \<or> c (upd 0) > enum (Suc 0) (upd 0)" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
798 |
by auto |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
799 |
then have "t = s \<or> t = f' ` {..n}" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
800 |
proof (elim disjE conjE) |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
801 |
assume *: "c (upd 0) < enum (Suc 0) (upd 0)" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
802 |
interpret st: kuhn_simplex_pair p n base upd s b u t .. |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
803 |
{ fix x assume "x \<in> t" with * `c\<in>t` eq_upd0[rule_format, of x] have "c \<le> x" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
804 |
by (auto simp: le_less intro!: t.less[of _ _ "upd 0"]) } |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
805 |
note top = this |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
806 |
have "s = t" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
807 |
using `a = enum i` `i = 0` `c \<in> t` |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
808 |
by (intro st.ksimplex_eq_bot[OF _ _ _ _ eq_sma]) |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
809 |
(auto simp: s_eq enum_mono t.s_eq t.enum_mono top) |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
810 |
then show ?thesis by simp |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
811 |
next |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
812 |
assume *: "c (upd 0) > enum (Suc 0) (upd 0)" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
813 |
interpret st: kuhn_simplex_pair p n "enum (Suc 0)" "upd \<circ> rot" "f' ` {.. n}" b u t .. |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
814 |
have eq: "f' ` {..n} - {f' n} = t - {c}" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
815 |
using eq_sma eq by simp |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
816 |
{ fix x assume "x \<in> t" with * `c\<in>t` eq_upd0[rule_format, of x] have "x \<le> c" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
817 |
by (auto simp: le_less intro!: t.less[of _ _ "upd 0"]) } |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
818 |
note top = this |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
819 |
have "f' ` {..n} = t" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
820 |
using `a = enum i` `i = 0` `c \<in> t` |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
821 |
by (intro st.ksimplex_eq_top[OF _ _ _ _ eq]) |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
822 |
(auto simp: b.s_eq b.enum_mono t.s_eq t.enum_mono b_enum[symmetric] top) |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
823 |
then show ?thesis by simp |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
824 |
qed } |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
825 |
with ks_f' eq `a \<noteq> f' n` `n \<noteq> 0` show ?thesis |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
826 |
apply (intro ex1I[of _ "f' ` {.. n}"]) |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
827 |
apply auto [] |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
828 |
apply metis |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
829 |
done |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
830 |
next |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
831 |
assume "i = n" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
832 |
from `n \<noteq> 0` obtain n' where n': "n = Suc n'" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
833 |
by (cases n) auto |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
834 |
|
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
835 |
def rot \<equiv> "\<lambda>i. case i of 0 \<Rightarrow> n' | Suc i \<Rightarrow> i" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
836 |
let ?upd = "upd \<circ> rot" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
837 |
|
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
838 |
have rot: "bij_betw rot {..< n} {..< n}" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
839 |
by (auto simp: bij_betw_def inj_on_def image_iff Bex_def rot_def n' split: nat.splits) |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
840 |
arith |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
841 |
from rot upd have "bij_betw ?upd {..<n} {..<n}" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
842 |
by (rule bij_betw_trans) |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
843 |
|
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
844 |
def b \<equiv> "base (upd n' := base (upd n') - 1)" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
845 |
def f' \<equiv> "\<lambda>i j. if j \<in> ?upd`{..< i} then Suc (b j) else b j" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
846 |
|
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
847 |
interpret b: kuhn_simplex p n b "upd \<circ> rot" "f' ` {.. n}" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
848 |
proof |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
849 |
{ fix i assume "n \<le> i" then show "b i = p" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
850 |
using base_out[of i] upd_space[of n'] by (auto simp: b_def n') } |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
851 |
show "b \<in> {..<n} \<rightarrow> {..<p}" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
852 |
using base `n \<noteq> 0` upd_space[of n'] |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
853 |
by (auto simp: b_def PiE_def Pi_iff Ball_def upd_space extensional_def n') |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
854 |
|
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
855 |
show "bij_betw ?upd {..<n} {..<n}" by fact |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
856 |
qed (simp add: f'_def) |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
857 |
have f': "b.enum = f'" unfolding f'_def b.enum_def[abs_def] .. |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
858 |
have ks_f': "ksimplex p n (b.enum ` {.. n})" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
859 |
unfolding f' by rule unfold_locales |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
860 |
|
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
861 |
have "0 < n" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
862 |
using `n \<noteq> 0` by auto |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
863 |
|
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
864 |
{ from `a = enum i` `n \<noteq> 0` `i = n` lb upd_space[of n'] |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
865 |
obtain i' where "i' \<le> n" "enum i' \<noteq> enum n" "0 < enum i' (upd n')" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
866 |
unfolding s_eq by (auto simp: enum_inj n') |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
867 |
moreover have "enum i' (upd n') = base (upd n')" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
868 |
unfolding enum_def using `i' \<le> n` `enum i' \<noteq> enum n` by (auto simp: n' upd_inj enum_inj) |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
869 |
ultimately have "0 < base (upd n')" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
870 |
by auto } |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
871 |
then have benum1: "b.enum (Suc 0) = base" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
872 |
unfolding b.enum_Suc[OF `0<n`] b.enum_0 by (auto simp: b_def rot_def) |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
873 |
|
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
874 |
have [simp]: "\<And>j. Suc j < n \<Longrightarrow> rot ` {..< Suc j} = {n'} \<union> {..< j}" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
875 |
by (auto simp: rot_def image_iff Ball_def split: nat.splits) |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
876 |
have rot_simps: "\<And>j. rot (Suc j) = j" "rot 0 = n'" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
877 |
by (simp_all add: rot_def) |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
878 |
|
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
879 |
{ fix j assume j: "Suc j \<le> n" then have "b.enum (Suc j) = enum j" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
880 |
by (induct j) (auto simp add: benum1 enum_0 b.enum_Suc enum_Suc rot_simps) } |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
881 |
note b_enum_eq_enum = this |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
882 |
then have "enum ` {..< n} = b.enum ` Suc ` {..< n}" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
883 |
by (auto simp add: image_comp intro!: image_cong) |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
884 |
also have "Suc ` {..< n} = {.. n} - {0}" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
885 |
by (auto simp: image_iff Ball_def) arith |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
886 |
also have "{..< n} = {.. n} - {n}" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
887 |
by auto |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
888 |
finally have eq: "s - {a} = b.enum ` {.. n} - {b.enum 0}" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
889 |
unfolding s_eq `a = enum i` `i = n` |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
890 |
using inj_on_image_set_diff[OF inj_enum order_refl, of "{n}"] |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
891 |
inj_on_image_set_diff[OF b.inj_enum order_refl, of "{0}"] |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
892 |
by (simp add: comp_def) |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
893 |
|
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
894 |
have "b.enum 0 \<le> b.enum n" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
895 |
by (simp add: b.enum_mono) |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
896 |
also have "b.enum n < enum n" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
897 |
using `n \<noteq> 0` by (simp add: enum_strict_mono b_enum_eq_enum n') |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
898 |
finally have "a \<noteq> b.enum 0" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
899 |
using `a = enum i` `i = n` by auto |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
900 |
|
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
901 |
{ fix t c assume "ksimplex p n t" "c \<in> t" and eq_sma: "s - {a} = t - {c}" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
902 |
obtain b' u where "kuhn_simplex p n b' u t" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
903 |
using `ksimplex p n t` by (auto elim: ksimplex.cases) |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
904 |
then interpret t: kuhn_simplex p n b' u t . |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
905 |
|
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
906 |
{ fix x assume "x \<in> s" "x \<noteq> a" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
907 |
then have "x (upd n') = enum n' (upd n')" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
908 |
by (auto simp: `a = enum i` n' `i = n` s_eq enum_def enum_inj in_upd_image) } |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
909 |
then have eq_upd0: "\<forall>x\<in>t-{c}. x (upd n') = enum n' (upd n')" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
910 |
unfolding eq_sma[symmetric] by auto |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
911 |
then have "c (upd n') \<noteq> enum n' (upd n')" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
912 |
using `n \<noteq> 0` by (intro t.one_step[OF `c\<in>t` ]) (auto simp: n' upd_space[unfolded n']) |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
913 |
then have "c (upd n') < enum n' (upd n') \<or> c (upd n') > enum n' (upd n')" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
914 |
by auto |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
915 |
then have "t = s \<or> t = b.enum ` {..n}" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
916 |
proof (elim disjE conjE) |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
917 |
assume *: "c (upd n') > enum n' (upd n')" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
918 |
interpret st: kuhn_simplex_pair p n base upd s b' u t .. |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
919 |
{ fix x assume "x \<in> t" with * `c\<in>t` eq_upd0[rule_format, of x] have "x \<le> c" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
920 |
by (auto simp: le_less intro!: t.less[of _ _ "upd n'"]) } |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
921 |
note top = this |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
922 |
have "s = t" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
923 |
using `a = enum i` `i = n` `c \<in> t` |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
924 |
by (intro st.ksimplex_eq_top[OF _ _ _ _ eq_sma]) |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
925 |
(auto simp: s_eq enum_mono t.s_eq t.enum_mono top) |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
926 |
then show ?thesis by simp |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
927 |
next |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
928 |
assume *: "c (upd n') < enum n' (upd n')" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
929 |
interpret st: kuhn_simplex_pair p n b "upd \<circ> rot" "f' ` {.. n}" b' u t .. |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
930 |
have eq: "f' ` {..n} - {b.enum 0} = t - {c}" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
931 |
using eq_sma eq f' by simp |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
932 |
{ fix x assume "x \<in> t" with * `c\<in>t` eq_upd0[rule_format, of x] have "c \<le> x" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
933 |
by (auto simp: le_less intro!: t.less[of _ _ "upd n'"]) } |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
934 |
note bot = this |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
935 |
have "f' ` {..n} = t" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
936 |
using `a = enum i` `i = n` `c \<in> t` |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
937 |
by (intro st.ksimplex_eq_bot[OF _ _ _ _ eq]) |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
938 |
(auto simp: b.s_eq b.enum_mono t.s_eq t.enum_mono bot) |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
939 |
with f' show ?thesis by simp |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
940 |
qed } |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
941 |
with ks_f' eq `a \<noteq> b.enum 0` `n \<noteq> 0` show ?thesis |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
942 |
apply (intro ex1I[of _ "b.enum ` {.. n}"]) |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
943 |
apply auto [] |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
944 |
apply metis |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
945 |
done |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
946 |
next |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
947 |
assume i: "0 < i" "i < n" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
948 |
def i' \<equiv> "i - 1" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
949 |
with i have "Suc i' < n" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
950 |
by simp |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
951 |
with i have Suc_i': "Suc i' = i" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
952 |
by (simp add: i'_def) |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
953 |
|
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
954 |
let ?upd = "Fun.swap i' i upd" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
955 |
from i upd have "bij_betw ?upd {..< n} {..< n}" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
956 |
by (subst bij_betw_swap_iff) (auto simp: i'_def) |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
957 |
|
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
958 |
def f' \<equiv> "\<lambda>i j. if j \<in> ?upd`{..< i} then Suc (base j) else base j" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
959 |
interpret b: kuhn_simplex p n base ?upd "f' ` {.. n}" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
960 |
proof |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
961 |
show "base \<in> {..<n} \<rightarrow> {..<p}" by fact |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
962 |
{ fix i assume "n \<le> i" then show "base i = p" by fact } |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
963 |
show "bij_betw ?upd {..<n} {..<n}" by fact |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
964 |
qed (simp add: f'_def) |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
965 |
have f': "b.enum = f'" unfolding f'_def b.enum_def[abs_def] .. |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
966 |
have ks_f': "ksimplex p n (b.enum ` {.. n})" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
967 |
unfolding f' by rule unfold_locales |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
968 |
|
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
969 |
have "{i} \<subseteq> {..n}" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
970 |
using i by auto |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
971 |
{ fix j assume "j \<le> n" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
972 |
moreover have "j < i \<or> i = j \<or> i < j" by arith |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
973 |
moreover note i |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
974 |
ultimately have "enum j = b.enum j \<longleftrightarrow> j \<noteq> i" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
975 |
unfolding enum_def[abs_def] b.enum_def[abs_def] |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
976 |
by (auto simp add: fun_eq_iff swap_image i'_def |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
977 |
in_upd_image inj_on_image_set_diff[OF inj_upd]) } |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
978 |
note enum_eq_benum = this |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
979 |
then have "enum ` ({.. n} - {i}) = b.enum ` ({.. n} - {i})" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
980 |
by (intro image_cong) auto |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
981 |
then have eq: "s - {a} = b.enum ` {.. n} - {b.enum i}" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
982 |
unfolding s_eq `a = enum i` |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
983 |
using inj_on_image_set_diff[OF inj_enum order_refl `{i} \<subseteq> {..n}`] |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
984 |
inj_on_image_set_diff[OF b.inj_enum order_refl `{i} \<subseteq> {..n}`] |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
985 |
by (simp add: comp_def) |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
986 |
|
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
987 |
have "a \<noteq> b.enum i" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
988 |
using `a = enum i` enum_eq_benum i by auto |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
989 |
|
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
990 |
{ fix t c assume "ksimplex p n t" "c \<in> t" and eq_sma: "s - {a} = t - {c}" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
991 |
obtain b' u where "kuhn_simplex p n b' u t" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
992 |
using `ksimplex p n t` by (auto elim: ksimplex.cases) |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
993 |
then interpret t: kuhn_simplex p n b' u t . |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
994 |
have "enum i' \<in> s - {a}" "enum (i + 1) \<in> s - {a}" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
995 |
using `a = enum i` i enum_in by (auto simp: enum_inj i'_def) |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
996 |
then obtain l k where |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
997 |
l: "t.enum l = enum i'" "l \<le> n" "t.enum l \<noteq> c" and |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
998 |
k: "t.enum k = enum (i + 1)" "k \<le> n" "t.enum k \<noteq> c" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
999 |
unfolding eq_sma by (auto simp: t.s_eq) |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1000 |
with i have "t.enum l < t.enum k" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1001 |
by (simp add: enum_strict_mono i'_def) |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1002 |
with `l \<le> n` `k \<le> n` have "l < k" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1003 |
by (simp add: t.enum_strict_mono) |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1004 |
{ assume "Suc l = k" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1005 |
have "enum (Suc (Suc i')) = t.enum (Suc l)" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1006 |
using i by (simp add: k `Suc l = k` i'_def) |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1007 |
then have False |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1008 |
using `l < k` `k \<le> n` `Suc i' < n` |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1009 |
by (auto simp: t.enum_Suc enum_Suc l upd_inj fun_eq_iff split: split_if_asm) |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1010 |
(metis Suc_lessD n_not_Suc_n upd_inj) } |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1011 |
with `l < k` have "Suc l < k" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1012 |
by arith |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1013 |
have c_eq: "c = t.enum (Suc l)" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1014 |
proof (rule ccontr) |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1015 |
assume "c \<noteq> t.enum (Suc l)" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1016 |
then have "t.enum (Suc l) \<in> s - {a}" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1017 |
using `l < k` `k \<le> n` by (simp add: t.s_eq eq_sma) |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1018 |
then obtain j where "t.enum (Suc l) = enum j" "j \<le> n" "enum j \<noteq> enum i" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1019 |
unfolding s_eq `a = enum i` by auto |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1020 |
with i have "t.enum (Suc l) \<le> t.enum l \<or> t.enum k \<le> t.enum (Suc l)" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1021 |
by (auto simp add: i'_def enum_mono enum_inj l k) |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1022 |
with `Suc l < k` `k \<le> n` show False |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1023 |
by (simp add: t.enum_mono) |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1024 |
qed |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1025 |
|
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1026 |
{ have "t.enum (Suc (Suc l)) \<in> s - {a}" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1027 |
unfolding eq_sma c_eq t.s_eq using `Suc l < k` `k \<le> n` by (auto simp: t.enum_inj) |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1028 |
then obtain j where eq: "t.enum (Suc (Suc l)) = enum j" and "j \<le> n" "j \<noteq> i" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1029 |
by (auto simp: s_eq `a = enum i`) |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1030 |
moreover have "enum i' < t.enum (Suc (Suc l))" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1031 |
unfolding l(1)[symmetric] using `Suc l < k` `k \<le> n` by (auto simp: t.enum_strict_mono) |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1032 |
ultimately have "i' < j" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1033 |
using i by (simp add: enum_strict_mono i'_def) |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1034 |
with `j \<noteq> i` `j \<le> n` have "t.enum k \<le> t.enum (Suc (Suc l))" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1035 |
unfolding i'_def by (simp add: enum_mono k eq) |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1036 |
then have "k \<le> Suc (Suc l)" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1037 |
using `k \<le> n` `Suc l < k` by (simp add: t.enum_mono) } |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1038 |
with `Suc l < k` have "Suc (Suc l) = k" by simp |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1039 |
then have "enum (Suc (Suc i')) = t.enum (Suc (Suc l))" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1040 |
using i by (simp add: k i'_def) |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1041 |
also have "\<dots> = (enum i') (u l := Suc (enum i' (u l)), u (Suc l) := Suc (enum i' (u (Suc l))))" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1042 |
using `Suc l < k` `k \<le> n` by (simp add: t.enum_Suc l t.upd_inj) |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1043 |
finally have "(u l = upd i' \<and> u (Suc l) = upd (Suc i')) \<or> |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1044 |
(u l = upd (Suc i') \<and> u (Suc l) = upd i')" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1045 |
using `Suc i' < n` by (auto simp: enum_Suc fun_eq_iff split: split_if_asm) |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1046 |
|
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1047 |
then have "t = s \<or> t = b.enum ` {..n}" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1048 |
proof (elim disjE conjE) |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1049 |
assume u: "u l = upd i'" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1050 |
have "c = t.enum (Suc l)" unfolding c_eq .. |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1051 |
also have "t.enum (Suc l) = enum (Suc i')" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1052 |
using u `l < k` `k \<le> n` `Suc i' < n` by (simp add: enum_Suc t.enum_Suc l) |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1053 |
also have "\<dots> = a" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1054 |
using `a = enum i` i by (simp add: i'_def) |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1055 |
finally show ?thesis |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1056 |
using eq_sma `a \<in> s` `c \<in> t` by auto |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1057 |
next |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1058 |
assume u: "u l = upd (Suc i')" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1059 |
def B \<equiv> "b.enum ` {..n}" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1060 |
have "b.enum i' = enum i'" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1061 |
using enum_eq_benum[of i'] i by (auto simp add: i'_def gr0_conv_Suc) |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1062 |
have "c = t.enum (Suc l)" unfolding c_eq .. |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1063 |
also have "t.enum (Suc l) = b.enum (Suc i')" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1064 |
using u `l < k` `k \<le> n` `Suc i' < n` |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1065 |
by (simp_all add: enum_Suc t.enum_Suc l b.enum_Suc `b.enum i' = enum i'` swap_apply1) |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1066 |
(simp add: Suc_i') |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1067 |
also have "\<dots> = b.enum i" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1068 |
using i by (simp add: i'_def) |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1069 |
finally have "c = b.enum i" . |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1070 |
then have "t - {c} = B - {c}" "c \<in> B" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1071 |
unfolding eq_sma[symmetric] eq B_def using i by auto |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1072 |
with `c \<in> t` have "t = B" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1073 |
by auto |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1074 |
then show ?thesis |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1075 |
by (simp add: B_def) |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1076 |
qed } |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1077 |
with ks_f' eq `a \<noteq> b.enum i` `n \<noteq> 0` `i \<le> n` show ?thesis |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1078 |
apply (intro ex1I[of _ "b.enum ` {.. n}"]) |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1079 |
apply auto [] |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1080 |
apply metis |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1081 |
done |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1082 |
qed |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1083 |
then show ?thesis |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1084 |
using s `a \<in> s` by (simp add: card_2_exists Ex1_def) metis |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1085 |
qed |
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
1086 |
|
53688 | 1087 |
text {* Hence another step towards concreteness. *} |
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
1088 |
|
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
1089 |
lemma kuhn_simplex_lemma: |
56273
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1090 |
assumes "\<forall>s. ksimplex p (Suc n) s \<longrightarrow> rl ` s \<subseteq> {.. Suc n}" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1091 |
and "odd (card {f. \<exists>s a. ksimplex p (Suc n) s \<and> a \<in> s \<and> (f = s - {a}) \<and> |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1092 |
rl ` f = {..n} \<and> ((\<exists>j\<le>n. \<forall>x\<in>f. x j = 0) \<or> (\<exists>j\<le>n. \<forall>x\<in>f. x j = p))})" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1093 |
shows "odd (card {s. ksimplex p (Suc n) s \<and> rl ` s = {..Suc n}})" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1094 |
proof (rule kuhn_complete_lemma[OF finite_ksimplexes refl, unfolded mem_Collect_eq, |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1095 |
where bnd="\<lambda>f. (\<exists>j\<in>{..n}. \<forall>x\<in>f. x j = 0) \<or> (\<exists>j\<in>{..n}. \<forall>x\<in>f. x j = p)"], |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1096 |
safe del: notI) |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1097 |
|
53186 | 1098 |
have *: "\<And>x y. x = y \<Longrightarrow> odd (card x) \<Longrightarrow> odd (card y)" |
1099 |
by auto |
|
56273
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1100 |
show "odd (card {f. (\<exists>s\<in>{s. ksimplex p (Suc n) s}. \<exists>a\<in>s. f = s - {a}) \<and> |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1101 |
rl ` f = {..n} \<and> ((\<exists>j\<in>{..n}. \<forall>x\<in>f. x j = 0) \<or> (\<exists>j\<in>{..n}. \<forall>x\<in>f. x j = p))})" |
53186 | 1102 |
apply (rule *[OF _ assms(2)]) |
56273
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1103 |
apply (auto simp: atLeast0AtMost) |
53186 | 1104 |
done |
56273
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1105 |
|
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1106 |
next |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1107 |
|
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1108 |
fix s assume s: "ksimplex p (Suc n) s" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1109 |
then show "card s = n + 2" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1110 |
by (simp add: ksimplex_card) |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1111 |
|
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1112 |
fix a assume a: "a \<in> s" then show "rl a \<le> Suc n" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1113 |
using assms(1) s by (auto simp: subset_eq) |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1114 |
|
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1115 |
let ?S = "{t. ksimplex p (Suc n) t \<and> (\<exists>b\<in>t. s - {a} = t - {b})}" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1116 |
{ fix j assume j: "j \<le> n" "\<forall>x\<in>s - {a}. x j = 0" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1117 |
with s a show "card ?S = 1" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1118 |
using ksimplex_replace_0[of p "n + 1" s a j] |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1119 |
by (subst eq_commute) simp } |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1120 |
|
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1121 |
{ fix j assume j: "j \<le> n" "\<forall>x\<in>s - {a}. x j = p" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1122 |
with s a show "card ?S = 1" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1123 |
using ksimplex_replace_1[of p "n + 1" s a j] |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1124 |
by (subst eq_commute) simp } |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1125 |
|
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1126 |
{ assume "card ?S \<noteq> 2" "\<not> (\<exists>j\<in>{..n}. \<forall>x\<in>s - {a}. x j = p)" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1127 |
with s a show "\<exists>j\<in>{..n}. \<forall>x\<in>s - {a}. x j = 0" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1128 |
using ksimplex_replace_2[of p "n + 1" s a] |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1129 |
by (subst (asm) eq_commute) auto } |
53186 | 1130 |
qed |
1131 |
||
53688 | 1132 |
subsection {* Reduced labelling *} |
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
1133 |
|
56273
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1134 |
definition reduced :: "nat \<Rightarrow> (nat \<Rightarrow> nat) \<Rightarrow> nat" where "reduced n x = (LEAST k. k = n \<or> x k \<noteq> 0)" |
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
1135 |
|
53186 | 1136 |
lemma reduced_labelling: |
56273
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1137 |
shows "reduced n x \<le> n" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1138 |
and "\<forall>i<reduced n x. x i = 0" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1139 |
and "reduced n x = n \<or> x (reduced n x) \<noteq> 0" |
53186 | 1140 |
proof - |
56273
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1141 |
show "reduced n x \<le> n" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1142 |
unfolding reduced_def by (rule LeastI2_wellorder[where a=n]) auto |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1143 |
show "\<forall>i<reduced n x. x i = 0" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1144 |
unfolding reduced_def by (rule LeastI2_wellorder[where a=n]) fastforce+ |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1145 |
show "reduced n x = n \<or> x (reduced n x) \<noteq> 0" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1146 |
unfolding reduced_def by (rule LeastI2_wellorder[where a=n]) fastforce+ |
53186 | 1147 |
qed |
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
1148 |
|
53186 | 1149 |
lemma reduced_labelling_unique: |
56273
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1150 |
"r \<le> n \<Longrightarrow> \<forall>i<r. x i = 0 \<Longrightarrow> r = n \<or> x r \<noteq> 0 \<Longrightarrow> reduced n x = r" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1151 |
unfolding reduced_def by (rule LeastI2_wellorder[where a=n]) (metis le_less not_le)+ |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1152 |
|
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1153 |
lemma reduced_labelling_zero: "j < n \<Longrightarrow> x j = 0 \<Longrightarrow> reduced n x \<noteq> j" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1154 |
using reduced_labelling[of n x] by auto |
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
1155 |
|
56273
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1156 |
lemma reduce_labelling_zero[simp]: "reduced 0 x = 0" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1157 |
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
|
1158 |
|
56273
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1159 |
lemma reduced_labelling_nonzero: "j < n \<Longrightarrow> x j \<noteq> 0 \<Longrightarrow> reduced n x \<le> j" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1160 |
using reduced_labelling[of n x] by (elim allE[where x=j]) auto |
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
1161 |
|
56273
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1162 |
lemma reduced_labelling_Suc: "reduced (Suc n) x \<noteq> Suc n \<Longrightarrow> reduced (Suc n) x = reduced n x" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1163 |
using reduced_labelling[of "Suc n" x] |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1164 |
by (intro reduced_labelling_unique[symmetric]) auto |
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
1165 |
|
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
1166 |
lemma complete_face_top: |
56273
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1167 |
assumes "\<forall>x\<in>f. \<forall>j\<le>n. x j = 0 \<longrightarrow> lab x j = 0" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1168 |
and "\<forall>x\<in>f. \<forall>j\<le>n. x j = p \<longrightarrow> lab x j = 1" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1169 |
and eq: "(reduced (Suc n) \<circ> lab) ` f = {..n}" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1170 |
shows "((\<exists>j\<le>n. \<forall>x\<in>f. x j = 0) \<or> (\<exists>j\<le>n. \<forall>x\<in>f. x j = p)) \<longleftrightarrow> (\<forall>x\<in>f. x n = p)" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1171 |
proof (safe del: disjCI) |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1172 |
fix x j assume j: "j \<le> n" "\<forall>x\<in>f. x j = 0" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1173 |
{ fix x assume "x \<in> f" with assms j have "reduced (Suc n) (lab x) \<noteq> j" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1174 |
by (intro reduced_labelling_zero) auto } |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1175 |
moreover have "j \<in> (reduced (Suc n) \<circ> lab) ` f" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1176 |
using j eq by auto |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1177 |
ultimately show "x n = p" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1178 |
by force |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1179 |
next |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1180 |
fix x j assume j: "j \<le> n" "\<forall>x\<in>f. x j = p" and x: "x \<in> f" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1181 |
have "j = n" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1182 |
proof (rule ccontr) |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1183 |
assume "\<not> ?thesis" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1184 |
{ fix x assume "x \<in> f" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1185 |
with assms j have "reduced (Suc n) (lab x) \<le> j" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1186 |
by (intro reduced_labelling_nonzero) auto |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1187 |
then have "reduced (Suc n) (lab x) \<noteq> n" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1188 |
using `j \<noteq> n` `j \<le> n` by simp } |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1189 |
moreover |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1190 |
have "n \<in> (reduced (Suc n) \<circ> lab) ` f" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1191 |
using eq by auto |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1192 |
ultimately show False |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1193 |
by force |
53186 | 1194 |
qed |
56273
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1195 |
moreover have "j \<in> (reduced (Suc n) \<circ> lab) ` f" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1196 |
using j eq by auto |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1197 |
ultimately show "x n = p" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1198 |
using j x by auto |
53688 | 1199 |
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
|
1200 |
|
53688 | 1201 |
text {* Hence we get just about the nice induction. *} |
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
1202 |
|
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
1203 |
lemma kuhn_induction: |
53688 | 1204 |
assumes "0 < p" |
56273
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1205 |
and lab_0: "\<forall>x. \<forall>j\<le>n. (\<forall>j. x j \<le> p) \<and> x j = 0 \<longrightarrow> lab x j = 0" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1206 |
and lab_1: "\<forall>x. \<forall>j\<le>n. (\<forall>j. x j \<le> p) \<and> x j = p \<longrightarrow> lab x j = 1" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1207 |
and odd: "odd (card {s. ksimplex p n s \<and> (reduced n\<circ>lab) ` s = {..n}})" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1208 |
shows "odd (card {s. ksimplex p (Suc n) s \<and> (reduced (Suc n)\<circ>lab) ` s = {..Suc n}})" |
53248 | 1209 |
proof - |
56273
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1210 |
let ?rl = "reduced (Suc n) \<circ> lab" and ?ext = "\<lambda>f v. \<exists>j\<le>n. \<forall>x\<in>f. x j = v" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1211 |
let ?ext = "\<lambda>s. (\<exists>j\<le>n. \<forall>x\<in>s. x j = 0) \<or> (\<exists>j\<le>n. \<forall>x\<in>s. x j = p)" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1212 |
have "\<forall>s. ksimplex p (Suc n) s \<longrightarrow> ?rl ` s \<subseteq> {..Suc n}" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1213 |
by (simp add: reduced_labelling subset_eq) |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1214 |
moreover |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1215 |
have "{s. ksimplex p n s \<and> (reduced n \<circ> lab) ` s = {..n}} = |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1216 |
{f. \<exists>s a. ksimplex p (Suc n) s \<and> a \<in> s \<and> f = s - {a} \<and> ?rl ` f = {..n} \<and> ?ext f}" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1217 |
proof (intro set_eqI, safe del: disjCI equalityI disjE) |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1218 |
fix s assume s: "ksimplex p n s" and rl: "(reduced n \<circ> lab) ` s = {..n}" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1219 |
from s obtain u b where "kuhn_simplex p n u b s" by (auto elim: ksimplex.cases) |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1220 |
then interpret kuhn_simplex p n u b s . |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1221 |
have all_eq_p: "\<forall>x\<in>s. x n = p" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1222 |
by (auto simp: out_eq_p) |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1223 |
moreover |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1224 |
{ fix x assume "x \<in> s" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1225 |
with lab_1[rule_format, of n x] all_eq_p s_le_p[of x] |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1226 |
have "?rl x \<le> n" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1227 |
by (auto intro!: reduced_labelling_nonzero) |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1228 |
then have "?rl x = reduced n (lab x)" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1229 |
by (auto intro!: reduced_labelling_Suc) } |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1230 |
then have "?rl ` s = {..n}" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1231 |
using rl by (simp cong: image_cong) |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1232 |
moreover |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1233 |
obtain t a where "ksimplex p (Suc n) t" "a \<in> t" "s = t - {a}" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1234 |
using s unfolding simplex_top_face[OF `0 < p` all_eq_p] by auto |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1235 |
ultimately |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1236 |
show "\<exists>t a. ksimplex p (Suc n) t \<and> a \<in> t \<and> s = t - {a} \<and> ?rl ` s = {..n} \<and> ?ext s" |
53688 | 1237 |
by auto |
53248 | 1238 |
next |
56273
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1239 |
fix x s a assume s: "ksimplex p (Suc n) s" and rl: "?rl ` (s - {a}) = {.. n}" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1240 |
and a: "a \<in> s" and "?ext (s - {a})" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1241 |
from s obtain u b where "kuhn_simplex p (Suc n) u b s" by (auto elim: ksimplex.cases) |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1242 |
then interpret kuhn_simplex p "Suc n" u b s . |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1243 |
have all_eq_p: "\<forall>x\<in>s. x (Suc n) = p" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1244 |
by (auto simp: out_eq_p) |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1245 |
|
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1246 |
{ fix x assume "x \<in> s - {a}" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1247 |
then have "?rl x \<in> ?rl ` (s - {a})" |
53248 | 1248 |
by auto |
56273
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1249 |
then have "?rl x \<le> n" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1250 |
unfolding rl by auto |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1251 |
then have "?rl x = reduced n (lab x)" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1252 |
by (auto intro!: reduced_labelling_Suc) } |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1253 |
then show rl': "(reduced n\<circ>lab) ` (s - {a}) = {..n}" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1254 |
unfolding rl[symmetric] by (intro image_cong) auto |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1255 |
|
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1256 |
from `?ext (s - {a})` |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1257 |
have all_eq_p: "\<forall>x\<in>s - {a}. x n = p" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1258 |
proof (elim disjE exE conjE) |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1259 |
fix j assume "j \<le> n" "\<forall>x\<in>s - {a}. x j = 0" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1260 |
with lab_0[rule_format, of j] all_eq_p s_le_p |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1261 |
have "\<And>x. x \<in> s - {a} \<Longrightarrow> reduced (Suc n) (lab x) \<noteq> j" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1262 |
by (intro reduced_labelling_zero) auto |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1263 |
moreover have "j \<in> ?rl ` (s - {a})" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1264 |
using `j \<le> n` unfolding rl by auto |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1265 |
ultimately show ?thesis |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1266 |
by force |
53248 | 1267 |
next |
56273
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1268 |
fix j assume "j \<le> n" and eq_p: "\<forall>x\<in>s - {a}. x j = p" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1269 |
show ?thesis |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1270 |
proof cases |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1271 |
assume "j = n" with eq_p show ?thesis by simp |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1272 |
next |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1273 |
assume "j \<noteq> n" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1274 |
{ fix x assume x: "x \<in> s - {a}" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1275 |
have "reduced n (lab x) \<le> j" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1276 |
proof (rule reduced_labelling_nonzero) |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1277 |
show "lab x j \<noteq> 0" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1278 |
using lab_1[rule_format, of j x] x s_le_p[of x] eq_p `j \<le> n` by auto |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1279 |
show "j < n" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1280 |
using `j \<le> n` `j \<noteq> n` by simp |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1281 |
qed |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1282 |
then have "reduced n (lab x) \<noteq> n" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1283 |
using `j \<le> n` `j \<noteq> n` by simp } |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1284 |
moreover have "n \<in> (reduced n\<circ>lab) ` (s - {a})" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1285 |
unfolding rl' by auto |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1286 |
ultimately show ?thesis |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1287 |
by force |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1288 |
qed |
53248 | 1289 |
qed |
56273
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1290 |
show "ksimplex p n (s - {a})" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1291 |
unfolding simplex_top_face[OF `0 < p` all_eq_p] using s a by auto |
53248 | 1292 |
qed |
56273
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1293 |
ultimately show ?thesis |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1294 |
using assms by (intro kuhn_simplex_lemma) auto |
53248 | 1295 |
qed |
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
1296 |
|
53688 | 1297 |
text {* And so we get the final combinatorial result. *} |
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
1298 |
|
53688 | 1299 |
lemma ksimplex_0: "ksimplex p 0 s \<longleftrightarrow> s = {(\<lambda>x. p)}" |
53248 | 1300 |
proof |
56273
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1301 |
assume "ksimplex p 0 s" then show "s = {(\<lambda>x. p)}" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1302 |
by (blast dest: kuhn_simplex.ksimplex_0 elim: ksimplex.cases) |
53248 | 1303 |
next |
56273
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1304 |
assume s: "s = {(\<lambda>x. p)}" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1305 |
show "ksimplex p 0 s" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1306 |
proof (intro ksimplex, unfold_locales) |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1307 |
show "(\<lambda>_. p) \<in> {..<0::nat} \<rightarrow> {..<p}" by auto |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1308 |
show "bij_betw id {..<0} {..<0}" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1309 |
by simp |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1310 |
qed (auto simp: s) |
53248 | 1311 |
qed |
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
1312 |
|
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
1313 |
lemma kuhn_combinatorial: |
53688 | 1314 |
assumes "0 < p" |
56273
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1315 |
and "\<forall>x j. (\<forall>j. x j \<le> p) \<and> j < n \<and> x j = 0 \<longrightarrow> lab x j = 0" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1316 |
and "\<forall>x j. (\<forall>j. x j \<le> p) \<and> j < n \<and> x j = p \<longrightarrow> lab x j = 1" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1317 |
shows "odd (card {s. ksimplex p n s \<and> (reduced n\<circ>lab) ` s = {..n}})" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1318 |
(is "odd (card (?M n))") |
53248 | 1319 |
using assms |
1320 |
proof (induct n) |
|
56273
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1321 |
case 0 then show ?case |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1322 |
by (simp add: ksimplex_0 cong: conj_cong) |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1323 |
next |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1324 |
case (Suc n) |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1325 |
then have "odd (card (?M n))" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1326 |
by force |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1327 |
with Suc show ?case |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1328 |
using kuhn_induction[of p n] by (auto simp: comp_def) |
53248 | 1329 |
qed |
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
1330 |
|
53248 | 1331 |
lemma kuhn_lemma: |
53688 | 1332 |
fixes n p :: nat |
1333 |
assumes "0 < p" |
|
56273
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1334 |
and "\<forall>x. (\<forall>i<n. x i \<le> p) \<longrightarrow> (\<forall>i<n. label x i = (0::nat) \<or> label x i = 1)" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1335 |
and "\<forall>x. (\<forall>i<n. x i \<le> p) \<longrightarrow> (\<forall>i<n. x i = 0 \<longrightarrow> label x i = 0)" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1336 |
and "\<forall>x. (\<forall>i<n. x i \<le> p) \<longrightarrow> (\<forall>i<n. x i = p \<longrightarrow> label x i = 1)" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1337 |
obtains q where "\<forall>i<n. q i < p" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1338 |
and "\<forall>i<n. \<exists>r s. (\<forall>j<n. q j \<le> r j \<and> r j \<le> q j + 1) \<and> (\<forall>j<n. q j \<le> s j \<and> s j \<le> q j + 1) \<and> label r i \<noteq> label s i" |
53248 | 1339 |
proof - |
56273
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1340 |
let ?rl = "reduced n\<circ>label" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1341 |
let ?A = "{s. ksimplex p n s \<and> ?rl ` s = {..n}}" |
53248 | 1342 |
have "odd (card ?A)" |
56273
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1343 |
using assms by (intro kuhn_combinatorial[of p n label]) auto |
53688 | 1344 |
then have "?A \<noteq> {}" |
56273
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1345 |
by (intro notI) simp |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1346 |
then obtain s b u where "kuhn_simplex p n b u s" and rl: "?rl ` s = {..n}" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1347 |
by (auto elim: ksimplex.cases) |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1348 |
interpret kuhn_simplex p n b u s by fact |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1349 |
|
53248 | 1350 |
show ?thesis |
56273
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1351 |
proof (intro that[of b] allI impI) |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1352 |
fix i assume "i < n" then show "b i < p" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1353 |
using base by auto |
53248 | 1354 |
next |
1355 |
case goal2 |
|
56273
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1356 |
then have "i \<in> {.. n}" "Suc i \<in> {.. n}" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1357 |
by auto |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1358 |
then obtain u v where u: "u \<in> s" "Suc i = ?rl u" and v: "v \<in> s" "i = ?rl v" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1359 |
unfolding rl[symmetric] by blast |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1360 |
|
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1361 |
have "label u i \<noteq> label v i" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1362 |
using reduced_labelling [of n "label u"] reduced_labelling [of n "label v"] |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1363 |
u(2)[symmetric] v(2)[symmetric] `i < n` |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1364 |
by auto |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1365 |
moreover |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1366 |
{ fix j assume "j < n" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1367 |
then have "b j \<le> u j" "u j \<le> b j + 1" "b j \<le> v j" "v j \<le> b j + 1" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1368 |
using base_le[OF `u\<in>s`] le_Suc_base[OF `u\<in>s`] base_le[OF `v\<in>s`] le_Suc_base[OF `v\<in>s`] by auto } |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1369 |
ultimately show ?case |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1370 |
by blast |
53248 | 1371 |
qed |
1372 |
qed |
|
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
1373 |
|
53688 | 1374 |
subsection {* The main result for the unit cube *} |
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
1375 |
|
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
1376 |
lemma kuhn_labelling_lemma': |
53688 | 1377 |
assumes "(\<forall>x::nat\<Rightarrow>real. P x \<longrightarrow> P (f x))" |
1378 |
and "\<forall>x. P x \<longrightarrow> (\<forall>i::nat. Q i \<longrightarrow> 0 \<le> x i \<and> x i \<le> 1)" |
|
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
1379 |
shows "\<exists>l. (\<forall>x i. l x i \<le> (1::nat)) \<and> |
53688 | 1380 |
(\<forall>x i. P x \<and> Q i \<and> x i = 0 \<longrightarrow> l x i = 0) \<and> |
1381 |
(\<forall>x i. P x \<and> Q i \<and> x i = 1 \<longrightarrow> l x i = 1) \<and> |
|
1382 |
(\<forall>x i. P x \<and> Q i \<and> l x i = 0 \<longrightarrow> x i \<le> f x i) \<and> |
|
1383 |
(\<forall>x i. P x \<and> Q i \<and> l x i = 1 \<longrightarrow> f x i \<le> x i)" |
|
53185 | 1384 |
proof - |
53688 | 1385 |
have and_forall_thm: "\<And>P Q. (\<forall>x. P x) \<and> (\<forall>x. Q x) \<longleftrightarrow> (\<forall>x. P x \<and> Q x)" |
1386 |
by auto |
|
1387 |
have *: "\<forall>x y::real. 0 \<le> x \<and> x \<le> 1 \<and> 0 \<le> y \<and> y \<le> 1 \<longrightarrow> x \<noteq> 1 \<and> x \<le> y \<or> x \<noteq> 0 \<and> y \<le> x" |
|
53185 | 1388 |
by auto |
1389 |
show ?thesis |
|
1390 |
unfolding and_forall_thm |
|
1391 |
apply (subst choice_iff[symmetric])+ |
|
53688 | 1392 |
apply rule |
1393 |
apply rule |
|
1394 |
proof - |
|
53185 | 1395 |
case goal1 |
53688 | 1396 |
let ?R = "\<lambda>y::nat. |
1397 |
(P x \<and> Q xa \<and> x xa = 0 \<longrightarrow> y = 0) \<and> |
|
53185 | 1398 |
(P x \<and> Q xa \<and> x xa = 1 \<longrightarrow> y = 1) \<and> |
1399 |
(P x \<and> Q xa \<and> y = 0 \<longrightarrow> x xa \<le> (f x) xa) \<and> |
|
1400 |
(P x \<and> Q xa \<and> y = 1 \<longrightarrow> (f x) xa \<le> x xa)" |
|
1401 |
{ |
|
53688 | 1402 |
assume "P x" and "Q xa" |
1403 |
then have "0 \<le> f x xa \<and> f x xa \<le> 1" |
|
53185 | 1404 |
using assms(2)[rule_format,of "f x" xa] |
1405 |
apply (drule_tac assms(1)[rule_format]) |
|
1406 |
apply auto |
|
1407 |
done |
|
1408 |
} |
|
53688 | 1409 |
then have "?R 0 \<or> ?R 1" |
1410 |
by auto |
|
1411 |
then show ?case |
|
1412 |
by auto |
|
53185 | 1413 |
qed |
1414 |
qed |
|
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
1415 |
|
56117
2dbf84ee3deb
remove ordered_euclidean_space constraint from brouwer/derivative lemmas;
huffman
parents:
55522
diff
changeset
|
1416 |
definition unit_cube :: "'a::euclidean_space set" |
2dbf84ee3deb
remove ordered_euclidean_space constraint from brouwer/derivative lemmas;
huffman
parents:
55522
diff
changeset
|
1417 |
where "unit_cube = {x. \<forall>i\<in>Basis. 0 \<le> x \<bullet> i \<and> x \<bullet> i \<le> 1}" |
2dbf84ee3deb
remove ordered_euclidean_space constraint from brouwer/derivative lemmas;
huffman
parents:
55522
diff
changeset
|
1418 |
|
2dbf84ee3deb
remove ordered_euclidean_space constraint from brouwer/derivative lemmas;
huffman
parents:
55522
diff
changeset
|
1419 |
lemma mem_unit_cube: "x \<in> unit_cube \<longleftrightarrow> (\<forall>i\<in>Basis. 0 \<le> x \<bullet> i \<and> x \<bullet> i \<le> 1)" |
2dbf84ee3deb
remove ordered_euclidean_space constraint from brouwer/derivative lemmas;
huffman
parents:
55522
diff
changeset
|
1420 |
unfolding unit_cube_def by simp |
2dbf84ee3deb
remove ordered_euclidean_space constraint from brouwer/derivative lemmas;
huffman
parents:
55522
diff
changeset
|
1421 |
|
2dbf84ee3deb
remove ordered_euclidean_space constraint from brouwer/derivative lemmas;
huffman
parents:
55522
diff
changeset
|
1422 |
lemma bounded_unit_cube: "bounded unit_cube" |
2dbf84ee3deb
remove ordered_euclidean_space constraint from brouwer/derivative lemmas;
huffman
parents:
55522
diff
changeset
|
1423 |
unfolding bounded_def |
2dbf84ee3deb
remove ordered_euclidean_space constraint from brouwer/derivative lemmas;
huffman
parents:
55522
diff
changeset
|
1424 |
proof (intro exI ballI) |
2dbf84ee3deb
remove ordered_euclidean_space constraint from brouwer/derivative lemmas;
huffman
parents:
55522
diff
changeset
|
1425 |
fix y :: 'a assume y: "y \<in> unit_cube" |
2dbf84ee3deb
remove ordered_euclidean_space constraint from brouwer/derivative lemmas;
huffman
parents:
55522
diff
changeset
|
1426 |
have "dist 0 y = norm y" by (rule dist_0_norm) |
2dbf84ee3deb
remove ordered_euclidean_space constraint from brouwer/derivative lemmas;
huffman
parents:
55522
diff
changeset
|
1427 |
also have "\<dots> = norm (\<Sum>i\<in>Basis. (y \<bullet> i) *\<^sub>R i)" unfolding euclidean_representation .. |
2dbf84ee3deb
remove ordered_euclidean_space constraint from brouwer/derivative lemmas;
huffman
parents:
55522
diff
changeset
|
1428 |
also have "\<dots> \<le> (\<Sum>i\<in>Basis. norm ((y \<bullet> i) *\<^sub>R i))" by (rule norm_setsum) |
2dbf84ee3deb
remove ordered_euclidean_space constraint from brouwer/derivative lemmas;
huffman
parents:
55522
diff
changeset
|
1429 |
also have "\<dots> \<le> (\<Sum>i::'a\<in>Basis. 1)" |
2dbf84ee3deb
remove ordered_euclidean_space constraint from brouwer/derivative lemmas;
huffman
parents:
55522
diff
changeset
|
1430 |
by (rule setsum_mono, simp add: y [unfolded mem_unit_cube]) |
2dbf84ee3deb
remove ordered_euclidean_space constraint from brouwer/derivative lemmas;
huffman
parents:
55522
diff
changeset
|
1431 |
finally show "dist 0 y \<le> (\<Sum>i::'a\<in>Basis. 1)" . |
2dbf84ee3deb
remove ordered_euclidean_space constraint from brouwer/derivative lemmas;
huffman
parents:
55522
diff
changeset
|
1432 |
qed |
2dbf84ee3deb
remove ordered_euclidean_space constraint from brouwer/derivative lemmas;
huffman
parents:
55522
diff
changeset
|
1433 |
|
2dbf84ee3deb
remove ordered_euclidean_space constraint from brouwer/derivative lemmas;
huffman
parents:
55522
diff
changeset
|
1434 |
lemma closed_unit_cube: "closed unit_cube" |
2dbf84ee3deb
remove ordered_euclidean_space constraint from brouwer/derivative lemmas;
huffman
parents:
55522
diff
changeset
|
1435 |
unfolding unit_cube_def Collect_ball_eq Collect_conj_eq |
2dbf84ee3deb
remove ordered_euclidean_space constraint from brouwer/derivative lemmas;
huffman
parents:
55522
diff
changeset
|
1436 |
by (rule closed_INT, auto intro!: closed_Collect_le) |
2dbf84ee3deb
remove ordered_euclidean_space constraint from brouwer/derivative lemmas;
huffman
parents:
55522
diff
changeset
|
1437 |
|
2dbf84ee3deb
remove ordered_euclidean_space constraint from brouwer/derivative lemmas;
huffman
parents:
55522
diff
changeset
|
1438 |
lemma compact_unit_cube: "compact unit_cube" (is "compact ?C") |
2dbf84ee3deb
remove ordered_euclidean_space constraint from brouwer/derivative lemmas;
huffman
parents:
55522
diff
changeset
|
1439 |
unfolding compact_eq_seq_compact_metric |
2dbf84ee3deb
remove ordered_euclidean_space constraint from brouwer/derivative lemmas;
huffman
parents:
55522
diff
changeset
|
1440 |
using bounded_unit_cube closed_unit_cube |
2dbf84ee3deb
remove ordered_euclidean_space constraint from brouwer/derivative lemmas;
huffman
parents:
55522
diff
changeset
|
1441 |
by (rule bounded_closed_imp_seq_compact) |
2dbf84ee3deb
remove ordered_euclidean_space constraint from brouwer/derivative lemmas;
huffman
parents:
55522
diff
changeset
|
1442 |
|
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
|
1443 |
lemma brouwer_cube: |
56117
2dbf84ee3deb
remove ordered_euclidean_space constraint from brouwer/derivative lemmas;
huffman
parents:
55522
diff
changeset
|
1444 |
fixes f :: "'a::euclidean_space \<Rightarrow> 'a" |
2dbf84ee3deb
remove ordered_euclidean_space constraint from brouwer/derivative lemmas;
huffman
parents:
55522
diff
changeset
|
1445 |
assumes "continuous_on unit_cube f" |
2dbf84ee3deb
remove ordered_euclidean_space constraint from brouwer/derivative lemmas;
huffman
parents:
55522
diff
changeset
|
1446 |
and "f ` unit_cube \<subseteq> unit_cube" |
2dbf84ee3deb
remove ordered_euclidean_space constraint from brouwer/derivative lemmas;
huffman
parents:
55522
diff
changeset
|
1447 |
shows "\<exists>x\<in>unit_cube. f x = x" |
53185 | 1448 |
proof (rule ccontr) |
1449 |
def n \<equiv> "DIM('a)" |
|
1450 |
have n: "1 \<le> n" "0 < n" "n \<noteq> 0" |
|
1451 |
unfolding n_def by (auto simp add: Suc_le_eq DIM_positive) |
|
53674 | 1452 |
assume "\<not> ?thesis" |
56117
2dbf84ee3deb
remove ordered_euclidean_space constraint from brouwer/derivative lemmas;
huffman
parents:
55522
diff
changeset
|
1453 |
then have *: "\<not> (\<exists>x\<in>unit_cube. f x - x = 0)" |
53674 | 1454 |
by auto |
55522 | 1455 |
obtain d where |
56117
2dbf84ee3deb
remove ordered_euclidean_space constraint from brouwer/derivative lemmas;
huffman
parents:
55522
diff
changeset
|
1456 |
d: "d > 0" "\<And>x. x \<in> unit_cube \<Longrightarrow> d \<le> norm (f x - x)" |
2dbf84ee3deb
remove ordered_euclidean_space constraint from brouwer/derivative lemmas;
huffman
parents:
55522
diff
changeset
|
1457 |
apply (rule brouwer_compactness_lemma[OF compact_unit_cube _ *]) |
56371
fb9ae0727548
extend continuous_intros; remove continuous_on_intros and isCont_intros
hoelzl
parents:
56273
diff
changeset
|
1458 |
apply (rule continuous_intros assms)+ |
55522 | 1459 |
apply blast |
53185 | 1460 |
done |
56117
2dbf84ee3deb
remove ordered_euclidean_space constraint from brouwer/derivative lemmas;
huffman
parents:
55522
diff
changeset
|
1461 |
have *: "\<forall>x. x \<in> unit_cube \<longrightarrow> f x \<in> unit_cube" |
2dbf84ee3deb
remove ordered_euclidean_space constraint from brouwer/derivative lemmas;
huffman
parents:
55522
diff
changeset
|
1462 |
"\<forall>x. x \<in> (unit_cube::'a set) \<longrightarrow> (\<forall>i\<in>Basis. True \<longrightarrow> 0 \<le> x \<bullet> i \<and> x \<bullet> i \<le> 1)" |
53185 | 1463 |
using assms(2)[unfolded image_subset_iff Ball_def] |
56117
2dbf84ee3deb
remove ordered_euclidean_space constraint from brouwer/derivative lemmas;
huffman
parents:
55522
diff
changeset
|
1464 |
unfolding mem_unit_cube |
55522 | 1465 |
by auto |
1466 |
obtain label :: "'a \<Rightarrow> 'a \<Rightarrow> nat" where |
|
1467 |
"\<forall>x. \<forall>i\<in>Basis. label x i \<le> 1" |
|
56117
2dbf84ee3deb
remove ordered_euclidean_space constraint from brouwer/derivative lemmas;
huffman
parents:
55522
diff
changeset
|
1468 |
"\<forall>x. \<forall>i\<in>Basis. x \<in> unit_cube \<and> True \<and> x \<bullet> i = 0 \<longrightarrow> label x i = 0" |
2dbf84ee3deb
remove ordered_euclidean_space constraint from brouwer/derivative lemmas;
huffman
parents:
55522
diff
changeset
|
1469 |
"\<forall>x. \<forall>i\<in>Basis. x \<in> unit_cube \<and> True \<and> x \<bullet> i = 1 \<longrightarrow> label x i = 1" |
2dbf84ee3deb
remove ordered_euclidean_space constraint from brouwer/derivative lemmas;
huffman
parents:
55522
diff
changeset
|
1470 |
"\<forall>x. \<forall>i\<in>Basis. x \<in> unit_cube \<and> True \<and> label x i = 0 \<longrightarrow> x \<bullet> i \<le> f x \<bullet> i" |
2dbf84ee3deb
remove ordered_euclidean_space constraint from brouwer/derivative lemmas;
huffman
parents:
55522
diff
changeset
|
1471 |
"\<forall>x. \<forall>i\<in>Basis. x \<in> unit_cube \<and> True \<and> label x i = 1 \<longrightarrow> f x \<bullet> i \<le> x \<bullet> i" |
55522 | 1472 |
using kuhn_labelling_lemma[OF *] by blast |
53185 | 1473 |
note label = this [rule_format] |
56117
2dbf84ee3deb
remove ordered_euclidean_space constraint from brouwer/derivative lemmas;
huffman
parents:
55522
diff
changeset
|
1474 |
have lem1: "\<forall>x\<in>unit_cube. \<forall>y\<in>unit_cube. \<forall>i\<in>Basis. label x i \<noteq> label y i \<longrightarrow> |
53674 | 1475 |
abs (f x \<bullet> i - x \<bullet> i) \<le> norm (f y - f x) + norm (y - x)" |
53185 | 1476 |
proof safe |
1477 |
fix x y :: 'a |
|
56117
2dbf84ee3deb
remove ordered_euclidean_space constraint from brouwer/derivative lemmas;
huffman
parents:
55522
diff
changeset
|
1478 |
assume x: "x \<in> unit_cube" |
2dbf84ee3deb
remove ordered_euclidean_space constraint from brouwer/derivative lemmas;
huffman
parents:
55522
diff
changeset
|
1479 |
assume y: "y \<in> unit_cube" |
53185 | 1480 |
fix i |
1481 |
assume i: "label x i \<noteq> label y i" "i \<in> Basis" |
|
1482 |
have *: "\<And>x y fx fy :: real. x \<le> fx \<and> fy \<le> y \<or> fx \<le> x \<and> y \<le> fy \<Longrightarrow> |
|
1483 |
abs (fx - x) \<le> abs (fy - fx) + abs (y - x)" by auto |
|
53688 | 1484 |
have "\<bar>(f x - x) \<bullet> i\<bar> \<le> abs ((f y - f x)\<bullet>i) + abs ((y - x)\<bullet>i)" |
50526
899c9c4e4a4c
Remove the indexed basis from the definition of euclidean spaces and only use the set of Basis vectors
hoelzl
parents:
50514
diff
changeset
|
1485 |
unfolding inner_simps |
53185 | 1486 |
apply (rule *) |
1487 |
apply (cases "label x i = 0") |
|
53688 | 1488 |
apply (rule disjI1) |
1489 |
apply rule |
|
53185 | 1490 |
prefer 3 |
53688 | 1491 |
apply (rule disjI2) |
1492 |
apply rule |
|
1493 |
proof - |
|
53185 | 1494 |
assume lx: "label x i = 0" |
53674 | 1495 |
then have ly: "label y i = 1" |
53688 | 1496 |
using i label(1)[of i y] |
1497 |
by auto |
|
53185 | 1498 |
show "x \<bullet> i \<le> f x \<bullet> i" |
1499 |
apply (rule label(4)[rule_format]) |
|
53674 | 1500 |
using x y lx i(2) |
53252 | 1501 |
apply auto |
53185 | 1502 |
done |
1503 |
show "f y \<bullet> i \<le> y \<bullet> i" |
|
1504 |
apply (rule label(5)[rule_format]) |
|
53674 | 1505 |
using x y ly i(2) |
53252 | 1506 |
apply auto |
53185 | 1507 |
done |
1508 |
next |
|
1509 |
assume "label x i \<noteq> 0" |
|
53688 | 1510 |
then have l: "label x i = 1" "label y i = 0" |
1511 |
using i label(1)[of i x] label(1)[of i y] |
|
1512 |
by auto |
|
53185 | 1513 |
show "f x \<bullet> i \<le> x \<bullet> i" |
1514 |
apply (rule label(5)[rule_format]) |
|
53674 | 1515 |
using x y l i(2) |
53252 | 1516 |
apply auto |
53185 | 1517 |
done |
1518 |
show "y \<bullet> i \<le> f y \<bullet> i" |
|
1519 |
apply (rule label(4)[rule_format]) |
|
53674 | 1520 |
using x y l i(2) |
53252 | 1521 |
apply auto |
53185 | 1522 |
done |
1523 |
qed |
|
1524 |
also have "\<dots> \<le> norm (f y - f x) + norm (y - x)" |
|
1525 |
apply (rule add_mono) |
|
1526 |
apply (rule Basis_le_norm[OF i(2)])+ |
|
1527 |
done |
|
1528 |
finally show "\<bar>f x \<bullet> i - x \<bullet> i\<bar> \<le> norm (f y - f x) + norm (y - x)" |
|
1529 |
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
|
1530 |
qed |
56117
2dbf84ee3deb
remove ordered_euclidean_space constraint from brouwer/derivative lemmas;
huffman
parents:
55522
diff
changeset
|
1531 |
have "\<exists>e>0. \<forall>x\<in>unit_cube. \<forall>y\<in>unit_cube. \<forall>z\<in>unit_cube. \<forall>i\<in>Basis. |
53688 | 1532 |
norm (x - z) < e \<and> norm (y - z) < e \<and> label x i \<noteq> label y i \<longrightarrow> |
1533 |
abs ((f(z) - z)\<bullet>i) < d / (real n)" |
|
53185 | 1534 |
proof - |
53688 | 1535 |
have d': "d / real n / 8 > 0" |
56541 | 1536 |
using d(1) by (simp add: n_def DIM_positive) |
56117
2dbf84ee3deb
remove ordered_euclidean_space constraint from brouwer/derivative lemmas;
huffman
parents:
55522
diff
changeset
|
1537 |
have *: "uniformly_continuous_on unit_cube f" |
2dbf84ee3deb
remove ordered_euclidean_space constraint from brouwer/derivative lemmas;
huffman
parents:
55522
diff
changeset
|
1538 |
by (rule compact_uniformly_continuous[OF assms(1) compact_unit_cube]) |
55522 | 1539 |
obtain e where e: |
1540 |
"e > 0" |
|
56117
2dbf84ee3deb
remove ordered_euclidean_space constraint from brouwer/derivative lemmas;
huffman
parents:
55522
diff
changeset
|
1541 |
"\<And>x x'. x \<in> unit_cube \<Longrightarrow> |
2dbf84ee3deb
remove ordered_euclidean_space constraint from brouwer/derivative lemmas;
huffman
parents:
55522
diff
changeset
|
1542 |
x' \<in> unit_cube \<Longrightarrow> |
55522 | 1543 |
norm (x' - x) < e \<Longrightarrow> |
1544 |
norm (f x' - f x) < d / real n / 8" |
|
1545 |
using *[unfolded uniformly_continuous_on_def,rule_format,OF d'] |
|
1546 |
unfolding dist_norm |
|
1547 |
by blast |
|
53185 | 1548 |
show ?thesis |
1549 |
apply (rule_tac x="min (e/2) (d/real n/8)" in exI) |
|
53248 | 1550 |
apply safe |
1551 |
proof - |
|
53185 | 1552 |
show "0 < min (e / 2) (d / real n / 8)" |
1553 |
using d' e by auto |
|
1554 |
fix x y z i |
|
53688 | 1555 |
assume as: |
56117
2dbf84ee3deb
remove ordered_euclidean_space constraint from brouwer/derivative lemmas;
huffman
parents:
55522
diff
changeset
|
1556 |
"x \<in> unit_cube" "y \<in> unit_cube" "z \<in> unit_cube" |
37489
44e42d392c6e
Introduce a type class for euclidean spaces, port most lemmas from real^'n to this type class.
hoelzl
parents:
36587
diff
changeset
|
1557 |
"norm (x - z) < min (e / 2) (d / real n / 8)" |
53688 | 1558 |
"norm (y - z) < min (e / 2) (d / real n / 8)" |
1559 |
"label x i \<noteq> label y i" |
|
1560 |
assume i: "i \<in> Basis" |
|
53185 | 1561 |
have *: "\<And>z fz x fx n1 n2 n3 n4 d4 d :: real. abs(fx - x) \<le> n1 + n2 \<Longrightarrow> |
53688 | 1562 |
abs (fx - fz) \<le> n3 \<Longrightarrow> abs (x - z) \<le> n4 \<Longrightarrow> |
53185 | 1563 |
n1 < d4 \<Longrightarrow> n2 < 2 * d4 \<Longrightarrow> n3 < d4 \<Longrightarrow> n4 < d4 \<Longrightarrow> |
53688 | 1564 |
(8 * d4 = d) \<Longrightarrow> abs(fz - z) < d" |
1565 |
by auto |
|
1566 |
show "\<bar>(f z - z) \<bullet> i\<bar> < d / real n" |
|
1567 |
unfolding inner_simps |
|
53185 | 1568 |
proof (rule *) |
1569 |
show "\<bar>f x \<bullet> i - x \<bullet> i\<bar> \<le> norm (f y -f x) + norm (y - x)" |
|
1570 |
apply (rule lem1[rule_format]) |
|
53688 | 1571 |
using as i |
1572 |
apply auto |
|
53185 | 1573 |
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
|
1574 |
show "\<bar>f x \<bullet> i - f z \<bullet> i\<bar> \<le> norm (f x - f z)" "\<bar>x \<bullet> i - z \<bullet> i\<bar> \<le> norm (x - z)" |
55522 | 1575 |
unfolding inner_diff_left[symmetric] |
53688 | 1576 |
by (rule Basis_le_norm[OF i])+ |
1577 |
have tria: "norm (y - x) \<le> norm (y - z) + norm (x - z)" |
|
53185 | 1578 |
using dist_triangle[of y x z, unfolded dist_norm] |
53688 | 1579 |
unfolding norm_minus_commute |
1580 |
by auto |
|
53185 | 1581 |
also have "\<dots> < e / 2 + e / 2" |
1582 |
apply (rule add_strict_mono) |
|
53252 | 1583 |
using as(4,5) |
1584 |
apply auto |
|
53185 | 1585 |
done |
1586 |
finally show "norm (f y - f x) < d / real n / 8" |
|
1587 |
apply - |
|
1588 |
apply (rule e(2)) |
|
53252 | 1589 |
using as |
1590 |
apply auto |
|
53185 | 1591 |
done |
1592 |
have "norm (y - z) + norm (x - z) < d / real n / 8 + d / real n / 8" |
|
1593 |
apply (rule add_strict_mono) |
|
53252 | 1594 |
using as |
1595 |
apply auto |
|
53185 | 1596 |
done |
53688 | 1597 |
then show "norm (y - x) < 2 * (d / real n / 8)" |
1598 |
using tria |
|
1599 |
by auto |
|
53185 | 1600 |
show "norm (f x - f z) < d / real n / 8" |
1601 |
apply (rule e(2)) |
|
53252 | 1602 |
using as e(1) |
1603 |
apply auto |
|
53185 | 1604 |
done |
1605 |
qed (insert as, auto) |
|
1606 |
qed |
|
1607 |
qed |
|
55522 | 1608 |
then |
1609 |
obtain e where e: |
|
1610 |
"e > 0" |
|
56117
2dbf84ee3deb
remove ordered_euclidean_space constraint from brouwer/derivative lemmas;
huffman
parents:
55522
diff
changeset
|
1611 |
"\<And>x y z i. x \<in> unit_cube \<Longrightarrow> |
2dbf84ee3deb
remove ordered_euclidean_space constraint from brouwer/derivative lemmas;
huffman
parents:
55522
diff
changeset
|
1612 |
y \<in> unit_cube \<Longrightarrow> |
2dbf84ee3deb
remove ordered_euclidean_space constraint from brouwer/derivative lemmas;
huffman
parents:
55522
diff
changeset
|
1613 |
z \<in> unit_cube \<Longrightarrow> |
55522 | 1614 |
i \<in> Basis \<Longrightarrow> |
1615 |
norm (x - z) < e \<and> norm (y - z) < e \<and> label x i \<noteq> label y i \<Longrightarrow> |
|
1616 |
\<bar>(f z - z) \<bullet> i\<bar> < d / real n" |
|
1617 |
by blast |
|
1618 |
obtain p :: nat where p: "1 + real n / e \<le> real p" |
|
1619 |
using real_arch_simple .. |
|
53185 | 1620 |
have "1 + real n / e > 0" |
56541 | 1621 |
using e(1) n by (simp add: add_pos_pos) |
53688 | 1622 |
then have "p > 0" |
1623 |
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
|
1624 |
|
56273
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1625 |
obtain b :: "nat \<Rightarrow> 'a" where b: "bij_betw b {..< n} Basis" |
50526
899c9c4e4a4c
Remove the indexed basis from the definition of euclidean spaces and only use the set of Basis vectors
hoelzl
parents:
50514
diff
changeset
|
1626 |
by atomize_elim (auto simp: n_def intro!: finite_same_card_bij) |
56273
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1627 |
def b' \<equiv> "inv_into {..< n} b" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1628 |
then have b': "bij_betw b' Basis {..< n}" |
50526
899c9c4e4a4c
Remove the indexed basis from the definition of euclidean spaces and only use the set of Basis vectors
hoelzl
parents:
50514
diff
changeset
|
1629 |
using bij_betw_inv_into[OF b] by auto |
56273
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1630 |
then have b'_Basis: "\<And>i. i \<in> Basis \<Longrightarrow> b' i \<in> {..< n}" |
50526
899c9c4e4a4c
Remove the indexed basis from the definition of euclidean spaces and only use the set of Basis vectors
hoelzl
parents:
50514
diff
changeset
|
1631 |
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
|
1632 |
have bb'[simp]:"\<And>i. i \<in> Basis \<Longrightarrow> b (b' i) = i" |
53688 | 1633 |
unfolding b'_def |
1634 |
using b |
|
1635 |
by (auto simp: f_inv_into_f bij_betw_def) |
|
56273
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1636 |
have b'b[simp]:"\<And>i. i < n \<Longrightarrow> b' (b i) = i" |
53688 | 1637 |
unfolding b'_def |
1638 |
using b |
|
1639 |
by (auto simp: inv_into_f_eq bij_betw_def) |
|
1640 |
have *: "\<And>x :: nat. x = 0 \<or> x = 1 \<longleftrightarrow> x \<le> 1" |
|
1641 |
by auto |
|
56273
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1642 |
have b'': "\<And>j. j < n \<Longrightarrow> b j \<in> Basis" |
53185 | 1643 |
using b unfolding bij_betw_def by auto |
56273
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1644 |
have q1: "0 < p" "\<forall>x. (\<forall>i<n. x i \<le> p) \<longrightarrow> |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1645 |
(\<forall>i<n. (label (\<Sum>i\<in>Basis. (real (x (b' i)) / real p) *\<^sub>R i) \<circ> b) i = 0 \<or> |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1646 |
(label (\<Sum>i\<in>Basis. (real (x (b' i)) / real p) *\<^sub>R i) \<circ> b) i = 1)" |
53688 | 1647 |
unfolding * |
1648 |
using `p > 0` `n > 0` |
|
1649 |
using label(1)[OF b''] |
|
1650 |
by auto |
|
56273
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1651 |
{ fix x :: "nat \<Rightarrow> nat" and i assume "\<forall>i<n. x i \<le> p" "i < n" "x i = p \<or> x i = 0" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1652 |
then have "(\<Sum>i\<in>Basis. (real (x (b' i)) / real p) *\<^sub>R i) \<in> (unit_cube::'a set)" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1653 |
using b'_Basis |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1654 |
by (auto simp add: mem_unit_cube inner_simps bij_betw_def zero_le_divide_iff divide_le_eq_1) } |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1655 |
note cube = this |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1656 |
have q2: "\<forall>x. (\<forall>i<n. x i \<le> p) \<longrightarrow> (\<forall>i<n. x i = 0 \<longrightarrow> |
50526
899c9c4e4a4c
Remove the indexed basis from the definition of euclidean spaces and only use the set of Basis vectors
hoelzl
parents:
50514
diff
changeset
|
1657 |
(label (\<Sum>i\<in>Basis. (real (x (b' i)) / real p) *\<^sub>R i) \<circ> b) i = 0)" |
56273
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1658 |
unfolding o_def using cube `p > 0` by (intro allI impI label(2)) (auto simp add: b'') |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1659 |
have q3: "\<forall>x. (\<forall>i<n. x i \<le> p) \<longrightarrow> (\<forall>i<n. x i = p \<longrightarrow> |
50526
899c9c4e4a4c
Remove the indexed basis from the definition of euclidean spaces and only use the set of Basis vectors
hoelzl
parents:
50514
diff
changeset
|
1660 |
(label (\<Sum>i\<in>Basis. (real (x (b' i)) / real p) *\<^sub>R i) \<circ> b) i = 1)" |
56273
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1661 |
using cube `p > 0` unfolding o_def by (intro allI impI label(3)) (auto simp add: b'') |
55522 | 1662 |
obtain q where q: |
56273
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1663 |
"\<forall>i<n. q i < p" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1664 |
"\<forall>i<n. |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1665 |
\<exists>r s. (\<forall>j<n. q j \<le> r j \<and> r j \<le> q j + 1) \<and> |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1666 |
(\<forall>j<n. q j \<le> s j \<and> s j \<le> q j + 1) \<and> |
55522 | 1667 |
(label (\<Sum>i\<in>Basis. (real (r (b' i)) / real p) *\<^sub>R i) \<circ> b) i \<noteq> |
1668 |
(label (\<Sum>i\<in>Basis. (real (s (b' i)) / real p) *\<^sub>R i) \<circ> b) i" |
|
56273
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1669 |
by (rule kuhn_lemma[OF q1 q2 q3]) |
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
|
1670 |
def z \<equiv> "(\<Sum>i\<in>Basis. (real (q (b' i)) / real p) *\<^sub>R i)::'a" |
53688 | 1671 |
have "\<exists>i\<in>Basis. d / real n \<le> abs ((f z - z)\<bullet>i)" |
53185 | 1672 |
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
|
1673 |
have "\<forall>i\<in>Basis. q (b' i) \<in> {0..p}" |
53688 | 1674 |
using q(1) b' |
1675 |
by (auto intro: less_imp_le simp: bij_betw_def) |
|
56117
2dbf84ee3deb
remove ordered_euclidean_space constraint from brouwer/derivative lemmas;
huffman
parents:
55522
diff
changeset
|
1676 |
then have "z \<in> unit_cube" |
2dbf84ee3deb
remove ordered_euclidean_space constraint from brouwer/derivative lemmas;
huffman
parents:
55522
diff
changeset
|
1677 |
unfolding z_def mem_unit_cube |
53688 | 1678 |
using b'_Basis |
56273
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1679 |
by (auto simp add: bij_betw_def zero_le_divide_iff divide_le_eq_1) |
53688 | 1680 |
then have d_fz_z: "d \<le> norm (f z - z)" |
1681 |
by (rule d) |
|
1682 |
assume "\<not> ?thesis" |
|
53674 | 1683 |
then have as: "\<forall>i\<in>Basis. \<bar>f z \<bullet> i - z \<bullet> i\<bar> < d / real n" |
53688 | 1684 |
using `n > 0` |
56273
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1685 |
by (auto simp add: not_le inner_diff) |
50526
899c9c4e4a4c
Remove the indexed basis from the definition of euclidean spaces and only use the set of Basis vectors
hoelzl
parents:
50514
diff
changeset
|
1686 |
have "norm (f z - z) \<le> (\<Sum>i\<in>Basis. \<bar>f z \<bullet> i - z \<bullet> i\<bar>)" |
53688 | 1687 |
unfolding inner_diff_left[symmetric] |
1688 |
by (rule norm_le_l1) |
|
53185 | 1689 |
also have "\<dots> < (\<Sum>(i::'a) \<in> Basis. d / real n)" |
1690 |
apply (rule setsum_strict_mono) |
|
53688 | 1691 |
using as |
1692 |
apply auto |
|
53185 | 1693 |
done |
1694 |
also have "\<dots> = d" |
|
53688 | 1695 |
using DIM_positive[where 'a='a] |
1696 |
by (auto simp: real_eq_of_nat n_def) |
|
1697 |
finally show False |
|
1698 |
using d_fz_z by auto |
|
53185 | 1699 |
qed |
55522 | 1700 |
then obtain i where i: "i \<in> Basis" "d / real n \<le> \<bar>(f z - z) \<bullet> i\<bar>" .. |
56273
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1701 |
have *: "b' i < n" |
55522 | 1702 |
using i and b'[unfolded bij_betw_def] |
53688 | 1703 |
by auto |
55522 | 1704 |
obtain r s where rs: |
56273
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1705 |
"\<And>j. j < n \<Longrightarrow> q j \<le> r j \<and> r j \<le> q j + 1" |
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1706 |
"\<And>j. j < n \<Longrightarrow> q j \<le> s j \<and> s j \<le> q j + 1" |
55522 | 1707 |
"(label (\<Sum>i\<in>Basis. (real (r (b' i)) / real p) *\<^sub>R i) \<circ> b) (b' i) \<noteq> |
1708 |
(label (\<Sum>i\<in>Basis. (real (s (b' i)) / real p) *\<^sub>R i) \<circ> b) (b' i)" |
|
1709 |
using q(2)[rule_format,OF *] by blast |
|
56273
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1710 |
have b'_im: "\<And>i. i \<in> Basis \<Longrightarrow> b' i < n" |
53185 | 1711 |
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
|
1712 |
def r' \<equiv> "(\<Sum>i\<in>Basis. (real (r (b' i)) / real p) *\<^sub>R i)::'a" |
53185 | 1713 |
have "\<And>i. i \<in> Basis \<Longrightarrow> r (b' i) \<le> p" |
1714 |
apply (rule order_trans) |
|
1715 |
apply (rule rs(1)[OF b'_im,THEN conjunct2]) |
|
53252 | 1716 |
using q(1)[rule_format,OF b'_im] |
1717 |
apply (auto simp add: Suc_le_eq) |
|
53185 | 1718 |
done |
56117
2dbf84ee3deb
remove ordered_euclidean_space constraint from brouwer/derivative lemmas;
huffman
parents:
55522
diff
changeset
|
1719 |
then have "r' \<in> unit_cube" |
2dbf84ee3deb
remove ordered_euclidean_space constraint from brouwer/derivative lemmas;
huffman
parents:
55522
diff
changeset
|
1720 |
unfolding r'_def mem_unit_cube |
53688 | 1721 |
using b'_Basis |
56273
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1722 |
by (auto simp add: bij_betw_def zero_le_divide_iff divide_le_eq_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
|
1723 |
def s' \<equiv> "(\<Sum>i\<in>Basis. (real (s (b' i)) / real p) *\<^sub>R i)::'a" |
53688 | 1724 |
have "\<And>i. i \<in> Basis \<Longrightarrow> s (b' i) \<le> p" |
53185 | 1725 |
apply (rule order_trans) |
1726 |
apply (rule rs(2)[OF b'_im, THEN conjunct2]) |
|
53252 | 1727 |
using q(1)[rule_format,OF b'_im] |
1728 |
apply (auto simp add: Suc_le_eq) |
|
53185 | 1729 |
done |
56117
2dbf84ee3deb
remove ordered_euclidean_space constraint from brouwer/derivative lemmas;
huffman
parents:
55522
diff
changeset
|
1730 |
then have "s' \<in> unit_cube" |
2dbf84ee3deb
remove ordered_euclidean_space constraint from brouwer/derivative lemmas;
huffman
parents:
55522
diff
changeset
|
1731 |
unfolding s'_def mem_unit_cube |
53688 | 1732 |
using b'_Basis |
56273
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1733 |
by (auto simp add: bij_betw_def zero_le_divide_iff divide_le_eq_1) |
56117
2dbf84ee3deb
remove ordered_euclidean_space constraint from brouwer/derivative lemmas;
huffman
parents:
55522
diff
changeset
|
1734 |
have "z \<in> unit_cube" |
2dbf84ee3deb
remove ordered_euclidean_space constraint from brouwer/derivative lemmas;
huffman
parents:
55522
diff
changeset
|
1735 |
unfolding z_def mem_unit_cube |
53688 | 1736 |
using b'_Basis q(1)[rule_format,OF b'_im] `p > 0` |
56273
def3bbe6f2a5
cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents:
56226
diff
changeset
|
1737 |
by (auto simp add: bij_betw_def zero_le_divide_iff divide_le_eq_1 less_imp_le) |
53688 | 1738 |
have *: "\<And>x. 1 + real x = real (Suc x)" |
1739 |
by auto |
|
1740 |
{ |
|
1741 |
have "(\<Sum>i\<in>Basis. \<bar>real (r (b' i)) - real (q (b' i))\<bar>) \<le> (\<Sum>(i::'a)\<in>Basis. 1)" |
|
53185 | 1742 |
apply (rule setsum_mono) |
53252 | 1743 |
using rs(1)[OF b'_im] |
1744 |
apply (auto simp add:* field_simps) |
|
53185 | 1745 |
done |
53688 | 1746 |
also have "\<dots> < e * real p" |
1747 |
using p `e > 0` `p > 0` |
|
53185 | 1748 |
by (auto simp add: field_simps n_def real_of_nat_def) |
1749 |
finally have "(\<Sum>i\<in>Basis. \<bar>real (r (b' i)) - real (q (b' i))\<bar>) < e * real p" . |
|
1750 |
} |
|
1751 |
moreover |
|
53688 | 1752 |
{ |
1753 |
have "(\<Sum>i\<in>Basis. \<bar>real (s (b' i)) - real (q (b' i))\<bar>) \<le> (\<Sum>(i::'a)\<in>Basis. 1)" |
|
53185 | 1754 |
apply (rule setsum_mono) |
53252 | 1755 |
using rs(2)[OF b'_im] |
1756 |
apply (auto simp add:* field_simps) |
|
53185 | 1757 |
done |
53688 | 1758 |
also have "\<dots> < e * real p" |
1759 |
using p `e > 0` `p > 0` |
|
53185 | 1760 |
by (auto simp add: field_simps n_def real_of_nat_def) |
1761 |
finally have "(\<Sum>i\<in>Basis. \<bar>real (s (b' i)) - real (q (b' i))\<bar>) < e * real p" . |
|
1762 |
} |
|
1763 |
ultimately |
|
53688 | 1764 |
have "norm (r' - z) < e" and "norm (s' - z) < e" |
53185 | 1765 |
unfolding r'_def s'_def z_def |
53688 | 1766 |
using `p > 0` |
53185 | 1767 |
apply (rule_tac[!] le_less_trans[OF norm_le_l1]) |
1768 |
apply (auto simp add: field_simps setsum_divide_distrib[symmetric] inner_diff_left) |
|
1769 |
done |
|
53674 | 1770 |
then have "\<bar>(f z - z) \<bullet> i\<bar> < d / real n" |
53688 | 1771 |
using rs(3) i |
1772 |
unfolding r'_def[symmetric] s'_def[symmetric] o_def bb' |
|
56117
2dbf84ee3deb
remove ordered_euclidean_space constraint from brouwer/derivative lemmas;
huffman
parents:
55522
diff
changeset
|
1773 |
by (intro e(2)[OF `r'\<in>unit_cube` `s'\<in>unit_cube` `z\<in>unit_cube`]) auto |
53688 | 1774 |
then show False |
1775 |
using i by auto |
|
50526
899c9c4e4a4c
Remove the indexed basis from the definition of euclidean spaces and only use the set of Basis vectors
hoelzl
parents:
50514
diff
changeset
|
1776 |
qed |
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
1777 |
|
53185 | 1778 |
|
53688 | 1779 |
subsection {* Retractions *} |
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
1780 |
|
53688 | 1781 |
definition "retraction s t r \<longleftrightarrow> t \<subseteq> s \<and> continuous_on s r \<and> r ` s \<subseteq> t \<and> (\<forall>x\<in>t. r x = x)" |
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
1782 |
|
53185 | 1783 |
definition retract_of (infixl "retract'_of" 12) |
1784 |
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
|
1785 |
|
53674 | 1786 |
lemma retraction_idempotent: "retraction s t r \<Longrightarrow> x \<in> s \<Longrightarrow> r (r x) = r x" |
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
1787 |
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
|
1788 |
|
53688 | 1789 |
subsection {* Preservation of fixpoints under (more general notion of) retraction *} |
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
1790 |
|
53185 | 1791 |
lemma invertible_fixpoint_property: |
53674 | 1792 |
fixes s :: "'a::euclidean_space set" |
1793 |
and t :: "'b::euclidean_space set" |
|
1794 |
assumes "continuous_on t i" |
|
1795 |
and "i ` t \<subseteq> s" |
|
53688 | 1796 |
and "continuous_on s r" |
1797 |
and "r ` s \<subseteq> t" |
|
53674 | 1798 |
and "\<forall>y\<in>t. r (i y) = y" |
1799 |
and "\<forall>f. continuous_on s f \<and> f ` s \<subseteq> s \<longrightarrow> (\<exists>x\<in>s. f x = x)" |
|
1800 |
and "continuous_on t g" |
|
1801 |
and "g ` t \<subseteq> t" |
|
1802 |
obtains y where "y \<in> t" and "g y = y" |
|
53185 | 1803 |
proof - |
1804 |
have "\<exists>x\<in>s. (i \<circ> g \<circ> r) x = x" |
|
53688 | 1805 |
apply (rule assms(6)[rule_format]) |
1806 |
apply rule |
|
53185 | 1807 |
apply (rule continuous_on_compose assms)+ |
53688 | 1808 |
apply ((rule continuous_on_subset)?, rule assms)+ |
1809 |
using assms(2,4,8) |
|
53185 | 1810 |
apply auto |
1811 |
apply blast |
|
1812 |
done |
|
55522 | 1813 |
then obtain x where x: "x \<in> s" "(i \<circ> g \<circ> r) x = x" .. |
53674 | 1814 |
then have *: "g (r x) \<in> t" |
1815 |
using assms(4,8) by auto |
|
1816 |
have "r ((i \<circ> g \<circ> r) x) = r x" |
|
1817 |
using x by auto |
|
1818 |
then show ?thesis |
|
53185 | 1819 |
apply (rule_tac that[of "r x"]) |
53674 | 1820 |
using x |
1821 |
unfolding o_def |
|
1822 |
unfolding assms(5)[rule_format,OF *] |
|
1823 |
using assms(4) |
|
53185 | 1824 |
apply auto |
1825 |
done |
|
1826 |
qed |
|
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
1827 |
|
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
1828 |
lemma homeomorphic_fixpoint_property: |
53674 | 1829 |
fixes s :: "'a::euclidean_space set" |
1830 |
and t :: "'b::euclidean_space set" |
|
53185 | 1831 |
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
|
1832 |
shows "(\<forall>f. continuous_on s f \<and> f ` s \<subseteq> s \<longrightarrow> (\<exists>x\<in>s. f x = x)) \<longleftrightarrow> |
53248 | 1833 |
(\<forall>g. continuous_on t g \<and> g ` t \<subseteq> t \<longrightarrow> (\<exists>y\<in>t. g y = y))" |
53185 | 1834 |
proof - |
55522 | 1835 |
obtain r i where |
1836 |
"\<forall>x\<in>s. i (r x) = x" |
|
1837 |
"r ` s = t" |
|
1838 |
"continuous_on s r" |
|
1839 |
"\<forall>y\<in>t. r (i y) = y" |
|
1840 |
"i ` t = s" |
|
1841 |
"continuous_on t i" |
|
1842 |
using assms |
|
1843 |
unfolding homeomorphic_def homeomorphism_def |
|
1844 |
by blast |
|
53674 | 1845 |
then show ?thesis |
53185 | 1846 |
apply - |
1847 |
apply rule |
|
1848 |
apply (rule_tac[!] allI impI)+ |
|
1849 |
apply (rule_tac g=g in invertible_fixpoint_property[of t i s r]) |
|
1850 |
prefer 10 |
|
1851 |
apply (rule_tac g=f in invertible_fixpoint_property[of s r t i]) |
|
1852 |
apply auto |
|
1853 |
done |
|
1854 |
qed |
|
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
1855 |
|
53185 | 1856 |
lemma retract_fixpoint_property: |
53688 | 1857 |
fixes f :: "'a::euclidean_space \<Rightarrow> 'b::euclidean_space" |
53674 | 1858 |
and s :: "'a set" |
53185 | 1859 |
assumes "t retract_of s" |
53674 | 1860 |
and "\<forall>f. continuous_on s f \<and> f ` s \<subseteq> s \<longrightarrow> (\<exists>x\<in>s. f x = x)" |
1861 |
and "continuous_on t g" |
|
1862 |
and "g ` t \<subseteq> t" |
|
1863 |
obtains y where "y \<in> t" and "g y = y" |
|
53185 | 1864 |
proof - |
55522 | 1865 |
obtain h where "retraction s t h" |
1866 |
using assms(1) unfolding retract_of_def .. |
|
53674 | 1867 |
then show ?thesis |
53185 | 1868 |
unfolding retraction_def |
1869 |
apply - |
|
1870 |
apply (rule invertible_fixpoint_property[OF continuous_on_id _ _ _ _ assms(2), of t h g]) |
|
1871 |
prefer 7 |
|
53248 | 1872 |
apply (rule_tac y = y in that) |
1873 |
using assms |
|
1874 |
apply auto |
|
53185 | 1875 |
done |
1876 |
qed |
|
1877 |
||
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
1878 |
|
53688 | 1879 |
subsection {* The Brouwer theorem for any set with nonempty interior *} |
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
1880 |
|
56117
2dbf84ee3deb
remove ordered_euclidean_space constraint from brouwer/derivative lemmas;
huffman
parents:
55522
diff
changeset
|
1881 |
lemma convex_unit_cube: "convex unit_cube" |
2dbf84ee3deb
remove ordered_euclidean_space constraint from brouwer/derivative lemmas;
huffman
parents:
55522
diff
changeset
|
1882 |
apply (rule is_interval_convex) |
2dbf84ee3deb
remove ordered_euclidean_space constraint from brouwer/derivative lemmas;
huffman
parents:
55522
diff
changeset
|
1883 |
apply (clarsimp simp add: is_interval_def mem_unit_cube) |
2dbf84ee3deb
remove ordered_euclidean_space constraint from brouwer/derivative lemmas;
huffman
parents:
55522
diff
changeset
|
1884 |
apply (drule (1) bspec)+ |
2dbf84ee3deb
remove ordered_euclidean_space constraint from brouwer/derivative lemmas;
huffman
parents:
55522
diff
changeset
|
1885 |
apply auto |
2dbf84ee3deb
remove ordered_euclidean_space constraint from brouwer/derivative lemmas;
huffman
parents:
55522
diff
changeset
|
1886 |
done |
2dbf84ee3deb
remove ordered_euclidean_space constraint from brouwer/derivative lemmas;
huffman
parents:
55522
diff
changeset
|
1887 |
|
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
|
1888 |
lemma brouwer_weak: |
56117
2dbf84ee3deb
remove ordered_euclidean_space constraint from brouwer/derivative lemmas;
huffman
parents:
55522
diff
changeset
|
1889 |
fixes f :: "'a::euclidean_space \<Rightarrow> 'a" |
53674 | 1890 |
assumes "compact s" |
1891 |
and "convex s" |
|
1892 |
and "interior s \<noteq> {}" |
|
1893 |
and "continuous_on s f" |
|
1894 |
and "f ` s \<subseteq> s" |
|
1895 |
obtains x where "x \<in> s" and "f x = x" |
|
53185 | 1896 |
proof - |
56117
2dbf84ee3deb
remove ordered_euclidean_space constraint from brouwer/derivative lemmas;
huffman
parents:
55522
diff
changeset
|
1897 |
let ?U = "unit_cube :: 'a set" |
2dbf84ee3deb
remove ordered_euclidean_space constraint from brouwer/derivative lemmas;
huffman
parents:
55522
diff
changeset
|
1898 |
have "\<Sum>Basis /\<^sub>R 2 \<in> interior ?U" |
2dbf84ee3deb
remove ordered_euclidean_space constraint from brouwer/derivative lemmas;
huffman
parents:
55522
diff
changeset
|
1899 |
proof (rule interiorI) |
2dbf84ee3deb
remove ordered_euclidean_space constraint from brouwer/derivative lemmas;
huffman
parents:
55522
diff
changeset
|
1900 |
let ?I = "(\<Inter>i\<in>Basis. {x::'a. 0 < x \<bullet> i} \<inter> {x. x \<bullet> i < 1})" |
2dbf84ee3deb
remove ordered_euclidean_space constraint from brouwer/derivative lemmas;
huffman
parents:
55522
diff
changeset
|
1901 |
show "open ?I" |
2dbf84ee3deb
remove ordered_euclidean_space constraint from brouwer/derivative lemmas;
huffman
parents:
55522
diff
changeset
|
1902 |
by (intro open_INT finite_Basis ballI open_Int, auto intro: open_Collect_less) |
2dbf84ee3deb
remove ordered_euclidean_space constraint from brouwer/derivative lemmas;
huffman
parents:
55522
diff
changeset
|
1903 |
show "\<Sum>Basis /\<^sub>R 2 \<in> ?I" |
2dbf84ee3deb
remove ordered_euclidean_space constraint from brouwer/derivative lemmas;
huffman
parents:
55522
diff
changeset
|
1904 |
by simp |
2dbf84ee3deb
remove ordered_euclidean_space constraint from brouwer/derivative lemmas;
huffman
parents:
55522
diff
changeset
|
1905 |
show "?I \<subseteq> unit_cube" |
2dbf84ee3deb
remove ordered_euclidean_space constraint from brouwer/derivative lemmas;
huffman
parents:
55522
diff
changeset
|
1906 |
unfolding unit_cube_def by force |
2dbf84ee3deb
remove ordered_euclidean_space constraint from brouwer/derivative lemmas;
huffman
parents:
55522
diff
changeset
|
1907 |
qed |
2dbf84ee3deb
remove ordered_euclidean_space constraint from brouwer/derivative lemmas;
huffman
parents:
55522
diff
changeset
|
1908 |
then have *: "interior ?U \<noteq> {}" by fast |
2dbf84ee3deb
remove ordered_euclidean_space constraint from brouwer/derivative lemmas;
huffman
parents:
55522
diff
changeset
|
1909 |
have *: "?U homeomorphic s" |
2dbf84ee3deb
remove ordered_euclidean_space constraint from brouwer/derivative lemmas;
huffman
parents:
55522
diff
changeset
|
1910 |
using homeomorphic_convex_compact[OF convex_unit_cube compact_unit_cube * assms(2,1,3)] . |
2dbf84ee3deb
remove ordered_euclidean_space constraint from brouwer/derivative lemmas;
huffman
parents:
55522
diff
changeset
|
1911 |
have "\<forall>f. continuous_on ?U f \<and> f ` ?U \<subseteq> ?U \<longrightarrow> |
2dbf84ee3deb
remove ordered_euclidean_space constraint from brouwer/derivative lemmas;
huffman
parents:
55522
diff
changeset
|
1912 |
(\<exists>x\<in>?U. f x = x)" |
37489
44e42d392c6e
Introduce a type class for euclidean spaces, port most lemmas from real^'n to this type class.
hoelzl
parents:
36587
diff
changeset
|
1913 |
using brouwer_cube by auto |
53674 | 1914 |
then show ?thesis |
53185 | 1915 |
unfolding homeomorphic_fixpoint_property[OF *] |
53252 | 1916 |
using assms |
59765
26d1c71784f1
tweaked a few slow or very ugly proofs
paulson <lp15@cam.ac.uk>
parents:
58877
diff
changeset
|
1917 |
by (auto simp: intro: that) |
53185 | 1918 |
qed |
1919 |
||
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
1920 |
|
53688 | 1921 |
text {* And in particular for a closed ball. *} |
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
1922 |
|
53185 | 1923 |
lemma brouwer_ball: |
56117
2dbf84ee3deb
remove ordered_euclidean_space constraint from brouwer/derivative lemmas;
huffman
parents:
55522
diff
changeset
|
1924 |
fixes f :: "'a::euclidean_space \<Rightarrow> 'a" |
53674 | 1925 |
assumes "e > 0" |
1926 |
and "continuous_on (cball a e) f" |
|
53688 | 1927 |
and "f ` cball a e \<subseteq> cball a e" |
53674 | 1928 |
obtains x where "x \<in> cball a e" and "f x = x" |
53185 | 1929 |
using brouwer_weak[OF compact_cball convex_cball, of a e f] |
1930 |
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
|
1931 |
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
|
1932 |
|
53185 | 1933 |
text {*Still more general form; could derive this directly without using the |
36334 | 1934 |
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
|
1935 |
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
|
1936 |
|
53248 | 1937 |
lemma brouwer: |
56117
2dbf84ee3deb
remove ordered_euclidean_space constraint from brouwer/derivative lemmas;
huffman
parents:
55522
diff
changeset
|
1938 |
fixes f :: "'a::euclidean_space \<Rightarrow> 'a" |
53674 | 1939 |
assumes "compact s" |
1940 |
and "convex s" |
|
1941 |
and "s \<noteq> {}" |
|
1942 |
and "continuous_on s f" |
|
1943 |
and "f ` s \<subseteq> s" |
|
1944 |
obtains x where "x \<in> s" and "f x = x" |
|
53185 | 1945 |
proof - |
1946 |
have "\<exists>e>0. s \<subseteq> cball 0 e" |
|
53688 | 1947 |
using compact_imp_bounded[OF assms(1)] |
1948 |
unfolding bounded_pos |
|
53674 | 1949 |
apply (erule_tac exE) |
1950 |
apply (rule_tac x=b in exI) |
|
53185 | 1951 |
apply (auto simp add: dist_norm) |
1952 |
done |
|
55522 | 1953 |
then obtain e where e: "e > 0" "s \<subseteq> cball 0 e" |
1954 |
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
|
1955 |
have "\<exists>x\<in> cball 0 e. (f \<circ> closest_point s) x = x" |
53185 | 1956 |
apply (rule_tac brouwer_ball[OF e(1), of 0 "f \<circ> closest_point s"]) |
1957 |
apply (rule continuous_on_compose ) |
|
1958 |
apply (rule continuous_on_closest_point[OF assms(2) compact_imp_closed[OF assms(1)] assms(3)]) |
|
1959 |
apply (rule continuous_on_subset[OF assms(4)]) |
|
1960 |
apply (insert closest_point_in_set[OF compact_imp_closed[OF assms(1)] assms(3)]) |
|
1961 |
using assms(5)[unfolded subset_eq] |
|
1962 |
using e(2)[unfolded subset_eq mem_cball] |
|
1963 |
apply (auto simp add: dist_norm) |
|
1964 |
done |
|
55522 | 1965 |
then obtain x where x: "x \<in> cball 0 e" "(f \<circ> closest_point s) x = x" .. |
53185 | 1966 |
have *: "closest_point s x = x" |
1967 |
apply (rule closest_point_self) |
|
1968 |
apply (rule assms(5)[unfolded subset_eq,THEN bspec[where x="x"], unfolded image_iff]) |
|
1969 |
apply (rule_tac x="closest_point s x" in bexI) |
|
1970 |
using x |
|
1971 |
unfolding o_def |
|
1972 |
using closest_point_in_set[OF compact_imp_closed[OF assms(1)] assms(3), of x] |
|
1973 |
apply auto |
|
1974 |
done |
|
1975 |
show thesis |
|
1976 |
apply (rule_tac x="closest_point s x" in that) |
|
1977 |
unfolding x(2)[unfolded o_def] |
|
1978 |
apply (rule closest_point_in_set[OF compact_imp_closed[OF assms(1)] assms(3)]) |
|
53674 | 1979 |
using * |
1980 |
apply auto |
|
1981 |
done |
|
53185 | 1982 |
qed |
33741
4c414d0835ab
Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff
changeset
|
1983 |
|
37489
44e42d392c6e
Introduce a type class for euclidean spaces, port most lemmas from real^'n to this type class.
hoelzl
parents:
36587
diff
changeset
|
1984 |
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
|
1985 |
|
53185 | 1986 |
lemma no_retraction_cball: |
56117
2dbf84ee3deb
remove ordered_euclidean_space constraint from brouwer/derivative lemmas;
huffman
parents:
55522
diff
changeset
|
1987 |
fixes a :: "'a::euclidean_space" |
53674 | 1988 |
assumes "e > 0" |
1989 |
shows "\<not> (frontier (cball a e) retract_of (cball a e))" |
|
53185 | 1990 |
proof |
1991 |
case goal1 |
|
53674 | 1992 |
have *: "\<And>xa. a - (2 *\<^sub>R a - xa) = - (a - xa)" |
53185 | 1993 |
using scaleR_left_distrib[of 1 1 a] by auto |
55522 | 1994 |
obtain x where x: |
1995 |
"x \<in> {x. norm (a - x) = e}" |
|
1996 |
"2 *\<^sub>R a - x = x" |
|
53185 | 1997 |
apply (rule retract_fixpoint_property[OF goal1, of "\<lambda>x. scaleR 2 a - x"]) |
59765
26d1c71784f1
tweaked a few slow or very ugly proofs
paulson <lp15@cam.ac.uk>
parents:
58877
diff
changeset
|
1998 |
apply (blast intro: brouwer_ball[OF assms]) |
26d1c71784f1
tweaked a few slow or very ugly proofs
paulson <lp15@cam.ac.uk>
parents:
58877
diff
changeset
|
1999 |
apply (intro continuous_intros) |
26d1c71784f1
tweaked a few slow or very ugly proofs
paulson <lp15@cam.ac.uk>
parents:
58877
diff
changeset
|
2000 |
unfolding frontier_cball subset_eq Ball_def image_iff dist_norm |
26d1c71784f1
tweaked a few slow or very ugly proofs
paulson <lp15@cam.ac.uk>
parents:
58877
diff
changeset
|
2001 |
apply (auto simp add: * norm_minus_commute) |
53185 | 2002 |
done |
53674 | 2003 |
then have "scaleR 2 a = scaleR 1 x + scaleR 1 x" |
53248 | 2004 |
by (auto simp add: algebra_simps) |
53674 | 2005 |
then have "a = x" |
53688 | 2006 |
unfolding scaleR_left_distrib[symmetric] |
2007 |
by auto |
|
53674 | 2008 |
then show False |
2009 |
using x assms by auto |
|
53185 | 2010 |
qed |
2011 |
||
34291
4e896680897e
finite annotation on cartesian product is now implicit.
hoelzl
parents:
34289
diff
changeset
|
2012 |
end |