I agree with Waldek. For "zero? x" the biggest problem probably is that it should be consistent with "x=0". Unfortunately, that can only be claimed through documentation and not through formal statements that the compiler can handle.
It would be really really a nice extension of the language if in the specification of a category, also axioms (like for example commutativity) could be given as logical formulae (not by names of categories). empty?(list) is another candidate in this series of functions. Ralf On 10/22/2008 10:49 PM, Waldek Hebisch wrote: > Bill Page wrote: >> On Wed, Oct 22, 2008 at 2:07 AM, Martin Rubey wrote: >>> ... >>> div2exquo : F -> F >>> div2exquo f == >>> -- one?(d := denom f) => f >>> ((d := denom f) = 1) => f >>> opex(smp2exquo numer f, smp2exquo d) >>> >>> (by the way, I think we should replace (* = 1) by one?(*) again) >>> >> Perhaps it needs more discussion, but I agree that removing the code >> 'one? ...' and 'zero? ...' throughout the library source was probably >> a mistake. I recall some discussions with Tim about this in the very >> early days of the open source project. >> >> http://lists.nongnu.org/archive/html/axiom-developer/2003-07/msg00103.html >> >> My point of view was that it introduces a deep and unnecessary >> dependency. Tim suggested that this was an "optimization" introduced >> by NAG: >> >> http://lists.nongnu.org/archive/html/axiom-developer/2003-07/msg00107.html >> > > ATM I have no strong opinion about 'one? ...' and 'zero? ...'. > However, they have really nothing to do with CCL -- they are Spad > functions which for some domains may be given some special Lisp > implementation. Both are just special case of eqality. 'one? ...' > and 'zero? ...' in principle may be slightly more efficient than > general equality because frequently 0 and 1 have very special > representation. Also, 0 and 1 sometimes are special cases for > equality, so we may get deeper recursion (and there is some > risk of infinite loops). OTOH using just equality mathematically > looks cleaner. > > --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
