[GOAL]
R : Type u
M : Type v
inst✝⁷ : CommRing R
inst✝⁶ : Nontrivial R
inst✝⁵ : AddCommGroup M
inst✝⁴ : Module R M
inst✝³ : Module.Free R M
inst✝² : Module.Finite R M
f : M →ₗ[R] M
ι : Type w
inst✝¹ : DecidableEq ι
inst✝ : Fintype ι
b : Basis ι R M
⊢ Matrix.charpoly (↑(toMatrix b b) f) = charpoly f
[PROOFSTEP]
let A := toMatrix b b f
[GOAL]
R : Type u
M : Type v
inst✝⁷ : CommRing R
inst✝⁶ : Nontrivial R
inst✝⁵ : AddCommGroup M
inst✝⁴ : Module R M
inst✝³ : Module.Free R M
inst✝² : Module.Finite R M
f : M →ₗ[R] M
ι : Type w
inst✝¹ : DecidableEq ι
inst✝ : Fintype ι
b : Basis ι R M
A : (fun x => Matrix ι ι R) f := ↑(toMatrix b b) f
⊢ Matrix.charpoly (↑(toMatrix b b) f) = charpoly f
[PROOFSTEP]
let b' := chooseBasis R M
[GOAL]
R : Type u
M : Type v
inst✝⁷ : CommRing R
inst✝⁶ : Nontrivial R
inst✝⁵ : AddCommGroup M
inst✝⁴ : Module R M
inst✝³ : Module.Free R M
inst✝² : Module.Finite R M
f : M →ₗ[R] M
ι : Type w
inst✝¹ : DecidableEq ι
inst✝ : Fintype ι
b : Basis ι R M
A : (fun x => Matrix ι ι R) f := ↑(toMatrix b b) f
b' : Basis (ChooseBasisIndex R M) R M := chooseBasis R M
⊢ Matrix.charpoly (↑(toMatrix b b) f) = charpoly f
[PROOFSTEP]
let ι' := ChooseBasisIndex R M
[GOAL]
R : Type u
M : Type v
inst✝⁷ : CommRing R
inst✝⁶ : Nontrivial R
inst✝⁵ : AddCommGroup M
inst✝⁴ : Module R M
inst✝³ : Module.Free R M
inst✝² : Module.Finite R M
f : M →ₗ[R] M
ι : Type w
inst✝¹ : DecidableEq ι
inst✝ : Fintype ι
b : Basis ι R M
A : (fun x => Matrix ι ι R) f := ↑(toMatrix b b) f
b' : Basis (ChooseBasisIndex R M) R M := chooseBasis R M
ι' : Type v := ChooseBasisIndex R M
⊢ Matrix.charpoly (↑(toMatrix b b) f) = charpoly f
[PROOFSTEP]
let A' := toMatrix b' b' f
[GOAL]
R : Type u
M : Type v
inst✝⁷ : CommRing R
inst✝⁶ : Nontrivial R
inst✝⁵ : AddCommGroup M
inst✝⁴ : Module R M
inst✝³ : Module.Free R M
inst✝² : Module.Finite R M
f : M →ₗ[R] M
ι : Type w
inst✝¹ : DecidableEq ι
inst✝ : Fintype ι
b : Basis ι R M
A : (fun x => Matrix ι ι R) f := ↑(toMatrix b b) f
b' : Basis (ChooseBasisIndex R M) R M := chooseBasis R M
ι' : Type v := ChooseBasisIndex R M
A' : (fun x => Matrix (ChooseBasisIndex R M) (ChooseBasisIndex R M) R) f := ↑(toMatrix b' b') f
⊢ Matrix.charpoly (↑(toMatrix b b) f) = charpoly f
[PROOFSTEP]
let e := Basis.indexEquiv b b'
[GOAL]
R : Type u
M : Type v
inst✝⁷ : CommRing R
inst✝⁶ : Nontrivial R
inst✝⁵ : AddCommGroup M
inst✝⁴ : Module R M
inst✝³ : Module.Free R M
inst✝² : Module.Finite R M
f : M →ₗ[R] M
ι : Type w
inst✝¹ : DecidableEq ι
inst✝ : Fintype ι
b : Basis ι R M
A : (fun x => Matrix ι ι R) f := ↑(toMatrix b b) f
b' : Basis (ChooseBasisIndex R M) R M := chooseBasis R M
ι' : Type v := ChooseBasisIndex R M
A' : (fun x => Matrix (ChooseBasisIndex R M) (ChooseBasisIndex R M) R) f := ↑(toMatrix b' b') f
e : ι ≃ ChooseBasisIndex R M := Basis.indexEquiv b b'
⊢ Matrix.charpoly (↑(toMatrix b b) f) = charpoly f
[PROOFSTEP]
let φ := reindexLinearEquiv R R e e
[GOAL]
R : Type u
M : Type v
inst✝⁷ : CommRing R
inst✝⁶ : Nontrivial R
inst✝⁵ : AddCommGroup M
inst✝⁴ : Module R M
inst✝³ : Module.Free R M
inst✝² : Module.Finite R M
f : M →ₗ[R] M
ι : Type w
inst✝¹ : DecidableEq ι
inst✝ : Fintype ι
b : Basis ι R M
A : (fun x => Matrix ι ι R) f := ↑(toMatrix b b) f
b' : Basis (ChooseBasisIndex R M) R M := chooseBasis R M
ι' : Type v := ChooseBasisIndex R M
A' : (fun x => Matrix (ChooseBasisIndex R M) (ChooseBasisIndex R M) R) f := ↑(toMatrix b' b') f
e : ι ≃ ChooseBasisIndex R M := Basis.indexEquiv b b'
φ : Matrix ι ι R ≃ₗ[R] Matrix (ChooseBasisIndex R M) (ChooseBasisIndex R M) R := reindexLinearEquiv R R e e
⊢ Matrix.charpoly (↑(toMatrix b b) f) = charpoly f
[PROOFSTEP]
let φ₁ := reindexLinearEquiv R R e (Equiv.refl ι')
[GOAL]
R : Type u
M : Type v
inst✝⁷ : CommRing R
inst✝⁶ : Nontrivial R
inst✝⁵ : AddCommGroup M
inst✝⁴ : Module R M
inst✝³ : Module.Free R M
inst✝² : Module.Finite R M
f : M →ₗ[R] M
ι : Type w
inst✝¹ : DecidableEq ι
inst✝ : Fintype ι
b : Basis ι R M
A : (fun x => Matrix ι ι R) f := ↑(toMatrix b b) f
b' : Basis (ChooseBasisIndex R M) R M := chooseBasis R M
ι' : Type v := ChooseBasisIndex R M
A' : (fun x => Matrix (ChooseBasisIndex R M) (ChooseBasisIndex R M) R) f := ↑(toMatrix b' b') f
e : ι ≃ ChooseBasisIndex R M := Basis.indexEquiv b b'
φ : Matrix ι ι R ≃ₗ[R] Matrix (ChooseBasisIndex R M) (ChooseBasisIndex R M) R := reindexLinearEquiv R R e e
φ₁ : Matrix ι ι' R ≃ₗ[R] Matrix (ChooseBasisIndex R M) ι' R := reindexLinearEquiv R R e (Equiv.refl ι')
⊢ Matrix.charpoly (↑(toMatrix b b) f) = charpoly f
[PROOFSTEP]
let φ₂ := reindexLinearEquiv R R (Equiv.refl ι') (Equiv.refl ι')
[GOAL]
R : Type u
M : Type v
inst✝⁷ : CommRing R
inst✝⁶ : Nontrivial R
inst✝⁵ : AddCommGroup M
inst✝⁴ : Module R M
inst✝³ : Module.Free R M
inst✝² : Module.Finite R M
f : M →ₗ[R] M
ι : Type w
inst✝¹ : DecidableEq ι
inst✝ : Fintype ι
b : Basis ι R M
A : (fun x => Matrix ι ι R) f := ↑(toMatrix b b) f
b' : Basis (ChooseBasisIndex R M) R M := chooseBasis R M
ι' : Type v := ChooseBasisIndex R M
A' : (fun x => Matrix (ChooseBasisIndex R M) (ChooseBasisIndex R M) R) f := ↑(toMatrix b' b') f
e : ι ≃ ChooseBasisIndex R M := Basis.indexEquiv b b'
φ : Matrix ι ι R ≃ₗ[R] Matrix (ChooseBasisIndex R M) (ChooseBasisIndex R M) R := reindexLinearEquiv R R e e
φ₁ : Matrix ι ι' R ≃ₗ[R] Matrix (ChooseBasisIndex R M) ι' R := reindexLinearEquiv R R e (Equiv.refl ι')
φ₂ : Matrix ι' ι' R ≃ₗ[R] Matrix ι' ι' R := reindexLinearEquiv R R (Equiv.refl ι') (Equiv.refl ι')
⊢ Matrix.charpoly (↑(toMatrix b b) f) = charpoly f
[PROOFSTEP]
let φ₃ := reindexLinearEquiv R R (Equiv.refl ι') e
[GOAL]
R : Type u
M : Type v
inst✝⁷ : CommRing R
inst✝⁶ : Nontrivial R
inst✝⁵ : AddCommGroup M
inst✝⁴ : Module R M
inst✝³ : Module.Free R M
inst✝² : Module.Finite R M
f : M →ₗ[R] M
ι : Type w
inst✝¹ : DecidableEq ι
inst✝ : Fintype ι
b : Basis ι R M
A : (fun x => Matrix ι ι R) f := ↑(toMatrix b b) f
b' : Basis (ChooseBasisIndex R M) R M := chooseBasis R M
ι' : Type v := ChooseBasisIndex R M
A' : (fun x => Matrix (ChooseBasisIndex R M) (ChooseBasisIndex R M) R) f := ↑(toMatrix b' b') f
e : ι ≃ ChooseBasisIndex R M := Basis.indexEquiv b b'
φ : Matrix ι ι R ≃ₗ[R] Matrix (ChooseBasisIndex R M) (ChooseBasisIndex R M) R := reindexLinearEquiv R R e e
φ₁ : Matrix ι ι' R ≃ₗ[R] Matrix (ChooseBasisIndex R M) ι' R := reindexLinearEquiv R R e (Equiv.refl ι')
φ₂ : Matrix ι' ι' R ≃ₗ[R] Matrix ι' ι' R := reindexLinearEquiv R R (Equiv.refl ι') (Equiv.refl ι')
φ₃ : Matrix ι' ι R ≃ₗ[R] Matrix ι' (ChooseBasisIndex R M) R := reindexLinearEquiv R R (Equiv.refl ι') e
⊢ Matrix.charpoly (↑(toMatrix b b) f) = charpoly f
[PROOFSTEP]
let P := b.toMatrix b'
[GOAL]
R : Type u
M : Type v
inst✝⁷ : CommRing R
inst✝⁶ : Nontrivial R
inst✝⁵ : AddCommGroup M
inst✝⁴ : Module R M
inst✝³ : Module.Free R M
inst✝² : Module.Finite R M
f : M →ₗ[R] M
ι : Type w
inst✝¹ : DecidableEq ι
inst✝ : Fintype ι
b : Basis ι R M
A : (fun x => Matrix ι ι R) f := ↑(toMatrix b b) f
b' : Basis (ChooseBasisIndex R M) R M := chooseBasis R M
ι' : Type v := ChooseBasisIndex R M
A' : (fun x => Matrix (ChooseBasisIndex R M) (ChooseBasisIndex R M) R) f := ↑(toMatrix b' b') f
e : ι ≃ ChooseBasisIndex R M := Basis.indexEquiv b b'
φ : Matrix ι ι R ≃ₗ[R] Matrix (ChooseBasisIndex R M) (ChooseBasisIndex R M) R := reindexLinearEquiv R R e e
φ₁ : Matrix ι ι' R ≃ₗ[R] Matrix (ChooseBasisIndex R M) ι' R := reindexLinearEquiv R R e (Equiv.refl ι')
φ₂ : Matrix ι' ι' R ≃ₗ[R] Matrix ι' ι' R := reindexLinearEquiv R R (Equiv.refl ι') (Equiv.refl ι')
φ₃ : Matrix ι' ι R ≃ₗ[R] Matrix ι' (ChooseBasisIndex R M) R := reindexLinearEquiv R R (Equiv.refl ι') e
P : Matrix ι (ChooseBasisIndex R M) R := Basis.toMatrix b ↑b'
⊢ Matrix.charpoly (↑(toMatrix b b) f) = charpoly f
[PROOFSTEP]
let Q := b'.toMatrix b
[GOAL]
R : Type u
M : Type v
inst✝⁷ : CommRing R
inst✝⁶ : Nontrivial R
inst✝⁵ : AddCommGroup M
inst✝⁴ : Module R M
inst✝³ : Module.Free R M
inst✝² : Module.Finite R M
f : M →ₗ[R] M
ι : Type w
inst✝¹ : DecidableEq ι
inst✝ : Fintype ι
b : Basis ι R M
A : (fun x => Matrix ι ι R) f := ↑(toMatrix b b) f
b' : Basis (ChooseBasisIndex R M) R M := chooseBasis R M
ι' : Type v := ChooseBasisIndex R M
A' : (fun x => Matrix (ChooseBasisIndex R M) (ChooseBasisIndex R M) R) f := ↑(toMatrix b' b') f
e : ι ≃ ChooseBasisIndex R M := Basis.indexEquiv b b'
φ : Matrix ι ι R ≃ₗ[R] Matrix (ChooseBasisIndex R M) (ChooseBasisIndex R M) R := reindexLinearEquiv R R e e
φ₁ : Matrix ι ι' R ≃ₗ[R] Matrix (ChooseBasisIndex R M) ι' R := reindexLinearEquiv R R e (Equiv.refl ι')
φ₂ : Matrix ι' ι' R ≃ₗ[R] Matrix ι' ι' R := reindexLinearEquiv R R (Equiv.refl ι') (Equiv.refl ι')
φ₃ : Matrix ι' ι R ≃ₗ[R] Matrix ι' (ChooseBasisIndex R M) R := reindexLinearEquiv R R (Equiv.refl ι') e
P : Matrix ι (ChooseBasisIndex R M) R := Basis.toMatrix b ↑b'
Q : Matrix (ChooseBasisIndex R M) ι R := Basis.toMatrix b' ↑b
⊢ Matrix.charpoly (↑(toMatrix b b) f) = charpoly f
[PROOFSTEP]
have hPQ : C.mapMatrix (φ₁ P) * C.mapMatrix (φ₃ Q) = 1 := by
  rw [RingHom.mapMatrix_apply, RingHom.mapMatrix_apply, ← Matrix.map_mul, reindexLinearEquiv_mul R R,
    Basis.toMatrix_mul_toMatrix_flip, reindexLinearEquiv_one, ← RingHom.mapMatrix_apply, RingHom.map_one]
[GOAL]
R : Type u
M : Type v
inst✝⁷ : CommRing R
inst✝⁶ : Nontrivial R
inst✝⁵ : AddCommGroup M
inst✝⁴ : Module R M
inst✝³ : Module.Free R M
inst✝² : Module.Finite R M
f : M →ₗ[R] M
ι : Type w
inst✝¹ : DecidableEq ι
inst✝ : Fintype ι
b : Basis ι R M
A : (fun x => Matrix ι ι R) f := ↑(toMatrix b b) f
b' : Basis (ChooseBasisIndex R M) R M := chooseBasis R M
ι' : Type v := ChooseBasisIndex R M
A' : (fun x => Matrix (ChooseBasisIndex R M) (ChooseBasisIndex R M) R) f := ↑(toMatrix b' b') f
e : ι ≃ ChooseBasisIndex R M := Basis.indexEquiv b b'
φ : Matrix ι ι R ≃ₗ[R] Matrix (ChooseBasisIndex R M) (ChooseBasisIndex R M) R := reindexLinearEquiv R R e e
φ₁ : Matrix ι ι' R ≃ₗ[R] Matrix (ChooseBasisIndex R M) ι' R := reindexLinearEquiv R R e (Equiv.refl ι')
φ₂ : Matrix ι' ι' R ≃ₗ[R] Matrix ι' ι' R := reindexLinearEquiv R R (Equiv.refl ι') (Equiv.refl ι')
φ₃ : Matrix ι' ι R ≃ₗ[R] Matrix ι' (ChooseBasisIndex R M) R := reindexLinearEquiv R R (Equiv.refl ι') e
P : Matrix ι (ChooseBasisIndex R M) R := Basis.toMatrix b ↑b'
Q : Matrix (ChooseBasisIndex R M) ι R := Basis.toMatrix b' ↑b
⊢ ↑(RingHom.mapMatrix C) (↑φ₁ P) * ↑(RingHom.mapMatrix C) (↑φ₃ Q) = 1
[PROOFSTEP]
rw [RingHom.mapMatrix_apply, RingHom.mapMatrix_apply, ← Matrix.map_mul, reindexLinearEquiv_mul R R,
  Basis.toMatrix_mul_toMatrix_flip, reindexLinearEquiv_one, ← RingHom.mapMatrix_apply, RingHom.map_one]
[GOAL]
R : Type u
M : Type v
inst✝⁷ : CommRing R
inst✝⁶ : Nontrivial R
inst✝⁵ : AddCommGroup M
inst✝⁴ : Module R M
inst✝³ : Module.Free R M
inst✝² : Module.Finite R M
f : M →ₗ[R] M
ι : Type w
inst✝¹ : DecidableEq ι
inst✝ : Fintype ι
b : Basis ι R M
A : (fun x => Matrix ι ι R) f := ↑(toMatrix b b) f
b' : Basis (ChooseBasisIndex R M) R M := chooseBasis R M
ι' : Type v := ChooseBasisIndex R M
A' : (fun x => Matrix (ChooseBasisIndex R M) (ChooseBasisIndex R M) R) f := ↑(toMatrix b' b') f
e : ι ≃ ChooseBasisIndex R M := Basis.indexEquiv b b'
φ : Matrix ι ι R ≃ₗ[R] Matrix (ChooseBasisIndex R M) (ChooseBasisIndex R M) R := reindexLinearEquiv R R e e
φ₁ : Matrix ι ι' R ≃ₗ[R] Matrix (ChooseBasisIndex R M) ι' R := reindexLinearEquiv R R e (Equiv.refl ι')
φ₂ : Matrix ι' ι' R ≃ₗ[R] Matrix ι' ι' R := reindexLinearEquiv R R (Equiv.refl ι') (Equiv.refl ι')
φ₃ : Matrix ι' ι R ≃ₗ[R] Matrix ι' (ChooseBasisIndex R M) R := reindexLinearEquiv R R (Equiv.refl ι') e
P : Matrix ι (ChooseBasisIndex R M) R := Basis.toMatrix b ↑b'
Q : Matrix (ChooseBasisIndex R M) ι R := Basis.toMatrix b' ↑b
hPQ : ↑(RingHom.mapMatrix C) (↑φ₁ P) * ↑(RingHom.mapMatrix C) (↑φ₃ Q) = 1
⊢ Matrix.charpoly (↑(toMatrix b b) f) = charpoly f
[PROOFSTEP]
calc
  A.charpoly = (reindex e e A).charpoly := (charpoly_reindex _ _).symm
  _ = det (scalar ι' X - C.mapMatrix (φ A)) := rfl
  _ = det (scalar ι' X - C.mapMatrix (φ (P * A' * Q))) := by
    rw [basis_toMatrix_mul_linearMap_toMatrix_mul_basis_toMatrix]
  _ = det (scalar ι' X - C.mapMatrix (φ₁ P * φ₂ A' * φ₃ Q)) := by rw [reindexLinearEquiv_mul, reindexLinearEquiv_mul]
  _ = det (scalar ι' X - C.mapMatrix (φ₁ P) * C.mapMatrix A' * C.mapMatrix (φ₃ Q)) := by simp
  _ =
      det
        (scalar ι' X * C.mapMatrix (φ₁ P) * C.mapMatrix (φ₃ Q) -
          C.mapMatrix (φ₁ P) * C.mapMatrix A' * C.mapMatrix (φ₃ Q)) :=
    by rw [Matrix.mul_assoc ((scalar ι') X), hPQ, Matrix.mul_one]
  _ =
      det
        (C.mapMatrix (φ₁ P) * scalar ι' X * C.mapMatrix (φ₃ Q) -
          C.mapMatrix (φ₁ P) * C.mapMatrix A' * C.mapMatrix (φ₃ Q)) :=
    by simp
  _ = det (C.mapMatrix (φ₁ P) * (scalar ι' X - C.mapMatrix A') * C.mapMatrix (φ₃ Q)) := by
    rw [← Matrix.sub_mul, ← Matrix.mul_sub]
  _ = det (C.mapMatrix (φ₁ P)) * det (scalar ι' X - C.mapMatrix A') * det (C.mapMatrix (φ₃ Q)) := by
    rw [det_mul, det_mul]
  _ = det (C.mapMatrix (φ₁ P)) * det (C.mapMatrix (φ₃ Q)) * det (scalar ι' X - C.mapMatrix A') := by ring
  _ = det (scalar ι' X - C.mapMatrix A') := by rw [← det_mul, hPQ, det_one, one_mul]
  _ = f.charpoly := rfl
[GOAL]
R : Type u
M : Type v
inst✝⁷ : CommRing R
inst✝⁶ : Nontrivial R
inst✝⁵ : AddCommGroup M
inst✝⁴ : Module R M
inst✝³ : Module.Free R M
inst✝² : Module.Finite R M
f : M →ₗ[R] M
ι : Type w
inst✝¹ : DecidableEq ι
inst✝ : Fintype ι
b : Basis ι R M
A : (fun x => Matrix ι ι R) f := ↑(toMatrix b b) f
b' : Basis (ChooseBasisIndex R M) R M := chooseBasis R M
ι' : Type v := ChooseBasisIndex R M
A' : (fun x => Matrix (ChooseBasisIndex R M) (ChooseBasisIndex R M) R) f := ↑(toMatrix b' b') f
e : ι ≃ ChooseBasisIndex R M := Basis.indexEquiv b b'
φ : Matrix ι ι R ≃ₗ[R] Matrix (ChooseBasisIndex R M) (ChooseBasisIndex R M) R := reindexLinearEquiv R R e e
φ₁ : Matrix ι ι' R ≃ₗ[R] Matrix (ChooseBasisIndex R M) ι' R := reindexLinearEquiv R R e (Equiv.refl ι')
φ₂ : Matrix ι' ι' R ≃ₗ[R] Matrix ι' ι' R := reindexLinearEquiv R R (Equiv.refl ι') (Equiv.refl ι')
φ₃ : Matrix ι' ι R ≃ₗ[R] Matrix ι' (ChooseBasisIndex R M) R := reindexLinearEquiv R R (Equiv.refl ι') e
P : Matrix ι (ChooseBasisIndex R M) R := Basis.toMatrix b ↑b'
Q : Matrix (ChooseBasisIndex R M) ι R := Basis.toMatrix b' ↑b
hPQ : ↑(RingHom.mapMatrix C) (↑φ₁ P) * ↑(RingHom.mapMatrix C) (↑φ₃ Q) = 1
⊢ det (↑(scalar ι') X - ↑(RingHom.mapMatrix C) (↑φ A)) = det (↑(scalar ι') X - ↑(RingHom.mapMatrix C) (↑φ (P * A' * Q)))
[PROOFSTEP]
rw [basis_toMatrix_mul_linearMap_toMatrix_mul_basis_toMatrix]
[GOAL]
R : Type u
M : Type v
inst✝⁷ : CommRing R
inst✝⁶ : Nontrivial R
inst✝⁵ : AddCommGroup M
inst✝⁴ : Module R M
inst✝³ : Module.Free R M
inst✝² : Module.Finite R M
f : M →ₗ[R] M
ι : Type w
inst✝¹ : DecidableEq ι
inst✝ : Fintype ι
b : Basis ι R M
A : (fun x => Matrix ι ι R) f := ↑(toMatrix b b) f
b' : Basis (ChooseBasisIndex R M) R M := chooseBasis R M
ι' : Type v := ChooseBasisIndex R M
A' : (fun x => Matrix (ChooseBasisIndex R M) (ChooseBasisIndex R M) R) f := ↑(toMatrix b' b') f
e : ι ≃ ChooseBasisIndex R M := Basis.indexEquiv b b'
φ : Matrix ι ι R ≃ₗ[R] Matrix (ChooseBasisIndex R M) (ChooseBasisIndex R M) R := reindexLinearEquiv R R e e
φ₁ : Matrix ι ι' R ≃ₗ[R] Matrix (ChooseBasisIndex R M) ι' R := reindexLinearEquiv R R e (Equiv.refl ι')
φ₂ : Matrix ι' ι' R ≃ₗ[R] Matrix ι' ι' R := reindexLinearEquiv R R (Equiv.refl ι') (Equiv.refl ι')
φ₃ : Matrix ι' ι R ≃ₗ[R] Matrix ι' (ChooseBasisIndex R M) R := reindexLinearEquiv R R (Equiv.refl ι') e
P : Matrix ι (ChooseBasisIndex R M) R := Basis.toMatrix b ↑b'
Q : Matrix (ChooseBasisIndex R M) ι R := Basis.toMatrix b' ↑b
hPQ : ↑(RingHom.mapMatrix C) (↑φ₁ P) * ↑(RingHom.mapMatrix C) (↑φ₃ Q) = 1
⊢ det (↑(scalar ι') X - ↑(RingHom.mapMatrix C) (↑φ (P * A' * Q))) =
    det (↑(scalar ι') X - ↑(RingHom.mapMatrix C) (↑φ₁ P * ↑φ₂ A' * ↑φ₃ Q))
[PROOFSTEP]
rw [reindexLinearEquiv_mul, reindexLinearEquiv_mul]
[GOAL]
R : Type u
M : Type v
inst✝⁷ : CommRing R
inst✝⁶ : Nontrivial R
inst✝⁵ : AddCommGroup M
inst✝⁴ : Module R M
inst✝³ : Module.Free R M
inst✝² : Module.Finite R M
f : M →ₗ[R] M
ι : Type w
inst✝¹ : DecidableEq ι
inst✝ : Fintype ι
b : Basis ι R M
A : (fun x => Matrix ι ι R) f := ↑(toMatrix b b) f
b' : Basis (ChooseBasisIndex R M) R M := chooseBasis R M
ι' : Type v := ChooseBasisIndex R M
A' : (fun x => Matrix (ChooseBasisIndex R M) (ChooseBasisIndex R M) R) f := ↑(toMatrix b' b') f
e : ι ≃ ChooseBasisIndex R M := Basis.indexEquiv b b'
φ : Matrix ι ι R ≃ₗ[R] Matrix (ChooseBasisIndex R M) (ChooseBasisIndex R M) R := reindexLinearEquiv R R e e
φ₁ : Matrix ι ι' R ≃ₗ[R] Matrix (ChooseBasisIndex R M) ι' R := reindexLinearEquiv R R e (Equiv.refl ι')
φ₂ : Matrix ι' ι' R ≃ₗ[R] Matrix ι' ι' R := reindexLinearEquiv R R (Equiv.refl ι') (Equiv.refl ι')
φ₃ : Matrix ι' ι R ≃ₗ[R] Matrix ι' (ChooseBasisIndex R M) R := reindexLinearEquiv R R (Equiv.refl ι') e
P : Matrix ι (ChooseBasisIndex R M) R := Basis.toMatrix b ↑b'
Q : Matrix (ChooseBasisIndex R M) ι R := Basis.toMatrix b' ↑b
hPQ : ↑(RingHom.mapMatrix C) (↑φ₁ P) * ↑(RingHom.mapMatrix C) (↑φ₃ Q) = 1
⊢ det (↑(scalar ι') X - ↑(RingHom.mapMatrix C) (↑φ₁ P * ↑φ₂ A' * ↑φ₃ Q)) =
    det (↑(scalar ι') X - ↑(RingHom.mapMatrix C) (↑φ₁ P) * ↑(RingHom.mapMatrix C) A' * ↑(RingHom.mapMatrix C) (↑φ₃ Q))
[PROOFSTEP]
simp
[GOAL]
R : Type u
M : Type v
inst✝⁷ : CommRing R
inst✝⁶ : Nontrivial R
inst✝⁵ : AddCommGroup M
inst✝⁴ : Module R M
inst✝³ : Module.Free R M
inst✝² : Module.Finite R M
f : M →ₗ[R] M
ι : Type w
inst✝¹ : DecidableEq ι
inst✝ : Fintype ι
b : Basis ι R M
A : (fun x => Matrix ι ι R) f := ↑(toMatrix b b) f
b' : Basis (ChooseBasisIndex R M) R M := chooseBasis R M
ι' : Type v := ChooseBasisIndex R M
A' : (fun x => Matrix (ChooseBasisIndex R M) (ChooseBasisIndex R M) R) f := ↑(toMatrix b' b') f
e : ι ≃ ChooseBasisIndex R M := Basis.indexEquiv b b'
φ : Matrix ι ι R ≃ₗ[R] Matrix (ChooseBasisIndex R M) (ChooseBasisIndex R M) R := reindexLinearEquiv R R e e
φ₁ : Matrix ι ι' R ≃ₗ[R] Matrix (ChooseBasisIndex R M) ι' R := reindexLinearEquiv R R e (Equiv.refl ι')
φ₂ : Matrix ι' ι' R ≃ₗ[R] Matrix ι' ι' R := reindexLinearEquiv R R (Equiv.refl ι') (Equiv.refl ι')
φ₃ : Matrix ι' ι R ≃ₗ[R] Matrix ι' (ChooseBasisIndex R M) R := reindexLinearEquiv R R (Equiv.refl ι') e
P : Matrix ι (ChooseBasisIndex R M) R := Basis.toMatrix b ↑b'
Q : Matrix (ChooseBasisIndex R M) ι R := Basis.toMatrix b' ↑b
hPQ : ↑(RingHom.mapMatrix C) (↑φ₁ P) * ↑(RingHom.mapMatrix C) (↑φ₃ Q) = 1
⊢ det (↑(scalar ι') X - ↑(RingHom.mapMatrix C) (↑φ₁ P) * ↑(RingHom.mapMatrix C) A' * ↑(RingHom.mapMatrix C) (↑φ₃ Q)) =
    det
      (↑(scalar ι') X * ↑(RingHom.mapMatrix C) (↑φ₁ P) * ↑(RingHom.mapMatrix C) (↑φ₃ Q) -
        ↑(RingHom.mapMatrix C) (↑φ₁ P) * ↑(RingHom.mapMatrix C) A' * ↑(RingHom.mapMatrix C) (↑φ₃ Q))
[PROOFSTEP]
rw [Matrix.mul_assoc ((scalar ι') X), hPQ, Matrix.mul_one]
[GOAL]
R : Type u
M : Type v
inst✝⁷ : CommRing R
inst✝⁶ : Nontrivial R
inst✝⁵ : AddCommGroup M
inst✝⁴ : Module R M
inst✝³ : Module.Free R M
inst✝² : Module.Finite R M
f : M →ₗ[R] M
ι : Type w
inst✝¹ : DecidableEq ι
inst✝ : Fintype ι
b : Basis ι R M
A : (fun x => Matrix ι ι R) f := ↑(toMatrix b b) f
b' : Basis (ChooseBasisIndex R M) R M := chooseBasis R M
ι' : Type v := ChooseBasisIndex R M
A' : (fun x => Matrix (ChooseBasisIndex R M) (ChooseBasisIndex R M) R) f := ↑(toMatrix b' b') f
e : ι ≃ ChooseBasisIndex R M := Basis.indexEquiv b b'
φ : Matrix ι ι R ≃ₗ[R] Matrix (ChooseBasisIndex R M) (ChooseBasisIndex R M) R := reindexLinearEquiv R R e e
φ₁ : Matrix ι ι' R ≃ₗ[R] Matrix (ChooseBasisIndex R M) ι' R := reindexLinearEquiv R R e (Equiv.refl ι')
φ₂ : Matrix ι' ι' R ≃ₗ[R] Matrix ι' ι' R := reindexLinearEquiv R R (Equiv.refl ι') (Equiv.refl ι')
φ₃ : Matrix ι' ι R ≃ₗ[R] Matrix ι' (ChooseBasisIndex R M) R := reindexLinearEquiv R R (Equiv.refl ι') e
P : Matrix ι (ChooseBasisIndex R M) R := Basis.toMatrix b ↑b'
Q : Matrix (ChooseBasisIndex R M) ι R := Basis.toMatrix b' ↑b
hPQ : ↑(RingHom.mapMatrix C) (↑φ₁ P) * ↑(RingHom.mapMatrix C) (↑φ₃ Q) = 1
⊢ det
      (↑(scalar ι') X * ↑(RingHom.mapMatrix C) (↑φ₁ P) * ↑(RingHom.mapMatrix C) (↑φ₃ Q) -
        ↑(RingHom.mapMatrix C) (↑φ₁ P) * ↑(RingHom.mapMatrix C) A' * ↑(RingHom.mapMatrix C) (↑φ₃ Q)) =
    det
      (↑(RingHom.mapMatrix C) (↑φ₁ P) * ↑(scalar ι') X * ↑(RingHom.mapMatrix C) (↑φ₃ Q) -
        ↑(RingHom.mapMatrix C) (↑φ₁ P) * ↑(RingHom.mapMatrix C) A' * ↑(RingHom.mapMatrix C) (↑φ₃ Q))
[PROOFSTEP]
simp
[GOAL]
R : Type u
M : Type v
inst✝⁷ : CommRing R
inst✝⁶ : Nontrivial R
inst✝⁵ : AddCommGroup M
inst✝⁴ : Module R M
inst✝³ : Module.Free R M
inst✝² : Module.Finite R M
f : M →ₗ[R] M
ι : Type w
inst✝¹ : DecidableEq ι
inst✝ : Fintype ι
b : Basis ι R M
A : (fun x => Matrix ι ι R) f := ↑(toMatrix b b) f
b' : Basis (ChooseBasisIndex R M) R M := chooseBasis R M
ι' : Type v := ChooseBasisIndex R M
A' : (fun x => Matrix (ChooseBasisIndex R M) (ChooseBasisIndex R M) R) f := ↑(toMatrix b' b') f
e : ι ≃ ChooseBasisIndex R M := Basis.indexEquiv b b'
φ : Matrix ι ι R ≃ₗ[R] Matrix (ChooseBasisIndex R M) (ChooseBasisIndex R M) R := reindexLinearEquiv R R e e
φ₁ : Matrix ι ι' R ≃ₗ[R] Matrix (ChooseBasisIndex R M) ι' R := reindexLinearEquiv R R e (Equiv.refl ι')
φ₂ : Matrix ι' ι' R ≃ₗ[R] Matrix ι' ι' R := reindexLinearEquiv R R (Equiv.refl ι') (Equiv.refl ι')
φ₃ : Matrix ι' ι R ≃ₗ[R] Matrix ι' (ChooseBasisIndex R M) R := reindexLinearEquiv R R (Equiv.refl ι') e
P : Matrix ι (ChooseBasisIndex R M) R := Basis.toMatrix b ↑b'
Q : Matrix (ChooseBasisIndex R M) ι R := Basis.toMatrix b' ↑b
hPQ : ↑(RingHom.mapMatrix C) (↑φ₁ P) * ↑(RingHom.mapMatrix C) (↑φ₃ Q) = 1
⊢ det
      (↑(RingHom.mapMatrix C) (↑φ₁ P) * ↑(scalar ι') X * ↑(RingHom.mapMatrix C) (↑φ₃ Q) -
        ↑(RingHom.mapMatrix C) (↑φ₁ P) * ↑(RingHom.mapMatrix C) A' * ↑(RingHom.mapMatrix C) (↑φ₃ Q)) =
    det (↑(RingHom.mapMatrix C) (↑φ₁ P) * (↑(scalar ι') X - ↑(RingHom.mapMatrix C) A') * ↑(RingHom.mapMatrix C) (↑φ₃ Q))
[PROOFSTEP]
rw [← Matrix.sub_mul, ← Matrix.mul_sub]
[GOAL]
R : Type u
M : Type v
inst✝⁷ : CommRing R
inst✝⁶ : Nontrivial R
inst✝⁵ : AddCommGroup M
inst✝⁴ : Module R M
inst✝³ : Module.Free R M
inst✝² : Module.Finite R M
f : M →ₗ[R] M
ι : Type w
inst✝¹ : DecidableEq ι
inst✝ : Fintype ι
b : Basis ι R M
A : (fun x => Matrix ι ι R) f := ↑(toMatrix b b) f
b' : Basis (ChooseBasisIndex R M) R M := chooseBasis R M
ι' : Type v := ChooseBasisIndex R M
A' : (fun x => Matrix (ChooseBasisIndex R M) (ChooseBasisIndex R M) R) f := ↑(toMatrix b' b') f
e : ι ≃ ChooseBasisIndex R M := Basis.indexEquiv b b'
φ : Matrix ι ι R ≃ₗ[R] Matrix (ChooseBasisIndex R M) (ChooseBasisIndex R M) R := reindexLinearEquiv R R e e
φ₁ : Matrix ι ι' R ≃ₗ[R] Matrix (ChooseBasisIndex R M) ι' R := reindexLinearEquiv R R e (Equiv.refl ι')
φ₂ : Matrix ι' ι' R ≃ₗ[R] Matrix ι' ι' R := reindexLinearEquiv R R (Equiv.refl ι') (Equiv.refl ι')
φ₃ : Matrix ι' ι R ≃ₗ[R] Matrix ι' (ChooseBasisIndex R M) R := reindexLinearEquiv R R (Equiv.refl ι') e
P : Matrix ι (ChooseBasisIndex R M) R := Basis.toMatrix b ↑b'
Q : Matrix (ChooseBasisIndex R M) ι R := Basis.toMatrix b' ↑b
hPQ : ↑(RingHom.mapMatrix C) (↑φ₁ P) * ↑(RingHom.mapMatrix C) (↑φ₃ Q) = 1
⊢ det (↑(RingHom.mapMatrix C) (↑φ₁ P) * (↑(scalar ι') X - ↑(RingHom.mapMatrix C) A') * ↑(RingHom.mapMatrix C) (↑φ₃ Q)) =
    det (↑(RingHom.mapMatrix C) (↑φ₁ P)) * det (↑(scalar ι') X - ↑(RingHom.mapMatrix C) A') *
      det (↑(RingHom.mapMatrix C) (↑φ₃ Q))
[PROOFSTEP]
rw [det_mul, det_mul]
[GOAL]
R : Type u
M : Type v
inst✝⁷ : CommRing R
inst✝⁶ : Nontrivial R
inst✝⁵ : AddCommGroup M
inst✝⁴ : Module R M
inst✝³ : Module.Free R M
inst✝² : Module.Finite R M
f : M →ₗ[R] M
ι : Type w
inst✝¹ : DecidableEq ι
inst✝ : Fintype ι
b : Basis ι R M
A : (fun x => Matrix ι ι R) f := ↑(toMatrix b b) f
b' : Basis (ChooseBasisIndex R M) R M := chooseBasis R M
ι' : Type v := ChooseBasisIndex R M
A' : (fun x => Matrix (ChooseBasisIndex R M) (ChooseBasisIndex R M) R) f := ↑(toMatrix b' b') f
e : ι ≃ ChooseBasisIndex R M := Basis.indexEquiv b b'
φ : Matrix ι ι R ≃ₗ[R] Matrix (ChooseBasisIndex R M) (ChooseBasisIndex R M) R := reindexLinearEquiv R R e e
φ₁ : Matrix ι ι' R ≃ₗ[R] Matrix (ChooseBasisIndex R M) ι' R := reindexLinearEquiv R R e (Equiv.refl ι')
φ₂ : Matrix ι' ι' R ≃ₗ[R] Matrix ι' ι' R := reindexLinearEquiv R R (Equiv.refl ι') (Equiv.refl ι')
φ₃ : Matrix ι' ι R ≃ₗ[R] Matrix ι' (ChooseBasisIndex R M) R := reindexLinearEquiv R R (Equiv.refl ι') e
P : Matrix ι (ChooseBasisIndex R M) R := Basis.toMatrix b ↑b'
Q : Matrix (ChooseBasisIndex R M) ι R := Basis.toMatrix b' ↑b
hPQ : ↑(RingHom.mapMatrix C) (↑φ₁ P) * ↑(RingHom.mapMatrix C) (↑φ₃ Q) = 1
⊢ det (↑(RingHom.mapMatrix C) (↑φ₁ P)) * det (↑(scalar ι') X - ↑(RingHom.mapMatrix C) A') *
      det (↑(RingHom.mapMatrix C) (↑φ₃ Q)) =
    det (↑(RingHom.mapMatrix C) (↑φ₁ P)) * det (↑(RingHom.mapMatrix C) (↑φ₃ Q)) *
      det (↑(scalar ι') X - ↑(RingHom.mapMatrix C) A')
[PROOFSTEP]
ring
[GOAL]
R : Type u
M : Type v
inst✝⁷ : CommRing R
inst✝⁶ : Nontrivial R
inst✝⁵ : AddCommGroup M
inst✝⁴ : Module R M
inst✝³ : Module.Free R M
inst✝² : Module.Finite R M
f : M →ₗ[R] M
ι : Type w
inst✝¹ : DecidableEq ι
inst✝ : Fintype ι
b : Basis ι R M
A : (fun x => Matrix ι ι R) f := ↑(toMatrix b b) f
b' : Basis (ChooseBasisIndex R M) R M := chooseBasis R M
ι' : Type v := ChooseBasisIndex R M
A' : (fun x => Matrix (ChooseBasisIndex R M) (ChooseBasisIndex R M) R) f := ↑(toMatrix b' b') f
e : ι ≃ ChooseBasisIndex R M := Basis.indexEquiv b b'
φ : Matrix ι ι R ≃ₗ[R] Matrix (ChooseBasisIndex R M) (ChooseBasisIndex R M) R := reindexLinearEquiv R R e e
φ₁ : Matrix ι ι' R ≃ₗ[R] Matrix (ChooseBasisIndex R M) ι' R := reindexLinearEquiv R R e (Equiv.refl ι')
φ₂ : Matrix ι' ι' R ≃ₗ[R] Matrix ι' ι' R := reindexLinearEquiv R R (Equiv.refl ι') (Equiv.refl ι')
φ₃ : Matrix ι' ι R ≃ₗ[R] Matrix ι' (ChooseBasisIndex R M) R := reindexLinearEquiv R R (Equiv.refl ι') e
P : Matrix ι (ChooseBasisIndex R M) R := Basis.toMatrix b ↑b'
Q : Matrix (ChooseBasisIndex R M) ι R := Basis.toMatrix b' ↑b
hPQ : ↑(RingHom.mapMatrix C) (↑φ₁ P) * ↑(RingHom.mapMatrix C) (↑φ₃ Q) = 1
⊢ det (↑(RingHom.mapMatrix C) (↑φ₁ P)) * det (↑(RingHom.mapMatrix C) (↑φ₃ Q)) *
      det (↑(scalar ι') X - ↑(RingHom.mapMatrix C) A') =
    det (↑(scalar ι') X - ↑(RingHom.mapMatrix C) A')
[PROOFSTEP]
rw [← det_mul, hPQ, det_one, one_mul]


[GOAL]
𝕜 : Type u_1
E : Type u_2
F : Type u_3
G : Type u_4
inst✝⁷ : NontriviallyNormedField 𝕜
inst✝⁶ : NormedAddCommGroup E
inst✝⁵ : NormedAddCommGroup F
inst✝⁴ : NormedSpace 𝕜 E
inst✝³ : NormedSpace 𝕜 F
inst✝² : NormedAddCommGroup G
inst✝¹ : NormedSpace 𝕜 G
f g : E → F
s t : Set E
x✝ : E
inst✝ : NormedSpace ℝ E
x : E
r : ℝ
h : DiffContOnCl 𝕜 f (ball x r)
⊢ ContinuousOn f (closedBall x r)
[PROOFSTEP]
rcases eq_or_ne r 0 with (rfl | hr)
[GOAL]
case inl
𝕜 : Type u_1
E : Type u_2
F : Type u_3
G : Type u_4
inst✝⁷ : NontriviallyNormedField 𝕜
inst✝⁶ : NormedAddCommGroup E
inst✝⁵ : NormedAddCommGroup F
inst✝⁴ : NormedSpace 𝕜 E
inst✝³ : NormedSpace 𝕜 F
inst✝² : NormedAddCommGroup G
inst✝¹ : NormedSpace 𝕜 G
f g : E → F
s t : Set E
x✝ : E
inst✝ : NormedSpace ℝ E
x : E
h : DiffContOnCl 𝕜 f (ball x 0)
⊢ ContinuousOn f (closedBall x 0)
[PROOFSTEP]
rw [closedBall_zero]
[GOAL]
case inl
𝕜 : Type u_1
E : Type u_2
F : Type u_3
G : Type u_4
inst✝⁷ : NontriviallyNormedField 𝕜
inst✝⁶ : NormedAddCommGroup E
inst✝⁵ : NormedAddCommGroup F
inst✝⁴ : NormedSpace 𝕜 E
inst✝³ : NormedSpace 𝕜 F
inst✝² : NormedAddCommGroup G
inst✝¹ : NormedSpace 𝕜 G
f g : E → F
s t : Set E
x✝ : E
inst✝ : NormedSpace ℝ E
x : E
h : DiffContOnCl 𝕜 f (ball x 0)
⊢ ContinuousOn f {x}
[PROOFSTEP]
exact continuousOn_singleton f x
[GOAL]
case inr
𝕜 : Type u_1
E : Type u_2
F : Type u_3
G : Type u_4
inst✝⁷ : NontriviallyNormedField 𝕜
inst✝⁶ : NormedAddCommGroup E
inst✝⁵ : NormedAddCommGroup F
inst✝⁴ : NormedSpace 𝕜 E
inst✝³ : NormedSpace 𝕜 F
inst✝² : NormedAddCommGroup G
inst✝¹ : NormedSpace 𝕜 G
f g : E → F
s t : Set E
x✝ : E
inst✝ : NormedSpace ℝ E
x : E
r : ℝ
h : DiffContOnCl 𝕜 f (ball x r)
hr : r ≠ 0
⊢ ContinuousOn f (closedBall x r)
[PROOFSTEP]
rw [← closure_ball x hr]
[GOAL]
case inr
𝕜 : Type u_1
E : Type u_2
F : Type u_3
G : Type u_4
inst✝⁷ : NontriviallyNormedField 𝕜
inst✝⁶ : NormedAddCommGroup E
inst✝⁵ : NormedAddCommGroup F
inst✝⁴ : NormedSpace 𝕜 E
inst✝³ : NormedSpace 𝕜 F
inst✝² : NormedAddCommGroup G
inst✝¹ : NormedSpace 𝕜 G
f g : E → F
s t : Set E
x✝ : E
inst✝ : NormedSpace ℝ E
x : E
r : ℝ
h : DiffContOnCl 𝕜 f (ball x r)
hr : r ≠ 0
⊢ ContinuousOn f (closure (ball x r))
[PROOFSTEP]
exact h.continuousOn


[GOAL]
T : ℝ
hT : Fact (0 < T)
x : AddCircle T
ε : ℝ
⊢ closedBall x ε =ᶠ[ae volume] ball x ε
[PROOFSTEP]
cases' le_or_lt ε 0 with hε hε
[GOAL]
case inl
T : ℝ
hT : Fact (0 < T)
x : AddCircle T
ε : ℝ
hε : ε ≤ 0
⊢ closedBall x ε =ᶠ[ae volume] ball x ε
[PROOFSTEP]
rw [ball_eq_empty.mpr hε, ae_eq_empty, volume_closedBall, min_eq_right (by linarith [hT.out] : 2 * ε ≤ T),
  ENNReal.ofReal_eq_zero]
[GOAL]
T : ℝ
hT : Fact (0 < T)
x : AddCircle T
ε : ℝ
hε : ε ≤ 0
⊢ 2 * ε ≤ T
[PROOFSTEP]
linarith [hT.out]
[GOAL]
case inl
T : ℝ
hT : Fact (0 < T)
x : AddCircle T
ε : ℝ
hε : ε ≤ 0
⊢ 2 * ε ≤ 0
[PROOFSTEP]
exact mul_nonpos_of_nonneg_of_nonpos zero_le_two hε
[GOAL]
case inr
T : ℝ
hT : Fact (0 < T)
x : AddCircle T
ε : ℝ
hε : 0 < ε
⊢ closedBall x ε =ᶠ[ae volume] ball x ε
[PROOFSTEP]
suffices volume (closedBall x ε) ≤ volume (ball x ε) by
  exact (ae_eq_of_subset_of_measure_ge ball_subset_closedBall this measurableSet_ball (measure_ne_top _ _)).symm
[GOAL]
T : ℝ
hT : Fact (0 < T)
x : AddCircle T
ε : ℝ
hε : 0 < ε
this : ↑↑volume (closedBall x ε) ≤ ↑↑volume (ball x ε)
⊢ closedBall x ε =ᶠ[ae volume] ball x ε
[PROOFSTEP]
exact (ae_eq_of_subset_of_measure_ge ball_subset_closedBall this measurableSet_ball (measure_ne_top _ _)).symm
[GOAL]
case inr
T : ℝ
hT : Fact (0 < T)
x : AddCircle T
ε : ℝ
hε : 0 < ε
⊢ ↑↑volume (closedBall x ε) ≤ ↑↑volume (ball x ε)
[PROOFSTEP]
have : Tendsto (fun δ => volume (closedBall x δ)) (𝓝[<] ε) (𝓝 <| volume (closedBall x ε)) :=
  by
  simp_rw [volume_closedBall]
  refine' ENNReal.tendsto_ofReal (Tendsto.min tendsto_const_nhds <| Tendsto.const_mul _ _)
  convert (@monotone_id ℝ _).tendsto_nhdsWithin_Iio ε
  simp
[GOAL]
T : ℝ
hT : Fact (0 < T)
x : AddCircle T
ε : ℝ
hε : 0 < ε
⊢ Tendsto (fun δ => ↑↑volume (closedBall x δ)) (𝓝[Iio ε] ε) (𝓝 (↑↑volume (closedBall x ε)))
[PROOFSTEP]
simp_rw [volume_closedBall]
[GOAL]
T : ℝ
hT : Fact (0 < T)
x : AddCircle T
ε : ℝ
hε : 0 < ε
⊢ Tendsto (fun δ => ENNReal.ofReal (min T (2 * δ))) (𝓝[Iio ε] ε) (𝓝 (ENNReal.ofReal (min T (2 * ε))))
[PROOFSTEP]
refine' ENNReal.tendsto_ofReal (Tendsto.min tendsto_const_nhds <| Tendsto.const_mul _ _)
[GOAL]
T : ℝ
hT : Fact (0 < T)
x : AddCircle T
ε : ℝ
hε : 0 < ε
⊢ Tendsto (fun k => k) (𝓝[Iio ε] ε) (𝓝 ε)
[PROOFSTEP]
convert (@monotone_id ℝ _).tendsto_nhdsWithin_Iio ε
[GOAL]
case h.e'_5.h.e'_3
T : ℝ
hT : Fact (0 < T)
x : AddCircle T
ε : ℝ
hε : 0 < ε
⊢ ε = sSup (id '' Iio ε)
[PROOFSTEP]
simp
[GOAL]
case inr
T : ℝ
hT : Fact (0 < T)
x : AddCircle T
ε : ℝ
hε : 0 < ε
this : Tendsto (fun δ => ↑↑volume (closedBall x δ)) (𝓝[Iio ε] ε) (𝓝 (↑↑volume (closedBall x ε)))
⊢ ↑↑volume (closedBall x ε) ≤ ↑↑volume (ball x ε)
[PROOFSTEP]
refine' le_of_tendsto this (mem_nhdsWithin_Iio_iff_exists_Ioo_subset.mpr ⟨0, hε, fun r hr => _⟩)
[GOAL]
case inr
T : ℝ
hT : Fact (0 < T)
x : AddCircle T
ε : ℝ
hε : 0 < ε
this : Tendsto (fun δ => ↑↑volume (closedBall x δ)) (𝓝[Iio ε] ε) (𝓝 (↑↑volume (closedBall x ε)))
r : ℝ
hr : r ∈ Ioo 0 ε
⊢ r ∈ {x_1 | (fun c => ↑↑volume (closedBall x c) ≤ ↑↑volume (ball x ε)) x_1}
[PROOFSTEP]
exact measure_mono (closedBall_subset_ball hr.2)
[GOAL]
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)))
⊢ IsAddFundamentalDomain { x // x ∈ AddSubgroup.zmultiples u } I
[PROOFSTEP]
set G := AddSubgroup.zmultiples u
[GOAL]
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 { x // x ∈ G } I
[PROOFSTEP]
set n := addOrderOf u
[GOAL]
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 { x // x ∈ G } I
[PROOFSTEP]
set B := ball x (T / (2 * n))
[GOAL]
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
⊢ IsAddFundamentalDomain { x // x ∈ G } I
[PROOFSTEP]
have hn : 1 ≤ (n : ℝ) := by norm_cast; linarith [addOrderOf_pos' hu]
[GOAL]
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
⊢ 1 ≤ ↑n
[PROOFSTEP]
norm_cast
[GOAL]
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
⊢ 1 ≤ n
[PROOFSTEP]
linarith [addOrderOf_pos' hu]
[GOAL]
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
⊢ IsAddFundamentalDomain { x // x ∈ G } I
[PROOFSTEP]
refine' IsAddFundamentalDomain.mk_of_measure_univ_le _ _ _ _
[GOAL]
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
[PROOFSTEP]
exact measurableSet_ball.nullMeasurableSet.congr hI.symm
[GOAL]
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 : { x // x ∈ G }), g ≠ 0 → AEDisjoint volume (g +ᵥ I) I
[PROOFSTEP]
rintro ⟨g, hg⟩ hg'
[GOAL]
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' : { val := g, property := hg } ≠ 0
⊢ AEDisjoint volume ({ val := g, property := hg } +ᵥ I) I
[PROOFSTEP]
replace hg' : g ≠ 0
[GOAL]
case hg'
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' : { val := g, property := hg } ≠ 0
⊢ g ≠ 0
[PROOFSTEP]
simpa only [Ne.def, AddSubgroup.mk_eq_zero_iff] using hg'
[GOAL]
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 ({ val := g, property := hg } +ᵥ I) I
[PROOFSTEP]
change AEDisjoint volume (g +ᵥ I) I
[GOAL]
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 +ᵥ I) I
[PROOFSTEP]
refine'
  AEDisjoint.congr (Disjoint.aedisjoint _) ((quasiMeasurePreserving_add_left volume (-g)).vadd_ae_eq_of_ae_eq g hI) hI
[GOAL]
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
⊢ Disjoint (g +ᵥ B) B
[PROOFSTEP]
have hBg : g +ᵥ B = ball (g + x) (T / (2 * n)) := by
  rw [add_comm g x, ← singleton_add_ball _ x g, add_ball, thickening_singleton]
[GOAL]
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
⊢ g +ᵥ B = ball (g + x) (T / (2 * ↑n))
[PROOFSTEP]
rw [add_comm g x, ← singleton_add_ball _ x g, add_ball, thickening_singleton]
[GOAL]
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
[PROOFSTEP]
rw [hBg]
[GOAL]
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
[PROOFSTEP]
apply ball_disjoint_ball
[GOAL]
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
[PROOFSTEP]
rw [dist_eq_norm, add_sub_cancel, div_mul_eq_div_div, ← add_div, ← add_div, add_self_div_two,
  div_le_iff' (by positivity : 0 < (n : ℝ)), ← nsmul_eq_mul]
[GOAL]
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
[PROOFSTEP]
positivity
[GOAL]
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 ≤ n • ‖g‖
[PROOFSTEP]
refine'
  (le_add_order_smul_norm_of_isOfFinAddOrder (hu.of_mem_zmultiples hg) hg').trans (nsmul_le_nsmul (norm_nonneg g) _)
[GOAL]
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))
⊢ addOrderOf g ≤ n
[PROOFSTEP]
exact Nat.le_of_dvd (addOrderOf_pos_iff.mpr hu) (addOrderOf_dvd_of_mem_zmultiples hg)
[GOAL]
case refine'_3
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 : { x // x ∈ G }), QuasiMeasurePreserving ((fun x x_1 => x +ᵥ x_1) g)
[PROOFSTEP]
exact fun g => quasiMeasurePreserving_add_left (G := AddCircle T) volume g
[GOAL]
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))
hI : I =ᶠ[ae volume] B
hn : 1 ≤ ↑n
⊢ ↑↑volume univ ≤ ∑' (g : { x // x ∈ G }), ↑↑volume (g +ᵥ I)
[PROOFSTEP]
replace hI := hI.trans closedBall_ae_eq_ball.symm
[GOAL]
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))
⊢ ↑↑volume univ ≤ ∑' (g : { x // x ∈ G }), ↑↑volume (g +ᵥ I)
[PROOFSTEP]
haveI : Fintype G := @Fintype.ofFinite _ hu.finite_zmultiples
[GOAL]
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 { x // x ∈ G }
⊢ ↑↑volume univ ≤ ∑' (g : { x // x ∈ G }), ↑↑volume (g +ᵥ I)
[PROOFSTEP]
have hG_card : (Finset.univ : Finset G).card = n :=
  by
  show _ = addOrderOf u
  rw [add_order_eq_card_zmultiples', Nat.card_eq_fintype_card]; rfl
[GOAL]
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 { x // x ∈ G }
⊢ Finset.card Finset.univ = n
[PROOFSTEP]
show _ = addOrderOf u
[GOAL]
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 { x // x ∈ G }
⊢ Finset.card Finset.univ = addOrderOf u
[PROOFSTEP]
rw [add_order_eq_card_zmultiples', Nat.card_eq_fintype_card]
[GOAL]
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 { x // x ∈ G }
⊢ Finset.card Finset.univ = Fintype.card { x // x ∈ AddSubgroup.zmultiples u }
[PROOFSTEP]
rfl
[GOAL]
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 { x // x ∈ G }
hG_card : Finset.card Finset.univ = n
⊢ ↑↑volume univ ≤ ∑' (g : { x // x ∈ G }), ↑↑volume (g +ᵥ I)
[PROOFSTEP]
simp_rw [measure_vadd]
[GOAL]
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 { x // x ∈ G }
hG_card : Finset.card Finset.univ = n
⊢ ↑↑volume univ ≤ ∑' (g : { x // x ∈ AddSubgroup.zmultiples u }), ↑↑volume I
[PROOFSTEP]
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]
[GOAL]
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 { x // x ∈ G }
hG_card : Finset.card Finset.univ = n
⊢ 2 ≠ 0
[PROOFSTEP]
exact two_ne_zero
[GOAL]
T : ℝ
hT : Fact (0 < T)
s I : Set (AddCircle T)
u x : AddCircle T
hu : IsOfFinAddOrder u
hs : u +ᵥ s =ᶠ[ae volume] s
hI : I =ᶠ[ae volume] ball x (T / (2 * ↑(addOrderOf u)))
⊢ ↑↑volume s = addOrderOf u • ↑↑volume (s ∩ I)
[PROOFSTEP]
let G := AddSubgroup.zmultiples u
[GOAL]
T : ℝ
hT : Fact (0 < T)
s I : Set (AddCircle T)
u x : AddCircle T
hu : IsOfFinAddOrder u
hs : u +ᵥ s =ᶠ[ae volume] s
hI : I =ᶠ[ae volume] ball x (T / (2 * ↑(addOrderOf u)))
G : AddSubgroup (AddCircle T) := AddSubgroup.zmultiples u
⊢ ↑↑volume s = addOrderOf u • ↑↑volume (s ∩ I)
[PROOFSTEP]
haveI : Fintype G := @Fintype.ofFinite _ hu.finite_zmultiples
[GOAL]
T : ℝ
hT : Fact (0 < T)
s I : Set (AddCircle T)
u x : AddCircle T
hu : IsOfFinAddOrder u
hs : u +ᵥ s =ᶠ[ae volume] s
hI : I =ᶠ[ae volume] ball x (T / (2 * ↑(addOrderOf u)))
G : AddSubgroup (AddCircle T) := AddSubgroup.zmultiples u
this : Fintype { x // x ∈ G }
⊢ ↑↑volume s = addOrderOf u • ↑↑volume (s ∩ I)
[PROOFSTEP]
have hsG : ∀ g : G, (g +ᵥ s : Set <| AddCircle T) =ᵐ[volume] s := by rintro ⟨y, hy⟩;
  exact (vadd_ae_eq_self_of_mem_zmultiples hs hy : _)
[GOAL]
T : ℝ
hT : Fact (0 < T)
s I : Set (AddCircle T)
u x : AddCircle T
hu : IsOfFinAddOrder u
hs : u +ᵥ s =ᶠ[ae volume] s
hI : I =ᶠ[ae volume] ball x (T / (2 * ↑(addOrderOf u)))
G : AddSubgroup (AddCircle T) := AddSubgroup.zmultiples u
this : Fintype { x // x ∈ G }
⊢ ∀ (g : { x // x ∈ G }), g +ᵥ s =ᶠ[ae volume] s
[PROOFSTEP]
rintro ⟨y, hy⟩
[GOAL]
case mk
T : ℝ
hT : Fact (0 < T)
s I : Set (AddCircle T)
u x : AddCircle T
hu : IsOfFinAddOrder u
hs : u +ᵥ s =ᶠ[ae volume] s
hI : I =ᶠ[ae volume] ball x (T / (2 * ↑(addOrderOf u)))
G : AddSubgroup (AddCircle T) := AddSubgroup.zmultiples u
this : Fintype { x // x ∈ G }
y : AddCircle T
hy : y ∈ G
⊢ { val := y, property := hy } +ᵥ s =ᶠ[ae volume] s
[PROOFSTEP]
exact (vadd_ae_eq_self_of_mem_zmultiples hs hy : _)
[GOAL]
T : ℝ
hT : Fact (0 < T)
s I : Set (AddCircle T)
u x : AddCircle T
hu : IsOfFinAddOrder u
hs : u +ᵥ s =ᶠ[ae volume] s
hI : I =ᶠ[ae volume] ball x (T / (2 * ↑(addOrderOf u)))
G : AddSubgroup (AddCircle T) := AddSubgroup.zmultiples u
this : Fintype { x // x ∈ G }
hsG : ∀ (g : { x // x ∈ G }), g +ᵥ s =ᶠ[ae volume] s
⊢ ↑↑volume s = addOrderOf u • ↑↑volume (s ∩ I)
[PROOFSTEP]
rw [(isAddFundamentalDomain_of_ae_ball I u x hu hI).measure_eq_card_smul_of_vadd_ae_eq_self s hsG,
  add_order_eq_card_zmultiples' u, Nat.card_eq_fintype_card]