Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Hello, @Dox. I am not completely sure what the inconsistency you mention is, but maybe it is due to the fact of using two assumes that clash with each other. You said you used

assume(c2 - 3 > 0)

and then you used

assume(c2 - 3 < 0)

So you are effectively telling Sage that $c_2>3$ AND $c_2<3$ at the same time, which represents an inconsistency. You can check this by calling

assumptions()

If both assumptions are there, you made a mistake.

The way to proceed is, once you have finished solving your problem with assume(c2 - 3 > 0) and you have your answer, you should use

forget(c2 - 3 > 0)

and then you can call assume(c2 - 3 < 0) without triggering an inconsistency. (You can check the effect of forget by calling assumptions again.)

For the final part of your question, you should forget the previous assumptions that you made about c2, and then you can call

assume(0 < c2)
assume(c2 < 3)

These will effectively restrict c2 to the range $(0,3)$. (Once again, you can check this, by calling assumptions().)

I hope this helps!

Hello, @Dox. I am not completely sure what the inconsistency you mention is, but maybe it is due to the fact of using two assumes that clash with each other. You said you used

assume(c2 - 3 > 0)

and then you used

assume(c2 - 3 < 0)

So you are effectively telling Sage that $c_2>3$ AND $c_2<3$ at the same time, which represents an inconsistency. You can check this by calling

assumptions()

If both assumptions are there, you made a mistake.

The way to proceed is, once you have finished solving your problem with assume(c2 - 3 > 0) and you have your answer, you should use

forget(c2 - 3 > 0)

and then you can call assume(c2 - 3 < 0) without triggering an inconsistency. (You can check the effect of forget by calling assumptions again.)

For the final part of your question, Another way to proceed is the following: you should forget the previous assumptions that you made about c2, and then you can call

assume(0 < c2)
assume(c2 < 3)

These will effectively restrict c2 to the range $(0,3)$. (Once again, you can check this, by calling assumptions().)

I hope this helps!