src/HOL/Lifting.thy
author kuncar
Thu Apr 26 12:01:58 2012 +0200 (2012-04-26)
changeset 47777 f29e7dcd7c40
parent 47698 18202d3d5832
child 47889 29212a4bb866
permissions -rw-r--r--
use a quot_map theorem attribute instead of the complicated map attribute
kuncar@47308
     1
(*  Title:      HOL/Lifting.thy
kuncar@47308
     2
    Author:     Brian Huffman and Ondrej Kuncar
kuncar@47308
     3
    Author:     Cezary Kaliszyk and Christian Urban
kuncar@47308
     4
*)
kuncar@47308
     5
kuncar@47308
     6
header {* Lifting package *}
kuncar@47308
     7
kuncar@47308
     8
theory Lifting
huffman@47325
     9
imports Plain Equiv_Relations Transfer
kuncar@47308
    10
keywords
kuncar@47308
    11
  "print_quotmaps" "print_quotients" :: diag and
kuncar@47308
    12
  "lift_definition" :: thy_goal and
kuncar@47308
    13
  "setup_lifting" :: thy_decl
kuncar@47308
    14
uses
kuncar@47698
    15
  ("Tools/Lifting/lifting_util.ML")
kuncar@47308
    16
  ("Tools/Lifting/lifting_info.ML")
kuncar@47308
    17
  ("Tools/Lifting/lifting_term.ML")
kuncar@47308
    18
  ("Tools/Lifting/lifting_def.ML")
kuncar@47308
    19
  ("Tools/Lifting/lifting_setup.ML")
kuncar@47308
    20
begin
kuncar@47308
    21
huffman@47325
    22
subsection {* Function map *}
kuncar@47308
    23
kuncar@47308
    24
notation map_fun (infixr "--->" 55)
kuncar@47308
    25
kuncar@47308
    26
lemma map_fun_id:
kuncar@47308
    27
  "(id ---> id) = id"
kuncar@47308
    28
  by (simp add: fun_eq_iff)
kuncar@47308
    29
kuncar@47308
    30
subsection {* Quotient Predicate *}
kuncar@47308
    31
kuncar@47308
    32
definition
kuncar@47308
    33
  "Quotient R Abs Rep T \<longleftrightarrow>
kuncar@47308
    34
     (\<forall>a. Abs (Rep a) = a) \<and> 
kuncar@47308
    35
     (\<forall>a. R (Rep a) (Rep a)) \<and>
kuncar@47308
    36
     (\<forall>r s. R r s \<longleftrightarrow> R r r \<and> R s s \<and> Abs r = Abs s) \<and>
kuncar@47308
    37
     T = (\<lambda>x y. R x x \<and> Abs x = y)"
kuncar@47308
    38
kuncar@47308
    39
lemma QuotientI:
kuncar@47308
    40
  assumes "\<And>a. Abs (Rep a) = a"
kuncar@47308
    41
    and "\<And>a. R (Rep a) (Rep a)"
kuncar@47308
    42
    and "\<And>r s. R r s \<longleftrightarrow> R r r \<and> R s s \<and> Abs r = Abs s"
kuncar@47308
    43
    and "T = (\<lambda>x y. R x x \<and> Abs x = y)"
kuncar@47308
    44
  shows "Quotient R Abs Rep T"
kuncar@47308
    45
  using assms unfolding Quotient_def by blast
kuncar@47308
    46
huffman@47536
    47
context
huffman@47536
    48
  fixes R Abs Rep T
kuncar@47308
    49
  assumes a: "Quotient R Abs Rep T"
huffman@47536
    50
begin
huffman@47536
    51
huffman@47536
    52
lemma Quotient_abs_rep: "Abs (Rep a) = a"
huffman@47536
    53
  using a unfolding Quotient_def
kuncar@47308
    54
  by simp
kuncar@47308
    55
huffman@47536
    56
lemma Quotient_rep_reflp: "R (Rep a) (Rep a)"
huffman@47536
    57
  using a unfolding Quotient_def
kuncar@47308
    58
  by blast
kuncar@47308
    59
kuncar@47308
    60
lemma Quotient_rel:
huffman@47536
    61
  "R r r \<and> R s s \<and> Abs r = Abs s \<longleftrightarrow> R r s" -- {* orientation does not loop on rewriting *}
huffman@47536
    62
  using a unfolding Quotient_def
kuncar@47308
    63
  by blast
kuncar@47308
    64
huffman@47536
    65
lemma Quotient_cr_rel: "T = (\<lambda>x y. R x x \<and> Abs x = y)"
kuncar@47308
    66
  using a unfolding Quotient_def
kuncar@47308
    67
  by blast
kuncar@47308
    68
huffman@47536
    69
lemma Quotient_refl1: "R r s \<Longrightarrow> R r r"
huffman@47536
    70
  using a unfolding Quotient_def
huffman@47536
    71
  by fast
huffman@47536
    72
huffman@47536
    73
lemma Quotient_refl2: "R r s \<Longrightarrow> R s s"
huffman@47536
    74
  using a unfolding Quotient_def
huffman@47536
    75
  by fast
huffman@47536
    76
huffman@47536
    77
lemma Quotient_rel_rep: "R (Rep a) (Rep b) \<longleftrightarrow> a = b"
huffman@47536
    78
  using a unfolding Quotient_def
huffman@47536
    79
  by metis
huffman@47536
    80
huffman@47536
    81
lemma Quotient_rep_abs: "R r r \<Longrightarrow> R (Rep (Abs r)) r"
kuncar@47308
    82
  using a unfolding Quotient_def
kuncar@47308
    83
  by blast
kuncar@47308
    84
huffman@47536
    85
lemma Quotient_rel_abs: "R r s \<Longrightarrow> Abs r = Abs s"
huffman@47536
    86
  using a unfolding Quotient_def
huffman@47536
    87
  by blast
huffman@47536
    88
huffman@47536
    89
lemma Quotient_symp: "symp R"
kuncar@47308
    90
  using a unfolding Quotient_def using sympI by (metis (full_types))
kuncar@47308
    91
huffman@47536
    92
lemma Quotient_transp: "transp R"
kuncar@47308
    93
  using a unfolding Quotient_def using transpI by (metis (full_types))
kuncar@47308
    94
huffman@47536
    95
lemma Quotient_part_equivp: "part_equivp R"
huffman@47536
    96
by (metis Quotient_rep_reflp Quotient_symp Quotient_transp part_equivpI)
huffman@47536
    97
huffman@47536
    98
end
kuncar@47308
    99
kuncar@47308
   100
lemma identity_quotient: "Quotient (op =) id id (op =)"
kuncar@47308
   101
unfolding Quotient_def by simp 
kuncar@47308
   102
huffman@47652
   103
text {* TODO: Use one of these alternatives as the real definition. *}
huffman@47652
   104
kuncar@47308
   105
lemma Quotient_alt_def:
kuncar@47308
   106
  "Quotient R Abs Rep T \<longleftrightarrow>
kuncar@47308
   107
    (\<forall>a b. T a b \<longrightarrow> Abs a = b) \<and>
kuncar@47308
   108
    (\<forall>b. T (Rep b) b) \<and>
kuncar@47308
   109
    (\<forall>x y. R x y \<longleftrightarrow> T x (Abs x) \<and> T y (Abs y) \<and> Abs x = Abs y)"
kuncar@47308
   110
apply safe
kuncar@47308
   111
apply (simp (no_asm_use) only: Quotient_def, fast)
kuncar@47308
   112
apply (simp (no_asm_use) only: Quotient_def, fast)
kuncar@47308
   113
apply (simp (no_asm_use) only: Quotient_def, fast)
kuncar@47308
   114
apply (simp (no_asm_use) only: Quotient_def, fast)
kuncar@47308
   115
apply (simp (no_asm_use) only: Quotient_def, fast)
kuncar@47308
   116
apply (simp (no_asm_use) only: Quotient_def, fast)
kuncar@47308
   117
apply (rule QuotientI)
kuncar@47308
   118
apply simp
kuncar@47308
   119
apply metis
kuncar@47308
   120
apply simp
kuncar@47308
   121
apply (rule ext, rule ext, metis)
kuncar@47308
   122
done
kuncar@47308
   123
kuncar@47308
   124
lemma Quotient_alt_def2:
kuncar@47308
   125
  "Quotient R Abs Rep T \<longleftrightarrow>
kuncar@47308
   126
    (\<forall>a b. T a b \<longrightarrow> Abs a = b) \<and>
kuncar@47308
   127
    (\<forall>b. T (Rep b) b) \<and>
kuncar@47308
   128
    (\<forall>x y. R x y \<longleftrightarrow> T x (Abs y) \<and> T y (Abs x))"
kuncar@47308
   129
  unfolding Quotient_alt_def by (safe, metis+)
kuncar@47308
   130
huffman@47652
   131
lemma Quotient_alt_def3:
huffman@47652
   132
  "Quotient R Abs Rep T \<longleftrightarrow>
huffman@47652
   133
    (\<forall>a b. T a b \<longrightarrow> Abs a = b) \<and> (\<forall>b. T (Rep b) b) \<and>
huffman@47652
   134
    (\<forall>x y. R x y \<longleftrightarrow> (\<exists>z. T x z \<and> T y z))"
huffman@47652
   135
  unfolding Quotient_alt_def2 by (safe, metis+)
huffman@47652
   136
huffman@47652
   137
lemma Quotient_alt_def4:
huffman@47652
   138
  "Quotient R Abs Rep T \<longleftrightarrow>
huffman@47652
   139
    (\<forall>a b. T a b \<longrightarrow> Abs a = b) \<and> (\<forall>b. T (Rep b) b) \<and> R = T OO conversep T"
huffman@47652
   140
  unfolding Quotient_alt_def3 fun_eq_iff by auto
huffman@47652
   141
kuncar@47308
   142
lemma fun_quotient:
kuncar@47308
   143
  assumes 1: "Quotient R1 abs1 rep1 T1"
kuncar@47308
   144
  assumes 2: "Quotient R2 abs2 rep2 T2"
kuncar@47308
   145
  shows "Quotient (R1 ===> R2) (rep1 ---> abs2) (abs1 ---> rep2) (T1 ===> T2)"
kuncar@47308
   146
  using assms unfolding Quotient_alt_def2
kuncar@47308
   147
  unfolding fun_rel_def fun_eq_iff map_fun_apply
kuncar@47308
   148
  by (safe, metis+)
kuncar@47308
   149
kuncar@47308
   150
lemma apply_rsp:
kuncar@47308
   151
  fixes f g::"'a \<Rightarrow> 'c"
kuncar@47308
   152
  assumes q: "Quotient R1 Abs1 Rep1 T1"
kuncar@47308
   153
  and     a: "(R1 ===> R2) f g" "R1 x y"
kuncar@47308
   154
  shows "R2 (f x) (g y)"
kuncar@47308
   155
  using a by (auto elim: fun_relE)
kuncar@47308
   156
kuncar@47308
   157
lemma apply_rsp':
kuncar@47308
   158
  assumes a: "(R1 ===> R2) f g" "R1 x y"
kuncar@47308
   159
  shows "R2 (f x) (g y)"
kuncar@47308
   160
  using a by (auto elim: fun_relE)
kuncar@47308
   161
kuncar@47308
   162
lemma apply_rsp'':
kuncar@47308
   163
  assumes "Quotient R Abs Rep T"
kuncar@47308
   164
  and "(R ===> S) f f"
kuncar@47308
   165
  shows "S (f (Rep x)) (f (Rep x))"
kuncar@47308
   166
proof -
kuncar@47308
   167
  from assms(1) have "R (Rep x) (Rep x)" by (rule Quotient_rep_reflp)
kuncar@47308
   168
  then show ?thesis using assms(2) by (auto intro: apply_rsp')
kuncar@47308
   169
qed
kuncar@47308
   170
kuncar@47308
   171
subsection {* Quotient composition *}
kuncar@47308
   172
kuncar@47308
   173
lemma Quotient_compose:
kuncar@47308
   174
  assumes 1: "Quotient R1 Abs1 Rep1 T1"
kuncar@47308
   175
  assumes 2: "Quotient R2 Abs2 Rep2 T2"
kuncar@47308
   176
  shows "Quotient (T1 OO R2 OO conversep T1) (Abs2 \<circ> Abs1) (Rep1 \<circ> Rep2) (T1 OO T2)"
huffman@47652
   177
  using assms unfolding Quotient_alt_def4 by (auto intro!: ext)
kuncar@47308
   178
kuncar@47521
   179
lemma equivp_reflp2:
kuncar@47521
   180
  "equivp R \<Longrightarrow> reflp R"
kuncar@47521
   181
  by (erule equivpE)
kuncar@47521
   182
huffman@47544
   183
subsection {* Respects predicate *}
huffman@47544
   184
huffman@47544
   185
definition Respects :: "('a \<Rightarrow> 'a \<Rightarrow> bool) \<Rightarrow> 'a set"
huffman@47544
   186
  where "Respects R = {x. R x x}"
huffman@47544
   187
huffman@47544
   188
lemma in_respects: "x \<in> Respects R \<longleftrightarrow> R x x"
huffman@47544
   189
  unfolding Respects_def by simp
huffman@47544
   190
kuncar@47308
   191
subsection {* Invariant *}
kuncar@47308
   192
kuncar@47308
   193
definition invariant :: "('a \<Rightarrow> bool) \<Rightarrow> 'a \<Rightarrow> 'a \<Rightarrow> bool" 
kuncar@47308
   194
  where "invariant R = (\<lambda>x y. R x \<and> x = y)"
kuncar@47308
   195
kuncar@47308
   196
lemma invariant_to_eq:
kuncar@47308
   197
  assumes "invariant P x y"
kuncar@47308
   198
  shows "x = y"
kuncar@47308
   199
using assms by (simp add: invariant_def)
kuncar@47308
   200
kuncar@47308
   201
lemma fun_rel_eq_invariant:
kuncar@47308
   202
  shows "((invariant R) ===> S) = (\<lambda>f g. \<forall>x. R x \<longrightarrow> S (f x) (g x))"
kuncar@47308
   203
by (auto simp add: invariant_def fun_rel_def)
kuncar@47308
   204
kuncar@47308
   205
lemma invariant_same_args:
kuncar@47308
   206
  shows "invariant P x x \<equiv> P x"
kuncar@47308
   207
using assms by (auto simp add: invariant_def)
kuncar@47308
   208
kuncar@47361
   209
lemma UNIV_typedef_to_Quotient:
kuncar@47308
   210
  assumes "type_definition Rep Abs UNIV"
kuncar@47361
   211
  and T_def: "T \<equiv> (\<lambda>x y. x = Rep y)"
kuncar@47308
   212
  shows "Quotient (op =) Abs Rep T"
kuncar@47308
   213
proof -
kuncar@47308
   214
  interpret type_definition Rep Abs UNIV by fact
kuncar@47361
   215
  from Abs_inject Rep_inverse Abs_inverse T_def show ?thesis 
kuncar@47361
   216
    by (fastforce intro!: QuotientI fun_eq_iff)
kuncar@47308
   217
qed
kuncar@47308
   218
kuncar@47361
   219
lemma UNIV_typedef_to_equivp:
kuncar@47308
   220
  fixes Abs :: "'a \<Rightarrow> 'b"
kuncar@47308
   221
  and Rep :: "'b \<Rightarrow> 'a"
kuncar@47308
   222
  assumes "type_definition Rep Abs (UNIV::'a set)"
kuncar@47308
   223
  shows "equivp (op=::'a\<Rightarrow>'a\<Rightarrow>bool)"
kuncar@47308
   224
by (rule identity_equivp)
kuncar@47308
   225
huffman@47354
   226
lemma typedef_to_Quotient:
kuncar@47361
   227
  assumes "type_definition Rep Abs S"
kuncar@47361
   228
  and T_def: "T \<equiv> (\<lambda>x y. x = Rep y)"
kuncar@47501
   229
  shows "Quotient (invariant (\<lambda>x. x \<in> S)) Abs Rep T"
kuncar@47361
   230
proof -
kuncar@47361
   231
  interpret type_definition Rep Abs S by fact
kuncar@47361
   232
  from Rep Abs_inject Rep_inverse Abs_inverse T_def show ?thesis
kuncar@47361
   233
    by (auto intro!: QuotientI simp: invariant_def fun_eq_iff)
kuncar@47361
   234
qed
kuncar@47361
   235
kuncar@47361
   236
lemma typedef_to_part_equivp:
kuncar@47361
   237
  assumes "type_definition Rep Abs S"
kuncar@47501
   238
  shows "part_equivp (invariant (\<lambda>x. x \<in> S))"
kuncar@47361
   239
proof (intro part_equivpI)
kuncar@47361
   240
  interpret type_definition Rep Abs S by fact
kuncar@47501
   241
  show "\<exists>x. invariant (\<lambda>x. x \<in> S) x x" using Rep by (auto simp: invariant_def)
kuncar@47361
   242
next
kuncar@47501
   243
  show "symp (invariant (\<lambda>x. x \<in> S))" by (auto intro: sympI simp: invariant_def)
kuncar@47361
   244
next
kuncar@47501
   245
  show "transp (invariant (\<lambda>x. x \<in> S))" by (auto intro: transpI simp: invariant_def)
kuncar@47361
   246
qed
kuncar@47361
   247
kuncar@47361
   248
lemma open_typedef_to_Quotient:
kuncar@47308
   249
  assumes "type_definition Rep Abs {x. P x}"
huffman@47354
   250
  and T_def: "T \<equiv> (\<lambda>x y. x = Rep y)"
kuncar@47308
   251
  shows "Quotient (invariant P) Abs Rep T"
huffman@47651
   252
  using typedef_to_Quotient [OF assms] by simp
kuncar@47308
   253
kuncar@47361
   254
lemma open_typedef_to_part_equivp:
kuncar@47308
   255
  assumes "type_definition Rep Abs {x. P x}"
kuncar@47308
   256
  shows "part_equivp (invariant P)"
huffman@47651
   257
  using typedef_to_part_equivp [OF assms] by simp
kuncar@47308
   258
huffman@47376
   259
text {* Generating transfer rules for quotients. *}
huffman@47376
   260
huffman@47537
   261
context
huffman@47537
   262
  fixes R Abs Rep T
huffman@47537
   263
  assumes 1: "Quotient R Abs Rep T"
huffman@47537
   264
begin
huffman@47376
   265
huffman@47537
   266
lemma Quotient_right_unique: "right_unique T"
huffman@47537
   267
  using 1 unfolding Quotient_alt_def right_unique_def by metis
huffman@47537
   268
huffman@47537
   269
lemma Quotient_right_total: "right_total T"
huffman@47537
   270
  using 1 unfolding Quotient_alt_def right_total_def by metis
huffman@47537
   271
huffman@47537
   272
lemma Quotient_rel_eq_transfer: "(T ===> T ===> op =) R (op =)"
huffman@47537
   273
  using 1 unfolding Quotient_alt_def fun_rel_def by simp
huffman@47376
   274
huffman@47538
   275
lemma Quotient_abs_induct:
huffman@47538
   276
  assumes "\<And>y. R y y \<Longrightarrow> P (Abs y)" shows "P x"
huffman@47538
   277
  using 1 assms unfolding Quotient_def by metis
huffman@47538
   278
huffman@47544
   279
lemma Quotient_All_transfer:
huffman@47544
   280
  "((T ===> op =) ===> op =) (Ball (Respects R)) All"
huffman@47544
   281
  unfolding fun_rel_def Respects_def Quotient_cr_rel [OF 1]
huffman@47544
   282
  by (auto, metis Quotient_abs_induct)
huffman@47544
   283
huffman@47544
   284
lemma Quotient_Ex_transfer:
huffman@47544
   285
  "((T ===> op =) ===> op =) (Bex (Respects R)) Ex"
huffman@47544
   286
  unfolding fun_rel_def Respects_def Quotient_cr_rel [OF 1]
huffman@47544
   287
  by (auto, metis Quotient_rep_reflp [OF 1] Quotient_abs_rep [OF 1])
huffman@47544
   288
huffman@47544
   289
lemma Quotient_forall_transfer:
huffman@47544
   290
  "((T ===> op =) ===> op =) (transfer_bforall (\<lambda>x. R x x)) transfer_forall"
huffman@47544
   291
  using Quotient_All_transfer
huffman@47544
   292
  unfolding transfer_forall_def transfer_bforall_def
huffman@47544
   293
    Ball_def [abs_def] in_respects .
huffman@47544
   294
huffman@47537
   295
end
huffman@47537
   296
huffman@47537
   297
text {* Generating transfer rules for total quotients. *}
huffman@47376
   298
huffman@47537
   299
context
huffman@47537
   300
  fixes R Abs Rep T
huffman@47537
   301
  assumes 1: "Quotient R Abs Rep T" and 2: "reflp R"
huffman@47537
   302
begin
huffman@47376
   303
huffman@47537
   304
lemma Quotient_bi_total: "bi_total T"
huffman@47537
   305
  using 1 2 unfolding Quotient_alt_def bi_total_def reflp_def by auto
huffman@47537
   306
huffman@47537
   307
lemma Quotient_id_abs_transfer: "(op = ===> T) (\<lambda>x. x) Abs"
huffman@47537
   308
  using 1 2 unfolding Quotient_alt_def reflp_def fun_rel_def by simp
huffman@47537
   309
huffman@47575
   310
lemma Quotient_total_abs_induct: "(\<And>y. P (Abs y)) \<Longrightarrow> P x"
huffman@47575
   311
  using 1 2 assms unfolding Quotient_alt_def reflp_def by metis
huffman@47575
   312
huffman@47537
   313
end
huffman@47376
   314
huffman@47368
   315
text {* Generating transfer rules for a type defined with @{text "typedef"}. *}
huffman@47368
   316
huffman@47534
   317
context
huffman@47534
   318
  fixes Rep Abs A T
huffman@47368
   319
  assumes type: "type_definition Rep Abs A"
huffman@47534
   320
  assumes T_def: "T \<equiv> (\<lambda>(x::'a) (y::'b). x = Rep y)"
huffman@47534
   321
begin
huffman@47534
   322
huffman@47534
   323
lemma typedef_bi_unique: "bi_unique T"
huffman@47368
   324
  unfolding bi_unique_def T_def
huffman@47368
   325
  by (simp add: type_definition.Rep_inject [OF type])
huffman@47368
   326
huffman@47535
   327
lemma typedef_rep_transfer: "(T ===> op =) (\<lambda>x. x) Rep"
huffman@47535
   328
  unfolding fun_rel_def T_def by simp
huffman@47535
   329
kuncar@47545
   330
lemma typedef_All_transfer: "((T ===> op =) ===> op =) (Ball A) All"
huffman@47534
   331
  unfolding T_def fun_rel_def
huffman@47534
   332
  by (metis type_definition.Rep [OF type]
huffman@47534
   333
    type_definition.Abs_inverse [OF type])
huffman@47534
   334
kuncar@47545
   335
lemma typedef_Ex_transfer: "((T ===> op =) ===> op =) (Bex A) Ex"
kuncar@47545
   336
  unfolding T_def fun_rel_def
kuncar@47545
   337
  by (metis type_definition.Rep [OF type]
kuncar@47545
   338
    type_definition.Abs_inverse [OF type])
kuncar@47545
   339
kuncar@47545
   340
lemma typedef_forall_transfer:
huffman@47534
   341
  "((T ===> op =) ===> op =)
huffman@47534
   342
    (transfer_bforall (\<lambda>x. x \<in> A)) transfer_forall"
huffman@47534
   343
  unfolding transfer_bforall_def transfer_forall_def Ball_def [symmetric]
kuncar@47545
   344
  by (rule typedef_All_transfer)
huffman@47534
   345
huffman@47534
   346
end
huffman@47534
   347
huffman@47368
   348
text {* Generating the correspondence rule for a constant defined with
huffman@47368
   349
  @{text "lift_definition"}. *}
huffman@47368
   350
huffman@47351
   351
lemma Quotient_to_transfer:
huffman@47351
   352
  assumes "Quotient R Abs Rep T" and "R c c" and "c' \<equiv> Abs c"
huffman@47351
   353
  shows "T c c'"
huffman@47351
   354
  using assms by (auto dest: Quotient_cr_rel)
huffman@47351
   355
kuncar@47308
   356
subsection {* ML setup *}
kuncar@47308
   357
kuncar@47698
   358
use "Tools/Lifting/lifting_util.ML"
kuncar@47308
   359
kuncar@47308
   360
use "Tools/Lifting/lifting_info.ML"
kuncar@47308
   361
setup Lifting_Info.setup
kuncar@47308
   362
kuncar@47777
   363
declare fun_quotient[quot_map]
kuncar@47308
   364
kuncar@47308
   365
use "Tools/Lifting/lifting_term.ML"
kuncar@47308
   366
kuncar@47308
   367
use "Tools/Lifting/lifting_def.ML"
kuncar@47308
   368
kuncar@47308
   369
use "Tools/Lifting/lifting_setup.ML"
kuncar@47308
   370
kuncar@47308
   371
hide_const (open) invariant
kuncar@47308
   372
kuncar@47308
   373
end