Nominal/Abs_equiv.thy
author Christian Urban <urbanc@in.tum.de>
Mon, 21 Jun 2010 06:46:28 +0100
changeset 2317 7412424213ec
parent 1657 d7dc35222afc
permissions -rw-r--r--
merged
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
1657
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
     1
theory Abs_equiv
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
     2
imports Abs
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
     3
begin
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
     4
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
     5
(* 
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
     6
  below is a construction site for showing that in the
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
     7
  single-binder case, the old and new alpha equivalence 
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
     8
  coincide
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
     9
*)
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    10
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    11
fun
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    12
  alpha1
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    13
where
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    14
  "alpha1 (a, x) (b, y) \<longleftrightarrow> (a = b \<and> x = y) \<or> (a \<noteq> b \<and> x = (a \<rightleftharpoons> b) \<bullet> y \<and> a \<sharp> y)"
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    15
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    16
notation 
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    17
  alpha1 ("_ \<approx>abs1 _")
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    18
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    19
fun
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    20
  alpha2
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    21
where
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    22
  "alpha2 (a, x) (b, y) \<longleftrightarrow> (\<exists>c. c \<sharp> (a,b,x,y) \<and> ((c \<rightleftharpoons> a) \<bullet> x) = ((c \<rightleftharpoons> b) \<bullet> y))"
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    23
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    24
notation 
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    25
  alpha2 ("_ \<approx>abs2 _")
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    26
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    27
lemma alpha_old_new:
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    28
  assumes a: "(a, x) \<approx>abs1 (b, y)" "sort_of a = sort_of b"
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    29
  shows "({a}, x) \<approx>abs ({b}, y)"
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    30
using a
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    31
apply(simp)
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    32
apply(erule disjE)
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    33
apply(simp)
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    34
apply(rule exI)
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    35
apply(rule alpha_gen_refl)
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    36
apply(simp)
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    37
apply(rule_tac x="(a \<rightleftharpoons> b)" in  exI)
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    38
apply(simp add: alpha_gen)
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    39
apply(simp add: fresh_def)
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    40
apply(rule conjI)
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    41
apply(rule_tac ?p1="(a \<rightleftharpoons> b)" in  permute_eq_iff[THEN iffD1])
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    42
apply(rule trans)
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    43
apply(simp add: Diff_eqvt supp_eqvt)
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    44
apply(subst swap_set_not_in)
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    45
back
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    46
apply(simp)
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    47
apply(simp)
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    48
apply(simp add: permute_set_eq)
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    49
apply(rule conjI)
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    50
apply(rule_tac ?p1="(a \<rightleftharpoons> b)" in fresh_star_permute_iff[THEN iffD1])
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    51
apply(simp add: permute_self)
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    52
apply(simp add: Diff_eqvt supp_eqvt)
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    53
apply(simp add: permute_set_eq)
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    54
apply(subgoal_tac "supp (a \<rightleftharpoons> b) \<subseteq> {a, b}")
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    55
apply(simp add: fresh_star_def fresh_def)
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    56
apply(blast)
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    57
apply(simp add: supp_swap)
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    58
apply(simp add: eqvts)
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    59
done
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    60
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    61
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    62
lemma perm_induct_test:
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    63
  fixes P :: "perm => bool"
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    64
  assumes fin: "finite (supp p)" 
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    65
  assumes zero: "P 0"
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    66
  assumes swap: "\<And>a b. \<lbrakk>sort_of a = sort_of b; a \<noteq> b\<rbrakk> \<Longrightarrow> P (a \<rightleftharpoons> b)"
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    67
  assumes plus: "\<And>p1 p2. \<lbrakk>supp p1 \<inter> supp p2 = {}; P p1; P p2\<rbrakk> \<Longrightarrow> P (p1 + p2)"
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    68
  shows "P p"
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    69
using fin
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    70
apply(induct F\<equiv>"supp p" arbitrary: p rule: finite_induct)
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    71
oops
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    72
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    73
lemma ii:
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    74
  assumes "\<forall>x \<in> A. p \<bullet> x = x"
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    75
  shows "p \<bullet> A = A"
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    76
using assms
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    77
apply(auto)
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    78
apply (metis Collect_def Collect_mem_eq Int_absorb assms eqvt_bound inf_Int_eq mem_def mem_permute_iff)
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    79
apply (metis Collect_def Collect_mem_eq Int_absorb assms eqvt_apply eqvt_bound eqvt_lambda inf_Int_eq mem_def mem_permute_iff permute_minus_cancel(2) permute_pure)
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    80
done
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    81
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    82
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    83
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    84
lemma alpha_abs_Pair:
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    85
  shows "(bs, (x1, x2)) \<approx>gen (\<lambda>(x1,x2) (y1,y2). x1=y1 \<and> x2=y2) (\<lambda>(x,y). supp x \<union> supp y) p (cs, (y1, y2))
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    86
         \<longleftrightarrow> ((bs, x1) \<approx>gen (op=) supp p (cs, y1) \<and> (bs, x2) \<approx>gen (op=) supp p (cs, y2))"         
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    87
  apply(simp add: alpha_gen)
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    88
  apply(simp add: fresh_star_def)
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    89
  apply(simp add: ball_Un Un_Diff)
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    90
  apply(rule iffI)
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    91
  apply(simp)
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    92
  defer
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    93
  apply(simp)
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    94
  apply(rule conjI)
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    95
  apply(clarify)
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    96
  apply(simp add: supp_eqvt[symmetric] Diff_eqvt[symmetric])
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    97
  apply(rule sym)
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    98
  apply(rule ii)
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    99
  apply(simp add: fresh_def supp_perm)
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   100
  apply(clarify)
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   101
  apply(simp add: supp_eqvt[symmetric] Diff_eqvt[symmetric])
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   102
  apply(simp add: fresh_def supp_perm)
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   103
  apply(rule sym)
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   104
  apply(rule ii)
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   105
  apply(simp)
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   106
  done
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   107
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   108
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   109
lemma yy:
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   110
  assumes "S1 - {x} = S2 - {x}" "x \<in> S1" "x \<in> S2"
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   111
  shows "S1 = S2"
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   112
using assms
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   113
apply (metis insert_Diff_single insert_absorb)
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   114
done
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   115
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   116
lemma kk:
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   117
  assumes a: "p \<bullet> x = y"
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   118
  shows "\<forall>a \<in> supp x. (p \<bullet> a) \<in> supp y"
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   119
using a
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   120
apply(auto)
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   121
apply(rule_tac p="- p" in permute_boolE)
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   122
apply(simp add: mem_eqvt supp_eqvt)
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   123
done
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   124
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   125
lemma ww:
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   126
  assumes "a \<notin> supp x" "b \<in> supp x" "a \<noteq> b" "sort_of a = sort_of b"
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   127
  shows "((a \<rightleftharpoons> b) \<bullet> x) \<noteq> x"
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   128
apply(subgoal_tac "(supp x) supports x")
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   129
apply(simp add: supports_def)
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   130
using assms
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   131
apply -
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   132
apply(drule_tac x="a" in spec)
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   133
defer
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   134
apply(rule supp_supports)
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   135
apply(auto)
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   136
apply(rotate_tac 1)
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   137
apply(drule_tac p="(a \<rightleftharpoons> b)" in permute_boolI)
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   138
apply(simp add: mem_eqvt supp_eqvt)
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   139
done
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   140
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   141
lemma alpha_abs_sym:
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   142
  assumes a: "({a}, x) \<approx>abs ({b}, y)"
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   143
  shows "({b}, y) \<approx>abs ({a}, x)"
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   144
using a
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   145
apply(simp)
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   146
apply(erule exE)
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   147
apply(rule_tac x="- p" in exI)
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   148
apply(simp add: alpha_gen)
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   149
apply(simp add: fresh_star_def fresh_minus_perm)
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   150
apply (metis permute_minus_cancel(2))
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   151
done
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   152
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   153
lemma alpha_abs_trans:
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   154
  assumes a: "({a1}, x1) \<approx>abs ({a2}, x2)"
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   155
  assumes b: "({a2}, x2) \<approx>abs ({a3}, x3)"
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   156
  shows "({a1}, x1) \<approx>abs ({a3}, x3)"
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   157
using a b
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   158
apply(simp)
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   159
apply(erule exE)+
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   160
apply(rule_tac x="pa + p" in exI)
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   161
apply(simp add: alpha_gen)
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   162
apply(simp add: fresh_star_def fresh_plus_perm)
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   163
done
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   164
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   165
lemma alpha_equal:
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   166
  assumes a: "({a}, x) \<approx>abs ({a}, y)" 
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   167
  shows "(a, x) \<approx>abs1 (a, y)"
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   168
using a
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   169
apply(simp)
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   170
apply(erule exE)
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   171
apply(simp add: alpha_gen)
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   172
apply(erule conjE)+
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   173
apply(case_tac "a \<notin> supp x")
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   174
apply(simp)
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   175
apply(subgoal_tac "supp x \<sharp>* p")
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   176
apply(drule supp_perm_eq)
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   177
apply(simp)
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   178
apply(simp)
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   179
apply(simp)
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   180
apply(case_tac "a \<notin> supp y")
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   181
apply(simp)
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   182
apply(drule supp_perm_eq)
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   183
apply(clarify)
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   184
apply(simp (no_asm_use))
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   185
apply(simp)
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   186
apply(simp)
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   187
apply(drule yy)
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   188
apply(simp)
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   189
apply(simp)
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   190
apply(simp)
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   191
apply(case_tac "a \<sharp> p")
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   192
apply(subgoal_tac "supp y \<sharp>* p")
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   193
apply(drule supp_perm_eq)
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   194
apply(clarify)
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   195
apply(simp (no_asm_use))
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   196
apply(metis)
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   197
apply(auto simp add: fresh_star_def)[1]
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   198
apply(frule_tac kk)
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   199
apply(drule_tac x="a" in bspec)
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   200
apply(simp)
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   201
apply(simp add: fresh_def)
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   202
apply(simp add: supp_perm)
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   203
apply(subgoal_tac "((p \<bullet> a) \<sharp> p)")
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   204
apply(simp add: fresh_def supp_perm)
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   205
apply(simp add: fresh_star_def)
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   206
done
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   207
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   208
lemma alpha_unequal:
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   209
  assumes a: "({a}, x) \<approx>abs ({b}, y)" "sort_of a = sort_of b" "a \<noteq> b"
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   210
  shows "(a, x) \<approx>abs1 (b, y)"
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   211
using a
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   212
apply -
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   213
apply(subgoal_tac "a \<notin> supp x - {a}")
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   214
apply(subgoal_tac "b \<notin> supp x - {a}")
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   215
defer
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   216
apply(simp add: alpha_gen)
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   217
apply(simp)
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   218
apply(drule_tac abs_swap1)
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   219
apply(assumption)
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   220
apply(simp only: insert_eqvt empty_eqvt swap_atom_simps)
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   221
apply(simp only: abs_eq_iff)
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   222
apply(drule alphas_abs_sym)
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   223
apply(rotate_tac 4)
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   224
apply(drule_tac alpha_abs_trans)
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   225
apply(assumption)
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   226
apply(drule alpha_equal)
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   227
apply(rule_tac p="(a \<rightleftharpoons> b)" in permute_boolE)
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   228
apply(simp add: fresh_eqvt)
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   229
apply(simp add: fresh_def)
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   230
done
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   231
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   232
lemma alpha_new_old:
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   233
  assumes a: "({a}, x) \<approx>abs ({b}, y)" "sort_of a = sort_of b" 
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   234
  shows "(a, x) \<approx>abs1 (b, y)"
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   235
using a
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   236
apply(case_tac "a=b")
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   237
apply(simp only: alpha_equal)
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   238
apply(drule alpha_unequal)
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   239
apply(simp)
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   240
apply(simp)
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   241
apply(simp)
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   242
done
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   243
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   244
end