of ${{\rm Sel}}^{(2)}(J,{\mathbb Q})$. Step 2 can be broken down into three substeps:

-   For all $v\in S\setminus\{\infty\}$, compute $J_v = \delta_v(J({\mathbb Q}_v))$ and its image $G_v = {{\rm val}}_v(J_v)$ in $I_v$.

-   If $G_v = 0$ for some $v$, with $v$ odd, remove $v$ from $S$.

-   Compute $J_\infty$.

To complete step 2.3, we need the following lemma.

\[lem-Real\_dims\] With notation as above:

1.  $\dim J({\mathbb R})/2J({\mathbb R}) = m_\infty-1 - g.$

2.  $J_\infty$ is generated by $\{\delta_\infty(P) : P\in C({\mathbb R})\} $.

3.  The value of $\delta_\infty(P-\infty)$ only depends on the connected component of $C({\mathbb R})$ containing $P$.

Next, for step 3, we see that if we let $$G = \prod_{v\in S\setminus\{ \infty \}} G_v \subseteq I(L)/I(L)^2,$$ then the group $\{\xi\in H : {{\rm val}}(\xi)\in G\}$ contains ${{\rm Sel}}^{(2)}({\mathbb Q},J)$. In fact, the larger group $\widetilde{H} = \{\xi\in L^\times/(L^\times)^2 :  {{\rm val}}(\xi)\in G \}$ also contains the 2-Selmer group and we can compute its basis using the following two steps.

-   Find a basis of $V = \ker({{\rm val}}\colon L^\times/(L^\times)^2 \to I(L)/I(L)^2)$.

-   Enlarge this basis to get a basis of $\widetilde{H} = {{\rm val}}^{-1}(G)$.

With notation as above, Stoll deduces an upper bound and a formula for 