Skip to content

Commit

Permalink
chore(data/finset/basic): generalize finset.nonempty_mk_coe to `non…
Browse files Browse the repository at this point in the history
…empty_mk` (#16399)
  • Loading branch information
urkud committed Sep 7, 2022
1 parent 019df1c commit ed4882b
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/data/finset/basic.lean
Expand Up @@ -530,9 +530,8 @@ by simp only [mem_cons, or_imp_distrib, forall_and_distrib, forall_eq]

@[simp] lemma nonempty_cons (h : a ∉ s) : (cons a s h).nonempty := ⟨a, mem_cons.2 $ or.inl rfl⟩

@[simp] lemma nonempty_mk_coe : ∀ {l : list α} {hl}, (⟨↑l, hl⟩ : finset α).nonempty ↔ l ≠ []
| [] hl := by simp
| (a :: l) hl := by simp [← multiset.cons_coe]
@[simp] lemma nonempty_mk {m : multiset α} {hm} : (⟨m, hm⟩ : finset α).nonempty ↔ m ≠ 0 :=
by induction m using multiset.induction_on; simp

@[simp] lemma coe_cons {a s h} : (@cons α a s h : set α) = insert a s := by { ext, simp }

Expand Down

0 comments on commit ed4882b

Please sign in to comment.