@@ -91,7 +91,7 @@ for each natural `m` is by definition `C^∞` at `0`.
91
91
92
92
There is another issue with the definition of `times_cont_diff_within_at 𝕜 n f s x`. We can
93
93
require the existence and good behavior of derivatives up to order `n` on a neighborhood of `x`
94
- within `s`. However, this does not imply continuity or differentiability within `s`of the function
94
+ within `s`. However, this does not imply continuity or differentiability within `s` of the function
95
95
at `x`. Therefore, we require such existence and good behavior on a neighborhood of `x` within
96
96
`s ∪ {x}` (which appears as `insert x s` in this file).
97
97
@@ -157,7 +157,7 @@ derivative, differentiability, higher derivative, `C^n`, multilinear, Taylor ser
157
157
-/
158
158
159
159
noncomputable theory
160
- open_locale classical
160
+ open_locale classical big_operators
161
161
162
162
local notation `∞` := (⊤ : with_top ℕ)
163
163
@@ -1238,6 +1238,10 @@ lemma times_cont_diff.times_cont_diff_at {n : with_top ℕ} (h : times_cont_diff
1238
1238
times_cont_diff_at 𝕜 n f x :=
1239
1239
times_cont_diff_iff_times_cont_diff_at.1 h x
1240
1240
1241
+ lemma times_cont_diff.times_cont_diff_within_at {n : with_top ℕ} (h : times_cont_diff 𝕜 n f) :
1242
+ times_cont_diff_within_at 𝕜 n f s x :=
1243
+ h.times_cont_diff_at.times_cont_diff_within_at
1244
+
1241
1245
lemma times_cont_diff_top :
1242
1246
times_cont_diff 𝕜 ∞ f ↔ ∀ (n : ℕ), times_cont_diff 𝕜 n f :=
1243
1247
by simp [times_cont_diff_on_univ.symm, times_cont_diff_on_top]
@@ -1876,7 +1880,7 @@ times_cont_diff_on_univ.1 $ times_cont_diff_on.comp (times_cont_diff_on_univ.2 h
1876
1880
1877
1881
/-- The composition of `C^n` functions at points in domains is `C^n`. -/
1878
1882
lemma times_cont_diff_within_at.comp
1879
- {n : with_top ℕ} {s : set E} {t : set F} {g : F → G} {f : E → F} { x : E}
1883
+ {n : with_top ℕ} {s : set E} {t : set F} {g : F → G} {f : E → F} ( x : E)
1880
1884
(hg : times_cont_diff_within_at 𝕜 n g t (f x))
1881
1885
(hf : times_cont_diff_within_at 𝕜 n f s x) (st : s ⊆ f ⁻¹' t) :
1882
1886
times_cont_diff_within_at 𝕜 n (g ∘ f) s x :=
@@ -1906,10 +1910,20 @@ end
1906
1910
1907
1911
/-- The composition of `C^n` functions at points in domains is `C^n`. -/
1908
1912
lemma times_cont_diff_within_at.comp' {n : with_top ℕ} {s : set E} {t : set F} {g : F → G}
1909
- {f : E → F} { x : E}
1913
+ {f : E → F} ( x : E)
1910
1914
(hg : times_cont_diff_within_at 𝕜 n g t (f x)) (hf : times_cont_diff_within_at 𝕜 n f s x) :
1911
1915
times_cont_diff_within_at 𝕜 n (g ∘ f) (s ∩ f⁻¹' t) x :=
1912
- hg.comp (hf.mono (inter_subset_left _ _)) (inter_subset_right _ _)
1916
+ hg.comp x (hf.mono (inter_subset_left _ _)) (inter_subset_right _ _)
1917
+
1918
+ lemma times_cont_diff.comp_times_cont_diff_within_at
1919
+ {n : with_top ℕ} {g : F → G} {f : E → F} (h : times_cont_diff 𝕜 n g)
1920
+ (hf : times_cont_diff_within_at 𝕜 n f t x) :
1921
+ times_cont_diff_within_at 𝕜 n (g ∘ f) t x :=
1922
+ begin
1923
+ have : times_cont_diff_within_at 𝕜 n g univ (f x) :=
1924
+ h.times_cont_diff_at.times_cont_diff_within_at,
1925
+ exact this.comp x hf (subset_univ _),
1926
+ end
1913
1927
1914
1928
/-- The bundled derivative of a `C^{n+1}` function is `C^n`. -/
1915
1929
lemma times_cont_diff_on_fderiv_within_apply {m n : with_top ℕ} {s : set E}
@@ -1943,59 +1957,143 @@ begin
1943
1957
exact times_cont_diff_on_fderiv_within_apply hf unique_diff_on_univ hmn
1944
1958
end
1945
1959
1946
- /-- The sum of two `C^n`functions on a domain is `C^n`. -/
1947
- lemma times_cont_diff_on.add {n : with_top ℕ} {s : set E} {f g : E → F}
1948
- (hf : times_cont_diff_on 𝕜 n f s) (hg : times_cont_diff_on 𝕜 n g s) :
1949
- times_cont_diff_on 𝕜 n (λx, f x + g x) s :=
1960
+ /-! ### Sum of two functions -/
1961
+
1962
+ /-- The sum of two `C^n` functions within a set at a point is `C^n` within this set
1963
+ at this point. -/
1964
+ lemma times_cont_diff_within_at.add {n : with_top ℕ} {s : set E} {f g : E → F}
1965
+ (hf : times_cont_diff_within_at 𝕜 n f s x) (hg : times_cont_diff_within_at 𝕜 n g s x) :
1966
+ times_cont_diff_within_at 𝕜 n (λx, f x + g x) s x :=
1950
1967
begin
1951
- have : times_cont_diff 𝕜 n (λp : F × F, p.1 + p.2 ),
1968
+ have A : times_cont_diff 𝕜 n (λp : F × F, p.1 + p.2 ),
1952
1969
{ apply is_bounded_linear_map.times_cont_diff,
1953
1970
exact is_bounded_linear_map.add is_bounded_linear_map.fst is_bounded_linear_map.snd },
1954
- exact this.comp_times_cont_diff_on (hf.prod hg)
1971
+ exact A.times_cont_diff_within_at.comp x (hf.prod hg) subset_preimage_univ,
1972
+ end
1973
+
1974
+ /-- The sum of two `C^n` functions at a point is `C^n` at this point. -/
1975
+ lemma times_cont_diff_at.add {n : with_top ℕ} {f g : E → F}
1976
+ (hf : times_cont_diff_at 𝕜 n f x) (hg : times_cont_diff_at 𝕜 n g x) :
1977
+ times_cont_diff_at 𝕜 n (λx, f x + g x) x :=
1978
+ begin
1979
+ rw [← times_cont_diff_within_at_univ] at *,
1980
+ exact hf.add hg
1955
1981
end
1956
1982
1957
- /-- The sum of two `C^n`functions is `C^n`. -/
1983
+ /-- The sum of two `C^n` functions on a domain is `C^n`. -/
1984
+ lemma times_cont_diff_on.add {n : with_top ℕ} {s : set E} {f g : E → F}
1985
+ (hf : times_cont_diff_on 𝕜 n f s) (hg : times_cont_diff_on 𝕜 n g s) :
1986
+ times_cont_diff_on 𝕜 n (λx, f x + g x) s :=
1987
+ λ x hx, (hf x hx).add (hg x hx)
1988
+
1989
+ /-- The sum of two `C^n` functions is `C^n`. -/
1958
1990
lemma times_cont_diff.add {n : with_top ℕ} {f g : E → F}
1959
1991
(hf : times_cont_diff 𝕜 n f) (hg : times_cont_diff 𝕜 n g) : times_cont_diff 𝕜 n (λx, f x + g x) :=
1960
1992
begin
1961
- have : times_cont_diff 𝕜 n (λp : F × F, p.1 + p.2 ),
1962
- { apply is_bounded_linear_map.times_cont_diff,
1963
- exact is_bounded_linear_map.add is_bounded_linear_map.fst is_bounded_linear_map.snd },
1964
- exact this.comp (hf.prod hg)
1993
+ rw ← times_cont_diff_on_univ at *,
1994
+ exact hf.add hg
1965
1995
end
1966
1996
1967
- /-- The negative of a `C^n`function on a domain is `C^n`. -/
1968
- lemma times_cont_diff_on.neg {n : with_top ℕ} {s : set E} {f : E → F}
1969
- (hf : times_cont_diff_on 𝕜 n f s) : times_cont_diff_on 𝕜 n (λx, -f x) s :=
1997
+ /-! ### Negative -/
1998
+
1999
+ /-- The negative of a `C^n` function within a domain at a point is `C^n` within this domain at
2000
+ this point. -/
2001
+ lemma times_cont_diff_within_at.neg {n : with_top ℕ} {s : set E} {f : E → F}
2002
+ (hf : times_cont_diff_within_at 𝕜 n f s x) : times_cont_diff_within_at 𝕜 n (λx, -f x) s x :=
1970
2003
begin
1971
2004
have : times_cont_diff 𝕜 n (λp : F, -p),
1972
2005
{ apply is_bounded_linear_map.times_cont_diff,
1973
2006
exact is_bounded_linear_map.neg is_bounded_linear_map.id },
1974
- exact this.comp_times_cont_diff_on hf
2007
+ exact this.times_cont_diff_within_at.comp x hf subset_preimage_univ
2008
+ end
2009
+
2010
+ /-- The negative of a `C^n` function at a point is `C^n` at this point. -/
2011
+ lemma times_cont_diff_at.neg {n : with_top ℕ} {f : E → F}
2012
+ (hf : times_cont_diff_at 𝕜 n f x) : times_cont_diff_at 𝕜 n (λx, -f x) x :=
2013
+ begin
2014
+ rw ← times_cont_diff_within_at_univ at *,
2015
+ exact hf.neg
1975
2016
end
1976
2017
1977
- /-- The negative of a `C^n`function is `C^n`. -/
2018
+ /-- The negative of a `C^n` function on a domain is `C^n`. -/
2019
+ lemma times_cont_diff_on.neg {n : with_top ℕ} {s : set E} {f : E → F}
2020
+ (hf : times_cont_diff_on 𝕜 n f s) : times_cont_diff_on 𝕜 n (λx, -f x) s :=
2021
+ λ x hx, (hf x hx).neg
2022
+
2023
+ /-- The negative of a `C^n` function is `C^n`. -/
1978
2024
lemma times_cont_diff.neg {n : with_top ℕ} {f : E → F} (hf : times_cont_diff 𝕜 n f) :
1979
2025
times_cont_diff 𝕜 n (λx, -f x) :=
1980
2026
begin
1981
- have : times_cont_diff 𝕜 n (λp : F, -p),
1982
- { apply is_bounded_linear_map.times_cont_diff,
1983
- exact is_bounded_linear_map.neg is_bounded_linear_map.id },
1984
- exact this.comp hf
2027
+ rw ← times_cont_diff_on_univ at *,
2028
+ exact hf.neg
1985
2029
end
1986
2030
1987
- /-- The difference of two `C^n`functions on a domain is `C^n`. -/
2031
+ /-! ### Subtraction -/
2032
+
2033
+ /-- The difference of two `C^n` functions within a set at a point is `C^n` within this set
2034
+ at this point. -/
2035
+ lemma times_cont_diff_within_at.sub {n : with_top ℕ} {s : set E} {f g : E → F}
2036
+ (hf : times_cont_diff_within_at 𝕜 n f s x) (hg : times_cont_diff_within_at 𝕜 n g s x) :
2037
+ times_cont_diff_within_at 𝕜 n (λx, f x - g x) s x :=
2038
+ hf.add hg.neg
2039
+
2040
+ /-- The difference of two `C^n` functions at a point is `C^n` at this point. -/
2041
+ lemma times_cont_diff_at.sub {n : with_top ℕ} {f g : E → F}
2042
+ (hf : times_cont_diff_at 𝕜 n f x) (hg : times_cont_diff_at 𝕜 n g x) :
2043
+ times_cont_diff_at 𝕜 n (λx, f x - g x) x :=
2044
+ hf.add hg.neg
2045
+
2046
+ /-- The difference of two `C^n` functions on a domain is `C^n`. -/
1988
2047
lemma times_cont_diff_on.sub {n : with_top ℕ} {s : set E} {f g : E → F}
1989
2048
(hf : times_cont_diff_on 𝕜 n f s) (hg : times_cont_diff_on 𝕜 n g s) :
1990
2049
times_cont_diff_on 𝕜 n (λx, f x - g x) s :=
1991
- hf.add ( hg.neg)
2050
+ hf.add hg.neg
1992
2051
1993
- /-- The difference of two `C^n`functions is `C^n`. -/
2052
+ /-- The difference of two `C^n` functions is `C^n`. -/
1994
2053
lemma times_cont_diff.sub {n : with_top ℕ} {f g : E → F}
1995
- (hf : times_cont_diff 𝕜 n f) (hg : times_cont_diff 𝕜 n g) :
1996
- times_cont_diff 𝕜 n (λx, f x - g x) :=
2054
+ (hf : times_cont_diff 𝕜 n f) (hg : times_cont_diff 𝕜 n g) : times_cont_diff 𝕜 n (λx, f x - g x) :=
1997
2055
hf.add hg.neg
1998
2056
2057
+ /-! ### Sum of finitely many functions -/
2058
+
2059
+ lemma times_cont_diff_within_at.sum
2060
+ {ι : Type *} {f : ι → E → F} {s : finset ι} {n : with_top ℕ} {t : set E} {x : E}
2061
+ (h : ∀ i ∈ s, times_cont_diff_within_at 𝕜 n (λ x, f i x) t x) :
2062
+ times_cont_diff_within_at 𝕜 n (λ x, (∑ i in s, f i x)) t x :=
2063
+ begin
2064
+ classical,
2065
+ induction s using finset.induction_on with i s is IH,
2066
+ { simp [times_cont_diff_within_at_const] },
2067
+ { simp only [is, finset.sum_insert, not_false_iff],
2068
+ exact (h _ (finset.mem_insert_self i s)).add (IH (λ j hj, h _ (finset.mem_insert_of_mem hj))) }
2069
+ end
2070
+
2071
+ lemma times_cont_diff_at.sum
2072
+ {ι : Type *} {f : ι → E → F} {s : finset ι} {n : with_top ℕ} {x : E}
2073
+ (h : ∀ i ∈ s, times_cont_diff_at 𝕜 n (λ x, f i x) x) :
2074
+ times_cont_diff_at 𝕜 n (λ x, (∑ i in s, f i x)) x :=
2075
+ begin
2076
+ rw [← times_cont_diff_within_at_univ] at *,
2077
+ exact times_cont_diff_within_at.sum h
2078
+ end
2079
+
2080
+ lemma times_cont_diff_on.sum
2081
+ {ι : Type *} {f : ι → E → F} {s : finset ι} {n : with_top ℕ} {t : set E}
2082
+ (h : ∀ i ∈ s, times_cont_diff_on 𝕜 n (λ x, f i x) t) :
2083
+ times_cont_diff_on 𝕜 n (λ x, (∑ i in s, f i x)) t :=
2084
+ λ x hx, times_cont_diff_within_at.sum (λ i hi, h i hi x hx)
2085
+
2086
+ lemma times_cont_diff.sum
2087
+ {ι : Type *} {f : ι → E → F} {s : finset ι} {n : with_top ℕ}
2088
+ (h : ∀ i ∈ s, times_cont_diff 𝕜 n (λ x, f i x)) :
2089
+ times_cont_diff 𝕜 n (λ x, (∑ i in s, f i x)) :=
2090
+ begin
2091
+ simp [← times_cont_diff_on_univ] at *,
2092
+ exact times_cont_diff_on.sum h
2093
+ end
2094
+
2095
+ /-! ### Cartesian product of two functions-/
2096
+
1999
2097
/-- The product map of two `C^n` functions is `C^n`. -/
2000
2098
lemma times_cont_diff_on.map_prod {E' : Type *} [normed_group E'] [normed_space 𝕜 E']
2001
2099
{F' : Type *} [normed_group F'] [normed_space 𝕜 F']
0 commit comments