On 2013-10-11, Tamas Papp <tkpapp at gmail.com> wrote:
> I would like to display an equation, both in Maxima and for LaTeX, with
> certain parts arranged in a way that's meaningful for the problem. A
> toy example, where I want 1-(a+b) preserved in that form:
Well, in order to preserve expressions as close as possible to their
input form, you can turn off the 'simp' flag.
(%i2) simp : false $
(%i3) b*c/(1 - (a + b));
(%o3) b*c/(1-(a+b))
(%i4) :lisp $%
((MQUOTIENT) ((MTIMES) $B $C) ((MPLUS) 1 ((MMINUS) ((MPLUS) $A $B))))
(%i4) simp : true $
(%i5) b*c/(1 - (a + b));
(%o5) b*c/(-b-a+1)
(%i6) :lisp $%
((MTIMES SIMP) ((MEXPT SIMP) ((MPLUS SIMP) 1 ((MTIMES SIMP) -1 $A) ((MTIMES SIMP) -1 $B)) -1) $B $C)
When simp is false, most, maybe all, mathematical identities are
disabled. E.g. 1 - 1 => 1 - 1, not 0. You can still turn on the simp
flag selectively via ev(foo, simp=true). I don't know whether that's
useful to you.
There isn't a way to turn off simplification for parts of an expression,
so far as I know.
best
Robert Dodier