Nemocas / AbstractAlgebra.jl

Generic abstract algebra functionality in pure Julia (no C dependencies)
https://nemocas.github.io/AbstractAlgebra.jl/dev/index.html
Other
155 stars 60 forks source link

Add conformance tests for `Generic.SparsePoly` #1689

Closed fingolfin closed 2 months ago

fingolfin commented 2 months ago

Actually I add some in #1686 but commented them out as they currently fail. There are at least three things missing / failing:

  MethodError: no method matching is_unit(::AbstractAlgebra.Generic.SparsePoly{BigInt})

  Expression: hash(a) == hash(deepcopy(a))
   Evaluated: 0x9f0711080fc32177 == 0xa19862be061579a5

  Expression: iszero(b) || equality(divexact(b * a, b, check = false), a)
  BoundsError: attempt to access 0-element Vector{UInt64} at index [0]

Hopefully someone can add those and re-enable those conformance tests.

lgoettgens commented 2 months ago

SparsePolyRing is a purely internal type, and thus does not need to be conformant with the interface. The issue with hash and divexact will be fixed by https://github.com/Nemocas/AbstractAlgebra.jl/pull/1692, the is_unit error will be ignored for the time. (as discussed with @fingolfin and @thofma on slack)