# HG changeset patch # User Cezary Kaliszyk # Date 1268236748 -3600 # Node ID 406ee11355b88b066272b0fc2522cc8b80f15334 # Parent 3e128904baba45686e167b80db60dd127c762255# Parent 56ce001cdb87627ed9b3f9653e6ec715dcfa32c6 merge diff -r 3e128904baba -r 406ee11355b8 Nominal/Abs.thy --- a/Nominal/Abs.thy Wed Mar 10 16:58:14 2010 +0100 +++ b/Nominal/Abs.thy Wed Mar 10 16:59:08 2010 +0100 @@ -347,7 +347,15 @@ notation alpha1 ("_ \abs1 _") -thm swap_set_not_in +fun + alpha2 +where + "alpha2 (a, x) (b, y) \ (\c. c \ (a,b,x,y) \ ((c \ a) \ x) = ((c \ b) \ y))" + +notation + alpha2 ("_ \abs2 _") + + lemma qq: fixes S::"atom set" @@ -366,23 +374,6 @@ apply(metis permute_minus_cancel) done -lemma alpha_abs_swap: - assumes a1: "(supp x - bs) \* p" - and a2: "(supp x - bs) \* p" - shows "(bs, x) \abs (p \ bs, p \ x)" - apply(simp) - apply(rule_tac x="p" in exI) - apply(simp add: alpha_gen) - apply(simp add: supp_eqvt[symmetric] Diff_eqvt[symmetric]) - apply(rule conjI) - apply(rule sym) - apply(rule qq) - using a1 a2 - apply(auto)[1] - oops - - - lemma assumes a: "(a, x) \abs1 (b, y)" "sort_of a = sort_of b" shows "({a}, x) \abs ({b}, y)" @@ -551,37 +542,11 @@ apply(drule perm_zero) apply(simp add: zero) apply(rotate_tac 3) -sorry - - -(* +oops lemma tt: "(supp x) \* p \ p \ x = x" -apply(induct p rule: perm_induct_test) -apply(simp) -apply(rule swap_fresh_fresh) -apply(case_tac "a \ supp x") -apply(simp add: fresh_star_def) -apply(drule_tac x="a" in bspec) -apply(simp) -apply(simp add: fresh_def) -apply(simp add: supp_swap) -apply(simp add: fresh_def) -apply(case_tac "b \ supp x") -apply(simp add: fresh_star_def) -apply(drule_tac x="b" in bspec) -apply(simp) -apply(simp add: fresh_def) -apply(simp add: supp_swap) -apply(simp add: fresh_def) -apply(simp) -apply(drule meta_mp) -apply(simp add: fresh_star_def fresh_def) -apply(drule meta_mp) -apply(simp add: fresh_star_def fresh_def) -apply(simp) -done -*) +oops + lemma yy: assumes "S1 - {x} = S2 - {x}" "x \ S1" "x \ S2" shows "S1 = S2" @@ -589,6 +554,54 @@ apply (metis insert_Diff_single insert_absorb) done +lemma permute_boolI: + fixes P::"bool" + shows "p \ P \ P" +apply(simp add: permute_bool_def) +done + +lemma permute_boolE: + fixes P::"bool" + shows "P \ p \ P" +apply(simp add: permute_bool_def) +done + +lemma fresh_star_eqvt: + shows "(p \ (as \* x)) = (p \ as) \* (p \ x)" +apply(simp add: permute_bool_def) +apply(auto simp add: fresh_star_def) +apply(drule_tac x="(- p) \ xa" in bspec) +apply(rule_tac p="p" in permute_boolI) +apply(simp add: mem_eqvt) +apply(rule_tac p="- p" in permute_boolI) +apply(simp add: fresh_eqvt) +apply(drule_tac x="p \ xa" in bspec) +apply(rule_tac p="- p" in permute_boolI) +apply(simp add: mem_eqvt) +apply(rule_tac p="p" in permute_boolI) +apply(simp add: fresh_eqvt) +done + +lemma kk: + assumes a: "p \ x = y" + shows "\a \ supp x. (p \ a) \ supp y" +using a +apply(auto) +apply(rule_tac p="- p" in permute_boolI) +apply(simp add: mem_eqvt supp_eqvt) +done + +lemma ww: + assumes "a \ supp x" "b \ supp x" "a \ 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 + lemma assumes a: "({a}, x) \abs ({b}, y)" "sort_of a = sort_of b" @@ -596,6 +609,91 @@ using a apply(case_tac "a = b") 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(simp) +apply(simp) +apply(erule disjE) +apply(case_tac "b \ supp y") +apply(drule_tac yy) +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(simp) +apply(drule tt1) +apply(clarify) +apply(drule sym) +apply(drule sym) +apply(simp) +apply(case_tac "b \ supp x") +apply(drule_tac yy) +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(simp) +apply(drule sym) +apply(drule sym) +apply(subgoal_tac "supp x \* p") +apply(drule tt1) +apply(clarify) +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 diff -r 3e128904baba -r 406ee11355b8 Nominal/Parser.thy --- a/Nominal/Parser.thy Wed Mar 10 16:58:14 2010 +0100 +++ b/Nominal/Parser.thy Wed Mar 10 16:59:08 2010 +0100 @@ -155,7 +155,7 @@ *} ML {* -fun prep_bn dt_names dts eqs lthy = +fun prep_bn dt_names dts eqs = let fun aux eq = let @@ -241,7 +241,7 @@ val raw_binds = rawify_binds dts_env cnstrs_env bn_fun_full_env binds - val raw_bns = prep_bn dt_full_names' raw_dts (map snd raw_bn_eqs) lthy + val raw_bns = prep_bn dt_full_names' raw_dts (map snd raw_bn_eqs) val _ = tracing (cat_lines (map PolyML.makestring raw_bns)) in