Bill Page wrote: > > On 6 August 2014 06:43, Waldek Hebisch <[email protected]> wrote: > >... > > > > Bill Page wrote: > >> > >> I prefer signum rather than sign. In particular sign(0)=0 but > >> signum(0) is undefined. > > > > I do not think that such a small detail alone justifies > > introducing new name. > > I think it is not a small detail. > > > Practical difficulties with > > overloading may force us to use two names, but morally > > we have single concept. > > To me, overloading is only a small detail. > > > It is debatable if sign/signum > > should be defined at 0, but in most cases having > > bigger domain is better. > > The problem is in limits. > > limit(signum(x),x=0,"left") = -1 > limit(signum(x),x=0,"right") = 1 > > but > > limit(sign(x),x=0,"left") = limit(sign(x),x=0,"right") = 0
Hmm, I define 'sign' so that for x > 0 it is equal to 1, so limit from the right is 1. Similarely limit from the left is -1. Value is 0. Of course, 'sign' is discontinuous at 0, so fact that value is different from limits is no surprise. > >> ... > >> I do not like to change the definition of the derivative of 'abs'. Or > >> rather I would really like to change it to > >> > >> derivative(opabs, (x : F) : F +-> x*inv(abs(x)) > > > > Why this form? > > Now we have 'abs(x)*inv(x)'. So, current > > form has 'abs' in numerator and 'x' in denominator. > > Because I do not want > > D(abs(x),[x,x]) = 0 > > > Your form > > puts 'abs(x)' in denominator. Normal practice when > > simplifying expressions is to remove complicated parts > > from denominator. In our case 'abs' is most complicated > > part and form with 'abs' in numerator is considered > > simpler. > > I think that > > abs(x)/x ~= x/abs(x) > > If D(abs(x),x) = x/abs(x) then D(abs(x),[x,x]) = (abs(x)^2 - x^2 ) / > abs(x)^3. > This is zero only for x is real. But what D(abs(x),x) mean for non-real x? 'abs' considered as function of complex variable is not differentiable. AFAICS one reasonable interpretation of D(abs(x),x) is that it automatically forces x to be real. As a distribution (in one real variable) we have D(abs(x),[x, x]) = 2*diracDelta(x) In partucular this means D(abs(x),[x, x]) = 0 for x not equal to 0. > > >> ... > >> 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). > > > > Take into account that some of best people in symbolic > > computations work on Maple and Mathematica. If both > > do this in such a way and there are no reports in > > the literature about better computational approach, > > then there is good chance that there is no simple > > way to do this better. > > Maybe. Note that both Maple and Mathematica give > > D(abs(x),x) = x/abs(x) > > Mathematica and Maple do not treat signum in exactly the same way. > Results in Maple in particular depend strongly on assumptions placed > on variable x. In FriCAS we have no explicit way to do this, on the > other hand we do have a much stronger emphasis on algebra and less on > the purely symbolic. > > > > >> 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. > >> > >> In particular after reviewing what I could find on the subject I think > >> I like the ideas of Shirokov best: > >> > >> http://en.wikisource.org/wiki/Algebra_of_generalized_functions_%28Shirokov%29 > >> ... > >> Is anyone else interested in this sort of approach? > > > > Well certainly this is an interesting project. But I am > > afraid that you underestimate its scope. > > Perhaps you are right. To use and extend Shirokov's idea might not be easy. > > > Above you have > > noncommutative ring with zero divisors. For such rings > > even simple concepts like fractions become complicated. > > Expression uses powerful algorithms from commutative > > algebra (Gaussion elimination, GCD, factorization, > > Groebner bases, etc.). You need to extend them (or find > > good replacements) to noncommutative case (and handle > > zero divisors). > > Yes. I think that the domain of GeneralizedExpressions must > necessarily be weaker than Expression in some specific ways. > > > Also, our coercions normally are > > homomorphisms, that is they preserve relevant operations. > > But AFAICS formulas for derivatives means that going > > from Expression to GeneralizedExpression is not a > > differential homomorphism. > > Could you give an example? Note that in my email I wrote: > > > In Expression we should have > > > > D(x/abs(x), x) = (abs(x)^2 - x^2 ) / abs(x)^3 > > > > but > > > > D(x/abs(x),x)$GeneralizedExpression(Integer) = 2*diracDelta(x) > > but maybe we really should have > > D(x/abs(x),x)$GeneralizedExpression(Integer) = (abs(x)^2 - x^2 ) / > abs(x)^3 + 2*diracDelta(x) > > Of course the first term is zero if x is real. Note that you give different derivatives for the "same" function x/abs(x) depending on domain. So you have D(f::GE, x) != D(f, x)::GE where f = x/abs(x) and GE is GeneralizedExpression(Integer). This means that '::GE' can not be a differential homomorphism. > > > Also, from GeneralizedExpression > > to Expression will kill noncommutative part (in particular > > map diracDelta to 0), so it seems that only homomorphizm > > is a trivial one. > > >From GeneralizedExpression to Expression would be a retraction. My > intention was that the coercion from Expression to > GeneralizedExpression, performing some operation, followed by > retraction would be identical to that operation in Expression - in > that sense homomorphic. Note that similar relation hold between PrimeField(p) and Integer. Only mapping from bigger domain to smaller is called 'coerce' and mapping from smaller to bigger 'convert'. You probably can make mapping from GeneralizedExpression to Expression into differential homomorphism. However, if we include integration in the list of operations, then results differ. Namely, when you forget about distributional part of derivateve, then 'integral(D(abs(x)/x, x), x), x = -1..1)' gives 0, while taking distributional part into account we get 2. > My admittedly limited understanding of the available approaches to the > theory of distributions and generalized functions is that we may > choose between non-commutative or non-associative algebras. For Schwartz distributions I see no way to avoid non-associativity. The example is: (1/x*x)*diracDelta(x) = 1*diracDelta(x) = diracDelta(x) 1/x*(x*diracDelta(x)) = 1/x*0 = 0 However, going beyond Schwartz distributions we drop relation x*diracDelta(x) = 0. Shirokov is doing this by introducing non-commutativity. But we can drop this relation in purely commutative setting. In particular we can consider x and diracDelta(x) as independent transcendentals. Of course, relation x*diracDelta(x) + diracDelta(x)*x = 0 has some appeal, but clearly we can not use it in commutative setting. > I think > non-commutative is likely to be more useful. I guess that the subset > that can be consistently expressed in a purely commutative function > space is (mostly) trivial but I am not against a consistent > implementation of this subset. Could you give an example of a > non-trivial computation that you would like to be able to perform in > this manner? In particular I am interested in extending this to > integration. We should be able to compute things like integrate(diracDelta(x^2+y^2), x) In general, we should be able to compute integrals of expressions linear in diracDelta and its derivatives. During integration we will use relation 'y*diracDelta(y) = 0' for y depending on integration variable. Since in general we can not move factors depending on integration variable from integral to outside we will get no contradiction. -- Waldek Hebisch [email protected] -- 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.
