axiom-developer
[Top][All Lists]
Advanced

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

Re: [Axiom-developer] Question concerning types...


From: Martin Rubey
Subject: Re: [Axiom-developer] Question concerning types...
Date: 16 Sep 2006 18:51:09 +0200
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3

C Y <address@hidden> writes:

> Question came up on IRC, and I'm curious.  Given the following:
> 
>                         AXIOM Computer Algebra System 
>                        Version: Axiom (September 2006)
>              Timestamp: Saturday September 9, 2006 at 11:29:25 
> -----------------------------------------------------------------------------
>    Issue )copyright to view copyright notices.
>    Issue )summary for a summary of useful system commands.
>    Issue )quit to leave AXIOM and return to shell.
> -----------------------------------------------------------------------------
>  
>    Re-reading compress.daase   Re-reading interp.daase
>    Re-reading operation.daase
>    Re-reading category.daase
>    Re-reading browse.daase
> (1) -> 
> (1) -> a1 : Quaternion Fraction Integer
>                                                                   
> Type: Void
> (2) -> a2 : Quaternion Fraction Integer
>                                                                   
> Type: Void
> (3) -> a3 : Quaternion Fraction Integer
>                                                                   
> Type: Void
> (4) -> a4 : Quaternion Fraction Integer
>                                                                   
> Type: Void
> (5) -> a1
>  5) -> 
>    a1 is declared as being in Quaternion Fraction Integer but has not 
>       been given a value.
> (5) -> m := matrix[[a1,a2],[a3,a4]]
>  5) -> 
>    a1 is declared as being in Quaternion Fraction Integer but has not 
>       been given a value.
> (5) -> 
> 
> Why isn't this allowed?  I want a1->a4 to be variables without assigned
> value, and I want to create a symbolic matric where all I know about
> the entries is their type, in order to do general solving operations. 
> How would I set this up correctly in Axiom?

Currently, you can't. Note that you promise axiom that a1 is a Quaternion
Fraction Integer. However, you don't hold your promise...

What you want is to make a1 a variable. Currently, there is no domain of
"Variables, which can take values only in Quaternion Fraction Integer".

In fact, it is (or should be) a FAQ. See MathAction.

The point of Axioms type system is that any identifier has a typed value. There
is no such thing as a identifier that does not have a value.

If you type 

5*a+a^2

into the interpreter, it responds with

Polynomial Integer.

When you say p:=5*a+3*a^2, the identifier p refers to this polynomial. The
internal representation is something like

[[5,a,1],[3,a,2]]

How would you represent a generic polynomial? You need a different domain for
that.

Martin





reply via email to

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