On 2/14/20 5:24 PM, Waldek Hebisch wrote: > On Fri, Feb 14, 2020 at 04:43:12PM +0100, Ralf Hemmecke wrote: >> Hello, >> >> FriCAS does not have LaurentPolynomial. > > One can view such domain as localization of polynomials. It > is one of reasons that I would like to have good support > for localizations, a lot of concrete examples could be > covered in that way.
In fact, I also thought about this, before I wrote my mail. In fact, PolynomialRing(Fraction(Integer),DirectProduct(3,Integer)) does not allow to divide by variables. That is why I wrote "an approximation of". However, Localize(M : Module R, R : CommutativeRing) basically forms fractions. That would not be needed in the case of LaurentPolynomial. Other than that, I agree, that we should have better support for local structures. BTW, I would like to change to order of parameters in Localize, i.e., R should come first, because the "Module(R)" parameter depends on it and I would like to search for dependencies from left to right. The second issue with FriCAS' Localize is that one usually write M^(-1)R with a multiplicative set M and a ring/module R. The multiplicative set is not present as an explicit domain parameter, it's rather implicit as all non-zero elements of the "CommutativeRing" parameter of Localize. > For different resons I am looking at similar issue. Namely, there is > redundancy between free monoid and polynomials. I would like to > make polynomials available for tensor products, but limit profileration > of spurious signatures. So I am thinking about introducing some intermediate > categories. Clearly, it is worth looking if DirectProductCategory > deserves some intermediate category. > >> DirectProduct(n,R) only exports OrderedAbelianMonoidSup, if R is of type >> OrderedAbelianMonoidSup. Clearly, this sup function >> >> http://fricas.github.io/api/OrderedAbelianMonoidSup.html#l-ordered-abelian-monoid-sup-sup >> >> sup: (%, %) -> % >> sup(x, y) returns the least element from which both x and y can be >> subtracted. >> >> is mainly used for reductions. But the specification is a bit vague. >> Why doesn't have Integer such a function? Yes, there would be no "least" >> element. But what does "least" in this specification mean anyway? Is it >> the smallest with respect to the < order of the domain? >> Then clearly, Integer cannot have this. > > My impression is that this is essenially 'gcd', but written in additive > terms (think of multiplicative monoid of a commutaive ring with 1 as > n abelian monoid). Defining it for integers is probably useless, > I would rather avoid requirng it when not necessary. You probably meant lcm instead of gcd, but yes, that's what it's probably supposed to be. Yes, for Integer, it's probably uninteresting, but what about DirectProduct(n, Integer) or DirectProduct(n, Fraction Integer)? If it's available for Integer, then DirectProduct inherits sup via conditional export in DirectProductCategory. >> However, the idea of this function is to achieve "positiveness", i.e., >> if c = sup(a, b) then c-a>=0 and c-b>=0. Right? Wouldn't it make sense >> to add this condition to the "sup" specification. Then also Integer and >> Fraction Integer can be of type OrderedAbelianMonoidSup. I don't insist on implementing OrderedAbelianMonoidSup for Integer, but still I would like to add "if c = sup(a, b) then c-a>=0 and c-b>=0" to the specification of sup, because "least" can only mean the smallest wrt. < of the domain. But think about lex ordering or degrevlex ordering of DirectProduct. Cannot there be two different elements depending on whether the domain implements lex or degrevlex? And, for example, for DirectProduct(n, Integer), it wouldn't be clear that sup(a,b)-a>=0 and sup(a,b)-b>=0. >> Furthermore, I don't see a good reason why OrderedDirectProduct, >> HomogeneousDirectProduct and SplitHomogeneousDirectProduct require >> their argument to be of type OrderedAbelianMonoidSup. Without the "Sup" >> would be sufficient. > > Yes, probably previously nobody was thinking about more general > applications. Can I commit the patch, that I attached in my last mail? This generalization would be enough for what I needed it for in the first place, i.e., creating some pseudo LaurentPolynomial domain. Ralf -- 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 [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/fricas-devel/a0d3cbe7-bdcb-2fc9-4b69-4e2be41f7968%40hemmecke.org.
