# Revision history [back]

### Multiplying an inequality by -1.

I am new to sage and wondering why it doesn't reverse the terms (or the sign) of an inequality when multiplying by -1. E.g.:

sage: var('x y')
(x, y)
sage: f = x + 3 < y - 2
sage: f*2
2*x + 6 < 2*y - 4   # preserves truth-value of f
sage: f*(-1)
-x - 3 < -y + 2     # reverses truth-value of f


Why?

 2 retagged vdelecroix 7397 ●19 ●81 ●164 http://www.labri.fr/pe...

### Multiplying an inequality by -1.

I am new to sage and wondering why it doesn't reverse the terms (or the sign) of an inequality when multiplying by -1. E.g.:

sage: var('x y')
(x, y)
sage: f = x + 3 < y - 2
sage: f*2
2*x + 6 < 2*y - 4   # preserves truth-value of f
sage: f*(-1)
-x - 3 < -y + 2     # reverses truth-value of f


Why?

 3 retagged FrédéricC 5096 ●3 ●42 ●110

### Multiplying an inequality by -1.

I am new to sage and wondering why it doesn't reverse the terms (or the sign) of an inequality when multiplying by -1. E.g.:

sage: var('x y')
(x, y)
sage: f = x + 3 < y - 2
sage: f*2
2*x + 6 < 2*y - 4   # preserves truth-value of f
sage: f*(-1)
-x - 3 < -y + 2     # reverses truth-value of f


Why?