Skip to content

Commit 848a02e

Browse files
differentiable rsubmx/lsubmx lemmas + derive_sqrt (#1801)
* derive_sqrt * rsubmx and lsubmx diff lemmas --------- Co-authored-by: Reynald Affeldt <reynald.affeldt@aist.go.jp>
1 parent 267546e commit 848a02e

File tree

6 files changed

+39
-5
lines changed

6 files changed

+39
-5
lines changed

CHANGELOG_UNRELEASED.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,11 @@
109109
- in `order_topology.v`:
110110
+ structures `POrderedNbhs`, `POrderedTopological`, `POrderedUniform`, `POrderedPseudoMetric`,
111111
`POrderedPointedTopological`
112+
- in `num_topology.v`:
113+
+ lemmas `continuous_rsubmx`, `continuous_lsubmx`
114+
115+
- in `derive.v`:
116+
+ lemmas `differentiable_rsubmx`, `differentiable_lsubmx`
112117

113118
### Changed
114119

theories/derive.v

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
(* mathcomp analysis (c) 2025 Inria and AIST. License: CeCILL-C. *)
1+
(* mathcomp analysis (c) 2026 Inria and AIST. License: CeCILL-C. *)
22
From HB Require Import structures.
33
From mathcomp Require Import all_ssreflect ssralg ssrnum matrix interval poly.
44
From mathcomp Require Import sesquilinear.
@@ -760,6 +760,14 @@ move=> dfx dgfx; apply: DiffDef; first exact: differentiable_comp.
760760
by rewrite diff_comp // !diff_val.
761761
Qed.
762762

763+
Lemma differentiable_rsubmx m {n1 n2} v :
764+
differentiable (rsubmx : 'M[R]_(m, n1 + n2) -> 'M[R]_(m, n2)) v.
765+
Proof. exact/linear_differentiable/continuous_rsubmx. Qed.
766+
767+
Lemma differentiable_lsubmx m {n1 n2} v :
768+
differentiable (lsubmx : 'M[R]_(m, n1 + n2) -> 'M[R]_(m, n1)) v.
769+
Proof. exact/linear_differentiable/continuous_lsubmx. Qed.
770+
763771
Lemma bilinear_schwarz (U V' W' : normedModType R)
764772
(f : {bilinear U -> V' -> W'}) : continuous (fun p => f p.1 p.2) ->
765773
exists2 k, k > 0 & forall u v, `|f u v| <= k * `|u| * `|v|.

theories/normedtype_theory/matrix_normedtype.v

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
(* mathcomp analysis (c) 2025 Inria and AIST. License: CeCILL-C. *)
1+
(* mathcomp analysis (c) 2026 Inria and AIST. License: CeCILL-C. *)
22
From HB Require Import structures.
33
From mathcomp Require Import all_ssreflect finmap ssralg ssrnum matrix interval.
44
From mathcomp Require Import boolp classical_sets interval_inference reals.

theories/realfun.v

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1880,6 +1880,10 @@ rewrite -[x]sqrtK//; apply: (@is_derive_inverse _ (fun x => x ^+ 2)).
18801880
- by rewrite mulf_neq0// gt_eqF// sqrtr_gt0 exprn_gt0// sqrtr_gt0.
18811881
Unshelve. all: by end_near. Qed.
18821882

1883+
Lemma derive_sqrt {K : realType} (r : K) : 0 < r ->
1884+
'D_1 Num.sqrt r = (2 * Num.sqrt r)^-1.
1885+
Proof. by move=> r0; apply: derive_val; exact: is_derive1_sqrt. Qed.
1886+
18831887
#[global] Hint Extern 0 (is_derive _ _ (fun _ => (_ _)^-1) _) =>
18841888
(eapply is_deriveV; first by []) : typeclass_instances.
18851889

theories/topology_theory/matrix_topology.v

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
1-
(* mathcomp analysis (c) 2017 Inria and AIST. License: CeCILL-C. *)
1+
(* mathcomp analysis (c) 2026 Inria and AIST. License: CeCILL-C. *)
22
From HB Require Import structures.
33
From mathcomp Require Import all_ssreflect all_algebra finmap all_classical.
44
From mathcomp Require Import interval_inference topology_structure.
55
From mathcomp Require Import uniform_structure pseudometric_structure.
6+
67
(**md**************************************************************************)
78
(* # Matrix topology *)
89
(* ``` *)

theories/topology_theory/num_topology.v

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,13 @@ From HB Require Import structures.
33
From mathcomp Require Import all_ssreflect all_algebra all_classical.
44
From mathcomp Require Import interval_inference reals topology_structure.
55
From mathcomp Require Import uniform_structure pseudometric_structure.
6-
From mathcomp Require Import order_topology.
6+
From mathcomp Require Import order_topology matrix_topology.
77

88
(**md**************************************************************************)
99
(* # Topological notions for numerical types *)
1010
(* *)
1111
(* We endow `numFieldType` with the types of topological notions (accessible *)
12-
(* with `Import numFieldTopology.Exports). *)
12+
(* with `Import numFieldTopology.Exports`). *)
1313
(* *)
1414
(******************************************************************************)
1515

@@ -378,3 +378,19 @@ have inj_nat_of_rat : injective nat_of_rat.
378378
exact/bij_inj.
379379
by exists (nat_of_rat \o f) => i j Di Dj /inj_nat_of_rat/inj_f; exact.
380380
Qed.
381+
382+
Lemma continuous_rsubmx {R : numFieldType} m {n1 n2} :
383+
continuous (rsubmx : 'M[R]_(m, n1 + n2) -> 'M[R]_(m, n2)).
384+
Proof.
385+
move=> u A /nbhs_ballP[e /= e0 eA].
386+
apply/nbhs_ballP; exists e => //= v [_ uv]; apply: eA; split => // i j.
387+
by apply: (le_lt_trans _ (uv i (rshift n1 j))); rewrite !mxE.
388+
Qed.
389+
390+
Lemma continuous_lsubmx {R : numFieldType} m {n1 n2} :
391+
continuous (lsubmx : 'M[R]_(m, n1 + n2) -> 'M[R]_(m, n1)).
392+
Proof.
393+
move=> u A /nbhs_ballP[e /= e0 eA].
394+
apply/nbhs_ballP; exists e => //= v [_ uv]; apply: eA; split => // i j.
395+
by apply: (le_lt_trans _ (uv i (lshift n2 j))); rewrite !mxE.
396+
Qed.

0 commit comments

Comments
 (0)