measure_theory.group.add_circleMathlib.MeasureTheory.Group.AddCircle

This file has been ported!

Changes since the initial port

The following section lists changes to this file in mathlib3 and mathlib4 that occured after the initial port. Most recent changes are shown first. Hovering over a commit will show all commits associated with the same mathlib3 commit.

Changes in mathlib3

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(last sync)

Changes in mathlib3port

mathlib3
mathlib3port
Diff
@@ -4,7 +4,7 @@ Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Oliver Nash
 -/
 import MeasureTheory.Integral.Periodic
-import Data.Zmod.Quotient
+import Data.ZMod.Quotient
 
 #align_import measure_theory.group.add_circle from "leanprover-community/mathlib"@"f2ad3645af9effcdb587637dc28a6074edc813f9"
 
@@ -83,8 +83,8 @@ theorem isAddFundamentalDomain_of_ae_ball (I : Set <| AddCircle T) (u x : AddCir
       rw [add_comm g x, ← singleton_add_ball _ x g, add_ball, thickening_singleton]
     rw [hBg]
     apply ball_disjoint_ball
-    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]
+    rw [dist_eq_norm, add_sub_cancel_right, div_mul_eq_div_div, ← add_div, ← add_div,
+      add_self_div_two, div_le_iff' (by positivity : 0 < (n : ℝ)), ← nsmul_eq_mul]
     refine'
       (le_add_order_smul_norm_of_is_of_fin_add_order (hu.of_mem_zmultiples hg) hg').trans
         (nsmul_le_nsmul_left (norm_nonneg g) _)
@@ -100,7 +100,7 @@ theorem isAddFundamentalDomain_of_ae_ball (I : Set <| AddCircle T) (u x : AddCir
     rw [AddCircle.measure_univ, tsum_fintype, Finset.sum_const, measure_congr hI,
       volume_closed_ball, ← ENNReal.ofReal_nsmul, mul_div, mul_div_mul_comm,
       div_self (@two_ne_zero ℝ _ _ _ _), 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]
+      nsmul_eq_mul, mul_div_cancel₀ T (lt_of_lt_of_le zero_lt_one hn).Ne.symm]
     exact le_refl _
 #align add_circle.is_add_fundamental_domain_of_ae_ball AddCircle.isAddFundamentalDomain_of_ae_ball
 -/
Diff
@@ -74,7 +74,7 @@ theorem isAddFundamentalDomain_of_ae_ball (I : Set <| AddCircle T) (u x : AddCir
     exact measurable_set_ball.null_measurable_set.congr hI.symm
   · -- `∀ (g : G), g ≠ 0 → ae_disjoint volume (g +ᵥ I) I`
     rintro ⟨g, hg⟩ hg'
-    replace hg' : g ≠ 0; · simpa only [Ne.def, AddSubgroup.mk_eq_zero_iff] using hg'
+    replace hg' : g ≠ 0; · simpa only [Ne.def, AddSubgroup.mk_eq_zero] using hg'
     change ae_disjoint volume (g +ᵥ I) I
     refine'
       ae_disjoint.congr (Disjoint.aedisjoint _)
Diff
@@ -87,7 +87,7 @@ theorem isAddFundamentalDomain_of_ae_ball (I : Set <| AddCircle T) (u x : AddCir
       div_le_iff' (by positivity : 0 < (n : ℝ)), ← nsmul_eq_mul]
     refine'
       (le_add_order_smul_norm_of_is_of_fin_add_order (hu.of_mem_zmultiples hg) hg').trans
-        (nsmul_le_nsmul (norm_nonneg g) _)
+        (nsmul_le_nsmul_left (norm_nonneg g) _)
     exact Nat.le_of_dvd (add_order_of_pos_iff.mpr hu) (addOrderOf_dvd_of_mem_zmultiples hg)
   ·-- `∀ (g : G), quasi_measure_preserving (has_vadd.vadd g) volume volume`
     exact fun g => quasi_measure_preserving_add_left volume g
Diff
@@ -95,7 +95,7 @@ theorem isAddFundamentalDomain_of_ae_ball (I : Set <| AddCircle T) (u x : AddCir
     replace hI : I =ᵐ[volume] closed_ball x (T / (2 * ↑n)) := hI.trans closed_ball_ae_eq_ball.symm
     haveI : Fintype G := @Fintype.ofFinite _ hu.finite_zmultiples
     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
+      rw [Nat.card_zmultiples, Nat.card_eq_fintype_card]; rfl
     simp_rw [measure_vadd]
     rw [AddCircle.measure_univ, tsum_fintype, Finset.sum_const, measure_congr hI,
       volume_closed_ball, ← ENNReal.ofReal_nsmul, mul_div, mul_div_mul_comm,
@@ -117,7 +117,7 @@ theorem volume_of_add_preimage_eq (s I : Set <| AddCircle T) (u x : AddCircle T)
     exact (vadd_ae_eq_self_of_mem_zmultiples hs hy : _)
   rw [(is_add_fundamental_domain_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]
+    Nat.card_zmultiples u, Nat.card_eq_fintype_card]
 #align add_circle.volume_of_add_preimage_eq AddCircle.volume_of_add_preimage_eq
 -/
 
Diff
@@ -68,7 +68,7 @@ theorem isAddFundamentalDomain_of_ae_ball (I : Set <| AddCircle T) (u x : AddCir
   set G := AddSubgroup.zmultiples u
   set n := addOrderOf u
   set B := ball x (T / (2 * n))
-  have hn : 1 ≤ (n : ℝ) := by norm_cast; linarith [addOrderOf_pos' hu]
+  have hn : 1 ≤ (n : ℝ) := by norm_cast; linarith [IsOfFinAddOrder.addOrderOf_pos hu]
   refine' is_add_fundamental_domain.mk_of_measure_univ_le _ _ _ _
   ·-- `null_measurable_set I volume`
     exact measurable_set_ball.null_measurable_set.congr hI.symm
Diff
@@ -3,8 +3,8 @@ Copyright (c) 2022 Oliver Nash. All rights reserved.
 Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Oliver Nash
 -/
-import Mathbin.MeasureTheory.Integral.Periodic
-import Mathbin.Data.Zmod.Quotient
+import MeasureTheory.Integral.Periodic
+import Data.Zmod.Quotient
 
 #align_import measure_theory.group.add_circle from "leanprover-community/mathlib"@"f2ad3645af9effcdb587637dc28a6074edc813f9"
 
Diff
@@ -2,15 +2,12 @@
 Copyright (c) 2022 Oliver Nash. All rights reserved.
 Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Oliver Nash
-
-! This file was ported from Lean 3 source module measure_theory.group.add_circle
-! leanprover-community/mathlib commit f2ad3645af9effcdb587637dc28a6074edc813f9
-! Please do not edit these lines, except to modify the commit id
-! if you have ported upstream changes.
 -/
 import Mathbin.MeasureTheory.Integral.Periodic
 import Mathbin.Data.Zmod.Quotient
 
+#align_import measure_theory.group.add_circle from "leanprover-community/mathlib"@"f2ad3645af9effcdb587637dc28a6074edc813f9"
+
 /-!
 # Measure-theoretic results about the additive circle
 
Diff
@@ -4,7 +4,7 @@ Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Oliver Nash
 
 ! This file was ported from Lean 3 source module measure_theory.group.add_circle
-! leanprover-community/mathlib commit f2ce6086713c78a7f880485f7917ea547a215982
+! leanprover-community/mathlib commit f2ad3645af9effcdb587637dc28a6074edc813f9
 ! Please do not edit these lines, except to modify the commit id
 ! if you have ported upstream changes.
 -/
@@ -14,6 +14,9 @@ import Mathbin.Data.Zmod.Quotient
 /-!
 # Measure-theoretic results about the additive circle
 
+> THIS FILE IS SYNCHRONIZED WITH MATHLIB4.
+> Any changes to this file require a corresponding PR to mathlib4.
+
 The file is a place to collect measure-theoretic results about the additive circle.
 
 ## Main definitions:
Diff
@@ -34,6 +34,7 @@ namespace AddCircle
 
 variable {T : ℝ} [hT : Fact (0 < T)]
 
+#print AddCircle.closedBall_ae_eq_ball /-
 theorem closedBall_ae_eq_ball {x : AddCircle T} {ε : ℝ} : closedBall x ε =ᵐ[volume] ball x ε :=
   by
   cases' le_or_lt ε 0 with hε hε
@@ -54,7 +55,9 @@ theorem closedBall_ae_eq_ball {x : AddCircle T} {ε : ℝ} : closedBall x ε =
       le_of_tendsto this (mem_nhds_within_Iio_iff_exists_Ioo_subset.mpr ⟨0, hε, fun r hr => _⟩)
     exact measure_mono (closed_ball_subset_ball hr.2)
 #align add_circle.closed_ball_ae_eq_ball AddCircle.closedBall_ae_eq_ball
+-/
 
+#print AddCircle.isAddFundamentalDomain_of_ae_ball /-
 /-- Let `G` be the subgroup of `add_circle T` generated by a point `u` of finite order `n : ℕ`. Then
 any set `I` that is almost equal to a ball of radius `T / 2n` is a fundamental domain for the action
 of `G` on `add_circle T` by left addition. -/
@@ -100,7 +103,9 @@ theorem isAddFundamentalDomain_of_ae_ball (I : Set <| AddCircle T) (u x : AddCir
       nsmul_eq_mul, mul_div_cancel' T (lt_of_lt_of_le zero_lt_one hn).Ne.symm]
     exact le_refl _
 #align add_circle.is_add_fundamental_domain_of_ae_ball AddCircle.isAddFundamentalDomain_of_ae_ball
+-/
 
+#print AddCircle.volume_of_add_preimage_eq /-
 theorem volume_of_add_preimage_eq (s I : Set <| AddCircle T) (u x : AddCircle T)
     (hu : IsOfFinAddOrder u) (hs : (u +ᵥ s : Set <| AddCircle T) =ᵐ[volume] s)
     (hI : I =ᵐ[volume] ball x (T / (2 * addOrderOf u))) :
@@ -114,6 +119,7 @@ theorem volume_of_add_preimage_eq (s I : Set <| AddCircle T) (u x : AddCircle T)
       hsG,
     add_order_eq_card_zmultiples' u, Nat.card_eq_fintype_card]
 #align add_circle.volume_of_add_preimage_eq AddCircle.volume_of_add_preimage_eq
+-/
 
 end AddCircle
 
Diff
@@ -34,8 +34,6 @@ namespace AddCircle
 
 variable {T : ℝ} [hT : Fact (0 < T)]
 
-include hT
-
 theorem closedBall_ae_eq_ball {x : AddCircle T} {ε : ℝ} : closedBall x ε =ᵐ[volume] ball x ε :=
   by
   cases' le_or_lt ε 0 with hε hε
Diff
@@ -50,7 +50,7 @@ theorem closedBall_ae_eq_ball {x : AddCircle T} {ε : ℝ} : closedBall x ε =
       by
       simp_rw [volume_closed_ball]
       refine' ENNReal.tendsto_ofReal (tendsto.min tendsto_const_nhds <| tendsto.const_mul _ _)
-      convert(@monotone_id ℝ _).tendsto_nhdsWithin_Iio ε
+      convert (@monotone_id ℝ _).tendsto_nhdsWithin_Iio ε
       simp
     refine'
       le_of_tendsto this (mem_nhds_within_Iio_iff_exists_Ioo_subset.mpr ⟨0, hε, fun r hr => _⟩)
Diff
@@ -28,7 +28,7 @@ The file is a place to collect measure-theoretic results about the additive circ
 
 open Set Function Filter MeasureTheory MeasureTheory.Measure Metric
 
-open MeasureTheory Pointwise BigOperators Topology ENNReal
+open scoped MeasureTheory Pointwise BigOperators Topology ENNReal
 
 namespace AddCircle
 
Diff
@@ -67,16 +67,13 @@ theorem isAddFundamentalDomain_of_ae_ball (I : Set <| AddCircle T) (u x : AddCir
   set G := AddSubgroup.zmultiples u
   set n := addOrderOf u
   set B := ball x (T / (2 * n))
-  have hn : 1 ≤ (n : ℝ) := by
-    norm_cast
-    linarith [addOrderOf_pos' hu]
+  have hn : 1 ≤ (n : ℝ) := by norm_cast; linarith [addOrderOf_pos' hu]
   refine' is_add_fundamental_domain.mk_of_measure_univ_le _ _ _ _
   ·-- `null_measurable_set I volume`
     exact measurable_set_ball.null_measurable_set.congr hI.symm
   · -- `∀ (g : G), g ≠ 0 → ae_disjoint volume (g +ᵥ I) I`
     rintro ⟨g, hg⟩ hg'
-    replace hg' : g ≠ 0
-    · simpa only [Ne.def, AddSubgroup.mk_eq_zero_iff] using hg'
+    replace hg' : g ≠ 0; · simpa only [Ne.def, AddSubgroup.mk_eq_zero_iff] using hg'
     change ae_disjoint volume (g +ᵥ I) I
     refine'
       ae_disjoint.congr (Disjoint.aedisjoint _)
@@ -96,11 +93,8 @@ theorem isAddFundamentalDomain_of_ae_ball (I : Set <| AddCircle T) (u x : AddCir
   · -- `volume univ ≤ ∑' (g : G), volume (g +ᵥ I)`
     replace hI : I =ᵐ[volume] closed_ball x (T / (2 * ↑n)) := hI.trans closed_ball_ae_eq_ball.symm
     haveI : Fintype G := @Fintype.ofFinite _ hu.finite_zmultiples
-    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
+    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
     simp_rw [measure_vadd]
     rw [AddCircle.measure_univ, tsum_fintype, Finset.sum_const, measure_congr hI,
       volume_closed_ball, ← ENNReal.ofReal_nsmul, mul_div, mul_div_mul_comm,
@@ -116,9 +110,7 @@ theorem volume_of_add_preimage_eq (s I : Set <| AddCircle T) (u x : AddCircle T)
   by
   let G := AddSubgroup.zmultiples u
   haveI : Fintype G := @Fintype.ofFinite _ hu.finite_zmultiples
-  have hsG : ∀ g : G, (g +ᵥ s : Set <| AddCircle T) =ᵐ[volume] s :=
-    by
-    rintro ⟨y, hy⟩
+  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 : _)
   rw [(is_add_fundamental_domain_of_ae_ball I u x hu hI).measure_eq_card_smul_of_vadd_ae_eq_self s
       hsG,
Diff
@@ -79,7 +79,7 @@ theorem isAddFundamentalDomain_of_ae_ball (I : Set <| AddCircle T) (u x : AddCir
     · simpa only [Ne.def, AddSubgroup.mk_eq_zero_iff] using hg'
     change ae_disjoint volume (g +ᵥ I) I
     refine'
-      ae_disjoint.congr (Disjoint.aeDisjoint _)
+      ae_disjoint.congr (Disjoint.aedisjoint _)
         ((quasi_measure_preserving_add_left volume (-g)).vadd_ae_eq_of_ae_eq g hI) hI
     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]
Diff
@@ -60,7 +60,7 @@ theorem closedBall_ae_eq_ball {x : AddCircle T} {ε : ℝ} : closedBall x ε =
 /-- Let `G` be the subgroup of `add_circle T` generated by a point `u` of finite order `n : ℕ`. Then
 any set `I` that is almost equal to a ball of radius `T / 2n` is a fundamental domain for the action
 of `G` on `add_circle T` by left addition. -/
-theorem isAddFundamentalDomainOfAeBall (I : Set <| AddCircle T) (u x : AddCircle T)
+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 :=
   by
@@ -107,7 +107,7 @@ theorem isAddFundamentalDomainOfAeBall (I : Set <| AddCircle T) (u x : AddCircle
       div_self (@two_ne_zero ℝ _ _ _ _), 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]
     exact le_refl _
-#align add_circle.is_add_fundamental_domain_of_ae_ball AddCircle.isAddFundamentalDomainOfAeBall
+#align add_circle.is_add_fundamental_domain_of_ae_ball AddCircle.isAddFundamentalDomain_of_ae_ball
 
 theorem volume_of_add_preimage_eq (s I : Set <| AddCircle T) (u x : AddCircle T)
     (hu : IsOfFinAddOrder u) (hs : (u +ᵥ s : Set <| AddCircle T) =ᵐ[volume] s)
Diff
@@ -50,7 +50,7 @@ theorem closedBall_ae_eq_ball {x : AddCircle T} {ε : ℝ} : closedBall x ε =
       by
       simp_rw [volume_closed_ball]
       refine' ENNReal.tendsto_ofReal (tendsto.min tendsto_const_nhds <| tendsto.const_mul _ _)
-      convert (@monotone_id ℝ _).tendsto_nhdsWithin_Iio ε
+      convert(@monotone_id ℝ _).tendsto_nhdsWithin_Iio ε
       simp
     refine'
       le_of_tendsto this (mem_nhds_within_Iio_iff_exists_Ioo_subset.mpr ⟨0, hε, fun r hr => _⟩)
Diff
@@ -28,7 +28,7 @@ The file is a place to collect measure-theoretic results about the additive circ
 
 open Set Function Filter MeasureTheory MeasureTheory.Measure Metric
 
-open MeasureTheory Pointwise BigOperators Topology Ennreal
+open MeasureTheory Pointwise BigOperators Topology ENNReal
 
 namespace AddCircle
 
@@ -40,7 +40,7 @@ theorem closedBall_ae_eq_ball {x : AddCircle T} {ε : ℝ} : closedBall x ε =
   by
   cases' le_or_lt ε 0 with hε hε
   · rw [ball_eq_empty.mpr hε, ae_eq_empty, volume_closed_ball,
-      min_eq_right (by linarith [hT.out] : 2 * ε ≤ T), Ennreal.ofReal_eq_zero]
+      min_eq_right (by linarith [hT.out] : 2 * ε ≤ T), ENNReal.ofReal_eq_zero]
     exact mul_nonpos_of_nonneg_of_nonpos zero_le_two hε
   · suffices volume (closed_ball x ε) ≤ volume (ball x ε) by
       exact
@@ -49,7 +49,7 @@ theorem closedBall_ae_eq_ball {x : AddCircle T} {ε : ℝ} : closedBall x ε =
     have : tendsto (fun δ => volume (closed_ball x δ)) (𝓝[<] ε) (𝓝 <| volume (closed_ball x ε)) :=
       by
       simp_rw [volume_closed_ball]
-      refine' Ennreal.tendsto_ofReal (tendsto.min tendsto_const_nhds <| tendsto.const_mul _ _)
+      refine' ENNReal.tendsto_ofReal (tendsto.min tendsto_const_nhds <| tendsto.const_mul _ _)
       convert (@monotone_id ℝ _).tendsto_nhdsWithin_Iio ε
       simp
     refine'
@@ -103,7 +103,7 @@ theorem isAddFundamentalDomainOfAeBall (I : Set <| AddCircle T) (u x : AddCircle
       rfl
     simp_rw [measure_vadd]
     rw [AddCircle.measure_univ, tsum_fintype, Finset.sum_const, measure_congr hI,
-      volume_closed_ball, ← Ennreal.ofReal_nsmul, mul_div, mul_div_mul_comm,
+      volume_closed_ball, ← ENNReal.ofReal_nsmul, mul_div, mul_div_mul_comm,
       div_self (@two_ne_zero ℝ _ _ _ _), 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]
     exact le_refl _
Diff
@@ -69,7 +69,7 @@ theorem isAddFundamentalDomainOfAeBall (I : Set <| AddCircle T) (u x : AddCircle
   set B := ball x (T / (2 * n))
   have hn : 1 ≤ (n : ℝ) := by
     norm_cast
-    linarith [add_orderOf_pos' hu]
+    linarith [addOrderOf_pos' hu]
   refine' is_add_fundamental_domain.mk_of_measure_univ_le _ _ _ _
   ·-- `null_measurable_set I volume`
     exact measurable_set_ball.null_measurable_set.congr hI.symm
@@ -90,7 +90,7 @@ theorem isAddFundamentalDomainOfAeBall (I : Set <| AddCircle T) (u x : AddCircle
     refine'
       (le_add_order_smul_norm_of_is_of_fin_add_order (hu.of_mem_zmultiples hg) hg').trans
         (nsmul_le_nsmul (norm_nonneg g) _)
-    exact Nat.le_of_dvd (add_order_of_pos_iff.mpr hu) (add_orderOf_dvd_of_mem_zmultiples hg)
+    exact Nat.le_of_dvd (add_order_of_pos_iff.mpr hu) (addOrderOf_dvd_of_mem_zmultiples hg)
   ·-- `∀ (g : G), quasi_measure_preserving (has_vadd.vadd g) volume volume`
     exact fun g => quasi_measure_preserving_add_left volume g
   · -- `volume univ ≤ ∑' (g : G), volume (g +ᵥ I)`

Changes in mathlib4

mathlib3
mathlib4
chore: avoid Ne.def (adaptation for nightly-2024-03-27) (#11813)
Diff
@@ -63,7 +63,7 @@ theorem isAddFundamentalDomain_of_ae_ball (I : Set <| AddCircle T) (u x : AddCir
     exact measurableSet_ball.nullMeasurableSet.congr hI.symm
   · -- `∀ (g : G), g ≠ 0 → AEDisjoint volume (g +ᵥ I) I`
     rintro ⟨g, hg⟩ hg'
-    replace hg' : g ≠ 0 := by simpa only [Ne.def, AddSubgroup.mk_eq_zero] using hg'
+    replace hg' : g ≠ 0 := by simpa only [Ne, AddSubgroup.mk_eq_zero] using hg'
     change AEDisjoint volume (g +ᵥ I) I
     refine' AEDisjoint.congr (Disjoint.aedisjoint _)
       ((quasiMeasurePreserving_add_left volume (-g)).vadd_ae_eq_of_ae_eq g hI) hI
chore: Rename mul-div cancellation lemmas (#11530)

Lemma names around cancellation of multiplication and division are a mess.

This PR renames a handful of them according to the following table (each big row contains the multiplicative statement, then the three rows contain the GroupWithZero lemma name, the Group lemma, the AddGroup lemma name).

| Statement | New name | Old name | |

Diff
@@ -71,8 +71,8 @@ theorem isAddFundamentalDomain_of_ae_ball (I : Set <| AddCircle T) (u x : AddCir
       rw [add_comm g x, ← singleton_add_ball _ x g, add_ball, thickening_singleton]
     rw [hBg]
     apply ball_disjoint_ball
-    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]
+    rw [dist_eq_norm, add_sub_cancel_right, div_mul_eq_div_div, ← add_div, ← add_div,
+      add_self_div_two, div_le_iff' (by positivity : 0 < (n : ℝ)), ← nsmul_eq_mul]
     refine' (le_add_order_smul_norm_of_isOfFinAddOrder (hu.of_mem_zmultiples hg) hg').trans
       (nsmul_le_nsmul_left (norm_nonneg g) _)
     exact Nat.le_of_dvd (addOrderOf_pos_iff.mpr hu) (addOrderOf_dvd_of_mem_zmultiples hg)
@@ -88,7 +88,7 @@ theorem isAddFundamentalDomain_of_ae_ball (I : Set <| AddCircle T) (u x : AddCir
     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]
+      nsmul_eq_mul, mul_div_cancel₀ T (lt_of_lt_of_le zero_lt_one hn).ne.symm]
     exact two_ne_zero
 #align add_circle.is_add_fundamental_domain_of_ae_ball AddCircle.isAddFundamentalDomain_of_ae_ball
 
feat: , and ℚ≥0 are star-ordered rings (#10633)

Also golf the existing instance for and rename Rat.num_nonneg_iff_zero_le to Rat.num_nonneg, Rat.num_pos_iff_pos to Rat.num_pos.

From LeanAPAP

Diff
@@ -63,7 +63,7 @@ theorem isAddFundamentalDomain_of_ae_ball (I : Set <| AddCircle T) (u x : AddCir
     exact measurableSet_ball.nullMeasurableSet.congr hI.symm
   · -- `∀ (g : G), g ≠ 0 → AEDisjoint volume (g +ᵥ I) I`
     rintro ⟨g, hg⟩ hg'
-    replace hg' : g ≠ 0 := by simpa only [Ne.def, AddSubgroup.mk_eq_zero_iff] using hg'
+    replace hg' : g ≠ 0 := by simpa only [Ne.def, AddSubgroup.mk_eq_zero] using hg'
     change AEDisjoint volume (g +ᵥ I) I
     refine' AEDisjoint.congr (Disjoint.aedisjoint _)
       ((quasiMeasurePreserving_add_left volume (-g)).vadd_ae_eq_of_ae_eq g hI) hI
chore: Remove unnecessary "rw"s (#10704)

Remove unnecessary "rw"s.

Diff
@@ -101,7 +101,7 @@ theorem volume_of_add_preimage_eq (s I : Set <| AddCircle T) (u x : AddCircle T)
   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 : _)
   rw [(isAddFundamentalDomain_of_ae_ball I u x hu hI).measure_eq_card_smul_of_vadd_ae_eq_self s hsG,
-    ← Nat.card_zmultiples u, Nat.card_eq_fintype_card]
+    ← Nat.card_zmultiples u]
 #align add_circle.volume_of_add_preimage_eq AddCircle.volume_of_add_preimage_eq
 
 end AddCircle
chore: remove stream-of-consciousness uses of have, replace and suffices (#10640)

No changes to tactic file, it's just boring fixes throughout the library.

This follows on from #6964.

Co-authored-by: sgouezel <sebastien.gouezel@univ-rennes1.fr> Co-authored-by: Eric Wieser <wieser.eric@gmail.com>

Diff
@@ -63,7 +63,7 @@ theorem isAddFundamentalDomain_of_ae_ball (I : Set <| AddCircle T) (u x : AddCir
     exact measurableSet_ball.nullMeasurableSet.congr hI.symm
   · -- `∀ (g : G), g ≠ 0 → AEDisjoint volume (g +ᵥ I) I`
     rintro ⟨g, hg⟩ hg'
-    replace hg' : g ≠ 0; · simpa only [Ne.def, AddSubgroup.mk_eq_zero_iff] using hg'
+    replace hg' : g ≠ 0 := by simpa only [Ne.def, AddSubgroup.mk_eq_zero_iff] using hg'
     change AEDisjoint volume (g +ᵥ I) I
     refine' AEDisjoint.congr (Disjoint.aedisjoint _)
       ((quasiMeasurePreserving_add_left volume (-g)).vadd_ae_eq_of_ae_eq g hI) hI
chore: remove uses of cases' (#9171)

I literally went through and regex'd some uses of cases', replacing them with rcases; this is meant to be a low effort PR as I hope that tools can do this in the future.

rcases is an easier replacement than cases, though with better tools we could in future do a second pass converting simple rcases added here (and existing ones) to cases.

Diff
@@ -32,7 +32,7 @@ namespace AddCircle
 variable {T : ℝ} [hT : Fact (0 < T)]
 
 theorem closedBall_ae_eq_ball {x : AddCircle T} {ε : ℝ} : closedBall x ε =ᵐ[volume] ball x ε := by
-  cases' le_or_lt ε 0 with hε hε
+  rcases le_or_lt ε 0 with hε | hε
   · rw [ball_eq_empty.mpr hε, ae_eq_empty, volume_closedBall,
       min_eq_right (by linarith [hT.out] : 2 * ε ≤ T), ENNReal.ofReal_eq_zero]
     exact mul_nonpos_of_nonneg_of_nonpos zero_le_two hε
chore: Rename pow monotonicity lemmas (#9095)

The names for lemmas about monotonicity of (a ^ ·) and (· ^ n) were a mess. This PR tidies up everything related by following the naming convention for (a * ·) and (· * b). Namely, (a ^ ·) is pow_right and (· ^ n) is pow_left in lemma names. All lemma renames follow the corresponding multiplication lemma names closely.

Renames

Algebra.GroupPower.Order

  • pow_monopow_right_mono
  • pow_le_powpow_le_pow_right
  • pow_le_pow_of_le_leftpow_le_pow_left
  • pow_lt_pow_of_lt_leftpow_lt_pow_left
  • strictMonoOn_powpow_left_strictMonoOn
  • pow_strictMono_rightpow_right_strictMono
  • pow_lt_powpow_lt_pow_right
  • pow_lt_pow_iffpow_lt_pow_iff_right
  • pow_le_pow_iffpow_le_pow_iff_right
  • self_lt_powlt_self_pow
  • strictAnti_powpow_right_strictAnti
  • pow_lt_pow_iff_of_lt_onepow_lt_pow_iff_right_of_lt_one
  • pow_lt_pow_of_lt_onepow_lt_pow_right_of_lt_one
  • lt_of_pow_lt_powlt_of_pow_lt_pow_left
  • le_of_pow_le_powle_of_pow_le_pow_left
  • pow_lt_pow₀pow_lt_pow_right₀

Algebra.GroupPower.CovariantClass

  • pow_le_pow_of_le_left'pow_le_pow_left'
  • nsmul_le_nsmul_of_le_rightnsmul_le_nsmul_right
  • pow_lt_pow'pow_lt_pow_right'
  • nsmul_lt_nsmulnsmul_lt_nsmul_left
  • pow_strictMono_leftpow_right_strictMono'
  • nsmul_strictMono_rightnsmul_left_strictMono
  • StrictMono.pow_right'StrictMono.pow_const
  • StrictMono.nsmul_leftStrictMono.const_nsmul
  • pow_strictMono_right'pow_left_strictMono
  • nsmul_strictMono_leftnsmul_right_strictMono
  • Monotone.pow_rightMonotone.pow_const
  • Monotone.nsmul_leftMonotone.const_nsmul
  • lt_of_pow_lt_pow'lt_of_pow_lt_pow_left'
  • lt_of_nsmul_lt_nsmullt_of_nsmul_lt_nsmul_right
  • pow_le_pow'pow_le_pow_right'
  • nsmul_le_nsmulnsmul_le_nsmul_left
  • pow_le_pow_of_le_one'pow_le_pow_right_of_le_one'
  • nsmul_le_nsmul_of_nonposnsmul_le_nsmul_left_of_nonpos
  • le_of_pow_le_pow'le_of_pow_le_pow_left'
  • le_of_nsmul_le_nsmul'le_of_nsmul_le_nsmul_right'
  • pow_le_pow_iff'pow_le_pow_iff_right'
  • nsmul_le_nsmul_iffnsmul_le_nsmul_iff_left
  • pow_lt_pow_iff'pow_lt_pow_iff_right'
  • nsmul_lt_nsmul_iffnsmul_lt_nsmul_iff_left

Data.Nat.Pow

  • Nat.pow_lt_pow_of_lt_leftNat.pow_lt_pow_left
  • Nat.pow_le_iff_le_leftNat.pow_le_pow_iff_left
  • Nat.pow_lt_iff_lt_leftNat.pow_lt_pow_iff_left

Lemmas added

  • pow_le_pow_iff_left
  • pow_lt_pow_iff_left
  • pow_right_injective
  • pow_right_inj
  • Nat.pow_le_pow_left to have the correct name since Nat.pow_le_pow_of_le_left is in Std.
  • Nat.pow_le_pow_right to have the correct name since Nat.pow_le_pow_of_le_right is in Std.

Lemmas removed

  • self_le_pow was a duplicate of le_self_pow.
  • Nat.pow_lt_pow_of_lt_right is defeq to pow_lt_pow_right.
  • Nat.pow_right_strictMono is defeq to pow_right_strictMono.
  • Nat.pow_le_iff_le_right is defeq to pow_le_pow_iff_right.
  • Nat.pow_lt_iff_lt_right is defeq to pow_lt_pow_iff_right.

Other changes

  • A bunch of proofs have been golfed.
  • Some lemma assumptions have been turned from 0 < n or 1 ≤ n to n ≠ 0.
  • A few Nat lemmas have been protected.
  • One docstring has been fixed.
Diff
@@ -74,7 +74,7 @@ theorem isAddFundamentalDomain_of_ae_ball (I : Set <| AddCircle T) (u x : AddCir
     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]
     refine' (le_add_order_smul_norm_of_isOfFinAddOrder (hu.of_mem_zmultiples hg) hg').trans
-      (nsmul_le_nsmul (norm_nonneg g) _)
+      (nsmul_le_nsmul_left (norm_nonneg g) _)
     exact Nat.le_of_dvd (addOrderOf_pos_iff.mpr hu) (addOrderOf_dvd_of_mem_zmultiples hg)
   · -- `∀ (g : G), QuasiMeasurePreserving (VAdd.vadd g) volume volume`
     exact fun g => quasiMeasurePreserving_add_left (G := AddCircle T) volume g
chore: space after (#8178)

Co-authored-by: Moritz Firsching <firsching@google.com>

Diff
@@ -83,7 +83,7 @@ theorem isAddFundamentalDomain_of_ae_ball (I : Set <| AddCircle T) (u x : AddCir
     haveI : Fintype G := @Fintype.ofFinite _ hu.finite_zmultiples.to_subtype
     have hG_card : (Finset.univ : Finset G).card = n := by
       show _ = addOrderOf u
-      rw [←Nat.card_zmultiples, Nat.card_eq_fintype_card]; rfl
+      rw [← Nat.card_zmultiples, Nat.card_eq_fintype_card]; rfl
     simp_rw [measure_vadd]
     rw [AddCircle.measure_univ, tsum_fintype, Finset.sum_const, measure_congr hI,
       volume_closedBall, ← ENNReal.ofReal_nsmul, mul_div, mul_div_mul_comm,
@@ -101,7 +101,7 @@ theorem volume_of_add_preimage_eq (s I : Set <| AddCircle T) (u x : AddCircle T)
   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 : _)
   rw [(isAddFundamentalDomain_of_ae_ball I u x hu hI).measure_eq_card_smul_of_vadd_ae_eq_self s hsG,
-    ←Nat.card_zmultiples u, Nat.card_eq_fintype_card]
+    ← Nat.card_zmultiples u, Nat.card_eq_fintype_card]
 #align add_circle.volume_of_add_preimage_eq AddCircle.volume_of_add_preimage_eq
 
 end AddCircle
feat: Order of elements of a subgroup (#8385)

The cardinality of a subgroup is greater than the order of any of its elements.

Rename

  • order_eq_card_zpowersFintype.card_zpowers
  • order_eq_card_zpowers'Nat.card_zpowers (and turn it around to match Nat.card_subgroupPowers)
  • Submonoid.powers_subsetSubmonoid.powers_le
  • orderOf_dvd_card_univorderOf_dvd_card
  • orderOf_subgroupSubgroup.orderOf
  • Subgroup.nonemptySubgroup.coe_nonempty
Diff
@@ -80,10 +80,10 @@ theorem isAddFundamentalDomain_of_ae_ball (I : Set <| AddCircle T) (u x : AddCir
     exact fun g => quasiMeasurePreserving_add_left (G := AddCircle T) volume g
   · -- `volume univ ≤ ∑' (g : G), volume (g +ᵥ I)`
     replace hI := hI.trans closedBall_ae_eq_ball.symm
-    haveI : Fintype G := @Fintype.ofFinite _ hu.finite_zmultiples
+    haveI : Fintype G := @Fintype.ofFinite _ hu.finite_zmultiples.to_subtype
     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
+      rw [←Nat.card_zmultiples, Nat.card_eq_fintype_card]; rfl
     simp_rw [measure_vadd]
     rw [AddCircle.measure_univ, tsum_fintype, Finset.sum_const, measure_congr hI,
       volume_closedBall, ← ENNReal.ofReal_nsmul, mul_div, mul_div_mul_comm,
@@ -97,11 +97,11 @@ theorem volume_of_add_preimage_eq (s I : Set <| AddCircle T) (u x : AddCircle T)
     (hI : I =ᵐ[volume] ball x (T / (2 * addOrderOf u))) :
     volume s = addOrderOf u • volume (s ∩ I) := by
   let G := AddSubgroup.zmultiples u
-  haveI : Fintype G := @Fintype.ofFinite _ hu.finite_zmultiples
+  haveI : Fintype G := @Fintype.ofFinite _ hu.finite_zmultiples.to_subtype
   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 : _)
   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]
+    ←Nat.card_zmultiples u, Nat.card_eq_fintype_card]
 #align add_circle.volume_of_add_preimage_eq AddCircle.volume_of_add_preimage_eq
 
 end AddCircle
chore: Generalise lemmas from finite groups to torsion elements (#8342)

Many lemmas in GroupTheory.OrderOfElement were stated for elements of finite groups even though they work more generally for torsion elements of possibly infinite groups. This PR generalises those lemmas (and leaves convenience lemmas stated for finite groups), and fixes a bunch of names to use dot notation.

Renames

  • Function.eq_of_lt_minimalPeriod_of_iterate_eqFunction.iterate_injOn_Iio_minimalPeriod
  • Function.eq_iff_lt_minimalPeriod_of_iterate_eqFunction.iterate_eq_iterate_iff_of_lt_minimalPeriod
  • isOfFinOrder_iff_coeSubmonoid.isOfFinOrder_coe
  • orderOf_pos'IsOfFinOrder.orderOf_pos
  • pow_eq_mod_orderOfpow_mod_orderOf (and turned around)
  • pow_injective_of_lt_orderOfpow_injOn_Iio_orderOf
  • mem_powers_iff_mem_range_order_of'IsOfFinOrder.mem_powers_iff_mem_range_orderOf
  • orderOf_pow''IsOfFinOrder.orderOf_pow
  • orderOf_pow_coprimeNat.Coprime.orderOf_pow
  • zpow_eq_mod_orderOfzpow_mod_orderOf (and turned around)
  • exists_pow_eq_oneisOfFinOrder_of_finite
  • pow_apply_eq_pow_mod_orderOf_cycleOf_applypow_mod_orderOf_cycleOf_apply

New lemmas

  • IsOfFinOrder.powers_eq_image_range_orderOf
  • IsOfFinOrder.natCard_powers_le_orderOf
  • IsOfFinOrder.finite_powers
  • finite_powers
  • infinite_powers
  • Nat.card_submonoidPowers
  • IsOfFinOrder.mem_powers_iff_mem_zpowers
  • IsOfFinOrder.powers_eq_zpowers
  • IsOfFinOrder.mem_zpowers_iff_mem_range_orderOf
  • IsOfFinOrder.exists_pow_eq_one

Other changes

  • Move decidableMemPowers/fintypePowers to GroupTheory.Submonoid.Membership and decidableMemZpowers/fintypeZpowers to GroupTheory.Subgroup.ZPowers.
  • finEquivPowers, finEquivZpowers, powersEquivPowers and zpowersEquivZpowers now assume IsOfFinTorsion x instead of Finite G.
  • isOfFinOrder_iff_pow_eq_one now takes one less explicit argument.
  • Delete Equiv.Perm.IsCycle.exists_pow_eq_one since it was saying that a permutation over a finite type is torsion, but this is trivial since the group of permutation is itself finite, so we can use isOfFinOrder_of_finite instead.
Diff
@@ -57,7 +57,7 @@ theorem isAddFundamentalDomain_of_ae_ball (I : Set <| AddCircle T) (u x : AddCir
   set G := AddSubgroup.zmultiples u
   set n := addOrderOf u
   set B := ball x (T / (2 * n))
-  have hn : 1 ≤ (n : ℝ) := by norm_cast; linarith [addOrderOf_pos' hu]
+  have hn : 1 ≤ (n : ℝ) := by norm_cast; linarith [hu.addOrderOf_pos]
   refine' IsAddFundamentalDomain.mk_of_measure_univ_le _ _ _ _
   · -- `NullMeasurableSet I volume`
     exact measurableSet_ball.nullMeasurableSet.congr hI.symm
chore: script to replace headers with #align_import statements (#5979)

Open in Gitpod

Co-authored-by: Eric Wieser <wieser.eric@gmail.com> Co-authored-by: Scott Morrison <scott.morrison@gmail.com>

Diff
@@ -2,15 +2,12 @@
 Copyright (c) 2022 Oliver Nash. All rights reserved.
 Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Oliver Nash
-
-! This file was ported from Lean 3 source module measure_theory.group.add_circle
-! leanprover-community/mathlib commit f2ce6086713c78a7f880485f7917ea547a215982
-! Please do not edit these lines, except to modify the commit id
-! if you have ported upstream changes.
 -/
 import Mathlib.MeasureTheory.Integral.Periodic
 import Mathlib.Data.ZMod.Quotient
 
+#align_import measure_theory.group.add_circle from "leanprover-community/mathlib"@"f2ce6086713c78a7f880485f7917ea547a215982"
+
 /-!
 # Measure-theoretic results about the additive circle
 
feat: port MeasureTheory.Group.AddCircle (#5245)

Dependencies 12 + 1014

1015 files ported (98.8%)
463807 lines ported (98.8%)
Show graph

The unported dependencies are

The following 1 dependencies have changed in mathlib3 since they were ported, which may complicate porting this file