2

At the moment my latex code looks like this but I get two errors saying Missing $ inserted. } . I have tried a lot to fix it but nothing helps. I am not sure if I am using a symbol that is messing with math mode or what's wrong.

\item \resizebox{\textwidth}{!}{\[\displaystyle
    \begin{array}{lp{2mm}cll} 
    (\A \oplus \B) \oplus \B & & \equiv & \big((\A\wedge\neg\B)\vee(\neg\A\wedge\B)\big)\oplus\B & \text{(Def of $\oplus$)}        \\[2mm]
                             & & \equiv & \Big(\big((\A\wedge\neg\B)\vee(\neg\A\wedge\B)\big)\wedge\neg\B\Big)\vee\Big(\neg\big((\A\wedge\neg\B)\vee(\neg\A\wedge\B)\big)\wedge\B\Big)& \text{(Def of $\oplus$)}        \\[2mm]
                             & & \equiv & \Big(\big((\A\wedge\neg\B)\vee(\neg\A\wedge\B)\big)\wedge\neg\B\Big)\vee\Big(\big((\neg\A\vee\B)\wedge(\A\vee\neg\B)\big)\wedge\B\Big)& \text{(De Morgan Laws Double Negation)}        \\[2mm]
                             & & \equiv & \Big(\neg\B\wedge\big((\A\wedge\neg\B)\vee(\neg\A\wedge\B)\big)\Big)\vee\big((\neg\A\vee\B)\wedge\B\wedge(\A\vee\neg\B)\big)& \text{(Associativity Commutativity)}        \\[2mm]
                             & & \equiv & \Big(\neg\B\wedge\big((\A\wedge\neg\B)\vee(\neg\A\wedge\B)\big)\Big)\vee\Big((\neg\A\vee\B)\wedge\big((\B\wedge\A)\vee(\B\wedge\neg\B)\big)\Big)& \text{(Distributivity)}        \\[2mm]
                             & & \equiv & \Big(\neg\B\wedge\big((\A\wedge\neg\B)\vee(\neg\A\wedge\B)\big)\Big)\vee\Big((\neg\A\vee\B)\wedge\big((\B\wedge\A)\vee\false\big)\Big)& \text{(Negation)}        \\[2mm]
                             & & \equiv & \Big(\neg\B\wedge\big((\A\wedge\neg\B)\vee(\neg\A\wedge\B)\big)\Big)\vee\big((\neg\A\vee\B)\wedge\B\wedge\A\big) & \text{(Neutrality Associativity)}        \\[2mm]
                             & & \equiv & \Big(\neg\B\wedge\big((\A\wedge\neg\B)\vee(\neg\A\wedge\B)\big)\Big)\vee(\B\wedge\A) & \text{(Commutativity,Absorption)}       \\[2mm]
                             & & \equiv & \Big(\big(\neg\B\wedge(\A\wedge\neg\B)\big)\vee\big(\neg\B\wedge(\neg\A\wedge\B)\big)\Big)\vee(\B\wedge\A) & \text{(Distributivity)}        \\[2mm]
                             & & \equiv & \Big(\big(\neg\B\wedge\neg\B\wedge\A\big)\vee\big(\neg\B\wedge\B\wedge\neg\A\big)\Big)\vee(\B\wedge\A) & \text{(Associativity Commutativity)}        \\[2mm]
                             & & \equiv & \Big(\big(\neg\B\wedge\A\big)\vee\big(\false\wedge\neg\A\big)\Big)\vee(\B\wedge\A) & \text{(Idempotency Negation)}        \\[2mm]
                             & & \equiv & \big((\neg\B\wedge\A)\vee\false\big)\vee(\B\wedge\A) & \text{(Neutrality)}        \\[2mm]
                             & & \equiv & (\neg\B\wedge\A)\vee(\B\wedge\A) & \text{(Neutrality)}        \\[2mm]
                             & & \equiv & (\A\wedge\neg\B)\vee(\A\wedge\B) & \text{(Commutativity)}        \\[2mm]
                             & & \equiv & \A\wedge(\neg\B\vee\B) & \text{(Distributivity)}        \\[2mm]
                             & & \equiv & \A\wedge\true & \text{(Negation)}        \\[2mm]
                             & & \equiv & \A & \text{(Neutrality)}        \\[2mm] 
    \end{array}\]
    }
0

Several issues:

  1. Don't use \[...\] inside an argument. Use $...$.

  2. Passed [t] to array to make it top aligned.

  3. Did not fix the fact that the box is a full \textwidth, despite it already being indented. You will need to reexamine that.

Here is the MWE. p.s. In the future, post a full working example, so we don't have to guess the meaning of things like \A, etc.

\documentclass{article}
\def\A{A}
\def\B{B}
\def\false{\ne}
\def\true{=}
\usepackage{graphicx,amsmath}
\begin{document}
\begin{itemize}
\item \resizebox{\textwidth}{!}{$\displaystyle
    \begin{array}[t]{lp{2mm}cll} 
    (\A \oplus \B) \oplus \B & & \equiv & \big((\A\wedge\neg\B)\vee(\neg\A\wedge\B)\big)\oplus\B & \text{(Def of $\oplus$)}        \\[2mm]
                             & & \equiv & \Big(\big((\A\wedge\neg\B)\vee(\neg\A\wedge\B)\big)\wedge\neg\B\Big)\vee\Big(\neg\big((\A\wedge\neg\B)\vee(\neg\A\wedge\B)\big)\wedge\B\Big)& \text{(Def of $\oplus$)}        \\[2mm]
                             & & \equiv & \Big(\big((\A\wedge\neg\B)\vee(\neg\A\wedge\B)\big)\wedge\neg\B\Big)\vee\Big(\big((\neg\A\vee\B)\wedge(\A\vee\neg\B)\big)\wedge\B\Big)& \text{(De Morgan Laws Double Negation)}        \\[2mm]
                             & & \equiv & \Big(\neg\B\wedge\big((\A\wedge\neg\B)\vee(\neg\A\wedge\B)\big)\Big)\vee\big((\neg\A\vee\B)\wedge\B\wedge(\A\vee\neg\B)\big)& \text{(Associativity Commutativity)}        \\[2mm]
                             & & \equiv & \Big(\neg\B\wedge\big((\A\wedge\neg\B)\vee(\neg\A\wedge\B)\big)\Big)\vee\Big((\neg\A\vee\B)\wedge\big((\B\wedge\A)\vee(\B\wedge\neg\B)\big)\Big)& \text{(Distributivity)}        \\[2mm]
                             & & \equiv & \Big(\neg\B\wedge\big((\A\wedge\neg\B)\vee(\neg\A\wedge\B)\big)\Big)\vee\Big((\neg\A\vee\B)\wedge\big((\B\wedge\A)\vee\false\big)\Big)& \text{(Negation)}        \\[2mm]
                             & & \equiv & \Big(\neg\B\wedge\big((\A\wedge\neg\B)\vee(\neg\A\wedge\B)\big)\Big)\vee\big((\neg\A\vee\B)\wedge\B\wedge\A\big) & \text{(Neutrality Associativity)}        \\[2mm]
                             & & \equiv & \Big(\neg\B\wedge\big((\A\wedge\neg\B)\vee(\neg\A\wedge\B)\big)\Big)\vee(\B\wedge\A) & \text{(Commutativity,Absorption)}       \\[2mm]
                             & & \equiv & \Big(\big(\neg\B\wedge(\A\wedge\neg\B)\big)\vee\big(\neg\B\wedge(\neg\A\wedge\B)\big)\Big)\vee(\B\wedge\A) & \text{(Distributivity)}        \\[2mm]
                             & & \equiv & \Big(\big(\neg\B\wedge\neg\B\wedge\A\big)\vee\big(\neg\B\wedge\B\wedge\neg\A\big)\Big)\vee(\B\wedge\A) & \text{(Associativity Commutativity)}        \\[2mm]
                             & & \equiv & \Big(\big(\neg\B\wedge\A\big)\vee\big(\false\wedge\neg\A\big)\Big)\vee(\B\wedge\A) & \text{(Idempotency Negation)}        \\[2mm]
                             & & \equiv & \big((\neg\B\wedge\A)\vee\false\big)\vee(\B\wedge\A) & \text{(Neutrality)}        \\[2mm]
                             & & \equiv & (\neg\B\wedge\A)\vee(\B\wedge\A) & \text{(Neutrality)}        \\[2mm]
                             & & \equiv & (\A\wedge\neg\B)\vee(\A\wedge\B) & \text{(Commutativity)}        \\[2mm]
                             & & \equiv & \A\wedge(\neg\B\vee\B) & \text{(Distributivity)}        \\[2mm]
                             & & \equiv & \A\wedge\true & \text{(Negation)}        \\[2mm]
                             & & \equiv & \A & \text{(Neutrality)}        \\[2mm] 
    \end{array}$
    }
    \end{itemize}
\end{document}

enter image description here

|improve this answer|||||
  • Thanks for the advices. I will keep them in mind the next time I post something. – Rard Jul 21 '16 at 18:44
0

You should think at least twenty times before scaling such a big object, with the risk it becomes unreadable.

  1. The dimension to be used is \linewidth, because you're in a list
  2. \big( and \big) should be \bigl( and \bigr) to ensure proper spacing
  3. \Big is too big; I changed them into \bigl and \bigr.

The best tool for this is aligned (the inline version of align).

\documentclass{article}
\usepackage{amsmath}
\usepackage{graphics}
\usepackage{lipsum} % just for the example

\newcommand{\A}{A}
\newcommand{\B}{B}
\newcommand{\false}{\bot}
\newcommand{\true}{\top}

\begin{document}

\lipsum[2]

\begin{itemize}

\item \lipsum[3]

\item 
  \resizebox{\linewidth}{!}{$\!\begin{aligned}[t]
    (\A \oplus \B) \oplus \B 
    & \equiv \bigl((\A\wedge\neg\B)\vee(\neg\A\wedge\B)\bigr)\oplus\B 
  && \text{(Def of $\oplus$)}  \\[2mm]
    & \equiv \bigl(\bigl((\A\wedge\neg\B)\vee(\neg\A\wedge\B)\bigr)\wedge\neg\B\bigr)\vee
      \bigl(\neg\bigl((\A\wedge\neg\B)\vee(\neg\A\wedge\B)\bigr)\wedge\B\bigr)
  && \text{(Def of $\oplus$)}  \\[2mm]
    & \equiv \bigl(\bigl((\A\wedge\neg\B)\vee(\neg\A\wedge\B)\bigr)\wedge\neg\B\bigr)\vee
      \bigl(\bigl((\neg\A\vee\B)\wedge(\A\vee\neg\B)\bigr)\wedge\B\bigr)
  && \text{(De Morgan Laws Double Negation)}  \\[2mm]
    & \equiv \bigl(\neg\B\wedge\bigl((\A\wedge\neg\B)\vee(\neg\A\wedge\B)\bigr)\bigr)\vee
      \bigl((\neg\A\vee\B)\wedge\B\wedge(\A\vee\neg\B)\bigr)
  && \text{(Associativity Commutativity)}  \\[2mm]
    & \equiv \bigl(\neg\B\wedge\bigl((\A\wedge\neg\B)\vee(\neg\A\wedge\B)\bigr)\bigr)\vee
      \bigl((\neg\A\vee\B)\wedge\bigl((\B\wedge\A)\vee(\B\wedge\neg\B)\bigr)\bigr)
  && \text{(Distributivity)}  \\[2mm]
    & \equiv \bigl(\neg\B\wedge\bigl((\A\wedge\neg\B)\vee(\neg\A\wedge\B)\bigr)\bigr)\vee
      \bigl((\neg\A\vee\B)\wedge\bigl((\B\wedge\A)\vee\false\bigr)\bigr)
  && \text{(Negation)}  \\[2mm]
    & \equiv \bigl(\neg\B\wedge\bigl((\A\wedge\neg\B)\vee(\neg\A\wedge\B)\bigr)\bigr)\vee
      \bigl((\neg\A\vee\B)\wedge\B\wedge\A\bigr)
  && \text{(Neutrality Associativity)}  \\[2mm]
    & \equiv \bigl(\neg\B\wedge\bigl((\A\wedge\neg\B)\vee(\neg\A\wedge\B)\bigr)\bigr)\vee
      (\B\wedge\A)
  && \text{(Commutativity,Absorption)} \\[2mm]
    & \equiv \bigl(\bigl(\neg\B\wedge(\A\wedge\neg\B)\bigr)\vee\bigl(\neg\B\wedge
      (\neg\A\wedge\B)\bigr)\bigr)\vee(\B\wedge\A)
  && \text{(Distributivity)}  \\[2mm]
    & \equiv \bigl(\bigl(\neg\B\wedge\neg\B\wedge\A\bigr)\vee\bigl(\neg\B\wedge\B\wedge
      \neg\A\bigr)\bigr)\vee(\B\wedge\A)
  && \text{(Associativity Commutativity)}  \\[2mm]
    & \equiv \bigl(\bigl(\neg\B\wedge\A\bigr)\vee\bigl(\false\wedge\neg\A\bigr)\bigr)\vee
      (\B\wedge\A)
  && \text{(Idempotency Negation)}  \\[2mm]
    & \equiv \bigl((\neg\B\wedge\A)\vee\false\bigr)\vee(\B\wedge\A)
  && \text{(Neutrality)}  \\[2mm]
    & \equiv (\neg\B\wedge\A)\vee(\B\wedge\A)
  && \text{(Neutrality)}  \\[2mm]
    & \equiv (\A\wedge\neg\B)\vee(\A\wedge\B)
  && \text{(Commutativity)}  \\[2mm]
    & \equiv \A\wedge(\neg\B\vee\B)
  && \text{(Distributivity)}  \\[2mm]
    & \equiv \A\wedge\true
  && \text{(Negation)}  \\[2mm]
    & \equiv \A
  && \text{(Neutrality)}  \\[2mm] 
  \end{aligned}$
}% end of \resizebox

\end{itemize}

\end{document}

enter image description here

Oh, and when you have proved that ⊕ is associative, the proof above is

(AB) ⊕ B = A ⊕ (BB) = A ⊕ ⊥ = A

$(A\oplus B)\oplus B=A\oplus(B\oplus B)=A\oplus\false=A$
|improve this answer|||||
  • Thanks a lot, I am still pretty new to LaTex and I had some trouble getting it done the way I wanted to. It was hard to make the proof readable because the way I proofed the semantic equivalence is kind of messy. Maybe I will just do it the way you did but I am not sure if it's that easy to show that $\oplus$ is associative. I feel like the proof would be a bit shorter but it would just be as messy because the lines get really long. – Rard Jul 21 '16 at 22:30
  • @Rard One could try and split the larger formulas at their main connective – egreg Jul 21 '16 at 22:39
  • I have already tried that but I would have to do it for almost every line. The proof gets too long and it also just doesn't look nice in my opinion. In my version I have just removed the whitespace at the beginning so it barely fits but I am still not really satisfied yet. – Rard Jul 21 '16 at 22:58

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.