Feature request: accept patterns in argument of replace
#15009
Labels
kind: enhancement
Enhancement to an existing user-facing feature, tactic, etc.
replace
#15009
Description of the problem
Currently the
change
tactic accepts patterns, butreplace
does not: one can writechange (?x + ?x) with (2 * x)
, but notreplace (?x + 1) with (1 + x) by lia
.This feature is really convenient when
change
-ing large terms; it would be nice to have it forreplace
, too.The current alternative of course is to use
match goal
withcontext
instead, likematch goal with [ |- context[f ?x + ?y] => replace (f x + y) with (x + g y)
, but it's syntactically heavy.The text was updated successfully, but these errors were encountered: