theory Contexts imports"HOL-Nominal.Nominal" begin
text\<open>
We show here that the Plotkin-style of defining
beta-reduction (based on congruence rules) is
equivalent to the Felleisen-Hieb-style representation
(based on contexts).
The interesting point in this theoryis that contexts
do not contain any binders. On the other hand the operation
of filling a term into a context produces an alpha-equivalent term.
\<close>
atom_decl name
text\<open>
Lambda-Terms - the Lam-term constructor binds a name \<close>
text\<open>The proof that shows both relations are equal.\<close>
lemma cong_red_in_ctx: assumes a: "t \o t'" shows"E\t\ \o E\t'\" using a by (induct E rule: ctx.induct) (auto)
lemma ctx_red_in_ctx: assumes a: "t \x t'" shows"E\t\ \x E\t'\" using a by (induct) (auto simp add: ctx_compose[symmetric])
theorem ctx_red_implies_cong_red: assumes a: "t \x t'" shows"t \o t'" using a by (induct) (auto intro: cong_red_in_ctx)
theorem cong_red_implies_ctx_red: assumes a: "t \o t'" shows"t \x t'" using a proof (induct) case (obeta x t' t) have"\\App (Lam [x].t) t'\ \x \\t[x::=t']\" by (rule xbeta) thenshow"App (Lam [x].t) t' \x t[x::=t']" by simp qed (metis ctx_red_in_ctx filling.simps)+ (* found by SledgeHammer *)
lemma ctx_existence: assumes a: "t \o t'" shows"\C s s'. t = C\s\ \ t' = C\s'\ \ s \o s'" using a by (induct) (metis cong_red.intros filling.simps)+
end
¤ Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.0.0Bemerkung:
(vorverarbeitet)
¤
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung ist noch experimentell.