src/HOL/mono.ML
author nipkow
Mon Feb 19 18:04:41 1996 +0100 (1996-02-19)
changeset 1515 4ed79ebab64d
parent 1465 5d7a7e439cec
child 1760 6f41a494f3b1
permissions -rw-r--r--
Introduced normalize_thm into HOL.ML

Corrected some dependencies among Sum, Prod and mono.

Extended RelPow
clasohm@1465
     1
(*  Title:      HOL/mono.ML
clasohm@923
     2
    ID:         $Id$
clasohm@1465
     3
    Author:     Lawrence C Paulson, Cambridge University Computer Laboratory
clasohm@923
     4
    Copyright   1991  University of Cambridge
clasohm@923
     5
clasohm@923
     6
Monotonicity of various operations
clasohm@923
     7
*)
clasohm@923
     8
clasohm@923
     9
goal Set.thy "!!A B. A<=B ==> f``A <= f``B";
clasohm@923
    10
by (fast_tac set_cs 1);
clasohm@923
    11
qed "image_mono";
clasohm@923
    12
clasohm@923
    13
goal Set.thy "!!A B. A<=B ==> Pow(A) <= Pow(B)";
clasohm@923
    14
by (fast_tac set_cs 1);
clasohm@923
    15
qed "Pow_mono";
clasohm@923
    16
clasohm@923
    17
goal Set.thy "!!A B. A<=B ==> Union(A) <= Union(B)";
clasohm@923
    18
by (fast_tac set_cs 1);
clasohm@923
    19
qed "Union_mono";
clasohm@923
    20
clasohm@923
    21
goal Set.thy "!!A B. B<=A ==> Inter(A) <= Inter(B)";
clasohm@923
    22
by (fast_tac set_cs 1);
clasohm@923
    23
qed "Inter_anti_mono";
clasohm@923
    24
clasohm@923
    25
val prems = goal Set.thy
clasohm@923
    26
    "[| A<=B;  !!x. x:A ==> f(x)<=g(x) |] ==> \
clasohm@923
    27
\    (UN x:A. f(x)) <= (UN x:B. g(x))";
clasohm@923
    28
by (fast_tac (set_cs addIs (prems RL [subsetD])) 1);
clasohm@923
    29
qed "UN_mono";
clasohm@923
    30
clasohm@923
    31
val [prem] = goal Set.thy
clasohm@923
    32
    "[| !!x. f(x)<=g(x) |] ==> (UN x. f(x)) <= (UN x. g(x))";
clasohm@923
    33
by (fast_tac (set_cs addIs [prem RS subsetD]) 1);
clasohm@923
    34
qed "UN1_mono";
clasohm@923
    35
clasohm@923
    36
val prems = goal Set.thy
clasohm@923
    37
    "[| B<=A;  !!x. x:A ==> f(x)<=g(x) |] ==> \
clasohm@923
    38
\    (INT x:A. f(x)) <= (INT x:A. g(x))";
clasohm@923
    39
by (fast_tac (set_cs addIs (prems RL [subsetD])) 1);
clasohm@923
    40
qed "INT_anti_mono";
clasohm@923
    41
clasohm@923
    42
(*The inclusion is POSITIVE! *)
clasohm@923
    43
val [prem] = goal Set.thy
clasohm@923
    44
    "[| !!x. f(x)<=g(x) |] ==> (INT x. f(x)) <= (INT x. g(x))";
clasohm@923
    45
by (fast_tac (set_cs addIs [prem RS subsetD]) 1);
clasohm@923
    46
qed "INT1_mono";
clasohm@923
    47
clasohm@923
    48
goal Set.thy "!!A B. [| A<=C;  B<=D |] ==> A Un B <= C Un D";
clasohm@923
    49
by (fast_tac set_cs 1);
clasohm@923
    50
qed "Un_mono";
clasohm@923
    51
clasohm@923
    52
goal Set.thy "!!A B. [| A<=C;  B<=D |] ==> A Int B <= C Int D";
clasohm@923
    53
by (fast_tac set_cs 1);
clasohm@923
    54
qed "Int_mono";
clasohm@923
    55
clasohm@923
    56
goal Set.thy "!!A::'a set. [| A<=C;  D<=B |] ==> A-B <= C-D";
clasohm@923
    57
by (fast_tac set_cs 1);
clasohm@923
    58
qed "Diff_mono";
clasohm@923
    59
clasohm@923
    60
goal Set.thy "!!A B. A<=B ==> Compl(B) <= Compl(A)";
clasohm@923
    61
by (fast_tac set_cs 1);
clasohm@923
    62
qed "Compl_anti_mono";
clasohm@923
    63
clasohm@923
    64
(** Monotonicity of implications.  For inductive definitions **)
clasohm@923
    65
clasohm@923
    66
goal Set.thy "!!A B x. A<=B ==> x:A --> x:B";
clasohm@923
    67
by (rtac impI 1);
clasohm@923
    68
by (etac subsetD 1);
clasohm@923
    69
by (assume_tac 1);
clasohm@923
    70
qed "in_mono";
clasohm@923
    71
clasohm@923
    72
goal HOL.thy "!!P1 P2 Q1 Q2. [| P1-->Q1; P2-->Q2 |] ==> (P1&P2) --> (Q1&Q2)";
clasohm@923
    73
by (fast_tac HOL_cs 1);
clasohm@923
    74
qed "conj_mono";
clasohm@923
    75
clasohm@923
    76
goal HOL.thy "!!P1 P2 Q1 Q2. [| P1-->Q1; P2-->Q2 |] ==> (P1|P2) --> (Q1|Q2)";
clasohm@923
    77
by (fast_tac HOL_cs 1);
clasohm@923
    78
qed "disj_mono";
clasohm@923
    79
clasohm@923
    80
goal HOL.thy "!!P1 P2 Q1 Q2.[| Q1-->P1; P2-->Q2 |] ==> (P1-->P2)-->(Q1-->Q2)";
clasohm@923
    81
by (fast_tac HOL_cs 1);
clasohm@923
    82
qed "imp_mono";
clasohm@923
    83
clasohm@923
    84
goal HOL.thy "P-->P";
clasohm@923
    85
by (rtac impI 1);
clasohm@923
    86
by (assume_tac 1);
clasohm@923
    87
qed "imp_refl";
clasohm@923
    88
clasohm@923
    89
val [PQimp] = goal HOL.thy
clasohm@923
    90
    "[| !!x. P(x) --> Q(x) |] ==> (EX x.P(x)) --> (EX x.Q(x))";
clasohm@923
    91
by (fast_tac (HOL_cs addIs [PQimp RS mp]) 1);
clasohm@923
    92
qed "ex_mono";
clasohm@923
    93
clasohm@923
    94
val [PQimp] = goal HOL.thy
clasohm@923
    95
    "[| !!x. P(x) --> Q(x) |] ==> (ALL x.P(x)) --> (ALL x.Q(x))";
clasohm@923
    96
by (fast_tac (HOL_cs addIs [PQimp RS mp]) 1);
clasohm@923
    97
qed "all_mono";
clasohm@923
    98
clasohm@923
    99
val [PQimp] = goal Set.thy
clasohm@923
   100
    "[| !!x. P(x) --> Q(x) |] ==> Collect(P) <= Collect(Q)";
clasohm@923
   101
by (fast_tac (set_cs addIs [PQimp RS mp]) 1);
clasohm@923
   102
qed "Collect_mono";
clasohm@923
   103
clasohm@923
   104
(*Used in indrule.ML*)
clasohm@923
   105
val [subs,PQimp] = goal Set.thy
clasohm@923
   106
    "[| A<=B;  !!x. x:A ==> P(x) --> Q(x) \
clasohm@923
   107
\    |] ==> A Int Collect(P) <= B Int Collect(Q)";
clasohm@923
   108
by (fast_tac (set_cs addIs [subs RS subsetD, PQimp RS mp]) 1);
clasohm@923
   109
qed "Int_Collect_mono";
clasohm@923
   110
clasohm@923
   111
(*Used in intr_elim.ML and in individual datatype definitions*)
clasohm@923
   112
val basic_monos = [subset_refl, imp_refl, disj_mono, conj_mono, 
nipkow@1515
   113
                   ex_mono, Collect_mono, in_mono];
clasohm@923
   114