Skip to content

Commit

Permalink
feat: port data.countable.small (#1128)
Browse files Browse the repository at this point in the history
Port of Data.Countable.Small

based on bbeb185db4ccee8ed07dc48449414ebfa39cb821
  • Loading branch information
arienmalec committed Dec 21, 2022
1 parent 2a588a7 commit f7e13bf
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 0 deletions.
1 change: 1 addition & 0 deletions Mathlib.lean
Expand Up @@ -164,6 +164,7 @@ import Mathlib.Data.Bracket
import Mathlib.Data.ByteArray
import Mathlib.Data.Char
import Mathlib.Data.Countable.Defs
import Mathlib.Data.Countable.Small
import Mathlib.Data.DList.Basic
import Mathlib.Data.Equiv.Functor
import Mathlib.Data.Erased
Expand Down
26 changes: 26 additions & 0 deletions Mathlib/Data/Countable/Small.lean
@@ -0,0 +1,26 @@
/-
Copyright (c) 2021 Scott Morrison. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Scott Morrison
! This file was ported from Lean 3 source module data.countable.small
! leanprover-community/mathlib commit bbeb185db4ccee8ed07dc48449414ebfa39cb821
! Please do not edit these lines, except to modify the commit id
! if you have ported upstream changes.
-/
import Mathlib.Logic.Small.Basic
import Mathlib.Data.Countable.Defs

/-!
# All countable types are small.
That is, any countable type is equivalent to a type in any universe.
-/


universe w v

instance (priority := 100) small_of_countable (α : Type v) [Countable α] : Small.{w} α :=
let ⟨_, hf⟩ := exists_injective_nat α
small_of_injective hf
#align small_of_countable small_of_countable

0 comments on commit f7e13bf

Please sign in to comment.