author | Cezary Kaliszyk <kaliszyk@in.tum.de> |
Tue, 18 May 2010 11:46:58 +0200 | |
changeset 2154 | b5c030cfa656 |
parent 1664 | aa999d263b10 |
permissions | -rw-r--r-- |
1270
8c3cf9f4f5f2
Split Terms into separate files and add them to tests.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff
changeset
|
1 |
theory Term5 |
1664
aa999d263b10
Modified abs_gen_sym and abs_gen_trans so it becomes usable in the proofs.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1603
diff
changeset
|
2 |
imports "../Nominal2_Atoms" "../Nominal2_Eqvt" "../Nominal2_Supp" "../Abs" "../Perm" "../Fv" "../Rsp" |
1270
8c3cf9f4f5f2
Split Terms into separate files and add them to tests.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff
changeset
|
3 |
begin |
8c3cf9f4f5f2
Split Terms into separate files and add them to tests.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff
changeset
|
4 |
|
8c3cf9f4f5f2
Split Terms into separate files and add them to tests.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff
changeset
|
5 |
atom_decl name |
8c3cf9f4f5f2
Split Terms into separate files and add them to tests.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff
changeset
|
6 |
|
8c3cf9f4f5f2
Split Terms into separate files and add them to tests.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff
changeset
|
7 |
datatype rtrm5 = |
8c3cf9f4f5f2
Split Terms into separate files and add them to tests.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff
changeset
|
8 |
rVr5 "name" |
8c3cf9f4f5f2
Split Terms into separate files and add them to tests.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff
changeset
|
9 |
| rAp5 "rtrm5" "rtrm5" |
8c3cf9f4f5f2
Split Terms into separate files and add them to tests.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff
changeset
|
10 |
| rLt5 "rlts" "rtrm5" --"bind (bv5 lts) in (rtrm5)" |
8c3cf9f4f5f2
Split Terms into separate files and add them to tests.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff
changeset
|
11 |
and rlts = |
8c3cf9f4f5f2
Split Terms into separate files and add them to tests.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff
changeset
|
12 |
rLnil |
8c3cf9f4f5f2
Split Terms into separate files and add them to tests.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff
changeset
|
13 |
| rLcons "name" "rtrm5" "rlts" |
8c3cf9f4f5f2
Split Terms into separate files and add them to tests.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff
changeset
|
14 |
|
8c3cf9f4f5f2
Split Terms into separate files and add them to tests.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff
changeset
|
15 |
primrec |
8c3cf9f4f5f2
Split Terms into separate files and add them to tests.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff
changeset
|
16 |
rbv5 |
8c3cf9f4f5f2
Split Terms into separate files and add them to tests.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff
changeset
|
17 |
where |
8c3cf9f4f5f2
Split Terms into separate files and add them to tests.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff
changeset
|
18 |
"rbv5 rLnil = {}" |
8c3cf9f4f5f2
Split Terms into separate files and add them to tests.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff
changeset
|
19 |
| "rbv5 (rLcons n t ltl) = {atom n} \<union> (rbv5 ltl)" |
8c3cf9f4f5f2
Split Terms into separate files and add them to tests.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff
changeset
|
20 |
|
8c3cf9f4f5f2
Split Terms into separate files and add them to tests.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff
changeset
|
21 |
|
1277
6eacf60ce41d
Permutation and FV_Alpha interface change.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1270
diff
changeset
|
22 |
setup {* snd o define_raw_perms (Datatype.the_info @{theory} "Term5.rtrm5") 2 *} |
1270
8c3cf9f4f5f2
Split Terms into separate files and add them to tests.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff
changeset
|
23 |
print_theorems |
8c3cf9f4f5f2
Split Terms into separate files and add them to tests.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff
changeset
|
24 |
|
1391
ebfbcadeac5e
Testing equalities in trm5, all seems good.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1288
diff
changeset
|
25 |
local_setup {* snd o define_fv_alpha (Datatype.the_info @{theory} "Term5.rtrm5") |
1664
aa999d263b10
Modified abs_gen_sym and abs_gen_trans so it becomes usable in the proofs.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1603
diff
changeset
|
26 |
[[[], [], [(SOME (@{term rbv5}, true), 0, 1)]], [[], []]] [(@{term rbv5}, 1, [[], [(0,NONE), (2,SOME @{term rbv5})]])] *} |
1270
8c3cf9f4f5f2
Split Terms into separate files and add them to tests.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff
changeset
|
27 |
print_theorems |
8c3cf9f4f5f2
Split Terms into separate files and add them to tests.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff
changeset
|
28 |
|
8c3cf9f4f5f2
Split Terms into separate files and add them to tests.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff
changeset
|
29 |
notation |
8c3cf9f4f5f2
Split Terms into separate files and add them to tests.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff
changeset
|
30 |
alpha_rtrm5 ("_ \<approx>5 _" [100, 100] 100) and |
8c3cf9f4f5f2
Split Terms into separate files and add them to tests.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff
changeset
|
31 |
alpha_rlts ("_ \<approx>l _" [100, 100] 100) |
1391
ebfbcadeac5e
Testing equalities in trm5, all seems good.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1288
diff
changeset
|
32 |
thm alpha_rtrm5_alpha_rlts_alpha_rbv5.intros |
1270
8c3cf9f4f5f2
Split Terms into separate files and add them to tests.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff
changeset
|
33 |
|
1664
aa999d263b10
Modified abs_gen_sym and abs_gen_trans so it becomes usable in the proofs.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1603
diff
changeset
|
34 |
local_setup {* (fn ctxt => snd (Local_Theory.note ((@{binding alpha5_inj}, []), (build_rel_inj @{thms alpha_rtrm5_alpha_rlts_alpha_rbv5.intros} @{thms rtrm5.distinct rtrm5.inject rlts.distinct rlts.inject} @{thms alpha_rtrm5.cases alpha_rlts.cases alpha_rbv5.cases} ctxt)) ctxt)) *} |
1270
8c3cf9f4f5f2
Split Terms into separate files and add them to tests.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff
changeset
|
35 |
thm alpha5_inj |
8c3cf9f4f5f2
Split Terms into separate files and add them to tests.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff
changeset
|
36 |
|
8c3cf9f4f5f2
Split Terms into separate files and add them to tests.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff
changeset
|
37 |
lemma rbv5_eqvt[eqvt]: |
8c3cf9f4f5f2
Split Terms into separate files and add them to tests.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff
changeset
|
38 |
"pi \<bullet> (rbv5 x) = rbv5 (pi \<bullet> x)" |
8c3cf9f4f5f2
Split Terms into separate files and add them to tests.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff
changeset
|
39 |
apply (induct x) |
8c3cf9f4f5f2
Split Terms into separate files and add them to tests.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff
changeset
|
40 |
apply (simp_all add: eqvts atom_eqvt) |
8c3cf9f4f5f2
Split Terms into separate files and add them to tests.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff
changeset
|
41 |
done |
8c3cf9f4f5f2
Split Terms into separate files and add them to tests.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff
changeset
|
42 |
|
8c3cf9f4f5f2
Split Terms into separate files and add them to tests.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff
changeset
|
43 |
lemma fv_rtrm5_rlts_eqvt[eqvt]: |
8c3cf9f4f5f2
Split Terms into separate files and add them to tests.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff
changeset
|
44 |
"pi \<bullet> (fv_rtrm5 x) = fv_rtrm5 (pi \<bullet> x)" |
8c3cf9f4f5f2
Split Terms into separate files and add them to tests.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff
changeset
|
45 |
"pi \<bullet> (fv_rlts l) = fv_rlts (pi \<bullet> l)" |
8c3cf9f4f5f2
Split Terms into separate files and add them to tests.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff
changeset
|
46 |
apply (induct x and l) |
8c3cf9f4f5f2
Split Terms into separate files and add them to tests.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff
changeset
|
47 |
apply (simp_all add: eqvts atom_eqvt) |
8c3cf9f4f5f2
Split Terms into separate files and add them to tests.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff
changeset
|
48 |
done |
8c3cf9f4f5f2
Split Terms into separate files and add them to tests.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff
changeset
|
49 |
|
1455 | 50 |
(*lemma alpha5_eqvt: |
1419
3cf30bb8c6f6
The alpha5_eqvt tactic works if I manage to build the goal.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1405
diff
changeset
|
51 |
"(xa \<approx>5 y \<longrightarrow> (p \<bullet> xa) \<approx>5 (p \<bullet> y)) \<and> |
3cf30bb8c6f6
The alpha5_eqvt tactic works if I manage to build the goal.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1405
diff
changeset
|
52 |
(xb \<approx>l ya \<longrightarrow> (p \<bullet> xb) \<approx>l (p \<bullet> ya)) \<and> |
1474
8a03753e0e02
Finished all proofs in Term5 and Term5n.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1464
diff
changeset
|
53 |
(alpha_rbv5 b c \<longrightarrow> alpha_rbv5 (p \<bullet> b) (p \<bullet> c))" |
1419
3cf30bb8c6f6
The alpha5_eqvt tactic works if I manage to build the goal.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1405
diff
changeset
|
54 |
apply (tactic {* alpha_eqvt_tac @{thm alpha_rtrm5_alpha_rlts_alpha_rbv5.induct} @{thms alpha5_inj permute_rtrm5_permute_rlts.simps} @{context} 1 *}) |
1455 | 55 |
done*) |
56 |
||
57 |
local_setup {* |
|
58 |
(fn ctxt => snd (Local_Theory.note ((@{binding alpha5_eqvt}, []), |
|
59 |
build_alpha_eqvts [@{term alpha_rtrm5}, @{term alpha_rlts}, @{term alpha_rbv5}] (fn _ => alpha_eqvt_tac @{thm alpha_rtrm5_alpha_rlts_alpha_rbv5.induct} @{thms alpha5_inj permute_rtrm5_permute_rlts.simps} ctxt 1) ctxt) ctxt)) *} |
|
60 |
print_theorems |
|
1270
8c3cf9f4f5f2
Split Terms into separate files and add them to tests.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff
changeset
|
61 |
|
1421
95324fb345e5
looking at trm5_equivp
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1419
diff
changeset
|
62 |
lemma alpha5_reflp: |
1462
7c59dd8e5435
The old recursive alpha works fine.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1458
diff
changeset
|
63 |
"y \<approx>5 y \<and> (x \<approx>l x \<and> alpha_rbv5 x x)" |
1421
95324fb345e5
looking at trm5_equivp
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1419
diff
changeset
|
64 |
apply (rule rtrm5_rlts.induct) |
95324fb345e5
looking at trm5_equivp
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1419
diff
changeset
|
65 |
apply (simp_all add: alpha5_inj) |
95324fb345e5
looking at trm5_equivp
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1419
diff
changeset
|
66 |
apply (rule_tac x="0::perm" in exI) |
95324fb345e5
looking at trm5_equivp
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1419
diff
changeset
|
67 |
apply (simp add: eqvts alpha_gen fresh_star_def fresh_zero_perm) |
95324fb345e5
looking at trm5_equivp
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1419
diff
changeset
|
68 |
done |
95324fb345e5
looking at trm5_equivp
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1419
diff
changeset
|
69 |
|
95324fb345e5
looking at trm5_equivp
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1419
diff
changeset
|
70 |
lemma alpha5_symp: |
1453
49bdb8d475df
The proof in 'Test' gets simpler.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1421
diff
changeset
|
71 |
"(a \<approx>5 b \<longrightarrow> b \<approx>5 a) \<and> |
1421
95324fb345e5
looking at trm5_equivp
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1419
diff
changeset
|
72 |
(x \<approx>l y \<longrightarrow> y \<approx>l x) \<and> |
1462
7c59dd8e5435
The old recursive alpha works fine.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1458
diff
changeset
|
73 |
(alpha_rbv5 x y \<longrightarrow> alpha_rbv5 y x)" |
1664
aa999d263b10
Modified abs_gen_sym and abs_gen_trans so it becomes usable in the proofs.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1603
diff
changeset
|
74 |
apply (rule alpha_rtrm5_alpha_rlts_alpha_rbv5.induct) |
aa999d263b10
Modified abs_gen_sym and abs_gen_trans so it becomes usable in the proofs.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1603
diff
changeset
|
75 |
apply (simp_all add: alpha5_inj) |
aa999d263b10
Modified abs_gen_sym and abs_gen_trans so it becomes usable in the proofs.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1603
diff
changeset
|
76 |
apply (erule exE) |
aa999d263b10
Modified abs_gen_sym and abs_gen_trans so it becomes usable in the proofs.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1603
diff
changeset
|
77 |
apply (rule_tac x="-pi" in exI) |
aa999d263b10
Modified abs_gen_sym and abs_gen_trans so it becomes usable in the proofs.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1603
diff
changeset
|
78 |
apply (rule alpha_gen_sym) |
aa999d263b10
Modified abs_gen_sym and abs_gen_trans so it becomes usable in the proofs.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1603
diff
changeset
|
79 |
apply (simp_all add: alphas) |
aa999d263b10
Modified abs_gen_sym and abs_gen_trans so it becomes usable in the proofs.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1603
diff
changeset
|
80 |
apply (case_tac x) |
aa999d263b10
Modified abs_gen_sym and abs_gen_trans so it becomes usable in the proofs.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1603
diff
changeset
|
81 |
apply (case_tac y) |
aa999d263b10
Modified abs_gen_sym and abs_gen_trans so it becomes usable in the proofs.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1603
diff
changeset
|
82 |
apply (simp add: alpha5_eqvt) |
aa999d263b10
Modified abs_gen_sym and abs_gen_trans so it becomes usable in the proofs.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1603
diff
changeset
|
83 |
apply clarify |
aa999d263b10
Modified abs_gen_sym and abs_gen_trans so it becomes usable in the proofs.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1603
diff
changeset
|
84 |
apply simp |
1587 | 85 |
done |
86 |
||
87 |
lemma alpha5_symp1: |
|
88 |
"(a \<approx>5 b \<longrightarrow> b \<approx>5 a) \<and> |
|
89 |
(x \<approx>l y \<longrightarrow> y \<approx>l x) \<and> |
|
90 |
(alpha_rbv5 x y \<longrightarrow> alpha_rbv5 y x)" |
|
1421
95324fb345e5
looking at trm5_equivp
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1419
diff
changeset
|
91 |
apply (rule alpha_rtrm5_alpha_rlts_alpha_rbv5.induct) |
95324fb345e5
looking at trm5_equivp
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1419
diff
changeset
|
92 |
apply (simp_all add: alpha5_inj) |
1455 | 93 |
apply (erule exE) |
94 |
apply (rule_tac x="- pi" in exI) |
|
1474
8a03753e0e02
Finished all proofs in Term5 and Term5n.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1464
diff
changeset
|
95 |
apply (simp add: alpha_gen) |
8a03753e0e02
Finished all proofs in Term5 and Term5n.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1464
diff
changeset
|
96 |
apply(simp add: fresh_star_def fresh_minus_perm) |
1455 | 97 |
apply clarify |
1462
7c59dd8e5435
The old recursive alpha works fine.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1458
diff
changeset
|
98 |
apply (rule conjI) |
1474
8a03753e0e02
Finished all proofs in Term5 and Term5n.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1464
diff
changeset
|
99 |
apply (rotate_tac 3) |
8a03753e0e02
Finished all proofs in Term5 and Term5n.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1464
diff
changeset
|
100 |
apply (frule_tac p="- pi" in alpha5_eqvt(2)) |
8a03753e0e02
Finished all proofs in Term5 and Term5n.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1464
diff
changeset
|
101 |
apply simp |
8a03753e0e02
Finished all proofs in Term5 and Term5n.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1464
diff
changeset
|
102 |
apply (rule conjI) |
8a03753e0e02
Finished all proofs in Term5 and Term5n.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1464
diff
changeset
|
103 |
apply (rotate_tac 5) |
8a03753e0e02
Finished all proofs in Term5 and Term5n.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1464
diff
changeset
|
104 |
apply (frule_tac p="- pi" in alpha5_eqvt(1)) |
8a03753e0e02
Finished all proofs in Term5 and Term5n.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1464
diff
changeset
|
105 |
apply simp |
8a03753e0e02
Finished all proofs in Term5 and Term5n.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1464
diff
changeset
|
106 |
apply (rotate_tac 6) |
8a03753e0e02
Finished all proofs in Term5 and Term5n.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1464
diff
changeset
|
107 |
apply simp |
8a03753e0e02
Finished all proofs in Term5 and Term5n.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1464
diff
changeset
|
108 |
apply (drule_tac p1="- pi" in permute_eq_iff[symmetric,THEN iffD1]) |
1587 | 109 |
apply (simp) |
110 |
done |
|
111 |
||
112 |
thm alpha_gen_sym[no_vars] |
|
113 |
thm alpha_gen_compose_sym[no_vars] |
|
114 |
||
115 |
lemma tt: |
|
116 |
"\<lbrakk>R (- p \<bullet> x) y \<Longrightarrow> R (p \<bullet> y) x; (bs, x) \<approx>gen R f (- p) (cs, y)\<rbrakk> \<Longrightarrow> (cs, y) \<approx>gen R f p (bs, x)" |
|
117 |
unfolding alphas |
|
118 |
unfolding fresh_star_def |
|
119 |
by (auto simp add: fresh_minus_perm) |
|
120 |
||
121 |
lemma alpha5_symp2: |
|
122 |
shows "a \<approx>5 b \<Longrightarrow> b \<approx>5 a" |
|
123 |
and "x \<approx>l y \<Longrightarrow> y \<approx>l x" |
|
124 |
and "alpha_rbv5 x y \<Longrightarrow> alpha_rbv5 y x" |
|
125 |
apply(induct rule: alpha_rtrm5_alpha_rlts_alpha_rbv5.inducts) |
|
126 |
(* non-binding case *) |
|
127 |
apply(simp add: alpha5_inj) |
|
128 |
(* non-binding case *) |
|
129 |
apply(simp add: alpha5_inj) |
|
130 |
(* binding case *) |
|
131 |
apply(simp add: alpha5_inj) |
|
132 |
apply(erule exE) |
|
133 |
apply(rule_tac x="- pi" in exI) |
|
134 |
apply(rule tt) |
|
135 |
apply(simp add: alphas) |
|
136 |
apply(erule conjE)+ |
|
137 |
apply(drule_tac p="- pi" in alpha5_eqvt(2)) |
|
138 |
apply(drule_tac p="- pi" in alpha5_eqvt(2)) |
|
139 |
apply(drule_tac p="- pi" in alpha5_eqvt(1)) |
|
140 |
apply(drule_tac p="- pi" in alpha5_eqvt(1)) |
|
141 |
apply(simp) |
|
142 |
apply(simp add: alphas) |
|
143 |
apply(erule conjE)+ |
|
144 |
apply metis |
|
145 |
(* non-binding case *) |
|
146 |
apply(simp add: alpha5_inj) |
|
147 |
(* non-binding case *) |
|
148 |
apply(simp add: alpha5_inj) |
|
149 |
(* non-binding case *) |
|
150 |
apply(simp add: alpha5_inj) |
|
151 |
(* non-binding case *) |
|
152 |
apply(simp add: alpha5_inj) |
|
1455 | 153 |
done |
154 |
||
1456
686c58ea7a24
alpha5_transp and equivp
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1455
diff
changeset
|
155 |
lemma alpha5_transp: |
686c58ea7a24
alpha5_transp and equivp
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1455
diff
changeset
|
156 |
"(a \<approx>5 b \<longrightarrow> (\<forall>c. b \<approx>5 c \<longrightarrow> a \<approx>5 c)) \<and> |
686c58ea7a24
alpha5_transp and equivp
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1455
diff
changeset
|
157 |
(x \<approx>l y \<longrightarrow> (\<forall>z. y \<approx>l z \<longrightarrow> x \<approx>l z)) \<and> |
1462
7c59dd8e5435
The old recursive alpha works fine.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1458
diff
changeset
|
158 |
(alpha_rbv5 k l \<longrightarrow> (\<forall>m. alpha_rbv5 l m \<longrightarrow> alpha_rbv5 k m))" |
1456
686c58ea7a24
alpha5_transp and equivp
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1455
diff
changeset
|
159 |
(*apply (tactic {* transp_tac @{context} @{thm alpha_rtrm5_alpha_rlts_alpha_rbv5.induct} @{thms alpha5_inj} @{thms rtrm5.distinct rtrm5.inject rlts.distinct rlts.inject} [] @{thms alpha_rtrm5.cases alpha_rlts.cases alpha_rbv5.cases} @{thms alpha5_eqvt} 1 *})*) |
686c58ea7a24
alpha5_transp and equivp
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1455
diff
changeset
|
160 |
apply (rule alpha_rtrm5_alpha_rlts_alpha_rbv5.induct) |
686c58ea7a24
alpha5_transp and equivp
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1455
diff
changeset
|
161 |
apply (rule_tac [!] allI) |
686c58ea7a24
alpha5_transp and equivp
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1455
diff
changeset
|
162 |
apply (tactic {* (imp_elim_tac @{thms alpha_rtrm5.cases alpha_rlts.cases alpha_rbv5.cases} @{context}) 1 *}) |
686c58ea7a24
alpha5_transp and equivp
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1455
diff
changeset
|
163 |
apply (simp_all add: alpha5_inj) |
686c58ea7a24
alpha5_transp and equivp
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1455
diff
changeset
|
164 |
apply (tactic {* (imp_elim_tac @{thms alpha_rtrm5.cases alpha_rlts.cases alpha_rbv5.cases} @{context}) 1 *}) |
686c58ea7a24
alpha5_transp and equivp
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1455
diff
changeset
|
165 |
apply (simp_all add: alpha5_inj) |
686c58ea7a24
alpha5_transp and equivp
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1455
diff
changeset
|
166 |
apply (tactic {* (imp_elim_tac @{thms alpha_rtrm5.cases alpha_rlts.cases alpha_rbv5.cases} @{context}) 1 *}) |
686c58ea7a24
alpha5_transp and equivp
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1455
diff
changeset
|
167 |
apply (simp_all add: alpha5_inj) |
1474
8a03753e0e02
Finished all proofs in Term5 and Term5n.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1464
diff
changeset
|
168 |
defer |
1456
686c58ea7a24
alpha5_transp and equivp
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1455
diff
changeset
|
169 |
apply (tactic {* (imp_elim_tac @{thms alpha_rtrm5.cases alpha_rlts.cases alpha_rbv5.cases} @{context}) 1 *}) |
686c58ea7a24
alpha5_transp and equivp
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1455
diff
changeset
|
170 |
apply (simp_all add: alpha5_inj) |
686c58ea7a24
alpha5_transp and equivp
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1455
diff
changeset
|
171 |
apply (tactic {* (imp_elim_tac @{thms alpha_rtrm5.cases alpha_rlts.cases alpha_rbv5.cases} @{context}) 1 *}) |
686c58ea7a24
alpha5_transp and equivp
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1455
diff
changeset
|
172 |
apply (simp_all add: alpha5_inj) |
1474
8a03753e0e02
Finished all proofs in Term5 and Term5n.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1464
diff
changeset
|
173 |
apply (tactic {* eetac @{thm exi_sum} @{context} 1 *}) |
1583
ed54632fab4a
Marked the place where a compose lemma applies.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1576
diff
changeset
|
174 |
(* HERE *) |
1587 | 175 |
(* |
176 |
apply(rule alpha_gen_trans) |
|
177 |
thm alpha_gen_trans |
|
178 |
defer |
|
1474
8a03753e0e02
Finished all proofs in Term5 and Term5n.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1464
diff
changeset
|
179 |
apply (simp add: alpha_gen) |
8a03753e0e02
Finished all proofs in Term5 and Term5n.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1464
diff
changeset
|
180 |
apply clarify |
8a03753e0e02
Finished all proofs in Term5 and Term5n.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1464
diff
changeset
|
181 |
apply(simp add: fresh_star_plus) |
8a03753e0e02
Finished all proofs in Term5 and Term5n.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1464
diff
changeset
|
182 |
apply (rule conjI) |
8a03753e0e02
Finished all proofs in Term5 and Term5n.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1464
diff
changeset
|
183 |
apply (erule_tac x="- pi \<bullet> rltsaa" in allE) |
8a03753e0e02
Finished all proofs in Term5 and Term5n.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1464
diff
changeset
|
184 |
apply (rotate_tac 5) |
8a03753e0e02
Finished all proofs in Term5 and Term5n.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1464
diff
changeset
|
185 |
apply (drule_tac p="- pi" in alpha5_eqvt(2)) |
8a03753e0e02
Finished all proofs in Term5 and Term5n.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1464
diff
changeset
|
186 |
apply simp |
8a03753e0e02
Finished all proofs in Term5 and Term5n.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1464
diff
changeset
|
187 |
apply (drule_tac p="pi" in alpha5_eqvt(2)) |
8a03753e0e02
Finished all proofs in Term5 and Term5n.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1464
diff
changeset
|
188 |
apply simp |
8a03753e0e02
Finished all proofs in Term5 and Term5n.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1464
diff
changeset
|
189 |
apply (erule_tac x="- pi \<bullet> rtrm5aa" in allE) |
8a03753e0e02
Finished all proofs in Term5 and Term5n.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1464
diff
changeset
|
190 |
apply (rotate_tac 7) |
8a03753e0e02
Finished all proofs in Term5 and Term5n.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1464
diff
changeset
|
191 |
apply (drule_tac p="- pi" in alpha5_eqvt(1)) |
8a03753e0e02
Finished all proofs in Term5 and Term5n.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1464
diff
changeset
|
192 |
apply simp |
8a03753e0e02
Finished all proofs in Term5 and Term5n.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1464
diff
changeset
|
193 |
apply (rotate_tac 3) |
8a03753e0e02
Finished all proofs in Term5 and Term5n.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1464
diff
changeset
|
194 |
apply (drule_tac p="pi" in alpha5_eqvt(1)) |
8a03753e0e02
Finished all proofs in Term5 and Term5n.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1464
diff
changeset
|
195 |
apply simp |
1456
686c58ea7a24
alpha5_transp and equivp
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1455
diff
changeset
|
196 |
done |
1587 | 197 |
*) |
198 |
sorry |
|
1421
95324fb345e5
looking at trm5_equivp
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1419
diff
changeset
|
199 |
|
1288
0203cd5cfd6c
The new alpha-equivalence and testing in Trm2 and Trm5.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1287
diff
changeset
|
200 |
lemma alpha5_equivp: |
0203cd5cfd6c
The new alpha-equivalence and testing in Trm2 and Trm5.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1287
diff
changeset
|
201 |
"equivp alpha_rtrm5" |
0203cd5cfd6c
The new alpha-equivalence and testing in Trm2 and Trm5.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1287
diff
changeset
|
202 |
"equivp alpha_rlts" |
1456
686c58ea7a24
alpha5_transp and equivp
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1455
diff
changeset
|
203 |
unfolding equivp_reflp_symp_transp reflp_def symp_def transp_def |
686c58ea7a24
alpha5_transp and equivp
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1455
diff
changeset
|
204 |
apply (simp_all only: alpha5_reflp) |
686c58ea7a24
alpha5_transp and equivp
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1455
diff
changeset
|
205 |
apply (meson alpha5_symp alpha5_transp) |
686c58ea7a24
alpha5_transp and equivp
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1455
diff
changeset
|
206 |
apply (meson alpha5_symp alpha5_transp) |
686c58ea7a24
alpha5_transp and equivp
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1455
diff
changeset
|
207 |
done |
1270
8c3cf9f4f5f2
Split Terms into separate files and add them to tests.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff
changeset
|
208 |
|
8c3cf9f4f5f2
Split Terms into separate files and add them to tests.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff
changeset
|
209 |
quotient_type |
8c3cf9f4f5f2
Split Terms into separate files and add them to tests.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff
changeset
|
210 |
trm5 = rtrm5 / alpha_rtrm5 |
8c3cf9f4f5f2
Split Terms into separate files and add them to tests.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff
changeset
|
211 |
and |
8c3cf9f4f5f2
Split Terms into separate files and add them to tests.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff
changeset
|
212 |
lts = rlts / alpha_rlts |
8c3cf9f4f5f2
Split Terms into separate files and add them to tests.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff
changeset
|
213 |
by (auto intro: alpha5_equivp) |
8c3cf9f4f5f2
Split Terms into separate files and add them to tests.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff
changeset
|
214 |
|
8c3cf9f4f5f2
Split Terms into separate files and add them to tests.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff
changeset
|
215 |
local_setup {* |
8c3cf9f4f5f2
Split Terms into separate files and add them to tests.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff
changeset
|
216 |
(fn ctxt => ctxt |
8c3cf9f4f5f2
Split Terms into separate files and add them to tests.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff
changeset
|
217 |
|> snd o (Quotient_Def.quotient_lift_const ("Vr5", @{term rVr5})) |
8c3cf9f4f5f2
Split Terms into separate files and add them to tests.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff
changeset
|
218 |
|> snd o (Quotient_Def.quotient_lift_const ("Ap5", @{term rAp5})) |
8c3cf9f4f5f2
Split Terms into separate files and add them to tests.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff
changeset
|
219 |
|> snd o (Quotient_Def.quotient_lift_const ("Lt5", @{term rLt5})) |
8c3cf9f4f5f2
Split Terms into separate files and add them to tests.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff
changeset
|
220 |
|> snd o (Quotient_Def.quotient_lift_const ("Lnil", @{term rLnil})) |
8c3cf9f4f5f2
Split Terms into separate files and add them to tests.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff
changeset
|
221 |
|> snd o (Quotient_Def.quotient_lift_const ("Lcons", @{term rLcons})) |
8c3cf9f4f5f2
Split Terms into separate files and add them to tests.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff
changeset
|
222 |
|> snd o (Quotient_Def.quotient_lift_const ("fv_trm5", @{term fv_rtrm5})) |
8c3cf9f4f5f2
Split Terms into separate files and add them to tests.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff
changeset
|
223 |
|> snd o (Quotient_Def.quotient_lift_const ("fv_lts", @{term fv_rlts})) |
1391
ebfbcadeac5e
Testing equalities in trm5, all seems good.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1288
diff
changeset
|
224 |
|> snd o (Quotient_Def.quotient_lift_const ("bv5", @{term rbv5})) |
ebfbcadeac5e
Testing equalities in trm5, all seems good.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1288
diff
changeset
|
225 |
|> snd o (Quotient_Def.quotient_lift_const ("alpha_bv5", @{term alpha_rbv5}))) |
1270
8c3cf9f4f5f2
Split Terms into separate files and add them to tests.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff
changeset
|
226 |
*} |
8c3cf9f4f5f2
Split Terms into separate files and add them to tests.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff
changeset
|
227 |
print_theorems |
8c3cf9f4f5f2
Split Terms into separate files and add them to tests.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff
changeset
|
228 |
|
8c3cf9f4f5f2
Split Terms into separate files and add them to tests.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff
changeset
|
229 |
lemma alpha5_rfv: |
1405
3e128904baba
More tries about the proofs in trm5
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1402
diff
changeset
|
230 |
"(t \<approx>5 s \<Longrightarrow> fv_rtrm5 t = fv_rtrm5 s)" |
1464
1850361efb8f
Revert 7c8cd6eae8e2, now all proofs in Term5 go through, both recursive and not.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1462
diff
changeset
|
231 |
"(l \<approx>l m \<Longrightarrow> fv_rlts l = fv_rlts m)" |
1850361efb8f
Revert 7c8cd6eae8e2, now all proofs in Term5 go through, both recursive and not.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1462
diff
changeset
|
232 |
"(alpha_rbv5 b c \<Longrightarrow> True)" |
1405
3e128904baba
More tries about the proofs in trm5
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1402
diff
changeset
|
233 |
apply(induct rule: alpha_rtrm5_alpha_rlts_alpha_rbv5.inducts) |
1454
7c8cd6eae8e2
FV_bn generated for recursive functions as well, and used in main fv for bindings.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1453
diff
changeset
|
234 |
apply(simp_all add: eqvts) |
1288
0203cd5cfd6c
The new alpha-equivalence and testing in Trm2 and Trm5.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1287
diff
changeset
|
235 |
apply(simp add: alpha_gen) |
1405
3e128904baba
More tries about the proofs in trm5
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1402
diff
changeset
|
236 |
apply(clarify) |
1474
8a03753e0e02
Finished all proofs in Term5 and Term5n.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1464
diff
changeset
|
237 |
apply blast |
1464
1850361efb8f
Revert 7c8cd6eae8e2, now all proofs in Term5 go through, both recursive and not.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1462
diff
changeset
|
238 |
done |
1270
8c3cf9f4f5f2
Split Terms into separate files and add them to tests.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff
changeset
|
239 |
|
8c3cf9f4f5f2
Split Terms into separate files and add them to tests.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff
changeset
|
240 |
lemma bv_list_rsp: |
8c3cf9f4f5f2
Split Terms into separate files and add them to tests.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff
changeset
|
241 |
shows "x \<approx>l y \<Longrightarrow> rbv5 x = rbv5 y" |
1391
ebfbcadeac5e
Testing equalities in trm5, all seems good.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1288
diff
changeset
|
242 |
apply(induct rule: alpha_rtrm5_alpha_rlts_alpha_rbv5.inducts(2)) |
1270
8c3cf9f4f5f2
Split Terms into separate files and add them to tests.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff
changeset
|
243 |
apply(simp_all) |
1288
0203cd5cfd6c
The new alpha-equivalence and testing in Trm2 and Trm5.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1287
diff
changeset
|
244 |
apply(clarify) |
0203cd5cfd6c
The new alpha-equivalence and testing in Trm2 and Trm5.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1287
diff
changeset
|
245 |
apply simp |
1270
8c3cf9f4f5f2
Split Terms into separate files and add them to tests.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff
changeset
|
246 |
done |
8c3cf9f4f5f2
Split Terms into separate files and add them to tests.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff
changeset
|
247 |
|
1464
1850361efb8f
Revert 7c8cd6eae8e2, now all proofs in Term5 go through, both recursive and not.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1462
diff
changeset
|
248 |
local_setup {* snd o Local_Theory.note ((@{binding alpha_dis}, []), (flat (map (distinct_rel @{context} @{thms alpha_rtrm5.cases alpha_rlts.cases alpha_rbv5.cases}) [(@{thms rtrm5.distinct}, @{term alpha_rtrm5}), (@{thms rlts.distinct}, @{term alpha_rlts}), (@{thms rlts.distinct}, @{term alpha_rbv5})]))) *} |
1850361efb8f
Revert 7c8cd6eae8e2, now all proofs in Term5 go through, both recursive and not.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1462
diff
changeset
|
249 |
print_theorems |
1850361efb8f
Revert 7c8cd6eae8e2, now all proofs in Term5 go through, both recursive and not.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1462
diff
changeset
|
250 |
|
1576
7b8f570b2450
Got rid of alpha_bn_rsp_cheat.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1575
diff
changeset
|
251 |
local_setup {* snd o Local_Theory.note ((@{binding alpha_bn_rsp}, []), prove_alpha_bn_rsp [@{term alpha_rtrm5}, @{term alpha_rlts}] @{thms alpha_rtrm5_alpha_rlts_alpha_rbv5.inducts} @{thms rtrm5.exhaust rlts.exhaust} @{thms alpha5_inj alpha_dis} @{thms alpha5_equivp} @{context} (@{term alpha_rbv5}, 1)) *} |
1575
2c37f5a8c747
alpha_bn_rsp_pre automatized.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1489
diff
changeset
|
252 |
thm alpha_bn_rsp |
1464
1850361efb8f
Revert 7c8cd6eae8e2, now all proofs in Term5 go through, both recursive and not.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1462
diff
changeset
|
253 |
|
1270
8c3cf9f4f5f2
Split Terms into separate files and add them to tests.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff
changeset
|
254 |
lemma [quot_respect]: |
8c3cf9f4f5f2
Split Terms into separate files and add them to tests.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff
changeset
|
255 |
"(alpha_rlts ===> op =) fv_rlts fv_rlts" |
8c3cf9f4f5f2
Split Terms into separate files and add them to tests.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff
changeset
|
256 |
"(alpha_rtrm5 ===> op =) fv_rtrm5 fv_rtrm5" |
8c3cf9f4f5f2
Split Terms into separate files and add them to tests.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff
changeset
|
257 |
"(alpha_rlts ===> op =) rbv5 rbv5" |
8c3cf9f4f5f2
Split Terms into separate files and add them to tests.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff
changeset
|
258 |
"(op = ===> alpha_rtrm5) rVr5 rVr5" |
8c3cf9f4f5f2
Split Terms into separate files and add them to tests.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff
changeset
|
259 |
"(alpha_rtrm5 ===> alpha_rtrm5 ===> alpha_rtrm5) rAp5 rAp5" |
8c3cf9f4f5f2
Split Terms into separate files and add them to tests.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff
changeset
|
260 |
"(alpha_rlts ===> alpha_rtrm5 ===> alpha_rtrm5) rLt5 rLt5" |
8c3cf9f4f5f2
Split Terms into separate files and add them to tests.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff
changeset
|
261 |
"(op = ===> alpha_rtrm5 ===> alpha_rlts ===> alpha_rlts) rLcons rLcons" |
8c3cf9f4f5f2
Split Terms into separate files and add them to tests.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff
changeset
|
262 |
"(op = ===> alpha_rtrm5 ===> alpha_rtrm5) permute permute" |
8c3cf9f4f5f2
Split Terms into separate files and add them to tests.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff
changeset
|
263 |
"(op = ===> alpha_rlts ===> alpha_rlts) permute permute" |
1462
7c59dd8e5435
The old recursive alpha works fine.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1458
diff
changeset
|
264 |
"(alpha_rlts ===> alpha_rlts ===> op =) alpha_rbv5 alpha_rbv5" |
1575
2c37f5a8c747
alpha_bn_rsp_pre automatized.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1489
diff
changeset
|
265 |
apply (simp_all add: alpha5_inj alpha5_rfv alpha5_eqvt bv_list_rsp alpha_bn_rsp) |
1288
0203cd5cfd6c
The new alpha-equivalence and testing in Trm2 and Trm5.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1287
diff
changeset
|
266 |
apply (clarify) |
1462
7c59dd8e5435
The old recursive alpha works fine.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1458
diff
changeset
|
267 |
apply (rule_tac x="0" in exI) |
7c59dd8e5435
The old recursive alpha works fine.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1458
diff
changeset
|
268 |
apply (simp add: fresh_star_def fresh_zero_perm alpha_gen alpha5_rfv) |
1464
1850361efb8f
Revert 7c8cd6eae8e2, now all proofs in Term5 go through, both recursive and not.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1462
diff
changeset
|
269 |
done |
1405
3e128904baba
More tries about the proofs in trm5
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1402
diff
changeset
|
270 |
|
1576
7b8f570b2450
Got rid of alpha_bn_rsp_cheat.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1575
diff
changeset
|
271 |
|
1270
8c3cf9f4f5f2
Split Terms into separate files and add them to tests.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff
changeset
|
272 |
lemma |
8c3cf9f4f5f2
Split Terms into separate files and add them to tests.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff
changeset
|
273 |
shows "(alpha_rlts ===> op =) rbv5 rbv5" |
8c3cf9f4f5f2
Split Terms into separate files and add them to tests.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff
changeset
|
274 |
by (simp add: bv_list_rsp) |
8c3cf9f4f5f2
Split Terms into separate files and add them to tests.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff
changeset
|
275 |
|
8c3cf9f4f5f2
Split Terms into separate files and add them to tests.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff
changeset
|
276 |
lemmas trm5_lts_inducts = rtrm5_rlts.inducts[quot_lifted] |
8c3cf9f4f5f2
Split Terms into separate files and add them to tests.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff
changeset
|
277 |
|
8c3cf9f4f5f2
Split Terms into separate files and add them to tests.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff
changeset
|
278 |
instantiation trm5 and lts :: pt |
8c3cf9f4f5f2
Split Terms into separate files and add them to tests.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff
changeset
|
279 |
begin |
8c3cf9f4f5f2
Split Terms into separate files and add them to tests.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff
changeset
|
280 |
|
8c3cf9f4f5f2
Split Terms into separate files and add them to tests.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff
changeset
|
281 |
quotient_definition |
8c3cf9f4f5f2
Split Terms into separate files and add them to tests.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff
changeset
|
282 |
"permute_trm5 :: perm \<Rightarrow> trm5 \<Rightarrow> trm5" |
8c3cf9f4f5f2
Split Terms into separate files and add them to tests.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff
changeset
|
283 |
is |
8c3cf9f4f5f2
Split Terms into separate files and add them to tests.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff
changeset
|
284 |
"permute :: perm \<Rightarrow> rtrm5 \<Rightarrow> rtrm5" |
8c3cf9f4f5f2
Split Terms into separate files and add them to tests.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff
changeset
|
285 |
|
8c3cf9f4f5f2
Split Terms into separate files and add them to tests.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff
changeset
|
286 |
quotient_definition |
8c3cf9f4f5f2
Split Terms into separate files and add them to tests.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff
changeset
|
287 |
"permute_lts :: perm \<Rightarrow> lts \<Rightarrow> lts" |
8c3cf9f4f5f2
Split Terms into separate files and add them to tests.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff
changeset
|
288 |
is |
8c3cf9f4f5f2
Split Terms into separate files and add them to tests.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff
changeset
|
289 |
"permute :: perm \<Rightarrow> rlts \<Rightarrow> rlts" |
8c3cf9f4f5f2
Split Terms into separate files and add them to tests.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff
changeset
|
290 |
|
8c3cf9f4f5f2
Split Terms into separate files and add them to tests.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff
changeset
|
291 |
instance by default |
8c3cf9f4f5f2
Split Terms into separate files and add them to tests.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff
changeset
|
292 |
(simp_all add: permute_rtrm5_permute_rlts_zero[quot_lifted] permute_rtrm5_permute_rlts_append[quot_lifted]) |
8c3cf9f4f5f2
Split Terms into separate files and add them to tests.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff
changeset
|
293 |
|
8c3cf9f4f5f2
Split Terms into separate files and add them to tests.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff
changeset
|
294 |
end |
8c3cf9f4f5f2
Split Terms into separate files and add them to tests.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff
changeset
|
295 |
|
1391
ebfbcadeac5e
Testing equalities in trm5, all seems good.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1288
diff
changeset
|
296 |
lemmas permute_trm5_lts = permute_rtrm5_permute_rlts.simps[quot_lifted] |
ebfbcadeac5e
Testing equalities in trm5, all seems good.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1288
diff
changeset
|
297 |
lemmas bv5[simp] = rbv5.simps[quot_lifted] |
1464
1850361efb8f
Revert 7c8cd6eae8e2, now all proofs in Term5 go through, both recursive and not.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1462
diff
changeset
|
298 |
lemmas fv_trm5_lts[simp] = fv_rtrm5_fv_rlts.simps[quot_lifted] |
1474
8a03753e0e02
Finished all proofs in Term5 and Term5n.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1464
diff
changeset
|
299 |
lemmas alpha5_INJ = alpha5_inj[unfolded alpha_gen2, unfolded alpha_gen, quot_lifted, folded alpha_gen2, folded alpha_gen] |
1464
1850361efb8f
Revert 7c8cd6eae8e2, now all proofs in Term5 go through, both recursive and not.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1462
diff
changeset
|
300 |
lemmas alpha5_DIS = alpha_dis[quot_lifted] |
1270
8c3cf9f4f5f2
Split Terms into separate files and add them to tests.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff
changeset
|
301 |
|
8c3cf9f4f5f2
Split Terms into separate files and add them to tests.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff
changeset
|
302 |
end |