axiom-mail
[Top][All Lists]
Advanced

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

Re: [Axiom-mail] Spad and inductive types


From: Ralf Hemmecke
Subject: Re: [Axiom-mail] Spad and inductive types
Date: Tue, 08 May 2007 23:38:33 +0200
User-agent: Thunderbird 2.0.0.0 (X11/20070326)

By the way. Today I have learned how to include an integer
into the "left" or "right" part of Union(left: Integer, right: Integer). There appears only an example in the AUG, but not a formal
description.

Please tell. I missing the example. I think this is quite important.

That should have been an exercise to read my mails carefully. ;-)

http://lists.nongnu.org/archive/html/axiom-mail/2007-05/msg00015.html

My first attempt of the file aaa.as (without extend) contained the lines

    MkAdd(x: %, y: %): % == per [Mkadd == [x, y]];
    MkMul(x: %, y: %): % == per [Mkmul == [x, y]];
-- The following two lines work but I haven't found them documented.
-- For the above version see AUG.pdf p. 145.
--    MkAdd(x: %, y: %): % == per union([x, y], Mkadd);
--    MkMul(x: %, y: %): % == per union([x, y], Mkmul);

I found out about the commented version from a compiler message. The compiler complained about having two "union" functions available and both took two arguments. So I simply tried that out.

That way is, however, not documented in the AUG. (Which means I was unable to find it.)

Ralf




reply via email to

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