How to remove top margin above bigcup

I want to remove the margin above \bigcup symbol :

\begin{displaymath}
\prod_{i\in I} X_i \bydef \left\{\left. x\in\left( \bigcup_{i\in I} X_i \right)^I \right\vert  \: \forall i\in I, x(i)\in X_i \right\}
\end{displaymath}


I don't know how to proceed ? Thank for help :)

• there is no margin, it is just that the () are vertically centred on the math axis. use \bigl( not \left(, – David Carlisle Mar 12 '17 at 18:17
• It doesn't change anything :( – Phoenix Mar 12 '17 at 18:21
• welcome to TeX.SE! please, provide code for your equation, the best as small, complete document. – Zarko Mar 12 '17 at 18:22
• @Phoenix yes it would, see the posted answers. – David Carlisle Mar 12 '17 at 20:02

I wouldn't autosize any of the "fence" symbols. Instead, I'd use \Big and \bigg sizing directives. Observe that TeX automatically (and correctly) inserts some whitespace around \biggm\vert; this doesn't happen if one writes \middle\vert (or \right\vert).

\documentclass{article}
\begin{document}
$\prod_{i\in I} X_i = \biggl\{ x\in\Bigl(\bigcup_{i\in I} X_i \Bigr)^{\!I} \biggm\vert \forall i\in I, x(i)\in X_i \biggr\}$
\end{document}


is this better?

considering David Carlisle comment you can rewrite your equation into:

$\prod_{i\in I} X_i = \left\{ x\in\biggl(\ \bigcup_{i\in I} X_i \biggr)^I \middle\vert \: \forall i\in I, x(i)\in X_i \right\}$

• There is some margin as \bigcup_{i\in I}^{ "something" } :/ – Phoenix Mar 12 '17 at 18:38
• ups, I don't know :-(. I overlooked this nonses in OP code. corrected. – Zarko Mar 12 '17 at 18:38