[Merged by Bors] - feat(Data/Seq): structural lemmas#19859
[Merged by Bors] - feat(Data/Seq): structural lemmas#19859vasnesterov wants to merge 18 commits intomasterfrom
Conversation
PR summary 90e86dca78Import changes exceeding 2%
|
| File | Base Count | Head Count | Change |
|---|---|---|---|
| Mathlib.Data.Seq.Seq | 277 | 329 | +52 (+18.77%) |
| Mathlib.Data.Seq.Parallel | 281 | 332 | +51 (+18.15%) |
Import changes for all files
| Files | Import difference |
|---|---|
7 filesMathlib.Algebra.ContinuedFractions.Computation.Approximations Mathlib.Algebra.ContinuedFractions.Computation.Basic Mathlib.Algebra.ContinuedFractions.Computation.CorrectnessTerminating Mathlib.Algebra.ContinuedFractions.Computation.TerminatesIffRat Mathlib.Algebra.ContinuedFractions.Computation.Translations Mathlib.Algebra.ContinuedFractions.ConvergentsEquiv Mathlib.Algebra.ContinuedFractions.Determinant |
1 |
6 filesMathlib.Algebra.ContinuedFractions.Basic Mathlib.Algebra.ContinuedFractions.ContinuantsRecurrence Mathlib.Algebra.ContinuedFractions.TerminatedStable Mathlib.Algebra.ContinuedFractions.Translations Mathlib.Data.Seq.Parallel Mathlib.Data.Seq.WSeq |
51 |
Mathlib.Data.Seq.Seq |
52 |
Declarations diff
+ cons_eq_cons
+ cons_ne_nil
+ cons_not_terminatedAt_zero
+ cons_terminatedAt_succ_iff
+ corec_cons
+ corec_nil
+ destruct_eq_none
+ drop_get?
+ drop_nil
+ drop_succ_cons
+ fold
+ fold_cons
+ fold_head
+ fold_nil
+ get?_mem
+ get?_mem_take
+ head_eq_none
+ head_eq_none_iff
+ head_eq_some
+ length_take_le
+ nil_ne_cons
+ take_drop
+ take_nil
+ take_succ_cons
+ take_zero
+ terminates_cons_iff
+ val_eq_get
+ zipWith_cons_cons
+ zipWith_map
+ zipWith_map_left
+ zipWith_map_right
+ zipWith_nil_left
+ zipWith_nil_right
+ zip_cons_cons
+ zip_map
+ zip_map_left
+ zip_map_right
+ zip_nil_left
+ zip_nil_right
- destruct_eq_nil
You can run this locally as follows
## summary with just the declaration names:
./scripts/declarations_diff.sh <optional_commit>
## more verbose report:
./scripts/declarations_diff.sh long <optional_commit>The doc-module for script/declarations_diff.sh contains some details about this script.
No changes to technical debt.
You can run this locally as
./scripts/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).
Mathlib/Data/Seq/Seq.lean
Outdated
| | n + 1 => tail (drop s n) | ||
|
|
||
| attribute [simp] drop | ||
| -- attribute [simp] drop |
There was a problem hiding this comment.
What's the reasoning here?
There was a problem hiding this comment.
When drop is marked with [simp], the simplifier unfolds (cons x s).drop (n + 1) as ((cons x s).drop n).tail instead of s.drop n, even when the drop_succ_cons simp-lemma is present. In general, I think that replacing s.drop (n + 1) with (s.drop n).tail is not what the user wants by default because it adds another sequence operation to the expression, which rarely is simplification.
With drop_nil and drop_succ_cons instead, the simplifier always simplifies the expression.
|
In #20071 I reorganized this file, so some proofs from this PR are changed. It also removes "large-import". |
|
This PR/issue depends on: |
* Add several theorems about `Stream'.Seq`, mainly on sequence operations with `nil` and `cons`. * Introduce the `fold` operation for sequences and prove a few structural lemmas about it. * Rename `Seq.destruct_eq_nil` as `Seq.destruct_eq_none`.
|
Pull request successfully merged into master. Build succeeded: |
* Add several theorems about `Stream'.Seq`, mainly on sequence operations with `nil` and `cons`. * Introduce the `fold` operation for sequences and prove a few structural lemmas about it. * Rename `Seq.destruct_eq_nil` as `Seq.destruct_eq_none`.
* Add several theorems about `Stream'.Seq`, mainly on sequence operations with `nil` and `cons`. * Introduce the `fold` operation for sequences and prove a few structural lemmas about it. * Rename `Seq.destruct_eq_nil` as `Seq.destruct_eq_none`.
Stream'.Seq, mainly on sequence operations withnilandcons.foldoperation for sequences and prove a few structural lemmas about it.Seq.destruct_eq_nilasSeq.destruct_eq_none.Seq.recOnwithcases_eliminator#19829This PR is necessary for a new tactic (#18486), which computes the asymptotics of real functions.