diff -r bc2c1ab01422 -r c10b56d226ce Nominal/Ex/TypeSchemes.thy --- a/Nominal/Ex/TypeSchemes.thy Thu Feb 17 12:01:08 2011 +0900 +++ b/Nominal/Ex/TypeSchemes.thy Thu Feb 17 17:02:25 2011 +0900 @@ -63,6 +63,14 @@ apply(simp) done +lemma helper: + assumes "A - C = A - D" + and "B - C = B - D" + and "E \ A \ B" + shows "E - C = E - D" +using assms +by blast + nominal_primrec subst :: "(name \ ty) list \ ty \ ty" and substs :: "(name \ ty) list \ tys \ tys" @@ -224,7 +232,7 @@ defer apply (simp add: ty_tys.eq_iff) apply (simp only: Abs_eq_res_set) -apply (subgoal_tac "(atom ` fset xsa \ supp T - atom ` fset xs \ supp Ta) \* ([atom ` fset xs \ supp (subst \' T)]set. T)") +apply (subgoal_tac "(atom ` fset xsa \ supp Ta - atom ` fset xs \ supp T) \* ([atom ` fset xs \ supp (subst \' T)]set. T)") apply (subst (asm) Abs_eq_iff2) apply (clarify) apply (simp add: alphas) @@ -260,11 +268,7 @@ apply (simp add: supp_Pair finite_supp) apply (simp add: fresh_Pair) apply(auto simp add: Abs_fresh_iff fresh_star_def)[1] -prefer 2 apply auto[1] -apply (erule_tac x="atom x" in ballE) -apply auto[1] -apply (auto simp add: fresh_def)[1] apply (subgoal_tac "p \ \' = \'") prefer 2 @@ -275,12 +279,25 @@ apply blast apply(simp add: eqvt_at_def inter_eqvt supp_eqvt) apply (simp only: Abs_eq_res_set[symmetric]) - -apply (rule_tac s="[p \ atom ` fset xs \ supp (\', p \ T)]res. subst \' (p \ T)" in trans) ---"What if (p \ xs) is not fresh for \' ?" +apply (simp add: Abs_eq_iff alphas) +apply rule +prefer 2 +apply (rule_tac x="0 :: perm" in exI) +apply (simp add: fresh_star_zero) +apply (rule helper) +prefer 3 +apply (subgoal_tac "supp ((\(l, r). subst l r) (\', (p \ T))) \ supp \' \ supp (p \ T)") +apply simp +apply (subst supp_Pair[symmetric]) +apply (rule supp_eqvt_at) +apply (simp add: eqvt_at_def) +defer --"because eqvt_at Ta" +apply (simp add: supp_Pair finite_supp) +prefer 2 apply blast +prefer 2 apply (metis finite_UNIV finite_imageI obtain_at_base rangeI) +--"p and xs and xsa are fresh for theta" oops - section {* defined as two separate nominal datatypes *} nominal_datatype ty2 =