> On Thu, Dec 4, 2008 at 5:01 AM, Ralf Hemmecke wrote:
>>
>> Are the files mentioned in
>> http://www.mail-archive.com/[EMAIL PROTECTED]/msg00682.html
>> the only place related to SubsetCategory?
>>
>> I wonder whether we could get rid of it. A grep of the algebra sources
>> just yields 'fraction.spad.pamphlet'. Perhaps simply replacing
>>
>> Localize(M:Module R,
>> R:CommutativeRing,
>> S:SubsetCategory(Monoid, R)): Module R with
>>
>> by
>>
>> SubMonoid(R: Monoid): Category == Monoid with
>> coerce: % -> R
>> retract: R -> %
>>
>> Localize(M:Module R,
>> R:CommutativeRing,
>> S:SubMonoid(R)): Module R with
>>
>> (or something like that) should do. Am I wrong?
>>
>> Another related link...
>> http://axiom-wiki.newsynthesis.org/SandBoxSubsetCategory
>
On Thu, Dec 4, 2008 at 8:38 AM, Bill Page wrote:
> Let's try it! I do not see any fundamental role played by
> 'SubsetCategory'. But the domain constructor 'SubDomain'
> is a completely different thing. That I believe, should be a
> fundamental part of the language.
>
I would like to partially withdraw my comment above. I recall now
another aspect of SubsetCategory. As Waldek said:
>> ...
>> SubsetCategory represents different variant of subtyping -- it
>> is category of subdomains of given domain, without specifying
>> exact domain
The implication is that as the *category of subdomains*, this
construction does something that is currently very inconvenient to do
otherwise in FriCAS - it gives domains that are declared to satisfy
this category the same exports as the domain R. So when we write:
Localize(M:Module R,
R:CommutativeRing,
S:SubsetCategory(Monoid, R)): Module R with
we mean that the domain S must belong to the same categories as R. I
expect that computing exactly what these categories are is a large
part of the 30% of the compile time that Waldek cited. But as pointed
out here:
http://axiom-wiki.newsynthesis.org/SandBoxSubsetCategory
For example:
)abbrev category GSUBS GroupSubset
GroupSubset(R:Type):Category == SubsetCategory(Group,R)
- spad
Compiling OpenAxiom source code from file
/var/zope2/var/LatexWiki/6559111561929448642-25px001.spad using
Spad compiler.
GSUBS abbreviates category GroupSubset
------------------------------------------------------------------------
initializing NRLIB GSUBS for GroupSubset
compiling into NRLIB GSUBS
>> System error:
Caught fatal error [memory may be damaged]
--
(This error occurs in all current versions and forks of Axiom.)
This feature of 'SubsetCategory' does not quite work in as general a
manner as we might expect.
This is related to a new feature of the SPAD language for which I have
argued elsewhere: singleton categories, that is a category as a set of
domains consisting of just one domain. For example '{Integer}' would
be the category which contains only the domain 'Integer'. Then what
Ralf called 'SubMonoid' above, could be written:
SubMonoid(R: Monoid): Category == Join({R},Monoid) with
coerce: % -> R
retract: R -> %
Note: I am not necessarily advocating '{Integer}' as an appropriate
notation for singleton category.
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
-~----------~----~----~----~------~----~------~--~---