@@ -643,7 +643,7 @@ move=> df; set g := RHS; have glin : linear g.
643643 by move=> a u v; rewrite /g linearP /= scalerDl -scalerA.
644644pose glM := GRing.isLinear.Build _ _ _ _ _ glin.
645645pose gL : {linear _ -> _} := HB.pack g glM.
646- by apply:(@diff_unique _ _ _ gL); have [] := dscalel f df.
646+ by apply: (@diff_unique _ _ _ gL); have [] := dscalel f df.
647647Qed .
648648
649649Lemma differentiableZl (k : V -> R) (f : W) x :
@@ -2221,4 +2221,94 @@ rewrite (le_trans (ler_normD _ _))// (splitr e) lerD//.
22212221 by rewrite sub0r normrN; near: x; exact: dnbhs0_lt.
22222222Unshelve. all: by end_near. Qed .
22232223
2224+ Global Instance is_derive_mx {m n : nat} (M : V -> 'M[R]_(m, n))
2225+ (dM : 'M[R]_(m, n)) (x v : V) :
2226+ (forall i j, is_derive x v (fun x => M x i j) (dM i j)) ->
2227+ is_derive x v M dM.
2228+ Proof .
2229+ move=> MdM; apply: DeriveDef; first exact/derivable_mxP.
2230+ apply/matrixP => i j.
2231+ have [_ <-] := MdM i j.
2232+ rewrite derive_mx//.
2233+ by rewrite mxE.
2234+ apply/derivable_mxP => i0 j0.
2235+ by have [] := MdM i0 j0.
2236+ Qed .
2237+
2238+ Lemma continuous_mx {m n : nat} (f : V -> 'I_m -> 'I_n -> R) :
2239+ (forall i j, continuous (fun x => f x i j)) <->
2240+ continuous (fun x : V => \matrix_(i < m, j < n) f x i j).
2241+ Proof .
2242+ split.
2243+ - move=> cf x; apply/cvgrPdist_le => /= e e0.
2244+ near=> t.
2245+ rewrite /Num.norm/= mx_normrE/= (bigmax_le _ (ltW e0))// => -[i j] _.
2246+ rewrite !mxE/=.
2247+ move: i j.
2248+ near: t.
2249+ apply: filter_forall => /= i; apply: filter_forall => /= j.
2250+ have /cvgrPdist_le/(_ _ e0) := cf i j x.
2251+ exact: filterS.
2252+ - move=> cf i j v.
2253+ apply/cvgrPdist_le => /= e e0.
2254+ have /cvgrPdist_le/(_ _ e0) := cf v.
2255+ apply: filterS => w.
2256+ apply: le_trans.
2257+ rewrite [in leRHS]/Num.norm/= mx_normrE/=.
2258+ apply: le_trans (le_bigmax _ _ (i, j)).
2259+ by rewrite !mxE/=.
2260+ Unshelve. all: by end_near. Qed .
2261+
2262+ Fact dmx {m n : nat} (M : V -> 'M[R]_(m, n)) (x : V) :
2263+ let g := fun x0 : V => (\matrix_(i < m, j < n) 'd M x x0 i j) in
2264+ differentiable M x ->
2265+ continuous g /\
2266+ M \o shift x = cst (M x) + g +o_ 0 id.
2267+ Proof .
2268+ move=> dM Mx; split => [|].
2269+ case: Mx => -[Mx _].
2270+ rewrite /dM.
2271+ apply/continuous_mx => i j.
2272+ move=> v.
2273+ apply/cvgrPdist_le => /= e e0.
2274+ have := Mx v.
2275+ move/cvgrPdist_le => /(_ _ e0).
2276+ apply: filterS => /=t.
2277+ apply: le_trans.
2278+ rewrite {2}/Num.norm/= mx_normrE/=.
2279+ apply: le_trans; last first.
2280+ exact: le_bigmax.
2281+ by rewrite !mxE/=.
2282+ apply/eqaddoE; rewrite funeqE => y /=.
2283+ rewrite diff_locallyx; last exact: Mx.
2284+ rewrite /dM !fctE.
2285+ congr (_ + _ + _).
2286+ apply/matrixP => i j/=.
2287+ by rewrite mxE.
2288+ Qed .
2289+
2290+ Lemma diffmx {m n : nat} (M : V -> 'M[R]_(m, n)) t :
2291+ differentiable M t ->
2292+ 'd M (nbhs_filter_on t) = (fun x0 : V => \matrix_(i < m, j < n) 'd M t x0 i j) :> (_ -> _).
2293+ Proof .
2294+ move=> dM.
2295+ set g := (fun x0 : V => \matrix_(i, j) 'd M t x0 i j).
2296+ have glin : linear (g : V -> _).
2297+ move=> a u w.
2298+ rewrite /g linearD linearZ/=.
2299+ apply/matrixP => i j.
2300+ by rewrite !mxE.
2301+ pose glM := GRing.isLinear.Build _ _ _ _ _ glin.
2302+ pose gL : {linear _ -> _} := HB.pack g glM.
2303+ by apply: (@diff_unique _ _ _ _ gL); have [? ?] := dmx dM.
2304+ Qed .
2305+
2306+ Global Instance is_diff_mx {m n : nat} (M dM : V -> 'M[R]_(m, n)) (x : V) :
2307+ (forall i j, is_diff x (fun x => M x i j) (fun x => dM x i j)) ->
2308+ is_diff x M dM.
2309+ Proof .
2310+ move=> MdM.
2311+ apply: DiffDef.
2312+ Abort .
2313+
22242314End pointwise_derive.
0 commit comments