Skip to content

Commit

Permalink
add doc-string
Browse files Browse the repository at this point in the history
  • Loading branch information
kim-em committed Nov 11, 2023
1 parent 9f4f2a8 commit 56cfe8e
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/Init/Prelude.lean
Original file line number Diff line number Diff line change
Expand Up @@ -806,6 +806,12 @@ decidability instance instead of the proposition, which has no code).
If a proposition `p` is `Decidable`, then `(by decide : p)` will prove it by
evaluating the decidability instance to `isTrue h` and returning `h`.
Because `Decidable` carries data,
when writing `@[simp]` lemmas which include a `Decidable` instance on the LHS,

This comment has been minimized.

Copy link
@eric-wieser

eric-wieser Nov 12, 2023

Contributor

Is the corollary here that you can no longer use the lemma with if no Decidable instance is on the RHS? And so in those cases, you need to write two versions of the same lemma?

it is best to use `{_ : Decidable p}` rather than `[Decidable p]`
so that non-canonical instances can be found via unification rather than
typeclass search.
-/
class inductive Decidable (p : Prop) where
/-- Prove that `p` is decidable by supplying a proof of `¬p` -/
Expand Down

0 comments on commit 56cfe8e

Please sign in to comment.