[Top][All Lists]

[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 11:45:15 -0500


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.

I came across this requirement in algorithms that may take advantage of special knowledge of how the coefficient field is constructed.


On Mon, 9 Nov 2009 21:21:28 -0600
 Gabriel Dos Reis <address@hidden> wrote:
On Mon, Nov 9, 2009 at 7:09 PM, William Sit <address@hidden> wrote:

Interesting. Is there a similar function that is more structural? say, can I test whether some domain (which may be passed as a parameter of type Field) is of the form Fraction(something) and if so, extract "something" (that is, assign it to a variable and further test it), sort of a deconstruction?

William --

In OpenAxiom, when you get a domain, you can reify it, and
ask for the arguments that were used to instantiate it:

(1) -> reify Fraction Integer
   (1)  Fraction Integer
Type: ConstructorCall DomainConstructor
(2) -> arguments reify Fraction Integer
   (2)  [(Integer)]
Type: List Syntax

William Sit, Professor Emeritus
Mathematics, City College of New York Office: R6/202C Tel: 212-650-5179
Home Page:

reply via email to

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