# HG changeset patch # User Christian Urban # Date 1285749757 14400 # Node ID 7f311ed9204d68ae3dbb10e2ddd94d0fb3aaf3bc # Parent 93a73eabbffc8ae359c8243bb4a715ec6821c1f3 test with induct_schema for simpler strong_ind proofs diff -r 93a73eabbffc -r 7f311ed9204d Nominal/Ex/Lambda.thy --- a/Nominal/Ex/Lambda.thy Tue Sep 28 08:21:47 2010 -0400 +++ b/Nominal/Ex/Lambda.thy Wed Sep 29 04:42:37 2010 -0400 @@ -22,6 +22,53 @@ thm lam.size_eqvt +section {* Strong Exhausts Lemma and Strong Induction Lemma via Induct_schema *} + +lemma strong_exhaust: + fixes c::"'a::fs" + assumes "\name ca. \c = ca; y = Var name\ \ P" + and "\lam1 lam2 ca. \c = ca; y = App lam1 lam2\ \ P" + and "\name lam ca. \c = ca; atom name \ ca; y = Lam name lam\ \ P" + shows "P" +apply(rule_tac y="y" in lam.exhaust) +apply(rule assms(1)) +apply(auto)[2] +apply(rule assms(2)) +apply(auto)[2] +apply(subgoal_tac "\q. (q \ (atom name)) \ c \ supp (Lam name lam) \* q") +apply(erule exE) +apply(erule conjE) +apply(rule assms(3)) +apply(rule refl) +apply(simp add: atom_eqvt) +apply(clarify) +apply(drule supp_perm_eq[symmetric]) +apply(simp) +apply(rule at_set_avoiding2_atom) +apply(simp add: finite_supp) +apply(simp add: finite_supp) +apply(simp add: lam.fresh) +done + + +lemma strong_induct: + fixes c::"'a::fs" + assumes a1: "\name c. P c (Var name)" + and a2: "\lam1 lam2 c. \\d. P d lam1; \d. P d lam2\ \ P c (App lam1 lam2)" + and a3: "\name lam c. \atom name \ c; \d. P d lam\ \ P c (Lam name lam)" + shows "P c lam" +using assms +apply(induction_schema) +apply(rule_tac y="lam" in strong_exhaust) +apply(blast) +apply(blast) +apply(blast) +apply(relation "measure (\(x,y). size y)") +apply(auto)[1] +apply(simp add: lam.size) +apply(simp add: lam.size) +apply(simp add: lam.size) +done section {* Strong Induction Principles*}