From: SourceForge.net <noreply@so...>  20041022 18:33:32

Bugs item #1052382, was opened at 20041022 14:33 Message generated for change (Tracker Item Submitted) made by Item Submitter You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=104933&aid=1052382&group_id=4933 Category: None Group: None Status: Open Resolution: None Priority: 5 Submitted By: Stavros Macrakis (macrakis) Assigned to: Nobody/Anonymous (nobody) Summary: assume hard to use programmatically Initial Comment: assume(r>0 and r<1) works fine. However, if I have a function withassume(pred,expr) := ( assume(pred), expand(expr) ); you get withassume(r>0 and r<1, abs(r)) => ERROR: can't eval predicate r>0 Quoting doesn't help: withassume('(r>0 and r<1), abs(r)) => error withassume('('(r>0) and '(r<1)), abs(r)) => error withassume(('"and")(r>0) and '(r<1)), abs(r)) => error withassume('("and")(r>0) and '(r<1)), abs(r)) => error There is a workaround, however: withassume(pred,expr) := ( apply('assume,[pred]), expand(expr) ); You still have to quote the argument, but it works now: withassume('(r>0 and r<1), abs(r)) => r Alternatively, you can use the noun form of AND: withassume('("and")(r>0,r<1),abs(r)) => r Yuck in both cases.  Discussion The underlying problem is that "is", "assume", "forget", etc. quote their arguments then depend on their own little idiosyncratic evaluator.... Also that nounform logical connectives (and, or, if) aren't really supported. Maxima version: 5.9.0.9beta2 Maxima build date: 10:50 7/27/2004 host type: i686pcmingw32 lispimplementationtype: Kyoto Common Lisp lispimplementationversion: GCL 2.6.3  You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=104933&aid=1052382&group_id=4933 