# HG changeset patch # User huffman # Date 1272391384 25200 # Node ID e62e32e163a49d7304ebb7a29c12082d9d6a9778 # Parent b96d9dc6accaee08df9dac0c251b9c5ed4a789be generalize types of path operations diff -r b96d9dc6acca -r e62e32e163a4 src/HOL/Multivariate_Analysis/Convex_Euclidean_Space.thy --- a/src/HOL/Multivariate_Analysis/Convex_Euclidean_Space.thy Tue Apr 27 10:54:24 2010 -0700 +++ b/src/HOL/Multivariate_Analysis/Convex_Euclidean_Space.thy Tue Apr 27 11:03:04 2010 -0700 @@ -2817,41 +2817,38 @@ subsection {* Paths. *} -text {* TODO: Once @{const continuous_on} is generalized to arbitrary -topological spaces, all of these concepts should be similarly generalized. *} - definition - path :: "(real \ 'a::metric_space) \ bool" + path :: "(real \ 'a::topological_space) \ bool" where "path g \ continuous_on {0 .. 1} g" definition - pathstart :: "(real \ 'a::metric_space) \ 'a" + pathstart :: "(real \ 'a::topological_space) \ 'a" where "pathstart g = g 0" definition - pathfinish :: "(real \ 'a::metric_space) \ 'a" + pathfinish :: "(real \ 'a::topological_space) \ 'a" where "pathfinish g = g 1" definition - path_image :: "(real \ 'a::metric_space) \ 'a set" + path_image :: "(real \ 'a::topological_space) \ 'a set" where "path_image g = g ` {0 .. 1}" definition - reversepath :: "(real \ 'a::metric_space) \ (real \ 'a)" + reversepath :: "(real \ 'a::topological_space) \ (real \ 'a)" where "reversepath g = (\x. g(1 - x))" definition - joinpaths :: "(real \ 'a::metric_space) \ (real \ 'a) \ (real \ 'a)" + joinpaths :: "(real \ 'a::topological_space) \ (real \ 'a) \ (real \ 'a)" (infixr "+++" 75) where "g1 +++ g2 = (\x. if x \ 1/2 then g1 (2 * x) else g2 (2 * x - 1))" definition - simple_path :: "(real \ 'a::metric_space) \ bool" + simple_path :: "(real \ 'a::topological_space) \ bool" where "simple_path g \ (\x\{0..1}. \y\{0..1}. g x = g y \ x = y \ x = 0 \ y = 1 \ x = 1 \ y = 0)" definition - injective_path :: "(real \ 'a::metric_space) \ bool" + injective_path :: "(real \ 'a::topological_space) \ bool" where "injective_path g \ (\x\{0..1}. \y\{0..1}. g x = g y \ x = y)" subsection {* Some lemmas about these concepts. *} @@ -3059,7 +3056,7 @@ subsection {* Reparametrizing a closed curve to start at some chosen point. *} -definition "shiftpath a (f::real \ 'a::metric_space) = +definition "shiftpath a (f::real \ 'a::topological_space) = (\x. if (a + x) \ 1 then f(a + x) else f(a + x - 1))" lemma pathstart_shiftpath: "a \ 1 \ pathstart(shiftpath a g) = g a"