src/HOL/MiniML/Generalize.ML
changeset 4153 e534c4c32d54
parent 4089 96fba19bcbe2
child 4681 a331c1f5a23e
equal deleted inserted replaced
4152:451104c223e2 4153:e534c4c32d54
    93 qed_spec_mp "bound_typ_inst_gen";
    93 qed_spec_mp "bound_typ_inst_gen";
    94 Addsimps [bound_typ_inst_gen];
    94 Addsimps [bound_typ_inst_gen];
    95 
    95 
    96 goalw Generalize.thy [le_type_scheme_def,is_bound_typ_instance]
    96 goalw Generalize.thy [le_type_scheme_def,is_bound_typ_instance]
    97   "gen ($ S A) ($ S t) <= $ S (gen A t)";
    97   "gen ($ S A) ($ S t) <= $ S (gen A t)";
    98 by (safe_tac (claset()));
    98 by Safe_tac;
    99 by (rename_tac "R" 1);
    99 by (rename_tac "R" 1);
   100 by (res_inst_tac [("x", "(%a. bound_typ_inst R (gen ($S A) (S a)))")] exI 1);
   100 by (res_inst_tac [("x", "(%a. bound_typ_inst R (gen ($S A) (S a)))")] exI 1);
   101 by (typ.induct_tac "t" 1);
   101 by (typ.induct_tac "t" 1);
   102  by (simp_tac (simpset() addsplits [expand_if]) 1);
   102  by (simp_tac (simpset() addsplits [expand_if]) 1);
   103 by (Asm_simp_tac 1);
   103 by (Asm_simp_tac 1);
   104 qed "gen_bound_typ_instance";
   104 qed "gen_bound_typ_instance";
   105 
   105 
   106 goalw Generalize.thy [le_type_scheme_def,is_bound_typ_instance]
   106 goalw Generalize.thy [le_type_scheme_def,is_bound_typ_instance]
   107   "!!A B. free_tv B <= free_tv A ==> gen A t <= gen B t";
   107   "!!A B. free_tv B <= free_tv A ==> gen A t <= gen B t";
   108 by (safe_tac (claset()));
   108 by Safe_tac;
   109 by (rename_tac "S" 1);
   109 by (rename_tac "S" 1);
   110 by (res_inst_tac [("x","%b. if b:free_tv A then TVar b else S b")] exI 1);
   110 by (res_inst_tac [("x","%b. if b:free_tv A then TVar b else S b")] exI 1);
   111 by (typ.induct_tac "t" 1);
   111 by (typ.induct_tac "t" 1);
   112  by (asm_simp_tac (simpset() addsplits [expand_if]) 1);
   112  by (asm_simp_tac (simpset() addsplits [expand_if]) 1);
   113  by (Fast_tac 1);
   113  by (Fast_tac 1);