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

feat: partial_fixpoint #253

Open
wants to merge 26 commits into
base: main
Choose a base branch
from

Conversation

nomeata
Copy link
Collaborator

@nomeata nomeata commented Jan 16, 2025

The manual section to go with leanprover/lean4#6355.

@david-christiansen david-christiansen added the HTML available HTML has been generated for this PR label Jan 16, 2025
Comment on lines 51 to 63
let targetStx : TSyntax `term ←
forallTelescope ci.type fun _ concl => do
unless concl.isAppOfArity ``Lean.Order.monotone 5 do
throwError "Unexpecte conclusion of {name}"
let f := concl.appArg!
unless f.isLambda do
throwError "Unexpecte conclusion of {name}"
lambdaBoundedTelescope f 1 fun _ _call => do
-- Could not get this to work:
-- let _stx ← Lean.PrettyPrinter.delab call
-- `(Inline.code $(quote stx))
`(Inline.text "TODO")
-- pure (some stx)
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I dug my toes into the Manual.Meta realm, because I’d like to auto-generate a list of registered monotonicity lemmas. This worked fine, and I found how to pretty print the name of the lemma. But I’d also include some expressions that I want to calculate from the type. The above didn’t work, probably because of one level of quotation too little.

I guess I could pretty-print to a string and include that…

But can I also “delaborate” an Expr to something that I can put in Inline.code so that it’s highlighted and hovers work?

Copy link
Collaborator Author

@nomeata nomeata Jan 17, 2025

Choose a reason for hiding this comment

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

I also tried to use a table instead of a ul, but my attempt at 56b0219 also ran into my ignorance of how verso works. Maybe we can have a quick look together next week, during tea time or else.

@nomeata
Copy link
Collaborator Author

nomeata commented Jan 20, 2025

@nomeata nomeata marked this pull request as ready for review January 20, 2025 11:16
@nomeata
Copy link
Collaborator Author

nomeata commented Jan 20, 2025

Ok, marking this as ready for review for now, and will try to keep my hands away from it.

I’ll merge the feature to Lean4 master next, but presumably this PR should not enter main until the feature is in a pre-release? So there is no rush with getting this into shape.

I left some todo notes where my Verso-skills failed me, but none are critical, they are all just nice-to haves.

Copy link

Preview for this PR is ready! 🎉 (also as a proofreading version). built with commit 8478f38.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
HTML available HTML has been generated for this PR
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants