Give an example of a valid hypothesis right of colon#719
Merged
fpvandoorn merged 2 commits intoleanprover-community:lean4from Oct 27, 2025
Merged
Give an example of a valid hypothesis right of colon#719fpvandoorn merged 2 commits intoleanprover-community:lean4from
fpvandoorn merged 2 commits intoleanprover-community:lean4from
Conversation
adomani
reviewed
Oct 24, 2025
adomani
reviewed
Oct 24, 2025
Comment on lines
+321
to
+323
| lemma zero_le : ∀ n : ℕ, 0 ≤ n | ||
| | 0 => le_rfl | ||
| | n + 1 => add_nonneg (zero_le n) zero_le_one |
Contributor
There was a problem hiding this comment.
Suggested change
| lemma zero_le : ∀ n : ℕ, 0 ≤ n | |
| | 0 => le_rfl | |
| | n + 1 => add_nonneg (zero_le n) zero_le_one | |
| lemma zero_le : ∀ n : ℕ, True | |
| | 0 => trivial | |
| | n + 1 => trivial |
if you prefer a simpler example!
Contributor
Author
There was a problem hiding this comment.
Oh I think that's too simple, because then the pattern-matching plays no role and that's confusing.
Co-authored-by: damiano <adomani@gmail.com>
Contributor
|
Adding a link to a discussion of this: https://leanprover.zulipchat.com/#narrow/channel/287929-mathlib4/topic/Style.3A.20hypothesis.20left.20of.20colon.20vs.20pattern.20matching |
Member
|
LGTM |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.