@@ -77,6 +77,14 @@ public meta section
7777
7878open Lean Meta Elab Tactic
7979
80+ /-- Configuration for the `convert` family of tactics.
81+ This is `Congr!.Config` with different, less aggressive, defaults.
82+ -/
83+ structure Convert.Config extends Congr!.Config where
84+ postTransparency := .reducible
85+
86+ declare_config_elab Convert.elabConfig Convert.Config
87+
8088/--
8189Close the goal `g` using `Eq.mp v e`,
8290where `v` is a metavariable asserting that the type of `g` and `e` are equal.
@@ -202,7 +210,7 @@ def elabTermForConvert (term : Syntax) (expectedType? : Option Expr) :
202210elab_rules : tactic
203211| `(tactic| convert%$tk $[!%$semired]? $cfg $[←%$sym]? $term $[using $n]? $[with $ps?*]?) =>
204212 withMainContext do
205- let baseConfig ← Congr! .elabConfig (mkOptionalNode cfg)
213+ let baseConfig := { ← Convert .elabConfig cfg with }
206214 let mut config := baseConfig
207215 if semired.isSome then
208216 config := { config with
@@ -277,7 +285,9 @@ elab_rules : tactic
277285| `(tactic| convert_to $[!%$semireducible]? $cfg $[←%$sym]? $newType $[using $n]?
278286 $[with $ps?*]? $[$loc?:location]?) => do
279287 let n : ℕ := n |>.map (·.getNat) |>.getD 1
280- let config ← Congr!.elabConfig cfg
288+ let mut config := { ← Convert.elabConfig cfg with }
289+ if semireducible.isSome then
290+ config := { config with postTransparency := .default }
281291 let patterns := (ps?.getD #[]).toList
282292 withLocation (expandOptLocation (mkOptionalNode loc?))
283293 (atLocal := fun fvarId ↦ do
0 commit comments