src/HOL/Fun.thy
author nipkow
Thu Jul 07 12:39:17 2005 +0200 (2005-07-07)
changeset 16733 236dfafbeb63
parent 15691 900cf45ff0a6
child 16973 b2a894562b8f
permissions -rw-r--r--
linear arithmetic now takes "&" in assumptions apart.
     1 (*  Title:      HOL/Fun.thy
     2     ID:         $Id$
     3     Author:     Tobias Nipkow, Cambridge University Computer Laboratory
     4     Copyright   1994  University of Cambridge
     5 
     6 Notions about functions.
     7 *)
     8 
     9 theory Fun
    10 imports Typedef
    11 begin
    12 
    13 instance set :: (type) order
    14   by (intro_classes,
    15       (assumption | rule subset_refl subset_trans subset_antisym psubset_eq)+)
    16 
    17 constdefs
    18   fun_upd :: "('a => 'b) => 'a => 'b => ('a => 'b)"
    19    "fun_upd f a b == % x. if x=a then b else f x"
    20 
    21 nonterminals
    22   updbinds updbind
    23 syntax
    24   "_updbind" :: "['a, 'a] => updbind"             ("(2_ :=/ _)")
    25   ""         :: "updbind => updbinds"             ("_")
    26   "_updbinds":: "[updbind, updbinds] => updbinds" ("_,/ _")
    27   "_Update"  :: "['a, updbinds] => 'a"            ("_/'((_)')" [1000,0] 900)
    28 
    29 translations
    30   "_Update f (_updbinds b bs)"  == "_Update (_Update f b) bs"
    31   "f(x:=y)"                     == "fun_upd f x y"
    32 
    33 (* Hint: to define the sum of two functions (or maps), use sum_case.
    34          A nice infix syntax could be defined (in Datatype.thy or below) by
    35 consts
    36   fun_sum :: "('a => 'c) => ('b => 'c) => (('a+'b) => 'c)" (infixr "'(+')"80)
    37 translations
    38  "fun_sum" == sum_case
    39 *)
    40 
    41 constdefs
    42  override_on :: "('a => 'b) => ('a => 'b) => 'a set => ('a => 'b)"
    43 "override_on f g A == %a. if a : A then g a else f a"
    44 
    45  id :: "'a => 'a"
    46 "id == %x. x"
    47 
    48  comp :: "['b => 'c, 'a => 'b, 'a] => 'c"   (infixl "o" 55)
    49 "f o g == %x. f(g(x))"
    50 
    51 text{*compatibility*}
    52 lemmas o_def = comp_def
    53 
    54 syntax (xsymbols)
    55   comp :: "['b => 'c, 'a => 'b, 'a] => 'c"        (infixl "\<circ>" 55)
    56 syntax (HTML output)
    57   comp :: "['b => 'c, 'a => 'b, 'a] => 'c"        (infixl "\<circ>" 55)
    58 
    59 
    60 constdefs
    61   inj_on :: "['a => 'b, 'a set] => bool"         (*injective*)
    62     "inj_on f A == ! x:A. ! y:A. f(x)=f(y) --> x=y"
    63 
    64 text{*A common special case: functions injective over the entire domain type.*}
    65 syntax inj   :: "('a => 'b) => bool"
    66 translations
    67   "inj f" == "inj_on f UNIV"
    68 
    69 constdefs
    70   surj :: "('a => 'b) => bool"                   (*surjective*)
    71     "surj f == ! y. ? x. y=f(x)"
    72 
    73   bij :: "('a => 'b) => bool"                    (*bijective*)
    74     "bij f == inj f & surj f"
    75 
    76 
    77 
    78 text{*As a simplification rule, it replaces all function equalities by
    79   first-order equalities.*}
    80 lemma expand_fun_eq: "(f = g) = (! x. f(x)=g(x))"
    81 apply (rule iffI)
    82 apply (simp (no_asm_simp))
    83 apply (rule ext, simp (no_asm_simp))
    84 done
    85 
    86 lemma apply_inverse:
    87     "[| f(x)=u;  !!x. P(x) ==> g(f(x)) = x;  P(x) |] ==> x=g(u)"
    88 by auto
    89 
    90 
    91 text{*The Identity Function: @{term id}*}
    92 lemma id_apply [simp]: "id x = x"
    93 by (simp add: id_def)
    94 
    95 lemma inj_on_id[simp]: "inj_on id A"
    96 by (simp add: inj_on_def) 
    97 
    98 lemma inj_on_id2[simp]: "inj_on (%x. x) A"
    99 by (simp add: inj_on_def) 
   100 
   101 lemma surj_id[simp]: "surj id"
   102 by (simp add: surj_def) 
   103 
   104 lemma bij_id[simp]: "bij id"
   105 by (simp add: bij_def inj_on_id surj_id) 
   106 
   107 
   108 
   109 subsection{*The Composition Operator: @{term "f \<circ> g"}*}
   110 
   111 lemma o_apply [simp]: "(f o g) x = f (g x)"
   112 by (simp add: comp_def)
   113 
   114 lemma o_assoc: "f o (g o h) = f o g o h"
   115 by (simp add: comp_def)
   116 
   117 lemma id_o [simp]: "id o g = g"
   118 by (simp add: comp_def)
   119 
   120 lemma o_id [simp]: "f o id = f"
   121 by (simp add: comp_def)
   122 
   123 lemma image_compose: "(f o g) ` r = f`(g`r)"
   124 by (simp add: comp_def, blast)
   125 
   126 lemma image_eq_UN: "f`A = (UN x:A. {f x})"
   127 by blast
   128 
   129 lemma UN_o: "UNION A (g o f) = UNION (f`A) g"
   130 by (unfold comp_def, blast)
   131 
   132 
   133 subsection{*The Injectivity Predicate, @{term inj}*}
   134 
   135 text{*NB: @{term inj} now just translates to @{term inj_on}*}
   136 
   137 
   138 text{*For Proofs in @{text "Tools/datatype_rep_proofs"}*}
   139 lemma datatype_injI:
   140     "(!! x. ALL y. f(x) = f(y) --> x=y) ==> inj(f)"
   141 by (simp add: inj_on_def)
   142 
   143 theorem range_ex1_eq: "inj f \<Longrightarrow> b : range f = (EX! x. b = f x)"
   144   by (unfold inj_on_def, blast)
   145 
   146 lemma injD: "[| inj(f); f(x) = f(y) |] ==> x=y"
   147 by (simp add: inj_on_def)
   148 
   149 (*Useful with the simplifier*)
   150 lemma inj_eq: "inj(f) ==> (f(x) = f(y)) = (x=y)"
   151 by (force simp add: inj_on_def)
   152 
   153 
   154 subsection{*The Predicate @{term inj_on}: Injectivity On A Restricted Domain*}
   155 
   156 lemma inj_onI:
   157     "(!! x y. [|  x:A;  y:A;  f(x) = f(y) |] ==> x=y) ==> inj_on f A"
   158 by (simp add: inj_on_def)
   159 
   160 lemma inj_on_inverseI: "(!!x. x:A ==> g(f(x)) = x) ==> inj_on f A"
   161 by (auto dest:  arg_cong [of concl: g] simp add: inj_on_def)
   162 
   163 lemma inj_onD: "[| inj_on f A;  f(x)=f(y);  x:A;  y:A |] ==> x=y"
   164 by (unfold inj_on_def, blast)
   165 
   166 lemma inj_on_iff: "[| inj_on f A;  x:A;  y:A |] ==> (f(x)=f(y)) = (x=y)"
   167 by (blast dest!: inj_onD)
   168 
   169 lemma comp_inj_on:
   170      "[| inj_on f A;  inj_on g (f`A) |] ==> inj_on (g o f) A"
   171 by (simp add: comp_def inj_on_def)
   172 
   173 lemma inj_on_imageI: "inj_on (g o f) A \<Longrightarrow> inj_on g (f ` A)"
   174 apply(simp add:inj_on_def image_def)
   175 apply blast
   176 done
   177 
   178 lemma inj_on_image_iff: "\<lbrakk> ALL x:A. ALL y:A. (g(f x) = g(f y)) = (g x = g y);
   179   inj_on f A \<rbrakk> \<Longrightarrow> inj_on g (f ` A) = inj_on g A"
   180 apply(unfold inj_on_def)
   181 apply blast
   182 done
   183 
   184 lemma inj_on_contraD: "[| inj_on f A;  ~x=y;  x:A;  y:A |] ==> ~ f(x)=f(y)"
   185 by (unfold inj_on_def, blast)
   186 
   187 lemma inj_singleton: "inj (%s. {s})"
   188 by (simp add: inj_on_def)
   189 
   190 lemma inj_on_empty[iff]: "inj_on f {}"
   191 by(simp add: inj_on_def)
   192 
   193 lemma subset_inj_on: "[| inj_on f B; A <= B |] ==> inj_on f A"
   194 by (unfold inj_on_def, blast)
   195 
   196 lemma inj_on_Un:
   197  "inj_on f (A Un B) =
   198   (inj_on f A & inj_on f B & f`(A-B) Int f`(B-A) = {})"
   199 apply(unfold inj_on_def)
   200 apply (blast intro:sym)
   201 done
   202 
   203 lemma inj_on_insert[iff]:
   204   "inj_on f (insert a A) = (inj_on f A & f a ~: f`(A-{a}))"
   205 apply(unfold inj_on_def)
   206 apply (blast intro:sym)
   207 done
   208 
   209 lemma inj_on_diff: "inj_on f A ==> inj_on f (A-B)"
   210 apply(unfold inj_on_def)
   211 apply (blast)
   212 done
   213 
   214 
   215 subsection{*The Predicate @{term surj}: Surjectivity*}
   216 
   217 lemma surjI: "(!! x. g(f x) = x) ==> surj g"
   218 apply (simp add: surj_def)
   219 apply (blast intro: sym)
   220 done
   221 
   222 lemma surj_range: "surj f ==> range f = UNIV"
   223 by (auto simp add: surj_def)
   224 
   225 lemma surjD: "surj f ==> EX x. y = f x"
   226 by (simp add: surj_def)
   227 
   228 lemma surjE: "surj f ==> (!!x. y = f x ==> C) ==> C"
   229 by (simp add: surj_def, blast)
   230 
   231 lemma comp_surj: "[| surj f;  surj g |] ==> surj (g o f)"
   232 apply (simp add: comp_def surj_def, clarify)
   233 apply (drule_tac x = y in spec, clarify)
   234 apply (drule_tac x = x in spec, blast)
   235 done
   236 
   237 
   238 
   239 subsection{*The Predicate @{term bij}: Bijectivity*}
   240 
   241 lemma bijI: "[| inj f; surj f |] ==> bij f"
   242 by (simp add: bij_def)
   243 
   244 lemma bij_is_inj: "bij f ==> inj f"
   245 by (simp add: bij_def)
   246 
   247 lemma bij_is_surj: "bij f ==> surj f"
   248 by (simp add: bij_def)
   249 
   250 
   251 subsection{*Facts About the Identity Function*}
   252 
   253 text{*We seem to need both the @{term id} forms and the @{term "\<lambda>x. x"}
   254 forms. The latter can arise by rewriting, while @{term id} may be used
   255 explicitly.*}
   256 
   257 lemma image_ident [simp]: "(%x. x) ` Y = Y"
   258 by blast
   259 
   260 lemma image_id [simp]: "id ` Y = Y"
   261 by (simp add: id_def)
   262 
   263 lemma vimage_ident [simp]: "(%x. x) -` Y = Y"
   264 by blast
   265 
   266 lemma vimage_id [simp]: "id -` A = A"
   267 by (simp add: id_def)
   268 
   269 lemma vimage_image_eq: "f -` (f ` A) = {y. EX x:A. f x = f y}"
   270 by (blast intro: sym)
   271 
   272 lemma image_vimage_subset: "f ` (f -` A) <= A"
   273 by blast
   274 
   275 lemma image_vimage_eq [simp]: "f ` (f -` A) = A Int range f"
   276 by blast
   277 
   278 lemma surj_image_vimage_eq: "surj f ==> f ` (f -` A) = A"
   279 by (simp add: surj_range)
   280 
   281 lemma inj_vimage_image_eq: "inj f ==> f -` (f ` A) = A"
   282 by (simp add: inj_on_def, blast)
   283 
   284 lemma vimage_subsetD: "surj f ==> f -` B <= A ==> B <= f ` A"
   285 apply (unfold surj_def)
   286 apply (blast intro: sym)
   287 done
   288 
   289 lemma vimage_subsetI: "inj f ==> B <= f ` A ==> f -` B <= A"
   290 by (unfold inj_on_def, blast)
   291 
   292 lemma vimage_subset_eq: "bij f ==> (f -` B <= A) = (B <= f ` A)"
   293 apply (unfold bij_def)
   294 apply (blast del: subsetI intro: vimage_subsetI vimage_subsetD)
   295 done
   296 
   297 lemma image_Int_subset: "f`(A Int B) <= f`A Int f`B"
   298 by blast
   299 
   300 lemma image_diff_subset: "f`A - f`B <= f`(A - B)"
   301 by blast
   302 
   303 lemma inj_on_image_Int:
   304    "[| inj_on f C;  A<=C;  B<=C |] ==> f`(A Int B) = f`A Int f`B"
   305 apply (simp add: inj_on_def, blast)
   306 done
   307 
   308 lemma inj_on_image_set_diff:
   309    "[| inj_on f C;  A<=C;  B<=C |] ==> f`(A-B) = f`A - f`B"
   310 apply (simp add: inj_on_def, blast)
   311 done
   312 
   313 lemma image_Int: "inj f ==> f`(A Int B) = f`A Int f`B"
   314 by (simp add: inj_on_def, blast)
   315 
   316 lemma image_set_diff: "inj f ==> f`(A-B) = f`A - f`B"
   317 by (simp add: inj_on_def, blast)
   318 
   319 lemma inj_image_mem_iff: "inj f ==> (f a : f`A) = (a : A)"
   320 by (blast dest: injD)
   321 
   322 lemma inj_image_subset_iff: "inj f ==> (f`A <= f`B) = (A<=B)"
   323 by (simp add: inj_on_def, blast)
   324 
   325 lemma inj_image_eq_iff: "inj f ==> (f`A = f`B) = (A = B)"
   326 by (blast dest: injD)
   327 
   328 lemma image_UN: "(f ` (UNION A B)) = (UN x:A.(f ` (B x)))"
   329 by blast
   330 
   331 (*injectivity's required.  Left-to-right inclusion holds even if A is empty*)
   332 lemma image_INT:
   333    "[| inj_on f C;  ALL x:A. B x <= C;  j:A |]
   334     ==> f ` (INTER A B) = (INT x:A. f ` B x)"
   335 apply (simp add: inj_on_def, blast)
   336 done
   337 
   338 (*Compare with image_INT: no use of inj_on, and if f is surjective then
   339   it doesn't matter whether A is empty*)
   340 lemma bij_image_INT: "bij f ==> f ` (INTER A B) = (INT x:A. f ` B x)"
   341 apply (simp add: bij_def)
   342 apply (simp add: inj_on_def surj_def, blast)
   343 done
   344 
   345 lemma surj_Compl_image_subset: "surj f ==> -(f`A) <= f`(-A)"
   346 by (auto simp add: surj_def)
   347 
   348 lemma inj_image_Compl_subset: "inj f ==> f`(-A) <= -(f`A)"
   349 by (auto simp add: inj_on_def)
   350 
   351 lemma bij_image_Compl_eq: "bij f ==> f`(-A) = -(f`A)"
   352 apply (simp add: bij_def)
   353 apply (rule equalityI)
   354 apply (simp_all (no_asm_simp) add: inj_image_Compl_subset surj_Compl_image_subset)
   355 done
   356 
   357 
   358 subsection{*Function Updating*}
   359 
   360 lemma fun_upd_idem_iff: "(f(x:=y) = f) = (f x = y)"
   361 apply (simp add: fun_upd_def, safe)
   362 apply (erule subst)
   363 apply (rule_tac [2] ext, auto)
   364 done
   365 
   366 (* f x = y ==> f(x:=y) = f *)
   367 lemmas fun_upd_idem = fun_upd_idem_iff [THEN iffD2, standard]
   368 
   369 (* f(x := f x) = f *)
   370 declare refl [THEN fun_upd_idem, iff]
   371 
   372 lemma fun_upd_apply [simp]: "(f(x:=y))z = (if z=x then y else f z)"
   373 apply (simp (no_asm) add: fun_upd_def)
   374 done
   375 
   376 (* fun_upd_apply supersedes these two,   but they are useful
   377    if fun_upd_apply is intentionally removed from the simpset *)
   378 lemma fun_upd_same: "(f(x:=y)) x = y"
   379 by simp
   380 
   381 lemma fun_upd_other: "z~=x ==> (f(x:=y)) z = f z"
   382 by simp
   383 
   384 lemma fun_upd_upd [simp]: "f(x:=y,x:=z) = f(x:=z)"
   385 by (simp add: expand_fun_eq)
   386 
   387 lemma fun_upd_twist: "a ~= c ==> (m(a:=b))(c:=d) = (m(c:=d))(a:=b)"
   388 by (rule ext, auto)
   389 
   390 lemma inj_on_fun_updI: "\<lbrakk> inj_on f A; y \<notin> f`A \<rbrakk> \<Longrightarrow> inj_on (f(x:=y)) A"
   391 by(fastsimp simp:inj_on_def image_def)
   392 
   393 lemma fun_upd_image:
   394      "f(x:=y) ` A = (if x \<in> A then insert y (f ` (A-{x})) else f ` A)"
   395 by auto
   396 
   397 subsection{* @{text override_on} *}
   398 
   399 lemma override_on_emptyset[simp]: "override_on f g {} = f"
   400 by(simp add:override_on_def)
   401 
   402 lemma override_on_apply_notin[simp]: "a ~: A ==> (override_on f g A) a = f a"
   403 by(simp add:override_on_def)
   404 
   405 lemma override_on_apply_in[simp]: "a : A ==> (override_on f g A) a = g a"
   406 by(simp add:override_on_def)
   407 
   408 subsection{* swap *}
   409 
   410 constdefs
   411   swap :: "['a, 'a, 'a => 'b] => ('a => 'b)"
   412    "swap a b f == f(a := f b, b:= f a)"
   413 
   414 lemma swap_self: "swap a a f = f"
   415 by (simp add: swap_def)
   416 
   417 lemma swap_commute: "swap a b f = swap b a f"
   418 by (rule ext, simp add: fun_upd_def swap_def)
   419 
   420 lemma swap_nilpotent [simp]: "swap a b (swap a b f) = f"
   421 by (rule ext, simp add: fun_upd_def swap_def)
   422 
   423 lemma inj_on_imp_inj_on_swap:
   424      "[|inj_on f A; a \<in> A; b \<in> A|] ==> inj_on (swap a b f) A"
   425 by (simp add: inj_on_def swap_def, blast)
   426 
   427 lemma inj_on_swap_iff [simp]:
   428   assumes A: "a \<in> A" "b \<in> A" shows "inj_on (swap a b f) A = inj_on f A"
   429 proof 
   430   assume "inj_on (swap a b f) A"
   431   with A have "inj_on (swap a b (swap a b f)) A" 
   432     by (rules intro: inj_on_imp_inj_on_swap) 
   433   thus "inj_on f A" by simp 
   434 next
   435   assume "inj_on f A"
   436   with A show "inj_on (swap a b f) A" by (rules intro: inj_on_imp_inj_on_swap)
   437 qed
   438 
   439 lemma surj_imp_surj_swap: "surj f ==> surj (swap a b f)"
   440 apply (simp add: surj_def swap_def, clarify)
   441 apply (rule_tac P = "y = f b" in case_split_thm, blast)
   442 apply (rule_tac P = "y = f a" in case_split_thm, auto)
   443   --{*We don't yet have @{text case_tac}*}
   444 done
   445 
   446 lemma surj_swap_iff [simp]: "surj (swap a b f) = surj f"
   447 proof 
   448   assume "surj (swap a b f)"
   449   hence "surj (swap a b (swap a b f))" by (rule surj_imp_surj_swap) 
   450   thus "surj f" by simp 
   451 next
   452   assume "surj f"
   453   thus "surj (swap a b f)" by (rule surj_imp_surj_swap) 
   454 qed
   455 
   456 lemma bij_swap_iff: "bij (swap a b f) = bij f"
   457 by (simp add: bij_def)
   458  
   459 
   460 text{*The ML section includes some compatibility bindings and a simproc
   461 for function updates, in addition to the usual ML-bindings of theorems.*}
   462 ML
   463 {*
   464 val id_def = thm "id_def";
   465 val inj_on_def = thm "inj_on_def";
   466 val surj_def = thm "surj_def";
   467 val bij_def = thm "bij_def";
   468 val fun_upd_def = thm "fun_upd_def";
   469 
   470 val o_def = thm "comp_def";
   471 val injI = thm "inj_onI";
   472 val inj_inverseI = thm "inj_on_inverseI";
   473 val set_cs = claset() delrules [equalityI];
   474 
   475 val print_translation = [("Pi", dependent_tr' ("@Pi", "op funcset"))];
   476 
   477 (* simplifies terms of the form f(...,x:=y,...,x:=z,...) to f(...,x:=z,...) *)
   478 local
   479   fun gen_fun_upd NONE T _ _ = NONE
   480     | gen_fun_upd (SOME f) T x y = SOME (Const ("Fun.fun_upd",T) $ f $ x $ y)
   481   fun dest_fun_T1 (Type (_, T :: Ts)) = T
   482   fun find_double (t as Const ("Fun.fun_upd",T) $ f $ x $ y) =
   483     let
   484       fun find (Const ("Fun.fun_upd",T) $ g $ v $ w) =
   485             if v aconv x then SOME g else gen_fun_upd (find g) T v w
   486         | find t = NONE
   487     in (dest_fun_T1 T, gen_fun_upd (find f) T x y) end
   488 
   489   val ss = simpset ()
   490   val fun_upd_prover = K (rtac eq_reflection 1 THEN rtac ext 1 THEN simp_tac ss 1)
   491 in
   492   val fun_upd2_simproc =
   493     Simplifier.simproc (Theory.sign_of (the_context ()))
   494       "fun_upd2" ["f(v := w, x := y)"]
   495       (fn sg => fn _ => fn t =>
   496         case find_double t of (T, NONE) => NONE
   497         | (T, SOME rhs) => SOME (Tactic.prove sg [] [] (Term.equals T $ t $ rhs) fun_upd_prover))
   498 end;
   499 Addsimprocs[fun_upd2_simproc];
   500 
   501 val expand_fun_eq = thm "expand_fun_eq";
   502 val apply_inverse = thm "apply_inverse";
   503 val id_apply = thm "id_apply";
   504 val o_apply = thm "o_apply";
   505 val o_assoc = thm "o_assoc";
   506 val id_o = thm "id_o";
   507 val o_id = thm "o_id";
   508 val image_compose = thm "image_compose";
   509 val image_eq_UN = thm "image_eq_UN";
   510 val UN_o = thm "UN_o";
   511 val datatype_injI = thm "datatype_injI";
   512 val injD = thm "injD";
   513 val inj_eq = thm "inj_eq";
   514 val inj_onI = thm "inj_onI";
   515 val inj_on_inverseI = thm "inj_on_inverseI";
   516 val inj_onD = thm "inj_onD";
   517 val inj_on_iff = thm "inj_on_iff";
   518 val comp_inj_on = thm "comp_inj_on";
   519 val inj_on_contraD = thm "inj_on_contraD";
   520 val inj_singleton = thm "inj_singleton";
   521 val subset_inj_on = thm "subset_inj_on";
   522 val surjI = thm "surjI";
   523 val surj_range = thm "surj_range";
   524 val surjD = thm "surjD";
   525 val surjE = thm "surjE";
   526 val comp_surj = thm "comp_surj";
   527 val bijI = thm "bijI";
   528 val bij_is_inj = thm "bij_is_inj";
   529 val bij_is_surj = thm "bij_is_surj";
   530 val image_ident = thm "image_ident";
   531 val image_id = thm "image_id";
   532 val vimage_ident = thm "vimage_ident";
   533 val vimage_id = thm "vimage_id";
   534 val vimage_image_eq = thm "vimage_image_eq";
   535 val image_vimage_subset = thm "image_vimage_subset";
   536 val image_vimage_eq = thm "image_vimage_eq";
   537 val surj_image_vimage_eq = thm "surj_image_vimage_eq";
   538 val inj_vimage_image_eq = thm "inj_vimage_image_eq";
   539 val vimage_subsetD = thm "vimage_subsetD";
   540 val vimage_subsetI = thm "vimage_subsetI";
   541 val vimage_subset_eq = thm "vimage_subset_eq";
   542 val image_Int_subset = thm "image_Int_subset";
   543 val image_diff_subset = thm "image_diff_subset";
   544 val inj_on_image_Int = thm "inj_on_image_Int";
   545 val inj_on_image_set_diff = thm "inj_on_image_set_diff";
   546 val image_Int = thm "image_Int";
   547 val image_set_diff = thm "image_set_diff";
   548 val inj_image_mem_iff = thm "inj_image_mem_iff";
   549 val inj_image_subset_iff = thm "inj_image_subset_iff";
   550 val inj_image_eq_iff = thm "inj_image_eq_iff";
   551 val image_UN = thm "image_UN";
   552 val image_INT = thm "image_INT";
   553 val bij_image_INT = thm "bij_image_INT";
   554 val surj_Compl_image_subset = thm "surj_Compl_image_subset";
   555 val inj_image_Compl_subset = thm "inj_image_Compl_subset";
   556 val bij_image_Compl_eq = thm "bij_image_Compl_eq";
   557 val fun_upd_idem_iff = thm "fun_upd_idem_iff";
   558 val fun_upd_idem = thm "fun_upd_idem";
   559 val fun_upd_apply = thm "fun_upd_apply";
   560 val fun_upd_same = thm "fun_upd_same";
   561 val fun_upd_other = thm "fun_upd_other";
   562 val fun_upd_upd = thm "fun_upd_upd";
   563 val fun_upd_twist = thm "fun_upd_twist";
   564 val range_ex1_eq = thm "range_ex1_eq";
   565 *}
   566 
   567 end