src/CCL/Set.thy
author haftmann
Thu, 18 Jun 2020 09:07:29 +0000
changeset 71943 d3fb19847662
parent 66453 cc19f7ca2ed6
child 80754 701912f5645a
permissions -rw-r--r--
formal relationships between operations
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
60770
240563fbf41d isabelle update_cartouches;
wenzelm
parents: 58977
diff changeset
     1
section \<open>Extending FOL by a modified version of HOL set theory\<close>
17456
bcf7544875b2 converted to Isar theory format;
wenzelm
parents: 3935
diff changeset
     2
bcf7544875b2 converted to Isar theory format;
wenzelm
parents: 3935
diff changeset
     3
theory Set
66453
cc19f7ca2ed6 session-qualified theory imports: isabelle imports -U -i -d '~~/src/Benchmarks' -a;
wenzelm
parents: 62143
diff changeset
     4
imports FOL
17456
bcf7544875b2 converted to Isar theory format;
wenzelm
parents: 3935
diff changeset
     5
begin
0
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
     6
39128
93a7365fb4ee turned eta_contract into proper configuration option;
wenzelm
parents: 38499
diff changeset
     7
declare [[eta_contract]]
93a7365fb4ee turned eta_contract into proper configuration option;
wenzelm
parents: 38499
diff changeset
     8
17456
bcf7544875b2 converted to Isar theory format;
wenzelm
parents: 3935
diff changeset
     9
typedecl 'a set
55380
4de48353034e prefer vacuous definitional type classes over axiomatic ones;
wenzelm
parents: 48475
diff changeset
    10
instance set :: ("term") "term" ..
0
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    11
62143
3c9a0985e6be eliminated old defs;
wenzelm
parents: 62020
diff changeset
    12
3c9a0985e6be eliminated old defs;
wenzelm
parents: 62020
diff changeset
    13
subsection \<open>Set comprehension and membership\<close>
3c9a0985e6be eliminated old defs;
wenzelm
parents: 62020
diff changeset
    14
3c9a0985e6be eliminated old defs;
wenzelm
parents: 62020
diff changeset
    15
axiomatization Collect :: "['a \<Rightarrow> o] \<Rightarrow> 'a set"
3c9a0985e6be eliminated old defs;
wenzelm
parents: 62020
diff changeset
    16
  and mem :: "['a, 'a set] \<Rightarrow> o"  (infixl ":" 50)
3c9a0985e6be eliminated old defs;
wenzelm
parents: 62020
diff changeset
    17
where mem_Collect_iff: "(a : Collect(P)) \<longleftrightarrow> P(a)"
3c9a0985e6be eliminated old defs;
wenzelm
parents: 62020
diff changeset
    18
  and set_extension: "A = B \<longleftrightarrow> (ALL x. x:A \<longleftrightarrow> x:B)"
0
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    19
3935
52c14fe8f16b adapted to qualified names;
wenzelm
parents: 3837
diff changeset
    20
syntax
62143
3c9a0985e6be eliminated old defs;
wenzelm
parents: 62020
diff changeset
    21
  "_Coll" :: "[idt, o] \<Rightarrow> 'a set"  ("(1{_./ _})")
0
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    22
translations
62143
3c9a0985e6be eliminated old defs;
wenzelm
parents: 62020
diff changeset
    23
  "{x. P}" == "CONST Collect(\<lambda>x. P)"
20140
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 17456
diff changeset
    24
58977
9576b510f6a2 more symbols;
wenzelm
parents: 58889
diff changeset
    25
lemma CollectI: "P(a) \<Longrightarrow> a : {x. P(x)}"
20140
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 17456
diff changeset
    26
  apply (rule mem_Collect_iff [THEN iffD2])
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 17456
diff changeset
    27
  apply assumption
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 17456
diff changeset
    28
  done
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 17456
diff changeset
    29
58977
9576b510f6a2 more symbols;
wenzelm
parents: 58889
diff changeset
    30
lemma CollectD: "a : {x. P(x)} \<Longrightarrow> P(a)"
20140
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 17456
diff changeset
    31
  apply (erule mem_Collect_iff [THEN iffD1])
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 17456
diff changeset
    32
  done
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 17456
diff changeset
    33
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 17456
diff changeset
    34
lemmas CollectE = CollectD [elim_format]
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 17456
diff changeset
    35
58977
9576b510f6a2 more symbols;
wenzelm
parents: 58889
diff changeset
    36
lemma set_ext: "(\<And>x. x:A \<longleftrightarrow> x:B) \<Longrightarrow> A = B"
20140
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 17456
diff changeset
    37
  apply (rule set_extension [THEN iffD2])
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 17456
diff changeset
    38
  apply simp
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 17456
diff changeset
    39
  done
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 17456
diff changeset
    40
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 17456
diff changeset
    41
60770
240563fbf41d isabelle update_cartouches;
wenzelm
parents: 58977
diff changeset
    42
subsection \<open>Bounded quantifiers\<close>
20140
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 17456
diff changeset
    43
62143
3c9a0985e6be eliminated old defs;
wenzelm
parents: 62020
diff changeset
    44
definition Ball :: "['a set, 'a \<Rightarrow> o] \<Rightarrow> o"
3c9a0985e6be eliminated old defs;
wenzelm
parents: 62020
diff changeset
    45
  where "Ball(A, P) == ALL x. x:A \<longrightarrow> P(x)"
3c9a0985e6be eliminated old defs;
wenzelm
parents: 62020
diff changeset
    46
3c9a0985e6be eliminated old defs;
wenzelm
parents: 62020
diff changeset
    47
definition Bex :: "['a set, 'a \<Rightarrow> o] \<Rightarrow> o"
3c9a0985e6be eliminated old defs;
wenzelm
parents: 62020
diff changeset
    48
  where "Bex(A, P) == EX x. x:A \<and> P(x)"
3c9a0985e6be eliminated old defs;
wenzelm
parents: 62020
diff changeset
    49
3c9a0985e6be eliminated old defs;
wenzelm
parents: 62020
diff changeset
    50
syntax
3c9a0985e6be eliminated old defs;
wenzelm
parents: 62020
diff changeset
    51
  "_Ball" :: "[idt, 'a set, o] \<Rightarrow> o"  ("(ALL _:_./ _)" [0, 0, 0] 10)
3c9a0985e6be eliminated old defs;
wenzelm
parents: 62020
diff changeset
    52
  "_Bex" :: "[idt, 'a set, o] \<Rightarrow> o"  ("(EX _:_./ _)" [0, 0, 0] 10)
3c9a0985e6be eliminated old defs;
wenzelm
parents: 62020
diff changeset
    53
translations
3c9a0985e6be eliminated old defs;
wenzelm
parents: 62020
diff changeset
    54
  "ALL x:A. P"  == "CONST Ball(A, \<lambda>x. P)"
3c9a0985e6be eliminated old defs;
wenzelm
parents: 62020
diff changeset
    55
  "EX x:A. P"   == "CONST Bex(A, \<lambda>x. P)"
3c9a0985e6be eliminated old defs;
wenzelm
parents: 62020
diff changeset
    56
58977
9576b510f6a2 more symbols;
wenzelm
parents: 58889
diff changeset
    57
lemma ballI: "(\<And>x. x:A \<Longrightarrow> P(x)) \<Longrightarrow> ALL x:A. P(x)"
20140
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 17456
diff changeset
    58
  by (simp add: Ball_def)
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 17456
diff changeset
    59
58977
9576b510f6a2 more symbols;
wenzelm
parents: 58889
diff changeset
    60
lemma bspec: "\<lbrakk>ALL x:A. P(x); x:A\<rbrakk> \<Longrightarrow> P(x)"
20140
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 17456
diff changeset
    61
  by (simp add: Ball_def)
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 17456
diff changeset
    62
58977
9576b510f6a2 more symbols;
wenzelm
parents: 58889
diff changeset
    63
lemma ballE: "\<lbrakk>ALL x:A. P(x); P(x) \<Longrightarrow> Q; \<not> x:A \<Longrightarrow> Q\<rbrakk> \<Longrightarrow> Q"
20140
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 17456
diff changeset
    64
  unfolding Ball_def by blast
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 17456
diff changeset
    65
58977
9576b510f6a2 more symbols;
wenzelm
parents: 58889
diff changeset
    66
lemma bexI: "\<lbrakk>P(x); x:A\<rbrakk> \<Longrightarrow> EX x:A. P(x)"
20140
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 17456
diff changeset
    67
  unfolding Bex_def by blast
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 17456
diff changeset
    68
58977
9576b510f6a2 more symbols;
wenzelm
parents: 58889
diff changeset
    69
lemma bexCI: "\<lbrakk>EX x:A. \<not>P(x) \<Longrightarrow> P(a); a:A\<rbrakk> \<Longrightarrow> EX x:A. P(x)"
20140
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 17456
diff changeset
    70
  unfolding Bex_def by blast
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 17456
diff changeset
    71
58977
9576b510f6a2 more symbols;
wenzelm
parents: 58889
diff changeset
    72
lemma bexE: "\<lbrakk>EX x:A. P(x); \<And>x. \<lbrakk>x:A; P(x)\<rbrakk> \<Longrightarrow> Q\<rbrakk> \<Longrightarrow> Q"
20140
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 17456
diff changeset
    73
  unfolding Bex_def by blast
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 17456
diff changeset
    74
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 17456
diff changeset
    75
(*Trival rewrite rule;   (! x:A.P)=P holds only if A is nonempty!*)
58977
9576b510f6a2 more symbols;
wenzelm
parents: 58889
diff changeset
    76
lemma ball_rew: "(ALL x:A. True) \<longleftrightarrow> True"
20140
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 17456
diff changeset
    77
  by (blast intro: ballI)
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 17456
diff changeset
    78
62143
3c9a0985e6be eliminated old defs;
wenzelm
parents: 62020
diff changeset
    79
subsubsection \<open>Congruence rules\<close>
20140
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 17456
diff changeset
    80
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 17456
diff changeset
    81
lemma ball_cong:
58977
9576b510f6a2 more symbols;
wenzelm
parents: 58889
diff changeset
    82
  "\<lbrakk>A = A'; \<And>x. x:A' \<Longrightarrow> P(x) \<longleftrightarrow> P'(x)\<rbrakk> \<Longrightarrow>
9576b510f6a2 more symbols;
wenzelm
parents: 58889
diff changeset
    83
    (ALL x:A. P(x)) \<longleftrightarrow> (ALL x:A'. P'(x))"
20140
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 17456
diff changeset
    84
  by (blast intro: ballI elim: ballE)
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 17456
diff changeset
    85
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 17456
diff changeset
    86
lemma bex_cong:
58977
9576b510f6a2 more symbols;
wenzelm
parents: 58889
diff changeset
    87
  "\<lbrakk>A = A'; \<And>x. x:A' \<Longrightarrow> P(x) \<longleftrightarrow> P'(x)\<rbrakk> \<Longrightarrow>
9576b510f6a2 more symbols;
wenzelm
parents: 58889
diff changeset
    88
    (EX x:A. P(x)) \<longleftrightarrow> (EX x:A'. P'(x))"
20140
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 17456
diff changeset
    89
  by (blast intro: bexI elim: bexE)
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 17456
diff changeset
    90
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 17456
diff changeset
    91
62143
3c9a0985e6be eliminated old defs;
wenzelm
parents: 62020
diff changeset
    92
subsection \<open>Further operations\<close>
3c9a0985e6be eliminated old defs;
wenzelm
parents: 62020
diff changeset
    93
3c9a0985e6be eliminated old defs;
wenzelm
parents: 62020
diff changeset
    94
definition subset :: "['a set, 'a set] \<Rightarrow> o"  (infixl "<=" 50)
3c9a0985e6be eliminated old defs;
wenzelm
parents: 62020
diff changeset
    95
  where "A <= B == ALL x:A. x:B"
3c9a0985e6be eliminated old defs;
wenzelm
parents: 62020
diff changeset
    96
3c9a0985e6be eliminated old defs;
wenzelm
parents: 62020
diff changeset
    97
definition mono :: "['a set \<Rightarrow> 'b set] \<Rightarrow> o"
3c9a0985e6be eliminated old defs;
wenzelm
parents: 62020
diff changeset
    98
  where "mono(f) == (ALL A B. A <= B \<longrightarrow> f(A) <= f(B))"
3c9a0985e6be eliminated old defs;
wenzelm
parents: 62020
diff changeset
    99
3c9a0985e6be eliminated old defs;
wenzelm
parents: 62020
diff changeset
   100
definition singleton :: "'a \<Rightarrow> 'a set"  ("{_}")
3c9a0985e6be eliminated old defs;
wenzelm
parents: 62020
diff changeset
   101
  where "{a} == {x. x=a}"
3c9a0985e6be eliminated old defs;
wenzelm
parents: 62020
diff changeset
   102
3c9a0985e6be eliminated old defs;
wenzelm
parents: 62020
diff changeset
   103
definition empty :: "'a set"  ("{}")
3c9a0985e6be eliminated old defs;
wenzelm
parents: 62020
diff changeset
   104
  where "{} == {x. False}"
3c9a0985e6be eliminated old defs;
wenzelm
parents: 62020
diff changeset
   105
3c9a0985e6be eliminated old defs;
wenzelm
parents: 62020
diff changeset
   106
definition Un :: "['a set, 'a set] \<Rightarrow> 'a set"  (infixl "Un" 65)
3c9a0985e6be eliminated old defs;
wenzelm
parents: 62020
diff changeset
   107
  where "A Un B == {x. x:A | x:B}"
3c9a0985e6be eliminated old defs;
wenzelm
parents: 62020
diff changeset
   108
3c9a0985e6be eliminated old defs;
wenzelm
parents: 62020
diff changeset
   109
definition Int :: "['a set, 'a set] \<Rightarrow> 'a set"  (infixl "Int" 70)
3c9a0985e6be eliminated old defs;
wenzelm
parents: 62020
diff changeset
   110
  where "A Int B == {x. x:A \<and> x:B}"
3c9a0985e6be eliminated old defs;
wenzelm
parents: 62020
diff changeset
   111
3c9a0985e6be eliminated old defs;
wenzelm
parents: 62020
diff changeset
   112
definition Compl :: "('a set) \<Rightarrow> 'a set"
3c9a0985e6be eliminated old defs;
wenzelm
parents: 62020
diff changeset
   113
  where "Compl(A) == {x. \<not>x:A}"
3c9a0985e6be eliminated old defs;
wenzelm
parents: 62020
diff changeset
   114
3c9a0985e6be eliminated old defs;
wenzelm
parents: 62020
diff changeset
   115
3c9a0985e6be eliminated old defs;
wenzelm
parents: 62020
diff changeset
   116
subsection \<open>Big Intersection / Union\<close>
3c9a0985e6be eliminated old defs;
wenzelm
parents: 62020
diff changeset
   117
3c9a0985e6be eliminated old defs;
wenzelm
parents: 62020
diff changeset
   118
definition INTER :: "['a set, 'a \<Rightarrow> 'b set] \<Rightarrow> 'b set"
3c9a0985e6be eliminated old defs;
wenzelm
parents: 62020
diff changeset
   119
  where "INTER(A, B) == {y. ALL x:A. y: B(x)}"
3c9a0985e6be eliminated old defs;
wenzelm
parents: 62020
diff changeset
   120
3c9a0985e6be eliminated old defs;
wenzelm
parents: 62020
diff changeset
   121
definition UNION :: "['a set, 'a \<Rightarrow> 'b set] \<Rightarrow> 'b set"
3c9a0985e6be eliminated old defs;
wenzelm
parents: 62020
diff changeset
   122
  where "UNION(A, B) == {y. EX x:A. y: B(x)}"
3c9a0985e6be eliminated old defs;
wenzelm
parents: 62020
diff changeset
   123
3c9a0985e6be eliminated old defs;
wenzelm
parents: 62020
diff changeset
   124
syntax
3c9a0985e6be eliminated old defs;
wenzelm
parents: 62020
diff changeset
   125
  "_INTER" :: "[idt, 'a set, 'b set] \<Rightarrow> 'b set"  ("(INT _:_./ _)" [0, 0, 0] 10)
3c9a0985e6be eliminated old defs;
wenzelm
parents: 62020
diff changeset
   126
  "_UNION" :: "[idt, 'a set, 'b set] \<Rightarrow> 'b set"  ("(UN _:_./ _)" [0, 0, 0] 10)
3c9a0985e6be eliminated old defs;
wenzelm
parents: 62020
diff changeset
   127
translations
3c9a0985e6be eliminated old defs;
wenzelm
parents: 62020
diff changeset
   128
  "INT x:A. B" == "CONST INTER(A, \<lambda>x. B)"
3c9a0985e6be eliminated old defs;
wenzelm
parents: 62020
diff changeset
   129
  "UN x:A. B" == "CONST UNION(A, \<lambda>x. B)"
3c9a0985e6be eliminated old defs;
wenzelm
parents: 62020
diff changeset
   130
3c9a0985e6be eliminated old defs;
wenzelm
parents: 62020
diff changeset
   131
definition Inter :: "(('a set)set) \<Rightarrow> 'a set"
3c9a0985e6be eliminated old defs;
wenzelm
parents: 62020
diff changeset
   132
  where "Inter(S) == (INT x:S. x)"
3c9a0985e6be eliminated old defs;
wenzelm
parents: 62020
diff changeset
   133
3c9a0985e6be eliminated old defs;
wenzelm
parents: 62020
diff changeset
   134
definition Union :: "(('a set)set) \<Rightarrow> 'a set"
3c9a0985e6be eliminated old defs;
wenzelm
parents: 62020
diff changeset
   135
  where "Union(S) == (UN x:S. x)"
3c9a0985e6be eliminated old defs;
wenzelm
parents: 62020
diff changeset
   136
3c9a0985e6be eliminated old defs;
wenzelm
parents: 62020
diff changeset
   137
60770
240563fbf41d isabelle update_cartouches;
wenzelm
parents: 58977
diff changeset
   138
subsection \<open>Rules for subsets\<close>
20140
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 17456
diff changeset
   139
58977
9576b510f6a2 more symbols;
wenzelm
parents: 58889
diff changeset
   140
lemma subsetI: "(\<And>x. x:A \<Longrightarrow> x:B) \<Longrightarrow> A <= B"
20140
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 17456
diff changeset
   141
  unfolding subset_def by (blast intro: ballI)
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 17456
diff changeset
   142
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 17456
diff changeset
   143
(*Rule in Modus Ponens style*)
58977
9576b510f6a2 more symbols;
wenzelm
parents: 58889
diff changeset
   144
lemma subsetD: "\<lbrakk>A <= B; c:A\<rbrakk> \<Longrightarrow> c:B"
20140
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 17456
diff changeset
   145
  unfolding subset_def by (blast elim: ballE)
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 17456
diff changeset
   146
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 17456
diff changeset
   147
(*Classical elimination rule*)
58977
9576b510f6a2 more symbols;
wenzelm
parents: 58889
diff changeset
   148
lemma subsetCE: "\<lbrakk>A <= B; \<not>(c:A) \<Longrightarrow> P; c:B \<Longrightarrow> P\<rbrakk> \<Longrightarrow> P"
20140
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 17456
diff changeset
   149
  by (blast dest: subsetD)
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 17456
diff changeset
   150
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 17456
diff changeset
   151
lemma subset_refl: "A <= A"
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 17456
diff changeset
   152
  by (blast intro: subsetI)
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 17456
diff changeset
   153
58977
9576b510f6a2 more symbols;
wenzelm
parents: 58889
diff changeset
   154
lemma subset_trans: "\<lbrakk>A <= B; B <= C\<rbrakk> \<Longrightarrow> A <= C"
20140
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 17456
diff changeset
   155
  by (blast intro: subsetI dest: subsetD)
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 17456
diff changeset
   156
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 17456
diff changeset
   157
60770
240563fbf41d isabelle update_cartouches;
wenzelm
parents: 58977
diff changeset
   158
subsection \<open>Rules for equality\<close>
20140
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 17456
diff changeset
   159
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 17456
diff changeset
   160
(*Anti-symmetry of the subset relation*)
58977
9576b510f6a2 more symbols;
wenzelm
parents: 58889
diff changeset
   161
lemma subset_antisym: "\<lbrakk>A <= B; B <= A\<rbrakk> \<Longrightarrow> A = B"
20140
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 17456
diff changeset
   162
  by (blast intro: set_ext dest: subsetD)
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 17456
diff changeset
   163
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 17456
diff changeset
   164
lemmas equalityI = subset_antisym
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 17456
diff changeset
   165
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 17456
diff changeset
   166
(* Equality rules from ZF set theory -- are they appropriate here? *)
58977
9576b510f6a2 more symbols;
wenzelm
parents: 58889
diff changeset
   167
lemma equalityD1: "A = B \<Longrightarrow> A<=B"
9576b510f6a2 more symbols;
wenzelm
parents: 58889
diff changeset
   168
  and equalityD2: "A = B \<Longrightarrow> B<=A"
20140
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 17456
diff changeset
   169
  by (simp_all add: subset_refl)
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 17456
diff changeset
   170
58977
9576b510f6a2 more symbols;
wenzelm
parents: 58889
diff changeset
   171
lemma equalityE: "\<lbrakk>A = B; \<lbrakk>A <= B; B <= A\<rbrakk> \<Longrightarrow> P\<rbrakk> \<Longrightarrow> P"
20140
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 17456
diff changeset
   172
  by (simp add: subset_refl)
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 17456
diff changeset
   173
58977
9576b510f6a2 more symbols;
wenzelm
parents: 58889
diff changeset
   174
lemma equalityCE: "\<lbrakk>A = B; \<lbrakk>c:A; c:B\<rbrakk> \<Longrightarrow> P; \<lbrakk>\<not> c:A; \<not> c:B\<rbrakk> \<Longrightarrow> P\<rbrakk> \<Longrightarrow> P"
20140
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 17456
diff changeset
   175
  by (blast elim: equalityE subsetCE)
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 17456
diff changeset
   176
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 17456
diff changeset
   177
lemma trivial_set: "{x. x:A} = A"
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 17456
diff changeset
   178
  by (blast intro: equalityI subsetI CollectI dest: CollectD)
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 17456
diff changeset
   179
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 17456
diff changeset
   180
60770
240563fbf41d isabelle update_cartouches;
wenzelm
parents: 58977
diff changeset
   181
subsection \<open>Rules for binary union\<close>
20140
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 17456
diff changeset
   182
58977
9576b510f6a2 more symbols;
wenzelm
parents: 58889
diff changeset
   183
lemma UnI1: "c:A \<Longrightarrow> c : A Un B"
9576b510f6a2 more symbols;
wenzelm
parents: 58889
diff changeset
   184
  and UnI2: "c:B \<Longrightarrow> c : A Un B"
20140
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 17456
diff changeset
   185
  unfolding Un_def by (blast intro: CollectI)+
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 17456
diff changeset
   186
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 17456
diff changeset
   187
(*Classical introduction rule: no commitment to A vs B*)
58977
9576b510f6a2 more symbols;
wenzelm
parents: 58889
diff changeset
   188
lemma UnCI: "(\<not>c:B \<Longrightarrow> c:A) \<Longrightarrow> c : A Un B"
20140
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 17456
diff changeset
   189
  by (blast intro: UnI1 UnI2)
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 17456
diff changeset
   190
58977
9576b510f6a2 more symbols;
wenzelm
parents: 58889
diff changeset
   191
lemma UnE: "\<lbrakk>c : A Un B; c:A \<Longrightarrow> P; c:B \<Longrightarrow> P\<rbrakk> \<Longrightarrow> P"
20140
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 17456
diff changeset
   192
  unfolding Un_def by (blast dest: CollectD)
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 17456
diff changeset
   193
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 17456
diff changeset
   194
60770
240563fbf41d isabelle update_cartouches;
wenzelm
parents: 58977
diff changeset
   195
subsection \<open>Rules for small intersection\<close>
20140
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 17456
diff changeset
   196
58977
9576b510f6a2 more symbols;
wenzelm
parents: 58889
diff changeset
   197
lemma IntI: "\<lbrakk>c:A; c:B\<rbrakk> \<Longrightarrow> c : A Int B"
20140
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 17456
diff changeset
   198
  unfolding Int_def by (blast intro: CollectI)
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 17456
diff changeset
   199
58977
9576b510f6a2 more symbols;
wenzelm
parents: 58889
diff changeset
   200
lemma IntD1: "c : A Int B \<Longrightarrow> c:A"
9576b510f6a2 more symbols;
wenzelm
parents: 58889
diff changeset
   201
  and IntD2: "c : A Int B \<Longrightarrow> c:B"
20140
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 17456
diff changeset
   202
  unfolding Int_def by (blast dest: CollectD)+
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 17456
diff changeset
   203
58977
9576b510f6a2 more symbols;
wenzelm
parents: 58889
diff changeset
   204
lemma IntE: "\<lbrakk>c : A Int B; \<lbrakk>c:A; c:B\<rbrakk> \<Longrightarrow> P\<rbrakk> \<Longrightarrow> P"
20140
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 17456
diff changeset
   205
  by (blast dest: IntD1 IntD2)
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 17456
diff changeset
   206
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 17456
diff changeset
   207
60770
240563fbf41d isabelle update_cartouches;
wenzelm
parents: 58977
diff changeset
   208
subsection \<open>Rules for set complement\<close>
20140
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 17456
diff changeset
   209
58977
9576b510f6a2 more symbols;
wenzelm
parents: 58889
diff changeset
   210
lemma ComplI: "(c:A \<Longrightarrow> False) \<Longrightarrow> c : Compl(A)"
20140
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 17456
diff changeset
   211
  unfolding Compl_def by (blast intro: CollectI)
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 17456
diff changeset
   212
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 17456
diff changeset
   213
(*This form, with negated conclusion, works well with the Classical prover.
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 17456
diff changeset
   214
  Negated assumptions behave like formulae on the right side of the notional
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 17456
diff changeset
   215
  turnstile...*)
58977
9576b510f6a2 more symbols;
wenzelm
parents: 58889
diff changeset
   216
lemma ComplD: "c : Compl(A) \<Longrightarrow> \<not>c:A"
20140
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 17456
diff changeset
   217
  unfolding Compl_def by (blast dest: CollectD)
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 17456
diff changeset
   218
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 17456
diff changeset
   219
lemmas ComplE = ComplD [elim_format]
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 17456
diff changeset
   220
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 17456
diff changeset
   221
60770
240563fbf41d isabelle update_cartouches;
wenzelm
parents: 58977
diff changeset
   222
subsection \<open>Empty sets\<close>
20140
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 17456
diff changeset
   223
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 17456
diff changeset
   224
lemma empty_eq: "{x. False} = {}"
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 17456
diff changeset
   225
  by (simp add: empty_def)
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 17456
diff changeset
   226
58977
9576b510f6a2 more symbols;
wenzelm
parents: 58889
diff changeset
   227
lemma emptyD: "a : {} \<Longrightarrow> P"
20140
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 17456
diff changeset
   228
  unfolding empty_def by (blast dest: CollectD)
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 17456
diff changeset
   229
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 17456
diff changeset
   230
lemmas emptyE = emptyD [elim_format]
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 17456
diff changeset
   231
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 17456
diff changeset
   232
lemma not_emptyD:
58977
9576b510f6a2 more symbols;
wenzelm
parents: 58889
diff changeset
   233
  assumes "\<not> A={}"
20140
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 17456
diff changeset
   234
  shows "EX x. x:A"
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 17456
diff changeset
   235
proof -
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 17456
diff changeset
   236
  have "\<not> (EX x. x:A) \<Longrightarrow> A = {}"
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 17456
diff changeset
   237
    by (rule equalityI) (blast intro!: subsetI elim!: emptyD)+
41526
54b4686704af eliminated global prems;
wenzelm
parents: 39128
diff changeset
   238
  with assms show ?thesis by blast
20140
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 17456
diff changeset
   239
qed
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 17456
diff changeset
   240
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 17456
diff changeset
   241
60770
240563fbf41d isabelle update_cartouches;
wenzelm
parents: 58977
diff changeset
   242
subsection \<open>Singleton sets\<close>
20140
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 17456
diff changeset
   243
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 17456
diff changeset
   244
lemma singletonI: "a : {a}"
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 17456
diff changeset
   245
  unfolding singleton_def by (blast intro: CollectI)
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 17456
diff changeset
   246
58977
9576b510f6a2 more symbols;
wenzelm
parents: 58889
diff changeset
   247
lemma singletonD: "b : {a} \<Longrightarrow> b=a"
20140
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 17456
diff changeset
   248
  unfolding singleton_def by (blast dest: CollectD)
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 17456
diff changeset
   249
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 17456
diff changeset
   250
lemmas singletonE = singletonD [elim_format]
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 17456
diff changeset
   251
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 17456
diff changeset
   252
60770
240563fbf41d isabelle update_cartouches;
wenzelm
parents: 58977
diff changeset
   253
subsection \<open>Unions of families\<close>
20140
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 17456
diff changeset
   254
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 17456
diff changeset
   255
(*The order of the premises presupposes that A is rigid; b may be flexible*)
58977
9576b510f6a2 more symbols;
wenzelm
parents: 58889
diff changeset
   256
lemma UN_I: "\<lbrakk>a:A; b: B(a)\<rbrakk> \<Longrightarrow> b: (UN x:A. B(x))"
20140
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 17456
diff changeset
   257
  unfolding UNION_def by (blast intro: bexI CollectI)
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 17456
diff changeset
   258
58977
9576b510f6a2 more symbols;
wenzelm
parents: 58889
diff changeset
   259
lemma UN_E: "\<lbrakk>b : (UN x:A. B(x)); \<And>x. \<lbrakk>x:A; b: B(x)\<rbrakk> \<Longrightarrow> R\<rbrakk> \<Longrightarrow> R"
20140
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 17456
diff changeset
   260
  unfolding UNION_def by (blast dest: CollectD elim: bexE)
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 17456
diff changeset
   261
58977
9576b510f6a2 more symbols;
wenzelm
parents: 58889
diff changeset
   262
lemma UN_cong: "\<lbrakk>A = B; \<And>x. x:B \<Longrightarrow> C(x) = D(x)\<rbrakk> \<Longrightarrow> (UN x:A. C(x)) = (UN x:B. D(x))"
20140
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 17456
diff changeset
   263
  by (simp add: UNION_def cong: bex_cong)
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 17456
diff changeset
   264
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 17456
diff changeset
   265
60770
240563fbf41d isabelle update_cartouches;
wenzelm
parents: 58977
diff changeset
   266
subsection \<open>Intersections of families\<close>
20140
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 17456
diff changeset
   267
58977
9576b510f6a2 more symbols;
wenzelm
parents: 58889
diff changeset
   268
lemma INT_I: "(\<And>x. x:A \<Longrightarrow> b: B(x)) \<Longrightarrow> b : (INT x:A. B(x))"
20140
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 17456
diff changeset
   269
  unfolding INTER_def by (blast intro: CollectI ballI)
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 17456
diff changeset
   270
58977
9576b510f6a2 more symbols;
wenzelm
parents: 58889
diff changeset
   271
lemma INT_D: "\<lbrakk>b : (INT x:A. B(x)); a:A\<rbrakk> \<Longrightarrow> b: B(a)"
20140
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 17456
diff changeset
   272
  unfolding INTER_def by (blast dest: CollectD bspec)
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 17456
diff changeset
   273
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 17456
diff changeset
   274
(*"Classical" elimination rule -- does not require proving X:C *)
58977
9576b510f6a2 more symbols;
wenzelm
parents: 58889
diff changeset
   275
lemma INT_E: "\<lbrakk>b : (INT x:A. B(x)); b: B(a) \<Longrightarrow> R; \<not> a:A \<Longrightarrow> R\<rbrakk> \<Longrightarrow> R"
20140
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 17456
diff changeset
   276
  unfolding INTER_def by (blast dest: CollectD bspec)
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 17456
diff changeset
   277
58977
9576b510f6a2 more symbols;
wenzelm
parents: 58889
diff changeset
   278
lemma INT_cong: "\<lbrakk>A = B; \<And>x. x:B \<Longrightarrow> C(x) = D(x)\<rbrakk> \<Longrightarrow> (INT x:A. C(x)) = (INT x:B. D(x))"
20140
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 17456
diff changeset
   279
  by (simp add: INTER_def cong: ball_cong)
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 17456
diff changeset
   280
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 17456
diff changeset
   281
60770
240563fbf41d isabelle update_cartouches;
wenzelm
parents: 58977
diff changeset
   282
subsection \<open>Rules for Unions\<close>
20140
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 17456
diff changeset
   283
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 17456
diff changeset
   284
(*The order of the premises presupposes that C is rigid; A may be flexible*)
58977
9576b510f6a2 more symbols;
wenzelm
parents: 58889
diff changeset
   285
lemma UnionI: "\<lbrakk>X:C; A:X\<rbrakk> \<Longrightarrow> A : Union(C)"
20140
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 17456
diff changeset
   286
  unfolding Union_def by (blast intro: UN_I)
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 17456
diff changeset
   287
58977
9576b510f6a2 more symbols;
wenzelm
parents: 58889
diff changeset
   288
lemma UnionE: "\<lbrakk>A : Union(C); \<And>X. \<lbrakk> A:X; X:C\<rbrakk> \<Longrightarrow> R\<rbrakk> \<Longrightarrow> R"
20140
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 17456
diff changeset
   289
  unfolding Union_def by (blast elim: UN_E)
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 17456
diff changeset
   290
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 17456
diff changeset
   291
60770
240563fbf41d isabelle update_cartouches;
wenzelm
parents: 58977
diff changeset
   292
subsection \<open>Rules for Inter\<close>
20140
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 17456
diff changeset
   293
58977
9576b510f6a2 more symbols;
wenzelm
parents: 58889
diff changeset
   294
lemma InterI: "(\<And>X. X:C \<Longrightarrow> A:X) \<Longrightarrow> A : Inter(C)"
20140
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 17456
diff changeset
   295
  unfolding Inter_def by (blast intro: INT_I)
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 17456
diff changeset
   296
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 17456
diff changeset
   297
(*A "destruct" rule -- every X in C contains A as an element, but
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 17456
diff changeset
   298
  A:X can hold when X:C does not!  This rule is analogous to "spec". *)
58977
9576b510f6a2 more symbols;
wenzelm
parents: 58889
diff changeset
   299
lemma InterD: "\<lbrakk>A : Inter(C);  X:C\<rbrakk> \<Longrightarrow> A:X"
20140
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 17456
diff changeset
   300
  unfolding Inter_def by (blast dest: INT_D)
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 17456
diff changeset
   301
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 17456
diff changeset
   302
(*"Classical" elimination rule -- does not require proving X:C *)
58977
9576b510f6a2 more symbols;
wenzelm
parents: 58889
diff changeset
   303
lemma InterE: "\<lbrakk>A : Inter(C); A:X \<Longrightarrow> R; \<not> X:C \<Longrightarrow> R\<rbrakk> \<Longrightarrow> R"
20140
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 17456
diff changeset
   304
  unfolding Inter_def by (blast elim: INT_E)
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 17456
diff changeset
   305
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 17456
diff changeset
   306
60770
240563fbf41d isabelle update_cartouches;
wenzelm
parents: 58977
diff changeset
   307
section \<open>Derived rules involving subsets; Union and Intersection as lattice operations\<close>
20140
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 17456
diff changeset
   308
60770
240563fbf41d isabelle update_cartouches;
wenzelm
parents: 58977
diff changeset
   309
subsection \<open>Big Union -- least upper bound of a set\<close>
20140
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 17456
diff changeset
   310
58977
9576b510f6a2 more symbols;
wenzelm
parents: 58889
diff changeset
   311
lemma Union_upper: "B:A \<Longrightarrow> B <= Union(A)"
20140
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 17456
diff changeset
   312
  by (blast intro: subsetI UnionI)
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 17456
diff changeset
   313
58977
9576b510f6a2 more symbols;
wenzelm
parents: 58889
diff changeset
   314
lemma Union_least: "(\<And>X. X:A \<Longrightarrow> X<=C) \<Longrightarrow> Union(A) <= C"
20140
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 17456
diff changeset
   315
  by (blast intro: subsetI dest: subsetD elim: UnionE)
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 17456
diff changeset
   316
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 17456
diff changeset
   317
60770
240563fbf41d isabelle update_cartouches;
wenzelm
parents: 58977
diff changeset
   318
subsection \<open>Big Intersection -- greatest lower bound of a set\<close>
20140
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 17456
diff changeset
   319
58977
9576b510f6a2 more symbols;
wenzelm
parents: 58889
diff changeset
   320
lemma Inter_lower: "B:A \<Longrightarrow> Inter(A) <= B"
20140
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 17456
diff changeset
   321
  by (blast intro: subsetI dest: InterD)
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 17456
diff changeset
   322
58977
9576b510f6a2 more symbols;
wenzelm
parents: 58889
diff changeset
   323
lemma Inter_greatest: "(\<And>X. X:A \<Longrightarrow> C<=X) \<Longrightarrow> C <= Inter(A)"
20140
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 17456
diff changeset
   324
  by (blast intro: subsetI InterI dest: subsetD)
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 17456
diff changeset
   325
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 17456
diff changeset
   326
60770
240563fbf41d isabelle update_cartouches;
wenzelm
parents: 58977
diff changeset
   327
subsection \<open>Finite Union -- the least upper bound of 2 sets\<close>
20140
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 17456
diff changeset
   328
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 17456
diff changeset
   329
lemma Un_upper1: "A <= A Un B"
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 17456
diff changeset
   330
  by (blast intro: subsetI UnI1)
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 17456
diff changeset
   331
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 17456
diff changeset
   332
lemma Un_upper2: "B <= A Un B"
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 17456
diff changeset
   333
  by (blast intro: subsetI UnI2)
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 17456
diff changeset
   334
58977
9576b510f6a2 more symbols;
wenzelm
parents: 58889
diff changeset
   335
lemma Un_least: "\<lbrakk>A<=C; B<=C\<rbrakk> \<Longrightarrow> A Un B <= C"
20140
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 17456
diff changeset
   336
  by (blast intro: subsetI elim: UnE dest: subsetD)
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 17456
diff changeset
   337
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 17456
diff changeset
   338
60770
240563fbf41d isabelle update_cartouches;
wenzelm
parents: 58977
diff changeset
   339
subsection \<open>Finite Intersection -- the greatest lower bound of 2 sets\<close>
20140
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 17456
diff changeset
   340
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 17456
diff changeset
   341
lemma Int_lower1: "A Int B <= A"
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 17456
diff changeset
   342
  by (blast intro: subsetI elim: IntE)
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 17456
diff changeset
   343
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 17456
diff changeset
   344
lemma Int_lower2: "A Int B <= B"
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 17456
diff changeset
   345
  by (blast intro: subsetI elim: IntE)
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 17456
diff changeset
   346
58977
9576b510f6a2 more symbols;
wenzelm
parents: 58889
diff changeset
   347
lemma Int_greatest: "\<lbrakk>C<=A; C<=B\<rbrakk> \<Longrightarrow> C <= A Int B"
20140
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 17456
diff changeset
   348
  by (blast intro: subsetI IntI dest: subsetD)
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 17456
diff changeset
   349
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 17456
diff changeset
   350
60770
240563fbf41d isabelle update_cartouches;
wenzelm
parents: 58977
diff changeset
   351
subsection \<open>Monotonicity\<close>
20140
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 17456
diff changeset
   352
58977
9576b510f6a2 more symbols;
wenzelm
parents: 58889
diff changeset
   353
lemma monoI: "(\<And>A B. A <= B \<Longrightarrow> f(A) <= f(B)) \<Longrightarrow> mono(f)"
20140
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 17456
diff changeset
   354
  unfolding mono_def by blast
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 17456
diff changeset
   355
58977
9576b510f6a2 more symbols;
wenzelm
parents: 58889
diff changeset
   356
lemma monoD: "\<lbrakk>mono(f); A <= B\<rbrakk> \<Longrightarrow> f(A) <= f(B)"
20140
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 17456
diff changeset
   357
  unfolding mono_def by blast
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 17456
diff changeset
   358
58977
9576b510f6a2 more symbols;
wenzelm
parents: 58889
diff changeset
   359
lemma mono_Un: "mono(f) \<Longrightarrow> f(A) Un f(B) <= f(A Un B)"
20140
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 17456
diff changeset
   360
  by (blast intro: Un_least dest: monoD intro: Un_upper1 Un_upper2)
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 17456
diff changeset
   361
58977
9576b510f6a2 more symbols;
wenzelm
parents: 58889
diff changeset
   362
lemma mono_Int: "mono(f) \<Longrightarrow> f(A Int B) <= f(A) Int f(B)"
20140
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 17456
diff changeset
   363
  by (blast intro: Int_greatest dest: monoD intro: Int_lower1 Int_lower2)
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 17456
diff changeset
   364
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 17456
diff changeset
   365
60770
240563fbf41d isabelle update_cartouches;
wenzelm
parents: 58977
diff changeset
   366
subsection \<open>Automated reasoning setup\<close>
20140
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 17456
diff changeset
   367
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 17456
diff changeset
   368
lemmas [intro!] = ballI subsetI InterI INT_I CollectI ComplI IntI UnCI singletonI
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 17456
diff changeset
   369
  and [intro] = bexI UnionI UN_I
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 17456
diff changeset
   370
  and [elim!] = bexE UnionE UN_E CollectE ComplE IntE UnE emptyE singletonE
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 17456
diff changeset
   371
  and [elim] = ballE InterD InterE INT_D INT_E subsetD subsetCE
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 17456
diff changeset
   372
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 17456
diff changeset
   373
lemma mem_rews:
58977
9576b510f6a2 more symbols;
wenzelm
parents: 58889
diff changeset
   374
  "(a : A Un B)   \<longleftrightarrow>  (a:A | a:B)"
9576b510f6a2 more symbols;
wenzelm
parents: 58889
diff changeset
   375
  "(a : A Int B)  \<longleftrightarrow>  (a:A \<and> a:B)"
9576b510f6a2 more symbols;
wenzelm
parents: 58889
diff changeset
   376
  "(a : Compl(B)) \<longleftrightarrow>  (\<not>a:B)"
9576b510f6a2 more symbols;
wenzelm
parents: 58889
diff changeset
   377
  "(a : {b})      \<longleftrightarrow>  (a=b)"
9576b510f6a2 more symbols;
wenzelm
parents: 58889
diff changeset
   378
  "(a : {})       \<longleftrightarrow>   False"
9576b510f6a2 more symbols;
wenzelm
parents: 58889
diff changeset
   379
  "(a : {x. P(x)}) \<longleftrightarrow>  P(a)"
20140
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 17456
diff changeset
   380
  by blast+
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 17456
diff changeset
   381
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 17456
diff changeset
   382
lemmas [simp] = trivial_set empty_eq mem_rews
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 17456
diff changeset
   383
  and [cong] = ball_cong bex_cong INT_cong UN_cong
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 17456
diff changeset
   384
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 17456
diff changeset
   385
60770
240563fbf41d isabelle update_cartouches;
wenzelm
parents: 58977
diff changeset
   386
section \<open>Equalities involving union, intersection, inclusion, etc.\<close>
20140
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 17456
diff changeset
   387
60770
240563fbf41d isabelle update_cartouches;
wenzelm
parents: 58977
diff changeset
   388
subsection \<open>Binary Intersection\<close>
20140
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 17456
diff changeset
   389
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 17456
diff changeset
   390
lemma Int_absorb: "A Int A = A"
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 17456
diff changeset
   391
  by (blast intro: equalityI)
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 17456
diff changeset
   392
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 17456
diff changeset
   393
lemma Int_commute: "A Int B  =  B Int A"
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 17456
diff changeset
   394
  by (blast intro: equalityI)
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 17456
diff changeset
   395
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 17456
diff changeset
   396
lemma Int_assoc: "(A Int B) Int C  =  A Int (B Int C)"
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 17456
diff changeset
   397
  by (blast intro: equalityI)
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 17456
diff changeset
   398
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 17456
diff changeset
   399
lemma Int_Un_distrib: "(A Un B) Int C  =  (A Int C) Un (B Int C)"
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 17456
diff changeset
   400
  by (blast intro: equalityI)
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 17456
diff changeset
   401
58977
9576b510f6a2 more symbols;
wenzelm
parents: 58889
diff changeset
   402
lemma subset_Int_eq: "(A<=B) \<longleftrightarrow> (A Int B = A)"
20140
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 17456
diff changeset
   403
  by (blast intro: equalityI elim: equalityE)
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 17456
diff changeset
   404
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 17456
diff changeset
   405
60770
240563fbf41d isabelle update_cartouches;
wenzelm
parents: 58977
diff changeset
   406
subsection \<open>Binary Union\<close>
20140
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 17456
diff changeset
   407
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 17456
diff changeset
   408
lemma Un_absorb: "A Un A = A"
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 17456
diff changeset
   409
  by (blast intro: equalityI)
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 17456
diff changeset
   410
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 17456
diff changeset
   411
lemma Un_commute: "A Un B  =  B Un A"
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 17456
diff changeset
   412
  by (blast intro: equalityI)
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 17456
diff changeset
   413
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 17456
diff changeset
   414
lemma Un_assoc: "(A Un B) Un C  =  A Un (B Un C)"
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 17456
diff changeset
   415
  by (blast intro: equalityI)
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 17456
diff changeset
   416
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 17456
diff changeset
   417
lemma Un_Int_distrib: "(A Int B) Un C  =  (A Un C) Int (B Un C)"
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 17456
diff changeset
   418
  by (blast intro: equalityI)
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 17456
diff changeset
   419
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 17456
diff changeset
   420
lemma Un_Int_crazy:
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 17456
diff changeset
   421
    "(A Int B) Un (B Int C) Un (C Int A) = (A Un B) Int (B Un C) Int (C Un A)"
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 17456
diff changeset
   422
  by (blast intro: equalityI)
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 17456
diff changeset
   423
58977
9576b510f6a2 more symbols;
wenzelm
parents: 58889
diff changeset
   424
lemma subset_Un_eq: "(A<=B) \<longleftrightarrow> (A Un B = B)"
20140
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 17456
diff changeset
   425
  by (blast intro: equalityI elim: equalityE)
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 17456
diff changeset
   426
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 17456
diff changeset
   427
62020
5d208fd2507d isabelle update_cartouches -c -t;
wenzelm
parents: 60770
diff changeset
   428
subsection \<open>Simple properties of \<open>Compl\<close> -- complement of a set\<close>
20140
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 17456
diff changeset
   429
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 17456
diff changeset
   430
lemma Compl_disjoint: "A Int Compl(A) = {x. False}"
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 17456
diff changeset
   431
  by (blast intro: equalityI)
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 17456
diff changeset
   432
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 17456
diff changeset
   433
lemma Compl_partition: "A Un Compl(A) = {x. True}"
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 17456
diff changeset
   434
  by (blast intro: equalityI)
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 17456
diff changeset
   435
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 17456
diff changeset
   436
lemma double_complement: "Compl(Compl(A)) = A"
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 17456
diff changeset
   437
  by (blast intro: equalityI)
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 17456
diff changeset
   438
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 17456
diff changeset
   439
lemma Compl_Un: "Compl(A Un B) = Compl(A) Int Compl(B)"
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 17456
diff changeset
   440
  by (blast intro: equalityI)
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 17456
diff changeset
   441
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 17456
diff changeset
   442
lemma Compl_Int: "Compl(A Int B) = Compl(A) Un Compl(B)"
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 17456
diff changeset
   443
  by (blast intro: equalityI)
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 17456
diff changeset
   444
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 17456
diff changeset
   445
lemma Compl_UN: "Compl(UN x:A. B(x)) = (INT x:A. Compl(B(x)))"
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 17456
diff changeset
   446
  by (blast intro: equalityI)
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 17456
diff changeset
   447
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 17456
diff changeset
   448
lemma Compl_INT: "Compl(INT x:A. B(x)) = (UN x:A. Compl(B(x)))"
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 17456
diff changeset
   449
  by (blast intro: equalityI)
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 17456
diff changeset
   450
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 17456
diff changeset
   451
(*Halmos, Naive Set Theory, page 16.*)
58977
9576b510f6a2 more symbols;
wenzelm
parents: 58889
diff changeset
   452
lemma Un_Int_assoc_eq: "((A Int B) Un C = A Int (B Un C)) \<longleftrightarrow> (C<=A)"
20140
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 17456
diff changeset
   453
  by (blast intro: equalityI elim: equalityE)
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 17456
diff changeset
   454
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 17456
diff changeset
   455
60770
240563fbf41d isabelle update_cartouches;
wenzelm
parents: 58977
diff changeset
   456
subsection \<open>Big Union and Intersection\<close>
20140
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 17456
diff changeset
   457
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 17456
diff changeset
   458
lemma Union_Un_distrib: "Union(A Un B) = Union(A) Un Union(B)"
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 17456
diff changeset
   459
  by (blast intro: equalityI)
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 17456
diff changeset
   460
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 17456
diff changeset
   461
lemma Union_disjoint:
58977
9576b510f6a2 more symbols;
wenzelm
parents: 58889
diff changeset
   462
    "(Union(C) Int A = {x. False}) \<longleftrightarrow> (ALL B:C. B Int A = {x. False})"
20140
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 17456
diff changeset
   463
  by (blast intro: equalityI elim: equalityE)
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 17456
diff changeset
   464
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 17456
diff changeset
   465
lemma Inter_Un_distrib: "Inter(A Un B) = Inter(A) Int Inter(B)"
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 17456
diff changeset
   466
  by (blast intro: equalityI)
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 17456
diff changeset
   467
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 17456
diff changeset
   468
60770
240563fbf41d isabelle update_cartouches;
wenzelm
parents: 58977
diff changeset
   469
subsection \<open>Unions and Intersections of Families\<close>
20140
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 17456
diff changeset
   470
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 17456
diff changeset
   471
lemma UN_eq: "(UN x:A. B(x)) = Union({Y. EX x:A. Y=B(x)})"
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 17456
diff changeset
   472
  by (blast intro: equalityI)
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 17456
diff changeset
   473
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 17456
diff changeset
   474
(*Look: it has an EXISTENTIAL quantifier*)
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 17456
diff changeset
   475
lemma INT_eq: "(INT x:A. B(x)) = Inter({Y. EX x:A. Y=B(x)})"
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 17456
diff changeset
   476
  by (blast intro: equalityI)
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 17456
diff changeset
   477
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 17456
diff changeset
   478
lemma Int_Union_image: "A Int Union(B) = (UN C:B. A Int C)"
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 17456
diff changeset
   479
  by (blast intro: equalityI)
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 17456
diff changeset
   480
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 17456
diff changeset
   481
lemma Un_Inter_image: "A Un Inter(B) = (INT C:B. A Un C)"
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 17456
diff changeset
   482
  by (blast intro: equalityI)
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 17456
diff changeset
   483
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 17456
diff changeset
   484
60770
240563fbf41d isabelle update_cartouches;
wenzelm
parents: 58977
diff changeset
   485
section \<open>Monotonicity of various operations\<close>
20140
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 17456
diff changeset
   486
58977
9576b510f6a2 more symbols;
wenzelm
parents: 58889
diff changeset
   487
lemma Union_mono: "A<=B \<Longrightarrow> Union(A) <= Union(B)"
20140
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 17456
diff changeset
   488
  by blast
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 17456
diff changeset
   489
58977
9576b510f6a2 more symbols;
wenzelm
parents: 58889
diff changeset
   490
lemma Inter_anti_mono: "B <= A \<Longrightarrow> Inter(A) <= Inter(B)"
20140
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 17456
diff changeset
   491
  by blast
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 17456
diff changeset
   492
58977
9576b510f6a2 more symbols;
wenzelm
parents: 58889
diff changeset
   493
lemma UN_mono: "\<lbrakk>A <= B; \<And>x. x:A \<Longrightarrow> f(x)<=g(x)\<rbrakk> \<Longrightarrow> (UN x:A. f(x)) <= (UN x:B. g(x))"
20140
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 17456
diff changeset
   494
  by blast
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 17456
diff changeset
   495
58977
9576b510f6a2 more symbols;
wenzelm
parents: 58889
diff changeset
   496
lemma INT_anti_mono: "\<lbrakk>B <= A; \<And>x. x:A \<Longrightarrow> f(x) <= g(x)\<rbrakk> \<Longrightarrow> (INT x:A. f(x)) <= (INT x:A. g(x))"
20140
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 17456
diff changeset
   497
  by blast
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 17456
diff changeset
   498
58977
9576b510f6a2 more symbols;
wenzelm
parents: 58889
diff changeset
   499
lemma Un_mono: "\<lbrakk>A <= C; B <= D\<rbrakk> \<Longrightarrow> A Un B <= C Un D"
20140
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 17456
diff changeset
   500
  by blast
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 17456
diff changeset
   501
58977
9576b510f6a2 more symbols;
wenzelm
parents: 58889
diff changeset
   502
lemma Int_mono: "\<lbrakk>A <= C; B <= D\<rbrakk> \<Longrightarrow> A Int B <= C Int D"
20140
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 17456
diff changeset
   503
  by blast
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 17456
diff changeset
   504
58977
9576b510f6a2 more symbols;
wenzelm
parents: 58889
diff changeset
   505
lemma Compl_anti_mono: "A <= B \<Longrightarrow> Compl(B) <= Compl(A)"
20140
98acc6d0fab6 removed obsolete ML files;
wenzelm
parents: 17456
diff changeset
   506
  by blast
0
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
   507
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
   508
end