Theorem: Finset.card_div_choose_le_card_shadow_div_choose
File: Mathlib/Combinatorics/SetFamily/LYM.lean

tactic: obtain hr' | hr' := lt_or_le (Fintype.card α) r
state_before: 𝕜 : Type u_2
α : Type u_1
inst✝² : LinearOrderedField 𝕜
inst✝¹ : DecidableEq α
inst✝ : Fintype α
𝒜 : Finset (Finset α)
r : ℕ
hr : r ≠ 0
h𝒜 : Set.Sized r ↑𝒜
⊢ ↑(card 𝒜) / ↑(Nat.choose (Fintype.card α) r) ≤ ↑(card ((∂ ) 𝒜)) / ↑(Nat.choose (Fintype.card α) (r - 1))

tactic: replace h𝒜 := card_mul_le_card_shadow_mul h𝒜
state_before: case inr
𝕜 : Type u_2
α : Type u_1
inst✝² : LinearOrderedField 𝕜
inst✝¹ : DecidableEq α
inst✝ : Fintype α
𝒜 : Finset (Finset α)
r : ℕ
hr : r ≠ 0
h𝒜 : Set.Sized r ↑𝒜
hr' : r ≤ Fintype.card α
⊢ ↑(card 𝒜) / ↑(Nat.choose (Fintype.card α) r) ≤ ↑(card ((∂ ) 𝒜)) / ↑(Nat.choose (Fintype.card α) (r - 1))

tactic: rw [div_le_div_iff] <;> norm_cast
state_before: case inr
𝕜 : Type u_2
α : Type u_1
inst✝² : LinearOrderedField 𝕜
inst✝¹ : DecidableEq α
inst✝ : Fintype α
𝒜 : Finset (Finset α)
r : ℕ
hr : r ≠ 0
hr' : r ≤ Fintype.card α
h𝒜 : card 𝒜 * r ≤ card ((∂ ) 𝒜) * (Fintype.card α - r + 1)
⊢ ↑(card 𝒜) / ↑(Nat.choose (Fintype.card α) r) ≤ ↑(card ((∂ ) 𝒜)) / ↑(Nat.choose (Fintype.card α) (r - 1))

tactic: rw [choose_eq_zero_of_lt hr', cast_zero, div_zero]
state_before: case inl
𝕜 : Type u_2
α : Type u_1
inst✝² : LinearOrderedField 𝕜
inst✝¹ : DecidableEq α
inst✝ : Fintype α
𝒜 : Finset (Finset α)
r : ℕ
hr : r ≠ 0
h𝒜 : Set.Sized r ↑𝒜
hr' : Fintype.card α < r
⊢ ↑(card 𝒜) / ↑(Nat.choose (Fintype.card α) r) ≤ ↑(card ((∂ ) 𝒜)) / ↑(Nat.choose (Fintype.card α) (r - 1))

tactic: exact div_nonneg (cast_nonneg _) (cast_nonneg _)
state_before: case inl
𝕜 : Type u_2
α : Type u_1
inst✝² : LinearOrderedField 𝕜
inst✝¹ : DecidableEq α
inst✝ : Fintype α
𝒜 : Finset (Finset α)
r : ℕ
hr : r ≠ 0
h𝒜 : Set.Sized r ↑𝒜
hr' : Fintype.card α < r
⊢ 0 ≤ ↑(card ((∂ ) 𝒜)) / ↑(Nat.choose (Fintype.card α) (r - 1))

tactic: cases' r with r
state_before: case inr
𝕜 : Type u_2
α : Type u_1
inst✝² : LinearOrderedField 𝕜
inst✝¹ : DecidableEq α
inst✝ : Fintype α
𝒜 : Finset (Finset α)
r : ℕ
hr : r ≠ 0
hr' : r ≤ Fintype.card α
h𝒜 : card 𝒜 * r ≤ card ((∂ ) 𝒜) * (Fintype.card α - r + 1)
⊢ card 𝒜 * Nat.choose (Fintype.card α) (r - 1) ≤ card ((∂ ) 𝒜) * Nat.choose (Fintype.card α) r

tactic: rw [Nat.succ_eq_add_one] at *
state_before: case inr.succ
𝕜 : Type u_2
α : Type u_1
inst✝² : LinearOrderedField 𝕜
inst✝¹ : DecidableEq α
inst✝ : Fintype α
𝒜 : Finset (Finset α)
r : ℕ
hr : succ r ≠ 0
hr' : succ r ≤ Fintype.card α
h𝒜 : card 𝒜 * succ r ≤ card ((∂ ) 𝒜) * (Fintype.card α - succ r + 1)
⊢ card 𝒜 * Nat.choose (Fintype.card α) (succ r - 1) ≤ card ((∂ ) 𝒜) * Nat.choose (Fintype.card α) (succ r)

tactic: rw [tsub_add_eq_add_tsub hr', add_tsub_add_eq_tsub_right] at h𝒜
state_before: case inr.succ
𝕜 : Type u_2
α : Type u_1
inst✝² : LinearOrderedField 𝕜
inst✝¹ : DecidableEq α
inst✝ : Fintype α
𝒜 : Finset (Finset α)
r : ℕ
hr : r + 1 ≠ 0
hr' : r + 1 ≤ Fintype.card α
h𝒜 : card 𝒜 * (r + 1) ≤ card ((∂ ) 𝒜) * (Fintype.card α - (r + 1) + 1)
⊢ card 𝒜 * Nat.choose (Fintype.card α) (r + 1 - 1) ≤ card ((∂ ) 𝒜) * Nat.choose (Fintype.card α) (r + 1)

tactic: apply le_of_mul_le_mul_right _ (pos_iff_ne_zero.2 hr)
state_before: case inr.succ
𝕜 : Type u_2
α : Type u_1
inst✝² : LinearOrderedField 𝕜
inst✝¹ : DecidableEq α
inst✝ : Fintype α
𝒜 : Finset (Finset α)
r : ℕ
hr : r + 1 ≠ 0
hr' : r + 1 ≤ Fintype.card α
h𝒜 : card 𝒜 * (r + 1) ≤ card ((∂ ) 𝒜) * (Fintype.card α - r)
⊢ card 𝒜 * Nat.choose (Fintype.card α) (r + 1 - 1) ≤ card ((∂ ) 𝒜) * Nat.choose (Fintype.card α) (r + 1)

tactic: convert Nat.mul_le_mul_right ((Fintype.card α).choose r) h𝒜 using 1
state_before: 𝕜 : Type u_2
α : Type u_1
inst✝² : LinearOrderedField 𝕜
inst✝¹ : DecidableEq α
inst✝ : Fintype α
𝒜 : Finset (Finset α)
r : ℕ
hr : r + 1 ≠ 0
hr' : r + 1 ≤ Fintype.card α
h𝒜 : card 𝒜 * (r + 1) ≤ card ((∂ ) 𝒜) * (Fintype.card α - r)
⊢ card 𝒜 * Nat.choose (Fintype.card α) (r + 1 - 1) * (r + 1) ≤
    card ((∂ ) 𝒜) * Nat.choose (Fintype.card α) (r + 1) * (r + 1)

tactic: exact (hr rfl).elim
state_before: case inr.zero
𝕜 : Type u_2
α : Type u_1
inst✝² : LinearOrderedField 𝕜
inst✝¹ : DecidableEq α
inst✝ : Fintype α
𝒜 : Finset (Finset α)
hr : zero ≠ 0
hr' : zero ≤ Fintype.card α
h𝒜 : card 𝒜 * zero ≤ card ((∂ ) 𝒜) * (Fintype.card α - zero + 1)
⊢ card 𝒜 * Nat.choose (Fintype.card α) (zero - 1) ≤ card ((∂ ) 𝒜) * Nat.choose (Fintype.card α) zero

tactic: simp [mul_assoc, Nat.choose_succ_right_eq]
state_before: case h.e'_3
𝕜 : Type u_2
α : Type u_1
inst✝² : LinearOrderedField 𝕜
inst✝¹ : DecidableEq α
inst✝ : Fintype α
𝒜 : Finset (Finset α)
r : ℕ
hr : r + 1 ≠ 0
hr' : r + 1 ≤ Fintype.card α
h𝒜 : card 𝒜 * (r + 1) ≤ card ((∂ ) 𝒜) * (Fintype.card α - r)
⊢ card 𝒜 * Nat.choose (Fintype.card α) (r + 1 - 1) * (r + 1) = card 𝒜 * (r + 1) * Nat.choose (Fintype.card α) r

tactic: exact Or.inl (mul_comm _ _)
state_before: case h.e'_3
𝕜 : Type u_2
α : Type u_1
inst✝² : LinearOrderedField 𝕜
inst✝¹ : DecidableEq α
inst✝ : Fintype α
𝒜 : Finset (Finset α)
r : ℕ
hr : r + 1 ≠ 0
hr' : r + 1 ≤ Fintype.card α
h𝒜 : card 𝒜 * (r + 1) ≤ card ((∂ ) 𝒜) * (Fintype.card α - r)
⊢ Nat.choose (Fintype.card α) r * (r + 1) = (r + 1) * Nat.choose (Fintype.card α) r ∨ 𝒜 = ∅

tactic: simp only [mul_assoc, choose_succ_right_eq, mul_eq_mul_left_iff]
state_before: case h.e'_4
𝕜 : Type u_2
α : Type u_1
inst✝² : LinearOrderedField 𝕜
inst✝¹ : DecidableEq α
inst✝ : Fintype α
𝒜 : Finset (Finset α)
r : ℕ
hr : r + 1 ≠ 0
hr' : r + 1 ≤ Fintype.card α
h𝒜 : card 𝒜 * (r + 1) ≤ card ((∂ ) 𝒜) * (Fintype.card α - r)
⊢ card ((∂ ) 𝒜) * Nat.choose (Fintype.card α) (r + 1) * (r + 1) =
    card ((∂ ) 𝒜) * (Fintype.card α - r) * Nat.choose (Fintype.card α) r

tactic: exact Or.inl (mul_comm _ _)
state_before: case h.e'_4
𝕜 : Type u_2
α : Type u_1
inst✝² : LinearOrderedField 𝕜
inst✝¹ : DecidableEq α
inst✝ : Fintype α
𝒜 : Finset (Finset α)
r : ℕ
hr : r + 1 ≠ 0
hr' : r + 1 ≤ Fintype.card α
h𝒜 : card 𝒜 * (r + 1) ≤ card ((∂ ) 𝒜) * (Fintype.card α - r)
⊢ Nat.choose (Fintype.card α) r * (Fintype.card α - r) = (Fintype.card α - r) * Nat.choose (Fintype.card α) r ∨
    card ((∂ ) 𝒜) = 0

tactic: exact Nat.choose_pos hr'
state_before: case inr.b0
𝕜 : Type u_2
α : Type u_1
inst✝² : LinearOrderedField 𝕜
inst✝¹ : DecidableEq α
inst✝ : Fintype α
𝒜 : Finset (Finset α)
r : ℕ
hr : r ≠ 0
hr' : r ≤ Fintype.card α
h𝒜 : card 𝒜 * r ≤ card ((∂ ) 𝒜) * (Fintype.card α - r + 1)
⊢ 0 < Nat.choose (Fintype.card α) r

tactic: exact Nat.choose_pos (r.pred_le.trans hr')
state_before: case inr.d0
𝕜 : Type u_2
α : Type u_1
inst✝² : LinearOrderedField 𝕜
inst✝¹ : DecidableEq α
inst✝ : Fintype α
𝒜 : Finset (Finset α)
r : ℕ
hr : r ≠ 0
hr' : r ≤ Fintype.card α
h𝒜 : card 𝒜 * r ≤ card ((∂ ) 𝒜) * (Fintype.card α - r + 1)
⊢ 0 < Nat.choose (Fintype.card α) (r - 1)