[Merged by Bors] - feat(Tactic/ComputeAsymptotics/Multiseries): non-primitive corecursion for Seq: FriendlyOperation API#35072
Conversation
PR summary 507f3af613Import changes for modified filesNo significant changes to the import graph Import changes for all files
|
| Current number | Change | Type |
|---|---|---|
| 6901 | 2 | backward.isDefEq.respectTransparency |
Current commit 2ba6668de7
Reference commit 507f3af613
You can run this locally as
./scripts/reporting/technical-debt-metrics.sh pr_summary
- The
relativevalue is the weighted sum of the differences with weight given by the inverse of the current value of the statistic. - The
absolutevalue is therelativevalue divided by the total sum of the inverses of the current values (i.e. the weighted average of the differences).
joneugster
left a comment
There was a problem hiding this comment.
Thanks for the PR! I think the sequence of lemmas makes sense. Only a few comments
joneugster
left a comment
There was a problem hiding this comment.
Thank you for the PR and the applied suggestions.
maintainer merge
|
🚀 Pull request has been placed on the maintainer queue by joneugster. |
| intro x y | ||
| specialize h (.cons hd x) (.cons hd y) | ||
| simp only [dist_cons_cons] at h | ||
| cases hx : op (.cons hd x) with |
There was a problem hiding this comment.
I feel like the work starting here and going down is quite elementary and deserves to exist as own lemma, saying that two Seq α have distance less than 2⁻¹ iff they are either both nil or they are both cons with the same head. Something like dist_le_half_iff_nil_or_head_eq?
There was a problem hiding this comment.
I've added this lemma (dist_le_half_iff), but it's not clear for how to use it here.
| intro s | ||
| specialize hT s | ||
| simp only [Function.comp_apply] | ||
| generalize op s = s' at * | ||
| cases s' with | ||
| | nil => | ||
| symm at hT | ||
| simp at hT |
There was a problem hiding this comment.
I see a lot of this working by cases in this file, where we specialize a lemma, do a case split, and then have to simplify the result. I wonder if we can't write a better cases / recursion principle.
There was a problem hiding this comment.
I'm not sure I understand. A better cases principle for Seq?
| · simp [hst] | ||
| obtain ⟨n, hst⟩ := dist_eq_two_inv_pow hst | ||
| grind | ||
|
|
There was a problem hiding this comment.
@vasnesterov to get some movement on merging your work, could I suggest that we split this PR here at this point (again)? I think everything above could be approved quite directly, while the remainder still contains some heavy, long proofs.
I doubt that a maintainer will get around looking at the entire PR, but if we split it here, I think we might improve the changes of getting some progress.
Vierkantor
left a comment
There was a problem hiding this comment.
Thanks for the split! I think this half is good to go now.
bors d+
|
✌️ vasnesterov can now approve this pull request. To approve and merge a pull request, simply reply with |
|
bors r+ |
|
Pull request successfully merged into master. Build succeeded: |
Seq: FriendlyOperation APISeq: FriendlyOperation API
This is a continuation of #34311.
This PR adds more API about friendly operations:
FriendlyOperation.destruct: a "coinductive destructor" forFriendlyOperationThis is a part of the
compute_asymptoticstactic (#28291).