On Thu, Jan 19, 2012 at 5:00 PM, Ralf Hemmecke wrote:
> On 01/19/2012 10:04 PM, Bill Page wrote:
>
>> Can you give an example of a domain in the Axiom library that does not
>> use Rep?
>
> I wouldn't have know immediately, but Gaby just pointed to reducedSystem.
> And if you search for Rep in integer.spad.pamphlet, you will not find
> anything. There are several of these domains that just use the Lisp
> representation. IndexedList is another one. In fact, most of the domains
> in list.spad.pamphlet don't mention a variable Rep. But they pay with lots
> of "$Lisp" qualifiers.
>
Right. $Lisp and pretend. Without looking at it too deeply I am not
sure why one does at least write:
Rep := Lisp
here or better
Rep == Lisp
rep(x:%):Rep == ..
per(x:Rep):% ==
but perhaps this is some undesirable interaction with the Rep:=
coercion system or the special treatment of Lisp.
>
>> I haven't tried this but I would write:
>>
>> add {
>> A==%
>> B==%
>> Rep == String
>> D: with {foo: A -> B} == add {Rep == Integer;
>> foo(x:A):B==per(2 * rep x)
>> }
>> foo(x: %): % ==
>>
>> That is == rather than a macro ==> definition.
>
> That was intentional. I meant textual substitution, but wanted to be able to
> show that one might want A refer to the % from the outer add package and
> B to the inner one. So I simply introduced these macros to have a name for
> the explanation.
>
Then I don't understand your point. In this case why not just write:
A == %
B ==> %
Regards,
Bill Page.
--
You received this message because you are subscribed to the Google Groups
"FriCAS - computer algebra system" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/fricas-devel?hl=en.