I'm a little bit confused by the definition of a martingale. We say that a sequence of RV's is a martingale if:
$E[X_n|X_{n-1}]=X_{n-1}$.
I'm confused because it seems like the LHS should be just a number since we are taking an expectation while the RHS is a random variable, i.e., a function. How does it make sense grammatically to say that they are equal?