Module mathcomp.analysis_stdlib.Rstruct_topology
From Stdlib Require Import Rdefinitions Raxioms RIneq Rbasic_fun Zwf.
From Stdlib Require Import Epsilon FunctionalExtensionality Ranalysis1 Rsqrt_def.
From Stdlib Require Import Rtrigo1 Reals.
From HB Require Import structures.
From mathcomp Require Import boot order ssralg ssrnum archimedean.
From mathcomp Require Import boolp classical_sets reals interval_inference.
From mathcomp Require Export Rstruct.
From mathcomp Require Import topology.
From mathcomp Require normedtype sequences.
From mathcomp Require exp.
Unset SsrOldRewriteGoalsOrder.
Set Implicit Arguments.
Unset Strict Implicit.
Unset Printing Implicit Defensive.
Import Order.TTheory GRing.Theory Num.Theory.
Local Open Scope R_scope.
Local Open Scope ring_scope.
Section analysis_struct.
.
Source code
Source code
Source code
.
Source code
Source code
Source code
Lemma
Source code
continuity_pt f x <->
forall
Source code
Proof.
have [_/posnumP[d] xd_fxe] := fcont e.
exists d%:num; split; first by apply/RltP; have := [gt0 of d%:num].
by move=> y [_ /RltP yxd]; apply/RltP/xd_fxe; rewrite /= distrC.
have /RltP egt0 := [gt0 of e%:num].
have [_ [/RltP/posnumP[d] dx_fxe]] := fcont e%:num egt0.
exists d%:num => //= y xyd; case: (eqVneq x y) => [->|xney].
by rewrite subrr normr0.
apply/RltP/dx_fxe; split; first by split=> //; apply/eqP.
by have /RltP := xyd; rewrite distrC.
Qed.
Lemma
Source code
continuity_pt f x <-> {for x, continuous f}.
Proof.
apply iff_sym.
have FF : Filter (f @ x)%classic.
by typeclasses eauto.
(*by apply fmap_filter; apply: @filter_filter' (locally_filter _).*)
case: (@fcvg_ballP _ _ (f @ x)%classic FF (f x)) => {FF}H1 H2.
(* TODO: in need for lemmas and/or refactoring of already existing lemmas (ball vs. Rabs) *)
split => [{H2} - /H1 {}H1 eps|{H1} H].
- have {H1} [//|_/posnumP[x0] Hx0] := H1 eps%:num.
exists x0%:num => //= Hx0' /Hx0 /=.
by rewrite /= distrC; apply.
- apply H2 => _ /posnumP[eps]; move: (H eps) => {H} [_ /posnumP[x0] Hx0].
exists x0%:num => //= y /Hx0 /= {}Hx0.
by rewrite /ball /= distrC.
Qed.
Lemma
Source code
continuity_pt f x <-> {for x, continuous f}.
Proof.
Local Open Scope classical_set_scope.
Lemma
Source code
continuity_pt f x <-> f @ x^' --> f x.
Proof.
Lemma
Source code
continuity_pt f x <->
forall
Source code
Proof.
Lemma
Source code
nbhs (f x) P -> continuity_pt f x -> \near , P (f x).
Proof.
End analysis_struct.
Module
Source code
Import normedtype sequences.
Lemma
Source code
Proof.
rewrite /Pser /infinite_sum /= => exp_ub.
rewrite /expR /exp_coeff /series/=; apply: (@cvg_lim R^o) => //.
rewrite -cvg_shiftS /=; apply/cvgrPdist_lt => /= e /RltP /exp_ub[N Nexp_ub].
near=> n.
have nN : (n >= N)%coq_nat by apply/ssrnat.leP; near: n; exact: nbhs_infty_ge.
move: Nexp_ub => /(_ _ nN) /[!RdistE] /RltP /=.
rewrite distrC sum_f_R0E; congr (`| _ - _ | < e).
by apply: eq_bigr=> k _; rewrite RinvE RpowE mulrC factE INRE.
Unshelve. all: by end_near. Qed.
End RexpE.
Definition
RexpE : forall x : R, exp x = expR x RexpE is not universe polymorphic Arguments RexpE x%_R_scope RexpE is transparent Expands to: Constant mathcomp.analysis_stdlib.Rstruct_topology.RexpE Declared in library mathcomp.analysis_stdlib.Rstruct_topology, line 112, characters 11-16
Source code
Lemma
Source code
Proof.
Definition
RealsE : (forall x y : R, (x + y)%R = (x + y)%R) * (forall x y : R, (x - y)%R = (x - y)%R) * (forall x y : R, (x * y)%R = (x * y)%R) * (forall x : R, (- x)%R = (- x)%R) * (forall x : R, (/ x)%R = x^-1%R) * (forall x y : R, (x / y)%R = (x / y)%R) * (forall n : nat, INR n = n%:R%R) * (0%R = 0%R) * (1%R = 1%R) * (forall p : positive, Pos.to_nat p = nat_of_pos p) * (forall p : positive, IZR (Z.pos p) = INR (nat_of_pos p)) * (forall x : R, sqrt x = Num.ExtraDef.sqrtr x) * (forall (x : R) (n : nat), (x ^ n)%R = (x ^+ n)%R) * (forall x y : R, Rmax x y = Num.max x y) * (forall x y : R, Rmin x y = Num.min x y) * (forall x : R, Rabs x = `|x|%R) * (forall x y : R, Rdist x y = `|x - y|%R) * (forall (f : nat -> R) (n : nat), sum_f_R0 f n = (\sum_(0 <= k < n.+1) f k)%R) * (forall n : nat, Factorial.fact n = n`!) RealsE is not universe polymorphic RealsE is transparent Expands to: Constant mathcomp.reals_stdlib.Rstruct.RealsE Declared in library mathcomp.reals_stdlib.Rstruct, line 554, characters 11-17
Source code