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] - feat(data/option/basic): option valued choice operator #7101

Closed
wants to merge 1 commit into from

Conversation

semorrison
Copy link
Collaborator


I'm using this in the new development of chain complex / homology.

Open in Gitpod

@semorrison semorrison added the awaiting-review The author would like community review of the PR label Apr 8, 2021
else
none

lemma choice_eq {α : Type*} [subsingleton α] (a : α) : choice α = some a :=
Copy link
Member

Choose a reason for hiding this comment

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

Should this be simp?

Copy link
Member

Choose a reason for hiding this comment

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

Ah, it can't be due to a. But perhaps unique is better anyway?

Suggested change
lemma choice_eq {α : Type*} [subsingleton α] (a : α) : choice α = some a :=
@[simp]
lemma choice_eq {α : Type*} [unique α] : choice α = some (default a) :=

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I'll add this as a separate lemma, but actually for the sake of dependent types the first one is actually useful: using subsingleton you can rewrite choice α as the particular some a that you want!

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Ah, unique isn't even defined yet here.

@urkud
Copy link
Member

urkud commented Apr 9, 2021

LGTM. @eric-wieser , do you have any objections left?

@eric-wieser
Copy link
Member

bors r+

@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 9, 2021
bors bot pushed a commit that referenced this pull request Apr 9, 2021


Co-authored-by: Scott Morrison <scott.morrison@gmail.com>
@bors
Copy link

bors bot commented Apr 9, 2021

Pull request successfully merged into master.

Build succeeded:

@bors bors bot changed the title feat(data/option/basic): option valued choice operator [Merged by Bors] - feat(data/option/basic): option valued choice operator Apr 9, 2021
@bors bors bot closed this Apr 9, 2021
@bors bors bot deleted the option_choice branch April 9, 2021 12:24
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