Move sorry extraction to a separate command #263

Closed
opened 2025-08-01 11:55:39 -07:00 by aniva · 1 comment
Owner

The problem with the existing frontend.refactor command is that it produces source code nobody wants to read, and it relies on the delaborator, which is in a permanent whack-a-mole situation. Preliminary trials on PutnamBench shows that about 1 in 5 data points fail to roundtrip.

Given the distinct nature of search target extraction, we should have a command to turn sorrys directly into a search target with multiple mvars. For example, given the mystery example here:

def f : Nat -> Nat := sorry
theorem mystery_p : p f := sorry

We produce a target of the type

|- { f : Nat -> Nat // p f }

If this is the type of mvar ?root, then we can easily extract f and mystery from ?root.val and ?root.p.

The problem with the existing `frontend.refactor `command is that it produces source code nobody wants to read, and it relies on the delaborator, which is in a permanent whack-a-mole situation. Preliminary trials on PutnamBench shows that about 1 in 5 data points fail to roundtrip. Given the distinct nature of search target extraction, we should have a command to turn `sorry`s directly into a search target with multiple mvars. For example, given the mystery example here: ``` def f : Nat -> Nat := sorry theorem mystery_p : p f := sorry ``` We produce a target of the type ``` |- { f : Nat -> Nat // p f } ``` If this is the type of mvar `?root`, then we can easily extract `f` and `mystery` from `?root.val` and `?root.p`.
aniva added this to the v0.3.6 milestone 2025-08-01 11:55:39 -07:00
aniva self-assigned this 2025-08-01 11:55:39 -07:00
Author
Owner

When this feature is more stabilized, we should disable the sorry collection function in frontend.process.

When this feature is more stabilized, we should disable the `sorry` collection function in `frontend.process`.
aniva closed this issue 2025-08-04 10:38:52 -07:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference: aniva/Pantograph#263
No description provided.