fix: avoid recursion in invariant side conditions - #611
Conversation
|
My hope was that we would be able to fix #557 by finding out what causes the recursion limit and then fixing the root cause instead of just reordering the tactics. |
9dadf14 to
e1f0569
Compare
that actually makes more sense, thanks for pointing out, anyway I think we can fix the root case by making nclose irreducible, it should avoid problematic unfolding now. Tested it locally with the initial tatic order, things are passing now |
|
Thanks for finding the root cause of this! I made a cleanup pass over the PR and used it as an opportunity to use |
|
Awesome! This also fixed a recursion error in #608 |
Description
trivialtriesapply_rfl, which treats⊆as a reflexive relation and checks whether its operands are definitionally equal. For a concrete namespace, that check unfoldednclosethroughPos.flattenandCoPset.suffixesRawuntil Lean reached its recursion limit.This marks
ncloseirreducible after its root computation theorem, keeping that implementation detail out of automatic definitional equality while preserving explicit unfolding withsimp [nclose]. The original side-condition tactic order remains unchanged.The tests cover the direct
apply_rflfallback and the completeiinvflow withofName `rnd.Fixes #557
Verification
cd Iris && lake build --wfail IrisTestcd Iris && lake build --wfailcd Iris && lake exe check-imports Iriscd Iris && lake exe dumpPortingDatacd IrisMath && lake build --wfailcd IrisMath && lake exe check-imports IrisMathNo stale entries.git diff --checkChecklist
authorssection of any appropriate files