# HG changeset patch # User Christian Urban # Date 1256755012 -3600 # Node ID 13f985a93dbc478ef9a501d98fd3ffeeb511408a # Parent 9b8e039ae960a7c380a6dbd94c883b91cca9550a fixed the definition of alpha; this *breaks* some of the experiments diff -r 9b8e039ae960 -r 13f985a93dbc LamEx.thy --- a/LamEx.thy Wed Oct 28 16:48:57 2009 +0100 +++ b/LamEx.thy Wed Oct 28 19:36:52 2009 +0100 @@ -14,7 +14,7 @@ where a1: "a = b \ (rVar a) \ (rVar b)" | a2: "\t1 \ t2; s1 \ s2\ \ rApp t1 s1 \ rApp t2 s2" -| a3: "\t \ ([(a,b)]\s); a\s\ \ rLam a t \ rLam b s" +| a3: "\t \ ([(a,b)]\s); a\[b].s\ \ rLam a t \ rLam b s" quotient lam = rlam / alpha apply - @@ -22,16 +22,56 @@ print_quotients -local_setup {* - old_make_const_def @{binding Var} @{term "rVar"} NoSyn @{typ "rlam"} @{typ "lam"} #> snd #> - old_make_const_def @{binding App} @{term "rApp"} NoSyn @{typ "rlam"} @{typ "lam"} #> snd #> - old_make_const_def @{binding Lam} @{term "rLam"} NoSyn @{typ "rlam"} @{typ "lam"} #> snd -*} +quotient_def (for lam) + Var :: "name \ lam" +where + "Var \ rVar" + +quotient_def (for lam) + App :: "lam \ lam \ lam" +where + "App \ rApp" + +quotient_def (for lam) + Lam :: "name \ lam \ lam" +where + "Lam \ rLam" thm Var_def thm App_def thm Lam_def +(* definition of overloaded permutation function *) +(* for the lifted type lam *) +overloading + perm_lam \ "perm :: 'x prm \ lam \ lam" (unchecked) +begin + +quotient_def (for lam) + perm_lam :: "'x prm \ lam \ lam" +where + "perm_lam \ (perm::'x prm \ rlam \ rlam)" + +end + +thm perm_lam_def + +(* lemmas that need to lift *) +lemma + fixes pi::"'x prm" + shows "(pi\Var a) = Var (pi\a)" + sorry + +lemma + fixes pi::"'x prm" + shows "(pi\App t1 t2) = App (pi\t1) (pi\t2)" + sorry + +lemma + fixes pi::"'x prm" + shows "(pi\Lam a t) = Lam (pi\a) (pi\t)" + sorry + lemma real_alpha: assumes "t = ([(a,b)]\s)" "a\s" shows "Lam a t = Lam b s" @@ -43,9 +83,28 @@ (* Construction Site code *) -lemma perm_rsp: "op = ===> alpha ===> alpha op \ op \" sorry -lemma fresh_rsp: "op = ===> (alpha ===> op =) fresh fresh" sorry -lemma rLam_rsp: "op = ===> (alpha ===> alpha) rLam rLam" sorry +lemma perm_rsp: "op = ===> alpha ===> alpha op \ op \" + apply(auto) + (* this is propably true if some type conditions are imposed ;o) *) + sorry + +lemma fresh_rsp: "op = ===> (alpha ===> op =) fresh fresh" + apply(auto) + (* this is probably only true if some type conditions are imposed *) + sorry + +lemma rLam_rsp: "op = ===> (alpha ===> alpha) rLam rLam" + apply(auto) + apply(rule a3) + apply(rule_tac t="[(x,x)]\y" and s="y" in subst) + apply(rule sym) + apply(rule trans) + apply(rule pt_name3) + apply(rule at_ds1[OF at_name_inst]) + apply(simp add: pt_name1) + apply(assumption) + apply(simp add: abs_fresh) + done ML {* val defs = @{thms Var_def App_def Lam_def} *} ML {* val consts = [@{const_name "rVar"}, @{const_name "rApp"}, @{const_name "rLam"}]; *}