sign non-forgetfulness



Apparently csign (and sign) temporarily place facts in the fact database, but 
the temporary facts aren't removed immediately. An example:

A simple-minded function that calls csign:

(%i1) possible_singular_pts(e) := block([inflag : true],
  e : factor(e),
  if mapatom(e) then set()
  else if op(e) = "^" and csign(second(e)) # 'pos and not constantp(first(e)) then set(first(e))
  else xreduce('union, map('possible_singular_pts, args(e))))$

Some tests:

 (%i2) e : integrate(exp(a^2*x^2+b*x),x)$

All is well:

 (%i3) possible_singular_pts(e);
 (%o3) {a}

 (%i4) facts(a);
 (%o4) []

Same calculation, but inside a function larry:

 (%i5) larry(e) := (possible_singular_pts(e), facts(a))$

After the call to possible_singular_pts, notequal(a,0) is still in the fact database:

 (%i6) larry(e);
 (%o6) [notequal(a,0)]

But after larry exits, notequal(a,0) isn't in the fact database:

 (%i7) facts(a);
 (%o7) []

It's not difficult to workaround this (putative) bug, but it make me :(

--Barton