Skip to content

chore(Util/StubLinter): correctly handle Prop-valued instances - #5071

Open
YaelDillies wants to merge 1 commit into
mainfrom
prop_valued_stub
Open

chore(Util/StubLinter): correctly handle Prop-valued instances#5071
YaelDillies wants to merge 1 commit into
mainfrom
prop_valued_stub

Conversation

@YaelDillies

Copy link
Copy Markdown
Member

These should not be considered stub definitions since they are Prop-valued.

These should not be considered stub definitions since they are Prop-valued.
rational points is torsion, not that it is of infinite rank. -/
@[category research solved, AMS 11 14]
theorem mordell_weil {K} [Field K] [NumberField K] [DecidableEq K] (E : WeierstrassCurve K)
instance mordell_weil {K} [Field K] [NumberField K] [DecidableEq K] (E : WeierstrassCurve K)

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hm I think at one point we decided that instance shouldn't have a category tag (i.e. problems can't be stated as instances). Should we go back on this?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Where did this discussion happen?

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't know where this discussion happen, but there might be downstream stuff that expects it (which could also be fixed) For instance (no pun intended) I don't even know if the extract_names script handles it correctly.
In any case it can be easily avoided in all instances, right? By preluding it with a named theorem

@[category research solved]
theorem foo : bar := by 
sorry

instance bar := foo

So we could lint for and forbid category tags for instances without loosing anything (except possibly convenience)

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this happened in gChat (possibly DMs between me and Moritz) about a year ago or even longer!

@YaelDillies YaelDillies Aug 21, 2026

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't really mind, but what's your rationale for disallowing this? that statements with a category tag should be called explicitly?

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One idea to have names to statements is: When people start solving them (and keep track in the future lean-lang/eval for example, but really whereever) is easier to refer to them if they have a name

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure, but that's an argument against unnamed instances, not against instances? Paul told me privately that a reason was that our statement extraction used to perform badly on instances. Has that changed?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants