Zulip Chat Archive

Stream: mathlib4

Topic: invalid pattern, constructor or constant marked with '[match


Yury G. Kudryashov (Jul 25 2023 at 22:43):

I get a strange error at https://github.com/leanprover-community/sphere-eversion/blob/lean4/SphereEversion/ToMathlib/Analysis/Calculus.lean#L126 :

invalid pattern, constructor or constant marked with '[match_pattern]' expected

What does it mean? How do I fix this?

Yury G. Kudryashov (Jul 26 2023 at 01:54):

More details: the error disappears if I replace ψ with a.

Yury G. Kudryashov (Jul 26 2023 at 02:02):

The offending theorem was

nonrec theorem Differentiable.fderiv_partial_fst {φ : E  F  G}
    (hF : Differentiable 𝕜 (uncurry φ)) :
    ((∂₁ 𝕜 φ)) = (fun (ψ : (E × F L[𝕜] G))  ψ.comp (inl 𝕜 E F))  (fderiv 𝕜 <| uncurry φ) := by
  ext1 y, t; exact fderiv_partial_fst (hF y, t⟩).hasFDerivAt

I fixed compile by using docs#ContinuousLinearMap.precomp

Yury G. Kudryashov (Jul 26 2023 at 02:58):

Got another error, again with letter ψ. What makes it special?

Yury G. Kudryashov (Jul 26 2023 at 03:00):

Found it! (Not really) scoped notation in OperatorNorm.

Yury G. Kudryashov (Jul 26 2023 at 12:07):

#6143


Last updated: Dec 20 2023 at 11:08 UTC