axiom-developer
[Top][All Lists]
Advanced

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

[Axiom-developer] Re: EXPR POLY INT


From: Martin Rubey
Subject: [Axiom-developer] Re: EXPR POLY INT
Date: Fri, 18 Jun 2004 17:51:58 +0000

 Martin Rubey wrote:
 >  > > (1) provide a possibility to get the "variable free" domain of a 
 > domain, i.e.,
 >  > >
 >  > > POLY INT, UP(x,POLY INT) both should yield INT
 >  >
 >  > Two comments:
 >  >
 >  > (1) Actually, there is a more general request for ages: that is, each
 >  > CONSTRUCTOR in Axiom should provide the means to return ALL the 
 > parameters. This
 >  > would have to be built like OutputForm form the bottom up because of 
 > nesting.
 >  > Lots of editing and a total rebuilt. Currently, when writing a 
 > constructor,
 >  > there is no way one can "descend" inside its parameters other than 
 > finding their
 >  > categorical property or attributes.
 > 
 > Hm, I don't quite understand why this would be more general? What I think 
 > what
 > is needed is a function that takes a domain as argument and has a domain as
 > value, which is related to the first domain in the sense that the resulting
 > domain is no longer RetractableTo Symbol.
 
 I disagree on this approach. First, mathematically, one can take a polynomial
 extension of any integral domain (and then its quotient ring) and the "new"
 variables should not be mixed up with elements of the integral domain. Second,
 not only will your approach require a mechanism to obtain the parameters of ANY
 constructor, but it will require further need to be able to RECONSTRUCT one.
 What would be your resulting domain for
 EXPR AN? (AN is AlgebraicNumber, which is the algebraic closure of the field of
 rational numbers. However, AN has EXPR INT as Rep which is NOT visible. At this
 time, I am not able to get an example like the one on POLY--UP interaction,
 because I do not follow the setup for AN (among lots of other things). So may 
be
 there is no such bad interaction (afterall, AN mathematically are just 
numbers!) 
 
 In any case, deciding the "field/domain of constants" in an Axiom domain
 requires more than just examining the towers. This is a difficult problem in
 differential Galois theory (for Picard Vessiot extensions): when does an
 extension contain no new constants? An example is the (differential field) F =
 Q(sin^2(x), sin(x)cos(x)), where Q is the field of rational numbers, x is
 transcendental and differentiation is D= d/dx. F can be constructed as a
 quadratic extension Q(y,z) of Q(y) where y is a transcendental and z^2 = 
y(1-y),
 Dy = 2z. In this construction, y would be retractable to a symbol and z may be 
a
 kernel. It takes some work to decide whether there are new constants other than
 those in Q (whether there are or aren't is not releveant to this discussion).
 Now think about EXPR F. How would you "simplify" this to using a general
 algorithm?
 
 >  > > (2) make the coercion to EXPR smarter and swallow all variables...
 >  > >
 >  > > I'm very unsure wether we should prefer (1) or (2), mainly because I 
 > still
 >  > > don't understand the philosophy behind EXPR.
 >  >
 >  > Since POLY UP(x,INT) behaves similar to EXPR POLY INT, the former may be 
 > an
 >  > easier target to "fix".
 > 
 > Yes. In fact, there is another possibility to consider. In (2) I suggested 
 > that
 > all the variables in EXPR POLY INT should belong to EXPR. In fact, this was 
 > an
 > accident. What I meant to say is
 > 
 >  (3) make the coercion to EXPR smarter and let its argument domain swallow as
 >      many variables as possible.
 > 
 > I think that this would be more sound. However, my feeling is that (1) is the
 > best way.
 
 See above comment on (1). (3) will not work with EXPR POLY interaction because
 both wants to include ALL of SYMBOL, but may work with EXPR DMP (but not DMP
 EXPR). (3) may be difficult for EXPR F (F as above). I still think separating
 the name spaces (like any good old compilers -- think C++) is a reasonable
 approach. So each constructor gets its own name space by using a prefix.
 (Mathematica does this via what it calls "Context"). Coercion may be done by
 switching prefix in addition to any data conversion (Rep conversion). However,
 there are probably many many implications for this line of thinking and I know
 very little about compilers. I wonder how Aldor handles this type of issues.
 
 > 
 >  > > Very briefly: I think we could
 >  > > characterize EXPR R by saying that it is the space of functions whose 
 > variables
 >  > > are allowed to take values in R or EXPR R. However, this is not quite 
 > complete:
 >  > > In which domain are the numbers appearing in the expression?
 >  > >
 >  > > For example
 >  > >
 >  > > (7) -> 2.0*x^2*log(2*x)
 >  > >
 >  > >              2
 >  > >    (7)  2.0 x log(2.0 x)
 >  > >                                                        Type: Expression 
 > Float
 >  > >
 >  > > which is good, I believe. (Note that the square stayed square, not 
 > power 2.0)
 >  >
 >  > But notice that the 2 in 2*x has to be coerced to Float even though Float 
 > has
 >  > RetractableTo INT.
 > 
 > Hm? The above was an (unfortunately trivial) example to show that not all
 > numbers in EXPR FLOAT are FLOAT, or, more generally, not all coefficients in
 > EXPR R are from R. In fact, it seems as though exactly the powers are
 > not. 
 
 Exponents are not coefficients and technically belongs to a different domain
 from the coefficient domain in Axiom. Check the parameters for
 PolynomialCategory. So sure, not all "numbers" in EXPR FLOAT are FLOAT: the
 exponents aren't.
 
 >More precisely, they cannot be:
 > 
 > (6) -> x^2.1
 > 
 >          2 10+-+
 >    (6)  x   \|x
 >                                                        Type: Expression Float
 > The following I'd consider as a bug:
 > 
 > (10) -> (x^%pi)::EXPR FLOAT
 > 
 >           3 6701487259+-+948881364
 >    (10)  x           \|x
 >                                                        Type: Expression Float
 
 I don't know what you mean by a bug here. I assume the answer is correct, but
 there should be parenthesis that may make the display better. Axiom converts 
any
 decimal number with fixed precision into a rational number and allows these as
 exponents.
 
 >  > > 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).
 > 
 > Yes, but could you give an example? This would be great!
 > 
 > Martin
 
 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.
 
 William
 -- 
 William Sit
 Department of Mathematics..............Email: address@hidden
 City College of New York..........................Tel: 212-650-5179
 Convent Ave at West 138th Street..................Fax: 212-862-0004
 New York, NY 10031............Axiom, A Scientific Computation Sytem
 USA..........................http://www.nongnu.org/axiom/index.html





reply via email to

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