ASKSAGE: Sage Q&A Forum - Latest question feedhttp://ask.sagemath.org/questions/Q&A Forum for SageenCopyright Sage, 2010. Some rights reserved under creative commons license.Thu, 15 Dec 2011 07:36:40 -0600Is it possible to define (or assume) a general positive function?http://ask.sagemath.org/question/8558/is-it-possible-to-define-or-assume-a-general-positive-function/Hi,
Is it possible to assume a positive function when doing simplifications? (like Simplify[expr,a[t]>0] in Mathematica)
To be explicit, I have
# output: abs(a(t))
# changing to assume(a(t)>0) still doesn't work, and results in a DeprecationWarning
a = function('a',var('t'))
assume(a>0)
sqrt(a**2).simplify_full()
This is to be compared to variable case (where works):
# output: t
assume(t>0)
sqrt(t**2).simplify_full()
I could do a replacement to subs_expr abs(a(t)) into a(t). But is there a simple and elegant resolution? Thank you!
tririverThu, 15 Dec 2011 07:36:40 -0600http://ask.sagemath.org/question/8558/