\ProvidesPackage{241}

% packages

\usepackage{amsfonts}
\usepackage{amssymb}
\usepackage{amsmath}
\usepackage{enumerate}
\usepackage{mathrsfs}
\usepackage{environ}

% page layout

\setlength{\parskip}{2ex plus 0.5ex minus 0.3ex}
\setlength{\oddsidemargin}{0.0in}
\setlength{\evensidemargin}{0.0in}
\setlength{\textwidth}{6.3in}
\setlength{\textheight}{8.5in}
\pagestyle{empty}

% macros

%% bb sets, etc
\newcommand{\NN}{\mathbb{N}}
\newcommand{\ZZ}{\mathbb{Z}}
\newcommand{\QQ}{\mathbb{Q}}
\newcommand{\RR}{\mathbb{R}}
\newcommand{\CC}{\mathbb{C}}
\newcommand{\TT}{\mathbb{T}}
\newcommand{\PP}{\mathbb{P}}

%% mathcal
\newcommand{\A}{\mathcal{A}}
\newcommand{\B}{\mathcal{B}}
\newcommand{\D}{\mathcal{D}}
\newcommand{\F}{\mathcal{F}}
\newcommand{\I}{\mathcal{I}}
\newcommand{\J}{\mathcal{J}}
\newcommand{\K}{\mathcal{K}}
\newcommand{\M}{\mathcal{M}}
\newcommand{\Q}{\mathcal{Q}}
\newcommand{\U}{\mathcal{U}}
\newcommand{\X}{\mathcal{X}}

%% mathscr
\newcommand{\SA}{\mathscr{A}}
\newcommand{\SB}{\mathscr{B}}
\newcommand{\SC}{\mathscr{C}}
\newcommand{\SD}{\mathscr{D}}
\newcommand{\SE}{\mathscr{E}}
\newcommand{\SH}{\mathscr{H}}
\newcommand{\SI}{\mathscr{I}}
\newcommand{\SJ}{\mathscr{J}}
\newcommand{\SK}{\mathscr{K}}
\newcommand{\SP}{\mathscr{P}}
\newcommand{\SQ}{\mathscr{Q}}
\newcommand{\SU}{\mathscr{U}}

%% shorthand
\newcommand{\liff}{\leftrightarrow}
\newcommand{\swap}{\leftrightarrow}
\newcommand{\meet}{\land}
\newcommand{\join}{\lor}
\newcommand{\rs}{\upharpoonright}
\newcommand{\sm}{\setminus}
\newcommand{\cat}{\smallfrown}
\newcommand{\vp}{\varphi}
\renewcommand{\sp}{\textrm{sp}}
\newcommand{\e}{\epsilon}
\newcommand{\ve}{\varepsilon}
\newcommand{\forces}{\Vdash}
\newcommand{\case}[2]{#1 & #2 \\}

\newtheorem{thm}{Theorem}
\newtheorem*{thm*}{Theorem}
\newtheorem{prop}{Proposition}
\newtheorem*{prop*}{Proposition}
\newtheorem{lemma}{Lemma}
\newtheorem*{lemma*}{Lemma}
\newtheorem{cor}{Corollary}
\newtheorem*{cor*}{Corollar}
\theoremstyle{definition}
\newtheorem{prob}{Problem}
\newtheorem*{prob*}{Problem}
\newtheorem{soln}{Solution}
\newtheorem*{soln*}{Solution}
\newtheorem{defn}{Definition}
\newtheorem*{defn*}{Definition}
\newtheorem{exc}{Exercise}
\newtheorem*{exc*}{Exercise}
\newtheorem{claim}{Claim}
\newtheorem*{claim*}{Claim}
\newtheorem{fact}{Fact}
\newtheorem*{fact*}{Fact}
\newtheorem{conj}{Conjecture}
\newtheorem*{conj*}{Conjecture}

\theoremstyle{remark}
\newtheorem{example}{Example}
\newtheorem*{example*}{Example}
\newtheorem{rmk}{Remark}
\newtheorem*{rmk*}{Remark}
\newtheorem{note}{Note}
\newtheorem*{note*}{Note}
\newtheorem*{question}{Question}

%% delimiters
\newcommand{\set}[2]{\left\{#1\mathrel{}\middle|\mathrel{}#2\right\}}
\newcommand{\pair}[2]{\left\langle #1, #2\right\rangle}
\newcommand{\seq}[2]{\left\langle #1\;|\; #2\right\rangle}
\newcommand{\brak}[2]{\left\langle #1\mathrel{},\mathrel{}#2\right\rangle}
\newcommand{\code}[1]{\left\langle #1 \right\rangle}
\newcommand{\ang}[1]{\left\langle #1 \right\rangle}
\newcommand{\norm}[1]{\left\lVert #1 \right\rVert}
\newcommand{\smat}[1]{\left(\begin{smallmatrix} #1 \end{smallmatrix}\right)}

%% operators
\DeclareMathOperator{\ran}{ran}
\DeclareMathOperator{\nul}{null}
\DeclareMathOperator{\nullity}{nullity}
\DeclareMathOperator{\dom}{dom}
\DeclareMathOperator{\diag}{diag}
\DeclareMathOperator{\supp}{supp}
\DeclareMathOperator{\id}{id}
\DeclareMathOperator{\ind}{ind}
\DeclareMathOperator{\cf}{cf}
\DeclareMathOperator{\cof}{cof}
\DeclareMathOperator{\Aut}{Aut}
\DeclareMathOperator{\rank}{rank}
\DeclareMathOperator{\lspan}{span}
\DeclareMathOperator{\col}{col}
\DeclareMathOperator{\row}{row}
\DeclareMathOperator{\sol}{sol}
\DeclareMathOperator{\sgn}{sgn}
\DeclareMathOperator{\perm}{perm}
\DeclareMathOperator{\Ad}{Ad}
\DeclareMathOperator{\spec}{spec}
\DeclareMathOperator{\GL}{GL}
\DeclareMathOperator{\tr}{tr}

% environments

\newenvironment{casedef}
{
  \left\{\begin{array}{ll} 
}
{
  \end{array}\right.
}

\makeatletter

\newcommand{\LinearSystems@SetupLets}{%
\let\col=&%
\let\+=+%
\let\-=-%
\let\===%
}
\newcommand{\LinearSystems@SetupCatcodes}{%
\catcode`\&=\active
\catcode`\+=\active
\catcode`\-=\active
\catcode`\==\active
}
\newcommand{\LinearSystems@Setup}{}
\begingroup
\LinearSystems@SetupCatcodes
\gdef\LinearSystems@Setup{%
\LinearSystems@SetupLets
\LinearSystems@SetupCatcodes
\newcommand&[1][0pt]{\col\hspace{##1}\col}%
\def+{\col\+{}{}\col}%
\def-{\col\-{}{}\col}%
\def={\col\={}{}\col}%
}
\endgroup

\NewEnviron{LinearSystems}[1]{\begin{alignat*}{#1}\BODY\end{alignat*}}
\let\LinearSystems@OriginalBegin\LinearSystems
\def\LinearSystems{\LinearSystems@Setup\LinearSystems@OriginalBegin}

\makeatother

