# HG changeset patch # User Cezary Kaliszyk # Date 1263921462 -3600 # Node ID 3bd2847cfda73e209b143c74a4af09db21c8d9aa # Parent 2468c0f2b2762c76ae8eff1a9d97458adb480ede A version of hom with quantifiers. diff -r 2468c0f2b276 -r 3bd2847cfda7 Quot/Examples/LamEx.thy --- a/Quot/Examples/LamEx.thy Sun Jan 17 02:24:15 2010 +0100 +++ b/Quot/Examples/LamEx.thy Tue Jan 19 18:17:42 2010 +0100 @@ -32,23 +32,23 @@ declare perm_rlam.simps[eqvt] instance rlam::pt_name -apply(default) -apply(induct_tac [!] x rule: rlam.induct) -apply(simp_all add: pt_name2 pt_name3) -done + apply(default) + apply(induct_tac [!] x rule: rlam.induct) + apply(simp_all add: pt_name2 pt_name3) + done instance rlam::fs_name -apply(default) -apply(induct_tac [!] x rule: rlam.induct) -apply(simp add: supp_def) -apply(fold supp_def) -apply(simp add: supp_atm) -apply(simp add: supp_def Collect_imp_eq Collect_neg_eq) -apply(simp add: supp_def) -apply(simp add: supp_def Collect_imp_eq Collect_neg_eq[symmetric]) -apply(fold supp_def) -apply(simp add: supp_atm) -done + apply(default) + apply(induct_tac [!] x rule: rlam.induct) + apply(simp add: supp_def) + apply(fold supp_def) + apply(simp add: supp_atm) + apply(simp add: supp_def Collect_imp_eq Collect_neg_eq) + apply(simp add: supp_def) + apply(simp add: supp_def Collect_imp_eq Collect_neg_eq[symmetric]) + apply(fold supp_def) + apply(simp add: supp_atm) + done declare set_diff_eqvt[eqvt] @@ -480,33 +480,29 @@ apply(simp) sorry -lemma hom_reg:" -(\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)) \ - (\xa a. hom (rLam a xa) = f_lam (\b. [(a, b)] \ xa) (\b. hom ([(a, b)] \ xa)))) \ -(\hom. - (\x. hom (rVar x) = f_var x) \ - (\l r. hom (rApp l r) = f_app l r (hom l) (hom r)) \ - (\xa a. hom (rLam a xa) = f_lam (\b. [(a, b)] \ xa) (\b. hom ([(a, b)] \ xa))))" -by(regularize) - -lemma hom_pre:" -(\hom. - (\x. hom (rVar x) = f_var x) \ - (\l r. hom (rApp l r) = f_app l r (hom l) (hom r)) \ - (\xa a. hom (rLam a xa) = f_lam (\b. [(a, b)] \ xa) (\b. hom ([(a, b)] \ xa))))" -apply (rule impE[OF hom_reg]) -apply (rule hom) -apply (assumption) -done +lemma hom_res: " +\f_var. \f_app \ Respects(alpha ===> alpha ===> op =). +\f_lam \ Respects((op = ===> alpha) ===> op =). +\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 allI) +apply(rule ballI)+ +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_all only: in_respects) +sorry lemma 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) +apply (lifting hom_res) done (* test test