Module mathcomp.classical.cardinality
From HB Require Import structures.From mathcomp Require Import boot order finmap ssralg ssrnum ssrint rat.
From mathcomp Require Import boolp classical_sets functions.
Unset SsrOldRewriteGoalsOrder.
Set Implicit Arguments.
Unset Strict Implicit.
Unset Printing Implicit Defensive.
Reserved Notation "A '#<=' B" (at level 79, format "A '#<=' B").
Reserved Notation "A '#>=' B" (at level 79, format "A '#>=' B").
Reserved Notation "A '#=' B" (at level 79, format "A '#=' B").
Reserved Notation "A '#!=' B" (at level 79, format "A '#!=' B").
Import Order.Theory GRing.Theory.
Local Open Scope classical_set_scope.
Local Open Scope ring_scope.
Local Open Scope function_scope.
Declare Scope card_scope.
Delimit Scope card_scope with card.
Local Open Scope card_scope.
Definition card_le
Source code TSource code USource code (ASource code : set T) (BSource code : set U) :=
`[< $|{injfun [set: A] >-> [set: B]}| >].
Notation "A '#<=' B"Source code := (card_le A B) : card_scope.
Notation "A '#>=' B"Source code := (card_le B A) (only parsing) : card_scope.
Definition card_eq
Source code TSource code USource code (ASource code : set T) (BSource code : set U) :=
`[< $|{bij [set: A] >-> [set: B]}| >].
Notation "A '#=' B"Source code := (card_eq A B) : card_scope.
Notation "A '#!=' B"Source code := (~~ (card_eq A B)) : card_scope.
Definition finite_set
card_le : forall [T U : Type], set T -> set U -> bool card_le is not universe polymorphic Arguments card_le [T U]%_type_scope (A B)%_classical_set_scope card_le is transparent Expands to: Constant mathcomp.classical.cardinality.card_le Declared in library mathcomp.classical.cardinality, line 61, characters 11-18
Used by
- mathcomp.analysis.esum
- mathcomp.analysis.real_measure.lebesgue_measure
- mathcomp.analysis.measure_theory.measure_function
- mathcomp.analysis.measure_theory.measurable_structure
- mathcomp.analysis.measure_theory.counting_measure
- mathcomp.analysis.measure_theory.dirac_measure
- mathcomp.analysis.realfun
- mathcomp.analysis.cantor
- mathcomp.analysis.kernel
- mathcomp.analysis.ereal
- mathcomp.analysis.topology_theory.topology_structure
- mathcomp.analysis.topology_theory.separation_axioms
- mathcomp.analysis.topology_theory.sigT_topology
- mathcomp.analysis.topology_theory.compact
- mathcomp.analysis.homotopy_theory.wedge_sigT
- mathcomp.analysis.sequences
- mathcomp.analysis.lebesgue_integral_theory.lebesgue_integral_nonneg
- mathcomp.analysis.lebesgue_integral_theory.simple_functions
- mathcomp.analysis.lebesgue_integral_theory.counting_lebesgue
- mathcomp.analysis.lebesgue_integral_theory.measurable_fun_approximation
- mathcomp.analysis.normedtype_theory.normed_module
- mathcomp.classical.fsbigop
- mathcomp.classical.filter
Source code {TSource code} (ASource code : set T) := exists nSource code, A #= `I_n.
Notation infinite_setUsed by
- mathcomp.analysis.esum
- mathcomp.analysis.measure_theory.counting_measure
- mathcomp.analysis.measure_theory.dirac_measure
- mathcomp.analysis.sequences
- mathcomp.analysis.normedtype_theory.normed_module
- mathcomp.classical.fsbigop
- mathcomp.classical.filter
Source code A := (~ finite_set A).
Notation cofinite_setSource code A := (finite_set (~` A)).
Lemma injPexSource code {TSource code USource code} {ASource code : set T} :
$|{inj A >-> U}| <-> exists fSource code : T -> U, set_inj A f.
Proof.
Lemma surjPexSource code {TSource code USource code} {ASource code : set T} {BSource code : set U} :
$|{surj A >-> B}| <-> exists fSource code, set_surj A B f.
Proof.
Lemma bijPexUsed by
- mathcomp.analysis.probability_theory.random_variable
- mathcomp.analysis.real_measure.lebesgue_measure
- mathcomp.analysis.borel_hierarchy
Source code {TSource code USource code} {ASource code : set T} {BSource code : set U} :
$|{bij A >-> B}| <-> exists fSource code, set_bij A B f.
Proof.
Lemma surjfunPexUsed by
- mathcomp.analysis.measure_theory.measurable_structure
Source code {TSource code USource code} {ASource code : set T} {BSource code : set U} :
$|{surjfun A >-> B}| <-> exists fSource code, B = f @` A.
Proof.
Lemma injfunPexUsed by
- mathcomp.analysis.probability_theory.random_variable
- mathcomp.analysis.normedtype_theory.normed_module
Source code {TSource code USource code} {ASource code : set T} {BSource code : set U}:
$|{injfun A >-> B}| <-> exists2 fSource code : T -> U, set_fun A B f & set_inj A f.
Lemma card_lePSource code {TSource code USource code} {ASource code : set T} {BSource code : set U} :
reflect $|{injfun [set: A] >-> [set: B]}| (A #<= B).
Proof.
Lemma inj_card_leSource code {TSource code USource code} {ASource code : set T} {BSource code : set U} : {injfun A >-> B} -> (A #<= B).
Lemma pcard_lePUsed by
- mathcomp.analysis.probability_theory.random_variable
- mathcomp.analysis.normedtype_theory.normed_module
Source code {TSource code} {USource code : pointedType} {ASource code : set T} {BSource code : set U} :
reflect $|{injfun A >-> B}| (A #<= B).
Lemma pcard_leTPSource code {TSource code} {USource code : pointedType} {ASource code : set T} :
reflect $|{inj A >-> U}| (A #<= [set: U]).
Proof.
Lemma pcard_injPUsed by
- mathcomp.analysis.topology_theory.num_topology
- mathcomp.analysis.normedtype_theory.normed_module
Source code {TSource code} {USource code : pointedType} {ASource code : set T} :
reflect (exists fSource code : T -> U, {in A &, injective f}) (A #<= [set: U]).
Proof.
Lemma ppcard_lePSource code {TSource code USource code : pointedType} {ASource code : set T} {BSource code : set U} :
reflect $|{splitinjfun A >-> B}| (A #<= B).
Lemma card_ge0Source code TSource code USource code (SSource code : set U) : @set0 T #<= S.
#[global] Hint Resolve card_ge0 : core.
Lemma card_le0PSource code TSource code USource code (ASource code : set T) : reflect (A = set0) (A #<= @set0 U).
Proof.
Lemma card_le0Source code TSource code USource code (ASource code : set T) : (A #<= @set0 U) = (A == set0).
Lemma card_eqPSource code {TSource code USource code} {ASource code : set T} {BSource code : set U} :
reflect $|{bij [set: A] >-> [set: B]}| (A #= B).
Proof.
Lemma pcard_eqSource code {TSource code USource code} {ASource code : set T} {BSource code : set U} : {bij A >-> B} -> A #= B.
Lemma pcard_eqPUsed by
- mathcomp.analysis.probability_theory.random_variable
- mathcomp.analysis.real_measure.lebesgue_measure
- mathcomp.analysis.borel_hierarchy
Source code {TSource code} {USource code : pointedType} {ASource code : set T} {BSource code : set U} :
reflect $| {bij A >-> B} | (A #= B).
Lemma card_bijPUsed by
- mathcomp.analysis.topology_theory.num_topology
- mathcomp.analysis.normedtype_theory.normed_module
Source code {TSource code USource code} {ASource code : set T} {BSource code : set U} :
reflect (exists fSource code : A -> B, bijective f) (A #= B).
Lemma card_eqVPSource code {TSource code USource code} {ASource code : set T} {BSource code : set U} :
reflect $|{splitbij [set: A] >-> [set: B]}| (A #= B).
Lemma card_set_bijPUsed by
- mathcomp.analysis.normedtype_theory.normed_module
Source code {TSource code} {USource code : pointedType} {ASource code : set T} {BSource code : set U} :
reflect (exists fSource code, set_bij A B f) (A #= B).
Lemma ppcard_eqPUsed by
- mathcomp.analysis.probability_theory.random_variable
- mathcomp.analysis.measure_theory.measure_extension
- mathcomp.analysis.measure_theory.measure_function
- mathcomp.analysis.measure_theory.measurable_structure
- mathcomp.analysis.kernel
Source code {TSource code USource code : pointedType} {ASource code : set T} {BSource code : set U} :
reflect $| {splitbij A >-> B} | (A #= B).
Lemma card_eqxxSource code TSource code (ASource code : set T) : A #= A.
#[global] Hint Resolve card_eqxx : core.
Lemma card_eq00Source code TSource code USource code : @set0 T #= @set0 U.
Proof.
Section empty1.
Implicit Types (T : emptyType).
Lemma empty_eq0Used by
- mathcomp.analysis.measure_theory.measurable_structure
Source code TSource code : all_equal_to (set0 : set T).
Lemma card_le_emptylSource code TSource code USource code (ASource code : set T) (BSource code : set U) : A #<= B.
Proof.
Definition emptyE_subdef
card_eq : forall [T U : Type], set T -> set U -> bool card_eq is not universe polymorphic Arguments card_eq [T U]%_type_scope (A B)%_classical_set_scope card_eq is transparent Expands to: Constant mathcomp.classical.cardinality.card_eq Declared in library mathcomp.classical.cardinality, line 66, characters 11-18
Source code := (empty_eq0, card_le_emptyl, card_le_emptyr, eq_opE).
End empty1.
Theorem Cantor_BernsteinSource code TSource code USource code (ASource code : set T) (BSource code : set U) :
A #<= B -> B #<= A -> A #= B.
Proof.
elim/Ppointed: U => U in B *; first by rewrite !emptyE_subdef => ->.
suff {A B} card_eq (ASource code BSource code : set U) : B `<=` A -> A #<= B -> A #= B.
move=> /ppcard_leP[f] /ppcard_leP[g].
have /(_ _)/ppcard_eqP[|h] := card_eq _ _ (fun_image_sub f).
by apply/pcard_leP; squash ([fun f in A] \o g).
by apply/pcard_eqP; squash ((split h)^-1 \o [fun f in A]).
move=> BA /ppcard_leP[u]; have uAB := 'funS_u.
pose C_ := fix C nSource code := if n is n.+1 then u @` C n else A `\` B.
pose C := \bigcup_nSource code C_ n; have CA : C `<=` A.
by move=> + [] => /[swap]; elim=> [|i IH] y _ []// x /IH/uAB/BA + <-; apply.
have uC: {homo u : xSource code / x \in C}.
by move=> x; rewrite !inE => -[i _ Cix]; exists i.+1 => //; exists x.
apply/card_set_bijP; exists (fun xSource code => if x \in C then u x else x); split.
- move=> x Ax; case: ifPn; first by move=> _; apply: uAB.
by move/negP; apply: contra_notP => NBx; rewrite inE; exists 0%N.
- move=> x y xA yA; have := 'inj_u xA yA.
have [xC|] := boolP (x \in C); have [yC|] := boolP (y \in C) => // + _.
by move=> /[swap]<-; rewrite uC// xC.
by move=> /[swap]->; rewrite uC// yC.
- move=> y /[dup] By /BA Ay/=.
case: (boolP (y \in C)); last by exists y; rewrite // ifN.
rewrite inE => -[[|i]/= _ []// x Cix <-]; have Cx : C x by exists i.
by exists x; [exact: CA|rewrite ifT// inE].
Qed.
Lemma card_esymUsed by
- mathcomp.analysis.probability_theory.random_variable
- mathcomp.analysis.measure_theory.measure_extension
Source code TSource code USource code (ASource code : set T) (BSource code : set U) : A #= B -> B #= A.
Lemma card_eq_leSource code TSource code USource code (ASource code : set T) (BSource code : set U) :
(A #= B) = (A #<= B) && (B #<= A).
Proof.
Lemma card_eqPleSource code TSource code USource code (ASource code : set T) (BSource code : set U) :
(A #= B) <-> (A #<= B) /\ (B #<= A).
Proof.
Lemma card_lexxUsed by
- mathcomp.analysis.real_measure.lebesgue_measure
Source code TSource code (ASource code : set T) : A #<= A.
#[global] Hint Resolve card_lexx : core.
Lemma card_leTSource code TSource code (SSource code : set T) : S #<= [set: T].
Lemma subset_card_leSource code TSource code (ASource code BSource code : set T) : A `<=` B -> A #<= B.
Lemma card_image_leUsed by
- mathcomp.analysis.topology_theory.uniform_structure
- mathcomp.analysis.topology_theory.topology_structure
- mathcomp.analysis.topology_theory.separation_axioms
- mathcomp.classical.filter
Source code {TSource code USource code} (fSource code : T -> U) (ASource code : set T) : f @` A #<= A.
Proof.
by apply/pcard_leP; squash (pinv A f).
Qed.
Lemma inj_card_eqSource code {TSource code USource code} {ASource code} {fSource code : T -> U} : {in A &, injective f} -> f @` A #= A.
Arguments inj_card_eq {T U A f}.
Lemma card_someSource code {TSource code} {ASource code : set T} : some @` A #= A.
Proof.
Lemma card_imageSource code {TSource code USource code} {ASource code : set T} (fSource code : {inj A >-> U}) : f @` A #= A.
Proof.
Lemma card_imsubSource code {TSource code USource code} (ASource code : set T) (fSource code : {inj A >-> U}) XSource code : X `<=` A -> f @` X #= X.
Lemma card_le_transUsed by
- mathcomp.analysis.topology_theory.topology_structure
- mathcomp.analysis.topology_theory.compact
- mathcomp.classical.filter
Source code (TSource code USource code VSource code : Type) (BSource code : set U) (ASource code : set T) (CSource code : set V) :
A #<= B -> B #<= C -> A #<= C.
Lemma card_eq_symUsed by
- mathcomp.analysis.probability_theory.random_variable
- mathcomp.analysis.kernel
Source code TSource code USource code (ASource code : set T) (BSource code : set U) : (A #= B) = (B #= A).
Proof.
Lemma card_eq_transSource code TSource code USource code VSource code (ASource code : set T) (BSource code : set U) (CSource code : set V) :
A #= B -> B #= C -> A #= C.
Lemma card_le_eqlSource code TSource code T'Source code T''Source code (ASource code : set T) (BSource code : set T') [CSource code : set T''] :
A #= B -> (A #<= C) = (B #<= C).
Proof.
Lemma card_le_eqrSource code TSource code T'Source code T''Source code (ASource code : set T) (BSource code : set T') [CSource code : set T''] :
A #= B -> (C #<= A) = (C #<= B).
Proof.
Lemma card_eqlSource code TSource code T'Source code T''Source code (ASource code : set T) (BSource code : set T') [CSource code : set T''] :
A #= B -> (A #= C) = (B #= C).
Proof.
Lemma card_eqrSource code TSource code T'Source code T''Source code (ASource code : set T) (BSource code : set T') [CSource code : set T''] :
A #= B -> (C #= A) = (C #= B).
Proof.
Lemma card_ge_imageSource code {TSource code USource code VSource code} {ASource code : set T} (fSource code : {inj A >-> U}) XSource code (YSource code : set V) :
X `<=` A -> (f @` X #<= Y) = (X #<= Y).
Proof.
Lemma card_le_imageSource code {TSource code USource code VSource code} {ASource code : set T} (fSource code : {inj A >-> U}) XSource code (YSource code : set V) :
X `<=` A -> (Y #<= f @` X) = (Y #<= X).
Proof.
Lemma card_le_image2Source code {TSource code USource code} (ASource code : set T) (fSource code : {inj A >-> U}) XSource code YSource code :
X `<=` A -> Y `<=` A ->
(f @` X #<= f @` Y) = (X #<= Y).
Proof.
Lemma card_eq_imageSource code {TSource code USource code VSource code} {ASource code : set T} (fSource code : {inj A >-> U}) XSource code (YSource code : set V) :
X `<=` A -> (f @` X #= Y) = (X #= Y).
Proof.
Lemma card_eq_imagerSource code {TSource code USource code VSource code} {ASource code : set T} (fSource code : {inj A >-> U}) XSource code (YSource code : set V) :
X `<=` A -> (Y #= f @` X) = (Y #= X).
Proof.
Lemma card_eq_image2Source code {TSource code USource code} (ASource code : set T) (fSource code : {inj A >-> U}) XSource code YSource code :
X `<=` A -> Y `<=` A ->
(f @` X #= f @` Y) = (X #= Y).
Proof.
Lemma card_ge_someSource code {TSource code T'Source code} {ASource code : set T} {BSource code : set T'} :
(some @` A #<= B) = (A #<= B).
Proof.
Lemma card_le_someSource code {TSource code T'Source code} {ASource code : set T} {BSource code : set T'} :
(A #<= some @` B) = (A #<= B).
Proof.
Lemma card_le_some2Source code {TSource code T'Source code} {ASource code : set T} {BSource code : set T'} :
(some @` A #<= some @` B) = (A #<= B).
Proof.
Lemma card_eq_somelSource code {TSource code T'Source code} {ASource code : set T} {BSource code : set T'} :
(some @` A #= B) = (A #= B).
Lemma card_eq_somerSource code {TSource code T'Source code} {ASource code : set T} {BSource code : set T'} :
(A #= some @` B) = (A #= B).
Lemma card_eq_some2Source code {TSource code T'Source code} {ASource code : set T} {BSource code : set T'} :
(some @` A #= some @` B) = (A #= B).
Proof.
Lemma card_eq0Used by
- mathcomp.analysis.topology_theory.compact
- mathcomp.classical.filter
Source code {TSource code USource code} {ASource code : set T} : (A #= @set0 U) = (A == set0).
Proof.
Lemma card_set1Source code {TSource code} {xSource code : T} : [set x] #= `I_1.
Proof.
Lemma eq_card1Source code {TSource code USource code} (xSource code : T) (ySource code : U) : [set x] #= [set y].
Lemma card_eq_emptyrSource code (TSource code : emptyType) USource code (ASource code : set T) (BSource code : set U) :
(B #= A) = (B == set0).
Lemma card_eq_emptylSource code (TSource code : emptyType) USource code (ASource code : set T) (BSource code : set U) :
(A #= B) = (B == set0).
Proof.
Definition emptyE
finite_set : forall {T : Type}, set T -> Prop finite_set is not universe polymorphic Arguments finite_set {T}%_type_scope A%_classical_set_scope finite_set is transparent Expands to: Constant mathcomp.classical.cardinality.finite_set Declared in library mathcomp.classical.cardinality, line 71, characters 11-21
Used by
- mathcomp.analysis.esum
- mathcomp.analysis.measure_theory.measure_function
- mathcomp.analysis.measure_theory.measurable_structure
- mathcomp.classical.fsbigop
Source code := (emptyE_subdef, card_eq_emptyr, card_eq_emptyl).
Lemma card_setTSource code TSource code (ASource code : set T) : [set: A] #= A.
#[global] Hint Resolve card_setT : core.
Lemma card_setT_symSource code TSource code (ASource code : set T) : A #= [set: A].
#[global] Hint Resolve card_setT : core.
Lemma surj_card_geSource code {TSource code USource code} {ASource code : set T} {BSource code : set U} : {surj B >-> A} -> A #<= B.
Proof.
Lemma pcard_surjPUsed by
- mathcomp.analysis.topology_theory.compact
Source code {TSource code : pointedType} {USource code} {ASource code : set T} {BSource code : set U} :
reflect (exists gSource code, set_surj B A g) (A #<= B).
Proof.
Lemma pcard_gePSource code {TSource code : pointedType} {USource code} {ASource code : set T} {BSource code : set U} :
reflect $|{surj B >-> A}| (A #<= B).
Proof.
Lemma ocard_gePSource code {TSource code USource code} {ASource code : set T} {BSource code : set U} :
reflect $|{surj B >-> some @` A}| (A #<= B).
Proof.
Lemma pfcard_gePUsed by
- mathcomp.analysis.measure_theory.measurable_structure
- mathcomp.analysis.topology_theory.uniform_structure
- mathcomp.analysis.topology_theory.compact
Source code {TSource code USource code} {ASource code : set T} {BSource code : set U} :
reflect (A = set0 \/ $|{surjfun B >-> A}|) (A #<= B).
Proof.
elim/Ppointed: T => T in A *; first by rewrite !emptyE; left.
elim/Ppointed: U => U in B *; first by rewrite !emptyE => ->; right; squash any.
move=> /pcard_geP[f]; case: (eqVneq A set0); first by left.
move=> /set0P[x Ax]; right; apply/surjfunPex.
exists (fun ySource code => if f y \in A then f y else x).
apply/seteqP; split.
by move=> x' /[dup] /= /'surj_f [y By <-] Afy; exists y; rewrite ?ifT// inE.
by apply/image_subP => y By; case: ifPn; rewrite (inE, notin_setE).
Qed.
Lemma card_le_IISource code nSource code mSource code : (`I_n #<= `I_m) = (n <= m)%N.
Proof.
Lemma ocard_eqPSource code {TSource code USource code} {ASource code : set T} {BSource code : set U} :
reflect $|{bij A >-> some @` B}| (A #= B).
Lemma oocard_eqPSource code {TSource code USource code} {ASource code : set T} {BSource code : set U} :
reflect $|{splitbij some @` A >-> some @` B}| (A #= B).
Proof.
Lemma card_eq_IISource code {nSource code mSource code} : reflect (n = m) (`I_n #= `I_m).
Proof.
Lemma sub_setPSource code {TSource code} {ASource code : set T} (XSource code : set A) : set_val @` X `<=` A.
Proof.
Arguments image_subset {aT rT} f [A B].
Lemma card_subPSource code TSource code USource code (ASource code : set T) (BSource code : set U) :
reflect (exists2 CSource code, C #= A & C `<=` B) (A #<= B).
Proof.
#[deprecated(since="mathcomp-analysis 1.15.0", note="To be removed, use other lemmas instead.")]
Lemma pigeonholeSource code mSource code nSource code (fSource code : nat -> nat) : {in `I_m &, injective f} ->
f @` `I_m `<=` `I_n -> (m <= n)%N.
Proof.
Definition countable
emptyE_subdef : (forall T : emptyType, all_equal_to (set0 : set T)) * (forall (T : emptyType) (U : Type) (A : set T) (B : set U), (A #<= B)%card) * (forall (T : emptyType) (U : Type) (A : set T) (B : set U), (B #<= A)%card = (B == set0)) * (forall (T : eqType) (x y : T), (x == y : Prop) = (x = y)) emptyE_subdef is not universe polymorphic emptyE_subdef is transparent Expands to: Constant mathcomp.classical.cardinality.emptyE_subdef Declared in library mathcomp.classical.cardinality, line 191, characters 11-24
Used by
- mathcomp.analysis.probability_theory.random_variable
- mathcomp.analysis.real_measure.lebesgue_measure
- mathcomp.analysis.measure_theory.measurable_structure
- mathcomp.analysis.realfun
- mathcomp.analysis.topology_theory.uniform_structure
- mathcomp.analysis.topology_theory.topology_structure
- mathcomp.analysis.topology_theory.supremum_topology
- mathcomp.analysis.topology_theory.separation_axioms
- mathcomp.analysis.topology_theory.num_topology
- mathcomp.analysis.topology_theory.compact
- mathcomp.analysis.normedtype_theory.vitali_lemma
- mathcomp.analysis.normedtype_theory.normed_module
- mathcomp.classical.filter
Source code TSource code (ASource code : set T) := A #<= @setT nat.
Lemma eq_countableSource code TSource code USource code (ASource code : set T) (BSource code : set U) :
A #= B -> countable A = countable B.
Proof.
Lemma countablePUsed by
- mathcomp.analysis.topology_theory.function_spaces
Source code (TSource code : countType) (ASource code : set T) : countable A.
#[global] Hint Resolve countableP : core.
Lemma countable0Source code TSource code : countable (@set0 T)
Proof.
Lemma countable_injPUsed by
- mathcomp.analysis.real_measure.lebesgue_measure
- mathcomp.analysis.measure_theory.measurable_structure
Source code TSource code (ASource code : set T) :
reflect (exists fSource code : T -> nat, {in A &, injective f}) (countable A).
Proof.
Lemma countable_bijPUsed by
- mathcomp.analysis.probability_theory.random_variable
- mathcomp.analysis.measure_theory.measurable_structure
Source code TSource code (ASource code : set T) :
reflect (exists BSource code : set nat, (A #= B)%card) (countable A).
Proof.
Lemma sub_countableUsed by
- mathcomp.analysis.topology_theory.topology_structure
Source code TSource code USource code (ASource code : set T) (BSource code : set U) : A #<= B ->
countable B -> countable A.
Proof.
Lemma finite_setPUsed by
- mathcomp.analysis.topology_theory.compact
- mathcomp.classical.filter
Source code TSource code (ASource code : set T) : finite_set A <-> exists nSource code, A #= `I_n.
Proof.
Lemma finite_IIUsed by
- mathcomp.analysis.sequences
Source code nSource code : finite_set `I_n
Proof.
Lemma card_IISource code {nSource code} : `I_n #= [set: 'I_n].
Lemma finite_fsetPUsed by
- mathcomp.analysis.homotopy_theory.wedge_sigT
- mathcomp.experimental_reals.realsum
Source code {TSource code : choiceType} {ASource code : set T} :
finite_set A <-> exists XSource code : {fset T}, A = [set` X].
Proof.
exists #|{: X}|; rewrite (card_eqr card_II).
by apply/card_eqP; squash (to_setT \o enum_rank \o val_finset).
rewrite (card_eqr card_II) => /card_esym/card_eqVP[f]; pose g := f \o to_setT.
exists [fset val (g i) | iSource code in 'I_n]%fset.
apply/seteqP; split=> [x /mem_set Ax|_ /imfsetP[i _ ->]]; last exact: set_valP.
by apply/imfsetP; exists (g^-1 (SigSub Ax)); rewrite ?[g _]invK//= inE.
Qed.
Lemma finite_subfsetUsed by
- mathcomp.analysis.numfun
- mathcomp.classical.fsbigop
Source code {TSource code : choiceType} (XSource code : {fset T}) {ASource code : set T} :
A `<=` [set` X] -> finite_set A.
Proof.
Lemma finite_set0Used by
- mathcomp.analysis.sequences
Source code TSource code : finite_set (set0 : set T).
Proof.
Lemma cofinite_setTSource code TSource code : cofinite_set [set: T].
Proof.
Lemma infinite_setN0Used by
- mathcomp.analysis.esum
- mathcomp.analysis.sequences
Source code {TSource code} (ASource code : set T) : infinite_set A -> A !=set0.
Proof.
Lemma finite_seqPUsed by
- mathcomp.analysis.lebesgue_integral_theory.simple_functions
Source code {TSource code : eqType} ASource code :
finite_set A <-> exists sSource code : seq T, A = [set` s].
Proof.
split=> [[X ->]|[s ->]]; first by exists X.
by exists [fset x | xSource code in s]%fset; apply/seteqP; split=> x /=; rewrite inE.
Qed.
Lemma finite_seqSource code {TSource code : eqType} (sSource code : seq T) : finite_set [set` s].
Proof.
Lemma finite_fsetUsed by
- mathcomp.analysis.esum
- mathcomp.analysis.real_measure.lebesgue_stieltjes_measure
- mathcomp.analysis.cantor
- mathcomp.analysis.topology_theory.compact
- mathcomp.classical.filter
Source code {TSource code : choiceType} (XSource code : {fset T}) : finite_set [set` X].
Proof.
Lemma finite_finpredSource code {TSource code : finType} {pTSource code : predType T} (PSource code : pT) :
finite_set [set` P].
Proof.
Hint Extern 0 (finite_set [set` _]) => solve [apply: finite_finpred] : core.
Lemma finite_finsetUsed by
- mathcomp.analysis.probability_theory.bernoulli_distribution
Source code {TSource code : finType} {XSource code : set T} : finite_set X.
#[global] Hint Resolve finite_finset : core.
Lemma finite_set_countableUsed by
- mathcomp.analysis.probability_theory.random_variable
- mathcomp.analysis.measure_theory.measure_extension
- mathcomp.analysis.measure_theory.measure_function
- mathcomp.analysis.realfun
- mathcomp.analysis.topology_theory.compact
Source code TSource code (ASource code : set T) : finite_set A -> countable A.
Proof.
Lemma infinitePUsed by
- mathcomp.analysis.probability_theory.random_variable
- mathcomp.analysis.normedtype_theory.normed_module
Source code TSource code (ASource code : set T) : infinite_set A <-> [set: nat] #<= A.
Proof.
by rewrite !emptyE; split=> // /(congr1 (@^~ 0%N))/=; rewrite propeqE => -[].
split=> [Ainfinite| + /finite_setP[n eqAI]]; last first.
rewrite (card_le_eqr eqAI) => le_nat_n.
suff: `I_n.+1 #<= `I_n by rewrite card_le_II ltnn.
exact: card_le_trans (subset_card_le _) le_nat_n.
have /all_sig2[f Af fX] : forall XSource code : {fset T}, {xSource code | x \in A & x \notin X}.
move=> X; apply/sig2W; apply: contra_notP Ainfinite => nAX; apply/finite_fsetP.
exists [fset xSource code in X | x \in A]%fset; rewrite eqEsubset; split; last first.
by move=> x/=; rewrite !inE => /andP[_]; rewrite inE.
move=> x Ax /=; rewrite !inE/=; apply/andP; split; rewrite ?inE//.
by apply: contra_notT nAX => xNX; exists x; rewrite ?inE.
do [under [forall xSource code : {fset _}, _]eq_forall do rewrite inE] in Af *.
suff [g gE] : exists gSource code : nat -> T,
forall nSource code, g n = f [fset g k | kSource code in iota 0 n]%fset.
have /Pinj[h hE] : {in setT &, injective g}.
move=> i j _ _; apply: contra_eq; wlog lt_ij : i j / (i < j)%N => [hwlog|_].
by case: ltngtP => // ij _; [|rewrite eq_sym];
apply: hwlog=> //; rewrite lt_eqF//.
rewrite [g j]gE; set X := (X in f X); have := fX X.
by apply: contraNneq => <-; apply/imfsetP; exists i => //=; rewrite mem_iota.
have/injPfun[i _] : {homo h : xSource code / setT x >-> A x} by move=> i; rewrite -hE gE.
by apply/pcard_leP; squash i.
pose g := fix g nSource code kSource code := if n isn't n'.+1 then f fset0
else f [fset g n' i | iSource code in iota 0 k]%fset.
exists (fun nSource code => g n n) => n.
suff {n} gn n k : (k <= n)%N -> g n k = f [fset g k k | kSource code in iota 0 k]%fset.
by rewrite gn//; congr f; apply/fsetP => k.
have [m] := ubnP n; elim: m n k => //= m IHm [|n] k /=.
rewrite leqn0 => _ /eqP->/=.
congr f; apply/fsetP => x; rewrite !inE; symmetry.
by apply/imfsetP => /= -[].
rewrite ltnS => ltmn lekSn /=; congr f; apply/fsetP => i.
by apply/imfsetP/imfsetP => /= -[j]; rewrite mem_iota/= => jk ->;
exists j; rewrite ?mem_iota//= ?add0n ?IHm//;
by [rewrite (leq_trans jk)// (leq_trans lekSn)|rewrite -ltnS (leq_trans jk)].
Qed.
Lemma finite_setPnSource code TSource code (ASource code : set T) : finite_set A <-> ~ ([set: nat] #<= A).
Lemma card_le_finiteSource code TSource code USource code (ASource code : set T) (BSource code : set U) :
A #<= B -> finite_set B -> finite_set A.
Proof.
Lemma sub_finite_setUsed by
- mathcomp.analysis.esum
- mathcomp.analysis.measure_theory.measure_function
- mathcomp.analysis.measure_theory.counting_measure
- mathcomp.analysis.realfun
- mathcomp.analysis.sequences
- mathcomp.classical.fsbigop
- mathcomp.classical.filter
Source code TSource code (ASource code BSource code : set T) : A `<=` B ->
finite_set B -> finite_set A.
Proof.
Lemma sub_cofinite_setSource code TSource code (ASource code BSource code : set T) : A `<=` B ->
cofinite_set A -> cofinite_set B.
Proof.
Lemma sub_infinite_setSource code TSource code (ASource code BSource code : set T) : A `<=` B ->
infinite_set A -> infinite_set B.
Proof.
Lemma finite_set_lePSource code TSource code (ASource code : set T) : finite_set A <-> exists nSource code, A #<= `I_n.
Proof.
by apply: card_le_finite leAn _; exists n.
Qed.
Lemma card_ge_preimageSource code {TSource code USource code} (BSource code : set U) (fSource code : T -> U) :
{in f @^-1` B &, injective f} -> f @^-1` B #<= B.
Proof.
by apply: subset_card_le; apply: image_preimage_subset.
Qed.
Corollary finite_preimageUsed by
- mathcomp.analysis.cantor
Source code {TSource code USource code} (BSource code : set U) (fSource code : T -> U) :
{in f @^-1` B &, injective f} -> finite_set B -> finite_set (f @^-1` B).
Proof.
Lemma eq_finite_setSource code TSource code USource code (ASource code : set T) (BSource code : set U) :
A #= B -> finite_set A = finite_set B.
Proof.
Lemma card_le_setDUsed by
- mathcomp.analysis.topology_theory.topology_structure
Source code TSource code (ASource code BSource code : set T) : A `\` B #<= A.
Proof.
Lemma finite_imageUsed by
- mathcomp.analysis.measure_theory.measure_function
- mathcomp.analysis.cantor
- mathcomp.analysis.topology_theory.compact
- mathcomp.analysis.sequences
- mathcomp.classical.fsbigop
Source code TSource code T'Source code ASource code (fSource code : T -> T') : finite_set A -> finite_set (f @` A).
Proof.
Lemma finite_setX_orSource code TSource code T'Source code (ASource code : set T) (BSource code : set T') :
finite_set (A `*` B) -> finite_set A \/ finite_set B.
Proof.
Lemma infinite_setXSource code {TSource code} {ASource code BSource code : set T} :
infinite_set A -> infinite_set B -> infinite_set (A `*` B).
Proof.
Lemma finite_set1Used by
- mathcomp.analysis.sequences
Source code TSource code (xSource code : T) : finite_set [set x].
Proof.
Lemma finite_setDUsed by
- mathcomp.analysis.measure_theory.measurable_structure
Source code TSource code (ASource code BSource code : set T) : finite_set A -> finite_set (A `\` B).
Proof.
Lemma cofinite_setUlSource code TSource code (ASource code BSource code : set T) : cofinite_set A -> cofinite_set (A `|` B).
Proof.
Lemma cofinite_setUrSource code TSource code (ASource code BSource code : set T) : cofinite_set B -> cofinite_set (A `|` B).
Proof.
Lemma cofinite_setUSource code TSource code (ASource code BSource code : set T) :
cofinite_set A \/ cofinite_set B -> cofinite_set (A `|` B).
Proof.
Lemma finite_setUUsed by
- mathcomp.analysis.esum
- mathcomp.analysis.real_measure.lebesgue_stieltjes_measure
- mathcomp.analysis.measure_theory.measure_function
- mathcomp.analysis.cantor
- mathcomp.analysis.sequences
- mathcomp.classical.fsbigop
- mathcomp.classical.filter
Source code TSource code (ASource code BSource code : set T) :
finite_set (A `|` B) = (finite_set A /\ finite_set B).
Proof.
by move=> finAUB; split; apply: sub_finite_set finAUB.
by case=> /fP[X->]/fP[Y->]; apply/fP; exists (X `|` Y)%fset; rewrite set_fsetU.
Qed.
Lemma cofinite_setISource code TSource code (ASource code BSource code : set T) :
cofinite_set (A `&` B) = (cofinite_set A /\ cofinite_set B).
Proof.
Lemma finite_set2Used by
- mathcomp.analysis.cantor
Source code TSource code (xSource code ySource code : T) : finite_set [set x; y].
Proof.
Lemma finite_set3Source code TSource code (xSource code ySource code zSource code : T) : finite_set [set x; y; z].
Proof.
Lemma finite_set4Source code TSource code (xSource code ySource code zSource code tSource code : T) : finite_set [set x; y; z; t].
Proof.
Lemma finite_set5Source code TSource code (xSource code ySource code zSource code tSource code uSource code : T) : finite_set [set x; y; z; t; u].
Proof.
Lemma finite_set6Source code TSource code (xSource code ySource code zSource code tSource code uSource code vSource code : T) : finite_set [set x; y; z; t; u; v].
Proof.
Lemma finite_set7Source code TSource code (xSource code ySource code zSource code tSource code uSource code vSource code wSource code : T) : finite_set [set x; y; z; t; u; v; w].
Proof.
Lemma finite_setIUsed by
- mathcomp.analysis.esum
Source code TSource code (ASource code BSource code : set T) :
(finite_set A \/ finite_set B) -> finite_set (A `&` B).
Proof.
Lemma finite_setIlUsed by
- mathcomp.analysis.lebesgue_integral_theory.lebesgue_integral_definition
- mathcomp.classical.fsbigop
Source code TSource code (ASource code BSource code : set T) : finite_set A -> finite_set (A `&` B).
Proof.
Lemma finite_setIrSource code TSource code (ASource code BSource code : set T) : finite_set B -> finite_set (A `&` B).
Proof.
Lemma finite_setXUsed by
- mathcomp.analysis.esum
- mathcomp.analysis.measure_theory.measure_function
- mathcomp.classical.fsbigop
Source code TSource code T'Source code (ASource code : set T) (BSource code : set T') :
finite_set A -> finite_set B -> finite_set (A `*` B).
Proof.
move=> /finite_fsetP[{}A ->] /finite_fsetP[{}B ->].
apply/finite_fsetP; exists (A `*` B)%fset; apply/predeqP => x.
by split; rewrite /= inE => /andP.
Qed.
Lemma finite_image2Source code [aTSource code bTSource code rTSource code : Type] [ASource code : set aT] [BSource code : set bT]
(fSource code : aT -> bT -> rT) :
finite_set A -> finite_set B -> finite_set [set f x y | xSource code in A & ySource code in B].
Proof.
Lemma finite_image11Used by
- mathcomp.analysis.numfun
Source code [xTSource code aTSource code bTSource code rTSource code : Type] [XSource code : set xT]
(gSource code : aT -> bT -> rT) (faSource code : xT -> aT) (fbSource code : xT -> bT) :
finite_set (fa @` X) -> finite_set (fb @` X) ->
finite_set [set g (fa x) (fb x) | xSource code in X].
Proof.
by move=> r/= [x Xx <-]; exists (fa x, fb x) => //; split; exists x.
Qed.
Definition fset_set
emptyE : (forall T : emptyType, all_equal_to (set0 : set T)) * (forall (T : emptyType) (U : Type) (A : set T) (B : set U), (A #<= B)%card) * (forall (T : emptyType) (U : Type) (A : set T) (B : set U), (B #<= A)%card = (B == set0)) * (forall (T : eqType) (x y : T), (x == y : Prop) = (x = y)) * (forall (T : emptyType) (U : Type) (A : set T) (B : set U), (B #= A)%card = (B == set0)) * (forall (T : emptyType) (U : Type) (A : set T) (B : set U), (A #= B)%card = (B == set0)) emptyE is not universe polymorphic emptyE is transparent Expands to: Constant mathcomp.classical.cardinality.emptyE Declared in library mathcomp.classical.cardinality, line 363, characters 11-17
Used by
- mathcomp.analysis.esum
- mathcomp.analysis.probability_theory.bernoulli_distribution
- mathcomp.analysis.real_measure.lebesgue_measure
- mathcomp.analysis.measure_theory.measure_function
- mathcomp.analysis.measure_theory.measurable_structure
- mathcomp.analysis.measure_theory.counting_measure
- mathcomp.analysis.measure_theory.dirac_measure
- mathcomp.analysis.ereal
- mathcomp.analysis.numfun
- mathcomp.analysis.lebesgue_integral_theory.lebesgue_integral_definition
- mathcomp.classical.fsbigop
Source code (TSource code : choiceType) (ASource code : set T) :=
if pselect (finite_set A) is left Afin
then projT1 (cid (finite_fsetP.1 Afin)) else fset0.
Lemma fset_setKUsed by
- mathcomp.analysis.measure_theory.counting_measure
- mathcomp.classical.fsbigop
Source code (TSource code : choiceType) (ASource code : set T) : finite_set A ->
[set` fset_set A] = A.
Lemma in_fset_setUsed by
- mathcomp.analysis.esum
- mathcomp.analysis.probability_theory.independence
- mathcomp.analysis.real_measure.lebesgue_measure
- mathcomp.analysis.measure_theory.measure_function
- mathcomp.analysis.measure_theory.measurable_structure
- mathcomp.analysis.ereal
- mathcomp.analysis.topology_theory.topology_structure
- mathcomp.analysis.lebesgue_integral_theory.lebesgue_integral_definition
- mathcomp.classical.fsbigop
Source code (TSource code : choiceType) (ASource code : set T) : finite_set A ->
fset_set A =i A.
Lemma fset_set_subUsed by
- mathcomp.analysis.measure_theory.counting_measure
- mathcomp.analysis.ereal
Source code (TSource code : choiceType) (ASource code BSource code : set T) :
finite_set A -> finite_set B -> (A `<=` B) = (fset_set A `<=` fset_set B)%fset.
Proof.
by apply/fsubsetP => t; rewrite in_fset_set// in_fset_set// 2!inE => /AB.
by have := AB t; rewrite !in_fset_set// !inE.
Qed.
Lemma fset_set_set0Used by
- mathcomp.analysis.measure_theory.counting_measure
Source code (TSource code : choiceType) (ASource code : set T) : finite_set A ->
fset_set A = fset0 -> A = set0.
Proof.
Lemma fset_set0Used by
- mathcomp.analysis.measure_theory.counting_measure
Source code {TSource code : choiceType} : fset_set (set0 : set T) = fset0.
Proof.
Lemma fset_set1Used by
- mathcomp.analysis.esum
- mathcomp.analysis.probability_theory.independence
Source code {TSource code : choiceType} (xSource code : T) : fset_set [set x] = [fset x]%fset.
Lemma fset_setUSource code {TSource code : choiceType} (ASource code BSource code : set T) :
finite_set A -> finite_set B ->
fset_set (A `|` B) = (fset_set A `|` fset_set B)%fset.
Proof.
rewrite ?(inE, in_fset_set)//; first by rewrite finite_setU.
by apply/idP/orP; rewrite ?inE.
Qed.
Lemma fset_setISource code {TSource code : choiceType} (ASource code BSource code : set T) :
finite_set A -> finite_set B ->
fset_set (A `&` B) = (fset_set A `&` fset_set B)%fset.
Proof.
rewrite ?(inE, in_fset_set)//; first by apply: finite_setI; left.
by apply/idP/andP; rewrite ?inE.
Qed.
Lemma fset_setU1Used by
- mathcomp.analysis.probability_theory.independence
Source code {TSource code : choiceType} (xSource code : T) (ASource code : set T) :
finite_set A -> fset_set (x |` A) = (x |` fset_set A)%fset.
Lemma fset_setDSource code {TSource code : choiceType} (ASource code BSource code : set T) :
finite_set A -> finite_set B ->
fset_set (A `\` B) = (fset_set A `\` fset_set B)%fset.
Proof.
rewrite ?(inE, in_fset_set)//; first exact: finite_setD.
by apply/idP/andP; rewrite ?inE => -[]; rewrite ?notin_setE.
Qed.
Lemma fset_setD1Source code {TSource code : choiceType} (xSource code : T) (ASource code : set T) :
finite_set A -> fset_set (A `\ x) = (fset_set A `\ x)%fset.
Lemma fset_setXUsed by
- mathcomp.classical.fsbigop
Source code {T1Source code T2Source code : choiceType} (ASource code : set T1) (BSource code : set T2) :
finite_set A -> finite_set B ->
fset_set (A `*` B) = (fset_set A `*` fset_set B)%fset.
Proof.
apply/fsetP => i; apply/idP/idP; rewrite !(inE, in_fset_set)//=.
by move=> [/mem_set-> /mem_set->].
by move=> /andP[]; rewrite !inE.
Qed.
Definition fst_fset
countable : forall [T : Type], set T -> bool countable is not universe polymorphic Arguments countable [T]%_type_scope A%_classical_set_scope countable is transparent Expands to: Constant mathcomp.classical.cardinality.countable Declared in library mathcomp.classical.cardinality, line 459, characters 11-20
Source code (T1Source code T2Source code : choiceType) (ASource code : {fset (T1 * T2)}) : {fset T1} :=
[fset x.1 | xSource code in A]%fset.
Definition snd_fset
fset_set : forall [T : choiceType], set T -> {fset T} fset_set is not universe polymorphic Arguments fset_set [T] A%_classical_set_scope fset_set is transparent Expands to: Constant mathcomp.classical.cardinality.fset_set Declared in library mathcomp.classical.cardinality, line 761, characters 11-19
Source code (T1Source code T2Source code : choiceType) (ASource code : {fset (T1 * T2)}) : {fset T2} :=
[fset x.2 | xSource code in A]%fset.
Notation "A .`1"Source code := (fst_fset A) : fset_scope.
Notation "A .`2"Source code := (snd_fset A) : fset_scope.
Lemma finite_set_fstUsed by
- mathcomp.analysis.esum
Source code (T1Source code T2Source code : choiceType) (ASource code : set (T1 * T2)) :
finite_set A -> finite_set A.`1.
Proof.
by apply/seteqP; split=> [x/= [y]|_/= /imfsetP[[x1 x2]/= +] ->]; rewrite A_B;
[move=> xyB; apply/imfsetP; exists (x, y)|move=> ?; exists x2].
Qed.
Lemma finite_set_sndUsed by
- mathcomp.analysis.esum
Source code (T1Source code T2Source code : choiceType) (ASource code : set (T1 * T2)) :
finite_set A -> finite_set A.`2.
Proof.
apply/seteqP; split=> [y/= [x]|_/= /imfsetP[[x1 x2]/= +] ->]; rewrite A_B;
by [move=> xyB; apply/imfsetP; exists (x, y)|move=> ?; exists x1].
Qed.
Lemma bigcup_finiteUsed by
- mathcomp.analysis.measure_theory.counting_measure
- mathcomp.analysis.sequences
Source code {ISource code TSource code} (DSource code : set I) (FSource code : I -> set T) :
finite_set D -> (forall iSource code, D i -> finite_set (F i)) ->
finite_set (\bigcup_(iSource code in D) F i).
Proof.
elim/Ppointed: T => T in F *; first by rewrite emptyE.
move=> Dfin Ffin; pose G (iSource code : fset_set D) := fset_set (F (val i)).
suff: (\bigcup_(iSource code in D) F i #<= [set: {iSource code & G i}])%card.
by move=> /card_le_finite; apply; apply: finite_finset.
apply/pcard_geP/surjPex.
exists (fun (kSource code : {iSource code : fset_set D & G i}) => val (projT2 k)).
move=> y [i Di Fky]/=.
have Dk : i \in fset_set D by rewrite in_fset_set// inE.
pose k : fset_set D := [` Dk]%fset.
have Gy : y \in G k by rewrite in_fset_set ?inE//; apply: Ffin.
by exists (Tagged G [` Gy]%fset).
Qed.
Lemma cofinite_set_infiniteSource code {TSource code} (ASource code : set T) : infinite_set [set: T] ->
cofinite_set A -> infinite_set A.
Proof.
Lemma trivIset_sum_cardUsed by
- mathcomp.analysis.measure_theory.counting_measure
Source code (TSource code : choiceType) (FSource code : nat -> set T) nSource code :
(forall nSource code, finite_set (F n)) -> trivIset [set: nat] F ->
(\sum_(iSource code < n) #|` fset_set (F i)| =
#|` fset_set (\big[setU/set0]_(kSource code < n) F k)|)%N.
Proof.
rewrite big_ord_recr//= ih big_ord_recr/= fset_setU//.
by rewrite -bigcup_mkord; exact: bigcup_finite.
rewrite cardfsU [X in (_ - X)%N](_ : _ = O) ?subn0// ?EFinD ?natrD//.
apply/eqP; rewrite cardfs_eq0 -fset_setI//.
by rewrite -bigcup_mkord; exact: bigcup_finite.
rewrite (@trivIset_bigsetUI _ xpredT)// ?fset_set0//.
by rewrite [X in trivIset X F](_ : _ = [set: nat])//; exact/seteqP.
Qed.
Lemma finite_setXRUsed by
- mathcomp.analysis.measure_theory.measure_function
Source code (TSource code T'Source code : choiceType) (ASource code : set T) (BSource code : T -> set T') :
finite_set A -> (forall xSource code, A x -> finite_set (B x)) -> finite_set (A `*`` B).
Proof.
by apply: bigcup_finite => // i Ai; exact/finite_setX/Bfin.
Qed.
Lemma finite_setXLSource code (TSource code T'Source code : choiceType) (ASource code : T' -> set T) (BSource code : set T') :
(forall xSource code, B x -> finite_set (A x)) -> finite_set B -> finite_set (A ``*` B).
Proof.
by apply: bigcup_finite => // i Ai; apply/finite_setX => //; exact: Afin.
Qed.
Lemma fset_set_IISource code nSource code : fset_set `I_n = [fset val i | iSource code in 'I_n]%fset.
Proof.
Lemma set_fsetKUsed by
- mathcomp.analysis.esum
- mathcomp.analysis.probability_theory.independence
- mathcomp.analysis.real_measure.lebesgue_measure
- mathcomp.analysis.real_measure.lebesgue_stieltjes_measure
- mathcomp.analysis.measure_theory.dirac_measure
- mathcomp.analysis.topology_theory.order_topology
- mathcomp.experimental_reals.realsum
Source code (TSource code : choiceType) (ASource code : {fset T}) : fset_set [set` A] = A.
Proof.
Lemma fset_set_imageSource code {TSource code USource code : choiceType} (fSource code : T -> U) (ASource code : set T) :
finite_set A -> fset_set (f @` A) = (f @` fset_set A)%fset.
Proof.
rewrite !in_fset_set; first exact: finite_image.
apply/idP/imfsetP; rewrite !inE/=.
by move=> [x Ax <-]; exists x; rewrite ?in_fset_set ?inE.
by move=> [x + ->]; rewrite in_fset_set// inE; exists x.
Qed.
Lemma fset_set_injSource code {TSource code : choiceType} (ASource code BSource code : set T) :
finite_set A -> finite_set B -> fset_set A = fset_set B -> A = B.
Lemma bigsetU_fset_setUsed by
- mathcomp.analysis.real_measure.lebesgue_measure
- mathcomp.analysis.measure_theory.measurable_structure
- mathcomp.analysis.topology_theory.topology_structure
- mathcomp.analysis.lebesgue_integral_theory.simple_functions
- mathcomp.analysis.lebesgue_integral_theory.lebesgue_integral_definition
- mathcomp.analysis.lebesgue_integral_theory.measurable_fun_approximation
- mathcomp.classical.fsbigop
Source code TSource code (ISource code : choiceType) (ASource code : set I) (FSource code : I -> set T) :
finite_set A -> \big[setU/set0]_(iSource code <- fset_set A) F i =\bigcup_(iSource code in A) F i.
Proof.
Lemma __deprecated__bigcup_fset_setSource code TSource code (ISource code : choiceType) (ASource code : set I) (FSource code : I -> set T) :
finite_set A -> \bigcup_(iSource code in A) F i = \big[setU/set0]_(iSource code <- fset_set A) F i.
Proof.
Notation bigcup_fset_setSource code := __deprecated__bigcup_fset_set (only parsing).
Lemma bigsetU_fset_set_condUsed by
- mathcomp.analysis.lebesgue_integral_theory.lebesgue_integral_definition
Source code TSource code (ISource code : choiceType) (ASource code : set I) (FSource code : I -> set T)
(PSource code : pred I) : finite_set A ->
\big[setU/set0]_(iSource code <- fset_set A | P i) F i = \bigcup_(iSource code in A `&` P) F i.
Proof.
Lemma __deprecated__bigcup_fset_set_condSource code TSource code (ISource code : choiceType) (ASource code : set I) (FSource code : I -> set T)
(PSource code : pred I) : finite_set A ->
\bigcup_(iSource code in A `&` P) F i = \big[setU/set0]_(iSource code <- fset_set A | P i) F i.
Proof.
Notation bigcup_fset_set_condSource code := __deprecated__bigcup_fset_set_cond (only parsing).
Lemma bigsetI_fset_setUsed by
- mathcomp.analysis.measure_theory.measurable_structure
- mathcomp.analysis.topology_theory.order_topology
Source code TSource code (ISource code : choiceType) (ASource code : set I) (FSource code : I -> set T) :
finite_set A -> \big[setI/setT]_(iSource code <- fset_set A) F i =\bigcap_(iSource code in A) F i.
Proof.
Lemma __deprecated__bigcap_fset_setSource code TSource code (ISource code : choiceType) (ASource code : set I) (FSource code : I -> set T) :
finite_set A -> \bigcap_(iSource code in A) F i = \big[setI/setT]_(iSource code <- fset_set A) F i.
Proof.
Notation bigcap_fset_setSource code := __deprecated__bigcap_fset_set (only parsing).
Lemma bigsetI_fset_set_condSource code TSource code (ISource code : choiceType) (ASource code : set I) (FSource code : I -> set T)
(PSource code : pred I) : finite_set A ->
\big[setI/setT]_(iSource code <- fset_set A | P i) F i = \bigcap_(iSource code in A `&` P) F i.
Proof.
Lemma super_bijSource code TSource code USource code (XSource code ASource code : set T) (YSource code BSource code : set U) (fSource code : {bij X >-> Y}) :
X `<=` A -> Y `<=` B -> A `\` X #= B `\` Y ->
exists gSource code : {bij A >-> B}, {in X, g =1 f}.
Proof.
rewrite !emptyE in f * => XA _; rewrite setD_eq0 => AX.
by suff /seteqP->// : A `<=>` X by exists f.
move=> XA YB /pcard_eqP[g].
rewrite -(joinIB X A) -(joinIB Y B) !meetEset.
have /disj_set2P AX : (A `&` X) `&` (A `\` X) = set0 by apply: meetIB.
have /disj_set2P BY : (B `&` Y) `&` (B `\` Y) = set0 by apply: meetIB.
rewrite !(setIidr XA) !(setIidr YB) in AX BY *.
by exists [bij of glue AX BY f g] => x /= xX; rewrite glue1.
Qed.
Lemma card_eq_fsetPUsed by
- mathcomp.analysis.measure_theory.counting_measure
Source code {TSource code : choiceType} {ASource code : {fset T}} {nSource code} :
reflect (#|` A| = n) ([set` A] #= `I_n).
Proof.
rewrite -{1}[A]set_fsetK !emptyE fset_set0 cardfs0.
by apply: (iffP eqP) => [/IIn_eq0->//|<-]; rewrite II0.
rewrite (card_eqr card_II) card_eq_sym.
apply: (iffP pcard_eqP) => [[f]|]; last first.
rewrite cardfE => eqAn.
by squash (set_val \o finset_val \o enum_val \o cast_ord (esym eqAn)).
suff -> : A = [fset f i | iSource code in 'I_n]%fset by rewrite card_imfset ?size_enum_ord.
apply/fsetP => x; apply/idP/imfsetP => /= [xA|[i _ ->]].
by have [i _ <-] := 'surj_f xA; exists i.
by have /(_ i I) := 'funS_f.
Qed.
Lemma card_fset_setUsed by
- mathcomp.analysis.lebesgue_integral_theory.measurable_fun_approximation
Source code {TSource code : choiceType} (ASource code : set T) nSource code :
A #= `I_n -> #|`fset_set A| = n.
Proof.
Lemma geq_card_fset_setSource code {TSource code : choiceType} (ASource code : set T) nSource code :
A #<= `I_n -> (#|`fset_set A| <= n)%N.
Proof.
by apply/finite_set_leP; exists n.
by rewrite (card_fset_set Am) -card_le_II -(card_le_eql Am).
Qed.
Lemma leq_card_fset_setSource code {TSource code : choiceType} (ASource code : set T) nSource code :
finite_set A -> A #>= `I_n -> (#|`fset_set A| >= n)%N.
Proof.
Lemma infinite_setDUsed by
- mathcomp.analysis.sequences
- mathcomp.analysis.normedtype_theory.normed_module
Source code {TSource code} (ASource code BSource code : set T) :
infinite_set A -> finite_set B -> infinite_set (A `\` B).
Proof.
have : finite_set ((A `&` ~` B) `|` B) by rewrite finite_setU.
by rewrite setUIl setUCl setIT finite_setU => -[].
Qed.
Lemma infinite_setIlUsed by
- mathcomp.analysis.sequences
Source code {TSource code} (ASource code BSource code : set T) :
infinite_set A -> cofinite_set B -> infinite_set (A `&` B).
Proof.
Lemma infinite_setIrSource code {TSource code} (ASource code BSource code : set T) :
cofinite_set A -> infinite_set B -> infinite_set (A `&` B).
Proof.
Lemma infinite_set_fsetUsed by
- mathcomp.analysis.esum
- mathcomp.analysis.real_measure.lebesgue_measure
- mathcomp.analysis.measure_theory.dirac_measure
- mathcomp.analysis.realfun
Source code {TSource code : choiceType} (ASource code : set T) nSource code :
infinite_set A ->
exists2 BSource code : {fset T}, [set` B] `<=` A & (#|` B| >= n)%N.
Proof.
move=> /infiniteP/ppcard_leP[f]; exists (fset_set [set f i | iSource code in `I_n]).
rewrite fset_setK//; first exact: finite_image.
by apply: subset_trans (fun_image_sub f); apply: image_subset.
rewrite fset_set_image// card_imfset//= fset_set_II/=.
by rewrite card_imfset//= ?size_enum_ord//; apply: val_inj.
Qed.
Lemma infinite_set_fsetPSource code {TSource code : choiceType} (ASource code : set T) :
infinite_set A <->
forall nSource code, exists2 BSource code : {fset T}, [set` B] `<=` A & (#|` B| >= n)%N.
Proof.
elim/choicePpointed: T => T in A *.
move=> /(_ 1%N)[B _]; rewrite cardfs_gt0 => /fset0Pn[x xB].
by have: [set` B] x by []; rewrite emptyE.
move=> Bge /finite_setP[n An]; have [B BA] := Bge n.+1.
apply/negP; rewrite -leqNgt -(card_fset_set An) fsubset_leq_card//.
apply/fsubsetP => x /BA; rewrite in_fset_set ?inE//.
by apply/finite_setP; exists n.
Qed.
Lemma fcard_eqSource code {TSource code T'Source code : choiceType} (ASource code : set T) (BSource code : set T') :
finite_set A -> finite_set B ->
reflect (#|`fset_set A| = #|`fset_set B|) (A #= B).
Proof.
rewrite (card_fset_set An) (card_fset_set Bm).
by rewrite (card_eql An) (card_eqr Bm); apply: card_eq_II.
Qed.
Lemma card_IIDSource code {nSource code kSource code} : `I_n `\` `I_k #= `I_(n - k)%N.
Proof.
rewrite fset_setD//= cardfsD/= -fset_setI// setI_II.
rewrite !fset_set_II !card_imfset// /= !size_enum_ord.
by case: leqP; rewrite // subnn => /eqP->.
Qed.
Lemma finite_set_bijSource code TSource code (ASource code : set T) nSource code SSource code : A != set0 ->
A #= `I_n -> S `<=` A ->
exists (fSource code : {bij `I_n >-> A}) kSource code, (k <= n)%N /\ `I_n `&` (f @^-1` S) = `I_k.
Proof.
move=> AN0 An SA; have [k kn Sk] : exists2 kSource code, (k <= n)%N & S #= `I_k.
have /finite_setP[k Sk]: finite_set S by apply: sub_finite_set SA _; exists n.
exists k => //; rewrite -card_le_II.
by rewrite -(card_le_eqr An) -(card_le_eql Sk); apply: subset_card_le.
have /card_esym/ppcard_eqP[f] := Sk.
have eqAS : A `\` S #= `I_n `\` `I_k.
have An' := An; have Sk' := Sk.
do [have /finite_fsetP[{An'}A ->] : finite_set A by exists n] in An AN0 SA *.
do [have /finite_fsetP[{Sk'}S ->] : finite_set S by exists k] in Sk f SA *.
have [/card_eq_fsetP {}An /card_eq_fsetP {}Sk] := (An, Sk).
rewrite -set_fsetD (card_eqr card_IID); apply/card_eq_fsetP.
by rewrite cardfsD (fsetIidPr _) ?An ?Sk //; apply/fsubsetP.
case: (super_bij [bij of f^-1] SA _ eqAS) => [x /= /leq_trans->// | g].
have [{}g ->] := pPbij 'bij_g => /= gE.
exists [bij of g^-1], k; split=> //=; rewrite -inv_sub_image //= invV.
by under eq_imagel do rewrite /= gE ?inE//; rewrite image_eq.
Qed.
#[deprecated(note="use countable0 instead")]
Notation countable_set0Source code := countable0 (only parsing).
Lemma countable1Used by
- mathcomp.analysis.topology_theory.supremum_topology
Source code TSource code (xSource code : T) : countable [set x].
Proof.
Lemma countable_fsetSource code (TSource code : choiceType) (XSource code : {fset T}) : countable [set` X].
Proof.
Lemma countable_finpredSource code (TSource code : finType) (pTSource code : predType T) (PSource code : pT) : countable [set` P].
Proof.
Lemma eq_card_natSource code TSource code (ASource code : set T):
countable A -> ~ finite_set A -> A #= [set: nat].
Proof.
Lemma infinite_natUsed by
- mathcomp.analysis.sequences
- mathcomp.classical.filter
Source code : ~ finite_set [set: nat].
Lemma infinite_prod_natSource code : infinite_set [set: nat * nat].
Proof.
Lemma card_nat2Used by
- mathcomp.analysis.measure_theory.measure_extension
- mathcomp.analysis.kernel
Source code : [set: nat * nat] #= [set: nat].
Proof.
Lemma injective_gtnSource code (fSource code : nat -> nat) : injective f -> forall (nSource code : nat), exists mSource code, (n < f m)%N.
Proof.
apply: infinite_setN0; apply: cofinite_set_infinite; first exact: infinite_nat.
by rewrite setCK; apply: finite_preimage; first by move=> ? ? ? ?; apply: fI.
Qed.
HBSource code.instanceSource code DefinitionSource code _Source code :=Source code isPointedSource code.Build rat 0.
Lemma infinite_ratSource code : infinite_set [set: rat].
Proof.
Lemma card_ratUsed by
- mathcomp.analysis.real_measure.lebesgue_measure
- mathcomp.analysis.borel_hierarchy
- mathcomp.analysis.topology_theory.num_topology
- mathcomp.analysis.normedtype_theory.normed_module
Source code : [set: rat] #= [set: nat].
Proof.
Lemma infinite_prod_ratSource code : infinite_set [set: rat * rat].
Proof.
Lemma card_rat2Used by
- mathcomp.analysis.normedtype_theory.normed_module
Source code : ([set: rat * rat] #= [set: nat])%card.
Proof.
Lemma choicePcountableSource code {TSource code : choiceType} : countable [set: T] ->
{T'Source code : countType | T = T' :> Type}.
Proof.
Lemma eqPcountableSource code {TSource code : eqType} : countable [set: T] ->
{T'Source code : countType | T = T' :> Type}.
Proof.
Lemma PcountableSource code {TSource code : Type} : countable [set: T] ->
{T'Source code : countType | T = T' :> Type}.
Proof.
Lemma bigcup_countableUsed by
- mathcomp.analysis.probability_theory.random_variable
- mathcomp.analysis.real_measure.lebesgue_measure
- mathcomp.analysis.realfun
- mathcomp.analysis.topology_theory.topology_structure
- mathcomp.analysis.topology_theory.supremum_topology
- mathcomp.analysis.topology_theory.compact
- mathcomp.analysis.normedtype_theory.vitali_lemma
Source code {ISource code TSource code} (DSource code : set I) (FSource code : I -> set T) :
countable D -> (forall iSource code, D i -> countable (F i)) ->
countable (\bigcup_(iSource code in D) F i).
Proof.
rewrite -(eq_countable (card_setT _)) => cD cF; rewrite bigcup_set_type.
set G := (fun iSource code : D => F (val i)).
have {cF}cG i : countable (G i) by apply: cF; apply: set_valP.
move: (D : Type) cD G cG => {F I}_ /Pcountable[{}D ->] G cG.
suff: (\bigcup_iSource code G i #<= [set: {iSource code & G i}])%card.
have cGT i : countable [set: G i] by rewrite (eq_countable (card_setT _)).
have /all_sig[H GE] := fun iSource code => Pcountable (cGT i).
by move=> /sub_countable->//; rewrite (eq_fun GE).
apply/pcard_geP/surjPex; exists (fun (kSource code : {iSource code & G i}) => val (projT2 k)).
by move=> x [i _] Gix/=; exists (Tagged G (SigSub (mem_set Gix))).
Qed.
Lemma countableXRSource code TSource code T'Source code (ASource code : set T) (BSource code : T -> set T') :
countable A -> (forall iSource code, A i -> countable (B i)) -> countable (A `*`` B).
Proof.
elim/Ppointed: T' => T' in B *.
by rewrite -bigcupX1l bigcup0// => i; rewrite emptyE setX0.
move=> Ac Bc; rewrite -bigcupX1l bigcup_countable// => i Ai.
have /ppcard_leP[f] := Bc i Ai; apply/pcard_geP/surjPex.
exists (fun kSource code => (i, f^-1%FUN k)) => -[_ j]/= [-> dj].
by exists (f j) => //=; rewrite funK ?inE.
Qed.
Lemma countableXSource code T1Source code T2Source code (D1Source code : set T1) (D2Source code : set T2) :
countable D1 -> countable D2 -> countable (D1 `*` D2).
Proof.
Lemma countableXLSource code TSource code T'Source code (ASource code : T' -> set T) (BSource code : set T') :
countable B -> (forall iSource code, B i -> countable (A i)) -> countable (A ``*` B).
Proof.
by apply: countableX => //; exact: Ac.
Qed.
Lemma infiniteXRlSource code TSource code T'Source code (ASource code : set T) (BSource code : T -> set T') :
infinite_set A -> (forall iSource code, B i !=set0) -> infinite_set (A `*`` B).
Proof.
Lemma cardXR_eq_natUsed by
- mathcomp.analysis.measure_theory.measure_extension
- mathcomp.analysis.measure_theory.measure_function
Source code TSource code T'Source code (ASource code : set T) (BSource code : T -> set T') :
(A #= [set: nat] -> (forall iSource code, countable (B i) /\ B i !=set0) ->
A `*`` B #= [set: nat])%card.
Proof.
by rewrite [(_ #<= _)%card]countableXR//=; exact/infiniteP/infiniteXRl.
Qed.
Lemma eq_cardSPUsed by
- mathcomp.analysis.topology_theory.compact
- mathcomp.classical.filter
Source code {TSource code : Type} (ASource code : set T) nSource code :
reflect (exists2 xSource code, A x & A `\ x #= `I_n) (A #= `I_n.+1).
Proof.
rewrite !emptyE; apply: (iffP eqP) => [|[]//].
by move=> /(congr1 (@^~ 0%N))/=; rewrite -falseE ltnS leq0n => /is_true_inj.
apply: (iffP idP) => [|[x Ax]].
move=> /ppcard_eqP[f]; exists (f^-1 n); first by apply: funS => /=.
by apply/card_esym/card_set_bijP; exists f^-1; apply: bij_II_D1.
move=> /pcard_eqP[f]; have [//|||g _] := @super_bij _ _ _ A _ `I_n.+1 f.
- by move=> k /=; apply: leq_trans.
- by rewrite setDD (card_eqr card_IID) subSnn// setIidr ?card_set1// => ? ->.
- by apply/pcard_eqP; squash g.
Qed.
Lemma countable_n_subsetSource code {TSource code : Type} (DSource code : set T) nSource code :
countable D -> countable [set ASource code | A `<=` D /\ A #= `I_n].
Proof.
rewrite [X in countable X]( _ : _ = [set set0])// eqEsubset II0.
by split=> A /=; [rewrite card_eq0; case=> _ /eqP | move->; split].
move=> /(countableX Dcnt); apply: sub_countable.
apply: card_le_trans (card_image_le (fun uSource code => u.1 |` u.2) _).
apply: subset_card_le => B [BD] /eq_cardSP [x Bx BDx].
exists (x, B `\ x) => /=; last by apply: setDUK => ? ->.
by do !split=> //; [exact: BD | apply: subset_trans _ BD; apply: subDsetl].
Qed.
Lemma countable_finite_subsetSource code {TSource code : Type} (DSource code : set T) :
countable D -> countable [set ASource code | A `<=` D /\ finite_set A ].
Proof.
\bigcup_nSource code [set ASource code | A `<=` D /\ A #= `I_n ].
by apply: bigcup_countable => // ? _; exact: countable_n_subset.
rewrite eqEsubset; split=> [A [AD /finite_setP[n An]]|A]; first by exists n.
by move=> [n _ [AD An]]; split=> //; apply/finite_setP; exists n.
Qed.
Lemma eq_card_fset_subsetSource code {TSource code : pointedType} (DSource code : set T) :
[set ASource code | A `<=` D /\ finite_set A ] #= [set ASource code : {fset T} | {subset A <= D}] .
Proof.
- by move=> A [AD fsetA] /= x; rewrite in_fset_set // ?inE; exact: AD.
- by move=> ? ? /set_mem [_ +] /set_mem [_ +]; exact: fset_set_inj.
- move=> B /= BD; exists [set` B]; rewrite ?set_fsetK //.
by split; [by move => x /= /BD /set_mem | exact: finite_fset].
Qed.
Lemma fset_subset_countableUsed by
- mathcomp.analysis.topology_theory.compact
- mathcomp.classical.filter
Source code {TSource code : pointedType} (DSource code : set T) :
countable D -> countable [set ASource code : {fset T} | {subset A <= D}].
Proof.
HBUsed by
- mathcomp.analysis.numfun
- mathcomp.analysis.lebesgue_integral_theory.simple_functions
Source code.mixinUsed by
- mathcomp.analysis.numfun
- mathcomp.analysis.lebesgue_integral_theory.simple_functions
Source code RecordUsed by
- mathcomp.analysis.numfun
- mathcomp.analysis.lebesgue_integral_theory.simple_functions
Source code FiniteImageUsed by
- mathcomp.analysis.numfun
- mathcomp.analysis.lebesgue_integral_theory.simple_functions
Source code aTUsed by
- mathcomp.analysis.numfun
- mathcomp.analysis.lebesgue_integral_theory.simple_functions
Source code rTUsed by
- mathcomp.analysis.numfun
- mathcomp.analysis.lebesgue_integral_theory.simple_functions
Source code (fUsed by
- mathcomp.analysis.numfun
- mathcomp.analysis.lebesgue_integral_theory.simple_functions
Source code :Used by
- mathcomp.analysis.numfun
- mathcomp.analysis.lebesgue_integral_theory.simple_functions
Source code aTUsed by
- mathcomp.analysis.numfun
- mathcomp.analysis.lebesgue_integral_theory.simple_functions
Source code -> rT) := {
fimfunP : finite_set (range f)
}.
HBUsed by
- mathcomp.analysis.lebesgue_integral_theory.simple_functions
Source code.structureUsed by
- mathcomp.analysis.lebesgue_integral_theory.simple_functions
Source code DefinitionUsed by
- mathcomp.analysis.lebesgue_integral_theory.simple_functions
Source code FImFunUsed by
- mathcomp.analysis.lebesgue_integral_theory.simple_functions
Source code aTUsed by
- mathcomp.analysis.lebesgue_integral_theory.simple_functions
Source code rTUsed by
- mathcomp.analysis.lebesgue_integral_theory.simple_functions
Source code :=Used by
- mathcomp.analysis.lebesgue_integral_theory.simple_functions
Source code {fUsed by
- mathcomp.analysis.lebesgue_integral_theory.simple_functions
Source code of @FiniteImage aT rT f}.
Arguments fimfunP {aT rT} _.
#[global] Hint Extern 0 (finite_set _) => solve [apply: fimfunP] : core.
Reserved Notation "{ 'fimfun' aT >-> T }"
(at level 0, format "{ 'fimfun' aT >-> T }").
Reserved Notation "[ 'fimfun' 'of' f ]"
(at level 0, format "[ 'fimfun' 'of' f ]").
Notation "{ 'fimfun' aT >-> T }"Source code := (@FImFun.type aT T) : form_scope.
Notation "[ 'fimfun' 'of' f ]"Source code := [the {fimfun _ >-> _} of f] : form_scope.
Lemma fimfun_inPSource code {aTSource code rTSource code} (fSource code : {fimfun aT >-> rT}) (DSource code : set aT) :
finite_set (f @` D).
Proof.
#[global] Hint Resolve fimfun_inP : core.
Lemma fset_set_compSource code (T1Source code : Type) (T2Source code T3Source code : choiceType) (DSource code : set T1)
(fSource code : {fimfun T1 >-> T2}) (gSource code : T2 -> T3) :
fset_set [set (g \o f) x | xSource code in D] =
[fset g x | xSource code in fset_set [set f x | xSource code in D]]%fset.
Proof.
Section fimfun_pred.
Context {aTSource code rTSource code : Type}.
Definition fimfun
fst_fset : forall [T1 T2 : choiceType], {fset T1 * T2} -> {fset T1} fst_fset is not universe polymorphic Arguments fst_fset [T1 T2] A fst_fset is transparent Expands to: Constant mathcomp.classical.cardinality.fst_fset Declared in library mathcomp.classical.cardinality, line 846, characters 11-19 snd_fset : forall [T1 T2 : choiceType], {fset T1 * T2} -> {fset T2} snd_fset is not universe polymorphic Arguments snd_fset [T1 T2] A snd_fset is transparent Expands to: Constant mathcomp.classical.cardinality.snd_fset Declared in library mathcomp.classical.cardinality, line 848, characters 11-19
Used by
- mathcomp.analysis.numfun
- mathcomp.analysis.lebesgue_integral_theory.simple_functions
Source code : {pred aT -> rT} := mem [set fSource code | finite_set (range f)].
Definition fimfun_key
fimfun : forall {aT rT : Type}, {pred aT -> rT} fimfun is not universe polymorphic Arguments fimfun {aT rT}%_type_scope _ fimfun is transparent Expands to: Constant mathcomp.classical.cardinality.fimfun Declared in library mathcomp.classical.cardinality, line 1340, characters 11-17
Source code : pred_key fimfun.
Proof.
fimfun_key : forall {aT rT : Type}, pred_key (T:=aT -> rT) fimfun fimfun_key is not universe polymorphic Arguments fimfun_key {aT rT}%_type_scope fimfun_key is opaque Expands to: Constant mathcomp.classical.cardinality.fimfun_key Declared in library mathcomp.classical.cardinality, line 1341, characters 11-21
Source code := KeyedPred fimfun_key.
End fimfun_pred.
Section fimfun.
Context {aTSource code rTSource code : Type}.
Notation TSource code := {fimfun aT >-> rT}.
Notation fimfunUsed by
- mathcomp.analysis.numfun
- mathcomp.analysis.lebesgue_integral_theory.simple_functions
Source code := (@fimfun aT rT).
Section Sub.
Context (fSource code : aT -> rT) (fPSource code : f \in fimfun).
Definition fimfun_Sub_subproof
fimfun_keyed : forall {aT rT : Type}, keyed_pred fimfun_key fimfun_keyed is not universe polymorphic Arguments fimfun_keyed {aT rT}%_type_scope fimfun_keyed is transparent Expands to: Constant mathcomp.classical.cardinality.fimfun_keyed Declared in library mathcomp.classical.cardinality, line 1343, characters 10-22
Source code := @FiniteImage.Build aT rT f (set_mem fP).
#[local]Source code HBSource code.instanceSource code DefinitionSource code _Source code :=Source code fimfun_Sub_subproofSource code.
Definition fimfun_Sub
fimfun_Sub_subproof : forall {aT rT : Type} [f : aT -> rT], f \in fimfun -> FiniteImage.axioms_ aT rT f fimfun_Sub_subproof is not universe polymorphic Arguments fimfun_Sub_subproof {aT rT}%_type_scope [f]%_function_scope fP fimfun_Sub_subproof is transparent Expands to: Constant mathcomp.classical.cardinality.fimfun_Sub_subproof Declared in library mathcomp.classical.cardinality, line 1352, characters 11-30
Source code := [fimfun of f].
End Sub.
Lemma fimfun_rectSource code (KSource code : T -> Type) :
(forall fSource code (PfSource code : f \in fimfun), K (fimfun_Sub Pf)) -> forall uSource code : T, K u.
Proof.
Lemma fimfun_valPSource code fSource code (PfSource code : f \in fimfun) : fimfun_Sub Pf = f :> (_ -> _).
Proof.
HBSource code.instanceSource code DefinitionSource code _Source code :=Source code isSubSource code.Build _ _ T fimfun_rect fimfun_valP.
End fimfun.
Lemma fimfuneqPSource code aTSource code rTSource code (fSource code gSource code : {fimfun aT >-> rT}) :
f = g <-> f =1 g.
HBSource code.instanceSource code DefinitionSource code _Source code aTSource code (rTSource code :Source code eqTypeSource code) :=
[Equality of {fimfun aT >-> rT} by <:].
HBSource code.instanceSource code DefinitionSource code _Source code aTSource code (rTSource code :Source code choiceTypeSource code) :=
[Choice of {fimfun aT >-> rT} by <:].
Lemma finite_image_cstUsed by
- mathcomp.analysis.numfun
Source code {aTSource code rTSource code : Type} (xSource code : rT) :
finite_set (range (cst x : aT -> _)).
Proof.
HBSource code.instanceSource code DefinitionSource code _Source code aTSource code rTSource code xSource code :=Source code
FiniteImage.Build aT rT (cst x) (@finite_image_cst aT rT x).
Definition cst_fimfun
fimfun_Sub : forall {aT rT : Type} [f : aT -> rT], f \in fimfun -> {fimfun aT >-> rT} fimfun_Sub is not universe polymorphic Arguments fimfun_Sub {aT rT}%_type_scope [f]%_function_scope fP fimfun_Sub is transparent Expands to: Constant mathcomp.classical.cardinality.fimfun_Sub Declared in library mathcomp.classical.cardinality, line 1354, characters 11-21
Used by
- mathcomp.analysis.numfun
Source code {aTSource code rTSource code} xSource code : {fimfun aT >-> rT} := cst x.
Lemma fimfun_cstSource code aTSource code rTSource code xSource code : @cst_fimfun aT rT x =1 cst x
Proof.
Lemma comp_fimfun_subproofSource code aTSource code rTSource code sTSource code
(fSource code : {fimfun aT >-> rT}) (gSource code : rT -> sT) : @FiniteImage aT sT (g \o f).
Proof.
Section zmod.
Context (aTSource code : Type) (rTSource code : zmodType).
Lemma fimfun_zmod_closedSource code : zmod_closed (@fimfun aT rT).
Proof.
by move=> fA gA; apply: (finite_image11 (fun xSource code ySource code => x - y)).
Qed.
GRing.isZmodClosed.Build (aT -> rT) fimfun fimfun_zmod_closed.
HBSource code.instanceSource code DefinitionSource code _Source code :=Source code
[SubChoice_isSubZmodule of {fimfun aT >-> rT} by <:].
Implicit Types (f g : {fimfun aT >-> rT}).
Lemma fimfunDSource code fSource code gSource code : f + g = f \+ g :> (_ -> _)
Proof.
Proof.
Proof.
Proof.
- mathcomp.analysis.numfun
Source code ISource code rSource code (PSource code : {pred I}) (fSource code : I -> {fimfun aT >-> rT}) (xSource code : aT) :
(\sum_(iSource code <- r | P i) f i) x = \sum_(iSource code <- r | P i) f i x.
Proof.
HBSource code.instanceSource code DefinitionSource code _Source code fSource code gSource code :=Source code FImFunSource code.copy (f \+ g) (f + g).
HBSource code.instanceSource code DefinitionSource code _Source code fSource code gSource code :=Source code FImFunSource code.copy (\- f) (- f).
HBSource code.instanceSource code DefinitionSource code _Source code fSource code gSource code :=Source code FImFunSource code.copy (f \- g) (f - g).
End zmod.