Theorem: Finset.card_pow_div_pow_le
File: Mathlib/Combinatorics/Additive/PluenneckeRuzsa.lean

tactic: have hA' : A ∈ A.powerset.erase ∅ := mem_erase_of_ne_of_mem hA.ne_empty (mem_powerset_self _)
state_before: α : 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)

tactic: obtain ⟨C, hC, hCA⟩ :=
  exists_min_image (A.powerset.erase ∅) (fun C ↦ (C * B).card / C.card : _ → ℚ≥0) ⟨A, hA'⟩
state_before: α : 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)

tactic: rw [mem_erase, mem_powerset, ← nonempty_iff_ne_empty] at hC
state_before: 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)

tactic: refine' (mul_le_mul_right <| cast_pos.2 hC.1.card_pos).1 _
state_before: 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)

tactic: norm_cast
state_before: 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)

tactic: refine' (cast_le.2 <| card_div_mul_le_card_mul_mul_card_mul _ _ _).trans _
state_before: 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)

tactic: push_cast
state_before: 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)

tactic: rw [mul_comm _ C]
state_before: 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)

tactic: 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 _
state_before: 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)

tactic: rw [mul_mul_mul_comm, ← pow_add, ← mul_assoc]
state_before: 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)

tactic: gcongr ((?_ ^ _) * Nat.cast ?_) * _
state_before: 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)

tactic: exact hCA _ hA'
state_before: 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)

tactic: exact card_le_of_subset hC.2
state_before: 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