Module mathcomp.classical.filter

From HB Require Import structures.
From mathcomp Require Import boot order algebra finmap.
From mathcomp Require Import boolp classical_sets functions wochoice
  cardinality fsbigop set_interval.

# Filters The theory of (powerset) filters and tools for manipulating them. This file introduces convergence for filters. It also provides the interface of filtered types for associating a "canonical filter" to each element. And lastly it provides typeclass instances for verifying when a (set_system T) is really a filter in T, as a Filter or Properfilter. ## Structure of filter ``` filteredType U == interface type for types whose elements represent sets of sets on U These sets are intended to be filters on U but this is not enforced yet. The HB class is called Filtered. It extends Pointed. nbhs p == set of sets associated to p (in a filtered type) pfilteredType U == a pointed and filtered type hasNbhs == factory for filteredType nbhsType == type of a structure that has a set system of neighborhoods associated to each point pnbhsType == same has nbhsType for pointed types continuous f == f is continuous w.r.t the topology isSubNbhs V S U == interface that states the continuity of val for U which has a subChoiceType and a nbhsType subNbhsType V S == structure that extends a subChoiceType/nbhsType with the isSubNbhs interface The HB class is SubNbhs. filterI_iter F n == nth stage of recursively building the filter of finite intersections of F open_finI_from D f == set of \bigcap_(i in E) f i where E is a a finite subset of D ``` We endow several standard types with the structure of filter, e.g.: - products `(X1 * X2)%type` - matrices `'M[X]_(m, n)` - natural numbers `nat` ## Theory of filters ``` filter_from D B == set of the supersets of the elements of the family of sets B whose indices are in the domain D This is a filter if (B_i)_(i in D) forms a filter base. filter_prod F G == product of the filters F and G F `=>` G <-> G is included in F F and G are sets of sets. \oo == "eventually" filter on nat: set of predicates on natural numbers that are eventually true F --> G <-> the canonical filter associated to G is included in the canonical filter associated to F lim F == limit of the canonical filter associated with F if there is such a limit, i.e., an element l such that the canonical filter associated to l is a subset of F [lim F in T] == limit of the canonical filter associated to F in T where T has type filteredType U [cvg F in T] <-> the canonical filter associated to F converges in T cvg F <-> same as [cvg F in T] where T is inferred from the type of the canonical filter associated to F Filter F == type class proving that the set of sets F is a filter ProperFilter F == type class proving that the set of sets F is a proper filter UltraFilter F == type class proving that the set of sets F is an ultrafilter filter_on T == interface type for sets of sets on T that are filters FilterType F FF == packs the set of sets F with the proof FF of Filter F to build a filter_on T structure pfilter_on T == interface type for sets of sets on T that are proper filters PFilterPack F FF == packs the set of sets F with the proof FF of ProperFilter F to build a pfilter_on T structure fmap f F == image of the filter F by the function f E @[x --> F] == image of the canonical filter associated to F by the function (fun x => E) f @ F == image of the canonical filter associated to F by the function f fmapi f F == image of the filter F by the relation f E `@[x --> F] == image of the canonical filter associated to F by the relation (fun x => E) f `@ F == image of the canonical filter associated to F by the relation f globally A == filter of the sets containing A @frechet_filter T := [set S : set T | finite_set (~` S)] a.k.a. cofinite filter within D F == restriction of the filter F to the domain D principal_filter x == filter containing every superset of x principal_filter_type == alias for choice types with principal filters subset_filter F D == similar to within D F, but with dependent types powerset_filter_from F == the filter of downward closed subsets of F. Enables use of near notation to pick suitably small members of F in_filter F == interface type for the sets that belong to the set of sets F InFilter FP == packs a set P with a proof of F P to build a in_filter F structure ``` ## Near notations and tactics The purpose of the near notations and tactics is to make the manipulation of filters easier. Instead of proving $F\; G$, one can prove $G\; x$ for $x$ "near F", i.e., for x such that H x for H arbitrarily precise as long as $F\; H$. The near tactics allow for a delayed introduction of $H$: $H$ is introduced as an existential variable and progressively instantiated during the proof process. ### Notations ``` {near F, P} == the property P holds near the canonical filter associated to F P must have the form forall x, Q x. Equivalent to F Q. Prefer this notation when P is an existing statement to be relativised (i.e., has its own definition). \forall x \near F, P x <-> F (fun x => P x). Prefer this notation when the statement forall x, P x does not stand alone. {near F & G, P} == same as {near H, P}, where H is the product of the filters F and G \forall x \near F & y \near G, P x y := {near F & G, forall x y, P x y} \forall x & y \near F, P x y == same as before, with G = F x \is_near F == x belongs to a set P : in_filter F ``` ### Tactics - `near=> x` introduces x. On the goal `\forall x \near F, G x`, introduces the variable `x` and an "existential", and an unaccessible hypothesis `?H x` and asks the user to prove `(G x)` in this context. Under the hood, it delays the proof of `F ?H` and waits for `near: x`. Also exists under the form `near=> x y`. - `near: x` discharges x. On the goal `H_i x`, and where `x \is_near F`, it asks the user to prove that `\forall x \near F, H_i x`, provided that `H_i x` does not depend on variables introduced after `x`. Under the hood, it refines by intersection the existential variable `?H` attached to `x`, computes the intersection with `F`, and asks the user to prove `F H_i`, right now. - `end_near` should be used to close remaining existentials trivially. - `near F => x` poses a variable near `F`, where `F` is a proper filter. It adds to the context a variable `x` that `\is_near F`, i.e., one may assume `H x` for any `H` in `F`. This new variable `x` can be dealt with using `near: x`, as for variables introduced by `near=>`. - `near do tac` does `near=> x; tac; near: x` where `x` is a fresh variable

Unset SsrOldRewriteGoalsOrder.  
Set Implicit Arguments.
Unset Strict Implicit.
Unset Printing Implicit Defensive.

#[global,export] Obligation Tactic := idtac.

Import Order.TTheory GRing.Theory Num.Theory.

Local Open Scope classical_set_scope.
Local Open Scope ring_scope.

Reserved Notation "{ 'near' x , P }" (at level 0, format "{ 'near' x , P }").
Reserved Notation "'\forall' x '\near' x_0 , P"
  (at level 200, x name, P at level 200,
   format "'\forall' x '\near' x_0 , P").
Reserved Notation "{ 'near' x & y , P }"
  (at level 0, format "{ 'near' x & y , P }").
Reserved Notation "'\forall' x '\near' x_0 & y '\near' y_0 , P"
  (at level 200, x name, y name, P at level 200,
   format "'\forall' x '\near' x_0 & y '\near' y_0 , P").
Reserved Notation "'\forall' x & y '\near' z , P"
  (at level 200, x name, y name, P at level 200,
   format "'\forall' x & y '\near' z , P").
Reserved Notation "F `=>` G" (at level 70, format "F `=>` G").
Reserved Notation "F --> G" (at level 70, format "F --> G").
Reserved Notation "[ 'lim' F 'in' T ]" (format "[ 'lim' F 'in' T ]").
Reserved Notation "[ 'cvg' F 'in' T ]" (format "[ 'cvg' F 'in' T ]").
Reserved Notation "x \is_near F" (at level 10, format "x \is_near F").
Reserved Notation "E @[ x --> F ]"
  (at level 60, x name, format "E @[ x --> F ]").
Reserved Notation "E @[ x \oo ]"
  (at level 60, x name, format "E @[ x \oo ]").
Reserved Notation "f @ F" (at level 60, format "f @ F").
Reserved Notation "E `@[ x --> F ]"
  (at level 60, x name, format "E `@[ x --> F ]").
Reserved Notation "f `@ F" (at level 60, format "f `@ F").

HBSource code.mixinSource code RecordSource code isFilteredSource code USource code TSource code :=Source code {Source code
  nbhsSource code :Source code TSource code -> set_system U
}.

#[shortSource code(type=Source code"filteredType"Source code)]Source code
HBSource code.structureSource code DefinitionSource code FilteredSource code (USource code :Source code TypeSource code) :=Source code {TSource code of Choice T & isFiltered U T}.
Arguments nbhs {_ _} _ _ : simpl never.

#[shortSource code(type=Source code"pfilteredType"Source code)]Source code
HBSource code.structureSource code DefinitionSource code PointedFilteredSource code (USource code :Source code TypeSource code) :=Source code {TSource code of Pointed T & isFiltered U T}.

HBSource code.instanceSource code DefinitionSource code _Source code TSource code :=Source code EqualitySource code.on (set_system T).
HBSource code.instanceSource code DefinitionSource code _Source code TSource code :=Source code ChoiceSource code.on (set_system T).
HBSource code.instanceSource code DefinitionSource code _Source code TSource code :=Source code PointedSource code.on (set_system T).
HBSource code.instanceSource code DefinitionSource code _Source code TSource code :=Source code isFilteredSource code.Build T (set_system T) id.

HBSource code.mixinSource code RecordSource code selfFilteredSource code TSource code :=Source code {}Source code.

HBSource code.factorySource code RecordSource code hasNbhsSource code TSource code :=Source code {Source code nbhsSource code :Source code TSource code -> set_system T }.
HBSource code.buildersSource code ContextSource code TSource code &Source code hasNbhsSource code T.
  HBSource code.instanceSource code DefinitionSource code _Source code :=Source code isFilteredSource code.Build T T nbhs.
  HBSource code.instanceSource code DefinitionSource code _Source code :=Source code selfFilteredSource code.Build T.
HBSource code.endSource code.

#[shortUsed by
  • mathcomp.analysis.topology_theory.pseudometric_structure
  • mathcomp.analysis.topology_theory.order_topology
  • mathcomp.analysis.topology_theory.uniform_structure
  • mathcomp.analysis.topology_theory.topology_structure
  • mathcomp.analysis.topology_theory.discrete_topology
  • mathcomp.analysis.normedtype_theory.pseudometric_normed_Zmodule
  • mathcomp.analysis.normedtype_theory.tvs

Source code
(type=Used by
  • mathcomp.analysis.topology_theory.pseudometric_structure
  • mathcomp.analysis.topology_theory.order_topology
  • mathcomp.analysis.topology_theory.uniform_structure
  • mathcomp.analysis.topology_theory.topology_structure
  • mathcomp.analysis.topology_theory.discrete_topology
  • mathcomp.analysis.normedtype_theory.pseudometric_normed_Zmodule
  • mathcomp.analysis.normedtype_theory.tvs

Source code
"nbhsType"Used by
  • mathcomp.analysis.topology_theory.pseudometric_structure
  • mathcomp.analysis.topology_theory.order_topology
  • mathcomp.analysis.topology_theory.uniform_structure
  • mathcomp.analysis.topology_theory.topology_structure
  • mathcomp.analysis.topology_theory.discrete_topology
  • mathcomp.analysis.normedtype_theory.pseudometric_normed_Zmodule
  • mathcomp.analysis.normedtype_theory.tvs

Source code
)]Used by
  • mathcomp.analysis.topology_theory.pseudometric_structure
  • mathcomp.analysis.topology_theory.order_topology
  • mathcomp.analysis.topology_theory.uniform_structure
  • mathcomp.analysis.topology_theory.topology_structure
  • mathcomp.analysis.topology_theory.discrete_topology
  • mathcomp.analysis.normedtype_theory.pseudometric_normed_Zmodule
  • mathcomp.analysis.normedtype_theory.tvs

Source code

HBUsed by
  • mathcomp.analysis.topology_theory.pseudometric_structure
  • mathcomp.analysis.topology_theory.order_topology
  • mathcomp.analysis.topology_theory.uniform_structure
  • mathcomp.analysis.topology_theory.topology_structure
  • mathcomp.analysis.topology_theory.discrete_topology
  • mathcomp.analysis.normedtype_theory.pseudometric_normed_Zmodule
  • mathcomp.analysis.normedtype_theory.tvs

Source code
.structureUsed by
  • mathcomp.analysis.topology_theory.pseudometric_structure
  • mathcomp.analysis.topology_theory.order_topology
  • mathcomp.analysis.topology_theory.uniform_structure
  • mathcomp.analysis.topology_theory.topology_structure
  • mathcomp.analysis.topology_theory.discrete_topology
  • mathcomp.analysis.normedtype_theory.pseudometric_normed_Zmodule
  • mathcomp.analysis.normedtype_theory.tvs

Source code
DefinitionUsed by
  • mathcomp.analysis.topology_theory.pseudometric_structure
  • mathcomp.analysis.topology_theory.order_topology
  • mathcomp.analysis.topology_theory.uniform_structure
  • mathcomp.analysis.topology_theory.topology_structure
  • mathcomp.analysis.topology_theory.discrete_topology
  • mathcomp.analysis.normedtype_theory.pseudometric_normed_Zmodule
  • mathcomp.analysis.normedtype_theory.tvs

Source code
NbhsUsed by
  • mathcomp.analysis.topology_theory.pseudometric_structure
  • mathcomp.analysis.topology_theory.order_topology
  • mathcomp.analysis.topology_theory.uniform_structure
  • mathcomp.analysis.topology_theory.topology_structure
  • mathcomp.analysis.topology_theory.discrete_topology
  • mathcomp.analysis.normedtype_theory.pseudometric_normed_Zmodule
  • mathcomp.analysis.normedtype_theory.tvs

Source code
:=Used by
  • mathcomp.analysis.topology_theory.pseudometric_structure
  • mathcomp.analysis.topology_theory.order_topology
  • mathcomp.analysis.topology_theory.uniform_structure
  • mathcomp.analysis.topology_theory.topology_structure
  • mathcomp.analysis.topology_theory.discrete_topology
  • mathcomp.analysis.normedtype_theory.pseudometric_normed_Zmodule
  • mathcomp.analysis.normedtype_theory.tvs

Source code
{TUsed by
  • mathcomp.analysis.topology_theory.pseudometric_structure
  • mathcomp.analysis.topology_theory.order_topology
  • mathcomp.analysis.topology_theory.uniform_structure
  • mathcomp.analysis.topology_theory.topology_structure
  • mathcomp.analysis.topology_theory.discrete_topology
  • mathcomp.analysis.normedtype_theory.pseudometric_normed_Zmodule
  • mathcomp.analysis.normedtype_theory.tvs

Source code
of Choice T & hasNbhs T}.

#[shortUsed by
  • mathcomp.analysis.topology_theory.topology_structure

Source code
(type=Used by
  • mathcomp.analysis.topology_theory.topology_structure

Source code
"pnbhsType"Used by
  • mathcomp.analysis.topology_theory.topology_structure

Source code
)]Used by
  • mathcomp.analysis.topology_theory.topology_structure

Source code

HBUsed by
  • mathcomp.analysis.topology_theory.topology_structure

Source code
.structureUsed by
  • mathcomp.analysis.topology_theory.topology_structure

Source code
DefinitionUsed by
  • mathcomp.analysis.topology_theory.topology_structure

Source code
PointedNbhsUsed by
  • mathcomp.analysis.topology_theory.topology_structure

Source code
:=Used by
  • mathcomp.analysis.topology_theory.topology_structure

Source code
{TUsed by
  • mathcomp.analysis.topology_theory.topology_structure

Source code
of Pointed T & hasNbhs T}.

Definition filter_from
Used by
  • mathcomp.analysis.cantor
  • mathcomp.analysis.topology_theory.pseudometric_structure
  • mathcomp.analysis.topology_theory.order_topology
  • mathcomp.analysis.topology_theory.metric_structure
  • mathcomp.analysis.topology_theory.uniform_structure
  • mathcomp.analysis.topology_theory.topology_structure
  • mathcomp.analysis.topology_theory.supremum_topology
  • mathcomp.analysis.topology_theory.nat_topology
  • mathcomp.analysis.topology_theory.function_spaces
  • mathcomp.analysis.topology_theory.separation_axioms
  • mathcomp.analysis.topology_theory.initial_topology
  • mathcomp.analysis.topology_theory.matrix_topology
  • mathcomp.analysis.topology_theory.one_point_compactification
  • mathcomp.analysis.topology_theory.num_topology
  • mathcomp.analysis.topology_theory.subspace_topology
  • mathcomp.analysis.topology_theory.compact
  • mathcomp.analysis.topology_theory.bool_topology
  • mathcomp.analysis.showcase.summability
  • mathcomp.analysis.normedtype_theory.pseudometric_normed_Zmodule
  • mathcomp.analysis.normedtype_theory.tvs
  • mathcomp.analysis.normedtype_theory.ereal_normedtype

Source code
{ISource code TSource code : Type} (DSource code : set I) (BSource code : I -> set T) :
  set_system T := [set PSource code | exists2 iSource code, D i & B i `<=` P].

HBSource code.instanceSource code DefinitionSource code _Source code mSource code nSource code XSource code (ZSource code :Source code filteredTypeSource code X) :=
  isFiltered.Build 'M[X]_(m, n) 'M[Z]_(m, n) (fun mxSource code => filter_from
    [set PSource code | forall iSource code jSource code, nbhs (mx i j) (P i j)]
    (fun PSource code => [set mySource code : 'M[X]_(m, n) | forall iSource code jSource code, P i j (my i j)])).

HBSource code.instanceSource code DefinitionSource code _Source code mSource code nSource code (XSource code :Source code nbhsTypeSource code) := selfFiltered.Build 'M[X]_(m, n).

Definition filter_prod
Used by
  • mathcomp.analysis.topology_theory.product_topology
  • mathcomp.analysis.sequences
  • mathcomp.analysis_stdlib.showcase.uniform_bigO

Source code
{TSource code USource code : Type}
  (FSource code : set_system T) (GSource code : set_system U) : set_system (T * U) :=
  filter_from (fun PSource code => F P.1 /\ G P.2) (fun PSource code => P.1 `*` P.2).

Section Near.

Local Notation "{ 'all1' P }"Source code := (forall xSource code, P x : Prop) (at level 0).
Local Notation "{ 'all2' P }"Source code := (forall xSource code ySource code, P x y : Prop) (at level 0).
Local Notation "{ 'all3' P }"Source code := (forall xSource code ySource code zSource code, P x y z: Prop) (at level 0).
Local Notation phSource code := (phantom _).

Definition prop_near1
Used by
  • mathcomp.analysis.topology_theory.topology_structure
  • mathcomp.analysis.topology_theory.num_topology
  • mathcomp.analysis.landau
  • mathcomp.analysis.normedtype_theory.num_normedtype
  • mathcomp.analysis.normedtype_theory.normed_module

Source code
{XSource code} {fXSource code : filteredType X} (xSource code : fX)
   PSource code (phPSource code : ph {all1 P}) := nbhs x P.

Definition prop_near2
Used by
  • mathcomp.analysis.landau

Source code
{XSource code X'Source code} {fXSource code : filteredType X} {fX'Source code : filteredType X'}
  (xSource code : fX) (x'Source code : fX') := fun PSource code & ph {all2 P} =>
  filter_prod (nbhs x) (nbhs x') (fun xSource code => P x.1 x.2).

End Near.

Notation "{ 'near' x , P }"Source code := (@prop_near1 _ _ x _ (inPhantom P)) : type_scope.
Notation "'\forall' x '\near' x_0 , P"Source code := {near x_0, forall xSource code, P} : type_scope.
Notation "{ 'near' x & y , P }"Source code :=
  (@prop_near2 _ _ _ _ x y _ (inPhantom P)) : type_scope.
Notation "'\forall' x '\near' x_0 & y '\near' y_0 , P"Source code :=
  {near x_0 & y_0, forall xSource code ySource code, P} : type_scope.
Notation "'\forall' x & y '\near' z , P"Source code :=
  {near z & z, forall xSource code ySource code, P} : type_scope.
Arguments prop_near1 : simpl never.
Arguments prop_near2 : simpl never.

Lemma nearEUsed by
  • mathcomp.analysis.topology_theory.num_topology
  • mathcomp.analysis.derive
  • mathcomp.analysis.sequences
  • mathcomp.analysis.normedtype_theory.pseudometric_normed_Zmodule
  • mathcomp.analysis.normedtype_theory.tvs
  • mathcomp.analysis.normedtype_theory.num_normedtype

Source code
{TSource code} {FSource code : set_system T} (PSource code : set T) :
  (\forall xSource code \near F, P x) = F P.
Proof.
by []. Qed.

Lemma eq_nearUsed by
  • mathcomp.analysis.ess_sup_inf
  • mathcomp.analysis.realfun
  • mathcomp.analysis.topology_theory.metric_structure
  • mathcomp.analysis.normedtype_theory.pseudometric_normed_Zmodule
  • mathcomp.analysis.normedtype_theory.normed_module

Source code
{TSource code} {FSource code : set_system T} (PSource code QSource code : set T) :
  (forall xSource code, P x <-> Q x) ->
  (\forall xSource code \near F, P x) = (\forall xSource code \near F, Q x).
Proof.
by move=> /predeqP ->. Qed.

Lemma nbhs_filterEUsed by
  • mathcomp.analysis.topology_theory.topology_structure
  • mathcomp.analysis.topology_theory.supremum_topology
  • mathcomp.analysis.topology_theory.initial_topology
  • mathcomp.analysis.topology_theory.compact

Source code
{TSource code : Type} (FSource code : set_system T) : nbhs F = F.
Proof.
by []. Qed.

Module Export NbhsFilterSource code.
Definition nbhs_simpl

filter_from : forall {I T : Type}, set I -> (I -> set T) -> set_system T filter_from is not universe polymorphic Arguments filter_from {I T}%_type_scope D%_classical_set_scope B%_function_scope _ filter_from is transparent Expands to: Constant mathcomp.classical.filter.filter_from Declared in library mathcomp.classical.filter, line 250, characters 11-22


Source code
:= (@nbhs_filterE).
End NbhsFilter.

Definition cvg_to

filter_prod : forall {T U : Type}, set_system T -> set_system U -> set_system (T * U) filter_prod is not universe polymorphic Arguments filter_prod {T U}%_type_scope F G _ filter_prod is transparent Expands to: Constant mathcomp.classical.filter.filter_prod Declared in library mathcomp.classical.filter, line 262, characters 11-22


Used by
  • mathcomp.analysis.topology_theory.uniform_structure
  • mathcomp.analysis.topology_theory.topology_structure
  • mathcomp.analysis.topology_theory.function_spaces

Source code
{TSource code : Type} (FSource code GSource code : set_system T) := G `<=` F.
Notation "F `=>` G"Source code := (cvg_to F G) : classical_set_scope.

Lemma cvg_reflUsed by
  • mathcomp.analysis.sequences
  • mathcomp.analysis.normedtype_theory.pseudometric_normed_Zmodule
  • mathcomp.analysis.normedtype_theory.normed_module

Source code
TSource code (FSource code : set_system T) : F `=>` F
Proof.
exact. Qed.
Arguments cvg_refl {T F}.
#[global] Hint Resolve cvg_refl : core.

Lemma cvg_transUsed by
  • mathcomp.analysis.probability_theory.random_variable
  • mathcomp.analysis.measure_theory.signed_measure
  • mathcomp.analysis.measure_theory.measure_function
  • mathcomp.analysis.realfun
  • mathcomp.analysis.ftc
  • mathcomp.analysis.gauss_integral
  • mathcomp.analysis.elementary_functions.trigonometry_functions
  • mathcomp.analysis.topology_theory.topology_structure
  • mathcomp.analysis.topology_theory.function_spaces
  • mathcomp.analysis.topology_theory.separation_axioms
  • mathcomp.analysis.topology_theory.num_topology
  • mathcomp.analysis.topology_theory.subspace_topology
  • mathcomp.analysis.derive
  • mathcomp.analysis.sequences
  • mathcomp.analysis.lebesgue_integral_theory.lebesgue_integral_under
  • mathcomp.analysis.lebesgue_integral_theory.lebesgue_integral_dominated_convergence
  • mathcomp.analysis.lebesgue_integral_theory.lebesgue_integral_differentiation
  • mathcomp.analysis.normedtype_theory.num_normedtype
  • mathcomp.analysis.normedtype_theory.normed_module
  • mathcomp.analysis.exp

Source code
TSource code (GSource code FSource code HSource code : set_system T) :
  (F `=>` G) -> (G `=>` H) -> (F `=>` H).
Proof.
by move=> FG GH P /GH /FG. Qed.

Notation "F --> G"Source code := (cvg_to (nbhs F) (nbhs G)) : classical_set_scope.
Definition type_of_filter

prop_near1 : forall {X : Type} {fX : filteredType X}, fX -> forall [P : X -> Prop], phantom Prop (forall x : X, P x : Prop) -> Prop prop_near1 is not universe polymorphic Arguments prop_near1 {X}%_type_scope {fX} x [P]%_function_scope phP : simpl never The reduction tactics never unfold prop_near1 prop_near1 is transparent Expands to: Constant mathcomp.classical.filter.prop_near1 Declared in library mathcomp.classical.filter, line 273, characters 11-21


Source code
{TSource code} (FSource code : set_system T) := T.

Definition lim_in

prop_near2 : forall {X X' : Type} {fX : filteredType X} {fX' : filteredType X'}, fX -> fX' -> forall [P : X -> X' -> Prop], phantom Prop (forall (x : X) (y : X'), P x y : Prop) -> Prop prop_near2 is not universe polymorphic Arguments prop_near2 {X X'}%_type_scope {fX fX'} x x' [P]%_function_scope _ : simpl never The reduction tactics never unfold prop_near2 prop_near2 is transparent Expands to: Constant mathcomp.classical.filter.prop_near2 Declared in library mathcomp.classical.filter, line 276, characters 11-21


Source code
{USource code : Type} (TSource code : pfilteredType U) :=
  fun FSource code : set_system U => get (fun lSource code : T => F --> l).
Notation "[ 'lim' F 'in' T ]"Source code := (@lim_in _ T (nbhs F)) : classical_set_scope.
Definition lim

NbhsFilter.nbhs_simpl : forall [T : Type] (F : set_system T), nbhs F = F NbhsFilter.nbhs_simpl is not universe polymorphic Arguments NbhsFilter.nbhs_simpl [T]%_type_scope F NbhsFilter.nbhs_simpl is transparent Expands to: Constant mathcomp.classical.filter.NbhsFilter.nbhs_simpl Declared in library mathcomp.classical.filter, line 306, characters 11-21


Used by
  • mathcomp.analysis.esum
  • mathcomp.analysis.probability_theory.uniform_distribution
  • mathcomp.analysis.real_measure.lebesgue_measure
  • mathcomp.analysis.measure_theory.measure_extension
  • mathcomp.analysis.measure_theory.measure_function
  • mathcomp.analysis.realfun
  • mathcomp.analysis.cantor
  • mathcomp.analysis.kernel
  • mathcomp.analysis.elementary_functions.trigonometry_functions
  • mathcomp.analysis.topology_theory.uniform_structure
  • mathcomp.analysis.topology_theory.function_spaces
  • mathcomp.analysis.topology_theory.separation_axioms
  • mathcomp.analysis.topology_theory.matrix_topology
  • mathcomp.analysis.derive
  • mathcomp.analysis.numfun
  • mathcomp.analysis.showcase.summability
  • mathcomp.analysis.sequences
  • mathcomp.analysis.lebesgue_integral_theory.lebesgue_integral_monotone_convergence
  • mathcomp.analysis.lebesgue_integral_theory.radon_nikodym
  • mathcomp.analysis.normedtype_theory.pseudometric_normed_Zmodule
  • mathcomp.analysis.normedtype_theory.ereal_normedtype
  • mathcomp.analysis.normedtype_theory.normed_module
  • mathcomp.analysis.exp

Source code
{TSource code : pnbhsType} (FSource code : set_system T) := [lim F in T].
Notation "[ 'cvg' F 'in' T ]"Source code := (F --> [lim F in T]) : classical_set_scope.
Notation cvgUsed by
  • mathcomp.analysis.esum
  • mathcomp.analysis.measure_theory.measure_extension
  • mathcomp.analysis.measure_theory.signed_measure
  • mathcomp.analysis.measure_theory.counting_measure
  • mathcomp.analysis.realfun
  • mathcomp.analysis.cantor
  • mathcomp.analysis.ftc
  • mathcomp.analysis.elementary_functions.trigonometry_functions
  • mathcomp.analysis.topology_theory.uniform_structure
  • mathcomp.analysis.topology_theory.topology_structure
  • mathcomp.analysis.topology_theory.function_spaces
  • mathcomp.analysis.topology_theory.separation_axioms
  • mathcomp.analysis.topology_theory.matrix_topology
  • mathcomp.analysis.topology_theory.compact
  • mathcomp.analysis.derive
  • mathcomp.analysis.numfun
  • mathcomp.analysis.sequences
  • mathcomp.analysis.lebesgue_integral_theory.radon_nikodym
  • mathcomp.analysis.lebesgue_integral_theory.lebesgue_integral_differentiation
  • mathcomp.analysis.normedtype_theory.pseudometric_normed_Zmodule
  • mathcomp.analysis.normedtype_theory.complete_normed_module
  • mathcomp.analysis.normedtype_theory.ereal_normedtype
  • mathcomp.analysis.normedtype_theory.normed_module

Source code
F := (F --> lim F).

Definition eventually

cvg_to : forall {T : Type}, set_system T -> set_system T -> Prop cvg_to is not universe polymorphic Arguments cvg_to {T}%_type_scope F G cvg_to is transparent Expands to: Constant mathcomp.classical.filter.cvg_to Declared in library mathcomp.classical.filter, line 309, characters 11-17


Source code
:= filter_from setT (fun NSource code => [set nSource code | (N <= n)%N]).
Notation "'\oo'"Source code := eventually : classical_set_scope.

Section FilteredTheory.

HBSource code.instanceSource code DefinitionSource code _Source code X1Source code X2Source code (Z1Source code :Source code filteredTypeSource code X1) (Z2 : filteredType X2) :=
  isFiltered.Build (X1 * X2)%type (Z1 * Z2)%type
    (fun xSource code => filter_prod (nbhs x.1) (nbhs x.2)).

HBSource code.instanceSource code DefinitionSource code _Source code (X1Source code X2Source code :Source code nbhsTypeSource code)  :=
  selfFiltered.Build (X1 * X2)%type.

Lemma cvg_prodSource code TSource code {USource code U'Source code VSource code V'Source code : filteredType T} (xSource code : U) (lSource code : U') (ySource code : V) (kSource code : V') :
  x --> l -> y --> k -> (x, y) --> (l, k).
Proof.
move=> xl yk X [[X1 X2] /= [HX1 HX2] H]; exists (X1, X2) => //=.
split; [exact: xl | exact: yk].
Qed.

Lemma cvg_in_exSource code {USource code : Type} (TSource code : pfilteredType U) (FSource code : set_system U) :
  [cvg F in T] <-> (exists lSource code : T, F --> l).
Proof.
by split=> [cvg|/getPex//]; exists [lim F in T]. Qed.

Lemma cvg_exUsed by
  • mathcomp.analysis.real_measure.measurable_realfun
  • mathcomp.analysis.measure_theory.measure_extension
  • mathcomp.analysis.measure_theory.signed_measure
  • mathcomp.analysis.measure_theory.measure_function
  • mathcomp.analysis.realfun
  • mathcomp.analysis.cantor
  • mathcomp.analysis.ftc
  • mathcomp.analysis.gauss_integral
  • mathcomp.analysis.topology_theory.topology_structure
  • mathcomp.analysis.topology_theory.function_spaces
  • mathcomp.analysis.topology_theory.matrix_topology
  • mathcomp.analysis.derive
  • mathcomp.analysis.sequences
  • mathcomp.analysis.lebesgue_integral_theory.lebesgue_integral_monotone_convergence
  • mathcomp.analysis.lebesgue_integral_theory.lebesgue_integral_definition
  • mathcomp.analysis.lebesgue_integral_theory.lebesgue_integral_under
  • mathcomp.analysis.lebesgue_integral_theory.lebesgue_integral_dominated_convergence
  • mathcomp.analysis.lebesgue_integral_theory.radon_nikodym
  • mathcomp.analysis.lebesgue_integral_theory.measurable_fun_approximation
  • mathcomp.analysis.normedtype_theory.complete_normed_module
  • mathcomp.analysis.normedtype_theory.normed_module

Source code
 (TSource code : pnbhsType) (FSource code : set_system T) :
  cvg F <-> (exists lSource code : T, F --> l).
Proof.
exact: cvg_in_ex. Qed.

Lemma cvg_inPSource code {USource code : Type} (TSource code : pfilteredType U) (FSource code : set_system U) (lSource code : T) :
  F --> l -> [cvg F in T].
Proof.
by move=> Fl; apply/cvg_in_ex; exists l. Qed.

Lemma cvgPUsed by
  • mathcomp.analysis.ess_sup_inf
  • mathcomp.analysis.realfun
  • mathcomp.analysis.ftc
  • mathcomp.analysis.elementary_functions.trigonometry_functions
  • mathcomp.analysis.topology_theory.topology_structure
  • mathcomp.analysis.topology_theory.separation_axioms
  • mathcomp.analysis.topology_theory.compact
  • mathcomp.analysis.derive
  • mathcomp.analysis.sequences
  • mathcomp.analysis.normedtype_theory.pseudometric_normed_Zmodule
  • mathcomp.analysis.normedtype_theory.normed_module

Source code
 (TSource code : pnbhsType) (FSource code : set_system T) (lSource code : T) : F --> l -> cvg F.
Proof.
exact: cvg_inP. Qed.

Lemma cvg_in_toPSource code {USource code : Type} (TSource code : pfilteredType U) (FSource code : set_system U) (lSource code : T) :
  [cvg F in T] -> [lim F in T] = l -> F --> l.
Proof.
by move=> /[swap]->. Qed.

Lemma cvg_toPUsed by
  • mathcomp.analysis.probability_theory.exponential_distribution
  • mathcomp.analysis.probability_theory.beta_distribution
  • mathcomp.analysis.probability_theory.poisson_distribution
  • mathcomp.analysis.probability_theory.uniform_distribution
  • mathcomp.analysis.probability_theory.binomial_distribution
  • mathcomp.analysis.probability_theory.bernoulli_distribution
  • mathcomp.analysis.ftc
  • mathcomp.analysis.lebesgue_integral_theory.lebesgue_integral_nonneg

Source code
 (TSource code : pnbhsType) (FSource code : set_system T) (lSource code : T) :
  cvg F -> lim F = l -> F --> l.
Proof.
exact: cvg_in_toP. Qed.

Lemma dvg_inPSource code {USource code : Type} (TSource code : pfilteredType U) (FSource code : set_system U) :
  ~ [cvg F in T] -> [lim F in T] = point.
Proof.
by rewrite /lim_in /=; case xgetP. Qed.

Lemma dvgPUsed by
  • mathcomp.analysis.topology_theory.separation_axioms

Source code
 (TSource code : pnbhsType) (FSource code : set_system T) : ~ cvg F -> lim F = point.
Proof.
exact: dvg_inP. Qed.

Lemma cvg_inNpointSource code {USource code} (TSource code : pfilteredType U) (FSource code : set_system U) :
  [lim F in T] != point -> [cvg F in T].
Proof.
by apply: contra_neqP; apply: dvg_inP. Qed.

Lemma cvgNpointUsed by
  • mathcomp.analysis.normedtype_theory.normed_module

Source code
 (TSource code : pnbhsType) (FSource code : set_system T) : lim F != point -> cvg F.
Proof.
exact: cvg_inNpoint. Qed.

End FilteredTheory.
Arguments cvg_inP {U T F} l.
Arguments dvg_inP {U} T {F}.
Arguments cvgP {T F} l.
Arguments dvgP {T F}.

Lemma nbhs_nearEUsed by
  • mathcomp.analysis.topology_theory.pseudometric_structure
  • mathcomp.analysis.topology_theory.uniform_structure
  • mathcomp.analysis.topology_theory.topology_structure
  • mathcomp.analysis.derive

Source code
{USource code} {TSource code : filteredType U} (xSource code : T) (PSource code : set U) :
  nbhs x P = \forall x0Source code \near x, P x0.
Proof.
by []. Qed.

Lemma near_nbhsSource code {USource code} {TSource code : filteredType U} (xSource code : T) (PSource code : set U) :
  (\forall x0Source code \near nbhs x, P x0) = (\forall x0Source code \near x, P x0).
Proof.
by []. Qed.

Lemma near2_currySource code {USource code VSource code} (FSource code : set_system U) (GSource code : set_system V) (PSource code : U -> set V) :
  {near F & G, forall xSource code ySource code, P x y} = {near (F, G), forall xSource code, P x.1 x.2}.
Proof.
by []. Qed.

Lemma near2_pairUsed by
  • mathcomp.analysis.topology_theory.edist
  • mathcomp.analysis.topology_theory.function_spaces
  • mathcomp.analysis.sequences

Source code
{USource code VSource code} (FSource code : set_system U) (GSource code : set_system V) (PSource code : set (U * V)) :
  {near F & G, forall xSource code ySource code, P (x, y)} = {near (F, G), forall xSource code, P x}.
Proof.
by symmetry; congr (nbhs _); rewrite predeqE => -[]. Qed.

Definition near2E

type_of_filter : forall {T : Type}, set_system T -> Type type_of_filter is not universe polymorphic Arguments type_of_filter {T}%_type_scope F type_of_filter is transparent Expands to: Constant mathcomp.classical.filter.type_of_filter Declared in library mathcomp.classical.filter, line 321, characters 11-25


Used by
  • mathcomp.analysis.topology_theory.function_spaces
  • mathcomp.analysis.topology_theory.matrix_topology

Source code
:= (@near2_curry, @near2_pair).

Lemma filter_of_nearISource code (XSource code : Type) (fXSource code : filteredType X)
  (xSource code : fX) : forall PSource code,
  nbhs x P = @prop_near1 X fX x P (inPhantom (forall xSource code, P x)).
Proof.
by []. Qed.

Module Export NearNbhsSource code.
Definition near_simpl

lim_in : forall {U : Type} (T : pfilteredType U), set_system U -> T lim_in is not universe polymorphic Arguments lim_in {U}%_type_scope T F lim_in is transparent Expands to: Constant mathcomp.classical.filter.lim_in Declared in library mathcomp.classical.filter, line 323, characters 11-17


Source code
:= (@near_nbhs, filter_of_nearI).
End NearNbhs.

Lemma near_swapUsed by
  • mathcomp.analysis.numfun
  • mathcomp.analysis.sequences

Source code
{USource code VSource code} (FSource code : set_system U) (GSource code : set_system V) (PSource code : U -> set V) :
  (\forall xSource code \near F & ySource code \near G, P x y) = (\forall ySource code \near G & xSource code \near F, P x y).
Proof.
rewrite propeqE; split => -[[/=A B] [FA FB] ABP];
by exists (B, A) => // -[x y] [/=Bx Ay]; apply: (ABP (y, x)).
Qed.

Filters

Class FilterUsed by
  • mathcomp.analysis.measure_theory.measure_negligible
  • mathcomp.analysis.realfun
  • mathcomp.analysis.ftc
  • mathcomp.analysis.ereal
  • mathcomp.analysis.topology_theory.pseudometric_structure
  • mathcomp.analysis.topology_theory.metric_structure
  • mathcomp.analysis.topology_theory.uniform_structure
  • mathcomp.analysis.topology_theory.topology_structure
  • mathcomp.analysis.topology_theory.product_topology
  • mathcomp.analysis.topology_theory.supremum_topology
  • mathcomp.analysis.topology_theory.nat_topology
  • mathcomp.analysis.topology_theory.discrete_topology
  • mathcomp.analysis.topology_theory.function_spaces
  • mathcomp.analysis.topology_theory.separation_axioms
  • mathcomp.analysis.topology_theory.initial_topology
  • mathcomp.analysis.topology_theory.matrix_topology
  • mathcomp.analysis.topology_theory.num_topology
  • mathcomp.analysis.topology_theory.subspace_topology
  • mathcomp.analysis.topology_theory.compact
  • mathcomp.analysis.landau
  • mathcomp.analysis.normedtype_theory.pseudometric_normed_Zmodule
  • mathcomp.analysis.normedtype_theory.tvs
  • mathcomp.analysis.normedtype_theory.ereal_normedtype
  • mathcomp.analysis.normedtype_theory.urysohn
  • mathcomp.analysis.normedtype_theory.matrix_normedtype
  • mathcomp.analysis.normedtype_theory.num_normedtype
  • mathcomp.analysis.normedtype_theory.normed_module
  • mathcomp.analysis_stdlib.Rstruct_topology

Source code
{TSource code : Type} (FSource code : set_system T) := {
  filterTUsed by
  • mathcomp.analysis.cantor
  • mathcomp.analysis.ereal
  • mathcomp.analysis.topology_theory.uniform_structure
  • mathcomp.analysis.topology_theory.topology_structure
  • mathcomp.analysis.topology_theory.product_topology
  • mathcomp.analysis.topology_theory.supremum_topology
  • mathcomp.analysis.topology_theory.function_spaces
  • mathcomp.analysis.topology_theory.separation_axioms
  • mathcomp.analysis.topology_theory.initial_topology
  • mathcomp.analysis.topology_theory.matrix_topology
  • mathcomp.analysis.topology_theory.subspace_topology
  • mathcomp.analysis.topology_theory.compact
  • mathcomp.analysis.normedtype_theory.tvs
  • mathcomp.analysis.normedtype_theory.urysohn
  • mathcomp.analysis.normedtype_theory.matrix_normedtype

Source code
: F setT ;
  filterIUsed by
  • mathcomp.analysis.cantor
  • mathcomp.analysis.topology_theory.order_topology
  • mathcomp.analysis.topology_theory.uniform_structure
  • mathcomp.analysis.topology_theory.topology_structure
  • mathcomp.analysis.topology_theory.product_topology
  • mathcomp.analysis.topology_theory.function_spaces
  • mathcomp.analysis.topology_theory.separation_axioms
  • mathcomp.analysis.topology_theory.initial_topology
  • mathcomp.analysis.topology_theory.matrix_topology
  • mathcomp.analysis.topology_theory.subspace_topology
  • mathcomp.analysis.topology_theory.compact
  • mathcomp.analysis.homotopy_theory.wedge_sigT
  • mathcomp.analysis.normedtype_theory.tvs
  • mathcomp.analysis.normedtype_theory.urysohn
  • mathcomp.analysis.normedtype_theory.matrix_normedtype

Source code
: setI_closed F ;
  filterSUsed by
  • mathcomp.analysis.ess_sup_inf
  • mathcomp.analysis.real_measure.measurable_realfun
  • mathcomp.analysis.measure_theory.measure_negligible
  • mathcomp.analysis.hoelder
  • mathcomp.analysis.realfun
  • mathcomp.analysis.cantor
  • mathcomp.analysis.ftc
  • mathcomp.analysis.pi_irrational
  • mathcomp.analysis.ereal
  • mathcomp.analysis.topology_theory.order_topology
  • mathcomp.analysis.topology_theory.metric_structure
  • mathcomp.analysis.topology_theory.uniform_structure
  • mathcomp.analysis.topology_theory.topology_structure
  • mathcomp.analysis.topology_theory.edist
  • mathcomp.analysis.topology_theory.product_topology
  • mathcomp.analysis.topology_theory.supremum_topology
  • mathcomp.analysis.topology_theory.nat_topology
  • mathcomp.analysis.topology_theory.discrete_topology
  • mathcomp.analysis.topology_theory.function_spaces
  • mathcomp.analysis.topology_theory.separation_axioms
  • mathcomp.analysis.topology_theory.initial_topology
  • mathcomp.analysis.topology_theory.matrix_topology
  • mathcomp.analysis.topology_theory.one_point_compactification
  • mathcomp.analysis.topology_theory.sigT_topology
  • mathcomp.analysis.topology_theory.num_topology
  • mathcomp.analysis.topology_theory.subspace_topology
  • mathcomp.analysis.topology_theory.compact
  • mathcomp.analysis.homotopy_theory.wedge_sigT
  • mathcomp.analysis.derive
  • mathcomp.analysis.sequences
  • mathcomp.analysis.lebesgue_integral_theory.lebesgue_integral_fubini
  • mathcomp.analysis.normedtype_theory.pseudometric_normed_Zmodule
  • mathcomp.analysis.normedtype_theory.tvs
  • mathcomp.analysis.normedtype_theory.ereal_normedtype
  • mathcomp.analysis.normedtype_theory.urysohn
  • mathcomp.analysis.normedtype_theory.matrix_normedtype
  • mathcomp.analysis.normedtype_theory.num_normedtype
  • mathcomp.analysis.normedtype_theory.normed_module

Source code
: forall PSource code QSource code : set T, P `<=` Q -> F P -> F Q
}.
Global Hint Mode Filter - ! : typeclass_instances.

Class ProperFilterUsed by
  • mathcomp.analysis.measure_theory.measure_negligible
  • mathcomp.analysis.cantor
  • mathcomp.analysis.ereal
  • mathcomp.analysis.topology_theory.pseudometric_structure
  • mathcomp.analysis.topology_theory.uniform_structure
  • mathcomp.analysis.topology_theory.topology_structure
  • mathcomp.analysis.topology_theory.product_topology
  • mathcomp.analysis.topology_theory.discrete_topology
  • mathcomp.analysis.topology_theory.function_spaces
  • mathcomp.analysis.topology_theory.separation_axioms
  • mathcomp.analysis.topology_theory.matrix_topology
  • mathcomp.analysis.topology_theory.one_point_compactification
  • mathcomp.analysis.topology_theory.sigT_topology
  • mathcomp.analysis.topology_theory.num_topology
  • mathcomp.analysis.topology_theory.subspace_topology
  • mathcomp.analysis.topology_theory.compact
  • mathcomp.analysis.showcase.summability
  • mathcomp.analysis.sequences
  • mathcomp.analysis.normedtype_theory.pseudometric_normed_Zmodule
  • mathcomp.analysis.normedtype_theory.tvs
  • mathcomp.analysis.normedtype_theory.complete_normed_module
  • mathcomp.analysis.normedtype_theory.ereal_normedtype
  • mathcomp.analysis.normedtype_theory.matrix_normedtype
  • mathcomp.analysis.normedtype_theory.num_normedtype
  • mathcomp.analysis.normedtype_theory.normed_module

Source code
{TSource code : Type} (FSource code : set_system T) := {
  filter_not_emptySource code : ~ F set0 ;
  filter_filterUsed by
  • mathcomp.analysis.ftc

Source code
: Filter F
}.
Global Existing Instance filter_filter.
Global Hint Mode ProperFilter - ! : typeclass_instances.
Arguments filter_not_empty {T} F {_}.
Hint Extern 0 (~ _ set0) => solve [apply: filter_not_empty] : core.

Lemma filter_setTSource code (TSource code : Type) : Filter [set: set T].
Proof.
by constructor. Qed.

Lemma filterP_strongSource code TSource code (FSource code : set_system T) {FFSource code : Filter F} (PSource code : set T) :
  (exists QSource code : set T, exists FQSource code  : F Q, forall xSource code : T, Q x -> P x) <-> F P.
Proof.
split; last by exists P.
by move=> [Q [FQ QP]]; apply: (filterS QP).
Qed.

Structure filter_onUsed by
  • mathcomp.analysis.derive
  • mathcomp.analysis.landau

Source code
TSource code := FilterType {
  filterSource code :> set_system T;
  _ : Filter filter
}.
Definition filter_class

lim : forall {T : pnbhsType}, set_system T -> T lim is not universe polymorphic Arguments lim {T} F lim is transparent Expands to: Constant mathcomp.classical.filter.lim Declared in library mathcomp.classical.filter, line 326, characters 11-14


Source code
TSource code (FSource code : filter_on T) : Filter F :=
  let: FilterType _ class := F in class.
Arguments FilterType {T} _ _.
#[global] Existing Instance filter_class.
Coercion filter_filter : ProperFilter >-> Filter.

Structure pfilter_onSource code TSource code := PFilterPack {
  pfilterSource code :> (T -> Prop) -> Prop;
  _ : ProperFilter pfilter
}.
Definition pfilter_class

eventually : set_system nat eventually is not universe polymorphic eventually is transparent Expands to: Constant mathcomp.classical.filter.eventually Declared in library mathcomp.classical.filter, line 331, characters 11-21


Source code
TSource code (FSource code : pfilter_on T) : ProperFilter F :=
  let: PFilterPack _ class := F in class.
Arguments PFilterPack {T} _ _.
#[global] Existing Instance pfilter_class.
Canonical pfilter_filter_on

near2E : (forall (U V : Type) (F : set_system U) (G : set_system V) (P : U -> set V), (\forall x \near F & y \near G, P x y) = (\forall x \near (F, G), P x.1 x.2)) * (forall (U V : Type) (F : set_system U) (G : set_system V) (P : set (U * V)), (\forall x \near F & y \near G, P (x, y)) = (\forall x \near (F, G), P x)) near2E is not universe polymorphic near2E is transparent Expands to: Constant mathcomp.classical.filter.near2E Declared in library mathcomp.classical.filter, line 409, characters 11-17


Source code
TSource code (FSource code : pfilter_on T) :=
  FilterType F (pfilter_class F).
Coercion pfilter_filter_on : pfilter_on >-> filter_on.
Definition PFilterType

NearNbhs.near_simpl : (forall (U : Type) (T : filteredType U) (x : T) (P : set U), (\forall x0 \near nbhs x, P x0) = (\forall x0 \near x, P x0)) * (forall (X : Type) (fX : filteredType X) (x : fX) (P : set X), nbhs x P = (\forall x0 \near x, P x0)) NearNbhs.near_simpl is not universe polymorphic NearNbhs.near_simpl is transparent Expands to: Constant mathcomp.classical.filter.NearNbhs.near_simpl Declared in library mathcomp.classical.filter, line 417, characters 11-21


Source code
{TSource code} (FSource code : (T -> Prop) -> Prop)
  {fFSource code : Filter F} (fN0Source code : not (F set0)) :=
  PFilterPack F (Build_ProperFilter fN0 fF).
Arguments PFilterType {T} F {fF} fN0.

HBSource code.instanceSource code DefinitionSource code _Source code TSource code :=Source code gen_eqMixinSource code (filter_on T).
HBSource code.instanceSource code DefinitionSource code _Source code TSource code :=Source code gen_choiceMixinSource code (filter_on T).
HBSource code.instanceSource code DefinitionSource code _Source code TSource code :=Source code isPointedSource code.Build (filter_on T)
  (FilterType _ (filter_setT T)).
HBSource code.instanceSource code DefinitionSource code _Source code TSource code :=Source code isFilteredSource code.Build T (filter_on T) (@filter T).

Global Instance filter_on_FilterSource code TSource code (FSource code : filter_on T) : Filter F.
Proof.
by case: F. Qed.
Global Instance pfilter_on_ProperFilterSource code TSource code (FSource code : pfilter_on T) : ProperFilter F.
Proof.
by case: F. Qed.

Lemma nbhs_filter_onESource code TSource code (FSource code : filter_on T) : nbhs F = nbhs (filter F).
Proof.
by []. Qed.
Definition nbhs_simpl

filter_class : forall [T : Type] (F : filter_on T), Filter F filter_class is not universe polymorphic Arguments filter_class [T]%_type_scope F filter_class is transparent Expands to: Constant mathcomp.classical.filter.filter_class Declared in library mathcomp.classical.filter, line 461, characters 11-23


Used by
  • mathcomp.analysis.topology_theory.uniform_structure
  • mathcomp.analysis.topology_theory.topology_structure
  • mathcomp.analysis.topology_theory.sigT_topology

Source code
:= (@nbhs_simpl, @nbhs_filter_onE).

Lemma near_filter_onESource code TSource code (FSource code : filter_on T) (PSource code : set T) :
  (\forall xSource code \near F, P x) = \forall xSource code \near filter F, P x.
Proof.
by []. Qed.
Definition near_simpl

pfilter_class : forall [T : Type] (F : pfilter_on T), ProperFilter F pfilter_class is not universe polymorphic Arguments pfilter_class [T]%_type_scope F pfilter_class is transparent Expands to: Constant mathcomp.classical.filter.pfilter_class Declared in library mathcomp.classical.filter, line 472, characters 11-24


Source code
:= (@near_simpl, @near_filter_onE).

Program Definition trivial_filter_on

pfilter_filter_on : forall [T : Type], pfilter_on T -> filter_on T pfilter_filter_on is not universe polymorphic Arguments pfilter_filter_on [T]%_type_scope F pfilter_filter_on is a coercion pfilter_filter_on is transparent Expands to: Constant mathcomp.classical.filter.pfilter_filter_on Declared in library mathcomp.classical.filter, line 477, characters 10-27


Source code
TSource code := FilterType [set setT : set T] _.
Next Obligation.
split=> // [_ _ -> ->|Q R sQR QT]; first by rewrite setIT.
by move; rewrite eqEsubset; split => // ? _; apply/sQR; rewrite QT.
Qed.
Canonical trivial_filter_on.

Lemma filter_nbhsTUsed by
  • mathcomp.analysis.normedtype_theory.tvs
  • mathcomp.analysis.normedtype_theory.ereal_normedtype

Source code
{TSource code : Type} (FSource code : set_system T) :
   Filter F -> nbhs F setT.
Proof.
by move=> FF; apply: filterT. Qed.
#[global] Hint Resolve filter_nbhsT : core.

Lemma nearTSource code {TSource code : Type} (FSource code : set_system T) : Filter F -> \forall _ \near F, True.
Proof.
by move=> FF; apply: filterT. Qed.
#[global] Hint Resolve nearT : core.

Lemma filter_not_empty_exSource code {TSource code : Type} (FSource code : set_system T) :
  (forall PSource code, F P -> exists xSource code, P x) -> ~ F set0.
Proof.
by move=> /(_ set0) ex /ex []. Qed.

Definition Build_ProperFilter_ex

PFilterType : forall {T : Type} (F : (T -> Prop) -> Prop), Filter F -> ~ F set0 -> pfilter_on T PFilterType is not universe polymorphic Arguments PFilterType {T}%_type_scope F%_function_scope {fF} fN0 PFilterType is transparent Expands to: Constant mathcomp.classical.filter.PFilterType Declared in library mathcomp.classical.filter, line 480, characters 11-22


Used by
  • mathcomp.analysis.ereal
  • mathcomp.analysis.topology_theory.pseudometric_structure
  • mathcomp.analysis.topology_theory.uniform_structure
  • mathcomp.analysis.topology_theory.topology_structure
  • mathcomp.analysis.topology_theory.num_topology
  • mathcomp.analysis.topology_theory.compact
  • mathcomp.analysis.normedtype_theory.matrix_normedtype
  • mathcomp.analysis.normedtype_theory.num_normedtype

Source code
{TSource code : Type} (FSource code : set_system T)
  (filter_exSource code : forall PSource code, F P -> exists xSource code, P x)
  (FFSource code : Filter F) :=
  Build_ProperFilter (filter_not_empty_ex filter_ex) FF.

Lemma filter_ex_subproofSource code {TSource code : Type} (FSource code : set_system T) :
  ~ F set0 -> (forall PSource code, F P -> exists xSource code, P x).
Proof.
move=> NFset0 P FP; apply: contra_notP NFset0 => nex; suff <- : P = set0 by [].
by rewrite funeqE => x; rewrite propeqE; split=> // Px; apply: nex; exists x.
Qed.

Definition filter_ex

nbhs_simpl : (forall (T : Type) (F : set_system T), nbhs F = F) * (forall (T : Type) (F : filter_on T), nbhs F = nbhs F) nbhs_simpl is not universe polymorphic nbhs_simpl is transparent Expands to: Constant mathcomp.classical.filter.nbhs_simpl Declared in library mathcomp.classical.filter, line 498, characters 11-21


Used by
  • mathcomp.analysis.topology_theory.topology_structure
  • mathcomp.analysis.topology_theory.function_spaces
  • mathcomp.analysis.topology_theory.matrix_topology
  • mathcomp.analysis.topology_theory.subspace_topology
  • mathcomp.analysis.topology_theory.compact
  • mathcomp.analysis.normedtype_theory.matrix_normedtype
  • mathcomp.analysis.normedtype_theory.normed_module

Source code
{TSource code : Type} (FSource code : set_system T) {FFSource code : ProperFilter F} :=
  filter_ex_subproof (filter_not_empty F).
Arguments filter_ex {T F FF _}.

Lemma filter_getPSource code {TSource code : pointedType} (FSource code : set_system T) {FFSource code : ProperFilter F}
  (PSource code : set T) : F P -> P (get P).
Proof.
by move=> /filter_ex /getPex. Qed.


Record in_filterSource code TSource code (FSource code : set_system T) := InFilter {
  prop_in_filter_projSource code : T -> Prop;
  prop_in_filterP_projSource code : F prop_in_filter_proj
}.

Module Type PropInFilterSigSource code.
Axiom tSource code : forall (TSource code : Type) (FSource code : set_system T), in_filter F -> T -> Prop.
Axiom tESource code : t = prop_in_filter_proj.
End PropInFilterSig.
Module PropInFilterSource code : PropInFilterSig.
Definition t

near_simpl : (forall (U : Type) (T : filteredType U) (x : T) (P : set U), (\forall x0 \near nbhs x, P x0) = (\forall x0 \near x, P x0)) * (forall (X : Type) (fX : filteredType X) (x : fX) (P : set X), nbhs x P = (\forall x0 \near x, P x0)) * (forall (T : Type) (F : filter_on T) (P : set T), (\forall x \near F, P x) = (\forall x \near F, P x)) * (forall (T U : Type) (f : T -> U) (F : set_system T) (P : set U), (\forall y \near (f x @[x --> F])%classic, P y) = (\forall x \near F, P (f x))) * (forall (T U : Type) (f : T -> set U) (F : set_system T) (P : set U), (\forall y \near (f x `@[x --> F])%classic, P y) = (\forall x \near F, exists y : U, f x y /\ P y)) * (forall (T T' U U' : Type) (f : T -> U) (g : T' -> U') (F : set_system T) (G : set_system T') (P : U -> set U'), Filter F -> Filter G -> (\forall y \near (f x @[x --> F])%classic & y' \near (g x @[x --> G])%classic, P y y') = (\forall x \near F & x' \near G, P (f x) (g x'))) near_simpl is not universe polymorphic near_simpl is transparent Expands to: Constant mathcomp.classical.filter.NearMap.near_simpl Declared in library mathcomp.classical.filter, line 1134, characters 11-21


Source code
:= prop_in_filter_proj.
Lemma tESource code : t = prop_in_filter_proj
Proof.
by []. Qed.
End PropInFilter.
Notation prop_ofSource code := PropInFilter.t.
Definition prop_ofE

trivial_filter_on : forall T : Type, filter_on T trivial_filter_on is not universe polymorphic Arguments trivial_filter_on T%_type_scope trivial_filter_on is transparent Expands to: Constant mathcomp.classical.filter.trivial_filter_on Declared in library mathcomp.classical.filter, line 505, characters 19-36


Source code
:= PropInFilter.tE.
Notation "x \is_near F"Source code := (@PropInFilter.t _ F _ x).
Definition is_nearE

Build_ProperFilter_ex : forall {T : Type} [F : set_system T], (forall P : set T, F P -> exists x : T, P x) -> Filter F -> ProperFilter F Build_ProperFilter_ex is not universe polymorphic Arguments Build_ProperFilter_ex {T}%_type_scope [F] filter_ex%_function_scope FF Build_ProperFilter_ex is transparent Expands to: Constant mathcomp.classical.filter.Build_ProperFilter_ex Declared in library mathcomp.classical.filter, line 525, characters 11-32


Source code
:= prop_ofE.

Lemma prop_ofPSource code TSource code FSource code (iFSource code : @in_filter T F) : F (prop_of iF).
Proof.
by rewrite prop_ofE; apply: prop_in_filterP_proj. Qed.

Definition in_filterT

filter_ex : forall {T : Type} {F : set_system T}, ProperFilter F -> forall {P : set T}, F P -> exists x : T, P x filter_ex is not universe polymorphic Arguments filter_ex {T}%_type_scope {F FF} {P}%_classical_set_scope _ filter_ex is transparent Expands to: Constant mathcomp.classical.filter.filter_ex Declared in library mathcomp.classical.filter, line 537, characters 11-20


Source code
TSource code FSource code (FFSource code : Filter F) : @in_filter T F :=
  InFilter (filterT).
Canonical in_filterI

PropInFilter.t : forall [T : Type] [F : set_system T], in_filter (T:=T) F -> T -> Prop PropInFilter.t is not universe polymorphic Arguments PropInFilter.t [T]%_type_scope [F] _ _ Expands to: Constant mathcomp.classical.filter.PropInFilter.t Declared in library mathcomp.classical.filter, line 554, characters 6-7


Source code
TSource code FSource code (FFSource code : Filter F) (PSource code QSource code : @in_filter T F) :=
  InFilter (filterI (prop_in_filterP_proj P) (prop_in_filterP_proj Q)).

Lemma filter_near_ofSource code TSource code FSource code (PSource code : @in_filter T F) (QSource code : set T) : Filter F ->
  (forall xSource code, prop_of P x -> Q x) -> F Q.
Proof.
by move: P => [P FP] FF /=; rewrite prop_ofE /= => /filterS; apply.
Qed.

Fact near_keySource code : unit
Proof.
exact. Qed.

Lemma mark_nearSource code (PSource code : Prop) : locked_with near_key P -> P.
Proof.
by rewrite unlock. Qed.

Lemma near_accSource code TSource code FSource code (PSource code : @in_filter T F) (QSource code : set T) (FFSource code : Filter F)
   (FQSource code : \forall xSource code \near F, Q x) :
   locked_with near_key (forall xSource code, prop_of (in_filterI FF P (InFilter FQ)) x -> Q x).
Proof.
by rewrite unlock => x /=; rewrite !prop_ofE /= => -[Px]. Qed.

Lemma near_skip_subproofSource code TSource code FSource code (PSource code QSource code : @in_filter T F) (GSource code : set T) (FFSource code : Filter F) :
   locked_with near_key (forall xSource code, prop_of P x -> G x) ->
   locked_with near_key (forall xSource code, prop_of (in_filterI FF P Q) x -> G x).
Proof.
rewrite !unlock => FG x /=; rewrite !prop_ofE /= => -[Px Qx].
by have /= := FG x; apply; rewrite prop_ofE.
Qed.

Tactic Notation "near=>" ident(x) := apply: filter_near_of => x ?.

Ltac just_discharge_near x :=
  tryif match goal with Hx : x \is_near _ |- _ => move: (x) (Hx); apply: mark_near end
        then idtac else fail "the variable" x "is not a ""near"" variable".
Ltac near_skip :=
  match goal with |- locked_with near_key (forall _, @PropInFilter.t _ _ ?P _ -> _) =>
    tryif is_evar P then fail "nothing to skip" else apply: near_skip_subproof end.

Tactic Notation "near:" ident(x) :=
  just_discharge_near x;
  tryif do ![apply: near_acc; first shelve|near_skip]
  then idtac
  else fail "the goal depends on variables introduced after" x.

Ltac under_near i tac := near=> i; tac; near: i.
Tactic Notation "near=>" ident(i) "do" tactic3(tac) := under_near i ltac:(tac).
Tactic Notation "near=>" ident(i) "do" "[" tactic4(tac) "]" := near=> i do tac.
Tactic Notation "near" "do" tactic3(tac) :=
  let i := fresh "i" in under_near i ltac:(tac).
Tactic Notation "near" "do" "[" tactic4(tac) "]" := near do tac.

Ltac end_near := do ?exact: in_filterT.

Ltac done :=
  trivial; hnf; intros; solve
   [ do ![solve [trivial | apply: sym_equal; trivial]
         | discriminate | contradiction | split]
   | match goal with H : ~ _ |- _ => solve [case H; trivial] end
   | match goal with |- ?x \is_near _ => near: x; apply: prop_ofP end ].

Lemma have_nearSource code (USource code : Type) (fTSource code : filteredType U) (xSource code : fT) (PSource code : Prop) :
  ProperFilter (nbhs x) -> (\forall xSource code \near x, P) -> P.
Proof.
by move=> FF nP; have [] := @filter_ex _ _ FF (fun=> P). Qed.
Arguments have_near {U fT} x.

Tactic Notation "near" constr(F) "=>" ident(x) :=
  apply: (have_near F); near=> x.

Lemma nearUsed by
  • mathcomp.analysis.ess_sup_inf
  • mathcomp.analysis.measure_theory.measure_negligible
  • mathcomp.analysis.cantor
  • mathcomp.analysis.topology_theory.pseudometric_structure
  • mathcomp.analysis.topology_theory.metric_structure
  • mathcomp.analysis.topology_theory.topology_structure
  • mathcomp.analysis.topology_theory.function_spaces
  • mathcomp.analysis.topology_theory.separation_axioms
  • mathcomp.analysis.topology_theory.one_point_compactification
  • mathcomp.analysis.topology_theory.subspace_topology
  • mathcomp.analysis.topology_theory.compact
  • mathcomp.analysis.homotopy_theory.wedge_sigT
  • mathcomp.analysis.derive
  • mathcomp.analysis.landau
  • mathcomp.analysis.normedtype_theory.pseudometric_normed_Zmodule
  • mathcomp.analysis.normedtype_theory.normed_module

Source code
TSource code (FSource code : set_system T) PSource code (FPSource code : F P) (xSource code : T)
  (PxSource code : prop_of (InFilter FP) x) : P x.
Proof.
by move: Px; rewrite prop_ofE. Qed.
Arguments near {T F P} FP x Px.

Lemma nearWUsed by
  • mathcomp.analysis.ess_sup_inf
  • mathcomp.analysis.esum
  • mathcomp.analysis.real_measure.lebesgue_measure
  • mathcomp.analysis.measure_theory.measure_extension
  • mathcomp.analysis.measure_theory.signed_measure
  • mathcomp.analysis.measure_theory.measure_function
  • mathcomp.analysis.hoelder
  • mathcomp.analysis.ftc
  • mathcomp.analysis.topology_theory.subtype_topology
  • mathcomp.analysis.topology_theory.function_spaces
  • mathcomp.analysis.topology_theory.num_topology
  • mathcomp.analysis.topology_theory.subspace_topology
  • mathcomp.analysis.numfun
  • mathcomp.analysis.sequences
  • mathcomp.analysis.lebesgue_integral_theory.lebesgue_integral_nonneg
  • mathcomp.analysis.lebesgue_integral_theory.lebesgue_Rintegral
  • mathcomp.analysis.lebesgue_integral_theory.lebesgue_integral_monotone_convergence
  • mathcomp.analysis.lebesgue_integral_theory.lebesgue_integral_definition
  • mathcomp.analysis.lebesgue_integral_theory.lebesgue_integral_under
  • mathcomp.analysis.lebesgue_integral_theory.lebesgue_integral_dominated_convergence
  • mathcomp.analysis.lebesgue_integral_theory.radon_nikodym
  • mathcomp.analysis.lebesgue_integral_theory.lebesgue_integrable
  • mathcomp.analysis.lebesgue_integral_theory.measurable_fun_approximation
  • mathcomp.analysis.normedtype_theory.pseudometric_normed_Zmodule
  • mathcomp.analysis.normedtype_theory.tvs
  • mathcomp.analysis.normedtype_theory.normed_module
  • mathcomp.analysis.exp

Source code
{TSource code : Type} {FSource code : set_system T} (PSource code : T -> Prop) :
  Filter F -> (forall xSource code, P x) -> (\forall xSource code \near F, P x).
Proof.
by move=> FF FP; apply: filterS filterT. Qed.

Lemma filterEUsed by
  • mathcomp.analysis.topology_theory.topology_structure
  • mathcomp.analysis.derive
  • mathcomp.analysis.landau

Source code
{TSource code : Type} {FSource code : set_system T} :
  Filter F -> forall PSource code : set T, (forall xSource code, P x) -> F P.
Proof.
by move=> [FT _ +] P fP => /(_ setT); apply. Qed.

Lemma filter_appUsed by
  • mathcomp.analysis.realfun
  • mathcomp.analysis.cantor
  • mathcomp.analysis.topology_theory.topology_structure
  • mathcomp.analysis.topology_theory.edist
  • mathcomp.analysis.topology_theory.product_topology
  • mathcomp.analysis.topology_theory.subtype_topology
  • mathcomp.analysis.topology_theory.function_spaces
  • mathcomp.analysis.topology_theory.separation_axioms
  • mathcomp.analysis.topology_theory.num_topology
  • mathcomp.analysis.topology_theory.compact
  • mathcomp.analysis.derive
  • mathcomp.analysis.numfun
  • mathcomp.analysis.landau
  • mathcomp.analysis.lebesgue_integral_theory.lebesgue_integral_differentiation
  • mathcomp.analysis.normedtype_theory.num_normedtype

Source code
 (TSource code : Type) (FSource code : set_system T) :
  Filter F -> forall PSource code QSource code : set T, F (fun xSource code => P x -> Q x) -> F P -> F Q.
Proof.
by move=> FF P Q subPQ FP; near=> x do suff: P x.
Unshelve. all: by end_near. Qed.

Lemma filter_app2Used by
  • mathcomp.analysis.numfun
  • mathcomp.analysis.landau
  • mathcomp.analysis.lebesgue_integral_theory.lebesgue_integral_dominated_convergence

Source code
 (TSource code : Type) (FSource code : set_system T) :
  Filter F -> forall PSource code QSource code RSource code : set T,  F (fun xSource code => P x -> Q x -> R x) ->
  F P -> F Q -> F R.
Proof.
by move=> ???? PQR FP; apply: filter_app; apply: filter_app FP. Qed.

Lemma filter_app3Source code (TSource code : Type) (FSource code : set_system T) :
  Filter F -> forall PSource code QSource code RSource code SSource code : set T, F (fun xSource code => P x -> Q x -> R x -> S x) ->
  F P -> F Q -> F R -> F S.
Proof.
by move=> ????? PQR FP; apply: filter_app2; apply: filter_app FP. Qed.

Lemma filterS2Used by
  • mathcomp.analysis.measure_theory.measure_negligible
  • mathcomp.analysis.ereal
  • mathcomp.analysis.derive
  • mathcomp.analysis.lebesgue_integral_theory.lebesgue_integrable
  • mathcomp.analysis.normedtype_theory.pseudometric_normed_Zmodule

Source code
 (TSource code : Type) (FSource code : set_system T) :
  Filter F -> forall PSource code QSource code RSource code : set T, (forall xSource code, P x -> Q x -> R x) ->
  F P -> F Q -> F R.
Proof.
by move=> ? ? ? ? ?; apply: filter_app2; apply: filterE. Qed.

Lemma filterS3Used by
  • mathcomp.analysis.normedtype_theory.normed_module

Source code
 (TSource code : Type) (FSource code : set_system T) :
  Filter F -> forall PSource code QSource code RSource code SSource code : set T, (forall xSource code, P x -> Q x -> R x -> S x) ->
  F P -> F Q -> F R -> F S.
Proof.
by move=> ? ? ? ? ? ?; apply: filter_app3; apply: filterE. Qed.

Lemma filter_constSource code {TSource code : Type} {FSource code} {FFSource code: @ProperFilter T F} (PSource code : Prop) :
  F (fun=> P) -> P.
Proof.
by move=> FP; case: (filter_ex FP). Qed.

Lemma in_filter_fromUsed by
  • mathcomp.analysis.topology_theory.separation_axioms

Source code
{ISource code TSource code : Type} (DSource code : set I) (BSource code : I -> set T) (iSource code : I) :
  D i -> filter_from D B (B i).
Proof.
by exists i. Qed.

Lemma in_nearWUsed by
  • mathcomp.analysis.topology_theory.topology_structure

Source code
{TSource code : Type} (FSource code : set_system T) (PSource code : T -> Prop) (SSource code : set T) :
  Filter F -> F S -> {in S, forall xSource code, P x} -> \forall xSource code \near F, P x.
Proof.
by move=> FF FS SP; apply: (@filterS _ F _ S) => // x /mem_set /SP.
Qed.

Lemma near_andPUsed by
  • mathcomp.analysis.landau

Source code
{TSource code : Type} FSource code (b1Source code b2Source code : T -> Prop) : Filter F ->
  (\forall xSource code \near F, b1 x /\ b2 x) <->
    (\forall xSource code \near F, b1 x) /\ (\forall xSource code \near F, b2 x).
Proof.
move=> FF; split=> [H|[H1 H2]]; first by split; apply: filterS H => ? [].
by apply: filterS2 H1 H2.
Qed.

Lemma nearP_depUsed by
  • mathcomp.analysis.topology_theory.pseudometric_structure
  • mathcomp.analysis.topology_theory.function_spaces
  • mathcomp.analysis.topology_theory.matrix_topology
  • mathcomp.analysis.sequences
  • mathcomp.analysis.normedtype_theory.complete_normed_module

Source code
{TSource code USource code} {FSource code : set_system T} {GSource code : set_system U}
   {FFSource code : Filter F} {FGSource code : Filter G} (PSource code : T -> U -> Prop) :
  (\forall xSource code \near F & ySource code \near G, P x y) ->
  \forall xSource code \near F, \forall ySource code \near G, P x y.
Proof.
move=> [[Q R] [/=FQ GR]] QRP.
by apply: filterS FQ => x Q1x; apply: filterS GR => y Q2y; apply: (QRP (_, _)).
Qed.

Lemma filter2PSource code TSource code USource code (FSource code : set_system T) (GSource code : set_system U)
  {FFSource code : Filter F} {FGSource code : Filter G} (PSource code : set (T * U)) :
  (exists2 QSource code : set T * set U, F Q.1 /\ G Q.2
     & forall (xSource code : T) (ySource code : U), Q.1 x -> Q.2 y -> P (x, y))
   <-> \forall xSource code \near (F, G), P x.
Proof.
split=> [][[A B] /=[FA GB] ABP]; exists (A, B) => //=.
  by move=> [a b] [/=Aa Bb]; apply: ABP.
by move=> a b Aa Bb; apply: (ABP (_, _)).
Qed.

Lemma filter_ex2Source code {TSource code USource code : Type} (FSource code : set_system T) (GSource code : set_system U)
  {FFSource code : ProperFilter F} {FGSource code : ProperFilter G} (PSource code : set T) (QSource code : set U) :
    F P -> G Q -> exists xSource code : T, exists2 ySource code : U, P x & Q y.
Proof.
by move=> /filter_ex [x Px] /filter_ex [y Qy]; exists x, y. Qed.
Arguments filter_ex2 {T U F G FF FG _ _}.

Lemma filter_fromPUsed by
  • mathcomp.analysis.topology_theory.pseudometric_structure
  • mathcomp.analysis.topology_theory.metric_structure
  • mathcomp.analysis.topology_theory.uniform_structure
  • mathcomp.analysis.topology_theory.initial_topology
  • mathcomp.analysis.topology_theory.matrix_topology
  • mathcomp.analysis.normedtype_theory.pseudometric_normed_Zmodule
  • mathcomp.analysis_stdlib.Rstruct_topology

Source code
{ISource code TSource code : Type} (DSource code : set I) (BSource code : I -> set T) (FSource code : set_system T) :
  Filter F -> F `=>` filter_from D B <-> forall iSource code, D i -> F (B i).
Proof.
split; first by move=> FB i ?; apply/FB/in_filter_from.
by move=> FB P [i Di BjP]; apply: (filterS BjP); apply: FB.
Qed.

Lemma filter_fromTPSource code {ISource code TSource code : Type} (BSource code : I -> set T) (FSource code : set_system T) :
  Filter F -> F `=>` filter_from setT B <-> forall iSource code, F (B i).
Proof.
by move=> FF; rewrite filter_fromP; split=> [P i|P i _]; apply: P. Qed.

Lemma filter_from_filterUsed by
  • mathcomp.analysis.cantor
  • mathcomp.analysis.topology_theory.pseudometric_structure
  • mathcomp.analysis.topology_theory.uniform_structure
  • mathcomp.analysis.topology_theory.function_spaces
  • mathcomp.analysis.topology_theory.separation_axioms
  • mathcomp.analysis.topology_theory.initial_topology
  • mathcomp.analysis.topology_theory.matrix_topology
  • mathcomp.analysis.topology_theory.one_point_compactification
  • mathcomp.analysis.topology_theory.subspace_topology
  • mathcomp.analysis.topology_theory.compact
  • mathcomp.analysis.normedtype_theory.tvs

Source code
{ISource code TSource code : Type} (DSource code : set I) (BSource code : I -> set T) :
  (exists iSource code : I, D i) ->
  (forall iSource code jSource code, D i -> D j -> exists2 kSource code, D k & B k `<=` B i `&` B j) ->
  Filter (filter_from D B).
Proof.
move=> [i0 Di0] Binter; constructor; first by exists i0.
  move=> P Q [i Di BiP] [j Dj BjQ]; have [k Dk BkPQ]:= Binter _ _ Di Dj.
  by exists k => // x /BkPQ [/BiP ? /BjQ].
by move=> P Q subPQ [i Di BiP]; exists i => //; apply: subset_trans subPQ.
Qed.

Lemma filter_fromT_filterUsed by
  • mathcomp.analysis.showcase.summability

Source code
{ISource code TSource code : Type} (BSource code : I -> set T) :
  (exists _ : I, True) ->
  (forall iSource code jSource code, exists kSource code, B k `<=` B i `&` B j) ->
  Filter (filter_from setT B).
Proof.
move=> [i0 _] BI; apply: filter_from_filter; first by exists i0.
by move=> i j _ _; have [k] := BI i j; exists k.
Qed.

Lemma filter_from_properUsed by
  • mathcomp.analysis.topology_theory.uniform_structure
  • mathcomp.analysis.topology_theory.separation_axioms
  • mathcomp.analysis.topology_theory.matrix_topology
  • mathcomp.analysis.topology_theory.one_point_compactification
  • mathcomp.analysis.topology_theory.subspace_topology
  • mathcomp.analysis.topology_theory.compact
  • mathcomp.analysis.showcase.summability
  • mathcomp.analysis.normedtype_theory.tvs

Source code
{ISource code TSource code : Type} (DSource code : set I) (BSource code : I -> set T) :
  Filter (filter_from D B) ->
  (forall iSource code, D i -> B i !=set0) ->
  ProperFilter (filter_from D B).
Proof.
move=> FF BN0; apply: Build_ProperFilter_ex => P [i Di BiP].
by have [x Bix] := BN0 _ Di; exists x; apply: BiP.
Qed.

Global Instance eventually_filterUsed by
  • mathcomp.analysis.numfun
  • mathcomp.analysis.sequences

Source code
: ProperFilter eventually.
Proof.
eapply @filter_from_proper; last by move=> i _; exists i => /=.
apply: filter_fromT_filter; first by exists 0%N.
move=> i j; exists (maxn i j) => n //=.
by rewrite geq_max => /andP[ltin ltjn].
Qed.

Canonical eventually_filterType

prop_ofE : prop_of = prop_in_filter_proj prop_ofE is not universe polymorphic prop_ofE is transparent Expands to: Constant mathcomp.classical.filter.prop_ofE Declared in library mathcomp.classical.filter, line 563, characters 11-19 is_nearE : prop_of = prop_in_filter_proj is_nearE is not universe polymorphic is_nearE is transparent Expands to: Constant mathcomp.classical.filter.is_nearE Declared in library mathcomp.classical.filter, line 565, characters 11-19


Used by
  • mathcomp.analysis.sequences

Source code
:= FilterType eventually _.
Canonical eventually_pfilterType

in_filterT : forall [T : Type] [F : set_system T], Filter F -> in_filter (T:=T) F in_filterT is not universe polymorphic Arguments in_filterT [T]%_type_scope [F] FF in_filterT is transparent Expands to: Constant mathcomp.classical.filter.in_filterT Declared in library mathcomp.classical.filter, line 570, characters 11-21


Source code
:= PFilterType eventually (filter_not_empty _).

Lemma filter_bigIUsed by
  • mathcomp.analysis.topology_theory.supremum_topology
  • mathcomp.analysis.topology_theory.function_spaces
  • mathcomp.analysis.topology_theory.separation_axioms
  • mathcomp.analysis.topology_theory.matrix_topology
  • mathcomp.analysis.homotopy_theory.wedge_sigT
  • mathcomp.analysis.normedtype_theory.tvs

Source code
TSource code (ISource code : choiceType) (DSource code : {fset I}) (fSource code : I -> set T)
  (FSource code : set_system T) :
  Filter F -> (forall iSource code, i \in D -> F (f i)) ->
  F (\bigcap_(iSource code in [set` D]) f i).
Proof.
move=> FF FfD.
suff: F [set pSource code | forall iSource code, i \in enum_fset D -> f i p] by [].
have {FfD} : forall iSource code, i \in enum_fset D -> F (f i) by move=> ? /FfD.
elim: (enum_fset D) => [|i s ihs] FfD; first exact: filterS filterT.
apply: (@filterS _ _ _ (f i `&` [set pSource code | forall iSource code, i \in s -> f i p])).
  by move=> p [fip fsp] j; rewrite inE => /orP [/eqP->|] //; apply: fsp.
apply: filterI; first by apply: FfD; rewrite inE eq_refl.
by apply: ihs => j sj; apply: FfD; rewrite inE sj orbC.
Qed.

Lemma filter_forallUsed by
  • mathcomp.analysis.derive
  • mathcomp.analysis.normedtype_theory.matrix_normedtype
  • mathcomp.analysis.normedtype_theory.normed_module

Source code
TSource code (ISource code : finType) (fSource code : I -> set T) (FSource code : set_system T) :
    Filter F -> (forall iSource code : I, \forall xSource code \near F, f i x) ->
  \forall xSource code \near F, forall iSource code, f i x.
Proof.
move=> FF fIF; apply: filterS (@filter_bigI T I [fset xSource code in I]%fset f F FF _).
  by move=> x fIx i; have := fIx i; rewrite /= inE/=; apply.
by move=> i; rewrite inE/= => _; apply: (fIF i).
Qed.

Lemma filter_implySource code [TSource code : Type] [PSource code : Prop] [fSource code : set T] [FSource code : set_system T] :
  Filter F -> (P -> \forall xSource code \near F, f x) -> \forall xSource code \near F, P -> f x.
Proof.
move=> ? PF; near do move=> /asboolP.
by case: asboolP=> [/PF|_]; by [apply: filterS|apply: nearW].
Unshelve. all: by end_near. Qed.

Limits expressed with filters

Definition fmap

in_filterI : forall [T : Type] [F : set_system T], Filter F -> in_filter (T:=T) F -> in_filter (T:=T) F -> in_filter (T:=T) F in_filterI is not universe polymorphic Arguments in_filterI [T]%_type_scope [F] FF P Q in_filterI is transparent Expands to: Constant mathcomp.classical.filter.in_filterI Declared in library mathcomp.classical.filter, line 572, characters 10-20


Used by
  • mathcomp.analysis.topology_theory.function_spaces
  • mathcomp.analysis.topology_theory.num_topology

Source code
{TSource code USource code : Type} (fSource code : T -> U) (FSource code : set_system T) : set_system U :=
  [set PSource code | F (f @^-1` P)].
Arguments fmap _ _ _ _ _ /.

Lemma fmapEUsed by
  • mathcomp.analysis.sequences

Source code
{USource code VSource code : Type} (fSource code : U -> V)
  (FSource code : set_system U) (PSource code : set V) : fmap f F P = F (f @^-1` P).
Proof.
by []. Qed.

Notation "E @[ x --> F ]"Source code :=
  (fmap (fun xSource code => E) (nbhs F)) : classical_set_scope.
Notation "E @[ x \oo ]"Source code :=
  (fmap (fun xSource code => E) \oo) : classical_set_scope.
Notation "f @ F"Source code := (fmap f (nbhs F)) : classical_set_scope.

Notation limnUsed by
  • mathcomp.analysis.probability_theory.independence
  • mathcomp.analysis.real_measure.lebesgue_measure
  • mathcomp.analysis.measure_theory.measure_extension
  • mathcomp.analysis.measure_theory.measure_function
  • mathcomp.analysis.ftc
  • mathcomp.analysis.kernel
  • mathcomp.analysis.gauss_integral
  • mathcomp.analysis.showcase.pnt
  • mathcomp.analysis.sequences
  • mathcomp.analysis.lebesgue_integral_theory.lebesgue_integral_nonneg
  • mathcomp.analysis.lebesgue_integral_theory.giry
  • mathcomp.analysis.lebesgue_integral_theory.lebesgue_Rintegral
  • mathcomp.analysis.lebesgue_integral_theory.lebesgue_integral_monotone_convergence
  • mathcomp.analysis.lebesgue_integral_theory.lebesgue_integral_definition
  • mathcomp.analysis.lebesgue_integral_theory.lebesgue_integral_fubini
  • mathcomp.analysis.normedtype_theory.normed_module
  • mathcomp.analysis.exp

Source code
F := (lim (F @ \oo)).
Notation cvgnUsed by
  • mathcomp.analysis.topology_theory.topology_structure
  • mathcomp.analysis.numfun
  • mathcomp.analysis.sequences
  • mathcomp.analysis.lebesgue_integral_theory.lebesgue_integral_nonneg
  • mathcomp.analysis.lebesgue_integral_theory.lebesgue_integral_monotone_convergence
  • mathcomp.analysis.lebesgue_integral_theory.lebesgue_integral_definition
  • mathcomp.analysis.lebesgue_integral_theory.measurable_fun_approximation
  • mathcomp.analysis.normedtype_theory.normed_module
  • mathcomp.analysis.exp

Source code
F := (cvg (F @ \oo)).

Global Instance fmap_filterUsed by
  • mathcomp.analysis.topology_theory.pseudometric_structure
  • mathcomp.analysis.topology_theory.function_spaces

Source code
TSource code USource code (fSource code : T -> U) (FSource code : set_system T) :
  Filter F -> Filter (f @ F).
Proof.
move=> FF; constructor => [|P Q|P Q PQ]; rewrite ?fmapE //=.
- exact: filterT.
- exact: filterI.
- by apply: filterS=> ?/PQ.
Qed.

Global Instance fmap_proper_filterUsed by
  • mathcomp.analysis.topology_theory.function_spaces
  • mathcomp.analysis.topology_theory.one_point_compactification
  • mathcomp.analysis.topology_theory.sigT_topology

Source code
TSource code USource code (fSource code : T -> U) (FSource code : set_system T) :
  ProperFilter F -> ProperFilter (f @ F).
Proof.
by move=> FF; apply: Build_ProperFilter; rewrite fmapE preimage_set0.
Qed.

Definition fmapi

eventually_filterType : filter_on nat eventually_filterType is not universe polymorphic eventually_filterType is transparent Expands to: Constant mathcomp.classical.filter.eventually_filterType Declared in library mathcomp.classical.filter, line 772, characters 10-31


Source code
{TSource code USource code : Type} (fSource code : T -> set U) (FSource code : set_system T) :
    set_system _ :=
  [set PSource code | \forall xSource code \near F, exists ySource code, f x y /\ P y].

Notation "E `@[ x --> F ]"Source code :=
  (fmapi (fun xSource code => E) (nbhs F)) : classical_set_scope.
Notation "f `@ F"Source code := (fmapi f (nbhs F)) : classical_set_scope.

Lemma fmapiEUsed by
  • mathcomp.analysis.topology_theory.separation_axioms

Source code
{USource code VSource code : Type} (fSource code : U -> set V)
  (FSource code : set_system U) (PSource code : set V) :
  fmapi f F P = \forall xSource code \near F, exists ySource code, f x y /\ P y.
Proof.
by []. Qed.

Global Instance fmapi_filterSource code TSource code USource code (fSource code : T -> set U) (FSource code : set_system T) :
  {near F, is_totalfun f} -> Filter F -> Filter (f `@ F).
Proof.
move=> f_totalfun FF; rewrite /fmapi; apply: Build_Filter.
- by apply: filterS f_totalfun => x [[y Hy] H]; exists y.
- move=> /= P Q FP FQ; near=> x.
    have [//|y [fxy Py]] := near FP x.
    have [//|z [fxz Qz]] := near FQ x.
    have [//|_ fx_prop] := near f_totalfun x.
    by exists y; split => //; split => //; rewrite [y](fx_prop _ z).
- move=> /= P Q subPQ FP; near=> x.
  by have [//|y [fxy /subPQ Qy]] := near FP x; exists y.
Unshelve. all: by end_near. Qed.

#[global] Typeclasses Opaque fmapi.

Global Instance fmapi_proper_filterUsed by
  • mathcomp.analysis.topology_theory.separation_axioms

Source code

  TSource code USource code (fSource code : T -> U -> Prop) (FSource code : set_system T) :
  {near F, is_totalfun f} ->
  ProperFilter F -> ProperFilter (f `@ F).
Proof.
move=> f_totalfun FF; apply: Build_ProperFilter_ex.
  by move=> P; rewrite /fmapi/= => /filter_ex [x [y [??]]]; exists y.
exact: fmapi_filter.
Qed.

Lemma cvg_idUsed by
  • mathcomp.analysis.probability_theory.beta_distribution
  • mathcomp.analysis.probability_theory.normal_distribution
  • mathcomp.analysis.real_measure.lebesgue_stieltjes_measure
  • mathcomp.analysis.measure_theory.signed_measure
  • mathcomp.analysis.realfun
  • mathcomp.analysis.ftc
  • mathcomp.analysis.gauss_integral
  • mathcomp.analysis.topology_theory.topology_structure
  • mathcomp.analysis.topology_theory.function_spaces
  • mathcomp.analysis.topology_theory.subspace_topology
  • mathcomp.analysis.normedtype_theory.tvs
  • mathcomp.analysis.normedtype_theory.normed_module

Source code
TSource code (FSource code : set_system T) : x @[xSource code --> F] --> F.
Proof.
exact. Qed.
Arguments cvg_id {T F}.

Lemma fmap_compUsed by
  • mathcomp.analysis.realfun
  • mathcomp.analysis.topology_theory.function_spaces
  • mathcomp.analysis.numfun
  • mathcomp.analysis.lebesgue_integral_theory.measurable_fun_approximation
  • mathcomp.analysis.normedtype_theory.pseudometric_normed_Zmodule
  • mathcomp.analysis.normedtype_theory.num_normedtype

Source code
{ASource code BSource code CSource code} (fSource code : B -> C) (gSource code : A -> B) FSource code:
  Filter F -> (f \o g)%FUN @ F = f @ (g @ F).
Proof.
by []. Qed.

Lemma appfilterSource code USource code VSource code (fSource code : U -> V) (FSource code : set_system U) :
  f @ F = [set PSource code : set _ | \forall xSource code \near F, P (f x)].
Proof.
by []. Qed.

Lemma cvg_appUsed by
  • mathcomp.analysis.realfun
  • mathcomp.analysis.topology_theory.function_spaces
  • mathcomp.analysis.topology_theory.num_topology
  • mathcomp.analysis.derive
  • mathcomp.analysis.normedtype_theory.num_normedtype

Source code
USource code VSource code (FSource code GSource code : set_system U) (fSource code : U -> V) :
  F --> G -> f @ F --> f @ G.
Proof.
by move=> FG P /=; exact: FG. Qed.
Arguments cvg_app {U V F G} _.

Lemma cvgi_appSource code USource code VSource code (FSource code GSource code : set_system U) (fSource code : U -> set V) :
  F --> G -> f `@ F --> f `@ G.
Proof.
by move=> FG P /=; exact: FG. Qed.

Lemma cvg_compUsed by
  • mathcomp.analysis.probability_theory.exponential_distribution
  • mathcomp.analysis.probability_theory.beta_distribution
  • mathcomp.analysis.probability_theory.random_variable
  • mathcomp.analysis.probability_theory.normal_distribution
  • mathcomp.analysis.real_measure.lebesgue_stieltjes_measure
  • mathcomp.analysis.realfun
  • mathcomp.analysis.ftc
  • mathcomp.analysis.gauss_integral
  • mathcomp.analysis.topology_theory.topology_structure
  • mathcomp.analysis.topology_theory.function_spaces
  • mathcomp.analysis.derive
  • mathcomp.analysis.sequences
  • mathcomp.analysis.lebesgue_integral_theory.lebesgue_integral_monotone_convergence
  • mathcomp.analysis.lebesgue_integral_theory.measurable_fun_approximation
  • mathcomp.analysis.normedtype_theory.tvs
  • mathcomp.analysis.normedtype_theory.num_normedtype
  • mathcomp.analysis.normedtype_theory.normed_module
  • mathcomp.analysis.exp

Source code
TSource code USource code VSource code (fSource code : T -> U) (gSource code : U -> V)
  (FSource code : set_system T) (GSource code : set_system U) (HSource code : set_system V) :
  f @ F `=>` G -> g @ G `=>` H -> g \o f @ F `=>` H.
Proof.
by move=> fFG gGH; apply: cvg_trans gGH => P /fFG. Qed.
Arguments cvg_comp {T U V} f g {F G H}.

Lemma cvgi_compSource code TSource code USource code VSource code (fSource code : T -> U) (gSource code : U -> set V)
  (FSource code : set_system T) (GSource code : set_system U) (HSource code : set_system V) :
  f @ F `=>` G -> g `@ G `=>` H -> g \o f `@ F `=>` H.
Proof.
by move=> fFG gGH; apply: cvg_trans gGH => P /fFG. Qed.

Lemma near_eq_cvgUsed by
  • mathcomp.analysis.probability_theory.random_variable
  • mathcomp.analysis.realfun
  • mathcomp.analysis.ftc
  • mathcomp.analysis.gauss_integral
  • mathcomp.analysis.derive
  • mathcomp.analysis.sequences
  • mathcomp.analysis.lebesgue_integral_theory.lebesgue_integral_under
  • mathcomp.analysis.lebesgue_integral_theory.lebesgue_integral_differentiation
  • mathcomp.analysis.normedtype_theory.normed_module
  • mathcomp.analysis.exp

Source code
{TSource code USource code} {FSource code : set_system T} {FFSource code : Filter F} (fSource code gSource code : T -> U) :
  {near F, f =1 g} -> g @ F `=>` f @ F.
Proof.
by move=> eq_fg P /=; apply: filterS2 eq_fg => x /= <-. Qed.

Lemma near_eq_cvg_eqUsed by
  • mathcomp.analysis.derive
  • mathcomp.analysis.normedtype_theory.pseudometric_normed_Zmodule

Source code
{TSource code USource code} {FSource code : set_system T} {FFSource code : Filter F} (fSource code gSource code : T -> U) :
  {near F, f =1 g} -> f @ F = g @ F.
Proof.
move=> fg; apply/seteqP; split; apply: near_eq_cvg => //.
by near do symmetry.
Unshelve. all: by end_near. Qed.

Lemma eq_cvgUsed by
  • mathcomp.analysis.probability_theory.random_variable
  • mathcomp.analysis.measure_theory.signed_measure
  • mathcomp.analysis.realfun
  • mathcomp.analysis.ftc
  • mathcomp.analysis.topology_theory.function_spaces
  • mathcomp.analysis.derive
  • mathcomp.analysis.sequences
  • mathcomp.analysis.lebesgue_integral_theory.lebesgue_integral_nonneg
  • mathcomp.analysis.lebesgue_integral_theory.counting_lebesgue
  • mathcomp.analysis.lebesgue_integral_theory.lebesgue_integral_differentiation
  • mathcomp.analysis.normedtype_theory.pseudometric_normed_Zmodule
  • mathcomp.analysis.normedtype_theory.tvs
  • mathcomp.analysis.normedtype_theory.num_normedtype
  • mathcomp.analysis.normedtype_theory.normed_module
  • mathcomp.analysis.exp

Source code
 (TSource code USource code : Type) (FSource code : set_system T) (fSource code gSource code : T -> U) (xSource code : set_system U) :
  f =1 g -> (f @ F --> x) = (g @ F --> x).
Proof.
by move=> /funext->. Qed.

Lemma near_eq_is_cvgSource code (TSource code : Type) (USource code : pnbhsType) (FSource code : set_system T)
  (fSource code gSource code : T -> U) :
  Filter F -> {near F, f =1 g} -> cvg (f x @[xSource code --> F]) -> cvg(g x @[xSource code --> F]).
Proof.
by move=> FF /near_eq_cvg_eq ->. Qed.

Lemma eq_is_cvg_inSource code (TSource code USource code : Type) (fTSource code : pfilteredType U) (FSource code : set_system T)
    (fSource code gSource code : T -> U) :
  f =1 g -> [cvg (f @ F) in fT] = [cvg (g @ F) in fT].
Proof.
by move=> /funext ->. Qed.

Lemma eq_is_cvgUsed by
  • mathcomp.analysis.derive
  • mathcomp.analysis.normedtype_theory.normed_module

Source code
 (TSource code : Type) (USource code : pnbhsType) (FSource code : set_system T) (fSource code gSource code : T -> U) :
  f =1 g -> cvg (f @ F) = cvg (g @ F).
Proof.
by move=> /funext->. Qed.

Lemma near_eq_limSource code (TSource code : Type) (USource code : pnbhsType) {FSource code : set_system T} {FFSource code : Filter F}
    (fSource code gSource code : T -> U) :
  {near F, f =1 g} -> lim (f @ F) = lim (g @ F).
Proof.
by move=> /near_eq_cvg_eq ->. Qed.

Lemma neari_eq_locSource code {TSource code USource code} {FSource code : set_system T} {FFSource code : Filter F} (fSource code gSource code : T -> set U) :
  {near F, f =2 g} -> g `@ F `=>` f `@ F.
Proof.
move=> eq_fg P /=; apply: filterS2 eq_fg => x eq_fg [y [fxy Py]].
by exists y; rewrite -eq_fg.
Qed.

Lemma cvg_near_constSource code (TSource code USource code : Type) (fSource code : T -> U) (FSource code : set_system T) (GSource code : set_system U) :
  Filter F -> ProperFilter G ->
  (\forall ySource code \near G, \forall xSource code \near F, f x = y) -> f @ F --> G.
Proof.
move=> FF FG fFG P /= GP; rewrite !near_simpl; apply: (have_near G).
by apply: filter_app fFG; near do apply: filterS => x /= ->.
Unshelve. all: by end_near. Qed.

Definition continuous_at

eventually_pfilterType : pfilter_on nat eventually_pfilterType is not universe polymorphic eventually_pfilterType is transparent Expands to: Constant mathcomp.classical.filter.eventually_pfilterType Declared in library mathcomp.classical.filter, line 773, characters 10-32


Used by
  • mathcomp.analysis.probability_theory.normal_distribution
  • mathcomp.analysis.realfun
  • mathcomp.analysis.ftc
  • mathcomp.analysis.gauss_integral
  • mathcomp.analysis.topology_theory.edist
  • mathcomp.analysis.topology_theory.subspace_topology
  • mathcomp.analysis.derive
  • mathcomp.analysis.normedtype_theory.pseudometric_normed_Zmodule
  • mathcomp.analysis.normedtype_theory.tvs
  • mathcomp.analysis.normedtype_theory.normed_module

Source code
 (TSource code USource code : nbhsType) (xSource code : T) (fSource code : T -> U) :=
  (f%function @ x --> f%function x).
Notation continuousUsed by
  • mathcomp.analysis.probability_theory.exponential_distribution
  • mathcomp.analysis.probability_theory.beta_distribution
  • mathcomp.analysis.probability_theory.normal_distribution
  • mathcomp.analysis.real_measure.measurable_realfun
  • mathcomp.analysis.real_measure.lebesgue_stieltjes_measure
  • mathcomp.analysis.functional_analysis.hahn_banach_theorem
  • mathcomp.analysis.realfun
  • mathcomp.analysis.cantor
  • mathcomp.analysis.ftc
  • mathcomp.analysis.gauss_integral
  • mathcomp.analysis.elementary_functions.trigonometry_functions
  • mathcomp.analysis.ereal
  • mathcomp.analysis.topology_theory.order_topology
  • mathcomp.analysis.topology_theory.quotient_topology
  • mathcomp.analysis.topology_theory.uniform_structure
  • mathcomp.analysis.topology_theory.topology_structure
  • mathcomp.analysis.topology_theory.edist
  • mathcomp.analysis.topology_theory.product_topology
  • mathcomp.analysis.topology_theory.subtype_topology
  • mathcomp.analysis.topology_theory.function_spaces
  • mathcomp.analysis.topology_theory.initial_topology
  • mathcomp.analysis.topology_theory.one_point_compactification
  • mathcomp.analysis.topology_theory.sigT_topology
  • mathcomp.analysis.topology_theory.num_topology
  • mathcomp.analysis.topology_theory.subspace_topology
  • mathcomp.analysis.homotopy_theory.continuous_path
  • mathcomp.analysis.homotopy_theory.wedge_sigT
  • mathcomp.analysis.derive
  • mathcomp.analysis.numfun
  • mathcomp.analysis.landau
  • mathcomp.analysis.lebesgue_integral_theory.lebesgue_integral_under
  • mathcomp.analysis.lebesgue_integral_theory.lebesgue_integral_differentiation
  • mathcomp.analysis.normedtype_theory.pseudometric_normed_Zmodule
  • mathcomp.analysis.normedtype_theory.tvs
  • mathcomp.analysis.normedtype_theory.urysohn
  • mathcomp.analysis.normedtype_theory.matrix_normedtype
  • mathcomp.analysis.normedtype_theory.num_normedtype
  • mathcomp.analysis.normedtype_theory.normed_module
  • mathcomp.analysis.exp
  • mathcomp.analysis_stdlib.Rstruct_topology

Source code
f := (forall xSource code, continuous_at x f).

Lemma continuous_compUsed by
  • mathcomp.analysis.probability_theory.exponential_distribution
  • mathcomp.analysis.probability_theory.beta_distribution
  • mathcomp.analysis.probability_theory.normal_distribution
  • mathcomp.analysis.realfun
  • mathcomp.analysis.cantor
  • mathcomp.analysis.ftc
  • mathcomp.analysis.gauss_integral
  • mathcomp.analysis.topology_theory.order_topology
  • mathcomp.analysis.topology_theory.topology_structure
  • mathcomp.analysis.topology_theory.subtype_topology
  • mathcomp.analysis.topology_theory.function_spaces
  • mathcomp.analysis.topology_theory.subspace_topology
  • mathcomp.analysis.homotopy_theory.continuous_path
  • mathcomp.analysis.homotopy_theory.wedge_sigT
  • mathcomp.analysis.derive
  • mathcomp.analysis.numfun
  • mathcomp.analysis.sequences
  • mathcomp.analysis.normedtype_theory.pseudometric_normed_Zmodule
  • mathcomp.analysis.normedtype_theory.tvs
  • mathcomp.analysis.normedtype_theory.normed_module

Source code
 (RSource code SSource code TSource code : nbhsType) (fSource code : R -> S) (gSource code : S -> T) xSource code :
  {for x, continuous f} -> {for (f x), continuous g} ->
  {for x, continuous (g \o f)}.
Proof.
exact: cvg_comp. Qed.

HBSource code.mixinSource code RecordSource code isSubNbhsSource code
  (VSource code :Source code nbhsTypeSource code) (S : pred V) U & SubChoice V S U & Nbhs U := {
  continuous_valE : continuous (val : U -> V)
}.

#[shortUsed by
  • mathcomp.analysis.topology_theory.topology_structure

Source code
(type=Used by
  • mathcomp.analysis.topology_theory.topology_structure

Source code
"subNbhsType"Used by
  • mathcomp.analysis.topology_theory.topology_structure

Source code
)]Used by
  • mathcomp.analysis.topology_theory.topology_structure

Source code

HBUsed by
  • mathcomp.analysis.topology_theory.topology_structure

Source code
.structureUsed by
  • mathcomp.analysis.topology_theory.topology_structure

Source code
DefinitionUsed by
  • mathcomp.analysis.topology_theory.topology_structure

Source code
SubNbhsUsed by
  • mathcomp.analysis.topology_theory.topology_structure

Source code
 (VUsed by
  • mathcomp.analysis.topology_theory.topology_structure

Source code
:Used by
  • mathcomp.analysis.topology_theory.topology_structure

Source code
nbhsTypeUsed by
  • mathcomp.analysis.topology_theory.topology_structure

Source code
) (S : pred V) :=
  { USource code of SubChoice V S U & Nbhs U & isSubNbhs V S U}.

Lemma near_funUsed by
  • mathcomp.analysis.normedtype_theory.normed_module

Source code
 (TSource code T'Source code : nbhsType) (fSource code : T -> T') (xSource code : T) (PSource code : T' -> Prop) :
    {for x, continuous f} ->
  (\forall ySource code \near f x, P y) -> (\forall x0Source code \near x, P (f x0)).
Proof.
exact. Qed.
Arguments near_fun {T T'} f x.


Definition globally

fmap : forall {T U : Type}, (T -> U) -> set_system T -> set_system U fmap is not universe polymorphic Arguments fmap {T U}%_type_scope f%_function_scope F _ / The reduction tactics unfold fmap when applied to 5 arguments fmap is transparent Expands to: Constant mathcomp.classical.filter.fmap Declared in library mathcomp.classical.filter, line 808, characters 11-15


Used by
  • mathcomp.analysis.topology_theory.topology_structure
  • mathcomp.analysis.topology_theory.discrete_topology
  • mathcomp.analysis.topology_theory.subspace_topology
  • mathcomp.analysis.topology_theory.compact
  • mathcomp.analysis.sequences
  • mathcomp.analysis.normedtype_theory.pseudometric_normed_Zmodule
  • mathcomp.analysis.normedtype_theory.urysohn
  • mathcomp.analysis.normedtype_theory.normed_module

Source code
{TSource code : Type} (ASource code : set T) : set_system T :=
   [set PSource code : set T | forall xSource code, A x -> P x].
Arguments globally {T} A _ /.

Lemma globally0Used by
  • mathcomp.analysis.normedtype_theory.normed_module

Source code
{TSource code : Type} (ASource code : set T) : globally set0 A
Proof.
by []. Qed.

Global Instance globally_filterUsed by
  • mathcomp.analysis.topology_theory.discrete_topology
  • mathcomp.analysis.normedtype_theory.urysohn

Source code
{TSource code : Type} (ASource code : set T) :
  Filter (globally A).
Proof.
constructor => //= P Q; last by move=> PQ AP x /AP /PQ.
by move=> AP AQ x Ax; split; [apply: AP|apply: AQ].
Qed.

Global Instance globally_properfilterUsed by
  • mathcomp.analysis.probability_theory.beta_distribution
  • mathcomp.analysis.topology_theory.subspace_topology
  • mathcomp.analysis.sequences
  • mathcomp.analysis.normedtype_theory.normed_module

Source code
{TSource code : Type} (ASource code : set T) aSource code :
  A a -> ProperFilter (globally A).
Proof.
by move=> Aa; apply: Build_ProperFilter => /(_ a); exact. Qed.

Specific filters

Section frechet_filter.
Variable TSource code : Type.

Definition frechet_filter

fmapi : forall {T U : Type}, (T -> set U) -> set_system T -> set_system U fmapi is not universe polymorphic Arguments fmapi {T U}%_type_scope f%_function_scope F _ fmapi is transparent Expands to: Constant mathcomp.classical.filter.fmapi Declared in library mathcomp.classical.filter, line 841, characters 11-16


Source code
:= [set SSource code : set T | finite_set (~` S)].

Global Instance frechet_properfilterSource code : infinite_set [set: T] ->
  ProperFilter frechet_filter.
Proof.
move=> infT; rewrite /frechet_filter.
constructor; first by rewrite /= setC0; exact: infT.
constructor; first by rewrite /= setCT.
- by move=> ? ?; rewrite /= setCI finite_setU.
- by move=> P Q PQ; exact/sub_finite_set/subsetC.
Qed.

End frechet_filter.

Global Instance frechet_properfilter_natSource code : ProperFilter (@frechet_filter nat).
Proof.
by apply: frechet_properfilter; exact: infinite_nat. Qed.

Filters for pairs

Global Instance filter_prod_filterUsed by
  • mathcomp.analysis.topology_theory.product_topology

Source code
TSource code USource code (FSource code : set_system T) (GSource code : set_system U) :
  Filter F -> Filter G -> Filter (filter_prod F G).
Proof.
move=> FF FG; apply: filter_from_filter.
  by exists (setT, setT); split; apply: filterT.
move=> [P Q] [P' Q'] /= [FP GQ] [FP' GQ'].
exists (P `&` P', Q `&` Q') => /=; first by split; apply: filterI.
by move=> [x y] [/= [??] []].
Qed.

Canonical prod_filter_on

continuous_at : forall [T U : nbhsType], T -> (T -> U) -> Prop continuous_at is not universe polymorphic Arguments continuous_at [T U] x f%_function_scope continuous_at is transparent Expands to: Constant mathcomp.classical.filter.continuous_at Declared in library mathcomp.classical.filter, line 961, characters 11-24


Source code
TSource code USource code (FSource code : filter_on T) (GSource code : filter_on U) :=
  FilterType (filter_prod F G) (filter_prod_filter _ _).

Global Instance filter_prod_properUsed by
  • mathcomp.analysis.topology_theory.product_topology

Source code
{T1Source code T2Source code : Type}
  {FSource code : (T1 -> Prop) -> Prop} {GSource code : (T2 -> Prop) -> Prop}
  {FFSource code : ProperFilter F} {FGSource code : ProperFilter G} :
  ProperFilter (filter_prod F G).
Proof.
apply: filter_from_proper => -[A B] [/=FA GB].
by have [[x ?] [y ?]] := (filter_ex FA, filter_ex GB); exists (x, y).
Qed.

Lemma filter_prod1Source code {TSource code USource code} {FSource code : set_system T} {GSource code : set_system U}
  {FGSource code : Filter G} (PSource code : set T) :
  (\forall xSource code \near F, P x) -> \forall xSource code \near F & _ \near G, P x.
Proof.
by move=> FP; exists (P, setT)=> //= [|[?? []//]]; split=> //; exact: filterT.
Qed.

Lemma filter_prod2Source code {TSource code USource code} {FSource code : set_system T} {GSource code : set_system U}
  {FFSource code : Filter F} (PSource code : set U) :
  (\forall ySource code \near G, P y) -> \forall _ \near F & ySource code \near G, P y.
Proof.
by move=> FP; exists (setT, P)=> //= [|[?? []//]]; split=> //; exact: filterT.
Qed.

Program Definition in_filter_prod

globally : forall {T : Type}, set T -> set_system T globally is not universe polymorphic Arguments globally {T}%_type_scope A%_classical_set_scope _ / The reduction tactics unfold globally when applied to 3 arguments globally is transparent Expands to: Constant mathcomp.classical.filter.globally Declared in library mathcomp.classical.filter, line 987, characters 11-19


Source code
{TSource code USource code} {FSource code : set_system T} {GSource code : set_system U}
  (PSource code : in_filter F) (QSource code : in_filter G) : in_filter (filter_prod F G) :=
  @InFilter _ _ (fun xSource code => prop_of P x.1 /\ prop_of Q x.2) _.
Next Obligation.
move=> T U F G P Q.
by exists (prop_of P, prop_of Q) => //=; split; exact: prop_ofP.
Qed.

Lemma near_pairSource code {TSource code USource code} {FSource code : set_system T} {GSource code : set_system U}
    {FFSource code : Filter F} {FGSource code : Filter G} (PSource code : in_filter F) (QSource code : in_filter G) xSource code :
  prop_of P x.1 -> prop_of Q x.2 -> prop_of (in_filter_prod P Q) x.
Proof.
by case: x=> x y; do ?rewrite prop_ofE/=. Qed.

Lemma cvg_fstUsed by
  • mathcomp.analysis.topology_theory.function_spaces
  • mathcomp.analysis.normedtype_theory.pseudometric_normed_Zmodule
  • mathcomp.analysis.normedtype_theory.tvs

Source code
{TSource code USource code FSource code GSource code} {FGSource code : Filter G} : (@fst T U) @ filter_prod F G --> F.
Proof.
by move=> P; exact: filter_prod1. Qed.

Lemma cvg_sndUsed by
  • mathcomp.analysis.topology_theory.function_spaces
  • mathcomp.analysis.normedtype_theory.pseudometric_normed_Zmodule
  • mathcomp.analysis.normedtype_theory.tvs

Source code
{TSource code USource code FSource code GSource code} {FFSource code : Filter F} : (@snd T U) @ filter_prod F G --> G.
Proof.
by move=> P; exact: filter_prod2. Qed.

Lemma near_mapUsed by
  • mathcomp.analysis.real_measure.lebesgue_measure
  • mathcomp.analysis.realfun
  • mathcomp.analysis.topology_theory.pseudometric_structure
  • mathcomp.analysis.topology_theory.uniform_structure
  • mathcomp.analysis.topology_theory.num_topology
  • mathcomp.analysis.derive

Source code
{TSource code USource code} (fSource code : T -> U) (FSource code : set_system T) (PSource code : set U) :
  (\forall ySource code \near f @ F, P y) = (\forall xSource code \near F, P (f x)).
Proof.
by []. Qed.

Lemma near_map2Used by
  • mathcomp.analysis.topology_theory.product_topology
  • mathcomp.analysis.topology_theory.function_spaces
  • mathcomp.analysis.topology_theory.matrix_topology
  • mathcomp.analysis.topology_theory.one_point_compactification
  • mathcomp.analysis.sequences

Source code
{TSource code T'Source code USource code U'Source code} (fSource code : T -> U) (gSource code : T' -> U')
      (FSource code : set_system T) (GSource code : set_system T') (PSource code : U -> set U') :
  Filter F -> Filter G ->
  (\forall ySource code \near f @ F & y'Source code \near g @ G, P y y') =
  (\forall xSource code \near F     & x'Source code \near G     , P (f x) (g x')).
Proof.
move=> FF FG; rewrite propeqE; split=> -[[A B] /= [fFA fGB] ABP].
  exists (f @^-1` A, g @^-1` B) => //= -[x y /=] xyAB.
  by apply: (ABP (_, _)); apply: xyAB.
exists (f @` A, g @` B) => //=; last first.
  by move=> -_ [/= [x Ax <-] [x' Bx' <-]]; apply: (ABP (_, _)).
rewrite !nbhs_simpl /fmap /=; split.
  by apply: filterS fFA=> x Ax; exists x.
by apply: filterS fGB => x Bx; exists x.
Qed.

Lemma near_mapiUsed by
  • mathcomp.analysis.topology_theory.pseudometric_structure

Source code
{TSource code USource code} (fSource code : T -> set U) (FSource code : set_system T) (PSource code : set U) :
  (\forall ySource code \near f `@ F, P y) = (\forall xSource code \near F, exists ySource code, f x y /\ P y).
Proof.
by []. Qed.

Lemma filter_pair_setSource code (TSource code T'Source code : Type) (FSource code : set_system T) (F'Source code : set_system T') :
   Filter F -> Filter F' ->
   forall (PSource code : set T) (P'Source code : set T') (QSource code : set (T * T')),
   (forall xSource code x'Source code, P x -> P' x' -> Q (x, x')) -> F P /\ F' P' ->
   filter_prod F F' Q.
Proof.
by move=> FF FF' P P' Q PQ [FP FP'];
   near=> x do [have := PQ x.1 x.2; rewrite -surjective_pairing; apply];
   [apply: cvg_fst | apply: cvg_snd].
Unshelve. all: by end_near. Qed.

Lemma filter_pair_near_ofSource code (TSource code T'Source code : Type) (FSource code : set_system T) (F'Source code : set_system T') :
   Filter F -> Filter F' ->
   forall (PSource code : @in_filter T F) (P'Source code : @in_filter T' F') (QSource code : set (T * T')),
   (forall xSource code x'Source code, prop_of P x -> prop_of P' x' -> Q (x, x')) ->
   filter_prod F F' Q.
Proof.
move=> FF FF' [P FP] [P' FP'] Q PQ; rewrite prop_ofE in FP FP' PQ.
by exists (P, P') => //= -[t t'] [] /=; exact: PQ.
Qed.

Tactic Notation "near=>" ident(x) ident(y) :=
  (apply: filter_pair_near_of => x y ? ?).
Tactic Notation "near" constr(F) "=>" ident(x) ident(y) :=
  apply: (have_near F); near=> x y.

Module Export NearMapSource code.
Definition near_simpl

frechet_filter : forall [T : Type], set (set T) frechet_filter is not universe polymorphic Arguments frechet_filter [T]%_type_scope _ frechet_filter is transparent Expands to: Constant mathcomp.classical.filter.frechet_filter Declared in library mathcomp.classical.filter, line 1009, characters 11-25


Used by
  • mathcomp.analysis.ereal
  • mathcomp.analysis.topology_theory.pseudometric_structure
  • mathcomp.analysis.topology_theory.uniform_structure
  • mathcomp.analysis.topology_theory.topology_structure
  • mathcomp.analysis.topology_theory.function_spaces
  • mathcomp.analysis.topology_theory.matrix_topology
  • mathcomp.analysis.topology_theory.num_topology
  • mathcomp.analysis.normedtype_theory.pseudometric_normed_Zmodule

Source code
:= (@near_simpl, @near_map, @near_mapi, @near_map2).
Ltac near_simpl := rewrite ?near_simpl.
End NearMap.

Lemma filterNUsed by
  • mathcomp.analysis.normedtype_theory.num_normedtype

Source code
{RSource code : numDomainType} (PSource code : pred R) (FSource code : set_system R) :
  (\forall xSource code \near - x @[xSource code --> F], (P \o -%R) x) = \forall xSource code \near F, P x.
Proof.
by rewrite near_simpl/= !nearE; under eq_fun do rewrite opprK. Qed.

Lemma cvg_pairUsed by
  • mathcomp.analysis.topology_theory.topology_structure
  • mathcomp.analysis.topology_theory.function_spaces
  • mathcomp.analysis.derive
  • mathcomp.analysis.normedtype_theory.pseudometric_normed_Zmodule
  • mathcomp.analysis.normedtype_theory.tvs

Source code
{TSource code USource code VSource code FSource code} {GSource code : set_system U} {HSource code : set_system V}
  {FFSource code : Filter F} {FGSource code : Filter G} {FHSource code : Filter H} (fSource code : T -> U) (gSource code : T -> V) :
  f @ F --> G -> g @ F --> H ->
  (f x, g x) @[xSource code --> F] --> (G, H).
Proof.
move=> fFG gFH P; rewrite !near_simpl => -[[A B] /=[GA HB] ABP]; near=> x.
by apply: (ABP (_, _)); split=> //=; near: x; [apply: fFG|apply: gFH].
Unshelve. all: by end_near. Qed.

Lemma cvg_comp2Used by
  • mathcomp.analysis.derive
  • mathcomp.analysis.normedtype_theory.normed_module

Source code
{TSource code USource code VSource code WSource code}
  {FSource code : set_system T} {GSource code : set_system U} {HSource code : set_system V} {ISource code : set_system W}
  {FFSource code : Filter F} {FGSource code : Filter G} {FHSource code : Filter H}
  (fSource code : T -> U) (gSource code : T -> V) (hSource code : U -> V -> W) :
  f @ F --> G -> g @ F --> H ->
  h (fst x) (snd x) @[xSource code --> (G, H)] --> I ->
  h (f x) (g x) @[xSource code --> F] --> I.
Proof.
by move=> fFG gFH hGHI P /= IP; apply: cvg_pair (hGHI _ IP). Qed.
Arguments cvg_comp2 {T U V W F G H I FF FG FH f g h} _ _ _.
Definition cvg_to_comp_2

prod_filter_on : forall [T U : Type], filter_on T -> filter_on U -> filter_on (T * U) prod_filter_on is not universe polymorphic Arguments prod_filter_on [T U]%_type_scope F G prod_filter_on is transparent Expands to: Constant mathcomp.classical.filter.prod_filter_on Declared in library mathcomp.classical.filter, line 1038, characters 10-24


Source code
:= @cvg_comp2.


Restriction of a filter to a domain

Section within.
Context {TSource code : Type}.
Implicit Types (D : set T) (F : set_system T).

Definition within

in_filter_prod : forall {T U : Type} {F : set_system T} {G : set_system U}, in_filter (T:=T) F -> in_filter (T:=U) G -> in_filter (T:=T * U) (filter_prod F G) in_filter_prod is not universe polymorphic Arguments in_filter_prod {T U}%_type_scope {F G} P Q in_filter_prod is transparent Expands to: Constant mathcomp.classical.filter.in_filter_prod Declared in library mathcomp.classical.filter, line 1064, characters 19-33


Used by
  • mathcomp.analysis.topology_theory.pseudometric_structure
  • mathcomp.analysis.topology_theory.topology_structure
  • mathcomp.analysis.topology_theory.function_spaces
  • mathcomp.analysis.topology_theory.num_topology
  • mathcomp.analysis.topology_theory.subspace_topology
  • mathcomp.analysis.topology_theory.compact
  • mathcomp.analysis.normedtype_theory.pseudometric_normed_Zmodule
  • mathcomp.analysis.normedtype_theory.num_normedtype
  • mathcomp.analysis_stdlib.showcase.uniform_bigO

Source code
DSource code FSource code : set_system T := [set PSource code | {near F, D `<=` P}].
Arguments within : simpl never.

Lemma near_withinEUsed by
  • mathcomp.analysis.realfun
  • mathcomp.analysis.topology_theory.pseudometric_structure
  • mathcomp.analysis.topology_theory.metric_structure
  • mathcomp.analysis.topology_theory.uniform_structure
  • mathcomp.analysis.topology_theory.function_spaces
  • mathcomp.analysis.topology_theory.num_topology
  • mathcomp.analysis.derive
  • mathcomp.analysis.normedtype_theory.pseudometric_normed_Zmodule
  • mathcomp.analysis.normedtype_theory.matrix_normedtype
  • mathcomp.analysis.normedtype_theory.num_normedtype

Source code
DSource code FSource code (PSource code : set T) :
  (\forall xSource code \near within D F, P x) = {near F, D `<=` P}.
Proof.
by []. Qed.

Lemma withinTUsed by
  • mathcomp.analysis.topology_theory.topology_structure
  • mathcomp.analysis.topology_theory.function_spaces
  • mathcomp.analysis.topology_theory.separation_axioms
  • mathcomp.analysis.topology_theory.subspace_topology
  • mathcomp.analysis_stdlib.showcase.uniform_bigO

Source code
FSource code DSource code : Filter F -> within D F D.
Proof.
by move=> FF; rewrite /within/=; apply: filterE. Qed.

Lemma near_withinTSource code FSource code DSource code : Filter F -> \forall xSource code \near within D F, D x.
Proof.
exact: withinT. Qed.

Lemma cvg_withinUsed by
  • mathcomp.analysis.topology_theory.uniform_structure
  • mathcomp.analysis.topology_theory.topology_structure
  • mathcomp.analysis.topology_theory.function_spaces
  • mathcomp.analysis.topology_theory.separation_axioms
  • mathcomp.analysis.topology_theory.subspace_topology
  • mathcomp.analysis.derive
  • mathcomp.analysis.normedtype_theory.pseudometric_normed_Zmodule
  • mathcomp.analysis.normedtype_theory.num_normedtype

Source code
{FSource code} {FFSource code : Filter F} DSource code : within D F --> F.
Proof.
by move=> P; apply: filterS. Qed.

Lemma withinETUsed by
  • mathcomp.analysis.topology_theory.pseudometric_structure
  • mathcomp.analysis.topology_theory.function_spaces
  • mathcomp.analysis.topology_theory.separation_axioms
  • mathcomp.analysis.normedtype_theory.normed_module

Source code
{FSource code} {FFSource code : Filter F} : within setT F = F.
Proof.
rewrite eqEsubset /within; split => X //=;
by apply: filter_app => //=; apply: nearW => // x; apply.
Qed.

End within.

Lemma cvg_to_withinPSource code (TSource code USource code : Type) {FSource code : set_system T} {FFSource code : Filter F}
    {GSource code : set_system U} {FGSource code : Filter G} (fSource code : T -> U) (ASource code : set U) :
  (f @ F --> within A G) <-> (f @ F --> G /\ \forall xSource code \near F, A (f x)).
Proof.
split.
- move=> fFAG; split.
  + exact/(cvg_trans fFAG)/cvg_within.
  + by apply/fFAG; exact: withinT.
- move=> [+ fA] B => /[apply]; rewrite nbhs_simpl.
  by apply: filterS2 fA => t ?; exact.
Unshelve. all: by end_near. Qed.

Global Instance within_filterUsed by
  • mathcomp.analysis.topology_theory.topology_structure

Source code
TSource code DSource code FSource code : Filter F -> Filter (@within T D F).
Proof.
move=> FF; rewrite /within; constructor => /=.
- exact: filterE.
- by move=> P Q/=; apply: filterS2 => x DP DQ Dx; split; [exact: DP|exact: DQ].
- by move=> P Q subPQ; apply: filterS => x DP /DP /subPQ.
Qed.

#[global] Typeclasses Opaque within.

Canonical within_filter_on

near_simpl : (forall (U : Type) (T : filteredType U) (x : T) (P : set U), (\forall x0 \near nbhs x, P x0) = (\forall x0 \near x, P x0)) * (forall (X : Type) (fX : filteredType X) (x : fX) (P : set X), nbhs x P = (\forall x0 \near x, P x0)) * (forall (T : Type) (F : filter_on T) (P : set T), (\forall x \near F, P x) = (\forall x \near F, P x)) * (forall (T U : Type) (f : T -> U) (F : set_system T) (P : set U), (\forall y \near (f x @[x --> F])%classic, P y) = (\forall x \near F, P (f x))) * (forall (T U : Type) (f : T -> set U) (F : set_system T) (P : set U), (\forall y \near (f x `@[x --> F])%classic, P y) = (\forall x \near F, exists y : U, f x y /\ P y)) * (forall (T T' U U' : Type) (f : T -> U) (g : T' -> U') (F : set_system T) (G : set_system T') (P : U -> set U'), Filter F -> Filter G -> (\forall y \near (f x @[x --> F])%classic & y' \near (g x @[x --> G])%classic, P y y') = (\forall x \near F & x' \near G, P (f x) (g x'))) near_simpl is not universe polymorphic near_simpl is transparent Expands to: Constant mathcomp.classical.filter.NearMap.near_simpl Declared in library mathcomp.classical.filter, line 1134, characters 11-21


Source code
TSource code DSource code (FSource code : filter_on T) :=
  FilterType (within D F) (within_filter _ _).

Lemma within_cvg_to_withinUsed by
  • mathcomp.analysis.realfun

Source code
{TSource code USource code : Type} {FSource code : set_system T} {FFSource code : Filter F}
    {GSource code : set_system U} {FGSource code : Filter G} (fSource code : T -> U) (ASource code : set T) (BSource code : set U) :
  (\forall xSource code \near F, A x -> B (f x)) -> f @ F --> G ->
  f @ within A F --> within B G.
Proof.
move=> near_hom fFG; apply/cvg_to_withinP; split.
- by apply: cvg_trans fFG; apply: cvg_app; exact: cvg_within.
- by rewrite near_withinE.
Qed.

Lemma filter_bigI_withinUsed by
  • mathcomp.analysis.topology_theory.function_spaces

Source code
TSource code (ISource code : choiceType) (DSource code : {fset I}) (fSource code : I -> set T)
    (FSource code : set_system T) (PSource code : set T) :
  Filter F -> (forall iSource code, i \in D -> F [set jSource code | P j -> f i j]) ->
  F ([set jSource code | P j -> (\bigcap_(iSource code in [set` D]) f i) j]).
Proof.
move=> FF FfD; exact: (@filter_bigI T I D f _ (within_filter P FF)). Qed.

Definition subset_filter

cvg_to_comp_2 : forall [T U V W : Type] [F : set_system T] [G : set_system U] [H : set_system V] [I : set_system W], Filter F -> Filter G -> Filter H -> forall [f : T -> U] [g : T -> V] [h : U -> V -> W], (f x @[x --> F] --> G)%classic -> (g x @[x --> F] --> H)%classic -> (h x.1 x.2 @[x --> (G, H)] --> I)%classic -> (h (f x) (g x) @[x --> F] --> I)%classic cvg_to_comp_2 is not universe polymorphic Expanded type for implicit arguments cvg_to_comp_2 : forall [T U V W : Type] [F : set_system T] [G : set_system U] [H : set_system V] [I : set_system W], Filter F -> Filter G -> Filter H -> forall [f : T -> U] [g : T -> V] [h : U -> V -> W], (f x @[x --> F] --> G)%classic -> (g x @[x --> F] --> H)%classic -> (h x.1 x.2 @[x --> (G, H)] --> I)%classic -> forall [t : set W], nbhs I t -> F ((fun x : T => h (f x) (g x)) @^-1` t)%classic Arguments cvg_to_comp_2 [T U V W]%_type_scope [F G H I] FF FG FH [f g h]%_function_scope _ _ _ [t] _ cvg_to_comp_2 is transparent Expands to: Constant mathcomp.classical.filter.cvg_to_comp_2 Declared in library mathcomp.classical.filter, line 1160, characters 11-24


Source code
{TSource code} (FSource code : set_system T) (DSource code : set T) :=
  [set PSource code : set {xSource code | D x} | F [set xSource code | forall DxSource code : D x, P (exist _ x Dx)]].
Arguments subset_filter {T} F D _.

Global Instance subset_filter_filterSource code TSource code FSource code (DSource code : set T) :
  Filter F -> Filter (subset_filter F D).
Proof.
move=> FF; constructor; rewrite /subset_filter/=.
- exact: filterE.
- by move=> P Q/=; exact: filterS2.
- by move=> P Q subPQ; apply: filterS => R PD Dx; apply: subPQ.
Qed.
#[global] Typeclasses Opaque subset_filter.

Lemma subset_filter_properSource code {TSource code FSource code} {FFSource code : Filter F} (DSource code : set T) :
  (forall PSource code, F P -> ~ ~ exists xSource code, D x /\ P x) ->
  ProperFilter (subset_filter F D).
Proof.
move=> DAP; apply: Build_ProperFilter; rewrite /subset_filter => subFD.
by have /(_ subFD) := DAP (~` D); apply => -[x [dx /(_ dx)]].
Qed.

Section NearSet.
Context {YSource code : Type} (FSource code : set_system Y) (PFSource code : ProperFilter F).

Definition powerset_filter_from

within : forall {T : Type}, set T -> set_system T -> set_system T within is not universe polymorphic Arguments within {T}%_type_scope D%_classical_set_scope F _ within is transparent Expands to: Constant mathcomp.classical.filter.within Declared in library mathcomp.classical.filter, line 1182, characters 11-17


Used by
  • mathcomp.analysis.topology_theory.function_spaces
  • mathcomp.analysis.topology_theory.separation_axioms
  • mathcomp.analysis.topology_theory.subspace_topology
  • mathcomp.analysis.topology_theory.compact

Source code
: set_system (set Y) := filter_from
  [set MSource code | [/\ M `<=` F,
    (forall E1Source code E2Source code, M E1 -> F E2 -> E2 `<=` E1 -> M E2) & M !=set0 ] ]
  id.

Global Instance powerset_filter_from_filterUsed by
  • mathcomp.analysis.topology_theory.separation_axioms

Source code
: ProperFilter powerset_filter_from.
Proof.
split.
  by move=> [W [_ _ [N +]]]; rewrite subset0 => /[swap] ->; apply.
apply: filter_from_filter.
  by exists F; split => //; exists setT; exact: filterT.
move=> M N /= [entM subM [M0 MM0]] [entN subN [N0 NN0]].
exists [set ESource code | exists PSource code QSource code, [/\ M P, N Q & E = P `&` Q] ]; first split.
- by move=> ? [? [? [? ? ->]]]; apply: filterI; [exact: entM | exact: entN].
- move=> ? E2 [P [Q [MP MQ ->]]] entE2 E2subPQ; exists E2, E2.
  split; last by rewrite setIid.
  + by apply: (subM _ _ MP) => // ? /E2subPQ [].
  + by apply: (subN _ _ MQ) => // ? /E2subPQ [].
- by exists (M0 `&` N0), M0, N0.
- move=> E /= [P [Q [MP MQ ->]]]; have entPQ : F (P `&` Q).
    by apply: filterI; [exact: entM | exact: entN].
  by (split; [apply: (subM _ _ MP) | apply: (subN _ _ MQ)]) => // ? [].
Qed.

Lemma near_small_setUsed by
  • mathcomp.analysis.topology_theory.function_spaces

Source code
: \forall ESource code \near powerset_filter_from, F E.
Proof.
by exists F => //; split => //; exists setT; exact: filterT. Qed.

Lemma small_set_subUsed by
  • mathcomp.analysis.topology_theory.function_spaces
  • mathcomp.analysis.topology_theory.separation_axioms
  • mathcomp.analysis.topology_theory.compact

Source code
 (ESource code : set Y) : F E ->
  \forall E'Source code \near powerset_filter_from, E' `<=` E.
Proof.
move=> entE; exists [set E'Source code | F E' /\ E' `<=` E]; last by move=> ? [].
split; [by move=> E' [] | | by exists E; split].
by move=> E1 E2 [] ? subE ? ?; split => //; exact: subset_trans subE.
Qed.

Lemma near_powerset_filter_fromPUsed by
  • mathcomp.analysis.topology_theory.function_spaces
  • mathcomp.analysis.topology_theory.separation_axioms
  • mathcomp.analysis.topology_theory.subspace_topology

Source code
 (PSource code : set Y -> Prop) :
  (forall ASource code BSource code, A `<=` B -> P B -> P A) ->
  (\forall USource code \near powerset_filter_from, P U) <-> exists2 USource code, F U & P U.
Proof.
move=> Psub; split=> [[M [FM ? [U MU]]] MsubP|[U FU PU]].
  by exists U; [exact: FM | exact: MsubP].
exists [set VSource code | F V /\ V `<=` U]; last by move=> V [_] /Psub; exact.
split=> [E [] //| |]; last by exists U; split.
by move=> E1 E2 [F1 E1U F2 E2subE1]; split => //; exact: subset_trans E1U.
Qed.

Lemma powerset_filter_fromPUsed by
  • mathcomp.analysis.topology_theory.separation_axioms

Source code
CSource code :
  F C -> powerset_filter_from [set WSource code | F W /\ W `<=` C].
Proof.
move=> FC; exists [set WSource code | F W /\ W `<=` C] => //; split; first by move=> ? [].
  by move=> A B [_ AC] FB /subset_trans/(_ AC).
by exists C; split.
Qed.

End NearSet.

Lemma near_powerset_mapSource code {TSource code USource code : Type} (fSource code : T -> U) (FSource code : set_system T)
  (PSource code : set U -> Prop) :
  ProperFilter F ->
  (\forall ySource code \near powerset_filter_from (f x @[xSource code --> F]), P y) ->
  (\forall ySource code \near powerset_filter_from F, P (f @` y)).
Proof.
move=> FF [] G /= [Gf Gs [D GD GP]].
have PpF : ProperFilter (powerset_filter_from F).
  exact: powerset_filter_from_filter.
have /= := Gf _ GD; rewrite nbhs_simpl => FfD.
near=> M; apply: GP; apply: (Gs D) => //.
  apply: filterS; first exact: preimage_image.
  exact: (near (near_small_set _) M).
have : M `<=` f @^-1` D by exact: (near (small_set_sub FfD) M).
by move/image_subset/subset_trans; apply; exact: image_preimage_subset.
Unshelve. all: by end_near. Qed.

Lemma near_powerset_map_monoESource code {TSource code USource code : Type} (fSource code : T -> U) (FSource code : set_system T)
  (PSource code : set U -> Prop) :
  (forall XSource code YSource code, X `<=` Y -> P Y -> P X) ->
  ProperFilter F ->
  (\forall ySource code \near powerset_filter_from F, P (f @` y)) =
  (\forall ySource code \near powerset_filter_from (f x @[xSource code --> F]), P y).
Proof.
move=> Pmono FF; rewrite propeqE; split; last exact: near_powerset_map.
case=> G /= [Gf Gs [D GD GP]].
have PpF : ProperFilter (powerset_filter_from (f x @[xSource code-->F])).
  exact: powerset_filter_from_filter.
have /= := Gf _ GD; rewrite nbhs_simpl => FfD; have ffiD : fmap f F (f@` D).
  by rewrite /fmap /=; apply: filterS; first exact: preimage_image.
near=> M; have FfM : fmap f F M by exact: (near (near_small_set _) M).
apply: (@Pmono _ (f @` D)); first exact: (near (small_set_sub ffiD) M).
exact: GP.
Unshelve. all: by end_near. Qed.

Section PrincipalFilters.

Definition principal_filter

within_filter_on : forall [T : Type], set T -> filter_on T -> filter_on T within_filter_on is not universe polymorphic Arguments within_filter_on [T]%_type_scope D%_classical_set_scope F within_filter_on is transparent Expands to: Constant mathcomp.classical.filter.within_filter_on Declared in library mathcomp.classical.filter, line 1228, characters 10-26


Used by
  • mathcomp.analysis.topology_theory.topology_structure
  • mathcomp.analysis.topology_theory.nat_topology
  • mathcomp.analysis.topology_theory.discrete_topology
  • mathcomp.analysis.topology_theory.bool_topology

Source code
{XSource code : Type} (xSource code : X) : set_system X :=
  globally [set x].

we introducing an alias for pointed types with principal filters
Definition principal_filter_type

subset_filter : forall [T : finType] (p : T -> bool) [s1 s2 : seq T], s1 \subset s2 -> [seq a <- s1 | p a] \subset [seq a <- s2 | p a] subset_filter is not universe polymorphic Arguments subset_filter [T] p%_function_scope [s1 s2]%_seq_scope _ subset_filter is opaque Expands to: Constant mathcomp.boot.fintype.subset_filter Declared in library mathcomp.boot.fintype, line 710, characters 6-19


Source code
 (PSource code : Type) : Type := P.
HBSource code.instanceSource code DefinitionSource code _Source code (PSource code :Source code choiceTypeSource code) :=
  Choice.copy (principal_filter_type P) P.
HBSource code.instanceSource code DefinitionSource code _Source code (PSource code :Source code pointedTypeSource code) :=
  Pointed.on (principal_filter_type P).
HBSource code.instanceSource code DefinitionSource code _Source code (PSource code :Source code choiceTypeSource code) :=
  hasNbhs.Build (principal_filter_type P) principal_filter.
HBSource code.instanceSource code DefinitionSource code _Source code (PSource code :Source code pointedTypeSource code) :=
  Filtered.on (principal_filter_type P).

Lemma principal_filterPUsed by
  • mathcomp.analysis.topology_theory.topology_structure
  • mathcomp.analysis.topology_theory.nat_topology
  • mathcomp.analysis.topology_theory.discrete_topology
  • mathcomp.analysis.topology_theory.bool_topology
  • mathcomp.analysis.derive
  • mathcomp.analysis.sequences

Source code
{XSource code} (xSource code : X) (WSource code : set X) : principal_filter x W <-> W x.
Proof.
by split=> [|? ? ->]; [exact|]. Qed.

Lemma principal_filter_properUsed by
  • mathcomp.analysis.topology_theory.discrete_topology

Source code
{XSource code} (xSource code : X) : ProperFilter (principal_filter x).
Proof.
exact: globally_properfilter. Qed.

HBSource code.instanceSource code DefinitionSource code _Source code :=Source code hasNbhsSource code.Build bool principal_filter.

End PrincipalFilters.

Section UltraFilters.

Class UltraFilterUsed by
  • mathcomp.analysis.topology_theory.function_spaces
  • mathcomp.analysis.topology_theory.compact

Source code
TSource code (FSource code : set_system T) := {
  #[global] ultra_properUsed by
  • mathcomp.analysis.topology_theory.compact

Source code
:: ProperFilter F ;
  max_filterUsed by
  • mathcomp.analysis.topology_theory.compact

Source code
: forall GSource code : set_system T, ProperFilter G -> F `<=` G -> G = F
}.

Lemma ultraFilterLemmaUsed by
  • mathcomp.analysis.topology_theory.compact

Source code
TSource code (FSource code : set_system T) :
  ProperFilter F -> exists GSource code, UltraFilter G /\ F `<=` G.
Proof.
move=> FF.
set filter_preordset := ({GSource code : set_system T & ProperFilter G /\ F `<=` G}).
set preorder :=
  fun G1Source code G2Source code : {classic filter_preordset} => `[< projT1 G1 `<=` projT1 G2 >].
suff [G Gmax] : exists GSource code : {classic filter_preordset}, premaximal preorder G.
  have [GF sFG] := projT2 G; exists (projT1 G); split; last exact: sFG.
  split; [exact: GF|move=> H HF sGH].
  have sFH : F `<=` H by apply: subset_trans sGH.
  have sHG : preorder (existT _ H (conj HF sFH)) G.
    by move/asboolP in sGH; exact: (Gmax (existT _ H (conj HF sFH)) sGH).
  by rewrite predeqE => A; split; [move/asboolP : sHG; exact|exact: sGH].
have sFF : F `<=` F by [].
apply: (ZL_preorder (existT _ F (conj FF sFF))).
- by move=> t; exact/asboolP.
- move=> r s t; rewrite /preorder => /asboolP sr /asboolP st.
  exact/asboolP/(subset_trans _ st).
- move=> A Atot; have [[G AG] | A0] := pselect (A !=set0); last first.
    exists (existT _ F (conj FF sFF)) => G AG.
    by have /asboolP := A0; rewrite asbool_neg => /forallp_asboolPn /(_ G).
  have [GF sFG] := projT2 G.
  suff UAF : ProperFilter (\bigcup_(HSource code in A) projT1 H).
    have sFUA : F `<=` \bigcup_(HSource code in A) projT1 H.
      by move=> B FB; exists G => //; exact: sFG.
    exists (existT _ (\bigcup_(HSource code in A) projT1 H) (conj UAF sFUA)) => H AH.
    by apply/asboolP => B HB /=; exists H.
  apply: Build_ProperFilter_ex.
    by move=> B [H AH HB]; have [HF _] := projT2 H; exact: (@filter_ex _ _ HF).
  split; first by exists G => //; apply: filterT.
  + move=> B C [HB AHB HBB] [HC AHC HCC]; have [sHBC|sHCB] := Atot _ _ AHB AHC.
    * exists HC => //; have [HCF _] := projT2 HC; apply: filterI HCC.
      by move/asboolP : sHBC; exact.
    * exists HB => //; have [HBF _] := projT2 HB; apply: filterI HBB _.
      by move/asboolP : sHCB; exact.
  + move=> B C SBC [H AH HB]; exists H => //; have [HF _] := projT2 H.
    exact: filterS HB.
Qed.

Lemma filter_imageSource code (TSource code USource code : Type) (fSource code : T -> U) (FSource code : set_system T) :
  Filter F -> f @` setT = setT -> Filter [set f @` A | ASource code in F].
Proof.
move=> FF fsurj; split.
- by exists setT => //; apply: filterT.
- move=> _ _ [A FA <-] [B FB <-].
  exists (f @^-1` (f @` A `&` f @` B)); last by rewrite image_preimage.
  have sAB : A `&` B `<=` f @^-1` (f @` A `&` f @` B).
    by move=> x [Ax Bx]; split; exists x.
  by apply: filterS sAB _; apply: filterI.
- move=> A B sAB [C FC fC_eqA].
  exists (f @^-1` B); last by rewrite image_preimage.
  by apply: filterS FC => p Cp; apply: sAB; rewrite -fC_eqA; exists p.
Qed.

Lemma proper_imageSource code (TSource code USource code : Type) (fSource code : T -> U) (FSource code : set_system T) :
  ProperFilter F -> f @` setT = setT -> ProperFilter [set f @` A | ASource code in F].
Proof.
move=> FF fsurj; apply: Build_ProperFilter_ex; last exact: filter_image.
by move=> _ [A FA <-]; have /filter_ex [p Ap] := FA; exists (f p), p.
Qed.

Lemma principal_filter_ultraSource code {TSource code : Type} (xSource code : T) :
  UltraFilter (principal_filter x).
Proof.
split=> [|G [G0 xG] FG]; first exact: principal_filter_proper.
rewrite eqEsubset; split => // U GU; apply/principal_filterP.
have /(filterI GU): G [set x] by exact/FG/principal_filterP.
by rewrite setIC set1I; case: ifPn => // /[!inE].
Qed.

Lemma in_ultra_setVsetCUsed by
  • mathcomp.analysis.topology_theory.compact

Source code
TSource code (FSource code : set_system T) (ASource code : set T) :
  UltraFilter F -> F A \/ F (~` A).
Proof.
move=> FU; case: (pselect (F (~` A))) => [|nFnA]; first by right.
left; suff : ProperFilter (filter_from (F `|` [set A `&` B | BSource code in F]) id).
  move=> /max_filter <-; first by move=> B FB; exists B => //; left.
  by exists A => //; right; exists setT; [exact: filterT|rewrite setIT].
apply: filter_from_proper; last first.
  move=> B [|[C FC <-]]; first exact: filter_ex.
  apply: contrapT => /asboolP; rewrite asbool_neg => /forallp_asboolPn AC0.
  by apply: nFnA; apply: filterS FC => p Cp Ap; exact: (AC0 p).
apply: filter_from_filter.
  by exists A; right; exists setT; [exact: filterT|rewrite setIT].
move=> B C [FB|[DB FDB <-]].
  move=> [FC|[DC FDC <-]]; first by exists (B `&` C)=> //; left; exact: filterI.
  exists (A `&` (B `&` DC)); last by rewrite setICA.
  by right; exists (B `&` DC) => //; exact: filterI.
move=> [FC|[DC FDC <-]].
  exists (A `&` (DB `&` C)); last by rewrite setIA.
  by right; exists (DB `&` C) => //; exact: filterI.
exists (A `&` (DB `&` DC)); last by move=> ??; rewrite setIACA setIid.
by right; exists (DB `&` DC) => //; exact: filterI.
Qed.

Lemma ultra_imageUsed by
  • mathcomp.analysis.topology_theory.function_spaces

Source code
 (TSource code USource code : Type) (fSource code : T -> U) (FSource code : set_system T) :
  UltraFilter F -> f @` setT = setT -> UltraFilter [set f @` A | ASource code in F].
Proof.
move=> FU fsurj; split; first exact: proper_image.
move=> G GF sfFG; rewrite predeqE => A; split; last exact: sfFG.
move=> GA; exists (f @^-1` A); last by rewrite image_preimage.
have [//|FnAf] := in_ultra_setVsetC (f @^-1` A) FU.
have : G (f @` (~` (f @^-1` A))) by apply: sfFG; exists (~` (f @^-1` A)).
suff : ~ G (f @` (~` (f @^-1` A))) by [].
rewrite preimage_setC image_preimage // => GnA.
by have /filter_ex [? []] : G (A `&` (~` A)) by exact: filterI.
Qed.

End UltraFilters.

Section filter_supremums.

Global Instance smallest_filter_filterUsed by
  • mathcomp.analysis.normedtype_theory.urysohn

Source code
{TSource code : Type} (FSource code : set_system T) :
  Filter (smallest Filter F).
Proof.
split.
- by move=> G [? _]; exact: filterT.
- by move=> ? ? sFP sFQ ? [? ?]; apply: filterI; [exact: sFP | exact: sFQ].
- by move=> ? ? /filterS + sFP ? [? ?]; apply; exact: sFP.
Qed.

Fixpoint filterI_iter

powerset_filter_from : forall {Y : Type}, set_system Y -> set_system (set Y) powerset_filter_from is not universe polymorphic Arguments powerset_filter_from {Y}%_type_scope F _ powerset_filter_from is transparent Expands to: Constant mathcomp.classical.filter.powerset_filter_from Declared in library mathcomp.classical.filter, line 1273, characters 11-31


Used by
  • mathcomp.analysis.normedtype_theory.urysohn

Source code
{TSource code : Type} (FSource code : set_system T) (nSource code : nat) :=
  if n is m.+1
  then [set P `&` Q |
    PSource code in filterI_iter F m & QSource code in filterI_iter F m]
  else setT |` F.

Lemma filterI_iter_subSource code {TSource code : Type} (FSource code : set_system T) :
  {homo filterI_iter F : iSource code jSource code / (i <= j)%N >-> i `<=` j}.
Proof.
move=> + j; elim: j; first by move=> i; rewrite leqn0 => /eqP ->.
move=> j IH i; rewrite leq_eqVlt => /predU1P[->//|].
by move=> /IH/subset_trans; apply=> A ?; do 2 exists A => //; rewrite setIid.
Qed.

Lemma filterI_iterEUsed by
  • mathcomp.analysis.normedtype_theory.urysohn

Source code
{TSource code : Type} (FSource code : set_system T) :
  smallest Filter F = filter_from (\bigcup_nSource code (filterI_iter F n)) id.
Proof.
rewrite eqEsubset; split.
  apply: smallest_sub; first last.
    by move=> A FA; exists A => //; exists O => //; right.
  apply: filter_from_filter; first by exists setT; exists O => //; left.
  move=> P Q [i _ sFP] [j _ sFQ]; exists (P `&` Q) => //.
  exists (maxn i j).+1 => //=; exists P.
    by apply: filterI_iter_sub; first exact: leq_maxl.
  by exists Q => //; apply: filterI_iter_sub; first exact: leq_maxr.
move=> + [+ [n _]]; elim: n => [A B|n IH/= A B].
  move=> [-> /[!(@subTset T)] ->|]; first exact: filterT.
  by move=> FB /filterS; apply; apply: sub_gen_smallest.
move=> [P sFP] [Q sFQ] PQB /filterS; apply; rewrite -PQB.
by apply: (filterI _ _); [exact: (IH _ _ sFP)|exact: (IH _ _ sFQ)].
Qed.

Definition open_finI_from

principal_filter : forall {X : Type}, X -> set_system X principal_filter is not universe polymorphic Arguments principal_filter {X}%_type_scope x _ principal_filter is transparent Expands to: Constant mathcomp.classical.filter.principal_filter Declared in library mathcomp.classical.filter, line 1366, characters 11-27


Used by
  • mathcomp.analysis.topology_theory.topology_structure
  • mathcomp.analysis.topology_theory.supremum_topology
  • mathcomp.analysis.normedtype_theory.tvs

Source code
 (ISource code : choiceType) TSource code (DSource code : set I) (fSource code : I -> set T) :=
  [set \bigcap_(iSource code in [set` D']) f i |
    D'Source code in [set ASource code : {fset I} | {subset A <= D}]].

Lemma open_finI_from_coverSource code (ISource code : choiceType) TSource code (DSource code : set I) (fSource code : I -> set T) :
  \bigcup_(ASource code in open_finI_from D f) A = setT.
Proof.
rewrite predeqE => t; split=> // _; exists setT => //.
by exists fset0 => //; rewrite set_fset0 bigcap_set0.
Qed.

Lemma open_finI_from1Used by
  • mathcomp.analysis.topology_theory.compact

Source code
 (ISource code : choiceType) TSource code (DSource code : set I) (fSource code : I -> set T) iSource code :
  D i -> open_finI_from D f (f i).
Proof.
move=> Di; exists [fset i]%fset; first by move=> ?; rewrite !inE => /eqP ->.
by rewrite bigcap_fset big_seq_fset1.
Qed.

Lemma open_finI_from_countableUsed by
  • mathcomp.analysis.topology_theory.supremum_topology

Source code
 (ISource code : pointedType) TSource code (DSource code : set I)
    (fSource code : I -> set T) :
  countable D -> countable (open_finI_from D f).
Proof.
move=> ?; apply: (card_le_trans (card_image_le _ _)).
exact: fset_subset_countable.
Qed.

Lemma open_finI_fromISource code {ISource code : choiceType} {TSource code} DSource code (fSource code : I -> set T) :
  setI_closed (open_finI_from D f).
Proof.
move=> A B; case=> N ND <- [M MD <-]; exists (N `|` M)%fset.
  by move=> ?; rewrite inE => /orP[/ND | /MD].
by rewrite -bigcap_setU set_fsetU.
Qed.

Lemma filterI_iter_finISource code {ISource code : choiceType} TSource code DSource code (fSource code : I -> set T) :
  open_finI_from D f = \bigcup_nSource code (filterI_iter (f @` D) n).
Proof.
rewrite eqEsubset; split.
  move=> A [N /= + <-]; have /finite_setP[n] := finite_fset N; elim: n N.
    move=> ?; rewrite II0 card_eq0 => /eqP -> _; rewrite bigcap_set0.
    by exists O => //; left.
  move=> n IH N /eq_cardSP[x Ax + ND]; rewrite -set_fsetD1 => Nxn.
  have NxD : {subset (N `\ x)%fset <= D}.
    by move=> ?; rewrite ?inE => /andP [_ /ND /set_mem].
  have [r _ xr] := IH _ Nxn NxD; exists r.+1 => //; exists (f x).
    apply: (@filterI_iter_sub _ _ O) => //; right; exists x => //.
    by rewrite -inE; apply: ND.
  exists (\bigcap_(iSource code in [set` (N `\ x)%fset]) f i) => //.
  by rewrite -bigcap_setU1 set_fsetD1 setD1K.
move=> A [n _]; elim: n A.
  (move=> a [-> |[i Di <-]]; [exists fset0 | exists [fset i]%fset]) => //.
  - by rewrite set_fset0 bigcap_set0.
  - by move=> ?; rewrite !inE => /eqP ->.
  - by rewrite set_fset1 bigcap_set1.
by move=> n IH A /= [B snB [C snC <-]]; apply: open_finI_fromI; exact: IH.
Qed.

Lemma smallest_filter_finIUsed by
  • mathcomp.analysis.normedtype_theory.urysohn

Source code
{ISource code TSource code : choiceType} (DSource code : set I) (fSource code : I -> set T) :
  filter_from (open_finI_from D f) id = smallest (@Filter T) (f @` D).
Proof.

End filter_supremums.
#[deprecated(since="mathcomp-analysis 1.17.0", use=open_finI_from)]
Notation finI_fromSource code := open_finI_from (only parsing).
#[deprecated(since="mathcomp-analysis 1.17.0", use=open_finI_from_cover)]
Notation finI_from_coverSource code := open_finI_from_cover (only parsing).
#[deprecated(since="mathcomp-analysis 1.17.0", use=open_finI_from1)]
Notation finI_from1Source code := open_finI_from1 (only parsing).
#[deprecated(since="mathcomp-analysis 1.17.0", use=open_finI_from_countable)]
Notation finI_from_countableSource code := open_finI_from_countable (only parsing).
#[deprecated(since="mathcomp-analysis 1.17.0", use=open_finI_fromI)]
Notation finI_fromISource code := open_finI_fromI (only parsing).

Definition finI

principal_filter_type : Type -> Type principal_filter_type is not universe polymorphic Arguments principal_filter_type P%_type_scope principal_filter_type is transparent Expands to: Constant mathcomp.classical.filter.principal_filter_type Declared in library mathcomp.classical.filter, line 1370, characters 11-32


Used by
  • mathcomp.analysis.topology_theory.compact

Source code
 (ISource code : choiceType) TSource code (DSource code : set I) (fSource code : I -> set T) :=
  forall D'Source code : {fset I}, {subset D' <= D} ->
  \bigcap_(iSource code in [set iSource code | i \in D']) f i !=set0.

Lemma finI_filterUsed by
  • mathcomp.analysis.topology_theory.supremum_topology
  • mathcomp.analysis.topology_theory.compact

Source code
 (ISource code : choiceType) TSource code (DSource code : set I) (fSource code : I -> set T) :
  finI D f -> ProperFilter (filter_from (open_finI_from D f) id).
Proof.
move=> finIf; apply: (filter_from_proper (filter_from_filter _ _)).
- by exists setT; exists fset0 => //; rewrite predeqE.
- move=> A B [DA sDA IfA] [DB sDB IfB]; exists (A `&` B) => //.
  exists (DA `|` DB)%fset.
    by move=> ?; rewrite inE => /orP [/sDA|/sDB].
  rewrite -IfA -IfB predeqE => p; split=> [Ifp|[IfAp IfBp] i].
    by split=> i Di; apply: Ifp; rewrite /= inE Di // orbC.
  by rewrite /= inE => /orP []; [apply: IfAp|apply: IfBp].
- by move=> _ [?? <-]; apply: finIf.
Qed.

Lemma filter_finIUsed by
  • mathcomp.analysis.topology_theory.compact

Source code
 (TSource code : choiceType) (FSource code : set_system T) (DSource code : set_system T)
  (fSource code : set T -> set T) :
  ProperFilter F -> (forall ASource code, D A -> F (f A)) -> finI D f.
Proof.
move=> FF sDFf D' sD; apply: (@filter_ex _ F); apply: filter_bigI.
by move=> A /sD; rewrite inE => /sDFf.
Qed.

Lemma meets_globallylUsed by
  • mathcomp.analysis.topology_theory.topology_structure
  • mathcomp.analysis.topology_theory.separation_axioms

Source code
TSource code (ASource code : set T) GSource code :
  globally A `#` G = forall BSource code, G B -> A `&` B !=set0.
Proof.
rewrite propeqE; split => [/(_ _ _ (fun=> id))//|clA A' B sA].
by move=> /clA; apply: subsetI_neq0.
Qed.

Lemma meets_globallyrUsed by
  • mathcomp.analysis.topology_theory.separation_axioms

Source code
TSource code FSource code (BSource code : set T) :
  F `#` globally B = forall ASource code, F A -> A `&` B !=set0.
Proof.
by rewrite meetsC meets_globallyl; under eq_forall do rewrite setIC.
Qed.

Lemma meetsxxSource code TSource code (FSource code : set_system T) (FFSource code : Filter F) : F `#` F = (~ (F set0)).
Proof.
rewrite propeqE; split => [FmF F0|]; first by have [x []] := FmF _ _ F0 F0.
move=> FN0 A B /filterI FAI {}/FAI FAB; apply/set0P/eqP => AB0.
by rewrite AB0 in FAB.
Qed.

Lemma proper_meetsxxUsed by
  • mathcomp.analysis.topology_theory.separation_axioms

Source code
TSource code (FSource code : set_system T) (FFSource code : ProperFilter F) : F `#` F.
Proof.
by rewrite meetsxx. Qed.