On Jan 17, 2009, at 10:18 AM, Hinnerk wrote: > On 15 Jan., 21:00, Robert Bradshaw <rober...@math.washington.edu> > wrote: >> The simplified form is cached, so you can use this to fool it into >> thinking it's already simplified. >> >> sage: f = q + 1 + q >> sage: f._simp = f >> sage: f >> q + 1 + q > > thank you very much Robert! > > Unfortunately this drives show() into endless recursion: > > [~2000 lines deleted] > File "[...]/sage/local/lib/python2.5/site-packages/sage/calculus/ > calculus.py", line 5284, in _latex_ > return self.simplify()._latex_() > File "[...]/sage/local/lib/python2.5/site-packages/sage/calculus/ > calculus.py", line 5283, in _latex_ > if simplify and not self._has_been_simplified(): > RuntimeError: maximum recursion depth exceeded
Hmm... it looks like the _simp would need to be set all the way down the tree or something. > On a sidenote: Even this hack does not return the exact same formular > given but some mathematically equivalent form: > > sage: void = var("a, b, c") > sage: d = b * (a/c) > sage: d._simp = g > sage: d > b*a/c It is just opting to not put the ()'s in for printing, as they are unneeded. > This seems awfully simple unless one has to explain the transformation > of a much longer formular to some laymen, which is exactly what I'm > just trying to escape from. Perhaps the discussion of a "hold" command that has come up before would be useful here. - Robert --~--~---------~--~----~------------~-------~--~----~ To post to this group, send email to sage-support@googlegroups.com To unsubscribe from this group, send email to sage-support-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sage-support URLs: http://www.sagemath.org -~----------~----~----~----~------~----~------~--~---