Skip to content

Commit

Permalink
feat(data/fin): pos_iff_nonempty (#8975)
Browse files Browse the repository at this point in the history
  • Loading branch information
ChrisHughes24 committed Sep 6, 2021
1 parent de37a6a commit c0f01ee
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/data/fin.lean
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,9 @@ variables {n m : ℕ} {a b : fin n}

instance fin_to_nat (n : ℕ) : has_coe (fin n) nat := ⟨subtype.val⟩

lemma pos_iff_nonempty {n : ℕ} : 0 < n ↔ nonempty (fin n) :=
⟨λ h, ⟨⟨0, h⟩⟩, λ ⟨i⟩, lt_of_le_of_lt (nat.zero_le _) i.2

section coe

/-!
Expand Down

0 comments on commit c0f01ee

Please sign in to comment.