src/HOL/subset.ML
author wenzelm
Thu, 15 Nov 2001 18:20:13 +0100
changeset 12207 4dff931b852f
parent 11979 0a3dace545c5
permissions -rw-r--r--
added Induct/Binary_Trees.thy, Induct/Tree_Forest (converted from former ex/TF.ML ex/TF.thy ex/Term.ML ex/Term.thy);
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
11603
wenzelm
parents: 7007
diff changeset
     1
(*  Title:      HOL/subset.ML
923
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
     2
    ID:         $Id$
1465
5d7a7e439cec expanded tabs
clasohm
parents: 923
diff changeset
     3
    Author:     Lawrence C Paulson, Cambridge University Computer Laboratory
923
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
     4
    Copyright   1991  University of Cambridge
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
     5
11603
wenzelm
parents: 7007
diff changeset
     6
Derived rules involving subsets.  Union and Intersection as lattice
wenzelm
parents: 7007
diff changeset
     7
operations.
923
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
     8
*)
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
     9
11979
0a3dace545c5 converted theory "Set";
wenzelm
parents: 11603
diff changeset
    10
(* legacy ML bindings *)
0a3dace545c5 converted theory "Set";
wenzelm
parents: 11603
diff changeset
    11
0a3dace545c5 converted theory "Set";
wenzelm
parents: 11603
diff changeset
    12
val Ball_def = thm "Ball_def";
0a3dace545c5 converted theory "Set";
wenzelm
parents: 11603
diff changeset
    13
val Bex_def = thm "Bex_def";
0a3dace545c5 converted theory "Set";
wenzelm
parents: 11603
diff changeset
    14
val Collect_mem_eq = thm "Collect_mem_eq";
0a3dace545c5 converted theory "Set";
wenzelm
parents: 11603
diff changeset
    15
val Compl_def = thm "Compl_def";
0a3dace545c5 converted theory "Set";
wenzelm
parents: 11603
diff changeset
    16
val INTER_def = thm "INTER_def";
0a3dace545c5 converted theory "Set";
wenzelm
parents: 11603
diff changeset
    17
val Int_def = thm "Int_def";
0a3dace545c5 converted theory "Set";
wenzelm
parents: 11603
diff changeset
    18
val Inter_def = thm "Inter_def";
0a3dace545c5 converted theory "Set";
wenzelm
parents: 11603
diff changeset
    19
val Pow_def = thm "Pow_def";
0a3dace545c5 converted theory "Set";
wenzelm
parents: 11603
diff changeset
    20
val UNION_def = thm "UNION_def";
0a3dace545c5 converted theory "Set";
wenzelm
parents: 11603
diff changeset
    21
val UNIV_def = thm "UNIV_def";
0a3dace545c5 converted theory "Set";
wenzelm
parents: 11603
diff changeset
    22
val Un_def = thm "Un_def";
0a3dace545c5 converted theory "Set";
wenzelm
parents: 11603
diff changeset
    23
val Union_def = thm "Union_def";
0a3dace545c5 converted theory "Set";
wenzelm
parents: 11603
diff changeset
    24
val empty_def = thm "empty_def";
0a3dace545c5 converted theory "Set";
wenzelm
parents: 11603
diff changeset
    25
val image_def = thm "image_def";
0a3dace545c5 converted theory "Set";
wenzelm
parents: 11603
diff changeset
    26
val insert_def = thm "insert_def";
0a3dace545c5 converted theory "Set";
wenzelm
parents: 11603
diff changeset
    27
val mem_Collect_eq = thm "mem_Collect_eq";
0a3dace545c5 converted theory "Set";
wenzelm
parents: 11603
diff changeset
    28
val psubset_def = thm "psubset_def";
0a3dace545c5 converted theory "Set";
wenzelm
parents: 11603
diff changeset
    29
val set_diff_def = thm "set_diff_def";
0a3dace545c5 converted theory "Set";
wenzelm
parents: 11603
diff changeset
    30
val subset_def = thm "subset_def";
0a3dace545c5 converted theory "Set";
wenzelm
parents: 11603
diff changeset
    31
val CollectI = thm "CollectI";
0a3dace545c5 converted theory "Set";
wenzelm
parents: 11603
diff changeset
    32
val CollectD = thm "CollectD";
0a3dace545c5 converted theory "Set";
wenzelm
parents: 11603
diff changeset
    33
val set_ext = thm "set_ext";
0a3dace545c5 converted theory "Set";
wenzelm
parents: 11603
diff changeset
    34
val Collect_cong = thm "Collect_cong";
0a3dace545c5 converted theory "Set";
wenzelm
parents: 11603
diff changeset
    35
val CollectE = thm "CollectE";
0a3dace545c5 converted theory "Set";
wenzelm
parents: 11603
diff changeset
    36
val ballI = thm "ballI";
0a3dace545c5 converted theory "Set";
wenzelm
parents: 11603
diff changeset
    37
val strip = thms "strip";
0a3dace545c5 converted theory "Set";
wenzelm
parents: 11603
diff changeset
    38
val bspec = thm "bspec";
0a3dace545c5 converted theory "Set";
wenzelm
parents: 11603
diff changeset
    39
val ballE = thm "ballE";
0a3dace545c5 converted theory "Set";
wenzelm
parents: 11603
diff changeset
    40
val bexI = thm "bexI";
0a3dace545c5 converted theory "Set";
wenzelm
parents: 11603
diff changeset
    41
val rev_bexI = thm "rev_bexI";
0a3dace545c5 converted theory "Set";
wenzelm
parents: 11603
diff changeset
    42
val bexCI = thm "bexCI";
0a3dace545c5 converted theory "Set";
wenzelm
parents: 11603
diff changeset
    43
val bexE = thm "bexE";
0a3dace545c5 converted theory "Set";
wenzelm
parents: 11603
diff changeset
    44
val ball_triv = thm "ball_triv";
0a3dace545c5 converted theory "Set";
wenzelm
parents: 11603
diff changeset
    45
val bex_triv = thm "bex_triv";
0a3dace545c5 converted theory "Set";
wenzelm
parents: 11603
diff changeset
    46
val bex_triv_one_point1 = thm "bex_triv_one_point1";
0a3dace545c5 converted theory "Set";
wenzelm
parents: 11603
diff changeset
    47
val bex_triv_one_point2 = thm "bex_triv_one_point2";
0a3dace545c5 converted theory "Set";
wenzelm
parents: 11603
diff changeset
    48
val bex_one_point1 = thm "bex_one_point1";
0a3dace545c5 converted theory "Set";
wenzelm
parents: 11603
diff changeset
    49
val bex_one_point2 = thm "bex_one_point2";
0a3dace545c5 converted theory "Set";
wenzelm
parents: 11603
diff changeset
    50
val ball_one_point1 = thm "ball_one_point1";
0a3dace545c5 converted theory "Set";
wenzelm
parents: 11603
diff changeset
    51
val ball_one_point2 = thm "ball_one_point2";
0a3dace545c5 converted theory "Set";
wenzelm
parents: 11603
diff changeset
    52
val ball_cong = thm "ball_cong";
0a3dace545c5 converted theory "Set";
wenzelm
parents: 11603
diff changeset
    53
val bex_cong = thm "bex_cong";
0a3dace545c5 converted theory "Set";
wenzelm
parents: 11603
diff changeset
    54
val subsetI = thm "subsetI";
0a3dace545c5 converted theory "Set";
wenzelm
parents: 11603
diff changeset
    55
val subsetD = thm "subsetD";
0a3dace545c5 converted theory "Set";
wenzelm
parents: 11603
diff changeset
    56
val rev_subsetD = thm "rev_subsetD";
0a3dace545c5 converted theory "Set";
wenzelm
parents: 11603
diff changeset
    57
val subsetCE = thm "subsetCE";
0a3dace545c5 converted theory "Set";
wenzelm
parents: 11603
diff changeset
    58
val contra_subsetD = thm "contra_subsetD";
0a3dace545c5 converted theory "Set";
wenzelm
parents: 11603
diff changeset
    59
val subset_refl = thm "subset_refl";
0a3dace545c5 converted theory "Set";
wenzelm
parents: 11603
diff changeset
    60
val subset_trans = thm "subset_trans";
0a3dace545c5 converted theory "Set";
wenzelm
parents: 11603
diff changeset
    61
val subset_antisym = thm "subset_antisym";
0a3dace545c5 converted theory "Set";
wenzelm
parents: 11603
diff changeset
    62
val equalityI = thm "equalityI";
0a3dace545c5 converted theory "Set";
wenzelm
parents: 11603
diff changeset
    63
val equalityD1 = thm "equalityD1";
0a3dace545c5 converted theory "Set";
wenzelm
parents: 11603
diff changeset
    64
val equalityD2 = thm "equalityD2";
0a3dace545c5 converted theory "Set";
wenzelm
parents: 11603
diff changeset
    65
val equalityE = thm "equalityE";
0a3dace545c5 converted theory "Set";
wenzelm
parents: 11603
diff changeset
    66
val equalityCE = thm "equalityCE";
0a3dace545c5 converted theory "Set";
wenzelm
parents: 11603
diff changeset
    67
val setup_induction = thm "setup_induction";
0a3dace545c5 converted theory "Set";
wenzelm
parents: 11603
diff changeset
    68
val eqset_imp_iff = thm "eqset_imp_iff";
0a3dace545c5 converted theory "Set";
wenzelm
parents: 11603
diff changeset
    69
val UNIV_I = thm "UNIV_I";
0a3dace545c5 converted theory "Set";
wenzelm
parents: 11603
diff changeset
    70
val UNIV_witness = thm "UNIV_witness";
0a3dace545c5 converted theory "Set";
wenzelm
parents: 11603
diff changeset
    71
val subset_UNIV = thm "subset_UNIV";
0a3dace545c5 converted theory "Set";
wenzelm
parents: 11603
diff changeset
    72
val ball_UNIV = thm "ball_UNIV";
0a3dace545c5 converted theory "Set";
wenzelm
parents: 11603
diff changeset
    73
val bex_UNIV = thm "bex_UNIV";
0a3dace545c5 converted theory "Set";
wenzelm
parents: 11603
diff changeset
    74
val empty_iff = thm "empty_iff";
0a3dace545c5 converted theory "Set";
wenzelm
parents: 11603
diff changeset
    75
val emptyE = thm "emptyE";
0a3dace545c5 converted theory "Set";
wenzelm
parents: 11603
diff changeset
    76
val empty_subsetI = thm "empty_subsetI";
0a3dace545c5 converted theory "Set";
wenzelm
parents: 11603
diff changeset
    77
val equals0I = thm "equals0I";
0a3dace545c5 converted theory "Set";
wenzelm
parents: 11603
diff changeset
    78
val equals0D = thm "equals0D";
0a3dace545c5 converted theory "Set";
wenzelm
parents: 11603
diff changeset
    79
val ball_empty = thm "ball_empty";
0a3dace545c5 converted theory "Set";
wenzelm
parents: 11603
diff changeset
    80
val bex_empty = thm "bex_empty";
0a3dace545c5 converted theory "Set";
wenzelm
parents: 11603
diff changeset
    81
val UNIV_not_empty = thm "UNIV_not_empty";
0a3dace545c5 converted theory "Set";
wenzelm
parents: 11603
diff changeset
    82
val Pow_iff = thm "Pow_iff";
0a3dace545c5 converted theory "Set";
wenzelm
parents: 11603
diff changeset
    83
val PowI = thm "PowI";
0a3dace545c5 converted theory "Set";
wenzelm
parents: 11603
diff changeset
    84
val PowD = thm "PowD";
0a3dace545c5 converted theory "Set";
wenzelm
parents: 11603
diff changeset
    85
val Pow_bottom = thm "Pow_bottom";
0a3dace545c5 converted theory "Set";
wenzelm
parents: 11603
diff changeset
    86
val Pow_top = thm "Pow_top";
0a3dace545c5 converted theory "Set";
wenzelm
parents: 11603
diff changeset
    87
val Compl_iff = thm "Compl_iff";
0a3dace545c5 converted theory "Set";
wenzelm
parents: 11603
diff changeset
    88
val ComplI = thm "ComplI";
0a3dace545c5 converted theory "Set";
wenzelm
parents: 11603
diff changeset
    89
val ComplD = thm "ComplD";
0a3dace545c5 converted theory "Set";
wenzelm
parents: 11603
diff changeset
    90
val ComplE = thm "ComplE";
0a3dace545c5 converted theory "Set";
wenzelm
parents: 11603
diff changeset
    91
val Un_iff = thm "Un_iff";
0a3dace545c5 converted theory "Set";
wenzelm
parents: 11603
diff changeset
    92
val UnI1 = thm "UnI1";
0a3dace545c5 converted theory "Set";
wenzelm
parents: 11603
diff changeset
    93
val UnI2 = thm "UnI2";
0a3dace545c5 converted theory "Set";
wenzelm
parents: 11603
diff changeset
    94
val UnCI = thm "UnCI";
0a3dace545c5 converted theory "Set";
wenzelm
parents: 11603
diff changeset
    95
val UnE = thm "UnE";
0a3dace545c5 converted theory "Set";
wenzelm
parents: 11603
diff changeset
    96
val Int_iff = thm "Int_iff";
0a3dace545c5 converted theory "Set";
wenzelm
parents: 11603
diff changeset
    97
val IntI = thm "IntI";
0a3dace545c5 converted theory "Set";
wenzelm
parents: 11603
diff changeset
    98
val IntD1 = thm "IntD1";
0a3dace545c5 converted theory "Set";
wenzelm
parents: 11603
diff changeset
    99
val IntD2 = thm "IntD2";
0a3dace545c5 converted theory "Set";
wenzelm
parents: 11603
diff changeset
   100
val IntE = thm "IntE";
0a3dace545c5 converted theory "Set";
wenzelm
parents: 11603
diff changeset
   101
val Diff_iff = thm "Diff_iff";
0a3dace545c5 converted theory "Set";
wenzelm
parents: 11603
diff changeset
   102
val DiffI = thm "DiffI";
0a3dace545c5 converted theory "Set";
wenzelm
parents: 11603
diff changeset
   103
val DiffD1 = thm "DiffD1";
0a3dace545c5 converted theory "Set";
wenzelm
parents: 11603
diff changeset
   104
val DiffD2 = thm "DiffD2";
0a3dace545c5 converted theory "Set";
wenzelm
parents: 11603
diff changeset
   105
val DiffE = thm "DiffE";
0a3dace545c5 converted theory "Set";
wenzelm
parents: 11603
diff changeset
   106
val insert_iff = thm "insert_iff";
0a3dace545c5 converted theory "Set";
wenzelm
parents: 11603
diff changeset
   107
val insertI1 = thm "insertI1";
0a3dace545c5 converted theory "Set";
wenzelm
parents: 11603
diff changeset
   108
val insertI2 = thm "insertI2";
0a3dace545c5 converted theory "Set";
wenzelm
parents: 11603
diff changeset
   109
val insertE = thm "insertE";
0a3dace545c5 converted theory "Set";
wenzelm
parents: 11603
diff changeset
   110
val insertCI = thm "insertCI";
0a3dace545c5 converted theory "Set";
wenzelm
parents: 11603
diff changeset
   111
val subset_insert_iff = thm "subset_insert_iff";
0a3dace545c5 converted theory "Set";
wenzelm
parents: 11603
diff changeset
   112
val singletonI = thm "singletonI";
0a3dace545c5 converted theory "Set";
wenzelm
parents: 11603
diff changeset
   113
val singletonD = thm "singletonD";
0a3dace545c5 converted theory "Set";
wenzelm
parents: 11603
diff changeset
   114
val singletonE = thm "singletonE";
0a3dace545c5 converted theory "Set";
wenzelm
parents: 11603
diff changeset
   115
val singleton_iff = thm "singleton_iff";
0a3dace545c5 converted theory "Set";
wenzelm
parents: 11603
diff changeset
   116
val singleton_inject = thm "singleton_inject";
0a3dace545c5 converted theory "Set";
wenzelm
parents: 11603
diff changeset
   117
val singleton_insert_inj_eq = thm "singleton_insert_inj_eq";
0a3dace545c5 converted theory "Set";
wenzelm
parents: 11603
diff changeset
   118
val singleton_insert_inj_eq' = thm "singleton_insert_inj_eq'";
0a3dace545c5 converted theory "Set";
wenzelm
parents: 11603
diff changeset
   119
val subset_singletonD = thm "subset_singletonD";
0a3dace545c5 converted theory "Set";
wenzelm
parents: 11603
diff changeset
   120
val singleton_conv = thm "singleton_conv";
0a3dace545c5 converted theory "Set";
wenzelm
parents: 11603
diff changeset
   121
val singleton_conv2 = thm "singleton_conv2";
0a3dace545c5 converted theory "Set";
wenzelm
parents: 11603
diff changeset
   122
val diff_single_insert = thm "diff_single_insert";
0a3dace545c5 converted theory "Set";
wenzelm
parents: 11603
diff changeset
   123
val UN_iff = thm "UN_iff";
0a3dace545c5 converted theory "Set";
wenzelm
parents: 11603
diff changeset
   124
val UN_I = thm "UN_I";
0a3dace545c5 converted theory "Set";
wenzelm
parents: 11603
diff changeset
   125
val UN_E = thm "UN_E";
0a3dace545c5 converted theory "Set";
wenzelm
parents: 11603
diff changeset
   126
val UN_cong = thm "UN_cong";
0a3dace545c5 converted theory "Set";
wenzelm
parents: 11603
diff changeset
   127
val INT_iff = thm "INT_iff";
0a3dace545c5 converted theory "Set";
wenzelm
parents: 11603
diff changeset
   128
val INT_I = thm "INT_I";
0a3dace545c5 converted theory "Set";
wenzelm
parents: 11603
diff changeset
   129
val INT_D = thm "INT_D";
0a3dace545c5 converted theory "Set";
wenzelm
parents: 11603
diff changeset
   130
val INT_E = thm "INT_E";
0a3dace545c5 converted theory "Set";
wenzelm
parents: 11603
diff changeset
   131
val INT_cong = thm "INT_cong";
0a3dace545c5 converted theory "Set";
wenzelm
parents: 11603
diff changeset
   132
val Union_iff = thm "Union_iff";
0a3dace545c5 converted theory "Set";
wenzelm
parents: 11603
diff changeset
   133
val UnionI = thm "UnionI";
0a3dace545c5 converted theory "Set";
wenzelm
parents: 11603
diff changeset
   134
val UnionE = thm "UnionE";
0a3dace545c5 converted theory "Set";
wenzelm
parents: 11603
diff changeset
   135
val Inter_iff = thm "Inter_iff";
0a3dace545c5 converted theory "Set";
wenzelm
parents: 11603
diff changeset
   136
val InterI = thm "InterI";
0a3dace545c5 converted theory "Set";
wenzelm
parents: 11603
diff changeset
   137
val InterD = thm "InterD";
0a3dace545c5 converted theory "Set";
wenzelm
parents: 11603
diff changeset
   138
val InterE = thm "InterE";
0a3dace545c5 converted theory "Set";
wenzelm
parents: 11603
diff changeset
   139
val image_eqI = thm "image_eqI";
0a3dace545c5 converted theory "Set";
wenzelm
parents: 11603
diff changeset
   140
val imageI = thm "imageI";
0a3dace545c5 converted theory "Set";
wenzelm
parents: 11603
diff changeset
   141
val rev_image_eqI = thm "rev_image_eqI";
0a3dace545c5 converted theory "Set";
wenzelm
parents: 11603
diff changeset
   142
val imageE = thm "imageE";
0a3dace545c5 converted theory "Set";
wenzelm
parents: 11603
diff changeset
   143
val image_Un = thm "image_Un";
0a3dace545c5 converted theory "Set";
wenzelm
parents: 11603
diff changeset
   144
val image_iff = thm "image_iff";
0a3dace545c5 converted theory "Set";
wenzelm
parents: 11603
diff changeset
   145
val image_subset_iff = thm "image_subset_iff";
0a3dace545c5 converted theory "Set";
wenzelm
parents: 11603
diff changeset
   146
val subset_image_iff = thm "subset_image_iff";
0a3dace545c5 converted theory "Set";
wenzelm
parents: 11603
diff changeset
   147
val image_subsetI = thm "image_subsetI";
0a3dace545c5 converted theory "Set";
wenzelm
parents: 11603
diff changeset
   148
val range_eqI = thm "range_eqI";
0a3dace545c5 converted theory "Set";
wenzelm
parents: 11603
diff changeset
   149
val rangeI = thm "rangeI";
0a3dace545c5 converted theory "Set";
wenzelm
parents: 11603
diff changeset
   150
val rangeE = thm "rangeE";
0a3dace545c5 converted theory "Set";
wenzelm
parents: 11603
diff changeset
   151
val split_if_eq1 = thm "split_if_eq1";
0a3dace545c5 converted theory "Set";
wenzelm
parents: 11603
diff changeset
   152
val split_if_eq2 = thm "split_if_eq2";
0a3dace545c5 converted theory "Set";
wenzelm
parents: 11603
diff changeset
   153
val split_if_mem1 = thm "split_if_mem1";
0a3dace545c5 converted theory "Set";
wenzelm
parents: 11603
diff changeset
   154
val split_if_mem2 = thm "split_if_mem2";
0a3dace545c5 converted theory "Set";
wenzelm
parents: 11603
diff changeset
   155
val split_ifs = thms "split_ifs";
0a3dace545c5 converted theory "Set";
wenzelm
parents: 11603
diff changeset
   156
val mem_simps = thms "mem_simps";
0a3dace545c5 converted theory "Set";
wenzelm
parents: 11603
diff changeset
   157
val psubsetI = thm "psubsetI";
0a3dace545c5 converted theory "Set";
wenzelm
parents: 11603
diff changeset
   158
val psubset_insert_iff = thm "psubset_insert_iff";
0a3dace545c5 converted theory "Set";
wenzelm
parents: 11603
diff changeset
   159
val psubset_eq = thm "psubset_eq";
0a3dace545c5 converted theory "Set";
wenzelm
parents: 11603
diff changeset
   160
val psubset_imp_subset = thm "psubset_imp_subset";
0a3dace545c5 converted theory "Set";
wenzelm
parents: 11603
diff changeset
   161
val psubset_subset_trans = thm "psubset_subset_trans";
0a3dace545c5 converted theory "Set";
wenzelm
parents: 11603
diff changeset
   162
val subset_psubset_trans = thm "subset_psubset_trans";
0a3dace545c5 converted theory "Set";
wenzelm
parents: 11603
diff changeset
   163
val psubset_imp_ex_mem = thm "psubset_imp_ex_mem";
0a3dace545c5 converted theory "Set";
wenzelm
parents: 11603
diff changeset
   164
val atomize_ball = thm "atomize_ball";
0a3dace545c5 converted theory "Set";
wenzelm
parents: 11603
diff changeset
   165
0a3dace545c5 converted theory "Set";
wenzelm
parents: 11603
diff changeset
   166
923
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
   167
(*** insert ***)
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
   168
7007
b46ccfee8e59 qed_goal -> Goal
paulson
parents: 5316
diff changeset
   169
Goal "B <= insert a B";
b46ccfee8e59 qed_goal -> Goal
paulson
parents: 5316
diff changeset
   170
by (rtac subsetI 1);
b46ccfee8e59 qed_goal -> Goal
paulson
parents: 5316
diff changeset
   171
by (etac insertI2 1) ;
b46ccfee8e59 qed_goal -> Goal
paulson
parents: 5316
diff changeset
   172
qed "subset_insertI";
923
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
   173
5316
7a8975451a89 even more tidying of Goal commands
paulson
parents: 4159
diff changeset
   174
Goal "x ~: A ==> (A <= insert x B) = (A <= B)";
2893
2ee005e46d6d Calls Blast_tac. Tidied some proofs
paulson
parents: 2515
diff changeset
   175
by (Blast_tac 1);
1531
e5eb247ad13c Added a constant UNIV == {x.True}
nipkow
parents: 1465
diff changeset
   176
qed "subset_insert";
e5eb247ad13c Added a constant UNIV == {x.True}
nipkow
parents: 1465
diff changeset
   177
923
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
   178
(*** Big Union -- least upper bound of a set  ***)
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
   179
5316
7a8975451a89 even more tidying of Goal commands
paulson
parents: 4159
diff changeset
   180
Goal "B:A ==> B <= Union(A)";
7a8975451a89 even more tidying of Goal commands
paulson
parents: 4159
diff changeset
   181
by (REPEAT (ares_tac [subsetI,UnionI] 1));
923
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
   182
qed "Union_upper";
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
   183
5316
7a8975451a89 even more tidying of Goal commands
paulson
parents: 4159
diff changeset
   184
val [prem] = Goal "[| !!X. X:A ==> X<=C |] ==> Union(A) <= C";
1465
5d7a7e439cec expanded tabs
clasohm
parents: 923
diff changeset
   185
by (rtac subsetI 1);
923
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
   186
by (REPEAT (eresolve_tac [asm_rl, UnionE, prem RS subsetD] 1));
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
   187
qed "Union_least";
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
   188
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
   189
(** General union **)
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
   190
5316
7a8975451a89 even more tidying of Goal commands
paulson
parents: 4159
diff changeset
   191
Goal "a:A ==> B(a) <= (UN x:A. B(x))";
7a8975451a89 even more tidying of Goal commands
paulson
parents: 4159
diff changeset
   192
by (Blast_tac 1);
923
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
   193
qed "UN_upper";
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
   194
5316
7a8975451a89 even more tidying of Goal commands
paulson
parents: 4159
diff changeset
   195
val [prem] = Goal "[| !!x. x:A ==> B(x)<=C |] ==> (UN x:A. B(x)) <= C";
1465
5d7a7e439cec expanded tabs
clasohm
parents: 923
diff changeset
   196
by (rtac subsetI 1);
923
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
   197
by (REPEAT (eresolve_tac [asm_rl, UN_E, prem RS subsetD] 1));
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
   198
qed "UN_least";
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
   199
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
   200
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
   201
(*** Big Intersection -- greatest lower bound of a set ***)
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
   202
5316
7a8975451a89 even more tidying of Goal commands
paulson
parents: 4159
diff changeset
   203
Goal "B:A ==> Inter(A) <= B";
2893
2ee005e46d6d Calls Blast_tac. Tidied some proofs
paulson
parents: 2515
diff changeset
   204
by (Blast_tac 1);
923
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
   205
qed "Inter_lower";
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
   206
5316
7a8975451a89 even more tidying of Goal commands
paulson
parents: 4159
diff changeset
   207
val [prem] = Goal "[| !!X. X:A ==> C<=X |] ==> C <= Inter(A)";
1465
5d7a7e439cec expanded tabs
clasohm
parents: 923
diff changeset
   208
by (rtac (InterI RS subsetI) 1);
923
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
   209
by (REPEAT (eresolve_tac [asm_rl, prem RS subsetD] 1));
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
   210
qed "Inter_greatest";
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
   211
5316
7a8975451a89 even more tidying of Goal commands
paulson
parents: 4159
diff changeset
   212
Goal "a:A ==> (INT x:A. B(x)) <= B(a)";
7a8975451a89 even more tidying of Goal commands
paulson
parents: 4159
diff changeset
   213
by (Blast_tac 1);
923
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
   214
qed "INT_lower";
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
   215
5316
7a8975451a89 even more tidying of Goal commands
paulson
parents: 4159
diff changeset
   216
val [prem] = Goal "[| !!x. x:A ==> C<=B(x) |] ==> C <= (INT x:A. B(x))";
1465
5d7a7e439cec expanded tabs
clasohm
parents: 923
diff changeset
   217
by (rtac (INT_I RS subsetI) 1);
923
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
   218
by (REPEAT (eresolve_tac [asm_rl, prem RS subsetD] 1));
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
   219
qed "INT_greatest";
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
   220
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
   221
(*** Finite Union -- the least upper bound of 2 sets ***)
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
   222
5316
7a8975451a89 even more tidying of Goal commands
paulson
parents: 4159
diff changeset
   223
Goal "A <= A Un B";
2893
2ee005e46d6d Calls Blast_tac. Tidied some proofs
paulson
parents: 2515
diff changeset
   224
by (Blast_tac 1);
923
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
   225
qed "Un_upper1";
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
   226
5316
7a8975451a89 even more tidying of Goal commands
paulson
parents: 4159
diff changeset
   227
Goal "B <= A Un B";
2893
2ee005e46d6d Calls Blast_tac. Tidied some proofs
paulson
parents: 2515
diff changeset
   228
by (Blast_tac 1);
923
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
   229
qed "Un_upper2";
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
   230
5316
7a8975451a89 even more tidying of Goal commands
paulson
parents: 4159
diff changeset
   231
Goal "[| A<=C;  B<=C |] ==> A Un B <= C";
2893
2ee005e46d6d Calls Blast_tac. Tidied some proofs
paulson
parents: 2515
diff changeset
   232
by (Blast_tac 1);
923
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
   233
qed "Un_least";
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
   234
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
   235
(*** Finite Intersection -- the greatest lower bound of 2 sets *)
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
   236
5316
7a8975451a89 even more tidying of Goal commands
paulson
parents: 4159
diff changeset
   237
Goal "A Int B <= A";
2893
2ee005e46d6d Calls Blast_tac. Tidied some proofs
paulson
parents: 2515
diff changeset
   238
by (Blast_tac 1);
923
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
   239
qed "Int_lower1";
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
   240
5316
7a8975451a89 even more tidying of Goal commands
paulson
parents: 4159
diff changeset
   241
Goal "A Int B <= B";
2893
2ee005e46d6d Calls Blast_tac. Tidied some proofs
paulson
parents: 2515
diff changeset
   242
by (Blast_tac 1);
923
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
   243
qed "Int_lower2";
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
   244
5316
7a8975451a89 even more tidying of Goal commands
paulson
parents: 4159
diff changeset
   245
Goal "[| C<=A;  C<=B |] ==> C <= A Int B";
2893
2ee005e46d6d Calls Blast_tac. Tidied some proofs
paulson
parents: 2515
diff changeset
   246
by (Blast_tac 1);
923
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
   247
qed "Int_greatest";
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
   248
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
   249
(*** Set difference ***)
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
   250
7007
b46ccfee8e59 qed_goal -> Goal
paulson
parents: 5316
diff changeset
   251
Goal "A-B <= (A::'a set)";
b46ccfee8e59 qed_goal -> Goal
paulson
parents: 5316
diff changeset
   252
by (Blast_tac 1) ;
b46ccfee8e59 qed_goal -> Goal
paulson
parents: 5316
diff changeset
   253
qed "Diff_subset";
923
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
   254
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
   255
(*** Monotonicity ***)
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
   256
5316
7a8975451a89 even more tidying of Goal commands
paulson
parents: 4159
diff changeset
   257
Goal "mono(f) ==> f(A) Un f(B) <= f(A Un B)";
923
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
   258
by (rtac Un_least 1);
5316
7a8975451a89 even more tidying of Goal commands
paulson
parents: 4159
diff changeset
   259
by (etac (Un_upper1 RSN (2,monoD)) 1);
7a8975451a89 even more tidying of Goal commands
paulson
parents: 4159
diff changeset
   260
by (etac (Un_upper2 RSN (2,monoD)) 1);
923
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
   261
qed "mono_Un";
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
   262
5316
7a8975451a89 even more tidying of Goal commands
paulson
parents: 4159
diff changeset
   263
Goal "mono(f) ==> f(A Int B) <= f(A) Int f(B)";
923
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
   264
by (rtac Int_greatest 1);
5316
7a8975451a89 even more tidying of Goal commands
paulson
parents: 4159
diff changeset
   265
by (etac (Int_lower1 RSN (2,monoD)) 1);
7a8975451a89 even more tidying of Goal commands
paulson
parents: 4159
diff changeset
   266
by (etac (Int_lower2 RSN (2,monoD)) 1);
923
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
   267
qed "mono_Int";