-- Module: Mathlib.Combinatorics.SimpleGraph.Regularity.Chunk
Goal:
α : Type u_1
inst : Fintype α
inst_1 : DecidableEq α
P : Finpartition (α := Finset α) univ
hP : P.IsEquipartition
G : SimpleGraph α
inst_2 : DecidableRel G.Adj
ε : ℝ
U V : Finset α
inst_3 : Nonempty α
hPα : #P.parts * HPow.hPow (α := ℕ) 16 #P.parts ≤ Fintype.card α
hPε : 100 ≤ HPow.hPow (α := ℝ) 4 #P.parts * HPow.hPow (β := ℕ) ε 5
hε₁ : ε ≤ 1
hU : U ∈ P.parts
hV : V ∈ P.parts
hUV : U ≠ V
hunif : ¬G.IsUniform ε U V
hm : 0 ≤ HSub.hSub (α := ℝ) 1 (↑m : ℝ)⁻¹
hε : 0 ≤ 1 - ε / 10
hε₀ : 0 < ε
ε₁ : 4 / 5 * ε = (1 - 1 / 10) * HSub.hSub (α := ℝ) 1 9⁻¹ * ε
ε₂ :
  (1 - 1 / 10) * HSub.hSub (α := ℝ) 1 9⁻¹ * ε ≤
    (1 - ε / 10) * HSub.hSub (α := ℝ) 1 (↑m : ℝ)⁻¹ *
      HDiv.hDiv (α := ℝ) (↑(#(G.nonuniformWitness ε U V)) : ℝ) (↑(#U) : ℝ)
ε₃ :
  (1 - ε / 10) * HSub.hSub (α := ℝ) 1 (↑m : ℝ)⁻¹ *
      HDiv.hDiv (α := ℝ) (↑(#(G.nonuniformWitness ε U V)) : ℝ) (↑(#U) : ℝ) =
    (1 - ε / 10) * (↑(#(G.nonuniformWitness ε U V)) : ℝ) * (HSub.hSub (α := ℝ) 1 (↑m : ℝ)⁻¹ / (↑(#U) : ℝ))
ε₄ :
  (1 - ε / 10) * (↑(#(G.nonuniformWitness ε U V)) : ℝ) * (HSub.hSub (α := ℝ) 1 (↑m : ℝ)⁻¹ / (↑(#U) : ℝ)) ≤
    (↑(#((star hP G ε hU V).biUnion id)) : ℝ) * (HSub.hSub (α := ℝ) 1 (↑m : ℝ)⁻¹ / (↑(#U) : ℝ))
ε₅ :
  (↑(#((star hP G ε hU V).biUnion id)) : ℝ) * (HSub.hSub (α := ℝ) 1 (↑m : ℝ)⁻¹ / (↑(#U) : ℝ)) ≤
    (↑(#(star hP G ε hU V)) : ℝ) * HAdd.hAdd (α := ℝ) (↑m : ℝ) 1 * (HSub.hSub (α := ℝ) 1 (↑m : ℝ)⁻¹ / (↑(#U) : ℝ))
ε₆ :
  (↑(#(star hP G ε hU V)) : ℝ) * HAdd.hAdd (α := ℝ) (↑m : ℝ) 1 * (HSub.hSub (α := ℝ) 1 (↑m : ℝ)⁻¹ / (↑(#U) : ℝ)) ≤
    (↑(#(star hP G ε hU V)) : ℝ) * HAdd.hAdd (α := ℝ) (↑m : ℝ) 1 *
      (HSub.hSub (α := ℝ) 1 (↑m : ℝ)⁻¹ / (HPow.hPow (α := ℝ) 4 #P.parts * (↑m : ℝ)))
ε₇ :
  (↑(#(star hP G ε hU V)) : ℝ) * HAdd.hAdd (α := ℝ) (↑m : ℝ) 1 *
      (HSub.hSub (α := ℝ) 1 (↑m : ℝ)⁻¹ / (HPow.hPow (α := ℝ) 4 #P.parts * (↑m : ℝ))) ≤
    (↑(#(star hP G ε hU V)) : ℝ) / HPow.hPow (α := ℝ) 4 #P.parts
⊢ 4 / 5 * ε ≤ (↑(#(star hP G ε hU V)) : ℝ) / HPow.hPow (α := ℝ) 4 #P.parts

Tactic:
calc
    4 / 5 * ε = (1 - 1 / 10) * (1 - 9⁻¹) * ε := by norm_num
    _ ≤ (1 - ε / 10) * (1 - (↑m)⁻¹) * (#(G.nonuniformWitness ε U V) / #U) := by
        gcongr
        exacts [mod_cast (show 9 ≤ 100 by simp).trans (hundred_le_m hPα hPε hε₁),
          (le_div_iff₀' <| cast_pos.2 (P.nonempty_of_mem_parts hU).card_pos).2 <|
           G.le_card_nonuniformWitness hunif]
    _ = (1 - ε / 10) * #(G.nonuniformWitness ε U V) * ((1 - (↑m)⁻¹) / #U) := by
      rw [mul_assoc, mul_assoc, mul_div_left_comm]
    _ ≤ #((star hP G ε hU V).biUnion id) * ((1 - (↑m)⁻¹) / #U) := by
      gcongr
      exact one_sub_eps_mul_card_nonuniformWitness_le_card_star hV hUV hunif hPε hε₁
    _ ≤ #(star hP G ε hU V) * (m + 1) * ((1 - (↑m)⁻¹) / #U) := by
      gcongr
      exact card_biUnion_star_le_m_add_one_card_star_mul
    _ ≤ #(star hP G ε hU V) * (m + ↑1) * ((↑1 - (↑m)⁻¹) / (↑4 ^ #P.parts * m)) := by
      gcongr
      · sz_positivity
      · exact pow_mul_m_le_card_part hP hU
    _ ≤ #(star hP G ε hU V) / ↑4 ^ #P.parts := by
      rw [mul_assoc, mul_comm ((4 : ℝ) ^ #P.parts), ← div_div, ← mul_div_assoc, ← mul_comm_div]
      refine mul_le_of_le_one_right (by positivity) ?_
      have hm : (0 : ℝ) < m := by sz_positivity
      rw [mul_div_assoc', div_le_one hm, ← one_div, one_sub_div hm.ne', mul_div_assoc',
        div_le_iff₀ hm]
      linarith

Premises used: HSub.hSub, id, HDiv.hDiv, SzemerediRegularity.star, Finset.biUnion, Finpartition.parts, Inv.inv, Finset.card, SimpleGraph.nonuniformWitness, OfNat.ofNat