# What exactly is Implies? Is it a logical test?

I ran the following to simplify my logical test (expecting something in terms of And and Or ...)

FullSimplify[Not[a] || (a && b)]


and was surprised to see

$a \Rightarrow b$ (*Implies[a, b]*) .

I thought "implies" is a statement you deduce from a set of truths. Since when is "implies" a logical test?

Just for fun I tried

Implies[1 > 2, 3 > 4]
(*True*)


Is Mathematica actually trying to say that if 1 is greater than 2, then 3 must be greater than 4?

• The docs seem pretty clear. What's the problem? (The answer to your last question is "yes" on logical grounds that have nothing to do with Mathematica per se.) – Michael E2 Nov 29 '15 at 23:46
• Yes, $A \text{ implies } B$ is a logical operation, just like $A \text{ and } B$ or $A \text{ xor } B$. Does this answer your question? – David Zhang Nov 30 '15 at 5:35

In the literal sense, asserting that A "implies" B (or A ⇒ B) means that if A is true, B must also be true. It says nothing about B when A is false. Therefore:

• When A is true, B must also be true (because of the implication itself).
• When A is false, we don't know anything about B, so B could be either true or false.

The binary operation "A implies B" will give true if the given A and B match either of the above statements, answering the question "Could A imply B?", and thus:

   A   |   B   | Could A imply B?
-------+-------+------------------
True  | True  | Yes
True  | False | No
False | True  | Yes
False | False | Yes


You can see that case 2 is the only one where you can undoubtedly deny that A ⇒ B.

Indeed, "B OR NOT A" is another way to express the above truth table.

Take a look at the following Wikipedia article:

The logical simplification of Not[a] || (a && b) is indeed Implies[a,b]. You can see this by comparing the logical truth tables:

Table[{a, b, Not[a] || (a && b)},
{a, {False, True}},
{b, {False, True}}] // MatrixForm


is the same as

Table[{a, b, Implies[a, b]},
{a, {False, True}},
{b, {False,  True}}] // MatrixForm


Likewise the logical simplification of False implies False is True.

Implies[False, False]


(* True *)

You are incorrect the state that "if 1 is greater than 2, then 3 must be greater than 4." Note that Implies[1 > 2, 4 > 3] is also True. Thus from a false premise you can deduce anything.... a well-known fact from formal logic.

 FullSimplify[Not[a] || (a && b)] // InputForm


Implies[a, b]

Simplify[Not[a] || (a && b)]


! a || b

BooleanConvert[Implies[a, b]]


! a || b

TableForm[BooleanTable[{a, b, ! a || b}, {a, b}],
TableHeadings -> {None, {a, b, ! a || b}}]