author | Cezary Kaliszyk <kaliszyk@in.tum.de> |
Tue, 20 Dec 2011 16:49:03 +0900 | |
changeset 3081 | 660a4f5adee8 |
parent 2956 | 7e1c309bf820 |
child 3235 | 5ebd327ffb96 |
permissions | -rw-r--r-- |
2936
a6acbb20fbca
Let with a different invariant; not true.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff
changeset
|
1 |
theory Let |
a6acbb20fbca
Let with a different invariant; not true.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff
changeset
|
2 |
imports "../Nominal2" |
a6acbb20fbca
Let with a different invariant; not true.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff
changeset
|
3 |
begin |
a6acbb20fbca
Let with a different invariant; not true.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff
changeset
|
4 |
|
a6acbb20fbca
Let with a different invariant; not true.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff
changeset
|
5 |
atom_decl name |
a6acbb20fbca
Let with a different invariant; not true.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff
changeset
|
6 |
|
a6acbb20fbca
Let with a different invariant; not true.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff
changeset
|
7 |
nominal_datatype trm = |
a6acbb20fbca
Let with a different invariant; not true.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff
changeset
|
8 |
Var "name" |
a6acbb20fbca
Let with a different invariant; not true.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff
changeset
|
9 |
| App "trm" "trm" |
2950
0911cb7bf696
changed bind to binds in specifications; bind will cause trouble with Monad_Syntax
Christian Urban <urbanc@in.tum.de>
parents:
2936
diff
changeset
|
10 |
| Lam x::"name" t::"trm" binds x in t |
0911cb7bf696
changed bind to binds in specifications; bind will cause trouble with Monad_Syntax
Christian Urban <urbanc@in.tum.de>
parents:
2936
diff
changeset
|
11 |
| Let as::"assn" t::"trm" binds "bn as" in t |
2936
a6acbb20fbca
Let with a different invariant; not true.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff
changeset
|
12 |
and assn = |
a6acbb20fbca
Let with a different invariant; not true.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff
changeset
|
13 |
ANil |
a6acbb20fbca
Let with a different invariant; not true.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff
changeset
|
14 |
| ACons "name" "trm" "assn" |
a6acbb20fbca
Let with a different invariant; not true.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff
changeset
|
15 |
binder |
a6acbb20fbca
Let with a different invariant; not true.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff
changeset
|
16 |
bn |
a6acbb20fbca
Let with a different invariant; not true.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff
changeset
|
17 |
where |
a6acbb20fbca
Let with a different invariant; not true.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff
changeset
|
18 |
"bn ANil = []" |
a6acbb20fbca
Let with a different invariant; not true.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff
changeset
|
19 |
| "bn (ACons x t as) = (atom x) # (bn as)" |
a6acbb20fbca
Let with a different invariant; not true.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff
changeset
|
20 |
|
a6acbb20fbca
Let with a different invariant; not true.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff
changeset
|
21 |
print_theorems |
a6acbb20fbca
Let with a different invariant; not true.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff
changeset
|
22 |
|
a6acbb20fbca
Let with a different invariant; not true.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff
changeset
|
23 |
thm alpha_trm_raw_alpha_assn_raw_alpha_bn_raw.intros |
a6acbb20fbca
Let with a different invariant; not true.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff
changeset
|
24 |
thm bn_raw.simps |
a6acbb20fbca
Let with a different invariant; not true.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff
changeset
|
25 |
thm permute_bn_raw.simps |
a6acbb20fbca
Let with a different invariant; not true.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff
changeset
|
26 |
thm trm_assn.perm_bn_alpha |
a6acbb20fbca
Let with a different invariant; not true.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff
changeset
|
27 |
thm trm_assn.permute_bn |
a6acbb20fbca
Let with a different invariant; not true.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff
changeset
|
28 |
|
a6acbb20fbca
Let with a different invariant; not true.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff
changeset
|
29 |
thm trm_assn.fv_defs |
a6acbb20fbca
Let with a different invariant; not true.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff
changeset
|
30 |
thm trm_assn.eq_iff |
a6acbb20fbca
Let with a different invariant; not true.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff
changeset
|
31 |
thm trm_assn.bn_defs |
a6acbb20fbca
Let with a different invariant; not true.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff
changeset
|
32 |
thm trm_assn.bn_inducts |
a6acbb20fbca
Let with a different invariant; not true.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff
changeset
|
33 |
thm trm_assn.perm_simps |
a6acbb20fbca
Let with a different invariant; not true.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff
changeset
|
34 |
thm trm_assn.induct |
a6acbb20fbca
Let with a different invariant; not true.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff
changeset
|
35 |
thm trm_assn.inducts |
a6acbb20fbca
Let with a different invariant; not true.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff
changeset
|
36 |
thm trm_assn.distinct |
a6acbb20fbca
Let with a different invariant; not true.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff
changeset
|
37 |
thm trm_assn.supp |
a6acbb20fbca
Let with a different invariant; not true.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff
changeset
|
38 |
thm trm_assn.fresh |
a6acbb20fbca
Let with a different invariant; not true.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff
changeset
|
39 |
thm trm_assn.exhaust |
a6acbb20fbca
Let with a different invariant; not true.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff
changeset
|
40 |
thm trm_assn.strong_exhaust |
a6acbb20fbca
Let with a different invariant; not true.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff
changeset
|
41 |
thm trm_assn.perm_bn_simps |
a6acbb20fbca
Let with a different invariant; not true.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff
changeset
|
42 |
|
a6acbb20fbca
Let with a different invariant; not true.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff
changeset
|
43 |
lemma alpha_bn_inducts_raw[consumes 1]: |
a6acbb20fbca
Let with a different invariant; not true.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff
changeset
|
44 |
"\<lbrakk>alpha_bn_raw a b; P3 ANil_raw ANil_raw; |
a6acbb20fbca
Let with a different invariant; not true.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff
changeset
|
45 |
\<And>trm_raw trm_rawa assn_raw assn_rawa name namea. |
a6acbb20fbca
Let with a different invariant; not true.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff
changeset
|
46 |
\<lbrakk>alpha_trm_raw trm_raw trm_rawa; alpha_bn_raw assn_raw assn_rawa; |
a6acbb20fbca
Let with a different invariant; not true.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff
changeset
|
47 |
P3 assn_raw assn_rawa\<rbrakk> |
a6acbb20fbca
Let with a different invariant; not true.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff
changeset
|
48 |
\<Longrightarrow> P3 (ACons_raw name trm_raw assn_raw) |
a6acbb20fbca
Let with a different invariant; not true.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff
changeset
|
49 |
(ACons_raw namea trm_rawa assn_rawa)\<rbrakk> \<Longrightarrow> P3 a b" |
a6acbb20fbca
Let with a different invariant; not true.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff
changeset
|
50 |
by (erule alpha_trm_raw_alpha_assn_raw_alpha_bn_raw.inducts(3)[of _ _ "\<lambda>x y. True" _ "\<lambda>x y. True", simplified]) auto |
a6acbb20fbca
Let with a different invariant; not true.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff
changeset
|
51 |
|
a6acbb20fbca
Let with a different invariant; not true.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff
changeset
|
52 |
lemmas alpha_bn_inducts[consumes 1] = alpha_bn_inducts_raw[quot_lifted] |
a6acbb20fbca
Let with a different invariant; not true.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff
changeset
|
53 |
|
a6acbb20fbca
Let with a different invariant; not true.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff
changeset
|
54 |
|
a6acbb20fbca
Let with a different invariant; not true.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff
changeset
|
55 |
|
a6acbb20fbca
Let with a different invariant; not true.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff
changeset
|
56 |
lemma alpha_bn_refl: "alpha_bn x x" |
a6acbb20fbca
Let with a different invariant; not true.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff
changeset
|
57 |
by (induct x rule: trm_assn.inducts(2)) |
a6acbb20fbca
Let with a different invariant; not true.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff
changeset
|
58 |
(rule TrueI, auto simp add: trm_assn.eq_iff) |
a6acbb20fbca
Let with a different invariant; not true.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff
changeset
|
59 |
lemma alpha_bn_sym: "alpha_bn x y \<Longrightarrow> alpha_bn y x" |
a6acbb20fbca
Let with a different invariant; not true.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff
changeset
|
60 |
sorry |
a6acbb20fbca
Let with a different invariant; not true.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff
changeset
|
61 |
lemma alpha_bn_trans: "alpha_bn x y \<Longrightarrow> alpha_bn y z \<Longrightarrow> alpha_bn x z" |
a6acbb20fbca
Let with a different invariant; not true.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff
changeset
|
62 |
sorry |
a6acbb20fbca
Let with a different invariant; not true.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff
changeset
|
63 |
|
a6acbb20fbca
Let with a different invariant; not true.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff
changeset
|
64 |
lemma bn_inj[rule_format]: |
a6acbb20fbca
Let with a different invariant; not true.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff
changeset
|
65 |
assumes a: "alpha_bn x y" |
a6acbb20fbca
Let with a different invariant; not true.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff
changeset
|
66 |
shows "bn x = bn y \<longrightarrow> x = y" |
a6acbb20fbca
Let with a different invariant; not true.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff
changeset
|
67 |
by (rule alpha_bn_inducts[OF a]) (simp_all add: trm_assn.bn_defs) |
a6acbb20fbca
Let with a different invariant; not true.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff
changeset
|
68 |
|
a6acbb20fbca
Let with a different invariant; not true.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff
changeset
|
69 |
lemma bn_inj2: |
a6acbb20fbca
Let with a different invariant; not true.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff
changeset
|
70 |
assumes a: "alpha_bn x y" |
a6acbb20fbca
Let with a different invariant; not true.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff
changeset
|
71 |
shows "\<And>q r. (q \<bullet> bn x) = (r \<bullet> bn y) \<Longrightarrow> permute_bn q x = permute_bn r y" |
a6acbb20fbca
Let with a different invariant; not true.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff
changeset
|
72 |
using a |
a6acbb20fbca
Let with a different invariant; not true.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff
changeset
|
73 |
apply(induct rule: alpha_bn_inducts) |
a6acbb20fbca
Let with a different invariant; not true.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff
changeset
|
74 |
apply(simp add: trm_assn.perm_bn_simps) |
a6acbb20fbca
Let with a different invariant; not true.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff
changeset
|
75 |
apply(simp add: trm_assn.perm_bn_simps) |
a6acbb20fbca
Let with a different invariant; not true.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff
changeset
|
76 |
apply(simp add: trm_assn.bn_defs) |
a6acbb20fbca
Let with a different invariant; not true.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff
changeset
|
77 |
apply(simp add: atom_eqvt) |
a6acbb20fbca
Let with a different invariant; not true.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff
changeset
|
78 |
done |
a6acbb20fbca
Let with a different invariant; not true.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff
changeset
|
79 |
|
a6acbb20fbca
Let with a different invariant; not true.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff
changeset
|
80 |
lemma Abs_lst_fcb2: |
a6acbb20fbca
Let with a different invariant; not true.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff
changeset
|
81 |
fixes as bs :: "atom list" |
a6acbb20fbca
Let with a different invariant; not true.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff
changeset
|
82 |
and x y :: "'b :: fs" |
a6acbb20fbca
Let with a different invariant; not true.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff
changeset
|
83 |
and c::"'c::fs" |
a6acbb20fbca
Let with a different invariant; not true.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff
changeset
|
84 |
assumes eq: "[as]lst. x = [bs]lst. y" |
a6acbb20fbca
Let with a different invariant; not true.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff
changeset
|
85 |
and fcb1: "(set as) \<sharp>* c \<Longrightarrow> (set as) \<sharp>* f as x c" |
a6acbb20fbca
Let with a different invariant; not true.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff
changeset
|
86 |
and fresh1: "set as \<sharp>* c" |
a6acbb20fbca
Let with a different invariant; not true.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff
changeset
|
87 |
and fresh2: "set bs \<sharp>* c" |
a6acbb20fbca
Let with a different invariant; not true.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff
changeset
|
88 |
and perm1: "\<And>p. supp p \<sharp>* c \<Longrightarrow> p \<bullet> (f as x c) = f (p \<bullet> as) (p \<bullet> x) c" |
a6acbb20fbca
Let with a different invariant; not true.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff
changeset
|
89 |
and perm2: "\<And>p. supp p \<sharp>* c \<Longrightarrow> p \<bullet> (f bs y c) = f (p \<bullet> bs) (p \<bullet> y) c" |
a6acbb20fbca
Let with a different invariant; not true.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff
changeset
|
90 |
shows "f as x c = f bs y c" |
a6acbb20fbca
Let with a different invariant; not true.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff
changeset
|
91 |
proof - |
a6acbb20fbca
Let with a different invariant; not true.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff
changeset
|
92 |
have "supp (as, x, c) supports (f as x c)" |
a6acbb20fbca
Let with a different invariant; not true.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff
changeset
|
93 |
unfolding supports_def fresh_def[symmetric] |
a6acbb20fbca
Let with a different invariant; not true.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff
changeset
|
94 |
by (simp add: fresh_Pair perm1 fresh_star_def supp_swap swap_fresh_fresh) |
a6acbb20fbca
Let with a different invariant; not true.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff
changeset
|
95 |
then have fin1: "finite (supp (f as x c))" |
a6acbb20fbca
Let with a different invariant; not true.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff
changeset
|
96 |
by (auto intro: supports_finite simp add: finite_supp) |
a6acbb20fbca
Let with a different invariant; not true.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff
changeset
|
97 |
have "supp (bs, y, c) supports (f bs y c)" |
a6acbb20fbca
Let with a different invariant; not true.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff
changeset
|
98 |
unfolding supports_def fresh_def[symmetric] |
a6acbb20fbca
Let with a different invariant; not true.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff
changeset
|
99 |
by (simp add: fresh_Pair perm2 fresh_star_def supp_swap swap_fresh_fresh) |
a6acbb20fbca
Let with a different invariant; not true.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff
changeset
|
100 |
then have fin2: "finite (supp (f bs y c))" |
a6acbb20fbca
Let with a different invariant; not true.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff
changeset
|
101 |
by (auto intro: supports_finite simp add: finite_supp) |
a6acbb20fbca
Let with a different invariant; not true.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff
changeset
|
102 |
obtain q::"perm" where |
a6acbb20fbca
Let with a different invariant; not true.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff
changeset
|
103 |
fr1: "(q \<bullet> (set as)) \<sharp>* (x, c, f as x c, f bs y c)" and |
a6acbb20fbca
Let with a different invariant; not true.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff
changeset
|
104 |
fr2: "supp q \<sharp>* Abs_lst as x" and |
a6acbb20fbca
Let with a different invariant; not true.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff
changeset
|
105 |
inc: "supp q \<subseteq> (set as) \<union> q \<bullet> (set as)" |
a6acbb20fbca
Let with a different invariant; not true.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff
changeset
|
106 |
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"] |
a6acbb20fbca
Let with a different invariant; not true.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff
changeset
|
107 |
fin1 fin2 |
a6acbb20fbca
Let with a different invariant; not true.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff
changeset
|
108 |
by (auto simp add: supp_Pair finite_supp Abs_fresh_star dest: fresh_star_supp_conv) |
a6acbb20fbca
Let with a different invariant; not true.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff
changeset
|
109 |
have "Abs_lst (q \<bullet> as) (q \<bullet> x) = q \<bullet> Abs_lst as x" by simp |
a6acbb20fbca
Let with a different invariant; not true.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff
changeset
|
110 |
also have "\<dots> = Abs_lst as x" |
a6acbb20fbca
Let with a different invariant; not true.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff
changeset
|
111 |
by (simp only: fr2 perm_supp_eq) |
a6acbb20fbca
Let with a different invariant; not true.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff
changeset
|
112 |
finally have "Abs_lst (q \<bullet> as) (q \<bullet> x) = Abs_lst bs y" using eq by simp |
a6acbb20fbca
Let with a different invariant; not true.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff
changeset
|
113 |
then obtain r::perm where |
a6acbb20fbca
Let with a different invariant; not true.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff
changeset
|
114 |
qq1: "q \<bullet> x = r \<bullet> y" and |
a6acbb20fbca
Let with a different invariant; not true.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff
changeset
|
115 |
qq2: "q \<bullet> as = r \<bullet> bs" and |
a6acbb20fbca
Let with a different invariant; not true.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff
changeset
|
116 |
qq3: "supp r \<subseteq> (q \<bullet> (set as)) \<union> set bs" |
a6acbb20fbca
Let with a different invariant; not true.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff
changeset
|
117 |
apply(drule_tac sym) |
a6acbb20fbca
Let with a different invariant; not true.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff
changeset
|
118 |
apply(simp only: Abs_eq_iff2 alphas) |
a6acbb20fbca
Let with a different invariant; not true.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff
changeset
|
119 |
apply(erule exE) |
a6acbb20fbca
Let with a different invariant; not true.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff
changeset
|
120 |
apply(erule conjE)+ |
a6acbb20fbca
Let with a different invariant; not true.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff
changeset
|
121 |
apply(drule_tac x="p" in meta_spec) |
a6acbb20fbca
Let with a different invariant; not true.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff
changeset
|
122 |
apply(simp add: set_eqvt) |
a6acbb20fbca
Let with a different invariant; not true.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff
changeset
|
123 |
apply(blast) |
a6acbb20fbca
Let with a different invariant; not true.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff
changeset
|
124 |
done |
a6acbb20fbca
Let with a different invariant; not true.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff
changeset
|
125 |
have "(set as) \<sharp>* f as x c" |
a6acbb20fbca
Let with a different invariant; not true.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff
changeset
|
126 |
apply(rule fcb1) |
a6acbb20fbca
Let with a different invariant; not true.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff
changeset
|
127 |
apply(rule fresh1) |
a6acbb20fbca
Let with a different invariant; not true.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff
changeset
|
128 |
done |
a6acbb20fbca
Let with a different invariant; not true.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff
changeset
|
129 |
then have "q \<bullet> ((set as) \<sharp>* f as x c)" |
a6acbb20fbca
Let with a different invariant; not true.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff
changeset
|
130 |
by (simp add: permute_bool_def) |
a6acbb20fbca
Let with a different invariant; not true.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff
changeset
|
131 |
then have "set (q \<bullet> as) \<sharp>* f (q \<bullet> as) (q \<bullet> x) c" |
a6acbb20fbca
Let with a different invariant; not true.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff
changeset
|
132 |
apply(simp add: fresh_star_eqvt set_eqvt) |
a6acbb20fbca
Let with a different invariant; not true.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff
changeset
|
133 |
apply(subst (asm) perm1) |
a6acbb20fbca
Let with a different invariant; not true.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff
changeset
|
134 |
using inc fresh1 fr1 |
a6acbb20fbca
Let with a different invariant; not true.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff
changeset
|
135 |
apply(auto simp add: fresh_star_def fresh_Pair) |
a6acbb20fbca
Let with a different invariant; not true.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff
changeset
|
136 |
done |
a6acbb20fbca
Let with a different invariant; not true.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff
changeset
|
137 |
then have "set (r \<bullet> bs) \<sharp>* f (r \<bullet> bs) (r \<bullet> y) c" using qq1 qq2 by simp |
a6acbb20fbca
Let with a different invariant; not true.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff
changeset
|
138 |
then have "r \<bullet> ((set bs) \<sharp>* f bs y c)" |
a6acbb20fbca
Let with a different invariant; not true.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff
changeset
|
139 |
apply(simp add: fresh_star_eqvt set_eqvt) |
a6acbb20fbca
Let with a different invariant; not true.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff
changeset
|
140 |
apply(subst (asm) perm2[symmetric]) |
a6acbb20fbca
Let with a different invariant; not true.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff
changeset
|
141 |
using qq3 fresh2 fr1 |
a6acbb20fbca
Let with a different invariant; not true.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff
changeset
|
142 |
apply(auto simp add: set_eqvt fresh_star_def fresh_Pair) |
a6acbb20fbca
Let with a different invariant; not true.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff
changeset
|
143 |
done |
a6acbb20fbca
Let with a different invariant; not true.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff
changeset
|
144 |
then have fcb2: "(set bs) \<sharp>* f bs y c" by (simp add: permute_bool_def) |
a6acbb20fbca
Let with a different invariant; not true.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff
changeset
|
145 |
have "f as x c = q \<bullet> (f as x c)" |
a6acbb20fbca
Let with a different invariant; not true.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff
changeset
|
146 |
apply(rule perm_supp_eq[symmetric]) |
a6acbb20fbca
Let with a different invariant; not true.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff
changeset
|
147 |
using inc fcb1[OF fresh1] fr1 by (auto simp add: fresh_star_def) |
a6acbb20fbca
Let with a different invariant; not true.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff
changeset
|
148 |
also have "\<dots> = f (q \<bullet> as) (q \<bullet> x) c" |
a6acbb20fbca
Let with a different invariant; not true.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff
changeset
|
149 |
apply(rule perm1) |
a6acbb20fbca
Let with a different invariant; not true.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff
changeset
|
150 |
using inc fresh1 fr1 by (auto simp add: fresh_star_def) |
a6acbb20fbca
Let with a different invariant; not true.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff
changeset
|
151 |
also have "\<dots> = f (r \<bullet> bs) (r \<bullet> y) c" using qq1 qq2 by simp |
a6acbb20fbca
Let with a different invariant; not true.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff
changeset
|
152 |
also have "\<dots> = r \<bullet> (f bs y c)" |
a6acbb20fbca
Let with a different invariant; not true.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff
changeset
|
153 |
apply(rule perm2[symmetric]) |
a6acbb20fbca
Let with a different invariant; not true.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff
changeset
|
154 |
using qq3 fresh2 fr1 by (auto simp add: fresh_star_def) |
a6acbb20fbca
Let with a different invariant; not true.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff
changeset
|
155 |
also have "... = f bs y c" |
a6acbb20fbca
Let with a different invariant; not true.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff
changeset
|
156 |
apply(rule perm_supp_eq) |
a6acbb20fbca
Let with a different invariant; not true.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff
changeset
|
157 |
using qq3 fr1 fcb2 by (auto simp add: fresh_star_def) |
a6acbb20fbca
Let with a different invariant; not true.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff
changeset
|
158 |
finally show ?thesis by simp |
a6acbb20fbca
Let with a different invariant; not true.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff
changeset
|
159 |
qed |
a6acbb20fbca
Let with a different invariant; not true.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff
changeset
|
160 |
|
a6acbb20fbca
Let with a different invariant; not true.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff
changeset
|
161 |
lemma Abs_lst1_fcb2: |
a6acbb20fbca
Let with a different invariant; not true.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff
changeset
|
162 |
fixes a b :: "atom" |
a6acbb20fbca
Let with a different invariant; not true.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff
changeset
|
163 |
and x y :: "'b :: fs" |
a6acbb20fbca
Let with a different invariant; not true.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff
changeset
|
164 |
and c::"'c :: fs" |
a6acbb20fbca
Let with a different invariant; not true.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff
changeset
|
165 |
assumes e: "(Abs_lst [a] x) = (Abs_lst [b] y)" |
a6acbb20fbca
Let with a different invariant; not true.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff
changeset
|
166 |
and fcb1: "a \<sharp> c \<Longrightarrow> a \<sharp> f a x c" |
a6acbb20fbca
Let with a different invariant; not true.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff
changeset
|
167 |
and fresh: "{a, b} \<sharp>* c" |
a6acbb20fbca
Let with a different invariant; not true.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff
changeset
|
168 |
and perm1: "\<And>p. supp p \<sharp>* c \<Longrightarrow> p \<bullet> (f a x c) = f (p \<bullet> a) (p \<bullet> x) c" |
a6acbb20fbca
Let with a different invariant; not true.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff
changeset
|
169 |
and perm2: "\<And>p. supp p \<sharp>* c \<Longrightarrow> p \<bullet> (f b y c) = f (p \<bullet> b) (p \<bullet> y) c" |
a6acbb20fbca
Let with a different invariant; not true.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff
changeset
|
170 |
shows "f a x c = f b y c" |
a6acbb20fbca
Let with a different invariant; not true.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff
changeset
|
171 |
using e |
a6acbb20fbca
Let with a different invariant; not true.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff
changeset
|
172 |
apply(drule_tac Abs_lst_fcb2[where c="c" and f="\<lambda>(as::atom list) . f (hd as)"]) |
a6acbb20fbca
Let with a different invariant; not true.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff
changeset
|
173 |
apply(simp_all) |
a6acbb20fbca
Let with a different invariant; not true.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff
changeset
|
174 |
using fcb1 fresh perm1 perm2 |
a6acbb20fbca
Let with a different invariant; not true.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff
changeset
|
175 |
apply(simp_all add: fresh_star_def) |
a6acbb20fbca
Let with a different invariant; not true.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff
changeset
|
176 |
done |
a6acbb20fbca
Let with a different invariant; not true.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff
changeset
|
177 |
|
a6acbb20fbca
Let with a different invariant; not true.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff
changeset
|
178 |
|
a6acbb20fbca
Let with a different invariant; not true.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff
changeset
|
179 |
function |
a6acbb20fbca
Let with a different invariant; not true.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff
changeset
|
180 |
apply_assn2 :: "(trm \<Rightarrow> trm) \<Rightarrow> assn \<Rightarrow> assn" |
a6acbb20fbca
Let with a different invariant; not true.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff
changeset
|
181 |
where |
a6acbb20fbca
Let with a different invariant; not true.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff
changeset
|
182 |
"apply_assn2 f ANil = ANil" |
a6acbb20fbca
Let with a different invariant; not true.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff
changeset
|
183 |
| "apply_assn2 f (ACons x t as) = ACons x (f t) (apply_assn2 f as)" |
a6acbb20fbca
Let with a different invariant; not true.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff
changeset
|
184 |
apply(case_tac x) |
a6acbb20fbca
Let with a different invariant; not true.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff
changeset
|
185 |
apply(case_tac b rule: trm_assn.exhaust(2)) |
a6acbb20fbca
Let with a different invariant; not true.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff
changeset
|
186 |
apply(simp_all) |
a6acbb20fbca
Let with a different invariant; not true.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff
changeset
|
187 |
apply(blast) |
a6acbb20fbca
Let with a different invariant; not true.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff
changeset
|
188 |
done |
a6acbb20fbca
Let with a different invariant; not true.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff
changeset
|
189 |
|
a6acbb20fbca
Let with a different invariant; not true.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff
changeset
|
190 |
termination by lexicographic_order |
a6acbb20fbca
Let with a different invariant; not true.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff
changeset
|
191 |
|
a6acbb20fbca
Let with a different invariant; not true.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff
changeset
|
192 |
lemma apply_assn_eqvt[eqvt]: |
a6acbb20fbca
Let with a different invariant; not true.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff
changeset
|
193 |
"p \<bullet> (apply_assn2 f a) = apply_assn2 (p \<bullet> f) (p \<bullet> a)" |
a6acbb20fbca
Let with a different invariant; not true.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff
changeset
|
194 |
apply(induct f a rule: apply_assn2.induct) |
a6acbb20fbca
Let with a different invariant; not true.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff
changeset
|
195 |
apply simp_all |
a6acbb20fbca
Let with a different invariant; not true.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff
changeset
|
196 |
apply(perm_simp) |
a6acbb20fbca
Let with a different invariant; not true.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff
changeset
|
197 |
apply rule |
a6acbb20fbca
Let with a different invariant; not true.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff
changeset
|
198 |
done |
a6acbb20fbca
Let with a different invariant; not true.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff
changeset
|
199 |
|
a6acbb20fbca
Let with a different invariant; not true.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff
changeset
|
200 |
lemma |
a6acbb20fbca
Let with a different invariant; not true.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff
changeset
|
201 |
fixes x y :: "'a :: fs" |
a6acbb20fbca
Let with a different invariant; not true.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff
changeset
|
202 |
shows "[a # as]lst. x = [b # bs]lst. y \<Longrightarrow> [[a]]lst. [as]lst. x = [[b]]lst. [bs]lst. y" |
a6acbb20fbca
Let with a different invariant; not true.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff
changeset
|
203 |
apply (simp add: Abs_eq_iff) |
a6acbb20fbca
Let with a different invariant; not true.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff
changeset
|
204 |
apply (elim exE) |
a6acbb20fbca
Let with a different invariant; not true.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff
changeset
|
205 |
apply (rule_tac x="p" in exI) |
a6acbb20fbca
Let with a different invariant; not true.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff
changeset
|
206 |
apply (simp add: alphas) |
a6acbb20fbca
Let with a different invariant; not true.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff
changeset
|
207 |
apply clarify |
a6acbb20fbca
Let with a different invariant; not true.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff
changeset
|
208 |
apply rule |
a6acbb20fbca
Let with a different invariant; not true.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff
changeset
|
209 |
apply (simp add: supp_Abs) |
a6acbb20fbca
Let with a different invariant; not true.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff
changeset
|
210 |
apply blast |
a6acbb20fbca
Let with a different invariant; not true.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff
changeset
|
211 |
apply (simp add: supp_Abs fresh_star_def) |
a6acbb20fbca
Let with a different invariant; not true.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff
changeset
|
212 |
apply blast |
a6acbb20fbca
Let with a different invariant; not true.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff
changeset
|
213 |
done |
a6acbb20fbca
Let with a different invariant; not true.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff
changeset
|
214 |
|
a6acbb20fbca
Let with a different invariant; not true.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff
changeset
|
215 |
lemma |
a6acbb20fbca
Let with a different invariant; not true.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff
changeset
|
216 |
assumes neq: "a \<noteq> b" "sort_of a = sort_of b" |
a6acbb20fbca
Let with a different invariant; not true.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff
changeset
|
217 |
shows "[[a]]lst. [[a]]lst. a = [[a]]lst. [[b]]lst. b \<and> [[a, a]]lst. a \<noteq> [[a, b]]lst. b" |
a6acbb20fbca
Let with a different invariant; not true.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff
changeset
|
218 |
apply (simp add: Abs1_eq_iff) |
a6acbb20fbca
Let with a different invariant; not true.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff
changeset
|
219 |
apply rule |
a6acbb20fbca
Let with a different invariant; not true.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff
changeset
|
220 |
apply (simp add: Abs_eq_iff alphas supp_atom fresh_star_def) |
a6acbb20fbca
Let with a different invariant; not true.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff
changeset
|
221 |
apply (rule_tac x="(a \<rightleftharpoons> b)" in exI) |
a6acbb20fbca
Let with a different invariant; not true.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff
changeset
|
222 |
apply (simp add: neq) |
a6acbb20fbca
Let with a different invariant; not true.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff
changeset
|
223 |
apply (simp add: Abs_eq_iff alphas supp_atom fresh_star_def neq) |
a6acbb20fbca
Let with a different invariant; not true.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff
changeset
|
224 |
done |
a6acbb20fbca
Let with a different invariant; not true.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff
changeset
|
225 |
|
a6acbb20fbca
Let with a different invariant; not true.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff
changeset
|
226 |
nominal_primrec |
a6acbb20fbca
Let with a different invariant; not true.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff
changeset
|
227 |
subst :: "name \<Rightarrow> trm \<Rightarrow> trm \<Rightarrow> trm" |
a6acbb20fbca
Let with a different invariant; not true.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff
changeset
|
228 |
where |
a6acbb20fbca
Let with a different invariant; not true.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff
changeset
|
229 |
"subst s t (Var x) = (if (s = x) then t else (Var x))" |
a6acbb20fbca
Let with a different invariant; not true.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff
changeset
|
230 |
| "subst s t (App l r) = App (subst s t l) (subst s t r)" |
a6acbb20fbca
Let with a different invariant; not true.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff
changeset
|
231 |
| "atom v \<sharp> (s, t) \<Longrightarrow> subst s t (Lam v b) = Lam v (subst s t b)" |
a6acbb20fbca
Let with a different invariant; not true.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff
changeset
|
232 |
| "set (bn as) \<sharp>* (s, t) \<Longrightarrow> subst s t (Let as b) = Let (apply_assn2 (subst s t) as) (subst s t b)" |
a6acbb20fbca
Let with a different invariant; not true.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff
changeset
|
233 |
apply (simp only: eqvt_def subst_graph_def) |
a6acbb20fbca
Let with a different invariant; not true.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff
changeset
|
234 |
apply (rule, perm_simp, rule) |
a6acbb20fbca
Let with a different invariant; not true.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff
changeset
|
235 |
apply (rule TrueI) |
a6acbb20fbca
Let with a different invariant; not true.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff
changeset
|
236 |
apply (case_tac x) |
a6acbb20fbca
Let with a different invariant; not true.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff
changeset
|
237 |
apply (rule_tac y="c" and c="(a,b)" in trm_assn.strong_exhaust(1)) |
a6acbb20fbca
Let with a different invariant; not true.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff
changeset
|
238 |
apply (auto simp add: fresh_star_def)[3] |
a6acbb20fbca
Let with a different invariant; not true.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff
changeset
|
239 |
apply (drule_tac x="assn" in meta_spec) |
a6acbb20fbca
Let with a different invariant; not true.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff
changeset
|
240 |
apply (simp add: Abs1_eq_iff alpha_bn_refl) |
2956 | 241 |
apply auto[7] |
242 |
prefer 2 |
|
243 |
apply(simp) |
|
244 |
thm subst_sumC_def |
|
245 |
thm THE_default_def |
|
246 |
thm theI |
|
2936
a6acbb20fbca
Let with a different invariant; not true.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff
changeset
|
247 |
apply (erule_tac c="(sa, ta)" in Abs_lst1_fcb2) |
a6acbb20fbca
Let with a different invariant; not true.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff
changeset
|
248 |
apply (simp add: Abs_fresh_iff) |
a6acbb20fbca
Let with a different invariant; not true.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff
changeset
|
249 |
apply (simp add: fresh_star_def) |
a6acbb20fbca
Let with a different invariant; not true.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff
changeset
|
250 |
apply (simp_all add: fresh_star_Pair_elim perm_supp_eq eqvt_at_def)[2] |
a6acbb20fbca
Let with a different invariant; not true.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff
changeset
|
251 |
apply (subgoal_tac "apply_assn2 (\<lambda>x2\<Colon>trm. subst_sumC (sa, ta, x2)) asa |
a6acbb20fbca
Let with a different invariant; not true.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff
changeset
|
252 |
= apply_assn2 (\<lambda>x2\<Colon>trm. subst_sumC (sa, ta, x2)) as") |
a6acbb20fbca
Let with a different invariant; not true.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff
changeset
|
253 |
prefer 2 |
a6acbb20fbca
Let with a different invariant; not true.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff
changeset
|
254 |
apply (erule alpha_bn_inducts) |
a6acbb20fbca
Let with a different invariant; not true.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff
changeset
|
255 |
apply simp |
a6acbb20fbca
Let with a different invariant; not true.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff
changeset
|
256 |
apply (simp only: apply_assn2.simps) |
a6acbb20fbca
Let with a different invariant; not true.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff
changeset
|
257 |
apply simp |
a6acbb20fbca
Let with a different invariant; not true.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff
changeset
|
258 |
--"We know nothing about names; not true; but we can apply fcb2" |
a6acbb20fbca
Let with a different invariant; not true.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff
changeset
|
259 |
defer |
a6acbb20fbca
Let with a different invariant; not true.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff
changeset
|
260 |
apply (simp only: ) |
a6acbb20fbca
Let with a different invariant; not true.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff
changeset
|
261 |
apply (erule_tac c="(sa, ta)" in Abs_lst_fcb2) |
a6acbb20fbca
Let with a different invariant; not true.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff
changeset
|
262 |
--"We again need induction for fcb assumption; this time true" |
a6acbb20fbca
Let with a different invariant; not true.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff
changeset
|
263 |
apply (induct_tac as rule: trm_assn.inducts(2)) |
a6acbb20fbca
Let with a different invariant; not true.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff
changeset
|
264 |
apply (rule TrueI)+ |
a6acbb20fbca
Let with a different invariant; not true.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff
changeset
|
265 |
apply (simp_all add: trm_assn.bn_defs fresh_star_def)[2] |
a6acbb20fbca
Let with a different invariant; not true.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff
changeset
|
266 |
apply (auto simp add: Abs_fresh_iff)[1] |
a6acbb20fbca
Let with a different invariant; not true.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff
changeset
|
267 |
apply assumption+ |
a6acbb20fbca
Let with a different invariant; not true.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff
changeset
|
268 |
--"But eqvt is not going to be true as well" |
a6acbb20fbca
Let with a different invariant; not true.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff
changeset
|
269 |
apply (simp add: fresh_star_Pair_elim perm_supp_eq eqvt_at_def trm_assn.fv_bn_eqvt) |
a6acbb20fbca
Let with a different invariant; not true.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff
changeset
|
270 |
apply (simp add: apply_assn_eqvt) |
a6acbb20fbca
Let with a different invariant; not true.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff
changeset
|
271 |
apply (drule sym) |
a6acbb20fbca
Let with a different invariant; not true.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff
changeset
|
272 |
apply (subgoal_tac "p \<bullet> (\<lambda>x2\<Colon>trm. subst_sumC (sa, ta, x2)) = (\<lambda>x2\<Colon>trm. subst_sumC (sa, ta, x2))") |
a6acbb20fbca
Let with a different invariant; not true.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff
changeset
|
273 |
apply (simp) |
a6acbb20fbca
Let with a different invariant; not true.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff
changeset
|
274 |
apply (erule alpha_bn_inducts) |
a6acbb20fbca
Let with a different invariant; not true.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff
changeset
|
275 |
apply simp |
a6acbb20fbca
Let with a different invariant; not true.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff
changeset
|
276 |
apply simp |
a6acbb20fbca
Let with a different invariant; not true.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff
changeset
|
277 |
apply (simp add: trm_assn.bn_defs) |
a6acbb20fbca
Let with a different invariant; not true.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff
changeset
|
278 |
--"Again we cannot relate 'namea' with 'p \<bullet> name'" |
a6acbb20fbca
Let with a different invariant; not true.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff
changeset
|
279 |
prefer 4 |
a6acbb20fbca
Let with a different invariant; not true.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff
changeset
|
280 |
apply (erule alpha_bn_inducts) |
a6acbb20fbca
Let with a different invariant; not true.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff
changeset
|
281 |
apply simp_all[2] |
a6acbb20fbca
Let with a different invariant; not true.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff
changeset
|
282 |
oops |
a6acbb20fbca
Let with a different invariant; not true.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff
changeset
|
283 |
|
a6acbb20fbca
Let with a different invariant; not true.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff
changeset
|
284 |
end |