950
98764f25f012
added Terms to Nominal - Instantiation of two types does not work (ask Florian)
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
+ − 1
theory Terms
1028
+ − 2
imports "Nominal2_Atoms" "Nominal2_Eqvt" "Nominal2_Supp" "../QuotMain" "Abs"
950
98764f25f012
added Terms to Nominal - Instantiation of two types does not work (ask Florian)
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
+ − 3
begin
98764f25f012
added Terms to Nominal - Instantiation of two types does not work (ask Florian)
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
+ − 4
98764f25f012
added Terms to Nominal - Instantiation of two types does not work (ask Florian)
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
+ − 5
atom_decl name
98764f25f012
added Terms to Nominal - Instantiation of two types does not work (ask Florian)
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
+ − 6
98764f25f012
added Terms to Nominal - Instantiation of two types does not work (ask Florian)
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
+ − 7
text {* primrec seems to be genarally faster than fun *}
98764f25f012
added Terms to Nominal - Instantiation of two types does not work (ask Florian)
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
+ − 8
98764f25f012
added Terms to Nominal - Instantiation of two types does not work (ask Florian)
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
+ − 9
section {*** lets with binding patterns ***}
98764f25f012
added Terms to Nominal - Instantiation of two types does not work (ask Florian)
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
+ − 10
1028
+ − 11
datatype rtrm1 =
+ − 12
rVr1 "name"
+ − 13
| rAp1 "rtrm1" "rtrm1"
+ − 14
| rLm1 "name" "rtrm1" --"name is bound in trm1"
+ − 15
| rLt1 "bp" "rtrm1" "rtrm1" --"all variables in bp are bound in the 2nd trm1"
950
98764f25f012
added Terms to Nominal - Instantiation of two types does not work (ask Florian)
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
+ − 16
and bp =
98764f25f012
added Terms to Nominal - Instantiation of two types does not work (ask Florian)
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
+ − 17
BUnit
98764f25f012
added Terms to Nominal - Instantiation of two types does not work (ask Florian)
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
+ − 18
| BVr "name"
98764f25f012
added Terms to Nominal - Instantiation of two types does not work (ask Florian)
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
+ − 19
| BPr "bp" "bp"
98764f25f012
added Terms to Nominal - Instantiation of two types does not work (ask Florian)
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
+ − 20
98764f25f012
added Terms to Nominal - Instantiation of two types does not work (ask Florian)
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
+ − 21
(* to be given by the user *)
1029
+ − 22
950
98764f25f012
added Terms to Nominal - Instantiation of two types does not work (ask Florian)
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
+ − 23
primrec
98764f25f012
added Terms to Nominal - Instantiation of two types does not work (ask Florian)
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
+ − 24
bv1
98764f25f012
added Terms to Nominal - Instantiation of two types does not work (ask Florian)
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
+ − 25
where
98764f25f012
added Terms to Nominal - Instantiation of two types does not work (ask Florian)
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
+ − 26
"bv1 (BUnit) = {}"
957
+ − 27
| "bv1 (BVr x) = {atom x}"
950
98764f25f012
added Terms to Nominal - Instantiation of two types does not work (ask Florian)
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
+ − 28
| "bv1 (BPr bp1 bp2) = (bv1 bp1) \<union> (bv1 bp1)"
98764f25f012
added Terms to Nominal - Instantiation of two types does not work (ask Florian)
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
+ − 29
98764f25f012
added Terms to Nominal - Instantiation of two types does not work (ask Florian)
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
+ − 30
(* needs to be calculated by the package *)
98764f25f012
added Terms to Nominal - Instantiation of two types does not work (ask Florian)
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
+ − 31
primrec
1028
+ − 32
rfv_trm1 and rfv_bp
950
98764f25f012
added Terms to Nominal - Instantiation of two types does not work (ask Florian)
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
+ − 33
where
1028
+ − 34
"rfv_trm1 (rVr1 x) = {atom x}"
+ − 35
| "rfv_trm1 (rAp1 t1 t2) = (rfv_trm1 t1) \<union> (rfv_trm1 t2)"
+ − 36
| "rfv_trm1 (rLm1 x t) = (rfv_trm1 t) - {atom x}"
+ − 37
| "rfv_trm1 (rLt1 bp t1 t2) = (rfv_trm1 t1) \<union> (rfv_trm1 t2 - bv1 bp)"
+ − 38
| "rfv_bp (BUnit) = {}"
+ − 39
| "rfv_bp (BVr x) = {atom x}"
+ − 40
| "rfv_bp (BPr b1 b2) = (rfv_bp b1) \<union> (rfv_bp b2)"
950
98764f25f012
added Terms to Nominal - Instantiation of two types does not work (ask Florian)
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
+ − 41
98764f25f012
added Terms to Nominal - Instantiation of two types does not work (ask Florian)
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
+ − 42
(* needs to be stated by the package *)
98764f25f012
added Terms to Nominal - Instantiation of two types does not work (ask Florian)
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
+ − 43
instantiation
1028
+ − 44
rtrm1 and bp :: pt
950
98764f25f012
added Terms to Nominal - Instantiation of two types does not work (ask Florian)
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
+ − 45
begin
98764f25f012
added Terms to Nominal - Instantiation of two types does not work (ask Florian)
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
+ − 46
98764f25f012
added Terms to Nominal - Instantiation of two types does not work (ask Florian)
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
+ − 47
primrec
1028
+ − 48
permute_rtrm1 and permute_bp
950
98764f25f012
added Terms to Nominal - Instantiation of two types does not work (ask Florian)
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
+ − 49
where
1028
+ − 50
"permute_rtrm1 pi (rVr1 a) = rVr1 (pi \<bullet> a)"
+ − 51
| "permute_rtrm1 pi (rAp1 t1 t2) = rAp1 (permute_rtrm1 pi t1) (permute_rtrm1 pi t2)"
+ − 52
| "permute_rtrm1 pi (rLm1 a t) = rLm1 (pi \<bullet> a) (permute_rtrm1 pi t)"
+ − 53
| "permute_rtrm1 pi (rLt1 bp t1 t2) = rLt1 (permute_bp pi bp) (permute_rtrm1 pi t1) (permute_rtrm1 pi t2)"
957
+ − 54
| "permute_bp pi (BUnit) = BUnit"
+ − 55
| "permute_bp pi (BVr a) = BVr (pi \<bullet> a)"
+ − 56
| "permute_bp pi (BPr bp1 bp2) = BPr (permute_bp pi bp1) (permute_bp pi bp2)"
+ − 57
1028
+ − 58
lemma pt_rtrm1_bp_zero:
+ − 59
fixes t::rtrm1
957
+ − 60
and b::bp
+ − 61
shows "0 \<bullet> t = t"
+ − 62
and "0 \<bullet> b = b"
1028
+ − 63
apply(induct t and b rule: rtrm1_bp.inducts)
957
+ − 64
apply(simp_all)
+ − 65
done
+ − 66
1028
+ − 67
lemma pt_rtrm1_bp_plus:
+ − 68
fixes t::rtrm1
957
+ − 69
and b::bp
+ − 70
shows "((p + q) \<bullet> t) = p \<bullet> (q \<bullet> t)"
+ − 71
and "((p + q) \<bullet> b) = p \<bullet> (q \<bullet> b)"
1028
+ − 72
apply(induct t and b rule: rtrm1_bp.inducts)
957
+ − 73
apply(simp_all)
+ − 74
done
+ − 75
+ − 76
instance
+ − 77
apply default
1028
+ − 78
apply(simp_all add: pt_rtrm1_bp_zero pt_rtrm1_bp_plus)
957
+ − 79
done
950
98764f25f012
added Terms to Nominal - Instantiation of two types does not work (ask Florian)
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
+ − 80
98764f25f012
added Terms to Nominal - Instantiation of two types does not work (ask Florian)
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
+ − 81
end
98764f25f012
added Terms to Nominal - Instantiation of two types does not work (ask Florian)
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
+ − 82
98764f25f012
added Terms to Nominal - Instantiation of two types does not work (ask Florian)
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
+ − 83
inductive
1028
+ − 84
alpha1 :: "rtrm1 \<Rightarrow> rtrm1 \<Rightarrow> bool" ("_ \<approx>1 _" [100, 100] 100)
950
98764f25f012
added Terms to Nominal - Instantiation of two types does not work (ask Florian)
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
+ − 85
where
1028
+ − 86
a1: "a = b \<Longrightarrow> (rVr1 a) \<approx>1 (rVr1 b)"
+ − 87
| a2: "\<lbrakk>t1 \<approx>1 t2; s1 \<approx>1 s2\<rbrakk> \<Longrightarrow> rAp1 t1 s1 \<approx>1 rAp1 t2 s2"
+ − 88
| a3: "(\<exists>pi. (({atom aa}, t) \<approx>gen alpha1 rfv_trm1 pi ({atom ab}, s))) \<Longrightarrow> rLm1 aa t \<approx>1 rLm1 ab s"
+ − 89
| a4: "t1 \<approx>1 t2 \<Longrightarrow> (\<exists>pi. (((bv1 b1), s1) \<approx>gen alpha1 rfv_trm1 pi ((bv1 b2), s2))) \<Longrightarrow> rLt1 b1 t1 s1 \<approx>1 rLt1 b2 t2 s2"
+ − 90
1029
+ − 91
lemma alpha1_inj:
1028
+ − 92
"(rVr1 a \<approx>1 rVr1 b) = (a = b)"
+ − 93
"(rAp1 t1 s1 \<approx>1 rAp1 t2 s2) = (t1 \<approx>1 t2 \<and> s1 \<approx>1 s2)"
+ − 94
"(rLm1 aa t \<approx>1 rLm1 ab s) = (\<exists>pi. (({atom aa}, t) \<approx>gen alpha1 rfv_trm1 pi ({atom ab}, s)))"
+ − 95
"(rLt1 b1 t1 s1 \<approx>1 rLt1 b2 t2 s2) = (t1 \<approx>1 t2 \<and> (\<exists>pi. (((bv1 b1), s1) \<approx>gen alpha1 rfv_trm1 pi ((bv1 b2), s2))))"
+ − 96
apply -
+ − 97
apply rule apply (erule alpha1.cases) apply (simp_all add: alpha1.intros)
+ − 98
apply rule apply (erule alpha1.cases) apply (simp_all add: alpha1.intros)
+ − 99
apply rule apply (erule alpha1.cases) apply (simp_all add: alpha1.intros)
+ − 100
apply rule apply (erule alpha1.cases) apply (simp_all add: alpha1.intros)
+ − 101
done
+ − 102
1030
07f97267a392
Finished the supp_fv proof; first proof that analyses the structure of 'Let' :)
Cezary Kaliszyk <kaliszyk@in.tum.de>
diff
changeset
+ − 103
(* Shouyld we derive it? But bv is given by the user? *)
07f97267a392
Finished the supp_fv proof; first proof that analyses the structure of 'Let' :)
Cezary Kaliszyk <kaliszyk@in.tum.de>
diff
changeset
+ − 104
lemma bv1_eqvt[eqvt]:
07f97267a392
Finished the supp_fv proof; first proof that analyses the structure of 'Let' :)
Cezary Kaliszyk <kaliszyk@in.tum.de>
diff
changeset
+ − 105
shows "(pi \<bullet> bv1 x) = bv1 (pi \<bullet> x)"
07f97267a392
Finished the supp_fv proof; first proof that analyses the structure of 'Let' :)
Cezary Kaliszyk <kaliszyk@in.tum.de>
diff
changeset
+ − 106
apply (induct x)
07f97267a392
Finished the supp_fv proof; first proof that analyses the structure of 'Let' :)
Cezary Kaliszyk <kaliszyk@in.tum.de>
diff
changeset
+ − 107
apply (simp_all add: eqvts)
07f97267a392
Finished the supp_fv proof; first proof that analyses the structure of 'Let' :)
Cezary Kaliszyk <kaliszyk@in.tum.de>
diff
changeset
+ − 108
apply (rule atom_eqvt)
07f97267a392
Finished the supp_fv proof; first proof that analyses the structure of 'Let' :)
Cezary Kaliszyk <kaliszyk@in.tum.de>
diff
changeset
+ − 109
done
07f97267a392
Finished the supp_fv proof; first proof that analyses the structure of 'Let' :)
Cezary Kaliszyk <kaliszyk@in.tum.de>
diff
changeset
+ − 110
1031
+ − 111
lemma rfv_trm1_eqvt[eqvt]:
+ − 112
shows "(pi\<bullet>rfv_trm1 t) = rfv_trm1 (pi\<bullet>t)"
+ − 113
apply (induct t)
+ − 114
apply (simp_all add: eqvts)
+ − 115
apply (rule atom_eqvt)
+ − 116
apply (simp add: atom_eqvt)
+ − 117
done
+ − 118
+ − 119
1028
+ − 120
lemma alpha1_eqvt:
+ − 121
shows "t \<approx>1 s \<Longrightarrow> (pi \<bullet> t) \<approx>1 (pi \<bullet> s)"
1031
+ − 122
apply (induct t s rule: alpha1.inducts)
+ − 123
apply (simp_all add:eqvts alpha1_inj)
1028
+ − 124
sorry
950
98764f25f012
added Terms to Nominal - Instantiation of two types does not work (ask Florian)
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
+ − 125
957
+ − 126
lemma alpha1_equivp: "equivp alpha1"
+ − 127
sorry
950
98764f25f012
added Terms to Nominal - Instantiation of two types does not work (ask Florian)
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
+ − 128
1028
+ − 129
quotient_type trm1 = rtrm1 / alpha1
950
98764f25f012
added Terms to Nominal - Instantiation of two types does not work (ask Florian)
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
+ − 130
by (rule alpha1_equivp)
98764f25f012
added Terms to Nominal - Instantiation of two types does not work (ask Florian)
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
+ − 131
1028
+ − 132
quotient_definition
+ − 133
"Vr1 :: name \<Rightarrow> trm1"
+ − 134
as
+ − 135
"rVr1"
+ − 136
1029
+ − 137
quotient_definition
+ − 138
"Ap1 :: trm1 \<Rightarrow> trm1 \<Rightarrow> trm1"
+ − 139
as
+ − 140
"rAp1"
+ − 141
+ − 142
quotient_definition
+ − 143
"Lm1 :: name \<Rightarrow> trm1 \<Rightarrow> trm1"
+ − 144
as
+ − 145
"rLm1"
+ − 146
+ − 147
quotient_definition
+ − 148
"Lt1 :: bp \<Rightarrow> trm1 \<Rightarrow> trm1 \<Rightarrow> trm1"
+ − 149
as
+ − 150
"rLt1"
+ − 151
+ − 152
quotient_definition
+ − 153
"fv_trm1 :: trm1 \<Rightarrow> atom set"
+ − 154
as
+ − 155
"rfv_trm1"
+ − 156
+ − 157
lemma alpha_rfv1:
+ − 158
shows "t \<approx>1 s \<Longrightarrow> rfv_trm1 t = rfv_trm1 s"
+ − 159
apply(induct rule: alpha1.induct)
+ − 160
apply(simp_all add: alpha_gen.simps)
+ − 161
done
+ − 162
+ − 163
lemma [quot_respect]:
+ − 164
"(op = ===> alpha1) rVr1 rVr1"
+ − 165
"(alpha1 ===> alpha1 ===> alpha1) rAp1 rAp1"
+ − 166
"(op = ===> alpha1 ===> alpha1) rLm1 rLm1"
+ − 167
"(op = ===> alpha1 ===> alpha1 ===> alpha1) rLt1 rLt1"
+ − 168
apply (auto intro: alpha1.intros)
+ − 169
apply(rule a3) apply (rule_tac x="0" in exI)
+ − 170
apply (simp add: fresh_star_def fresh_zero_perm alpha_rfv1 alpha_gen)
+ − 171
apply(rule a4) apply assumption apply (rule_tac x="0" in exI)
+ − 172
apply (simp add: fresh_star_def fresh_zero_perm alpha_rfv1 alpha_gen)
+ − 173
done
+ − 174
+ − 175
lemma [quot_respect]:
+ − 176
"(op = ===> alpha1 ===> alpha1) permute permute"
+ − 177
apply auto
+ − 178
apply (rule alpha1_eqvt)
+ − 179
apply simp
+ − 180
done
+ − 181
+ − 182
lemma [quot_respect]:
+ − 183
"(alpha1 ===> op =) rfv_trm1 rfv_trm1"
+ − 184
apply (simp add: alpha_rfv1)
+ − 185
done
+ − 186
+ − 187
lemma trm1_bp_induct: "
+ − 188
\<lbrakk>\<And>name. P1 (Vr1 name);
+ − 189
\<And>rtrm11 rtrm12. \<lbrakk>P1 rtrm11; P1 rtrm12\<rbrakk> \<Longrightarrow> P1 (Ap1 rtrm11 rtrm12);
+ − 190
\<And>name rtrm1. P1 rtrm1 \<Longrightarrow> P1 (Lm1 name rtrm1);
+ − 191
\<And>bp rtrm11 rtrm12.
+ − 192
\<lbrakk>P2 bp; P1 rtrm11; P1 rtrm12\<rbrakk> \<Longrightarrow> P1 (Lt1 bp rtrm11 rtrm12);
+ − 193
P2 BUnit; \<And>name. P2 (BVr name);
+ − 194
\<And>bp1 bp2. \<lbrakk>P2 bp1; P2 bp2\<rbrakk> \<Longrightarrow> P2 (BPr bp1 bp2)\<rbrakk>
+ − 195
\<Longrightarrow> P1 rtrma \<and> P2 bpa"
+ − 196
apply (lifting rtrm1_bp.induct)
+ − 197
done
+ − 198
+ − 199
lemma trm1_bp_inducts: "
+ − 200
\<lbrakk>\<And>name. P1 (Vr1 name);
+ − 201
\<And>rtrm11 rtrm12. \<lbrakk>P1 rtrm11; P1 rtrm12\<rbrakk> \<Longrightarrow> P1 (Ap1 rtrm11 rtrm12);
+ − 202
\<And>name rtrm1. P1 rtrm1 \<Longrightarrow> P1 (Lm1 name rtrm1);
+ − 203
\<And>bp rtrm11 rtrm12.
+ − 204
\<lbrakk>P2 bp; P1 rtrm11; P1 rtrm12\<rbrakk> \<Longrightarrow> P1 (Lt1 bp rtrm11 rtrm12);
+ − 205
P2 BUnit; \<And>name. P2 (BVr name);
+ − 206
\<And>bp1 bp2. \<lbrakk>P2 bp1; P2 bp2\<rbrakk> \<Longrightarrow> P2 (BPr bp1 bp2)\<rbrakk>
+ − 207
\<Longrightarrow> P1 rtrma"
+ − 208
"\<lbrakk>\<And>name. P1 (Vr1 name);
+ − 209
\<And>rtrm11 rtrm12. \<lbrakk>P1 rtrm11; P1 rtrm12\<rbrakk> \<Longrightarrow> P1 (Ap1 rtrm11 rtrm12);
+ − 210
\<And>name rtrm1. P1 rtrm1 \<Longrightarrow> P1 (Lm1 name rtrm1);
+ − 211
\<And>bp rtrm11 rtrm12.
+ − 212
\<lbrakk>P2 bp; P1 rtrm11; P1 rtrm12\<rbrakk> \<Longrightarrow> P1 (Lt1 bp rtrm11 rtrm12);
+ − 213
P2 BUnit; \<And>name. P2 (BVr name);
+ − 214
\<And>bp1 bp2. \<lbrakk>P2 bp1; P2 bp2\<rbrakk> \<Longrightarrow> P2 (BPr bp1 bp2)\<rbrakk>
+ − 215
\<Longrightarrow> P2 bpa"
+ − 216
by (lifting rtrm1_bp.inducts)
+ − 217
+ − 218
instantiation trm1 and bp :: pt
+ − 219
begin
+ − 220
+ − 221
quotient_definition
+ − 222
"permute_trm1 :: perm \<Rightarrow> trm1 \<Rightarrow> trm1"
+ − 223
as
+ − 224
"permute :: perm \<Rightarrow> rtrm1 \<Rightarrow> rtrm1"
+ − 225
+ − 226
lemma permute_trm1 [simp]:
+ − 227
shows "pi \<bullet> Vr1 a = Vr1 (pi \<bullet> a)"
+ − 228
and "pi \<bullet> Ap1 t1 t2 = Ap1 (pi \<bullet> t1) (pi \<bullet> t2)"
+ − 229
and "pi \<bullet> Lm1 a t = Lm1 (pi \<bullet> a) (pi \<bullet> t)"
+ − 230
and "pi \<bullet> Lt1 b t s = Lt1 (pi \<bullet> b) (pi \<bullet> t) (pi \<bullet> s)"
+ − 231
apply -
+ − 232
apply(lifting permute_rtrm1_permute_bp.simps(1))
+ − 233
apply(lifting permute_rtrm1_permute_bp.simps(2))
+ − 234
apply(lifting permute_rtrm1_permute_bp.simps(3))
+ − 235
apply(lifting permute_rtrm1_permute_bp.simps(4))
+ − 236
done
+ − 237
instance
+ − 238
apply default
+ − 239
apply(induct_tac [!] x rule: trm1_bp_inducts(1))
+ − 240
apply(simp_all)
+ − 241
done
+ − 242
+ − 243
end
+ − 244
+ − 245
lemma fv_trm1:
+ − 246
"fv_trm1 (Vr1 x) = {atom x}"
+ − 247
"fv_trm1 (Ap1 t1 t2) = fv_trm1 t1 \<union> fv_trm1 t2"
+ − 248
"fv_trm1 (Lm1 x t) = fv_trm1 t - {atom x}"
+ − 249
"fv_trm1 (Lt1 bp t1 t2) = fv_trm1 t1 \<union> (fv_trm1 t2 - bv1 bp)"
+ − 250
apply -
+ − 251
apply (lifting rfv_trm1_rfv_bp.simps(1))
+ − 252
apply (lifting rfv_trm1_rfv_bp.simps(2))
+ − 253
apply (lifting rfv_trm1_rfv_bp.simps(3))
+ − 254
apply (lifting rfv_trm1_rfv_bp.simps(4))
+ − 255
done
+ − 256
+ − 257
lemma fv_trm1_eqvt:
+ − 258
shows "(p \<bullet> fv_trm1 t) = fv_trm1 (p \<bullet> t)"
+ − 259
apply(lifting rfv_trm1_eqvt)
+ − 260
done
+ − 261
+ − 262
lemma alpha1_INJ:
+ − 263
"(Vr1 a = Vr1 b) = (a = b)"
+ − 264
"(Ap1 t1 s1 = Ap1 t2 s2) = (t1 = t2 \<and> s1 = s2)"
+ − 265
"(Lm1 aa t = Lm1 ab s) = (\<exists>pi. (({atom aa}, t) \<approx>gen (op =) fv_trm1 pi ({atom ab}, s)))"
+ − 266
"(Lt1 b1 t1 s1 = Lt1 b2 t2 s2) = (t1 = t2 \<and> (\<exists>pi. (((bv1 b1), s1) \<approx>gen (op =) fv_trm1 pi ((bv1 b2), s2))))"
+ − 267
unfolding alpha_gen apply (lifting alpha1_inj[unfolded alpha_gen])
+ − 268
done
+ − 269
1031
+ − 270
lemma lm1_supp_pre:
+ − 271
shows "(supp (atom x, t)) supports (Lm1 x t) "
+ − 272
apply(simp add: supports_def)
+ − 273
apply(fold fresh_def)
+ − 274
apply(simp add: fresh_Pair swap_fresh_fresh)
+ − 275
apply(clarify)
+ − 276
apply(subst swap_at_base_simps(3))
+ − 277
apply(simp_all add: fresh_atom)
+ − 278
done
+ − 279
+ − 280
lemma lt1_supp_pre:
+ − 281
shows "(supp (x, t, s)) supports (Lt1 t x s) "
+ − 282
apply(simp add: supports_def)
+ − 283
apply(fold fresh_def)
+ − 284
apply(simp add: fresh_Pair swap_fresh_fresh)
+ − 285
done
+ − 286
+ − 287
lemma bp_supp: "finite (supp (bp :: bp))"
+ − 288
apply (induct bp)
+ − 289
apply(simp_all add: supp_def)
+ − 290
apply (fold supp_def)
+ − 291
apply (simp add: supp_at_base)
+ − 292
apply(simp add: Collect_imp_eq)
+ − 293
apply(simp add: Collect_neg_eq[symmetric])
+ − 294
apply (fold supp_def)
+ − 295
apply (simp)
+ − 296
done
+ − 297
1030
07f97267a392
Finished the supp_fv proof; first proof that analyses the structure of 'Let' :)
Cezary Kaliszyk <kaliszyk@in.tum.de>
diff
changeset
+ − 298
instance trm1 :: fs
07f97267a392
Finished the supp_fv proof; first proof that analyses the structure of 'Let' :)
Cezary Kaliszyk <kaliszyk@in.tum.de>
diff
changeset
+ − 299
apply default
07f97267a392
Finished the supp_fv proof; first proof that analyses the structure of 'Let' :)
Cezary Kaliszyk <kaliszyk@in.tum.de>
diff
changeset
+ − 300
apply(induct_tac x rule: trm1_bp_inducts(1))
07f97267a392
Finished the supp_fv proof; first proof that analyses the structure of 'Let' :)
Cezary Kaliszyk <kaliszyk@in.tum.de>
diff
changeset
+ − 301
apply(simp_all)
07f97267a392
Finished the supp_fv proof; first proof that analyses the structure of 'Let' :)
Cezary Kaliszyk <kaliszyk@in.tum.de>
diff
changeset
+ − 302
apply(simp add: supp_def alpha1_INJ eqvts)
07f97267a392
Finished the supp_fv proof; first proof that analyses the structure of 'Let' :)
Cezary Kaliszyk <kaliszyk@in.tum.de>
diff
changeset
+ − 303
apply(simp add: supp_def[symmetric] supp_at_base)
07f97267a392
Finished the supp_fv proof; first proof that analyses the structure of 'Let' :)
Cezary Kaliszyk <kaliszyk@in.tum.de>
diff
changeset
+ − 304
apply(simp only: supp_def alpha1_INJ eqvts permute_trm1)
07f97267a392
Finished the supp_fv proof; first proof that analyses the structure of 'Let' :)
Cezary Kaliszyk <kaliszyk@in.tum.de>
diff
changeset
+ − 305
apply(simp add: Collect_imp_eq Collect_neg_eq)
1031
+ − 306
apply(rule supports_finite)
+ − 307
apply(rule lm1_supp_pre)
+ − 308
apply(simp add: supp_Pair supp_atom)
+ − 309
apply(rule supports_finite)
+ − 310
apply(rule lt1_supp_pre)
+ − 311
apply(simp add: supp_Pair supp_atom bp_supp)
+ − 312
done
1030
07f97267a392
Finished the supp_fv proof; first proof that analyses the structure of 'Let' :)
Cezary Kaliszyk <kaliszyk@in.tum.de>
diff
changeset
+ − 313
1029
+ − 314
lemma supp_fv:
+ − 315
shows "supp t = fv_trm1 t"
+ − 316
apply(induct t rule: trm1_bp_inducts(1))
1030
07f97267a392
Finished the supp_fv proof; first proof that analyses the structure of 'Let' :)
Cezary Kaliszyk <kaliszyk@in.tum.de>
diff
changeset
+ − 317
apply(simp_all)
07f97267a392
Finished the supp_fv proof; first proof that analyses the structure of 'Let' :)
Cezary Kaliszyk <kaliszyk@in.tum.de>
diff
changeset
+ − 318
apply(simp add: supp_def permute_trm1 alpha1_INJ fv_trm1)
07f97267a392
Finished the supp_fv proof; first proof that analyses the structure of 'Let' :)
Cezary Kaliszyk <kaliszyk@in.tum.de>
diff
changeset
+ − 319
apply(simp only: supp_at_base[simplified supp_def])
07f97267a392
Finished the supp_fv proof; first proof that analyses the structure of 'Let' :)
Cezary Kaliszyk <kaliszyk@in.tum.de>
diff
changeset
+ − 320
apply(simp add: supp_def permute_trm1 alpha1_INJ fv_trm1)
07f97267a392
Finished the supp_fv proof; first proof that analyses the structure of 'Let' :)
Cezary Kaliszyk <kaliszyk@in.tum.de>
diff
changeset
+ − 321
apply(simp add: Collect_imp_eq Collect_neg_eq)
07f97267a392
Finished the supp_fv proof; first proof that analyses the structure of 'Let' :)
Cezary Kaliszyk <kaliszyk@in.tum.de>
diff
changeset
+ − 322
apply(subgoal_tac "supp (Lm1 name rtrm1) = supp (Abs {atom name} rtrm1)")
07f97267a392
Finished the supp_fv proof; first proof that analyses the structure of 'Let' :)
Cezary Kaliszyk <kaliszyk@in.tum.de>
diff
changeset
+ − 323
apply(simp add: supp_Abs fv_trm1)
07f97267a392
Finished the supp_fv proof; first proof that analyses the structure of 'Let' :)
Cezary Kaliszyk <kaliszyk@in.tum.de>
diff
changeset
+ − 324
apply(simp (no_asm) add: supp_def permute_set_eq atom_eqvt)
07f97267a392
Finished the supp_fv proof; first proof that analyses the structure of 'Let' :)
Cezary Kaliszyk <kaliszyk@in.tum.de>
diff
changeset
+ − 325
apply(simp add: alpha1_INJ)
07f97267a392
Finished the supp_fv proof; first proof that analyses the structure of 'Let' :)
Cezary Kaliszyk <kaliszyk@in.tum.de>
diff
changeset
+ − 326
apply(simp add: Abs_eq_iff)
07f97267a392
Finished the supp_fv proof; first proof that analyses the structure of 'Let' :)
Cezary Kaliszyk <kaliszyk@in.tum.de>
diff
changeset
+ − 327
apply(simp add: alpha_gen.simps)
07f97267a392
Finished the supp_fv proof; first proof that analyses the structure of 'Let' :)
Cezary Kaliszyk <kaliszyk@in.tum.de>
diff
changeset
+ − 328
apply(simp add: supp_eqvt[symmetric] fv_trm1_eqvt[symmetric])
07f97267a392
Finished the supp_fv proof; first proof that analyses the structure of 'Let' :)
Cezary Kaliszyk <kaliszyk@in.tum.de>
diff
changeset
+ − 329
apply(subgoal_tac "supp (Lt1 bp rtrm11 rtrm12) = supp(rtrm11) \<union> supp (Abs (bv1 bp) rtrm12)")
07f97267a392
Finished the supp_fv proof; first proof that analyses the structure of 'Let' :)
Cezary Kaliszyk <kaliszyk@in.tum.de>
diff
changeset
+ − 330
apply(simp add: supp_Abs fv_trm1)
07f97267a392
Finished the supp_fv proof; first proof that analyses the structure of 'Let' :)
Cezary Kaliszyk <kaliszyk@in.tum.de>
diff
changeset
+ − 331
apply(simp (no_asm) add: supp_def)
07f97267a392
Finished the supp_fv proof; first proof that analyses the structure of 'Let' :)
Cezary Kaliszyk <kaliszyk@in.tum.de>
diff
changeset
+ − 332
apply(simp add: alpha1_INJ)
07f97267a392
Finished the supp_fv proof; first proof that analyses the structure of 'Let' :)
Cezary Kaliszyk <kaliszyk@in.tum.de>
diff
changeset
+ − 333
apply(simp add: Abs_eq_iff)
07f97267a392
Finished the supp_fv proof; first proof that analyses the structure of 'Let' :)
Cezary Kaliszyk <kaliszyk@in.tum.de>
diff
changeset
+ − 334
apply(simp add: alpha_gen.simps)
07f97267a392
Finished the supp_fv proof; first proof that analyses the structure of 'Let' :)
Cezary Kaliszyk <kaliszyk@in.tum.de>
diff
changeset
+ − 335
apply(simp add: supp_eqvt[symmetric] fv_trm1_eqvt[symmetric] bv1_eqvt)
07f97267a392
Finished the supp_fv proof; first proof that analyses the structure of 'Let' :)
Cezary Kaliszyk <kaliszyk@in.tum.de>
diff
changeset
+ − 336
apply(simp add: Collect_imp_eq Collect_neg_eq)
07f97267a392
Finished the supp_fv proof; first proof that analyses the structure of 'Let' :)
Cezary Kaliszyk <kaliszyk@in.tum.de>
diff
changeset
+ − 337
done
1029
+ − 338
1032
135bf399c036
The trm1_support lemma explicitly and stated a strong induction principle.
Cezary Kaliszyk <kaliszyk@in.tum.de>
diff
changeset
+ − 339
lemma trm1_supp:
135bf399c036
The trm1_support lemma explicitly and stated a strong induction principle.
Cezary Kaliszyk <kaliszyk@in.tum.de>
diff
changeset
+ − 340
"supp (Vr1 x) = {atom x}"
135bf399c036
The trm1_support lemma explicitly and stated a strong induction principle.
Cezary Kaliszyk <kaliszyk@in.tum.de>
diff
changeset
+ − 341
"supp (Ap1 t1 t2) = supp t1 \<union> supp t2"
135bf399c036
The trm1_support lemma explicitly and stated a strong induction principle.
Cezary Kaliszyk <kaliszyk@in.tum.de>
diff
changeset
+ − 342
"supp (Lm1 x t) = (supp t) - {atom x}"
135bf399c036
The trm1_support lemma explicitly and stated a strong induction principle.
Cezary Kaliszyk <kaliszyk@in.tum.de>
diff
changeset
+ − 343
"supp (Lt1 b t s) = supp t \<union> (supp s - bv1 b)"
135bf399c036
The trm1_support lemma explicitly and stated a strong induction principle.
Cezary Kaliszyk <kaliszyk@in.tum.de>
diff
changeset
+ − 344
by (simp_all only: supp_fv fv_trm1)
135bf399c036
The trm1_support lemma explicitly and stated a strong induction principle.
Cezary Kaliszyk <kaliszyk@in.tum.de>
diff
changeset
+ − 345
135bf399c036
The trm1_support lemma explicitly and stated a strong induction principle.
Cezary Kaliszyk <kaliszyk@in.tum.de>
diff
changeset
+ − 346
lemma trm1_induct_strong:
135bf399c036
The trm1_support lemma explicitly and stated a strong induction principle.
Cezary Kaliszyk <kaliszyk@in.tum.de>
diff
changeset
+ − 347
assumes "\<And>name b. P b (Vr1 name)"
135bf399c036
The trm1_support lemma explicitly and stated a strong induction principle.
Cezary Kaliszyk <kaliszyk@in.tum.de>
diff
changeset
+ − 348
and "\<And>rtrm11 rtrm12 b. \<lbrakk>\<And>c. P c rtrm11; \<And>c. P c rtrm12\<rbrakk> \<Longrightarrow> P b (Ap1 rtrm11 rtrm12)"
135bf399c036
The trm1_support lemma explicitly and stated a strong induction principle.
Cezary Kaliszyk <kaliszyk@in.tum.de>
diff
changeset
+ − 349
and "\<And>name rtrm1 b. \<lbrakk>\<And>c. P c rtrm1; (atom name) \<sharp> b\<rbrakk> \<Longrightarrow> P b (Lm1 name rtrm1)"
135bf399c036
The trm1_support lemma explicitly and stated a strong induction principle.
Cezary Kaliszyk <kaliszyk@in.tum.de>
diff
changeset
+ − 350
and "\<And>bp rtrm11 rtrm12 b. \<lbrakk>\<And>c. P c rtrm11; \<And>c. P c rtrm12; bp1 bp \<sharp>* b\<rbrakk> \<Longrightarrow> P b (Lt1 bp rtrm11 rtrm12)"
135bf399c036
The trm1_support lemma explicitly and stated a strong induction principle.
Cezary Kaliszyk <kaliszyk@in.tum.de>
diff
changeset
+ − 351
shows "P a rtrma"
135bf399c036
The trm1_support lemma explicitly and stated a strong induction principle.
Cezary Kaliszyk <kaliszyk@in.tum.de>
diff
changeset
+ − 352
135bf399c036
The trm1_support lemma explicitly and stated a strong induction principle.
Cezary Kaliszyk <kaliszyk@in.tum.de>
diff
changeset
+ − 353
950
98764f25f012
added Terms to Nominal - Instantiation of two types does not work (ask Florian)
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
+ − 354
section {*** lets with single assignments ***}
98764f25f012
added Terms to Nominal - Instantiation of two types does not work (ask Florian)
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
+ − 355
98764f25f012
added Terms to Nominal - Instantiation of two types does not work (ask Florian)
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
+ − 356
datatype trm2 =
98764f25f012
added Terms to Nominal - Instantiation of two types does not work (ask Florian)
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
+ − 357
Vr2 "name"
98764f25f012
added Terms to Nominal - Instantiation of two types does not work (ask Florian)
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
+ − 358
| Ap2 "trm2" "trm2"
98764f25f012
added Terms to Nominal - Instantiation of two types does not work (ask Florian)
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
+ − 359
| Lm2 "name" "trm2"
98764f25f012
added Terms to Nominal - Instantiation of two types does not work (ask Florian)
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
+ − 360
| Lt2 "assign" "trm2"
98764f25f012
added Terms to Nominal - Instantiation of two types does not work (ask Florian)
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
+ − 361
and assign =
98764f25f012
added Terms to Nominal - Instantiation of two types does not work (ask Florian)
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
+ − 362
As "name" "trm2"
98764f25f012
added Terms to Nominal - Instantiation of two types does not work (ask Florian)
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
+ − 363
98764f25f012
added Terms to Nominal - Instantiation of two types does not work (ask Florian)
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
+ − 364
(* to be given by the user *)
98764f25f012
added Terms to Nominal - Instantiation of two types does not work (ask Florian)
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
+ − 365
primrec
98764f25f012
added Terms to Nominal - Instantiation of two types does not work (ask Florian)
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
+ − 366
bv2
98764f25f012
added Terms to Nominal - Instantiation of two types does not work (ask Florian)
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
+ − 367
where
957
+ − 368
"bv2 (As x t) = {atom x}"
950
98764f25f012
added Terms to Nominal - Instantiation of two types does not work (ask Florian)
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
+ − 369
98764f25f012
added Terms to Nominal - Instantiation of two types does not work (ask Florian)
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
+ − 370
(* needs to be calculated by the package *)
98764f25f012
added Terms to Nominal - Instantiation of two types does not work (ask Florian)
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
+ − 371
primrec
98764f25f012
added Terms to Nominal - Instantiation of two types does not work (ask Florian)
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
+ − 372
fv_trm2 and fv_assign
98764f25f012
added Terms to Nominal - Instantiation of two types does not work (ask Florian)
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
+ − 373
where
957
+ − 374
"fv_trm2 (Vr2 x) = {atom x}"
950
98764f25f012
added Terms to Nominal - Instantiation of two types does not work (ask Florian)
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
+ − 375
| "fv_trm2 (Ap2 t1 t2) = (fv_trm2 t1) \<union> (fv_trm2 t2)"
957
+ − 376
| "fv_trm2 (Lm2 x t) = (fv_trm2 t) - {atom x}"
950
98764f25f012
added Terms to Nominal - Instantiation of two types does not work (ask Florian)
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
+ − 377
| "fv_trm2 (Lt2 as t) = (fv_trm2 t - bv2 as) \<union> (fv_assign as)"
98764f25f012
added Terms to Nominal - Instantiation of two types does not work (ask Florian)
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
+ − 378
| "fv_assign (As x t) = (fv_trm2 t)"
98764f25f012
added Terms to Nominal - Instantiation of two types does not work (ask Florian)
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
+ − 379
98764f25f012
added Terms to Nominal - Instantiation of two types does not work (ask Florian)
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
+ − 380
(* needs to be stated by the package *)
957
+ − 381
instantiation
+ − 382
trm2 and assign :: pt
950
98764f25f012
added Terms to Nominal - Instantiation of two types does not work (ask Florian)
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
+ − 383
begin
98764f25f012
added Terms to Nominal - Instantiation of two types does not work (ask Florian)
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
+ − 384
98764f25f012
added Terms to Nominal - Instantiation of two types does not work (ask Florian)
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
+ − 385
primrec
957
+ − 386
permute_trm2 and permute_assign
950
98764f25f012
added Terms to Nominal - Instantiation of two types does not work (ask Florian)
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
+ − 387
where
957
+ − 388
"permute_trm2 pi (Vr2 a) = Vr2 (pi \<bullet> a)"
+ − 389
| "permute_trm2 pi (Ap2 t1 t2) = Ap2 (permute_trm2 pi t1) (permute_trm2 pi t2)"
+ − 390
| "permute_trm2 pi (Lm2 a t) = Lm2 (pi \<bullet> a) (permute_trm2 pi t)"
+ − 391
| "permute_trm2 pi (Lt2 as t) = Lt2 (permute_assign pi as) (permute_trm2 pi t)"
+ − 392
| "permute_assign pi (As a t) = As (pi \<bullet> a) (permute_trm2 pi t)"
+ − 393
+ − 394
lemma pt_trm2_assign_zero:
+ − 395
fixes t::trm2
+ − 396
and b::assign
+ − 397
shows "0 \<bullet> t = t"
+ − 398
and "0 \<bullet> b = b"
+ − 399
apply(induct t and b rule: trm2_assign.inducts)
+ − 400
apply(simp_all)
+ − 401
done
+ − 402
+ − 403
lemma pt_trm2_assign_plus:
+ − 404
fixes t::trm2
+ − 405
and b::assign
+ − 406
shows "((p + q) \<bullet> t) = p \<bullet> (q \<bullet> t)"
+ − 407
and "((p + q) \<bullet> b) = p \<bullet> (q \<bullet> b)"
+ − 408
apply(induct t and b rule: trm2_assign.inducts)
+ − 409
apply(simp_all)
+ − 410
done
+ − 411
+ − 412
instance
+ − 413
apply default
+ − 414
apply(simp_all add: pt_trm2_assign_zero pt_trm2_assign_plus)
+ − 415
done
+ − 416
950
98764f25f012
added Terms to Nominal - Instantiation of two types does not work (ask Florian)
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
+ − 417
98764f25f012
added Terms to Nominal - Instantiation of two types does not work (ask Florian)
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
+ − 418
end
98764f25f012
added Terms to Nominal - Instantiation of two types does not work (ask Florian)
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
+ − 419
98764f25f012
added Terms to Nominal - Instantiation of two types does not work (ask Florian)
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
+ − 420
inductive
98764f25f012
added Terms to Nominal - Instantiation of two types does not work (ask Florian)
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
+ − 421
alpha2 :: "trm2 \<Rightarrow> trm2 \<Rightarrow> bool" ("_ \<approx>2 _" [100, 100] 100)
98764f25f012
added Terms to Nominal - Instantiation of two types does not work (ask Florian)
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
+ − 422
where
98764f25f012
added Terms to Nominal - Instantiation of two types does not work (ask Florian)
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
+ − 423
a1: "a = b \<Longrightarrow> (Vr2 a) \<approx>2 (Vr2 b)"
98764f25f012
added Terms to Nominal - Instantiation of two types does not work (ask Florian)
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
+ − 424
| a2: "\<lbrakk>t1 \<approx>2 t2; s1 \<approx>2 s2\<rbrakk> \<Longrightarrow> Ap2 t1 s1 \<approx>2 Ap2 t2 s2"
957
+ − 425
| a3: "\<exists>pi. (fv_trm2 t - {atom a} = fv_trm2 s - {atom b} \<and>
+ − 426
(fv_trm2 t - {atom a})\<sharp>* pi \<and>
+ − 427
(pi \<bullet> t) \<approx>2 s \<and>
+ − 428
(pi \<bullet> a) = b)
950
98764f25f012
added Terms to Nominal - Instantiation of two types does not work (ask Florian)
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
+ − 429
\<Longrightarrow> Lm2 a t \<approx>2 Lm2 b s"
957
+ − 430
| a4: "\<exists>pi. (
950
98764f25f012
added Terms to Nominal - Instantiation of two types does not work (ask Florian)
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
+ − 431
fv_trm2 t1 - fv_assign b1 = fv_trm2 t2 - fv_assign b2 \<and>
98764f25f012
added Terms to Nominal - Instantiation of two types does not work (ask Florian)
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
+ − 432
(fv_trm2 t1 - fv_assign b1) \<sharp>* pi \<and>
98764f25f012
added Terms to Nominal - Instantiation of two types does not work (ask Florian)
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
+ − 433
pi \<bullet> t1 = t2 (* \<and> (pi \<bullet> b1 = b2) *)
98764f25f012
added Terms to Nominal - Instantiation of two types does not work (ask Florian)
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
+ − 434
) \<Longrightarrow> Lt2 b1 t1 \<approx>2 Lt2 b2 t2"
98764f25f012
added Terms to Nominal - Instantiation of two types does not work (ask Florian)
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
+ − 435
957
+ − 436
lemma alpha2_equivp: "equivp alpha2"
+ − 437
sorry
950
98764f25f012
added Terms to Nominal - Instantiation of two types does not work (ask Florian)
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
+ − 438
98764f25f012
added Terms to Nominal - Instantiation of two types does not work (ask Florian)
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
+ − 439
quotient_type qtrm2 = trm2 / alpha2
98764f25f012
added Terms to Nominal - Instantiation of two types does not work (ask Florian)
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
+ − 440
by (rule alpha2_equivp)
98764f25f012
added Terms to Nominal - Instantiation of two types does not work (ask Florian)
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
+ − 441
98764f25f012
added Terms to Nominal - Instantiation of two types does not work (ask Florian)
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
+ − 442
section {*** lets with many assignments ***}
98764f25f012
added Terms to Nominal - Instantiation of two types does not work (ask Florian)
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
+ − 443
98764f25f012
added Terms to Nominal - Instantiation of two types does not work (ask Florian)
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
+ − 444
datatype trm3 =
98764f25f012
added Terms to Nominal - Instantiation of two types does not work (ask Florian)
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
+ − 445
Vr3 "name"
98764f25f012
added Terms to Nominal - Instantiation of two types does not work (ask Florian)
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
+ − 446
| Ap3 "trm3" "trm3"
98764f25f012
added Terms to Nominal - Instantiation of two types does not work (ask Florian)
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
+ − 447
| Lm3 "name" "trm3"
98764f25f012
added Terms to Nominal - Instantiation of two types does not work (ask Florian)
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
+ − 448
| Lt3 "assigns" "trm3"
98764f25f012
added Terms to Nominal - Instantiation of two types does not work (ask Florian)
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
+ − 449
and assigns =
98764f25f012
added Terms to Nominal - Instantiation of two types does not work (ask Florian)
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
+ − 450
ANil
98764f25f012
added Terms to Nominal - Instantiation of two types does not work (ask Florian)
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
+ − 451
| ACons "name" "trm3" "assigns"
98764f25f012
added Terms to Nominal - Instantiation of two types does not work (ask Florian)
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
+ − 452
98764f25f012
added Terms to Nominal - Instantiation of two types does not work (ask Florian)
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
+ − 453
(* to be given by the user *)
98764f25f012
added Terms to Nominal - Instantiation of two types does not work (ask Florian)
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
+ − 454
primrec
98764f25f012
added Terms to Nominal - Instantiation of two types does not work (ask Florian)
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
+ − 455
bv3
98764f25f012
added Terms to Nominal - Instantiation of two types does not work (ask Florian)
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
+ − 456
where
98764f25f012
added Terms to Nominal - Instantiation of two types does not work (ask Florian)
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
+ − 457
"bv3 ANil = {}"
957
+ − 458
| "bv3 (ACons x t as) = {atom x} \<union> (bv3 as)"
950
98764f25f012
added Terms to Nominal - Instantiation of two types does not work (ask Florian)
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
+ − 459
98764f25f012
added Terms to Nominal - Instantiation of two types does not work (ask Florian)
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
+ − 460
primrec
98764f25f012
added Terms to Nominal - Instantiation of two types does not work (ask Florian)
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
+ − 461
fv_trm3 and fv_assigns
98764f25f012
added Terms to Nominal - Instantiation of two types does not work (ask Florian)
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
+ − 462
where
957
+ − 463
"fv_trm3 (Vr3 x) = {atom x}"
950
98764f25f012
added Terms to Nominal - Instantiation of two types does not work (ask Florian)
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
+ − 464
| "fv_trm3 (Ap3 t1 t2) = (fv_trm3 t1) \<union> (fv_trm3 t2)"
957
+ − 465
| "fv_trm3 (Lm3 x t) = (fv_trm3 t) - {atom x}"
950
98764f25f012
added Terms to Nominal - Instantiation of two types does not work (ask Florian)
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
+ − 466
| "fv_trm3 (Lt3 as t) = (fv_trm3 t - bv3 as) \<union> (fv_assigns as)"
98764f25f012
added Terms to Nominal - Instantiation of two types does not work (ask Florian)
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
+ − 467
| "fv_assigns (ANil) = {}"
98764f25f012
added Terms to Nominal - Instantiation of two types does not work (ask Florian)
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
+ − 468
| "fv_assigns (ACons x t as) = (fv_trm3 t) \<union> (fv_assigns as)"
98764f25f012
added Terms to Nominal - Instantiation of two types does not work (ask Florian)
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
+ − 469
98764f25f012
added Terms to Nominal - Instantiation of two types does not work (ask Florian)
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
+ − 470
(* needs to be stated by the package *)
957
+ − 471
instantiation
+ − 472
trm3 and assigns :: pt
950
98764f25f012
added Terms to Nominal - Instantiation of two types does not work (ask Florian)
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
+ − 473
begin
98764f25f012
added Terms to Nominal - Instantiation of two types does not work (ask Florian)
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
+ − 474
98764f25f012
added Terms to Nominal - Instantiation of two types does not work (ask Florian)
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
+ − 475
primrec
957
+ − 476
permute_trm3 and permute_assigns
950
98764f25f012
added Terms to Nominal - Instantiation of two types does not work (ask Florian)
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
+ − 477
where
957
+ − 478
"permute_trm3 pi (Vr3 a) = Vr3 (pi \<bullet> a)"
+ − 479
| "permute_trm3 pi (Ap3 t1 t2) = Ap3 (permute_trm3 pi t1) (permute_trm3 pi t2)"
+ − 480
| "permute_trm3 pi (Lm3 a t) = Lm3 (pi \<bullet> a) (permute_trm3 pi t)"
+ − 481
| "permute_trm3 pi (Lt3 as t) = Lt3 (permute_assigns pi as) (permute_trm3 pi t)"
+ − 482
| "permute_assigns pi (ANil) = ANil"
+ − 483
| "permute_assigns pi (ACons a t as) = ACons (pi \<bullet> a) (permute_trm3 pi t) (permute_assigns pi as)"
+ − 484
+ − 485
lemma pt_trm3_assigns_zero:
+ − 486
fixes t::trm3
+ − 487
and b::assigns
+ − 488
shows "0 \<bullet> t = t"
+ − 489
and "0 \<bullet> b = b"
+ − 490
apply(induct t and b rule: trm3_assigns.inducts)
+ − 491
apply(simp_all)
+ − 492
done
+ − 493
+ − 494
lemma pt_trm3_assigns_plus:
+ − 495
fixes t::trm3
+ − 496
and b::assigns
+ − 497
shows "((p + q) \<bullet> t) = p \<bullet> (q \<bullet> t)"
+ − 498
and "((p + q) \<bullet> b) = p \<bullet> (q \<bullet> b)"
+ − 499
apply(induct t and b rule: trm3_assigns.inducts)
+ − 500
apply(simp_all)
+ − 501
done
+ − 502
+ − 503
instance
+ − 504
apply default
+ − 505
apply(simp_all add: pt_trm3_assigns_zero pt_trm3_assigns_plus)
+ − 506
done
+ − 507
950
98764f25f012
added Terms to Nominal - Instantiation of two types does not work (ask Florian)
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
+ − 508
98764f25f012
added Terms to Nominal - Instantiation of two types does not work (ask Florian)
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
+ − 509
end
98764f25f012
added Terms to Nominal - Instantiation of two types does not work (ask Florian)
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
+ − 510
98764f25f012
added Terms to Nominal - Instantiation of two types does not work (ask Florian)
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
+ − 511
inductive
98764f25f012
added Terms to Nominal - Instantiation of two types does not work (ask Florian)
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
+ − 512
alpha3 :: "trm3 \<Rightarrow> trm3 \<Rightarrow> bool" ("_ \<approx>3 _" [100, 100] 100)
98764f25f012
added Terms to Nominal - Instantiation of two types does not work (ask Florian)
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
+ − 513
where
98764f25f012
added Terms to Nominal - Instantiation of two types does not work (ask Florian)
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
+ − 514
a1: "a = b \<Longrightarrow> (Vr3 a) \<approx>3 (Vr3 b)"
98764f25f012
added Terms to Nominal - Instantiation of two types does not work (ask Florian)
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
+ − 515
| a2: "\<lbrakk>t1 \<approx>3 t2; s1 \<approx>3 s2\<rbrakk> \<Longrightarrow> Ap3 t1 s1 \<approx>3 Ap3 t2 s2"
957
+ − 516
| a3: "\<exists>pi. (fv_trm3 t - {atom a} = fv_trm3 s - {atom b} \<and>
+ − 517
(fv_trm3 t - {atom a})\<sharp>* pi \<and>
+ − 518
(pi \<bullet> t) \<approx>3 s \<and>
+ − 519
(pi \<bullet> a) = b)
950
98764f25f012
added Terms to Nominal - Instantiation of two types does not work (ask Florian)
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
+ − 520
\<Longrightarrow> Lm3 a t \<approx>3 Lm3 b s"
957
+ − 521
| a4: "\<exists>pi. (
950
98764f25f012
added Terms to Nominal - Instantiation of two types does not work (ask Florian)
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
+ − 522
fv_trm3 t1 - fv_assigns b1 = fv_trm3 t2 - fv_assigns b2 \<and>
98764f25f012
added Terms to Nominal - Instantiation of two types does not work (ask Florian)
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
+ − 523
(fv_trm3 t1 - fv_assigns b1) \<sharp>* pi \<and>
98764f25f012
added Terms to Nominal - Instantiation of two types does not work (ask Florian)
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
+ − 524
pi \<bullet> t1 = t2 (* \<and> (pi \<bullet> b1 = b2) *)
98764f25f012
added Terms to Nominal - Instantiation of two types does not work (ask Florian)
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
+ − 525
) \<Longrightarrow> Lt3 b1 t1 \<approx>3 Lt3 b2 t2"
98764f25f012
added Terms to Nominal - Instantiation of two types does not work (ask Florian)
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
+ − 526
957
+ − 527
lemma alpha3_equivp: "equivp alpha3"
+ − 528
sorry
950
98764f25f012
added Terms to Nominal - Instantiation of two types does not work (ask Florian)
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
+ − 529
98764f25f012
added Terms to Nominal - Instantiation of two types does not work (ask Florian)
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
+ − 530
quotient_type qtrm3 = trm3 / alpha3
98764f25f012
added Terms to Nominal - Instantiation of two types does not work (ask Florian)
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
+ − 531
by (rule alpha3_equivp)
98764f25f012
added Terms to Nominal - Instantiation of two types does not work (ask Florian)
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
+ − 532
98764f25f012
added Terms to Nominal - Instantiation of two types does not work (ask Florian)
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
+ − 533
98764f25f012
added Terms to Nominal - Instantiation of two types does not work (ask Florian)
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
+ − 534
section {*** lam with indirect list recursion ***}
98764f25f012
added Terms to Nominal - Instantiation of two types does not work (ask Florian)
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
+ − 535
98764f25f012
added Terms to Nominal - Instantiation of two types does not work (ask Florian)
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
+ − 536
datatype trm4 =
98764f25f012
added Terms to Nominal - Instantiation of two types does not work (ask Florian)
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
+ − 537
Vr4 "name"
98764f25f012
added Terms to Nominal - Instantiation of two types does not work (ask Florian)
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
+ − 538
| Ap4 "trm4" "trm4 list"
98764f25f012
added Terms to Nominal - Instantiation of two types does not work (ask Florian)
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
+ − 539
| Lm4 "name" "trm4"
98764f25f012
added Terms to Nominal - Instantiation of two types does not work (ask Florian)
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
+ − 540
98764f25f012
added Terms to Nominal - Instantiation of two types does not work (ask Florian)
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
+ − 541
thm trm4.recs
98764f25f012
added Terms to Nominal - Instantiation of two types does not work (ask Florian)
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
+ − 542
98764f25f012
added Terms to Nominal - Instantiation of two types does not work (ask Florian)
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
+ − 543
primrec
98764f25f012
added Terms to Nominal - Instantiation of two types does not work (ask Florian)
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
+ − 544
fv_trm4 and fv_trm4_list
98764f25f012
added Terms to Nominal - Instantiation of two types does not work (ask Florian)
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
+ − 545
where
957
+ − 546
"fv_trm4 (Vr4 x) = {atom x}"
950
98764f25f012
added Terms to Nominal - Instantiation of two types does not work (ask Florian)
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
+ − 547
| "fv_trm4 (Ap4 t ts) = (fv_trm4 t) \<union> (fv_trm4_list ts)"
957
+ − 548
| "fv_trm4 (Lm4 x t) = (fv_trm4 t) - {atom x}"
950
98764f25f012
added Terms to Nominal - Instantiation of two types does not work (ask Florian)
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
+ − 549
| "fv_trm4_list ([]) = {}"
98764f25f012
added Terms to Nominal - Instantiation of two types does not work (ask Florian)
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
+ − 550
| "fv_trm4_list (t#ts) = (fv_trm4 t) \<union> (fv_trm4_list ts)"
98764f25f012
added Terms to Nominal - Instantiation of two types does not work (ask Florian)
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
+ − 551
98764f25f012
added Terms to Nominal - Instantiation of two types does not work (ask Florian)
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
+ − 552
98764f25f012
added Terms to Nominal - Instantiation of two types does not work (ask Florian)
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
+ − 553
(* needs to be stated by the package *)
98764f25f012
added Terms to Nominal - Instantiation of two types does not work (ask Florian)
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
+ − 554
(* there cannot be a clause for lists, as *)
957
+ − 555
(* permuteutations are already defined in Nominal (also functions, options, and so on) *)
+ − 556
instantiation
+ − 557
trm4 :: pt
950
98764f25f012
added Terms to Nominal - Instantiation of two types does not work (ask Florian)
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
+ − 558
begin
98764f25f012
added Terms to Nominal - Instantiation of two types does not work (ask Florian)
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
+ − 559
957
+ − 560
(* does not work yet *)
950
98764f25f012
added Terms to Nominal - Instantiation of two types does not work (ask Florian)
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
+ − 561
primrec
963
+ − 562
permute_trm4 and permute_trm4_list
950
98764f25f012
added Terms to Nominal - Instantiation of two types does not work (ask Florian)
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
+ − 563
where
957
+ − 564
"permute_trm4 pi (Vr4 a) = Vr4 (pi \<bullet> a)"
963
+ − 565
| "permute_trm4 pi (Ap4 t ts) = Ap4 (permute_trm4 pi t) (permute_trm4_list pi ts)"
957
+ − 566
| "permute_trm4 pi (Lm4 a t) = Lm4 (pi \<bullet> a) (permute_trm4 pi t)"
963
+ − 567
| "permute_trm4_list pi ([]) = []"
+ − 568
| "permute_trm4_list pi (t#ts) = (permute_trm4 pi t) # (permute_trm4_list pi ts)"
+ − 569
+ − 570
lemma pt_trm4_list_zero:
+ − 571
fixes t::trm4
+ − 572
and ts::"trm4 list"
+ − 573
shows "0 \<bullet> t = t"
+ − 574
and "permute_trm4_list 0 ts = ts"
+ − 575
apply(induct t and ts rule: trm4.inducts)
+ − 576
apply(simp_all)
+ − 577
done
+ − 578
+ − 579
lemma pt_trm4_list_plus:
+ − 580
fixes t::trm4
+ − 581
and ts::"trm4 list"
+ − 582
shows "((p + q) \<bullet> t) = p \<bullet> (q \<bullet> t)"
+ − 583
and "(permute_trm4_list (p + q) ts) = permute_trm4_list p (permute_trm4_list q ts)"
+ − 584
apply(induct t and ts rule: trm4.inducts)
+ − 585
apply(simp_all)
+ − 586
done
+ − 587
+ − 588
+ − 589
instance
+ − 590
apply(default)
+ − 591
apply(simp_all add: pt_trm4_list_zero pt_trm4_list_plus)
+ − 592
done
950
98764f25f012
added Terms to Nominal - Instantiation of two types does not work (ask Florian)
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
+ − 593
98764f25f012
added Terms to Nominal - Instantiation of two types does not work (ask Florian)
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
+ − 594
end
98764f25f012
added Terms to Nominal - Instantiation of two types does not work (ask Florian)
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
+ − 595
963
+ − 596
(* "repairing" of the permute function *)
+ − 597
lemma repaired:
+ − 598
fixes ts::"trm4 list"
+ − 599
shows "permute_trm4_list p ts = p \<bullet> ts"
+ − 600
apply(induct ts)
+ − 601
apply(simp_all)
+ − 602
done
+ − 603
976
+ − 604
thm permute_trm4_permute_trm4_list.simps
963
+ − 605
thm permute_trm4_permute_trm4_list.simps[simplified repaired]
+ − 606
950
98764f25f012
added Terms to Nominal - Instantiation of two types does not work (ask Florian)
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
+ − 607
inductive
98764f25f012
added Terms to Nominal - Instantiation of two types does not work (ask Florian)
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
+ − 608
alpha4 :: "trm4 \<Rightarrow> trm4 \<Rightarrow> bool" ("_ \<approx>4 _" [100, 100] 100)
98764f25f012
added Terms to Nominal - Instantiation of two types does not work (ask Florian)
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
+ − 609
and alpha4list :: "trm4 list \<Rightarrow> trm4 list \<Rightarrow> bool" ("_ \<approx>4list _" [100, 100] 100)
98764f25f012
added Terms to Nominal - Instantiation of two types does not work (ask Florian)
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
+ − 610
where
98764f25f012
added Terms to Nominal - Instantiation of two types does not work (ask Florian)
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
+ − 611
a1: "a = b \<Longrightarrow> (Vr4 a) \<approx>4 (Vr4 b)"
98764f25f012
added Terms to Nominal - Instantiation of two types does not work (ask Florian)
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
+ − 612
| a2: "\<lbrakk>t1 \<approx>4 t2; s1 \<approx>4list s2\<rbrakk> \<Longrightarrow> Ap4 t1 s1 \<approx>4 Ap4 t2 s2"
963
+ − 613
| a4: "\<exists>pi. (fv_trm4 t - {atom a} = fv_trm4 s - {atom b} \<and>
+ − 614
(fv_trm4 t - {atom a})\<sharp>* pi \<and>
+ − 615
(pi \<bullet> t) \<approx>4 s \<and>
+ − 616
(pi \<bullet> a) = b)
950
98764f25f012
added Terms to Nominal - Instantiation of two types does not work (ask Florian)
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
+ − 617
\<Longrightarrow> Lm4 a t \<approx>4 Lm4 b s"
98764f25f012
added Terms to Nominal - Instantiation of two types does not work (ask Florian)
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
+ − 618
| a5: "[] \<approx>4list []"
98764f25f012
added Terms to Nominal - Instantiation of two types does not work (ask Florian)
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
+ − 619
| a6: "\<lbrakk>t \<approx>4 s; ts \<approx>4list ss\<rbrakk> \<Longrightarrow> (t#ts) \<approx>4list (s#ss)"
98764f25f012
added Terms to Nominal - Instantiation of two types does not work (ask Florian)
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
+ − 620
98764f25f012
added Terms to Nominal - Instantiation of two types does not work (ask Florian)
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
+ − 621
lemma alpha4_equivp: "equivp alpha4" sorry
98764f25f012
added Terms to Nominal - Instantiation of two types does not work (ask Florian)
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
+ − 622
lemma alpha4list_equivp: "equivp alpha4list" sorry
98764f25f012
added Terms to Nominal - Instantiation of two types does not work (ask Florian)
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
+ − 623
98764f25f012
added Terms to Nominal - Instantiation of two types does not work (ask Florian)
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
+ − 624
quotient_type
98764f25f012
added Terms to Nominal - Instantiation of two types does not work (ask Florian)
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
+ − 625
qtrm4 = trm4 / alpha4 and
98764f25f012
added Terms to Nominal - Instantiation of two types does not work (ask Florian)
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
+ − 626
qtrm4list = "trm4 list" / alpha4list
98764f25f012
added Terms to Nominal - Instantiation of two types does not work (ask Florian)
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
+ − 627
by (simp_all add: alpha4_equivp alpha4list_equivp)
98764f25f012
added Terms to Nominal - Instantiation of two types does not work (ask Florian)
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
+ − 628
963
+ − 629
+ − 630
950
98764f25f012
added Terms to Nominal - Instantiation of two types does not work (ask Florian)
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
+ − 631
end