axiom-developer
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Axiom-developer] Re: [Axiom-math] [Fwd: Re: EXPR POLY INT]


From: William Sit
Subject: Re: [Axiom-developer] Re: [Axiom-math] [Fwd: Re: EXPR POLY INT]
Date: Fri, 18 Jun 2004 14:50:02 -0400


Martin Rubey wrote:

> In fact, it seems as though there were seperate namespaces at the moment, only
> the user cannot distinguish them. In this sense, maybe were heading towards a
> patch of output...

As pointed out in previous discussions, the first thing is to fix it so EXPR R
is allowed for any R having OrderedSet and IntegralDomain. Second, users should
not use the same symbol for variables that may occur in R for variables in EXPR.
And third, modify new()$Symbol to generate not just %A, but %A.tag where tag is
the name of the constructor that makes the call. This is a longer term project,
since new()$Symbol has to figure out the calling domain. An alternative to this
is to patch constructors that calls new()$Symbol to do what Manuel did in
fspace.spad, that is, manually use %A.tag instead of %A returned from SYMBOL.
This bottom-up approach may be the easier route.

Your remark is not quite correct. Try this example again:

  )clear all
  a:=POLY INT:=x
  b:=UP('x,INT):='x
  b/a

    1
    - x   (type: UP(x,FRAC POLY INT))
    x

  a/b

    1     (type: FRAC POLY INT)

So the interpreter does some coercion and mixes the two x. Note in UP('x, INT),
x is only for output. 

  variables b

    ["?"]

Incidentally, previously, differentiate(b,x) gives 1, but now somehow the
interpreter cannot find the map, and differentiate(b) gives 1.


 > > Are there domains with OrderedSet and IntegralDomain which are not
 > > RetractableTo Integer?

 > An integral domain of characteristic zero is always retractable to integer.
On
 > the other hand, one of characteristic non-zero will contain a prime field
which
 > is not an ordered set in Axiom (PrimeField has ContractableTo Integer and
 > RetractableTo(%), not RetractableTo Integer).

>  > I thought my answer above meant there can be no such examples. Every 
> domain in
>  > Axiom belonging to OrderedSet and IntegralDomain will belong to 
> RetractableTo
>  > Integer.
> 
> On the other hand: in combfunc.spad we have ... 
> quite a bit of code for R which is not RetractableTo Z, for example:
> 
>     number?(x:F):Boolean ==
>       if R has RetractableTo(Z) then
>         ground?(x) or
>          ((retractIfCan(x)@Union(Fraction(Z),"failed")) case Fraction(Z))
>       else
>         ground?(x)
> 
> (also, more importantly: iidsum, iidprod, ...)
> 
> so it seems that Bronstein thought already about allowing R's which do not 
> have
> OrderedSet...

I think I should have said "Every domain in Axiom belonging to OrderedSet and
IntegralDomain SHOULD belong to RetractableTo Integer."  Since properties are
only declarative, there is no logical (automatic) derivation. So a domain that
declared it has OrderedSet and IntegralDomain may not have declared itself to
have RetractableTo Integer. Manuel was careful (and indeed forced to by the
strict type system) to use the "if R has RetractableTo(Z)" clause. But note that
Axiom does not check the mathematical validity of any declaration like these. 

Perhaps in Ring or Rng (catdef.spad), one should patch this:

  If R has CharacteristicZero then RetractableTo Integer.

(R does not have to be an integral domain, for example, R = Z[x]/(x^2).)

William




reply via email to

[Prev in Thread] Current Thread [Next in Thread]