# HG changeset patch # User Cezary Kaliszyk # Date 1268123929 -3600 # Node ID 0e32379e452f50ba875874a80226e4288ff5878d # Parent 424962b8b699cc5c326ef7f24c8dbc377158527d fv_compat diff -r 424962b8b699 -r 0e32379e452f Nominal/Test_compat.thy --- a/Nominal/Test_compat.thy Tue Mar 09 08:46:55 2010 +0100 +++ b/Nominal/Test_compat.thy Tue Mar 09 09:38:49 2010 +0100 @@ -20,6 +20,7 @@ "bi (BP x t) = {atom x}" thm alpha_lam_raw_alpha_bp_raw.intros[no_vars] +thm fv_lam_raw_fv_bp_raw.simps[no_vars] abbreviation "VAR \ VAR_raw" abbreviation "APP \ APP_raw" @@ -28,6 +29,20 @@ abbreviation "bi \ bi_raw" (* non-recursive case *) +primrec + fv_lam :: "lam_raw \ atom set" +and fv_compat :: "bp_raw \ atom set" +where + "fv_lam (VAR name) = {atom name}" +| "fv_lam (APP lam1 lam2) = fv_lam lam1 \ fv_lam lam2" +| "fv_lam (LET bp lam) = (fv_compat bp) \ (fv_lam lam - bi bp)" +| "fv_compat (BP name lam) = fv_lam lam" + +primrec + fv_bp :: "bp_raw \ atom set" +where + "fv_bp (BP name lam) = {atom name} \ fv_lam lam" + inductive alpha_lam :: "lam_raw \ lam_raw \ bool" and @@ -42,7 +57,6 @@ | "alpha_lam t t' \ pi \ x = x' \ compat_bp (BP x t) pi (BP x' t')" lemma test1: - assumes "distinct [x, y]" shows "alpha_lam (LET (BP x (VAR x)) (VAR x)) (LET (BP y (VAR x)) (VAR y))" apply(rule alpha_lam_alpha_bp_compat_bp.intros)