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(linear_algebra/affine_space): use implicit args #2905

Closed
wants to merge 2 commits into from

Conversation

urkud
Copy link
Member

@urkud urkud commented Jun 1, 2020

Whenever we have an argument f : affine_map k V P, Lean can figure out k, V, and P.

@urkud urkud requested a review from jsm28 June 1, 2020 14:27
@jsm28
Copy link
Collaborator

jsm28 commented Jun 1, 2020

I think this is fine. Affine spaces and torsors do often need explicit type arguments (when a definition only has points as explicit arguments, it seems Lean can't figure out the types of vectors and scalars; when it only has points and vectors as explicit arguments, it seems Lean can't figure out the type of scalars, for example), but this case doesn't need those explicit arguments (and there may be other definitions that are also taking more explicit type arguments than necessary).

@urkud
Copy link
Member Author

urkud commented Jun 1, 2020

I'm making more args implicit. Should be ready soon.

@urkud urkud added the WIP Work in progress label Jun 1, 2020
@urkud urkud added awaiting-review The author would like community review of the PR and removed WIP Work in progress labels Jun 1, 2020
@urkud urkud changed the title chore(linear_algebra/affine_space): use implicit args in comp chore(linear_algebra/affine_space): use implicit args Jun 1, 2020
@jcommelin
Copy link
Member

@urkud I'm still trying to get a feel for the new superpowers that coercion to function now has. Should P1 even be implicit in .id itself? I guess that almost always it can be inferred from the context, and it looks a lot nicer (in my opinion) without the P1.

@urkud
Copy link
Member Author

urkud commented Jun 1, 2020

@jcommelin I think that this kind of a refactor should be done simultaneously for all bundled homs.

@jcommelin
Copy link
Member

Ok, that's a fair point.

Copy link
Member

@jcommelin jcommelin left a comment

Choose a reason for hiding this comment

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

Thanks 🎉

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 Jun 1, 2020
bors bot pushed a commit that referenced this pull request Jun 1, 2020
Whenever we have an argument `f : affine_map k V P`, Lean can figure out `k`, `V`, and `P`.
@bors
Copy link

bors bot commented Jun 1, 2020

Pull request successfully merged into master.

Build succeeded:

@bors bors bot changed the title chore(linear_algebra/affine_space): use implicit args [Merged by Bors] - chore(linear_algebra/affine_space): use implicit args Jun 1, 2020
@bors bors bot closed this Jun 1, 2020
@bors bors bot deleted the comp-implicit branch June 1, 2020 20:09
cipher1024 pushed a commit to cipher1024/mathlib that referenced this pull request Mar 15, 2022
…munity#2905)

Whenever we have an argument `f : affine_map k V P`, Lean can figure out `k`, `V`, and `P`.
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