Skip to content

Commit

Permalink
chore: upstream simp lemmas associated to Sum.elim
Browse files Browse the repository at this point in the history
  • Loading branch information
arthur-adjedj committed Sep 12, 2024
1 parent fc9811e commit 368ff63
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/Init/Data/Sum.lean
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,10 @@ def getRight? : α ⊕ β → Option β
protected def elim {α β γ} (f : α → γ) (g : β → γ) : α ⊕ β → γ :=
fun x => Sum.casesOn x f g

@[simp] theorem elim_inl (f : α → γ) (g : β → γ) (x : α) :
Sum.elim f g (inl x) = f x := rfl

@[simp] theorem elim_inr (f : α → γ) (g : β → γ) (x : β) :
Sum.elim f g (inr x) = g x := rfl

end Sum

0 comments on commit 368ff63

Please sign in to comment.