Bill Page wrote:
> 
> >> Maybe what you are suggesting
> >> could be represented by a domain for piecewise defined functions.
> >> Something like this is already possible in the interpreter:
> >>
> >> It seems to me that a better direction for FriCAS would be to
> >> insist that this sort of logic remain part of the *type system*
> >> of the language rather than as values in some new "conditional
> >> expression" domain. I believe that this was one of the original
> >> motivations for the concept of the "SubDomain" constructor:
> >> ...

Bill, excuse me, but I would like to propose you a little
challenge: create a domain for piecewise polynomial functions.
W should be able to add and multiply them and to print them
in _symbolic_ form.  So for example, we would like to
get something like:

step(0..%plusInfinity)*x - step(%minusInfinity..0)*x

in the output, where step denotes function which is 1 on a
given interval and 0 otherwise.  Of course we also want
similar functions as an input, so the domain should contain
step function and coercion from polynomials.

One more remark: we want correct zero test: (x = 0)::Boolean
should give mathematically correct answer.

For extera bounus allow notation like abs in the input and
try to put abs in the output if the printed form using abs
is clearly simpler.

Some explanation: I think that trying to implement this should
claryfy your ideas.  Normal FriCAS domains contain a lot of
"extra" operations, I ask you only to implement the core ones.
Also, I choose "easy" domain so that mathematical algorithms
are simple and the only "difficulty" is choice of representation.

I must admit that I do not see how to implement such domain
using your ideas.  In fact SubDomain represents codition as
machine code and in your interpreter example while interpreter
has symbolic representation for a function normally user can
only evalute the function so again has only acces to machine
code.  Now, it is easy to go from symbolic representation
to machine code, but it is hard to go back.  So for example
I do not see how you could print such functions in symbolic
form without cheating (like directly or indirectly accessing
symbolic version stored in the interpreter).

So let mer repeat: trying to code this should show you
difficulties (or you will show me that I misunderstood
your idea).

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

Reply via email to