diff -r 2e849bc2163a -r 01ae96fa4bf9 Nominal/Ex/Lambda.thy --- a/Nominal/Ex/Lambda.thy Mon Apr 12 14:31:23 2010 +0200 +++ b/Nominal/Ex/Lambda.thy Mon Apr 12 17:44:26 2010 +0200 @@ -132,13 +132,6 @@ atac ]) *} -ML {* try hd [1] *} - -ML {* -Skip_Proof.cheat_tac -*} - - lemma [eqvt]: assumes a: "valid Gamma" shows "valid (p \ Gamma)" @@ -155,7 +148,35 @@ typing :: "(name\ty) list \ lam \ ty \ bool" ("_ \ _ : _" [60,60,60] 60) where t_Var[intro]: "\valid \; (x, T) \ set \\ \ \ \ Var x : T" - | t_App[intro]: "\\ \ t1 : T1 \ T2; \ \ t2 : T1\ \ \ \ App t1 t2 : T2" + | t_App[intro]: "\\ \ t1 : T1 \ T2 \ \ \ t2 : T1\ \ \ \ App t1 t2 : T2" + | t_Lam[intro]: "\atom x \ \; (x, T1) # \ \ t : T2\ \ \ \ Lam x t : T1 \ T2" + +thm typing.induct +ML {* Inductive.get_monos @{context} *} + +lemma uu[eqvt]: + assumes a: "Gamma \ t : T" + shows "(p \ Gamma) \ (p \ t) : (p \ T)" +using a +apply(induct) +apply(tactic {* my_tac @{context} @{thms typing.intros} 1 *}) +apply(perm_strict_simp) +apply(rule typing.intros) +apply(rule conj_mono[THEN mp]) +prefer 3 +apply(assumption) +apply(rule impI) +prefer 2 +apply(rule impI) +apply(tactic {* my_tac @{context} @{thms typing.intros} 1 *}) +apply(tactic {* my_tac @{context} @{thms typing.intros} 1 *}) +done + +inductive + typing :: "(name\ty) list \ lam \ ty \ bool" ("_ \ _ : _" [60,60,60] 60) +where + t_Var[intro]: "\valid \; (x, T) \ set \\ \ \ \ Var x : T" + | t_App[intro]: "\\ \ t1 : T1 \ T2 \ \ \ t2 : T1\ \ \ \ App t1 t2 : T2" | t_Lam[intro]: "\atom x \ \; (x, T1) # \ \ t : T2\ \ \ \ Lam x t : T1 \ T2" lemma uu[eqvt]: @@ -172,24 +193,8 @@ thm eqvts_raw declare permute_lam_raw.simps[eqvt] - -thm alpha_gen_real_eqvt[no_vars] - -lemma temporary: - shows "(p \ (bs, x) \gen R f q (cs, y)) = (p \ bs, p \ x) \gen (p \ R) (p \ f) (p \ q) (p \ cs, p \ y)" -apply(simp only: permute_bool_def) -apply(rule iffI) -apply(rule alpha_gen_real_eqvt) -apply(assumption) -apply(drule_tac p="-p" in alpha_gen_real_eqvt(1)) -apply(simp) -done - -lemma temporary_raw: - shows "(p \ alpha_gen) \ alpha_gen" -sorry - -declare temporary_raw[eqvt_raw] +thm alpha_gen_real_eqvt +(*declare alpha_gen_real_eqvt[eqvt]*) lemma assumes a: "alpha_lam_raw t1 t2" @@ -197,6 +202,7 @@ using a apply(induct) apply(tactic {* my_tac @{context} @{thms alpha_lam_raw.intros} 1 *}) +apply(tactic {* my_tac @{context} @{thms alpha_lam_raw.intros} 1 *}) apply(perm_strict_simp) apply(rule alpha_lam_raw.intros) apply(simp)