Closed trevorkarn closed 2 years ago
Last 10 new commits:
b2f9f50 | Fix sign error |
1550f9d | Fix coboundary on basis |
b3ed980 | Clean up code a bit |
fff9062 | Add doctest |
9e19f79 | All tests pass |
001b3c7 | Add doctest |
1601588 | Rewrite multiplication |
a34ae96 | Merge branch 'u/tkarn/32369-exterior-rewrite-v2' of trac.sagemath.org:sage into exterior-main |
697104c | Fix merge error |
d24c5fc | Initial commit of f4 |
Commit: d24c5fc
Branch: u/tkarn/exterior-gb-34138
Dependencies: #32369
Changed branch from u/tkarn/exterior-gb-34138 to public/algebras/exterior_groebner-34138
Branch pushed to git repo; I updated commit sha1. New commits:
71113fa | Fixing some little details. |
Branch pushed to git repo; I updated commit sha1. New commits:
bf0e673 | Implementing different term orders for GB. |
Branch pushed to git repo; I updated commit sha1. New commits:
be68f0d | Fixing some things and tests. |
Branch pushed to git repo; I updated commit sha1. This was a forced push. Last 10 new commits:
7a79608 | Another implementation of Groebner bases for the exterior algebra. |
c8a3766 | Fixing some little details. |
b62d578 | Cythonizing the element classes. |
d91a556 | Adding more type declarations and renaming the Groebner file. |
3a9d790 | Initial version of GB strategy file for exterior algebra. |
368491c | Implementing different term orders for GB. |
f2a25e3 | Fixing some things and tests. |
dba5089 | Bringing more to the GB strategy classes. |
2362a63 | Implementing containment of ideals, mostly. |
6480faa | Rebase off of 9.7.beta6 and fix merge conflicts |
All tests still pass in clifford_algebra.py
and clifford_algebra_element.pyx
.
There appears to be a bug in the following example
sage: E.<x,y> = ExteriorAlgebra(QQ)
sage: I = E.ideal([x * y - 1, x * y - x])
sage: I.groebner_basis()
where it gets stuck in an infinite while loop on line 206 of exterior_algebra_groebner.pyx
. For comparison,
i2 : QQ[x,y, SkewCommutative=>true]
o2 = QQ[x, y]
o2 : PolynomialRing, 2 skew commutative variables
i3 : I = ideal( x*y - 1, x*y - x)
o3 = ideal (x*y - 1, x*y - x)
o3 : Ideal of QQ[x, y]
i4 : groebnerBasis(I)
o4 = | 1 |
1 1
o4 : Matrix (QQ[x, y]) <--- (QQ[x, y])
Branch pushed to git repo; I updated commit sha1. New commits:
59a30c1 | Merge branch 'public/algebras/exterior_groebner-34138' of https://github.com/sagemath/sagetrac-mirror into public/algebras/exterior_groebner-34138 |
b6174b4 | Merge branch 'u/tkarn/32369-exterior-rewrite-v2' of https://github.com/sagemath/sagetrac-mirror into public/algebras/exterior_algebra_index_set-32369 |
a325339 | Doing some reviewer changes. |
47281fa | Merge branch 'public/algebras/exterior_algebra_index_set-32369' into public/algebras/exterior_groebner-34138 |
692f2f5 | Fixing containment and reduction of exterior algebra ideals. |
6c92f18 | Implementing multiplication of exterior algebra ideals. |
Branch pushed to git repo; I updated commit sha1. New commits:
698e051 | Some last details for pyflakes and full coverage. |
I rebased this over my changes in #32369, fixed the comparison of ideals, and implemented multiplication of ideals. This is all of the low hanging fruit that I can see from a GB implementation. I think this is ready for review. I have looked at your changes, and I think they are good. All that remains is for you to check mine.
Reviewer: Travis Scrimshaw, Trevor K. Karn
Changed author from Trevor K. Karn to Trevor K. Karn, Travis Scrimshaw
Branch pushed to git repo; I updated commit sha1. New commits:
12d76e7 | Revert change in morphisms |
Branch pushed to git repo; I updated commit sha1. New commits:
d21d2e8 | Forgot to remove the Cython profiling directive. |
Branch pushed to git repo; I updated commit sha1. New commits:
5734555 | Fixing a number of small bugs and adding option for non-reduced GB. |
This should fix the remaining doctest failures in groups/raag.py
. The issue was that we can't override cdef _mul_
with def _mul_
. That cohomology ring has a simple description of an exterior algebra modulo relations of the form e_i ^ e_j = 0
. So that implementation likely could be improved as well, but that can be done on a followup ticket.
Branch pushed to git repo; I updated commit sha1. New commits:
b227973 | Speeding up multiplication even further. |
These changes now make this multiplication test twice as fast:
sage: E = ExteriorAlgebra(QQ, 'x', 10)
sage: r = sum(E.basis())
sage: %timeit r * r
57.2 ms ± 842 µs per loop (mean ± std. dev. of 7 runs, 10 loops each)
versus before
129 ms ± 700 µs per loop (mean ± std. dev. of 7 runs, 10 loops each)
Branch pushed to git repo; I updated commit sha1. New commits:
e7e84b7 | Special casing multiplication by a term. |
Here is an improvement to multiplication by a single term:
sage: %timeit a * r
2.4 µs ± 34.9 ns per loop (mean ± std. dev. of 7 runs, 100,000 loops each)
sage: %timeit r * a
4.88 µs ± 76.6 ns per loop (mean ± std. dev. of 7 runs, 100,000 loops each)
sage: %timeit E(2) * r
5.51 µs ± 41.2 ns per loop (mean ± std. dev. of 7 runs, 100,000 loops each)
sage: %timeit r * E(2)
5.63 µs ± 63.1 ns per loop (mean ± std. dev. of 7 runs, 100,000 loops each)
sage: %timeit E(0) * r
1.05 µs ± 7.86 ns per loop (mean ± std. dev. of 7 runs, 1,000,000 loops each)
sage: %timeit r * E(0)
1.02 µs ± 5.09 ns per loop (mean ± std. dev. of 7 runs, 1,000,000 loops each)
versus b227973:
5.09 µs ± 64.5 ns per loop (mean ± std. dev. of 7 runs, 100,000 loops each)
6.43 µs ± 19.7 ns per loop (mean ± std. dev. of 7 runs, 100,000 loops each)
5.17 µs ± 19.9 ns per loop (mean ± std. dev. of 7 runs, 100,000 loops each)
8.1 µs ± 33.9 ns per loop (mean ± std. dev. of 7 runs, 100,000 loops each)
1.34 µs ± 6.96 ns per loop (mean ± std. dev. of 7 runs, 1,000,000 loops each)
1.76 µs ± 13.4 ns per loop (mean ± std. dev. of 7 runs, 1,000,000 loops each)
The difference with the left versus right is because we do not choose which term to slide past the other. We can maybe address that here, along with removing the code duplication I have introduced.
Branch pushed to git repo; I updated commit sha1. New commits:
36b6b20 | Doing reduction in place; being careful about duplicates. |
Add a native Sage implementation to compute a Groebner basis for an ideal of a Sage
ExteriorAlgebra
Depends on #32369
CC: @tscrim @simon-king-jena
Component: algebra
Keywords: groebner basis, gsoc2022, f4
Author: Trevor K. Karn, Travis Scrimshaw
Branch/Commit:
36b6b20
Reviewer: Travis Scrimshaw, Trevor K. Karn
Issue created by migration from https://trac.sagemath.org/ticket/34138