> On Wed, Jul 9, 2008 at 12:22 AM, Bill Page wrote:
>> The multiplication of a Float and some unknown symbolic value must
>> produce a symbolic expression of some kind. If we know that the
>> currently unknown symbolic value can only take values from Float,
>> then we can deduce from knowledge of multiplication in Float that
>> the value of the symbolic expression representing the multiplication
>> of a Float with this unknown symbolic value must also only take
>> values from Float.

On Wed, Jul 9, 2008 at 7:24 AM, Gabriel Dos Reis wrote:
>
> This is a fundamental observation.  The way I read
>
>    x: Float
>    x + 1
>
> is that the declaration x:Float asserts that x can only take Float
> values, when it has a value.
>

I agree but the trouble is that contrary to naive expectations,

  x:Float

does not declare 'x' as a "symbolic value" - in fact just the opposite!

In Axiom as it exists today if we want 'x' to be symbolic we must
write something like:

  x:Polynomial Float

Only then can we use 'x' as a generator of such polynomials. E.g.

(1) -> x:Polynomial Float
                                                      Type: Void
(2) -> p:=x^2+2.0

         2
   (2)  x  + 2.0
                                                      Type: Polynomial Float

But there is no apriori requirement that symbolic values like 'p'
evaluate to Float when a value is given for 'x'.

(3) -> p1:=eval(p,x=1)

   (3)  3.0
                                                      Type: Polynomial Float

But Axiom does have the concept of 'retract' so one can write, albeit
rather awkwardly,

(4) -> p2:=retractIfCan(p1)@Union(Float,"failed")

   (4)  3.0
                                                      Type: Union(Float,...)
(5) -> p2 case Float => p2::Float

   (5)  3.0
                                                       Type: Float

For more general expressions can use 'Expression Float' and some other
symbolic domains in a similar manner. But I think that all of this
machinery is probably quite "unnatural" to the new user of Axiom.

Regards,
Bill Page.

-------------------------------------------------------------------------
Sponsored by: SourceForge.net Community Choice Awards: VOTE NOW!
Studies have shown that voting for your favorite open source project,
along with a healthy diet, reduces your potential for chronic lameness
and boredom. Vote Now at http://www.sourceforge.net/community/cca08
_______________________________________________
open-axiom-devel mailing list
open-axiom-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/open-axiom-devel

Reply via email to