Theorem: Finset.IsAntichain.sperner
File: Mathlib/Combinatorics/SetFamily/LYM.lean

tactic: rw [Iic_eq_Icc, ← Ico_succ_right, bot_eq_zero, Ico_zero_eq_range]
state_before: 𝕜 : Type u_1
α : Type u_2
inst✝¹ : LinearOrderedField 𝕜
inst✝ : Fintype α
𝒜 : Finset (Finset α)
h𝒜 : IsAntichain (fun x x_1 => x ⊆ x_1) ↑𝒜
⊢ ∑ r ∈ Iic (Fintype.card α), ↑(𝒜 # r).card / ↑((Fintype.card α).choose (Fintype.card α / 2)) ≤ 1
state_after: 𝕜 : Type u_1
α : Type u_2
inst✝¹ : LinearOrderedField 𝕜
inst✝ : Fintype α
𝒜 : Finset (Finset α)
h𝒜 : IsAntichain (fun x x_1 => x ⊆ x_1) ↑𝒜
⊢ ∑ r ∈ range (Fintype.card α).succ, ↑(𝒜 # r).card / ↑((Fintype.card α).choose (Fintype.card α / 2)) ≤ 1

tactic: refine (sum_le_sum fun r hr => ?_).trans (sum_card_slice_div_choose_le_one h𝒜)
state_before: 𝕜 : Type u_1
α : Type u_2
inst✝¹ : LinearOrderedField 𝕜
inst✝ : Fintype α
𝒜 : Finset (Finset α)
h𝒜 : IsAntichain (fun x x_1 => x ⊆ x_1) ↑𝒜
⊢ ∑ r ∈ range (Fintype.card α).succ, ↑(𝒜 # r).card / ↑((Fintype.card α).choose (Fintype.card α / 2)) ≤ 1
state_after: 𝕜 : Type u_1
α : Type u_2
inst✝¹ : LinearOrderedField 𝕜
inst✝ : Fintype α
𝒜 : Finset (Finset α)
h𝒜 : IsAntichain (fun x x_1 => x ⊆ x_1) ↑𝒜
r : ℕ
hr : r ∈ range (Fintype.card α).succ
⊢ ↑(𝒜 # r).card / ↑((Fintype.card α).choose (Fintype.card α / 2)) ≤ ↑(𝒜 # r).card / ↑((Fintype.card α).choose r)

tactic: rw [mem_range] at hr
state_before: 𝕜 : Type u_1
α : Type u_2
inst✝¹ : LinearOrderedField 𝕜
inst✝ : Fintype α
𝒜 : Finset (Finset α)
h𝒜 : IsAntichain (fun x x_1 => x ⊆ x_1) ↑𝒜
r : ℕ
hr : r ∈ range (Fintype.card α).succ
⊢ ↑(𝒜 # r).card / ↑((Fintype.card α).choose (Fintype.card α / 2)) ≤ ↑(𝒜 # r).card / ↑((Fintype.card α).choose r)
state_after: 𝕜 : Type u_1
α : Type u_2
inst✝¹ : LinearOrderedField 𝕜
inst✝ : Fintype α
𝒜 : Finset (Finset α)
h𝒜 : IsAntichain (fun x x_1 => x ⊆ x_1) ↑𝒜
r : ℕ
hr : r < (Fintype.card α).succ
⊢ ↑(𝒜 # r).card / ↑((Fintype.card α).choose (Fintype.card α / 2)) ≤ ↑(𝒜 # r).card / ↑((Fintype.card α).choose r)

tactic: refine div_le_div_of_nonneg_left ?_ ?_ ?_ <;> norm_cast
state_before: 𝕜 : Type u_1
α : Type u_2
inst✝¹ : LinearOrderedField 𝕜
inst✝ : Fintype α
𝒜 : Finset (Finset α)
h𝒜 : IsAntichain (fun x x_1 => x ⊆ x_1) ↑𝒜
r : ℕ
hr : r < (Fintype.card α).succ
⊢ ↑(𝒜 # r).card / ↑((Fintype.card α).choose (Fintype.card α / 2)) ≤ ↑(𝒜 # r).card / ↑((Fintype.card α).choose r)
state_after: case refine_1
𝕜 : Type u_1
α : Type u_2
inst✝¹ : LinearOrderedField 𝕜
inst✝ : Fintype α
𝒜 : Finset (Finset α)
h𝒜 : IsAntichain (fun x x_1 => x ⊆ x_1) ↑𝒜
r : ℕ
hr : r < (Fintype.card α).succ
⊢ 0 ≤ (𝒜 # r).card

case refine_2
𝕜 : Type u_1
α : Type u_2
inst✝¹ : LinearOrderedField 𝕜
inst✝ : Fintype α
𝒜 : Finset (Finset α)
h𝒜 : IsAntichain (fun x x_1 => x ⊆ x_1) ↑𝒜
r : ℕ
hr : r < (Fintype.card α).succ
⊢ 0 < (Fintype.card α).choose r

case refine_3
𝕜 : Type u_1
α : Type u_2
inst✝¹ : LinearOrderedField 𝕜
inst✝ : Fintype α
𝒜 : Finset (Finset α)
h𝒜 : IsAntichain (fun x x_1 => x ⊆ x_1) ↑𝒜
r : ℕ
hr : r < (Fintype.card α).succ
⊢ (Fintype.card α).choose r ≤ (Fintype.card α).choose (Fintype.card α / 2)

tactic: rw [← sum_div, ← Nat.cast_sum, div_le_one] at this
state_before: 𝕜 : Type u_1
α : Type u_2
inst✝¹ : LinearOrderedField 𝕜
inst✝ : Fintype α
𝒜 : Finset (Finset α)
h𝒜 : IsAntichain (fun x x_1 => x ⊆ x_1) ↑𝒜
this : ∑ r ∈ Iic (Fintype.card α), ↑(𝒜 # r).card / ↑((Fintype.card α).choose (Fintype.card α / 2)) ≤ 1
⊢ 𝒜.card ≤ (Fintype.card α).choose (Fintype.card α / 2)
state_after: 𝕜 : Type u_1
α : Type u_2
inst✝¹ : LinearOrderedField 𝕜
inst✝ : Fintype α
𝒜 : Finset (Finset α)
h𝒜 : IsAntichain (fun x x_1 => x ⊆ x_1) ↑𝒜
this : ↑(∑ x ∈ Iic (Fintype.card α), (𝒜 # x).card) ≤ ↑((Fintype.card α).choose (Fintype.card α / 2))
⊢ 𝒜.card ≤ (Fintype.card α).choose (Fintype.card α / 2)

𝕜 : Type u_1
α : Type u_2
inst✝¹ : LinearOrderedField 𝕜
inst✝ : Fintype α
𝒜 : Finset (Finset α)
h𝒜 : IsAntichain (fun x x_1 => x ⊆ x_1) ↑𝒜
this : ↑(∑ x ∈ Iic (Fintype.card α), (𝒜 # x).card) / ↑((Fintype.card α).choose (Fintype.card α / 2)) ≤ 1
⊢ 0 < ↑((Fintype.card α).choose (Fintype.card α / 2))

tactic: simp only [cast_pos]
state_before: 𝕜 : Type u_1
α : Type u_2
inst✝¹ : LinearOrderedField 𝕜
inst✝ : Fintype α
𝒜 : Finset (Finset α)
h𝒜 : IsAntichain (fun x x_1 => x ⊆ x_1) ↑𝒜
this : ↑(∑ x ∈ Iic (Fintype.card α), (𝒜 # x).card) / ↑((Fintype.card α).choose (Fintype.card α / 2)) ≤ 1
⊢ 0 < ↑((Fintype.card α).choose (Fintype.card α / 2))
state_after: 𝕜 : Type u_1
α : Type u_2
inst✝¹ : LinearOrderedField 𝕜
inst✝ : Fintype α
𝒜 : Finset (Finset α)
h𝒜 : IsAntichain (fun x x_1 => x ⊆ x_1) ↑𝒜
this : ↑(∑ x ∈ Iic (Fintype.card α), (𝒜 # x).card) / ↑((Fintype.card α).choose (Fintype.card α / 2)) ≤ 1
⊢ 0 < (Fintype.card α).choose (Fintype.card α / 2)

tactic: exact choose_pos (Nat.div_le_self _ _)
state_before: 𝕜 : Type u_1
α : Type u_2
inst✝¹ : LinearOrderedField 𝕜
inst✝ : Fintype α
𝒜 : Finset (Finset α)
h𝒜 : IsAntichain (fun x x_1 => x ⊆ x_1) ↑𝒜
this : ↑(∑ x ∈ Iic (Fintype.card α), (𝒜 # x).card) / ↑((Fintype.card α).choose (Fintype.card α / 2)) ≤ 1
⊢ 0 < (Fintype.card α).choose (Fintype.card α / 2)
state_after: no goals

tactic: simp only [cast_le] at this
state_before: 𝕜 : Type u_1
α : Type u_2
inst✝¹ : LinearOrderedField 𝕜
inst✝ : Fintype α
𝒜 : Finset (Finset α)
h𝒜 : IsAntichain (fun x x_1 => x ⊆ x_1) ↑𝒜
this : ↑(∑ x ∈ Iic (Fintype.card α), (𝒜 # x).card) ≤ ↑((Fintype.card α).choose (Fintype.card α / 2))
⊢ 𝒜.card ≤ (Fintype.card α).choose (Fintype.card α / 2)
state_after: 𝕜 : Type u_1
α : Type u_2
inst✝¹ : LinearOrderedField 𝕜
inst✝ : Fintype α
𝒜 : Finset (Finset α)
h𝒜 : IsAntichain (fun x x_1 => x ⊆ x_1) ↑𝒜
this : ∑ x ∈ Iic (Fintype.card α), (𝒜 # x).card ≤ (Fintype.card α).choose (Fintype.card α / 2)
⊢ 𝒜.card ≤ (Fintype.card α).choose (Fintype.card α / 2)

tactic: rwa [sum_card_slice] at this
state_before: 𝕜 : Type u_1
α : Type u_2
inst✝¹ : LinearOrderedField 𝕜
inst✝ : Fintype α
𝒜 : Finset (Finset α)
h𝒜 : IsAntichain (fun x x_1 => x ⊆ x_1) ↑𝒜
this : ∑ x ∈ Iic (Fintype.card α), (𝒜 # x).card ≤ (Fintype.card α).choose (Fintype.card α / 2)
⊢ 𝒜.card ≤ (Fintype.card α).choose (Fintype.card α / 2)
state_after: no goals

tactic: exact Nat.zero_le _
state_before: case refine_1
𝕜 : Type u_1
α : Type u_2
inst✝¹ : LinearOrderedField 𝕜
inst✝ : Fintype α
𝒜 : Finset (Finset α)
h𝒜 : IsAntichain (fun x x_1 => x ⊆ x_1) ↑𝒜
r : ℕ
hr : r < (Fintype.card α).succ
⊢ 0 ≤ (𝒜 # r).card
state_after: no goals

tactic: exact choose_pos (Nat.lt_succ_iff.1 hr)
state_before: case refine_2
𝕜 : Type u_1
α : Type u_2
inst✝¹ : LinearOrderedField 𝕜
inst✝ : Fintype α
𝒜 : Finset (Finset α)
h𝒜 : IsAntichain (fun x x_1 => x ⊆ x_1) ↑𝒜
r : ℕ
hr : r < (Fintype.card α).succ
⊢ 0 < (Fintype.card α).choose r
state_after: no goals

tactic: exact choose_le_middle _ _
state_before: case refine_3
𝕜 : Type u_1
α : Type u_2
inst✝¹ : LinearOrderedField 𝕜
inst✝ : Fintype α
𝒜 : Finset (Finset α)
h𝒜 : IsAntichain (fun x x_1 => x ⊆ x_1) ↑𝒜
r : ℕ
hr : r < (Fintype.card α).succ
⊢ (Fintype.card α).choose r ≤ (Fintype.card α).choose (Fintype.card α / 2)
state_after: no goals