Skip to content

Commit 2da124d

Browse files
authored
chore: remove grind offset (#11051)
This PR removes the `grind offset` module because it is (now) subsumed by `grind order`.
1 parent 1d00dee commit 2da124d

21 files changed

+24
-1336
lines changed

src/Init/Grind/Config.lean

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -153,11 +153,6 @@ structure Config where
153153
at least `Std.IsPreorder`
154154
-/
155155
order := true
156-
/--
157-
When `true` (default: `true`), enables the legacy module `offset`. This module will be deleted in
158-
the future.
159-
-/
160-
offset := true
161156
deriving Inhabited, BEq
162157

163158
/--

src/Lean/Meta/Tactic/Grind/Arith.lean

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ prelude
88
public import Lean.Meta.Tactic.Grind.Arith.Util
99
public import Lean.Meta.Tactic.Grind.Arith.Types
1010
public import Lean.Meta.Tactic.Grind.Arith.Main
11-
public import Lean.Meta.Tactic.Grind.Arith.Offset
1211
public import Lean.Meta.Tactic.Grind.Arith.CommRing
1312
public import Lean.Meta.Tactic.Grind.Arith.Linear
1413
public import Lean.Meta.Tactic.Grind.Arith.Cutsat

src/Lean/Meta/Tactic/Grind/Arith/Main.lean

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -8,35 +8,18 @@ prelude
88
public import Lean.Meta.Tactic.Grind.Types
99
import Init.Grind.Propagator
1010
import Lean.Meta.Tactic.Grind.PropagatorAttr
11-
import Lean.Meta.Tactic.Grind.Arith.Offset.Main
12-
import Lean.Meta.Tactic.Grind.Arith.Offset.Proof
1311
import Lean.Meta.Tactic.Grind.Arith.Cutsat.LeCnstr
1412
import Lean.Meta.Tactic.Grind.Arith.Cutsat.Search
1513
import Lean.Meta.Tactic.Grind.Arith.Linear.IneqCnstr
1614
import Lean.Meta.Tactic.Grind.Arith.Linear.Search
1715
public section
1816
namespace Lean.Meta.Grind.Arith
1917

20-
private def Offset.isCnstr? (e : Expr) : GoalM (Option (Cnstr NodeId)) :=
21-
return (← get').cnstrs.find? { expr := e }
22-
23-
private def Offset.assertTrue (c : Cnstr NodeId) (p : Expr) : GoalM Unit := do
24-
addEdge c.u c.v c.k (← mkOfEqTrue p)
25-
26-
private def Offset.assertFalse (c : Cnstr NodeId) (p : Expr) : GoalM Unit := do
27-
let p := mkOfNegEqFalse (← get').nodes c p
28-
let c := c.neg
29-
addEdge c.u c.v c.k p
30-
3118
builtin_grind_propagator propagateLE ↓LE.le := fun e => do
3219
if (← isEqTrue e) then
33-
if let some c ← Offset.isCnstr? e then
34-
Offset.assertTrue c (← mkEqTrueProof e)
3520
Cutsat.propagateLe e (eqTrue := true)
3621
Linear.propagateIneq e (eqTrue := true)
3722
else if (← isEqFalse e) then
38-
if let some c ← Offset.isCnstr? e then
39-
Offset.assertFalse c (← mkEqFalseProof e)
4023
Cutsat.propagateLe e (eqTrue := false)
4124
Linear.propagateIneq e (eqTrue := false)
4225

src/Lean/Meta/Tactic/Grind/Arith/Model.lean

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,5 @@ Released under Apache 2.0 license as described in the file LICENSE.
44
Authors: Leonardo de Moura
55
-/
66
module
7-
87
prelude
9-
public import Lean.Meta.Tactic.Grind.Arith.Offset.Model
108
public import Lean.Meta.Tactic.Grind.Arith.Cutsat.Model

src/Lean/Meta/Tactic/Grind/Arith/Offset.lean

Lines changed: 0 additions & 34 deletions
This file was deleted.

0 commit comments

Comments
 (0)