src/ZF/equalities.ML
author paulson
Thu, 15 Nov 2001 17:59:56 +0100
changeset 12199 8213fd95acb5
parent 11695 8c66866fb0ff
child 12891 92af5c3a10fb
permissions -rw-r--r--
miniscoping of UN and INT
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
1461
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1056
diff changeset
     1
(*  Title:      ZF/equalities
0
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
     2
    ID:         $Id$
1461
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1056
diff changeset
     3
    Author:     Lawrence C Paulson, Cambridge University Computer Laboratory
0
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
     4
    Copyright   1992  University of Cambridge
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
     5
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
     6
Set Theory examples: Union, Intersection, Inclusion, etc.
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
     7
    (Thanks also to Philippe de Groote.)
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
     8
*)
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
     9
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    10
(** Finite Sets **)
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    11
520
806d3f00590d ZF/equalities/Sigma_cons: new
lcp
parents: 517
diff changeset
    12
(* cons_def refers to Upair; reversing the equality LOOPS in rewriting!*)
5321
f8848433d240 got rid of some goal thy commands
paulson
parents: 5147
diff changeset
    13
Goal "{a} Un B = cons(a,B)";
2877
6476784dba1c Converted to call blast_tac.
paulson
parents: 2493
diff changeset
    14
by (Blast_tac 1);
760
f0200e91b272 added qed and qed_goal[w]
clasohm
parents: 685
diff changeset
    15
qed "cons_eq";
520
806d3f00590d ZF/equalities/Sigma_cons: new
lcp
parents: 517
diff changeset
    16
5321
f8848433d240 got rid of some goal thy commands
paulson
parents: 5147
diff changeset
    17
Goal "cons(a, cons(b, C)) = cons(b, cons(a, C))";
2877
6476784dba1c Converted to call blast_tac.
paulson
parents: 2493
diff changeset
    18
by (Blast_tac 1);
760
f0200e91b272 added qed and qed_goal[w]
clasohm
parents: 685
diff changeset
    19
qed "cons_commute";
0
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    20
5321
f8848433d240 got rid of some goal thy commands
paulson
parents: 5147
diff changeset
    21
Goal "a: B ==> cons(a,B) = B";
2877
6476784dba1c Converted to call blast_tac.
paulson
parents: 2493
diff changeset
    22
by (Blast_tac 1);
760
f0200e91b272 added qed and qed_goal[w]
clasohm
parents: 685
diff changeset
    23
qed "cons_absorb";
0
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    24
5321
f8848433d240 got rid of some goal thy commands
paulson
parents: 5147
diff changeset
    25
Goal "a: B ==> cons(a, B-{a}) = B";
2877
6476784dba1c Converted to call blast_tac.
paulson
parents: 2493
diff changeset
    26
by (Blast_tac 1);
760
f0200e91b272 added qed and qed_goal[w]
clasohm
parents: 685
diff changeset
    27
qed "cons_Diff";
0
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    28
5321
f8848433d240 got rid of some goal thy commands
paulson
parents: 5147
diff changeset
    29
Goal "[| a: C;  ALL y:C. y=b |] ==> C = {b}";
2877
6476784dba1c Converted to call blast_tac.
paulson
parents: 2493
diff changeset
    30
by (Blast_tac 1);
760
f0200e91b272 added qed and qed_goal[w]
clasohm
parents: 685
diff changeset
    31
qed "equal_singleton_lemma";
9907
473a6604da94 tuned ML code (the_context, bind_thms(s));
wenzelm
parents: 9303
diff changeset
    32
bind_thm ("equal_singleton", ballI RSN (2,equal_singleton_lemma));
0
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    33
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    34
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    35
(** Binary Intersection **)
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    36
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    37
(*NOT an equality, but it seems to belong here...*)
5321
f8848433d240 got rid of some goal thy commands
paulson
parents: 5147
diff changeset
    38
Goal "cons(a,B) Int C <= cons(a, B Int C)";
2877
6476784dba1c Converted to call blast_tac.
paulson
parents: 2493
diff changeset
    39
by (Blast_tac 1);
760
f0200e91b272 added qed and qed_goal[w]
clasohm
parents: 685
diff changeset
    40
qed "Int_cons";
0
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    41
5321
f8848433d240 got rid of some goal thy commands
paulson
parents: 5147
diff changeset
    42
Goal "A Int A = A";
2877
6476784dba1c Converted to call blast_tac.
paulson
parents: 2493
diff changeset
    43
by (Blast_tac 1);
760
f0200e91b272 added qed and qed_goal[w]
clasohm
parents: 685
diff changeset
    44
qed "Int_absorb";
12199
8213fd95acb5 miniscoping of UN and INT
paulson
parents: 11695
diff changeset
    45
Addsimps [Int_absorb];
8213fd95acb5 miniscoping of UN and INT
paulson
parents: 11695
diff changeset
    46
8213fd95acb5 miniscoping of UN and INT
paulson
parents: 11695
diff changeset
    47
Goal "A Int (A Int B) = A Int B";
8213fd95acb5 miniscoping of UN and INT
paulson
parents: 11695
diff changeset
    48
by (Blast_tac 1);
8213fd95acb5 miniscoping of UN and INT
paulson
parents: 11695
diff changeset
    49
qed "Int_left_absorb";
0
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    50
5321
f8848433d240 got rid of some goal thy commands
paulson
parents: 5147
diff changeset
    51
Goal "A Int B = B Int A";
2877
6476784dba1c Converted to call blast_tac.
paulson
parents: 2493
diff changeset
    52
by (Blast_tac 1);
760
f0200e91b272 added qed and qed_goal[w]
clasohm
parents: 685
diff changeset
    53
qed "Int_commute";
0
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    54
12199
8213fd95acb5 miniscoping of UN and INT
paulson
parents: 11695
diff changeset
    55
Goal "A Int (B Int C) = B Int (A Int C)";
8213fd95acb5 miniscoping of UN and INT
paulson
parents: 11695
diff changeset
    56
by (Blast_tac 1);
8213fd95acb5 miniscoping of UN and INT
paulson
parents: 11695
diff changeset
    57
qed "Int_left_commute";
8213fd95acb5 miniscoping of UN and INT
paulson
parents: 11695
diff changeset
    58
5321
f8848433d240 got rid of some goal thy commands
paulson
parents: 5147
diff changeset
    59
Goal "(A Int B) Int C  =  A Int (B Int C)";
2877
6476784dba1c Converted to call blast_tac.
paulson
parents: 2493
diff changeset
    60
by (Blast_tac 1);
760
f0200e91b272 added qed and qed_goal[w]
clasohm
parents: 685
diff changeset
    61
qed "Int_assoc";
0
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    62
12199
8213fd95acb5 miniscoping of UN and INT
paulson
parents: 11695
diff changeset
    63
(*Intersection is an AC-operator*)
8213fd95acb5 miniscoping of UN and INT
paulson
parents: 11695
diff changeset
    64
bind_thms ("Int_ac", 
8213fd95acb5 miniscoping of UN and INT
paulson
parents: 11695
diff changeset
    65
           [Int_assoc, Int_left_absorb, Int_commute, Int_left_commute]);
8213fd95acb5 miniscoping of UN and INT
paulson
parents: 11695
diff changeset
    66
8213fd95acb5 miniscoping of UN and INT
paulson
parents: 11695
diff changeset
    67
Goal "A Int (B Un C) = (A Int B) Un (A Int C)";
2877
6476784dba1c Converted to call blast_tac.
paulson
parents: 2493
diff changeset
    68
by (Blast_tac 1);
760
f0200e91b272 added qed and qed_goal[w]
clasohm
parents: 685
diff changeset
    69
qed "Int_Un_distrib";
0
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    70
12199
8213fd95acb5 miniscoping of UN and INT
paulson
parents: 11695
diff changeset
    71
Goal "(B Un C) Int A = (B Int A) Un (C Int A)";
8213fd95acb5 miniscoping of UN and INT
paulson
parents: 11695
diff changeset
    72
by (Blast_tac 1);
8213fd95acb5 miniscoping of UN and INT
paulson
parents: 11695
diff changeset
    73
qed "Int_Un_distrib2";
8213fd95acb5 miniscoping of UN and INT
paulson
parents: 11695
diff changeset
    74
5321
f8848433d240 got rid of some goal thy commands
paulson
parents: 5147
diff changeset
    75
Goal "A<=B <-> A Int B = A";
4091
771b1f6422a8 isatool fixclasimp;
wenzelm
parents: 2925
diff changeset
    76
by (blast_tac (claset() addSEs [equalityE]) 1);
760
f0200e91b272 added qed and qed_goal[w]
clasohm
parents: 685
diff changeset
    77
qed "subset_Int_iff";
0
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    78
5321
f8848433d240 got rid of some goal thy commands
paulson
parents: 5147
diff changeset
    79
Goal "A<=B <-> B Int A = A";
4091
771b1f6422a8 isatool fixclasimp;
wenzelm
parents: 2925
diff changeset
    80
by (blast_tac (claset() addSEs [equalityE]) 1);
760
f0200e91b272 added qed and qed_goal[w]
clasohm
parents: 685
diff changeset
    81
qed "subset_Int_iff2";
435
ca5356bd315a Addition of cardinals and order types, various tidying
lcp
parents: 268
diff changeset
    82
5321
f8848433d240 got rid of some goal thy commands
paulson
parents: 5147
diff changeset
    83
Goal "C<=A ==> (A-B) Int C = C-B";
2877
6476784dba1c Converted to call blast_tac.
paulson
parents: 2493
diff changeset
    84
by (Blast_tac 1);
1035
279a4fd3c5ce Proved Int_Diff_eq.
lcp
parents: 839
diff changeset
    85
qed "Int_Diff_eq";
279a4fd3c5ce Proved Int_Diff_eq.
lcp
parents: 839
diff changeset
    86
0
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    87
(** Binary Union **)
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    88
5321
f8848433d240 got rid of some goal thy commands
paulson
parents: 5147
diff changeset
    89
Goal "cons(a,B) Un C = cons(a, B Un C)";
2877
6476784dba1c Converted to call blast_tac.
paulson
parents: 2493
diff changeset
    90
by (Blast_tac 1);
760
f0200e91b272 added qed and qed_goal[w]
clasohm
parents: 685
diff changeset
    91
qed "Un_cons";
0
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    92
5321
f8848433d240 got rid of some goal thy commands
paulson
parents: 5147
diff changeset
    93
Goal "A Un A = A";
2877
6476784dba1c Converted to call blast_tac.
paulson
parents: 2493
diff changeset
    94
by (Blast_tac 1);
760
f0200e91b272 added qed and qed_goal[w]
clasohm
parents: 685
diff changeset
    95
qed "Un_absorb";
12199
8213fd95acb5 miniscoping of UN and INT
paulson
parents: 11695
diff changeset
    96
Addsimps [Un_absorb];
8213fd95acb5 miniscoping of UN and INT
paulson
parents: 11695
diff changeset
    97
8213fd95acb5 miniscoping of UN and INT
paulson
parents: 11695
diff changeset
    98
Goal "A Un (A Un B) = A Un B";
8213fd95acb5 miniscoping of UN and INT
paulson
parents: 11695
diff changeset
    99
by (Blast_tac 1);
8213fd95acb5 miniscoping of UN and INT
paulson
parents: 11695
diff changeset
   100
qed "Un_left_absorb";
0
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
   101
5321
f8848433d240 got rid of some goal thy commands
paulson
parents: 5147
diff changeset
   102
Goal "A Un B = B Un A";
2877
6476784dba1c Converted to call blast_tac.
paulson
parents: 2493
diff changeset
   103
by (Blast_tac 1);
760
f0200e91b272 added qed and qed_goal[w]
clasohm
parents: 685
diff changeset
   104
qed "Un_commute";
0
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
   105
12199
8213fd95acb5 miniscoping of UN and INT
paulson
parents: 11695
diff changeset
   106
Goal "A Un (B Un C) = B Un (A Un C)";
8213fd95acb5 miniscoping of UN and INT
paulson
parents: 11695
diff changeset
   107
by (Blast_tac 1);
8213fd95acb5 miniscoping of UN and INT
paulson
parents: 11695
diff changeset
   108
qed "Un_left_commute";
8213fd95acb5 miniscoping of UN and INT
paulson
parents: 11695
diff changeset
   109
5321
f8848433d240 got rid of some goal thy commands
paulson
parents: 5147
diff changeset
   110
Goal "(A Un B) Un C  =  A Un (B Un C)";
2877
6476784dba1c Converted to call blast_tac.
paulson
parents: 2493
diff changeset
   111
by (Blast_tac 1);
760
f0200e91b272 added qed and qed_goal[w]
clasohm
parents: 685
diff changeset
   112
qed "Un_assoc";
0
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
   113
12199
8213fd95acb5 miniscoping of UN and INT
paulson
parents: 11695
diff changeset
   114
(*Union is an AC-operator*)
8213fd95acb5 miniscoping of UN and INT
paulson
parents: 11695
diff changeset
   115
bind_thms ("Un_ac", [Un_assoc, Un_left_absorb, Un_commute, Un_left_commute]);
8213fd95acb5 miniscoping of UN and INT
paulson
parents: 11695
diff changeset
   116
5321
f8848433d240 got rid of some goal thy commands
paulson
parents: 5147
diff changeset
   117
Goal "(A Int B) Un C  =  (A Un C) Int (B Un C)";
2877
6476784dba1c Converted to call blast_tac.
paulson
parents: 2493
diff changeset
   118
by (Blast_tac 1);
760
f0200e91b272 added qed and qed_goal[w]
clasohm
parents: 685
diff changeset
   119
qed "Un_Int_distrib";
0
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
   120
5321
f8848433d240 got rid of some goal thy commands
paulson
parents: 5147
diff changeset
   121
Goal "A<=B <-> A Un B = B";
4091
771b1f6422a8 isatool fixclasimp;
wenzelm
parents: 2925
diff changeset
   122
by (blast_tac (claset() addSEs [equalityE]) 1);
760
f0200e91b272 added qed and qed_goal[w]
clasohm
parents: 685
diff changeset
   123
qed "subset_Un_iff";
0
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
   124
5321
f8848433d240 got rid of some goal thy commands
paulson
parents: 5147
diff changeset
   125
Goal "A<=B <-> B Un A = B";
4091
771b1f6422a8 isatool fixclasimp;
wenzelm
parents: 2925
diff changeset
   126
by (blast_tac (claset() addSEs [equalityE]) 1);
760
f0200e91b272 added qed and qed_goal[w]
clasohm
parents: 685
diff changeset
   127
qed "subset_Un_iff2";
435
ca5356bd315a Addition of cardinals and order types, various tidying
lcp
parents: 268
diff changeset
   128
12199
8213fd95acb5 miniscoping of UN and INT
paulson
parents: 11695
diff changeset
   129
Goal "(A Un B = 0) <-> (A = 0 & B = 0)";
8213fd95acb5 miniscoping of UN and INT
paulson
parents: 11695
diff changeset
   130
by (Blast_tac 1); 
8213fd95acb5 miniscoping of UN and INT
paulson
parents: 11695
diff changeset
   131
qed "Un_empty";
8213fd95acb5 miniscoping of UN and INT
paulson
parents: 11695
diff changeset
   132
AddIffs[Un_empty];
8213fd95acb5 miniscoping of UN and INT
paulson
parents: 11695
diff changeset
   133
8213fd95acb5 miniscoping of UN and INT
paulson
parents: 11695
diff changeset
   134
Goal "A Un B = Union({A, B})";
8213fd95acb5 miniscoping of UN and INT
paulson
parents: 11695
diff changeset
   135
by (Blast_tac 1);
8213fd95acb5 miniscoping of UN and INT
paulson
parents: 11695
diff changeset
   136
qed "Un_eq_Union";
8213fd95acb5 miniscoping of UN and INT
paulson
parents: 11695
diff changeset
   137
0
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
   138
(** Simple properties of Diff -- set difference **)
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
   139
11695
8c66866fb0ff sane spacing of "-";
wenzelm
parents: 9907
diff changeset
   140
Goal "A - A = 0";
2877
6476784dba1c Converted to call blast_tac.
paulson
parents: 2493
diff changeset
   141
by (Blast_tac 1);
760
f0200e91b272 added qed and qed_goal[w]
clasohm
parents: 685
diff changeset
   142
qed "Diff_cancel";
0
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
   143
12199
8213fd95acb5 miniscoping of UN and INT
paulson
parents: 11695
diff changeset
   144
Goal "A  Int B = 0 ==> A - B = A";
8213fd95acb5 miniscoping of UN and INT
paulson
parents: 11695
diff changeset
   145
by (Blast_tac 1);
8213fd95acb5 miniscoping of UN and INT
paulson
parents: 11695
diff changeset
   146
qed "Diff_triv";
8213fd95acb5 miniscoping of UN and INT
paulson
parents: 11695
diff changeset
   147
11695
8c66866fb0ff sane spacing of "-";
wenzelm
parents: 9907
diff changeset
   148
Goal "0 - A = 0";
2877
6476784dba1c Converted to call blast_tac.
paulson
parents: 2493
diff changeset
   149
by (Blast_tac 1);
760
f0200e91b272 added qed and qed_goal[w]
clasohm
parents: 685
diff changeset
   150
qed "empty_Diff";
12199
8213fd95acb5 miniscoping of UN and INT
paulson
parents: 11695
diff changeset
   151
Addsimps[empty_Diff];
0
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
   152
11695
8c66866fb0ff sane spacing of "-";
wenzelm
parents: 9907
diff changeset
   153
Goal "A - 0 = A";
2877
6476784dba1c Converted to call blast_tac.
paulson
parents: 2493
diff changeset
   154
by (Blast_tac 1);
760
f0200e91b272 added qed and qed_goal[w]
clasohm
parents: 685
diff changeset
   155
qed "Diff_0";
12199
8213fd95acb5 miniscoping of UN and INT
paulson
parents: 11695
diff changeset
   156
Addsimps[Diff_0];
0
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
   157
11695
8c66866fb0ff sane spacing of "-";
wenzelm
parents: 9907
diff changeset
   158
Goal "A - B = 0 <-> A <= B";
4091
771b1f6422a8 isatool fixclasimp;
wenzelm
parents: 2925
diff changeset
   159
by (blast_tac (claset() addEs [equalityE]) 1);
787
1affbb1c5f1f converse_UN, Diff_eq_0_iff: new
lcp
parents: 760
diff changeset
   160
qed "Diff_eq_0_iff";
1affbb1c5f1f converse_UN, Diff_eq_0_iff: new
lcp
parents: 760
diff changeset
   161
0
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
   162
(*NOT SUITABLE FOR REWRITING since {a} == cons(a,0)*)
5321
f8848433d240 got rid of some goal thy commands
paulson
parents: 5147
diff changeset
   163
Goal "A - cons(a,B) = A - B - {a}";
2877
6476784dba1c Converted to call blast_tac.
paulson
parents: 2493
diff changeset
   164
by (Blast_tac 1);
760
f0200e91b272 added qed and qed_goal[w]
clasohm
parents: 685
diff changeset
   165
qed "Diff_cons";
0
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
   166
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
   167
(*NOT SUITABLE FOR REWRITING since {a} == cons(a,0)*)
5321
f8848433d240 got rid of some goal thy commands
paulson
parents: 5147
diff changeset
   168
Goal "A - cons(a,B) = A - {a} - B";
2877
6476784dba1c Converted to call blast_tac.
paulson
parents: 2493
diff changeset
   169
by (Blast_tac 1);
760
f0200e91b272 added qed and qed_goal[w]
clasohm
parents: 685
diff changeset
   170
qed "Diff_cons2";
0
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
   171
5321
f8848433d240 got rid of some goal thy commands
paulson
parents: 5147
diff changeset
   172
Goal "A Int (B-A) = 0";
2877
6476784dba1c Converted to call blast_tac.
paulson
parents: 2493
diff changeset
   173
by (Blast_tac 1);
760
f0200e91b272 added qed and qed_goal[w]
clasohm
parents: 685
diff changeset
   174
qed "Diff_disjoint";
0
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
   175
5321
f8848433d240 got rid of some goal thy commands
paulson
parents: 5147
diff changeset
   176
Goal "A<=B ==> A Un (B-A) = B";
2877
6476784dba1c Converted to call blast_tac.
paulson
parents: 2493
diff changeset
   177
by (Blast_tac 1);
760
f0200e91b272 added qed and qed_goal[w]
clasohm
parents: 685
diff changeset
   178
qed "Diff_partition";
0
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
   179
5321
f8848433d240 got rid of some goal thy commands
paulson
parents: 5147
diff changeset
   180
Goal "A <= B Un (A - B)";
2877
6476784dba1c Converted to call blast_tac.
paulson
parents: 2493
diff changeset
   181
by (Blast_tac 1);
1611
35e0fd1b1775 New results from AC/Cardinal_aux.ML
paulson
parents: 1568
diff changeset
   182
qed "subset_Un_Diff";
35e0fd1b1775 New results from AC/Cardinal_aux.ML
paulson
parents: 1568
diff changeset
   183
5321
f8848433d240 got rid of some goal thy commands
paulson
parents: 5147
diff changeset
   184
Goal "[| A<=B; B<=C |] ==> B-(C-A) = A";
2877
6476784dba1c Converted to call blast_tac.
paulson
parents: 2493
diff changeset
   185
by (Blast_tac 1);
760
f0200e91b272 added qed and qed_goal[w]
clasohm
parents: 685
diff changeset
   186
qed "double_complement";
0
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
   187
5321
f8848433d240 got rid of some goal thy commands
paulson
parents: 5147
diff changeset
   188
Goal "(A Un B) - (B-A) = A";
2877
6476784dba1c Converted to call blast_tac.
paulson
parents: 2493
diff changeset
   189
by (Blast_tac 1);
760
f0200e91b272 added qed and qed_goal[w]
clasohm
parents: 685
diff changeset
   190
qed "double_complement_Un";
268
1a038ec6f923 double_complement_Un: new
lcp
parents: 198
diff changeset
   191
5321
f8848433d240 got rid of some goal thy commands
paulson
parents: 5147
diff changeset
   192
Goal
0
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
   193
 "(A Int B) Un (B Int C) Un (C Int A) = (A Un B) Int (B Un C) Int (C Un A)";
2877
6476784dba1c Converted to call blast_tac.
paulson
parents: 2493
diff changeset
   194
by (Blast_tac 1);
760
f0200e91b272 added qed and qed_goal[w]
clasohm
parents: 685
diff changeset
   195
qed "Un_Int_crazy";
0
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
   196
5321
f8848433d240 got rid of some goal thy commands
paulson
parents: 5147
diff changeset
   197
Goal "A - (B Un C) = (A-B) Int (A-C)";
2877
6476784dba1c Converted to call blast_tac.
paulson
parents: 2493
diff changeset
   198
by (Blast_tac 1);
760
f0200e91b272 added qed and qed_goal[w]
clasohm
parents: 685
diff changeset
   199
qed "Diff_Un";
0
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
   200
5321
f8848433d240 got rid of some goal thy commands
paulson
parents: 5147
diff changeset
   201
Goal "A - (B Int C) = (A-B) Un (A-C)";
2877
6476784dba1c Converted to call blast_tac.
paulson
parents: 2493
diff changeset
   202
by (Blast_tac 1);
760
f0200e91b272 added qed and qed_goal[w]
clasohm
parents: 685
diff changeset
   203
qed "Diff_Int";
0
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
   204
12199
8213fd95acb5 miniscoping of UN and INT
paulson
parents: 11695
diff changeset
   205
Goal "(A Un B) - C = (A - C) Un (B - C)";
8213fd95acb5 miniscoping of UN and INT
paulson
parents: 11695
diff changeset
   206
by (Blast_tac 1);
8213fd95acb5 miniscoping of UN and INT
paulson
parents: 11695
diff changeset
   207
qed "Un_Diff";
8213fd95acb5 miniscoping of UN and INT
paulson
parents: 11695
diff changeset
   208
8213fd95acb5 miniscoping of UN and INT
paulson
parents: 11695
diff changeset
   209
Goal "(A Int B) - C = A Int (B - C)";
8213fd95acb5 miniscoping of UN and INT
paulson
parents: 11695
diff changeset
   210
by (Blast_tac 1);
8213fd95acb5 miniscoping of UN and INT
paulson
parents: 11695
diff changeset
   211
qed "Int_Diff";
8213fd95acb5 miniscoping of UN and INT
paulson
parents: 11695
diff changeset
   212
8213fd95acb5 miniscoping of UN and INT
paulson
parents: 11695
diff changeset
   213
Goal "C Int (A-B) = (C Int A) - (C Int B)";
8213fd95acb5 miniscoping of UN and INT
paulson
parents: 11695
diff changeset
   214
by (Blast_tac 1);
8213fd95acb5 miniscoping of UN and INT
paulson
parents: 11695
diff changeset
   215
qed "Diff_Int_distrib";
8213fd95acb5 miniscoping of UN and INT
paulson
parents: 11695
diff changeset
   216
8213fd95acb5 miniscoping of UN and INT
paulson
parents: 11695
diff changeset
   217
Goal "(A-B) Int C = (A Int C) - (B Int C)";
8213fd95acb5 miniscoping of UN and INT
paulson
parents: 11695
diff changeset
   218
by (Blast_tac 1);
8213fd95acb5 miniscoping of UN and INT
paulson
parents: 11695
diff changeset
   219
qed "Diff_Int_distrib2";
8213fd95acb5 miniscoping of UN and INT
paulson
parents: 11695
diff changeset
   220
0
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
   221
(*Halmos, Naive Set Theory, page 16.*)
5321
f8848433d240 got rid of some goal thy commands
paulson
parents: 5147
diff changeset
   222
Goal "(A Int B) Un C = A Int (B Un C)  <->  C<=A";
4091
771b1f6422a8 isatool fixclasimp;
wenzelm
parents: 2925
diff changeset
   223
by (blast_tac (claset() addSEs [equalityE]) 1);
760
f0200e91b272 added qed and qed_goal[w]
clasohm
parents: 685
diff changeset
   224
qed "Un_Int_assoc_iff";
0
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
   225
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
   226
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
   227
(** Big Union and Intersection **)
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
   228
5321
f8848433d240 got rid of some goal thy commands
paulson
parents: 5147
diff changeset
   229
Goal "Union(cons(a,B)) = a Un Union(B)";
2877
6476784dba1c Converted to call blast_tac.
paulson
parents: 2493
diff changeset
   230
by (Blast_tac 1);
760
f0200e91b272 added qed and qed_goal[w]
clasohm
parents: 685
diff changeset
   231
qed "Union_cons";
12199
8213fd95acb5 miniscoping of UN and INT
paulson
parents: 11695
diff changeset
   232
Addsimps [Union_cons];
0
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
   233
5321
f8848433d240 got rid of some goal thy commands
paulson
parents: 5147
diff changeset
   234
Goal "Union(A Un B) = Union(A) Un Union(B)";
2877
6476784dba1c Converted to call blast_tac.
paulson
parents: 2493
diff changeset
   235
by (Blast_tac 1);
760
f0200e91b272 added qed and qed_goal[w]
clasohm
parents: 685
diff changeset
   236
qed "Union_Un_distrib";
0
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
   237
5321
f8848433d240 got rid of some goal thy commands
paulson
parents: 5147
diff changeset
   238
Goal "Union(A Int B) <= Union(A) Int Union(B)";
2877
6476784dba1c Converted to call blast_tac.
paulson
parents: 2493
diff changeset
   239
by (Blast_tac 1);
760
f0200e91b272 added qed and qed_goal[w]
clasohm
parents: 685
diff changeset
   240
qed "Union_Int_subset";
435
ca5356bd315a Addition of cardinals and order types, various tidying
lcp
parents: 268
diff changeset
   241
5321
f8848433d240 got rid of some goal thy commands
paulson
parents: 5147
diff changeset
   242
Goal "Union(C) Int A = 0 <-> (ALL B:C. B Int A = 0)";
4091
771b1f6422a8 isatool fixclasimp;
wenzelm
parents: 2925
diff changeset
   243
by (blast_tac (claset() addSEs [equalityE]) 1);
760
f0200e91b272 added qed and qed_goal[w]
clasohm
parents: 685
diff changeset
   244
qed "Union_disjoint";
0
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
   245
5325
f7a5e06adea1 Yet more removal of "goal" commands, especially "goal ZF.thy", so ZF.thy
paulson
parents: 5321
diff changeset
   246
Goal "Union(A) = 0 <-> (ALL B:A. B=0)";
f7a5e06adea1 Yet more removal of "goal" commands, especially "goal ZF.thy", so ZF.thy
paulson
parents: 5321
diff changeset
   247
by (Blast_tac 1);
f7a5e06adea1 Yet more removal of "goal" commands, especially "goal ZF.thy", so ZF.thy
paulson
parents: 5321
diff changeset
   248
qed "Union_empty_iff";
f7a5e06adea1 Yet more removal of "goal" commands, especially "goal ZF.thy", so ZF.thy
paulson
parents: 5321
diff changeset
   249
f7a5e06adea1 Yet more removal of "goal" commands, especially "goal ZF.thy", so ZF.thy
paulson
parents: 5321
diff changeset
   250
Goalw [Inter_def] "Inter(0) = 0";
2877
6476784dba1c Converted to call blast_tac.
paulson
parents: 2493
diff changeset
   251
by (Blast_tac 1);
1652
9b78ce58d6b1 Proved Inter_0 and converse_INT
paulson
parents: 1611
diff changeset
   252
qed "Inter_0";
9b78ce58d6b1 Proved Inter_0 and converse_INT
paulson
parents: 1611
diff changeset
   253
5321
f8848433d240 got rid of some goal thy commands
paulson
parents: 5147
diff changeset
   254
Goal "[| z:A; z:B |] ==> Inter(A) Un Inter(B) <= Inter(A Int B)";
2877
6476784dba1c Converted to call blast_tac.
paulson
parents: 2493
diff changeset
   255
by (Blast_tac 1);
1568
630d881b51bd New theorem: Inter_Un_subset
paulson
parents: 1461
diff changeset
   256
qed "Inter_Un_subset";
630d881b51bd New theorem: Inter_Un_subset
paulson
parents: 1461
diff changeset
   257
0
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
   258
(* A good challenge: Inter is ill-behaved on the empty set *)
5321
f8848433d240 got rid of some goal thy commands
paulson
parents: 5147
diff changeset
   259
Goal "[| a:A;  b:B |] ==> Inter(A Un B) = Inter(A) Int Inter(B)";
2877
6476784dba1c Converted to call blast_tac.
paulson
parents: 2493
diff changeset
   260
by (Blast_tac 1);
760
f0200e91b272 added qed and qed_goal[w]
clasohm
parents: 685
diff changeset
   261
qed "Inter_Un_distrib";
0
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
   262
5321
f8848433d240 got rid of some goal thy commands
paulson
parents: 5147
diff changeset
   263
Goal "Union({b}) = b";
2877
6476784dba1c Converted to call blast_tac.
paulson
parents: 2493
diff changeset
   264
by (Blast_tac 1);
760
f0200e91b272 added qed and qed_goal[w]
clasohm
parents: 685
diff changeset
   265
qed "Union_singleton";
0
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
   266
5321
f8848433d240 got rid of some goal thy commands
paulson
parents: 5147
diff changeset
   267
Goal "Inter({b}) = b";
2877
6476784dba1c Converted to call blast_tac.
paulson
parents: 2493
diff changeset
   268
by (Blast_tac 1);
760
f0200e91b272 added qed and qed_goal[w]
clasohm
parents: 685
diff changeset
   269
qed "Inter_singleton";
0
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
   270
12199
8213fd95acb5 miniscoping of UN and INT
paulson
parents: 11695
diff changeset
   271
Goal "Inter(cons(a,B)) = (if B=0 then a else a Int Inter(B))"; 
8213fd95acb5 miniscoping of UN and INT
paulson
parents: 11695
diff changeset
   272
by (Simp_tac 1);
8213fd95acb5 miniscoping of UN and INT
paulson
parents: 11695
diff changeset
   273
by (Blast_tac 1); 
8213fd95acb5 miniscoping of UN and INT
paulson
parents: 11695
diff changeset
   274
qed "Inter_cons";
8213fd95acb5 miniscoping of UN and INT
paulson
parents: 11695
diff changeset
   275
Addsimps [Inter_cons];
8213fd95acb5 miniscoping of UN and INT
paulson
parents: 11695
diff changeset
   276
0
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
   277
(** Unions and Intersections of Families **)
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
   278
5321
f8848433d240 got rid of some goal thy commands
paulson
parents: 5147
diff changeset
   279
Goal "Union(A) = (UN x:A. x)";
2877
6476784dba1c Converted to call blast_tac.
paulson
parents: 2493
diff changeset
   280
by (Blast_tac 1);
760
f0200e91b272 added qed and qed_goal[w]
clasohm
parents: 685
diff changeset
   281
qed "Union_eq_UN";
0
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
   282
5325
f7a5e06adea1 Yet more removal of "goal" commands, especially "goal ZF.thy", so ZF.thy
paulson
parents: 5321
diff changeset
   283
Goalw [Inter_def] "Inter(A) = (INT x:A. x)";
2877
6476784dba1c Converted to call blast_tac.
paulson
parents: 2493
diff changeset
   284
by (Blast_tac 1);
760
f0200e91b272 added qed and qed_goal[w]
clasohm
parents: 685
diff changeset
   285
qed "Inter_eq_INT";
0
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
   286
5321
f8848433d240 got rid of some goal thy commands
paulson
parents: 5147
diff changeset
   287
Goal "(UN i:0. A(i)) = 0";
2877
6476784dba1c Converted to call blast_tac.
paulson
parents: 2493
diff changeset
   288
by (Blast_tac 1);
760
f0200e91b272 added qed and qed_goal[w]
clasohm
parents: 685
diff changeset
   289
qed "UN_0";
12199
8213fd95acb5 miniscoping of UN and INT
paulson
parents: 11695
diff changeset
   290
Addsimps [UN_0];
8213fd95acb5 miniscoping of UN and INT
paulson
parents: 11695
diff changeset
   291
8213fd95acb5 miniscoping of UN and INT
paulson
parents: 11695
diff changeset
   292
Goal "(UN x:A. {x}) = A";
8213fd95acb5 miniscoping of UN and INT
paulson
parents: 11695
diff changeset
   293
by (Blast_tac 1);
8213fd95acb5 miniscoping of UN and INT
paulson
parents: 11695
diff changeset
   294
qed "UN_singleton";
8213fd95acb5 miniscoping of UN and INT
paulson
parents: 11695
diff changeset
   295
8213fd95acb5 miniscoping of UN and INT
paulson
parents: 11695
diff changeset
   296
Goal "(UN i: A Un B. C(i)) = (UN i: A. C(i)) Un (UN i:B. C(i))";
8213fd95acb5 miniscoping of UN and INT
paulson
parents: 11695
diff changeset
   297
by (Blast_tac 1);
8213fd95acb5 miniscoping of UN and INT
paulson
parents: 11695
diff changeset
   298
qed "UN_Un";
8213fd95acb5 miniscoping of UN and INT
paulson
parents: 11695
diff changeset
   299
8213fd95acb5 miniscoping of UN and INT
paulson
parents: 11695
diff changeset
   300
Goal "(INT i:I Un J. A(i)) = (if I=0 then INT j:J. A(j) \
8213fd95acb5 miniscoping of UN and INT
paulson
parents: 11695
diff changeset
   301
\                             else if J=0 then INT i:I. A(i) \
8213fd95acb5 miniscoping of UN and INT
paulson
parents: 11695
diff changeset
   302
\                             else ((INT i:I. A(i)) Int  (INT j:J. A(j))))"; 
8213fd95acb5 miniscoping of UN and INT
paulson
parents: 11695
diff changeset
   303
by Auto_tac;
8213fd95acb5 miniscoping of UN and INT
paulson
parents: 11695
diff changeset
   304
by (blast_tac (claset() addSIs [equalityI]) 1);
8213fd95acb5 miniscoping of UN and INT
paulson
parents: 11695
diff changeset
   305
qed "INT_Un";
8213fd95acb5 miniscoping of UN and INT
paulson
parents: 11695
diff changeset
   306
8213fd95acb5 miniscoping of UN and INT
paulson
parents: 11695
diff changeset
   307
Goal "(UN x : (UN y:A. B(y)). C(x)) = (UN y:A. UN x: B(y). C(x))";
8213fd95acb5 miniscoping of UN and INT
paulson
parents: 11695
diff changeset
   308
by (Blast_tac 1);
8213fd95acb5 miniscoping of UN and INT
paulson
parents: 11695
diff changeset
   309
qed "UN_UN_flatten";
517
a9f93400f307 for infinite datatypes with arbitrary index sets
lcp
parents: 435
diff changeset
   310
0
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
   311
(*Halmos, Naive Set Theory, page 35.*)
5321
f8848433d240 got rid of some goal thy commands
paulson
parents: 5147
diff changeset
   312
Goal "B Int (UN i:I. A(i)) = (UN i:I. B Int A(i))";
2877
6476784dba1c Converted to call blast_tac.
paulson
parents: 2493
diff changeset
   313
by (Blast_tac 1);
760
f0200e91b272 added qed and qed_goal[w]
clasohm
parents: 685
diff changeset
   314
qed "Int_UN_distrib";
0
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
   315
5321
f8848433d240 got rid of some goal thy commands
paulson
parents: 5147
diff changeset
   316
Goal "i:I ==> B Un (INT i:I. A(i)) = (INT i:I. B Un A(i))";
2877
6476784dba1c Converted to call blast_tac.
paulson
parents: 2493
diff changeset
   317
by (Blast_tac 1);
760
f0200e91b272 added qed and qed_goal[w]
clasohm
parents: 685
diff changeset
   318
qed "Un_INT_distrib";
0
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
   319
5321
f8848433d240 got rid of some goal thy commands
paulson
parents: 5147
diff changeset
   320
Goal "(UN i:I. A(i)) Int (UN j:J. B(j)) = (UN i:I. UN j:J. A(i) Int B(j))";
2877
6476784dba1c Converted to call blast_tac.
paulson
parents: 2493
diff changeset
   321
by (Blast_tac 1);
760
f0200e91b272 added qed and qed_goal[w]
clasohm
parents: 685
diff changeset
   322
qed "Int_UN_distrib2";
0
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
   323
5321
f8848433d240 got rid of some goal thy commands
paulson
parents: 5147
diff changeset
   324
Goal "[| i:I;  j:J |] ==> \
f8848433d240 got rid of some goal thy commands
paulson
parents: 5147
diff changeset
   325
\     (INT i:I. A(i)) Un (INT j:J. B(j)) = (INT i:I. INT j:J. A(i) Un B(j))";
2877
6476784dba1c Converted to call blast_tac.
paulson
parents: 2493
diff changeset
   326
by (Blast_tac 1);
760
f0200e91b272 added qed and qed_goal[w]
clasohm
parents: 685
diff changeset
   327
qed "Un_INT_distrib2";
0
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
   328
5321
f8848433d240 got rid of some goal thy commands
paulson
parents: 5147
diff changeset
   329
Goal "a: A ==> (UN y:A. c) = c";
2877
6476784dba1c Converted to call blast_tac.
paulson
parents: 2493
diff changeset
   330
by (Blast_tac 1);
760
f0200e91b272 added qed and qed_goal[w]
clasohm
parents: 685
diff changeset
   331
qed "UN_constant";
0
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
   332
5321
f8848433d240 got rid of some goal thy commands
paulson
parents: 5147
diff changeset
   333
Goal "a: A ==> (INT y:A. c) = c";
2877
6476784dba1c Converted to call blast_tac.
paulson
parents: 2493
diff changeset
   334
by (Blast_tac 1);
760
f0200e91b272 added qed and qed_goal[w]
clasohm
parents: 685
diff changeset
   335
qed "INT_constant";
0
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
   336
5321
f8848433d240 got rid of some goal thy commands
paulson
parents: 5147
diff changeset
   337
Goal "(UN y: RepFun(A,f). B(y)) = (UN x:A. B(f(x)))";
4242
97601cf26262 Two new rewrites
paulson
parents: 4091
diff changeset
   338
by (Blast_tac 1);
97601cf26262 Two new rewrites
paulson
parents: 4091
diff changeset
   339
qed "UN_RepFun";
12199
8213fd95acb5 miniscoping of UN and INT
paulson
parents: 11695
diff changeset
   340
Addsimps [UN_RepFun];
4242
97601cf26262 Two new rewrites
paulson
parents: 4091
diff changeset
   341
12199
8213fd95acb5 miniscoping of UN and INT
paulson
parents: 11695
diff changeset
   342
Goal "(INT x:RepFun(A,f). B(x))    = (INT a:A. B(f(a)))";
8213fd95acb5 miniscoping of UN and INT
paulson
parents: 11695
diff changeset
   343
by (auto_tac (claset(), simpset() addsimps [Inter_def])); 
8213fd95acb5 miniscoping of UN and INT
paulson
parents: 11695
diff changeset
   344
qed "INT_RepFun";
8213fd95acb5 miniscoping of UN and INT
paulson
parents: 11695
diff changeset
   345
Addsimps [INT_RepFun];
8213fd95acb5 miniscoping of UN and INT
paulson
parents: 11695
diff changeset
   346
8213fd95acb5 miniscoping of UN and INT
paulson
parents: 11695
diff changeset
   347
Goal "0 ~: A ==> (INT x: Union(A). B(x)) = (INT y:A. INT x:y. B(x))";
8213fd95acb5 miniscoping of UN and INT
paulson
parents: 11695
diff changeset
   348
by (asm_full_simp_tac (simpset() addsimps [Inter_def]) 1); 
8213fd95acb5 miniscoping of UN and INT
paulson
parents: 11695
diff changeset
   349
by (subgoal_tac "ALL x:A. x~=0" 1);
8213fd95acb5 miniscoping of UN and INT
paulson
parents: 11695
diff changeset
   350
by (Blast_tac 2);
8213fd95acb5 miniscoping of UN and INT
paulson
parents: 11695
diff changeset
   351
by (rtac equalityI 1);   
8213fd95acb5 miniscoping of UN and INT
paulson
parents: 11695
diff changeset
   352
by (Clarify_tac 1); 
8213fd95acb5 miniscoping of UN and INT
paulson
parents: 11695
diff changeset
   353
by (blast_tac (claset() addIs []) 1); 
8213fd95acb5 miniscoping of UN and INT
paulson
parents: 11695
diff changeset
   354
by (blast_tac (claset() addSDs [bspec]) 1);   
8213fd95acb5 miniscoping of UN and INT
paulson
parents: 11695
diff changeset
   355
qed "INT_Union_eq";
8213fd95acb5 miniscoping of UN and INT
paulson
parents: 11695
diff changeset
   356
8213fd95acb5 miniscoping of UN and INT
paulson
parents: 11695
diff changeset
   357
Goal "(ALL x:A. B(x) ~= 0) \
8213fd95acb5 miniscoping of UN and INT
paulson
parents: 11695
diff changeset
   358
\     ==> (INT z: (UN x:A. B(x)). C(z)) = (INT x:A. INT z: B(x). C(z))";
8213fd95acb5 miniscoping of UN and INT
paulson
parents: 11695
diff changeset
   359
by (stac INT_Union_eq 1);  
4242
97601cf26262 Two new rewrites
paulson
parents: 4091
diff changeset
   360
by (Blast_tac 1);
12199
8213fd95acb5 miniscoping of UN and INT
paulson
parents: 11695
diff changeset
   361
by (simp_tac (simpset() addsimps [Inter_def]) 1); 
8213fd95acb5 miniscoping of UN and INT
paulson
parents: 11695
diff changeset
   362
qed "INT_UN_eq";
4242
97601cf26262 Two new rewrites
paulson
parents: 4091
diff changeset
   363
97601cf26262 Two new rewrites
paulson
parents: 4091
diff changeset
   364
0
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
   365
(** Devlin, Fundamentals of Contemporary Set Theory, page 12, exercise 5: 
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
   366
    Union of a family of unions **)
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
   367
5321
f8848433d240 got rid of some goal thy commands
paulson
parents: 5147
diff changeset
   368
Goal "(UN i:I. A(i) Un B(i)) = (UN i:I. A(i))  Un  (UN i:I. B(i))";
2877
6476784dba1c Converted to call blast_tac.
paulson
parents: 2493
diff changeset
   369
by (Blast_tac 1);
760
f0200e91b272 added qed and qed_goal[w]
clasohm
parents: 685
diff changeset
   370
qed "UN_Un_distrib";
0
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
   371
5321
f8848433d240 got rid of some goal thy commands
paulson
parents: 5147
diff changeset
   372
Goal "i:I ==> (INT i:I. A(i) Int B(i)) = (INT i:I. A(i)) Int (INT i:I. B(i))";
2877
6476784dba1c Converted to call blast_tac.
paulson
parents: 2493
diff changeset
   373
by (Blast_tac 1);
760
f0200e91b272 added qed and qed_goal[w]
clasohm
parents: 685
diff changeset
   374
qed "INT_Int_distrib";
0
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
   375
5321
f8848433d240 got rid of some goal thy commands
paulson
parents: 5147
diff changeset
   376
Goal "(UN z:I Int J. A(z)) <= (UN z:I. A(z)) Int (UN z:J. A(z))";
2877
6476784dba1c Converted to call blast_tac.
paulson
parents: 2493
diff changeset
   377
by (Blast_tac 1);
1784
036a7f301623 Added a new theorem, UN_Int_subset
paulson
parents: 1652
diff changeset
   378
qed "UN_Int_subset";
036a7f301623 Added a new theorem, UN_Int_subset
paulson
parents: 1652
diff changeset
   379
0
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
   380
(** Devlin, page 12, exercise 5: Complements **)
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
   381
5321
f8848433d240 got rid of some goal thy commands
paulson
parents: 5147
diff changeset
   382
Goal "i:I ==> B - (UN i:I. A(i)) = (INT i:I. B - A(i))";
2877
6476784dba1c Converted to call blast_tac.
paulson
parents: 2493
diff changeset
   383
by (Blast_tac 1);
760
f0200e91b272 added qed and qed_goal[w]
clasohm
parents: 685
diff changeset
   384
qed "Diff_UN";
0
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
   385
5321
f8848433d240 got rid of some goal thy commands
paulson
parents: 5147
diff changeset
   386
Goal "i:I ==> B - (INT i:I. A(i)) = (UN i:I. B - A(i))";
2877
6476784dba1c Converted to call blast_tac.
paulson
parents: 2493
diff changeset
   387
by (Blast_tac 1);
760
f0200e91b272 added qed and qed_goal[w]
clasohm
parents: 685
diff changeset
   388
qed "Diff_INT";
0
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
   389
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
   390
(** Unions and Intersections with General Sum **)
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
   391
1611
35e0fd1b1775 New results from AC/Cardinal_aux.ML
paulson
parents: 1568
diff changeset
   392
(*Not suitable for rewriting: LOOPS!*)
5321
f8848433d240 got rid of some goal thy commands
paulson
parents: 5147
diff changeset
   393
Goal "Sigma(cons(a,B), C) = ({a}*C(a)) Un Sigma(B,C)";
2877
6476784dba1c Converted to call blast_tac.
paulson
parents: 2493
diff changeset
   394
by (Blast_tac 1);
1611
35e0fd1b1775 New results from AC/Cardinal_aux.ML
paulson
parents: 1568
diff changeset
   395
qed "Sigma_cons1";
35e0fd1b1775 New results from AC/Cardinal_aux.ML
paulson
parents: 1568
diff changeset
   396
35e0fd1b1775 New results from AC/Cardinal_aux.ML
paulson
parents: 1568
diff changeset
   397
(*Not suitable for rewriting: LOOPS!*)
5321
f8848433d240 got rid of some goal thy commands
paulson
parents: 5147
diff changeset
   398
Goal "A * cons(b,B) = A*{b} Un A*B";
2877
6476784dba1c Converted to call blast_tac.
paulson
parents: 2493
diff changeset
   399
by (Blast_tac 1);
1611
35e0fd1b1775 New results from AC/Cardinal_aux.ML
paulson
parents: 1568
diff changeset
   400
qed "Sigma_cons2";
35e0fd1b1775 New results from AC/Cardinal_aux.ML
paulson
parents: 1568
diff changeset
   401
5321
f8848433d240 got rid of some goal thy commands
paulson
parents: 5147
diff changeset
   402
Goal "Sigma(succ(A), B) = ({A}*B(A)) Un Sigma(A,B)";
2877
6476784dba1c Converted to call blast_tac.
paulson
parents: 2493
diff changeset
   403
by (Blast_tac 1);
1611
35e0fd1b1775 New results from AC/Cardinal_aux.ML
paulson
parents: 1568
diff changeset
   404
qed "Sigma_succ1";
35e0fd1b1775 New results from AC/Cardinal_aux.ML
paulson
parents: 1568
diff changeset
   405
5321
f8848433d240 got rid of some goal thy commands
paulson
parents: 5147
diff changeset
   406
Goal "A * succ(B) = A*{B} Un A*B";
2877
6476784dba1c Converted to call blast_tac.
paulson
parents: 2493
diff changeset
   407
by (Blast_tac 1);
1611
35e0fd1b1775 New results from AC/Cardinal_aux.ML
paulson
parents: 1568
diff changeset
   408
qed "Sigma_succ2";
520
806d3f00590d ZF/equalities/Sigma_cons: new
lcp
parents: 517
diff changeset
   409
5321
f8848433d240 got rid of some goal thy commands
paulson
parents: 5147
diff changeset
   410
Goal "(SUM x:(UN y:A. C(y)). B(x)) = (UN y:A. SUM x:C(y). B(x))";
2877
6476784dba1c Converted to call blast_tac.
paulson
parents: 2493
diff changeset
   411
by (Blast_tac 1);
760
f0200e91b272 added qed and qed_goal[w]
clasohm
parents: 685
diff changeset
   412
qed "SUM_UN_distrib1";
182
e30b55c07235 New distributive laws for Sigma and UN
lcp
parents: 0
diff changeset
   413
5321
f8848433d240 got rid of some goal thy commands
paulson
parents: 5147
diff changeset
   414
Goal "(SUM i:I. UN j:J. C(i,j)) = (UN j:J. SUM i:I. C(i,j))";
2877
6476784dba1c Converted to call blast_tac.
paulson
parents: 2493
diff changeset
   415
by (Blast_tac 1);
760
f0200e91b272 added qed and qed_goal[w]
clasohm
parents: 685
diff changeset
   416
qed "SUM_UN_distrib2";
182
e30b55c07235 New distributive laws for Sigma and UN
lcp
parents: 0
diff changeset
   417
5321
f8848433d240 got rid of some goal thy commands
paulson
parents: 5147
diff changeset
   418
Goal "(SUM i:I Un J. C(i)) = (SUM i:I. C(i)) Un (SUM j:J. C(j))";
2877
6476784dba1c Converted to call blast_tac.
paulson
parents: 2493
diff changeset
   419
by (Blast_tac 1);
760
f0200e91b272 added qed and qed_goal[w]
clasohm
parents: 685
diff changeset
   420
qed "SUM_Un_distrib1";
0
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
   421
5321
f8848433d240 got rid of some goal thy commands
paulson
parents: 5147
diff changeset
   422
Goal "(SUM i:I. A(i) Un B(i)) = (SUM i:I. A(i)) Un (SUM i:I. B(i))";
2877
6476784dba1c Converted to call blast_tac.
paulson
parents: 2493
diff changeset
   423
by (Blast_tac 1);
760
f0200e91b272 added qed and qed_goal[w]
clasohm
parents: 685
diff changeset
   424
qed "SUM_Un_distrib2";
0
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
   425
685
0727f0c0c4f0 ZF/equalities/domain_converse,range_converse,
lcp
parents: 536
diff changeset
   426
(*First-order version of the above, for rewriting*)
5321
f8848433d240 got rid of some goal thy commands
paulson
parents: 5147
diff changeset
   427
Goal "I * (A Un B) = I*A Un I*B";
1461
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1056
diff changeset
   428
by (rtac SUM_Un_distrib2 1);
760
f0200e91b272 added qed and qed_goal[w]
clasohm
parents: 685
diff changeset
   429
qed "prod_Un_distrib2";
685
0727f0c0c4f0 ZF/equalities/domain_converse,range_converse,
lcp
parents: 536
diff changeset
   430
5321
f8848433d240 got rid of some goal thy commands
paulson
parents: 5147
diff changeset
   431
Goal "(SUM i:I Int J. C(i)) = (SUM i:I. C(i)) Int (SUM j:J. C(j))";
2877
6476784dba1c Converted to call blast_tac.
paulson
parents: 2493
diff changeset
   432
by (Blast_tac 1);
760
f0200e91b272 added qed and qed_goal[w]
clasohm
parents: 685
diff changeset
   433
qed "SUM_Int_distrib1";
0
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
   434
5321
f8848433d240 got rid of some goal thy commands
paulson
parents: 5147
diff changeset
   435
Goal "(SUM i:I. A(i) Int B(i)) = (SUM i:I. A(i)) Int (SUM i:I. B(i))";
2877
6476784dba1c Converted to call blast_tac.
paulson
parents: 2493
diff changeset
   436
by (Blast_tac 1);
760
f0200e91b272 added qed and qed_goal[w]
clasohm
parents: 685
diff changeset
   437
qed "SUM_Int_distrib2";
0
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
   438
685
0727f0c0c4f0 ZF/equalities/domain_converse,range_converse,
lcp
parents: 536
diff changeset
   439
(*First-order version of the above, for rewriting*)
5321
f8848433d240 got rid of some goal thy commands
paulson
parents: 5147
diff changeset
   440
Goal "I * (A Int B) = I*A Int I*B";
1461
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1056
diff changeset
   441
by (rtac SUM_Int_distrib2 1);
760
f0200e91b272 added qed and qed_goal[w]
clasohm
parents: 685
diff changeset
   442
qed "prod_Int_distrib2";
685
0727f0c0c4f0 ZF/equalities/domain_converse,range_converse,
lcp
parents: 536
diff changeset
   443
192
3dc5c8016a0e ZF/equalities/SUM_eq_UN: new
lcp
parents: 182
diff changeset
   444
(*Cf Aczel, Non-Well-Founded Sets, page 115*)
5321
f8848433d240 got rid of some goal thy commands
paulson
parents: 5147
diff changeset
   445
Goal "(SUM i:I. A(i)) = (UN i:I. {i} * A(i))";
2877
6476784dba1c Converted to call blast_tac.
paulson
parents: 2493
diff changeset
   446
by (Blast_tac 1);
760
f0200e91b272 added qed and qed_goal[w]
clasohm
parents: 685
diff changeset
   447
qed "SUM_eq_UN";
192
3dc5c8016a0e ZF/equalities/SUM_eq_UN: new
lcp
parents: 182
diff changeset
   448
536
5fbfa997f1b0 ZF/domrange/domain_of_prod, domain_empty, etc: moved to equalities.ML where
lcp
parents: 520
diff changeset
   449
(** Domain **)
5fbfa997f1b0 ZF/domrange/domain_of_prod, domain_empty, etc: moved to equalities.ML where
lcp
parents: 520
diff changeset
   450
5321
f8848433d240 got rid of some goal thy commands
paulson
parents: 5147
diff changeset
   451
Goal "b:B ==> domain(A*B) = A";
f8848433d240 got rid of some goal thy commands
paulson
parents: 5147
diff changeset
   452
by (Blast_tac 1);
f8848433d240 got rid of some goal thy commands
paulson
parents: 5147
diff changeset
   453
qed "domain_of_prod";
536
5fbfa997f1b0 ZF/domrange/domain_of_prod, domain_empty, etc: moved to equalities.ML where
lcp
parents: 520
diff changeset
   454
9180
3bda56c0d70d tidying and unbatchifying
paulson
parents: 6298
diff changeset
   455
Goal "domain(0) = 0";
3bda56c0d70d tidying and unbatchifying
paulson
parents: 6298
diff changeset
   456
by (Blast_tac 1);
3bda56c0d70d tidying and unbatchifying
paulson
parents: 6298
diff changeset
   457
qed "domain_0";
12199
8213fd95acb5 miniscoping of UN and INT
paulson
parents: 11695
diff changeset
   458
Addsimps [domain_0];
536
5fbfa997f1b0 ZF/domrange/domain_of_prod, domain_empty, etc: moved to equalities.ML where
lcp
parents: 520
diff changeset
   459
9180
3bda56c0d70d tidying and unbatchifying
paulson
parents: 6298
diff changeset
   460
Goal "domain(cons(<a,b>,r)) = cons(a, domain(r))";
3bda56c0d70d tidying and unbatchifying
paulson
parents: 6298
diff changeset
   461
by (Blast_tac 1);
3bda56c0d70d tidying and unbatchifying
paulson
parents: 6298
diff changeset
   462
qed "domain_cons";
12199
8213fd95acb5 miniscoping of UN and INT
paulson
parents: 11695
diff changeset
   463
Addsimps [domain_cons];
0
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
   464
5321
f8848433d240 got rid of some goal thy commands
paulson
parents: 5147
diff changeset
   465
Goal "domain(A Un B) = domain(A) Un domain(B)";
2877
6476784dba1c Converted to call blast_tac.
paulson
parents: 2493
diff changeset
   466
by (Blast_tac 1);
760
f0200e91b272 added qed and qed_goal[w]
clasohm
parents: 685
diff changeset
   467
qed "domain_Un_eq";
12199
8213fd95acb5 miniscoping of UN and INT
paulson
parents: 11695
diff changeset
   468
Addsimps [domain_Un_eq];
0
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
   469
5321
f8848433d240 got rid of some goal thy commands
paulson
parents: 5147
diff changeset
   470
Goal "domain(A Int B) <= domain(A) Int domain(B)";
2877
6476784dba1c Converted to call blast_tac.
paulson
parents: 2493
diff changeset
   471
by (Blast_tac 1);
760
f0200e91b272 added qed and qed_goal[w]
clasohm
parents: 685
diff changeset
   472
qed "domain_Int_subset";
0
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
   473
5321
f8848433d240 got rid of some goal thy commands
paulson
parents: 5147
diff changeset
   474
Goal "domain(A) - domain(B) <= domain(A - B)";
2877
6476784dba1c Converted to call blast_tac.
paulson
parents: 2493
diff changeset
   475
by (Blast_tac 1);
1056
097b3255bf3a Renamed domain_diff_subset, range_diff_subset,
lcp
parents: 1035
diff changeset
   476
qed "domain_Diff_subset";
0
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
   477
5321
f8848433d240 got rid of some goal thy commands
paulson
parents: 5147
diff changeset
   478
Goal "domain(converse(r)) = range(r)";
2877
6476784dba1c Converted to call blast_tac.
paulson
parents: 2493
diff changeset
   479
by (Blast_tac 1);
760
f0200e91b272 added qed and qed_goal[w]
clasohm
parents: 685
diff changeset
   480
qed "domain_converse";
12199
8213fd95acb5 miniscoping of UN and INT
paulson
parents: 11695
diff changeset
   481
Addsimps [domain_converse];
685
0727f0c0c4f0 ZF/equalities/domain_converse,range_converse,
lcp
parents: 536
diff changeset
   482
12199
8213fd95acb5 miniscoping of UN and INT
paulson
parents: 11695
diff changeset
   483
Goal "domain(UN x:A. B(x)) = (UN x:A. domain(B(x)))";
8213fd95acb5 miniscoping of UN and INT
paulson
parents: 11695
diff changeset
   484
by (Blast_tac 1); 
8213fd95acb5 miniscoping of UN and INT
paulson
parents: 11695
diff changeset
   485
qed "domain_UN";
8213fd95acb5 miniscoping of UN and INT
paulson
parents: 11695
diff changeset
   486
8213fd95acb5 miniscoping of UN and INT
paulson
parents: 11695
diff changeset
   487
Goal "domain(Union(A)) = (UN x:A. domain(x))";
8213fd95acb5 miniscoping of UN and INT
paulson
parents: 11695
diff changeset
   488
by (Blast_tac 1); 
8213fd95acb5 miniscoping of UN and INT
paulson
parents: 11695
diff changeset
   489
qed "domain_Union";
685
0727f0c0c4f0 ZF/equalities/domain_converse,range_converse,
lcp
parents: 536
diff changeset
   490
0727f0c0c4f0 ZF/equalities/domain_converse,range_converse,
lcp
parents: 536
diff changeset
   491
536
5fbfa997f1b0 ZF/domrange/domain_of_prod, domain_empty, etc: moved to equalities.ML where
lcp
parents: 520
diff changeset
   492
(** Range **)
5fbfa997f1b0 ZF/domrange/domain_of_prod, domain_empty, etc: moved to equalities.ML where
lcp
parents: 520
diff changeset
   493
5321
f8848433d240 got rid of some goal thy commands
paulson
parents: 5147
diff changeset
   494
Goal "a:A ==> range(A*B) = B";
f8848433d240 got rid of some goal thy commands
paulson
parents: 5147
diff changeset
   495
by (Blast_tac 1);
f8848433d240 got rid of some goal thy commands
paulson
parents: 5147
diff changeset
   496
qed "range_of_prod";
536
5fbfa997f1b0 ZF/domrange/domain_of_prod, domain_empty, etc: moved to equalities.ML where
lcp
parents: 520
diff changeset
   497
9180
3bda56c0d70d tidying and unbatchifying
paulson
parents: 6298
diff changeset
   498
Goal "range(0) = 0";
3bda56c0d70d tidying and unbatchifying
paulson
parents: 6298
diff changeset
   499
by (Blast_tac 1);
3bda56c0d70d tidying and unbatchifying
paulson
parents: 6298
diff changeset
   500
qed "range_0"; 
536
5fbfa997f1b0 ZF/domrange/domain_of_prod, domain_empty, etc: moved to equalities.ML where
lcp
parents: 520
diff changeset
   501
9180
3bda56c0d70d tidying and unbatchifying
paulson
parents: 6298
diff changeset
   502
Goal "range(cons(<a,b>,r)) = cons(b, range(r))";
3bda56c0d70d tidying and unbatchifying
paulson
parents: 6298
diff changeset
   503
by (Blast_tac 1);
3bda56c0d70d tidying and unbatchifying
paulson
parents: 6298
diff changeset
   504
qed "range_cons";
536
5fbfa997f1b0 ZF/domrange/domain_of_prod, domain_empty, etc: moved to equalities.ML where
lcp
parents: 520
diff changeset
   505
5321
f8848433d240 got rid of some goal thy commands
paulson
parents: 5147
diff changeset
   506
Goal "range(A Un B) = range(A) Un range(B)";
2877
6476784dba1c Converted to call blast_tac.
paulson
parents: 2493
diff changeset
   507
by (Blast_tac 1);
760
f0200e91b272 added qed and qed_goal[w]
clasohm
parents: 685
diff changeset
   508
qed "range_Un_eq";
0
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
   509
5321
f8848433d240 got rid of some goal thy commands
paulson
parents: 5147
diff changeset
   510
Goal "range(A Int B) <= range(A) Int range(B)";
2877
6476784dba1c Converted to call blast_tac.
paulson
parents: 2493
diff changeset
   511
by (Blast_tac 1);
760
f0200e91b272 added qed and qed_goal[w]
clasohm
parents: 685
diff changeset
   512
qed "range_Int_subset";
0
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
   513
5321
f8848433d240 got rid of some goal thy commands
paulson
parents: 5147
diff changeset
   514
Goal "range(A) - range(B) <= range(A - B)";
2877
6476784dba1c Converted to call blast_tac.
paulson
parents: 2493
diff changeset
   515
by (Blast_tac 1);
1056
097b3255bf3a Renamed domain_diff_subset, range_diff_subset,
lcp
parents: 1035
diff changeset
   516
qed "range_Diff_subset";
0
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
   517
5321
f8848433d240 got rid of some goal thy commands
paulson
parents: 5147
diff changeset
   518
Goal "range(converse(r)) = domain(r)";
2877
6476784dba1c Converted to call blast_tac.
paulson
parents: 2493
diff changeset
   519
by (Blast_tac 1);
760
f0200e91b272 added qed and qed_goal[w]
clasohm
parents: 685
diff changeset
   520
qed "range_converse";
685
0727f0c0c4f0 ZF/equalities/domain_converse,range_converse,
lcp
parents: 536
diff changeset
   521
2469
b50b8c0eec01 Implicit simpsets and clasets for FOL and ZF
paulson
parents: 1784
diff changeset
   522
Addsimps [range_0, range_cons, range_Un_eq, range_converse];
b50b8c0eec01 Implicit simpsets and clasets for FOL and ZF
paulson
parents: 1784
diff changeset
   523
b50b8c0eec01 Implicit simpsets and clasets for FOL and ZF
paulson
parents: 1784
diff changeset
   524
536
5fbfa997f1b0 ZF/domrange/domain_of_prod, domain_empty, etc: moved to equalities.ML where
lcp
parents: 520
diff changeset
   525
(** Field **)
5fbfa997f1b0 ZF/domrange/domain_of_prod, domain_empty, etc: moved to equalities.ML where
lcp
parents: 520
diff changeset
   526
9180
3bda56c0d70d tidying and unbatchifying
paulson
parents: 6298
diff changeset
   527
Goal "field(A*A) = A";
3bda56c0d70d tidying and unbatchifying
paulson
parents: 6298
diff changeset
   528
by (Blast_tac 1);
3bda56c0d70d tidying and unbatchifying
paulson
parents: 6298
diff changeset
   529
qed "field_of_prod"; 
536
5fbfa997f1b0 ZF/domrange/domain_of_prod, domain_empty, etc: moved to equalities.ML where
lcp
parents: 520
diff changeset
   530
9180
3bda56c0d70d tidying and unbatchifying
paulson
parents: 6298
diff changeset
   531
Goal "field(0) = 0";
3bda56c0d70d tidying and unbatchifying
paulson
parents: 6298
diff changeset
   532
by (Blast_tac 1);
3bda56c0d70d tidying and unbatchifying
paulson
parents: 6298
diff changeset
   533
qed "field_0"; 
536
5fbfa997f1b0 ZF/domrange/domain_of_prod, domain_empty, etc: moved to equalities.ML where
lcp
parents: 520
diff changeset
   534
9180
3bda56c0d70d tidying and unbatchifying
paulson
parents: 6298
diff changeset
   535
Goal "field(cons(<a,b>,r)) = cons(a, cons(b, field(r)))";
3bda56c0d70d tidying and unbatchifying
paulson
parents: 6298
diff changeset
   536
by (rtac equalityI 1);
3bda56c0d70d tidying and unbatchifying
paulson
parents: 6298
diff changeset
   537
by (ALLGOALS Blast_tac) ;
3bda56c0d70d tidying and unbatchifying
paulson
parents: 6298
diff changeset
   538
qed "field_cons";
536
5fbfa997f1b0 ZF/domrange/domain_of_prod, domain_empty, etc: moved to equalities.ML where
lcp
parents: 520
diff changeset
   539
5321
f8848433d240 got rid of some goal thy commands
paulson
parents: 5147
diff changeset
   540
Goal "field(A Un B) = field(A) Un field(B)";
2877
6476784dba1c Converted to call blast_tac.
paulson
parents: 2493
diff changeset
   541
by (Blast_tac 1);
760
f0200e91b272 added qed and qed_goal[w]
clasohm
parents: 685
diff changeset
   542
qed "field_Un_eq";
0
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
   543
5321
f8848433d240 got rid of some goal thy commands
paulson
parents: 5147
diff changeset
   544
Goal "field(A Int B) <= field(A) Int field(B)";
2877
6476784dba1c Converted to call blast_tac.
paulson
parents: 2493
diff changeset
   545
by (Blast_tac 1);
760
f0200e91b272 added qed and qed_goal[w]
clasohm
parents: 685
diff changeset
   546
qed "field_Int_subset";
0
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
   547
5321
f8848433d240 got rid of some goal thy commands
paulson
parents: 5147
diff changeset
   548
Goal "field(A) - field(B) <= field(A - B)";
2877
6476784dba1c Converted to call blast_tac.
paulson
parents: 2493
diff changeset
   549
by (Blast_tac 1);
1056
097b3255bf3a Renamed domain_diff_subset, range_diff_subset,
lcp
parents: 1035
diff changeset
   550
qed "field_Diff_subset";
0
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
   551
5321
f8848433d240 got rid of some goal thy commands
paulson
parents: 5147
diff changeset
   552
Goal "field(converse(r)) = field(r)";
2877
6476784dba1c Converted to call blast_tac.
paulson
parents: 2493
diff changeset
   553
by (Blast_tac 1);
2469
b50b8c0eec01 Implicit simpsets and clasets for FOL and ZF
paulson
parents: 1784
diff changeset
   554
qed "field_converse";
b50b8c0eec01 Implicit simpsets and clasets for FOL and ZF
paulson
parents: 1784
diff changeset
   555
b50b8c0eec01 Implicit simpsets and clasets for FOL and ZF
paulson
parents: 1784
diff changeset
   556
Addsimps [field_0, field_cons, field_Un_eq, field_converse];
b50b8c0eec01 Implicit simpsets and clasets for FOL and ZF
paulson
parents: 1784
diff changeset
   557
0
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
   558
435
ca5356bd315a Addition of cardinals and order types, various tidying
lcp
parents: 268
diff changeset
   559
(** Image **)
ca5356bd315a Addition of cardinals and order types, various tidying
lcp
parents: 268
diff changeset
   560
5321
f8848433d240 got rid of some goal thy commands
paulson
parents: 5147
diff changeset
   561
Goal "r``0 = 0";
2877
6476784dba1c Converted to call blast_tac.
paulson
parents: 2493
diff changeset
   562
by (Blast_tac 1);
760
f0200e91b272 added qed and qed_goal[w]
clasohm
parents: 685
diff changeset
   563
qed "image_0";
435
ca5356bd315a Addition of cardinals and order types, various tidying
lcp
parents: 268
diff changeset
   564
5321
f8848433d240 got rid of some goal thy commands
paulson
parents: 5147
diff changeset
   565
Goal "r``(A Un B) = (r``A) Un (r``B)";
2877
6476784dba1c Converted to call blast_tac.
paulson
parents: 2493
diff changeset
   566
by (Blast_tac 1);
760
f0200e91b272 added qed and qed_goal[w]
clasohm
parents: 685
diff changeset
   567
qed "image_Un";
435
ca5356bd315a Addition of cardinals and order types, various tidying
lcp
parents: 268
diff changeset
   568
5321
f8848433d240 got rid of some goal thy commands
paulson
parents: 5147
diff changeset
   569
Goal "r``(A Int B) <= (r``A) Int (r``B)";
2877
6476784dba1c Converted to call blast_tac.
paulson
parents: 2493
diff changeset
   570
by (Blast_tac 1);
760
f0200e91b272 added qed and qed_goal[w]
clasohm
parents: 685
diff changeset
   571
qed "image_Int_subset";
435
ca5356bd315a Addition of cardinals and order types, various tidying
lcp
parents: 268
diff changeset
   572
5321
f8848433d240 got rid of some goal thy commands
paulson
parents: 5147
diff changeset
   573
Goal "(r Int A*A)``B <= (r``B) Int A";
2877
6476784dba1c Converted to call blast_tac.
paulson
parents: 2493
diff changeset
   574
by (Blast_tac 1);
760
f0200e91b272 added qed and qed_goal[w]
clasohm
parents: 685
diff changeset
   575
qed "image_Int_square_subset";
435
ca5356bd315a Addition of cardinals and order types, various tidying
lcp
parents: 268
diff changeset
   576
5321
f8848433d240 got rid of some goal thy commands
paulson
parents: 5147
diff changeset
   577
Goal "B<=A ==> (r Int A*A)``B = (r``B) Int A";
2877
6476784dba1c Converted to call blast_tac.
paulson
parents: 2493
diff changeset
   578
by (Blast_tac 1);
760
f0200e91b272 added qed and qed_goal[w]
clasohm
parents: 685
diff changeset
   579
qed "image_Int_square";
435
ca5356bd315a Addition of cardinals and order types, various tidying
lcp
parents: 268
diff changeset
   580
2469
b50b8c0eec01 Implicit simpsets and clasets for FOL and ZF
paulson
parents: 1784
diff changeset
   581
Addsimps [image_0, image_Un];
b50b8c0eec01 Implicit simpsets and clasets for FOL and ZF
paulson
parents: 1784
diff changeset
   582
4840
b8f2ec739530 new thms image_0_left, image_Un_left, etc.
paulson
parents: 4660
diff changeset
   583
(*Image laws for special relations*)
5321
f8848433d240 got rid of some goal thy commands
paulson
parents: 5147
diff changeset
   584
Goal "0``A = 0";
4840
b8f2ec739530 new thms image_0_left, image_Un_left, etc.
paulson
parents: 4660
diff changeset
   585
by (Blast_tac 1);
b8f2ec739530 new thms image_0_left, image_Un_left, etc.
paulson
parents: 4660
diff changeset
   586
qed "image_0_left";
b8f2ec739530 new thms image_0_left, image_Un_left, etc.
paulson
parents: 4660
diff changeset
   587
Addsimps [image_0_left];
b8f2ec739530 new thms image_0_left, image_Un_left, etc.
paulson
parents: 4660
diff changeset
   588
5321
f8848433d240 got rid of some goal thy commands
paulson
parents: 5147
diff changeset
   589
Goal "(r Un s)``A = (r``A) Un (s``A)";
4840
b8f2ec739530 new thms image_0_left, image_Un_left, etc.
paulson
parents: 4660
diff changeset
   590
by (Blast_tac 1);
b8f2ec739530 new thms image_0_left, image_Un_left, etc.
paulson
parents: 4660
diff changeset
   591
qed "image_Un_left";
b8f2ec739530 new thms image_0_left, image_Un_left, etc.
paulson
parents: 4660
diff changeset
   592
5321
f8848433d240 got rid of some goal thy commands
paulson
parents: 5147
diff changeset
   593
Goal "(r Int s)``A <= (r``A) Int (s``A)";
4840
b8f2ec739530 new thms image_0_left, image_Un_left, etc.
paulson
parents: 4660
diff changeset
   594
by (Blast_tac 1);
b8f2ec739530 new thms image_0_left, image_Un_left, etc.
paulson
parents: 4660
diff changeset
   595
qed "image_Int_subset_left";
b8f2ec739530 new thms image_0_left, image_Un_left, etc.
paulson
parents: 4660
diff changeset
   596
435
ca5356bd315a Addition of cardinals and order types, various tidying
lcp
parents: 268
diff changeset
   597
ca5356bd315a Addition of cardinals and order types, various tidying
lcp
parents: 268
diff changeset
   598
(** Inverse Image **)
ca5356bd315a Addition of cardinals and order types, various tidying
lcp
parents: 268
diff changeset
   599
5321
f8848433d240 got rid of some goal thy commands
paulson
parents: 5147
diff changeset
   600
Goal "r-``0 = 0";
2877
6476784dba1c Converted to call blast_tac.
paulson
parents: 2493
diff changeset
   601
by (Blast_tac 1);
760
f0200e91b272 added qed and qed_goal[w]
clasohm
parents: 685
diff changeset
   602
qed "vimage_0";
12199
8213fd95acb5 miniscoping of UN and INT
paulson
parents: 11695
diff changeset
   603
Addsimps [vimage_0];
435
ca5356bd315a Addition of cardinals and order types, various tidying
lcp
parents: 268
diff changeset
   604
5321
f8848433d240 got rid of some goal thy commands
paulson
parents: 5147
diff changeset
   605
Goal "r-``(A Un B) = (r-``A) Un (r-``B)";
2877
6476784dba1c Converted to call blast_tac.
paulson
parents: 2493
diff changeset
   606
by (Blast_tac 1);
760
f0200e91b272 added qed and qed_goal[w]
clasohm
parents: 685
diff changeset
   607
qed "vimage_Un";
12199
8213fd95acb5 miniscoping of UN and INT
paulson
parents: 11695
diff changeset
   608
Addsimps [vimage_Un];
435
ca5356bd315a Addition of cardinals and order types, various tidying
lcp
parents: 268
diff changeset
   609
5321
f8848433d240 got rid of some goal thy commands
paulson
parents: 5147
diff changeset
   610
Goal "r-``(A Int B) <= (r-``A) Int (r-``B)";
2877
6476784dba1c Converted to call blast_tac.
paulson
parents: 2493
diff changeset
   611
by (Blast_tac 1);
760
f0200e91b272 added qed and qed_goal[w]
clasohm
parents: 685
diff changeset
   612
qed "vimage_Int_subset";
435
ca5356bd315a Addition of cardinals and order types, various tidying
lcp
parents: 268
diff changeset
   613
12199
8213fd95acb5 miniscoping of UN and INT
paulson
parents: 11695
diff changeset
   614
(*NOT suitable for rewriting*)
8213fd95acb5 miniscoping of UN and INT
paulson
parents: 11695
diff changeset
   615
Goal "f -``B = (UN y:B. f-``{y})";
8213fd95acb5 miniscoping of UN and INT
paulson
parents: 11695
diff changeset
   616
by (Blast_tac 1);
8213fd95acb5 miniscoping of UN and INT
paulson
parents: 11695
diff changeset
   617
qed "vimage_eq_UN";
8213fd95acb5 miniscoping of UN and INT
paulson
parents: 11695
diff changeset
   618
5321
f8848433d240 got rid of some goal thy commands
paulson
parents: 5147
diff changeset
   619
Goalw [function_def] "function(f) ==> f-``(A Int B) = (f-``A)  Int  (f-``B)";
4660
63f0b2601792 New vimage laws
paulson
parents: 4242
diff changeset
   620
by (Blast_tac 1);
63f0b2601792 New vimage laws
paulson
parents: 4242
diff changeset
   621
qed "function_vimage_Int";
63f0b2601792 New vimage laws
paulson
parents: 4242
diff changeset
   622
5321
f8848433d240 got rid of some goal thy commands
paulson
parents: 5147
diff changeset
   623
Goalw [function_def] "function(f) ==> f-``(A-B) = (f-``A) - (f-``B)";
4660
63f0b2601792 New vimage laws
paulson
parents: 4242
diff changeset
   624
by (Blast_tac 1);
63f0b2601792 New vimage laws
paulson
parents: 4242
diff changeset
   625
qed "function_vimage_Diff";
63f0b2601792 New vimage laws
paulson
parents: 4242
diff changeset
   626
5321
f8848433d240 got rid of some goal thy commands
paulson
parents: 5147
diff changeset
   627
Goalw [function_def] "function(f) ==> f `` (f-`` A) <= A";
f8848433d240 got rid of some goal thy commands
paulson
parents: 5147
diff changeset
   628
by (Blast_tac 1);
f8848433d240 got rid of some goal thy commands
paulson
parents: 5147
diff changeset
   629
qed "function_image_vimage";
f8848433d240 got rid of some goal thy commands
paulson
parents: 5147
diff changeset
   630
f8848433d240 got rid of some goal thy commands
paulson
parents: 5147
diff changeset
   631
Goal "(r Int A*A)-``B <= (r-``B) Int A";
2877
6476784dba1c Converted to call blast_tac.
paulson
parents: 2493
diff changeset
   632
by (Blast_tac 1);
760
f0200e91b272 added qed and qed_goal[w]
clasohm
parents: 685
diff changeset
   633
qed "vimage_Int_square_subset";
435
ca5356bd315a Addition of cardinals and order types, various tidying
lcp
parents: 268
diff changeset
   634
5321
f8848433d240 got rid of some goal thy commands
paulson
parents: 5147
diff changeset
   635
Goal "B<=A ==> (r Int A*A)-``B = (r-``B) Int A";
2877
6476784dba1c Converted to call blast_tac.
paulson
parents: 2493
diff changeset
   636
by (Blast_tac 1);
760
f0200e91b272 added qed and qed_goal[w]
clasohm
parents: 685
diff changeset
   637
qed "vimage_Int_square";
435
ca5356bd315a Addition of cardinals and order types, various tidying
lcp
parents: 268
diff changeset
   638
2469
b50b8c0eec01 Implicit simpsets and clasets for FOL and ZF
paulson
parents: 1784
diff changeset
   639
435
ca5356bd315a Addition of cardinals and order types, various tidying
lcp
parents: 268
diff changeset
   640
4840
b8f2ec739530 new thms image_0_left, image_Un_left, etc.
paulson
parents: 4660
diff changeset
   641
(*Invese image laws for special relations*)
5321
f8848433d240 got rid of some goal thy commands
paulson
parents: 5147
diff changeset
   642
Goal "0-``A = 0";
4840
b8f2ec739530 new thms image_0_left, image_Un_left, etc.
paulson
parents: 4660
diff changeset
   643
by (Blast_tac 1);
b8f2ec739530 new thms image_0_left, image_Un_left, etc.
paulson
parents: 4660
diff changeset
   644
qed "vimage_0_left";
b8f2ec739530 new thms image_0_left, image_Un_left, etc.
paulson
parents: 4660
diff changeset
   645
Addsimps [vimage_0_left];
b8f2ec739530 new thms image_0_left, image_Un_left, etc.
paulson
parents: 4660
diff changeset
   646
5321
f8848433d240 got rid of some goal thy commands
paulson
parents: 5147
diff changeset
   647
Goal "(r Un s)-``A = (r-``A) Un (s-``A)";
4840
b8f2ec739530 new thms image_0_left, image_Un_left, etc.
paulson
parents: 4660
diff changeset
   648
by (Blast_tac 1);
b8f2ec739530 new thms image_0_left, image_Un_left, etc.
paulson
parents: 4660
diff changeset
   649
qed "vimage_Un_left";
b8f2ec739530 new thms image_0_left, image_Un_left, etc.
paulson
parents: 4660
diff changeset
   650
5321
f8848433d240 got rid of some goal thy commands
paulson
parents: 5147
diff changeset
   651
Goal "(r Int s)-``A <= (r-``A) Int (s-``A)";
4840
b8f2ec739530 new thms image_0_left, image_Un_left, etc.
paulson
parents: 4660
diff changeset
   652
by (Blast_tac 1);
b8f2ec739530 new thms image_0_left, image_Un_left, etc.
paulson
parents: 4660
diff changeset
   653
qed "vimage_Int_subset_left";
b8f2ec739530 new thms image_0_left, image_Un_left, etc.
paulson
parents: 4660
diff changeset
   654
b8f2ec739530 new thms image_0_left, image_Un_left, etc.
paulson
parents: 4660
diff changeset
   655
0
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
   656
(** Converse **)
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
   657
5321
f8848433d240 got rid of some goal thy commands
paulson
parents: 5147
diff changeset
   658
Goal "converse(A Un B) = converse(A) Un converse(B)";
2877
6476784dba1c Converted to call blast_tac.
paulson
parents: 2493
diff changeset
   659
by (Blast_tac 1);
760
f0200e91b272 added qed and qed_goal[w]
clasohm
parents: 685
diff changeset
   660
qed "converse_Un";
0
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
   661
5321
f8848433d240 got rid of some goal thy commands
paulson
parents: 5147
diff changeset
   662
Goal "converse(A Int B) = converse(A) Int converse(B)";
2877
6476784dba1c Converted to call blast_tac.
paulson
parents: 2493
diff changeset
   663
by (Blast_tac 1);
760
f0200e91b272 added qed and qed_goal[w]
clasohm
parents: 685
diff changeset
   664
qed "converse_Int";
0
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
   665
5321
f8848433d240 got rid of some goal thy commands
paulson
parents: 5147
diff changeset
   666
Goal "converse(A - B) = converse(A) - converse(B)";
2877
6476784dba1c Converted to call blast_tac.
paulson
parents: 2493
diff changeset
   667
by (Blast_tac 1);
1056
097b3255bf3a Renamed domain_diff_subset, range_diff_subset,
lcp
parents: 1035
diff changeset
   668
qed "converse_Diff";
0
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
   669
5321
f8848433d240 got rid of some goal thy commands
paulson
parents: 5147
diff changeset
   670
Goal "converse(UN x:A. B(x)) = (UN x:A. converse(B(x)))";
2877
6476784dba1c Converted to call blast_tac.
paulson
parents: 2493
diff changeset
   671
by (Blast_tac 1);
787
1affbb1c5f1f converse_UN, Diff_eq_0_iff: new
lcp
parents: 760
diff changeset
   672
qed "converse_UN";
1affbb1c5f1f converse_UN, Diff_eq_0_iff: new
lcp
parents: 760
diff changeset
   673
1652
9b78ce58d6b1 Proved Inter_0 and converse_INT
paulson
parents: 1611
diff changeset
   674
(*Unfolding Inter avoids using excluded middle on A=0*)
5325
f7a5e06adea1 Yet more removal of "goal" commands, especially "goal ZF.thy", so ZF.thy
paulson
parents: 5321
diff changeset
   675
Goalw [Inter_def] "converse(INT x:A. B(x)) = (INT x:A. converse(B(x)))";
2877
6476784dba1c Converted to call blast_tac.
paulson
parents: 2493
diff changeset
   676
by (Blast_tac 1);
1652
9b78ce58d6b1 Proved Inter_0 and converse_INT
paulson
parents: 1611
diff changeset
   677
qed "converse_INT";
9b78ce58d6b1 Proved Inter_0 and converse_INT
paulson
parents: 1611
diff changeset
   678
2469
b50b8c0eec01 Implicit simpsets and clasets for FOL and ZF
paulson
parents: 1784
diff changeset
   679
Addsimps [converse_Un, converse_Int, converse_Diff, converse_UN, converse_INT];
b50b8c0eec01 Implicit simpsets and clasets for FOL and ZF
paulson
parents: 1784
diff changeset
   680
198
0f0ff91b07f6 new section for equality properties
lcp
parents: 192
diff changeset
   681
(** Pow **)
0f0ff91b07f6 new section for equality properties
lcp
parents: 192
diff changeset
   682
6288
694c9c1910e8 new theorems Pow_0 and Pow_insert; renamed other Pow theorems
paulson
parents: 6068
diff changeset
   683
Goal "Pow(0) = {0}";
694c9c1910e8 new theorems Pow_0 and Pow_insert; renamed other Pow theorems
paulson
parents: 6068
diff changeset
   684
by (Blast_tac 1);
694c9c1910e8 new theorems Pow_0 and Pow_insert; renamed other Pow theorems
paulson
parents: 6068
diff changeset
   685
qed "Pow_0";
694c9c1910e8 new theorems Pow_0 and Pow_insert; renamed other Pow theorems
paulson
parents: 6068
diff changeset
   686
694c9c1910e8 new theorems Pow_0 and Pow_insert; renamed other Pow theorems
paulson
parents: 6068
diff changeset
   687
Goal "Pow (cons(a,A)) = Pow(A) Un {cons(a,X) . X: Pow(A)}";
6298
a336f80158c8 expandshort
paulson
parents: 6288
diff changeset
   688
by (rtac equalityI 1);
6288
694c9c1910e8 new theorems Pow_0 and Pow_insert; renamed other Pow theorems
paulson
parents: 6068
diff changeset
   689
by Safe_tac;
694c9c1910e8 new theorems Pow_0 and Pow_insert; renamed other Pow theorems
paulson
parents: 6068
diff changeset
   690
by (etac swap 1);
694c9c1910e8 new theorems Pow_0 and Pow_insert; renamed other Pow theorems
paulson
parents: 6068
diff changeset
   691
by (res_inst_tac [("a", "x-{a}")] RepFun_eqI 1);
694c9c1910e8 new theorems Pow_0 and Pow_insert; renamed other Pow theorems
paulson
parents: 6068
diff changeset
   692
by (ALLGOALS Blast_tac);
694c9c1910e8 new theorems Pow_0 and Pow_insert; renamed other Pow theorems
paulson
parents: 6068
diff changeset
   693
qed "Pow_insert";
694c9c1910e8 new theorems Pow_0 and Pow_insert; renamed other Pow theorems
paulson
parents: 6068
diff changeset
   694
5321
f8848433d240 got rid of some goal thy commands
paulson
parents: 5147
diff changeset
   695
Goal "Pow(A) Un Pow(B) <= Pow(A Un B)";
2877
6476784dba1c Converted to call blast_tac.
paulson
parents: 2493
diff changeset
   696
by (Blast_tac 1);
760
f0200e91b272 added qed and qed_goal[w]
clasohm
parents: 685
diff changeset
   697
qed "Un_Pow_subset";
198
0f0ff91b07f6 new section for equality properties
lcp
parents: 192
diff changeset
   698
5321
f8848433d240 got rid of some goal thy commands
paulson
parents: 5147
diff changeset
   699
Goal "(UN x:A. Pow(B(x))) <= Pow(UN x:A. B(x))";
2877
6476784dba1c Converted to call blast_tac.
paulson
parents: 2493
diff changeset
   700
by (Blast_tac 1);
760
f0200e91b272 added qed and qed_goal[w]
clasohm
parents: 685
diff changeset
   701
qed "UN_Pow_subset";
198
0f0ff91b07f6 new section for equality properties
lcp
parents: 192
diff changeset
   702
5321
f8848433d240 got rid of some goal thy commands
paulson
parents: 5147
diff changeset
   703
Goal "A <= Pow(Union(A))";
2877
6476784dba1c Converted to call blast_tac.
paulson
parents: 2493
diff changeset
   704
by (Blast_tac 1);
760
f0200e91b272 added qed and qed_goal[w]
clasohm
parents: 685
diff changeset
   705
qed "subset_Pow_Union";
198
0f0ff91b07f6 new section for equality properties
lcp
parents: 192
diff changeset
   706
5321
f8848433d240 got rid of some goal thy commands
paulson
parents: 5147
diff changeset
   707
Goal "Union(Pow(A)) = A";
2877
6476784dba1c Converted to call blast_tac.
paulson
parents: 2493
diff changeset
   708
by (Blast_tac 1);
760
f0200e91b272 added qed and qed_goal[w]
clasohm
parents: 685
diff changeset
   709
qed "Union_Pow_eq";
198
0f0ff91b07f6 new section for equality properties
lcp
parents: 192
diff changeset
   710
5321
f8848433d240 got rid of some goal thy commands
paulson
parents: 5147
diff changeset
   711
Goal "Pow(A Int B) = Pow(A) Int Pow(B)";
2877
6476784dba1c Converted to call blast_tac.
paulson
parents: 2493
diff changeset
   712
by (Blast_tac 1);
6288
694c9c1910e8 new theorems Pow_0 and Pow_insert; renamed other Pow theorems
paulson
parents: 6068
diff changeset
   713
qed "Pow_Int_eq";
198
0f0ff91b07f6 new section for equality properties
lcp
parents: 192
diff changeset
   714
6288
694c9c1910e8 new theorems Pow_0 and Pow_insert; renamed other Pow theorems
paulson
parents: 6068
diff changeset
   715
Goal "x:A ==> Pow(INT x:A. B(x)) = (INT x:A. Pow(B(x)))";
2877
6476784dba1c Converted to call blast_tac.
paulson
parents: 2493
diff changeset
   716
by (Blast_tac 1);
6288
694c9c1910e8 new theorems Pow_0 and Pow_insert; renamed other Pow theorems
paulson
parents: 6068
diff changeset
   717
qed "Pow_INT_eq";
435
ca5356bd315a Addition of cardinals and order types, various tidying
lcp
parents: 268
diff changeset
   718
6288
694c9c1910e8 new theorems Pow_0 and Pow_insert; renamed other Pow theorems
paulson
parents: 6068
diff changeset
   719
Addsimps [Pow_0, Union_Pow_eq, Pow_Int_eq];
2469
b50b8c0eec01 Implicit simpsets and clasets for FOL and ZF
paulson
parents: 1784
diff changeset
   720
839
1aa6b351ca34 RepFun_eq_0_iff, RepFun_0: new
lcp
parents: 787
diff changeset
   721
(** RepFun **)
1aa6b351ca34 RepFun_eq_0_iff, RepFun_0: new
lcp
parents: 787
diff changeset
   722
5321
f8848433d240 got rid of some goal thy commands
paulson
parents: 5147
diff changeset
   723
Goal "{f(x).x:A}=0 <-> A=0";
9303
f1ad1ed0d110 fixed a failing proof
paulson
parents: 9180
diff changeset
   724
by (Blast_tac 1);
839
1aa6b351ca34 RepFun_eq_0_iff, RepFun_0: new
lcp
parents: 787
diff changeset
   725
qed "RepFun_eq_0_iff";
12199
8213fd95acb5 miniscoping of UN and INT
paulson
parents: 11695
diff changeset
   726
Addsimps [RepFun_eq_0_iff];
8213fd95acb5 miniscoping of UN and INT
paulson
parents: 11695
diff changeset
   727
8213fd95acb5 miniscoping of UN and INT
paulson
parents: 11695
diff changeset
   728
Goal "{c. x:A} = (if A=0 then 0 else {c})";
8213fd95acb5 miniscoping of UN and INT
paulson
parents: 11695
diff changeset
   729
by Auto_tac; 
8213fd95acb5 miniscoping of UN and INT
paulson
parents: 11695
diff changeset
   730
by (Blast_tac 1);
8213fd95acb5 miniscoping of UN and INT
paulson
parents: 11695
diff changeset
   731
qed "RepFun_constant";
8213fd95acb5 miniscoping of UN and INT
paulson
parents: 11695
diff changeset
   732
Addsimps [RepFun_constant];
839
1aa6b351ca34 RepFun_eq_0_iff, RepFun_0: new
lcp
parents: 787
diff changeset
   733
1611
35e0fd1b1775 New results from AC/Cardinal_aux.ML
paulson
parents: 1568
diff changeset
   734
(** Collect **)
35e0fd1b1775 New results from AC/Cardinal_aux.ML
paulson
parents: 1568
diff changeset
   735
5321
f8848433d240 got rid of some goal thy commands
paulson
parents: 5147
diff changeset
   736
Goal "Collect(A Un B, P) = Collect(A,P) Un Collect(B,P)";
2877
6476784dba1c Converted to call blast_tac.
paulson
parents: 2493
diff changeset
   737
by (Blast_tac 1);
1611
35e0fd1b1775 New results from AC/Cardinal_aux.ML
paulson
parents: 1568
diff changeset
   738
qed "Collect_Un";
35e0fd1b1775 New results from AC/Cardinal_aux.ML
paulson
parents: 1568
diff changeset
   739
5321
f8848433d240 got rid of some goal thy commands
paulson
parents: 5147
diff changeset
   740
Goal "Collect(A Int B, P) = Collect(A,P) Int Collect(B,P)";
2877
6476784dba1c Converted to call blast_tac.
paulson
parents: 2493
diff changeset
   741
by (Blast_tac 1);
1611
35e0fd1b1775 New results from AC/Cardinal_aux.ML
paulson
parents: 1568
diff changeset
   742
qed "Collect_Int";
35e0fd1b1775 New results from AC/Cardinal_aux.ML
paulson
parents: 1568
diff changeset
   743
5321
f8848433d240 got rid of some goal thy commands
paulson
parents: 5147
diff changeset
   744
Goal "Collect(A - B, P) = Collect(A,P) - Collect(B,P)";
2877
6476784dba1c Converted to call blast_tac.
paulson
parents: 2493
diff changeset
   745
by (Blast_tac 1);
1611
35e0fd1b1775 New results from AC/Cardinal_aux.ML
paulson
parents: 1568
diff changeset
   746
qed "Collect_Diff";
35e0fd1b1775 New results from AC/Cardinal_aux.ML
paulson
parents: 1568
diff changeset
   747
6068
2d8f3e1f1151 if-then-else syntax for ZF
paulson
parents: 5325
diff changeset
   748
Goal "{x:cons(a,B). P(x)} = \
2d8f3e1f1151 if-then-else syntax for ZF
paulson
parents: 5325
diff changeset
   749
\     (if P(a) then cons(a, {x:B. P(x)}) else {x:B. P(x)})";
5116
8eb343ab5748 Renamed expand_if to split_if and setloop split_tac to addsplits,
paulson
parents: 5067
diff changeset
   750
by (simp_tac (simpset() addsplits [split_if]) 1);
2877
6476784dba1c Converted to call blast_tac.
paulson
parents: 2493
diff changeset
   751
by (Blast_tac 1);
1611
35e0fd1b1775 New results from AC/Cardinal_aux.ML
paulson
parents: 1568
diff changeset
   752
qed "Collect_cons";