Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Anonymous dot notation fails on propositions defined by #4761

Closed
3 tasks done
YaelDillies opened this issue Jul 16, 2024 · 0 comments · Fixed by #4818
Closed
3 tasks done

Anonymous dot notation fails on propositions defined by #4761

YaelDillies opened this issue Jul 16, 2024 · 0 comments · Fixed by #4818
Labels
bug Something isn't working P-medium We may work on this issue if we find the time

Comments

@YaelDillies
Copy link

YaelDillies commented Jul 16, 2024

Prerequisites

Please put an X between the brackets as you perform the following steps:

Description

def Foo : Prop := ∀ a : Nat, a = a

protected theorem Foo.intro : Foo := sorry
example : Foo := .intro

produces

invalid dotted identifier notation, unknown identifier `Eq.intro` from expected type
  Foo

on the example

Expected behavior: Anonymous dot notation works here

Actual behavior: Anonymous dot notation doesn't work here

Context

In Mathlib, anonymous dot notation on Monotone fails due to this bug. See eg leanprover-community/mathlib4#13338 (comment).

Versions

4.10.0-rc2

Impact

Add 👍 to issues you consider important. If others are impacted by this issue, please ask them to add 👍 to it.

@YaelDillies YaelDillies added the bug Something isn't working label Jul 16, 2024
@YaelDillies YaelDillies changed the title Anonymous dot notation fails on predicates defined by Anonymous dot notation fails on propositions defined by Jul 16, 2024
@leanprover-bot leanprover-bot added the P-medium We may work on this issue if we find the time label Jul 22, 2024
github-merge-queue bot pushed a commit that referenced this issue Jul 24, 2024
…synonyms (#4818)

When resolving anonymous dot notation (`.ident x y z`), it would reduce
the expected type to whnf. Now, it unfolds definitions step-by-step,
even if the type synonym is for a pi type like so
```lean
def Foo : Prop := ∀ a : Nat, a = a
protected theorem Foo.intro : Foo := sorry
example : Foo := .intro
```

Closes #4761
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working P-medium We may work on this issue if we find the time
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants