# HG changeset patch # User narboux # Date 1175709385 -7200 # Node ID 33a690455f88a9e0158635a6cffd8c1de066b08c # Parent de39593f2948f8d30effb34241f02a8756430207 add a few details in the Fst and Snd cases of unicity proof diff -r de39593f2948 -r 33a690455f88 src/HOL/Nominal/Examples/Crary.thy --- a/src/HOL/Nominal/Examples/Crary.thy Wed Apr 04 18:05:05 2007 +0200 +++ b/src/HOL/Nominal/Examples/Crary.thy Wed Apr 04 19:56:25 2007 +0200 @@ -6,7 +6,7 @@ (* Types and Programming Languages, MIT Press 2005 *) (* The formalisation was done by Julien Narboux and *) -(* Christian Urban *) +(* Christian Urban. *) theory Crary imports "../Nominal" @@ -479,8 +479,7 @@ declare trm.inject [simp del] declare ty.inject [simp del] - -(* FIXME this lemma should not be here I am reinventing the wheel I guess *) +(* FIXME this lemma should not be here *) lemma perm_basic[simp]: fixes x y::"name" shows "[(x,y)]\y = x" @@ -499,13 +498,14 @@ qed (* +Warning this lemma is false: + lemma algorithmic_type_unicity: shows "\ \ \ s \ t : T ; \ \ s \ u : T' \ \ T = T'" and "\ \ \ s \ t : T ; \ \ s \ u : T' \ \ T = T'" Here is the counter example : \ \ Const n \ Const n : Tbase and \ \ Const n \ Const n : TUnit - *) lemma algorithmic_path_type_unicity: @@ -948,7 +948,6 @@ then show "\ \ s \ t : T" using main_lemma(1) val by simp qed - text {* We leave soundness as an exercise - like in the book :-) \\ @{prop[mode=IfThen] "\\ \ s \ t : T; \ \ t : T; \ \ s : T\ \ \ \ s \ t : T"} \\ @{prop "\\ \ s \ t : T; \ \ t : T; \ \ s : T\ \ \ \ s \ t : T"} diff -r de39593f2948 -r 33a690455f88 src/HOL/Nominal/Examples/SOS.thy --- a/src/HOL/Nominal/Examples/SOS.thy Wed Apr 04 18:05:05 2007 +0200 +++ b/src/HOL/Nominal/Examples/SOS.thy Wed Apr 04 19:56:25 2007 +0200 @@ -7,6 +7,9 @@ (* *) (* We thank Nick Benton for helping us with the *) (* termination-proof for evaluation. *) +(* *) +(* The formalisation was done by Julien Narboux and *) +(* Christian Urban. *) theory SOS imports "../Nominal" @@ -723,11 +726,17 @@ then have "e\<^isub>2[x\<^isub>2::=e'] \ t\<^isub>2" using h by (simp add: trm.inject) thus "e'' = t\<^isub>2" using ih2 by simp next - case b_Fst - then show ?case by (force simp add: trm.inject) + case (b_Fst e e\<^isub>1 e\<^isub>2 e\<^isub>2') + have "e \ Pr e\<^isub>1 e\<^isub>2" by fact + have "\ b. e \ b \ Pr e\<^isub>1 e\<^isub>2 = b" by fact + have "Fst e \ e\<^isub>2'" by fact + show "e\<^isub>1 = e\<^isub>2'" using prems by (force simp add: trm.inject) next - case b_Snd - then show ?case by (force simp add: trm.inject) + case (b_Snd e e\<^isub>1 e\<^isub>2 e\<^isub>2') + have "e \ Pr e\<^isub>1 e\<^isub>2" by fact + have "\ b. e \ b \ Pr e\<^isub>1 e\<^isub>2 = b" by fact + have "Snd e \ e\<^isub>2'" by fact + show "e\<^isub>2 = e\<^isub>2'" using prems by (force simp add: trm.inject) qed (blast)+ lemma not_val_App[simp]: