-- Mathlib/MeasureTheory/Group/AddCircle.lean
theorem isAddFundamentalDomain_of_ae_ball (I : Set <| AddCircle T) (u x : AddCircle T)
    (hu : IsOfFinAddOrder u) (hI : I =ᵐ[volume] ball x (T / (2 * addOrderOf u))) :
    IsAddFundamentalDomain (AddSubgroup.zmultiples u) I

Proof state:
case refine_2.mk
T : ℝ
hT : Fact (0 < T)
I : Set (AddCircle T)
u x : AddCircle T
hu : IsOfFinAddOrder u
G : AddSubgroup (AddCircle T) := AddSubgroup.zmultiples u
n : ℕ := addOrderOf u
B : Set (AddCircle T) := ball x (T / (2 * ↑n))
hI : I =ᶠ[ae volume] B
hn : 1 ≤ ↑n
g : AddCircle T
hg : g ∈ G
hg' : g ≠ 0
hBg : g +ᵥ B = ball (g + x) (T / (2 * ↑n))
⊢ Disjoint (g +ᵥ B) B

Tactic:
rw [hBg]

Result:
case refine_2.mk
T : ℝ
hT : Fact (0 < T)
I : Set (AddCircle T)
u x : AddCircle T
hu : IsOfFinAddOrder u
G : AddSubgroup (AddCircle T) := AddSubgroup.zmultiples u
n : ℕ := addOrderOf u
B : Set (AddCircle T) := ball x (T / (2 * ↑n))
hI : I =ᶠ[ae volume] B
hn : 1 ≤ ↑n
g : AddCircle T
hg : g ∈ G
hg' : g ≠ 0
hBg : g +ᵥ B = ball (g + x) (T / (2 * ↑n))
⊢ Disjoint (ball (g + x) (T / (2 * ↑n))) B

Proof state:
case refine_4
T : ℝ
hT : Fact (0 < T)
I : Set (AddCircle T)
u x : AddCircle T
hu : IsOfFinAddOrder u
G : AddSubgroup (AddCircle T) := AddSubgroup.zmultiples u
n : ℕ := addOrderOf u
B : Set (AddCircle T) := ball x (T / (2 * ↑n))
hn : 1 ≤ ↑n
hI : I =ᶠ[ae volume] closedBall x (T / (2 * ↑n))
this : Fintype ↥G
hG_card : Finset.univ.card = n
⊢ volume univ ≤ ∑' (g : ↥G), volume I

Tactic:
rw [AddCircle.measure_univ, tsum_fintype, Finset.sum_const, measure_congr hI,
  volume_closedBall, ← ENNReal.ofReal_nsmul, mul_div, mul_div_mul_comm,
  div_self, one_mul, min_eq_right (div_le_self hT.out.le hn), hG_card,
  nsmul_eq_mul, mul_div_cancel₀ T (lt_of_lt_of_le zero_lt_one hn).ne.symm]

Result:
case refine_4
T : ℝ
hT : Fact (0 < T)
I : Set (AddCircle T)
u x : AddCircle T
hu : IsOfFinAddOrder u
G : AddSubgroup (AddCircle T) := AddSubgroup.zmultiples u
n : ℕ := addOrderOf u
B : Set (AddCircle T) := ball x (T / (2 * ↑n))
hn : 1 ≤ ↑n
hI : I =ᶠ[ae volume] closedBall x (T / (2 * ↑n))
this : Fintype ↥G
hG_card : Finset.univ.card = n
⊢ 2 ≠ 0

Proof state:
T : ℝ
hT : Fact (0 < T)
I : Set (AddCircle T)
u x : AddCircle T
hu : IsOfFinAddOrder u
G : AddSubgroup (AddCircle T) := AddSubgroup.zmultiples u
n : ℕ := addOrderOf u
B : Set (AddCircle T) := ball x (T / (2 * ↑n))
hI : I =ᶠ[ae volume] B
hn : 1 ≤ ↑n
g : AddCircle T
hg : g ∈ G
hg' : ⟨g, hg⟩ ≠ 0
⊢ g ≠ 0

Tactic:
simpa only [Ne, AddSubgroup.mk_eq_zero] using hg'

Result:
no goals

Proof state:
T : ℝ
hT : Fact (0 < T)
I : Set (AddCircle T)
u x : AddCircle T
hu : IsOfFinAddOrder u
hI : I =ᶠ[ae volume] ball x (T / (2 * ↑(addOrderOf u)))
G : AddSubgroup (AddCircle T) := AddSubgroup.zmultiples u
⊢ IsAddFundamentalDomain (↥G) I volume

Tactic:
set n := addOrderOf u

Result:
T : ℝ
hT : Fact (0 < T)
I : Set (AddCircle T)
u x : AddCircle T
hu : IsOfFinAddOrder u
G : AddSubgroup (AddCircle T) := AddSubgroup.zmultiples u
n : ℕ := addOrderOf u
hI : I =ᶠ[ae volume] ball x (T / (2 * ↑n))
⊢ IsAddFundamentalDomain (↥G) I volume

Proof state:
case refine_4
T : ℝ
hT : Fact (0 < T)
I : Set (AddCircle T)
u x : AddCircle T
hu : IsOfFinAddOrder u
G : AddSubgroup (AddCircle T) := AddSubgroup.zmultiples u
n : ℕ := addOrderOf u
B : Set (AddCircle T) := ball x (T / (2 * ↑n))
hn : 1 ≤ ↑n
hI : I =ᶠ[ae volume] closedBall x (T / (2 * ↑n))
this : Fintype ↥G
hG_card : Finset.univ.card = n
⊢ volume univ ≤ ∑' (g : ↥G), volume (g +ᵥ I)

Tactic:
simp_rw [measure_vadd]

Result:
case refine_4
T : ℝ
hT : Fact (0 < T)
I : Set (AddCircle T)
u x : AddCircle T
hu : IsOfFinAddOrder u
G : AddSubgroup (AddCircle T) := AddSubgroup.zmultiples u
n : ℕ := addOrderOf u
B : Set (AddCircle T) := ball x (T / (2 * ↑n))
hn : 1 ≤ ↑n
hI : I =ᶠ[ae volume] closedBall x (T / (2 * ↑n))
this : Fintype ↥G
hG_card : Finset.univ.card = n
⊢ volume univ ≤ ∑' (g : ↥G), volume I

Proof state:
case refine_4
T : ℝ
hT : Fact (0 < T)
I : Set (AddCircle T)
u x : AddCircle T
hu : IsOfFinAddOrder u
G : AddSubgroup (AddCircle T) := AddSubgroup.zmultiples u
n : ℕ := addOrderOf u
B : Set (AddCircle T) := ball x (T / (2 * ↑n))
hn : 1 ≤ ↑n
hI : I =ᶠ[ae volume] closedBall x (T / (2 * ↑n))
this : Fintype ↥G
⊢ volume univ ≤ ∑' (g : ↥G), volume (g +ᵥ I)

Tactic:
have hG_card : (Finset.univ : Finset G).card = n := by
  show _ = addOrderOf u
  rw [← Nat.card_zmultiples, Nat.card_eq_fintype_card]; rfl

Result:
case refine_4
T : ℝ
hT : Fact (0 < T)
I : Set (AddCircle T)
u x : AddCircle T
hu : IsOfFinAddOrder u
G : AddSubgroup (AddCircle T) := AddSubgroup.zmultiples u
n : ℕ := addOrderOf u
B : Set (AddCircle T) := ball x (T / (2 * ↑n))
hn : 1 ≤ ↑n
hI : I =ᶠ[ae volume] closedBall x (T / (2 * ↑n))
this : Fintype ↥G
hG_card : Finset.univ.card = n
⊢ volume univ ≤ ∑' (g : ↥G), volume (g +ᵥ I)

Proof state:
case refine_2
T : ℝ
hT : Fact (0 < T)
I : Set (AddCircle T)
u x : AddCircle T
hu : IsOfFinAddOrder u
G : AddSubgroup (AddCircle T) := AddSubgroup.zmultiples u
n : ℕ := addOrderOf u
B : Set (AddCircle T) := ball x (T / (2 * ↑n))
hI : I =ᶠ[ae volume] B
hn : 1 ≤ ↑n
⊢ ∀ (g : ↥G), g ≠ 0 → AEDisjoint volume (g +ᵥ I) I

Tactic:
rintro ⟨g, hg⟩ hg'

Result:
case refine_2.mk
T : ℝ
hT : Fact (0 < T)
I : Set (AddCircle T)
u x : AddCircle T
hu : IsOfFinAddOrder u
G : AddSubgroup (AddCircle T) := AddSubgroup.zmultiples u
n : ℕ := addOrderOf u
B : Set (AddCircle T) := ball x (T / (2 * ↑n))
hI : I =ᶠ[ae volume] B
hn : 1 ≤ ↑n
g : AddCircle T
hg : g ∈ G
hg' : ⟨g, hg⟩ ≠ 0
⊢ AEDisjoint volume (⟨g, hg⟩ +ᵥ I) I

Proof state:
case refine_2.mk
T : ℝ
hT : Fact (0 < T)
I : Set (AddCircle T)
u x : AddCircle T
hu : IsOfFinAddOrder u
G : AddSubgroup (AddCircle T) := AddSubgroup.zmultiples u
n : ℕ := addOrderOf u
B : Set (AddCircle T) := ball x (T / (2 * ↑n))
hI : I =ᶠ[ae volume] B
hn : 1 ≤ ↑n
g : AddCircle T
hg : g ∈ G
hg' : ⟨g, hg⟩ ≠ 0
⊢ AEDisjoint volume (⟨g, hg⟩ +ᵥ I) I

Tactic:
replace hg' : g ≠ 0 := by simpa only [Ne, AddSubgroup.mk_eq_zero] using hg'

Result:
case refine_2.mk
T : ℝ
hT : Fact (0 < T)
I : Set (AddCircle T)
u x : AddCircle T
hu : IsOfFinAddOrder u
G : AddSubgroup (AddCircle T) := AddSubgroup.zmultiples u
n : ℕ := addOrderOf u
B : Set (AddCircle T) := ball x (T / (2 * ↑n))
hI : I =ᶠ[ae volume] B
hn : 1 ≤ ↑n
g : AddCircle T
hg : g ∈ G
hg' : g ≠ 0
⊢ AEDisjoint volume (⟨g, hg⟩ +ᵥ I) I

Proof state:
case refine_2.mk
T : ℝ
hT : Fact (0 < T)
I : Set (AddCircle T)
u x : AddCircle T
hu : IsOfFinAddOrder u
G : AddSubgroup (AddCircle T) := AddSubgroup.zmultiples u
n : ℕ := addOrderOf u
B : Set (AddCircle T) := ball x (T / (2 * ↑n))
hI : I =ᶠ[ae volume] B
hn : 1 ≤ ↑n
g : AddCircle T
hg : g ∈ G
hg' : g ≠ 0
hBg : g +ᵥ B = ball (g + x) (T / (2 * ↑n))
⊢ Disjoint (ball (g + x) (T / (2 * ↑n))) B

Tactic:
apply ball_disjoint_ball

Result:
case refine_2.mk.h
T : ℝ
hT : Fact (0 < T)
I : Set (AddCircle T)
u x : AddCircle T
hu : IsOfFinAddOrder u
G : AddSubgroup (AddCircle T) := AddSubgroup.zmultiples u
n : ℕ := addOrderOf u
B : Set (AddCircle T) := ball x (T / (2 * ↑n))
hI : I =ᶠ[ae volume] B
hn : 1 ≤ ↑n
g : AddCircle T
hg : g ∈ G
hg' : g ≠ 0
hBg : g +ᵥ B = ball (g + x) (T / (2 * ↑n))
⊢ T / (2 * ↑n) + T / (2 * ↑n) ≤ dist (g + x) x

Proof state:
T : ℝ
hT : Fact (0 < T)
I : Set (AddCircle T)
u x : AddCircle T
hu : IsOfFinAddOrder u
G : AddSubgroup (AddCircle T) := AddSubgroup.zmultiples u
n : ℕ := addOrderOf u
B : Set (AddCircle T) := ball x (T / (2 * ↑n))
hI : I =ᶠ[ae volume] B
hn : 1 ≤ ↑n
g : AddCircle T
hg : g ∈ G
hg' : g ≠ 0
hBg : g +ᵥ B = ball (g + x) (T / (2 * ↑n))
⊢ 0 < ↑n

Tactic:
positivity

Result:
no goals

Proof state:
case refine_1
T : ℝ
hT : Fact (0 < T)
I : Set (AddCircle T)
u x : AddCircle T
hu : IsOfFinAddOrder u
G : AddSubgroup (AddCircle T) := AddSubgroup.zmultiples u
n : ℕ := addOrderOf u
B : Set (AddCircle T) := ball x (T / (2 * ↑n))
hI : I =ᶠ[ae volume] B
hn : 1 ≤ ↑n
⊢ NullMeasurableSet I volume

Tactic:
exact measurableSet_ball.nullMeasurableSet.congr hI.symm

Result:
no goals