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: comparison of noncommutative monomials #131

Open
oisinfaust opened this issue Jun 15, 2023 · 0 comments
Open

Bug: comparison of noncommutative monomials #131

oisinfaust opened this issue Jun 15, 2023 · 0 comments

Comments

@oisinfaust
Copy link

(code) pkg> st
Status `.../Project.toml`
  [7c1d4256] DynamicPolynomials v0.4.6
  [102ac46a] MultivariatePolynomials v0.4.7

julia> using DynamicPolynomials

julia> @ncpolyvar x[1:3]
(PolyVar{false}[x₁, x₂, x₃],)

julia> m1 = x[2]*x[1]
x₂x₁

julia> m2 = monomials(x, 2)[6]
x₂x₁

julia> m1 == m2
false

I expected m1 and m2 to compare equal. Note that

julia> variables(m1)
2-element Vector{PolyVar{false}}:
 x₂
 x₁

julia> variables(m2)
5-element Vector{PolyVar{false}}:
 x₁
 x₂
 x₃
 x₁
 x₂

This problem seems to also be present on master:

(code) pkg> st
Status `.../Project.toml`
  [7c1d4256] DynamicPolynomials v0.4.5 `https://github.com/JuliaAlgebra/DynamicPolynomials.jl.git#master`
  [102ac46a] MultivariatePolynomials v0.4.6 `https://github.com/JuliaAlgebra/MultivariatePolynomials.jl.git#master`

julia> using DynamicPolynomials

julia> @ncpolyvar x[1:3]
(Variable{DynamicPolynomials.NonCommutative{DynamicPolynomials.CreationOrder}, Graded{LexOrder}}[x₁, x₂, x₃],)

julia> m1 = x[2]*x[1]
x₂x₁

julia> m2 = monomials(x, 2)[4]
x₂x₁

julia> m1 == m2
false
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant