src/HOL/Isar_examples/MutilatedCheckerboard.thy
changeset 7434 132e8ed29bd8
parent 7385 1d486a5b6176
child 7447 d09f39cd3b6e
equal deleted inserted replaced
7433:27887c52b9c8 7434:132e8ed29bd8
   165   qed;
   165   qed;
   166 qed;
   166 qed;
   167 
   167 
   168 lemma domino_finite: "d: domino ==> finite d";
   168 lemma domino_finite: "d: domino ==> finite d";
   169 proof (induct set: domino);
   169 proof (induct set: domino);
   170   fix i j;
   170   fix i j :: nat;
   171   show "finite {(i, j), (i, j + 1)}"; by (intro Finites.intrs);
   171   show "finite {(i, j), (i, j + 1)}"; by (intro Finites.intrs);
   172   show "finite {(i, j), (i + 1, j)}"; by (intro Finites.intrs);
   172   show "finite {(i, j), (i + 1, j)}"; by (intro Finites.intrs);
   173 qed;
   173 qed;
   174 
   174 
   175 
   175 
   208       thus "??thesis b";
   208       thus "??thesis b";
   209       proof (elim exE);
   209       proof (elim exE);
   210 	have "??e (a Un t) b = ??e a b Un ??e t b"; by (rule evnodd_Un);
   210 	have "??e (a Un t) b = ??e a b Un ??e t b"; by (rule evnodd_Un);
   211 	also; fix i j; assume "??e a b = {(i, j)}";
   211 	also; fix i j; assume "??e a b = {(i, j)}";
   212 	also; have "... Un ??e t b = insert (i, j) (??e t b)"; by simp;
   212 	also; have "... Un ??e t b = insert (i, j) (??e t b)"; by simp;
   213 	finally; have "card (??e (a Un t) b) = card (insert (i, j) (??e t b))"; by simp;
   213 	also; have "card ... = Suc (card (??e t b))";
   214 	also; have "... = Suc (card (??e t b))";
       
   215 	proof (rule card_insert_disjoint);
   214 	proof (rule card_insert_disjoint);
   216 	  show "finite (??e t b)"; by (rule evnodd_finite, rule tiling_domino_finite);
   215 	  show "finite (??e t b)"; by (rule evnodd_finite, rule tiling_domino_finite);
   217 	  have "(i, j) : ??e a b"; by asm_simp;
   216 	  have "(i, j) : ??e a b"; by asm_simp;
   218 	  thus "(i, j) ~: ??e t b"; by (force dest: evnoddD);
   217 	  thus "(i, j) ~: ??e t b"; by (force dest: evnoddD);
   219 	qed;
   218 	qed;