On Fri, Sep 12, 2008 at 9:18 PM, Ralf Hemmecke wrote: > >> I recall that during the Aldor/Axiom workshop Stephen Watt suggested >> that there might be some cases when it would be interesting to define >> a "singleton" category which specifically satisfies a given domain. >> Suppose there was an operation which evaluates to a category 'Cat(D)' >> - sort of like Join except it takes a domain D as parameter. By >> definition we would have >> >> D has Cat(D) >> True >> >> for all domains D. Now we could easily define a new domain that >> "extends" D by writing: >> >> )abbrev domain NEWD NewD >> NewD():Cat(D) with ... >> == D add >> ... > > That is (of course) not completely like "extend" since it defines a > *new* domain NewD instead of extending D. >
True. Aldor extend adds some kind of notion of a "local" extension, right? I mean that the original object code and definition prior to the extend is still available to someone else if they wished to extend it in some other contradictory manner. So really there is also a new domain involved each time you extend an Aldor domain but it happens to have the same (overloaded) name in a given scope. Or is this description not very accurate? > And if you just have CatD instead of Cat(D), you can achieve the > same thing. When does one have CatD? Do you mean that I must find and copy this from the source code? For example, how can I find the specific category (-ies) to which the domain 'Integer' belongs? Isn't this problematic if there are anonymous 'with' clauses present in the definition of Integer? > Parametrization would only make sense to me if that definition of > NewD appears inside the "add" of a constructor Foo that has D as > a parameter. But in that case the category of D (that is actually useful) > is known from the definition of Foo. > I am speaking loosely here, but I did not think of the D above as a parameter, but rather a globally known domain perhaps made in scope by a prior )expose or import command. > So what did you have in mind with the above? > The whole point is to be able to define specifically the category to which a domain belongs, i.e. the actual type of a domain constructor. And then to be able to use that type in the definition of another domain. >> But more interesting perhaps is that we could also easily write a >> package that adds virtual functionality to D (and any domain that >> extends D) without defining a new domain: >> >> )abbrev package EXTD1 ExtD1 >> ExtD1(D1:Cat(D)): with >> foo: D1 -> D1 >> ... >> == add >> ... >> >> Remember the only the domain D or any domain that "extends" D satisfies >> Cat(D). > > I don't see why one cannot do this with CatD instead of Cat(D). > I do not see how to obtain what you call CatD. 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 -~----------~----~----~----~------~----~------~--~---
