Skip to content
This repository was archived by the owner on Jul 24, 2024. It is now read-only.

Commit 69e9344

Browse files
committed
feat(data/set/finite): add lemma with iff statement about when finite sets can be subsets (#5725)
Part of #5698 in order to prove statements about strongly regular graphs. Co-author: @shingtaklam1324 Co-authored-by: agusakov <39916842+agusakov@users.noreply.github.com>
1 parent 0b9fbc4 commit 69e9344

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/data/set/finite.lean

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -534,6 +534,11 @@ lemma eq_of_subset_of_card_le {s t : set α} [fintype s] [fintype t]
534534
(eq_or_ssubset_of_subset hsub).elim id
535535
(λ h, absurd hcard $ not_le_of_lt $ card_lt_card h)
536536

537+
lemma subset_iff_to_finset_subset (s t : set α) [fintype s] [fintype t] :
538+
s ⊆ t ↔ s.to_finset ⊆ t.to_finset :=
539+
⟨λ h x hx, set.mem_to_finset.mpr $ h $ set.mem_to_finset.mp hx,
540+
λ h x hx, set.mem_to_finset.mp $ h $ set.mem_to_finset.mpr hx⟩
541+
537542
lemma card_range_of_injective [fintype α] {f : α → β} (hf : injective f)
538543
[fintype (range f)] : fintype.card (range f) = fintype.card α :=
539544
eq.symm $ fintype.card_congr $ equiv.set.range f hf

0 commit comments

Comments
 (0)