# Second order logic >[!info] Definition >$\mathcal{L}^{2}$ is the extension of first order logic by adding variables for $n$-ary relation symbols, and the quantifiers $\forall X, \exists X$ for each such variable. >The semantics are given by: >$\mathcal{M} \models \forall X \varphi \iff \text { for all } X \subset M \ (M, X) \models \varphi$ $\mathcal{M} \models \exists X \varphi \iff \text { for some } X \subset M \ (M, X) \models \varphi$ ## $\mathcal{L}^{\mathrm{W}}$ - Weak second order logic >[!info] Definition > Weak second order logic, denoted $\mathcal{L}^{\mathrm{W}}$ or $\mathcal{L}^{w2}$, has the same syntax as $\mathcal{L}^{2}$, but the semantics are given by: >$\mathcal{M} \models \forall X \varphi \iff \text { for all \bf{finite} } X \subset M \ (M, X) \models \varphi$ $\mathcal{M} \models \exists X \varphi \iff \text { for some \bf{finite} } X \subset M \ (M, X) \models \varphi$