Bill Allombert on Thu, 19 Jan 2006 19:12:26 +0100

```On Wed, Jan 18, 2006 at 09:28:59PM +0100, Bill Allombert wrote:
> On Wed, Jan 18, 2006 at 03:36:14PM +0000, Prof. J. E. Cremona wrote:
> > (1) As Bill has reported, although ellsearch() allows one to take from
> > the database all elliptic curves with a given conductor, it is
> > inefficient to do this in a loop, say from N=N1 to N=N2, since each call
> > to ellsearch() causes the entire relevant database file to be read in.
> >
> > I suggest adding a function of the form
> >
> > forell(E,N1,N2, seq ) which would execute seq for all elliptic curves E
> > in the database with N1 <= cond(E) <= N2;  which would only read each
> > file once.
> >
> > That's my first wish-list suggestion (of 2006).
>
> Here a patch that do that.
>
> The issue I see is that there is no easy way to get the conductor from
>
> In particular there are no easy ways to rewrite src/test/in/ellglobalred
> in term of forell.

One solution would be to change forell to loop on conductors instead
of curves, more precisely in forell(E,N1,N2, seq ), E would be set to
a vector [cond, curve1, curve2,...,curven] where cond is the conductor
and curve1,...,curven is the set of curves of conductor cond.
We could call it forellcond(E, N1, N2, seq).

This imply the user will have to write an embedded loop to process each
curves, unless they are only interested in the numbers of curves by
conductors.

src/test/in/ellglobalred could then be rewritten in term of forellcond:

check(L)=
{ local(e);
N = L[1];
for(i=2,#L,
e = L[i][2];
M = ellglobalred( ellinit(e, 1) )[1];
if (N != M, print(e," bad for N = ",N))
);
}
forellcond(L,0,9999,check(L))

Opinions ?

Cheers,
Bill.

```