Compare commits

...

1 Commits

Author SHA1 Message Date
Leonardo de Moura
5e9ff8482b fix: assertion violations at grind checkInvariants
This PR fixes assertion violations when `checkInvariants` is enabled
in `grind`
2025-08-03 14:11:54 +02:00
2 changed files with 3 additions and 2 deletions

View File

@@ -354,6 +354,7 @@ where
-- We must swap the congruence root to ensure `isDiseq` and `getDiseqFor?` work properly
modify fun s => { s with congrTable := s.congrTable.insert { e := n.self } }
setENode n.self { n with congr := n.self }
setENode e { ( getENode e) with congr := n.self }
/-- Ensures collection of equations to be processed is empty. -/
private def resetNewFacts : GoalM Unit :=

View File

@@ -47,8 +47,8 @@ def addCongrTable (e : Expr) : GoalM Unit := do
we must ensure that `e` is still the congruence root.
-/
modify fun s => { s with congrTable := s.congrTable.insert { e } }
let node getENode e'
setENode e' { node with congr := e }
setENode e' { ( getENode e') with congr := e }
setENode e { ( getENode e) with congr := e }
else
let node getENode e
setENode e { node with congr := e' }