Skip to content

Commit e4a8c58

Browse files
committed
changelog, linting
1 parent cf05248 commit e4a8c58

File tree

6 files changed

+39
-67
lines changed

6 files changed

+39
-67
lines changed

CHANGELOG_UNRELEASED.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,11 @@
106106

107107
- in `lebesgue_integrable.v`:
108108
+ lemma `integrable_norm`
109+
- in `num_topology.v`:
110+
+ lemmas `continuous_rsubmx`, `continuous_lsubmx`
111+
112+
- in `derive.v`:
113+
+ lemmas `differentiable_rsubmx`, `differentiable_lsubmx`
109114

110115
### Changed
111116

theories/derive.v

Lines changed: 9 additions & 54 deletions
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.
@@ -693,45 +693,6 @@ have @f : {linear 'M[R]_(m, n) -> R}.
693693
rewrite (_ : (fun _ => _) = f) //; exact/linear_differentiable/coord_continuous.
694694
Qed.
695695

696-
Lemma differentiable_rsubmx0 {n1 n2} t :
697-
differentiable (@rsubmx R 1 n1 n2) t.
698-
Proof.
699-
have lin_rsubmx : linear (@rsubmx R 1 n1 n2).
700-
move=> a b c.
701-
by rewrite linearD//= linearZ.
702-
pose build_lin_rsubmx := GRing.isLinear.Build _ _ _ _ _ lin_rsubmx.
703-
pose Rsubmx : {linear 'rV[R^o]_(n1 + n2) -> 'rV[R^o]_n2} := HB.pack (@rsubmx R _ _ _) build_lin_rsubmx.
704-
apply: (@linear_differentiable _ _ _ _).
705-
move=> /= u A /=.
706-
move/nbhs_ballP=> [e /= e0 eA].
707-
apply/nbhs_ballP; exists e => //= v [? uv].
708-
apply: eA; split => //.
709-
(* TODO: lemma *)
710-
move: uv; rewrite /ball/= /mx_ball/ball /= => uv i j.
711-
apply: (le_lt_trans _ (uv i (rshift n1 j))).
712-
by rewrite !mxE.
713-
Qed.
714-
715-
Lemma differentiable_lsubmx0{n1 n2} t :
716-
differentiable (@lsubmx R 1 n1 n2) t.
717-
Proof.
718-
have lin_lsubmx : linear (@lsubmx R 1 n1 n2).
719-
move=> a b c.
720-
by rewrite linearD//= linearZ.
721-
pose build_lin_lsubmx := GRing.isLinear.Build _ _ _ _ _ lin_lsubmx.
722-
pose Lsubmx : {linear 'rV[R^o]_(n1 + n2) -> 'rV[R^o]_n1} :=
723-
HB.pack (@lsubmx R _ _ _) build_lin_lsubmx.
724-
apply: (@linear_differentiable _ _ _ _).
725-
move=> /= u A /=.
726-
move/nbhs_ballP=> [e /= e0 eA].
727-
apply/nbhs_ballP; exists e => //= v [? uv].
728-
apply: eA; split => //.
729-
(* TODO: lemma *)
730-
move: uv; rewrite /ball/= /mx_ball/ball /= => uv i j.
731-
apply: (le_lt_trans _ (uv i (lshift n2 j))).
732-
by rewrite !mxE.
733-
Qed.
734-
735696
Lemma linear_lipschitz (V' W' : normedModType R) (f : {linear V' -> W'}) :
736697
continuous f -> exists2 k, k > 0 & forall x, `|f x| <= k * `|x|.
737698
Proof.
@@ -799,24 +760,18 @@ move=> dfx dgfx; apply: DiffDef; first exact: differentiable_comp.
799760
by rewrite diff_comp // !diff_val.
800761
Qed.
801762

802-
Lemma differentiable_rsubmx {n1 n2}
803-
(f : V -> 'rV[R]_(n1 + n2)) t :
804-
(forall x, differentiable f x) ->
805-
differentiable (fun x => rsubmx (f x)) t.
763+
Lemma differentiable_rsubmx m {n1 n2} (f : V -> 'M[R]_(m, n1 + n2)) v :
764+
(forall x, differentiable f x) -> differentiable (rsubmx \o f) v.
806765
Proof.
807-
move=> /= => df1.
808-
apply: differentiable_comp => //.
809-
exact: differentiable_rsubmx0.
766+
move=> df; apply: differentiable_comp => //.
767+
exact/linear_differentiable/continuous_rsubmx.
810768
Qed.
811769

812-
Lemma differentiable_lsubmx {n1 n2}
813-
(f : V -> 'rV[R]_(n1 + n2)) t :
814-
(forall x, differentiable f x) ->
815-
differentiable (fun x => lsubmx (f x)) t.
770+
Lemma differentiable_lsubmx m {n1 n2} (f : V -> 'M[R]_(m, n1 + n2)) v :
771+
(forall x, differentiable f x) -> differentiable (lsubmx \o f) v.
816772
Proof.
817-
move=> /= => df1.
818-
apply: differentiable_comp => //.
819-
exact: differentiable_lsubmx0.
773+
move=> df1; apply: differentiable_comp => //.
774+
exact/linear_differentiable/continuous_lsubmx.
820775
Qed.
821776

822777
Lemma bilinear_schwarz (U V' W' : normedModType R)

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 & 9 deletions
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 ssrint.
44
From mathcomp Require Import archimedean interval.
@@ -1878,16 +1878,11 @@ rewrite -[x]sqrtK//; apply: (@is_derive_inverse _ (fun x => x ^+ 2)).
18781878
- rewrite !sqrtK//; split; first exact: exprn_derivable.
18791879
by rewrite exp_derive expr1 scaler1.
18801880
- by rewrite mulf_neq0// gt_eqF// sqrtr_gt0 exprn_gt0// sqrtr_gt0.
1881-
Unshelve. all: by end_near. Qed.
1881+
Unshelve. all: by end_near. Qed.
18821882

18831883
Lemma derive_sqrt {K : realType} (r : K) : 0 < r ->
1884-
(Num.sqrt^`())%classic r = (2 * Num.sqrt r)^-1 :> K.
1885-
Proof.
1886-
move=> r0.
1887-
rewrite derive1E.
1888-
apply: derive_val.
1889-
exact: is_derive1_sqrt.
1890-
Qed.
1884+
'D_1 Num.sqrt r = (2 * Num.sqrt r)^-1.
1885+
Proof. by move=> r0; apply: derive_val; exact: is_derive1_sqrt. Qed.
18911886

18921887
#[global] Hint Extern 0 (is_derive _ _ (fun _ => (_ _)^-1) _) =>
18931888
(eapply is_deriveV; first by []) : typeclass_instances.

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)