src/ZF/Perm.ML
changeset 2637 e9b203f854ae
parent 2493 bdeb5024353a
child 2688 889a1cbd1aca
equal deleted inserted replaced
2636:4b30dbe4a020 2637:e9b203f854ae
   333 by (rtac fun_extension 1);
   333 by (rtac fun_extension 1);
   334 by (rtac comp_fun 1);
   334 by (rtac comp_fun 1);
   335 by (rtac lam_funtype 2);
   335 by (rtac lam_funtype 2);
   336 by (typechk_tac (prem::ZF_typechecks));
   336 by (typechk_tac (prem::ZF_typechecks));
   337 by (asm_simp_tac (!simpset 
   337 by (asm_simp_tac (!simpset 
   338              setsolver type_auto_tac [lam_type, lam_funtype, prem]) 1);
   338              setSolver type_auto_tac [lam_type, lam_funtype, prem]) 1);
   339 qed "comp_lam";
   339 qed "comp_lam";
   340 
   340 
   341 goal Perm.thy "!!f g. [| g: inj(A,B);  f: inj(B,C) |] ==> (f O g) : inj(A,C)";
   341 goal Perm.thy "!!f g. [| g: inj(A,B);  f: inj(B,C) |] ==> (f O g) : inj(A,C)";
   342 by (res_inst_tac [("d", "%y. converse(g) ` (converse(f) ` y)")]
   342 by (res_inst_tac [("d", "%y. converse(g) ` (converse(f) ` y)")]
   343     f_imp_injective 1);
   343     f_imp_injective 1);
   344 by (REPEAT (ares_tac [comp_fun, inj_is_fun] 1));
   344 by (REPEAT (ares_tac [comp_fun, inj_is_fun] 1));
   345 by (asm_simp_tac (!simpset  addsimps [left_inverse] 
   345 by (asm_simp_tac (!simpset  addsimps [left_inverse] 
   346                         setsolver type_auto_tac [inj_is_fun, apply_type]) 1);
   346                         setSolver type_auto_tac [inj_is_fun, apply_type]) 1);
   347 qed "comp_inj";
   347 qed "comp_inj";
   348 
   348 
   349 goalw Perm.thy [surj_def]
   349 goalw Perm.thy [surj_def]
   350     "!!f g. [| g: surj(A,B);  f: surj(B,C) |] ==> (f O g) : surj(A,C)";
   350     "!!f g. [| g: surj(A,B);  f: surj(B,C) |] ==> (f O g) : surj(A,C)";
   351 by (best_tac (!claset addSIs [comp_fun,comp_fun_apply]) 1);
   351 by (best_tac (!claset addSIs [comp_fun,comp_fun_apply]) 1);
   542 
   542 
   543 goalw Perm.thy [inj_def]
   543 goalw Perm.thy [inj_def]
   544     "!!f. [| f: inj(A,B);  a~:A;  b~:B |]  ==> \
   544     "!!f. [| f: inj(A,B);  a~:A;  b~:B |]  ==> \
   545 \         cons(<a,b>,f) : inj(cons(a,A), cons(b,B))";
   545 \         cons(<a,b>,f) : inj(cons(a,A), cons(b,B))";
   546 by (fast_tac (!claset  addIs [apply_type]
   546 by (fast_tac (!claset  addIs [apply_type]
   547                      addss (!simpset addsimps [fun_extend, fun_extend_apply2,
   547               unsafe_addss (!simpset addsimps [fun_extend, fun_extend_apply2,
   548                                             fun_extend_apply1]) ) 1);
   548                                             fun_extend_apply1]) ) 1);
   549 qed "inj_extend";
   549 qed "inj_extend";
   550 
   550