Skip to content

Commit ad01614

Browse files
committed
specialized version of is_diff_mx
1 parent b7689ca commit ad01614

1 file changed

Lines changed: 36 additions & 5 deletions

File tree

theories/derive.v

Lines changed: 36 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2235,7 +2235,7 @@ apply/derivable_mxP => i0 j0.
22352235
by have [] := MdM i0 j0.
22362236
Qed.
22372237

2238-
Lemma continuous_mx {m n : nat} (f : V -> 'I_m -> 'I_n -> R) :
2238+
Lemma continuous_mx {m n : nat} (f : V -> 'M[R]_(m, n)) :
22392239
(forall i j, continuous (fun x => f x i j)) <->
22402240
continuous (fun x : V => \matrix_(i < m, j < n) f x i j).
22412241
Proof.
@@ -2303,12 +2303,43 @@ pose gL : {linear _ -> _} := HB.pack g glM.
23032303
by apply: (@diff_unique _ _ _ _ gL); have [? ?] := dmx dM.
23042304
Qed.
23052305

2306-
Global Instance is_diff_mx {m n : nat} (M dM : V -> 'M[R]_(m, n)) (x : V) :
2306+
End pointwise_derive.
2307+
2308+
Section Ris_diff_mx.
2309+
Local Open Scope classical_set_scope.
2310+
Context {R : realFieldType}.
2311+
2312+
Global Instance is_diff_mx {m n : nat} (M dM : R -> 'M[R]_(m, n)) (x : R) :
23072313
(forall i j, is_diff x (fun x => M x i j) (fun x => dM x i j)) ->
23082314
is_diff x M dM.
23092315
Proof.
23102316
move=> MdM.
2317+
have diffM : differentiable M (nbhs_filter_on x).
2318+
apply/derivable1_diffP.
2319+
apply/derivable_mxP => i j.
2320+
have [/=] := MdM i j.
2321+
by move/(@derivable1_diffP R R (fun x0 => M x0 i j) x).
2322+
have H i j : differentiable (fun x0 : R => M x0 i j) x.
2323+
simpl in *.
2324+
by have [/=] := MdM i j.
23112325
apply: DiffDef.
2312-
Abort.
2313-
2314-
End pointwise_derive.
2326+
exact: diffM.
2327+
rewrite diffmx; last exact: diffM.
2328+
apply/funext => /= v.
2329+
apply/matrixP => i j.
2330+
rewrite !mxE.
2331+
have [] := MdM i j => diffMij dMdM.
2332+
simpl in *.
2333+
rewrite -deriveE//.
2334+
move/(congr1 (fun f => f v)) : dMdM.
2335+
rewrite -deriveE.
2336+
move=> <-.
2337+
rewrite derive_mx//=.
2338+
by rewrite mxE.
2339+
apply/derivable_mxP => i0 j0/=.
2340+
have [/=] := MdM i0 j0.
2341+
by move/diff_derivable => /(_ v).
2342+
exact: H.
2343+
Qed.
2344+
2345+
End Ris_diff_mx.

0 commit comments

Comments
 (0)