# HG changeset patch # User Christian Urban # Date 1268316607 -3600 # Node ID d59f851926c5509ba1e22d7c6e474c00cb9af916 # Parent b452e11e409f5c9e0d6347eed97a7f8441a36e11 finally the proof that new and old alpha agree diff -r b452e11e409f -r d59f851926c5 Nominal/Abs.thy --- a/Nominal/Abs.thy Thu Mar 11 10:22:24 2010 +0100 +++ b/Nominal/Abs.thy Thu Mar 11 15:10:07 2010 +0100 @@ -592,110 +592,130 @@ done lemma ww: - assumes "a \ supp x" "b \ supp x" "a \ b" + assumes "a \ supp x" "b \ supp x" "a \ b" "sort_of a = sort_of b" shows "((a \ b) \ x) \ x" apply(subgoal_tac "(supp x) supports x") apply(simp add: supports_def) using assms apply - apply(drule_tac x="a" in spec) -apply(simp) -sorry +defer +apply(rule supp_supports) +apply(auto) +apply(rotate_tac 1) +apply(drule_tac p="(a \ b)" in permute_boolE) +apply(simp add: mem_eqvt supp_eqvt) +done +lemma zz: + assumes "p \ x \ p \ y" + shows "x \ y" +using assms +apply(auto) +done -lemma - assumes a: "({a}, x) \abs ({b}, y)" "sort_of a = sort_of b" - shows "(a, x) \abs1 (b, y)" +lemma alpha_abs_sym: + assumes a: "({a}, x) \abs ({b}, y)" + shows "({b}, y) \abs ({a}, x)" using a -apply(case_tac "a = b") +apply(simp) +apply(erule exE) +apply(rule_tac x="- p" in exI) +apply(simp add: alpha_gen) +apply(simp add: fresh_star_def fresh_minus_perm) +apply (metis permute_minus_cancel(2)) +done + +lemma alpha_abs_trans: + assumes a: "({a1}, x1) \abs ({a2}, x2)" + assumes b: "({a2}, x2) \abs ({a3}, x3)" + shows "({a1}, x1) \abs ({a3}, x3)" +using a b +apply(simp) +apply(erule exE)+ +apply(rule_tac x="pa + p" in exI) +apply(simp add: alpha_gen) +apply(simp add: fresh_star_def fresh_plus_perm) +done + +lemma alpha_equal: + assumes a: "({a}, x) \abs ({a}, y)" + shows "(a, x) \abs1 (a, y)" +using a apply(simp) apply(erule exE) apply(simp add: alpha_gen) apply(erule conjE)+ -apply(case_tac "b \ supp x \ b \ supp y") -apply(simp) -apply(drule tt1) -apply(clarify) +apply(case_tac "a \ supp x") apply(simp) -apply(simp) -apply(erule disjE) -apply(case_tac "b \ supp y") -apply(drule_tac yy) +apply(subgoal_tac "supp x \* p") +apply(drule tt1) apply(simp) apply(simp) apply(simp) -apply(case_tac "b \ p") -apply(subgoal_tac "supp y \* p") -apply(drule tt1) -apply(clarify) -apply(drule sym) -apply(drule sym) -apply(simp) -apply(auto simp add: fresh_star_def)[1] -apply(frule_tac kk) -apply(drule_tac x="b" in bspec) -apply(simp) -apply(simp add: fresh_def) -apply(simp add: supp_perm) -apply(subgoal_tac "((p \ b) \ p)") -apply(simp add: fresh_def supp_perm) -apply(simp add: fresh_star_def) +apply(case_tac "a \ supp y") apply(simp) apply(drule tt1) apply(clarify) -apply(drule sym) -apply(drule sym) +apply(simp (no_asm_use)) apply(simp) -apply(case_tac "b \ supp x") -apply(drule_tac yy) +apply(simp) +apply(drule yy) apply(simp) apply(simp) apply(simp) -apply(case_tac "b \ p") +apply(case_tac "a \ p") apply(subgoal_tac "supp y \* p") apply(drule tt1) apply(clarify) -apply(drule sym) -apply(drule sym) -apply(simp) +apply(simp (no_asm_use)) +apply(metis) apply(auto simp add: fresh_star_def)[1] apply(frule_tac kk) -apply(drule_tac x="b" in bspec) +apply(drule_tac x="a" in bspec) apply(simp) apply(simp add: fresh_def) apply(simp add: supp_perm) -apply(subgoal_tac "((p \ b) \ p)") +apply(subgoal_tac "((p \ a) \ p)") apply(simp add: fresh_def supp_perm) apply(simp add: fresh_star_def) +done + +lemma alpha_unequal: + assumes a: "({a}, x) \abs ({b}, y)" "sort_of a = sort_of b" "a \ b" + shows "(a, x) \abs1 (b, y)" +using a +apply - +apply(subgoal_tac "a \ supp x - {a}") +apply(subgoal_tac "b \ supp x - {a}") +defer +apply(simp add: alpha_gen) apply(simp) -apply(drule sym) -apply(drule sym) -apply(subgoal_tac "supp x \* p") -apply(drule tt1) -apply(clarify) +apply(drule_tac alpha_abs_swap) +apply(assumption) +apply(simp only: insert_eqvt empty_eqvt swap_atom_simps) +apply(drule alpha_abs_sym) +apply(rotate_tac 4) +apply(drule_tac alpha_abs_trans) +apply(assumption) +apply(drule alpha_equal) +apply(simp) +apply(rule_tac p="(a \ b)" in permute_boolI) +apply(simp add: fresh_eqvt) +apply(simp add: fresh_def) +done + +lemma alpha_new_old: + assumes a: "({a}, x) \abs ({b}, y)" "sort_of a = sort_of b" + shows "(a, x) \abs1 (b, y)" +using a +apply(case_tac "a=b") +apply(simp only: alpha_equal) +apply(drule alpha_unequal) apply(simp) apply(simp) apply(simp) -apply(erule exE) -apply(simp add: alpha_gen) -apply(erule conjE)+ -apply(simp add: fresh_def) -apply(rule conjI) -defer -apply(clarify) -apply(subgoal_tac "a=b") -prefer 2 -apply(blast) -apply(simp) -apply(clarify) -apply(subgoal_tac "b \ supp x") -prefer 2 -apply(blast) -apply(subgoal_tac "a \ supp (p \ x)") -prefer 2 -apply(blast) -oops - +done fun distinct_perms diff -r b452e11e409f -r d59f851926c5 Nominal/Nominal2_Eqvt.thy --- a/Nominal/Nominal2_Eqvt.thy Thu Mar 11 10:22:24 2010 +0100 +++ b/Nominal/Nominal2_Eqvt.thy Thu Mar 11 15:10:07 2010 +0100 @@ -12,7 +12,6 @@ section {* Logical Operators *} - lemma eq_eqvt: shows "p \ (x = y) \ (p \ x) = (p \ y)" unfolding permute_eq_iff permute_bool_def .. @@ -214,7 +213,6 @@ "p \ (snd x) = snd (p \ x)" by (cases x) simp - section {* Units *} lemma supp_unit: @@ -245,7 +243,7 @@ (* datatypes *) permute_prod.simps append_eqvt rev_eqvt set_eqvt - fst_eqvt snd_eqvt + fst_eqvt snd_eqvt Pair_eqvt (* sets *) empty_eqvt UNIV_eqvt union_eqvt inter_eqvt mem_eqvt