Waldek,

In principle I am in favor of standardizing such forgetful functors
but so far I know only formal reasons for wanting such functors in
relation to mathematical category theory (adjoint functors). I do not
see any way to take advantage of such notions in FriCAS at this time.

A basic design principle of Axiom is that any domain that satisfies
some category T can be used as a parameter where the formal parameter
requires T. In other words we can always treat Integer as "just" an
AbelianGroup or Ring if we want to. Why would we want to hide the
extra properties of Integer?

Are you thinking of applications in the interpreter where for example
we might like to selectively expose only certain exports of some
domains to help control evaluation?

Forgetful functors look like a form of type coercion. We could say
that Axiom automatically applies such coercions. If there is a good
reason to want to force such coercions when they would not necessarily
occur automatically, I wonder if it would not make good sense to
support this syntactically rather than just in the library. E.g.

   Integer::Ring

could be equivalent to your AsRing(Integer).

Regards,
Bill Page.

On Tue, Nov 29, 2011 at 2:52 PM, Waldek Hebisch
<[email protected]> wrote:
> From time to time there is a need to use domain forgeting
> about some of its properties.  For example, we may want
> to treat Integer as an AbelianGroup and forget about Ring
> structure.  Or treat it as a Ring, but forget about
> it beeing an IntegralDomain.  For this purpose I used
> code like:
>
> AsRing(R : Ring) : Ring == R
>
> I wonder if we should include such functors at least
> for popular categories.
>
> Pro: the code is simple and may be useful.
> Cons: User can easily write it as needed.
>
> Opinions?
>
> --
>                              Waldek Hebisch
> [email protected]
>
> --
> 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.
>
>

-- 
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.

Reply via email to