doc-src/TutorialI/Rules/Blast.thy
author nipkow
Fri, 01 Dec 2000 12:15:47 +0100
changeset 10560 f4da791d4850
parent 10341 6eb91805a012
child 10844 0c0e7de7e9c5
permissions -rw-r--r--
*** empty log message ***
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
10341
6eb91805a012 added the $Id:$ line
paulson
parents: 10295
diff changeset
     1
(* ID:         $Id$ *)
10295
8eb12693cead the Rules chapter and theories
paulson
parents:
diff changeset
     2
theory Blast = Main:
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))))"
8eb12693cead the Rules chapter and theories
paulson
parents:
diff changeset
     6
apply blast
8eb12693cead the Rules chapter and theories
paulson
parents:
diff changeset
     7
done
8eb12693cead the Rules chapter and theories
paulson
parents:
diff changeset
     8
8eb12693cead the Rules chapter and theories
paulson
parents:
diff changeset
     9
text{*\noindent Until now, we have proved everything using only induction and
8eb12693cead the Rules chapter and theories
paulson
parents:
diff changeset
    10
simplification.  Substantial proofs require more elaborate types of
8eb12693cead the Rules chapter and theories
paulson
parents:
diff changeset
    11
inference.*}
8eb12693cead the Rules chapter and theories
paulson
parents:
diff changeset
    12
8eb12693cead the Rules chapter and theories
paulson
parents:
diff changeset
    13
lemma "(\<forall>x. honest(x) \<and> industrious(x) \<longrightarrow> healthy(x)) \<and>  
8eb12693cead the Rules chapter and theories
paulson
parents:
diff changeset
    14
       \<not> (\<exists>x. grocer(x) \<and> healthy(x)) \<and> 
8eb12693cead the Rules chapter and theories
paulson
parents:
diff changeset
    15
       (\<forall>x. industrious(x) \<and> grocer(x) \<longrightarrow> honest(x)) \<and> 
8eb12693cead the Rules chapter and theories
paulson
parents:
diff changeset
    16
       (\<forall>x. cyclist(x) \<longrightarrow> industrious(x)) \<and> 
8eb12693cead the Rules chapter and theories
paulson
parents:
diff changeset
    17
       (\<forall>x. \<not>healthy(x) \<and> cyclist(x) \<longrightarrow> \<not>honest(x))  
8eb12693cead the Rules chapter and theories
paulson
parents:
diff changeset
    18
       \<longrightarrow> (\<forall>x. grocer(x) \<longrightarrow> \<not>cyclist(x))";
8eb12693cead the Rules chapter and theories
paulson
parents:
diff changeset
    19
apply blast
8eb12693cead the Rules chapter and theories
paulson
parents:
diff changeset
    20
done
8eb12693cead the Rules chapter and theories
paulson
parents:
diff changeset
    21
8eb12693cead the Rules chapter and theories
paulson
parents:
diff changeset
    22
lemma "(\<Union>i\<in>I. A(i)) \<inter> (\<Union>j\<in>J. B(j)) =
8eb12693cead the Rules chapter and theories
paulson
parents:
diff changeset
    23
        (\<Union>i\<in>I. \<Union>j\<in>J. A(i) \<inter> B(j))"
8eb12693cead the Rules chapter and theories
paulson
parents:
diff changeset
    24
apply blast
8eb12693cead the Rules chapter and theories
paulson
parents:
diff changeset
    25
done
8eb12693cead the Rules chapter and theories
paulson
parents:
diff changeset
    26
8eb12693cead the Rules chapter and theories
paulson
parents:
diff changeset
    27
text {*
8eb12693cead the Rules chapter and theories
paulson
parents:
diff changeset
    28
@{thm[display] mult_is_0}
8eb12693cead the Rules chapter and theories
paulson
parents:
diff changeset
    29
 \rulename{mult_is_0}}
8eb12693cead the Rules chapter and theories
paulson
parents:
diff changeset
    30
8eb12693cead the Rules chapter and theories
paulson
parents:
diff changeset
    31
@{thm[display] finite_Un}
8eb12693cead the Rules chapter and theories
paulson
parents:
diff changeset
    32
 \rulename{finite_Un}}
8eb12693cead the Rules chapter and theories
paulson
parents:
diff changeset
    33
*};
8eb12693cead the Rules chapter and theories
paulson
parents:
diff changeset
    34
8eb12693cead the Rules chapter and theories
paulson
parents:
diff changeset
    35
8eb12693cead the Rules chapter and theories
paulson
parents:
diff changeset
    36
lemma [iff]: "(xs@ys = []) = (xs=[] & ys=[])"
8eb12693cead the Rules chapter and theories
paulson
parents:
diff changeset
    37
  apply (induct_tac xs)
8eb12693cead the Rules chapter and theories
paulson
parents:
diff changeset
    38
  by (simp_all);
8eb12693cead the Rules chapter and theories
paulson
parents:
diff changeset
    39
8eb12693cead the Rules chapter and theories
paulson
parents:
diff changeset
    40
(*ideas for uses of intro, etc.: ex/Primes/is_gcd_unique?*)
8eb12693cead the Rules chapter and theories
paulson
parents:
diff changeset
    41
end