Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
madvorak committed Jan 3, 2025
1 parent 65994e9 commit 1be3068
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions Mathlib/Data/Finset/Card.lean
Original file line number Diff line number Diff line change
Expand Up @@ -581,13 +581,12 @@ lemma exists_subset_card_eq (hns : n ≤ #s) : ∃ t ⊆ s, #t = n := by

lemma of_cardinality_between_of_disjoint [DecidableEq α] (hs : #s < n) (hn : n ≤ #s + #t)

Check failure on line 582 in Mathlib/Data/Finset/Card.lean

View workflow job for this annotation

GitHub Actions / Build

@Finset.of_cardinality_between_of_disjoint argument 5 inst✝ : DecidableEq
(hst : Disjoint s t) :
∃ (x : Finset α) (h : Disjoint x s), #(s.disjUnion x h) = n ∧ Nonempty x := by
∃ (x : Finset α) (hxs : Disjoint x s), #(x.disjUnion s hxs) = n ∧ Nonempty x := by
have hnst : n - #s ≤ #t := by omega
obtain ⟨x, hxt, hxn⟩ := Finset.exists_subset_card_eq hnst
have hxs : Disjoint x s := disjoint_of_subset_left hxt hst.symm
refine ⟨x, hxs, ?_, ?_⟩
· rw [disjoint_iff_inter_eq_empty] at hxs
rw [card_union, inter_comm, hxs, card_empty]
· rw [card_disjUnion]
omega
· by_contra ifempty
have : #x = 0 := by
Expand Down

0 comments on commit 1be3068

Please sign in to comment.