This PR allows fixing regressions in mathlib introduced in nightly-2024-02-25 by allowing the use of `x * y` in match patterns. There are currently 11 instances in mathlib explicitly flagging the lack of this match pattern. This issue was previously pointed out in the following Zulip threads: - https://leanprover.zulipchat.com/#narrow/channel/287929-mathlib4/topic/Algebra.2EFree/near/321482426 - https://leanprover.zulipchat.com/#narrow/channel/270676-lean4/topic/match_pattern.20attribute.20on.20Mul.2Emul/near/321505298 - https://leanprover.zulipchat.com/#narrow/channel/270676-lean4/topic/.40.5Bmatch_pattern.5D.20for.20basic.20binary.20operators/near/423734085 - https://leanprover.zulipchat.com/#narrow/channel/270676-lean4/topic/Mul.20match_pattern/near/430635623
14 lines
188 B
Text
14 lines
188 B
Text
namespace mul_match_pattern
|
|
|
|
inductive Foo
|
|
| x
|
|
| bar (y z : Foo)
|
|
|
|
instance : Mul Foo where
|
|
mul := Foo.bar
|
|
|
|
def quux : Foo → Foo
|
|
| .x => .x
|
|
| y * _z => y
|
|
|
|
end mul_match_pattern
|