Skip to content

Commit aab336e

Browse files
committed
Keep solveOverlap at the beginning, for now
1 parent bdeff39 commit aab336e

File tree

2 files changed

+10
-6
lines changed

2 files changed

+10
-6
lines changed

src/Lean/Meta/Match/MatchEqs.lean

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -196,6 +196,10 @@ where
196196
trace[Meta.Match.matchEqs] "proveCongrEqThm.go {mvarId}"
197197
let mvarId ← mvarId.modifyTargetEqLHS whnfCore
198198
let subgoals ←
199+
(do solveOverlap mvarId
200+
trace[Meta.Match.matchEqs] "solved by solveOverlap"
201+
return #[])
202+
<|>
199203
(do let mvarId ← unfoldElimOffset mvarId; return #[mvarId])
200204
<|>
201205
(casesOnStuckLHS mvarId)
@@ -214,17 +218,17 @@ where
214218
else
215219
throwError "spliIf failed")
216220
<|>
217-
(do solveOverlap mvarId
218-
trace[Meta.Match.matchEqs] "solved with overlap"
219-
return #[])
220-
<|>
221221
(do if debug.Meta.Match.MatchEqs.grindAsSorry.get (← getOptions) then
222222
trace[Meta.Match.matchEqs] "proveCondEqThm.go: grind_as_sorry is enabled, admitting goal"
223223
mvarId.admit (synthetic := true)
224224
else
225225
let r ← Grind.main mvarId (← Grind.mkParams {})
226226
if r.hasFailed then throwError "grind failed"
227-
trace[Meta.Match.matchEqs] "solved with grind"
227+
trace[Meta.Match.matchEqs] "solved by grind"
228+
return #[])
229+
<|>
230+
(do mvarId.contradiction { genDiseq := true }
231+
trace[Meta.Match.matchEqs] "solved by contradiction"
228232
return #[])
229233
<|>
230234
(throwMatchEqnFailedMessage matchDeclName thmName mvarId)

tests/lean/run/issue11342.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -148,5 +148,5 @@ info: private theorem deleteOne.match_1.congr_eq_3.{u_1} : ∀ {n : Nat} (motive
148148
| some val => h_3 val) ≍
149149
h_3 val
150150
-/
151-
#guard_msgs in
151+
#guard_msgs(pass trace, all) in
152152
#print sig deleteOne.match_1.congr_eq_3

0 commit comments

Comments
 (0)