diff -r 3e37322465e2 -r 87eca760dcba Tutorial/Tutorial4s.thy --- a/Tutorial/Tutorial4s.thy Wed Feb 29 17:14:31 2012 +0000 +++ b/Tutorial/Tutorial4s.thy Mon Mar 05 16:27:28 2012 +0000 @@ -1,5 +1,5 @@ -theory Tutorial4 -imports Tutorial1 +theory Tutorial4s +imports Tutorial1s begin section {* The CBV Reduction Relation (Small-Step Semantics) *} @@ -115,18 +115,22 @@ proof (induct) case (m1 t1 t2 Es) thm machine.intros thm cbv2 - have "Es\\App t1 t2\ = (Es\ \ CAppL \ t2)\t1\" using ctx_compose ctx_composes.simps filling.simps by simp + have "Es\\App t1 t2\ = (Es\ \ CAppL \ t2)\t1\" + using ctx_compose ctx_composes.simps filling.simps by simp then show "Es\\App t1 t2\ \cbv* ((CAppL \ t2) # Es)\\t1\" using cbvs.intros by simp next case (m2 v t2 Es) have "val v" by fact - have "((CAppL \ t2) # Es)\\v\ = (CAppR v \ # Es)\\t2\" using ctx_compose ctx_composes.simps filling.simps by simp + have "((CAppL \ t2) # Es)\\v\ = (CAppR v \ # Es)\\t2\" + using ctx_compose ctx_composes.simps filling.simps by simp then show "((CAppL \ t2) # Es)\\v\ \cbv* (CAppR v \ # Es)\\t2\" using cbvs.intros by simp next case (m3 v x t Es) have aa: "val v" by fact - have "(((CAppR (Lam [x].t) \) # Es)\)\v\ = Es\\App (Lam [x]. t) v\" using ctx_compose ctx_composes.simps filling.simps by simp - then have "(((CAppR (Lam [x].t) \) # Es)\)\v\ \cbv (Es\)\(t[x ::= v])\" using better_cbv1[OF aa] cbv_in_ctx by simp + have "(((CAppR (Lam [x].t) \) # Es)\)\v\ = Es\\App (Lam [x]. t) v\" + using ctx_compose ctx_composes.simps filling.simps by simp + then have "(((CAppR (Lam [x].t) \) # Es)\)\v\ \cbv (Es\)\(t[x ::= v])\" + using better_cbv1[OF aa] cbv_in_ctx by simp then show "(((CAppR (Lam [x].t) \) # Es)\)\v\ \cbv* (Es\)\(t[x ::= v])\" using cbvs.intros by blast qed