Latex \in and \Z both cause Undefined Control Sequence error
\in
is a math mode symbol, which requires math mode.
\Z
is just undefined. My guess is something like:
\documentclass{article}
\usepackage{mathtools}
\usepackage{amssymb}
\usepackage[margin=0.5in]{geometry}
\setlength{\parindent}{0em}
\setlength{\parskip}{1em}
\usepackage{dsfont}
\newcommand*{\Z}{\mathds{Z}}
\begin{document}
Ex. If $x$ is even, then $x^2$ is even.
Proof: Let $y \in \Z\colon x = 2y$
\end{document}
Or using \mathbb
:
\documentclass{article}
\usepackage{mathtools}
\usepackage{amssymb}
\usepackage[margin=0.5in]{geometry}
\setlength{\parindent}{0em}
\setlength{\parskip}{1em}
\newcommand*{\Z}{\mathbb{Z}}
\begin{document}
Ex. If $x$ is even, then $x^2$ is even.
Proof: Let $y \in \Z\colon x = 2y$
\end{document}
Also environment equation
is not intended for more than one equation. See documentation of package amsmath
. It provides many environments (align
, gather
, ...) for equation systems.
Is this what you wanted?
\documentclass{article}
\usepackage{mathtools}
\usepackage{amssymb}
\usepackage[margin=0.5in]{geometry}
\setlength{\parindent}{0em}
\setlength{\parskip}{1em}
\begin{document}
...
Ex. If $x$ is even, then $x^2$ is even.
Proof: Let $y\in Z : x = 2y$ (we know y exists from the definition of even). Then:
\begin{equation}
\begin{aligned}
x^2 &= (2y)^2\\
\Leftrightarrow x^2 &= 4y^2\\
\Leftrightarrow x^2 &= 2(2y^2)
\end{aligned}
\end{equation}
$(2y^2)$ is an Integer (because Integers are closed under multiplication), so $x^2$ is Even.
\end{document}