Which curves have infinitely many rational points 
Question: Assuming finiteness of the Tate-Shafarevich group, is there an algorithm to determine whether a curve $C$ defined over a number field $K$ has infinitely many $K$-rational points?

I believe that this is (a) true and (b) sufficiently important that it has been carefully explained somewhere, but I don't know a reference. Any help from the MO community would be very much appreciated! 
P.S. To make the question precise, $C$ is specified, say, by its function field (a simple extension of $K(x)$), and all abelian varieties over all number fields have finite Sha. (And if the algorithm takes $10^{10}$ years for C: y=3x+1 over the rationals, I don't care.)
 A: Dear Tim: 
How  right you are to worry about computing the Jacobian of a genus one curve! Years ago, in the midst of many discussions with Bill McCallum, Alex Perlis, Nick Shepherd-Barron, and John Tate, I convinced myself this could be done, and it was eventually written up in Alex's Arizona thesis:
http://math.arizona.edu/~aprl/publications/dissertation/
Unfortunately, my own argument had many waves of the hand, and I didn't actually read the final product. But hopefully, it's all worked out. Alex really was a pretty careful guy, with substantial computational saavy.
Possibly, you might also enjoy this unpublished note of mine:
http://www.ucl.ac.uk/~ucahmki/jockusch.pdf
where these issues are discussed somewhat informally.
Added: I only read the comments above just now. I'm not entirely sure that the algorithm described in Perlis' thesis is any more efficient than what Pete suggests.  Let me know if it turns out to be so.
A: Isn't this explained for elliptic curves in Silverman, Arithmetic of Elliptic Curves, p. 305?
A: I believe the following is an algorithm, albeit a horrible one.
First, as the OP surely knows, it comes down entirely to curves of genus one.  Indeed, if the genus is at least $2$ then by Faltings' Theorem there are only finitely many $K$-rational points, whereas if the genus is zero, there are infinitely many rational points iff the curve is isomorphic over $K$ to the projective line iff a certain Hilbert symbol vanishes.  This is all very well understood.
Step 1: If for an elliptic curve $E_{/K}$ the group $Sha(K,E)$ is finite, then there is an algorithm to compute the Mordell-Weil group $E(K)$.  
Indeed, it's enough to know that there exists some prime number $p$ such that $Sha(K,E)[p] = 0$.  Then the weak Mordell-Weil group $E(K)/pE(K)$ is isomorphic to the $p$-Selmer group, which is known to be (in principle!) effectively computable.  Since the torsion subgroup is well-known to be effectively computable, knowing $E(K)/pE(K)$ gives us the Mordell-Weil rank, and if you know the rank then by enough searching you can find a basis for the free part of the Mordell-Weil group.
[Added: You don't actually need to know an explicit value of such a prime number $p$.  You can compute the $p$-Selmer group for any value of $p$ you want and you can set up a program that given infinite time will compute $E(K)/pE(K)$.  By running these programs on enough primes simultaneously, in finite time you will find a prime $p$ such that $E(K)/pE(K) = \operatorname{Sel}(K,E)[p]$.]
Step 2: Suppose that $C_{/K}$ is a genus one curve over $K$.  One may effectively decide (Hensel's Lemma, Weil bounds...) whether or not $C$ has points over every completion of $K$.  If not, then certainly $C(K)$ is empty and hence finite.
Step 3: Next compute the Mordell-Weil group of the Jacobian elliptic curve of $C$ using Step 1.  If this group is finite, then $C(K)$ is finite -- possibly empty.
Step 4: Suppose that $C$ has points everywhere locally and the Jacobian $E$ has positive rank.  Then $C$ represents an element of $Sha(K,E)[n]$ for some $n \in \mathbb{Z}$.  Since we can effectively compute the weak Mordell-Weil and Selmer groups of $E$, we can compute $Sha(K,E)[n]$.  If it happens to be trivial then $C$ is necessarily isomorphic to $E$ so has infinitely many rational points.
Step 5: Finally, suppose that $Sha(K,E)[n]$ is nontrivial.  Thus the question is whether $C$ represents a nontrivial element of this group.  But one can compute defining systems of equations for each of the curves $C_i$ representing the elements of this group (I am pretty sure, anyway; if this is the sticking point, let me know and I'll think about it more).  Now one can do the following ridiculous thing: search for an isomorphism between $C$ and $C_i$ by trying all possible maps.  We know that $C$ is isomorphic to one of these curves -- possibly $C_1 = E$ -- so eventually we will find it!
[Added: the explicit geometric realization of elements of the $n$-Selmer group is discussed in this important paper.]
