# HG changeset patch # User huffman # Date 1166553275 -3600 # Node ID b1137bd730128da7ba31bbd23ea4fd4ba9618316 # Parent f1790ca921e14ca22fcb0f5a9daf26cf64d009a7 add lemmas Standard_starfun(2)_iff diff -r f1790ca921e1 -r b1137bd73012 src/HOL/Hyperreal/StarDef.thy --- a/src/HOL/Hyperreal/StarDef.thy Tue Dec 19 17:35:33 2006 +0100 +++ b/src/HOL/Hyperreal/StarDef.thy Tue Dec 19 19:34:35 2006 +0100 @@ -240,6 +240,53 @@ "\x \ Standard; y \ Standard\ \ starfun2 f x y \ Standard" by (simp add: starfun2_def) +lemma Standard_starfun_iff: + assumes inj: "\x y. f x = f y \ x = y" + shows "(starfun f x \ Standard) = (x \ Standard)" +proof + assume "x \ Standard" + thus "starfun f x \ Standard" by simp +next + have inj': "\x y. starfun f x = starfun f y \ x = y" + using inj by transfer + assume "starfun f x \ Standard" + then obtain b where b: "starfun f x = star_of b" + unfolding Standard_def .. + hence "\x. starfun f x = star_of b" .. + hence "\a. f a = b" by transfer + then obtain a where "f a = b" .. + hence "starfun f (star_of a) = star_of b" by transfer + with b have "starfun f x = starfun f (star_of a)" by simp + hence "x = star_of a" by (rule inj') + thus "x \ Standard" + unfolding Standard_def by auto +qed + +lemma Standard_starfun2_iff: + assumes inj: "\a b a' b'. f a b = f a' b' \ a = a' \ b = b'" + shows "(starfun2 f x y \ Standard) = (x \ Standard \ y \ Standard)" +proof + assume "x \ Standard \ y \ Standard" + thus "starfun2 f x y \ Standard" by simp +next + have inj': "\x y z w. starfun2 f x y = starfun2 f z w \ x = z \ y = w" + using inj by transfer + assume "starfun2 f x y \ Standard" + then obtain c where c: "starfun2 f x y = star_of c" + unfolding Standard_def .. + hence "\x y. starfun2 f x y = star_of c" by auto + hence "\a b. f a b = c" by transfer + then obtain a b where "f a b = c" by auto + hence "starfun2 f (star_of a) (star_of b) = star_of c" + by transfer + with c have "starfun2 f x y = starfun2 f (star_of a) (star_of b)" + by simp + hence "x = star_of a \ y = star_of b" + by (rule inj') + thus "x \ Standard \ y \ Standard" + unfolding Standard_def by auto +qed + subsection {* Internal predicates *}