Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug in ExteriorAlgebra interior product #34694

Closed
trevorkarn opened this issue Oct 25, 2022 · 7 comments
Closed

Bug in ExteriorAlgebra interior product #34694

trevorkarn opened this issue Oct 25, 2022 · 7 comments

Comments

@trevorkarn
Copy link
Contributor

The .interior_product() method of an ExteriorAlgebra element doesn't return the correct basis (a tuple rather than a FrozenBitset).

sage: E = ExteriorAlgebra(SR,'e',3)
sage: E.inject_variables()
Defining e0, e1, e2
sage: a = (e0*e1).interior_product(e0)
sage: a * e0
---------------------------------------------------------------------------
TypeError                                 Traceback (most recent call last)
Input In [1], in <cell line: 5>()
      2 E.inject_variables()
      4 a = (e0*e1).interior_product(e0)
----> 5 a * e0

File /home/sc_serv/sage/src/sage/structure/element.pyx:1514, in sage.structure.element.Element.__mul__()
   1512 cdef int cl = classify_elements(left, right)
   1513 if HAVE_SAME_PARENT(cl):
-> 1514     return (<Element>left)._mul_(right)
   1515 if BOTH_ARE_ELEMENT(cl):
   1516     return coercion_model.bin_op(left, right, mul)

File /home/sc_serv/sage/src/sage/algebras/clifford_algebra_element.pyx:458, in sage.algebras.clifford_algebra_element.ExteriorAlgebraElement._mul_()
    456 if len(rhs._monomial_coefficients) == 1:
    457     mr, cr = next(iter(rhs._monomial_coefficients.items()))
--> 458     return self._mul_self_term(mr, cr)
    459 
    460 # Special case: self is a single term

File /home/sc_serv/sage/src/sage/algebras/clifford_algebra_element.pyx:570, in sage.algebras.clifford_algebra_element.ExteriorAlgebraElement._mul_self_term()
    568 n = self._parent.ngens()
    569 d = {}
--> 570 for ml, cl in self._monomial_coefficients.items(): # ml for "monomial on the left"
    571     if not ml.isdisjoint(supp):
    572         # if they intersect nontrivially, move along.

TypeError: Cannot convert tuple to sage.data_structures.bitset.FrozenBitset

CC: @tscrim @fchapoton

Component: algebra

Keywords: exterior-algebra interior-product

Author: Trevor K. Karn

Branch: 32cdf86

Reviewer: Travis Scrimshaw

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

@trevorkarn trevorkarn added this to the sage-9.8 milestone Oct 25, 2022
@trevorkarn
Copy link
Contributor Author

Commit: 32cdf86

@trevorkarn
Copy link
Contributor Author

New commits:

32cdf86Fix basis bug

@trevorkarn
Copy link
Contributor Author

Branch: u/tkarn/34964

@tscrim
Copy link
Collaborator

tscrim commented Dec 20, 2022

Reviewer: Travis Scrimshaw

@tscrim
Copy link
Collaborator

tscrim commented Dec 20, 2022

comment:6

LGTM

@vbraun
Copy link
Member

vbraun commented Jan 1, 2023

Changed branch from u/tkarn/34964 to 32cdf86

@fchapoton
Copy link
Contributor

Changed commit from 32cdf86 to none

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants