Solution (source code)

= Solution

At a point $p$, write $W=T_pL$ and take the <orthogonal complement> with respect to the <Riemannian metric> $g$. The <compatible triple> identity gives
$$
g(Ju,v)=\omega(u,v).
$$
If $L$ is a <Lagrangian submanifold>, then $\omega(u,v)=0$ for $u,v\in W$, so $JW\subset W^\perp$. Both have dimension $\frac12\dim M$, hence equality.

Conversely, if $JW=W^\perp$, equality of dimensions gives $\dim W=\frac12\dim M$, and $g(Ju,v)=0$ for $u,v\in W$ gives $\omega|_W=0$. Therefore
$$
\boxed{L\text{ is Lagrangian}\iff J(T_pL)=(T_pL)^\perp\text{ for every }p.}
$$
A positive-definite <inner product> has $W\cap W^\perp=\{0\}$. Hence $W\cap JW=\{0\}$, proving that \b[every <Lagrangian submanifold> is a <totally real submanifold> for a <compatible almost complex structure>].