1

This is my code, in \begin{align*} why am I getting an error saying I'm missing a $?

\begin{document}
%%
\begin{proof*}
\begin{align*}

1.; & (p \land q \rightarrow r, u \rightarrow \lnot r, u \land q) &&\aside{Premise}\ 2.; & p \land q \rightarrow r &&\aside{Premise} \ 3.; & \equiv u \rightarrow \lnot r &&\aside{Premise} \ 4.; & \equiv u \land q &&\aside{Premise} \ 5.; & \equiv u &&\aside{Specialization:3} \ 6.; & \equiv \land r &&\aside{Modus Pones:2,4} \ 7.; & \equiv \lnot (p \land q) &&\aside{Modus Tollens:1,5} \ 8.; & \equiv \lnot p \lor \lnot q &&\aside{De Morgan's: ^} \ 9.; & \equiv q &&\aside{Specialization:3}\ 10.; & \equiv \lnot \lnot q &&\aside{Double Negation:8}\ 11.; & \equiv \lnot p &&\aside{Elimination:7,9}\

\end{align} \end{proof}

%% \end{document}

Leucippus
  • 1,636
Harper
  • 11
  • Please extend your code fragment to small but complete document begining with \documentclass and ending with \end{document}. What is \aside – Zarko Oct 06 '20 at 03:59
  • aside apparently just adds a comment, im doing it for a logic proof. what is code fragment? – Harper Oct 06 '20 at 04:03
  • Please, rather extend your code fragment to complete small document, which reproduce your error. If I put your align* into standard document container and define \aside command, I don't get any error ... – Zarko Oct 06 '20 at 04:09
  • 2
    Remove the blank lines. – Mico Oct 06 '20 at 04:13
  • thank you so much!!! how do i start a standard document container and how do i define aside? – Harper Oct 06 '20 at 04:16

2 Answers2

1

Welcome to TeX.SE!

To long for a comment ...

Since you not provide MWE, the following is based on usual use of the proof environment (see Theorems). In it is considered @Mico comment (removed are blank lines in align environment):

\documentclass{article}
\usepackage{amsmath,amsthm}
\newcommand\aside[1]{\text{#1}}

\begin{document} \begin{proof} % <--- \begin{align} 1.\quad & (p \land q \to r, u \to \lnot r, u \land q) &&\aside{Premise}\ 2.\quad & p \land q \rightarrow r &&\aside{Premise} \ 3.\quad & \equiv u \rightarrow \lnot r &&\aside{Premise} \ 4.\quad & \equiv u \land q &&\aside{Premise} \ 5.\quad & \equiv u &&\aside{Specialization:3} \ 6.\quad & \equiv \land r &&\aside{Modus Pones:2,4} \ 7.\quad & \equiv \lnot (p \land q) &&\aside{Modus Tollens:1,5} \ 8.\quad & \equiv \lnot p \lor \lnot q &&\aside{De Morgan's: } \ 9.\quad & \equiv q &&\aside{Specialization:3}\ 10.\quad & \equiv \lnot \lnot q &&\aside{Double Negation:8}\ 11.\quad & \equiv \lnot p &&\aside{Elimination:7,9} \qedhere \end{align}% \end{proof} % <--- \end{document}

enter image description here

It gives no errors! Where and how you define ˙proof*`?

Zarko
  • 296,517
0

For some reason, align environment cannot process empty lines. So remove the empty lines and it should compile fine

Masum
  • 1,009