paper-BagRelationalPDBsAreHard/macros.tex
2019-05-15 21:26:40 -04:00

373 lines
12 KiB
TeX

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% NOTATION
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
%SKETCH
%
\newcommand{\sketch}{\mathcal{S}}
\newcommand{\sketchCols}{B}
\newcommand{\sketchRows}{M}
\newcommand{\sketchHash}[1]{h_{#1}}
\newcommand{\sketchPolar}[1]{s_{#1}}
\newcommand{\polarFunc}{\sketchPolar(\vec{w})}
%
%TIDB
%
\newcommand{\pw}{W}
\newcommand{\numWorlds}{2^N}
\newcommand{\numTup}{N}
%\newcommand{\wIndicator}{v_t}
\newcommand{\wIndicator}[1]{v_{#1}}
\newcommand{\wVec}{\vec{w}}
\newcommand{\relation}{R}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% COMMENTS
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\newcommand{\BG}[1]{\todo[inline]{\textbf{Boris says:$\,$} #1}}
\newcommand{\SF}[1]{\todo[inline]{\textbf{Su says:$\,$} #1}}
\newcommand{\OK}[1]{\todo[inline]{\textbf{Oliver says:$\,$} #1}}
\newcommand{\AH}[1]{\todo[inline]{\textbf{Aaron says:$\,$} #1}}
\newcommand{\AR}[1]{\todo[inline]{\textbf{Atri says:$\,$} #1}}
%\newcommand{\comment}[1]{}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% DETAILED PROOFS
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\newbool{ShowDetailedProofs}
\newcommand{\detailedproof}[2]{\ifbool{ShowDetailedProofs}{
\begin{proof}
#2
\end{proof}
}{\noindent\textit{Proof Sketch:}#1\qed}\smallskip}
\newcommand{\ifnotdetailedproof}[1]{\ifbool{ShowDetailedProofs}{}{#1}}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% STRUCTURE
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\newcommand{\mypar}[1]{\smallskip\noindent\textbf{{#1}.}}
\newcommand{\bfcaption}[1]{\caption{\textbf{#1}}}
\newcommand{\trimfigurespacing}{\vspace*{-5mm}}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% THEOREM LIKE ENVIRONMENTS
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\DeclareMathAlphabet{\mathbbold}{U}{bbold}{m}{n}
\newtheorem{Theorem}{Theorem}[section]
\newtheorem{Definition}{Definition}
\newtheorem{Lemma}{Lemma}
\newtheorem{Proposition}{Proposition}
\newtheorem{Corollary}{Corollary}
\newtheorem{Example}{Example}
\newtheorem{Axiom}{Axiom}
\newcommand{\proofpara}[1]{\medskip\noindent\underline{{#1}:}}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% MATH UTILS
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\newcommand{\mathtext}[1]{\ensuremath{\,\text{#1}\,}}
\newcommand{\card}[1]{\vert{#1}\vert}
% allow for more bb math symbols:
\DeclareMathAlphabet{\mathbbold}{U}{bbold}{m}{n}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Rel model
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\newcommand{\schema}{\mathbf{D}}
\newcommand{\relschema}{\mathbf{R}}
\newcommand{\schemaOf}{\textsc{Sch}}
\newcommand{\arity}[1]{arity({#1})}
\newcommand{\db}{D}
\newcommand{\rel}{R}
\newcommand{\query}{Q}
\newcommand{\qClass}{\mathcal{C}}
% \newcommand{\uDom}{\mathcal{U}}
\newcommand{\tup}{t}
\newcommand{\multip}{n}
\newcommand{\aDom}{\mathbb{D}}
\newcommand{\aVal}{d}
\newcommand{\tupDom}{\textsc{TupDom}}
\newcommand{\tuple}[1]{\left<\;\textsf{\upshape #1}\;\right>}
\newcommand{\comprehension}[2]{\left\{\;#1\;|\;#2\;\right\}}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Algebra
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\newcommand{\selection}{\sigma}
\newcommand{\projection}{\pi}
\newcommand{\join}{\Join}
\newcommand{\union}{\cup}
\newcommand{\intersection}{\cap}
\newcommand{\rename}{\rho}
\newcommand{\aggregation}[2]{{}_{#1}\gamma_{#2}}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Query Languages and Classes
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\newcommand{\raPlus}{\mathcal{RA}^{+}}
\newcommand{\raFull}{\mathcal{RA}}
\newcommand{\raAgg}{\mathcal{RA}^{agg}}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% ABBREVIATIONS
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\newcommand{\abbrPDB}{PDB\xspace}
\newcommand{\abbrPDBs}{PDBs\xspace}
\newcommand{\abbrIDB}{IDB\xspace}
\newcommand{\abbrPQP}{PQP\xspace}
\newcommand{\abbrPQPs}{PQPs\xspace}
\newcommand{\abbrUQP}{UQP\xspace}
\newcommand{\abbrBGQP}{BGQP\xspace}
\newcommand{\abbrBGQPs}{BGQPs\xspace}
\newcommand{\abbrCAQP}{CAQP\xspace}
\newcommand{\abbrCAQPs}{CAQPs\xspace}
\newcommand{\abbrUADB}{UA-DB\xspace}
\newcommand{\abbrUADBs}{UA-DBs\xspace}
\newcommand{\abbrTI}{TI-DB\xspace}
\newcommand{\abbrTIs}{TI-DBs\xspace}
\newcommand{\abbrCoddTable}{Codd-table\xspace}
\newcommand{\abbrCoddTables}{Codd-tables\xspace}
\newcommand{\abbrVtable}{V-table\xspace}
\newcommand{\abbrVtables}{V-tables\xspace}
\newcommand{\abbrCtable}{C-table\xspace}
\newcommand{\abbrCtables}{C-tables\xspace}
\newcommand{\abbrPCtable}{PC-table\xspace}
\newcommand{\abbrPCtables}{PC-tables\xspace}
\newcommand{\abbrVCtable}{Virtual C-table\xspace}
\newcommand{\abbrVCtables}{Virtual C-tables\xspace}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% COMPLEXITY
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\newcommand{\ptime}{\texttt{PTIME}\xspace}
\newcommand{\npcomplete}{NP-complete\xspace}
\newcommand{\conpcomplete}{coNP-complete\xspace}
\newcommand{\conphard}{coNP-hard\xspace}
\newcommand{\sharpP}{\texttt{\#P}\xspace}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% UNCERTAINTY
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\newcommand{\cSet}{certain}
\newcommand{\pSet}{possible}
\newcommand{\cMult}{certainMult}
\newcommand{\pMult}{possibleMult}
\newcommand{\cMatches}{certainMatchMult}
\newcommand{\pMatches}{possibleMatchMult}
\newcommand{\pdb}{\mathcal{D}}
\newcommand{\bestG}[1]{BestGuess(#1)}
\newcommand{\uadb}{\db_{UA}}
\newcommand{\bgdb}{D_{bg}}
\newcommand{\prob}{P}
\newcommand{\probOf}[1]{\prob(#1)}
\newcommand{\pTupMult}[2]{\prob({#1}, \geq {#2})}
\newcommand{\rowsmr}{\mathcal{K}_{uncert}}
\newcommand{\tmatches}{\simeq}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% UNCERTAINTY LABELINGS
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\newcommand{\redL}[1]{\textcolor{red}{{#1}}}
\newcommand{\tcMarker}{T}
\newcommand{\tuMarker}{\textcolor{red}{F}}
\newcommand{\uMarker}[1]{\ensuremath{{#1}{}^{\tuMarker}}}
\newcommand{\cMarker}[1]{\ensuremath{{#1}{}^{\tcMarker}}}
\newcommand{\notHere}{\ensuremath{\bot}}
\newcommand{\uLabels}{\mathcal{U}}
\newcommand{\labelOf}{\textsc{label}}
\newcommand{\uDom}{{\aDom_{\uLabels}}}
\newcommand{\typeTI}{TI}
\newcommand{\typePC}{pc}
\newcommand{\TUL}{\mathcal{L}}
\newcommand{\TULDom}{\mathbb{L}}
\newcommand{\doTUL}{\textsf{label}}
\newcommand{\TULscheme}{\textsc{Lab}}
\newcommand{\TULschemeTI}{\TULscheme_{\abbrTI}}
\newcommand{\TULschemeCtable}{\TULscheme_{\abbrCtable}}
\newcommand{\TULtype}[1]{\mathcal{L}_{#1}}
\newcommand{\TULTI}{\TULtype{\typeTI}}
\newcommand{\TULC}{\TULtype{\typePC}}
\newcommand{\AUL}{\mathcal{L}_{A}}
\newcommand{\AULtype}[1]{\mathcal{L}_{#1}}
\newcommand{\aLabel}{l}
\newcommand{\lVal}{{d^{\aLabel}}}
\newcommand{\ldb}{\db_{\aLabel}}
\newcommand{\ltupDom}{\textsc{TupDom}_{\uLabels}}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% SEMIRINGS
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\newcommand{\semN}{\mathbb{N}}
\newcommand{\semB}{\mathbb{B}}
\newcommand{\semNX}{\mathbb{N}[X]}
\newcommand{\semK}{\mathcal{K}}
\newcommand{\onesymbol}{\mathbbold{1}}
\newcommand{\zerosymbol}{\mathbbold{0}}
\newcommand{\multsymb}{\otimes}
\newcommand{\addsymbol}{\oplus}
\newcommand{\addormultsymbol}{\bigcirc}
\newcommand{\monsymbol}{\ominus}
\newcommand{\kDom}{K}
\newcommand{\addK}{\addsymbol_{\semK}}
\newcommand{\multK}{\multsymb_{\semK}}
\newcommand{\genopK}{\odot_{\semK}}
\newcommand{\monK}{\monsymbol_{\semK}}
\newcommand{\oneK}{\onesymbol_{\semK}}
\newcommand{\zeroK}{\zerosymbol_{\semK}}
\newcommand{\addOf}[1]{\addsymbol_{#1}}
\newcommand{\multOf}[1]{\multsymb_{#1}}
\newcommand{\monOf}[1]{\monsymbol_{#1}}
\newcommand{\oneOf}[1]{\onesymbol_{#1}}
\newcommand{\zeroOf}[1]{\zerosymbol_{#1}}
\newcommand{\dbDomK}[1]{\mathcal{DB}_{#1}}
%%%%% natural order
\newcommand{\ordersymbol}{\preceq}
\newcommand{\geqsymbol}{\succeq}
\newcommand{\ordK}{\ordersymbol_{\semK}}
\newcommand{\gordK}{\geqsymbol_{\semK}}
\newcommand{\geqK}{\geqsymbol_{\semK}}
\newcommand{\ordOf}[1]{\ordersymbol_{#1}}
\newcommand{\aHom}{h}
%%%%% natural order lattice
\newcommand{\lub}{\sqcup}
\newcommand{\glb}{\sqcap}
\newcommand{\glbKof}[1]{\sqcap{#1}}
%\newcommand{\glbKof}[1]{\left(\bigsqcap_{k\in #1}k\right)}
\newcommand{\glbK}{\glbKof{\semK}}
\newcommand{\lubKof}[1]{\sqcup_{#1}}
%\newcommand{\lubKof}[1]{\left(\bigsqcup_{k\in #1}k\right)}
\newcommand{\lubK}{\lubKof{\semK}}
\newcommand{\LubK}{\sqcup_{\semK}}
\newcommand{\GlbK}{\sqcap_{\semK}}
\newcommand{\minK}{min_{\semK}}
\newcommand{\maxK}{max_{\semK}}
\newcommand{\minOf}[1]{min_{#1}}
\newcommand{\maxOf}[1]{max_{#1}}
\newcommand{\setK}{\vec k}
%%%%%Minima Worlds Semiring
\newcommand{\mwBool}[1]{\mathbb{B}_{#1}}
\newcommand{\mwIfElse}[1]{\mwBool{#1}?\mu_{#1}}
\newcommand{\muMult}{\otimes_{\mu}}
\newcommand{\boolMult}{\otimes_{\mathbb{B}}}
\newcommand{\zeroMW}{\zerosymbol_{mw}}
\newcommand{\oneMW}{\onesymbol_{mw}}
\newcommand{\mwAdd}{\addsymbol_{mw}}
\newcommand{\mwMult}{\multsymb_{mw}}
\newcommand{\hgood}{h_{good}}
%%%%% Sum of Products Proof
\newcommand{\productClauseMin}[1]{\sqcap_{\otimes}{#1}}
\newcommand{\productClauseWorlds}[1]{\productClauseMin{#1}_{worlds}}
%%%%% N-way direct product
\newcommand{\dpK}[2]{{#1}^{#2}}
\newcommand{\dpDom}[2]{{#1}^{#2}}
\newcommand{\doubleK}[1]{\dpK{#1}{2}}
\newcommand{\doubleDom}[1]{\dpDom{#1}{2}}
%%%%% UA-semiring
\newcommand{\uaName}{UA}
\newcommand{\uaK}[1]{{#1}_{\uaName}}
\newcommand{\uaDom}[1]{\kDom{#1_{\uaName}}}
\newcommand{\uaAdd}[1]{\addOf{\uaK{#1}}}
\newcommand{\uaMult}[1]{\multOf{\uaK{#1}}}
\newcommand{\uaZero}[1]{\zeroOf{\uaK{#1}}}
\newcommand{\uaOne}[1]{\oneOf{\uaK{#1}}}
\newcommand{\uae}[2]{[#1,#2]}
\newcommand{\uaN}{\uaK{\semN}}
\newcommand{\uanAdd}{\uaAdd{\semN}}
\newcommand{\uanMult}{\uaMult{\semN}}
%%%%% POSSIBLE WORLD SEMIRINGS
\newcommand{\pwIndicator}{W}
\newcommand{\pwDom}{W}
\newcommand{\pwkDom}{\kDom^{\pwDom}}
\newcommand{\pwK}{\semK_{\pwIndicator}}
\newcommand{\pwKof}[1]{{#1}_{\pwIndicator}}
\newcommand{\pwAdd}{{\addOf{\pwK}}}
\newcommand{\pwMult}{{\multOf{\pwK}}}
\newcommand{\pwZero}{{\zeroOf{\pwK}}}
\newcommand{\pwOne}{{\oneOf{\pwK}}}
\newcommand{\pwWorld}[1]{\textsc{pw}_{{#1}}}
\newcommand{\pwe}[1]{\vec{{#1}}}
\newcommand{\pwHaveCoMinima}[2]{#1 \stackrel{\sqcap}{\sim} #2}
\newcommand{\pwNotHaveCoMinima}[2]{#1 \not \stackrel{\sqcap}{\sim} #2}
\newcommand{\pwHaveGlobalMinima}[1]{\stackrel{\sqcap}{\sim} #1}
\newcommand{\pwNotHaveGlobalMinima}[1]{\not \stackrel{\sqcap}{\sim} #1}
\newcommand{\pwN}{\pwKof{\semN}}
\newcommand{\pwB}{\pwKof{\semB}}
\newcommand{\certainName}{\textsc{cert}}
\newcommand{\possibleName}{\textsc{poss}}
\newcommand{\uncertainName}{\textsc{uncert}}
\newcommand{\pwCertain}{{\certainName}_{\semK}}
\newcommand{\pwUncertain}{{\uncertainName}_{\semK}}
\newcommand{\pwPossible}{{\possibleName}_{\semK}}
\newcommand{\pwCertOf}[1]{{\certainName}_{#1}}
\newcommand{\pwUncertOf}[1]{{\uncertainName}_{#1}}
\newcommand{\pwPossOf}[1]{{\possibleName}_{#1}}
\newcommand{\pwCertainN}{{\certainName}_{\semN}}
\newcommand{\pwUncertainN}{{\uncertainName}_{\semN}}
\newcommand{\pwPossibleN}{{\possibleName}_{\semN}}
\newcommand{\pwCertainB}{{\certainName}_{\semB}}
\newcommand{\pwUncertainB}{{\uncertainName}_{\semB}}
\newcommand{\pwPossibleB}{{\possibleName}_{\semB}}
%%%% K-possible labeling
%\newcommand{\kpossLab}{{\semK}{-}{\Poss}}
%%%% UA-DBS
\newcommand{\uIndicator}{U}
\newcommand{\uK}{\ensuremath{\semK_{\uIndicator}}}
\newcommand{\uKDom}{\ensuremath{\kDom_{\uIndicator}}}
\newcommand{\lCert}{certain}
\newcommand{\Poss}{possible}
\newcommand{\uOfName}{uncert}
\newcommand{\uOf}[1]{h_{\uOfName}({#1})}
\newcommand{\cOfName}{cert}
\newcommand{\cOf}[1]{h_{\cOfName}({#1})}
\newcommand{\dOfName}{det}
\newcommand{\dOf}[1]{h_{\dOfName}({#1})}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% ENCODING
\newcommand{\bagEnc}{\textsc{Enc}}
\newcommand{\rewrN}{\textsf{uRewr}}
\newcommand{\uAttr}{U}
\DeclareMathSymbol{\mlq}{\mathord}{operators}{``}
\DeclareMathSymbol{\mrq}{\mathord}{operators}{`'}
%%% Local Variables:
%%% mode: latex
%%% TeX-master: "attrprov"
%%% End: