I am a bit confused about Wald's identity. In https://inst.eecs.berkeley.edu/~ee126/fa17/wald.pdf and https://math.dartmouth.edu/~pw/math100w13/hein.pdf it says that the stopping time, $N$, is dependent on $X_1, \ldots, X_N$, which are IID, but independent of $X_{n+1}, \ldots,$.
However, in https://en.wikipedia.org/wiki/Wald%27s_equation#Basic_version, it states "$N$ be a nonnegative integer-value random variable that is INDEPENDENT of the sequence $(X_n)_{n \in \mathbb{N}}$".
Now I'm not clear on what $(X_n)_{n \in \mathbb{N}}$ actually means, but it seems to be implying that $N$ is independent of $X_1, \ldots, X_N$, which would contradict the first two links. Could someon explain?
Arg sorry, In my last comment I should have written $\mathbf{1}\{N \le n\}$ the first time as in the Berkeley notes (but it is $\mathbf{1}\{N \ge n\}$ for condition (2)), sorry for the confusion.
In any case, here is why a stopping time
satisfies condition (2) on the Wikipedia page
By the definition of a stopping time, $\mathbf{1}\{N \le n-1\}$ is a function of $X_1 ,\ldots, X_{n-1}$ and is independent of $X_n, X_{n+1}, \ldots$. Since $\mathbf{1}\{N \ge n\} = 1 - \mathbf{1}\{N \le n-1\}$, this random variable is also independent of $X_n, X_{n+1}, \ldots$. Thus (2) holds for this $n$.