There are multiple symbols commonly used to represent "such that". ∍ \ backepsilon or ∋ \ni; ∣ \mid;:: For "therefore", I usually see ∴.

\mid, as it has the spacing of a binary relation. If you want it to resize, see “How to automatically resize the vertical bar in a set comprehension?”. Have a look at.

Use \middle only if there's a \left before it; we can check this using \ currentgrouptype (texdoc etex for more information): \documentclass{article}.

Mathematics is treated by LATEX completely differently from ordinary text. There are . mode and exited math mode at the $ after 'such that'.

Math character used outside of math mode: Another very common example of how this error can appear is from when a math mode character, such as an.