[Merged by Bors] - feat: add ComplexShape.EulerCharSigns for generalized Euler characteristic#31121
Conversation
PR summary 088175664fImport changes for modified filesNo significant changes to the import graph Import changes for all files
|
0e6cabb to
9f13faa
Compare
9f13faa to
3db3084
Compare
012aa24 to
8d67eca
Compare
a7f8bb5 to
31ed875
Compare
a27c882 to
9d20009
Compare
|
This pull request has conflicts, please merge |
9d20009 to
7930a93
Compare
resolved! |
e34b02c to
08d8d31
Compare
7fabf67 to
6e07cf2
Compare
|
ping @joelriou I took a look at your comment and changed things as suggested. It's ready for another look! |
|
-awaiting-author |
|
-awaiting-author |
6a290f6 to
6f58056
Compare
…istic Add Euler characteristic for homological complexes with arbitrary index types and shapes. The typeclass ComplexShape.EulerCharSigns provides alternating signs for Euler characteristic computations, with instances for up/down N and up/down Z. Introduces GradedObject.eulerChar and GradedObject.eulerCharTsum with ComplexShape as an explicit parameter, with HomologicalComplex versions as abbreviations.
Co-authored-by: Robin Carlier <57142648+robin-carlier@users.noreply.github.com>
…o lemmas Add `mulSupport_eq_univ`/`support_eq_univ` for functions that are everywhere non-one/nonzero, and `support_mul_of_ne_zero_left/right` for products where one factor is everywhere nonzero. Simplify `support_eulerChar_summand` using the new lemmas.
Make finsum-based eulerChar the primary definition, remove separate finite-sum versions. Make support_eulerChar_summand private. Thanks @robin-carlier for the review feedback.
Add a "Junk values" section to document that `eulerChar` and related definitions may produce junk values from `finsum` (0 for infinite support) and `Module.finrank` (0 for modules not free of finite rank).
Co-authored-by: Robin Carlier <57142648+robin-carlier@users.noreply.github.com>
Co-authored-by: Robin Carlier <57142648+robin-carlier@users.noreply.github.com>
6f58056 to
f77962c
Compare
robin-carlier
left a comment
There was a problem hiding this comment.
Thanks!
maintainer merge
|
🚀 Pull request has been placed on the maintainer queue by robin-carlier. |
|
Thanks! bors merge |
Thanks for the help! |
…istic (#31121) Add `ComplexShape.EulerCharSigns` typeclass providing the alternating signs `χ : ι → ℤˣ` for Euler characteristic computations. Instances are provided for `up ℕ`, `down ℕ`, `up ℤ`, and `down ℤ`. The Euler characteristic definition (`eulerChar`) uses `finsum` to sum over all indices, with the `ComplexShape` as an explicit parameter. This allows working with arbitrary index types without requiring a `Fintype` instance, defaulting to 0 when the support is infinite. The `GradedObject` version is the primary definition, with `HomologicalComplex.eulerChar` and `HomologicalComplex.homologyEulerChar` as abbreviations that apply the graded object version to `C.X` and `C.homology` respectively. Split from #29713 as suggested by @joelriou.
|
Pull request successfully merged into master. Build succeeded: |
…istic (leanprover-community#31121) Add `ComplexShape.EulerCharSigns` typeclass providing the alternating signs `χ : ι → ℤˣ` for Euler characteristic computations. Instances are provided for `up ℕ`, `down ℕ`, `up ℤ`, and `down ℤ`. The Euler characteristic definition (`eulerChar`) uses `finsum` to sum over all indices, with the `ComplexShape` as an explicit parameter. This allows working with arbitrary index types without requiring a `Fintype` instance, defaulting to 0 when the support is infinite. The `GradedObject` version is the primary definition, with `HomologicalComplex.eulerChar` and `HomologicalComplex.homologyEulerChar` as abbreviations that apply the graded object version to `C.X` and `C.homology` respectively. Split from leanprover-community#29713 as suggested by @joelriou.
…istic (leanprover-community#31121) Add `ComplexShape.EulerCharSigns` typeclass providing the alternating signs `χ : ι → ℤˣ` for Euler characteristic computations. Instances are provided for `up ℕ`, `down ℕ`, `up ℤ`, and `down ℤ`. The Euler characteristic definition (`eulerChar`) uses `finsum` to sum over all indices, with the `ComplexShape` as an explicit parameter. This allows working with arbitrary index types without requiring a `Fintype` instance, defaulting to 0 when the support is infinite. The `GradedObject` version is the primary definition, with `HomologicalComplex.eulerChar` and `HomologicalComplex.homologyEulerChar` as abbreviations that apply the graded object version to `C.X` and `C.homology` respectively. Split from leanprover-community#29713 as suggested by @joelriou.
…istic (leanprover-community#31121) Add `ComplexShape.EulerCharSigns` typeclass providing the alternating signs `χ : ι → ℤˣ` for Euler characteristic computations. Instances are provided for `up ℕ`, `down ℕ`, `up ℤ`, and `down ℤ`. The Euler characteristic definition (`eulerChar`) uses `finsum` to sum over all indices, with the `ComplexShape` as an explicit parameter. This allows working with arbitrary index types without requiring a `Fintype` instance, defaulting to 0 when the support is infinite. The `GradedObject` version is the primary definition, with `HomologicalComplex.eulerChar` and `HomologicalComplex.homologyEulerChar` as abbreviations that apply the graded object version to `C.X` and `C.homology` respectively. Split from leanprover-community#29713 as suggested by @joelriou.
…istic (leanprover-community#31121) Add `ComplexShape.EulerCharSigns` typeclass providing the alternating signs `χ : ι → ℤˣ` for Euler characteristic computations. Instances are provided for `up ℕ`, `down ℕ`, `up ℤ`, and `down ℤ`. The Euler characteristic definition (`eulerChar`) uses `finsum` to sum over all indices, with the `ComplexShape` as an explicit parameter. This allows working with arbitrary index types without requiring a `Fintype` instance, defaulting to 0 when the support is infinite. The `GradedObject` version is the primary definition, with `HomologicalComplex.eulerChar` and `HomologicalComplex.homologyEulerChar` as abbreviations that apply the graded object version to `C.X` and `C.homology` respectively. Split from leanprover-community#29713 as suggested by @joelriou.
Add
ComplexShape.EulerCharSignstypeclass providing the alternating signsχ : ι → ℤˣfor Euler characteristic computations. Instances are provided forup ℕ,down ℕ,up ℤ, anddown ℤ.The Euler characteristic definition (
eulerChar) usesfinsumto sum over all indices, with theComplexShapeas an explicit parameter. This allows working with arbitrary index types without requiring aFintypeinstance, defaulting to 0 when the support is infinite.The
GradedObjectversion is the primary definition, withHomologicalComplex.eulerCharandHomologicalComplex.homologyEulerCharas abbreviations that apply the graded object version toC.XandC.homologyrespectively.Split from #29713 as suggested by @joelriou.