Skip to content

Commit

Permalink
fix: use getTransparency in librarySearch SolveByElim.Config
Browse files Browse the repository at this point in the history
  • Loading branch information
dwrensha committed Jan 27, 2024
1 parent c6cc35e commit dda41cd
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Mathlib/Tactic/LibrarySearch.lean
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,8 @@ def solveByElim (goals : List MVarId) (required : List Expr) (exfalso := false)
-- There is only a marginal decrease in performance for using the `symm` option for `solveByElim`.
-- (measured via `lake build && time lake env lean test/librarySearch.lean`).
let cfg : SolveByElim.Config :=
{ maxDepth := depth, exfalso := exfalso, symm := true, commitIndependentGoals := true }
{ maxDepth := depth, exfalso := exfalso, symm := true, commitIndependentGoals := true,
transparency := ← getTransparency }
let cfg := if !required.isEmpty then cfg.requireUsingAll required else cfg
SolveByElim.solveByElim.processSyntax cfg false false [] [] #[] goals

Expand Down
7 changes: 7 additions & 0 deletions test/LibrarySearch/basic.lean
Original file line number Diff line number Diff line change
Expand Up @@ -236,3 +236,10 @@ example (P Q : Prop) (h : P → Q) (h' : ¬Q) : ¬P := by
-- first
-- | exact? says exact le_antisymm hxy hyx
-- | exact? says exact ge_antisymm hyx hxy

-- Check that adding `with_reducible` prevents expensive kernel reductions.
-- https://leanprover.zulipchat.com/#narrow/stream/287929-mathlib4/topic/.60exact.3F.60.20failure.3A.20.22maximum.20recursion.20depth.20has.20been.20reached.22/near/417649319
/-- info: Try this: exact Nat.add_comm n m -/
#guard_msgs in
example (_h : List.range 10000 = List.range 10000) (n m : Nat) : n + m = m + n := by
with_reducible exact?

0 comments on commit dda41cd

Please sign in to comment.