src/CCL/mono.ML
author wenzelm
Wed, 03 Feb 1999 20:25:53 +0100
changeset 6219 b360065c2b07
parent 1459 d12da312eff4
child 17456 bcf7544875b2
permissions -rw-r--r--
check_thy: include ML stamp;
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
1459
d12da312eff4 expanded tabs
clasohm
parents: 757
diff changeset
     1
(*  Title:      CCL/mono
0
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
     2
    ID:         $Id$
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
     3
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
     4
Modified version of
1459
d12da312eff4 expanded tabs
clasohm
parents: 757
diff changeset
     5
    Title:      HOL/mono
d12da312eff4 expanded tabs
clasohm
parents: 757
diff changeset
     6
    Author:     Lawrence C Paulson, Cambridge University Computer Laboratory
0
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
     7
    Copyright   1991  University of Cambridge
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
     8
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
     9
Monotonicity of various operations
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    10
*)
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    11
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    12
writeln"File HOL/mono";
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    13
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    14
val prems = goal Set.thy "A<=B ==> Union(A) <= Union(B)";
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    15
by (cfast_tac prems 1);
757
2ca12511676d added qed and qed_goal[w]
clasohm
parents: 0
diff changeset
    16
qed "Union_mono";
0
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    17
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    18
val prems = goal Set.thy "[| B<=A |] ==> Inter(A) <= Inter(B)";
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    19
by (cfast_tac prems 1);
757
2ca12511676d added qed and qed_goal[w]
clasohm
parents: 0
diff changeset
    20
qed "Inter_anti_mono";
0
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    21
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    22
val prems = goal Set.thy
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    23
    "[| A<=B;  !!x. x:A ==> f(x)<=g(x) |] ==> \
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    24
\    (UN x:A. f(x)) <= (UN x:B. g(x))";
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    25
by (REPEAT (eresolve_tac [UN_E,ssubst] 1
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    26
     ORELSE ares_tac ((prems RL [subsetD]) @ [subsetI,UN_I]) 1));
757
2ca12511676d added qed and qed_goal[w]
clasohm
parents: 0
diff changeset
    27
qed "UN_mono";
0
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    28
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    29
val prems = goal Set.thy
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    30
    "[| B<=A;  !!x. x:A ==> f(x)<=g(x) |] ==> \
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    31
\    (INT x:A. f(x)) <= (INT x:A. g(x))";
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    32
by (REPEAT (ares_tac ((prems RL [subsetD]) @ [subsetI,INT_I]) 1
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    33
     ORELSE etac INT_D 1));
757
2ca12511676d added qed and qed_goal[w]
clasohm
parents: 0
diff changeset
    34
qed "INT_anti_mono";
0
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    35
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    36
val prems = goal Set.thy "[| A<=C;  B<=D |] ==> A Un B <= C Un D";
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    37
by (cfast_tac prems 1);
757
2ca12511676d added qed and qed_goal[w]
clasohm
parents: 0
diff changeset
    38
qed "Un_mono";
0
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    39
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    40
val prems = goal Set.thy "[| A<=C;  B<=D |] ==> A Int B <= C Int D";
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    41
by (cfast_tac prems 1);
757
2ca12511676d added qed and qed_goal[w]
clasohm
parents: 0
diff changeset
    42
qed "Int_mono";
0
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    43
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    44
val prems = goal Set.thy "[| A<=B |] ==> Compl(B) <= Compl(A)";
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    45
by (cfast_tac prems 1);
757
2ca12511676d added qed and qed_goal[w]
clasohm
parents: 0
diff changeset
    46
qed "Compl_anti_mono";