Please check my answer below...I am newbie in these subjects...
The point of Edna's Jones question is about "locally", no ?
As Pete L.Clark points out in http://
www.math.uga.edu/~pete/CasselsLemma.pdfa number n can be "locally" (in Qp) represented but not integrally represented....read some examples in Clark's paper
The ZZ field is forced in
DiagonalQuadraticForm() first argument to specify integer quadratic forms (with integer coefficients).
It doesn't matter if you use ZZ or python int for locally_represented_number() argument (+1 : previous answer).
You have Gauss's theorem for representing number n different of 4^k(8l+7) by the form x^2 + y^2 + z^2 with x,y,z in Q
and 42 is represented by it, so it is represented by the equivalent form x^2 + (2y)^2 + (2z)^2.
That's why function locally_represented returns true ... while obviously no integers x,y,z can be set to have x^2 + 4y^2 + 4z^2 = 42
Dominique