src/HOL/Library/Option_ord.thy
author wenzelm
Wed Mar 08 10:50:59 2017 +0100 (2017-03-08)
changeset 65151 a7394aa4d21c
parent 62343 24106dc44def
child 66453 cc19f7ca2ed6
permissions -rw-r--r--
tuned proofs;
haftmann@26241
     1
(*  Title:      HOL/Library/Option_ord.thy
haftmann@26241
     2
    Author:     Florian Haftmann, TU Muenchen
haftmann@26241
     3
*)
haftmann@26241
     4
wenzelm@60500
     5
section \<open>Canonical order on option type\<close>
haftmann@26241
     6
haftmann@26241
     7
theory Option_ord
haftmann@30662
     8
imports Option Main
haftmann@26241
     9
begin
haftmann@26241
    10
haftmann@49190
    11
notation
haftmann@49190
    12
  bot ("\<bottom>") and
haftmann@49190
    13
  top ("\<top>") and
haftmann@49190
    14
  inf  (infixl "\<sqinter>" 70) and
haftmann@49190
    15
  sup  (infixl "\<squnion>" 65) and
haftmann@49190
    16
  Inf  ("\<Sqinter>_" [900] 900) and
haftmann@49190
    17
  Sup  ("\<Squnion>_" [900] 900)
haftmann@49190
    18
wenzelm@61955
    19
syntax
haftmann@49190
    20
  "_INF1"     :: "pttrns \<Rightarrow> 'b \<Rightarrow> 'b"           ("(3\<Sqinter>_./ _)" [0, 10] 10)
haftmann@49190
    21
  "_INF"      :: "pttrn \<Rightarrow> 'a set \<Rightarrow> 'b \<Rightarrow> 'b"  ("(3\<Sqinter>_\<in>_./ _)" [0, 0, 10] 10)
haftmann@49190
    22
  "_SUP1"     :: "pttrns \<Rightarrow> 'b \<Rightarrow> 'b"           ("(3\<Squnion>_./ _)" [0, 10] 10)
haftmann@49190
    23
  "_SUP"      :: "pttrn \<Rightarrow> 'a set \<Rightarrow> 'b \<Rightarrow> 'b"  ("(3\<Squnion>_\<in>_./ _)" [0, 0, 10] 10)
haftmann@49190
    24
haftmann@49190
    25
haftmann@30662
    26
instantiation option :: (preorder) preorder
haftmann@26241
    27
begin
haftmann@26241
    28
haftmann@26241
    29
definition less_eq_option where
haftmann@37765
    30
  "x \<le> y \<longleftrightarrow> (case x of None \<Rightarrow> True | Some x \<Rightarrow> (case y of None \<Rightarrow> False | Some y \<Rightarrow> x \<le> y))"
haftmann@26241
    31
haftmann@26241
    32
definition less_option where
haftmann@37765
    33
  "x < y \<longleftrightarrow> (case y of None \<Rightarrow> False | Some y \<Rightarrow> (case x of None \<Rightarrow> True | Some x \<Rightarrow> x < y))"
haftmann@26241
    34
haftmann@26258
    35
lemma less_eq_option_None [simp]: "None \<le> x"
haftmann@26241
    36
  by (simp add: less_eq_option_def)
haftmann@26241
    37
haftmann@26258
    38
lemma less_eq_option_None_code [code]: "None \<le> x \<longleftrightarrow> True"
haftmann@26241
    39
  by simp
haftmann@26241
    40
haftmann@26258
    41
lemma less_eq_option_None_is_None: "x \<le> None \<Longrightarrow> x = None"
haftmann@26241
    42
  by (cases x) (simp_all add: less_eq_option_def)
haftmann@26241
    43
haftmann@26258
    44
lemma less_eq_option_Some_None [simp, code]: "Some x \<le> None \<longleftrightarrow> False"
haftmann@26241
    45
  by (simp add: less_eq_option_def)
haftmann@26241
    46
haftmann@26258
    47
lemma less_eq_option_Some [simp, code]: "Some x \<le> Some y \<longleftrightarrow> x \<le> y"
haftmann@26241
    48
  by (simp add: less_eq_option_def)
haftmann@26241
    49
haftmann@26258
    50
lemma less_option_None [simp, code]: "x < None \<longleftrightarrow> False"
haftmann@26241
    51
  by (simp add: less_option_def)
haftmann@26241
    52
haftmann@26258
    53
lemma less_option_None_is_Some: "None < x \<Longrightarrow> \<exists>z. x = Some z"
haftmann@26241
    54
  by (cases x) (simp_all add: less_option_def)
haftmann@26241
    55
haftmann@26258
    56
lemma less_option_None_Some [simp]: "None < Some x"
haftmann@26241
    57
  by (simp add: less_option_def)
haftmann@26241
    58
haftmann@26258
    59
lemma less_option_None_Some_code [code]: "None < Some x \<longleftrightarrow> True"
haftmann@26241
    60
  by simp
haftmann@26241
    61
haftmann@26258
    62
lemma less_option_Some [simp, code]: "Some x < Some y \<longleftrightarrow> x < y"
haftmann@26241
    63
  by (simp add: less_option_def)
haftmann@26241
    64
wenzelm@60679
    65
instance
wenzelm@60679
    66
  by standard
wenzelm@60679
    67
    (auto simp add: less_eq_option_def less_option_def less_le_not_le
wenzelm@60679
    68
      elim: order_trans split: option.splits)
haftmann@26241
    69
wenzelm@60679
    70
end
haftmann@30662
    71
wenzelm@60679
    72
instance option :: (order) order
wenzelm@60679
    73
  by standard (auto simp add: less_eq_option_def less_option_def split: option.splits)
wenzelm@60679
    74
wenzelm@60679
    75
instance option :: (linorder) linorder
wenzelm@60679
    76
  by standard (auto simp add: less_eq_option_def less_option_def split: option.splits)
haftmann@30662
    77
haftmann@52729
    78
instantiation option :: (order) order_bot
haftmann@30662
    79
begin
haftmann@30662
    80
wenzelm@60679
    81
definition bot_option where "\<bottom> = None"
haftmann@30662
    82
wenzelm@60679
    83
instance
wenzelm@60679
    84
  by standard (simp add: bot_option_def)
haftmann@30662
    85
haftmann@30662
    86
end
haftmann@30662
    87
haftmann@52729
    88
instantiation option :: (order_top) order_top
haftmann@30662
    89
begin
haftmann@30662
    90
wenzelm@60679
    91
definition top_option where "\<top> = Some \<top>"
haftmann@30662
    92
wenzelm@60679
    93
instance
wenzelm@60679
    94
  by standard (simp add: top_option_def less_eq_option_def split: option.split)
haftmann@26241
    95
haftmann@26241
    96
end
haftmann@30662
    97
wenzelm@60679
    98
instance option :: (wellorder) wellorder
wenzelm@60679
    99
proof
wenzelm@60679
   100
  fix P :: "'a option \<Rightarrow> bool"
wenzelm@60679
   101
  fix z :: "'a option"
haftmann@30662
   102
  assume H: "\<And>x. (\<And>y. y < x \<Longrightarrow> P y) \<Longrightarrow> P x"
haftmann@30662
   103
  have "P None" by (rule H) simp
wenzelm@60679
   104
  then have P_Some [case_names Some]: "P z" if "\<And>x. z = Some x \<Longrightarrow> (P o Some) x" for z
wenzelm@60679
   105
    using \<open>P None\<close> that by (cases z) simp_all
wenzelm@60679
   106
  show "P z"
wenzelm@60679
   107
  proof (cases z rule: P_Some)
haftmann@30662
   108
    case (Some w)
wenzelm@60679
   109
    show "(P o Some) w"
wenzelm@60679
   110
    proof (induct rule: less_induct)
haftmann@30662
   111
      case (less x)
wenzelm@60679
   112
      have "P (Some x)"
wenzelm@60679
   113
      proof (rule H)
haftmann@30662
   114
        fix y :: "'a option"
haftmann@30662
   115
        assume "y < Some x"
wenzelm@60679
   116
        show "P y"
wenzelm@60679
   117
        proof (cases y rule: P_Some)
wenzelm@60679
   118
          case (Some v)
wenzelm@60679
   119
          with \<open>y < Some x\<close> have "v < x" by simp
haftmann@30662
   120
          with less show "(P o Some) v" .
haftmann@30662
   121
        qed
haftmann@30662
   122
      qed
haftmann@30662
   123
      then show ?case by simp
haftmann@30662
   124
    qed
haftmann@30662
   125
  qed
haftmann@30662
   126
qed
haftmann@30662
   127
haftmann@49190
   128
instantiation option :: (inf) inf
haftmann@49190
   129
begin
haftmann@49190
   130
haftmann@49190
   131
definition inf_option where
haftmann@49190
   132
  "x \<sqinter> y = (case x of None \<Rightarrow> None | Some x \<Rightarrow> (case y of None \<Rightarrow> None | Some y \<Rightarrow> Some (x \<sqinter> y)))"
haftmann@49190
   133
wenzelm@60679
   134
lemma inf_None_1 [simp, code]: "None \<sqinter> y = None"
haftmann@49190
   135
  by (simp add: inf_option_def)
haftmann@49190
   136
wenzelm@60679
   137
lemma inf_None_2 [simp, code]: "x \<sqinter> None = None"
haftmann@49190
   138
  by (cases x) (simp_all add: inf_option_def)
haftmann@49190
   139
wenzelm@60679
   140
lemma inf_Some [simp, code]: "Some x \<sqinter> Some y = Some (x \<sqinter> y)"
haftmann@49190
   141
  by (simp add: inf_option_def)
haftmann@49190
   142
haftmann@49190
   143
instance ..
haftmann@49190
   144
haftmann@30662
   145
end
haftmann@49190
   146
haftmann@49190
   147
instantiation option :: (sup) sup
haftmann@49190
   148
begin
haftmann@49190
   149
haftmann@49190
   150
definition sup_option where
haftmann@49190
   151
  "x \<squnion> y = (case x of None \<Rightarrow> y | Some x' \<Rightarrow> (case y of None \<Rightarrow> x | Some y \<Rightarrow> Some (x' \<squnion> y)))"
haftmann@49190
   152
wenzelm@60679
   153
lemma sup_None_1 [simp, code]: "None \<squnion> y = y"
haftmann@49190
   154
  by (simp add: sup_option_def)
haftmann@49190
   155
wenzelm@60679
   156
lemma sup_None_2 [simp, code]: "x \<squnion> None = x"
haftmann@49190
   157
  by (cases x) (simp_all add: sup_option_def)
haftmann@49190
   158
wenzelm@60679
   159
lemma sup_Some [simp, code]: "Some x \<squnion> Some y = Some (x \<squnion> y)"
haftmann@49190
   160
  by (simp add: sup_option_def)
haftmann@49190
   161
haftmann@49190
   162
instance ..
haftmann@49190
   163
haftmann@49190
   164
end
haftmann@49190
   165
wenzelm@60679
   166
instance option :: (semilattice_inf) semilattice_inf
wenzelm@60679
   167
proof
haftmann@49190
   168
  fix x y z :: "'a option"
haftmann@49190
   169
  show "x \<sqinter> y \<le> x"
wenzelm@60679
   170
    by (cases x, simp_all, cases y, simp_all)
haftmann@49190
   171
  show "x \<sqinter> y \<le> y"
wenzelm@60679
   172
    by (cases x, simp_all, cases y, simp_all)
haftmann@49190
   173
  show "x \<le> y \<Longrightarrow> x \<le> z \<Longrightarrow> x \<le> y \<sqinter> z"
wenzelm@60679
   174
    by (cases x, simp_all, cases y, simp_all, cases z, simp_all)
haftmann@49190
   175
qed
haftmann@49190
   176
wenzelm@60679
   177
instance option :: (semilattice_sup) semilattice_sup
wenzelm@60679
   178
proof
haftmann@49190
   179
  fix x y z :: "'a option"
haftmann@49190
   180
  show "x \<le> x \<squnion> y"
wenzelm@60679
   181
    by (cases x, simp_all, cases y, simp_all)
haftmann@49190
   182
  show "y \<le> x \<squnion> y"
wenzelm@60679
   183
    by (cases x, simp_all, cases y, simp_all)
haftmann@49190
   184
  fix x y z :: "'a option"
haftmann@49190
   185
  show "y \<le> x \<Longrightarrow> z \<le> x \<Longrightarrow> y \<squnion> z \<le> x"
wenzelm@60679
   186
    by (cases y, simp_all, cases z, simp_all, cases x, simp_all)
haftmann@49190
   187
qed
haftmann@49190
   188
haftmann@49190
   189
instance option :: (lattice) lattice ..
haftmann@49190
   190
haftmann@49190
   191
instance option :: (lattice) bounded_lattice_bot ..
haftmann@49190
   192
haftmann@49190
   193
instance option :: (bounded_lattice_top) bounded_lattice_top ..
haftmann@49190
   194
haftmann@49190
   195
instance option :: (bounded_lattice_top) bounded_lattice ..
haftmann@49190
   196
haftmann@49190
   197
instance option :: (distrib_lattice) distrib_lattice
haftmann@49190
   198
proof
haftmann@49190
   199
  fix x y z :: "'a option"
haftmann@49190
   200
  show "x \<squnion> y \<sqinter> z = (x \<squnion> y) \<sqinter> (x \<squnion> z)"
wenzelm@60679
   201
    by (cases x, simp_all, cases y, simp_all, cases z, simp_all add: sup_inf_distrib1 inf_commute)
wenzelm@60679
   202
qed
haftmann@49190
   203
haftmann@49190
   204
instantiation option :: (complete_lattice) complete_lattice
haftmann@49190
   205
begin
haftmann@49190
   206
haftmann@49190
   207
definition Inf_option :: "'a option set \<Rightarrow> 'a option" where
haftmann@49190
   208
  "\<Sqinter>A = (if None \<in> A then None else Some (\<Sqinter>Option.these A))"
haftmann@49190
   209
wenzelm@60679
   210
lemma None_in_Inf [simp]: "None \<in> A \<Longrightarrow> \<Sqinter>A = None"
haftmann@49190
   211
  by (simp add: Inf_option_def)
haftmann@49190
   212
haftmann@49190
   213
definition Sup_option :: "'a option set \<Rightarrow> 'a option" where
haftmann@49190
   214
  "\<Squnion>A = (if A = {} \<or> A = {None} then None else Some (\<Squnion>Option.these A))"
haftmann@49190
   215
wenzelm@60679
   216
lemma empty_Sup [simp]: "\<Squnion>{} = None"
haftmann@49190
   217
  by (simp add: Sup_option_def)
haftmann@49190
   218
wenzelm@60679
   219
lemma singleton_None_Sup [simp]: "\<Squnion>{None} = None"
haftmann@49190
   220
  by (simp add: Sup_option_def)
haftmann@49190
   221
wenzelm@60679
   222
instance
wenzelm@60679
   223
proof
haftmann@49190
   224
  fix x :: "'a option" and A
haftmann@49190
   225
  assume "x \<in> A"
haftmann@49190
   226
  then show "\<Sqinter>A \<le> x"
haftmann@49190
   227
    by (cases x) (auto simp add: Inf_option_def in_these_eq intro: Inf_lower)
haftmann@49190
   228
next
haftmann@49190
   229
  fix z :: "'a option" and A
haftmann@49190
   230
  assume *: "\<And>x. x \<in> A \<Longrightarrow> z \<le> x"
haftmann@49190
   231
  show "z \<le> \<Sqinter>A"
haftmann@49190
   232
  proof (cases z)
haftmann@49190
   233
    case None then show ?thesis by simp
haftmann@49190
   234
  next
haftmann@49190
   235
    case (Some y)
haftmann@49190
   236
    show ?thesis
haftmann@49190
   237
      by (auto simp add: Inf_option_def in_these_eq Some intro!: Inf_greatest dest!: *)
haftmann@49190
   238
  qed
haftmann@49190
   239
next
haftmann@49190
   240
  fix x :: "'a option" and A
haftmann@49190
   241
  assume "x \<in> A"
haftmann@49190
   242
  then show "x \<le> \<Squnion>A"
haftmann@49190
   243
    by (cases x) (auto simp add: Sup_option_def in_these_eq intro: Sup_upper)
haftmann@49190
   244
next
haftmann@49190
   245
  fix z :: "'a option" and A
haftmann@49190
   246
  assume *: "\<And>x. x \<in> A \<Longrightarrow> x \<le> z"
haftmann@49190
   247
  show "\<Squnion>A \<le> z "
haftmann@49190
   248
  proof (cases z)
haftmann@49190
   249
    case None
haftmann@49190
   250
    with * have "\<And>x. x \<in> A \<Longrightarrow> x = None" by (auto dest: less_eq_option_None_is_None)
haftmann@49190
   251
    then have "A = {} \<or> A = {None}" by blast
haftmann@49190
   252
    then show ?thesis by (simp add: Sup_option_def)
haftmann@49190
   253
  next
haftmann@49190
   254
    case (Some y)
haftmann@49190
   255
    from * have "\<And>w. Some w \<in> A \<Longrightarrow> Some w \<le> z" .
haftmann@49190
   256
    with Some have "\<And>w. w \<in> Option.these A \<Longrightarrow> w \<le> y"
haftmann@49190
   257
      by (simp add: in_these_eq)
haftmann@49190
   258
    then have "\<Squnion>Option.these A \<le> y" by (rule Sup_least)
haftmann@49190
   259
    with Some show ?thesis by (simp add: Sup_option_def)
haftmann@49190
   260
  qed
haftmann@52729
   261
next
haftmann@52729
   262
  show "\<Squnion>{} = (\<bottom>::'a option)"
wenzelm@60679
   263
    by (auto simp: bot_option_def)
haftmann@52729
   264
  show "\<Sqinter>{} = (\<top>::'a option)"
wenzelm@60679
   265
    by (auto simp: top_option_def Inf_option_def)
haftmann@49190
   266
qed
haftmann@49190
   267
haftmann@49190
   268
end
haftmann@49190
   269
haftmann@49190
   270
lemma Some_Inf:
haftmann@49190
   271
  "Some (\<Sqinter>A) = \<Sqinter>(Some ` A)"
haftmann@49190
   272
  by (auto simp add: Inf_option_def)
haftmann@49190
   273
haftmann@49190
   274
lemma Some_Sup:
haftmann@49190
   275
  "A \<noteq> {} \<Longrightarrow> Some (\<Squnion>A) = \<Squnion>(Some ` A)"
haftmann@49190
   276
  by (auto simp add: Sup_option_def)
haftmann@49190
   277
haftmann@49190
   278
lemma Some_INF:
haftmann@49190
   279
  "Some (\<Sqinter>x\<in>A. f x) = (\<Sqinter>x\<in>A. Some (f x))"
haftmann@56166
   280
  using Some_Inf [of "f ` A"] by (simp add: comp_def)
haftmann@49190
   281
haftmann@49190
   282
lemma Some_SUP:
haftmann@49190
   283
  "A \<noteq> {} \<Longrightarrow> Some (\<Squnion>x\<in>A. f x) = (\<Squnion>x\<in>A. Some (f x))"
haftmann@56166
   284
  using Some_Sup [of "f ` A"] by (simp add: comp_def)
haftmann@49190
   285
wenzelm@60679
   286
instance option :: (complete_distrib_lattice) complete_distrib_lattice
wenzelm@60679
   287
proof
haftmann@49190
   288
  fix a :: "'a option" and B
haftmann@49190
   289
  show "a \<squnion> \<Sqinter>B = (\<Sqinter>b\<in>B. a \<squnion> b)"
haftmann@49190
   290
  proof (cases a)
haftmann@49190
   291
    case None
haftmann@62343
   292
    then show ?thesis by simp
haftmann@49190
   293
  next
haftmann@49190
   294
    case (Some c)
haftmann@49190
   295
    show ?thesis
haftmann@49190
   296
    proof (cases "None \<in> B")
haftmann@49190
   297
      case True
haftmann@49190
   298
      then have "Some c = (\<Sqinter>b\<in>B. Some c \<squnion> b)"
haftmann@49190
   299
        by (auto intro!: antisym INF_lower2 INF_greatest)
haftmann@49190
   300
      with True Some show ?thesis by simp
haftmann@49190
   301
    next
haftmann@49190
   302
      case False then have B: "{x \<in> B. \<exists>y. x = Some y} = B" by auto (metis not_Some_eq)
haftmann@49190
   303
      from sup_Inf have "Some c \<squnion> Some (\<Sqinter>Option.these B) = Some (\<Sqinter>b\<in>Option.these B. c \<squnion> b)" by simp
haftmann@49190
   304
      then have "Some c \<squnion> \<Sqinter>(Some ` Option.these B) = (\<Sqinter>x\<in>Some ` Option.these B. Some c \<squnion> x)"
haftmann@56166
   305
        by (simp add: Some_INF Some_Inf comp_def)
haftmann@62343
   306
      with Some B show ?thesis by (simp add: Some_image_these_eq cong del: strong_INF_cong)
haftmann@49190
   307
    qed
haftmann@49190
   308
  qed
haftmann@49190
   309
  show "a \<sqinter> \<Squnion>B = (\<Squnion>b\<in>B. a \<sqinter> b)"
haftmann@49190
   310
  proof (cases a)
haftmann@49190
   311
    case None
haftmann@62343
   312
    then show ?thesis by (simp add: image_constant_conv bot_option_def cong del: strong_SUP_cong)
haftmann@49190
   313
  next
haftmann@49190
   314
    case (Some c)
haftmann@49190
   315
    show ?thesis
haftmann@49190
   316
    proof (cases "B = {} \<or> B = {None}")
haftmann@49190
   317
      case True
haftmann@56166
   318
      then show ?thesis by auto
haftmann@49190
   319
    next
haftmann@49190
   320
      have B: "B = {x \<in> B. \<exists>y. x = Some y} \<union> {x \<in> B. x = None}"
haftmann@49190
   321
        by auto
haftmann@49190
   322
      then have Sup_B: "\<Squnion>B = \<Squnion>({x \<in> B. \<exists>y. x = Some y} \<union> {x \<in> B. x = None})"
haftmann@49190
   323
        and SUP_B: "\<And>f. (\<Squnion>x \<in> B. f x) = (\<Squnion>x \<in> {x \<in> B. \<exists>y. x = Some y} \<union> {x \<in> B. x = None}. f x)"
haftmann@49190
   324
        by simp_all
haftmann@49190
   325
      have Sup_None: "\<Squnion>{x. x = None \<and> x \<in> B} = None"
haftmann@49190
   326
        by (simp add: bot_option_def [symmetric])
haftmann@49190
   327
      have SUP_None: "(\<Squnion>x\<in>{x. x = None \<and> x \<in> B}. Some c \<sqinter> x) = None"
haftmann@49190
   328
        by (simp add: bot_option_def [symmetric])
haftmann@49190
   329
      case False then have "Option.these B \<noteq> {}" by (simp add: these_not_empty_eq)
haftmann@49190
   330
      moreover from inf_Sup have "Some c \<sqinter> Some (\<Squnion>Option.these B) = Some (\<Squnion>b\<in>Option.these B. c \<sqinter> b)"
haftmann@49190
   331
        by simp
haftmann@49190
   332
      ultimately have "Some c \<sqinter> \<Squnion>(Some ` Option.these B) = (\<Squnion>x\<in>Some ` Option.these B. Some c \<sqinter> x)"
haftmann@56166
   333
        by (simp add: Some_SUP Some_Sup comp_def)
haftmann@49190
   334
      with Some show ?thesis
haftmann@62343
   335
        by (simp add: Some_image_these_eq Sup_B SUP_B Sup_None SUP_None SUP_union Sup_union_distrib cong del: strong_SUP_cong)
haftmann@49190
   336
    qed
haftmann@49190
   337
  qed
haftmann@49190
   338
qed
haftmann@49190
   339
wenzelm@60679
   340
instance option :: (complete_linorder) complete_linorder ..
haftmann@49190
   341
haftmann@49190
   342
haftmann@49190
   343
no_notation
haftmann@49190
   344
  bot ("\<bottom>") and
haftmann@49190
   345
  top ("\<top>") and
haftmann@49190
   346
  inf  (infixl "\<sqinter>" 70) and
haftmann@49190
   347
  sup  (infixl "\<squnion>" 65) and
haftmann@49190
   348
  Inf  ("\<Sqinter>_" [900] 900) and
haftmann@49190
   349
  Sup  ("\<Squnion>_" [900] 900)
haftmann@49190
   350
wenzelm@61955
   351
no_syntax
haftmann@49190
   352
  "_INF1"     :: "pttrns \<Rightarrow> 'b \<Rightarrow> 'b"           ("(3\<Sqinter>_./ _)" [0, 10] 10)
haftmann@49190
   353
  "_INF"      :: "pttrn \<Rightarrow> 'a set \<Rightarrow> 'b \<Rightarrow> 'b"  ("(3\<Sqinter>_\<in>_./ _)" [0, 0, 10] 10)
haftmann@49190
   354
  "_SUP1"     :: "pttrns \<Rightarrow> 'b \<Rightarrow> 'b"           ("(3\<Squnion>_./ _)" [0, 10] 10)
haftmann@49190
   355
  "_SUP"      :: "pttrn \<Rightarrow> 'a set \<Rightarrow> 'b \<Rightarrow> 'b"  ("(3\<Squnion>_\<in>_./ _)" [0, 0, 10] 10)
haftmann@49190
   356
haftmann@49190
   357
end