sage -t --warn-long 5.0 --random-seed=253765283679809954490123971186451640485 src/sage/rings/function_field/drinfeld_modules/morphism.py
**********************************************************************
File "src/sage/rings/function_field/drinfeld_modules/morphism.py", line 539, in sage.rings.function_field.drinfeld_modules.morphism.?.__invert__
Failed example:
f = phi.hom(K.random_element())
Exception raised:
Traceback (most recent call last):
File "/usr/share/miniconda3/envs/sage/lib/python3.11/site-packages/sage/doctest/forker.py", line 715, in _run
self.compile_and_execute(example, compiler, test.globs)
File "/usr/share/miniconda3/envs/sage/lib/python3.11/site-packages/sage/doctest/forker.py", line 1136, in compile_and_execute
exec(compiled, globs)
File "<doctest sage.rings.function_field.drinfeld_modules.morphism.?.__invert__[5]>", line 1, in <module>
f = phi.hom(K.random_element())
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/share/miniconda3/envs/sage/lib/python3.11/site-packages/sage/rings/function_field/drinfeld_modules/drinfeld_module.py", line 2027, in hom
codomain = self.velu(x)
^^^^^^^^^^^^
File "/usr/share/miniconda3/envs/sage/lib/python3.11/site-packages/sage/rings/function_field/drinfeld_modules/drinfeld_module.py", line 1934, in velu
raise e
ValueError: the input does not define an isogeny
Additional Information
using this method, we can find a failing case
def foo():
Fq = GF(5)
A.<T> = Fq[]
K.<z> = Fq.extension(3)
while True:
coeffs = [z] + [K.random_element() for _ in range(10)]
phi = DrinfeldModule(A, coeffs)
r = K.random_element()
try:
f = phi.hom(r)
except:
print(coeffs)
print(type(r))
print(r)
break
Steps To Reproduce
Expected Behavior
All tests passed.
Actual Behavior
Additional Information
using this method, we can find a failing case
Environment
Checklist