Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: port data.countable.small (#1128)
Port of Data.Countable.Small based on bbeb185db4ccee8ed07dc48449414ebfa39cb821
- Loading branch information
1 parent
2a588a7
commit f7e13bf
Showing
2 changed files
with
27 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |