Opened 2 years ago

Closed 2 years ago

#23864 closed defect (fixed)

fix hash of multivariate Laurent polynomials

Reported by: vdelecroix Owned by:
Priority: major Milestone: sage-8.1
Component: algebra Keywords: thursdaysbdx
Cc: Merged in:
Authors: Vincent Delecroix Reviewers: Travis Scrimshaw
Report Upstream: N/A Work issues:
Branch: 932ccc1 (Commits) Commit: 932ccc14510bf184a567cb50232887053242baf8
Dependencies: Stopgaps:

Description

sage: L.<x,y> = LaurentPolynomialRing(QQ)
sage: hash(L.one())  # this is wrong !
3
sage: hash(L.zero()) # this is even worse!
Traceback (most recent call last):
...
AttributeError: 'NoneType' object has no attribute 'is_constant'

Change History (5)

comment:1 Changed 2 years ago by vdelecroix

  • Branch set to u/vdelecroix/23864
  • Commit set to 378d28611c10280b3caaf66ee293e925e328d70a
  • Status changed from new to needs_review

New commits:

378d28623864: fix hash of multivariate laurent polys

comment:2 Changed 2 years ago by tscrim

  • Reviewers set to Travis Scrimshaw

Trivial thing: could you make this doctest consistent with spacing:

hash(1 - 7* x0 + x1*x2) == hash(L(1 - 7 *x0 + x1*x2))

Once done, you can set a positive review on my behalf.

comment:3 Changed 2 years ago by git

  • Commit changed from 378d28611c10280b3caaf66ee293e925e328d70a to 932ccc14510bf184a567cb50232887053242baf8

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

932ccc123864: consistent spacing in doc

comment:4 Changed 2 years ago by vdelecroix

  • Status changed from needs_review to positive_review

done! Thanks Travis.

comment:5 Changed 2 years ago by vbraun

  • Branch changed from u/vdelecroix/23864 to 932ccc14510bf184a567cb50232887053242baf8
  • Resolution set to fixed
  • Status changed from positive_review to closed
Note: See TracTickets for help on using tickets.