Skip to content
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

Server Error when running frontend.process on mathlib4 #44

Open
sorgfresser opened this issue Nov 2, 2024 · 7 comments · May be fixed by #50
Open

Server Error when running frontend.process on mathlib4 #44

sorgfresser opened this issue Nov 2, 2024 · 7 comments · May be fixed by #50
Labels
bug Something isn't working help wanted Extra attention is needed pending-integration Upstream feature has implemented. Pending API Implementation

Comments

@sorgfresser
Copy link
Contributor

I successfully built mathlib4, started the PyPantograph server on it and ran tactic invocations on the file Mathlib/ModelTheory/Syntax.lean. This resulted in

  File "<...>/PyPantograph/pantograph/server.py", line 244, in tactic_invocations
    raise ServerError(result["desc"])
pantograph.server.ServerError: unknown constant 'term.pseudo.antiquot'

This is especially interesting because the term in question is not even mentioned in the whole file.

@lenianiva
Copy link
Owner

lenianiva commented Nov 3, 2024

What version of mathlib are you using?

Mathlib4 seem to have this issue internally: https://github.com/leanprover-community/mathlib4/blob/2e8dbf68904ffbccb7529f87a2207d6289e6a2e7/Mathlib/Data/Nat/Digits.lean#L812

@sorgfresser
Copy link
Contributor Author

My version is new enough to suffer from this, I'll try downgrading and report back!

@lenianiva
Copy link
Owner

My version is new enough to suffer from this, I'll try downgrading and report back!

Can you use the v4.12 tag of mathlib?

@sorgfresser
Copy link
Contributor Author

Facing the same error on tag v4.12 upon running frontend.process on file mathlib/Mathlib/ModelTheory/Syntax.lean

@lenianiva lenianiva added bug Something isn't working help wanted Extra attention is needed labels Dec 6, 2024
@lenianiva
Copy link
Owner

lenianiva commented Dec 10, 2024

Fixed in upstream: https://git.leni.sh/aniva/Pantograph/pulls/128. Will merge by the end of the week.

You can try running this in repl by

lake env ~/Projects/atp/Pantograph/.lake/build/bin/repl Mathlib < /tmp/target.jsonl

where target.jsonl is

frontend.process {"fileName": "Mathlib/ModelTheory/Syntax.lean", "invocations": true, "sorrys": false, "newConstants": false}

@lenianiva lenianiva added the pending-integration Upstream feature has implemented. Pending API Implementation label Dec 10, 2024
@lenianiva
Copy link
Owner

@lenianiva lenianiva linked a pull request Dec 11, 2024 that will close this issue
@sorgfresser
Copy link
Contributor Author

Awesome, thanks!

This PR helped me and others track down another bug in Lean 4: https://leanprover.zulipchat.com/#narrow/channel/270676-lean4/topic/What.20is.20.60term.2Epseudo.2Eantiquot.60.3F/near/487319979
I was wondering what exactly happened, interesting to see it is actually related to Lean.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working help wanted Extra attention is needed pending-integration Upstream feature has implemented. Pending API Implementation
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants