10 theory equalities = pair: |
10 theory equalities = pair: |
11 |
11 |
12 text{*These cover union, intersection, converse, domain, range, etc. Philippe |
12 text{*These cover union, intersection, converse, domain, range, etc. Philippe |
13 de Groote proved many of the inclusions.*} |
13 de Groote proved many of the inclusions.*} |
14 |
14 |
15 (*FIXME: move to ZF.thy or even to FOL.thy??*) |
|
16 lemma [simp]: "((P-->Q) <-> (P-->R)) <-> (P --> (Q<->R))" |
|
17 by blast |
|
18 |
|
19 (*FIXME: move to ZF.thy or even to FOL.thy??*) |
|
20 lemma not_disj_iff_imp: "~P | Q <-> (P-->Q)" |
|
21 by blast |
|
22 |
|
23 (** Monotonicity of implications -- some could go to FOL **) |
|
24 |
|
25 lemma in_mono: "A<=B ==> x:A --> x:B" |
15 lemma in_mono: "A<=B ==> x:A --> x:B" |
26 by blast |
16 by blast |
27 |
|
28 lemma conj_mono: "[| P1-->Q1; P2-->Q2 |] ==> (P1&P2) --> (Q1&Q2)" |
|
29 by fast (*or (IntPr.fast_tac 1)*) |
|
30 |
|
31 lemma disj_mono: "[| P1-->Q1; P2-->Q2 |] ==> (P1|P2) --> (Q1|Q2)" |
|
32 by fast (*or (IntPr.fast_tac 1)*) |
|
33 |
|
34 lemma imp_mono: "[| Q1-->P1; P2-->Q2 |] ==> (P1-->P2)-->(Q1-->Q2)" |
|
35 by fast (*or (IntPr.fast_tac 1)*) |
|
36 |
|
37 lemma imp_refl: "P-->P" |
|
38 by (rule impI, assumption) |
|
39 |
|
40 (*The quantifier monotonicity rules are also intuitionistically valid*) |
|
41 lemma ex_mono: |
|
42 "[| !!x. P(x) --> Q(x) |] ==> (EX x. P(x)) --> (EX x. Q(x))" |
|
43 by blast |
|
44 |
|
45 lemma all_mono: |
|
46 "[| !!x. P(x) --> Q(x) |] ==> (ALL x. P(x)) --> (ALL x. Q(x))" |
|
47 by blast |
|
48 |
|
49 |
17 |
50 lemma the_eq_0 [simp]: "(THE x. False) = 0" |
18 lemma the_eq_0 [simp]: "(THE x. False) = 0" |
51 by (blast intro: the_0) |
19 by (blast intro: the_0) |
52 |
20 |
53 subsection{*Bounded Quantifiers*} |
21 subsection{*Bounded Quantifiers*} |
402 by (blast elim!: equalityE) |
370 by (blast elim!: equalityE) |
403 |
371 |
404 lemma Union_empty_iff: "Union(A) = 0 <-> (\<forall>B\<in>A. B=0)" |
372 lemma Union_empty_iff: "Union(A) = 0 <-> (\<forall>B\<in>A. B=0)" |
405 by blast |
373 by blast |
406 |
374 |
|
375 lemma Int_Union2: "Union(B) Int A = (UN C:B. C Int A)" |
|
376 by blast |
|
377 |
407 (** Big Intersection is the greatest lower bound of a nonempty set **) |
378 (** Big Intersection is the greatest lower bound of a nonempty set **) |
408 |
379 |
409 lemma Inter_subset_iff: "a: A ==> C <= Inter(A) <-> (\<forall>x\<in>A. C <= x)" |
380 lemma Inter_subset_iff: "a: A ==> C <= Inter(A) <-> (\<forall>x\<in>A. C <= x)" |
410 by blast |
381 by blast |
411 |
382 |
974 "Collect(A,P) Int Collect(A,Q) = Collect(A, %x. P(x) & Q(x))" |
945 "Collect(A,P) Int Collect(A,Q) = Collect(A, %x. P(x) & Q(x))" |
975 by blast |
946 by blast |
976 |
947 |
977 lemma Collect_Union_eq [simp]: |
948 lemma Collect_Union_eq [simp]: |
978 "Collect(\<Union>x\<in>A. B(x), P) = (\<Union>x\<in>A. Collect(B(x), P))" |
949 "Collect(\<Union>x\<in>A. B(x), P) = (\<Union>x\<in>A. Collect(B(x), P))" |
|
950 by blast |
|
951 |
|
952 lemma Collect_Int_left: "{x:A. P(x)} Int B = {x : A Int B. P(x)}" |
|
953 by blast |
|
954 |
|
955 lemma Collect_Int_right: "A Int {x:B. P(x)} = {x : A Int B. P(x)}" |
|
956 by blast |
|
957 |
|
958 lemma Collect_disj_eq: "{x:A. P(x) | Q(x)} = Collect(A, P) Un Collect(A, Q)" |
|
959 by blast |
|
960 |
|
961 lemma Collect_conj_eq: "{x:A. P(x) & Q(x)} = Collect(A, P) Int Collect(A, Q)" |
979 by blast |
962 by blast |
980 |
963 |
981 lemmas subset_SIs = subset_refl cons_subsetI subset_consI |
964 lemmas subset_SIs = subset_refl cons_subsetI subset_consI |
982 Union_least UN_least Un_least |
965 Union_least UN_least Un_least |
983 Inter_greatest Int_greatest RepFun_subset |
966 Inter_greatest Int_greatest RepFun_subset |
1137 val Union_cons = thm "Union_cons"; |
1120 val Union_cons = thm "Union_cons"; |
1138 val Union_Un_distrib = thm "Union_Un_distrib"; |
1121 val Union_Un_distrib = thm "Union_Un_distrib"; |
1139 val Union_Int_subset = thm "Union_Int_subset"; |
1122 val Union_Int_subset = thm "Union_Int_subset"; |
1140 val Union_disjoint = thm "Union_disjoint"; |
1123 val Union_disjoint = thm "Union_disjoint"; |
1141 val Union_empty_iff = thm "Union_empty_iff"; |
1124 val Union_empty_iff = thm "Union_empty_iff"; |
|
1125 val Int_Union2 = thm "Int_Union2"; |
1142 val Inter_0 = thm "Inter_0"; |
1126 val Inter_0 = thm "Inter_0"; |
1143 val Inter_Un_subset = thm "Inter_Un_subset"; |
1127 val Inter_Un_subset = thm "Inter_Un_subset"; |
1144 val Inter_Un_distrib = thm "Inter_Un_distrib"; |
1128 val Inter_Un_distrib = thm "Inter_Un_distrib"; |
1145 val Union_singleton = thm "Union_singleton"; |
1129 val Union_singleton = thm "Union_singleton"; |
1146 val Inter_singleton = thm "Inter_singleton"; |
1130 val Inter_singleton = thm "Inter_singleton"; |
1244 val Collect_Diff = thm "Collect_Diff"; |
1228 val Collect_Diff = thm "Collect_Diff"; |
1245 val Collect_cons = thm "Collect_cons"; |
1229 val Collect_cons = thm "Collect_cons"; |
1246 val Int_Collect_self_eq = thm "Int_Collect_self_eq"; |
1230 val Int_Collect_self_eq = thm "Int_Collect_self_eq"; |
1247 val Collect_Collect_eq = thm "Collect_Collect_eq"; |
1231 val Collect_Collect_eq = thm "Collect_Collect_eq"; |
1248 val Collect_Int_Collect_eq = thm "Collect_Int_Collect_eq"; |
1232 val Collect_Int_Collect_eq = thm "Collect_Int_Collect_eq"; |
|
1233 val Collect_disj_eq = thm "Collect_disj_eq"; |
|
1234 val Collect_conj_eq = thm "Collect_conj_eq"; |
1249 |
1235 |
1250 val Int_ac = thms "Int_ac"; |
1236 val Int_ac = thms "Int_ac"; |
1251 val Un_ac = thms "Un_ac"; |
1237 val Un_ac = thms "Un_ac"; |
1252 val Int_absorb1 = thm "Int_absorb1"; |
1238 val Int_absorb1 = thm "Int_absorb1"; |
1253 val Int_absorb2 = thm "Int_absorb2"; |
1239 val Int_absorb2 = thm "Int_absorb2"; |