Skip to content

Commit

Permalink
make reducible
Browse files Browse the repository at this point in the history
  • Loading branch information
kim-em committed Sep 6, 2024
1 parent cdbd3d6 commit 25eb95c
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/Init/Core.lean
Original file line number Diff line number Diff line change
Expand Up @@ -165,13 +165,13 @@ inductive PSum (α : Sort u) (β : Sort v) where

@[inherit_doc] infixr:30 " ⊕' " => PSum

instance instInhabitedPSumLeft {α β} [Inhabited α] : Inhabited (PSum α β) := ⟨PSum.inl default⟩
instance PSum.inhabitedLeft {α β} [Inhabited α] : Inhabited (PSum α β) := ⟨PSum.inl default⟩

/--
`PSum α β` is inhabited if `β` is inhabited.
This is not an instance to avoid non-defeq instances.
-/
def instInhabitedPSumRight {α β} [Inhabited β] : Inhabited (PSum α β) := ⟨PSum.inr default⟩
@[reducible] def PSum.inhabitedRight {α β} [Inhabited β] : Inhabited (PSum α β) := ⟨PSum.inr default⟩

/--
`Sigma β`, also denoted `Σ a : α, β a` or `(a : α) × β a`, is the type of dependent pairs
Expand Down Expand Up @@ -1158,7 +1158,7 @@ instance Sum.inhabitedLeft [Inhabited α] : Inhabited (Sum α β) where
default := Sum.inl default

/-- This is not an instance to avoid non-defeq instances. -/
def Sum.inhabitedRight [Inhabited β] : Inhabited (Sum α β) where
@[reducible] def Sum.inhabitedRight [Inhabited β] : Inhabited (Sum α β) where
default := Sum.inr default

instance {α : Type u} {β : Type v} [DecidableEq α] [DecidableEq β] : DecidableEq (Sum α β) := fun a b =>
Expand Down

0 comments on commit 25eb95c

Please sign in to comment.