Nominal/Ex/Foo2.thy
author Cezary Kaliszyk <kaliszyk@in.tum.de>
Mon, 22 Nov 2010 16:16:25 +0900
changeset 2575 b1d38940040a
parent 2573 6c131c089ce2
child 2576 67828f23c4e9
permissions -rw-r--r--
single rename in let2
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
2573
6c131c089ce2 added example Foo2.thy
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
     1
theory Foo2
6c131c089ce2 added example Foo2.thy
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
     2
imports "../Nominal2" 
6c131c089ce2 added example Foo2.thy
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
     3
begin
6c131c089ce2 added example Foo2.thy
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
     4
6c131c089ce2 added example Foo2.thy
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
     5
(* 
6c131c089ce2 added example Foo2.thy
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
     6
  Contrived example that has more than one
6c131c089ce2 added example Foo2.thy
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
     7
  binding clause
6c131c089ce2 added example Foo2.thy
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
     8
*)
6c131c089ce2 added example Foo2.thy
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
     9
6c131c089ce2 added example Foo2.thy
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    10
atom_decl name
6c131c089ce2 added example Foo2.thy
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    11
6c131c089ce2 added example Foo2.thy
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    12
nominal_datatype foo: trm =
6c131c089ce2 added example Foo2.thy
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    13
  Var "name"
6c131c089ce2 added example Foo2.thy
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    14
| App "trm" "trm"
6c131c089ce2 added example Foo2.thy
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    15
| Lam x::"name" t::"trm"  bind x in t
6c131c089ce2 added example Foo2.thy
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    16
| Let1 a1::"assg" t1::"trm" a2::"assg" t2::"trm" bind "bn a1" in t1, bind "bn a2" in t2
6c131c089ce2 added example Foo2.thy
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    17
| Let2 x::"name" y::"name" t1::"trm" t2::"trm" bind x y in t1, bind y in t2
6c131c089ce2 added example Foo2.thy
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    18
and assg =
6c131c089ce2 added example Foo2.thy
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    19
  As_Nil
6c131c089ce2 added example Foo2.thy
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    20
| As "name" x::"name" t::"trm" "assg" 
6c131c089ce2 added example Foo2.thy
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    21
binder
6c131c089ce2 added example Foo2.thy
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    22
  bn::"assg \<Rightarrow> atom list"
6c131c089ce2 added example Foo2.thy
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    23
where
6c131c089ce2 added example Foo2.thy
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    24
 "bn (As x y t a) = [atom x] @ bn a"
6c131c089ce2 added example Foo2.thy
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    25
| "bn (As_Nil) = []"
6c131c089ce2 added example Foo2.thy
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    26
6c131c089ce2 added example Foo2.thy
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    27
thm foo.perm_bn_simps
6c131c089ce2 added example Foo2.thy
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    28
6c131c089ce2 added example Foo2.thy
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    29
6c131c089ce2 added example Foo2.thy
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    30
thm foo.distinct
6c131c089ce2 added example Foo2.thy
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    31
thm foo.induct
6c131c089ce2 added example Foo2.thy
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    32
thm foo.inducts
6c131c089ce2 added example Foo2.thy
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    33
thm foo.exhaust
6c131c089ce2 added example Foo2.thy
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    34
thm foo.fv_defs
6c131c089ce2 added example Foo2.thy
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    35
thm foo.bn_defs
6c131c089ce2 added example Foo2.thy
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    36
thm foo.perm_simps
2575
b1d38940040a single rename in let2
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 2573
diff changeset
    37
thm foo.eq_iff(5)
2573
6c131c089ce2 added example Foo2.thy
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    38
thm foo.fv_bn_eqvt
6c131c089ce2 added example Foo2.thy
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    39
thm foo.size_eqvt
6c131c089ce2 added example Foo2.thy
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    40
thm foo.supports
6c131c089ce2 added example Foo2.thy
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    41
thm foo.fsupp
6c131c089ce2 added example Foo2.thy
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    42
thm foo.supp
6c131c089ce2 added example Foo2.thy
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    43
thm foo.fresh
6c131c089ce2 added example Foo2.thy
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    44
6c131c089ce2 added example Foo2.thy
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    45
lemma uu1:
6c131c089ce2 added example Foo2.thy
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    46
  shows "alpha_bn as (permute_bn p as)"
6c131c089ce2 added example Foo2.thy
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    47
apply(induct as rule: foo.inducts(2))
6c131c089ce2 added example Foo2.thy
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    48
apply(auto)[5]
6c131c089ce2 added example Foo2.thy
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    49
apply(simp add: foo.perm_bn_simps)
6c131c089ce2 added example Foo2.thy
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    50
apply(simp add: foo.eq_iff)
6c131c089ce2 added example Foo2.thy
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    51
apply(simp add: foo.perm_bn_simps)
6c131c089ce2 added example Foo2.thy
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    52
apply(simp add: foo.eq_iff)
6c131c089ce2 added example Foo2.thy
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    53
done
6c131c089ce2 added example Foo2.thy
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    54
6c131c089ce2 added example Foo2.thy
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    55
lemma tt1:
6c131c089ce2 added example Foo2.thy
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    56
  shows "(p \<bullet> bn as) = bn (permute_bn p as)"
6c131c089ce2 added example Foo2.thy
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    57
apply(induct as rule: foo.inducts(2))
6c131c089ce2 added example Foo2.thy
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    58
apply(auto)[5]
6c131c089ce2 added example Foo2.thy
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    59
apply(simp add: foo.perm_bn_simps foo.bn_defs)
6c131c089ce2 added example Foo2.thy
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    60
apply(simp add: foo.perm_bn_simps foo.bn_defs)
6c131c089ce2 added example Foo2.thy
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    61
apply(simp add: atom_eqvt)
6c131c089ce2 added example Foo2.thy
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    62
done
6c131c089ce2 added example Foo2.thy
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    63
6c131c089ce2 added example Foo2.thy
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    64
6c131c089ce2 added example Foo2.thy
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    65
lemma Let1_rename:
6c131c089ce2 added example Foo2.thy
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    66
  assumes "supp ([bn assn1]lst. trm1) \<sharp>* p" "supp ([bn assn2]lst. trm2) \<sharp>* p"
6c131c089ce2 added example Foo2.thy
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    67
  shows "Let1 assn1 trm1 assn2 trm2 = Let1 (permute_bn p assn1) (p \<bullet> trm1) (permute_bn p assn2) (p \<bullet> trm2)"
6c131c089ce2 added example Foo2.thy
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    68
using assms
6c131c089ce2 added example Foo2.thy
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    69
apply -
6c131c089ce2 added example Foo2.thy
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    70
apply(drule supp_perm_eq[symmetric])
6c131c089ce2 added example Foo2.thy
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    71
apply(drule supp_perm_eq[symmetric])
6c131c089ce2 added example Foo2.thy
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    72
apply(simp only: permute_Abs)
6c131c089ce2 added example Foo2.thy
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    73
apply(simp only: tt1)
6c131c089ce2 added example Foo2.thy
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    74
apply(simp only: foo.eq_iff)
6c131c089ce2 added example Foo2.thy
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    75
apply(simp add: uu1)
6c131c089ce2 added example Foo2.thy
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    76
done
6c131c089ce2 added example Foo2.thy
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    77
2575
b1d38940040a single rename in let2
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 2573
diff changeset
    78
lemma Let2_rename:
b1d38940040a single rename in let2
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 2573
diff changeset
    79
  assumes "(supp ([[atom x, atom y]]lst. t1)) \<sharp>* p" and "(supp ([[atom y]]lst. t2)) \<sharp>* p"
b1d38940040a single rename in let2
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 2573
diff changeset
    80
  shows "Let2 x y t1 t2 = Let2 (p \<bullet> x) (p \<bullet> y) (p \<bullet> t1) (p \<bullet> t2)"
b1d38940040a single rename in let2
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 2573
diff changeset
    81
  using assms
b1d38940040a single rename in let2
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 2573
diff changeset
    82
  apply -
b1d38940040a single rename in let2
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 2573
diff changeset
    83
  apply(drule supp_perm_eq[symmetric])
b1d38940040a single rename in let2
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 2573
diff changeset
    84
  apply(drule supp_perm_eq[symmetric])
b1d38940040a single rename in let2
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 2573
diff changeset
    85
  apply(simp only: foo.eq_iff)
b1d38940040a single rename in let2
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 2573
diff changeset
    86
  apply(simp only: eqvts)
b1d38940040a single rename in let2
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 2573
diff changeset
    87
  apply simp
b1d38940040a single rename in let2
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 2573
diff changeset
    88
  done
b1d38940040a single rename in let2
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents: 2573
diff changeset
    89
2573
6c131c089ce2 added example Foo2.thy
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    90
lemma strong_exhaust1:
6c131c089ce2 added example Foo2.thy
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    91
  fixes c::"'a::fs"
6c131c089ce2 added example Foo2.thy
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    92
  assumes "\<And>name. y = Var name \<Longrightarrow> P" 
6c131c089ce2 added example Foo2.thy
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    93
  and     "\<And>trm1 trm2. y = App trm1 trm2 \<Longrightarrow> P"
6c131c089ce2 added example Foo2.thy
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    94
  and     "\<And>name trm. \<lbrakk>{atom name} \<sharp>* c; y = Lam name trm\<rbrakk> \<Longrightarrow> P" 
6c131c089ce2 added example Foo2.thy
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    95
  and     "\<And>assn1 trm1 assn2 trm2. 
6c131c089ce2 added example Foo2.thy
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    96
    \<lbrakk>((set (bn assn1)) \<union> (set (bn assn2))) \<sharp>* c; y = Let1 assn1 trm1 assn2 trm2\<rbrakk> \<Longrightarrow> P"
6c131c089ce2 added example Foo2.thy
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    97
  and     "\<And>x1 x2 trm1 trm2. \<lbrakk>{atom x1, atom x2} \<sharp>* c; y = Let2 x1 x2 trm1 trm2\<rbrakk> \<Longrightarrow> P"
6c131c089ce2 added example Foo2.thy
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    98
  shows "P"
6c131c089ce2 added example Foo2.thy
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    99
apply(rule_tac y="y" in foo.exhaust(1))
6c131c089ce2 added example Foo2.thy
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   100
apply(rule assms(1))
6c131c089ce2 added example Foo2.thy
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   101
apply(assumption)
6c131c089ce2 added example Foo2.thy
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   102
apply(rule assms(2))
6c131c089ce2 added example Foo2.thy
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   103
apply(assumption)
6c131c089ce2 added example Foo2.thy
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   104
apply(subgoal_tac "\<exists>q. (q \<bullet> {atom name}) \<sharp>* c \<and> supp (Lam name trm) \<sharp>* q")
6c131c089ce2 added example Foo2.thy
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   105
apply(erule exE)
6c131c089ce2 added example Foo2.thy
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   106
apply(erule conjE)
6c131c089ce2 added example Foo2.thy
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   107
apply(rule assms(3))
6c131c089ce2 added example Foo2.thy
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   108
apply(perm_simp)
6c131c089ce2 added example Foo2.thy
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   109
apply(assumption)
6c131c089ce2 added example Foo2.thy
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   110
apply(simp)
6c131c089ce2 added example Foo2.thy
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   111
apply(drule supp_perm_eq[symmetric])
6c131c089ce2 added example Foo2.thy
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   112
apply(perm_simp)
6c131c089ce2 added example Foo2.thy
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   113
apply(simp)
6c131c089ce2 added example Foo2.thy
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   114
apply(rule at_set_avoiding2)
6c131c089ce2 added example Foo2.thy
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   115
apply(simp add: finite_supp)
6c131c089ce2 added example Foo2.thy
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   116
apply(simp add: finite_supp)
6c131c089ce2 added example Foo2.thy
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   117
apply(simp add: finite_supp)
6c131c089ce2 added example Foo2.thy
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   118
apply(simp add: foo.fresh fresh_star_def)
6c131c089ce2 added example Foo2.thy
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   119
apply(subgoal_tac "\<exists>q. (q \<bullet> (set (bn assg1))) \<sharp>* c \<and> supp ([bn assg1]lst. trm1) \<sharp>* q")
6c131c089ce2 added example Foo2.thy
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   120
apply(subgoal_tac "\<exists>q. (q \<bullet> (set (bn assg2))) \<sharp>* c \<and> supp ([bn assg2]lst. trm2) \<sharp>* q")
6c131c089ce2 added example Foo2.thy
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   121
apply(erule exE)+
6c131c089ce2 added example Foo2.thy
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   122
apply(erule conjE)+
6c131c089ce2 added example Foo2.thy
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   123
apply(rule assms(4))
6c131c089ce2 added example Foo2.thy
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   124
apply(simp add: set_eqvt union_eqvt)
6c131c089ce2 added example Foo2.thy
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   125
apply(simp add: tt1)
6c131c089ce2 added example Foo2.thy
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   126
apply(simp add: fresh_star_union)
6c131c089ce2 added example Foo2.thy
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   127
apply(rule conjI)
6c131c089ce2 added example Foo2.thy
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   128
apply(assumption)
6c131c089ce2 added example Foo2.thy
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   129
apply(rotate_tac 3)
6c131c089ce2 added example Foo2.thy
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   130
apply(assumption)
6c131c089ce2 added example Foo2.thy
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   131
apply(simp add: foo.eq_iff)
6c131c089ce2 added example Foo2.thy
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   132
apply(drule supp_perm_eq[symmetric])+
6c131c089ce2 added example Foo2.thy
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   133
apply(simp add: tt1 uu1)
6c131c089ce2 added example Foo2.thy
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   134
apply(auto)[1]
6c131c089ce2 added example Foo2.thy
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   135
apply(rule at_set_avoiding2)
6c131c089ce2 added example Foo2.thy
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   136
apply(simp add: finite_supp)
6c131c089ce2 added example Foo2.thy
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   137
apply(simp add: finite_supp)
6c131c089ce2 added example Foo2.thy
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   138
apply(simp add: finite_supp)
6c131c089ce2 added example Foo2.thy
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   139
apply(simp add: Abs_fresh_star)
6c131c089ce2 added example Foo2.thy
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   140
apply(rule at_set_avoiding2)
6c131c089ce2 added example Foo2.thy
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   141
apply(simp add: finite_supp)
6c131c089ce2 added example Foo2.thy
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   142
apply(simp add: finite_supp)
6c131c089ce2 added example Foo2.thy
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   143
apply(simp add: finite_supp)
6c131c089ce2 added example Foo2.thy
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   144
apply(simp add: Abs_fresh_star)
6c131c089ce2 added example Foo2.thy
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   145
thm foo.eq_iff
6c131c089ce2 added example Foo2.thy
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   146
apply(subgoal_tac 
6c131c089ce2 added example Foo2.thy
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   147
  "\<exists>q. (q \<bullet> {atom name1}) \<sharp>* c \<and> supp ([[atom name1]]lst. trm1) \<sharp>* q")
6c131c089ce2 added example Foo2.thy
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   148
apply(subgoal_tac 
6c131c089ce2 added example Foo2.thy
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   149
  "\<exists>q. (q \<bullet> {atom name2}) \<sharp>* c \<and> supp ([[atom name2]]lst. trm2) \<sharp>* q")
6c131c089ce2 added example Foo2.thy
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   150
apply(erule exE)+
6c131c089ce2 added example Foo2.thy
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   151
apply(erule conjE)+
6c131c089ce2 added example Foo2.thy
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   152
apply(rule assms(5))
6c131c089ce2 added example Foo2.thy
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   153
apply(perm_simp)
6c131c089ce2 added example Foo2.thy
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   154
apply(simp (no_asm) add: fresh_star_insert)
6c131c089ce2 added example Foo2.thy
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   155
apply(rule conjI)
6c131c089ce2 added example Foo2.thy
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   156
apply(simp add: fresh_star_def)
6c131c089ce2 added example Foo2.thy
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   157
apply(rotate_tac 3)
6c131c089ce2 added example Foo2.thy
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   158
apply(simp add: fresh_star_def)
6c131c089ce2 added example Foo2.thy
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   159
apply(simp)
6c131c089ce2 added example Foo2.thy
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   160
apply(simp add: foo.eq_iff)
6c131c089ce2 added example Foo2.thy
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   161
apply(drule supp_perm_eq[symmetric])+
6c131c089ce2 added example Foo2.thy
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   162
apply(simp add: atom_eqvt)
6c131c089ce2 added example Foo2.thy
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   163
apply(rule conjI)
6c131c089ce2 added example Foo2.thy
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   164
oops
6c131c089ce2 added example Foo2.thy
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   165
6c131c089ce2 added example Foo2.thy
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   166
6c131c089ce2 added example Foo2.thy
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   167
end
6c131c089ce2 added example Foo2.thy
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   168
6c131c089ce2 added example Foo2.thy
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   169
6c131c089ce2 added example Foo2.thy
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   170