Skip to content

Implement relative Frobenius for Drinfeld modules #40432

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 24 commits into
base: develop
Choose a base branch
from

Conversation

xcaruso
Copy link
Contributor

@xcaruso xcaruso commented Jul 17, 2025

This PR implements the relative Frobenius for Drinfeld modules.

📝 Checklist

  • The title is concise and informative.
  • The description explains in detail what this PR is about.
  • I have linked a relevant issue or discussion.
  • I have created tests covering the changes.
  • I have updated the documentation and checked the documentation preview.

⌛ Dependencies

#40430

@kryzar kryzar self-requested a review July 17, 2025 15:12
Copy link

github-actions bot commented Aug 4, 2025

Documentation preview for this PR (built with commit d315182; changes) is ready! 🎉
This preview will update shortly after each push to this PR.

Copy link
Contributor

@kryzar kryzar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Two minor changes and then we'll be good.

@xcaruso
Copy link
Contributor Author

xcaruso commented Aug 12, 2025

I applied your suggestions.
And also merge drinfeld_tau in this ticket for compatibility.

@kryzar
Copy link
Contributor

kryzar commented Aug 12, 2025

It's really tedious and frustrating going through each build or test fail individually, just to inevitably note that the problem comes either from internal machinery or a contribution that was not caught. I really hope the maintainers do something about that.

PR approved.

@vbraun
Copy link
Member

vbraun commented Aug 13, 2025

Why are you deleting conftest.py?

@xcaruso
Copy link
Contributor Author

xcaruso commented Aug 13, 2025

Why are you deleting conftest.py?

Sorry. It always disappear by itself, I don't know why.

@user202729
Copy link
Contributor

PDF build is failing here


2025-08-15T10:05:22.7217333Z [sagemath_doc_pdf-none] [spkg-install] latexmk -pdf -dvi- -ps-  'drinfeld_modules.tex'
2025-08-15T10:05:22.7217448Z [sagemath_doc_pdf-none] [spkg-install] Rc files read:
2025-08-15T10:05:22.7217561Z [sagemath_doc_pdf-none] [spkg-install]   /etc/LatexMk
2025-08-15T10:05:22.7217672Z [sagemath_doc_pdf-none] [spkg-install]   latexmkrc
2025-08-15T10:05:22.7217923Z [sagemath_doc_pdf-none] [spkg-install] Latexmk: This is Latexmk, John Collins, 31 Jan. 2024. Version 4.83.
2025-08-15T10:05:22.7218198Z [sagemath_doc_pdf-none] [spkg-install] No existing .aux file, so I'll make a simple one, and require run of *latex.
2025-08-15T10:05:22.7218372Z [sagemath_doc_pdf-none] [spkg-install] Latexmk: applying rule 'pdflatex'...
2025-08-15T10:05:22.7218539Z [sagemath_doc_pdf-none] [spkg-install] Rule 'pdflatex':  Reasons for rerun
2025-08-15T10:05:22.7218661Z [sagemath_doc_pdf-none] [spkg-install] Category 'other':
2025-08-15T10:05:22.7218881Z [sagemath_doc_pdf-none] [spkg-install]   Rerun of 'pdflatex' forced or previously required:
2025-08-15T10:05:22.7219045Z [sagemath_doc_pdf-none] [spkg-install]     Reason or flag: 'Initial setup'
2025-08-15T10:05:22.7219133Z [sagemath_doc_pdf-none] [spkg-install] 
2025-08-15T10:05:22.7219247Z [sagemath_doc_pdf-none] [spkg-install] ------------
2025-08-15T10:05:22.7219407Z [sagemath_doc_pdf-none] [spkg-install] Run number 1 of rule 'pdflatex'
2025-08-15T10:05:22.7219513Z [sagemath_doc_pdf-none] [spkg-install] ------------
2025-08-15T10:05:22.7219627Z [sagemath_doc_pdf-none] [spkg-install] ------------
2025-08-15T10:05:22.7219988Z [sagemath_doc_pdf-none] [spkg-install] Running 'lualatex --file-line-error --interaction=batchmode  -recorder  "drinfeld_modules.tex"'
2025-08-15T10:05:22.7220095Z [sagemath_doc_pdf-none] [spkg-install] ------------
2025-08-15T10:05:22.7220336Z [sagemath_doc_pdf-none] [spkg-install] This is LuaHBTeX, Version 1.17.0 (TeX Live 2023/Debian) 
2025-08-15T10:05:22.7220513Z [sagemath_doc_pdf-none] [spkg-install]  restricted system commands enabled.
2025-08-15T10:05:22.7220856Z [sagemath_doc_pdf-none] [spkg-install] Latexmk: Missing input file 'drinfeld_modules.toc' (or dependence on it) from following:
2025-08-15T10:05:22.7221013Z [sagemath_doc_pdf-none] [spkg-install]   No file drinfeld_modules.toc.
2025-08-15T10:05:22.7221455Z [sagemath_doc_pdf-none] [spkg-install] Latexmk: Missing input file 'drinfeld_modules.ind' (or dependence on it) from following:
2025-08-15T10:05:22.7221613Z [sagemath_doc_pdf-none] [spkg-install]   No file drinfeld_modules.ind.
2025-08-15T10:05:22.7221874Z [sagemath_doc_pdf-none] [spkg-install] Latexmk: ====Undefined refs and citations with line #s in .tex file:
2025-08-15T10:05:22.7222360Z [sagemath_doc_pdf-none] [spkg-install]   Reference `sage/categories/drinfeld_modules:module-sage.categories.drinfeld_modules' on page 67 undefined on input line 5258
2025-08-15T10:05:22.7223257Z [sagemath_doc_pdf-none] [spkg-install]   Reference `sage/rings/function_field/drinfeld_modules/action:module-sage.rings.function_field.drinfeld_modules.action' on page 67 undefined on input line 5261
2025-08-15T10:05:22.7223974Z [sagemath_doc_pdf-none] [spkg-install]   Reference `sage/rings/function_field/drinfeld_modules/charzero_drinfeld_module:module-sage.rings.function_field.drinfeld_modules.charzero_drinfeld_module' on page 67 undefined on input line 5262
2025-08-15T10:05:22.7224614Z [sagemath_doc_pdf-none] [spkg-install]   Reference `sage/rings/function_field/drinfeld_modules/drinfeld_module:module-sage.rings.function_field.drinfeld_modules.drinfeld_module' on page 67 undefined on input line 5263
2025-08-15T10:05:22.7225289Z [sagemath_doc_pdf-none] [spkg-install]   Reference `sage/rings/function_field/drinfeld_modules/finite_drinfeld_module:module-sage.rings.function_field.drinfeld_modules.finite_drinfeld_module' on page 67 undefined on input line 5264
2025-08-15T10:05:22.7225997Z [sagemath_doc_pdf-none] [spkg-install]   Reference `sage/rings/function_field/drinfeld_modules/homset:module-sage.rings.function_field.drinfeld_modules.homset' on page 67 undefined on input line 5265
2025-08-15T10:05:22.7227089Z [sagemath_doc_pdf-none] [spkg-install]   Reference `sage/rings/function_field/drinfeld_modules/morphism:module-sage.rings.function_field.drinfeld_modules.morphism' on page 67 undefined on input line 5266
2025-08-15T10:05:22.7227549Z [sagemath_doc_pdf-none] [spkg-install] Latexmk: Sometimes, the -f option can be used to get latexmk
2025-08-15T10:05:22.7227873Z [sagemath_doc_pdf-none] [spkg-install]   to try to force complete processing.
2025-08-15T10:05:22.7228334Z [sagemath_doc_pdf-none] [spkg-install]   But normally, you will need to correct the file(s) that caused the
2025-08-15T10:05:22.7228620Z [sagemath_doc_pdf-none] [spkg-install]   error, and then rerun latexmk.
2025-08-15T10:05:22.7229095Z [sagemath_doc_pdf-none] [spkg-install]   In some cases, it is best to clean out generated files before rerunning
2025-08-15T10:05:22.7229303Z [sagemath_doc_pdf-none] [spkg-install]   latexmk after you've corrected the files.
2025-08-15T10:05:22.7229509Z [sagemath_doc_pdf-none] [spkg-install] Latexmk: Getting log file 'drinfeld_modules.log'
2025-08-15T10:05:22.7229696Z [sagemath_doc_pdf-none] [spkg-install] Latexmk: Examining 'drinfeld_modules.fls'
2025-08-15T10:05:22.7229874Z [sagemath_doc_pdf-none] [spkg-install] Latexmk: Examining 'drinfeld_modules.log'
2025-08-15T10:05:22.7230103Z [sagemath_doc_pdf-none] [spkg-install] Latexmk: Index file 'drinfeld_modules.idx' was written
2025-08-15T10:05:22.7230258Z [sagemath_doc_pdf-none] [spkg-install] Latexmk: References changed.
2025-08-15T10:05:22.7230403Z [sagemath_doc_pdf-none] [spkg-install] Latexmk: References changed.
2025-08-15T10:05:22.7230543Z [sagemath_doc_pdf-none] [spkg-install] Latexmk: References changed.
2025-08-15T10:05:22.7230772Z [sagemath_doc_pdf-none] [spkg-install] Latexmk: Log file says output to 'drinfeld_modules.pdf'
2025-08-15T10:05:22.7230990Z [sagemath_doc_pdf-none] [spkg-install] Latexmk: Summary of warnings from last run of *latex:
2025-08-15T10:05:22.7231166Z [sagemath_doc_pdf-none] [spkg-install]   Latex failed to resolve 7 reference(s)
2025-08-15T10:05:22.7231374Z [sagemath_doc_pdf-none] [spkg-install] Latexmk: Errors, so I did not complete making targets
2025-08-15T10:05:22.7231604Z [sagemath_doc_pdf-none] [spkg-install] Collected error summary (may duplicate other messages):
2025-08-15T10:05:22.7231961Z [sagemath_doc_pdf-none] [spkg-install]   pdflatex: Command for 'pdflatex' gave return code 1
2025-08-15T10:05:22.7232216Z [sagemath_doc_pdf-none] [spkg-install]       Refer to 'drinfeld_modules.log' and/or above output for details
2025-08-15T10:05:22.7232311Z [sagemath_doc_pdf-none] [spkg-install] 
2025-08-15T10:05:22.7232526Z [sagemath_doc_pdf-none] [spkg-install] make[4]: *** [Makefile:30: drinfeld_modules.pdf] Error 12
2025-08-15T10:05:22.7233156Z [sagemath_doc_pdf-none] [spkg-install] make[4]: Leaving directory '/sage/local/share/doc/sage/latex/en/reference/drinfeld_modules'
2025-08-15T10:05:22.7233332Z [sagemath_doc_pdf-none] [spkg-install] Error building the documentation.
2025-08-15T10:05:22.7233495Z [sagemath_doc_pdf-none] [spkg-install] Traceback (most recent call last):
2025-08-15T10:05:22.7233713Z [sagemath_doc_pdf-none] [spkg-install]   File "<frozen runpy>", line 198, in _run_module_as_main
2025-08-15T10:05:22.7233911Z [sagemath_doc_pdf-none] [spkg-install]   File "<frozen runpy>", line 88, in _run_code
2025-08-15T10:05:22.7234160Z [sagemath_doc_pdf-none] [spkg-install]   File "/sage/src/sage_docbuild/__main__.py", line 552, in <module>
2025-08-15T10:05:22.7234290Z [sagemath_doc_pdf-none] [spkg-install]     sys.exit(main())
2025-08-15T10:05:22.7234413Z [sagemath_doc_pdf-none] [spkg-install]              ^^^^^^
2025-08-15T10:05:22.7234651Z [sagemath_doc_pdf-none] [spkg-install]   File "/sage/src/sage_docbuild/__main__.py", line 548, in main
2025-08-15T10:05:22.7234761Z [sagemath_doc_pdf-none] [spkg-install]     build()
2025-08-15T10:05:22.7234993Z [sagemath_doc_pdf-none] [spkg-install]   File "/sage/src/sage_docbuild/builders.py", line 273, in pdf
2025-08-15T10:05:22.7235223Z [sagemath_doc_pdf-none] [spkg-install]     raise RuntimeError(error_message % (command, tex_dir))
2025-08-15T10:05:22.7235610Z [sagemath_doc_pdf-none] [spkg-install] RuntimeError: failed to run $MAKE all-pdf in /sage/local/share/doc/sage/latex/en/reference/drinfeld_modules

(suggestion: click through build-doc-pdf, click the cog wheel, click "View raw logs", search for error.)

or you can also build the PDF locally with

sage --docbuild reference/drinfeld_modules pdf

@user202729
Copy link
Contributor

It's really tedious and frustrating going through each build or test fail individually, just to inevitably note that the problem comes either from internal machinery or a contribution that was not caught. I really hope the maintainers do something about that.

PR approved.

I'm frustrated too. I tried to implement #39539 as a workaround, but it isn't working and I don't know why.

For now, I mostly just look at the meson one and if say at most 2 of them are failing then it's probably just flaky tests.

This doesn't work with build-doc or build-doc-pdf however, there's only one run of it. Doesn't help that you need to search through a huge log file for the error.

Why are you deleting conftest.py?

Sorry. It always disappear by itself, I don't know why.

Strange. After #39363 there should be no issue with it.

Unless… the pull request itself is responsible for the disappearing file.

As a workaround (I of course encourage proper fix, but we don't have enough people to look at all these bugs, unfortunately) you can

git update-index --assume-unchanged conftest.py

@user202729
Copy link
Contributor

Yes, documentation build failure is legitimate.

I suggest checking out the documentation preview (see message by github-actions above) to see if it renders correctly. At least I see two places where it's wrong

image

The easiest way to check is to click the "changes is ready" button; however this currently give some false positive, but not so much that it becomes useless.

#40530

@user202729
Copy link
Contributor

user202729 commented Aug 16, 2025

actually the established macro is \newcommand{\GF}[1]{\Bold{F}_{#1}}. (personally I prefer mathbb, but just for consistency with other parts of the code base)

(this macro is available for you to use)

@xcaruso
Copy link
Contributor Author

xcaruso commented Aug 16, 2025

Actually, we already use mathbb everywhere in the drinfeld_modules directory.
However, I can switch to GF if you think it's better.

@user202729
Copy link
Contributor

I mean, if people decide mathbb is better than mathbf, it's trivial to change the definition of the GF command at one place.

… but whatever, let's get this in. (if build-doc-pdf is successful and no missing character error)

@kryzar
Copy link
Contributor

kryzar commented Aug 16, 2025

Thanks very much @user202729 for the help and many tips. It's nice.

@xcaruso
Copy link
Contributor Author

xcaruso commented Aug 20, 2025

Looks like the failures are again not related to the PR.
I give back a positive review. Hope this PR will be merged soon :-)

@kryzar
Copy link
Contributor

kryzar commented Aug 20, 2025

Hope this PR will be merged soon :-)

Me too!!!

vbraun pushed a commit to vbraun/sage that referenced this pull request Aug 21, 2025
sagemathgh-40432: Implement relative Frobenius for Drinfeld modules
    
This PR implements the relative Frobenius for Drinfeld modules.

### 📝 Checklist

<!-- Put an `x` in all the boxes that apply. -->

- [x] The title is concise and informative.
- [x] The description explains in detail what this PR is about.
- [ ] I have linked a relevant issue or discussion.
- [x] I have created tests covering the changes.
- [x] I have updated the documentation and checked the documentation
preview.

### ⌛ Dependencies

sagemath#40430
    
URL: sagemath#40432
Reported by: Xavier Caruso
Reviewer(s): Antoine Leudière, Volker Braun, Xavier Caruso
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants