Skip to content

Commit

Permalink
fix(data/equiv/encodable): turn unique.encodable into a def (#10006)
Browse files Browse the repository at this point in the history
  • Loading branch information
urkud committed Oct 28, 2021
1 parent 9db7270 commit bcaeb57
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/data/equiv/encodable/basic.lean
Expand Up @@ -161,8 +161,8 @@ def equiv_range_encode (α : Type*) [encodable α] : α ≃ set.range (@encode
rw [encode_injective.eq_iff, ← option.some_inj, option.some_get, ← hx, encodek₂],
end }

/-- A type with unique element is encodable. -/
@[priority 100] instance _root_.unique.encodable [unique α] : encodable α :=
/-- A type with unique element is encodable. This is not an instance to avoid diamonds. -/
def _root_.unique.encodable [unique α] : encodable α :=
⟨λ _, 0, λ _, some (default α), unique.forall_iff.2 rfl⟩

section sum
Expand Down

0 comments on commit bcaeb57

Please sign in to comment.