diff -r 2fe45593aaa9 -r d7b8c4243cd6 Quot/Nominal/LamEx2.thy --- a/Quot/Nominal/LamEx2.thy Mon Feb 01 20:02:44 2010 +0100 +++ b/Quot/Nominal/LamEx2.thy Tue Feb 02 08:16:34 2010 +0100 @@ -407,7 +407,8 @@ apply auto done -lemma pi_rep: "pi \ (rep_lam x) = rep_lam (pi \ x)" +(* pi_abs would be also sufficient to prove the next lemma *) +lemma replam_eqvt: "pi \ (rep_lam x) = rep_lam (pi \ x)" apply (unfold rep_lam_def) sorry @@ -416,45 +417,42 @@ alpha_gen = alpha_gen" apply (simp add: expand_fun_eq) apply (simp add: alpha_gen.simps) -apply (simp add: pi_rep) +apply (simp add: replam_eqvt) apply (simp only: Quotient_abs_rep[OF Quotient_lam]) apply auto done lemma alpha_prs [quot_preserve]: "(rep_lam ---> rep_lam ---> id) alpha = (op =)" apply (simp add: expand_fun_eq) -sorry - +apply (simp add: Quotient_rel_rep[OF Quotient_lam]) +done lemma a3: "\pi. ({atom a}, t) \gen (op =) fv pi ({atom b}, s) \ Lam a t = Lam b s" apply (lifting a3) done + lemma a3_inv: - assumes "Lam a t = Lam b s" - shows "\pi. (fv t - {atom a} = fv s - {atom b} \ (fv t - {atom a})\* pi \ (pi \ t) = s)" -using assms + "Lam a t = Lam b s \ \pi. ({atom a}, t) \gen (op =) fv pi ({atom b}, s)" apply(lifting a3_inverse) done lemma alpha_cases: "\a1 = a2; \a b. \a1 = Var a; a2 = Var b; a = b\ \ P; \x xa xb xc. \a1 = App x xb; a2 = App xa xc; x = xa; xb = xc\ \ P; - \t a s b. \a1 = Lam a t; a2 = Lam b s; - \pi. fv t - {atom a} = fv s - {atom b} \ (fv t - {atom a}) \* pi \ (pi \ t) = s\ + \a t b s. \a1 = Lam a t; a2 = Lam b s; \pi. ({atom a}, t) \gen (op =) fv pi ({atom b}, s)\ \ P\ \ P" by (lifting alpha.cases) +thm alpha.induct + (* 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); - \t a s b. - \\pi. fv t - {atom a} = fv s - {atom b} \ - (fv t - {atom a}) \* pi \ ((pi \ t) = s \ qxb (pi \ t) s)\ - \ qxb (Lam a t) (Lam b s)\ + \a t b s. \pi. ({atom a}, t) \gen \x1 x2. x1 = x2 \ qxb x1 x2 fv pi ({atom b}, s) \ qxb (Lam a t) (Lam b s)\ \ qxb qx qxa" by (lifting alpha.induct) @@ -479,9 +477,9 @@ apply(simp_all) done +thm a3_inv lemma Lam_pseudo_inject: - shows "(Lam a t = Lam b s) = - (\pi. (fv t - {atom a} = fv s - {atom b} \ (fv t - {atom a})\* pi \ (pi \ t) = s))" + shows "(Lam a t = Lam b s) = (\pi. ({atom a}, t) \gen (op =) fv pi ({atom b}, s))" apply(rule iffI) apply(rule a3_inv) apply(assumption) @@ -568,25 +566,27 @@ apply(induct t rule: lam_induct) apply(simp add: var_supp) apply(simp add: app_supp) -apply(subgoal_tac "supp (Lam name lam) = supp (Abst {atom name} lam)") -apply(simp add: supp_Abst) +apply(subgoal_tac "supp (Lam name lam) = supp (Abs {atom name} lam)") +apply(simp add: supp_Abs) apply(simp (no_asm) add: supp_def permute_set_eq atom_eqvt) apply(simp add: Lam_pseudo_inject) -apply(simp add: abs_eq alpha_gen) +apply(simp add: Abs_eq_iff) +apply(simp add: alpha_gen.simps) apply(simp add: supp_eqvt[symmetric] fv_eqvt[symmetric]) done lemma lam_supp2: - shows "supp (Lam x t) = supp (Abst {atom x} t)" + shows "supp (Lam x t) = supp (Abs {atom x} t)" apply(simp add: supp_def permute_set_eq atom_eqvt) apply(simp add: Lam_pseudo_inject) -apply(simp add: abs_eq supp_fv alpha_gen) +apply(simp add: Abs_eq_iff) +apply(simp add: alpha_gen supp_fv) done lemma lam_supp: shows "supp (Lam x t) = ((supp t) - {atom x})" apply(simp add: lam_supp2) -apply(simp add: supp_Abst) +apply(simp add: supp_Abs) done lemma fresh_lam: