% =========================================================================================
% Macros for JMLR submission NPHard article
% =========================================================================================
% theorems 
%\theoremstyle{definition}
\newcommand{\BlackBox}{\rule{1.5ex}{1.5ex}}  % end of proof
\newenvironment{proof}{\par\noindent{\bf Proof\ }}{\hfill\BlackBox\\[2mm]}
\newtheorem{dfn}{Definition}
\newtheorem{thm}{Theorem}
\newtheorem{prp}{Proposition}		% continuous numbering for sub-theorem thingies
\newtheorem{cor}[prp]{Corollary}
\newtheorem{lem}[prp]{Lemma}
\newtheorem{exm}{Example}

% symbols
\newcommand{\indep}{\perp\!\!\!\perp}
\newcommand{\nindep}{\perp\!\!\!\perp\!\!\!\!\!\!\!\diagup\;}
\newcommand{\noncaus}{\Rightarrow\!\!\!\!\!\!\!\!\diagdown\;\,}
% cpag edges
\newcommand{\tet}{\! \relbar \! \relbar \!}
\newcommand{\tec}{\! \relbar \!\!\! \relbar \!\! \circ \,}
\newcommand{\tea}{\! \relbar \!\! \rightarrow \!}
\newcommand{\tem}{\! \relbar \!\!\! \relbar \!\! \ast \,}
\newcommand{\cet}{\, \circ \!\! \relbar \!\!\! \relbar \!}
\newcommand{\cec}{\, \circ \!\! \relbar \!\! \circ \,}
\newcommand{\cea}{\, \circ \!\! \rightarrow \!}
\newcommand{\cem}{\, \circ \!\! \relbar \!\! \ast \,}
\newcommand{\aet}{\! \leftarrow \!\! \relbar \!}
\newcommand{\aec}{\! \leftarrow \!\! \circ \,}
\newcommand{\aea}{\! \leftarrow \!\!\! \rightarrow \!}
\newcommand{\aem}{\! \leftarrow \!\! \ast \,}
\newcommand{\met}{\,\ast \!\! \relbar \!\!\! \relbar \!}
\newcommand{\mec}{\,\ast \!\! \relbar \!\! \circ \,}
\newcommand{\mea}{\,\ast \!\!\rightarrow \!}
\newcommand{\mem}{\,\ast \!\! \relbar \!\! \ast \,}
\newcommand{\noedge}{\quad\;\;\,}
%\newcommand{\tempty}{~~~~~~~~~}
\newcommand{\tempty}{\quad\quad\quad\;}
% two-cycle symbol
\newcommand{\cyc}{\leftrightarrows}

\newcommand{\unvarc}{\,\,|| \!\!\!\!\!\!\! \longrightarrow}

% code for under-dashed virtual v-structure:
% \mbox{$A \! \relbar \!$ \dashuline{$\!\!\rightarrow \! B \! \leftarrow \!\!$} $ \! \relbar \! C$}


% formatted characters
\newcommand{\bfA}{\mathbf{A}}
\newcommand{\bfB}{\mathbf{B}}
\newcommand{\bfC}{\mathbf{C}}
\newcommand{\bfD}{\mathbf{D}}
\newcommand{\bfE}{\mathbf{E}}
\newcommand{\bfH}{\mathbf{H}}
\newcommand{\bfI}{\mathbf{I}}
\newcommand{\bfL}{\mathbf{L}}
\newcommand{\bfM}{\mathbf{M}}
\newcommand{\bfO}{\mathbf{O}}
\newcommand{\bfP}{\mathbf{P}}
\newcommand{\bfQ}{\mathbf{Q}}
\newcommand{\bfR}{\mathbf{R}}
\newcommand{\bfS}{\mathbf{S}}
\newcommand{\bfT}{\mathbf{T}}
\newcommand{\bfU}{\mathbf{U}}
\newcommand{\bfV}{\mathbf{V}}
\newcommand{\bfW}{\mathbf{W}}
\newcommand{\bfX}{\mathbf{X}}
\newcommand{\bfY}{\mathbf{Y}}
\newcommand{\bfZ}{\mathbf{Z}}
\newcommand{\bfu}{\mathbf{u}}
\newcommand{\bfv}{\mathbf{v}}
\newcommand{\bfw}{\mathbf{w}}
\newcommand{\bfx}{\mathbf{x}}
\newcommand{\bfy}{\mathbf{y}}
\newcommand{\bfz}{\mathbf{z}}
% greek
\newcommand{\bfpi}{\boldsymbol{\pi}}
\newcommand{\bfphi}{\mathbf{\phi}}
\newcommand{\bfmu}{\boldsymbol{\mu}}
\newcommand{\bfeta}{\boldsymbol{\eta}}
\newcommand{\bfepsilon}{\boldsymbol{\epsilon}}
\newcommand{\bftheta}{\boldsymbol{\theta}}
\newcommand{\bftau}{\boldsymbol{\tau}}
\newcommand{\bfLambda}{\boldsymbol{\Lambda}}
\newcommand{\bfOmega}{\boldsymbol{\Omega}}
\newcommand{\bfSigma}{\boldsymbol{\Sigma}}
\newcommand{\bfTheta}{\boldsymbol{\Theta}}
% swirlies
\newcommand{\B}{\mathcal{B}}
\newcommand{\C}{\mathcal{C}}
\newcommand{\D}{\mathcal{D}}
\newcommand{\I}{\mathcal{I}}
\newcommand{\G}{\mathcal{G}}
\newcommand{\cL}{\mathcal{L}}
\newcommand{\M}{\mathcal{M}}
\newcommand{\cO}{\mathcal{O}}
\newcommand{\cP}{\mathcal{P}}
\newcommand{\Q}{\mathcal{Q}}
\newcommand{\R}{\mathcal{R}}
\newcommand{\cS}{\mathcal{S}}
\newcommand{\skel}{\cS}
% fractals
\newcommand{\mfC}{\mathfrak{C}}
\newcommand{\mfD}{\mathfrak{D}}
\newcommand{\mfI}{\mathfrak{I}}
\newcommand{\mfL}{\mathfrak{L}}
\newcommand{\mfT}{\mathfrak{T}}

% sets
\newcommand{\AAxy}{AA(\{X,Y\})}
\newcommand{\bfAA}[1]{AA({#1})}
\newcommand{\bfHIE}[1]{HIE({#1})}
%\newcommand{\PDSEP}[1]{\textbf{Possible-D-SEP}({#1})}
\newcommand{\PDSEP}{\textbf{Possible-D-SEP}}
\newcommand{\bfWw}{\mathbf{W}_{\setminus W}}
\newcommand{\bfZz}{\mathbf{Z}_{\setminus Z}}
\newcommand{\bfZW}{\mathbf{Z}_{\mathbf{W}}}
\newcommand{\bfQZ}{\overline{\mathbf{Q}}}
\newcommand{\bfWZ}{\overline{\mathbf{W}}}


% macros
\newcommand{\ci}[3]{{#1}\!\indep\!{#2}\,|\,{#3}}
\newcommand{\cd}[3]{{#1}\!\nindep\!{#2}\,|\,{#3}}
\newcommand{\sci}[3]{[{#1}\!\indep\!{#2}\,|\,{#3}]}
\newcommand{\scd}[3]{[{#1}\!\nindep\!{#2}\,|\,{#3}]}
\newcommand{\mci}[3]{{#1}\!\indep\!{#2}\,|\,[{#3}]}
\newcommand{\mcii}[4]{{#1}\!\indep\!{#2}\,|\,{#3} \cup [{#4}]}
\newcommand{\mcd}[3]{{#1}\!\nindep\!{#2}\,|\,[{#3}]}
\newcommand{\mcdd}[4]{{#1}\!\nindep\!{#2}\,|\,{#3} \cup [{#4}]}
% already defined?
%\newcommand{\path}[1]{\langle{#1}\rangle}
\newcommand{\seq}[1]{\langle{#1}\rangle}
%
\newcommand{\nonadj}[2]{{#1} \!\relbar\!\!\!\!\!\diagdown\!\!\!\!\!\diagup\!\!\!\!\! \relbar \! {#2}}
% variants for explicit DAG/MAG/prob-separation
\newcommand{\indepg}{\perp\!\!\!\perp_\G\!}
%\newcommand{\nindepg}{\perp\!\!\!\perp\!\!\!\!\!\!\!\diagup\;_{\!\!\G}\,}
\newcommand{\nindepg}{\perp\!\!\!\perp\!\!\!\!\!\diagup\;_{\!\!\!\!\!\G}\,}
\newcommand{\indepm}{\perp\!\!\!\perp_\M\!}
\newcommand{\nindepm}{\perp\!\!\!\perp\!\!\!\!\!\!\!\diagup\;_{\!\!\M}\,}
\newcommand{\indepp}{\perp\!\!\!\perp_p\!}
\newcommand{\nindepp}{\perp\!\!\!\perp\!\!\!\!\!\!\!\diagup\;_{\!\!p}\,}
% explicit DAG d-separation% 
\newcommand{\cig}[3]{{#1}\indep_\G\!{#2}\,|\,{#3}}
\newcommand{\cdg}[3]{{#1}\nindep_{\!\!\G}\,{#2}\,|\,{#3}}
\newcommand{\mcig}[3]{{#1}\indep_\G\!{#2}\,|\,[{#3}]}
\newcommand{\mciig}[4]{{#1}\indep_\G\!{#2}\,|\,{#3} \cup [{#4}]}
\newcommand{\mcdg}[3]{{#1}\nindep_{\!\!\G}\,{#2}\,|\,[{#3}]}
%\newcommand{\mcddg}[4]{{#1}\nindep_{\!\!\G}\,{#2}\,|\,{#3} \cup [{#4}]}
\newcommand{\mcddg}[4]{{#1}\nindepg\,{#2}\,|\,{#3} \cup [{#4}]}
% explicit MAG m-separation
\newcommand{\cim}[3]{{#1}\indep_\M\!{#2}\,|\,{#3}}
\newcommand{\cdm}[3]{{#1}\nindep_{\!\!\M}\,{#2}\,|\,{#3}}
\newcommand{\mcim}[3]{{#1}\indep_\M\!{#2}\,|\,[{#3}]}
\newcommand{\mcdm}[4]{{#1}\nindep_{\!\!\M}\,{#2}\,|\,{#3} \cup [{#4}]}
% explicit probabilistic separation
\newcommand{\cip}[3]{{#1}\indep_p\!{#2}\,|\,{#3}}
\newcommand{\cdp}[3]{{#1}\nindep_{\!\!p}\,{#2}\,|\,{#3}}
\newcommand{\mcip}[3]{{#1}\indep_p\!{#2}\,|\,[{#3}]}
\newcommand{\mcdp}[4]{{#1}\nindep_{\!\!p}\,{#2}\,|\,{#3} \cup [{#4}]}%% explicit DAG with edge X-Y removed d-separation% 
\newcommand{\cigv}[3]{{#1}\indep_{\G\Vert}\!{#2}\,|\,{#3}}
\newcommand{\cdgv}[3]{{#1}\nindep_{\!\!\G\Vert}\,{#2}\,|\,{#3}}
% other
\newcommand{\dd}{\; \mathrm{d}}			% integral ... dx
%\DeclareMathOperator*{\argmax}{arg\,max}
\newcommand{\tr}{\; \mathrm{tr}}			% trace
\newcommand{\pa}{\; \mathrm{pa}}			% parents
% distrib
\newcommand{\var}{\mathrm{var}}
\newcommand{\cov}{\mathrm{cov}}
\newcommand{\gn}{\mathcal{N}}

% edit/comment environment 
%\definecolor{blue}{rgb}{0,0,1}   % (not needed)
%\definecolor{orange}{rgb}{1,0.5,0.1}
%\definecolor{brightblue}{rgb}{0.92,0.92,1}
%\definecolor{brightgrey}{rgb}{0.96,0.96,1}
%\definecolor{green}{rgb}{0.2,1.0,0.2}
%\definecolor{red}{rgb}{1,0,0}

\newcommand{\Gabriel}[1]{{\color{red}#1}}
\newcommand{\Tom}[1]{{\color{blue}#1}}
