Skip to content

Commit

Permalink
feat(data/finset/sort): range_mono_of_fin (#3987)
Browse files Browse the repository at this point in the history
Add a `simp` lemma giving the range of `mono_of_fin`.
  • Loading branch information
jsm28 committed Aug 30, 2020
1 parent 861f182 commit e88843c
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/data/finset/sort.lean
Expand Up @@ -154,6 +154,14 @@ end
by rw [subsingleton.elim i ⟨0, zero_lt_one⟩,
mono_of_fin_zero h (singleton_nonempty a) zero_lt_one, min'_singleton]

/-- The range of `mono_of_fin`. -/
@[simp] lemma range_mono_of_fin {s : finset α} {k : ℕ} (h : s.card = k) :
set.range (s.mono_of_fin h) = ↑s :=
begin
rw ←set.image_univ,
exact (mono_of_fin_bij_on s h).image_eq
end

/-- Any increasing bijection between `fin k` and a finset of cardinality `k` has to coincide with
the increasing bijection `mono_of_fin s h`. For a statement assuming only that `f` maps `univ` to
`s`, see `mono_of_fin_unique'`.-/
Expand Down

0 comments on commit e88843c

Please sign in to comment.