Skip to content

Commit

Permalink
chore(logic/function/basic): remove classical decidable instance from…
Browse files Browse the repository at this point in the history
… a lemma statement (#6488)

Found using #6485

This means that this lemma can be use in reverse against any `ite`, not just one that uses `classical.decidable`.
  • Loading branch information
eric-wieser committed Mar 2, 2021
1 parent 91f6a7e commit 5361162
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/logic/function/basic.lean
Original file line number Diff line number Diff line change
Expand Up @@ -462,8 +462,8 @@ Mostly useful when `f` is injective. -/
def extend (f : α → β) (g : α → γ) (e' : β → γ) : β → γ :=
λ b, if h : ∃ a, f a = b then g (classical.some h) else e' b

lemma extend_def (f : α → β) (g : α → γ) (e' : β → γ) (b : β) :
extend f g e' b = if h : ∃ a, f a = b then g (classical.some h) else e' b := rfl
lemma extend_def (f : α → β) (g : α → γ) (e' : β → γ) (b : β) [decidable (∃ a, f a = b)] :
extend f g e' b = if h : ∃ a, f a = b then g (classical.some h) else e' b := by convert rfl

@[simp] lemma extend_apply (hf : injective f) (g : α → γ) (e' : β → γ) (a : α) :
extend f g e' (f a) = g a :=
Expand Down

0 comments on commit 5361162

Please sign in to comment.