Skip to content

Commit e9fef19

Browse files
committed
wip and tried making factory from uniform to normedModType
1 parent 1896f90 commit e9fef19

File tree

2 files changed

+79
-2
lines changed

2 files changed

+79
-2
lines changed

theories/holomorphy.v

Lines changed: 29 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,25 @@ I don't want the canonical lmodtype structure on C,
2323
Therefore this is based on a fork of real-closed *)
2424
HB.instance Definition _ (R : rcfType) := NormedModule.copy R[i] R[i]^o.
2525

26+
HB.instance Definition _ (R : rcfType) := Uniform.copy (Rcomplex R) R[i].
27+
HB.instance Definition _ (R : rcfType) := Pointed.copy (Rcomplex R) R[i].
28+
29+
Section Rcomplex_NormedModType.
30+
Variable (R : rcfType).
31+
HB.howto Rcomplex normedModType 11.
32+
33+
Definition ball : R -> Rcomplex R -> R -> Prop
34+
- ball_center_subproof : forall (x : M) (e : R), 0 < e -> ball x e x
35+
- ball_sym_subproof : forall (x y : M) (e : R), ball x e y -> ball y e x
36+
- ball_triangle_subproof :
37+
forall (x y z : M) (e1 e2 : R),
38+
ball x e1 y -> ball y e2 z -> ball x (e1 + e2)%E z
39+
- entourageE_subproof : entourage = entourage_ ball
40+
41+
HB.about Uniform_isPseudoMetric.Build.
42+
; NormedZmod_PseudoMetric_eq;
43+
PseudoMetricNormedZmod_Lmodule_isNormedModule
44+
2645
HB.factory Record Normed_And_Lmodule_isNormedModule (K : numFieldType) R of @Num.NormedZmodule K R & GRing.Lmodule K R := {
2746
normrZ : forall (l : K) (x : R), normr (l *: x) = normr l * normr x;
2847
}.
@@ -239,15 +258,15 @@ Lemma real_normc_ler (x y : R) :
239258
Proof.
240259
rewrite /normc /= -ler_sqr ?nnegrE ?normr_ge0 ?sqrtr_ge0 //.
241260
rewrite sqr_sqrtr ?addr_ge0 ?sqr_ge0 ?real_normK //=.
242-
by rewrite ler_addl ?sqr_ge0.
261+
by rewrite lerDl ?sqr_ge0.
243262
Qed.
244263

245264
Lemma im_normc_ler (x y : R) :
246265
`|y| <= normc (x +i* y).
247266
Proof.
248267
rewrite /normc /= -ler_sqr ?nnegrE ?normr_ge0 ?sqrtr_ge0 //.
249268
rewrite sqr_sqrtr ?addr_ge0 ?sqr_ge0 ?real_normK //=.
250-
by rewrite ler_addr ?sqr_ge0.
269+
by rewrite lerDr ?sqr_ge0.
251270
Qed.
252271

253272
End complex_extras.
@@ -403,6 +422,14 @@ have -> : (fun h : C => h^-1 *: ((f (c + h) - f c))) @ (realC @ (dnbhs 0)) =
403422
\o realC @ (dnbhs (0 : R)) by [].
404423
suff -> : ( (fun h : C => h^-1 *: (f (c + h) - f c)) \o realC)
405424
= (fun h : R => h^-1 *: ((f%:Rfun \o shift c) (h *: (1%:Rc)) - f c : Rcomplex _) ) :> (R -> C) .
425+
STOP.
426+
rewrite /=.
427+
f_equal => /=.
428+
Set Printing All.
429+
Search lim Logic.eq .
430+
Search (lim _ = lim _).
431+
Set Printing All.
432+
apply: lim_eq.
406433
admit.
407434
apply: funext => h /=.
408435
by rewrite Inv_realC /= -!scalecr realC_alg [X in f X]addrC.

theories/normedtype_theory/normed_module.v

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2063,3 +2063,53 @@ HB.instance Definition _ :=
20632063
Check M : normedModType R.
20642064

20652065
HB.end.
2066+
2067+
HB.factory Record Uniform_Lmodule_isNormed (R : numFieldType) M of Uniform M & GRing.Lmodule R M := {
2068+
norm : M -> R;
2069+
ler_normD : forall x y, norm (x + y) <= norm x + norm y ;
2070+
normrZ : forall (l : R) (x : M), norm (l *: x) = `|l| * norm x ;
2071+
normr0_eq0 : forall x : M, norm x = 0 -> x = 0 ;
2072+
entourage_norm : forall x : M, nbhs_ball_ (ball_ norm) x = filter.nbhs x;
2073+
}.
2074+
2075+
HB.builders Context R M of Uniform_Lmodule_isNormed R M.
2076+
2077+
Lemma normrMn (x : M) (n : nat) : norm (x *+ n) = norm x *+ n.
2078+
Proof.
2079+
admit.
2080+
Admitted.
2081+
2082+
2083+
Lemma normrN (x : M) : norm (- x) = norm x.
2084+
Proof. admit. Admitted.
2085+
2086+
HB.instance Definition _ := Num.Zmodule_isNormed.Build R M ler_normD normr0_eq0 normrMn normrN.
2087+
HB.instance Definition _ := isPointed.Build M 0.
2088+
2089+
Definition ball := ball_ (fun x : M => `|x|).
2090+
2091+
Lemma ball_center_subproof (x : M) (e : R) : 0 < e -> ball x e x.
2092+
Proof. by rewrite /ball /ball_/= subrr normr0. Qed.
2093+
2094+
Lemma ball_sym_subproof (x y : M) (e : R) : ball x e y -> ball y e x.
2095+
Proof. by rewrite /ball /ball_/= distrC. Qed.
2096+
2097+
Lemma ball_triangle_subproof (x y z : M) (e1 e2 : R) :
2098+
ball x e1 y ->
2099+
ball y e2 z ->
2100+
ball x (e1 + e2)%E z.
2101+
Proof.
2102+
rewrite /ball /ball_/= => ? ?.
2103+
rewrite -[x](subrK y) -(addrA (x + _)).
2104+
by rewrite (le_lt_trans (ler_normD _ _))// ltrD.
2105+
Qed.
2106+
2107+
Lemma entourageE_subproof : entourage = entourage_ ball.
2108+
Proof. admit. Admitted.
2109+
2110+
HB.instance Definition _ := Uniform_isPseudoMetric.Build R M ball_center_subproof ball_sym_subproof ball_triangle_subproof entourageE_subproof.
2111+
2112+
HB.about NormedZmod_PseudoMetric_eq.Build.
2113+
; PseudoMetricNormedZmod_Lmodule_isNormedModule
2114+
2115+
HB.howto M normedModType.

0 commit comments

Comments
 (0)