2436
+ − 1
theory Let
2454
+ − 2
imports "../Nominal2"
1600
+ − 3
begin
+ − 4
+ − 5
atom_decl name
+ − 6
+ − 7
nominal_datatype trm =
2436
+ − 8
Var "name"
+ − 9
| App "trm" "trm"
+ − 10
| Lam x::"name" t::"trm" bind x in t
2490
+ − 11
| Let as::"assn" t::"trm" bind "bn as" in t
+ − 12
and assn =
+ − 13
ANil
+ − 14
| ACons "name" "trm" "assn"
1600
+ − 15
binder
+ − 16
bn
+ − 17
where
2490
+ − 18
"bn ANil = []"
+ − 19
| "bn (ACons x t as) = (atom x) # (bn as)"
+ − 20
+ − 21
thm trm_assn.fv_defs
2492
5ac9a74d22fd
post-processed eq_iff and supp threormes according to the fv-supp equality
Christian Urban <urbanc@in.tum.de>
diff
changeset
+ − 22
thm trm_assn.eq_iff
2490
+ − 23
thm trm_assn.bn_defs
+ − 24
thm trm_assn.perm_simps
2492
5ac9a74d22fd
post-processed eq_iff and supp threormes according to the fv-supp equality
Christian Urban <urbanc@in.tum.de>
diff
changeset
+ − 25
thm trm_assn.induct
5ac9a74d22fd
post-processed eq_iff and supp threormes according to the fv-supp equality
Christian Urban <urbanc@in.tum.de>
diff
changeset
+ − 26
thm trm_assn.inducts
2490
+ − 27
thm trm_assn.distinct
+ − 28
thm trm_assn.supp
2493
+ − 29
thm trm_assn.fresh
2617
e44551d067e6
properly exported strong exhaust theorem; cleaned up some examples
Christian Urban <urbanc@in.tum.de>
diff
changeset
+ − 30
thm trm_assn.exhaust
e44551d067e6
properly exported strong exhaust theorem; cleaned up some examples
Christian Urban <urbanc@in.tum.de>
diff
changeset
+ − 31
thm trm_assn.strong_exhaust
2494
+ − 32
2498
c7534584a7a0
use also induct_schema for the Let-example (permute_bn is used)
Christian Urban <urbanc@in.tum.de>
diff
changeset
+ − 33
(*
1602
+ − 34
lemma lets_bla:
+ − 35
"x \<noteq> z \<Longrightarrow> y \<noteq> z \<Longrightarrow> x \<noteq> y \<Longrightarrow>(Lt (Lcons x (Vr y) Lnil) (Vr x)) \<noteq> (Lt (Lcons x (Vr z) Lnil) (Vr x))"
+ − 36
by (simp add: trm_lts.eq_iff)
+ − 37
+ − 38
lemma lets_ok:
+ − 39
"(Lt (Lcons x (Vr y) Lnil) (Vr x)) = (Lt (Lcons y (Vr y) Lnil) (Vr y))"
+ − 40
apply (simp add: trm_lts.eq_iff)
+ − 41
apply (rule_tac x="(x \<leftrightarrow> y)" in exI)
2039
+ − 42
apply (simp_all add: alphas eqvts supp_at_base fresh_star_def)
1602
+ − 43
done
+ − 44
+ − 45
lemma lets_ok3:
+ − 46
"x \<noteq> y \<Longrightarrow>
+ − 47
(Lt (Lcons x (Ap (Vr y) (Vr x)) (Lcons y (Vr y) Lnil)) (Ap (Vr x) (Vr y))) \<noteq>
+ − 48
(Lt (Lcons y (Ap (Vr x) (Vr y)) (Lcons x (Vr x) Lnil)) (Ap (Vr x) (Vr y)))"
+ − 49
apply (simp add: alphas trm_lts.eq_iff)
+ − 50
done
+ − 51
+ − 52
+ − 53
lemma lets_not_ok1:
1685
+ − 54
"x \<noteq> y \<Longrightarrow>
+ − 55
(Lt (Lcons x (Vr x) (Lcons y (Vr y) Lnil)) (Ap (Vr x) (Vr y))) \<noteq>
1602
+ − 56
(Lt (Lcons y (Vr x) (Lcons x (Vr y) Lnil)) (Ap (Vr x) (Vr y)))"
1685
+ − 57
apply (simp add: alphas trm_lts.eq_iff fresh_star_def eqvts)
1602
+ − 58
done
+ − 59
+ − 60
lemma lets_nok:
+ − 61
"x \<noteq> y \<Longrightarrow> x \<noteq> z \<Longrightarrow> z \<noteq> y \<Longrightarrow>
+ − 62
(Lt (Lcons x (Ap (Vr z) (Vr z)) (Lcons y (Vr z) Lnil)) (Ap (Vr x) (Vr y))) \<noteq>
+ − 63
(Lt (Lcons y (Vr z) (Lcons x (Ap (Vr z) (Vr z)) Lnil)) (Ap (Vr x) (Vr y)))"
+ − 64
apply (simp add: alphas trm_lts.eq_iff fresh_star_def)
+ − 65
done
2436
+ − 66
*)
1602
+ − 67
1600
+ − 68
end
+ − 69
+ − 70
+ − 71