delay evaluation in subs

8 views
Skip to first unread message

tvn

unread,
Apr 4, 2013, 1:06:46 AM4/4/13
to sage-s...@googlegroups.com
Is it possible to delay/hold the automatic evaluation in expression after applying subs()  ?   I am facing the below problem because of such automatic evaluation

sage: var('l ,u')
(l, u)
sage: f = l-u <= 0
sage: f.subs({l:oo})
+Infinity <= 0      #this is not expected as it becomes False.     what should be given is that  oo -u <= 0  (which implies  oo <= u)  .

Doing this same operation in sympy gives the desirable output 
In [76]: f = l-u <= 0

In [77]: f.subs({l:oo})
Out[77]: -u + oo <= 0




Reply all
Reply to author
Forward
0 new messages