As Kevin suggested, the fact that different defining polynomials are chosen
is an artifact of the algorithm.  Perhaps one could add a keyword argument
to the newforms method that had it call polredabs on the field?  Polredabs
can be expensive in larger degree, so there should be an option to disable
the computation of the standard form and just use the provided one.
David

On Tue, Jul 14, 2020 at 1:39 AM ethanyi...@gmail.com <
ethanyisaper...@gmail.com> wrote:

> I've provided some more information to this post. Could someone please let
> me know whether this behavior is intended, or a bug?
>
> I believe the different q-expansions are equivalent - they seem to just be
> generated by equivalent number fields with different defining polynomials.
> I confirmed this by running pari's polredabs function. I still find it
> quite odd that different polynomials would be used when run multiple times
> - is this intended? I tried poking through the library code, but couldn't
> find a cause.
>
> *Example:*
>
> sage: eps = kronecker_character(364)
>
> ....: M = ModularForms(eps)
>
> ....: S = M.cuspidal_subspace()
>
> ....: New = S.newforms('a')
>
> ....:
>
> sage: New[0]
>
> q + (-1/7*a0^3 - 5/7*a0)*q^2 + 2*q^4 + O(q^6)
>
> sage: New[0].hecke_eigenvalue_field()
>
> Number Field in a0 with defining polynomial x^4 + 12*x^2 + 49
>
> *Running in a different session:*
>
> sage: eps = kronecker_character(364)
>
> ....: M = ModularForms(eps)
>
> ....: S = M.cuspidal_subspace()
>
> ....: New = S.newforms('a')
>
> ....:
> sage: New[0]
>
> q + (-1/33*a0^3 + 7/33*a0)*q^2 + 2*q^4 + O(q^6)
>
> sage: New[0].hecke_eigenvalue_field()
>
> Number Field in a0 with defining polynomial x^4 + 4*x^2 + 121
>
> sage: pari(New[0].hecke_eigenvalue_field().polynomial()).polredabs()
>
> x^4 + 12*x^2 + 49
>
>
>
>
> On Friday, August 30, 2019 at 10:44:11 PM UTC-7 ethanyi...@gmail.com
> wrote:
>
>> Calculating newforms of a cuspidal subspace gives different answers on
>> different runs.
>>
>> I did not (and don't know how to) check whether the newforms are
>> equivalent (and if they aren't, this would be a much more serious bug),
>> but, regardless, this type of calculation should definitely be
>> deterministic.
>>
>> *Steps to reproduce:*
>>
>> eps = kronecker_character(105)
>>
>> M2 = ModularForms(eps)
>>
>> S2 = M2.cuspidal_subspace()
>>
>> print(S2.newforms('a'))
>>
>>
>> Running it multiple times, one gets a variety of q-expansions for the
>> newforms. Here I have listed 4 that I have received in output.
>>
>>
>> [q + (-1/10*a0^3 + 3/10*a0^2 + 2/5*a0 - 3/5)*q^2 + (-1/10*a0^3 +
>> 3/10*a0^2 - 3/5*a0 - 3/5)*q^3 + q^4 + (a0 - 1)*q^5 + O(q^6),
>>
>>  q - 1/2*a1*q^3 - 2*q^4 + (-1/24*a1^3 - 1/3*a1)*q^5 + O(q^6),
>>
>>  q + (-1/10*a2^3 + 3/10*a2^2 + 2/5*a2 - 3/5)*q^2 + (1/10*a2^3 - 3/10*a2^2
>> + 3/5*a2 + 3/5)*q^3 + q^4 + (-a2 + 1)*q^5 + O(q^6)]
>>
>>
>> [q + (-1/22*a0^3 - 3/11*a0^2 - 1/2*a0 - 3/11)*q^2 + (1/44*a0^3 +
>> 3/22*a0^2 + 3/4*a0 + 3/22)*q^3 + q^4 + (-3/44*a0^3 - 9/22*a0^2 - 5/4*a0 -
>> 31/22)*q^5 + O(q^6),
>>
>> q - 1/2*a1*q^3 - 2*q^4 + (-1/24*a1^3 - 1/3*a1)*q^5 + O(q^6),
>>
>> q + (-1/22*a2^3 - 3/11*a2^2 - 1/2*a2 - 3/11)*q^2 + (-1/44*a2^3 -
>> 3/22*a2^2 - 3/4*a2 - 3/22)*q^3 + q^4 + (3/44*a2^3 + 9/22*a2^2 + 5/4*a2 +
>> 31/22)*q^5 + O(q^6)]
>>
>>
>> [q + (-1/10*a0^3 - 3/10*a0^2 + 2/5*a0 + 3/5)*q^2 + (1/10*a0^3 + 3/10*a0^2
>> + 3/5*a0 - 3/5)*q^3 + q^4 + (-1/5*a0^3 - 3/5*a0^2 - 1/5*a0 + 1/5)*q^5 +
>> O(q^6),
>>
>> q - 1/2*a1*q^3 - 2*q^4 + (-1/24*a1^3 - 1/3*a1)*q^5 + O(q^6),
>>
>> q + (-1/22*a2^3 - 3/11*a2^2 - 1/2*a2 - 3/11)*q^2 + (-1/44*a2^3 -
>> 3/22*a2^2 - 3/4*a2 - 3/22)*q^3 + q^4 + (3/44*a2^3 + 9/22*a2^2 + 5/4*a2 +
>> 31/22)*q^5 + O(q^6)]
>>
>>
>> [q + (-1/22*a0^3 + 3/11*a0^2 - 1/2*a0 + 3/11)*q^2 + (-1/44*a0^3 +
>> 3/22*a0^2 - 3/4*a0 + 3/22)*q^3 + q^4 + (-1/44*a0^3 + 3/22*a0^2 + 1/4*a0 -
>> 19/22)*q^5 + O(q^6),
>>
>> q - a1*q^3 - 2*q^4 + (-1/3*a1^3 - 2/3*a1)*q^5 + O(q^6),
>>
>> q + (-1/10*a2^3 - 3/10*a2^2 + 2/5*a2 + 3/5)*q^2 + (-1/10*a2^3 - 3/10*a2^2
>> - 3/5*a2 + 3/5)*q^3 + q^4 + (1/5*a2^3 + 3/5*a2^2 + 1/5*a2 - 1/5)*q^5 +
>> O(q^6)]
>>
>>
>> Version: 8.7
>> OS: macOS High Sierra 10.13.6, 64 Bit
>>
> --
> You received this message because you are subscribed to the Google Groups
> "sage-devel" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to sage-devel+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/sage-devel/ce116caa-d33a-4b6a-b275-b9a47681ba86n%40googlegroups.com
> <https://groups.google.com/d/msgid/sage-devel/ce116caa-d33a-4b6a-b275-b9a47681ba86n%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>

-- 
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-devel+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sage-devel/CAChs6_m_L0yec8us0U8OKxc4Sk6iVTD0UmQSSW%3DFm0hGK1bULA%40mail.gmail.com.

Reply via email to