Questions re GiNaC design

Hans Peter Würmli wurmli at freesurf.ch
Wed Jan 30 19:12:27 CET 2002


On Tue, 29 Jan 2002 12:45:57 +0100 (CET)
"Richard B. Kreckel" <kreckel at thep.physik.uni-mainz.de> wrote:

> > 
> > Now the question: why did choose expression ex to be unspecified?
> 
> Good question.  Such a hierarchic algebraic approach would make some
> things clearer.  Mathematicians frequently seem to favor it but they tend
> to seep the implementation problems under the rug.  Why didn't we do it?  
> Because designing and implementing such a thing would have been much more
> work and we needed to use the library and have it run fast and we simply
> had not enough spare man-years lying around.
> 
> Richard Fateman once wrote an interesting comparison betweeen the two
> approaches: <http://http.cs.berkeley.edu/~fateman/papers/asmerev94.ps>.
> 

Thanks for the reference. It was interesting reading, but I was not totally sure whether Richard Fateman also expects too much, e.g. when he writes "... Could we anticipate new results such as the invention of the Risch integration algorithm ..." (With a diagonal argument you could probably disprove such a conjecture, if it were mad.) But also on the practical side, he does not seem to realise that many "facts" of mathematics cannot be constructed, either because no algorithm has been found or because no algorithm can be found. Even the simple test whether something is zero can only be answered in special situations. (You have to give an algorithm that finishes, not to speak of the complexity it might have.)

So far I have found for most of my little problems a solution, maybe not an elegant one, but one that seems to work.

Maybe one pattern matching situation could find a different implementation in a future release (I am aware of your statement that pattern matching is purely syntactic):

find(x^2, pow(x,wild())) will return {x^2}
find(x, pow(x,wild())) will return {}

whereas

find(x, pow(x,1)) will return {x}

I would prefer if the latter two were equal and == {x}

Cheers, H.P.



More information about the GiNaC-devel mailing list