(old draft mail but I will have to resurrect it) Hello,
I need to implement the function in a Julia object but I'm not sure how FriCAS implemented it, or, at least conceptually, how it should be implemented. >From the description FiniteAbelianMonoidRing where it is declared: ++ Description: This category is ++ similar to AbelianMonoidRing, except that the sum is assumed to be finite. ++ It is a useful model for polynomials, ++ but is somewhat more general. The only documentation of this function is: minimumDegree : % -> E ++ minimumDegree(p) gives the least exponent of a non-zero term of polynomial p. But, here is an interpreter session: (10) -> ppp :MPOLY(['x,'y],INT):=x^7*y^3+3*x^17+y^11 17 3 7 11 (10) 3 x + y x + y Type: MultivariatePolynomial([x,y],Integer) (11) -> minimumDegree % 11 (11) y Type: IndexedExponents(OrderedVariableList([x,y])) (12) -> pp:=x^7*y^3+3*x^17+y^11 11 7 3 17 (12) y + x y + 3 x Type: Polynomial(Integer) (13) -> minimumDegree % 17 (13) x Type: IndexedExponents(Symbol) So, the documentation should be more precise, no?, variable ordering (?) to choose a variable (?) or ? Any thoughts? How should I code it? I have a vector of (term, exponent) or a listOfTerms. (19) -> pp:=x^7*y^3+3*x^17+y^11 (19) 3*x^17 + x^7*y^3 + y^11 Type: NemoMultivariatePolynomial(NemoRational,[x,y,z],:lex) (20) -> jlApply("collect", jlApply("terms",pp)) (20) 3-element Vector{QQMPolyRingElem}: 3*x^17 x^7*y^3 y^11 Type: JuliaObject (21) -> listOfTerms pp 17 7 3 11 (21) [[k = x , c = 3], [k = x y , c = 1], [k = y , c = 1]] Type: List(Record(k: IndexedExponents(OrderedVariableList([x,y,z])),c: NemoRational)) And if I change the ordering of MPOLY, (22) -> ppp :MPOLY(['yy,'xx],INT):=xx^7*yy^3+3*xx^17+yy^11 11 7 3 17 (22) yy + xx yy + 3 xx Type: MultivariatePolynomial([yy,xx],Integer) (23) -> minimumDegree % 17 (23) xx - Greg -- You received this message because you are subscribed to the Google Groups "FriCAS - computer algebra system" group. To unsubscribe from this group and stop receiving emails from it, send an email to fricas-devel+unsubscr...@googlegroups.com. To view this discussion visit https://groups.google.com/d/msgid/fricas-devel/CAHnU2dbE7qcyiRA6sSPmzGghpYX0p_44eov5DyOcuAQdDO-A8w%40mail.gmail.com.