doc-src/TutorialI/Rules/Blast.thy
author blanchet
Mon, 19 Apr 2010 18:14:45 +0200
changeset 36230 43d10a494c91
parent 16417 9bc16273c2d4
child 42637 381fdcab0f36
permissions -rw-r--r--
added warning about inconsistent context to Metis; it makes more sense here than in Sledgehammer, because Sledgehammer is unsound and there's no point in having people panicking about the consistency of their context when their context is in fact consistent
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
10341
6eb91805a012 added the $Id:$ line
paulson
parents: 10295
diff changeset
     1
(* ID:         $Id$ *)
16417
9bc16273c2d4 migrated theory headers to new format
haftmann
parents: 10844
diff changeset
     2
theory Blast imports Main begin
10295
8eb12693cead the Rules chapter and theories
paulson
parents:
diff changeset
     3
8eb12693cead the Rules chapter and theories
paulson
parents:
diff changeset
     4
lemma "((\<exists>x. \<forall>y. p(x)=p(y)) = ((\<exists>x. q(x))=(\<forall>y. p(y))))   =    
8eb12693cead the Rules chapter and theories
paulson
parents:
diff changeset
     5
       ((\<exists>x. \<forall>y. q(x)=q(y)) = ((\<exists>x. p(x))=(\<forall>y. q(y))))"
10844
0c0e7de7e9c5 now using "by" for one-line proofs
paulson
parents: 10341
diff changeset
     6
by blast
10295
8eb12693cead the Rules chapter and theories
paulson
parents:
diff changeset
     7
8eb12693cead the Rules chapter and theories
paulson
parents:
diff changeset
     8
text{*\noindent Until now, we have proved everything using only induction and
8eb12693cead the Rules chapter and theories
paulson
parents:
diff changeset
     9
simplification.  Substantial proofs require more elaborate types of
8eb12693cead the Rules chapter and theories
paulson
parents:
diff changeset
    10
inference.*}
8eb12693cead the Rules chapter and theories
paulson
parents:
diff changeset
    11
8eb12693cead the Rules chapter and theories
paulson
parents:
diff changeset
    12
lemma "(\<forall>x. honest(x) \<and> industrious(x) \<longrightarrow> healthy(x)) \<and>  
8eb12693cead the Rules chapter and theories
paulson
parents:
diff changeset
    13
       \<not> (\<exists>x. grocer(x) \<and> healthy(x)) \<and> 
8eb12693cead the Rules chapter and theories
paulson
parents:
diff changeset
    14
       (\<forall>x. industrious(x) \<and> grocer(x) \<longrightarrow> honest(x)) \<and> 
8eb12693cead the Rules chapter and theories
paulson
parents:
diff changeset
    15
       (\<forall>x. cyclist(x) \<longrightarrow> industrious(x)) \<and> 
8eb12693cead the Rules chapter and theories
paulson
parents:
diff changeset
    16
       (\<forall>x. \<not>healthy(x) \<and> cyclist(x) \<longrightarrow> \<not>honest(x))  
8eb12693cead the Rules chapter and theories
paulson
parents:
diff changeset
    17
       \<longrightarrow> (\<forall>x. grocer(x) \<longrightarrow> \<not>cyclist(x))";
10844
0c0e7de7e9c5 now using "by" for one-line proofs
paulson
parents: 10341
diff changeset
    18
by blast
10295
8eb12693cead the Rules chapter and theories
paulson
parents:
diff changeset
    19
8eb12693cead the Rules chapter and theories
paulson
parents:
diff changeset
    20
lemma "(\<Union>i\<in>I. A(i)) \<inter> (\<Union>j\<in>J. B(j)) =
8eb12693cead the Rules chapter and theories
paulson
parents:
diff changeset
    21
        (\<Union>i\<in>I. \<Union>j\<in>J. A(i) \<inter> B(j))"
10844
0c0e7de7e9c5 now using "by" for one-line proofs
paulson
parents: 10341
diff changeset
    22
by blast
10295
8eb12693cead the Rules chapter and theories
paulson
parents:
diff changeset
    23
8eb12693cead the Rules chapter and theories
paulson
parents:
diff changeset
    24
text {*
8eb12693cead the Rules chapter and theories
paulson
parents:
diff changeset
    25
@{thm[display] mult_is_0}
8eb12693cead the Rules chapter and theories
paulson
parents:
diff changeset
    26
 \rulename{mult_is_0}}
8eb12693cead the Rules chapter and theories
paulson
parents:
diff changeset
    27
8eb12693cead the Rules chapter and theories
paulson
parents:
diff changeset
    28
@{thm[display] finite_Un}
8eb12693cead the Rules chapter and theories
paulson
parents:
diff changeset
    29
 \rulename{finite_Un}}
8eb12693cead the Rules chapter and theories
paulson
parents:
diff changeset
    30
*};
8eb12693cead the Rules chapter and theories
paulson
parents:
diff changeset
    31
8eb12693cead the Rules chapter and theories
paulson
parents:
diff changeset
    32
8eb12693cead the Rules chapter and theories
paulson
parents:
diff changeset
    33
lemma [iff]: "(xs@ys = []) = (xs=[] & ys=[])"
8eb12693cead the Rules chapter and theories
paulson
parents:
diff changeset
    34
  apply (induct_tac xs)
8eb12693cead the Rules chapter and theories
paulson
parents:
diff changeset
    35
  by (simp_all);
8eb12693cead the Rules chapter and theories
paulson
parents:
diff changeset
    36
8eb12693cead the Rules chapter and theories
paulson
parents:
diff changeset
    37
(*ideas for uses of intro, etc.: ex/Primes/is_gcd_unique?*)
8eb12693cead the Rules chapter and theories
paulson
parents:
diff changeset
    38
end