Skip to content

Add set of lemmas for esum - #2062

Open
lyonel2017 wants to merge 5 commits into
math-comp:masterfrom
lyonel2017:feature-esum-lemmas
Open

Add set of lemmas for esum#2062
lyonel2017 wants to merge 5 commits into
math-comp:masterfrom
lyonel2017:feature-esum-lemmas

Conversation

@lyonel2017

@lyonel2017 lyonel2017 commented Jul 29, 2026

Copy link
Copy Markdown
Contributor
Motivation for this change

Set of lemmas for esum extracted from #2049.

Checklist
  • added corresponding entries in CHANGELOG_UNRELEASED.md
  • added corresponding documentation in the headers
Reminder to reviewers

This was referenced Jul 29, 2026
Comment thread theories/esum.v
have // : (\esum_(i in I) a i = 0); by apply pos_esum1.
Qed.

Lemma pos_esum_ge1 (I : set T) (f: T -> \bar R) :

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Lemma pos_esum_ge1 (I : set T) (f: T -> \bar R) :
Lemma pos_esum_ge1 (I : set T) (f : T -> \bar R) :

Comment thread theories/esum.v

Lemma le_pos_esum S f g : (forall i, S i -> f i <= g i) ->
Lemma pos_neq0_esum (I : set T) (a : T -> \bar R) :
\esum_(i in I) a i <> 0 -> exists i, a i <> 0.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
\esum_(i in I) a i <> 0 -> exists i, a i <> 0.
\esum_(i in I) a i <> 0 -> exists i, a i <> 0.

@affeldt-aist affeldt-aist added this to the 1.18.0 milestone Jul 30, 2026
Comment thread theories/esum.v

Lemma le_pos_esum_fine {U : choiceType} (f: T -> U -> \bar R):
(forall x y, 0 <= f x y)%E ->
(\esum_(i in [set: U]) (fine (\esum_(x in [set: T]) f x i))%:E <=

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can't this be generalized to any A : set U and B : set T?

Comment thread theories/esum.v
by rewrite sube0.
Qed.

Lemma esum_pos_esum S f : (forall x, S x -> 0 <= f x) ->

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This lemma does not look necessary since it is essentially ge0_esum.

Comment thread theories/esum.v
Comment on lines +442 to +449
(* Lemma le_esum S f g : (forall x, S x -> 0 <= f x) -> *)
(* (forall x, S x -> f x <= g x) -> *)
(* \esum_(x in S) f x <= \esum_(x in S) g x. *)
(* Proof. *)
(* move=> f0 leS; have g0 x : S x -> 0 <= g x. *)
(* by move=> /[dup] Ax /leS; apply: le_trans; exact: f0 Ax. *)
(* by rewrite !ge0_esum// PosEsum.le_pos_esum. *)
(* Qed. *)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
(* Lemma le_esum S f g : (forall x, S x -> 0 <= f x) -> *)
(* (forall x, S x -> f x <= g x) -> *)
(* \esum_(x in S) f x <= \esum_(x in S) g x. *)
(* Proof. *)
(* move=> f0 leS; have g0 x : S x -> 0 <= g x. *)
(* by move=> /[dup] Ax /leS; apply: le_trans; exact: f0 Ax. *)
(* by rewrite !ge0_esum// PosEsum.le_pos_esum. *)
(* Qed. *)

Comment thread theories/esum.v
Comment on lines +587 to +588
rewrite esum_if_eq_op.
by rewrite esum_set1.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
rewrite esum_if_eq_op.
by rewrite esum_set1.
rewrite esum_if_eq_op.
by rewrite esum_set1.

Comment thread theories/esum.v
Qed.

Lemma neq0_esum {R : realType} {T : choiceType} (I : set T) (a : T -> \bar R) :
\esum_(i in I) a i <> 0 -> exists i, a i <> 0.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
\esum_(i in I) a i <> 0 -> exists i, a i <> 0.
\esum_(i in I) a i <> 0 -> exists i, a i <> 0.

Comment thread theories/esum.v
have // : (\esum_(i in I) a i = 0); by apply esum1.
Qed.

Lemma esum_ge1 {R : realType} {T : choiceType} (I : set T) (f: T -> \bar R) :

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Lemma esum_ge1 {R : realType} {T : choiceType} (I : set T) (f: T -> \bar R) :
Lemma esum_ge1 {R : realType} {T : choiceType} (I : set T) (f : T -> \bar R) :

Comment thread theories/esum.v
Proof. by move=> ??; apply/summable_muleC /summableZ. Qed.

Lemma summableMl D f1 f2 :
(exists M, (forall x, D x -> `|f1 x| <= M) /\ M \is a fin_num) ->

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use exists2 is often a good idea.

@affeldt-aist

Copy link
Copy Markdown
Member

Sorry for the random, minor comments.
Yet, I am already concerned by the fact that we have summable defined both in esum.v and in realsum.v: we might want to distinguish one or the other by adding a small e or a small r in the identifier.

@affeldt-aist affeldt-aist added the enhancement ✨ This issue/PR is about adding new features enhancing the library label Jul 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement ✨ This issue/PR is about adding new features enhancing the library

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants