[GOAL]
α : Type u_1
inst✝¹ : CommGroup α
inst✝ : DecidableEq α
A✝ B✝ C✝ A B C : Finset α
⊢ card (A / C) * card B ≤ card (A / B) * card (B / C)
[PROOFSTEP]
rw [← card_product (A / B), ← mul_one ((A / B) ×ˢ (B / C)).card]
[GOAL]
α : Type u_1
inst✝¹ : CommGroup α
inst✝ : DecidableEq α
A✝ B✝ C✝ A B C : Finset α
⊢ card (A / C) * card B ≤ card ((A / B) ×ˢ (B / C)) * 1
[PROOFSTEP]
refine'
  card_mul_le_card_mul (fun b ac ↦ ac.1 * ac.2 = b) (fun x hx ↦ _) fun x _ ↦
    card_le_one_iff.2 fun hu hv ↦ ((mem_bipartiteBelow _).1 hu).2.symm.trans ((mem_bipartiteBelow _).1 hv).2
[GOAL]
α : Type u_1
inst✝¹ : CommGroup α
inst✝ : DecidableEq α
A✝ B✝ C✝ A B C : Finset α
x : α
hx : x ∈ A / C
⊢ card B ≤ card (bipartiteAbove (fun b ac => ac.fst * ac.snd = b) ((A / B) ×ˢ (B / C)) x)
[PROOFSTEP]
obtain ⟨a, c, ha, hc, rfl⟩ := mem_div.1 hx
[GOAL]
case intro.intro.intro.intro
α : Type u_1
inst✝¹ : CommGroup α
inst✝ : DecidableEq α
A✝ B✝ C✝ A B C : Finset α
a c : α
ha : a ∈ A
hc : c ∈ C
hx : a / c ∈ A / C
⊢ card B ≤ card (bipartiteAbove (fun b ac => ac.fst * ac.snd = b) ((A / B) ×ˢ (B / C)) (a / c))
[PROOFSTEP]
refine' card_le_card_of_inj_on (fun b ↦ (a / b, b / c)) (fun b hb ↦ _) fun b₁ _ b₂ _ h ↦ _
[GOAL]
case intro.intro.intro.intro.refine'_1
α : Type u_1
inst✝¹ : CommGroup α
inst✝ : DecidableEq α
A✝ B✝ C✝ A B C : Finset α
a c : α
ha : a ∈ A
hc : c ∈ C
hx : a / c ∈ A / C
b : α
hb : b ∈ B
⊢ (fun b => (a / b, b / c)) b ∈ bipartiteAbove (fun b ac => ac.fst * ac.snd = b) ((A / B) ×ˢ (B / C)) (a / c)
[PROOFSTEP]
rw [mem_bipartiteAbove]
[GOAL]
case intro.intro.intro.intro.refine'_1
α : Type u_1
inst✝¹ : CommGroup α
inst✝ : DecidableEq α
A✝ B✝ C✝ A B C : Finset α
a c : α
ha : a ∈ A
hc : c ∈ C
hx : a / c ∈ A / C
b : α
hb : b ∈ B
⊢ (fun b => (a / b, b / c)) b ∈ (A / B) ×ˢ (B / C) ∧
    ((fun b => (a / b, b / c)) b).fst * ((fun b => (a / b, b / c)) b).snd = a / c
[PROOFSTEP]
exact ⟨mk_mem_product (div_mem_div ha hb) (div_mem_div hb hc), div_mul_div_cancel' _ _ _⟩
[GOAL]
case intro.intro.intro.intro.refine'_2
α : Type u_1
inst✝¹ : CommGroup α
inst✝ : DecidableEq α
A✝ B✝ C✝ A B C : Finset α
a c : α
ha : a ∈ A
hc : c ∈ C
hx : a / c ∈ A / C
b₁ : α
x✝¹ : b₁ ∈ B
b₂ : α
x✝ : b₂ ∈ B
h : (fun b => (a / b, b / c)) b₁ = (fun b => (a / b, b / c)) b₂
⊢ b₁ = b₂
[PROOFSTEP]
exact div_right_injective (Prod.ext_iff.1 h).1
[GOAL]
α : Type u_1
inst✝¹ : CommGroup α
inst✝ : DecidableEq α
A✝ B✝ C✝ A B C : Finset α
⊢ card (A / C) * card B ≤ card (A * B) * card (B * C)
[PROOFSTEP]
rw [← div_inv_eq_mul, ← card_inv B, ← card_inv (B * C), mul_inv, ← div_eq_mul_inv]
[GOAL]
α : Type u_1
inst✝¹ : CommGroup α
inst✝ : DecidableEq α
A✝ B✝ C✝ A B C : Finset α
⊢ card (A / C) * card B⁻¹ ≤ card (A / B⁻¹) * card (B⁻¹ / C)
[PROOFSTEP]
exact card_div_mul_le_card_div_mul_card_div _ _ _
[GOAL]
α : Type u_1
inst✝¹ : CommGroup α
inst✝ : DecidableEq α
A✝ B✝ C✝ A B C : Finset α
⊢ card (A * C) * card B ≤ card (A / B) * card (B * C)
[PROOFSTEP]
rw [← div_inv_eq_mul, ← div_inv_eq_mul B]
[GOAL]
α : Type u_1
inst✝¹ : CommGroup α
inst✝ : DecidableEq α
A✝ B✝ C✝ A B C : Finset α
⊢ card (A / C⁻¹) * card B ≤ card (A / B) * card (B / C⁻¹)
[PROOFSTEP]
exact card_div_mul_le_card_div_mul_card_div _ _ _
[GOAL]
α : Type u_1
inst✝¹ : CommGroup α
inst✝ : DecidableEq α
A✝ B✝ C✝ A B C : Finset α
⊢ card (A * C) * card B ≤ card (A * B) * card (B / C)
[PROOFSTEP]
rw [← div_inv_eq_mul, div_eq_mul_inv B]
[GOAL]
α : Type u_1
inst✝¹ : CommGroup α
inst✝ : DecidableEq α
A✝ B✝ C✝ A B C : Finset α
⊢ card (A / C⁻¹) * card B ≤ card (A * B) * card (B * C⁻¹)
[PROOFSTEP]
exact card_div_mul_le_card_mul_mul_card_mul _ _ _
[GOAL]
α : Type u_1
inst✝¹ : CommGroup α
inst✝ : DecidableEq α
A B C✝ C : Finset α
hA : ∀ (A' : Finset α), A' ⊆ A → card (A * B) * card A' ≤ card (A' * B) * card A
⊢ card (A * B * C) * card A ≤ card (A * B) * card (A * C)
[PROOFSTEP]
induction' C using Finset.induction_on with x C _ ih
[GOAL]
case empty
α : Type u_1
inst✝¹ : CommGroup α
inst✝ : DecidableEq α
A B C : Finset α
hA : ∀ (A' : Finset α), A' ⊆ A → card (A * B) * card A' ≤ card (A' * B) * card A
⊢ card (A * B * ∅) * card A ≤ card (A * B) * card (A * ∅)
[PROOFSTEP]
simp
[GOAL]
case insert
α : Type u_1
inst✝¹ : CommGroup α
inst✝ : DecidableEq α
A B C✝ : Finset α
hA : ∀ (A' : Finset α), A' ⊆ A → card (A * B) * card A' ≤ card (A' * B) * card A
x : α
C : Finset α
a✝ : ¬x ∈ C
ih : card (A * B * C) * card A ≤ card (A * B) * card (A * C)
⊢ card (A * B * insert x C) * card A ≤ card (A * B) * card (A * insert x C)
[PROOFSTEP]
set A' := A ∩ (A * C / { x }) with hA'
[GOAL]
case insert
α : Type u_1
inst✝¹ : CommGroup α
inst✝ : DecidableEq α
A B C✝ : Finset α
hA : ∀ (A' : Finset α), A' ⊆ A → card (A * B) * card A' ≤ card (A' * B) * card A
x : α
C : Finset α
a✝ : ¬x ∈ C
ih : card (A * B * C) * card A ≤ card (A * B) * card (A * C)
A' : Finset α := A ∩ (A * C / {x})
hA' : A' = A ∩ (A * C / {x})
⊢ card (A * B * insert x C) * card A ≤ card (A * B) * card (A * insert x C)
[PROOFSTEP]
set C' := insert x C with hC'
[GOAL]
case insert
α : Type u_1
inst✝¹ : CommGroup α
inst✝ : DecidableEq α
A B C✝ : Finset α
hA : ∀ (A' : Finset α), A' ⊆ A → card (A * B) * card A' ≤ card (A' * B) * card A
x : α
C : Finset α
a✝ : ¬x ∈ C
ih : card (A * B * C) * card A ≤ card (A * B) * card (A * C)
A' : Finset α := A ∩ (A * C / {x})
hA' : A' = A ∩ (A * C / {x})
C' : Finset α := insert x C
hC' : C' = insert x C
⊢ card (A * B * C') * card A ≤ card (A * B) * card (A * C')
[PROOFSTEP]
have h₀ : A' * { x } = A * { x } ∩ (A * C) := by rw [hA', inter_mul_singleton, (isUnit_singleton x).div_mul_cancel]
[GOAL]
α : Type u_1
inst✝¹ : CommGroup α
inst✝ : DecidableEq α
A B C✝ : Finset α
hA : ∀ (A' : Finset α), A' ⊆ A → card (A * B) * card A' ≤ card (A' * B) * card A
x : α
C : Finset α
a✝ : ¬x ∈ C
ih : card (A * B * C) * card A ≤ card (A * B) * card (A * C)
A' : Finset α := A ∩ (A * C / {x})
hA' : A' = A ∩ (A * C / {x})
C' : Finset α := insert x C
hC' : C' = insert x C
⊢ A' * {x} = A * {x} ∩ (A * C)
[PROOFSTEP]
rw [hA', inter_mul_singleton, (isUnit_singleton x).div_mul_cancel]
[GOAL]
case insert
α : Type u_1
inst✝¹ : CommGroup α
inst✝ : DecidableEq α
A B C✝ : Finset α
hA : ∀ (A' : Finset α), A' ⊆ A → card (A * B) * card A' ≤ card (A' * B) * card A
x : α
C : Finset α
a✝ : ¬x ∈ C
ih : card (A * B * C) * card A ≤ card (A * B) * card (A * C)
A' : Finset α := A ∩ (A * C / {x})
hA' : A' = A ∩ (A * C / {x})
C' : Finset α := insert x C
hC' : C' = insert x C
h₀ : A' * {x} = A * {x} ∩ (A * C)
⊢ card (A * B * C') * card A ≤ card (A * B) * card (A * C')
[PROOFSTEP]
have h₁ : A * B * C' = A * B * C ∪ (A * B * { x }) \ (A' * B * { x }) :=
  by
  rw [hC', insert_eq, union_comm, mul_union]
  refine' (sup_sdiff_eq_sup _).symm
  rw [mul_right_comm, mul_right_comm A, h₀]
  exact mul_subset_mul_right (inter_subset_right _ _)
[GOAL]
α : Type u_1
inst✝¹ : CommGroup α
inst✝ : DecidableEq α
A B C✝ : Finset α
hA : ∀ (A' : Finset α), A' ⊆ A → card (A * B) * card A' ≤ card (A' * B) * card A
x : α
C : Finset α
a✝ : ¬x ∈ C
ih : card (A * B * C) * card A ≤ card (A * B) * card (A * C)
A' : Finset α := A ∩ (A * C / {x})
hA' : A' = A ∩ (A * C / {x})
C' : Finset α := insert x C
hC' : C' = insert x C
h₀ : A' * {x} = A * {x} ∩ (A * C)
⊢ A * B * C' = A * B * C ∪ (A * B * {x}) \ (A' * B * {x})
[PROOFSTEP]
rw [hC', insert_eq, union_comm, mul_union]
[GOAL]
α : Type u_1
inst✝¹ : CommGroup α
inst✝ : DecidableEq α
A B C✝ : Finset α
hA : ∀ (A' : Finset α), A' ⊆ A → card (A * B) * card A' ≤ card (A' * B) * card A
x : α
C : Finset α
a✝ : ¬x ∈ C
ih : card (A * B * C) * card A ≤ card (A * B) * card (A * C)
A' : Finset α := A ∩ (A * C / {x})
hA' : A' = A ∩ (A * C / {x})
C' : Finset α := insert x C
hC' : C' = insert x C
h₀ : A' * {x} = A * {x} ∩ (A * C)
⊢ A * B * C ∪ A * B * {x} = A * B * C ∪ (A * B * {x}) \ (A' * B * {x})
[PROOFSTEP]
refine' (sup_sdiff_eq_sup _).symm
[GOAL]
α : Type u_1
inst✝¹ : CommGroup α
inst✝ : DecidableEq α
A B C✝ : Finset α
hA : ∀ (A' : Finset α), A' ⊆ A → card (A * B) * card A' ≤ card (A' * B) * card A
x : α
C : Finset α
a✝ : ¬x ∈ C
ih : card (A * B * C) * card A ≤ card (A * B) * card (A * C)
A' : Finset α := A ∩ (A * C / {x})
hA' : A' = A ∩ (A * C / {x})
C' : Finset α := insert x C
hC' : C' = insert x C
h₀ : A' * {x} = A * {x} ∩ (A * C)
⊢ A' * B * {x} ≤ A * B * C
[PROOFSTEP]
rw [mul_right_comm, mul_right_comm A, h₀]
[GOAL]
α : Type u_1
inst✝¹ : CommGroup α
inst✝ : DecidableEq α
A B C✝ : Finset α
hA : ∀ (A' : Finset α), A' ⊆ A → card (A * B) * card A' ≤ card (A' * B) * card A
x : α
C : Finset α
a✝ : ¬x ∈ C
ih : card (A * B * C) * card A ≤ card (A * B) * card (A * C)
A' : Finset α := A ∩ (A * C / {x})
hA' : A' = A ∩ (A * C / {x})
C' : Finset α := insert x C
hC' : C' = insert x C
h₀ : A' * {x} = A * {x} ∩ (A * C)
⊢ A * {x} ∩ (A * C) * B ≤ A * C * B
[PROOFSTEP]
exact mul_subset_mul_right (inter_subset_right _ _)
[GOAL]
case insert
α : Type u_1
inst✝¹ : CommGroup α
inst✝ : DecidableEq α
A B C✝ : Finset α
hA : ∀ (A' : Finset α), A' ⊆ A → card (A * B) * card A' ≤ card (A' * B) * card A
x : α
C : Finset α
a✝ : ¬x ∈ C
ih : card (A * B * C) * card A ≤ card (A * B) * card (A * C)
A' : Finset α := A ∩ (A * C / {x})
hA' : A' = A ∩ (A * C / {x})
C' : Finset α := insert x C
hC' : C' = insert x C
h₀ : A' * {x} = A * {x} ∩ (A * C)
h₁ : A * B * C' = A * B * C ∪ (A * B * {x}) \ (A' * B * {x})
⊢ card (A * B * C') * card A ≤ card (A * B) * card (A * C')
[PROOFSTEP]
have h₂ : A' * B * { x } ⊆ A * B * { x } := mul_subset_mul_right (mul_subset_mul_right <| inter_subset_left _ _)
[GOAL]
case insert
α : Type u_1
inst✝¹ : CommGroup α
inst✝ : DecidableEq α
A B C✝ : Finset α
hA : ∀ (A' : Finset α), A' ⊆ A → card (A * B) * card A' ≤ card (A' * B) * card A
x : α
C : Finset α
a✝ : ¬x ∈ C
ih : card (A * B * C) * card A ≤ card (A * B) * card (A * C)
A' : Finset α := A ∩ (A * C / {x})
hA' : A' = A ∩ (A * C / {x})
C' : Finset α := insert x C
hC' : C' = insert x C
h₀ : A' * {x} = A * {x} ∩ (A * C)
h₁ : A * B * C' = A * B * C ∪ (A * B * {x}) \ (A' * B * {x})
h₂ : A' * B * {x} ⊆ A * B * {x}
⊢ card (A * B * C') * card A ≤ card (A * B) * card (A * C')
[PROOFSTEP]
have h₃ : (A * B * C').card ≤ (A * B * C).card + (A * B).card - (A' * B).card :=
  by
  rw [h₁]
  refine' (card_union_le _ _).trans_eq _
  rw [card_sdiff h₂, ← add_tsub_assoc_of_le (card_le_of_subset h₂), card_mul_singleton, card_mul_singleton]
[GOAL]
α : Type u_1
inst✝¹ : CommGroup α
inst✝ : DecidableEq α
A B C✝ : Finset α
hA : ∀ (A' : Finset α), A' ⊆ A → card (A * B) * card A' ≤ card (A' * B) * card A
x : α
C : Finset α
a✝ : ¬x ∈ C
ih : card (A * B * C) * card A ≤ card (A * B) * card (A * C)
A' : Finset α := A ∩ (A * C / {x})
hA' : A' = A ∩ (A * C / {x})
C' : Finset α := insert x C
hC' : C' = insert x C
h₀ : A' * {x} = A * {x} ∩ (A * C)
h₁ : A * B * C' = A * B * C ∪ (A * B * {x}) \ (A' * B * {x})
h₂ : A' * B * {x} ⊆ A * B * {x}
⊢ card (A * B * C') ≤ card (A * B * C) + card (A * B) - card (A' * B)
[PROOFSTEP]
rw [h₁]
[GOAL]
α : Type u_1
inst✝¹ : CommGroup α
inst✝ : DecidableEq α
A B C✝ : Finset α
hA : ∀ (A' : Finset α), A' ⊆ A → card (A * B) * card A' ≤ card (A' * B) * card A
x : α
C : Finset α
a✝ : ¬x ∈ C
ih : card (A * B * C) * card A ≤ card (A * B) * card (A * C)
A' : Finset α := A ∩ (A * C / {x})
hA' : A' = A ∩ (A * C / {x})
C' : Finset α := insert x C
hC' : C' = insert x C
h₀ : A' * {x} = A * {x} ∩ (A * C)
h₁ : A * B * C' = A * B * C ∪ (A * B * {x}) \ (A' * B * {x})
h₂ : A' * B * {x} ⊆ A * B * {x}
⊢ card (A * B * C ∪ (A * B * {x}) \ (A' * B * {x})) ≤ card (A * B * C) + card (A * B) - card (A' * B)
[PROOFSTEP]
refine' (card_union_le _ _).trans_eq _
[GOAL]
α : Type u_1
inst✝¹ : CommGroup α
inst✝ : DecidableEq α
A B C✝ : Finset α
hA : ∀ (A' : Finset α), A' ⊆ A → card (A * B) * card A' ≤ card (A' * B) * card A
x : α
C : Finset α
a✝ : ¬x ∈ C
ih : card (A * B * C) * card A ≤ card (A * B) * card (A * C)
A' : Finset α := A ∩ (A * C / {x})
hA' : A' = A ∩ (A * C / {x})
C' : Finset α := insert x C
hC' : C' = insert x C
h₀ : A' * {x} = A * {x} ∩ (A * C)
h₁ : A * B * C' = A * B * C ∪ (A * B * {x}) \ (A' * B * {x})
h₂ : A' * B * {x} ⊆ A * B * {x}
⊢ card (A * B * C) + card ((A * B * {x}) \ (A' * B * {x})) = card (A * B * C) + card (A * B) - card (A' * B)
[PROOFSTEP]
rw [card_sdiff h₂, ← add_tsub_assoc_of_le (card_le_of_subset h₂), card_mul_singleton, card_mul_singleton]
[GOAL]
case insert
α : Type u_1
inst✝¹ : CommGroup α
inst✝ : DecidableEq α
A B C✝ : Finset α
hA : ∀ (A' : Finset α), A' ⊆ A → card (A * B) * card A' ≤ card (A' * B) * card A
x : α
C : Finset α
a✝ : ¬x ∈ C
ih : card (A * B * C) * card A ≤ card (A * B) * card (A * C)
A' : Finset α := A ∩ (A * C / {x})
hA' : A' = A ∩ (A * C / {x})
C' : Finset α := insert x C
hC' : C' = insert x C
h₀ : A' * {x} = A * {x} ∩ (A * C)
h₁ : A * B * C' = A * B * C ∪ (A * B * {x}) \ (A' * B * {x})
h₂ : A' * B * {x} ⊆ A * B * {x}
h₃ : card (A * B * C') ≤ card (A * B * C) + card (A * B) - card (A' * B)
⊢ card (A * B * C') * card A ≤ card (A * B) * card (A * C')
[PROOFSTEP]
refine' (mul_le_mul_right' h₃ _).trans _
[GOAL]
case insert
α : Type u_1
inst✝¹ : CommGroup α
inst✝ : DecidableEq α
A B C✝ : Finset α
hA : ∀ (A' : Finset α), A' ⊆ A → card (A * B) * card A' ≤ card (A' * B) * card A
x : α
C : Finset α
a✝ : ¬x ∈ C
ih : card (A * B * C) * card A ≤ card (A * B) * card (A * C)
A' : Finset α := A ∩ (A * C / {x})
hA' : A' = A ∩ (A * C / {x})
C' : Finset α := insert x C
hC' : C' = insert x C
h₀ : A' * {x} = A * {x} ∩ (A * C)
h₁ : A * B * C' = A * B * C ∪ (A * B * {x}) \ (A' * B * {x})
h₂ : A' * B * {x} ⊆ A * B * {x}
h₃ : card (A * B * C') ≤ card (A * B * C) + card (A * B) - card (A' * B)
⊢ (card (A * B * C) + card (A * B) - card (A' * B)) * card A ≤ card (A * B) * card (A * C')
[PROOFSTEP]
rw [tsub_mul, add_mul]
[GOAL]
case insert
α : Type u_1
inst✝¹ : CommGroup α
inst✝ : DecidableEq α
A B C✝ : Finset α
hA : ∀ (A' : Finset α), A' ⊆ A → card (A * B) * card A' ≤ card (A' * B) * card A
x : α
C : Finset α
a✝ : ¬x ∈ C
ih : card (A * B * C) * card A ≤ card (A * B) * card (A * C)
A' : Finset α := A ∩ (A * C / {x})
hA' : A' = A ∩ (A * C / {x})
C' : Finset α := insert x C
hC' : C' = insert x C
h₀ : A' * {x} = A * {x} ∩ (A * C)
h₁ : A * B * C' = A * B * C ∪ (A * B * {x}) \ (A' * B * {x})
h₂ : A' * B * {x} ⊆ A * B * {x}
h₃ : card (A * B * C') ≤ card (A * B * C) + card (A * B) - card (A' * B)
⊢ card (A * B * C) * card A + card (A * B) * card A - card (A' * B) * card A ≤ card (A * B) * card (A * C')
[PROOFSTEP]
refine' (tsub_le_tsub (add_le_add_right ih _) <| hA _ <| inter_subset_left _ _).trans_eq _
[GOAL]
case insert
α : Type u_1
inst✝¹ : CommGroup α
inst✝ : DecidableEq α
A B C✝ : Finset α
hA : ∀ (A' : Finset α), A' ⊆ A → card (A * B) * card A' ≤ card (A' * B) * card A
x : α
C : Finset α
a✝ : ¬x ∈ C
ih : card (A * B * C) * card A ≤ card (A * B) * card (A * C)
A' : Finset α := A ∩ (A * C / {x})
hA' : A' = A ∩ (A * C / {x})
C' : Finset α := insert x C
hC' : C' = insert x C
h₀ : A' * {x} = A * {x} ∩ (A * C)
h₁ : A * B * C' = A * B * C ∪ (A * B * {x}) \ (A' * B * {x})
h₂ : A' * B * {x} ⊆ A * B * {x}
h₃ : card (A * B * C') ≤ card (A * B * C) + card (A * B) - card (A' * B)
⊢ card (A * B) * card (A * C) + card (A * B) * card A - card (A * B) * card (A ∩ (A * C / {x})) =
    card (A * B) * card (A * C')
[PROOFSTEP]
rw [← mul_add, ← mul_tsub, ← hA', hC', insert_eq, mul_union, ← card_mul_singleton A x, ← card_mul_singleton A' x,
  add_comm (card _), h₀, eq_tsub_of_add_eq (card_union_add_card_inter _ _)]
[GOAL]
α : Type u_1
inst✝¹ : CommGroup α
inst✝ : DecidableEq α
A B C : Finset α
hA : Finset.Nonempty A
hAB : A ⊆ B
h : ∀ (A' : Finset α), A' ∈ erase (powerset B) ∅ → ↑(card (A * C)) / ↑(card A) ≤ ↑(card (A' * C)) / ↑(card A')
⊢ ∀ (A' : Finset α), A' ⊆ A → card (A * C) * card A' ≤ card (A' * C) * card A
[PROOFSTEP]
rintro A' hAA'
[GOAL]
α : Type u_1
inst✝¹ : CommGroup α
inst✝ : DecidableEq α
A B C : Finset α
hA : Finset.Nonempty A
hAB : A ⊆ B
h : ∀ (A' : Finset α), A' ∈ erase (powerset B) ∅ → ↑(card (A * C)) / ↑(card A) ≤ ↑(card (A' * C)) / ↑(card A')
A' : Finset α
hAA' : A' ⊆ A
⊢ card (A * C) * card A' ≤ card (A' * C) * card A
[PROOFSTEP]
obtain rfl | hA' := A'.eq_empty_or_nonempty
[GOAL]
case inl
α : Type u_1
inst✝¹ : CommGroup α
inst✝ : DecidableEq α
A B C : Finset α
hA : Finset.Nonempty A
hAB : A ⊆ B
h : ∀ (A' : Finset α), A' ∈ erase (powerset B) ∅ → ↑(card (A * C)) / ↑(card A) ≤ ↑(card (A' * C)) / ↑(card A')
hAA' : ∅ ⊆ A
⊢ card (A * C) * card ∅ ≤ card (∅ * C) * card A
[PROOFSTEP]
simp
[GOAL]
case inr
α : Type u_1
inst✝¹ : CommGroup α
inst✝ : DecidableEq α
A B C : Finset α
hA : Finset.Nonempty A
hAB : A ⊆ B
h : ∀ (A' : Finset α), A' ∈ erase (powerset B) ∅ → ↑(card (A * C)) / ↑(card A) ≤ ↑(card (A' * C)) / ↑(card A')
A' : Finset α
hAA' : A' ⊆ A
hA' : Finset.Nonempty A'
⊢ card (A * C) * card A' ≤ card (A' * C) * card A
[PROOFSTEP]
have hA₀ : (0 : ℚ≥0) < A.card := cast_pos.2 hA.card_pos
[GOAL]
case inr
α : Type u_1
inst✝¹ : CommGroup α
inst✝ : DecidableEq α
A B C : Finset α
hA : Finset.Nonempty A
hAB : A ⊆ B
h : ∀ (A' : Finset α), A' ∈ erase (powerset B) ∅ → ↑(card (A * C)) / ↑(card A) ≤ ↑(card (A' * C)) / ↑(card A')
A' : Finset α
hAA' : A' ⊆ A
hA' : Finset.Nonempty A'
hA₀ : 0 < ↑(card A)
⊢ card (A * C) * card A' ≤ card (A' * C) * card A
[PROOFSTEP]
have hA₀' : (0 : ℚ≥0) < A'.card := cast_pos.2 hA'.card_pos
[GOAL]
case inr
α : Type u_1
inst✝¹ : CommGroup α
inst✝ : DecidableEq α
A B C : Finset α
hA : Finset.Nonempty A
hAB : A ⊆ B
h : ∀ (A' : Finset α), A' ∈ erase (powerset B) ∅ → ↑(card (A * C)) / ↑(card A) ≤ ↑(card (A' * C)) / ↑(card A')
A' : Finset α
hAA' : A' ⊆ A
hA' : Finset.Nonempty A'
hA₀ : 0 < ↑(card A)
hA₀' : 0 < ↑(card A')
⊢ card (A * C) * card A' ≤ card (A' * C) * card A
[PROOFSTEP]
exact_mod_cast
  (div_le_div_iff hA₀ hA₀').1 (h _ <| mem_erase_of_ne_of_mem hA'.ne_empty <| mem_powerset.2 <| hAA'.trans hAB)
[GOAL]
α : Type u_1
inst✝¹ : CommGroup α
inst✝ : DecidableEq α
A✝ B✝ C✝ A B C : Finset α
⊢ card (A * C) * card B ≤ card (A * B) * card (B * C)
[PROOFSTEP]
obtain rfl | hB := B.eq_empty_or_nonempty
[GOAL]
case inl
α : Type u_1
inst✝¹ : CommGroup α
inst✝ : DecidableEq α
A✝ B C✝ A C : Finset α
⊢ card (A * C) * card ∅ ≤ card (A * ∅) * card (∅ * C)
[PROOFSTEP]
simp
[GOAL]
case inr
α : Type u_1
inst✝¹ : CommGroup α
inst✝ : DecidableEq α
A✝ B✝ C✝ A B C : Finset α
hB : Finset.Nonempty B
⊢ card (A * C) * card B ≤ card (A * B) * card (B * C)
[PROOFSTEP]
have hB' : B ∈ B.powerset.erase ∅ := mem_erase_of_ne_of_mem hB.ne_empty (mem_powerset_self _)
[GOAL]
case inr
α : Type u_1
inst✝¹ : CommGroup α
inst✝ : DecidableEq α
A✝ B✝ C✝ A B C : Finset α
hB : Finset.Nonempty B
hB' : B ∈ erase (powerset B) ∅
⊢ card (A * C) * card B ≤ card (A * B) * card (B * C)
[PROOFSTEP]
obtain ⟨U, hU, hUA⟩ := exists_min_image (B.powerset.erase ∅) (fun U ↦ (U * A).card / U.card : _ → ℚ≥0) ⟨B, hB'⟩
[GOAL]
case inr.intro.intro
α : Type u_1
inst✝¹ : CommGroup α
inst✝ : DecidableEq α
A✝ B✝ C✝ A B C : Finset α
hB : Finset.Nonempty B
hB' : B ∈ erase (powerset B) ∅
U : Finset α
hU : U ∈ erase (powerset B) ∅
hUA : ∀ (x' : Finset α), x' ∈ erase (powerset B) ∅ → ↑(card (U * A)) / ↑(card U) ≤ ↑(card (x' * A)) / ↑(card x')
⊢ card (A * C) * card B ≤ card (A * B) * card (B * C)
[PROOFSTEP]
rw [mem_erase, mem_powerset, ← nonempty_iff_ne_empty] at hU
[GOAL]
case inr.intro.intro
α : Type u_1
inst✝¹ : CommGroup α
inst✝ : DecidableEq α
A✝ B✝ C✝ A B C : Finset α
hB : Finset.Nonempty B
hB' : B ∈ erase (powerset B) ∅
U : Finset α
hU : Finset.Nonempty U ∧ U ⊆ B
hUA : ∀ (x' : Finset α), x' ∈ erase (powerset B) ∅ → ↑(card (U * A)) / ↑(card U) ≤ ↑(card (x' * A)) / ↑(card x')
⊢ card (A * C) * card B ≤ card (A * B) * card (B * C)
[PROOFSTEP]
refine' cast_le.1 (_ : (_ : ℚ≥0) ≤ _)
[GOAL]
case inr.intro.intro
α : Type u_1
inst✝¹ : CommGroup α
inst✝ : DecidableEq α
A✝ B✝ C✝ A B C : Finset α
hB : Finset.Nonempty B
hB' : B ∈ erase (powerset B) ∅
U : Finset α
hU : Finset.Nonempty U ∧ U ⊆ B
hUA : ∀ (x' : Finset α), x' ∈ erase (powerset B) ∅ → ↑(card (U * A)) / ↑(card U) ≤ ↑(card (x' * A)) / ↑(card x')
⊢ ↑(card (A * C) * card B) ≤ ↑(card (A * B) * card (B * C))
[PROOFSTEP]
push_cast
[GOAL]
case inr.intro.intro
α : Type u_1
inst✝¹ : CommGroup α
inst✝ : DecidableEq α
A✝ B✝ C✝ A B C : Finset α
hB : Finset.Nonempty B
hB' : B ∈ erase (powerset B) ∅
U : Finset α
hU : Finset.Nonempty U ∧ U ⊆ B
hUA : ∀ (x' : Finset α), x' ∈ erase (powerset B) ∅ → ↑(card (U * A)) / ↑(card U) ≤ ↑(card (x' * A)) / ↑(card x')
⊢ ↑(card (A * C)) * ↑(card B) ≤ ↑(card (A * B)) * ↑(card (B * C))
[PROOFSTEP]
refine' (le_div_iff <| cast_pos.2 hB.card_pos).1 _
[GOAL]
case inr.intro.intro
α : Type u_1
inst✝¹ : CommGroup α
inst✝ : DecidableEq α
A✝ B✝ C✝ A B C : Finset α
hB : Finset.Nonempty B
hB' : B ∈ erase (powerset B) ∅
U : Finset α
hU : Finset.Nonempty U ∧ U ⊆ B
hUA : ∀ (x' : Finset α), x' ∈ erase (powerset B) ∅ → ↑(card (U * A)) / ↑(card U) ≤ ↑(card (x' * A)) / ↑(card x')
⊢ ↑(card (A * C)) ≤ ↑(card (A * B)) * ↑(card (B * C)) / ↑(card B)
[PROOFSTEP]
rw [mul_div_right_comm, mul_comm _ B]
[GOAL]
case inr.intro.intro
α : Type u_1
inst✝¹ : CommGroup α
inst✝ : DecidableEq α
A✝ B✝ C✝ A B C : Finset α
hB : Finset.Nonempty B
hB' : B ∈ erase (powerset B) ∅
U : Finset α
hU : Finset.Nonempty U ∧ U ⊆ B
hUA : ∀ (x' : Finset α), x' ∈ erase (powerset B) ∅ → ↑(card (U * A)) / ↑(card U) ≤ ↑(card (x' * A)) / ↑(card x')
⊢ ↑(card (A * C)) ≤ ↑(card (B * A)) / ↑(card B) * ↑(card (B * C))
[PROOFSTEP]
refine' (cast_le.2 <| card_le_card_mul_left _ hU.1).trans _
[GOAL]
case inr.intro.intro
α : Type u_1
inst✝¹ : CommGroup α
inst✝ : DecidableEq α
A✝ B✝ C✝ A B C : Finset α
hB : Finset.Nonempty B
hB' : B ∈ erase (powerset B) ∅
U : Finset α
hU : Finset.Nonempty U ∧ U ⊆ B
hUA : ∀ (x' : Finset α), x' ∈ erase (powerset B) ∅ → ↑(card (U * A)) / ↑(card U) ≤ ↑(card (x' * A)) / ↑(card x')
⊢ ↑(card (U * (A * C))) ≤ ↑(card (B * A)) / ↑(card B) * ↑(card (B * C))
[PROOFSTEP]
refine'
  le_trans _
    (mul_le_mul (hUA _ hB') (cast_le.2 <| card_le_of_subset <| mul_subset_mul_right hU.2) (zero_le _) (zero_le _))
[GOAL]
case inr.intro.intro
α : Type u_1
inst✝¹ : CommGroup α
inst✝ : DecidableEq α
A✝ B✝ C✝ A B C : Finset α
hB : Finset.Nonempty B
hB' : B ∈ erase (powerset B) ∅
U : Finset α
hU : Finset.Nonempty U ∧ U ⊆ B
hUA : ∀ (x' : Finset α), x' ∈ erase (powerset B) ∅ → ↑(card (U * A)) / ↑(card U) ≤ ↑(card (x' * A)) / ↑(card x')
⊢ ↑(card (U * (A * C))) ≤ ↑(card (U * A)) / ↑(card U) * ↑(card (U * C))
[PROOFSTEP]
rw [← mul_div_right_comm, ← mul_assoc]
[GOAL]
case inr.intro.intro
α : Type u_1
inst✝¹ : CommGroup α
inst✝ : DecidableEq α
A✝ B✝ C✝ A B C : Finset α
hB : Finset.Nonempty B
hB' : B ∈ erase (powerset B) ∅
U : Finset α
hU : Finset.Nonempty U ∧ U ⊆ B
hUA : ∀ (x' : Finset α), x' ∈ erase (powerset B) ∅ → ↑(card (U * A)) / ↑(card U) ≤ ↑(card (x' * A)) / ↑(card x')
⊢ ↑(card (U * A * C)) ≤ ↑(card (U * A)) * ↑(card (U * C)) / ↑(card U)
[PROOFSTEP]
refine' (le_div_iff <| cast_pos.2 hU.1.card_pos).2 _
[GOAL]
case inr.intro.intro
α : Type u_1
inst✝¹ : CommGroup α
inst✝ : DecidableEq α
A✝ B✝ C✝ A B C : Finset α
hB : Finset.Nonempty B
hB' : B ∈ erase (powerset B) ∅
U : Finset α
hU : Finset.Nonempty U ∧ U ⊆ B
hUA : ∀ (x' : Finset α), x' ∈ erase (powerset B) ∅ → ↑(card (U * A)) / ↑(card U) ≤ ↑(card (x' * A)) / ↑(card x')
⊢ ↑(card (U * A * C)) * ↑(card U) ≤ ↑(card (U * A)) * ↑(card (U * C))
[PROOFSTEP]
exact_mod_cast mul_pluennecke_petridis C (mul_aux hU.1 hU.2 hUA)
[GOAL]
α : Type u_1
inst✝¹ : CommGroup α
inst✝ : DecidableEq α
A✝ B✝ C✝ A B C : Finset α
⊢ card (A * C) * card B ≤ card (A / B) * card (B / C)
[PROOFSTEP]
rw [div_eq_mul_inv, ← card_inv B, ← card_inv (B / C), inv_div', div_inv_eq_mul]
[GOAL]
α : Type u_1
inst✝¹ : CommGroup α
inst✝ : DecidableEq α
A✝ B✝ C✝ A B C : Finset α
⊢ card (A * C) * card B⁻¹ ≤ card (A * B⁻¹) * card (B⁻¹ * C)
[PROOFSTEP]
exact card_mul_mul_card_le_card_mul_mul_card_mul _ _ _
[GOAL]
α : Type u_1
inst✝¹ : CommGroup α
inst✝ : DecidableEq α
A✝ B✝ C✝ A B C : Finset α
⊢ card (A / C) * card B ≤ card (A * B) * card (B / C)
[PROOFSTEP]
rw [div_eq_mul_inv, div_eq_mul_inv]
[GOAL]
α : Type u_1
inst✝¹ : CommGroup α
inst✝ : DecidableEq α
A✝ B✝ C✝ A B C : Finset α
⊢ card (A * C⁻¹) * card B ≤ card (A * B) * card (B * C⁻¹)
[PROOFSTEP]
exact card_mul_mul_card_le_card_mul_mul_card_mul _ _ _
[GOAL]
α : Type u_1
inst✝¹ : CommGroup α
inst✝ : DecidableEq α
A✝ B✝ C✝ A B C : Finset α
⊢ card (A / C) * card B ≤ card (A / B) * card (B * C)
[PROOFSTEP]
rw [← div_inv_eq_mul, div_eq_mul_inv]
[GOAL]
α : Type u_1
inst✝¹ : CommGroup α
inst✝ : DecidableEq α
A✝ B✝ C✝ A B C : Finset α
⊢ card (A * C⁻¹) * card B ≤ card (A / B) * card (B / C⁻¹)
[PROOFSTEP]
exact card_mul_mul_le_card_div_mul_card_div _ _ _
[GOAL]
α✝ : Type u_1
inst✝³ : CommGroup α✝
inst✝² : DecidableEq α✝
A✝ B✝ C : Finset α✝
α : Type u_2
inst✝¹ : AddCommGroup α
inst✝ : DecidableEq α
A B : Finset α
hAB : ∀ (A' : Finset α), A' ⊆ A → card (A + B) * card A' ≤ card (A' + B) * card A
n : ℕ
⊢ ↑(card (A + n • B)) ≤ (↑(card (A + B)) / ↑(card A)) ^ n * ↑(card A)
[PROOFSTEP]
obtain rfl | hA := A.eq_empty_or_nonempty
[GOAL]
case inl
α✝ : Type u_1
inst✝³ : CommGroup α✝
inst✝² : DecidableEq α✝
A B✝ C : Finset α✝
α : Type u_2
inst✝¹ : AddCommGroup α
inst✝ : DecidableEq α
B : Finset α
n : ℕ
hAB : ∀ (A' : Finset α), A' ⊆ ∅ → card (∅ + B) * card A' ≤ card (A' + B) * card ∅
⊢ ↑(card (∅ + n • B)) ≤ (↑(card (∅ + B)) / ↑(card ∅)) ^ n * ↑(card ∅)
[PROOFSTEP]
simp
[GOAL]
case inr
α✝ : Type u_1
inst✝³ : CommGroup α✝
inst✝² : DecidableEq α✝
A✝ B✝ C : Finset α✝
α : Type u_2
inst✝¹ : AddCommGroup α
inst✝ : DecidableEq α
A B : Finset α
hAB : ∀ (A' : Finset α), A' ⊆ A → card (A + B) * card A' ≤ card (A' + B) * card A
n : ℕ
hA : Finset.Nonempty A
⊢ ↑(card (A + n • B)) ≤ (↑(card (A + B)) / ↑(card A)) ^ n * ↑(card A)
[PROOFSTEP]
induction' n with n ih
[GOAL]
case inr.zero
α✝ : Type u_1
inst✝³ : CommGroup α✝
inst✝² : DecidableEq α✝
A✝ B✝ C : Finset α✝
α : Type u_2
inst✝¹ : AddCommGroup α
inst✝ : DecidableEq α
A B : Finset α
hAB : ∀ (A' : Finset α), A' ⊆ A → card (A + B) * card A' ≤ card (A' + B) * card A
hA : Finset.Nonempty A
⊢ ↑(card (A + zero • B)) ≤ (↑(card (A + B)) / ↑(card A)) ^ zero * ↑(card A)
[PROOFSTEP]
simp
[GOAL]
case inr.succ
α✝ : Type u_1
inst✝³ : CommGroup α✝
inst✝² : DecidableEq α✝
A✝ B✝ C : Finset α✝
α : Type u_2
inst✝¹ : AddCommGroup α
inst✝ : DecidableEq α
A B : Finset α
hAB : ∀ (A' : Finset α), A' ⊆ A → card (A + B) * card A' ≤ card (A' + B) * card A
hA : Finset.Nonempty A
n : ℕ
ih : ↑(card (A + n • B)) ≤ (↑(card (A + B)) / ↑(card A)) ^ n * ↑(card A)
⊢ ↑(card (A + succ n • B)) ≤ (↑(card (A + B)) / ↑(card A)) ^ succ n * ↑(card A)
[PROOFSTEP]
rw [succ_nsmul, ← add_assoc, _root_.pow_succ, mul_assoc, ← mul_div_right_comm, le_div_iff, ← cast_mul]
[GOAL]
case inr.succ
α✝ : Type u_1
inst✝³ : CommGroup α✝
inst✝² : DecidableEq α✝
A✝ B✝ C : Finset α✝
α : Type u_2
inst✝¹ : AddCommGroup α
inst✝ : DecidableEq α
A B : Finset α
hAB : ∀ (A' : Finset α), A' ⊆ A → card (A + B) * card A' ≤ card (A' + B) * card A
hA : Finset.Nonempty A
n : ℕ
ih : ↑(card (A + n • B)) ≤ (↑(card (A + B)) / ↑(card A)) ^ n * ↑(card A)
⊢ ↑(card (A + B + n • B) * card A) ≤ ↑(card (A + B)) * ((↑(card (A + B)) / ↑(card A)) ^ n * ↑(card A))
case inr.succ
α✝ : Type u_1
inst✝³ : CommGroup α✝
inst✝² : DecidableEq α✝
A✝ B✝ C : Finset α✝
α : Type u_2
inst✝¹ : AddCommGroup α
inst✝ : DecidableEq α
A B : Finset α
hAB : ∀ (A' : Finset α), A' ⊆ A → card (A + B) * card A' ≤ card (A' + B) * card A
hA : Finset.Nonempty A
n : ℕ
ih : ↑(card (A + n • B)) ≤ (↑(card (A + B)) / ↑(card A)) ^ n * ↑(card A)
⊢ 0 < ↑(card A)
[PROOFSTEP]
swap
[GOAL]
case inr.succ
α✝ : Type u_1
inst✝³ : CommGroup α✝
inst✝² : DecidableEq α✝
A✝ B✝ C : Finset α✝
α : Type u_2
inst✝¹ : AddCommGroup α
inst✝ : DecidableEq α
A B : Finset α
hAB : ∀ (A' : Finset α), A' ⊆ A → card (A + B) * card A' ≤ card (A' + B) * card A
hA : Finset.Nonempty A
n : ℕ
ih : ↑(card (A + n • B)) ≤ (↑(card (A + B)) / ↑(card A)) ^ n * ↑(card A)
⊢ 0 < ↑(card A)
case inr.succ
α✝ : Type u_1
inst✝³ : CommGroup α✝
inst✝² : DecidableEq α✝
A✝ B✝ C : Finset α✝
α : Type u_2
inst✝¹ : AddCommGroup α
inst✝ : DecidableEq α
A B : Finset α
hAB : ∀ (A' : Finset α), A' ⊆ A → card (A + B) * card A' ≤ card (A' + B) * card A
hA : Finset.Nonempty A
n : ℕ
ih : ↑(card (A + n • B)) ≤ (↑(card (A + B)) / ↑(card A)) ^ n * ↑(card A)
⊢ ↑(card (A + B + n • B) * card A) ≤ ↑(card (A + B)) * ((↑(card (A + B)) / ↑(card A)) ^ n * ↑(card A))
[PROOFSTEP]
exact cast_pos.2 hA.card_pos
[GOAL]
case inr.succ
α✝ : Type u_1
inst✝³ : CommGroup α✝
inst✝² : DecidableEq α✝
A✝ B✝ C : Finset α✝
α : Type u_2
inst✝¹ : AddCommGroup α
inst✝ : DecidableEq α
A B : Finset α
hAB : ∀ (A' : Finset α), A' ⊆ A → card (A + B) * card A' ≤ card (A' + B) * card A
hA : Finset.Nonempty A
n : ℕ
ih : ↑(card (A + n • B)) ≤ (↑(card (A + B)) / ↑(card A)) ^ n * ↑(card A)
⊢ ↑(card (A + B + n • B) * card A) ≤ ↑(card (A + B)) * ((↑(card (A + B)) / ↑(card A)) ^ n * ↑(card A))
[PROOFSTEP]
refine' (cast_le.2 <| add_pluennecke_petridis _ hAB).trans _
[GOAL]
case inr.succ
α✝ : Type u_1
inst✝³ : CommGroup α✝
inst✝² : DecidableEq α✝
A✝ B✝ C : Finset α✝
α : Type u_2
inst✝¹ : AddCommGroup α
inst✝ : DecidableEq α
A B : Finset α
hAB : ∀ (A' : Finset α), A' ⊆ A → card (A + B) * card A' ≤ card (A' + B) * card A
hA : Finset.Nonempty A
n : ℕ
ih : ↑(card (A + n • B)) ≤ (↑(card (A + B)) / ↑(card A)) ^ n * ↑(card A)
⊢ ↑(card (A + B) * card (A + n • B)) ≤ ↑(card (A + B)) * ((↑(card (A + B)) / ↑(card A)) ^ n * ↑(card A))
[PROOFSTEP]
rw [cast_mul]
[GOAL]
case inr.succ
α✝ : Type u_1
inst✝³ : CommGroup α✝
inst✝² : DecidableEq α✝
A✝ B✝ C : Finset α✝
α : Type u_2
inst✝¹ : AddCommGroup α
inst✝ : DecidableEq α
A B : Finset α
hAB : ∀ (A' : Finset α), A' ⊆ A → card (A + B) * card A' ≤ card (A' + B) * card A
hA : Finset.Nonempty A
n : ℕ
ih : ↑(card (A + n • B)) ≤ (↑(card (A + B)) / ↑(card A)) ^ n * ↑(card A)
⊢ ↑(card (A + B)) * ↑(card (A + n • B)) ≤ ↑(card (A + B)) * ((↑(card (A + B)) / ↑(card A)) ^ n * ↑(card A))
[PROOFSTEP]
gcongr
[GOAL]
α : Type u_1
inst✝¹ : CommGroup α
inst✝ : DecidableEq α
A B C : Finset α
hAB : ∀ (A' : Finset α), A' ⊆ A → card (A * B) * card A' ≤ card (A' * B) * card A
n : ℕ
⊢ ↑(card (A * B ^ n)) ≤ (↑(card (A * B)) / ↑(card A)) ^ n * ↑(card A)
[PROOFSTEP]
obtain rfl | hA := A.eq_empty_or_nonempty
[GOAL]
case inl
α : Type u_1
inst✝¹ : CommGroup α
inst✝ : DecidableEq α
B C : Finset α
n : ℕ
hAB : ∀ (A' : Finset α), A' ⊆ ∅ → card (∅ * B) * card A' ≤ card (A' * B) * card ∅
⊢ ↑(card (∅ * B ^ n)) ≤ (↑(card (∅ * B)) / ↑(card ∅)) ^ n * ↑(card ∅)
[PROOFSTEP]
simp
[GOAL]
case inr
α : Type u_1
inst✝¹ : CommGroup α
inst✝ : DecidableEq α
A B C : Finset α
hAB : ∀ (A' : Finset α), A' ⊆ A → card (A * B) * card A' ≤ card (A' * B) * card A
n : ℕ
hA : Finset.Nonempty A
⊢ ↑(card (A * B ^ n)) ≤ (↑(card (A * B)) / ↑(card A)) ^ n * ↑(card A)
[PROOFSTEP]
induction' n with n ih
[GOAL]
case inr.zero
α : Type u_1
inst✝¹ : CommGroup α
inst✝ : DecidableEq α
A B C : Finset α
hAB : ∀ (A' : Finset α), A' ⊆ A → card (A * B) * card A' ≤ card (A' * B) * card A
hA : Finset.Nonempty A
⊢ ↑(card (A * B ^ zero)) ≤ (↑(card (A * B)) / ↑(card A)) ^ zero * ↑(card A)
[PROOFSTEP]
simp
[GOAL]
case inr.succ
α : Type u_1
inst✝¹ : CommGroup α
inst✝ : DecidableEq α
A B C : Finset α
hAB : ∀ (A' : Finset α), A' ⊆ A → card (A * B) * card A' ≤ card (A' * B) * card A
hA : Finset.Nonempty A
n : ℕ
ih : ↑(card (A * B ^ n)) ≤ (↑(card (A * B)) / ↑(card A)) ^ n * ↑(card A)
⊢ ↑(card (A * B ^ succ n)) ≤ (↑(card (A * B)) / ↑(card A)) ^ succ n * ↑(card A)
[PROOFSTEP]
rw [_root_.pow_succ, ← mul_assoc, _root_.pow_succ, @mul_assoc ℚ≥0, ← mul_div_right_comm, le_div_iff, ← cast_mul]
[GOAL]
case inr.succ
α : Type u_1
inst✝¹ : CommGroup α
inst✝ : DecidableEq α
A B C : Finset α
hAB : ∀ (A' : Finset α), A' ⊆ A → card (A * B) * card A' ≤ card (A' * B) * card A
hA : Finset.Nonempty A
n : ℕ
ih : ↑(card (A * B ^ n)) ≤ (↑(card (A * B)) / ↑(card A)) ^ n * ↑(card A)
⊢ ↑(card (A * B * B ^ n) * card A) ≤ ↑(card (A * B)) * ((↑(card (A * B)) / ↑(card A)) ^ n * ↑(card A))
case inr.succ
α : Type u_1
inst✝¹ : CommGroup α
inst✝ : DecidableEq α
A B C : Finset α
hAB : ∀ (A' : Finset α), A' ⊆ A → card (A * B) * card A' ≤ card (A' * B) * card A
hA : Finset.Nonempty A
n : ℕ
ih : ↑(card (A * B ^ n)) ≤ (↑(card (A * B)) / ↑(card A)) ^ n * ↑(card A)
⊢ 0 < ↑(card A)
[PROOFSTEP]
swap
[GOAL]
case inr.succ
α : Type u_1
inst✝¹ : CommGroup α
inst✝ : DecidableEq α
A B C : Finset α
hAB : ∀ (A' : Finset α), A' ⊆ A → card (A * B) * card A' ≤ card (A' * B) * card A
hA : Finset.Nonempty A
n : ℕ
ih : ↑(card (A * B ^ n)) ≤ (↑(card (A * B)) / ↑(card A)) ^ n * ↑(card A)
⊢ 0 < ↑(card A)
case inr.succ
α : Type u_1
inst✝¹ : CommGroup α
inst✝ : DecidableEq α
A B C : Finset α
hAB : ∀ (A' : Finset α), A' ⊆ A → card (A * B) * card A' ≤ card (A' * B) * card A
hA : Finset.Nonempty A
n : ℕ
ih : ↑(card (A * B ^ n)) ≤ (↑(card (A * B)) / ↑(card A)) ^ n * ↑(card A)
⊢ ↑(card (A * B * B ^ n) * card A) ≤ ↑(card (A * B)) * ((↑(card (A * B)) / ↑(card A)) ^ n * ↑(card A))
[PROOFSTEP]
exact cast_pos.2 hA.card_pos
[GOAL]
case inr.succ
α : Type u_1
inst✝¹ : CommGroup α
inst✝ : DecidableEq α
A B C : Finset α
hAB : ∀ (A' : Finset α), A' ⊆ A → card (A * B) * card A' ≤ card (A' * B) * card A
hA : Finset.Nonempty A
n : ℕ
ih : ↑(card (A * B ^ n)) ≤ (↑(card (A * B)) / ↑(card A)) ^ n * ↑(card A)
⊢ ↑(card (A * B * B ^ n) * card A) ≤ ↑(card (A * B)) * ((↑(card (A * B)) / ↑(card A)) ^ n * ↑(card A))
[PROOFSTEP]
refine' (cast_le.2 <| mul_pluennecke_petridis _ hAB).trans _
[GOAL]
case inr.succ
α : Type u_1
inst✝¹ : CommGroup α
inst✝ : DecidableEq α
A B C : Finset α
hAB : ∀ (A' : Finset α), A' ⊆ A → card (A * B) * card A' ≤ card (A' * B) * card A
hA : Finset.Nonempty A
n : ℕ
ih : ↑(card (A * B ^ n)) ≤ (↑(card (A * B)) / ↑(card A)) ^ n * ↑(card A)
⊢ ↑(card (A * B) * card (A * B ^ n)) ≤ ↑(card (A * B)) * ((↑(card (A * B)) / ↑(card A)) ^ n * ↑(card A))
[PROOFSTEP]
rw [cast_mul]
[GOAL]
case inr.succ
α : Type u_1
inst✝¹ : CommGroup α
inst✝ : DecidableEq α
A B C : Finset α
hAB : ∀ (A' : Finset α), A' ⊆ A → card (A * B) * card A' ≤ card (A' * B) * card A
hA : Finset.Nonempty A
n : ℕ
ih : ↑(card (A * B ^ n)) ≤ (↑(card (A * B)) / ↑(card A)) ^ n * ↑(card A)
⊢ ↑(card (A * B)) * ↑(card (A * B ^ n)) ≤ ↑(card (A * B)) * ((↑(card (A * B)) / ↑(card A)) ^ n * ↑(card A))
[PROOFSTEP]
gcongr
[GOAL]
α : Type u_1
inst✝¹ : CommGroup α
inst✝ : DecidableEq α
A B✝ C : Finset α
hA : Finset.Nonempty A
B : Finset α
m n : ℕ
⊢ ↑(card (B ^ m / B ^ n)) ≤ (↑(card (A * B)) / ↑(card A)) ^ (m + n) * ↑(card A)
[PROOFSTEP]
have hA' : A ∈ A.powerset.erase ∅ := mem_erase_of_ne_of_mem hA.ne_empty (mem_powerset_self _)
[GOAL]
α : Type u_1
inst✝¹ : CommGroup α
inst✝ : DecidableEq α
A B✝ C : Finset α
hA : Finset.Nonempty A
B : Finset α
m n : ℕ
hA' : A ∈ erase (powerset A) ∅
⊢ ↑(card (B ^ m / B ^ n)) ≤ (↑(card (A * B)) / ↑(card A)) ^ (m + n) * ↑(card A)
[PROOFSTEP]
obtain ⟨C, hC, hCA⟩ := exists_min_image (A.powerset.erase ∅) (fun C ↦ (C * B).card / C.card : _ → ℚ≥0) ⟨A, hA'⟩
[GOAL]
case intro.intro
α : Type u_1
inst✝¹ : CommGroup α
inst✝ : DecidableEq α
A B✝ C✝ : Finset α
hA : Finset.Nonempty A
B : Finset α
m n : ℕ
hA' : A ∈ erase (powerset A) ∅
C : Finset α
hC : C ∈ erase (powerset A) ∅
hCA : ∀ (x' : Finset α), x' ∈ erase (powerset A) ∅ → ↑(card (C * B)) / ↑(card C) ≤ ↑(card (x' * B)) / ↑(card x')
⊢ ↑(card (B ^ m / B ^ n)) ≤ (↑(card (A * B)) / ↑(card A)) ^ (m + n) * ↑(card A)
[PROOFSTEP]
rw [mem_erase, mem_powerset, ← nonempty_iff_ne_empty] at hC
[GOAL]
case intro.intro
α : Type u_1
inst✝¹ : CommGroup α
inst✝ : DecidableEq α
A B✝ C✝ : Finset α
hA : Finset.Nonempty A
B : Finset α
m n : ℕ
hA' : A ∈ erase (powerset A) ∅
C : Finset α
hC : Finset.Nonempty C ∧ C ⊆ A
hCA : ∀ (x' : Finset α), x' ∈ erase (powerset A) ∅ → ↑(card (C * B)) / ↑(card C) ≤ ↑(card (x' * B)) / ↑(card x')
⊢ ↑(card (B ^ m / B ^ n)) ≤ (↑(card (A * B)) / ↑(card A)) ^ (m + n) * ↑(card A)
[PROOFSTEP]
refine' (mul_le_mul_right <| cast_pos.2 hC.1.card_pos).1 _
[GOAL]
case intro.intro
α : Type u_1
inst✝¹ : CommGroup α
inst✝ : DecidableEq α
A B✝ C✝ : Finset α
hA : Finset.Nonempty A
B : Finset α
m n : ℕ
hA' : A ∈ erase (powerset A) ∅
C : Finset α
hC : Finset.Nonempty C ∧ C ⊆ A
hCA : ∀ (x' : Finset α), x' ∈ erase (powerset A) ∅ → ↑(card (C * B)) / ↑(card C) ≤ ↑(card (x' * B)) / ↑(card x')
⊢ ↑(card (B ^ m / B ^ n)) * ↑(card C) ≤ (↑(card (A * B)) / ↑(card A)) ^ (m + n) * ↑(card A) * ↑(card C)
[PROOFSTEP]
norm_cast
[GOAL]
case intro.intro
α : Type u_1
inst✝¹ : CommGroup α
inst✝ : DecidableEq α
A B✝ C✝ : Finset α
hA : Finset.Nonempty A
B : Finset α
m n : ℕ
hA' : A ∈ erase (powerset A) ∅
C : Finset α
hC : Finset.Nonempty C ∧ C ⊆ A
hCA : ∀ (x' : Finset α), x' ∈ erase (powerset A) ∅ → ↑(card (C * B)) / ↑(card C) ≤ ↑(card (x' * B)) / ↑(card x')
⊢ ↑(card (B ^ m / B ^ n) * card C) ≤ (↑(card (A * B)) / ↑(card A)) ^ (m + n) * ↑(card A) * ↑(card C)
[PROOFSTEP]
refine' (cast_le.2 <| card_div_mul_le_card_mul_mul_card_mul _ _ _).trans _
[GOAL]
case intro.intro
α : Type u_1
inst✝¹ : CommGroup α
inst✝ : DecidableEq α
A B✝ C✝ : Finset α
hA : Finset.Nonempty A
B : Finset α
m n : ℕ
hA' : A ∈ erase (powerset A) ∅
C : Finset α
hC : Finset.Nonempty C ∧ C ⊆ A
hCA : ∀ (x' : Finset α), x' ∈ erase (powerset A) ∅ → ↑(card (C * B)) / ↑(card C) ≤ ↑(card (x' * B)) / ↑(card x')
⊢ ↑(card (B ^ m * C) * card (C * B ^ n)) ≤ (↑(card (A * B)) / ↑(card A)) ^ (m + n) * ↑(card A) * ↑(card C)
[PROOFSTEP]
push_cast
[GOAL]
case intro.intro
α : Type u_1
inst✝¹ : CommGroup α
inst✝ : DecidableEq α
A B✝ C✝ : Finset α
hA : Finset.Nonempty A
B : Finset α
m n : ℕ
hA' : A ∈ erase (powerset A) ∅
C : Finset α
hC : Finset.Nonempty C ∧ C ⊆ A
hCA : ∀ (x' : Finset α), x' ∈ erase (powerset A) ∅ → ↑(card (C * B)) / ↑(card C) ≤ ↑(card (x' * B)) / ↑(card x')
⊢ ↑(card (B ^ m * C)) * ↑(card (C * B ^ n)) ≤ (↑(card (A * B)) / ↑(card A)) ^ (m + n) * ↑(card A) * ↑(card C)
[PROOFSTEP]
rw [mul_comm _ C]
[GOAL]
case intro.intro
α : Type u_1
inst✝¹ : CommGroup α
inst✝ : DecidableEq α
A B✝ C✝ : Finset α
hA : Finset.Nonempty A
B : Finset α
m n : ℕ
hA' : A ∈ erase (powerset A) ∅
C : Finset α
hC : Finset.Nonempty C ∧ C ⊆ A
hCA : ∀ (x' : Finset α), x' ∈ erase (powerset A) ∅ → ↑(card (C * B)) / ↑(card C) ≤ ↑(card (x' * B)) / ↑(card x')
⊢ ↑(card (C * B ^ m)) * ↑(card (C * B ^ n)) ≤ (↑(card (A * B)) / ↑(card A)) ^ (m + n) * ↑(card A) * ↑(card C)
[PROOFSTEP]
refine'
  (mul_le_mul (card_mul_pow_le (mul_aux hC.1 hC.2 hCA) _) (card_mul_pow_le (mul_aux hC.1 hC.2 hCA) _) (zero_le _)
        (zero_le _)).trans
    _
[GOAL]
case intro.intro
α : Type u_1
inst✝¹ : CommGroup α
inst✝ : DecidableEq α
A B✝ C✝ : Finset α
hA : Finset.Nonempty A
B : Finset α
m n : ℕ
hA' : A ∈ erase (powerset A) ∅
C : Finset α
hC : Finset.Nonempty C ∧ C ⊆ A
hCA : ∀ (x' : Finset α), x' ∈ erase (powerset A) ∅ → ↑(card (C * B)) / ↑(card C) ≤ ↑(card (x' * B)) / ↑(card x')
⊢ (↑(card (C * B)) / ↑(card C)) ^ m * ↑(card C) * ((↑(card (C * B)) / ↑(card C)) ^ n * ↑(card C)) ≤
    (↑(card (A * B)) / ↑(card A)) ^ (m + n) * ↑(card A) * ↑(card C)
[PROOFSTEP]
rw [mul_mul_mul_comm, ← pow_add, ← mul_assoc]
[GOAL]
case intro.intro
α : Type u_1
inst✝¹ : CommGroup α
inst✝ : DecidableEq α
A B✝ C✝ : Finset α
hA : Finset.Nonempty A
B : Finset α
m n : ℕ
hA' : A ∈ erase (powerset A) ∅
C : Finset α
hC : Finset.Nonempty C ∧ C ⊆ A
hCA : ∀ (x' : Finset α), x' ∈ erase (powerset A) ∅ → ↑(card (C * B)) / ↑(card C) ≤ ↑(card (x' * B)) / ↑(card x')
⊢ (↑(card (C * B)) / ↑(card C)) ^ (m + n) * ↑(card C) * ↑(card C) ≤
    (↑(card (A * B)) / ↑(card A)) ^ (m + n) * ↑(card A) * ↑(card C)
[PROOFSTEP]
gcongr((?_ ^ _) * Nat.cast ?_) * _
[GOAL]
case intro.intro.bc.h₁.hab
α : Type u_1
inst✝¹ : CommGroup α
inst✝ : DecidableEq α
A B✝ C✝ : Finset α
hA : Finset.Nonempty A
B : Finset α
m n : ℕ
hA' : A ∈ erase (powerset A) ∅
C : Finset α
hC : Finset.Nonempty C ∧ C ⊆ A
hCA : ∀ (x' : Finset α), x' ∈ erase (powerset A) ∅ → ↑(card (C * B)) / ↑(card C) ≤ ↑(card (x' * B)) / ↑(card x')
⊢ ↑(card (C * B)) / ↑(card C) ≤ ↑(card (A * B)) / ↑(card A)
[PROOFSTEP]
exact hCA _ hA'
[GOAL]
case intro.intro.bc.h₂.h
α : Type u_1
inst✝¹ : CommGroup α
inst✝ : DecidableEq α
A B✝ C✝ : Finset α
hA : Finset.Nonempty A
B : Finset α
m n : ℕ
hA' : A ∈ erase (powerset A) ∅
C : Finset α
hC : Finset.Nonempty C ∧ C ⊆ A
hCA : ∀ (x' : Finset α), x' ∈ erase (powerset A) ∅ → ↑(card (C * B)) / ↑(card C) ≤ ↑(card (x' * B)) / ↑(card x')
⊢ card C ≤ card A
[PROOFSTEP]
exact card_le_of_subset hC.2
[GOAL]
α : Type u_1
inst✝¹ : CommGroup α
inst✝ : DecidableEq α
A B✝ C : Finset α
hA : Finset.Nonempty A
B : Finset α
m n : ℕ
⊢ ↑(card (B ^ m / B ^ n)) ≤ (↑(card (A / B)) / ↑(card A)) ^ (m + n) * ↑(card A)
[PROOFSTEP]
rw [← card_inv, inv_div', ← inv_pow, ← inv_pow, div_eq_mul_inv A]
[GOAL]
α : Type u_1
inst✝¹ : CommGroup α
inst✝ : DecidableEq α
A B✝ C : Finset α
hA : Finset.Nonempty A
B : Finset α
m n : ℕ
⊢ ↑(card (B⁻¹ ^ m / B⁻¹ ^ n)) ≤ (↑(card (A * B⁻¹)) / ↑(card A)) ^ (m + n) * ↑(card A)
[PROOFSTEP]
exact card_pow_div_pow_le hA _ _ _
[GOAL]
α : Type u_1
inst✝¹ : CommGroup α
inst✝ : DecidableEq α
A B✝ C : Finset α
hA : Finset.Nonempty A
B : Finset α
n : ℕ
⊢ ↑(card (B ^ n)) ≤ (↑(card (A * B)) / ↑(card A)) ^ n * ↑(card A)
[PROOFSTEP]
simpa only [_root_.pow_zero, div_one] using card_pow_div_pow_le hA _ _ 0
[GOAL]
α : Type u_1
inst✝¹ : CommGroup α
inst✝ : DecidableEq α
A B✝ C : Finset α
hA : Finset.Nonempty A
B : Finset α
n : ℕ
⊢ ↑(card (B ^ n)) ≤ (↑(card (A / B)) / ↑(card A)) ^ n * ↑(card A)
[PROOFSTEP]
simpa only [_root_.pow_zero, div_one] using card_pow_div_pow_le' hA _ _ 0