sagemath / sage

Main repository of SageMath
https://www.sagemath.org
Other
1.22k stars 425 forks source link

Rewrite Clifford and exterior algebras to have a basis indexed by integers #32369

Closed tscrim closed 1 year ago

tscrim commented 2 years ago

Integers are a more compact way of representing subsets with their bits. This should both decrease the memory usage to store elements and the speed due to using bit operations and nearly trivial hashing.

Depends on #34035 Depends on #34084

CC: @tscrim @trevorkarn

Component: algebra

Keywords: gsoc2022 exterior algebra index integer

Author: Trevor K. Karn

Branch/Commit: 2637750

Reviewer: Travis Scrimshaw

Issue created by migration from https://trac.sagemath.org/ticket/32369

trevorkarn commented 2 years ago

Dependencies: # 33989

trevorkarn commented 2 years ago

Changed dependencies from # 33989 to #33989

trevorkarn commented 2 years ago

Commit: 3fd9f51

trevorkarn commented 2 years ago

Changed keywords from none to gsoc2022 exterior algebra index integer

trevorkarn commented 2 years ago

Branch: u/tkarn/32369-exterior-rewrite

trevorkarn commented 2 years ago

Author: Trevor K. Karn

7ed8c4ca-6d56-4ae9-953a-41e42b4ed313 commented 2 years ago

Changed commit from 3fd9f51 to a64948c

7ed8c4ca-6d56-4ae9-953a-41e42b4ed313 commented 2 years ago

Branch pushed to git repo; I updated commit sha1. New commits:

a64948cRewrite multiplication to use bit-indexed sets
trevorkarn commented 2 years ago

Changed commit from a64948c to 5df9054

trevorkarn commented 2 years ago

New commits:

d4f3d86Add FrozenBitset.__reversed__
353d588Initial commit/minimal change
8b0bd3cFix .one_basis()
5df9054Remove accidental print statement
trevorkarn commented 2 years ago

Changed branch from u/tkarn/32369-exterior-rewrite to u/tkarn/32369-exterior-rewrite-v2

trevorkarn commented 2 years ago

Changed dependencies from #33989 to #34035

7ed8c4ca-6d56-4ae9-953a-41e42b4ed313 commented 2 years ago

Branch pushed to git repo; I updated commit sha1. New commits:

0ca83abAdd _basis_index_function as a method, fix some doctests, and fix some type issues (tuple -> FrozenBitset)
7ed8c4ca-6d56-4ae9-953a-41e42b4ed313 commented 2 years ago

Changed commit from 5df9054 to 0ca83ab

7ed8c4ca-6d56-4ae9-953a-41e42b4ed313 commented 2 years ago

Branch pushed to git repo; I updated commit sha1. New commits:

be97491Fix multiplication
7ed8c4ca-6d56-4ae9-953a-41e42b4ed313 commented 2 years ago

Changed commit from 0ca83ab to be97491

7ed8c4ca-6d56-4ae9-953a-41e42b4ed313 commented 2 years ago

Branch pushed to git repo; I updated commit sha1. New commits:

b1eca07Fix repr sorting issue and add some small tests
62a4f39First draft of basis iterator
120eb30Second attempt at iterating
7ed8c4ca-6d56-4ae9-953a-41e42b4ed313 commented 2 years ago

Changed commit from be97491 to 120eb30

7ed8c4ca-6d56-4ae9-953a-41e42b4ed313 commented 2 years ago

Changed commit from 120eb30 to b462c27

7ed8c4ca-6d56-4ae9-953a-41e42b4ed313 commented 2 years ago

Branch pushed to git repo; I updated commit sha1. New commits:

b462c27Add index class and first draft of exterior __mul__
7ed8c4ca-6d56-4ae9-953a-41e42b4ed313 commented 2 years ago

Branch pushed to git repo; I updated commit sha1. New commits:

6368c47Fix some bugs and rewrite exterior multplication algorithm
7ed8c4ca-6d56-4ae9-953a-41e42b4ed313 commented 2 years ago

Changed commit from b462c27 to 6368c47

trevorkarn commented 2 years ago

Changed dependencies from #34035 to #34035 #34084

7ed8c4ca-6d56-4ae9-953a-41e42b4ed313 commented 2 years ago

Branch pushed to git repo; I updated commit sha1. This was a forced push. Last 10 new commits:

b4bf5d7Fix repr sorting issue and add some small tests
07407a0First draft of basis iterator
74e8c68Second attempt at iterating
6424146Add index class and first draft of exterior __mul__
dd757e1Fix some bugs and rewrite exterior multplication algorithm
db1b2f0Coboundary and boundary fixes
aaee9b7Fix sum initialization
bfec670Fix `_element_constructor_` and asscii_art
a75c565Fix `__getitem__` when using Bitsets
b82d37aFix sign issue
7ed8c4ca-6d56-4ae9-953a-41e42b4ed313 commented 2 years ago

Changed commit from 6368c47 to b82d37a

7ed8c4ca-6d56-4ae9-953a-41e42b4ed313 commented 2 years ago

Branch pushed to git repo; I updated commit sha1. New commits:

cd7eaa8Fix bug in making codifferential matrices
7ed8c4ca-6d56-4ae9-953a-41e42b4ed313 commented 2 years ago

Changed commit from b82d37a to cd7eaa8

7ed8c4ca-6d56-4ae9-953a-41e42b4ed313 commented 2 years ago

Branch pushed to git repo; I updated commit sha1. New commits:

c4329a7Fix bug with lifted bilinear form, a bug with zeros in module morphisms, and make a check more intuitive
7ed8c4ca-6d56-4ae9-953a-41e42b4ed313 commented 2 years ago

Changed commit from cd7eaa8 to c4329a7

7ed8c4ca-6d56-4ae9-953a-41e42b4ed313 commented 2 years ago

Branch pushed to git repo; I updated commit sha1. New commits:

b2f9f50Fix sign error
1550f9dFix coboundary on basis
7ed8c4ca-6d56-4ae9-953a-41e42b4ed313 commented 2 years ago

Changed commit from c4329a7 to 1550f9d

7ed8c4ca-6d56-4ae9-953a-41e42b4ed313 commented 2 years ago

Branch pushed to git repo; I updated commit sha1. New commits:

b3ed980Clean up code a bit
fff9062Add doctest
001b3c7Add doctest
1601588Rewrite multiplication
7ed8c4ca-6d56-4ae9-953a-41e42b4ed313 commented 2 years ago

Changed commit from 1550f9d to 1601588

trevorkarn commented 2 years ago
comment:22

Associativity is broken...

sage: E.<a,b,c> = ExteriorAlgebra(QQ)
sage: b.__mul__(c*a)
a*b*c
sage: (b*c).__mul__(a)
-a*b*c
7ed8c4ca-6d56-4ae9-953a-41e42b4ed313 commented 2 years ago

Branch pushed to git repo; I updated commit sha1. New commits:

9e19f79All tests pass
a34ae96Merge branch 'u/tkarn/32369-exterior-rewrite-v2' of trac.sagemath.org:sage into exterior-main
7ed8c4ca-6d56-4ae9-953a-41e42b4ed313 commented 2 years ago

Changed commit from 1601588 to a34ae96

7ed8c4ca-6d56-4ae9-953a-41e42b4ed313 commented 2 years ago

Branch pushed to git repo; I updated commit sha1. New commits:

697104cFix merge error
7ed8c4ca-6d56-4ae9-953a-41e42b4ed313 commented 2 years ago

Changed commit from a34ae96 to 697104c

7ed8c4ca-6d56-4ae9-953a-41e42b4ed313 commented 2 years ago

Changed commit from 697104c to 1aeec53

7ed8c4ca-6d56-4ae9-953a-41e42b4ed313 commented 2 years ago

Branch pushed to git repo; I updated commit sha1. New commits:

702bfc2Add tests for index class
1aeec53PEP8 compliance
trevorkarn commented 2 years ago
comment:27

There was a merge issue.

7ed8c4ca-6d56-4ae9-953a-41e42b4ed313 commented 2 years ago

Changed commit from 1aeec53 to 847738b

7ed8c4ca-6d56-4ae9-953a-41e42b4ed313 commented 2 years ago

Branch pushed to git repo; I updated commit sha1. This was a forced push. Last 10 new commits:

621a7d9Fix bug with lifted bilinear form, a bug with zeros in module morphisms, and make a check more intuitive
79586f0Fix sign error
edcd745Fix coboundary on basis
7068800Clean up code a bit
e0b65e9Add doctest
478f4f9All tests pass
78b706dAdd doctest
a90683fFix merge error
6d86913Add tests for index class
847738bPEP8 compliance
7ed8c4ca-6d56-4ae9-953a-41e42b4ed313 commented 2 years ago

Branch pushed to git repo; I updated commit sha1. This was a forced push. New commits:

7ed8c4ca-6d56-4ae9-953a-41e42b4ed313 commented 2 years ago

Changed commit from 847738b to a90683f

7ed8c4ca-6d56-4ae9-953a-41e42b4ed313 commented 2 years ago

Changed commit from a90683f to 6d86913

7ed8c4ca-6d56-4ae9-953a-41e42b4ed313 commented 2 years ago

Branch pushed to git repo; I updated commit sha1. New commits:

6d86913Add tests for index class
7ed8c4ca-6d56-4ae9-953a-41e42b4ed313 commented 2 years ago

Branch pushed to git repo; I updated commit sha1. New commits:

847738bPEP8 compliance
7ed8c4ca-6d56-4ae9-953a-41e42b4ed313 commented 2 years ago

Changed commit from 6d86913 to 847738b

trevorkarn commented 2 years ago
comment:32

It looks like part of the merge problem was that I was on 9.7.beta2, and there was a change in 9.7.beta5 or beta6 that touched clifford_algebra.py. I rebased off of 9.7.beta6 with -X theirs and going to test.