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); |