src/HOL/Set.thy
changeset 50580 fbb973a53106
parent 49757 73ab6d4a9236
child 51173 3cbb4e95a565
equal deleted inserted replaced
50579:8ccffe44d193 50580:fbb973a53106
    16   mem_Collect_eq [iff, code_unfold]: "member a (Collect P) = P a"
    16   mem_Collect_eq [iff, code_unfold]: "member a (Collect P) = P a"
    17   and Collect_mem_eq [simp]: "Collect (\<lambda>x. member x A) = A"
    17   and Collect_mem_eq [simp]: "Collect (\<lambda>x. member x A) = A"
    18 
    18 
    19 notation
    19 notation
    20   member  ("op :") and
    20   member  ("op :") and
    21   member  ("(_/ : _)" [50, 51] 50)
    21   member  ("(_/ : _)" [51, 51] 50)
    22 
    22 
    23 abbreviation not_member where
    23 abbreviation not_member where
    24   "not_member x A \<equiv> ~ (x : A)" -- "non-membership"
    24   "not_member x A \<equiv> ~ (x : A)" -- "non-membership"
    25 
    25 
    26 notation
    26 notation
    27   not_member  ("op ~:") and
    27   not_member  ("op ~:") and
    28   not_member  ("(_/ ~: _)" [50, 51] 50)
    28   not_member  ("(_/ ~: _)" [51, 51] 50)
    29 
    29 
    30 notation (xsymbols)
    30 notation (xsymbols)
    31   member      ("op \<in>") and
    31   member      ("op \<in>") and
    32   member      ("(_/ \<in> _)" [50, 51] 50) and
    32   member      ("(_/ \<in> _)" [51, 51] 50) and
    33   not_member  ("op \<notin>") and
    33   not_member  ("op \<notin>") and
    34   not_member  ("(_/ \<notin> _)" [50, 51] 50)
    34   not_member  ("(_/ \<notin> _)" [51, 51] 50)
    35 
    35 
    36 notation (HTML output)
    36 notation (HTML output)
    37   member      ("op \<in>") and
    37   member      ("op \<in>") and
    38   member      ("(_/ \<in> _)" [50, 51] 50) and
    38   member      ("(_/ \<in> _)" [51, 51] 50) and
    39   not_member  ("op \<notin>") and
    39   not_member  ("op \<notin>") and
    40   not_member  ("(_/ \<notin> _)" [50, 51] 50)
    40   not_member  ("(_/ \<notin> _)" [51, 51] 50)
    41 
    41 
    42 
    42 
    43 text {* Set comprehensions *}
    43 text {* Set comprehensions *}
    44 
    44 
    45 syntax
    45 syntax
   154   subset_eq :: "'a set \<Rightarrow> 'a set \<Rightarrow> bool" where
   154   subset_eq :: "'a set \<Rightarrow> 'a set \<Rightarrow> bool" where
   155   "subset_eq \<equiv> less_eq"
   155   "subset_eq \<equiv> less_eq"
   156 
   156 
   157 notation (output)
   157 notation (output)
   158   subset  ("op <") and
   158   subset  ("op <") and
   159   subset  ("(_/ < _)" [50, 51] 50) and
   159   subset  ("(_/ < _)" [51, 51] 50) and
   160   subset_eq  ("op <=") and
   160   subset_eq  ("op <=") and
   161   subset_eq  ("(_/ <= _)" [50, 51] 50)
   161   subset_eq  ("(_/ <= _)" [51, 51] 50)
   162 
   162 
   163 notation (xsymbols)
   163 notation (xsymbols)
   164   subset  ("op \<subset>") and
   164   subset  ("op \<subset>") and
   165   subset  ("(_/ \<subset> _)" [50, 51] 50) and
   165   subset  ("(_/ \<subset> _)" [51, 51] 50) and
   166   subset_eq  ("op \<subseteq>") and
   166   subset_eq  ("op \<subseteq>") and
   167   subset_eq  ("(_/ \<subseteq> _)" [50, 51] 50)
   167   subset_eq  ("(_/ \<subseteq> _)" [51, 51] 50)
   168 
   168 
   169 notation (HTML output)
   169 notation (HTML output)
   170   subset  ("op \<subset>") and
   170   subset  ("op \<subset>") and
   171   subset  ("(_/ \<subset> _)" [50, 51] 50) and
   171   subset  ("(_/ \<subset> _)" [51, 51] 50) and
   172   subset_eq  ("op \<subseteq>") and
   172   subset_eq  ("op \<subseteq>") and
   173   subset_eq  ("(_/ \<subseteq> _)" [50, 51] 50)
   173   subset_eq  ("(_/ \<subseteq> _)" [51, 51] 50)
   174 
   174 
   175 abbreviation (input)
   175 abbreviation (input)
   176   supset :: "'a set \<Rightarrow> 'a set \<Rightarrow> bool" where
   176   supset :: "'a set \<Rightarrow> 'a set \<Rightarrow> bool" where
   177   "supset \<equiv> greater"
   177   "supset \<equiv> greater"
   178 
   178 
   180   supset_eq :: "'a set \<Rightarrow> 'a set \<Rightarrow> bool" where
   180   supset_eq :: "'a set \<Rightarrow> 'a set \<Rightarrow> bool" where
   181   "supset_eq \<equiv> greater_eq"
   181   "supset_eq \<equiv> greater_eq"
   182 
   182 
   183 notation (xsymbols)
   183 notation (xsymbols)
   184   supset  ("op \<supset>") and
   184   supset  ("op \<supset>") and
   185   supset  ("(_/ \<supset> _)" [50, 51] 50) and
   185   supset  ("(_/ \<supset> _)" [51, 51] 50) and
   186   supset_eq  ("op \<supseteq>") and
   186   supset_eq  ("op \<supseteq>") and
   187   supset_eq  ("(_/ \<supseteq> _)" [50, 51] 50)
   187   supset_eq  ("(_/ \<supseteq> _)" [51, 51] 50)
   188 
   188 
   189 definition Ball :: "'a set \<Rightarrow> ('a \<Rightarrow> bool) \<Rightarrow> bool" where
   189 definition Ball :: "'a set \<Rightarrow> ('a \<Rightarrow> bool) \<Rightarrow> bool" where
   190   "Ball A P \<longleftrightarrow> (\<forall>x. x \<in> A \<longrightarrow> P x)"   -- "bounded universal quantifiers"
   190   "Ball A P \<longleftrightarrow> (\<forall>x. x \<in> A \<longrightarrow> P x)"   -- "bounded universal quantifiers"
   191 
   191 
   192 definition Bex :: "'a set \<Rightarrow> ('a \<Rightarrow> bool) \<Rightarrow> bool" where
   192 definition Bex :: "'a set \<Rightarrow> ('a \<Rightarrow> bool) \<Rightarrow> bool" where