-- Mathlib/Combinatorics/SetFamily/LYM.lean
theorem le_card_falling_div_choose [Fintype α] (hk : k ≤ Fintype.card α)
    (h𝒜 : IsAntichain (· ⊆ ·) (𝒜 : Set (Finset α))) :
    (∑ r ∈ range (k + 1),
        (#(𝒜 # (Fintype.card α - r)) : 𝕜) / (Fintype.card α).choose (Fintype.card α - r)) ≤
      (falling (Fintype.card α - k) 𝒜).card / (Fintype.card α).choose (Fintype.card α - k)

Proof state:
case succ
𝕜 : Type u_1
α : Type u_2
inst✝² : LinearOrderedField 𝕜
inst✝¹ : DecidableEq α
k✝ : ℕ
𝒜 : Finset (Finset α)
inst✝ : Fintype α
h𝒜 : IsAntichain (fun x1 x2 => x1 ⊆ x2) ↑𝒜
k : ℕ
ih :
  k ≤ Fintype.card α →
    ∑ r ∈ range (k + 1), ↑(#(𝒜 # (Fintype.card α - r))) / ↑((Fintype.card α).choose (Fintype.card α - r)) ≤
      ↑(#(falling (Fintype.card α - k) 𝒜)) / ↑((Fintype.card α).choose (Fintype.card α - k))
hk : k + 1 ≤ Fintype.card α
⊢ ∑ r ∈ range (k + 1 + 1), ↑(#(𝒜 # (Fintype.card α - r))) / ↑((Fintype.card α).choose (Fintype.card α - r)) ≤
    ↑(#(falling (Fintype.card α - (k + 1)) 𝒜)) / ↑((Fintype.card α).choose (Fintype.card α - (k + 1)))

Tactic:
rw [sum_range_succ, ← slice_union_shadow_falling_succ,
  card_union_of_disjoint (IsAntichain.disjoint_slice_shadow_falling h𝒜),
  cast_add, _root_.add_div, add_comm]

Result:
case succ
𝕜 : Type u_1
α : Type u_2
inst✝² : LinearOrderedField 𝕜
inst✝¹ : DecidableEq α
k✝ : ℕ
𝒜 : Finset (Finset α)
inst✝ : Fintype α
h𝒜 : IsAntichain (fun x1 x2 => x1 ⊆ x2) ↑𝒜
k : ℕ
ih :
  k ≤ Fintype.card α →
    ∑ r ∈ range (k + 1), ↑(#(𝒜 # (Fintype.card α - r))) / ↑((Fintype.card α).choose (Fintype.card α - r)) ≤
      ↑(#(falling (Fintype.card α - k) 𝒜)) / ↑((Fintype.card α).choose (Fintype.card α - k))
hk : k + 1 ≤ Fintype.card α
⊢ ↑(#(𝒜 # (Fintype.card α - (k + 1)))) / ↑((Fintype.card α).choose (Fintype.card α - (k + 1))) +
      ∑ x ∈ range (k + 1), ↑(#(𝒜 # (Fintype.card α - x))) / ↑((Fintype.card α).choose (Fintype.card α - x)) ≤
    ↑(#(𝒜 # (Fintype.card α - (k + 1)))) / ↑((Fintype.card α).choose (Fintype.card α - (k + 1))) +
      ↑(#(∂ (falling (Fintype.card α - (k + 1) + 1) 𝒜))) / ↑((Fintype.card α).choose (Fintype.card α - (k + 1)))

Proof state:
case succ
𝕜 : Type u_1
α : Type u_2
inst✝² : LinearOrderedField 𝕜
inst✝¹ : DecidableEq α
k✝ : ℕ
𝒜 : Finset (Finset α)
inst✝ : Fintype α
h𝒜 : IsAntichain (fun x1 x2 => x1 ⊆ x2) ↑𝒜
k : ℕ
ih :
  k ≤ Fintype.card α →
    ∑ r ∈ range (k + 1), ↑(#(𝒜 # (Fintype.card α - r))) / ↑((Fintype.card α).choose (Fintype.card α - r)) ≤
      ↑(#(falling (Fintype.card α - k) 𝒜)) / ↑((Fintype.card α).choose (Fintype.card α - k))
hk : k + 1 ≤ Fintype.card α
⊢ ↑(#(𝒜 # (Fintype.card α - (k + 1)))) / ↑((Fintype.card α).choose (Fintype.card α - (k + 1))) +
      ∑ x ∈ range (k + 1), ↑(#(𝒜 # (Fintype.card α - x))) / ↑((Fintype.card α).choose (Fintype.card α - x)) ≤
    ↑(#(𝒜 # (Fintype.card α - (k + 1)))) / ↑((Fintype.card α).choose (Fintype.card α - (k + 1))) +
      ↑(#(∂ (falling (Fintype.card α - (k + 1) + 1) 𝒜))) / ↑((Fintype.card α).choose (Fintype.card α - (k + 1)))

Tactic:
rw [← tsub_tsub, tsub_add_cancel_of_le (le_tsub_of_add_le_left hk)]

Result:
case succ
𝕜 : Type u_1
α : Type u_2
inst✝² : LinearOrderedField 𝕜
inst✝¹ : DecidableEq α
k✝ : ℕ
𝒜 : Finset (Finset α)
inst✝ : Fintype α
h𝒜 : IsAntichain (fun x1 x2 => x1 ⊆ x2) ↑𝒜
k : ℕ
ih :
  k ≤ Fintype.card α →
    ∑ r ∈ range (k + 1), ↑(#(𝒜 # (Fintype.card α - r))) / ↑((Fintype.card α).choose (Fintype.card α - r)) ≤
      ↑(#(falling (Fintype.card α - k) 𝒜)) / ↑((Fintype.card α).choose (Fintype.card α - k))
hk : k + 1 ≤ Fintype.card α
⊢ ↑(#(𝒜 # (Fintype.card α - k - 1))) / ↑((Fintype.card α).choose (Fintype.card α - k - 1)) +
      ∑ x ∈ range (k + 1), ↑(#(𝒜 # (Fintype.card α - x))) / ↑((Fintype.card α).choose (Fintype.card α - x)) ≤
    ↑(#(𝒜 # (Fintype.card α - k - 1))) / ↑((Fintype.card α).choose (Fintype.card α - k - 1)) +
      ↑(#(∂ (falling (Fintype.card α - k) 𝒜))) / ↑((Fintype.card α).choose (Fintype.card α - k - 1))

Proof state:
case zero
𝕜 : Type u_1
α : Type u_2
inst✝² : LinearOrderedField 𝕜
inst✝¹ : DecidableEq α
k : ℕ
𝒜 : Finset (Finset α)
inst✝ : Fintype α
h𝒜 : IsAntichain (fun x1 x2 => x1 ⊆ x2) ↑𝒜
hk : 0 ≤ Fintype.card α
⊢ #(𝒜 # Fintype.card α) ≤ #(falling (Fintype.card α) 𝒜)

Tactic:
exact card_le_card (slice_subset_falling _ _)

Result:
no goals

Proof state:
case zero
𝕜 : Type u_1
α : Type u_2
inst✝² : LinearOrderedField 𝕜
inst✝¹ : DecidableEq α
k : ℕ
𝒜 : Finset (Finset α)
inst✝ : Fintype α
h𝒜 : IsAntichain (fun x1 x2 => x1 ⊆ x2) ↑𝒜
hk : 0 ≤ Fintype.card α
⊢ ∑ r ∈ range (0 + 1), ↑(#(𝒜 # (Fintype.card α - r))) / ↑((Fintype.card α).choose (Fintype.card α - r)) ≤
    ↑(#(falling (Fintype.card α - 0) 𝒜)) / ↑((Fintype.card α).choose (Fintype.card α - 0))

Tactic:
simp only [tsub_zero, cast_one, cast_le, sum_singleton, div_one, choose_self, range_one,
  zero_eq, zero_add, range_one, sum_singleton, nonpos_iff_eq_zero, tsub_zero,
  choose_self, cast_one, div_one, cast_le]

Result:
case zero
𝕜 : Type u_1
α : Type u_2
inst✝² : LinearOrderedField 𝕜
inst✝¹ : DecidableEq α
k : ℕ
𝒜 : Finset (Finset α)
inst✝ : Fintype α
h𝒜 : IsAntichain (fun x1 x2 => x1 ⊆ x2) ↑𝒜
hk : 0 ≤ Fintype.card α
⊢ #(𝒜 # Fintype.card α) ≤ #(falling (Fintype.card α) 𝒜)

Proof state:
𝕜 : Type u_1
α : Type u_2
inst✝² : LinearOrderedField 𝕜
inst✝¹ : DecidableEq α
k : ℕ
𝒜 : Finset (Finset α)
inst✝ : Fintype α
hk : k ≤ Fintype.card α
h𝒜 : IsAntichain (fun x1 x2 => x1 ⊆ x2) ↑𝒜
⊢ ∑ r ∈ range (k + 1), ↑(#(𝒜 # (Fintype.card α - r))) / ↑((Fintype.card α).choose (Fintype.card α - r)) ≤
    ↑(#(falling (Fintype.card α - k) 𝒜)) / ↑((Fintype.card α).choose (Fintype.card α - k))

Tactic:
induction k with
| zero =>
  simp only [tsub_zero, cast_one, cast_le, sum_singleton, div_one, choose_self, range_one,
    zero_eq, zero_add, range_one, sum_singleton, nonpos_iff_eq_zero, tsub_zero,
    choose_self, cast_one, div_one, cast_le]
  exact card_le_card (slice_subset_falling _ _)
| succ k ih =>
  rw [sum_range_succ, ← slice_union_shadow_falling_succ,
    card_union_of_disjoint (IsAntichain.disjoint_slice_shadow_falling h𝒜),
    cast_add, _root_.add_div, add_comm]
  rw [← tsub_tsub, tsub_add_cancel_of_le (le_tsub_of_add_le_left hk)]
  exact add_le_add_left ((ih <| le_of_succ_le hk).trans <|
    card_div_choose_le_card_shadow_div_choose
      (tsub_pos_iff_lt.2 <| Nat.succ_le_iff.1 hk).ne' <| sized_falling _ _) _

Result:
no goals

Proof state:
case succ
𝕜 : Type u_1
α : Type u_2
inst✝² : LinearOrderedField 𝕜
inst✝¹ : DecidableEq α
k✝ : ℕ
𝒜 : Finset (Finset α)
inst✝ : Fintype α
h𝒜 : IsAntichain (fun x1 x2 => x1 ⊆ x2) ↑𝒜
k : ℕ
ih :
  k ≤ Fintype.card α →
    ∑ r ∈ range (k + 1), ↑(#(𝒜 # (Fintype.card α - r))) / ↑((Fintype.card α).choose (Fintype.card α - r)) ≤
      ↑(#(falling (Fintype.card α - k) 𝒜)) / ↑((Fintype.card α).choose (Fintype.card α - k))
hk : k + 1 ≤ Fintype.card α
⊢ ↑(#(𝒜 # (Fintype.card α - k - 1))) / ↑((Fintype.card α).choose (Fintype.card α - k - 1)) +
      ∑ x ∈ range (k + 1), ↑(#(𝒜 # (Fintype.card α - x))) / ↑((Fintype.card α).choose (Fintype.card α - x)) ≤
    ↑(#(𝒜 # (Fintype.card α - k - 1))) / ↑((Fintype.card α).choose (Fintype.card α - k - 1)) +
      ↑(#(∂ (falling (Fintype.card α - k) 𝒜))) / ↑((Fintype.card α).choose (Fintype.card α - k - 1))

Tactic:
exact add_le_add_left ((ih <| le_of_succ_le hk).trans <|
  card_div_choose_le_card_shadow_div_choose
    (tsub_pos_iff_lt.2 <| Nat.succ_le_iff.1 hk).ne' <| sized_falling _ _) _

Result:
no goals