Take the 2-minute tour ×
Mathematica Stack Exchange is a question and answer site for users of Mathematica. It's 100% free, no registration required.

I am trying to simplify some expressions using assumptions and got an inconsistent behavior of Mathematica 9 when working with indexed variables. Consider

Assuming[Subscript[x,_] ∈ Reals, Refine[Im[Subscript[x, 10]]]]

0

Assuming[Subscript[x,_] ∈ Reals && Subscript[x,_] > 0, Refine[Sign[Subscript[x,10]]]]
Sign[Subscript[x, 10]]
Assuming[Subscript[x,10] > 0, Refine[Sign[Subscript[x,10]]]]

1

It appears that assumptions about an indexed variable being real work, but assumptions about the positivity of an indexed variable seem not to work.

share|improve this question
    
Have you tried Assuming[x \[Element] Reals, Refine[Im[x]]] Assuming[x \[Element] Reals && x > 0, Refine[Sign[x]]] Assuming[x > 0, Refine[Sign[x]]]? –  belisarius Sep 11 '13 at 16:36
    
This works as expected. My problem is that assumptions on patterns can only work for domains. –  yarchik Sep 12 '13 at 8:41
add comment

1 Answer

It is not Assuming that supports general patterns, but Element. This explains why

Assuming[x > 0, Refine@Sign[x]]

gives 1, while

Assuming[x[_] > 0, Refine@Sign[ x[1] ]]

does not.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.