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

chore(data/rat/defs): Shortcut instance for ring ℚ #16349

Closed
wants to merge 1 commit into from

Conversation

YaelDillies
Copy link
Collaborator

@YaelDillies YaelDillies commented Sep 1, 2022

Uncomment the ring ℚ instance. This is needed to avoid computability poisoning as importing analysis.normed.field.basic currently makes Lean infer the ring operations on from rat.normed_field, which is noncomputable.

Mario commented this instance in e53c2bb, claiming performance reasons, but I could not witness any sensible difference.


An option to respect Mario's comment and fix the noncomputability poisoning would be to declare the instance later than data.real.basic, but that would be a confusing design.

Open in Gitpod

@YaelDillies YaelDillies added easy < 20s of review time. See the lifecycle page for guidelines. awaiting-review The author would like community review of the PR t-algebra Algebra (groups, rings, fields etc) labels Sep 1, 2022
@@ -490,9 +490,8 @@ instance : is_domain ℚ :=
.. (infer_instance : no_zero_divisors ℚ) }

/- Extra instances to short-circuit type class resolution -/
Copy link
Member

Choose a reason for hiding this comment

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

This should include a remark about computability like the instances for real have.

@eric-wieser
Copy link
Member

An alternative strategy would be to change rat.normed_field to be computable

@eric-wieser
Copy link
Member

#16463 will make this shortcut unnecessary

@kmill
Copy link
Collaborator

kmill commented Sep 22, 2022

#16463 will make this shortcut unnecessary

@YaelDillies @eric-wieser Given that that has been merged, what should be done with this PR?

@YaelDillies
Copy link
Collaborator Author

Given Mario's todo, let's close this.

@YaelDillies YaelDillies deleted the rat_ring branch February 27, 2023 08:14
@YaelDillies YaelDillies removed the awaiting-review The author would like community review of the PR label Feb 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
easy < 20s of review time. See the lifecycle page for guidelines. t-algebra Algebra (groups, rings, fields etc)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants