oldk1331 wrote:
>
> > This may be pretty bad performancewise: in FriCAS exponents
> > are unlimited, so you may attempt to create number too big
> > to fit into available memory. Or spent a lot of time
> > handling huge numbers.
>
> For x1 is represented by (n . e), x2 is represented by (n*2 . e+1),
> should they have same hash?
Yes, they have the same value.
>
> > This definition is valid only if domain has canonical representation.
> > Several interesting domains have, but some do not. Notably, field
> > of fractions of algebraic extentions do not have canonical
> > representation. So this definition should be conditional.
>
> Can you give an example domain? For these domains, they don't
> have hash implementations I assume?
(7) -> uP := SUP(INT)
(7) SparseUnivariatePolynomial(Integer)
Type: Type
(8) -> R := Complex(uP)
(8) Complex(SparseUnivariatePolynomial(Integer))
Type: Type
(9) -> R has IntegralDomain
(9) true
Type: Boolean
(10) -> R has GcdDomain
(10) false
Type: Boolean
(11) -> Fraction(R)
(11) Fraction(Complex(SparseUnivariatePolynomial(Integer)))
Type: Type
Note: given builtin FriCAS constructor is is a bit tricky
to build ring which is an IntegralDomain, but does not
satisfy GcdDomain. Once you have such ring fractions will
no longer have canonical representation. Actually,
R is clearly a unique factorization domain, but FriCAS
does not know this. OTOH there are examples of rings
that are integral domains, does not have unique
factorization (and hence no GCD), but FriCAS does not
know that they are integral domains. Of course, users
may add their own constructor which corrects this lack
of knowledge, so once you consder user domains there
will be much more examples.
Another example is
Fraction(SUP(EXPR(INT)))
Expression may have algebraics both in numerator and denominator,
so the representain is noncanonical. Conseqently also
the fraction above will have noncanonical representaion.
The SUP above is only to make shure that type is notrivial,
otherwise interpreter would reject it.
--
Waldek Hebisch
--
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 post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/fricas-devel.
For more options, visit https://groups.google.com/d/optout.