chakravala / chakravala/Reduce.jl

Add compatibility with other mathematical software

Open
#44 2 comments 1 reaction 0 assignees View on GitHub
Dominant language
Julia
Stars
249
Forks
16
PR merge metrics
No merged PRs in 30d

Description

Thanks for all the work in Reduce.jl, it is a great tool.
I need to complement it with Polymake.jl (to study some properties of the Newton polytope of a polynomial,
it is for [CRNT.jl](https://github.com/LauraBMo/CRNT.jl).
So, I need the exponents of a polynomial as Julia vectors of integers, and ideally another Julia vector, with the same order, containing the coefficients.
For this, I started with the exponent of a term
```
function extractexponentsofterm(T::RExpr)
return v->Algebra.deg(T,v)
end

julia> z=R"2*x*y^2+4*x^2-1"

2 2
4*x + 2*x*y - 1

julia> extractexponentsofterm(Algebra.lterm(z,:y)).([:x,:y,:z])
3-element Array{RExpr,1}:
1
2
0
```
But I am not sure how to iterate over all the term of a polynomial, and how to extract the coefficient neither.
One can iterate over `z:=z-lterm(z)` but requiring arithmetic operations seems not optimal.

Contributor guide

No contributing guide indexed for this repository

Research direction

Inspect Reduce.jl's Algebra.lterm and Algebra.deg entry points and the existing representation or traversal of polynomial terms; the issue does not name an implementation file. Done means exposing exponent vectors and same-order coefficient vectors for a polynomial without requiring repeated subtraction, including the shown z expression.

Written by the indexing model from the issue text.

Assessment

Tech stack
julia
Domain
tooling
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.