author | wenzelm |
Mon, 12 Sep 2022 22:52:15 +0200 | |
changeset 76122 | b8f26c20d3b1 |
parent 63583 | a39baba12732 |
child 76987 | 4c275405faae |
permissions | -rw-r--r-- |
33026 | 1 |
(* Title: HOL/Isar_Examples/Mutilated_Checkerboard.thy |
7385 | 2 |
Author: Markus Wenzel, TU Muenchen (Isar document) |
31758 | 3 |
Author: Lawrence C Paulson, Cambridge University Computer Laboratory (original scripts) |
7382
33c01075d343
The Mutilated Chess Board Problem -- Isar'ized version of HOL/Inductive/Mutil;
wenzelm
parents:
diff
changeset
|
4 |
*) |
33c01075d343
The Mutilated Chess Board Problem -- Isar'ized version of HOL/Inductive/Mutil;
wenzelm
parents:
diff
changeset
|
5 |
|
58882 | 6 |
section \<open>The Mutilated Checker Board Problem\<close> |
7761 | 7 |
|
31758 | 8 |
theory Mutilated_Checkerboard |
63583 | 9 |
imports Main |
31758 | 10 |
begin |
7382
33c01075d343
The Mutilated Chess Board Problem -- Isar'ized version of HOL/Inductive/Mutil;
wenzelm
parents:
diff
changeset
|
11 |
|
61932 | 12 |
text \<open> |
13 |
The Mutilated Checker Board Problem, formalized inductively. See @{cite |
|
14 |
"paulson-mutilated-board"} for the original tactic script version. |
|
15 |
\<close> |
|
7382
33c01075d343
The Mutilated Chess Board Problem -- Isar'ized version of HOL/Inductive/Mutil;
wenzelm
parents:
diff
changeset
|
16 |
|
58614 | 17 |
subsection \<open>Tilings\<close> |
7382
33c01075d343
The Mutilated Chess Board Problem -- Isar'ized version of HOL/Inductive/Mutil;
wenzelm
parents:
diff
changeset
|
18 |
|
63583 | 19 |
inductive_set tiling :: "'a set set \<Rightarrow> 'a set set" for A :: "'a set set" |
20 |
where |
|
21 |
empty: "{} \<in> tiling A" |
|
22 |
| Un: "a \<union> t \<in> tiling A" if "a \<in> A" and "t \<in> tiling A" and "a \<subseteq> - t" |
|
7382
33c01075d343
The Mutilated Chess Board Problem -- Isar'ized version of HOL/Inductive/Mutil;
wenzelm
parents:
diff
changeset
|
23 |
|
33c01075d343
The Mutilated Chess Board Problem -- Isar'ized version of HOL/Inductive/Mutil;
wenzelm
parents:
diff
changeset
|
24 |
|
58614 | 25 |
text \<open>The union of two disjoint tilings is a tiling.\<close> |
7382
33c01075d343
The Mutilated Chess Board Problem -- Isar'ized version of HOL/Inductive/Mutil;
wenzelm
parents:
diff
changeset
|
26 |
|
7761 | 27 |
lemma tiling_Un: |
55656 | 28 |
assumes "t \<in> tiling A" |
29 |
and "u \<in> tiling A" |
|
30 |
and "t \<inter> u = {}" |
|
31 |
shows "t \<union> u \<in> tiling A" |
|
10408 | 32 |
proof - |
33 |
let ?T = "tiling A" |
|
58614 | 34 |
from \<open>t \<in> ?T\<close> and \<open>t \<inter> u = {}\<close> |
55656 | 35 |
show "t \<union> u \<in> ?T" |
10408 | 36 |
proof (induct t) |
11987 | 37 |
case empty |
58614 | 38 |
with \<open>u \<in> ?T\<close> show "{} \<union> u \<in> ?T" by simp |
9475 | 39 |
next |
11987 | 40 |
case (Un a t) |
55656 | 41 |
show "(a \<union> t) \<union> u \<in> ?T" |
10408 | 42 |
proof - |
55656 | 43 |
have "a \<union> (t \<union> u) \<in> ?T" |
58614 | 44 |
using \<open>a \<in> A\<close> |
10408 | 45 |
proof (rule tiling.Un) |
58614 | 46 |
from \<open>(a \<union> t) \<inter> u = {}\<close> have "t \<inter> u = {}" by blast |
55656 | 47 |
then show "t \<union> u \<in> ?T" by (rule Un) |
58614 | 48 |
from \<open>a \<subseteq> - t\<close> and \<open>(a \<union> t) \<inter> u = {}\<close> |
55656 | 49 |
show "a \<subseteq> - (t \<union> u)" by blast |
10408 | 50 |
qed |
55656 | 51 |
also have "a \<union> (t \<union> u) = (a \<union> t) \<union> u" |
10408 | 52 |
by (simp only: Un_assoc) |
53 |
finally show ?thesis . |
|
54 |
qed |
|
10007 | 55 |
qed |
56 |
qed |
|
7382
33c01075d343
The Mutilated Chess Board Problem -- Isar'ized version of HOL/Inductive/Mutil;
wenzelm
parents:
diff
changeset
|
57 |
|
33c01075d343
The Mutilated Chess Board Problem -- Isar'ized version of HOL/Inductive/Mutil;
wenzelm
parents:
diff
changeset
|
58 |
|
58614 | 59 |
subsection \<open>Basic properties of ``below''\<close> |
7382
33c01075d343
The Mutilated Chess Board Problem -- Isar'ized version of HOL/Inductive/Mutil;
wenzelm
parents:
diff
changeset
|
60 |
|
55656 | 61 |
definition below :: "nat \<Rightarrow> nat set" |
37671 | 62 |
where "below n = {i. i < n}" |
7382
33c01075d343
The Mutilated Chess Board Problem -- Isar'ized version of HOL/Inductive/Mutil;
wenzelm
parents:
diff
changeset
|
63 |
|
55656 | 64 |
lemma below_less_iff [iff]: "i \<in> below k \<longleftrightarrow> i < k" |
10007 | 65 |
by (simp add: below_def) |
7382
33c01075d343
The Mutilated Chess Board Problem -- Isar'ized version of HOL/Inductive/Mutil;
wenzelm
parents:
diff
changeset
|
66 |
|
10007 | 67 |
lemma below_0: "below 0 = {}" |
68 |
by (simp add: below_def) |
|
7382
33c01075d343
The Mutilated Chess Board Problem -- Isar'ized version of HOL/Inductive/Mutil;
wenzelm
parents:
diff
changeset
|
69 |
|
55656 | 70 |
lemma Sigma_Suc1: "m = n + 1 \<Longrightarrow> below m \<times> B = ({n} \<times> B) \<union> (below n \<times> B)" |
10007 | 71 |
by (simp add: below_def less_Suc_eq) blast |
7382
33c01075d343
The Mutilated Chess Board Problem -- Isar'ized version of HOL/Inductive/Mutil;
wenzelm
parents:
diff
changeset
|
72 |
|
7761 | 73 |
lemma Sigma_Suc2: |
55656 | 74 |
"m = n + 2 \<Longrightarrow> |
75 |
A \<times> below m = (A \<times> {n}) \<union> (A \<times> {n + 1}) \<union> (A \<times> below n)" |
|
13187 | 76 |
by (auto simp add: below_def) |
7382
33c01075d343
The Mutilated Chess Board Problem -- Isar'ized version of HOL/Inductive/Mutil;
wenzelm
parents:
diff
changeset
|
77 |
|
10007 | 78 |
lemmas Sigma_Suc = Sigma_Suc1 Sigma_Suc2 |
7382
33c01075d343
The Mutilated Chess Board Problem -- Isar'ized version of HOL/Inductive/Mutil;
wenzelm
parents:
diff
changeset
|
79 |
|
33c01075d343
The Mutilated Chess Board Problem -- Isar'ized version of HOL/Inductive/Mutil;
wenzelm
parents:
diff
changeset
|
80 |
|
58614 | 81 |
subsection \<open>Basic properties of ``evnodd''\<close> |
7382
33c01075d343
The Mutilated Chess Board Problem -- Isar'ized version of HOL/Inductive/Mutil;
wenzelm
parents:
diff
changeset
|
82 |
|
55656 | 83 |
definition evnodd :: "(nat \<times> nat) set \<Rightarrow> nat \<Rightarrow> (nat \<times> nat) set" |
84 |
where "evnodd A b = A \<inter> {(i, j). (i + j) mod 2 = b}" |
|
7382
33c01075d343
The Mutilated Chess Board Problem -- Isar'ized version of HOL/Inductive/Mutil;
wenzelm
parents:
diff
changeset
|
85 |
|
55656 | 86 |
lemma evnodd_iff: "(i, j) \<in> evnodd A b \<longleftrightarrow> (i, j) \<in> A \<and> (i + j) mod 2 = b" |
10007 | 87 |
by (simp add: evnodd_def) |
7382
33c01075d343
The Mutilated Chess Board Problem -- Isar'ized version of HOL/Inductive/Mutil;
wenzelm
parents:
diff
changeset
|
88 |
|
55656 | 89 |
lemma evnodd_subset: "evnodd A b \<subseteq> A" |
37671 | 90 |
unfolding evnodd_def by (rule Int_lower1) |
7382
33c01075d343
The Mutilated Chess Board Problem -- Isar'ized version of HOL/Inductive/Mutil;
wenzelm
parents:
diff
changeset
|
91 |
|
55656 | 92 |
lemma evnoddD: "x \<in> evnodd A b \<Longrightarrow> x \<in> A" |
37671 | 93 |
by (rule subsetD) (rule evnodd_subset) |
7382
33c01075d343
The Mutilated Chess Board Problem -- Isar'ized version of HOL/Inductive/Mutil;
wenzelm
parents:
diff
changeset
|
94 |
|
55656 | 95 |
lemma evnodd_finite: "finite A \<Longrightarrow> finite (evnodd A b)" |
37671 | 96 |
by (rule finite_subset) (rule evnodd_subset) |
7382
33c01075d343
The Mutilated Chess Board Problem -- Isar'ized version of HOL/Inductive/Mutil;
wenzelm
parents:
diff
changeset
|
97 |
|
55656 | 98 |
lemma evnodd_Un: "evnodd (A \<union> B) b = evnodd A b \<union> evnodd B b" |
37671 | 99 |
unfolding evnodd_def by blast |
7382
33c01075d343
The Mutilated Chess Board Problem -- Isar'ized version of HOL/Inductive/Mutil;
wenzelm
parents:
diff
changeset
|
100 |
|
10007 | 101 |
lemma evnodd_Diff: "evnodd (A - B) b = evnodd A b - evnodd B b" |
37671 | 102 |
unfolding evnodd_def by blast |
7382
33c01075d343
The Mutilated Chess Board Problem -- Isar'ized version of HOL/Inductive/Mutil;
wenzelm
parents:
diff
changeset
|
103 |
|
10007 | 104 |
lemma evnodd_empty: "evnodd {} b = {}" |
105 |
by (simp add: evnodd_def) |
|
7382
33c01075d343
The Mutilated Chess Board Problem -- Isar'ized version of HOL/Inductive/Mutil;
wenzelm
parents:
diff
changeset
|
106 |
|
7385 | 107 |
lemma evnodd_insert: "evnodd (insert (i, j) C) b = |
11704
3c50a2cd6f00
* sane numerals (stage 2): plain "num" syntax (removed "#");
wenzelm
parents:
11701
diff
changeset
|
108 |
(if (i + j) mod 2 = b |
10007 | 109 |
then insert (i, j) (evnodd C b) else evnodd C b)" |
32456
341c83339aeb
tuned the simp rules for Int involving insert and intervals.
nipkow
parents:
31758
diff
changeset
|
110 |
by (simp add: evnodd_def) |
7382
33c01075d343
The Mutilated Chess Board Problem -- Isar'ized version of HOL/Inductive/Mutil;
wenzelm
parents:
diff
changeset
|
111 |
|
33c01075d343
The Mutilated Chess Board Problem -- Isar'ized version of HOL/Inductive/Mutil;
wenzelm
parents:
diff
changeset
|
112 |
|
58614 | 113 |
subsection \<open>Dominoes\<close> |
7382
33c01075d343
The Mutilated Chess Board Problem -- Isar'ized version of HOL/Inductive/Mutil;
wenzelm
parents:
diff
changeset
|
114 |
|
55656 | 115 |
inductive_set domino :: "(nat \<times> nat) set set" |
63583 | 116 |
where |
117 |
horiz: "{(i, j), (i, j + 1)} \<in> domino" |
|
118 |
| vertl: "{(i, j), (i + 1, j)} \<in> domino" |
|
7382
33c01075d343
The Mutilated Chess Board Problem -- Isar'ized version of HOL/Inductive/Mutil;
wenzelm
parents:
diff
changeset
|
119 |
|
7800 | 120 |
lemma dominoes_tile_row: |
55656 | 121 |
"{i} \<times> below (2 * n) \<in> tiling domino" |
122 |
(is "?B n \<in> ?T") |
|
10007 | 123 |
proof (induct n) |
11987 | 124 |
case 0 |
125 |
show ?case by (simp add: below_0 tiling.empty) |
|
126 |
next |
|
127 |
case (Suc n) |
|
55656 | 128 |
let ?a = "{i} \<times> {2 * n + 1} \<union> {i} \<times> {2 * n}" |
129 |
have "?B (Suc n) = ?a \<union> ?B n" |
|
10007 | 130 |
by (auto simp add: Sigma_Suc Un_assoc) |
55656 | 131 |
also have "\<dots> \<in> ?T" |
10007 | 132 |
proof (rule tiling.Un) |
55656 | 133 |
have "{(i, 2 * n), (i, 2 * n + 1)} \<in> domino" |
10007 | 134 |
by (rule domino.horiz) |
11704
3c50a2cd6f00
* sane numerals (stage 2): plain "num" syntax (removed "#");
wenzelm
parents:
11701
diff
changeset
|
135 |
also have "{(i, 2 * n), (i, 2 * n + 1)} = ?a" by blast |
55656 | 136 |
finally show "\<dots> \<in> domino" . |
137 |
show "?B n \<in> ?T" by (rule Suc) |
|
138 |
show "?a \<subseteq> - ?B n" by blast |
|
10007 | 139 |
qed |
46008
c296c75f4cf4
reverted some changes for set->predicate transition, according to "hg log -u berghofe -r Isabelle2007:Isabelle2008";
wenzelm
parents:
40880
diff
changeset
|
140 |
finally show ?case . |
10007 | 141 |
qed |
7382
33c01075d343
The Mutilated Chess Board Problem -- Isar'ized version of HOL/Inductive/Mutil;
wenzelm
parents:
diff
changeset
|
142 |
|
7761 | 143 |
lemma dominoes_tile_matrix: |
55656 | 144 |
"below m \<times> below (2 * n) \<in> tiling domino" |
145 |
(is "?B m \<in> ?T") |
|
10007 | 146 |
proof (induct m) |
11987 | 147 |
case 0 |
148 |
show ?case by (simp add: below_0 tiling.empty) |
|
149 |
next |
|
150 |
case (Suc m) |
|
55656 | 151 |
let ?t = "{m} \<times> below (2 * n)" |
152 |
have "?B (Suc m) = ?t \<union> ?B m" by (simp add: Sigma_Suc) |
|
153 |
also have "\<dots> \<in> ?T" |
|
10408 | 154 |
proof (rule tiling_Un) |
55656 | 155 |
show "?t \<in> ?T" by (rule dominoes_tile_row) |
156 |
show "?B m \<in> ?T" by (rule Suc) |
|
157 |
show "?t \<inter> ?B m = {}" by blast |
|
10007 | 158 |
qed |
46008
c296c75f4cf4
reverted some changes for set->predicate transition, according to "hg log -u berghofe -r Isabelle2007:Isabelle2008";
wenzelm
parents:
40880
diff
changeset
|
159 |
finally show ?case . |
10007 | 160 |
qed |
7382
33c01075d343
The Mutilated Chess Board Problem -- Isar'ized version of HOL/Inductive/Mutil;
wenzelm
parents:
diff
changeset
|
161 |
|
7761 | 162 |
lemma domino_singleton: |
55656 | 163 |
assumes "d \<in> domino" |
37671 | 164 |
and "b < 2" |
55656 | 165 |
shows "\<exists>i j. evnodd d b = {(i, j)}" (is "?P d") |
37671 | 166 |
using assms |
18241 | 167 |
proof induct |
58614 | 168 |
from \<open>b < 2\<close> have b_cases: "b = 0 \<or> b = 1" by arith |
18241 | 169 |
fix i j |
170 |
note [simp] = evnodd_empty evnodd_insert mod_Suc |
|
171 |
from b_cases show "?P {(i, j), (i, j + 1)}" by rule auto |
|
172 |
from b_cases show "?P {(i, j), (i + 1, j)}" by rule auto |
|
10007 | 173 |
qed |
7382
33c01075d343
The Mutilated Chess Board Problem -- Isar'ized version of HOL/Inductive/Mutil;
wenzelm
parents:
diff
changeset
|
174 |
|
18153 | 175 |
lemma domino_finite: |
55656 | 176 |
assumes "d \<in> domino" |
18153 | 177 |
shows "finite d" |
37671 | 178 |
using assms |
18192 | 179 |
proof induct |
180 |
fix i j :: nat |
|
22273 | 181 |
show "finite {(i, j), (i, j + 1)}" by (intro finite.intros) |
182 |
show "finite {(i, j), (i + 1, j)}" by (intro finite.intros) |
|
10007 | 183 |
qed |
7382
33c01075d343
The Mutilated Chess Board Problem -- Isar'ized version of HOL/Inductive/Mutil;
wenzelm
parents:
diff
changeset
|
184 |
|
33c01075d343
The Mutilated Chess Board Problem -- Isar'ized version of HOL/Inductive/Mutil;
wenzelm
parents:
diff
changeset
|
185 |
|
58614 | 186 |
subsection \<open>Tilings of dominoes\<close> |
7382
33c01075d343
The Mutilated Chess Board Problem -- Isar'ized version of HOL/Inductive/Mutil;
wenzelm
parents:
diff
changeset
|
187 |
|
7761 | 188 |
lemma tiling_domino_finite: |
55656 | 189 |
assumes t: "t \<in> tiling domino" (is "t \<in> ?T") |
18153 | 190 |
shows "finite t" (is "?F t") |
18241 | 191 |
using t |
18153 | 192 |
proof induct |
22273 | 193 |
show "?F {}" by (rule finite.emptyI) |
18153 | 194 |
fix a t assume "?F t" |
55656 | 195 |
assume "a \<in> domino" |
196 |
then have "?F a" by (rule domino_finite) |
|
58614 | 197 |
from this and \<open>?F t\<close> show "?F (a \<union> t)" by (rule finite_UnI) |
10007 | 198 |
qed |
7382
33c01075d343
The Mutilated Chess Board Problem -- Isar'ized version of HOL/Inductive/Mutil;
wenzelm
parents:
diff
changeset
|
199 |
|
7761 | 200 |
lemma tiling_domino_01: |
55656 | 201 |
assumes t: "t \<in> tiling domino" (is "t \<in> ?T") |
18153 | 202 |
shows "card (evnodd t 0) = card (evnodd t 1)" |
18241 | 203 |
using t |
18153 | 204 |
proof induct |
205 |
case empty |
|
206 |
show ?case by (simp add: evnodd_def) |
|
207 |
next |
|
208 |
case (Un a t) |
|
209 |
let ?e = evnodd |
|
58614 | 210 |
note hyp = \<open>card (?e t 0) = card (?e t 1)\<close> |
211 |
and at = \<open>a \<subseteq> - t\<close> |
|
60416 | 212 |
have card_suc: "card (?e (a \<union> t) b) = Suc (card (?e t b))" if "b < 2" for b :: nat |
18153 | 213 |
proof - |
55656 | 214 |
have "?e (a \<union> t) b = ?e a b \<union> ?e t b" by (rule evnodd_Un) |
18153 | 215 |
also obtain i j where e: "?e a b = {(i, j)}" |
10007 | 216 |
proof - |
58614 | 217 |
from \<open>a \<in> domino\<close> and \<open>b < 2\<close> |
55656 | 218 |
have "\<exists>i j. ?e a b = {(i, j)}" by (rule domino_singleton) |
18153 | 219 |
then show ?thesis by (blast intro: that) |
10007 | 220 |
qed |
55656 | 221 |
also have "\<dots> \<union> ?e t b = insert (i, j) (?e t b)" by simp |
222 |
also have "card \<dots> = Suc (card (?e t b))" |
|
18153 | 223 |
proof (rule card_insert_disjoint) |
58614 | 224 |
from \<open>t \<in> tiling domino\<close> have "finite t" |
32960
69916a850301
eliminated hard tabulators, guessing at each author's individual tab-width;
wenzelm
parents:
32456
diff
changeset
|
225 |
by (rule tiling_domino_finite) |
23373 | 226 |
then show "finite (?e t b)" |
227 |
by (rule evnodd_finite) |
|
55656 | 228 |
from e have "(i, j) \<in> ?e a b" by simp |
229 |
with at show "(i, j) \<notin> ?e t b" by (blast dest: evnoddD) |
|
18153 | 230 |
qed |
60410 | 231 |
finally show ?thesis . |
10007 | 232 |
qed |
55656 | 233 |
then have "card (?e (a \<union> t) 0) = Suc (card (?e t 0))" by simp |
18153 | 234 |
also from hyp have "card (?e t 0) = card (?e t 1)" . |
55656 | 235 |
also from card_suc have "Suc \<dots> = card (?e (a \<union> t) 1)" |
18153 | 236 |
by simp |
237 |
finally show ?case . |
|
10007 | 238 |
qed |
7382
33c01075d343
The Mutilated Chess Board Problem -- Isar'ized version of HOL/Inductive/Mutil;
wenzelm
parents:
diff
changeset
|
239 |
|
33c01075d343
The Mutilated Chess Board Problem -- Isar'ized version of HOL/Inductive/Mutil;
wenzelm
parents:
diff
changeset
|
240 |
|
58614 | 241 |
subsection \<open>Main theorem\<close> |
7382
33c01075d343
The Mutilated Chess Board Problem -- Isar'ized version of HOL/Inductive/Mutil;
wenzelm
parents:
diff
changeset
|
242 |
|
55656 | 243 |
definition mutilated_board :: "nat \<Rightarrow> nat \<Rightarrow> (nat \<times> nat) set" |
63583 | 244 |
where "mutilated_board m n = |
245 |
below (2 * (m + 1)) \<times> below (2 * (n + 1)) - {(0, 0)} - {(2 * m + 1, 2 * n + 1)}" |
|
7382
33c01075d343
The Mutilated Chess Board Problem -- Isar'ized version of HOL/Inductive/Mutil;
wenzelm
parents:
diff
changeset
|
246 |
|
55656 | 247 |
theorem mutil_not_tiling: "mutilated_board m n \<notin> tiling domino" |
10007 | 248 |
proof (unfold mutilated_board_def) |
249 |
let ?T = "tiling domino" |
|
55656 | 250 |
let ?t = "below (2 * (m + 1)) \<times> below (2 * (n + 1))" |
10007 | 251 |
let ?t' = "?t - {(0, 0)}" |
11704
3c50a2cd6f00
* sane numerals (stage 2): plain "num" syntax (removed "#");
wenzelm
parents:
11701
diff
changeset
|
252 |
let ?t'' = "?t' - {(2 * m + 1, 2 * n + 1)}" |
46582 | 253 |
|
55656 | 254 |
show "?t'' \<notin> ?T" |
10007 | 255 |
proof |
55656 | 256 |
have t: "?t \<in> ?T" by (rule dominoes_tile_matrix) |
257 |
assume t'': "?t'' \<in> ?T" |
|
7382
33c01075d343
The Mutilated Chess Board Problem -- Isar'ized version of HOL/Inductive/Mutil;
wenzelm
parents:
diff
changeset
|
258 |
|
10007 | 259 |
let ?e = evnodd |
260 |
have fin: "finite (?e ?t 0)" |
|
261 |
by (rule evnodd_finite, rule tiling_domino_finite, rule t) |
|
7382
33c01075d343
The Mutilated Chess Board Problem -- Isar'ized version of HOL/Inductive/Mutil;
wenzelm
parents:
diff
changeset
|
262 |
|
10007 | 263 |
note [simp] = evnodd_iff evnodd_empty evnodd_insert evnodd_Diff |
264 |
have "card (?e ?t'' 0) < card (?e ?t' 0)" |
|
265 |
proof - |
|
11704
3c50a2cd6f00
* sane numerals (stage 2): plain "num" syntax (removed "#");
wenzelm
parents:
11701
diff
changeset
|
266 |
have "card (?e ?t' 0 - {(2 * m + 1, 2 * n + 1)}) |
10007 | 267 |
< card (?e ?t' 0)" |
268 |
proof (rule card_Diff1_less) |
|
10408 | 269 |
from _ fin show "finite (?e ?t' 0)" |
10007 | 270 |
by (rule finite_subset) auto |
55656 | 271 |
show "(2 * m + 1, 2 * n + 1) \<in> ?e ?t' 0" by simp |
10007 | 272 |
qed |
18153 | 273 |
then show ?thesis by simp |
10007 | 274 |
qed |
55656 | 275 |
also have "\<dots> < card (?e ?t 0)" |
10007 | 276 |
proof - |
55656 | 277 |
have "(0, 0) \<in> ?e ?t 0" by simp |
10007 | 278 |
with fin have "card (?e ?t 0 - {(0, 0)}) < card (?e ?t 0)" |
279 |
by (rule card_Diff1_less) |
|
18153 | 280 |
then show ?thesis by simp |
10007 | 281 |
qed |
55656 | 282 |
also from t have "\<dots> = card (?e ?t 1)" |
10007 | 283 |
by (rule tiling_domino_01) |
284 |
also have "?e ?t 1 = ?e ?t'' 1" by simp |
|
55656 | 285 |
also from t'' have "card \<dots> = card (?e ?t'' 0)" |
10007 | 286 |
by (rule tiling_domino_01 [symmetric]) |
55656 | 287 |
finally have "\<dots> < \<dots>" . then show False .. |
10007 | 288 |
qed |
289 |
qed |
|
7382
33c01075d343
The Mutilated Chess Board Problem -- Isar'ized version of HOL/Inductive/Mutil;
wenzelm
parents:
diff
changeset
|
290 |
|
10007 | 291 |
end |