# HG changeset patch # User Cezary Kaliszyk # Date 1265108197 -3600 # Node ID b3deb964ad26b11affc4c095d23f32824b29554a # Parent 7c12f5476d1b1cce1f71fe554b2ab8c7929eff1d Some equivariance machinery that comes useful in LF. diff -r 7c12f5476d1b -r b3deb964ad26 Attic/Unused.thy --- a/Attic/Unused.thy Tue Feb 02 11:23:17 2010 +0100 +++ b/Attic/Unused.thy Tue Feb 02 11:56:37 2010 +0100 @@ -1,6 +1,31 @@ (*notation ( output) "prop" ("#_" [1000] 1000) *) notation ( output) "Trueprop" ("#_" [1000] 1000) +function(sequential) + akind :: "kind \ kind \ bool" ("_ \ki _" [100, 100] 100) +and aty :: "ty \ ty \ bool" ("_ \ty _" [100, 100] 100) +and atrm :: "trm \ trm \ bool" ("_ \tr _" [100, 100] 100) +where + a1: "(Type) \ki (Type) = True" +| a2: "(KPi A x K) \ki (KPi A' x' K') = (A \ty A' \ (\pi. (rfv_kind K - {atom x} = rfv_kind K' - {atom x'} \ (rfv_kind K - {atom x})\* pi \ (pi \ K) \ki K' \ (pi \ x) = x')))" +| "_ \ki _ = False" +| a3: "(TConst i) \ty (TConst j) = (i = j)" +| a4: "(TApp A M) \ty (TApp A' M') = (A \ty A' \ M \tr M')" +| a5: "(TPi A x B) \ty (TPi A' x' B') = ((A \ty A') \ (\pi. rfv_ty B - {atom x} = rfv_ty B' - {atom x'} \ (rfv_ty B - {atom x})\* pi \ (pi \ B) \ty B' \ (pi \ x) = x'))" +| "_ \ty _ = False" +| a6: "(Const i) \tr (Const j) = (i = j)" +| a7: "(Var x) \tr (Var y) = (x = y)" +| a8: "(App M N) \tr (App M' N') = (M \tr M' \ N \tr N')" +| a9: "(Lam A x M) \tr (Lam A' x' M') = (A \ty A' \ (\pi. rfv_trm M - {atom x} = rfv_trm M' - {atom x'} \ (rfv_trm M - {atom x})\* pi \ (pi \ M) \tr M' \ (pi \ x) = x'))" +| "_ \tr _ = False" +apply (pat_completeness) +apply simp_all +done +termination +by (size_change) + + + lemma regularize_to_injection: shows "(QUOT_TRUE l \ y) \ (l = r) \ y" by(auto simp add: QUOT_TRUE_def) diff -r 7c12f5476d1b -r b3deb964ad26 Quot/Nominal/Abs.thy --- a/Quot/Nominal/Abs.thy Tue Feb 02 11:23:17 2010 +0100 +++ b/Quot/Nominal/Abs.thy Tue Feb 02 11:56:37 2010 +0100 @@ -129,6 +129,26 @@ apply(clarsimp) done +lemma alpha_gen_atom_eqvt: + assumes a: "\x. pi \ (f x) = f (pi \ x)" + and b: "\pia. ({atom a}, t) \gen \x1 x2. R x1 x2 \ R (pi \ x1) (pi \ x2) f pia ({atom b}, s)" + shows "\pia. ({atom (pi \ a)}, pi \ t) \gen R f pia ({atom (pi \ b)}, pi \ s)" + using b apply - + apply(erule exE) + apply(rule_tac x="pi \ pia" in exI) + apply(simp add: alpha_gen.simps) + apply(erule conjE)+ + apply(rule conjI)+ + apply(rule_tac ?p1="- pi" in permute_eq_iff[THEN iffD1]) + apply(simp add: a[symmetric] atom_eqvt eqvts) + apply(rule conjI) + apply(rule_tac ?p1="- pi" in fresh_star_permute_iff[THEN iffD1]) + apply(simp add: a[symmetric] eqvts atom_eqvt) + apply(subst permute_eqvt[symmetric]) + apply(simp) + done + + fun alpha_abs where diff -r 7c12f5476d1b -r b3deb964ad26 Quot/Nominal/LamEx2.thy --- a/Quot/Nominal/LamEx2.thy Tue Feb 02 11:23:17 2010 +0100 +++ b/Quot/Nominal/LamEx2.thy Tue Feb 02 11:56:37 2010 +0100 @@ -122,23 +122,6 @@ apply(auto) done -lemma alpha_gen_eqvt_atom: - assumes a: "\x. pi \ (f x) = f (pi \ x)" - shows "\pia. ({atom a}, t) \gen \x1 x2. R x1 x2 \ R (pi \ x1) (pi \ x2) f pia ({atom b}, s) \ \pia. ({atom (pi \ a)}, pi \ t) \gen R f pia ({atom (pi \ b)}, pi \ s)" -apply(erule exE) -apply(rule_tac x="pi \ pia" in exI) -apply(simp add: alpha_gen.simps) -apply(erule conjE)+ -apply(rule conjI)+ -apply(rule_tac ?p1="- pi" in permute_eq_iff[THEN iffD1]) -apply(simp add: a[symmetric] atom_eqvt eqvts) -apply(rule conjI) -apply(rule_tac ?p1="- pi" in fresh_star_permute_iff[THEN iffD1]) -apply(simp add: a[symmetric] eqvts atom_eqvt) -apply(subst permute_eqvt[symmetric]) -apply(simp) -done - text {* should be automatic with new version of eqvt-machinery *} lemma alpha_eqvt: shows "t \ s \ (pi \ t) \ (pi \ s)"