axiom-developer
[Top][All Lists]
Advanced

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

Re: [Axiom-developer] pointers


From: William Sit
Subject: Re: [Axiom-developer] pointers
Date: Tue, 10 Nov 2009 14:37:17 -0500

Hi Waldek:

Thanks. That is exactly what I want. Good solution. So the
"trick" is to use ' instead of the string. So is the
following a bug?

a:='Fraction::SEX
  Fraction  Type:SExpression
b:="Fraction"::SEX
  Fraction  Type:SExpression
(a=b)@Boolean
  false     Type Boolean

That is, I was deceived by the output which looked the same.
Perhaps the output should have been ('Fraction) and
("Fraction") ??

Also,

destruct(a) or destruct(b) leads to an Error:

 Function Selection for destruct
      Arguments: SEX

 [1]  signature:   SEX -> LIST SEX
      implemented: slot (List $)$ from SEX


   >> Error detected within library code:
   Non-list

protected-symbol-warn called with (NIL)

William


Waldek Hebisch wrote:
> 
> William Sit wrote:
> > Gabriel:
> >
> > Thanks for the response. Your script shows how to get the
> > parameters, not the constructor. I do not have OpenAxiom
> > installed (sorry). The question is whether I can test that
> > the constructor is Fraction, or otherwise (like
> > FiniteField) when the domain belongs to the category
> > Field.
> >
> 
> Do you want something like this?
> 
> (10) -> a := Fraction(Integer)
> 
>    (10)  Fraction Integer
>                                                                  Type: Domain
> (11) -> (opOf(devaluate(a)$Lisp)$Lisp = 'Fraction::SEX)@Boolean
> 
>    (11)  true
>                                                                 Type: Boolean
> (12) -> (opOf(devaluate(a)$Lisp)$Lisp = 'FiniteField::SEX)@Boolean
> 
>    (12)  false
>                                                                 Type: Boolean
> (13) -> a :=FiniteField(5,2)
> 
>    (13)  FiniteField(5,2)
>                                                                  Type: Domain
> (14) -> (opOf(devaluate(a)$Lisp)$Lisp = 'Fraction::SEX)@Boolean
> 
>    (14)  false
>                                                                 Type: Boolean
> (15) -> (opOf(devaluate(a)$Lisp)$Lisp = 'FiniteField::SEX)@Boolean
> 
>    (15)  true
>                                                                 Type: Boolean
> 
> 
> --
>                               Waldek Hebisch
> address@hidden
> 
> _______________________________________________
> Axiom-developer mailing list
> address@hidden
> http://lists.nongnu.org/mailman/listinfo/axiom-developer

-- 
William Sit
Department of Mathematics..Email: address@hidden
City College of New York................Tel: 212-650-5179
New York, NY 10031, USA.................Fax: 212-862-0004
Home page: .......http://scisun.sci.ccny.cuny.edu/~wyscc/




reply via email to

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