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

[Merged by Bors] - chore(*): speedup slow proofs #7148

Closed
wants to merge 2 commits into from
Closed

Conversation

sgouezel
Copy link
Collaborator

Some proofs using heavy rfl or heavy obviously can be sped up considerably. Done in this PR for some outstanding examples.


Cherry-picked from #7084, in which all the original proofs fixed in this PR timed out because of the added complexity to the definition of monoids and add_monoids. I don't know how long #7084 will take to get merged (or if it will ever get merged), but these seem good to have anyway, as shaving a few minutes from every mathlib compilations can only help.

@sgouezel sgouezel added the awaiting-review The author would like community review of the PR label Apr 10, 2021
Comment on lines -56 to +58
change algebra R (sections_subalgebra F),
have : algebra R (types.limit_cone (F ⋙ forget (Algebra.{v} R))).X
= algebra R (sections_subalgebra F), by refl,
rw this,
Copy link
Collaborator

Choose a reason for hiding this comment

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

Wow, it's sad that this speeds things up.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Yes, a lot of things in this PR are really weird. Here, it even changes the algebra structure that is inferred (see the next change in the PR, adding a convert).

@semorrison
Copy link
Collaborator

bors merge

@github-actions github-actions bot added ready-to-merge All that is left is for bors to build and merge this PR. (Remember you need to say `bors r+`.) and removed awaiting-review The author would like community review of the PR labels Apr 10, 2021
bors bot pushed a commit that referenced this pull request Apr 10, 2021
Some proofs using heavy `rfl` or heavy `obviously` can be sped up considerably. Done in this PR for some outstanding examples.
@bors
Copy link

bors bot commented Apr 10, 2021

Pull request successfully merged into master.

Build succeeded:

@bors bors bot changed the title chore(*): speedup slow proofs [Merged by Bors] - chore(*): speedup slow proofs Apr 10, 2021
@bors bors bot closed this Apr 10, 2021
@bors bors bot deleted the speedup branch April 10, 2021 14:43
@@ -84,7 +84,7 @@ begin
letI : normed_space ℝ F := normed_space.restrict_scalars _ 𝕜 _,
-- Let `fr: p →L[ℝ] ℝ` be the real part of `f`.
let fr := re_clm.comp (f.restrict_scalars ℝ),
have fr_apply : ∀ x, fr x = re (f x) := λ x, rfl,
have fr_apply : ∀ x, fr x = re (f x), by { assume x, refl },
Copy link
Member

Choose a reason for hiding this comment

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

This one is bizarre

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ready-to-merge All that is left is for bors to build and merge this PR. (Remember you need to say `bors r+`.)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants