[Merged by Bors] - feat(Data/Seq): coinductive predicates for sequences#28874
Closed
vasnesterov wants to merge 49 commits intoleanprover-community:masterfrom
Closed
[Merged by Bors] - feat(Data/Seq): coinductive predicates for sequences#28874vasnesterov wants to merge 49 commits intoleanprover-community:masterfrom
vasnesterov wants to merge 49 commits intoleanprover-community:masterfrom
Conversation
eric-wieser
reviewed
Sep 9, 2025
eric-wieser
reviewed
Sep 9, 2025
eric-wieser
reviewed
Sep 9, 2025
eric-wieser
reviewed
Sep 9, 2025
eric-wieser
reviewed
Sep 9, 2025
Contributor
There was a problem hiding this comment.
This looks pretty reasonable to me. Granted, I haven't checked the code in #28291 where this is used yet though.
@plp127 @eric-wieser any final comments?
plp127
reviewed
Sep 14, 2025
Contributor
|
Thanks! |
mathlib-bors bot
pushed a commit
that referenced
this pull request
Sep 17, 2025
* Prove `eq_of_bisim'` and `eq_of_bisim_strong` coinductive principles for equality. * Develop API for a predicate `∀ x ∈ s, p x` where `s : Seq α`, including coinductive principle `all_coind`. * Introduce the `Pairwise` predicate along with API and coinductive principles `Pairwise.coind` and `Pairwise.coind_trans`. * Introduce `ENat`-valued length of a sequence, `length'`, along with minimal API. * Move theorems about `length` from `Defs.lean` to `Basic.lean`. * Prove a coinductive principle for a predicate `a.length' ≤ b.length'`. All of these "coinductive principles" are stated in the form as similar as possible to inductive principles. Co-authored-by: Vasily Nesterov <vas.nesterov63@gmail.com>
Contributor
|
Pull request successfully merged into master. Build succeeded: |
joelriou
pushed a commit
to joelriou/mathlib4
that referenced
this pull request
Oct 2, 2025
…unity#28874) * Prove `eq_of_bisim'` and `eq_of_bisim_strong` coinductive principles for equality. * Develop API for a predicate `∀ x ∈ s, p x` where `s : Seq α`, including coinductive principle `all_coind`. * Introduce the `Pairwise` predicate along with API and coinductive principles `Pairwise.coind` and `Pairwise.coind_trans`. * Introduce `ENat`-valued length of a sequence, `length'`, along with minimal API. * Move theorems about `length` from `Defs.lean` to `Basic.lean`. * Prove a coinductive principle for a predicate `a.length' ≤ b.length'`. All of these "coinductive principles" are stated in the form as similar as possible to inductive principles. Co-authored-by: Vasily Nesterov <vas.nesterov63@gmail.com>
zhuyizheng
pushed a commit
to zhuyizheng/mathlib4
that referenced
this pull request
Oct 2, 2025
…unity#28874) * Prove `eq_of_bisim'` and `eq_of_bisim_strong` coinductive principles for equality. * Develop API for a predicate `∀ x ∈ s, p x` where `s : Seq α`, including coinductive principle `all_coind`. * Introduce the `Pairwise` predicate along with API and coinductive principles `Pairwise.coind` and `Pairwise.coind_trans`. * Introduce `ENat`-valued length of a sequence, `length'`, along with minimal API. * Move theorems about `length` from `Defs.lean` to `Basic.lean`. * Prove a coinductive principle for a predicate `a.length' ≤ b.length'`. All of these "coinductive principles" are stated in the form as similar as possible to inductive principles. Co-authored-by: Vasily Nesterov <vas.nesterov63@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
eq_of_bisim'andeq_of_bisim_strongcoinductive principles for equality.∀ x ∈ s, p xwheres : Seq α, including coinductive principleall_coind.Pairwisepredicate along with API and coinductive principlesPairwise.coindandPairwise.coind_trans.ENat-valued length of a sequence,length', along with minimal API.lengthfromDefs.leantoBasic.lean.a.length' ≤ b.length'.All of these "coinductive principles" are stated in the form as similar as possible to inductive principles.
updateandsetoperations forSeq#26120This PR is necessary for a new tactic (#28291), which computes the asymptotics of real functions.
This PR continues the work from #20241.
Original PR: #20241