l3lab/ntp-mathlib huggingface dataset:
private theorem card_nonuniformWitness_sdiff_biUnion_star (hV : V ∈ P.parts) (hUV : U ≠ V)
    (h₂ : ¬G.IsUniform ε U V) :
    (G.nonuniformWitness ε U V \ (star hP G ε hU V).biUnion id).card ≤
    2 ^ (P.parts.card - 1) * m := by
  have hX : G.nonuniformWitness ε U V ∈ P.nonuniformWitnesses G ε U :=
    nonuniformWitness_mem_nonuniformWitnesses h₂ hV hUV
  have q : G.nonuniformWitness ε U V \ (star hP G ε hU V).biUnion id ⊆
      ((atomise U <| P.nonuniformWitnesses G ε U).parts.filter fun B =>
        B ⊆ G.nonuniformWitness ε U V ∧ B.Nonempty).biUnion
        fun B => B \ ((chunk hP G ε hU).parts.filter (· ⊆ B)).biUnion id := by
    intro x hx
    rw [← biUnion_filter_atomise hX (G.nonuniformWitness_subset h₂), star, mem_sdiff,
      mem_biUnion] at hx
    simp only [not_exists, mem_biUnion, and_imp, exists_prop, mem_filter,
      not_and, mem_sdiff, id.def, mem_sdiff] at hx ⊢
    obtain ⟨⟨B, hB₁, hB₂⟩, hx⟩ := hx
    exact ⟨B, hB₁, hB₂, fun A hA AB => hx A hA <| AB.trans hB₁.2.1⟩
  apply (card_le_of_subset q).trans (card_biUnion_le.trans _)
  trans ∑ _i in (atomise U <| P.nonuniformWitnesses G ε U).parts.filter fun B =>
    B ⊆ G.nonuniformWitness ε U V ∧ B.Nonempty, m
  · suffices ∀ B ∈ (atomise U <| P.nonuniformWitnesses G ε U).parts,
        (B \ ((chunk hP G ε hU).parts.filter (· ⊆ B)).biUnion id).card ≤ m by
      exact sum_le_sum fun B hB => this B <| filter_subset _ _ hB
    intro B hB
    unfold chunk
    split_ifs with h₁
    · convert card_parts_equitabilise_subset_le _ (card_aux₁ h₁) hB
    · convert card_parts_equitabilise_subset_le _ (card_aux₂ hP hU h₁) hB
  rw [sum_const]
  refine' mul_le_mul_right' _ _
  have t := card_filter_atomise_le_two_pow (s := U) hX
  refine' t.trans (pow_le_pow_right (by norm_num) <| tsub_le_tsub_right _ _)
  

Proof state:
α : Type u_1
inst✝ : Fintype α
P : Finpartition univ
hP : IsEquipartition P
G : SimpleGraph α
ε : ℝ
U : Finset α
hU : U ∈ P.parts
V : Finset α
𝒜 : Finset (Finset α)
s : Finset α
hV : V ∈ P.parts
hUV : U ≠ V
h₂ : ¬SimpleGraph.IsUniform G ε U V
hX : SimpleGraph.nonuniformWitness G ε U V ∈ nonuniformWitnesses P G ε U
q :
  SimpleGraph.nonuniformWitness G ε U V \ Finset.biUnion (star hP G ε hU V) id ⊆
    Finset.biUnion
      (filter (fun B => B ⊆ SimpleGraph.nonuniformWitness G ε U V ∧ Finset.Nonempty B)
        (atomise U (nonuniformWitnesses P G ε U)).parts)
      fun B => B \ Finset.biUnion (filter (fun x => x ⊆ B) (chunk hP G ε hU).parts) id
t :
  Finset.card
      (filter (fun u => u ⊆ SimpleGraph.nonuniformWitness G ε U V ∧ Finset.Nonempty u)
        (atomise U (nonuniformWitnesses P G ε U)).parts) ≤
    2 ^ (Finset.card (nonuniformWitnesses P G ε U) - 1)
⊢ Finset.card (nonuniformWitnesses P G ε U) ≤ Finset.card P.parts

Next tactic:
exact card_image_le.trans (card_le_of_subset <| filter_subset _ _)
private theorem one_sub_eps_mul_card_nonuniformWitness_le_card_star (hV : V ∈ P.parts)
    (hUV : U ≠ V) (hunif : ¬G.IsUniform ε U V) (hPε : ↑100 ≤ ↑4 ^ P.parts.card * ε ^ 5)
    (hε₁ : ε ≤ 1) :
    (1 - ε / 10) * (G.nonuniformWitness ε U V).card ≤ ((star hP G ε hU V).biUnion id).card := by
  

Proof state:
α : Type u_1
inst✝ : Fintype α
P : Finpartition univ
hP : IsEquipartition P
G : SimpleGraph α
ε : ℝ
U : Finset α
hU : U ∈ P.parts
V : Finset α
𝒜 : Finset (Finset α)
s : Finset α
hV : V ∈ P.parts
hUV : U ≠ V
hunif : ¬SimpleGraph.IsUniform G ε U V
hPε : 100 ≤ 4 ^ Finset.card P.parts * ε ^ 5
hε₁ : ε ≤ 1
⊢ (1 - ε / 10) * ↑(Finset.card (SimpleGraph.nonuniformWitness G ε U V)) ≤
    ↑(Finset.card (Finset.biUnion (star hP G ε hU V) id))

Next tactic:
have hP₁ : 0 < P.parts.card := Finset.card_pos.2 ⟨_, hU⟩
private theorem one_sub_eps_mul_card_nonuniformWitness_le_card_star (hV : V ∈ P.parts)
    (hUV : U ≠ V) (hunif : ¬G.IsUniform ε U V) (hPε : ↑100 ≤ ↑4 ^ P.parts.card * ε ^ 5)
    (hε₁ : ε ≤ 1) :
    (1 - ε / 10) * (G.nonuniformWitness ε U V).card ≤ ((star hP G ε hU V).biUnion id).card := by
  have hP₁ : 0 < P.parts.card := Finset.card_pos.2 ⟨_, hU⟩
  

Proof state:
α : Type u_1
inst✝ : Fintype α
P : Finpartition univ
hP : IsEquipartition P
G : SimpleGraph α
ε : ℝ
U : Finset α
hU : U ∈ P.parts
V : Finset α
𝒜 : Finset (Finset α)
s : Finset α
hV : V ∈ P.parts
hUV : U ≠ V
hunif : ¬SimpleGraph.IsUniform G ε U V
hPε : 100 ≤ 4 ^ Finset.card P.parts * ε ^ 5
hε₁ : ε ≤ 1
hP₁ : 0 < Finset.card P.parts
⊢ (1 - ε / 10) * ↑(Finset.card (SimpleGraph.nonuniformWitness G ε U V)) ≤
    ↑(Finset.card (Finset.biUnion (star hP G ε hU V) id))

Next tactic:
have : (↑2 ^ P.parts.card : ℝ) * m / (U.card * ε) ≤ ε / 10 := by
    rw [← div_div, div_le_iff']
    swap
    sz_positivity
    refine' le_of_mul_le_mul_left _ (pow_pos zero_lt_two P.parts.card)
    calc
      ↑2 ^ P.parts.card * ((↑2 ^ P.parts.card * m : ℝ) / U.card) =
          ((2 : ℝ) * 2) ^ P.parts.card * m / U.card := by
        rw [mul_pow, ← mul_div_assoc, mul_assoc]
      _ = ↑4 ^ P.parts.card * m / U.card := by norm_num
      _ ≤ 1 := (div_le_one_of_le (pow_mul_m_le_card_part hP hU) (cast_nonneg _))
      _ ≤ ↑2 ^ P.parts.card * ε ^ 2 / 10 := by
        refine' (one_le_sq_iff <| by positivity).1 _
        rw [div_pow, mul_pow, pow_right_comm, ← pow_mul ε,
          one_le_div (sq_pos_of_ne_zero (10 : ℝ) <| by norm_num)]
        calc
          (↑10 ^ 2) = 100 := by norm_num
          _ ≤ ↑4 ^ P.parts.card * ε ^ 5 := hPε
          _ ≤ ↑4 ^ P.parts.card * ε ^ 4 :=
            (mul_le_mul_of_nonneg_left (pow_le_pow_of_le_one (by sz_positivity) hε₁ <| le_succ _)
              (by positivity))
          _ = (↑2 ^ 2) ^ P.parts.card * ε ^ (2 * 2) := by norm_num
      _ = ↑2 ^ P.parts.card * (ε * (ε / 10)) := by rw [mul_div_assoc, sq, mul_div_assoc]
private theorem one_sub_eps_mul_card_nonuniformWitness_le_card_star (hV : V ∈ P.parts)
    (hUV : U ≠ V) (hunif : ¬G.IsUniform ε U V) (hPε : ↑100 ≤ ↑4 ^ P.parts.card * ε ^ 5)
    (hε₁ : ε ≤ 1) :
    (1 - ε / 10) * (G.nonuniformWitness ε U V).card ≤ ((star hP G ε hU V).biUnion id).card := by
  have hP₁ : 0 < P.parts.card := Finset.card_pos.2 ⟨_, hU⟩
  have : (↑2 ^ P.parts.card : ℝ) * m / (U.card * ε) ≤ ε / 10 := by
    

Proof state:
α : Type u_1
inst✝ : Fintype α
P : Finpartition univ
hP : IsEquipartition P
G : SimpleGraph α
ε : ℝ
U : Finset α
hU : U ∈ P.parts
V : Finset α
𝒜 : Finset (Finset α)
s : Finset α
hV : V ∈ P.parts
hUV : U ≠ V
hunif : ¬SimpleGraph.IsUniform G ε U V
hPε : 100 ≤ 4 ^ Finset.card P.parts * ε ^ 5
hε₁ : ε ≤ 1
hP₁ : 0 < Finset.card P.parts
⊢ 2 ^ Finset.card P.parts * ↑m / (↑(Finset.card U) * ε) ≤ ε / 10

Next tactic:
rw [← div_div, div_le_iff']
private theorem one_sub_eps_mul_card_nonuniformWitness_le_card_star (hV : V ∈ P.parts)
    (hUV : U ≠ V) (hunif : ¬G.IsUniform ε U V) (hPε : ↑100 ≤ ↑4 ^ P.parts.card * ε ^ 5)
    (hε₁ : ε ≤ 1) :
    (1 - ε / 10) * (G.nonuniformWitness ε U V).card ≤ ((star hP G ε hU V).biUnion id).card := by
  have hP₁ : 0 < P.parts.card := Finset.card_pos.2 ⟨_, hU⟩
  have : (↑2 ^ P.parts.card : ℝ) * m / (U.card * ε) ≤ ε / 10 := by
    rw [← div_div, div_le_iff']
    

Proof state:
α : Type u_1
inst✝ : Fintype α
P : Finpartition univ
hP : IsEquipartition P
G : SimpleGraph α
ε : ℝ
U : Finset α
hU : U ∈ P.parts
V : Finset α
𝒜 : Finset (Finset α)
s : Finset α
hV : V ∈ P.parts
hUV : U ≠ V
hunif : ¬SimpleGraph.IsUniform G ε U V
hPε : 100 ≤ 4 ^ Finset.card P.parts * ε ^ 5
hε₁ : ε ≤ 1
hP₁ : 0 < Finset.card P.parts
⊢ 2 ^ Finset.card P.parts * ↑m / ↑(Finset.card U) ≤ ε * (ε / 10)
α : Type u_1
inst✝ : Fintype α
P : Finpartition univ
hP : IsEquipartition P
G : SimpleGraph α
ε : ℝ
U : Finset α
hU : U ∈ P.parts
V : Finset α
𝒜 : Finset (Finset α)
s : Finset α
hV : V ∈ P.parts
hUV : U ≠ V
hunif : ¬SimpleGraph.IsUniform G ε U V
hPε : 100 ≤ 4 ^ Finset.card P.parts * ε ^ 5
hε₁ : ε ≤ 1
hP₁ : 0 < Finset.card P.parts
⊢ 0 < ε

Next tactic:
swap
private theorem one_sub_eps_mul_card_nonuniformWitness_le_card_star (hV : V ∈ P.parts)
    (hUV : U ≠ V) (hunif : ¬G.IsUniform ε U V) (hPε : ↑100 ≤ ↑4 ^ P.parts.card * ε ^ 5)
    (hε₁ : ε ≤ 1) :
    (1 - ε / 10) * (G.nonuniformWitness ε U V).card ≤ ((star hP G ε hU V).biUnion id).card := by
  have hP₁ : 0 < P.parts.card := Finset.card_pos.2 ⟨_, hU⟩
  have : (↑2 ^ P.parts.card : ℝ) * m / (U.card * ε) ≤ ε / 10 := by
    rw [← div_div, div_le_iff']
    swap
    

Proof state:
α : Type u_1
inst✝ : Fintype α
P : Finpartition univ
hP : IsEquipartition P
G : SimpleGraph α
ε : ℝ
U : Finset α
hU : U ∈ P.parts
V : Finset α
𝒜 : Finset (Finset α)
s : Finset α
hV : V ∈ P.parts
hUV : U ≠ V
hunif : ¬SimpleGraph.IsUniform G ε U V
hPε : 100 ≤ 4 ^ Finset.card P.parts * ε ^ 5
hε₁ : ε ≤ 1
hP₁ : 0 < Finset.card P.parts
⊢ 0 < ε
α : Type u_1
inst✝ : Fintype α
P : Finpartition univ
hP : IsEquipartition P
G : SimpleGraph α
ε : ℝ
U : Finset α
hU : U ∈ P.parts
V : Finset α
𝒜 : Finset (Finset α)
s : Finset α
hV : V ∈ P.parts
hUV : U ≠ V
hunif : ¬SimpleGraph.IsUniform G ε U V
hPε : 100 ≤ 4 ^ Finset.card P.parts * ε ^ 5
hε₁ : ε ≤ 1
hP₁ : 0 < Finset.card P.parts
⊢ 2 ^ Finset.card P.parts * ↑m / ↑(Finset.card U) ≤ ε * (ε / 10)

Next tactic:
sz_positivity
private theorem one_sub_eps_mul_card_nonuniformWitness_le_card_star (hV : V ∈ P.parts)
    (hUV : U ≠ V) (hunif : ¬G.IsUniform ε U V) (hPε : ↑100 ≤ ↑4 ^ P.parts.card * ε ^ 5)
    (hε₁ : ε ≤ 1) :
    (1 - ε / 10) * (G.nonuniformWitness ε U V).card ≤ ((star hP G ε hU V).biUnion id).card := by
  have hP₁ : 0 < P.parts.card := Finset.card_pos.2 ⟨_, hU⟩
  have : (↑2 ^ P.parts.card : ℝ) * m / (U.card * ε) ≤ ε / 10 := by
    rw [← div_div, div_le_iff']
    swap
    sz_positivity
    

Proof state:
α : Type u_1
inst✝ : Fintype α
P : Finpartition univ
hP : IsEquipartition P
G : SimpleGraph α
ε : ℝ
U : Finset α
hU : U ∈ P.parts
V : Finset α
𝒜 : Finset (Finset α)
s : Finset α
hV : V ∈ P.parts
hUV : U ≠ V
hunif : ¬SimpleGraph.IsUniform G ε U V
hPε : 100 ≤ 4 ^ Finset.card P.parts * ε ^ 5
hε₁ : ε ≤ 1
hP₁ : 0 < Finset.card P.parts
⊢ 2 ^ Finset.card P.parts * ↑m / ↑(Finset.card U) ≤ ε * (ε / 10)

Next tactic:
refine' le_of_mul_le_mul_left _ (pow_pos zero_lt_two P.parts.card)
private theorem one_sub_eps_mul_card_nonuniformWitness_le_card_star (hV : V ∈ P.parts)
    (hUV : U ≠ V) (hunif : ¬G.IsUniform ε U V) (hPε : ↑100 ≤ ↑4 ^ P.parts.card * ε ^ 5)
    (hε₁ : ε ≤ 1) :
    (1 - ε / 10) * (G.nonuniformWitness ε U V).card ≤ ((star hP G ε hU V).biUnion id).card := by
  have hP₁ : 0 < P.parts.card := Finset.card_pos.2 ⟨_, hU⟩
  have : (↑2 ^ P.parts.card : ℝ) * m / (U.card * ε) ≤ ε / 10 := by
    rw [← div_div, div_le_iff']
    swap
    sz_positivity
    refine' le_of_mul_le_mul_left _ (pow_pos zero_lt_two P.parts.card)
    

Proof state:
α : Type u_1
inst✝ : Fintype α
P : Finpartition univ
hP : IsEquipartition P
G : SimpleGraph α
ε : ℝ
U : Finset α
hU : U ∈ P.parts
V : Finset α
𝒜 : Finset (Finset α)
s : Finset α
hV : V ∈ P.parts
hUV : U ≠ V
hunif : ¬SimpleGraph.IsUniform G ε U V
hPε : 100 ≤ 4 ^ Finset.card P.parts * ε ^ 5
hε₁ : ε ≤ 1
hP₁ : 0 < Finset.card P.parts
⊢ 2 ^ Finset.card P.parts * (2 ^ Finset.card P.parts * ↑m / ↑(Finset.card U)) ≤ 2 ^ Finset.card P.parts * (ε * (ε / 10))

Next tactic:
calc
      ↑2 ^ P.parts.card * ((↑2 ^ P.parts.card * m : ℝ) / U.card) =
          ((2 : ℝ) * 2) ^ P.parts.card * m / U.card := by
        rw [mul_pow, ← mul_div_assoc, mul_assoc]
      _ = ↑4 ^ P.parts.card * m / U.card := by norm_num
      _ ≤ 1 := (div_le_one_of_le (pow_mul_m_le_card_part hP hU) (cast_nonneg _))
      _ ≤ ↑2 ^ P.parts.card * ε ^ 2 / 10 := by
        refine' (one_le_sq_iff <| by positivity).1 _
        rw [div_pow, mul_pow, pow_right_comm, ← pow_mul ε,
          one_le_div (sq_pos_of_ne_zero (10 : ℝ) <| by norm_num)]
        calc
          (↑10 ^ 2) = 100 := by norm_num
          _ ≤ ↑4 ^ P.parts.card * ε ^ 5 := hPε
          _ ≤ ↑4 ^ P.parts.card * ε ^ 4 :=
            (mul_le_mul_of_nonneg_left (pow_le_pow_of_le_one (by sz_positivity) hε₁ <| le_succ _)
              (by positivity))
          _ = (↑2 ^ 2) ^ P.parts.card * ε ^ (2 * 2) := by norm_num
      _ = ↑2 ^ P.parts.card * (ε * (ε / 10)) := by rw [mul_div_assoc, sq, mul_div_assoc]
private theorem one_sub_eps_mul_card_nonuniformWitness_le_card_star (hV : V ∈ P.parts)
    (hUV : U ≠ V) (hunif : ¬G.IsUniform ε U V) (hPε : ↑100 ≤ ↑4 ^ P.parts.card * ε ^ 5)
    (hε₁ : ε ≤ 1) :
    (1 - ε / 10) * (G.nonuniformWitness ε U V).card ≤ ((star hP G ε hU V).biUnion id).card := by
  have hP₁ : 0 < P.parts.card := Finset.card_pos.2 ⟨_, hU⟩
  have : (↑2 ^ P.parts.card : ℝ) * m / (U.card * ε) ≤ ε / 10 := by
    rw [← div_div, div_le_iff']
    swap
    sz_positivity
    refine' le_of_mul_le_mul_left _ (pow_pos zero_lt_two P.parts.card)
    calc
      ↑2 ^ P.parts.card * ((↑2 ^ P.parts.card * m : ℝ) / U.card) =
          ((2 : ℝ) * 2) ^ P.parts.card * m / U.card := by
        

Proof state:
α : Type u_1
inst✝ : Fintype α
P : Finpartition univ
hP : IsEquipartition P
G : SimpleGraph α
ε : ℝ
U : Finset α
hU : U ∈ P.parts
V : Finset α
𝒜 : Finset (Finset α)
s : Finset α
hV : V ∈ P.parts
hUV : U ≠ V
hunif : ¬SimpleGraph.IsUniform G ε U V
hPε : 100 ≤ 4 ^ Finset.card P.parts * ε ^ 5
hε₁ : ε ≤ 1
hP₁ : 0 < Finset.card P.parts
⊢ 2 ^ Finset.card P.parts * (2 ^ Finset.card P.parts * ↑m / ↑(Finset.card U)) =
    (2 * 2) ^ Finset.card P.parts * ↑m / ↑(Finset.card U)

Next tactic:
rw [mul_pow, ← mul_div_assoc, mul_assoc]
private theorem one_sub_eps_mul_card_nonuniformWitness_le_card_star (hV : V ∈ P.parts)
    (hUV : U ≠ V) (hunif : ¬G.IsUniform ε U V) (hPε : ↑100 ≤ ↑4 ^ P.parts.card * ε ^ 5)
    (hε₁ : ε ≤ 1) :
    (1 - ε / 10) * (G.nonuniformWitness ε U V).card ≤ ((star hP G ε hU V).biUnion id).card := by
  have hP₁ : 0 < P.parts.card := Finset.card_pos.2 ⟨_, hU⟩
  have : (↑2 ^ P.parts.card : ℝ) * m / (U.card * ε) ≤ ε / 10 := by
    rw [← div_div, div_le_iff']
    swap
    sz_positivity
    refine' le_of_mul_le_mul_left _ (pow_pos zero_lt_two P.parts.card)
    calc
      ↑2 ^ P.parts.card * ((↑2 ^ P.parts.card * m : ℝ) / U.card) =
          ((2 : ℝ) * 2) ^ P.parts.card * m / U.card := by
        rw [mul_pow, ← mul_div_assoc, mul_assoc]
      _ = ↑4 ^ P.parts.card * m / U.card := by 

Proof state:
α : Type u_1
inst✝ : Fintype α
P : Finpartition univ
hP : IsEquipartition P
G : SimpleGraph α
ε : ℝ
U : Finset α
hU : U ∈ P.parts
V : Finset α
𝒜 : Finset (Finset α)
s : Finset α
hV : V ∈ P.parts
hUV : U ≠ V
hunif : ¬SimpleGraph.IsUniform G ε U V
hPε : 100 ≤ 4 ^ Finset.card P.parts * ε ^ 5
hε₁ : ε ≤ 1
hP₁ : 0 < Finset.card P.parts
⊢ (2 * 2) ^ Finset.card P.parts * ↑m / ↑(Finset.card U) = 4 ^ Finset.card P.parts * ↑m / ↑(Finset.card U)

Next tactic:
norm_num
private theorem one_sub_eps_mul_card_nonuniformWitness_le_card_star (hV : V ∈ P.parts)
    (hUV : U ≠ V) (hunif : ¬G.IsUniform ε U V) (hPε : ↑100 ≤ ↑4 ^ P.parts.card * ε ^ 5)
    (hε₁ : ε ≤ 1) :
    (1 - ε / 10) * (G.nonuniformWitness ε U V).card ≤ ((star hP G ε hU V).biUnion id).card := by
  have hP₁ : 0 < P.parts.card := Finset.card_pos.2 ⟨_, hU⟩
  have : (↑2 ^ P.parts.card : ℝ) * m / (U.card * ε) ≤ ε / 10 := by
    rw [← div_div, div_le_iff']
    swap
    sz_positivity
    refine' le_of_mul_le_mul_left _ (pow_pos zero_lt_two P.parts.card)
    calc
      ↑2 ^ P.parts.card * ((↑2 ^ P.parts.card * m : ℝ) / U.card) =
          ((2 : ℝ) * 2) ^ P.parts.card * m / U.card := by
        rw [mul_pow, ← mul_div_assoc, mul_assoc]
      _ = ↑4 ^ P.parts.card * m / U.card := by norm_num
      _ ≤ 1 := (div_le_one_of_le (pow_mul_m_le_card_part hP hU) (cast_nonneg _))
      _ ≤ ↑2 ^ P.parts.card * ε ^ 2 / 10 := by
        

Proof state:
α : Type u_1
inst✝ : Fintype α
P : Finpartition univ
hP : IsEquipartition P
G : SimpleGraph α
ε : ℝ
U : Finset α
hU : U ∈ P.parts
V : Finset α
𝒜 : Finset (Finset α)
s : Finset α
hV : V ∈ P.parts
hUV : U ≠ V
hunif : ¬SimpleGraph.IsUniform G ε U V
hPε : 100 ≤ 4 ^ Finset.card P.parts * ε ^ 5
hε₁ : ε ≤ 1
hP₁ : 0 < Finset.card P.parts
⊢ 1 ≤ 2 ^ Finset.card P.parts * ε ^ 2 / 10

Next tactic:
refine' (one_le_sq_iff <| by positivity).1 _
private theorem one_sub_eps_mul_card_nonuniformWitness_le_card_star (hV : V ∈ P.parts)
    (hUV : U ≠ V) (hunif : ¬G.IsUniform ε U V) (hPε : ↑100 ≤ ↑4 ^ P.parts.card * ε ^ 5)
    (hε₁ : ε ≤ 1) :
    (1 - ε / 10) * (G.nonuniformWitness ε U V).card ≤ ((star hP G ε hU V).biUnion id).card := by
  have hP₁ : 0 < P.parts.card := Finset.card_pos.2 ⟨_, hU⟩
  have : (↑2 ^ P.parts.card : ℝ) * m / (U.card * ε) ≤ ε / 10 := by
    rw [← div_div, div_le_iff']
    swap
    sz_positivity
    refine' le_of_mul_le_mul_left _ (pow_pos zero_lt_two P.parts.card)
    calc
      ↑2 ^ P.parts.card * ((↑2 ^ P.parts.card * m : ℝ) / U.card) =
          ((2 : ℝ) * 2) ^ P.parts.card * m / U.card := by
        rw [mul_pow, ← mul_div_assoc, mul_assoc]
      _ = ↑4 ^ P.parts.card * m / U.card := by norm_num
      _ ≤ 1 := (div_le_one_of_le (pow_mul_m_le_card_part hP hU) (cast_nonneg _))
      _ ≤ ↑2 ^ P.parts.card * ε ^ 2 / 10 := by
        refine' (one_le_sq_iff <| by 

Proof state:
α : Type u_1
inst✝ : Fintype α
P : Finpartition univ
hP : IsEquipartition P
G : SimpleGraph α
ε : ℝ
U : Finset α
hU : U ∈ P.parts
V : Finset α
𝒜 : Finset (Finset α)
s : Finset α
hV : V ∈ P.parts
hUV : U ≠ V
hunif : ¬SimpleGraph.IsUniform G ε U V
hPε : 100 ≤ 4 ^ Finset.card P.parts * ε ^ 5
hε₁ : ε ≤ 1
hP₁ : 0 < Finset.card P.parts
⊢ 0 ≤ 2 ^ Finset.card P.parts * ε ^ 2 / 10

Next tactic:
positivity
private theorem one_sub_eps_mul_card_nonuniformWitness_le_card_star (hV : V ∈ P.parts)
    (hUV : U ≠ V) (hunif : ¬G.IsUniform ε U V) (hPε : ↑100 ≤ ↑4 ^ P.parts.card * ε ^ 5)
    (hε₁ : ε ≤ 1) :
    (1 - ε / 10) * (G.nonuniformWitness ε U V).card ≤ ((star hP G ε hU V).biUnion id).card := by
  have hP₁ : 0 < P.parts.card := Finset.card_pos.2 ⟨_, hU⟩
  have : (↑2 ^ P.parts.card : ℝ) * m / (U.card * ε) ≤ ε / 10 := by
    rw [← div_div, div_le_iff']
    swap
    sz_positivity
    refine' le_of_mul_le_mul_left _ (pow_pos zero_lt_two P.parts.card)
    calc
      ↑2 ^ P.parts.card * ((↑2 ^ P.parts.card * m : ℝ) / U.card) =
          ((2 : ℝ) * 2) ^ P.parts.card * m / U.card := by
        rw [mul_pow, ← mul_div_assoc, mul_assoc]
      _ = ↑4 ^ P.parts.card * m / U.card := by norm_num
      _ ≤ 1 := (div_le_one_of_le (pow_mul_m_le_card_part hP hU) (cast_nonneg _))
      _ ≤ ↑2 ^ P.parts.card * ε ^ 2 / 10 := by
        refine' (one_le_sq_iff <| by positivity).1 _
        

Proof state:
α : Type u_1
inst✝ : Fintype α
P : Finpartition univ
hP : IsEquipartition P
G : SimpleGraph α
ε : ℝ
U : Finset α
hU : U ∈ P.parts
V : Finset α
𝒜 : Finset (Finset α)
s : Finset α
hV : V ∈ P.parts
hUV : U ≠ V
hunif : ¬SimpleGraph.IsUniform G ε U V
hPε : 100 ≤ 4 ^ Finset.card P.parts * ε ^ 5
hε₁ : ε ≤ 1
hP₁ : 0 < Finset.card P.parts
⊢ 1 ≤ (2 ^ Finset.card P.parts * ε ^ 2 / 10) ^ 2

Next tactic:
rw [div_pow, mul_pow, pow_right_comm, ← pow_mul ε,
          one_le_div (sq_pos_of_ne_zero (10 : ℝ) <| by norm_num)]
private theorem one_sub_eps_mul_card_nonuniformWitness_le_card_star (hV : V ∈ P.parts)
    (hUV : U ≠ V) (hunif : ¬G.IsUniform ε U V) (hPε : ↑100 ≤ ↑4 ^ P.parts.card * ε ^ 5)
    (hε₁ : ε ≤ 1) :
    (1 - ε / 10) * (G.nonuniformWitness ε U V).card ≤ ((star hP G ε hU V).biUnion id).card := by
  have hP₁ : 0 < P.parts.card := Finset.card_pos.2 ⟨_, hU⟩
  have : (↑2 ^ P.parts.card : ℝ) * m / (U.card * ε) ≤ ε / 10 := by
    rw [← div_div, div_le_iff']
    swap
    sz_positivity
    refine' le_of_mul_le_mul_left _ (pow_pos zero_lt_two P.parts.card)
    calc
      ↑2 ^ P.parts.card * ((↑2 ^ P.parts.card * m : ℝ) / U.card) =
          ((2 : ℝ) * 2) ^ P.parts.card * m / U.card := by
        rw [mul_pow, ← mul_div_assoc, mul_assoc]
      _ = ↑4 ^ P.parts.card * m / U.card := by norm_num
      _ ≤ 1 := (div_le_one_of_le (pow_mul_m_le_card_part hP hU) (cast_nonneg _))
      _ ≤ ↑2 ^ P.parts.card * ε ^ 2 / 10 := by
        refine' (one_le_sq_iff <| by positivity).1 _
        rw [div_pow, mul_pow, pow_right_comm, ← pow_mul ε,
          one_le_div (sq_pos_of_ne_zero (10 : ℝ) <| by 

Proof state:
α : Type u_1
inst✝ : Fintype α
P : Finpartition univ
hP : IsEquipartition P
G : SimpleGraph α
ε : ℝ
U : Finset α
hU : U ∈ P.parts
V : Finset α
𝒜 : Finset (Finset α)
s : Finset α
hV : V ∈ P.parts
hUV : U ≠ V
hunif : ¬SimpleGraph.IsUniform G ε U V
hPε : 100 ≤ 4 ^ Finset.card P.parts * ε ^ 5
hε₁ : ε ≤ 1
hP₁ : 0 < Finset.card P.parts
⊢ 10 ≠ 0

Next tactic:
norm_num
private theorem one_sub_eps_mul_card_nonuniformWitness_le_card_star (hV : V ∈ P.parts)
    (hUV : U ≠ V) (hunif : ¬G.IsUniform ε U V) (hPε : ↑100 ≤ ↑4 ^ P.parts.card * ε ^ 5)
    (hε₁ : ε ≤ 1) :
    (1 - ε / 10) * (G.nonuniformWitness ε U V).card ≤ ((star hP G ε hU V).biUnion id).card := by
  have hP₁ : 0 < P.parts.card := Finset.card_pos.2 ⟨_, hU⟩
  have : (↑2 ^ P.parts.card : ℝ) * m / (U.card * ε) ≤ ε / 10 := by
    rw [← div_div, div_le_iff']
    swap
    sz_positivity
    refine' le_of_mul_le_mul_left _ (pow_pos zero_lt_two P.parts.card)
    calc
      ↑2 ^ P.parts.card * ((↑2 ^ P.parts.card * m : ℝ) / U.card) =
          ((2 : ℝ) * 2) ^ P.parts.card * m / U.card := by
        rw [mul_pow, ← mul_div_assoc, mul_assoc]
      _ = ↑4 ^ P.parts.card * m / U.card := by norm_num
      _ ≤ 1 := (div_le_one_of_le (pow_mul_m_le_card_part hP hU) (cast_nonneg _))
      _ ≤ ↑2 ^ P.parts.card * ε ^ 2 / 10 := by
        refine' (one_le_sq_iff <| by positivity).1 _
        rw [div_pow, mul_pow, pow_right_comm, ← pow_mul ε,
          one_le_div (sq_pos_of_ne_zero (10 : ℝ) <| by norm_num)]
        

Proof state:
α : Type u_1
inst✝ : Fintype α
P : Finpartition univ
hP : IsEquipartition P
G : SimpleGraph α
ε : ℝ
U : Finset α
hU : U ∈ P.parts
V : Finset α
𝒜 : Finset (Finset α)
s : Finset α
hV : V ∈ P.parts
hUV : U ≠ V
hunif : ¬SimpleGraph.IsUniform G ε U V
hPε : 100 ≤ 4 ^ Finset.card P.parts * ε ^ 5
hε₁ : ε ≤ 1
hP₁ : 0 < Finset.card P.parts
⊢ 10 ^ 2 ≤ (2 ^ 2) ^ Finset.card P.parts * ε ^ (2 * 2)

Next tactic:
calc
          (↑10 ^ 2) = 100 := by norm_num
          _ ≤ ↑4 ^ P.parts.card * ε ^ 5 := hPε
          _ ≤ ↑4 ^ P.parts.card * ε ^ 4 :=
            (mul_le_mul_of_nonneg_left (pow_le_pow_of_le_one (by sz_positivity) hε₁ <| le_succ _)
              (by positivity))
          _ = (↑2 ^ 2) ^ P.parts.card * ε ^ (2 * 2) := by norm_num
private theorem one_sub_eps_mul_card_nonuniformWitness_le_card_star (hV : V ∈ P.parts)
    (hUV : U ≠ V) (hunif : ¬G.IsUniform ε U V) (hPε : ↑100 ≤ ↑4 ^ P.parts.card * ε ^ 5)
    (hε₁ : ε ≤ 1) :
    (1 - ε / 10) * (G.nonuniformWitness ε U V).card ≤ ((star hP G ε hU V).biUnion id).card := by
  have hP₁ : 0 < P.parts.card := Finset.card_pos.2 ⟨_, hU⟩
  have : (↑2 ^ P.parts.card : ℝ) * m / (U.card * ε) ≤ ε / 10 := by
    rw [← div_div, div_le_iff']
    swap
    sz_positivity
    refine' le_of_mul_le_mul_left _ (pow_pos zero_lt_two P.parts.card)
    calc
      ↑2 ^ P.parts.card * ((↑2 ^ P.parts.card * m : ℝ) / U.card) =
          ((2 : ℝ) * 2) ^ P.parts.card * m / U.card := by
        rw [mul_pow, ← mul_div_assoc, mul_assoc]
      _ = ↑4 ^ P.parts.card * m / U.card := by norm_num
      _ ≤ 1 := (div_le_one_of_le (pow_mul_m_le_card_part hP hU) (cast_nonneg _))
      _ ≤ ↑2 ^ P.parts.card * ε ^ 2 / 10 := by
        refine' (one_le_sq_iff <| by positivity).1 _
        rw [div_pow, mul_pow, pow_right_comm, ← pow_mul ε,
          one_le_div (sq_pos_of_ne_zero (10 : ℝ) <| by norm_num)]
        calc
          (↑10 ^ 2) = 100 := by 

Proof state:
α : Type u_1
inst✝ : Fintype α
P : Finpartition univ
hP : IsEquipartition P
G : SimpleGraph α
ε : ℝ
U : Finset α
hU : U ∈ P.parts
V : Finset α
𝒜 : Finset (Finset α)
s : Finset α
hV : V ∈ P.parts
hUV : U ≠ V
hunif : ¬SimpleGraph.IsUniform G ε U V
hPε : 100 ≤ 4 ^ Finset.card P.parts * ε ^ 5
hε₁ : ε ≤ 1
hP₁ : 0 < Finset.card P.parts
⊢ 10 ^ 2 = 100

Next tactic:
norm_num