Nominal/Ex/CPS/CPS3_DanvyFilinski_FCB2.thy
author Christian Urban <urbanc@in.tum.de>
Tue, 05 Jul 2011 23:47:20 +0200
changeset 2951 d75b3d8529e7
parent 2934 78fc2bd14d02
child 2964 0d95e19e4f93
permissions -rw-r--r--
added some relatively simple examples from paper by Norrish
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
2934
78fc2bd14d02 Added non-working CPS3 using FCB2
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
     1
header {* CPS transformation of Danvy and Filinski *}
78fc2bd14d02 Added non-working CPS3 using FCB2
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
     2
theory CPS3_DanvyFilinski imports Lt begin
78fc2bd14d02 Added non-working CPS3 using FCB2
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
     3
78fc2bd14d02 Added non-working CPS3 using FCB2
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
     4
78fc2bd14d02 Added non-working CPS3 using FCB2
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
     5
lemma Abs_lst_fcb2:
78fc2bd14d02 Added non-working CPS3 using FCB2
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
     6
  fixes as bs :: "atom list"
78fc2bd14d02 Added non-working CPS3 using FCB2
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
     7
    and x y :: "'b :: fs"
78fc2bd14d02 Added non-working CPS3 using FCB2
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
     8
    and c::"'c::fs"
78fc2bd14d02 Added non-working CPS3 using FCB2
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
     9
  assumes eq: "[as]lst. x = [bs]lst. y"
78fc2bd14d02 Added non-working CPS3 using FCB2
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
    10
  and fcb1: "(set as) \<sharp>* c \<Longrightarrow> (set as) \<sharp>* f as x c"
78fc2bd14d02 Added non-working CPS3 using FCB2
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
    11
  and fresh1: "set as \<sharp>* c"
78fc2bd14d02 Added non-working CPS3 using FCB2
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
    12
  and fresh2: "set bs \<sharp>* c"
78fc2bd14d02 Added non-working CPS3 using FCB2
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
    13
  and perm1: "\<And>p. supp p \<sharp>* c \<Longrightarrow> p \<bullet> (f as x c) = f (p \<bullet> as) (p \<bullet> x) c"
78fc2bd14d02 Added non-working CPS3 using FCB2
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
    14
  and perm2: "\<And>p. supp p \<sharp>* c \<Longrightarrow> p \<bullet> (f bs y c) = f (p \<bullet> bs) (p \<bullet> y) c"
78fc2bd14d02 Added non-working CPS3 using FCB2
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
    15
  shows "f as x c = f bs y c"
78fc2bd14d02 Added non-working CPS3 using FCB2
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
    16
proof -
78fc2bd14d02 Added non-working CPS3 using FCB2
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
    17
  have "supp (as, x, c) supports (f as x c)"
78fc2bd14d02 Added non-working CPS3 using FCB2
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
    18
    unfolding  supports_def fresh_def[symmetric]
78fc2bd14d02 Added non-working CPS3 using FCB2
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
    19
    by (simp add: fresh_Pair perm1 fresh_star_def supp_swap swap_fresh_fresh)
78fc2bd14d02 Added non-working CPS3 using FCB2
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
    20
  then have fin1: "finite (supp (f as x c))"
78fc2bd14d02 Added non-working CPS3 using FCB2
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
    21
    by (auto intro: supports_finite simp add: finite_supp)
78fc2bd14d02 Added non-working CPS3 using FCB2
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
    22
  have "supp (bs, y, c) supports (f bs y c)"
78fc2bd14d02 Added non-working CPS3 using FCB2
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
    23
    unfolding  supports_def fresh_def[symmetric]
78fc2bd14d02 Added non-working CPS3 using FCB2
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
    24
    by (simp add: fresh_Pair perm2 fresh_star_def supp_swap swap_fresh_fresh)
78fc2bd14d02 Added non-working CPS3 using FCB2
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
    25
  then have fin2: "finite (supp (f bs y c))"
78fc2bd14d02 Added non-working CPS3 using FCB2
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
    26
    by (auto intro: supports_finite simp add: finite_supp)
78fc2bd14d02 Added non-working CPS3 using FCB2
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
    27
  obtain q::"perm" where 
78fc2bd14d02 Added non-working CPS3 using FCB2
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
    28
    fr1: "(q \<bullet> (set as)) \<sharp>* (x, c, f as x c, f bs y c)" and 
78fc2bd14d02 Added non-working CPS3 using FCB2
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
    29
    fr2: "supp q \<sharp>* Abs_lst as x" and 
78fc2bd14d02 Added non-working CPS3 using FCB2
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
    30
    inc: "supp q \<subseteq> (set as) \<union> q \<bullet> (set as)"
78fc2bd14d02 Added non-working CPS3 using FCB2
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
    31
    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"]  
78fc2bd14d02 Added non-working CPS3 using FCB2
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
    32
      fin1 fin2
78fc2bd14d02 Added non-working CPS3 using FCB2
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
    33
    by (auto simp add: supp_Pair finite_supp Abs_fresh_star dest: fresh_star_supp_conv)
78fc2bd14d02 Added non-working CPS3 using FCB2
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
    34
  have "Abs_lst (q \<bullet> as) (q \<bullet> x) = q \<bullet> Abs_lst as x" by simp
78fc2bd14d02 Added non-working CPS3 using FCB2
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
    35
  also have "\<dots> = Abs_lst as x"
78fc2bd14d02 Added non-working CPS3 using FCB2
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
    36
    by (simp only: fr2 perm_supp_eq)
78fc2bd14d02 Added non-working CPS3 using FCB2
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
    37
  finally have "Abs_lst (q \<bullet> as) (q \<bullet> x) = Abs_lst bs y" using eq by simp
78fc2bd14d02 Added non-working CPS3 using FCB2
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
    38
  then obtain r::perm where 
78fc2bd14d02 Added non-working CPS3 using FCB2
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
    39
    qq1: "q \<bullet> x = r \<bullet> y" and 
78fc2bd14d02 Added non-working CPS3 using FCB2
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
    40
    qq2: "q \<bullet> as = r \<bullet> bs" and 
78fc2bd14d02 Added non-working CPS3 using FCB2
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
    41
    qq3: "supp r \<subseteq> (q \<bullet> (set as)) \<union> set bs"
78fc2bd14d02 Added non-working CPS3 using FCB2
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
    42
    apply(drule_tac sym)
78fc2bd14d02 Added non-working CPS3 using FCB2
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
    43
    apply(simp only: Abs_eq_iff2 alphas)
78fc2bd14d02 Added non-working CPS3 using FCB2
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
    44
    apply(erule exE)
78fc2bd14d02 Added non-working CPS3 using FCB2
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
    45
    apply(erule conjE)+
78fc2bd14d02 Added non-working CPS3 using FCB2
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
    46
    apply(drule_tac x="p" in meta_spec)
78fc2bd14d02 Added non-working CPS3 using FCB2
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
    47
    apply(simp add: set_eqvt)
78fc2bd14d02 Added non-working CPS3 using FCB2
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
    48
    apply(blast)
78fc2bd14d02 Added non-working CPS3 using FCB2
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
    49
    done
78fc2bd14d02 Added non-working CPS3 using FCB2
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
    50
  have "(set as) \<sharp>* f as x c" 
78fc2bd14d02 Added non-working CPS3 using FCB2
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
    51
    apply(rule fcb1)
78fc2bd14d02 Added non-working CPS3 using FCB2
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
    52
    apply(rule fresh1)
78fc2bd14d02 Added non-working CPS3 using FCB2
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
    53
    done
78fc2bd14d02 Added non-working CPS3 using FCB2
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
    54
  then have "q \<bullet> ((set as) \<sharp>* f as x c)"
78fc2bd14d02 Added non-working CPS3 using FCB2
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
    55
    by (simp add: permute_bool_def)
78fc2bd14d02 Added non-working CPS3 using FCB2
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
    56
  then have "set (q \<bullet> as) \<sharp>* f (q \<bullet> as) (q \<bullet> x) c"
78fc2bd14d02 Added non-working CPS3 using FCB2
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
    57
    apply(simp add: fresh_star_eqvt set_eqvt)
78fc2bd14d02 Added non-working CPS3 using FCB2
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
    58
    apply(subst (asm) perm1)
78fc2bd14d02 Added non-working CPS3 using FCB2
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
    59
    using inc fresh1 fr1
78fc2bd14d02 Added non-working CPS3 using FCB2
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
    60
    apply(auto simp add: fresh_star_def fresh_Pair)
78fc2bd14d02 Added non-working CPS3 using FCB2
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
    61
    done
78fc2bd14d02 Added non-working CPS3 using FCB2
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
    62
  then have "set (r \<bullet> bs) \<sharp>* f (r \<bullet> bs) (r \<bullet> y) c" using qq1 qq2 by simp
78fc2bd14d02 Added non-working CPS3 using FCB2
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
    63
  then have "r \<bullet> ((set bs) \<sharp>* f bs y c)"
78fc2bd14d02 Added non-working CPS3 using FCB2
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
    64
    apply(simp add: fresh_star_eqvt set_eqvt)
78fc2bd14d02 Added non-working CPS3 using FCB2
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
    65
    apply(subst (asm) perm2[symmetric])
78fc2bd14d02 Added non-working CPS3 using FCB2
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
    66
    using qq3 fresh2 fr1
78fc2bd14d02 Added non-working CPS3 using FCB2
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
    67
    apply(auto simp add: set_eqvt fresh_star_def fresh_Pair)
78fc2bd14d02 Added non-working CPS3 using FCB2
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
    68
    done
78fc2bd14d02 Added non-working CPS3 using FCB2
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
    69
  then have fcb2: "(set bs) \<sharp>* f bs y c" by (simp add: permute_bool_def)
78fc2bd14d02 Added non-working CPS3 using FCB2
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
    70
  have "f as x c = q \<bullet> (f as x c)"
78fc2bd14d02 Added non-working CPS3 using FCB2
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
    71
    apply(rule perm_supp_eq[symmetric])
78fc2bd14d02 Added non-working CPS3 using FCB2
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
    72
    using inc fcb1[OF fresh1] fr1 by (auto simp add: fresh_star_def)
78fc2bd14d02 Added non-working CPS3 using FCB2
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
    73
  also have "\<dots> = f (q \<bullet> as) (q \<bullet> x) c" 
78fc2bd14d02 Added non-working CPS3 using FCB2
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
    74
    apply(rule perm1)
78fc2bd14d02 Added non-working CPS3 using FCB2
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
    75
    using inc fresh1 fr1 by (auto simp add: fresh_star_def)
78fc2bd14d02 Added non-working CPS3 using FCB2
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
    76
  also have "\<dots> = f (r \<bullet> bs) (r \<bullet> y) c" using qq1 qq2 by simp
78fc2bd14d02 Added non-working CPS3 using FCB2
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
    77
  also have "\<dots> = r \<bullet> (f bs y c)"
78fc2bd14d02 Added non-working CPS3 using FCB2
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
    78
    apply(rule perm2[symmetric])
78fc2bd14d02 Added non-working CPS3 using FCB2
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
    79
    using qq3 fresh2 fr1 by (auto simp add: fresh_star_def)
78fc2bd14d02 Added non-working CPS3 using FCB2
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
    80
  also have "... = f bs y c"
78fc2bd14d02 Added non-working CPS3 using FCB2
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
    81
    apply(rule perm_supp_eq)
78fc2bd14d02 Added non-working CPS3 using FCB2
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
    82
    using qq3 fr1 fcb2 by (auto simp add: fresh_star_def)
78fc2bd14d02 Added non-working CPS3 using FCB2
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
    83
  finally show ?thesis by simp
78fc2bd14d02 Added non-working CPS3 using FCB2
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
    84
qed
78fc2bd14d02 Added non-working CPS3 using FCB2
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
    85
78fc2bd14d02 Added non-working CPS3 using FCB2
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
    86
lemma Abs_lst1_fcb2:
78fc2bd14d02 Added non-working CPS3 using FCB2
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
    87
  fixes a b :: "atom"
78fc2bd14d02 Added non-working CPS3 using FCB2
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
    88
    and x y :: "'b :: fs"
78fc2bd14d02 Added non-working CPS3 using FCB2
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
    89
    and c::"'c :: fs"
78fc2bd14d02 Added non-working CPS3 using FCB2
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
    90
  assumes e: "(Abs_lst [a] x) = (Abs_lst [b] y)"
78fc2bd14d02 Added non-working CPS3 using FCB2
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
    91
  and fcb1: "a \<sharp> c \<Longrightarrow> a \<sharp> f a x c"
78fc2bd14d02 Added non-working CPS3 using FCB2
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
    92
  and fresh: "{a, b} \<sharp>* c"
78fc2bd14d02 Added non-working CPS3 using FCB2
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
    93
  and perm1: "\<And>p. supp p \<sharp>* c \<Longrightarrow> p \<bullet> (f a x c) = f (p \<bullet> a) (p \<bullet> x) c"
78fc2bd14d02 Added non-working CPS3 using FCB2
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
    94
  and perm2: "\<And>p. supp p \<sharp>* c \<Longrightarrow> p \<bullet> (f b y c) = f (p \<bullet> b) (p \<bullet> y) c"
78fc2bd14d02 Added non-working CPS3 using FCB2
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
    95
  shows "f a x c = f b y c"
78fc2bd14d02 Added non-working CPS3 using FCB2
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
    96
using e
78fc2bd14d02 Added non-working CPS3 using FCB2
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
    97
apply(drule_tac Abs_lst_fcb2[where c="c" and f="\<lambda>(as::atom list) . f (hd as)"])
78fc2bd14d02 Added non-working CPS3 using FCB2
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
    98
apply(simp_all)
78fc2bd14d02 Added non-working CPS3 using FCB2
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
    99
using fcb1 fresh perm1 perm2
78fc2bd14d02 Added non-working CPS3 using FCB2
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
   100
apply(simp_all add: fresh_star_def)
78fc2bd14d02 Added non-working CPS3 using FCB2
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
   101
done
78fc2bd14d02 Added non-working CPS3 using FCB2
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
   102
78fc2bd14d02 Added non-working CPS3 using FCB2
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
   103
nominal_primrec
78fc2bd14d02 Added non-working CPS3 using FCB2
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
   104
  CPS1 :: "lt \<Rightarrow> (lt \<Rightarrow> lt) \<Rightarrow> lt" ("_*_"  [100,100] 100)
78fc2bd14d02 Added non-working CPS3 using FCB2
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
   105
and
78fc2bd14d02 Added non-working CPS3 using FCB2
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
   106
  CPS2 :: "lt \<Rightarrow> lt \<Rightarrow> lt" ("_^_" [100,100] 100)
78fc2bd14d02 Added non-working CPS3 using FCB2
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
   107
where
78fc2bd14d02 Added non-working CPS3 using FCB2
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
   108
  "eqvt k \<Longrightarrow> (x~)*k = k (x~)"
78fc2bd14d02 Added non-working CPS3 using FCB2
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
   109
| "eqvt k \<Longrightarrow> (M$N)*k = M*(%m. (N*(%n.((m $ n) $ (Abs c (k (c~)))))))"
78fc2bd14d02 Added non-working CPS3 using FCB2
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
   110
| "eqvt k \<Longrightarrow> atom c \<sharp> (x, M) \<Longrightarrow> (Abs x M)*k = k (Abs x (Abs c (M^(c~))))"
78fc2bd14d02 Added non-working CPS3 using FCB2
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
   111
| "\<not>eqvt k \<Longrightarrow> (CPS1 t k) = t"
78fc2bd14d02 Added non-working CPS3 using FCB2
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
   112
| "(x~)^l = l $ (x~)"
78fc2bd14d02 Added non-working CPS3 using FCB2
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
   113
| "(M$N)^l = M*(%m. (N*(%n.((m $ n) $ l))))"
78fc2bd14d02 Added non-working CPS3 using FCB2
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
   114
| "atom c \<sharp> (x, M) \<Longrightarrow> (Abs x M)^l = l $ (Abs x (Abs c (M^(c~))))"
78fc2bd14d02 Added non-working CPS3 using FCB2
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
   115
  apply (simp only: eqvt_def CPS1_CPS2_graph_def)
78fc2bd14d02 Added non-working CPS3 using FCB2
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
   116
  apply (rule, perm_simp, rule)
78fc2bd14d02 Added non-working CPS3 using FCB2
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
   117
  apply auto
78fc2bd14d02 Added non-working CPS3 using FCB2
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
   118
  apply (case_tac x)
78fc2bd14d02 Added non-working CPS3 using FCB2
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
   119
  apply (case_tac a)
78fc2bd14d02 Added non-working CPS3 using FCB2
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
   120
  apply (case_tac "eqvt b")
78fc2bd14d02 Added non-working CPS3 using FCB2
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
   121
  apply (rule_tac y="aa" in lt.strong_exhaust)
78fc2bd14d02 Added non-working CPS3 using FCB2
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
   122
  apply auto[4]
78fc2bd14d02 Added non-working CPS3 using FCB2
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
   123
  apply (rule_tac x="(name, lt)" and ?'a="name" in obtain_fresh)
78fc2bd14d02 Added non-working CPS3 using FCB2
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
   124
  apply (simp add: fresh_at_base Abs1_eq_iff)
78fc2bd14d02 Added non-working CPS3 using FCB2
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
   125
  apply (case_tac b)
78fc2bd14d02 Added non-working CPS3 using FCB2
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
   126
  apply (rule_tac y="a" in lt.strong_exhaust)
78fc2bd14d02 Added non-working CPS3 using FCB2
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
   127
  apply auto[3]
78fc2bd14d02 Added non-working CPS3 using FCB2
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
   128
  apply blast
78fc2bd14d02 Added non-working CPS3 using FCB2
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
   129
  apply (rule_tac x="(name, lt)" and ?'a="name" in obtain_fresh) 
78fc2bd14d02 Added non-working CPS3 using FCB2
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
   130
  apply (simp add: fresh_at_base Abs1_eq_iff)
78fc2bd14d02 Added non-working CPS3 using FCB2
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
   131
  apply blast
78fc2bd14d02 Added non-working CPS3 using FCB2
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
   132
--"-"
78fc2bd14d02 Added non-working CPS3 using FCB2
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
   133
  apply (subgoal_tac "Abs c (ka (c~)) = Abs ca (ka (ca~))")
78fc2bd14d02 Added non-working CPS3 using FCB2
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
   134
  apply (simp only:)
78fc2bd14d02 Added non-working CPS3 using FCB2
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
   135
  apply (simp add: Abs1_eq_iff)
78fc2bd14d02 Added non-working CPS3 using FCB2
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
   136
  apply (case_tac "c=ca")
78fc2bd14d02 Added non-working CPS3 using FCB2
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
   137
  apply simp_all[2]
78fc2bd14d02 Added non-working CPS3 using FCB2
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
   138
  apply rule
78fc2bd14d02 Added non-working CPS3 using FCB2
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
   139
  apply (perm_simp)
78fc2bd14d02 Added non-working CPS3 using FCB2
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
   140
  apply (simp add: eqvt_def)
78fc2bd14d02 Added non-working CPS3 using FCB2
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
   141
  apply (simp add: fresh_def)
78fc2bd14d02 Added non-working CPS3 using FCB2
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
   142
  apply (rule contra_subsetD[OF supp_fun_app])
78fc2bd14d02 Added non-working CPS3 using FCB2
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
   143
  back
78fc2bd14d02 Added non-working CPS3 using FCB2
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
   144
  apply (simp add: supp_fun_eqvt lt.supp supp_at_base)
78fc2bd14d02 Added non-working CPS3 using FCB2
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
   145
--"-"
78fc2bd14d02 Added non-working CPS3 using FCB2
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
   146
  apply (rule arg_cong)
78fc2bd14d02 Added non-working CPS3 using FCB2
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
   147
  back
78fc2bd14d02 Added non-working CPS3 using FCB2
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
   148
  apply simp
78fc2bd14d02 Added non-working CPS3 using FCB2
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
   149
  apply (erule Abs_lst1_fcb2)
78fc2bd14d02 Added non-working CPS3 using FCB2
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
   150
  apply simp
78fc2bd14d02 Added non-working CPS3 using FCB2
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
   151
  apply (thin_tac "eqvt ka")
78fc2bd14d02 Added non-working CPS3 using FCB2
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
   152
  apply (rule_tac x="(c, ca, x, xa, M, Ma)" and ?'a="name" in obtain_fresh)
78fc2bd14d02 Added non-working CPS3 using FCB2
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
   153
  apply (subgoal_tac "Abs c (CPS1_CPS2_sumC (Inr (M, c~))) = Abs a (CPS1_CPS2_sumC (Inr (M, a~)))")
78fc2bd14d02 Added non-working CPS3 using FCB2
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
   154
  prefer 2
78fc2bd14d02 Added non-working CPS3 using FCB2
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
   155
  apply (simp add: Abs1_eq_iff')
78fc2bd14d02 Added non-working CPS3 using FCB2
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
   156
  apply (case_tac "c = a")
78fc2bd14d02 Added non-working CPS3 using FCB2
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
   157
  apply simp_all[2]
78fc2bd14d02 Added non-working CPS3 using FCB2
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
   158
  apply rule
78fc2bd14d02 Added non-working CPS3 using FCB2
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
   159
  apply (simp add: eqvt_at_def)
78fc2bd14d02 Added non-working CPS3 using FCB2
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
   160
  apply (simp add: swap_fresh_fresh fresh_Pair_elim)
78fc2bd14d02 Added non-working CPS3 using FCB2
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
   161
  apply (erule fresh_eqvt_at)
78fc2bd14d02 Added non-working CPS3 using FCB2
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
   162
  apply (simp add: supp_Inr finite_supp)
78fc2bd14d02 Added non-working CPS3 using FCB2
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
   163
  apply (simp add: fresh_Inr fresh_Pair lt.fresh fresh_at_base)
78fc2bd14d02 Added non-working CPS3 using FCB2
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
   164
  apply (subgoal_tac "Abs ca (CPS1_CPS2_sumC (Inr (Ma, ca~))) = Abs a (CPS1_CPS2_sumC (Inr (Ma, a~)))")
78fc2bd14d02 Added non-working CPS3 using FCB2
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
   165
  prefer 2
78fc2bd14d02 Added non-working CPS3 using FCB2
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
   166
  apply (simp add: Abs1_eq_iff')
78fc2bd14d02 Added non-working CPS3 using FCB2
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
   167
  apply (case_tac "ca = a")
78fc2bd14d02 Added non-working CPS3 using FCB2
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
   168
  apply simp_all[2]
78fc2bd14d02 Added non-working CPS3 using FCB2
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
   169
  apply rule
78fc2bd14d02 Added non-working CPS3 using FCB2
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
   170
  apply (simp add: eqvt_at_def)
78fc2bd14d02 Added non-working CPS3 using FCB2
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
   171
  apply (simp add: swap_fresh_fresh fresh_Pair_elim)
78fc2bd14d02 Added non-working CPS3 using FCB2
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
   172
  apply (erule fresh_eqvt_at)
78fc2bd14d02 Added non-working CPS3 using FCB2
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
   173
  apply (simp add: supp_Inr finite_supp)
78fc2bd14d02 Added non-working CPS3 using FCB2
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
   174
  apply (simp add: fresh_Inr fresh_Pair lt.fresh fresh_at_base)
78fc2bd14d02 Added non-working CPS3 using FCB2
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
   175
  apply (simp only: )
78fc2bd14d02 Added non-working CPS3 using FCB2
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
   176
  apply (erule Abs_lst1_fcb2)
78fc2bd14d02 Added non-working CPS3 using FCB2
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
   177
  apply (simp add: Abs_fresh_iff)
78fc2bd14d02 Added non-working CPS3 using FCB2
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
   178
  apply (simp add: fresh_star_def fresh_Pair_elim lt.fresh fresh_at_base)
78fc2bd14d02 Added non-working CPS3 using FCB2
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
   179
  apply (subgoal_tac "p \<bullet> CPS1_CPS2_sumC (Inr (M, a~)) = CPS1_CPS2_sumC (p \<bullet> (Inr (M, a~)))")
78fc2bd14d02 Added non-working CPS3 using FCB2
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
   180
  apply (simp add: perm_supp_eq fresh_star_def lt.fresh)
78fc2bd14d02 Added non-working CPS3 using FCB2
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
   181
  apply (drule sym)
78fc2bd14d02 Added non-working CPS3 using FCB2
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
   182
  apply (simp only: )
78fc2bd14d02 Added non-working CPS3 using FCB2
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
   183
  apply (simp only: permute_Abs_lst)
78fc2bd14d02 Added non-working CPS3 using FCB2
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
   184
  apply simp
78fc2bd14d02 Added non-working CPS3 using FCB2
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
   185
  apply (simp add: eqvt_at_def)
78fc2bd14d02 Added non-working CPS3 using FCB2
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
   186
  apply (drule sym)
78fc2bd14d02 Added non-working CPS3 using FCB2
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
   187
  apply (simp only:)
78fc2bd14d02 Added non-working CPS3 using FCB2
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
   188
  apply (simp add: Abs_fresh_iff lt.fresh)
78fc2bd14d02 Added non-working CPS3 using FCB2
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
   189
  apply clarify
78fc2bd14d02 Added non-working CPS3 using FCB2
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
   190
  apply (erule fresh_eqvt_at)
78fc2bd14d02 Added non-working CPS3 using FCB2
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
   191
  apply (simp add: supp_Inr finite_supp)
78fc2bd14d02 Added non-working CPS3 using FCB2
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
   192
  apply (simp add: fresh_Inr fresh_Pair lt.fresh fresh_at_base)
78fc2bd14d02 Added non-working CPS3 using FCB2
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
   193
  apply (drule sym)
78fc2bd14d02 Added non-working CPS3 using FCB2
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
   194
  apply (drule sym)
78fc2bd14d02 Added non-working CPS3 using FCB2
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
   195
  apply (drule sym)
78fc2bd14d02 Added non-working CPS3 using FCB2
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
   196
  apply (simp only:)
78fc2bd14d02 Added non-working CPS3 using FCB2
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
   197
  apply (thin_tac "Abs a (CPS1_CPS2_sumC (Inr (M, a~))) = Abs c (CPS1_CPS2_sumC (Inr (M, c~)))")
78fc2bd14d02 Added non-working CPS3 using FCB2
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
   198
  apply (thin_tac "Abs a (CPS1_CPS2_sumC (Inr (Ma, a~))) = Abs ca (CPS1_CPS2_sumC (Inr (Ma, ca~)))")
78fc2bd14d02 Added non-working CPS3 using FCB2
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
   199
  apply (thin_tac "atom a \<sharp> (c, ca, x, xa, M, Ma)")
78fc2bd14d02 Added non-working CPS3 using FCB2
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
   200
  apply (simp add: fresh_Pair_elim)
78fc2bd14d02 Added non-working CPS3 using FCB2
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
   201
  apply (subst iffD1[OF meta_eq_to_obj_eq[OF eqvt_at_def]])
78fc2bd14d02 Added non-working CPS3 using FCB2
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
   202
  back
78fc2bd14d02 Added non-working CPS3 using FCB2
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
   203
  back
78fc2bd14d02 Added non-working CPS3 using FCB2
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
   204
  back
78fc2bd14d02 Added non-working CPS3 using FCB2
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
   205
  apply assumption
78fc2bd14d02 Added non-working CPS3 using FCB2
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
   206
  apply (simp add: Abs1_eq_iff' fresh_Pair_elim fresh_at_base swap_fresh_fresh lt.fresh)
78fc2bd14d02 Added non-working CPS3 using FCB2
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
   207
  apply (case_tac "(atom x \<rightleftharpoons> atom xa) \<bullet> c = ca")
78fc2bd14d02 Added non-working CPS3 using FCB2
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
   208
  apply simp_all[3]
78fc2bd14d02 Added non-working CPS3 using FCB2
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
   209
  apply rule
78fc2bd14d02 Added non-working CPS3 using FCB2
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
   210
  apply (case_tac "c = xa")
78fc2bd14d02 Added non-working CPS3 using FCB2
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
   211
  apply simp_all[2]
78fc2bd14d02 Added non-working CPS3 using FCB2
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
   212
  apply (simp add: eqvt_at_def)
78fc2bd14d02 Added non-working CPS3 using FCB2
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
   213
  apply clarify
78fc2bd14d02 Added non-working CPS3 using FCB2
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
   214
  apply (smt flip_def permute_flip_at permute_swap_cancel swap_fresh_fresh)
78fc2bd14d02 Added non-working CPS3 using FCB2
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
   215
  apply (simp add: eqvt_at_def)
78fc2bd14d02 Added non-working CPS3 using FCB2
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
   216
  apply clarify
78fc2bd14d02 Added non-working CPS3 using FCB2
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
   217
  apply (smt atom_eq_iff atom_eqvt flip_def fresh_eqvt permute_flip_at permute_swap_cancel swap_at_base_simps(3) swap_fresh_fresh)
78fc2bd14d02 Added non-working CPS3 using FCB2
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
   218
  apply (case_tac "c = xa")
78fc2bd14d02 Added non-working CPS3 using FCB2
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
   219
  apply simp
78fc2bd14d02 Added non-working CPS3 using FCB2
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
   220
  apply (subgoal_tac "((ca \<leftrightarrow> x) \<bullet> (atom x)) \<sharp> (ca \<leftrightarrow> x) \<bullet> CPS1_CPS2_sumC (Inr (Ma, ca~))")
78fc2bd14d02 Added non-working CPS3 using FCB2
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
   221
  apply (simp add: atom_eqvt eqvt_at_def)
78fc2bd14d02 Added non-working CPS3 using FCB2
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
   222
  apply (simp add: flip_fresh_fresh)
78fc2bd14d02 Added non-working CPS3 using FCB2
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
   223
  apply (subst fresh_permute_iff)
78fc2bd14d02 Added non-working CPS3 using FCB2
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
   224
  apply (erule fresh_eqvt_at)
78fc2bd14d02 Added non-working CPS3 using FCB2
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
   225
  apply (simp add: supp_Inr finite_supp)
78fc2bd14d02 Added non-working CPS3 using FCB2
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
   226
  apply (simp add: fresh_Inr lt.fresh fresh_at_base fresh_Pair)
78fc2bd14d02 Added non-working CPS3 using FCB2
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
   227
  apply simp
78fc2bd14d02 Added non-working CPS3 using FCB2
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
   228
  apply clarify
78fc2bd14d02 Added non-working CPS3 using FCB2
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
   229
  apply (subgoal_tac "atom ca \<sharp> (atom x \<rightleftharpoons> atom xa) \<bullet> CPS1_CPS2_sumC (Inr (M, c~))")
78fc2bd14d02 Added non-working CPS3 using FCB2
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
   230
  apply (simp add: eqvt_at_def)
78fc2bd14d02 Added non-working CPS3 using FCB2
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
   231
  apply (subgoal_tac "(atom x \<rightleftharpoons> atom xa) \<bullet> atom ca \<sharp> CPS1_CPS2_sumC (Inr (M, c~))")
78fc2bd14d02 Added non-working CPS3 using FCB2
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
   232
  apply (metis Nominal2_Base.swap_commute fresh_permute_iff permute_swap_cancel2)
78fc2bd14d02 Added non-working CPS3 using FCB2
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
   233
  apply (erule fresh_eqvt_at)
78fc2bd14d02 Added non-working CPS3 using FCB2
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
   234
  apply (simp add: finite_supp supp_Inr)
78fc2bd14d02 Added non-working CPS3 using FCB2
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
   235
  apply (simp add: fresh_Inr fresh_Pair lt.fresh)
78fc2bd14d02 Added non-working CPS3 using FCB2
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
   236
  apply rule
78fc2bd14d02 Added non-working CPS3 using FCB2
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
   237
  apply (metis Nominal2_Base.swap_commute fresh_permute_iff permute_swap_cancel2)
78fc2bd14d02 Added non-working CPS3 using FCB2
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
   238
  apply (simp add: fresh_def supp_at_base)
78fc2bd14d02 Added non-working CPS3 using FCB2
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
   239
  apply (metis atom_eq_iff permute_swap_cancel2 swap_atom_simps(3))
78fc2bd14d02 Added non-working CPS3 using FCB2
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
   240
--"-"
78fc2bd14d02 Added non-working CPS3 using FCB2
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
   241
  apply (rule_tac x="(c, ca, x, xa, M, Ma)" and ?'a="name" in obtain_fresh)
78fc2bd14d02 Added non-working CPS3 using FCB2
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
   242
  apply (subgoal_tac "Abs c (CPS1_CPS2_sumC (Inr (M, c~))) = Abs a (CPS1_CPS2_sumC (Inr (M, a~)))")
78fc2bd14d02 Added non-working CPS3 using FCB2
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
   243
  prefer 2
78fc2bd14d02 Added non-working CPS3 using FCB2
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
   244
  apply (simp add: Abs1_eq_iff')
78fc2bd14d02 Added non-working CPS3 using FCB2
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
   245
  apply (case_tac "c = a")
78fc2bd14d02 Added non-working CPS3 using FCB2
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
   246
  apply simp_all[2]
78fc2bd14d02 Added non-working CPS3 using FCB2
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
   247
  apply rule
78fc2bd14d02 Added non-working CPS3 using FCB2
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
   248
  apply (simp add: eqvt_at_def)
78fc2bd14d02 Added non-working CPS3 using FCB2
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
   249
  apply (simp add: swap_fresh_fresh fresh_Pair_elim)
78fc2bd14d02 Added non-working CPS3 using FCB2
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
   250
  apply (erule fresh_eqvt_at)
78fc2bd14d02 Added non-working CPS3 using FCB2
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
   251
  apply (simp add: supp_Inr finite_supp)
78fc2bd14d02 Added non-working CPS3 using FCB2
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
   252
  apply (simp add: fresh_Inr fresh_Pair lt.fresh fresh_at_base)
78fc2bd14d02 Added non-working CPS3 using FCB2
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
   253
  apply (subgoal_tac "Abs ca (CPS1_CPS2_sumC (Inr (Ma, ca~))) = Abs a (CPS1_CPS2_sumC (Inr (Ma, a~)))")
78fc2bd14d02 Added non-working CPS3 using FCB2
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
   254
  prefer 2
78fc2bd14d02 Added non-working CPS3 using FCB2
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
   255
  apply (simp add: Abs1_eq_iff')
78fc2bd14d02 Added non-working CPS3 using FCB2
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
   256
  apply (case_tac "ca = a")
78fc2bd14d02 Added non-working CPS3 using FCB2
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
   257
  apply simp_all[2]
78fc2bd14d02 Added non-working CPS3 using FCB2
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
   258
  apply rule
78fc2bd14d02 Added non-working CPS3 using FCB2
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
   259
  apply (simp add: eqvt_at_def)
78fc2bd14d02 Added non-working CPS3 using FCB2
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
   260
  apply (simp add: swap_fresh_fresh fresh_Pair_elim)
78fc2bd14d02 Added non-working CPS3 using FCB2
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
   261
  apply (erule fresh_eqvt_at)
78fc2bd14d02 Added non-working CPS3 using FCB2
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
   262
  apply (simp add: supp_Inr finite_supp)
78fc2bd14d02 Added non-working CPS3 using FCB2
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
   263
  apply (simp add: fresh_Inr fresh_Pair lt.fresh fresh_at_base)
78fc2bd14d02 Added non-working CPS3 using FCB2
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
   264
  apply (simp only: )
78fc2bd14d02 Added non-working CPS3 using FCB2
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
   265
  apply (erule Abs_lst1_fcb)
78fc2bd14d02 Added non-working CPS3 using FCB2
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
   266
  apply (simp add: Abs_fresh_iff)
78fc2bd14d02 Added non-working CPS3 using FCB2
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
   267
  apply (drule sym)
78fc2bd14d02 Added non-working CPS3 using FCB2
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
   268
  apply (simp only:)
78fc2bd14d02 Added non-working CPS3 using FCB2
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
   269
  apply (simp add: Abs_fresh_iff lt.fresh)
78fc2bd14d02 Added non-working CPS3 using FCB2
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
   270
  apply clarify
78fc2bd14d02 Added non-working CPS3 using FCB2
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
   271
  apply (erule fresh_eqvt_at)
78fc2bd14d02 Added non-working CPS3 using FCB2
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
   272
  apply (simp add: supp_Inr finite_supp)
78fc2bd14d02 Added non-working CPS3 using FCB2
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
   273
  apply (simp add: fresh_Inr fresh_Pair lt.fresh fresh_at_base)
78fc2bd14d02 Added non-working CPS3 using FCB2
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
   274
  apply (drule sym)
78fc2bd14d02 Added non-working CPS3 using FCB2
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
   275
  apply (drule sym)
78fc2bd14d02 Added non-working CPS3 using FCB2
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
   276
  apply (drule sym)
78fc2bd14d02 Added non-working CPS3 using FCB2
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
   277
  apply (simp only:)
78fc2bd14d02 Added non-working CPS3 using FCB2
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
   278
  apply (thin_tac "Abs a (CPS1_CPS2_sumC (Inr (M, a~))) = Abs c (CPS1_CPS2_sumC (Inr (M, c~)))")
78fc2bd14d02 Added non-working CPS3 using FCB2
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
   279
  apply (thin_tac "Abs a (CPS1_CPS2_sumC (Inr (Ma, a~))) = Abs ca (CPS1_CPS2_sumC (Inr (Ma, ca~)))")
78fc2bd14d02 Added non-working CPS3 using FCB2
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
   280
  apply (thin_tac "atom a \<sharp> (c, ca, x, xa, M, Ma)")
78fc2bd14d02 Added non-working CPS3 using FCB2
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
   281
  apply (simp add: fresh_Pair_elim)
78fc2bd14d02 Added non-working CPS3 using FCB2
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
   282
  apply (subst iffD1[OF meta_eq_to_obj_eq[OF eqvt_at_def]])
78fc2bd14d02 Added non-working CPS3 using FCB2
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
   283
  back
78fc2bd14d02 Added non-working CPS3 using FCB2
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
   284
  back
78fc2bd14d02 Added non-working CPS3 using FCB2
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
   285
  back
78fc2bd14d02 Added non-working CPS3 using FCB2
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
   286
  apply assumption
78fc2bd14d02 Added non-working CPS3 using FCB2
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
   287
  apply (simp add: Abs1_eq_iff' fresh_Pair_elim fresh_at_base swap_fresh_fresh lt.fresh)
78fc2bd14d02 Added non-working CPS3 using FCB2
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
   288
  apply (case_tac "(atom x \<rightleftharpoons> atom xa) \<bullet> c = ca")
78fc2bd14d02 Added non-working CPS3 using FCB2
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
   289
  apply simp_all[3]
78fc2bd14d02 Added non-working CPS3 using FCB2
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
   290
  apply rule
78fc2bd14d02 Added non-working CPS3 using FCB2
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
   291
  apply (case_tac "c = xa")
78fc2bd14d02 Added non-working CPS3 using FCB2
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
   292
  apply simp_all[2]
78fc2bd14d02 Added non-working CPS3 using FCB2
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
   293
  apply (simp add: eqvt_at_def)
78fc2bd14d02 Added non-working CPS3 using FCB2
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
   294
  apply clarify
78fc2bd14d02 Added non-working CPS3 using FCB2
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
   295
  apply (smt flip_def permute_flip_at permute_swap_cancel swap_fresh_fresh)
78fc2bd14d02 Added non-working CPS3 using FCB2
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
   296
  apply (simp add: eqvt_at_def)
78fc2bd14d02 Added non-working CPS3 using FCB2
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
   297
  apply clarify
78fc2bd14d02 Added non-working CPS3 using FCB2
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
   298
  apply (smt atom_eq_iff atom_eqvt flip_def fresh_eqvt permute_flip_at permute_swap_cancel swap_at_base_simps(3) swap_fresh_fresh)
78fc2bd14d02 Added non-working CPS3 using FCB2
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
   299
  apply (case_tac "c = xa")
78fc2bd14d02 Added non-working CPS3 using FCB2
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
   300
  apply simp
78fc2bd14d02 Added non-working CPS3 using FCB2
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
   301
  apply (subgoal_tac "((ca \<leftrightarrow> x) \<bullet> (atom x)) \<sharp> (ca \<leftrightarrow> x) \<bullet> CPS1_CPS2_sumC (Inr (Ma, ca~))")
78fc2bd14d02 Added non-working CPS3 using FCB2
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
   302
  apply (simp add: atom_eqvt eqvt_at_def)
78fc2bd14d02 Added non-working CPS3 using FCB2
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
   303
  apply (simp add: flip_fresh_fresh)
78fc2bd14d02 Added non-working CPS3 using FCB2
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
   304
  apply (subst fresh_permute_iff)
78fc2bd14d02 Added non-working CPS3 using FCB2
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
   305
  apply (erule fresh_eqvt_at)
78fc2bd14d02 Added non-working CPS3 using FCB2
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
   306
  apply (simp add: supp_Inr finite_supp)
78fc2bd14d02 Added non-working CPS3 using FCB2
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
   307
  apply (simp add: fresh_Inr lt.fresh fresh_at_base fresh_Pair)
78fc2bd14d02 Added non-working CPS3 using FCB2
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
   308
  apply simp
78fc2bd14d02 Added non-working CPS3 using FCB2
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
   309
  apply clarify
78fc2bd14d02 Added non-working CPS3 using FCB2
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
   310
  apply (subgoal_tac "atom ca \<sharp> (atom x \<rightleftharpoons> atom xa) \<bullet> CPS1_CPS2_sumC (Inr (M, c~))")
78fc2bd14d02 Added non-working CPS3 using FCB2
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
   311
  apply (simp add: eqvt_at_def)
78fc2bd14d02 Added non-working CPS3 using FCB2
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
   312
  apply (subgoal_tac "(atom x \<rightleftharpoons> atom xa) \<bullet> atom ca \<sharp> CPS1_CPS2_sumC (Inr (M, c~))")
78fc2bd14d02 Added non-working CPS3 using FCB2
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
   313
  apply (metis Nominal2_Base.swap_commute fresh_permute_iff permute_swap_cancel2)
78fc2bd14d02 Added non-working CPS3 using FCB2
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
   314
  apply (erule fresh_eqvt_at)
78fc2bd14d02 Added non-working CPS3 using FCB2
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
   315
  apply (simp add: finite_supp supp_Inr)
78fc2bd14d02 Added non-working CPS3 using FCB2
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
   316
  apply (simp add: fresh_Inr fresh_Pair lt.fresh)
78fc2bd14d02 Added non-working CPS3 using FCB2
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
   317
  apply rule
78fc2bd14d02 Added non-working CPS3 using FCB2
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
   318
  apply (metis Nominal2_Base.swap_commute fresh_permute_iff permute_swap_cancel2)
78fc2bd14d02 Added non-working CPS3 using FCB2
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
   319
  apply (simp add: fresh_def supp_at_base)
78fc2bd14d02 Added non-working CPS3 using FCB2
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
   320
  apply (metis atom_eq_iff permute_swap_cancel2 swap_atom_simps(3))
78fc2bd14d02 Added non-working CPS3 using FCB2
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
   321
  done
78fc2bd14d02 Added non-working CPS3 using FCB2
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
   322
78fc2bd14d02 Added non-working CPS3 using FCB2
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
   323
termination
78fc2bd14d02 Added non-working CPS3 using FCB2
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
   324
  by lexicographic_order
78fc2bd14d02 Added non-working CPS3 using FCB2
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
   325
78fc2bd14d02 Added non-working CPS3 using FCB2
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
   326
definition psi:: "lt => lt"
78fc2bd14d02 Added non-working CPS3 using FCB2
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
   327
  where [simp]: "psi V == V*(\<lambda>x. x)"
78fc2bd14d02 Added non-working CPS3 using FCB2
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
   328
78fc2bd14d02 Added non-working CPS3 using FCB2
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
   329
section {* Simple consequence of CPS *}
78fc2bd14d02 Added non-working CPS3 using FCB2
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
   330
78fc2bd14d02 Added non-working CPS3 using FCB2
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
   331
lemma [simp]: "eqvt (\<lambda>x\<Colon>lt. x)"
78fc2bd14d02 Added non-working CPS3 using FCB2
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
   332
  by (simp add: eqvt_def eqvt_bound eqvt_lambda)
78fc2bd14d02 Added non-working CPS3 using FCB2
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
   333
78fc2bd14d02 Added non-working CPS3 using FCB2
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
   334
lemma value_eq1 : "isValue V \<Longrightarrow> eqvt k \<Longrightarrow> V*k = k (psi V)"
78fc2bd14d02 Added non-working CPS3 using FCB2
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
   335
  apply (cases V rule: lt.exhaust)
78fc2bd14d02 Added non-working CPS3 using FCB2
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
   336
  apply simp_all
78fc2bd14d02 Added non-working CPS3 using FCB2
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
   337
  apply (rule_tac x="(name, lt)" and ?'a="name" in obtain_fresh)
78fc2bd14d02 Added non-working CPS3 using FCB2
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
   338
  apply simp
78fc2bd14d02 Added non-working CPS3 using FCB2
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
   339
  done
78fc2bd14d02 Added non-working CPS3 using FCB2
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
   340
78fc2bd14d02 Added non-working CPS3 using FCB2
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
   341
lemma value_eq2 : "isValue V \<Longrightarrow> V^K = K $ (psi V)"
78fc2bd14d02 Added non-working CPS3 using FCB2
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
   342
  apply (cases V rule: lt.exhaust)
78fc2bd14d02 Added non-working CPS3 using FCB2
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
   343
  apply simp_all
78fc2bd14d02 Added non-working CPS3 using FCB2
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
   344
  apply (rule_tac x="(name, lt)" and ?'a="name" in obtain_fresh)
78fc2bd14d02 Added non-working CPS3 using FCB2
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
   345
  apply simp
78fc2bd14d02 Added non-working CPS3 using FCB2
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
   346
  done
78fc2bd14d02 Added non-working CPS3 using FCB2
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
   347
78fc2bd14d02 Added non-working CPS3 using FCB2
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
   348
lemma value_eq3' : "~isValue M \<Longrightarrow> eqvt k \<Longrightarrow> M*k = (M^(Abs n (k (Var n))))"
78fc2bd14d02 Added non-working CPS3 using FCB2
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
   349
  by (cases M rule: lt.exhaust) auto
78fc2bd14d02 Added non-working CPS3 using FCB2
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
   350
78fc2bd14d02 Added non-working CPS3 using FCB2
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
   351
78fc2bd14d02 Added non-working CPS3 using FCB2
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
   352
78fc2bd14d02 Added non-working CPS3 using FCB2
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
   353
end
78fc2bd14d02 Added non-working CPS3 using FCB2
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
   354
78fc2bd14d02 Added non-working CPS3 using FCB2
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
   355
78fc2bd14d02 Added non-working CPS3 using FCB2
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff changeset
   356