Relacionales y Operadores Lógicos

x == y igual
x != y diferente (≠)
x>y mayor que
x>=y mayor o igual (≥)
x<y menor que
x<=y menor o igual (≤)
x == y == z todos iguales
x != y != z todos distintos
x>y>z> ... estrictamente decreciente

In[72]:=

10<7

Out[72]=

False

In[73]:=

3<5≤6

Out[73]=

True

In[74]:=

Pi^E<E^Pi

Out[74]=

True

In[75]:=

x>y

Out[75]=

x>y

! p negación (¬p)   
p  && q && ... y (p ∧q∧ ...)
p || q || .. o (p∨q∨ ...)
Xor[p, q, ...] o exclusivo (p ⊻q⊻ ...)
Nand[p, q, ...] y Nor[p, q, ...] no y y no o (⊼ y ⊽)
If[p, entonces, sino] evaluar entonces si p es True, sino si en False
LogicalExpand[expr] expande expresiones lógicas

In[76]:=

7>4&&2≠3

Out[76]=

True

In[77]:=

p&&q

Out[77]=

p&&q

In[78]:=

(p || q) && ! (r || s)

Out[78]=

(p || q) && ! (r || s)

In[79]:=

LogicalExpand[%]

Out[79]=

p&& ! r&& ! s || q&& ! r&& ! s


Created by Mathematica  (August 6, 2004)