# HG changeset patch # User urbanc # Date 1163781150 -3600 # Node ID 26b51f724fe6ed3dbb8fed20492bae11a538469f # Parent eb85850d3eb7baeee3c75a51b8675db969fc0bc8 added an intro lemma for freshness of products; set up the simplifier so that it can deal with the compact and long notation for freshness constraints (FIXME: it should also be able to deal with the special case of freshness of atoms) diff -r eb85850d3eb7 -r 26b51f724fe6 src/HOL/Nominal/Examples/Weakening.thy --- a/src/HOL/Nominal/Examples/Weakening.thy Fri Nov 17 02:20:03 2006 +0100 +++ b/src/HOL/Nominal/Examples/Weakening.thy Fri Nov 17 17:32:30 2006 +0100 @@ -101,11 +101,9 @@ have k1: "a\\" by fact have k2: "((a,\)#\)\t:\" by fact have k3: "\(pi::name prm) (x::'a::fs_name). P x (pi \((a,\)#\)) (pi\t) \" by fact - have f: "\c::name. c\(pi\a,pi\t,pi\\,x)" - by (rule exists_fresh', simp add: fs_name1) - then obtain c::"name" - where f1: "c\(pi\a)" and f2: "c\x" and f3: "c\(pi\t)" and f4: "c\(pi\\)" - by (force simp add: fresh_prod fresh_atm) + obtain c::"name" where "c\(pi\a,pi\t,pi\\,x)" by (erule exists_fresh[OF fs_name1]) + then have f1: "c\(pi\a)" and f2: "c\x" and f3: "c\(pi\t)" and f4: "c\(pi\\)" + by (simp_all add: fresh_atm[symmetric]) from k1 have k1a: "(pi\a)\(pi\\)" by (simp add: fresh_bij) have l1: "(([(c,pi\a)]@pi)\\) = (pi\\)" using f4 k1a by (simp only: pt_name2, rule perm_fresh_fresh) @@ -158,11 +156,9 @@ have ih1: "\(pi::name prm) x. P x (pi\((a,\)#\)) (pi\t) \" by fact have f: "a\\" by fact then have f': "(pi\a)\(pi\\)" by (simp add: fresh_bij) - have "\c::name. c\(pi\a,pi\t,pi\\,x)" - by (rule exists_fresh', simp add: fs_name1) - then obtain c::"name" - where fs: "c\(pi\a)" "c\x" "c\(pi\t)" "c\(pi\\)" - by (force simp add: fresh_prod fresh_atm) + obtain c::"name" where "c\(pi\a,pi\t,pi\\,x)" by (erule exists_fresh[OF fs_name1]) + then have fs: "c\(pi\a)" "c\x" "c\(pi\t)" "c\(pi\\)" + by (simp_all add: fresh_atm[symmetric]) let ?pi'="[(pi\a,c)]@pi" have eq: "((pi\a,c)#pi)\a = c" by (simp add: calc_atm) have p1': "(?pi'\((a,\)#\))\(?pi'\t):\" using p1 by (simp only: eqvt_typing) diff -r eb85850d3eb7 -r 26b51f724fe6 src/HOL/Nominal/Nominal.thy --- a/src/HOL/Nominal/Nominal.thy Fri Nov 17 02:20:03 2006 +0100 +++ b/src/HOL/Nominal/Nominal.thy Fri Nov 17 17:32:30 2006 +0100 @@ -346,13 +346,17 @@ shows "(a\(x,y) \ PROP C) \ (a\x \ a\y \ PROP C)" by rule (simp_all add: fresh_prod) +(* this rule needs to be added before the fresh_prodD is *) +(* added to the simplifier with mksimps *) +lemma [simp]: + shows "a\x1 \ a\x2 \ a\(x1,x2)" + by (simp add: fresh_prod) + lemma fresh_prodD: shows "a\(x,y) \ a\x" and "a\(x,y) \ a\y" by (simp_all add: fresh_prod) -(* setup for the simplifier to automatically unsplit freshness in products *) - ML_setup {* val mksimps_pairs = ("Nominal.fresh", thms "fresh_prodD")::mksimps_pairs; change_simpset (fn ss => ss setmksimps (mksimps mksimps_pairs));