diff -r 82cdc3755c2c -r f7cafd3c86b0 Quot/Examples/LamEx.thy --- a/Quot/Examples/LamEx.thy Wed Jan 20 12:20:18 2010 +0100 +++ b/Quot/Examples/LamEx.thy Wed Jan 20 12:33:19 2010 +0100 @@ -467,24 +467,9 @@ (* probably true *) sorry - - -lemma hom: - "\hom\Respects (alpha ===> op =). - ((\x. hom (rVar x) = f_var x) \ - (\l r. hom (rApp l r) = f_app l r (hom l) (hom r)) \ - (\x a. hom (rLam a x) = f_lam (\b. ([(a,b)]\ x)) (\b. hom ([(a,b)] \ x))))" -apply(rule_tac x="rlam_rec f_var f_app XX" in bexI) -apply(rule conjI) -apply(simp) -apply(rule conjI) -apply(simp) -apply(simp) -sorry - function - term1_hom :: "(name \ 'a) \ - (rlam \ rlam \ 'a \ 'a \ 'a) \ + term1_hom :: "(name \ 'a) \ + (rlam \ rlam \ 'a \ 'a \ 'a) \ ((name \ rlam) \ (name \ 'a) \ 'a) \ rlam \ 'a" where "term1_hom var app abs' (rVar x) = (var x)" @@ -510,7 +495,12 @@ apply(auto simp add: pi_size) done -lemma hom_res: " +lemma term1_hom_rsp: + "\(alpha ===> alpha ===> op =) f_app f_app; ((op = ===> alpha) ===> op =) f_lam f_lam\ + \ (alpha ===> op =) (term1_hom f_var f_app f_lam) (term1_hom f_var f_app f_lam)" +sorry + +lemma hom: " \f_var. \f_app \ Respects(alpha ===> alpha ===> op =). \f_lam \ Respects((op = ===> alpha) ===> op =). \hom\Respects (alpha ===> op =). @@ -520,19 +510,18 @@ apply(rule allI) apply(rule ballI)+ apply(rule_tac x="term1_hom f_var f_app f_lam" in bexI) -apply(rule conjI) -(* apply(simp add: term1_hom.psimps) *) -prefer 2 -apply(rule conjI) -(* apply(simp add: term1_hom.psimps) *) -sorry +apply(simp_all) +apply(simp only: in_respects) +apply(rule term1_hom_rsp) +apply(assumption)+ +done lemma hom': -"\hom. +"\hom. ((\x. hom (Var x) = f_var x) \ (\l r. hom (App l r) = f_app l r (hom l) (hom r)) \ (\x a. hom (Lam a x) = f_lam (\b. ([(a,b)] \ x)) (\b. hom ([(a,b)] \ x))))" -apply (lifting hom_res) +apply (lifting hom) done (* test test