On 08/06/2014 02:07 AM, Bill Page wrote:
>>> D(abs(x), x) = signum(x)
>>> D(signum(x), x) = diracDelta(x)
> I prefer signum rather than sign. In particular sign(0)=0 but
> signum(0) is undefined.
Oh...
It reminds me that
diracDelta : F -> F
++ diracDelta(x) is unit mass at zeros of x.
is a relatively unclear specification. Is there any reason (except for
the name "diracDelta") that this function has anything to do with
http://en.wikipedia.org/wiki/Dirac_delta_function ? And "function" is
perhaps not the right word. That definition goes against the meaning of
F->F (i.e. total function).
OK, one might argue that we have this all over the place, simplest
example being inv: % -> % or /: (%, %) -> %, but nonetheless, I don't
really like it.
Signatures like
inv: % -> % throw DivideByZero
(see Section 11.4 in http://www.aldor.org/docs/aldorug.pdf)
would be a bit better. Still better would be to be able to specify the
axioms for inv as compiler-readable code. But what should be the least
that can be done, is to specify as exactly as possible the axioms for
the function in the ++ docstring.
If FriCAS doesn't start putting more emphasis on specifying axioms at
least in the documentation, then there is only partial improvement by
functions that nobody can easily modify.
This
http://fricas.github.io/api/DivisionRing.html#index-2
inv: % -> %
++ inv x returns the multiplicative inverse of x.
++ Error: if x is 0.
is already not so bad, but it would be even nicer if there where:
++ Axiom: x*inv(x)=1 for x~=0
explicitly stated.
> And define signum by
>
> abs(x)*signum(x) = x
Does that equality hold for x=0 of you want signum(0) to be undefined?
> Although I do greatly appreciate your work on this, in general I do
> not like this patch very much. It seems to me that it treats this
> problem in only a superficial symbolic way (like Maple, Mathematica
> and Maxima). I think it would be more in keeping with the algebraic
> approach to choose some theory of distributions and extend FriCAS by
> implementing it (or at least some parts of it) explicitly.
Yes, I think that's a good point. The spirit of FriCAS is to implement
things algebraically, i.e. introduce a type for distributions.
> signum(x)*diracDelta(x) + diracDelta(x)*signum(x) = 0
Interesting... that algebra would be non-commutative.
Now the question is... who is going to implement such a new domain?
Bill, do you volunteer?
Ralf
--
You received this message because you are subscribed to the Google Groups
"FriCAS - computer algebra system" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/fricas-devel.
For more options, visit https://groups.google.com/d/optout.