leanprover / lean4

Lean 4 programming language and theorem prover
https://lean-lang.org
Apache License 2.0
4.75k stars 428 forks source link

feat: allow limiting the number of binders in delabConstWithSignature #6092

Open eric-wieser opened 2 weeks ago

eric-wieser commented 2 weeks ago

Read this section before submitting


This PR allows restricting the number of binders to place before the colon when using delabConstWithSignature.

This allows extract_goal in mathlib to (somewhat) respect the currently-reverted variables.

leanprover-community-bot commented 2 weeks ago

Mathlib CI status (docs):

kmill commented 1 week ago

I might suggest that extract_goals could wrap the target type in some metadata instead. That should block delabConstWithSignature, since it looks for exact forallE's.

eric-wieser commented 1 week ago

Indeed, I have an alternate patch which does just that :).