src/HOLCF/IOA/ABP/Lemmas.ML
author wenzelm
Thu Nov 15 23:25:46 2001 +0100 (2001-11-15)
changeset 12218 6597093b77e7
parent 5192 704dd3a6d47d
child 13524 604d0f3622d6
permissions -rw-r--r--
GPLed;
     1 (*  Title:      HOLCF/IOA/ABP/Lemmas.ML
     2     ID:         $Id$
     3     Author:     Olaf Müller
     4     License:    GPL (GNU GENERAL PUBLIC LICENSE)
     5 *)
     6 
     7 (* Logic *)
     8 
     9 val prems = goal HOL.thy "(P ==> Q-->R) ==> P&Q --> R";
    10   by (fast_tac (claset() addDs prems) 1);
    11 qed "imp_conj_lemma";
    12 
    13 goal HOL.thy "(~(A&B)) = ((~A)&B| ~B)";
    14 by (Fast_tac 1);
    15 val and_de_morgan_and_absorbe = result();
    16 
    17 goal HOL.thy "(if C then A else B) --> (A|B)";
    18 by (stac split_if 1);
    19 by (Fast_tac 1);
    20 val bool_if_impl_or = result();
    21 
    22 (* Sets *)
    23 
    24 val set_lemmas =
    25    map (fn s => prove_goal Set.thy s (fn _ => [Fast_tac 1]))
    26         ["f(x) : (UN x. {f(x)})",
    27          "f x y : (UN x y. {f x y})",
    28          "!!a. (!x. a ~= f(x)) ==> a ~: (UN x. {f(x)})",
    29          "!!a. (!x y. a ~= f x y) ==> a ~: (UN x y. {f x y})"];
    30 
    31 (* 2 Lemmas to add to set_lemmas ... , used also for action handling, 
    32    namely for Intersections and the empty list (compatibility of IOA!)  *)
    33 goal Set.thy "(UN b.{x. x=f(b)})= (UN b.{f(b)})"; 
    34  by (rtac set_ext 1);
    35  by (Fast_tac 1);
    36 val singleton_set =result();
    37 
    38 goal HOL.thy "((A|B)=False) = ((~A)&(~B))";
    39  by (Fast_tac 1);
    40 val de_morgan = result();
    41 
    42 (* Lists *)
    43 
    44 val list_ss = simpset_of List.thy;
    45 
    46 goal List.thy "hd(l@m) = (if l~=[] then hd(l) else hd(m))";
    47 by (induct_tac "l" 1);
    48 by (simp_tac list_ss 1);
    49 by (simp_tac list_ss 1);
    50 val hd_append =result();
    51 
    52 goal List.thy "l ~= [] --> (? x xs. l = (x#xs))";
    53  by (induct_tac "l" 1);
    54  by (simp_tac list_ss 1);
    55  by (Fast_tac 1);
    56 qed"cons_not_nil";