diff -r 09a64cb04851 -r c3662f845129 Quot/Examples/LamEx.thy --- a/Quot/Examples/LamEx.thy Thu Jan 14 16:41:17 2010 +0100 +++ b/Quot/Examples/LamEx.thy Thu Jan 14 17:13:11 2010 +0100 @@ -244,20 +244,42 @@ lemma lam_induct: "\\name. P (Var name); \lam1 lam2. \P lam1; P lam2\ \ P (App lam1 lam2); - \name lam. P lam \ P (Lam name lam)\ \ P lam" + \name lam. P lam \ P (Lam name lam)\ + \ P lam" by (lifting rlam.induct) -lemma lam_induct_strong_pre: - "\\name b. P b (Var name); - \lam1 lam2 b. \\c. P c lam1; \c. P c lam2\ \ P b (App lam1 lam2); - \name lam b. \\c. P c lam; name \ (c \ lam)\ \ P b (Lam name lam)\ \ P a lam" +instance lam::pt_name +apply(default) +sorry + +instance lam::fs_name +apply(default) sorry lemma lam_induct_strong: - "\\name. P (Var name); - \lam1 lam2. \P lam1; P lam2\ \ P (App lam1 lam2); - \name lam. P lam \ name \ lam \ P (Lam name lam)\ \ P lam" -sorry + fixes a::"'a::fs_name" + shows + "\\name b. P b (Var name); + \lam1 lam2 b. \\c. P c lam1; \c. P c lam2\ \ P b (App lam1 lam2); + \name lam b. \\c. P c lam; name \ lam\ \ P b (Lam name lam)\ + \ P a lam" +proof - + have "\(pi::name prm). P a (pi \ lam)" + proof (induct lam rule: lam_induct) + case (1 name pi) + show "P a (pi \ Var name)" + apply - + sorry + next + case (2 lam1 lam2 pi) + show "P a (pi \ App lam1 lam2)" sorry + next + case (3 name lam pi) + show "P a (pi \ Lam name lam)" sorry + qed + then have "P a (([]::name prm) \ lam)" by blast + then show "P a lam" by simp +qed lemma var_supp: