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

doc: Classical.choice #3871

Merged
merged 3 commits into from
Apr 22, 2024
Merged

doc: Classical.choice #3871

merged 3 commits into from
Apr 22, 2024

Conversation

Kha
Copy link
Member

@Kha Kha commented Apr 10, 2024

No description provided.

@Kha Kha added the documentation Documentation improvement label Apr 10, 2024
@github-actions github-actions bot added the toolchain-available A toolchain is available for this PR, at leanprover/lean4-pr-releases:pr-release-NNNN label Apr 10, 2024
@@ -15,6 +15,11 @@ namespace Classical
noncomputable def indefiniteDescription {α : Sort u} (p : α → Prop) (h : ∃ x, p x) : {x // p x} :=
choice <| let ⟨x, px⟩ := h; ⟨⟨x, px⟩⟩

/--
Given that there exists an element satisfying `p`, returns one such element.
Copy link
Contributor

Choose a reason for hiding this comment

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

I stumbled a bit over "returns" here, which sounds very much like computation to me! I don't have a suggestion for a better word off the top of my head, though.

Copy link
Contributor

Choose a reason for hiding this comment

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

denotes? selects?

Copy link

Choose a reason for hiding this comment

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

chooses? :)

Copy link
Member Author

Choose a reason for hiding this comment

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

represents?

Copy link
Collaborator

Choose a reason for hiding this comment

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

is logically equivalent to an arbitrary such element

Copy link
Contributor

Choose a reason for hiding this comment

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

I like the last two suggestions a lot here

Copy link
Contributor

Choose a reason for hiding this comment

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

What about:

Suggested change
Given that there exists an element satisfying `p`, returns one such element.
Given that there exists an element of ` that satisfies `p`, the result of `choose` is logically equivalent to an
arbitrary such element.

This makes the non-computational nature of it very apparent. We're also out in ultra-nitpick land here :)

Copy link
Collaborator

Choose a reason for hiding this comment

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

I'm not sure "the result of choose is logically equivalent to an arbitrary such element" is a well formed thing to say. I think I know the theorem it's alluding to but this is a really misleading way to say it. I think you might want to get some mathematician eyes on this

Copy link
Contributor

Choose a reason for hiding this comment

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

Better to have the slight odor of computation than to write something that's incorrect :) I think that the discussion on this has now exceeded the very minor downsides of the word "returns", and am supportive of a merge as-is

Copy link
Contributor

Choose a reason for hiding this comment

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

Using "logically equivalent" that way is sketchy and doesn't quite make sense for the technical meaning of logical equivalence. I like: "Given that there exists an element of α satisfying p, choose p denotes an otherwise arbitrary such element."

Co-authored-by: Mario Carneiro <[email protected]>
@leanprover-community-mathlib4-bot
Copy link
Collaborator

Mathlib CI status (docs):

  • ❗ Std/Mathlib CI will not be attempted unless your PR branches off the nightly-with-mathlib branch. Try git rebase e41cd310e9a3cfb04db3aaa4e974ebb0c2ba6dc3 --onto d3e004932c1f5ac3946850692940512d381c7634. (2024-04-17 11:43:35)

@kim-em kim-em added this pull request to the merge queue Apr 22, 2024
@kim-em
Copy link
Collaborator

kim-em commented Apr 22, 2024

Let's stick a fork in this one and call it done.

@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Apr 22, 2024
@kim-em kim-em added this pull request to the merge queue Apr 22, 2024
Merged via the queue into leanprover:master with commit 5e313e9 Apr 22, 2024
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Documentation improvement toolchain-available A toolchain is available for this PR, at leanprover/lean4-pr-releases:pr-release-NNNN
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants