202

Is it better to use \Rightarrow or \implies to symbolize logical implications? Why?

Also, if I write \not \Rightarrow, I get a symbol that means "does not imply." But if I type \not \implies, it doesn't look right. How do I get the corresponding "does not imply" symbol?

7
  • 7
    Not an answer to your question, but just a comment: you can use \nRightarrow. Commented Mar 6, 2012 at 23:00
  • 14
    What ever you decide, I would still use \implies so that you can later redefine \implies to be \Rightarrow, but then your LaTeX code still has correct meaning. Commented Mar 6, 2012 at 23:03
  • 2
    Imagine an equal sign just as long as the long arrow. Would you be accepting it as a relational symbol?
    – percusse
    Commented Mar 7, 2012 at 7:10
  • @CharlieParker I think you need 'amsmath' Commented Jun 21, 2017 at 23:14
  • @PeterGrill how do you do that without getting an error? "LaTeX Error: Command \Rightarrow already defined."
    – John D
    Commented Feb 22 at 15:20

5 Answers 5

265

To answer your first question, you should use \implies, not \Rightarrow. \Rightarrow is far too small to give a readable result and is not spaced properly. Knuth specially defined \iff to be used for equivalence and \implies is the same but for implication (from the amsmath package). An implication is not a relation like > and, therefore, needs to be spaced according to how it is used. Two thick spaces (which are about an en-space) precede and follow an implication because it's more important than a relation. (Basic rule of math spacing: the more important an operator, the wider the space around it). Compare the readability of the following formulas:

Rightarrow vs. Longrightarrow vs. implies

The first line uses \Rightarrow and is the least legible because the main part of the formula (the implication) is difficult to identify. The second line uses \Longrightarrow and is better, but there's not enough space to set the arrow apart from the surrounding symbols (the two inequalities are spaced as much as the arrow). Finally, in the third line (which uses \implies), the additional space highlights the arrow from the rest and so improves the readability of the formula.

Concerning your second question, the simplest way to negate nearly any symbol whatever its length is to use \centernot from the centernot package:

centernot effect on implies

\documentclass{article}

\usepackage{amsmath}
\usepackage{centernot}

\begin{document}

$A \centernot\implies B$

\end{document}

Of course, wrapping \centernot\implies inside a \notimplies macro like Werner did is a good idea.

7
  • 11
    Sometimes the implication operator has lower precedence than other things around it, and in such cases, a giant double-wide arrow looks silly. Example: math.stackexchange.com/a/869215/164530
    – Will
    Commented Jul 30, 2014 at 20:16
  • does this work for inserting it into stack overflow questions? Commented May 22, 2015 at 4:59
  • Why is it that my compiler can't find the \implies arrow? Anyone know the package one needs for this \implies? Commented Jun 17, 2017 at 23:18
  • 1
    @CharlieParker: you need the amsmath package for that. Commented Jun 18, 2017 at 5:53
  • Very good answer. I understand your point about spacing, but I don't understand why a longer arrow is better. I have been using \quad\Rightarrow\quad for many years now and I find it very readable. I still might switch to \implies after reading your answer, but only because I prefer to avoid manual spacing commands such as \quad. Commented Aug 30, 2019 at 13:39
35

I'll answer the second part of your question, since the first seems more subjective.

You can use

\usepackage{amsmath}% http://ctan.org/pkg/amsmath
\newcommand{\notimplies}{%
  \mathrel{{\ooalign{\hidewidth$\not\phantom{=}$\hidewidth\cr$\implies$}}}}

to represent "does not imply". This provides \notimplies that sets a relational symbol with \not overlaid \implies (technically, the other way around):

enter image description here

\documentclass{article}
\usepackage{amsmath}% http://ctan.org/pkg/amsmath
\newcommand{\notimplies}{%
  \mathrel{{\ooalign{\hidewidth$\not\phantom{=}$\hidewidth\cr$\implies$}}}}
\newcommand{\X}{\mathcal{X}}
\newcommand{\Y}{\mathcal{Y}}
\begin{document}
\[
  \X\Rightarrow\Y \quad \X\not\Rightarrow\Y \qquad
  \X\implies\Y \quad \X\notimplies\Y
\]
\end{document}

Of course, from this point the spacing can also be modified, if needed.

For a quick lesson on \ooalign, see \subseteq + \circ as a single symbol (“open subset”).

4
  • What are the advantages and disatvantages of this \ooalign solution, compared to @Philippe Goutet's \centernot solution? Commented Mar 7, 2012 at 15:46
  • 4
    @jamaicanworm: there's just a difference of method: \centernot does not use alignment but measures things and then translate them; \ooalign is what Knuth used for \notin to center the slash on the \in. The main advantage of \centernot is that it's ready for use in a package. Another difference is that, in its current state, Werner's solution won't give a good result in subscript (but that's easily fixable with a \mathpalette or \mathchoice). Commented Mar 7, 2012 at 18:42
  • 1
    @PhilippeGoutet: Thanks for clearing that up...
    – Werner
    Commented Mar 7, 2012 at 18:47
  • I was getting extra \fi errors with this solution until I enclosed the \phantom{=} in another pair of curly brackets. Not sure what part of my preamble is causing that, but just to make people aware of this possibility.
    – Chappers
    Commented Mar 14, 2020 at 16:33
27

It's not perfect, but I use

\newcommand{\notimplies}{\;\not\!\!\!\implies}

which looks like this:

enter image description here

2
  • 4
    Easiest quick (not necessitating lots of external packages; works out of the box in MathJax) solution among these, IMO.
    – ijoseph
    Commented Oct 4, 2020 at 19:52
  • 5
    \newcommand{\nimplies}{\;\not\nobreak\!\!\!\!\implies} Works better over line breaks :) Commented Feb 9, 2021 at 17:25
8

The conventions in other parts of mathematics may differ, but in logic texts, implication is virtually never written with long arrows. Implication is most commonly denoted by \rightarrow (= \to) or \supset, occasionally \Rightarrow. Long arrows (\longrightarrow and \Longrightarrow) are used for sequent arrows.

2
  • 2
    This is something of a subject-language/object-language distinction; a formal language will have some binary connective, usually denoted with \rightarrow (though historically often with \supset, somewhat confusingly). This is strictly different to the informal arrow used for implication between propositions, which is why people tend to use a different symbol.
    – dbmag9
    Commented May 25, 2014 at 22:06
  • Thanks for hinting out the \to. I was searching for a simpler way to than to having my algorithms riddled with \rightarrow commands. BTW, \gets is as same as \leftarrow.
    – Ébe Isaac
    Commented Nov 30, 2016 at 4:59
2

It's my answer of your second question:

$A \rlap{\(\quad\not\)}\implies B$

or

$$
A \rlap{$\quad\not$}\implies B
$$

whick looks like this:

enter image description here

Perhaps, it's not the best solution, but it's short and doesn't need external packages.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .