lean4
lean4 copied to clipboard
surprising interaction of dot-ident and `apply`
example (h : P) : P ∨ Q := by
apply .inl
-- type mismatch
-- Or.inl
-- has type
-- ?m.23 → ?m.23 ∨ ?m.24 : Prop
-- but is expected to have type
-- P ∨ Q : Prop
assumption
The error message clearly indicates that it was able to resolve that the identifier is Or.inl, but it then gives an error message suggesting that it inserted the wrong number of underscores. apply Or.inl works as expected.