Skip to content

Add a with_eta checker flag, and trusted implementation in safeconversion#1260

Open
mattam82 wants to merge 1 commit into
MetaRocq:mainfrom
mattam82:unsafe-check-with-eta
Open

Add a with_eta checker flag, and trusted implementation in safeconversion#1260
mattam82 wants to merge 1 commit into
MetaRocq:mainfrom
mattam82:unsafe-check-with-eta

Conversation

@mattam82

Copy link
Copy Markdown
Member

Eta-conversion is done the same way as in Rocq's conversion checker by expanding G |- fun x : A => f ~= v (with v weak-head irreducible) to G, x : A |- f ~= v x (if I did not make a mistake ;). A new MetaRocq UnsafeCheck foo command is available in the plugin, setting the checker_flag. This adds an axiom saying with_eta = true -> False as a shorcut to fill all the proofs. The default checker flags used for proofs everywhere have with_eta = false of course.
I'd like to have this mainly for performance experiments, allowing to run on larger developments (as long as they don't use template-poly... for now). @TheoWinterhalter can you check this is the right way to inject eta in the algorithm?

@TheoWinterhalter TheoWinterhalter left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I like the idea very much!

Comment thread safechecker-plugin/src/g_metarocq_safechecker.mlg
Comment thread safechecker/theories/PCUICSafeConversion.v Outdated
…sion

Eta-conversion is done the same way as in Rocq's conversion checker by expanding
`G |- fun x : A => f ~= v` (with v weak-head irreducible) to
`G, x : A |- f ~= v x` (if I did not make a mistake ;). A new `MetaRocq
UnsafeCheck foo` command is available in the plugin, setting the checker_flag.
This adds an axiom saying `with_eta = true -> False` as a shorcut to fill all
the proofs. The default checker flags used for proofs everywhere have `with_eta
= false` of course.
@mattam82 mattam82 force-pushed the unsafe-check-with-eta branch from 38f4b1f to 4e129f7 Compare March 20, 2026 19:21
@MevenBertrand

Copy link
Copy Markdown
Member

Looks cool! What's the one goal which is "clearly false"?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants