@@ -23,7 +23,7 @@ private def _root_.Int.Linear.Poly.substVar (p : Poly) : GoalM (Option (Var × E
2323 let some (a, x, c) ← p.findVarToSubst | return none
2424 let b := c.p.coeff x
2525 let p' := p.mul (-b) |>.combine (c.p.mul a)
26- trace[grind.debug.cutsat .subst] "{← p.pp}, {a}, {← getVar x}, {← c.pp}, {b}, {← p'.pp}"
26+ trace[grind.debug.lia .subst] "{← p.pp}, {a}, {← getVar x}, {← c.pp}, {b}, {← p'.pp}"
2727 return some (x, c, p')
2828
2929def EqCnstr.norm (c : EqCnstr) : EqCnstr :=
@@ -46,12 +46,12 @@ def DiseqCnstr.applyEq (a : Int) (x : Var) (c₁ : EqCnstr) (b : Int) (c₂ : Di
4646 let p := c₁.p
4747 let q := c₂.p
4848 let p := p.mul b |>.combine (q.mul (-a))
49- trace[grind.debug.cutsat .subst] "{← getVar x}, {← c₁.pp}, {← c₂.pp}"
49+ trace[grind.debug.lia .subst] "{← getVar x}, {← c₁.pp}, {← c₂.pp}"
5050 return { p, h := .subst x c₁ c₂ }
5151
5252partial def DiseqCnstr.applySubsts (c : DiseqCnstr) : GoalM DiseqCnstr := withIncRecDepth do
5353 let some (x, c₁, p) ← c.p.substVar | return c
54- trace[grind.debug.cutsat .subst] "{← getVar x}, {← c.pp}, {← c₁.pp}"
54+ trace[grind.debug.lia .subst] "{← getVar x}, {← c.pp}, {← c₁.pp}"
5555 applySubsts { p, h := .subst x c₁ c }
5656
5757/--
@@ -73,14 +73,14 @@ private def DiseqCnstr.findLe (c : DiseqCnstr) : GoalM Bool := do
7373
7474def DiseqCnstr.assert (c : DiseqCnstr) : GoalM Unit := do
7575 if (← inconsistent) then return ()
76- trace[grind.cutsat .assert] "{← c.pp}"
76+ trace[grind.lia .assert] "{← c.pp}"
7777 let c ← c.norm.applySubsts
7878 if c.p.isUnsatDiseq then
79- trace[grind.cutsat .assert.unsat] "{← c.pp}"
79+ trace[grind.lia .assert.unsat] "{← c.pp}"
8080 setInconsistent (.diseq c)
8181 return ()
8282 if c.isTrivial then
83- trace[grind.cutsat .assert.trivial] "{← c.pp}"
83+ trace[grind.lia .assert.trivial] "{← c.pp}"
8484 return ()
8585 let k := c.p.gcdCoeffs c.p.getConst
8686 let c := if k == 1 then
@@ -91,7 +91,7 @@ def DiseqCnstr.assert (c : DiseqCnstr) : GoalM Unit := do
9191 return ()
9292 let .add _ x _ := c.p | c.throwUnexpected
9393 c.p.updateOccs
94- trace[grind.cutsat .assert.store] "{← c.pp}"
94+ trace[grind.lia .assert.store] "{← c.pp}"
9595 modify' fun s => { s with diseqs := s.diseqs.modify x (·.push c) }
9696 if (← c.satisfied) == .false then
9797 resetAssignmentFrom x
@@ -117,7 +117,7 @@ where
117117
118118partial def EqCnstr.applySubsts (c : EqCnstr) : GoalM EqCnstr := withIncRecDepth do
119119 let some (x, c₁, p) ← c.p.substVar | return c
120- trace[grind.debug.cutsat .subst] "{← getVar x}, {← c.pp}, {← c₁.pp}"
120+ trace[grind.debug.lia .subst] "{← getVar x}, {← c.pp}, {← c₁.pp}"
121121 applySubsts { p, h := .subst x c₁ c : EqCnstr }
122122
123123private def updateDvdCnstr (a : Int) (x : Var) (c : EqCnstr) (y : Var) : GoalM Unit := do
@@ -295,7 +295,7 @@ private def updateElimEqs (a : Int) (x : Var) (c : EqCnstr) (y : Var) : GoalM Un
295295 let b := c₂.p.coeff x
296296 if b == 0 then return ()
297297 let c₂ := { p := c₂.p.mul a |>.combine (c.p.mul (-b)), h := .subst x c₂ c : EqCnstr }
298- trace[grind.debug.cutsat .elimEq] "updated: {← getVar y}, {← c₂.pp}"
298+ trace[grind.debug.lia .elimEq] "updated: {← getVar y}, {← c₂.pp}"
299299 modify' fun s => { s with elimEqs := s.elimEqs.set y (some c₂) }
300300 propagateNonlinearTerms y
301301
@@ -338,14 +338,14 @@ partial def _root_.Int.Linear.Poly.updateOccsForElimEq (p : Poly) (x : Var) : Go
338338@[export lean_grind_cutsat_assert_eq]
339339def EqCnstr.assertImpl (c : EqCnstr) : GoalM Unit := do
340340 if (← inconsistent) then return ()
341- trace[grind.cutsat .assert] "{← c.pp}"
341+ trace[grind.lia .assert] "{← c.pp}"
342342 let c ← c.norm.applySubsts
343343 if c.p.isUnsatEq then
344- trace[grind.cutsat .assert.unsat] "{← c.pp}"
344+ trace[grind.lia .assert.unsat] "{← c.pp}"
345345 setInconsistent (.eq c)
346346 return ()
347347 if c.isTrivial then
348- trace[grind.cutsat .assert.trivial] "{← c.pp}"
348+ trace[grind.lia .assert.trivial] "{← c.pp}"
349349 return ()
350350 let k := c.p.gcdCoeffs'
351351 if c.p.getConst % k > 0 then
@@ -356,9 +356,9 @@ def EqCnstr.assertImpl (c : EqCnstr) : GoalM Unit := do
356356 else
357357 { p := c.p.div k, h := .divCoeffs c }
358358 let some (k, x) := c.p.pickVarToElim? | c.throwUnexpected
359- trace[grind.debug.cutsat .subst] ">> {← getVar x}, {← c.pp}"
360- trace[grind.cutsat .assert.store] "{← c.pp}"
361- trace[grind.debug.cutsat .elimEq] "{← getVar x}, {← c.pp}"
359+ trace[grind.debug.lia .subst] ">> {← getVar x}, {← c.pp}"
360+ trace[grind.lia .assert.store] "{← c.pp}"
361+ trace[grind.debug.lia .elimEq] "{← getVar x}, {← c.pp}"
362362 if (← c.satisfied) == .false then
363363 resetAssignmentFrom x
364364 modify' fun s => { s with
@@ -539,7 +539,7 @@ private def isForbiddenParent (parent? : Option Expr) (k : SupportedTermKind) :
539539private def internalizeInt (e : Expr) : GoalM Unit := do
540540 if (← hasVar e) then return ()
541541 let p ← toPoly e
542- trace[grind.debug.cutsat .internalize] "{aquote e}:= {← p.pp}"
542+ trace[grind.debug.lia .internalize] "{aquote e}:= {← p.pp}"
543543 let x ← mkVar e
544544 if p == .add 1 x (.num 0 ) then
545545 -- It is pointless to assert `x = x`
@@ -632,7 +632,7 @@ private def isToIntForbiddenParent (parent? : Option Expr) : Bool :=
632632
633633private def internalizeIntTerm (e type : Expr) (parent? : Option Expr) (k : SupportedTermKind) : GoalM Unit := do
634634 if isForbiddenParent parent? k then return ()
635- trace[grind.debug.cutsat .internalize] "{e} : {type}"
635+ trace[grind.debug.lia .internalize] "{e} : {type}"
636636 match k with
637637 | .div => propagateDiv e
638638 | .mod => propagateMod e
@@ -656,8 +656,8 @@ private def internalizeNatTerm (e type : Expr) (parent? : Option Expr) (k : Supp
656656 if isForbiddenParent parent? k then return ()
657657 if (← get').natToIntMap.contains { expr := e } then return ()
658658 let e'h ← natToInt e
659- trace[grind.debug.cutsat .internalize] "{e} : {type}"
660- trace[grind.debug.cutsat .toInt] "{e} ==> {e'h.1}"
659+ trace[grind.debug.lia .internalize] "{e} : {type}"
660+ trace[grind.debug.lia .toInt] "{e} ==> {e'h.1}"
661661 modify' fun s => { s with
662662 natToIntMap := s.natToIntMap.insert { expr := e } e'h
663663 }
@@ -686,8 +686,8 @@ private def internalizeNatTerm (e type : Expr) (parent? : Option Expr) (k : Supp
686686private def internalizeToIntTerm (e type : Expr) : GoalM Unit := do
687687 if (← isToIntTerm e) then return () -- already internalized
688688 if let some (eToInt, he) ← toInt? e type then
689- trace[grind.debug.cutsat .internalize] "{e} : {type}"
690- trace[grind.debug.cutsat .toInt] "{e} ==> {eToInt}"
689+ trace[grind.debug.lia .internalize] "{e} : {type}"
690+ trace[grind.debug.lia .toInt] "{e} ==> {eToInt}"
691691 let α := type
692692 modify' fun s => { s with
693693 toIntTermMap := s.toIntTermMap.insert { expr := e } { eToInt, he, α }
0 commit comments