Extremely cool class idea! Very nice.

A method which yields a smooth model (if known) of lowest degree
would be nice too, if there was a natural one to choose from. For
example, if the genus was one or 2 this might be known.

+++++++++++++=

William Stein wrote:
> > David Joyner wrote:
>> >> BTW, I'm happy to document it properly if you want the
>> >> code. I guess you want this as a method in the Gamma0
>> >> class in congroup?
> >
> > I don't know where it should go.  Probably we should define
> > a ModularCurve type and it should go there, right?
> >
> >     sage: X = ModularCurve(Gamma0(15))
> >     sage: X.genus()
> >     1
> >     sage: X = X0(389)       # shorthand
> >     sage: X.genus()
> >     389
> >
> > And then there's a temptation to do more.
> >     sage: X.canonical_embedding()
> >     ...
> >     sage: X.modular_polynomial()
> >
> >     sage: z = X(1 + 5*I)     # point defined by point in upper half
> > plane.
> >     sage: E = EllipticCurve("389A")
> >     sage: phi = E.modular_parametrization(X)
> >     sage: phi(z)             # point on E over C
> >     sage: sum(...)           # construct a Heegner point.
> >
> > William