> On Wed, Dec 3, 2008 at 9:39 PM, Waldek Hebisch wrote:
>> Do you think that we should have retraction from OutputForm
>> back to given domain?
>>
>
On Thu, Dec 4, 2008 at 2:42 AM, Bill Page wrote:
> Obviously not. So my prescription: "In all domains A in which
> the category CoercibleTo(B) occurs, it should be removed and
> RetractableTo(A) added to the domain B (if not already present)."
> is certainly wrong in this case.
>

After further reflection, I think I would like to at least partially
reverse my last statement.

Although it is not currently possible to implement such a "retraction"
from OutputForm back to the given domain that generates these values

   coerce: A -> OuputForm

could in principle be accompanied by

  retractIfCan: OutputForm -> Union(A,"failed")

As I see it, OutputForm is a kind of "presentation" domain similar to
LaTeX, MathML or even HTML. OutputForm uses s-expressions as the
underlying represenation and this representation can be rendered in
slightly different ways by different user interfaces - just as HTML
can be render in text form by a web browser like lynx or in graphical
form by a browser like FireFox.

But like OpenMath and MathML content markup (
http://www.w3.org/TR/MathML2/chapter4.html ), the representation
employed by the FriCAS OutputForm domain could completely encoding the
mathematical content of the value of some domain in addition to it's
generic presentation. This would make it possible to generate MathML
content markup and OpenMath markup directly from the OutputForm
representation rather than the much more elaborate means by which
OpenMath was generated by the last commercial release of Axiom (never
implemented in the open source release).

In fact there is already the possibility to convert OutputForm to InputForm

(1) -> sin(x)::OutputForm::InputForm

   (1)  (sin x)
                                                    Type: InputForm
(2) -> interpret %

   (2)  sin(x)
                                                    Type: Expression(Integer)



and from that to recover the original domain. But because OutputForm
is not sufficiently "rich" in content, it is not possible to do this
in a reliable manner as we might expect from a "retraction".

   retractIfCan(sin(x)::OutputForm)$Expression(Integer)

So to summarize: If OutputForm were properly "enriched" I would not
have an objection to "retraction from OutputForm back to given domain"
and therefore calling creation of OutputForm values from domain values
a "coercion". I admit however that without an "extend" method in
FriCAS it might be too awkward to expect all such coercions to be
coded as 'RetractableTo' in the OutputForm domain.

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

Reply via email to