Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions Mathlib/Tactic/Translate/Core.lean
Original file line number Diff line number Diff line change
Expand Up @@ -460,6 +460,9 @@ where
return e
visitApp (e : Expr) := e.withApp fun f args ↦ do
let env ← getEnv
if f.isLambda && !args.isEmpty then
if ← isProof f then
return ← visit (f.beta args)
match f with
| .proj n i b =>
let some info := getStructureInfo? env n |
Expand Down
5 changes: 5 additions & 0 deletions MathlibTest/ToDual.lean
Original file line number Diff line number Diff line change
Expand Up @@ -382,3 +382,8 @@ info: eq_of_max_of_min {α : Type} [PartialOrder α] (a b : α) (hmin : ∀ (x :
-/
#guard_msgs in
#check eq_of_max_of_min

-- Test that the heuristic applies even when proofs are beta expanded
@[to_dual (dont_translate := β) le_of_lt_and_le_of_lt']
theorem le_of_lt_and_le_of_lt {β} [Preorder β] (a b : α) (c d : β) : (a < b → a ≤ b) ∧ (c < d → c ≤ d) :=
⟨le_of_lt, (fun γ [Preorder γ] (c d : γ) ↦ @le_of_lt γ _ c d) β c d⟩
Loading