11
22(* mathcomp analysis (c) 2017 Inria and AIST. License: CeCILL-C. *)
33(*Require Import ssrsearch. *)
4- From mathcomp Require Import ssreflect ssrfun ssrbool fieldext falgebra.
4+ From mathcomp Require Import ssreflect ssrfun ssrbool fieldext falgebra vector .
55From mathcomp Require Import ssrnat eqtype choice fintype bigop order ssralg ssrnum ssrfun.
66From mathcomp Require Import complex.
77From mathcomp Require Import boolp reals ereal derive.
@@ -277,8 +277,7 @@ apply/funext => P /=; rewrite propeqE; split.
277277move => [B [] r r0] H /= H'; exists r%:C; first by rewrite ltcR.
278278move => z h; apply: H' => /=; apply: H => /=.
279279by rewrite -ltcR /=.
280-
281- Check uniformityOfBallMixin.
280+ Admitted .
282281
283282Canonical Rcomplex_uniformType (R: realType) :=
284283 UniformType (Rcomplex R) (Rcomplex_uniformMixin R).
@@ -497,11 +496,55 @@ Qed.
497496
498497Lemma within_continuous_withinNx
499498 (R C : numFieldType) (U : normedModType C) (f : U -> R^o) :
500- {for (0 : U), continuous f} -> (f 0 = 0) -> f @ nbhs' (0 :U) --> nbhs' (0 : R^o).
499+ {for (0 : U), continuous f} -> (forall x, f x = 0 -> x = 0) -> f @ nbhs' (0 :U) --> nbhs' (0 : R^o).
501500Proof .
502- move => cf f0 A /=.
503- rewrite !/nbhs /= /nbhs /= /nbhs' /within /= !nearE => [[]] r /= r0 H.
504- move : (cf A) => /=. near_simpl. rewrite f0. Admitted .
501+ move => cf f0 A /=.
502+ rewrite !/nbhs /= /nbhs /= /nbhs' /within /= !nearE => H. Admitted .
503+
504+ Section complex_topological. (*WIP *)
505+ Variable R : realType.
506+ Local Notation C := R[i].
507+
508+ Canonical complex_pointedType :=
509+ [pointedType of C for pointed_of_zmodule [zmodType of C]].
510+ Canonical complex_filteredType :=
511+ [filteredType C of C for filtered_of_normedZmod [normedZmodType C of C]].
512+ Canonical complex_topologicalType :=
513+ TopologicalType C
514+ (topologyOfEntourageMixin
515+ (uniformityOfBallMixin
516+ (@nbhs_ball_normE _ [normedZmodType C of C])
517+ (pseudoMetric_of_normedDomain [normedZmodType C of C]))).
518+ Canonical numFieldType_uniformType := UniformType C
519+ (uniformityOfBallMixin (@nbhs_ball_normE _ [normedZmodType C of C])
520+ (pseudoMetric_of_normedDomain [normedZmodType C of C])).
521+ Canonical numFieldType_pseudoMetricTyp
522+ := @PseudoMetric.Pack [numDomainType of C] C (@PseudoMetric.Class [numDomainType of C] C
523+ (Uniform.class [uniformType of C])
524+ (@pseudoMetric_of_normedDomain [numDomainType of C] [normedZmodType C of C])).
525+
526+ Canonical complex_lmodType :=
527+ [lmodType R[i] of R[i] for [lmodType R[i] of R[i]^o]].
528+
529+ Canonical complex_lalgType := [lalgType C of C for [lalgType C of C^o]].
530+ Canonical complex_algType := [algType C of C for [algType C of C^o]].
531+ Canonical complex_comAlgType := [comAlgType C of C].
532+ Canonical complex_unitAlgType := [unitAlgType C of C].
533+ Canonical complex_comUnitAlgType := [comUnitAlgType C of C].
534+ (* Canonical complex_vectType := [vectType C of C for [vectType C of C^o]]. *)
535+ (* Canonical complex_FalgType := [FalgType C of C]. *)
536+ (* Canonical complex_fieldExtType := *)
537+ (* [fieldExtType C of C for [fieldExtType C of C^o]]. *)
538+
539+
540+
541+ Canonical complex_pseudoMetricNormedZmodType :=
542+ [pseudoMetricNormedZmodType C of C for
543+ [pseudoMetricNormedZmodType C of [numFieldType of C^o]]].
544+ Canonical complex_normedModType :=
545+ [normedModType C of C for [normedModType C of C^o]].
546+
547+ End complex_topological.
505548
506549Section Holomorphe_der.
507550Variable R : realType.
@@ -538,24 +581,24 @@ so the following line shouldn't type check. *)
538581Fail Definition Rderivable_fromcomplex_false (f : C^o -> C^o) (c v: C^o) :=
539582 cvg (fun (h : R^o) => h^-1 *: (f (c +h *: v) - f c)) @ (nbhs' (0:R^o)).
540583
541- Definition realC : R^o -> C^o := (fun r => r%:C).
584+ Definition realC : R^o -> C := (fun r => r%:C).
542585
543586Lemma continuous_realC: continuous realC.
544587Proof .
545588move => x A /= [] r /[dup] /realC_gt0 Rer0 /gt0_realC rRe H; exists (Re r); first by [].
546589by move => z /= nz; apply: (H (realC z)); rewrite /= -realCB realC_norm rRe ltcR.
547590Qed .
548591
549- Lemma Rdiff1 (f : C^o -> C^o ) c :
550- lim ( (fun h : C^o => h^-1 *: ((f (c + h) - f c) ) )
592+ Lemma Rdiff1 (f : C -> C) c :
593+ lim ( (fun h : C => h^-1 *: ((f (c + h) - f c) ) )
551594 @ (realC @ (nbhs' 0)))
552595 = 'D_1 (f%:Rfun) c%:Rc :> C.
553596Proof .
554597rewrite /derive.
555598have -> : (fun h : C^o => h^-1 *: ((f (c + h) - f c))) @ (realC @ (nbhs' 0)) =
556599 (fun h : C^o => h^-1 *: ((f (c + h) - f c)))
557600 \o realC @ (nbhs' (0 : R^o)) by [].
558- suff -> : ( (fun h : (R[i])^o => h^-1 *: (f (c + h) - f c)) \o realC)
601+ suff -> : ( (fun h : C => h^-1 *: (f (c + h) - f c)) \o realC)
559602= (fun h : R^o => h^-1 *: ((f%:Rfun \o shift c) (h *: (1%:Rc)) - f c) ) :> (R -> C) .
560603 by [].
561604apply: funext => h /=.
@@ -574,59 +617,58 @@ have -> :
574617 = ((fun h : (R[i])^o => h^-1 *: (f (c + h * 'i) - f c)) \o realC) @ nbhs' 0 by [].
575618suff -> : (fun h : (R[i])^o => h^-1 * (f (c + h * 'i) - f c)) \o
576619realC = fun h : R => h^-1 *: ((f%:Rfun \o shift c) (h *: ('i%:Rc)) - f c).
577- by [].
620+ by [].
578621apply: funext => h /=.
579622by rewrite Inv_realC -scalecM -!scalecr realCZ [X in f X]addrC.
580623Qed .
581624
582625
583626(*extremely long with modified filteredType *)
584627
585- Definition CauchyRiemannEq (f : C^o -> C^o ) c :=
628+ Definition CauchyRiemannEq (f : C -> C) c :=
586629 'i *'D_1 f%:Rfun c%:Rc = 'D_('i) f%:Rfun c%:Rc.
587630
588- Lemma holo_differentiable (f : C^o -> C^o ) (c : C^o ) :
631+ Lemma holo_differentiable (f : C -> C) (c : C) :
589632 holomorphic f c -> Rdifferentiable f c.
590633Proof .
591634move=> /holomorphicP /derivable1_diffP /diff_locallyP => [[diffc /= /eqaddoP holo]].
592635apply/diff_locallyP.
593- pose Df : Rc -> Rc := fun (v : Rc) => ('d f (c: [topologicalType of C^o]) v).
636+ pose Df : Rc -> Rc := fun (v : Rc) => ('d f c v).
594637have linDf : linear Df.
595638 move => t u v; rewrite /Df scalecr.
596- by rewrite (linearP ('d f (c: [topologicalType of C^o]) )) scalecr /=.
639+ by rewrite (linearP ('d f c )) scalecr /=.
597640pose df : {linear Rc -> Rc} := (Linear linDf).
598641have cdf : continuous (df : Rc -> Rc) by [].
599642have eqdf : f%:Rfun \o +%R^~ c = cst (f c) + df +o_ (0 : Rc) id.
600- (* apply/eqaddoE; rewrite holo; congr (_ + _ + _) ; admit.*)
601- apply/eqaddoP => r /ltc0P r0; near=> x; rewrite -lecR -realCM /=; near: x.
643+ (*apply/eqaddoE; rewrite holo; congr (_ + _ + _) ; admit.*)
644+ apply/eqaddoP => r /ltc0P r0. near=> x; rewrite -lecR -realCM /=; near: x.
602645 by apply: holo.
603- suff -> : ('d (f%:Rfun) (c : Rcomplex_normedModType R)) = df :> (_ -> _) by split.
646+ suff -> : ('d (f%:Rfun) (c : Rc) ) = df :> (_ -> _) by split. (*issue with notations*)
604647by apply: diff_unique.
605648Grab Existential Variables. by end_near. Qed .
606649
607- (*The fact that the topological structure is only available on C^o
608- makes iterations of C^o apply *)
609650
610651(*The equality between 'i as imaginaryC from ssrnum and 'i is not transparent:
611652 neq0ci is part of ssrnum and uneasy to find *)
612653
613- Lemma holo_CauchyRiemann (f : C^o -> C^o ) c: holomorphic f c -> CauchyRiemannEq f c.
654+ Lemma holo_CauchyRiemann (f : C -> C ) c: holomorphic f c -> CauchyRiemannEq f c.
614655Proof .
615656move=> /cvg_ex; rewrite //= /CauchyRiemannEq. rewrite -Rdiff1 -Rdiffi.
616- set quotC : C^o -> C^o := fun h : R[i] => h^-1 *: (f (c + h) - f c).
617- set quotR : C^o -> C^o := fun h => h^-1 *: (f (c + h * 'i) - f c) .
657+ set quotC : C -> C := fun h : R[i] => h^-1 *: (f (c + h) - f c).
658+ set quotR : C -> C:= fun h => h^-1 *: (f (c + h * 'i) - f c) .
618659move => /= [l H].
619660have -> : quotR @ (realC @ nbhs' 0) = (quotR \o realC) @ nbhs' 0 by [].
620661have realC'0: realC @ nbhs' 0 --> nbhs' 0.
621- by apply: within_continuous_withinNx; first by apply: continuous_realC.
622- (* by move => /= x /complexI. *)
662+ apply: within_continuous_withinNx; first by apply: continuous_realC.
663+ by move => /= x /complexI.
623664have HR0:(quotC \o (realC) @ nbhs' 0) --> l.
624665 by apply: cvg_comp; last by exact: H.
625666have lem : quotC \o *%R^~ 'i%R @ (realC @ (nbhs' (0 : R^o))) --> l.
626667 apply: cvg_comp; last by exact: H.
627668 rewrite (filter_compE _ realC); apply: cvg_comp; first by exact: realC'0.
628669 apply: within_continuous_withinNx; first by apply: scalel_continuous.
629- by rewrite mul0r.
670+ move => x /eqP; rewrite mulIr_eq0 ; last by apply/rregP; apply: neq0Ci.
671+ by move/eqP.
630672have HRcomp: cvg (quotC \o *%R^~ 'i%R @ (realC @ (nbhs' (0 : R^o)))) .
631673 by apply/cvg_ex; simpl; exists l.
632674have ->: lim (quotR @ (realC @ (nbhs' (0 : R^o))))
@@ -640,7 +682,7 @@ suff: lim (quotC @ (realC @ (nbhs' (0 : R^o))))
640682 = lim (quotC \o *%R^~ 'i%R @ (realC @ (nbhs' (0 : R^o)))) by move => -> .
641683suff -> : lim (quotC @ (realC @ (nbhs' (0 : R^o)))) = l.
642684 by apply/eqP; rewrite eq_sym; apply/eqP; apply: (cvg_map_lim _ lem).
643- by apply: (@ cvg_map_lim [topologicalType of C^o]).
685+ by apply: cvg_map_lim.
644686Qed .
645687
646688
@@ -682,27 +724,36 @@ Qed.
682724
683725
684726
685- Lemma Diff_CR_holo (f : C^o -> C^o) (c: C):
727+ Lemma Diff_CR_holo (f : C -> C) (c: C):
728+ (Rdifferentiable f c) /\
729+ (CauchyRiemannEq f c)
730+ -> (holomorphic f c).
731+ Proof .
732+ move => [] /= /[dup] H /diff_locallyP => [[derc /eqaddoP diff]] CR.
733+ apply/holomorphicP/derivable1_diffP/diff_locallyP.
734+ pose Df := (fun h : C => h *: ('D_1 f%:Rfun c : C)).
735+ have lDf : linear Df. move => t u v /=; rewrite /Df. admit.
736+ pose df := Linear lDf.
737+ have cdf : continuous df by apply: scalel_continuous.
738+ have lem : Df = 'd (f%:Rfun) (c : Rc).
739+ apply: funext => h; rewrite /Df /= deriveE. admit. admit.
740+ have holo: f \o shift c = cst (f c) + df +o_ ( 0 : C) id.
741+ apply/eqaddoP => eps /[dup] /gt0_realC epsr /realC_gt0 eps0; near=> x.
742+ rewrite epsr realCM lecR /=. admit.
743+ have -> : 'd f c = df:> ( _ -> _) by apply: diff_unique.
744+ by split.
745+ Grab Existential Variables.
746+ (*by end_near. Qed . *)
747+ Admitted .
748+
749+ Lemma Diff_CR_holo' (f : C -> C) (c: C):
686750 (Rdifferentiable f c) /\
687751 (CauchyRiemannEq f c)
688752 -> (holomorphic f c).
689753Proof .
690- (* move => [] /= /[dup] H /diff_locallyP (*/eqaddoP*) => [[derc /eqaddoP diff]] CR. *)
691- (* TODO : diff_locally to be renamed diff_nbhs *)
692- (* apply/holomorphicP/derivable1_diffP/diff_locallyP;split. *)
693- (* pose Df : C^o -> C^o := (fun h => h *: ('D_1 f%:Rfun c : C^o)). *)
694- (* have lDf : linear Df. admit. *)
695- (* pose df := Linear lDf. *)
696- (* have cdf : continuous df. admit. *)
697- (* have holo: f \o shift c = cst (f c) + df +o_ (0 : [normedModType C of C^o]) id. *)
698- (* apply/eqaddoP => eps /[dup] /gt0_realC epsr /realC_gt0 eps0; near=> x. *)
699- (* rewrite epsr realCM lecR /=. *)
700- (* Fail Check ('d f%:Rfun (c : [normedModType R of (Rcomplex R)])). *)
701-
702-
703754move => [] /= /[dup] H /diff_locally /eqaddoP => der CR.
704- rewrite /holomorphic; apply: (cvgP (('D_1 f%:Rfun c) : C^o )).
705- apply/(cvg_distP (('D_1 f%:Rfun c) : C^o )).
755+ rewrite /holomorphic; apply: (cvgP (('D_1 f%:Rfun c) : C)).
756+ apply/(cvg_distP (('D_1 f%:Rfun c) : C)).
706757move => eps eps_lt0 /=.
707758pose er := Re eps.
708759have eq_ereps := gt0_realC eps_lt0.
@@ -730,19 +781,19 @@ rewrite -CR (scalecAl y) (* why scalec *) -scalecM !scalecr.
730781rewrite -(scalerDl (('D_1 f%:Rfun c%:Rc): C^o) x%:C). (*clean, do it in Rcomplex *)
731782rewrite addrAC -!scalecr -realC_alg -zeq. (*clean*)
732783rewrite addrC [X in (-_ + X)]addrC [X in f X]addrC -[X in `|_ + X|]opprK -opprD.
733- rewrite normrN scalecM -lecR => H.
734- rewrite /normr /=; apply: le_lt_trans; first by exact H.
784+ rewrite normrN scalecM -lecR => H' .
785+ rewrite /normr /=; apply: le_lt_trans; first by exact H' .
735786rewrite eq_ereps realCM ltcR /normr /= ltr_pmul2l ?normc_gt0 //.
736787rewrite /er -[X in (_ < X)]mulr1 ltr_pmul2l //= ?invf_lt1 ?ltr1n //.
737788rewrite -ltc0E -eq_ereps //.
738789Qed .
739790
740791
741792
742- Lemma holomorphic_Rdiff (f : C^o -> C^o ) (c : C) :
793+ Lemma holomorphic_Rdiff (f : C -> C) (c : C) :
743794 (Rdifferentiable f c) /\ (CauchyRiemannEq f c) <-> (holomorphic f c).
744795Proof .
745- split => H; first by apply: Diff_CR_holo.
796+ split => H; first by apply: Diff_CR_holo' .
746797 split; first by apply: holo_differentiable.
747798 by apply: holo_CauchyRiemann.
748799Qed .
0 commit comments