inductive_set
tiling :: "'a set set ==> 'a set set" for A :: "'a set set"where
empty [simp, intro]: "{} ∈ tiling A" |
Un [simp, intro]: "[ a ∈ A; t ∈ tiling A; a ∩ t = {} ] ==> a ∪ t ∈ tiling A"
lemma tiling_UnI [intro]: "[ t ∈ tiling A; u ∈ tiling A; t ∩ u = {} ]==> t ∪ u ∈ tiling A" by (induct set: tiling) (auto simp: Un_assoc)
lemma dominoes_tile_matrix: "{0..<m} × {0..< 2*n} ∈ tiling domino" by (induct m) auto
text‹\medskip @{term coloured} and Dominoes›
lemma coloured_insert [simp]: "coloured b ∩ (insert (i, j) t) = (if (i + j) mod 2 = b then insert (i, j) (coloured b ∩ t) else coloured b ∩ t)" by (auto simp: coloured_def)
lemma domino_singletons: "d ∈ domino ==> (∃i j. whites ∩ d = {(i, j)}) ∧ (∃m n. blacks ∩ d = {(m, n)})" by (elim domino.cases) (auto simp: mod_Suc)
lemma tiling_domino_0_1: "t ∈ tiling domino ==> card(whites ∩ t) = card(blacks ∩ t)" proof (induct set: tiling) case empty thenshow ?case by auto next case (Un d t)
― ‹this fact tells us that both ``inserts'' are non-trivial› thenhave"∧p C. C ∩ d = {p} ⟶ p ∉ t" by auto moreover obtain w b where"whites ∩ d = {w}""blacks ∩ d = {b}" using Un.hyps domino_singletons by force ultimatelyshow ?case using Un by auto qed
text‹\medskip Final argument is surprisingly complex›
text‹Apply the general theorem to the well-known case›
theorem mutil_not_tiling: assumes"t = {0..< 2 * Suc m} × {0..< 2 * Suc n}" shows"t - {(0,0)} - {(Suc(2 * m), Suc(2 * n))} ∉ tiling domino" proof - have"t ∈ tiling domino" using assms dominoes_tile_matrix by blast with assms show ?thesis by (intro gen_mutil_not_tiling) auto qed
section‹The Mutilated Chess Board Can be Tiled by Ls›
text‹Remove a arbitrary square from a chess board of size $2^n \times 2^n$.
result can be tiled by L-shaped tiles:
begin{picture}(8,8)
put(0,0){\framebox(4,4){}}
put(4,0){\framebox(4,4){}}
put(0,4){\framebox(4,4){}}
end{picture}.
four possible L-shaped tiles are obtained by dropping
of the four squares from $\{(x,y),(x+1,y),(x,y+1),(x+1,y+1)\}$:›
lemma in_square2[simp]: "(a,b) : square2 n i j ⟷ i≤a ∧ a<2^n+i ∧ j≤b ∧ b<2^n+j" by(simp add:square2_def)
lemma square2_Suc: "square2 (Suc n) i j = square2 n i j ∪ square2 n (2^n + i) j ∪ square2 n i (2^n + j) ∪ square2 n (2^n + i) (2^n + j)" by auto
lemma square2_disj: "square2 n i j ∩ square2 n x y = {} ⟷ (2^n+i ≤ x ∨ 2^n+x ≤ i) ∨ (2^n+j ≤ y ∨ 2^n+y ≤ j)" (is"?A = ?B") proof-
{ assume ?B hence ?A by(auto simp:square2_def) } moreover
{ assume"¬ ?B" hence"(max i x, max j y) : square2 n i j ∩ square2 n x y"by simp hence"¬ ?A"by blast } ultimatelyshow ?thesis by blast qed
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.