src/HOLCF/IOA/ABP/Lemmas.ML
author kleing
Mon, 21 Jun 2004 10:25:57 +0200
changeset 14981 e73f8140af78
parent 14401 477380c74c1d
child 15408 6001135caa91
permissions -rw-r--r--
Merged in license change from Isabelle2004
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
3072
a31419014be5 Old ABP files now running under the IOA meta theory based on HOLCF;
mueller
parents:
diff changeset
     1
(*  Title:      HOLCF/IOA/ABP/Lemmas.ML
a31419014be5 Old ABP files now running under the IOA meta theory based on HOLCF;
mueller
parents:
diff changeset
     2
    ID:         $Id$
12218
wenzelm
parents: 5192
diff changeset
     3
    Author:     Olaf Müller
3072
a31419014be5 Old ABP files now running under the IOA meta theory based on HOLCF;
mueller
parents:
diff changeset
     4
*)
a31419014be5 Old ABP files now running under the IOA meta theory based on HOLCF;
mueller
parents:
diff changeset
     5
a31419014be5 Old ABP files now running under the IOA meta theory based on HOLCF;
mueller
parents:
diff changeset
     6
(* Logic *)
a31419014be5 Old ABP files now running under the IOA meta theory based on HOLCF;
mueller
parents:
diff changeset
     7
a31419014be5 Old ABP files now running under the IOA meta theory based on HOLCF;
mueller
parents:
diff changeset
     8
goal HOL.thy "(~(A&B)) = ((~A)&B| ~B)";
a31419014be5 Old ABP files now running under the IOA meta theory based on HOLCF;
mueller
parents:
diff changeset
     9
by (Fast_tac 1);
a31419014be5 Old ABP files now running under the IOA meta theory based on HOLCF;
mueller
parents:
diff changeset
    10
val and_de_morgan_and_absorbe = result();
a31419014be5 Old ABP files now running under the IOA meta theory based on HOLCF;
mueller
parents:
diff changeset
    11
a31419014be5 Old ABP files now running under the IOA meta theory based on HOLCF;
mueller
parents:
diff changeset
    12
goal HOL.thy "(if C then A else B) --> (A|B)";
4833
2e53109d4bc8 Renamed expand_const -> split_const
nipkow
parents: 4423
diff changeset
    13
by (stac split_if 1);
3072
a31419014be5 Old ABP files now running under the IOA meta theory based on HOLCF;
mueller
parents:
diff changeset
    14
by (Fast_tac 1);
a31419014be5 Old ABP files now running under the IOA meta theory based on HOLCF;
mueller
parents:
diff changeset
    15
val bool_if_impl_or = result();
a31419014be5 Old ABP files now running under the IOA meta theory based on HOLCF;
mueller
parents:
diff changeset
    16
a31419014be5 Old ABP files now running under the IOA meta theory based on HOLCF;
mueller
parents:
diff changeset
    17
(* Sets *)
a31419014be5 Old ABP files now running under the IOA meta theory based on HOLCF;
mueller
parents:
diff changeset
    18
a31419014be5 Old ABP files now running under the IOA meta theory based on HOLCF;
mueller
parents:
diff changeset
    19
val set_lemmas =
a31419014be5 Old ABP files now running under the IOA meta theory based on HOLCF;
mueller
parents:
diff changeset
    20
   map (fn s => prove_goal Set.thy s (fn _ => [Fast_tac 1]))
a31419014be5 Old ABP files now running under the IOA meta theory based on HOLCF;
mueller
parents:
diff changeset
    21
        ["f(x) : (UN x. {f(x)})",
a31419014be5 Old ABP files now running under the IOA meta theory based on HOLCF;
mueller
parents:
diff changeset
    22
         "f x y : (UN x y. {f x y})",
a31419014be5 Old ABP files now running under the IOA meta theory based on HOLCF;
mueller
parents:
diff changeset
    23
         "!!a. (!x. a ~= f(x)) ==> a ~: (UN x. {f(x)})",
a31419014be5 Old ABP files now running under the IOA meta theory based on HOLCF;
mueller
parents:
diff changeset
    24
         "!!a. (!x y. a ~= f x y) ==> a ~: (UN x y. {f x y})"];
a31419014be5 Old ABP files now running under the IOA meta theory based on HOLCF;
mueller
parents:
diff changeset
    25
a31419014be5 Old ABP files now running under the IOA meta theory based on HOLCF;
mueller
parents:
diff changeset
    26
(* 2 Lemmas to add to set_lemmas ... , used also for action handling, 
a31419014be5 Old ABP files now running under the IOA meta theory based on HOLCF;
mueller
parents:
diff changeset
    27
   namely for Intersections and the empty list (compatibility of IOA!)  *)
3852
e694c660055b fixed dots;
wenzelm
parents: 3072
diff changeset
    28
goal Set.thy "(UN b.{x. x=f(b)})= (UN b.{f(b)})"; 
3072
a31419014be5 Old ABP files now running under the IOA meta theory based on HOLCF;
mueller
parents:
diff changeset
    29
 by (rtac set_ext 1);
a31419014be5 Old ABP files now running under the IOA meta theory based on HOLCF;
mueller
parents:
diff changeset
    30
 by (Fast_tac 1);
a31419014be5 Old ABP files now running under the IOA meta theory based on HOLCF;
mueller
parents:
diff changeset
    31
val singleton_set =result();
a31419014be5 Old ABP files now running under the IOA meta theory based on HOLCF;
mueller
parents:
diff changeset
    32
a31419014be5 Old ABP files now running under the IOA meta theory based on HOLCF;
mueller
parents:
diff changeset
    33
goal HOL.thy "((A|B)=False) = ((~A)&(~B))";
a31419014be5 Old ABP files now running under the IOA meta theory based on HOLCF;
mueller
parents:
diff changeset
    34
 by (Fast_tac 1);
a31419014be5 Old ABP files now running under the IOA meta theory based on HOLCF;
mueller
parents:
diff changeset
    35
val de_morgan = result();
a31419014be5 Old ABP files now running under the IOA meta theory based on HOLCF;
mueller
parents:
diff changeset
    36
a31419014be5 Old ABP files now running under the IOA meta theory based on HOLCF;
mueller
parents:
diff changeset
    37
(* Lists *)
a31419014be5 Old ABP files now running under the IOA meta theory based on HOLCF;
mueller
parents:
diff changeset
    38
14401
477380c74c1d removal of the legacy ML structure List
paulson
parents: 13524
diff changeset
    39
Goal "hd(l@m) = (if l~=[] then hd(l) else hd(m))";
5192
704dd3a6d47d Adapted to new datatype package.
berghofe
parents: 4833
diff changeset
    40
by (induct_tac "l" 1);
14401
477380c74c1d removal of the legacy ML structure List
paulson
parents: 13524
diff changeset
    41
by (Simp_tac 1);
477380c74c1d removal of the legacy ML structure List
paulson
parents: 13524
diff changeset
    42
by (Simp_tac 1);
3072
a31419014be5 Old ABP files now running under the IOA meta theory based on HOLCF;
mueller
parents:
diff changeset
    43
val hd_append =result();
a31419014be5 Old ABP files now running under the IOA meta theory based on HOLCF;
mueller
parents:
diff changeset
    44
14401
477380c74c1d removal of the legacy ML structure List
paulson
parents: 13524
diff changeset
    45
Goal "l ~= [] --> (? x xs. l = (x#xs))";
5192
704dd3a6d47d Adapted to new datatype package.
berghofe
parents: 4833
diff changeset
    46
 by (induct_tac "l" 1);
14401
477380c74c1d removal of the legacy ML structure List
paulson
parents: 13524
diff changeset
    47
 by (Simp_tac 1);
3072
a31419014be5 Old ABP files now running under the IOA meta theory based on HOLCF;
mueller
parents:
diff changeset
    48
 by (Fast_tac 1);
a31419014be5 Old ABP files now running under the IOA meta theory based on HOLCF;
mueller
parents:
diff changeset
    49
qed"cons_not_nil";