src/HOL/Fun.thy
changeset 13585 db4005b40cc6
parent 12460 624a8cd51b4e
child 13637 02aa63636ab8
     1.1 --- a/src/HOL/Fun.thy	Thu Sep 26 10:43:43 2002 +0200
     1.2 +++ b/src/HOL/Fun.thy	Thu Sep 26 10:51:29 2002 +0200
     1.3 @@ -6,94 +6,447 @@
     1.4  Notions about functions.
     1.5  *)
     1.6  
     1.7 -Fun = Typedef +
     1.8 +theory Fun = Typedef:
     1.9  
    1.10  instance set :: (type) order
    1.11 -                       (subset_refl,subset_trans,subset_antisym,psubset_eq)
    1.12 -consts
    1.13 -  fun_upd  :: "('a => 'b) => 'a => 'b => ('a => 'b)"
    1.14 +  by (intro_classes,
    1.15 +      (assumption | rule subset_refl subset_trans subset_antisym psubset_eq)+)
    1.16 +
    1.17 +constdefs
    1.18 +  fun_upd :: "('a => 'b) => 'a => 'b => ('a => 'b)"
    1.19 +   "fun_upd f a b == % x. if x=a then b else f x"
    1.20  
    1.21  nonterminals
    1.22    updbinds updbind
    1.23  syntax
    1.24 -  "_updbind"       :: ['a, 'a] => updbind             ("(2_ :=/ _)")
    1.25 -  ""               :: updbind => updbinds             ("_")
    1.26 -  "_updbinds"      :: [updbind, updbinds] => updbinds ("_,/ _")
    1.27 -  "_Update"        :: ['a, updbinds] => 'a            ("_/'((_)')" [1000,0] 900)
    1.28 +  "_updbind" :: "['a, 'a] => updbind"             ("(2_ :=/ _)")
    1.29 +  ""         :: "updbind => updbinds"             ("_")
    1.30 +  "_updbinds":: "[updbind, updbinds] => updbinds" ("_,/ _")
    1.31 +  "_Update"  :: "['a, updbinds] => 'a"            ("_/'((_)')" [1000,0] 900)
    1.32  
    1.33  translations
    1.34    "_Update f (_updbinds b bs)"  == "_Update (_Update f b) bs"
    1.35    "f(x:=y)"                     == "fun_upd f x y"
    1.36  
    1.37 -defs
    1.38 -  fun_upd_def "f(a:=b) == % x. if x=a then b else f x"
    1.39 -
    1.40  (* Hint: to define the sum of two functions (or maps), use sum_case.
    1.41           A nice infix syntax could be defined (in Datatype.thy or below) by
    1.42  consts
    1.43    fun_sum :: "('a => 'c) => ('b => 'c) => (('a+'b) => 'c)" (infixr "'(+')"80)
    1.44  translations
    1.45 - "fun_sum" == "sum_case"
    1.46 + "fun_sum" == sum_case
    1.47  *)
    1.48  
    1.49  constdefs
    1.50 -  id ::  'a => 'a
    1.51 +  id :: "'a => 'a"
    1.52      "id == %x. x"
    1.53  
    1.54 -  o  :: ['b => 'c, 'a => 'b, 'a] => 'c   (infixl 55)
    1.55 +  comp :: "['b => 'c, 'a => 'b, 'a] => 'c"   (infixl "o" 55)
    1.56      "f o g == %x. f(g(x))"
    1.57  
    1.58 -  inj_on :: ['a => 'b, 'a set] => bool
    1.59 -    "inj_on f A == ! x:A. ! y:A. f(x)=f(y) --> x=y"
    1.60 +text{*compatibility*}
    1.61 +lemmas o_def = comp_def
    1.62  
    1.63  syntax (xsymbols)
    1.64 -  "op o"        :: "['b => 'c, 'a => 'b, 'a] => 'c"      (infixl "\\<circ>" 55)
    1.65 +  comp :: "['b => 'c, 'a => 'b, 'a] => 'c"        (infixl "\<circ>" 55)
    1.66 +
    1.67  
    1.68 -syntax
    1.69 -  inj   :: ('a => 'b) => bool                   (*injective*)
    1.70 +constdefs
    1.71 +  inj_on :: "['a => 'b, 'a set] => bool"         (*injective*)
    1.72 +    "inj_on f A == ! x:A. ! y:A. f(x)=f(y) --> x=y"
    1.73  
    1.74 +text{*A common special case: functions injective over the entire domain type.*}
    1.75 +syntax inj   :: "('a => 'b) => bool"
    1.76  translations
    1.77    "inj f" == "inj_on f UNIV"
    1.78  
    1.79  constdefs
    1.80 -  surj :: ('a => 'b) => bool                   (*surjective*)
    1.81 +  surj :: "('a => 'b) => bool"                   (*surjective*)
    1.82      "surj f == ! y. ? x. y=f(x)"
    1.83  
    1.84 -  bij :: ('a => 'b) => bool                    (*bijective*)
    1.85 +  bij :: "('a => 'b) => bool"                    (*bijective*)
    1.86      "bij f == inj f & surj f"
    1.87  
    1.88  
    1.89 -(*The Pi-operator, by Florian Kammueller*)
    1.90 +
    1.91 +text{*As a simplification rule, it replaces all function equalities by
    1.92 +  first-order equalities.*}
    1.93 +lemma expand_fun_eq: "(f = g) = (! x. f(x)=g(x))"
    1.94 +apply (rule iffI)
    1.95 +apply (simp (no_asm_simp))
    1.96 +apply (rule ext, simp (no_asm_simp))
    1.97 +done
    1.98 +
    1.99 +lemma apply_inverse:
   1.100 +    "[| f(x)=u;  !!x. P(x) ==> g(f(x)) = x;  P(x) |] ==> x=g(u)"
   1.101 +by auto
   1.102 +
   1.103 +
   1.104 +text{*The Identity Function: @{term id}*}
   1.105 +lemma id_apply [simp]: "id x = x"
   1.106 +by (simp add: id_def)
   1.107 +
   1.108 +
   1.109 +subsection{*The Composition Operator: @{term "f \<circ> g"}*}
   1.110 +
   1.111 +lemma o_apply [simp]: "(f o g) x = f (g x)"
   1.112 +by (simp add: comp_def)
   1.113 +
   1.114 +lemma o_assoc: "f o (g o h) = f o g o h"
   1.115 +by (simp add: comp_def)
   1.116 +
   1.117 +lemma id_o [simp]: "id o g = g"
   1.118 +by (simp add: comp_def)
   1.119 +
   1.120 +lemma o_id [simp]: "f o id = f"
   1.121 +by (simp add: comp_def)
   1.122 +
   1.123 +lemma image_compose: "(f o g) ` r = f`(g`r)"
   1.124 +by (simp add: comp_def, blast)
   1.125 +
   1.126 +lemma image_eq_UN: "f`A = (UN x:A. {f x})"
   1.127 +by blast
   1.128 +
   1.129 +lemma UN_o: "UNION A (g o f) = UNION (f`A) g"
   1.130 +by (unfold comp_def, blast)
   1.131 +
   1.132 +text{*Lemma for proving injectivity of representation functions for
   1.133 +datatypes involving function types*}
   1.134 +lemma inj_fun_lemma:
   1.135 +  "[| ! x y. g (f x) = g y --> f x = y; g o f = g o fa |] ==> f = fa"
   1.136 +by (simp add: comp_def expand_fun_eq)
   1.137 +
   1.138 +
   1.139 +subsection{*The Injectivity Predicate, @{term inj}*}
   1.140 +
   1.141 +text{*NB: @{term inj} now just translates to @{term inj_on}*}
   1.142 +
   1.143 +
   1.144 +text{*For Proofs in @{text "Tools/datatype_rep_proofs"}*}
   1.145 +lemma datatype_injI:
   1.146 +    "(!! x. ALL y. f(x) = f(y) --> x=y) ==> inj(f)"
   1.147 +by (simp add: inj_on_def)
   1.148 +
   1.149 +lemma injD: "[| inj(f); f(x) = f(y) |] ==> x=y"
   1.150 +by (simp add: inj_on_def)
   1.151 +
   1.152 +(*Useful with the simplifier*)
   1.153 +lemma inj_eq: "inj(f) ==> (f(x) = f(y)) = (x=y)"
   1.154 +by (force simp add: inj_on_def)
   1.155 +
   1.156 +lemma inj_o: "[| inj f; f o g = f o h |] ==> g = h"
   1.157 +by (simp add: comp_def inj_on_def expand_fun_eq)
   1.158 +
   1.159 +
   1.160 +subsection{*The Predicate @{term inj_on}: Injectivity On A Restricted Domain*}
   1.161 +
   1.162 +lemma inj_onI:
   1.163 +    "(!! x y. [|  x:A;  y:A;  f(x) = f(y) |] ==> x=y) ==> inj_on f A"
   1.164 +by (simp add: inj_on_def)
   1.165 +
   1.166 +lemma inj_on_inverseI: "(!!x. x:A ==> g(f(x)) = x) ==> inj_on f A"
   1.167 +by (auto dest:  arg_cong [of concl: g] simp add: inj_on_def)
   1.168 +
   1.169 +lemma inj_onD: "[| inj_on f A;  f(x)=f(y);  x:A;  y:A |] ==> x=y"
   1.170 +by (unfold inj_on_def, blast)
   1.171 +
   1.172 +lemma inj_on_iff: "[| inj_on f A;  x:A;  y:A |] ==> (f(x)=f(y)) = (x=y)"
   1.173 +by (blast dest!: inj_onD)
   1.174 +
   1.175 +lemma comp_inj_on:
   1.176 +     "[| inj_on f A;  inj_on g (f`A) |] ==> inj_on (g o f) A"
   1.177 +by (simp add: comp_def inj_on_def)
   1.178 +
   1.179 +lemma inj_on_contraD: "[| inj_on f A;  ~x=y;  x:A;  y:A |] ==> ~ f(x)=f(y)"
   1.180 +by (unfold inj_on_def, blast)
   1.181  
   1.182 -constdefs
   1.183 -  Pi      :: "['a set, 'a => 'b set] => ('a => 'b) set"
   1.184 -    "Pi A B == {f. ! x. if x:A then f(x) : B(x) else f(x) = arbitrary}"
   1.185 +lemma inj_singleton: "inj (%s. {s})"
   1.186 +by (simp add: inj_on_def)
   1.187 +
   1.188 +lemma subset_inj_on: "[| A<=B; inj_on f B |] ==> inj_on f A"
   1.189 +by (unfold inj_on_def, blast)
   1.190 +
   1.191 +
   1.192 +subsection{*The Predicate @{term surj}: Surjectivity*}
   1.193 +
   1.194 +lemma surjI: "(!! x. g(f x) = x) ==> surj g"
   1.195 +apply (simp add: surj_def)
   1.196 +apply (blast intro: sym)
   1.197 +done
   1.198 +
   1.199 +lemma surj_range: "surj f ==> range f = UNIV"
   1.200 +by (auto simp add: surj_def)
   1.201 +
   1.202 +lemma surjD: "surj f ==> EX x. y = f x"
   1.203 +by (simp add: surj_def)
   1.204 +
   1.205 +lemma surjE: "surj f ==> (!!x. y = f x ==> C) ==> C"
   1.206 +by (simp add: surj_def, blast)
   1.207 +
   1.208 +lemma comp_surj: "[| surj f;  surj g |] ==> surj (g o f)"
   1.209 +apply (simp add: comp_def surj_def, clarify)
   1.210 +apply (drule_tac x = y in spec, clarify)
   1.211 +apply (drule_tac x = x in spec, blast)
   1.212 +done
   1.213 +
   1.214 +
   1.215 +
   1.216 +subsection{*The Predicate @{term bij}: Bijectivity*}
   1.217 +
   1.218 +lemma bijI: "[| inj f; surj f |] ==> bij f"
   1.219 +by (simp add: bij_def)
   1.220 +
   1.221 +lemma bij_is_inj: "bij f ==> inj f"
   1.222 +by (simp add: bij_def)
   1.223 +
   1.224 +lemma bij_is_surj: "bij f ==> surj f"
   1.225 +by (simp add: bij_def)
   1.226 +
   1.227 +
   1.228 +subsection{*Facts About the Identity Function*}
   1.229  
   1.230 -  restrict :: "['a => 'b, 'a set] => ('a => 'b)"
   1.231 -    "restrict f A == (%x. if x : A then f x else arbitrary)"
   1.232 +text{*We seem to need both the @{term id} forms and the @{term "\<lambda>x. x"}
   1.233 +forms. The latter can arise by rewriting, while @{term id} may be used
   1.234 +explicitly.*}
   1.235 +
   1.236 +lemma image_ident [simp]: "(%x. x) ` Y = Y"
   1.237 +by blast
   1.238 +
   1.239 +lemma image_id [simp]: "id ` Y = Y"
   1.240 +by (simp add: id_def)
   1.241 +
   1.242 +lemma vimage_ident [simp]: "(%x. x) -` Y = Y"
   1.243 +by blast
   1.244 +
   1.245 +lemma vimage_id [simp]: "id -` A = A"
   1.246 +by (simp add: id_def)
   1.247 +
   1.248 +lemma vimage_image_eq: "f -` (f ` A) = {y. EX x:A. f x = f y}"
   1.249 +by (blast intro: sym)
   1.250 +
   1.251 +lemma image_vimage_subset: "f ` (f -` A) <= A"
   1.252 +by blast
   1.253 +
   1.254 +lemma image_vimage_eq [simp]: "f ` (f -` A) = A Int range f"
   1.255 +by blast
   1.256 +
   1.257 +lemma surj_image_vimage_eq: "surj f ==> f ` (f -` A) = A"
   1.258 +by (simp add: surj_range)
   1.259 +
   1.260 +lemma inj_vimage_image_eq: "inj f ==> f -` (f ` A) = A"
   1.261 +by (simp add: inj_on_def, blast)
   1.262 +
   1.263 +lemma vimage_subsetD: "surj f ==> f -` B <= A ==> B <= f ` A"
   1.264 +apply (unfold surj_def)
   1.265 +apply (blast intro: sym)
   1.266 +done
   1.267 +
   1.268 +lemma vimage_subsetI: "inj f ==> B <= f ` A ==> f -` B <= A"
   1.269 +by (unfold inj_on_def, blast)
   1.270 +
   1.271 +lemma vimage_subset_eq: "bij f ==> (f -` B <= A) = (B <= f ` A)"
   1.272 +apply (unfold bij_def)
   1.273 +apply (blast del: subsetI intro: vimage_subsetI vimage_subsetD)
   1.274 +done
   1.275 +
   1.276 +lemma image_Int_subset: "f`(A Int B) <= f`A Int f`B"
   1.277 +by blast
   1.278 +
   1.279 +lemma image_diff_subset: "f`A - f`B <= f`(A - B)"
   1.280 +by blast
   1.281  
   1.282 -syntax
   1.283 -  "@Pi"  :: "[pttrn, 'a set, 'b set] => ('a => 'b) set"  ("(3PI _:_./ _)" 10)
   1.284 -  funcset :: "['a set, 'b set] => ('a => 'b) set"      (infixr 60)
   1.285 -  "@lam" :: "[pttrn, 'a set, 'a => 'b] => ('a => 'b)"  ("(3%_:_./ _)" [0, 0, 3] 3)
   1.286 -syntax (xsymbols)
   1.287 -  "@lam" :: "[pttrn, 'a set, 'a => 'b] => ('a => 'b)"  ("(3\\<lambda>_\\<in>_./ _)" [0, 0, 3] 3)
   1.288 +lemma inj_on_image_Int:
   1.289 +   "[| inj_on f C;  A<=C;  B<=C |] ==> f`(A Int B) = f`A Int f`B"
   1.290 +apply (simp add: inj_on_def, blast)
   1.291 +done
   1.292 +
   1.293 +lemma inj_on_image_set_diff:
   1.294 +   "[| inj_on f C;  A<=C;  B<=C |] ==> f`(A-B) = f`A - f`B"
   1.295 +apply (simp add: inj_on_def, blast)
   1.296 +done
   1.297 +
   1.298 +lemma image_Int: "inj f ==> f`(A Int B) = f`A Int f`B"
   1.299 +by (simp add: inj_on_def, blast)
   1.300 +
   1.301 +lemma image_set_diff: "inj f ==> f`(A-B) = f`A - f`B"
   1.302 +by (simp add: inj_on_def, blast)
   1.303 +
   1.304 +lemma inj_image_mem_iff: "inj f ==> (f a : f`A) = (a : A)"
   1.305 +by (blast dest: injD)
   1.306 +
   1.307 +lemma inj_image_subset_iff: "inj f ==> (f`A <= f`B) = (A<=B)"
   1.308 +by (simp add: inj_on_def, blast)
   1.309 +
   1.310 +lemma inj_image_eq_iff: "inj f ==> (f`A = f`B) = (A = B)"
   1.311 +by (blast dest: injD)
   1.312 +
   1.313 +lemma image_UN: "(f ` (UNION A B)) = (UN x:A.(f ` (B x)))"
   1.314 +by blast
   1.315 +
   1.316 +(*injectivity's required.  Left-to-right inclusion holds even if A is empty*)
   1.317 +lemma image_INT:
   1.318 +   "[| inj_on f C;  ALL x:A. B x <= C;  j:A |]
   1.319 +    ==> f ` (INTER A B) = (INT x:A. f ` B x)"
   1.320 +apply (simp add: inj_on_def, blast)
   1.321 +done
   1.322 +
   1.323 +(*Compare with image_INT: no use of inj_on, and if f is surjective then
   1.324 +  it doesn't matter whether A is empty*)
   1.325 +lemma bij_image_INT: "bij f ==> f ` (INTER A B) = (INT x:A. f ` B x)"
   1.326 +apply (simp add: bij_def)
   1.327 +apply (simp add: inj_on_def surj_def, blast)
   1.328 +done
   1.329 +
   1.330 +lemma surj_Compl_image_subset: "surj f ==> -(f`A) <= f`(-A)"
   1.331 +by (auto simp add: surj_def)
   1.332 +
   1.333 +lemma inj_image_Compl_subset: "inj f ==> f`(-A) <= -(f`A)"
   1.334 +by (auto simp add: inj_on_def)
   1.335  
   1.336 -  (*Giving funcset an arrow syntax (-> or =>) clashes with many existing theories*)
   1.337 +lemma bij_image_Compl_eq: "bij f ==> f`(-A) = -(f`A)"
   1.338 +apply (simp add: bij_def)
   1.339 +apply (rule equalityI)
   1.340 +apply (simp_all (no_asm_simp) add: inj_image_Compl_subset surj_Compl_image_subset)
   1.341 +done
   1.342 +
   1.343 +
   1.344 +subsection{*Function Updating*}
   1.345 +
   1.346 +lemma fun_upd_idem_iff: "(f(x:=y) = f) = (f x = y)"
   1.347 +apply (simp add: fun_upd_def, safe)
   1.348 +apply (erule subst)
   1.349 +apply (rule_tac [2] ext, auto)
   1.350 +done
   1.351 +
   1.352 +(* f x = y ==> f(x:=y) = f *)
   1.353 +lemmas fun_upd_idem = fun_upd_idem_iff [THEN iffD2, standard]
   1.354 +
   1.355 +(* f(x := f x) = f *)
   1.356 +declare refl [THEN fun_upd_idem, iff]
   1.357 +
   1.358 +lemma fun_upd_apply [simp]: "(f(x:=y))z = (if z=x then y else f z)"
   1.359 +apply (simp (no_asm) add: fun_upd_def)
   1.360 +done
   1.361 +
   1.362 +(* fun_upd_apply supersedes these two,   but they are useful
   1.363 +   if fun_upd_apply is intentionally removed from the simpset *)
   1.364 +lemma fun_upd_same: "(f(x:=y)) x = y"
   1.365 +by simp
   1.366 +
   1.367 +lemma fun_upd_other: "z~=x ==> (f(x:=y)) z = f z"
   1.368 +by simp
   1.369 +
   1.370 +lemma fun_upd_upd [simp]: "f(x:=y,x:=z) = f(x:=z)"
   1.371 +by (simp add: expand_fun_eq)
   1.372 +
   1.373 +lemma fun_upd_twist: "a ~= c ==> (m(a:=b))(c:=d) = (m(c:=d))(a:=b)"
   1.374 +by (rule ext, auto)
   1.375 +
   1.376 +text{*The ML section includes some compatibility bindings and a simproc
   1.377 +for function updates, in addition to the usual ML-bindings of theorems.*}
   1.378 +ML
   1.379 +{*
   1.380 +val id_def = thm "id_def";
   1.381 +val inj_on_def = thm "inj_on_def";
   1.382 +val surj_def = thm "surj_def";
   1.383 +val bij_def = thm "bij_def";
   1.384 +val fun_upd_def = thm "fun_upd_def";
   1.385  
   1.386 -syntax (xsymbols)
   1.387 -  "@Pi" :: "[pttrn, 'a set, 'b set] => ('a => 'b) set"  ("(3\\<Pi> _\\<in>_./ _)"   10)
   1.388 +val o_def = thm "comp_def";
   1.389 +val injI = thm "inj_onI";
   1.390 +val inj_inverseI = thm "inj_on_inverseI";
   1.391 +val set_cs = claset() delrules [equalityI];
   1.392 +
   1.393 +val print_translation = [("Pi", dependent_tr' ("@Pi", "op funcset"))];
   1.394 +
   1.395 +(* simplifies terms of the form f(...,x:=y,...,x:=z,...) to f(...,x:=z,...) *)
   1.396 +local
   1.397 +  fun gen_fun_upd None T _ _ = None
   1.398 +    | gen_fun_upd (Some f) T x y = Some (Const ("Fun.fun_upd",T) $ f $ x $ y)
   1.399 +  fun dest_fun_T1 (Type (_, T :: Ts)) = T
   1.400 +  fun find_double (t as Const ("Fun.fun_upd",T) $ f $ x $ y) =
   1.401 +    let
   1.402 +      fun find (Const ("Fun.fun_upd",T) $ g $ v $ w) =
   1.403 +            if v aconv x then Some g else gen_fun_upd (find g) T v w
   1.404 +        | find t = None
   1.405 +    in (dest_fun_T1 T, gen_fun_upd (find f) T x y) end
   1.406 +
   1.407 +  val ss = simpset ()
   1.408 +  val fun_upd_prover = K (rtac eq_reflection 1 THEN rtac ext 1 THEN simp_tac ss 1)
   1.409 +in
   1.410 +  val fun_upd2_simproc =
   1.411 +    Simplifier.simproc (Theory.sign_of (the_context ()))
   1.412 +      "fun_upd2" ["f(v := w, x := y)"]
   1.413 +      (fn sg => fn _ => fn t =>
   1.414 +        case find_double t of (T, None) => None
   1.415 +        | (T, Some rhs) => Some (Tactic.prove sg [] [] (Term.equals T $ t $ rhs) fun_upd_prover))
   1.416 +end;
   1.417 +Addsimprocs[fun_upd2_simproc];
   1.418  
   1.419 -translations
   1.420 -  "PI x:A. B" => "Pi A (%x. B)"
   1.421 -  "A funcset B"    => "Pi A (_K B)"
   1.422 -  "%x:A. f"  == "restrict (%x. f) A"
   1.423 -
   1.424 -constdefs
   1.425 -  compose :: "['a set, 'b => 'c, 'a => 'b] => ('a => 'c)"
   1.426 -  "compose A g f == %x:A. g (f x)"
   1.427 +val expand_fun_eq = thm "expand_fun_eq";
   1.428 +val apply_inverse = thm "apply_inverse";
   1.429 +val id_apply = thm "id_apply";
   1.430 +val o_apply = thm "o_apply";
   1.431 +val o_assoc = thm "o_assoc";
   1.432 +val id_o = thm "id_o";
   1.433 +val o_id = thm "o_id";
   1.434 +val image_compose = thm "image_compose";
   1.435 +val image_eq_UN = thm "image_eq_UN";
   1.436 +val UN_o = thm "UN_o";
   1.437 +val inj_fun_lemma = thm "inj_fun_lemma";
   1.438 +val datatype_injI = thm "datatype_injI";
   1.439 +val injD = thm "injD";
   1.440 +val inj_eq = thm "inj_eq";
   1.441 +val inj_o = thm "inj_o";
   1.442 +val inj_onI = thm "inj_onI";
   1.443 +val inj_on_inverseI = thm "inj_on_inverseI";
   1.444 +val inj_onD = thm "inj_onD";
   1.445 +val inj_on_iff = thm "inj_on_iff";
   1.446 +val comp_inj_on = thm "comp_inj_on";
   1.447 +val inj_on_contraD = thm "inj_on_contraD";
   1.448 +val inj_singleton = thm "inj_singleton";
   1.449 +val subset_inj_on = thm "subset_inj_on";
   1.450 +val surjI = thm "surjI";
   1.451 +val surj_range = thm "surj_range";
   1.452 +val surjD = thm "surjD";
   1.453 +val surjE = thm "surjE";
   1.454 +val comp_surj = thm "comp_surj";
   1.455 +val bijI = thm "bijI";
   1.456 +val bij_is_inj = thm "bij_is_inj";
   1.457 +val bij_is_surj = thm "bij_is_surj";
   1.458 +val image_ident = thm "image_ident";
   1.459 +val image_id = thm "image_id";
   1.460 +val vimage_ident = thm "vimage_ident";
   1.461 +val vimage_id = thm "vimage_id";
   1.462 +val vimage_image_eq = thm "vimage_image_eq";
   1.463 +val image_vimage_subset = thm "image_vimage_subset";
   1.464 +val image_vimage_eq = thm "image_vimage_eq";
   1.465 +val surj_image_vimage_eq = thm "surj_image_vimage_eq";
   1.466 +val inj_vimage_image_eq = thm "inj_vimage_image_eq";
   1.467 +val vimage_subsetD = thm "vimage_subsetD";
   1.468 +val vimage_subsetI = thm "vimage_subsetI";
   1.469 +val vimage_subset_eq = thm "vimage_subset_eq";
   1.470 +val image_Int_subset = thm "image_Int_subset";
   1.471 +val image_diff_subset = thm "image_diff_subset";
   1.472 +val inj_on_image_Int = thm "inj_on_image_Int";
   1.473 +val inj_on_image_set_diff = thm "inj_on_image_set_diff";
   1.474 +val image_Int = thm "image_Int";
   1.475 +val image_set_diff = thm "image_set_diff";
   1.476 +val inj_image_mem_iff = thm "inj_image_mem_iff";
   1.477 +val inj_image_subset_iff = thm "inj_image_subset_iff";
   1.478 +val inj_image_eq_iff = thm "inj_image_eq_iff";
   1.479 +val image_UN = thm "image_UN";
   1.480 +val image_INT = thm "image_INT";
   1.481 +val bij_image_INT = thm "bij_image_INT";
   1.482 +val surj_Compl_image_subset = thm "surj_Compl_image_subset";
   1.483 +val inj_image_Compl_subset = thm "inj_image_Compl_subset";
   1.484 +val bij_image_Compl_eq = thm "bij_image_Compl_eq";
   1.485 +val fun_upd_idem_iff = thm "fun_upd_idem_iff";
   1.486 +val fun_upd_idem = thm "fun_upd_idem";
   1.487 +val fun_upd_apply = thm "fun_upd_apply";
   1.488 +val fun_upd_same = thm "fun_upd_same";
   1.489 +val fun_upd_other = thm "fun_upd_other";
   1.490 +val fun_upd_upd = thm "fun_upd_upd";
   1.491 +val fun_upd_twist = thm "fun_upd_twist";
   1.492 +*}
   1.493  
   1.494  end
   1.495 -
   1.496 -ML
   1.497 -val print_translation = [("Pi", dependent_tr' ("@Pi", "op funcset"))];