Zulip Chat Archive

Stream: lean4

Topic: checking for `sorryAx` in elaborated terms


Siddhartha Gadgil (Jun 19 2022 at 10:05):

What is the best way to check whether a term obtained by elaboration has sorryAx in it? I am using Term.synthesizeSyntheticMVarsNoPostponing
Incidentally, this seems like a change in behaviour - in the past if I am correct exceptions were thrown in many cases where now sorry's are filled in.

Alexander Bentkamp (Jun 19 2022 at 10:27):

Maybe using Lean.Elab.Command.CollectAxioms.collect?

Siddhartha Gadgil (Jun 19 2022 at 10:40):

That seems to be for names. I have an expression generated by elabTerm.

Alexander Bentkamp (Jun 19 2022 at 10:59):

Oh, right. Of course one way would be to iterate through all subterms and check if they are sorryAx, but I guess your question is if the insertion of the sorry can be detected directly?

Alexander Bentkamp (Jun 19 2022 at 11:03):

Oh, there is also Expr.hasSyntheticSorry.


Last updated: Dec 20 2023 at 11:08 UTC