how to use overbrace and underbrace when their arguments include alignment symbol

You can insert \phantom content to align \wedge:

enter image description here

\documentclass{article}

\usepackage{amsmath}

\begin{document}

\begin{align*}
  & \Omega_v := \bigl\{ (a, \sigma) \mid
    \overbrace{a \in A \wedge b \in B \wedge x(a, b) = v}^{\alpha} \\
  & \phantom{\Omega_v := \bigl\{ (a, \sigma) \mid a \in A} % for alignment with \wedge
    \wedge \underbrace{(\forall \sigma' \in B) [x(a, \sigma')!
      \neq v \rightarrow ( \sigma' \in \Sigma_{\mathrm{hib}}
      \vee b \in \Sigma_{\mathrm{for}})]}_{\beta}
  \bigr\}
\end{align*}

\end{document}

I don't think you need to align the two \wedge symbols: a multline is better.

\documentclass{article}

\usepackage{mathtools}

\begin{document}

\begin{multline*}
\label{eq:elig}
\Omega_{v} := \{(a,\sigma)\mid
  \overbrace{a \in A \wedge b \in B \wedge x(a,b)=v}^{\alpha}\\
  \wedge \underbrace{(\forall \sigma' \in B)[x(a,\sigma')!
     \neq v \rightarrow ( \sigma' \in \Sigma_{\mathrm{hib}}
     \vee b \in \Sigma_{\mathrm{for}})]}_{\beta}
\,\}
\end{multline*}

\end{document}

enter image description here


In case you have reasons to keep the alignment symbols (like here), there is an alternative based on tikz:

\documentclass{article}
\usepackage{mathtools}
\usepackage{tikz}
\usetikzlibrary{matrix,decorations.pathreplacing,calc}
% from https://tex.stackexchange.com/questions/339526/confusion-over-use-of-tikzmark
\newcommand{\tikzmark}[1]{\tikz[overlay,remember picture] \node (#1) {};}
\begin{document}

\begin{equation*}
\label{eq:elig}
\begin{split}
\Omega_{v} := \{(a,\sigma)|\tikzmark{a}a \in A &\wedge b \in B \wedge
x(a,b)=v\tikzmark{v}\\ 
&\wedge \tikzmark{lb}(\forall \sigma' \in B)[x(a,\sigma')! \neq v \rightarrow
( \sigma' \in \Sigma_{\text{hib}} \vee b \in \Sigma_{\text{for}})\tikzmark{rb}]\}
\end{split}
\end{equation*}
\tikz[remember picture, overlay,decoration={brace}]{%
\draw[decorate,transform canvas={xshift=0em,yshift=0.75em},thick] (a.north) -- (v.north) node[above=3pt,midway] {$\alpha$};
\draw[decorate,transform canvas={xshift=0em,yshift=-0.5em},thick] (rb.south) -- (lb.south) node[below=3pt,midway] {$\beta$};}
\end{document}

enter image description here

Here you can control the distance of the brace, its thickness etc. Whether this is an advantage or disadvantage is a matter of taste.

Tags:

Amsmath