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