-
Notifications
You must be signed in to change notification settings - Fork 48
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
generalize indexing in lemmas for series #1397
base: master
Are you sure you want to change the base?
Conversation
Two lemmas for |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Excellent! No doubt it will be useful at some point. Just need a rebase for the changelog.
classical/mathcomp_extra.v
Outdated
Lemma eq_lt_total {disp : unit} {T : orderType disp} (x y : T) : | ||
[|| x == y, (x < y)%O | (y < x)%O]. | ||
Proof. by case/boolP: (x == y)=> // ?; apply/orP; right; exact:lt_total. Qed. | ||
|
||
Lemma le_lt_total {disp : unit} {T : orderType disp} (x y : T) : | ||
(x <= y)%O || (y < x)%O. | ||
Proof. by rewrite le_eqVlt -orbA eq_lt_total. Qed. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The idiomatic ways to deal with this is to use case: ltgtP
or case: leP
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
!
@@ -951,13 +951,15 @@ rewrite -(subrr (limn (series u_))). | |||
by apply: cvgB => //; rewrite ?cvg_shiftS. | |||
Qed. | |||
|
|||
Lemma nondecreasing_series (R : numFieldType) (u_ : R ^nat) (P : pred nat) : | |||
Lemma nondecreasing_series (R : numFieldType) (u_ : R ^nat) (P : pred nat) m : | |||
(forall n, P n -> 0 <= u_ n)%R -> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why not having
(forall n, P n -> 0 <= u_ n)%R -> | |
(forall n, m <= n -> P n -> 0 <= u_ n)%R -> |
instead as a side-condition ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Indeed. Several other statements can be similarly generalized. I'll work on that.
Motivation for this change
There are several lemmas for series stated with zero-based indexing
0 <= k < n
andn <oo
.This PR generalizes them to
m <= k < n
andm <= n<oo
.Checklist
CHANGELOG_UNRELEASED.md
Reference: How to document
Reminder to reviewers