diff -r 9913c5695fc7 -r 513ebe332964 Quot/Nominal/LamEx.thy --- a/Quot/Nominal/LamEx.thy Wed Jan 27 18:06:14 2010 +0100 +++ b/Quot/Nominal/LamEx.thy Thu Jan 28 01:24:09 2010 +0100 @@ -243,13 +243,6 @@ apply(simp) done -(* PROBABLY NOT TRUE !!! needed for lifting -lemma alpha_fresh: - assumes a: "t \ s" - shows "a\t \ a\s" -using a -apply(induct) -*) quotient_type lam = rlam / alpha by (rule alpha_equivp) @@ -305,13 +298,6 @@ done - -(* NOT SURE see above -lemma fresh_rsp: - "(op = ===> alpha ===> op =) fresh fresh" - apply(auto) -*) - section {* lifted theorems *} lemma lam_induct: @@ -375,6 +361,7 @@ \ P" by (lifting alpha.cases) +(* not sure whether needed *) lemma alpha_induct: "\qx = qxa; \a b. a = b \ qxb (Var a) (Var b); \x xa xb xc. \x = xa; qxb x xa; xb = xc; qxb xb xc\ \ qxb (App x xb) (App xa xc); @@ -450,20 +437,69 @@ done (* needs thinking *) -lemma lam_supp: - shows "supp (Lam x t) = ((supp t) - {atom x})" -apply(simp add: supp_def) -sorry +lemma lam_supp1: + shows "(supp (atom x, t)) supports (Lam x t) " +apply(simp add: supports_def) +apply(fold fresh_def) +apply(simp add: fresh_Pair swap_fresh_fresh) +apply(clarify) +apply(subst swap_at_base_simps(3)) +apply(simp_all add: fresh_atom) +done +lemma lam_fsupp1: + assumes a: "finite (supp t)" + shows "finite (supp (Lam x t))" +apply(rule supports_finite) +apply(rule lam_supp1) +apply(simp add: a supp_Pair supp_atom) +done instance lam :: fs apply(default) apply(induct_tac x rule: lam_induct) apply(simp add: var_supp) apply(simp add: app_supp) -apply(simp add: lam_supp) +apply(simp add: lam_fsupp1) done +lemma lam_fresh1: + assumes f: "finite (supp t)" + and a1: "b \ t" + and a2: "atom a \ b" + shows "b \ Lam a t" + proof - + have "\c. c \ (b, a ,t, Lam a t)" sorry + then obtain c where fr1: "c \ b" + and fr2: "c \ atom a" + and fr3: "c \ t" + and fr4: "c \ Lam a t" + and fr5: "sort_of b = sort_of c" + apply(auto simp add: fresh_Pair fresh_atom) + sorry + have e: "(c \ b) \ (Lam a t) = Lam a ((c \ b) \ t)" using a2 fr1 fr2 + by simp + from fr4 have "((c \ b) \c) \ ((c \ b) \(Lam a t))" + by (simp only: fresh_permute_iff) + then have "b \ (Lam a ((c \ b) \ t))" using fr1 fr2 fr5 e + by simp + then show ?thesis using a1 fr3 + by (simp only: swap_fresh_fresh) +qed + +lemma lam_fresh2: + assumes f: "finite (supp t)" + shows "(atom a) \ Lam a t" +sorry + + +lemma lam_supp: + shows "supp (Lam x t) = ((supp t) - {atom x})" +apply(default) +apply(simp_all add: supp_conv_fresh) +apply(auto) +sorry + lemma fresh_lam: "(atom a \ Lam b t) \ (a = b) \ (a \ b \ atom a \ t)" apply(simp add: fresh_def)