axiom-developer
[Top][All Lists]
Advanced

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

RE: [Axiom-developer] boot : valid type checker


From: Bill Page
Subject: RE: [Axiom-developer] boot : valid type checker
Date: Mon, 9 Apr 2007 02:56:25 -0400

On April 7, 2007 6:53 AM Gregory Vanuxem wrote:
> ... 
> (8) -> DirectProduct(3,IntegerNumberSystem)
> 
>    (8)  DirectProduct(3,IntegerNumberSystem)
>                                       Type: Domain
> (9) -> [1,2,3]::%
>  
>    >> System error:
>    NIL is not of type CONS.
> 
> The interpeter considers DirectProduct(3,IntegerNumberSystem) 
> as a valid domain (type ?) :-(

Yes it is valid according to the defintion

  DirectProduct(dim: NonNegativeInteger,R: Type)

It is odd perhaps, that R is specified as just Type, but this
is technically possible. What you should have written above is
something like:

  (9) -> [Integer,SingleInteger,MachineInteger]::%

not [1,2,3] since IntegerNumberSystem is a category and only
domains belong to categories, not the objects of some domain.

But my expression (9) above fails for another reason - because
currently Axiom has no domain named Domain.

(10) -> [Integer,Integer,Integer]

   >> System error:
   The function |Domain| is undefined.

I think this can be fixed. See the page

http://wiki.axiom-developer.org/209TheFunctionDomainIsUndefined

The example is in Aldor but this can be more easily written in Spad.
Axiom needs a domain called Domain whose objects are domains. But
this idea still needs more work.

> ...
> Think of a category, here, as the set of matrices over a ring
> (Ring being a category in the Axiom sense).
>

Well there is the category:

MatrixCategory(R: Ring,Row: FiniteLinearAggregate R,
                       Col: FiniteLinearAggregate R)

(10) -> Matrix(Integer) has MatrixCategory(Integer, Vector Integer,
                                           Vector Integer)

   (7)  true

                                                 Type: Boolean

I think it is reasonable to describe MatrixCategory as the set
of matrices over a ring.

> 
> > > The nirvana would be a function that accepts things like
> > > Matrix(Join(Foo,Bar)) [1].
> > 
> > I do not understand what you mean by this.
> 
> I want to know if I can extract information from what I call a
> valid type, i.e:
> 
> )bo Matrix(Join(Field(),ConvertibleTo(InputForm())))
> 
> (|Matrix| (|Join| (|Field|) (|ConvertibleTo| (|InputForm|))))
> Value = #<(SIMPLE-VECTOR 72) {10053B01FF}>
> 
> I'm interested by this vector :-).
> 

Do you suppose in this example that Matrix is something other than
what is currently defined in the Axiom library? If so, then perhaps
"Matrix" is not a good name for what you want.

I suppose that Join also that Join must be a category constructor
which the interpreter might also have to understand.

Regards,
Bill Page.






reply via email to

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