Nominal/Ex/LetRecB.thy
author Christian Urban <urbanc@in.tum.de>
Tue, 28 Jun 2011 14:01:52 +0100
changeset 2915 b4bf3ff4bc91
child 2916 b55098314f83
permissions -rw-r--r--
added let-rec example
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
2915
b4bf3ff4bc91 added let-rec example
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
     1
theory LetRecB
b4bf3ff4bc91 added let-rec example
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
     2
imports "../Nominal2"
b4bf3ff4bc91 added let-rec example
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
     3
begin
b4bf3ff4bc91 added let-rec example
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
     4
b4bf3ff4bc91 added let-rec example
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
     5
atom_decl name
b4bf3ff4bc91 added let-rec example
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
     6
b4bf3ff4bc91 added let-rec example
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
     7
nominal_datatype let_rec:
b4bf3ff4bc91 added let-rec example
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
     8
 trm =
b4bf3ff4bc91 added let-rec example
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
     9
  Var "name"
b4bf3ff4bc91 added let-rec example
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    10
| App "trm" "trm"
b4bf3ff4bc91 added let-rec example
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    11
| Lam x::"name" t::"trm"     bind x in t
b4bf3ff4bc91 added let-rec example
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    12
| Let_Rec bp::"bp" t::"trm"  bind "bn bp" in bp t
b4bf3ff4bc91 added let-rec example
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    13
and bp =
b4bf3ff4bc91 added let-rec example
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    14
  Bp "name" "trm"
b4bf3ff4bc91 added let-rec example
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    15
binder
b4bf3ff4bc91 added let-rec example
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    16
  bn::"bp \<Rightarrow> atom list"
b4bf3ff4bc91 added let-rec example
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    17
where
b4bf3ff4bc91 added let-rec example
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    18
  "bn (Bp x t) = [atom x]"
b4bf3ff4bc91 added let-rec example
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    19
b4bf3ff4bc91 added let-rec example
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    20
thm let_rec.distinct
b4bf3ff4bc91 added let-rec example
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    21
thm let_rec.induct
b4bf3ff4bc91 added let-rec example
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    22
thm let_rec.exhaust
b4bf3ff4bc91 added let-rec example
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    23
thm let_rec.fv_defs
b4bf3ff4bc91 added let-rec example
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    24
thm let_rec.bn_defs
b4bf3ff4bc91 added let-rec example
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    25
thm let_rec.perm_simps
b4bf3ff4bc91 added let-rec example
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    26
thm let_rec.eq_iff
b4bf3ff4bc91 added let-rec example
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    27
thm let_rec.fv_bn_eqvt
b4bf3ff4bc91 added let-rec example
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    28
thm let_rec.size_eqvt
b4bf3ff4bc91 added let-rec example
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    29
b4bf3ff4bc91 added let-rec example
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    30
b4bf3ff4bc91 added let-rec example
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    31
lemma Abs_lst_fcb2:
b4bf3ff4bc91 added let-rec example
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    32
  fixes as bs :: "atom list"
b4bf3ff4bc91 added let-rec example
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    33
    and x y :: "'b :: fs"
b4bf3ff4bc91 added let-rec example
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    34
    and c::"'c::fs"
b4bf3ff4bc91 added let-rec example
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    35
  assumes eq: "[as]lst. x = [bs]lst. y"
b4bf3ff4bc91 added let-rec example
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    36
  and fcb1: "(set as) \<sharp>* f as x c"
b4bf3ff4bc91 added let-rec example
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    37
  and fresh1: "set as \<sharp>* c"
b4bf3ff4bc91 added let-rec example
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    38
  and fresh2: "set bs \<sharp>* c"
b4bf3ff4bc91 added let-rec example
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    39
  and perm1: "\<And>p. supp p \<sharp>* c \<Longrightarrow> p \<bullet> (f as x c) = f (p \<bullet> as) (p \<bullet> x) c"
b4bf3ff4bc91 added let-rec example
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    40
  and perm2: "\<And>p. supp p \<sharp>* c \<Longrightarrow> p \<bullet> (f bs y c) = f (p \<bullet> bs) (p \<bullet> y) c"
b4bf3ff4bc91 added let-rec example
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    41
  shows "f as x c = f bs y c"
b4bf3ff4bc91 added let-rec example
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    42
proof -
b4bf3ff4bc91 added let-rec example
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    43
  have "supp (as, x, c) supports (f as x c)"
b4bf3ff4bc91 added let-rec example
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    44
    unfolding  supports_def fresh_def[symmetric]
b4bf3ff4bc91 added let-rec example
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    45
    by (simp add: fresh_Pair perm1 fresh_star_def supp_swap swap_fresh_fresh)
b4bf3ff4bc91 added let-rec example
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    46
  then have fin1: "finite (supp (f as x c))"
b4bf3ff4bc91 added let-rec example
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    47
    by (auto intro: supports_finite simp add: finite_supp)
b4bf3ff4bc91 added let-rec example
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    48
  have "supp (bs, y, c) supports (f bs y c)"
b4bf3ff4bc91 added let-rec example
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    49
    unfolding  supports_def fresh_def[symmetric]
b4bf3ff4bc91 added let-rec example
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    50
    by (simp add: fresh_Pair perm2 fresh_star_def supp_swap swap_fresh_fresh)
b4bf3ff4bc91 added let-rec example
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    51
  then have fin2: "finite (supp (f bs y c))"
b4bf3ff4bc91 added let-rec example
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    52
    by (auto intro: supports_finite simp add: finite_supp)
b4bf3ff4bc91 added let-rec example
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    53
  obtain q::"perm" where 
b4bf3ff4bc91 added let-rec example
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    54
    fr1: "(q \<bullet> (set as)) \<sharp>* (x, c, f as x c, f bs y c)" and 
b4bf3ff4bc91 added let-rec example
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    55
    fr2: "supp q \<sharp>* Abs_lst as x" and 
b4bf3ff4bc91 added let-rec example
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    56
    inc: "supp q \<subseteq> (set as) \<union> q \<bullet> (set as)"
b4bf3ff4bc91 added let-rec example
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    57
    using at_set_avoiding3[where xs="set as" and c="(x, c, f as x c, f bs y c)" and x="[as]lst. x"]  
b4bf3ff4bc91 added let-rec example
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    58
      fin1 fin2
b4bf3ff4bc91 added let-rec example
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    59
    by (auto simp add: supp_Pair finite_supp Abs_fresh_star dest: fresh_star_supp_conv)
b4bf3ff4bc91 added let-rec example
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    60
  have "Abs_lst (q \<bullet> as) (q \<bullet> x) = q \<bullet> Abs_lst as x" by simp
b4bf3ff4bc91 added let-rec example
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    61
  also have "\<dots> = Abs_lst as x"
b4bf3ff4bc91 added let-rec example
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    62
    by (simp only: fr2 perm_supp_eq)
b4bf3ff4bc91 added let-rec example
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    63
  finally have "Abs_lst (q \<bullet> as) (q \<bullet> x) = Abs_lst bs y" using eq by simp
b4bf3ff4bc91 added let-rec example
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    64
  then obtain r::perm where 
b4bf3ff4bc91 added let-rec example
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    65
    qq1: "q \<bullet> x = r \<bullet> y" and 
b4bf3ff4bc91 added let-rec example
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    66
    qq2: "q \<bullet> as = r \<bullet> bs" and 
b4bf3ff4bc91 added let-rec example
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    67
    qq3: "supp r \<subseteq> (q \<bullet> (set as)) \<union> set bs"
b4bf3ff4bc91 added let-rec example
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    68
    apply(drule_tac sym)
b4bf3ff4bc91 added let-rec example
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    69
    apply(simp only: Abs_eq_iff2 alphas)
b4bf3ff4bc91 added let-rec example
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    70
    apply(erule exE)
b4bf3ff4bc91 added let-rec example
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    71
    apply(erule conjE)+
b4bf3ff4bc91 added let-rec example
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    72
    apply(drule_tac x="p" in meta_spec)
b4bf3ff4bc91 added let-rec example
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    73
    apply(simp add: set_eqvt)
b4bf3ff4bc91 added let-rec example
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    74
    apply(blast)
b4bf3ff4bc91 added let-rec example
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    75
    done
b4bf3ff4bc91 added let-rec example
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    76
  have "(set as) \<sharp>* f as x c" by (rule fcb1)
b4bf3ff4bc91 added let-rec example
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    77
  then have "q \<bullet> ((set as) \<sharp>* f as x c)"
b4bf3ff4bc91 added let-rec example
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    78
    by (simp add: permute_bool_def)
b4bf3ff4bc91 added let-rec example
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    79
  then have "set (q \<bullet> as) \<sharp>* f (q \<bullet> as) (q \<bullet> x) c"
b4bf3ff4bc91 added let-rec example
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    80
    apply(simp add: fresh_star_eqvt set_eqvt)
b4bf3ff4bc91 added let-rec example
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    81
    apply(subst (asm) perm1)
b4bf3ff4bc91 added let-rec example
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    82
    using inc fresh1 fr1
b4bf3ff4bc91 added let-rec example
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    83
    apply(auto simp add: fresh_star_def fresh_Pair)
b4bf3ff4bc91 added let-rec example
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    84
    done
b4bf3ff4bc91 added let-rec example
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    85
  then have "set (r \<bullet> bs) \<sharp>* f (r \<bullet> bs) (r \<bullet> y) c" using qq1 qq2 by simp
b4bf3ff4bc91 added let-rec example
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    86
  then have "r \<bullet> ((set bs) \<sharp>* f bs y c)"
b4bf3ff4bc91 added let-rec example
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    87
    apply(simp add: fresh_star_eqvt set_eqvt)
b4bf3ff4bc91 added let-rec example
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    88
    apply(subst (asm) perm2[symmetric])
b4bf3ff4bc91 added let-rec example
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    89
    using qq3 fresh2 fr1
b4bf3ff4bc91 added let-rec example
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    90
    apply(auto simp add: set_eqvt fresh_star_def fresh_Pair)
b4bf3ff4bc91 added let-rec example
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    91
    done
b4bf3ff4bc91 added let-rec example
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    92
  then have fcb2: "(set bs) \<sharp>* f bs y c" by (simp add: permute_bool_def)
b4bf3ff4bc91 added let-rec example
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    93
  have "f as x c = q \<bullet> (f as x c)"
b4bf3ff4bc91 added let-rec example
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    94
    apply(rule perm_supp_eq[symmetric])
b4bf3ff4bc91 added let-rec example
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    95
    using inc fcb1 fr1 by (auto simp add: fresh_star_def)
b4bf3ff4bc91 added let-rec example
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    96
  also have "\<dots> = f (q \<bullet> as) (q \<bullet> x) c" 
b4bf3ff4bc91 added let-rec example
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    97
    apply(rule perm1)
b4bf3ff4bc91 added let-rec example
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    98
    using inc fresh1 fr1 by (auto simp add: fresh_star_def)
b4bf3ff4bc91 added let-rec example
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    99
  also have "\<dots> = f (r \<bullet> bs) (r \<bullet> y) c" using qq1 qq2 by simp
b4bf3ff4bc91 added let-rec example
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   100
  also have "\<dots> = r \<bullet> (f bs y c)"
b4bf3ff4bc91 added let-rec example
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   101
    apply(rule perm2[symmetric])
b4bf3ff4bc91 added let-rec example
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   102
    using qq3 fresh2 fr1 by (auto simp add: fresh_star_def)
b4bf3ff4bc91 added let-rec example
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   103
  also have "... = f bs y c"
b4bf3ff4bc91 added let-rec example
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   104
    apply(rule perm_supp_eq)
b4bf3ff4bc91 added let-rec example
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   105
    using qq3 fr1 fcb2 by (auto simp add: fresh_star_def)
b4bf3ff4bc91 added let-rec example
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   106
  finally show ?thesis by simp
b4bf3ff4bc91 added let-rec example
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   107
qed
b4bf3ff4bc91 added let-rec example
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   108
b4bf3ff4bc91 added let-rec example
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   109
b4bf3ff4bc91 added let-rec example
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   110
lemma max_eqvt[eqvt]: "p \<bullet> (max (a :: _ :: pure) b) = max (p \<bullet> a) (p \<bullet> b)"
b4bf3ff4bc91 added let-rec example
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   111
  by (simp add: permute_pure)
b4bf3ff4bc91 added let-rec example
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   112
b4bf3ff4bc91 added let-rec example
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   113
nominal_primrec
b4bf3ff4bc91 added let-rec example
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   114
    height_trm :: "trm \<Rightarrow> nat"
b4bf3ff4bc91 added let-rec example
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   115
and height_bp :: "bp \<Rightarrow> nat"
b4bf3ff4bc91 added let-rec example
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   116
where
b4bf3ff4bc91 added let-rec example
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   117
  "height_trm (Var x) = 1"
b4bf3ff4bc91 added let-rec example
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   118
| "height_trm (App l r) = max (height_trm l) (height_trm r)"
b4bf3ff4bc91 added let-rec example
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   119
| "height_trm (Lam v b) = 1 + (height_trm b)"
b4bf3ff4bc91 added let-rec example
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   120
| "height_trm (Let_Rec bp b) = max (height_bp bp) (height_trm b)"
b4bf3ff4bc91 added let-rec example
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   121
| "height_bp (Bp v t) = height_trm t"
b4bf3ff4bc91 added let-rec example
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   122
  --"eqvt"
b4bf3ff4bc91 added let-rec example
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   123
  apply (simp only: eqvt_def height_trm_height_bp_graph_def)
b4bf3ff4bc91 added let-rec example
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   124
  apply (rule, perm_simp, rule, rule TrueI)
b4bf3ff4bc91 added let-rec example
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   125
  --"completeness"
b4bf3ff4bc91 added let-rec example
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   126
  apply (case_tac x)
b4bf3ff4bc91 added let-rec example
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   127
  apply (case_tac a rule: let_rec.exhaust(1))
b4bf3ff4bc91 added let-rec example
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   128
  apply (auto)[4]
b4bf3ff4bc91 added let-rec example
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   129
  apply (case_tac b rule: let_rec.exhaust(2))
b4bf3ff4bc91 added let-rec example
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   130
  apply blast
b4bf3ff4bc91 added let-rec example
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   131
  apply(simp_all)
b4bf3ff4bc91 added let-rec example
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   132
  apply (erule_tac c="()" in Abs_lst_fcb2)
b4bf3ff4bc91 added let-rec example
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   133
  apply (simp_all add: fresh_star_def pure_fresh)[3]
b4bf3ff4bc91 added let-rec example
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   134
  apply (simp add: eqvt_at_def)
b4bf3ff4bc91 added let-rec example
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   135
  apply (simp add: eqvt_at_def)
b4bf3ff4bc91 added let-rec example
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   136
  --"HERE"
b4bf3ff4bc91 added let-rec example
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   137
  thm  Abs_lst_fcb2
b4bf3ff4bc91 added let-rec example
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   138
  apply(rule Abs_lst_fcb2)
b4bf3ff4bc91 added let-rec example
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   139
     --" does not fit the assumption "
b4bf3ff4bc91 added let-rec example
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   140
b4bf3ff4bc91 added let-rec example
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   141
  apply (drule_tac c="()" in Abs_lst_fcb2)
b4bf3ff4bc91 added let-rec example
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   142
  prefer 6
b4bf3ff4bc91 added let-rec example
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   143
  apply(assumption)
b4bf3ff4bc91 added let-rec example
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   144
  apply (drule_tac c="()" in Abs_lst_fcb2)
b4bf3ff4bc91 added let-rec example
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   145
  apply (simp add: Abs_eq_iff2)
b4bf3ff4bc91 added let-rec example
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   146
  apply (simp add: alphas)
b4bf3ff4bc91 added let-rec example
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   147
  apply clarify
b4bf3ff4bc91 added let-rec example
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   148
  apply (rule trans)
b4bf3ff4bc91 added let-rec example
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   149
  apply(rule_tac p="p" in supp_perm_eq[symmetric])
b4bf3ff4bc91 added let-rec example
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   150
  apply (simp add: pure_supp fresh_star_def)
b4bf3ff4bc91 added let-rec example
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   151
  apply (simp only: eqvts)
b4bf3ff4bc91 added let-rec example
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   152
  apply (simp add: eqvt_at_def)
b4bf3ff4bc91 added let-rec example
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   153
  done
b4bf3ff4bc91 added let-rec example
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   154
b4bf3ff4bc91 added let-rec example
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   155
termination by lexicographic_order
b4bf3ff4bc91 added let-rec example
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   156
b4bf3ff4bc91 added let-rec example
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   157
end
b4bf3ff4bc91 added let-rec example
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   158
b4bf3ff4bc91 added let-rec example
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   159
b4bf3ff4bc91 added let-rec example
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   160