# HG changeset patch # User haftmann # Date 1245937356 -7200 # Node ID 2f0adf64985b86842b6d028a9ebe49a3852677e4 # Parent a36b5e02c1abbd1fc8d1d30cb3f073f10c6c3ab9# Parent 627d142fce19b8c618276be74817069a353f5472 merged diff -r a36b5e02c1ab -r 2f0adf64985b NEWS --- a/NEWS Thu Jun 25 13:40:03 2009 +0200 +++ b/NEWS Thu Jun 25 15:42:36 2009 +0200 @@ -62,6 +62,9 @@ * Simplified interfaces of datatype module. INCOMPATIBILITY. +* Abbreviation "arbitrary" of "undefined" has disappeared; use "undefined" directly. +INCOMPATIBILITY. + *** ML *** diff -r a36b5e02c1ab -r 2f0adf64985b src/HOL/HOL.thy --- a/src/HOL/HOL.thy Thu Jun 25 13:40:03 2009 +0200 +++ b/src/HOL/HOL.thy Thu Jun 25 15:42:36 2009 +0200 @@ -198,9 +198,6 @@ axiomatization undefined :: 'a -abbreviation (input) - "arbitrary \ undefined" - subsubsection {* Generic classes and algebraic operations *} diff -r a36b5e02c1ab -r 2f0adf64985b src/HOL/Library/Fin_Fun.thy --- a/src/HOL/Library/Fin_Fun.thy Thu Jun 25 13:40:03 2009 +0200 +++ b/src/HOL/Library/Fin_Fun.thy Thu Jun 25 15:42:36 2009 +0200 @@ -383,7 +383,7 @@ subsection {* Default value for FinFuns *} definition finfun_default_aux :: "('a \ 'b) \ 'b" -where [code del]: "finfun_default_aux f = (if finite (UNIV :: 'a set) then arbitrary else THE b. finite {a. f a \ b})" +where [code del]: "finfun_default_aux f = (if finite (UNIV :: 'a set) then undefined else THE b. finite {a. f a \ b})" lemma finfun_default_aux_infinite: fixes f :: "'a \ 'b" @@ -453,7 +453,7 @@ lemma finite_finfun_default: "finite {a. Rep_finfun f a \ finfun_default f}" unfolding finfun_default_def by(simp add: finite_finfun_default_aux) -lemma finfun_default_const: "finfun_default ((\\<^isup>f b) :: 'a \\<^isub>f 'b) = (if finite (UNIV :: 'a set) then arbitrary else b)" +lemma finfun_default_const: "finfun_default ((\\<^isup>f b) :: 'a \\<^isub>f 'b) = (if finite (UNIV :: 'a set) then undefined else b)" apply(auto simp add: finfun_default_def finfun_const_def finfun_default_aux_infinite) apply(simp add: finfun_default_aux_def) done @@ -790,10 +790,10 @@ ultimately show ?thesis by(simp add: finfun_rec_def) next case True - hence default: "finfun_default ((\\<^isup>f c) :: 'a \\<^isub>f 'b) = arbitrary" by(simp add: finfun_default_const) - let ?the = "\g :: 'a \ 'b. (\\<^isup>f c) = Abs_finfun (map_default arbitrary g) \ finite (dom g) \ arbitrary \ ran g" + hence default: "finfun_default ((\\<^isup>f c) :: 'a \\<^isub>f 'b) = undefined" by(simp add: finfun_default_const) + let ?the = "\g :: 'a \ 'b. (\\<^isup>f c) = Abs_finfun (map_default undefined g) \ finite (dom g) \ undefined \ ran g" show ?thesis - proof(cases "c = arbitrary") + proof(cases "c = undefined") case True have the: "The ?the = empty" proof @@ -801,10 +801,10 @@ next fix g' assume "?the g'" - hence fg: "(\\<^isup>f c) = Abs_finfun (map_default arbitrary g')" - and fin: "finite (dom g')" and g: "arbitrary \ ran g'" by simp_all - from fin have "map_default arbitrary g' \ finfun" by(rule map_default_in_finfun) - with fg have "map_default arbitrary g' = (\a. c)" + hence fg: "(\\<^isup>f c) = Abs_finfun (map_default undefined g')" + and fin: "finite (dom g')" and g: "undefined \ ran g'" by simp_all + from fin have "map_default undefined g' \ finfun" by(rule map_default_in_finfun) + with fg have "map_default undefined g' = (\a. c)" by(auto simp add: finfun_const_def intro: Abs_finfun_inject[THEN iffD1]) with True show "g' = empty" by -(rule map_default_inject(2)[OF _ fin g], auto) @@ -820,10 +820,10 @@ next fix g' :: "'a \ 'b" assume "?the g'" - hence fg: "(\\<^isup>f c) = Abs_finfun (map_default arbitrary g')" - and fin: "finite (dom g')" and g: "arbitrary \ ran g'" by simp_all - from fin have "map_default arbitrary g' \ finfun" by(rule map_default_in_finfun) - with fg have "map_default arbitrary g' = (\a. c)" + hence fg: "(\\<^isup>f c) = Abs_finfun (map_default undefined g')" + and fin: "finite (dom g')" and g: "undefined \ ran g'" by simp_all + from fin have "map_default undefined g' \ finfun" by(rule map_default_in_finfun) + with fg have "map_default undefined g' = (\a. c)" by(auto simp add: finfun_const_def intro: Abs_finfun_inject[THEN iffD1]) with True False show "g' = (\a::'a. Some c)" by -(rule map_default_inject(2)[OF _ fin g], auto simp add: dom_def ran_def map_default_def_raw) diff -r a36b5e02c1ab -r 2f0adf64985b src/HOL/Library/Topology_Euclidean_Space.thy --- a/src/HOL/Library/Topology_Euclidean_Space.thy Thu Jun 25 13:40:03 2009 +0200 +++ b/src/HOL/Library/Topology_Euclidean_Space.thy Thu Jun 25 15:42:36 2009 +0200 @@ -533,18 +533,18 @@ fix x :: "'a ^ 'b" { fix e :: real assume "0 < e" - def a \ "x $ arbitrary" + def a \ "x $ undefined" have "a islimpt UNIV" by (rule islimpt_UNIV) with `0 < e` obtain b where "b \ a" and "dist b a < e" unfolding islimpt_approachable by auto - def y \ "Cart_lambda ((Cart_nth x)(arbitrary := b))" + def y \ "Cart_lambda ((Cart_nth x)(undefined := b))" from `b \ a` have "y \ x" unfolding a_def y_def by (simp add: Cart_eq) from `dist b a < e` have "dist y x < e" unfolding dist_vector_def a_def y_def apply simp apply (rule le_less_trans [OF setL2_le_setsum [OF zero_le_dist]]) - apply (subst setsum_diff1' [where a=arbitrary], simp, simp, simp) + apply (subst setsum_diff1' [where a=undefined], simp, simp, simp) done from `y \ x` and `dist y x < e` have "\y\UNIV. y \ x \ dist y x < e" by auto @@ -2695,29 +2695,29 @@ primrec helper_2::"(real \ 'a::metric_space) \ nat \ 'a" where "helper_2 beyond 0 = beyond 0" | - "helper_2 beyond (Suc n) = beyond (dist arbitrary (helper_2 beyond n) + 1 )" + "helper_2 beyond (Suc n) = beyond (dist undefined (helper_2 beyond n) + 1 )" lemma bolzano_weierstrass_imp_bounded: fixes s::"'a::metric_space set" assumes "\t. infinite t \ t \ s --> (\x \ s. x islimpt t)" shows "bounded s" proof(rule ccontr) assume "\ bounded s" - then obtain beyond where "\a. beyond a \s \ \ dist arbitrary (beyond a) \ a" - unfolding bounded_any_center [where a=arbitrary] - apply simp using choice[of "\a x. x\s \ \ dist arbitrary x \ a"] by auto - hence beyond:"\a. beyond a \s" "\a. dist arbitrary (beyond a) > a" + then obtain beyond where "\a. beyond a \s \ \ dist undefined (beyond a) \ a" + unfolding bounded_any_center [where a=undefined] + apply simp using choice[of "\a x. x\s \ \ dist undefined x \ a"] by auto + hence beyond:"\a. beyond a \s" "\a. dist undefined (beyond a) > a" unfolding linorder_not_le by auto def x \ "helper_2 beyond" { fix m n ::nat assume "mn` by auto - hence "1 < dist arbitrary (x m) - dist arbitrary (x n)" using *[of n m] by auto - thus ?thesis using dist_triangle2 [of arbitrary "x m" "x n"] by arith + hence "1 < dist undefined (x m) - dist undefined (x n)" using *[of n m] by auto + thus ?thesis using dist_triangle2 [of undefined "x m" "x n"] by arith qed } note ** = this { fix a b assume "x a = x b" "a \ b" hence False using **[of a b] by auto }