theory Foo imports "HOL-Complex_Analysis.Complex_Analysis" begin text \ A continuously differentiable function from the reals to a vector space. \ definition C1_on :: "real set \ (real \ 'a :: real_normed_vector) \ bool" where "C1_on S f \ (\D. (\x \ S. (f has_vector_derivative (D x)) (at x within S)) \ continuous_on S D)" text \ A piecewise continuously differentiable function from the reals to a vector space. See \<^url>\https://proofwiki.org/wiki/Definition:Piecewise_Continuously_Differentiable_Function\. \ definition piecewise_C1_on :: "real set \ (real \ 'a :: real_normed_vector) \ bool" where "piecewise_C1_on A f \ continuous_on A f \ (\X. X division_of A \ (\Y\X. C1_on Y f))" lemma C1_imp_piecewise_C1: "C1_on S f \ piecewise_C1_on A f" sorry lemma piecewise_C1_imp_continuous: assumes "piecewise_C1_on A f" shows "continuous_on A f" using assms unfolding piecewise_C1_on_def by blast text \ The one-sided derivatives exist everywhere. \ lemma piecewise_C1_imp_differentiable_left: assumes "piecewise_C1_on {a..b} f" "x \ {a<..b}" shows "f differentiable at_left x" sorry lemma piecewise_C1_imp_differentiable_right: assumes "piecewise_C1_on {a..b} f" "x \ {a.. The left- and right-sided limits of the derivative exist. \ lemma piecewise_C1_imp_deriv_tendsto_left: assumes "piecewise_C1_on {a..b} f" "x \ {a<..b}" shows "((\t. vector_derivative f (at t)) \ vector_derivative f (at_left x)) (at_left x)" sorry lemma piecewise_C1_imp_deriv_tendsto_right: assumes "piecewise_C1_on {a..b} f" "x \ {a..t. vector_derivative f (at t)) \ vector_derivative f (at_right x)) (at_right x)" sorry text \ A smooth path without corners, e.g.\ a line or a circular arc. \ definition C1_path :: "(real \ 'a :: real_normed_vector) \ bool" where "C1_path p \ C1_on {0..1} p" text \ A piecewise smooth path, i.e.\ possibly with corners. Can be seen as a concatenation of finitely many smooth paths. \ definition valid_path where "valid_path p \ piecewise_C1_on {0..1} p" lemma C1_path_imp_valid_path: "C1_path p \ valid_path p" unfolding C1_path_def valid_path_def using C1_imp_piecewise_C1 by blast lemma valid_path_join: assumes "valid_path p" "valid_path q" "pathfinish p = pathstart q" shows "valid_path (p +++ q)" sorry text \ An attempt at a general definition of $C^n$-smoothness for functions from the reals to a vector space. $n$ can be a natural number of $\infty$. Note that $C^0$-smoothness means ``continuous'', $C^1$ means ``continuously differentiable''. \ definition smooth_on :: "enat \ real set \ (real \ 'a :: real_normed_vector) \ bool" ("C\<^bsup>_\<^esup>-smooth'_on" [1000]) where "C\<^bsup>n\<^esup>-smooth_on S f \ (let D = (\g x. vector_derivative g (at x within S)) in (\k. enat k < n \ (\x\S. (D ^^ k) f differentiable (at x within S))) \ (\k. enat k \ n \ continuous_on S ((D ^^ k) f)))" lemma C1_on_altdef: "C1_on S f \ C\<^bsup>1\<^esup>-smooth_on S f" sorry end