# HG changeset patch # User Cezary Kaliszyk # Date 1264600631 -3600 # Node ID 67739818af3fa6cba7fcf1af2e3e598ab54d1eb8 # Parent 8ba35ce16f7ef830702b0a5fb3e388a04aebd706# Parent 76ccc320b684b65e10705d2ff0dd04e5cad615ff merge diff -r 8ba35ce16f7e -r 67739818af3f Quot/Nominal/Terms.thy --- a/Quot/Nominal/Terms.thy Wed Jan 27 14:56:58 2010 +0100 +++ b/Quot/Nominal/Terms.thy Wed Jan 27 14:57:11 2010 +0100 @@ -309,24 +309,60 @@ (* does not work yet *) primrec - permute_trm4 + permute_trm4 and permute_trm4_list where "permute_trm4 pi (Vr4 a) = Vr4 (pi \ a)" -| "permute_trm4 pi (Ap4 t ts) = Ap4 (permute_trm4 pi t) (permute pi ts)" +| "permute_trm4 pi (Ap4 t ts) = Ap4 (permute_trm4 pi t) (permute_trm4_list pi ts)" | "permute_trm4 pi (Lm4 a t) = Lm4 (pi \ a) (permute_trm4 pi t)" +| "permute_trm4_list pi ([]) = []" +| "permute_trm4_list pi (t#ts) = (permute_trm4 pi t) # (permute_trm4_list pi ts)" + +lemma pt_trm4_list_zero: + fixes t::trm4 + and ts::"trm4 list" + shows "0 \ t = t" + and "permute_trm4_list 0 ts = ts" +apply(induct t and ts rule: trm4.inducts) +apply(simp_all) +done + +lemma pt_trm4_list_plus: + fixes t::trm4 + and ts::"trm4 list" + shows "((p + q) \ t) = p \ (q \ t)" + and "(permute_trm4_list (p + q) ts) = permute_trm4_list p (permute_trm4_list q ts)" +apply(induct t and ts rule: trm4.inducts) +apply(simp_all) +done + + +instance +apply(default) +apply(simp_all add: pt_trm4_list_zero pt_trm4_list_plus) +done end +(* "repairing" of the permute function *) +lemma repaired: + fixes ts::"trm4 list" + shows "permute_trm4_list p ts = p \ ts" + apply(induct ts) + apply(simp_all) + done + +thm permute_trm4_permute_trm4_list.simps[simplified repaired] + inductive alpha4 :: "trm4 \ trm4 \ bool" ("_ \4 _" [100, 100] 100) and alpha4list :: "trm4 list \ trm4 list \ bool" ("_ \4list _" [100, 100] 100) where a1: "a = b \ (Vr4 a) \4 (Vr4 b)" | a2: "\t1 \4 t2; s1 \4list s2\ \ Ap4 t1 s1 \4 Ap4 t2 s2" -| a4: "\pi::name prm. (fv_trm4 t - {a} = fv_trm4 s - {b} \ - (fv_trm4 t - {a})\* pi \ - (pi \ t) \4 s \ - (pi \ a) = b) +| a4: "\pi. (fv_trm4 t - {atom a} = fv_trm4 s - {atom b} \ + (fv_trm4 t - {atom a})\* pi \ + (pi \ t) \4 s \ + (pi \ a) = b) \ Lm4 a t \4 Lm4 b s" | a5: "[] \4list []" | a6: "\t \4 s; ts \4list ss\ \ (t#ts) \4list (s#ss)" @@ -339,4 +375,6 @@ qtrm4list = "trm4 list" / alpha4list by (simp_all add: alpha4_equivp alpha4list_equivp) + + end diff -r 8ba35ce16f7e -r 67739818af3f Quot/quotient_tacs.ML --- a/Quot/quotient_tacs.ML Wed Jan 27 14:56:58 2010 +0100 +++ b/Quot/quotient_tacs.ML Wed Jan 27 14:57:11 2010 +0100 @@ -520,9 +520,12 @@ - Quotient_abs_rep Quotient_rel_rep babs_prs all_prs ex_prs ex1_prs - - id_simps - - and folding of definitions and preservation lemmas + + - id_simps and preservation lemmas and + + - symmetric versions of the definitions + (that is definitions of quotient constants + are folded) 4. test for refl *)