Skip to content

Commit

Permalink
chore: rw? uses MVarId.refl not MVarId.applyRfl
Browse files Browse the repository at this point in the history
  • Loading branch information
semorrison committed Mar 27, 2024
1 parent 80d2455 commit a8784a9
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/Lean/Meta/Tactic/Rewrites.lean
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ prelude
import Lean.Meta.LazyDiscrTree
import Lean.Meta.Tactic.Assumption
import Lean.Meta.Tactic.Rewrite
import Lean.Meta.Tactic.Rfl
import Lean.Meta.Tactic.Refl
import Lean.Meta.Tactic.SolveByElim
import Lean.Meta.Tactic.TryThis
import Lean.Util.Heartbeats
Expand Down Expand Up @@ -140,7 +140,7 @@ def computeRfl (mctx : MetavarContext) (res : Meta.RewriteResult) : MetaM Bool :
try
withoutModifyingState <| withMCtx mctx do
-- We use `withReducible` here to follow the behaviour of `rw`.
withReducible (← mkFreshExprMVar res.eNew).mvarId!.applyRfl
withReducible (← mkFreshExprMVar res.eNew).mvarId!.refl
-- We do not need to record the updated `MetavarContext` here.
pure true
catch _e =>
Expand Down Expand Up @@ -168,7 +168,7 @@ def solveByElim (goals : List MVarId) (depth : Nat := 6) : MetaM PUnit := do
let [] ← SolveByElim.solveByElim cfg lemmas ctx goals
| failure

def rwLemma (ctx : MetavarContext) (goal : MVarId) (target : Expr) (side : SideConditions := .solveByElim)
def rwLemma (ctx : MetavarContext) (goal : MVarId) (target : Expr) (side : SideConditions := .solveByElim)
(lem : Expr ⊕ Name) (symm : Bool) (weight : Nat) : MetaM (Option RewriteResult) :=
withMCtx ctx do
let some expr ← (match lem with
Expand Down

0 comments on commit a8784a9

Please sign in to comment.