Bill Page wrote:
>
> 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?
See answer to Ralf for one example. Another one: Complex or
SAE claims that the result is a Field when argument is a Field.
Using
Complex(AsRing(Complex(Fraction(Integer))))
makes sure that result is not a field.
> 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?
That may be another reason.
> 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).
No, Integer is a Ring, so the coercion (if supported) would be
no-op. The pont is that given a Ring you can test if
say, R has GcdDomain. Forgetful functor makes sure that
answer for such question is false.
--
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.