# Extra }, or forgotten $## Primary tabs # Extra }, or forgotten$

Forums:

WTF is wrong with this line?

$U_n:=\max{0,r\in\left{1,\dots,n\right}\|\mtext{ there exists }0\leq s_1<t_1<s_2<t_2<\dots<s_r<t_r\leq n\mtext{ such that for all }i\in\left{1,\dots,r\right}\colon X_{s_i}\leq a,X_{t_i}\geq b}$

### Re: Extra }, or forgotten $### Re: Extra }, or forgotten$

Good day.

The main problem seems to be with braces, which are special characters in LaTeX, and must be written as \{ and \} when e.g. delimiting sets.
What follows is a first-step correction, surely needing refining:

> $U_n:=\max{ max\{ > 0,r\in\left{ \left\{ > 1,\dots,n\right} \right\{ > \|\mtext{ there > exists } \|\exists > 0\leq s_1<t_1<s_2<t_2<\dots \ldots > <s_r<t_r\leq n\mtext{ such that for all }i n\mid\forall i > \in\left{ \left\{ > 1,\dots,r\right} \right\} > \colon > X_{s_i}\leq a,X_{t_i}\geq b}$

b\}\]

Best regards,

Silvio

### Re: Extra }, or forgotten \$

You want to escape [almost] all of the { and } with backslashes. Also, replace \mtext with \text. Not sure what \mtext is, but it's late and I know \text works.