# HG changeset patch # User urbanc # Date 1164300768 -3600 # Node ID e1b260d204a0c3bb2d937cbbb7c7eefe83ffc081 # Parent 45f9163d79e7d3c7ee0bc34729fb115b5555c3bb fixed some typos diff -r 45f9163d79e7 -r e1b260d204a0 src/HOL/Nominal/Examples/Weakening.thy --- a/src/HOL/Nominal/Examples/Weakening.thy Thu Nov 23 14:11:49 2006 +0100 +++ b/src/HOL/Nominal/Examples/Weakening.thy Thu Nov 23 17:52:48 2006 +0100 @@ -18,7 +18,7 @@ TVar "nat" | TArr "ty" "ty" (infix "\" 200) -lemma [simp]: +lemma ty_perm[simp]: fixes pi ::"name prm" and \ ::"ty" shows "pi\\ = \" @@ -57,8 +57,8 @@ case (t_Var \ a \) have "valid (pi\\)" by (rule eqvt_valid) moreover - have "(pi\(a,\))\((pi::name prm)\set \)" by (rule pt_set_bij2[OF pt_name_inst, OF at_name_inst]) - ultimately show "(pi\\) \ ((pi::name prm)\Var a) : \" + have "(pi\(a,\))\(pi\set \)" by (rule pt_set_bij2[OF pt_name_inst, OF at_name_inst]) + ultimately show "(pi\\) \ (pi\Var a) : \" using typing.intros by (force simp add: pt_list_set_pi[OF pt_name_inst, symmetric]) next case (t_Lam a \ \ t \) @@ -129,7 +129,7 @@ "sub" :: "(name\ty) list \ (name\ty) list \ bool" (" _ \ _ " [80,80] 80) where "\1 \ \2 \ \a \. (a,\)\set \1 \ (a,\)\set \2" -text {* Now it comes: The Weakening Lemma *} +text {* now it comes: The Weakening Lemma *} lemma weakening_version1: assumes a: "\1 \ t : \" @@ -139,7 +139,7 @@ using a b c apply(nominal_induct \1 t \ avoiding: \2 rule: typing_induct) apply(auto | atomize)+ -(* FIXME: meta-quantifiers seem to not ba as "automatic" as object-quantifiers *) +(* FIXME: meta-quantifiers seem to be not as "automatic" as object-quantifiers *) done lemma weakening_version2: @@ -167,10 +167,10 @@ then have "((a,\)#\1) \ ((a,\)#\2)" by simp moreover have "valid \2" by fact - then have "valid ((a,\)#\2)" using vc v2 by simp + then have "valid ((a,\)#\2)" using vc by (simp add: v2) ultimately have "((a,\)#\2) \ t:\" using ih by simp with vc show "\2 \ (Lam [a].t) : \ \ \" by auto -qed (auto) +qed (auto) (* app case *) lemma weakening_version3: assumes a: "\1 \ t:\" @@ -186,13 +186,13 @@ then have "((a,\)#\1) \ ((a,\)#\2)" by simp moreover have "valid \2" by fact - then have "valid ((a,\)#\2)" using vc v2 by simp + then have "valid ((a,\)#\2)" using vc by (simp add: v2) ultimately have "((a,\)#\2) \ t:\" using ih by simp with vc show "\2 \ (Lam [a].t) : \ \ \" by auto qed (auto) (* app and var case *) text{* The original induction principle for the typing relation - is not strong enough - even this simple lemma fails *} + is not strong enough - even this simple lemma fails: *} lemma weakening_too_weak: assumes a: "\1 \ t:\" and b: "valid \2" @@ -209,7 +209,7 @@ ultimately show "\2 \ Var a : \" by auto next case (t_Lam a \1 \ t \) (* lambda case *) - (* all assumption in this case*) + (* all assumptions available in this case*) have a0: "a\\1" by fact have a1: "((a,\)#\1) \ t : \" by fact have a2: "\1 \ \2" by fact