dynamics.periodic_pts
⟷
Mathlib.Dynamics.PeriodicPts
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.
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(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)
α × β
(#18719)
The order of (a, b)
is the lcm of the orders of a
and b
. Match pow
and zpow
lemmas. Also some variables
noise because I could not use x
to mean what I wanted, and incidentally the type A
was mostly unused.
@@ -519,6 +519,31 @@ end
end function
+namespace function
+variables {α β : Type*} {f : α → α} {g : β → β} {x : α × β} {a : α} {b : β} {m n : ℕ}
+
+@[simp] lemma iterate_prod_map (f : α → α) (g : β → β) (n : ℕ) :
+ (prod.map f g)^[n] = prod.map (f^[n]) (g^[n]) := by induction n; simp [*, prod.map_comp_map]
+
+@[simp] lemma is_fixed_pt_prod_map (x : α × β) :
+ is_fixed_pt (prod.map f g) x ↔ is_fixed_pt f x.1 ∧ is_fixed_pt g x.2 := prod.ext_iff
+
+@[simp] lemma is_periodic_pt_prod_map (x : α × β) :
+ is_periodic_pt (prod.map f g) n x ↔ is_periodic_pt f n x.1 ∧ is_periodic_pt g n x.2 :=
+by simp [is_periodic_pt]
+
+lemma minimal_period_prod_map (f : α → α) (g : β → β) (x : α × β) :
+ minimal_period (prod.map f g) x = (minimal_period f x.1).lcm (minimal_period g x.2) :=
+eq_of_forall_dvd $ by cases x; simp [←is_periodic_pt_iff_minimal_period_dvd, nat.lcm_dvd_iff]
+
+lemma minimal_period_fst_dvd : minimal_period f x.1 ∣ minimal_period (prod.map f g) x :=
+by { rw minimal_period_prod_map, exact nat.dvd_lcm_left _ _ }
+
+lemma minimal_period_snd_dvd : minimal_period g x.2 ∣ minimal_period (prod.map f g) x :=
+by { rw minimal_period_prod_map, exact nat.dvd_lcm_right _ _ }
+
+end function
+
namespace mul_action
open function
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(first ported)
mathlib commit https://github.com/leanprover-community/mathlib/commit/65a1391a0106c9204fe45bc73a039f056558cb83
@@ -3,9 +3,9 @@ Copyright (c) 2020 Yury G. Kudryashov. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Yury G. Kudryashov
-/
-import Algebra.Hom.Iterate
+import Algebra.GroupPower.IterateHom
import Data.List.Cycle
-import Data.Pnat.Basic
+import Data.PNat.Basic
import Data.Nat.Prime
import Dynamics.FixedPoints.Basic
import GroupTheory.GroupAction.Group
@@ -823,10 +823,10 @@ theorem zpow_smul_eq_iff_minimalPeriod_dvd {n : ℤ} :
a ^ n • b = b ↔ (Function.minimalPeriod ((· • ·) a) b : ℤ) ∣ n :=
by
cases n
- · rw [Int.ofNat_eq_coe, zpow_coe_nat, Int.coe_nat_dvd, pow_smul_eq_iff_minimal_period_dvd]
+ · rw [Int.ofNat_eq_coe, zpow_natCast, Int.natCast_dvd_natCast, pow_smul_eq_iff_minimal_period_dvd]
·
- rw [Int.negSucc_coe, zpow_neg, zpow_coe_nat, inv_smul_eq_iff, eq_comm, dvd_neg, Int.coe_nat_dvd,
- pow_smul_eq_iff_minimal_period_dvd]
+ rw [Int.negSucc_coe, zpow_neg, zpow_natCast, inv_smul_eq_iff, eq_comm, dvd_neg,
+ Int.natCast_dvd_natCast, pow_smul_eq_iff_minimal_period_dvd]
#align mul_action.zpow_smul_eq_iff_minimal_period_dvd MulAction.zpow_smul_eq_iff_minimalPeriod_dvd
#align add_action.zsmul_vadd_eq_iff_minimal_period_dvd AddAction.zsmul_vadd_eq_iff_minimalPeriod_dvd
-/
mathlib commit https://github.com/leanprover-community/mathlib/commit/65a1391a0106c9204fe45bc73a039f056558cb83
@@ -119,13 +119,13 @@ protected theorem add (hn : IsPeriodicPt f n x) (hm : IsPeriodicPt f m x) :
#print Function.IsPeriodicPt.left_of_add /-
theorem left_of_add (hn : IsPeriodicPt f (n + m) x) (hm : IsPeriodicPt f m x) :
- IsPeriodicPt f n x := by rw [is_periodic_pt, iterate_add] at hn ; exact hn.left_of_comp hm
+ IsPeriodicPt f n x := by rw [is_periodic_pt, iterate_add] at hn; exact hn.left_of_comp hm
#align function.is_periodic_pt.left_of_add Function.IsPeriodicPt.left_of_add
-/
#print Function.IsPeriodicPt.right_of_add /-
theorem right_of_add (hn : IsPeriodicPt f (n + m) x) (hm : IsPeriodicPt f n x) :
- IsPeriodicPt f m x := by rw [add_comm] at hn ; exact hn.left_of_add hm
+ IsPeriodicPt f m x := by rw [add_comm] at hn; exact hn.left_of_add hm
#align function.is_periodic_pt.right_of_add Function.IsPeriodicPt.right_of_add
-/
@@ -184,7 +184,7 @@ theorem comp_lcm {g : α → α} (hco : Commute f g) (hf : IsPeriodicPt f m x)
theorem left_of_comp {g : α → α} (hco : Commute f g) (hfg : IsPeriodicPt (f ∘ g) n x)
(hg : IsPeriodicPt g n x) : IsPeriodicPt f n x :=
by
- rw [is_periodic_pt, hco.comp_iterate] at hfg
+ rw [is_periodic_pt, hco.comp_iterate] at hfg
exact hfg.left_of_comp hg
#align function.is_periodic_pt.left_of_comp Function.IsPeriodicPt.left_of_comp
-/
@@ -441,7 +441,7 @@ theorem le_of_lt_minimalPeriod_of_iterate_eq {m n : ℕ} (hm : m < minimalPeriod
(hmn : (f^[m]) x = (f^[n]) x) : m ≤ n :=
by
by_contra! hmn'
- rw [← Nat.add_sub_of_le hmn'.le, add_comm, iterate_add_apply] at hmn
+ rw [← Nat.add_sub_of_le hmn'.le, add_comm, iterate_add_apply] at hmn
exact
((is_periodic_pt.minimal_period_le (tsub_pos_of_lt hmn')
(is_periodic_pt_of_mem_periodic_pts_of_is_periodic_pt_iterate
@@ -692,8 +692,8 @@ theorem nodup_periodicOrbit : (periodicOrbit f x).Nodup :=
by
rw [periodic_orbit, Cycle.nodup_coe_iff, List.nodup_map_iff_inj_on (List.nodup_range _)]
intro m hm n hn hmn
- rw [List.mem_range] at hm hn
- rwa [eq_iff_lt_minimal_period_of_iterate_eq hm hn] at hmn
+ rw [List.mem_range] at hm hn
+ rwa [eq_iff_lt_minimal_period_of_iterate_eq hm hn] at hmn
#align function.nodup_periodic_orbit Function.nodup_periodicOrbit
-/
mathlib commit https://github.com/leanprover-community/mathlib/commit/65a1391a0106c9204fe45bc73a039f056558cb83
@@ -823,9 +823,9 @@ theorem zpow_smul_eq_iff_minimalPeriod_dvd {n : ℤ} :
a ^ n • b = b ↔ (Function.minimalPeriod ((· • ·) a) b : ℤ) ∣ n :=
by
cases n
- · rw [Int.ofNat_eq_coe, zpow_ofNat, Int.coe_nat_dvd, pow_smul_eq_iff_minimal_period_dvd]
+ · rw [Int.ofNat_eq_coe, zpow_coe_nat, Int.coe_nat_dvd, pow_smul_eq_iff_minimal_period_dvd]
·
- rw [Int.negSucc_coe, zpow_neg, zpow_ofNat, inv_smul_eq_iff, eq_comm, dvd_neg, Int.coe_nat_dvd,
+ rw [Int.negSucc_coe, zpow_neg, zpow_coe_nat, inv_smul_eq_iff, eq_comm, dvd_neg, Int.coe_nat_dvd,
pow_smul_eq_iff_minimal_period_dvd]
#align mul_action.zpow_smul_eq_iff_minimal_period_dvd MulAction.zpow_smul_eq_iff_minimalPeriod_dvd
#align add_action.zsmul_vadd_eq_iff_minimal_period_dvd AddAction.zsmul_vadd_eq_iff_minimalPeriod_dvd
mathlib commit https://github.com/leanprover-community/mathlib/commit/65a1391a0106c9204fe45bc73a039f056558cb83
@@ -440,7 +440,7 @@ theorem minimalPeriod_apply (hx : x ∈ periodicPts f) : minimalPeriod f (f x) =
theorem le_of_lt_minimalPeriod_of_iterate_eq {m n : ℕ} (hm : m < minimalPeriod f x)
(hmn : (f^[m]) x = (f^[n]) x) : m ≤ n :=
by
- by_contra' hmn'
+ by_contra! hmn'
rw [← Nat.add_sub_of_le hmn'.le, add_comm, iterate_add_apply] at hmn
exact
((is_periodic_pt.minimal_period_le (tsub_pos_of_lt hmn')
mathlib commit https://github.com/leanprover-community/mathlib/commit/65a1391a0106c9204fe45bc73a039f056558cb83
@@ -451,19 +451,19 @@ theorem le_of_lt_minimalPeriod_of_iterate_eq {m n : ℕ} (hm : m < minimalPeriod
#align function.le_of_lt_minimal_period_of_iterate_eq Function.le_of_lt_minimalPeriod_of_iterate_eq
-/
-#print Function.eq_of_lt_minimalPeriod_of_iterate_eq /-
-theorem eq_of_lt_minimalPeriod_of_iterate_eq {m n : ℕ} (hm : m < minimalPeriod f x)
+#print Function.iterate_injOn_Iio_minimalPeriod /-
+theorem iterate_injOn_Iio_minimalPeriod {m n : ℕ} (hm : m < minimalPeriod f x)
(hn : n < minimalPeriod f x) (hmn : (f^[m]) x = (f^[n]) x) : m = n :=
(le_of_lt_minimalPeriod_of_iterate_eq hm hmn).antisymm
(le_of_lt_minimalPeriod_of_iterate_eq hn hmn.symm)
-#align function.eq_of_lt_minimal_period_of_iterate_eq Function.eq_of_lt_minimalPeriod_of_iterate_eq
+#align function.eq_of_lt_minimal_period_of_iterate_eq Function.iterate_injOn_Iio_minimalPeriod
-/
-#print Function.eq_iff_lt_minimalPeriod_of_iterate_eq /-
-theorem eq_iff_lt_minimalPeriod_of_iterate_eq {m n : ℕ} (hm : m < minimalPeriod f x)
+#print Function.iterate_eq_iterate_iff_of_lt_minimalPeriod /-
+theorem iterate_eq_iterate_iff_of_lt_minimalPeriod {m n : ℕ} (hm : m < minimalPeriod f x)
(hn : n < minimalPeriod f x) : (f^[m]) x = (f^[n]) x ↔ m = n :=
- ⟨eq_of_lt_minimalPeriod_of_iterate_eq hm hn, congr_arg _⟩
-#align function.eq_iff_lt_minimal_period_of_iterate_eq Function.eq_iff_lt_minimalPeriod_of_iterate_eq
+ ⟨iterate_injOn_Iio_minimalPeriod hm hn, congr_arg _⟩
+#align function.eq_iff_lt_minimal_period_of_iterate_eq Function.iterate_eq_iterate_iff_of_lt_minimalPeriod
-/
#print Function.minimalPeriod_id /-
mathlib commit https://github.com/leanprover-community/mathlib/commit/ce64cd319bb6b3e82f31c2d38e79080d377be451
@@ -3,12 +3,12 @@ Copyright (c) 2020 Yury G. Kudryashov. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Yury G. Kudryashov
-/
-import Mathbin.Algebra.Hom.Iterate
-import Mathbin.Data.List.Cycle
-import Mathbin.Data.Pnat.Basic
-import Mathbin.Data.Nat.Prime
-import Mathbin.Dynamics.FixedPoints.Basic
-import Mathbin.GroupTheory.GroupAction.Group
+import Algebra.Hom.Iterate
+import Data.List.Cycle
+import Data.Pnat.Basic
+import Data.Nat.Prime
+import Dynamics.FixedPoints.Basic
+import GroupTheory.GroupAction.Group
#align_import dynamics.periodic_pts from "leanprover-community/mathlib"@"d07245fd37786daa997af4f1a73a49fa3b748408"
mathlib commit https://github.com/leanprover-community/mathlib/commit/ce64cd319bb6b3e82f31c2d38e79080d377be451
@@ -562,7 +562,7 @@ theorem Commute.minimalPeriod_of_comp_dvd_mul {g : α → α} (h : Function.Comm
#print Function.Commute.minimalPeriod_of_comp_eq_mul_of_coprime /-
theorem Commute.minimalPeriod_of_comp_eq_mul_of_coprime {g : α → α} (h : Function.Commute f g)
- (hco : coprime (minimalPeriod f x) (minimalPeriod g x)) :
+ (hco : Coprime (minimalPeriod f x) (minimalPeriod g x)) :
minimalPeriod (f ∘ g) x = minimalPeriod f x * minimalPeriod g x :=
by
apply dvd_antisymm h.minimal_period_of_comp_dvd_mul
mathlib commit https://github.com/leanprover-community/mathlib/commit/8ea5598db6caeddde6cb734aa179cc2408dbd345
@@ -2,11 +2,6 @@
Copyright (c) 2020 Yury G. Kudryashov. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Yury G. Kudryashov
-
-! This file was ported from Lean 3 source module dynamics.periodic_pts
-! leanprover-community/mathlib commit d07245fd37786daa997af4f1a73a49fa3b748408
-! Please do not edit these lines, except to modify the commit id
-! if you have ported upstream changes.
-/
import Mathbin.Algebra.Hom.Iterate
import Mathbin.Data.List.Cycle
@@ -15,6 +10,8 @@ import Mathbin.Data.Nat.Prime
import Mathbin.Dynamics.FixedPoints.Basic
import Mathbin.GroupTheory.GroupAction.Group
+#align_import dynamics.periodic_pts from "leanprover-community/mathlib"@"d07245fd37786daa997af4f1a73a49fa3b748408"
+
/-!
# Periodic points
mathlib commit https://github.com/leanprover-community/mathlib/commit/bf2428c9486c407ca38b5b3fb10b87dad0bc99fa
@@ -761,35 +761,47 @@ namespace Function
variable {α β : Type _} {f : α → α} {g : β → β} {x : α × β} {a : α} {b : β} {m n : ℕ}
+#print Function.iterate_prod_map /-
@[simp]
theorem iterate_prod_map (f : α → α) (g : β → β) (n : ℕ) :
Prod.map f g^[n] = Prod.map (f^[n]) (g^[n]) := by induction n <;> simp [*, Prod.map_comp_map]
#align function.iterate_prod_map Function.iterate_prod_map
+-/
+#print Function.isFixedPt_prod_map /-
@[simp]
theorem isFixedPt_prod_map (x : α × β) :
IsFixedPt (Prod.map f g) x ↔ IsFixedPt f x.1 ∧ IsFixedPt g x.2 :=
Prod.ext_iff
#align function.is_fixed_pt_prod_map Function.isFixedPt_prod_map
+-/
+#print Function.isPeriodicPt_prod_map /-
@[simp]
theorem isPeriodicPt_prod_map (x : α × β) :
IsPeriodicPt (Prod.map f g) n x ↔ IsPeriodicPt f n x.1 ∧ IsPeriodicPt g n x.2 := by
simp [is_periodic_pt]
#align function.is_periodic_pt_prod_map Function.isPeriodicPt_prod_map
+-/
+#print Function.minimalPeriod_prod_map /-
theorem minimalPeriod_prod_map (f : α → α) (g : β → β) (x : α × β) :
minimalPeriod (Prod.map f g) x = (minimalPeriod f x.1).lcm (minimalPeriod g x.2) :=
eq_of_forall_dvd <| by cases x <;> simp [← is_periodic_pt_iff_minimal_period_dvd, Nat.lcm_dvd_iff]
#align function.minimal_period_prod_map Function.minimalPeriod_prod_map
+-/
+#print Function.minimalPeriod_fst_dvd /-
theorem minimalPeriod_fst_dvd : minimalPeriod f x.1 ∣ minimalPeriod (Prod.map f g) x := by
rw [minimal_period_prod_map]; exact Nat.dvd_lcm_left _ _
#align function.minimal_period_fst_dvd Function.minimalPeriod_fst_dvd
+-/
+#print Function.minimalPeriod_snd_dvd /-
theorem minimalPeriod_snd_dvd : minimalPeriod g x.2 ∣ minimalPeriod (Prod.map f g) x := by
rw [minimal_period_prod_map]; exact Nat.dvd_lcm_right _ _
#align function.minimal_period_snd_dvd Function.minimalPeriod_snd_dvd
+-/
end Function
mathlib commit https://github.com/leanprover-community/mathlib/commit/d07245fd37786daa997af4f1a73a49fa3b748408
@@ -4,7 +4,7 @@ Released under Apache 2.0 license as described in the file LICENSE.
Authors: Yury G. Kudryashov
! This file was ported from Lean 3 source module dynamics.periodic_pts
-! leanprover-community/mathlib commit fac369018417f980cec5fcdafc766a69f88d8cfe
+! leanprover-community/mathlib commit d07245fd37786daa997af4f1a73a49fa3b748408
! Please do not edit these lines, except to modify the commit id
! if you have ported upstream changes.
-/
@@ -757,6 +757,42 @@ theorem periodicOrbit_chain' (r : α → α → Prop) {f : α → α} {x : α} (
end Function
+namespace Function
+
+variable {α β : Type _} {f : α → α} {g : β → β} {x : α × β} {a : α} {b : β} {m n : ℕ}
+
+@[simp]
+theorem iterate_prod_map (f : α → α) (g : β → β) (n : ℕ) :
+ Prod.map f g^[n] = Prod.map (f^[n]) (g^[n]) := by induction n <;> simp [*, Prod.map_comp_map]
+#align function.iterate_prod_map Function.iterate_prod_map
+
+@[simp]
+theorem isFixedPt_prod_map (x : α × β) :
+ IsFixedPt (Prod.map f g) x ↔ IsFixedPt f x.1 ∧ IsFixedPt g x.2 :=
+ Prod.ext_iff
+#align function.is_fixed_pt_prod_map Function.isFixedPt_prod_map
+
+@[simp]
+theorem isPeriodicPt_prod_map (x : α × β) :
+ IsPeriodicPt (Prod.map f g) n x ↔ IsPeriodicPt f n x.1 ∧ IsPeriodicPt g n x.2 := by
+ simp [is_periodic_pt]
+#align function.is_periodic_pt_prod_map Function.isPeriodicPt_prod_map
+
+theorem minimalPeriod_prod_map (f : α → α) (g : β → β) (x : α × β) :
+ minimalPeriod (Prod.map f g) x = (minimalPeriod f x.1).lcm (minimalPeriod g x.2) :=
+ eq_of_forall_dvd <| by cases x <;> simp [← is_periodic_pt_iff_minimal_period_dvd, Nat.lcm_dvd_iff]
+#align function.minimal_period_prod_map Function.minimalPeriod_prod_map
+
+theorem minimalPeriod_fst_dvd : minimalPeriod f x.1 ∣ minimalPeriod (Prod.map f g) x := by
+ rw [minimal_period_prod_map]; exact Nat.dvd_lcm_left _ _
+#align function.minimal_period_fst_dvd Function.minimalPeriod_fst_dvd
+
+theorem minimalPeriod_snd_dvd : minimalPeriod g x.2 ∣ minimalPeriod (Prod.map f g) x := by
+ rw [minimal_period_prod_map]; exact Nat.dvd_lcm_right _ _
+#align function.minimal_period_snd_dvd Function.minimalPeriod_snd_dvd
+
+end Function
+
namespace MulAction
open Function
mathlib commit https://github.com/leanprover-community/mathlib/commit/9fb8964792b4237dac6200193a0d533f1b3f7423
@@ -95,10 +95,12 @@ protected theorem isFixedPt (hf : IsPeriodicPt f n x) : IsFixedPt (f^[n]) x :=
#align function.is_periodic_pt.is_fixed_pt Function.IsPeriodicPt.isFixedPt
-/
+#print Function.IsPeriodicPt.map /-
protected theorem map (hx : IsPeriodicPt fa n x) {g : α → β} (hg : Semiconj g fa fb) :
IsPeriodicPt fb n (g x) :=
hx.map (hg.iterate_right n)
#align function.is_periodic_pt.map Function.IsPeriodicPt.map
+-/
#print Function.IsPeriodicPt.apply_iterate /-
theorem apply_iterate (hx : IsPeriodicPt f n x) (m : ℕ) : IsPeriodicPt f n ((f^[m]) x) :=
@@ -248,10 +250,12 @@ theorem mem_ptsOfPeriod : x ∈ ptsOfPeriod f n ↔ IsPeriodicPt f n x :=
#align function.mem_pts_of_period Function.mem_ptsOfPeriod
-/
+#print Function.Semiconj.mapsTo_ptsOfPeriod /-
theorem Semiconj.mapsTo_ptsOfPeriod {g : α → β} (h : Semiconj g fa fb) (n : ℕ) :
MapsTo g (ptsOfPeriod fa n) (ptsOfPeriod fb n) :=
(h.iterate_right n).mapsTo_fixedPoints
#align function.semiconj.maps_to_pts_of_period Function.Semiconj.mapsTo_ptsOfPeriod
+-/
#print Function.bijOn_ptsOfPeriod /-
theorem bijOn_ptsOfPeriod (f : α → α) {n : ℕ} (hn : 0 < n) :
@@ -282,9 +286,11 @@ theorem mk_mem_periodicPts (hn : 0 < n) (hx : IsPeriodicPt f n x) : x ∈ period
#align function.mk_mem_periodic_pts Function.mk_mem_periodicPts
-/
+#print Function.mem_periodicPts /-
theorem mem_periodicPts : x ∈ periodicPts f ↔ ∃ n > 0, IsPeriodicPt f n x :=
Iff.rfl
#align function.mem_periodic_pts Function.mem_periodicPts
+-/
#print Function.isPeriodicPt_of_mem_periodicPts_of_isPeriodicPt_iterate /-
theorem isPeriodicPt_of_mem_periodicPts_of_isPeriodicPt_iterate (hx : x ∈ periodicPts f)
@@ -322,9 +328,11 @@ theorem bijOn_periodicPts : BijOn f (periodicPts f) (periodicPts f) :=
variable {f}
+#print Function.Semiconj.mapsTo_periodicPts /-
theorem Semiconj.mapsTo_periodicPts {g : α → β} (h : Semiconj g fa fb) :
MapsTo g (periodicPts fa) (periodicPts fb) := fun x ⟨n, hn, hx⟩ => ⟨n, hn, hx.map h⟩
#align function.semiconj.maps_to_periodic_pts Function.Semiconj.mapsTo_periodicPts
+-/
open scoped Classical
@@ -516,10 +524,12 @@ theorem isPeriodicPt_iff_minimalPeriod_dvd : IsPeriodicPt f n x ↔ minimalPerio
open Nat
+#print Function.minimalPeriod_eq_minimalPeriod_iff /-
theorem minimalPeriod_eq_minimalPeriod_iff {g : β → β} {y : β} :
minimalPeriod f x = minimalPeriod g y ↔ ∀ n, IsPeriodicPt f n x ↔ IsPeriodicPt g n y := by
simp_rw [is_periodic_pt_iff_minimal_period_dvd, dvd_right_iff_eq]
#align function.minimal_period_eq_minimal_period_iff Function.minimalPeriod_eq_minimalPeriod_iff
+-/
#print Function.minimalPeriod_eq_prime /-
theorem minimalPeriod_eq_prime {p : ℕ} [hp : Fact p.Prime] (hper : IsPeriodicPt f p x)
@@ -762,6 +772,7 @@ theorem pow_smul_eq_iff_minimalPeriod_dvd {n : ℕ} :
#align add_action.nsmul_vadd_eq_iff_minimal_period_dvd AddAction.nsmul_vadd_eq_iff_minimalPeriod_dvd
-/
+#print MulAction.zpow_smul_eq_iff_minimalPeriod_dvd /-
@[to_additive]
theorem zpow_smul_eq_iff_minimalPeriod_dvd {n : ℤ} :
a ^ n • b = b ↔ (Function.minimalPeriod ((· • ·) a) b : ℤ) ∣ n :=
@@ -773,6 +784,7 @@ theorem zpow_smul_eq_iff_minimalPeriod_dvd {n : ℤ} :
pow_smul_eq_iff_minimal_period_dvd]
#align mul_action.zpow_smul_eq_iff_minimal_period_dvd MulAction.zpow_smul_eq_iff_minimalPeriod_dvd
#align add_action.zsmul_vadd_eq_iff_minimal_period_dvd AddAction.zsmul_vadd_eq_iff_minimalPeriod_dvd
+-/
variable (a b)
mathlib commit https://github.com/leanprover-community/mathlib/commit/5f25c089cb34db4db112556f23c50d12da81b297
@@ -237,7 +237,7 @@ end IsPeriodicPt
#print Function.ptsOfPeriod /-
/-- The set of periodic points of a given (possibly non-minimal) period. -/
def ptsOfPeriod (f : α → α) (n : ℕ) : Set α :=
- { x : α | IsPeriodicPt f n x }
+ {x : α | IsPeriodicPt f n x}
#align function.pts_of_period Function.ptsOfPeriod
-/
@@ -272,7 +272,7 @@ theorem directed_ptsOfPeriod_pNat (f : α → α) : Directed (· ⊆ ·) fun n :
#print Function.periodicPts /-
/-- The set of periodic points of a map `f : α → α`. -/
def periodicPts (f : α → α) : Set α :=
- { x : α | ∃ n > 0, IsPeriodicPt f n x }
+ {x : α | ∃ n > 0, IsPeriodicPt f n x}
#align function.periodic_pts Function.periodicPts
-/
@@ -291,7 +291,7 @@ theorem isPeriodicPt_of_mem_periodicPts_of_isPeriodicPt_iterate (hx : x ∈ peri
(hm : IsPeriodicPt f m ((f^[n]) x)) : IsPeriodicPt f m x :=
by
rcases hx with ⟨r, hr, hr'⟩
- convert(hm.apply_iterate ((n / r + 1) * r - n)).Eq
+ convert (hm.apply_iterate ((n / r + 1) * r - n)).Eq
suffices n ≤ (n / r + 1) * r by
rw [← iterate_add_apply, Nat.sub_add_cancel this, iterate_mul, (hr'.iterate _).Eq]
rw [add_mul, one_mul]
mathlib commit https://github.com/leanprover-community/mathlib/commit/cca40788df1b8755d5baf17ab2f27dacc2e17acb
@@ -120,13 +120,13 @@ protected theorem add (hn : IsPeriodicPt f n x) (hm : IsPeriodicPt f m x) :
#print Function.IsPeriodicPt.left_of_add /-
theorem left_of_add (hn : IsPeriodicPt f (n + m) x) (hm : IsPeriodicPt f m x) :
- IsPeriodicPt f n x := by rw [is_periodic_pt, iterate_add] at hn; exact hn.left_of_comp hm
+ IsPeriodicPt f n x := by rw [is_periodic_pt, iterate_add] at hn ; exact hn.left_of_comp hm
#align function.is_periodic_pt.left_of_add Function.IsPeriodicPt.left_of_add
-/
#print Function.IsPeriodicPt.right_of_add /-
theorem right_of_add (hn : IsPeriodicPt f (n + m) x) (hm : IsPeriodicPt f n x) :
- IsPeriodicPt f m x := by rw [add_comm] at hn; exact hn.left_of_add hm
+ IsPeriodicPt f m x := by rw [add_comm] at hn ; exact hn.left_of_add hm
#align function.is_periodic_pt.right_of_add Function.IsPeriodicPt.right_of_add
-/
@@ -185,7 +185,7 @@ theorem comp_lcm {g : α → α} (hco : Commute f g) (hf : IsPeriodicPt f m x)
theorem left_of_comp {g : α → α} (hco : Commute f g) (hfg : IsPeriodicPt (f ∘ g) n x)
(hg : IsPeriodicPt g n x) : IsPeriodicPt f n x :=
by
- rw [is_periodic_pt, hco.comp_iterate] at hfg
+ rw [is_periodic_pt, hco.comp_iterate] at hfg
exact hfg.left_of_comp hg
#align function.is_periodic_pt.left_of_comp Function.IsPeriodicPt.left_of_comp
-/
@@ -358,7 +358,7 @@ theorem iterate_minimalPeriod : (f^[minimalPeriod f x]) x = x :=
#print Function.iterate_add_minimalPeriod_eq /-
@[simp]
theorem iterate_add_minimalPeriod_eq : (f^[n + minimalPeriod f x]) x = (f^[n]) x := by
- rw [iterate_add_apply]; congr ; exact is_periodic_pt_minimal_period f x
+ rw [iterate_add_apply]; congr; exact is_periodic_pt_minimal_period f x
#align function.iterate_add_minimal_period_eq Function.iterate_add_minimalPeriod_eq
-/
@@ -436,7 +436,7 @@ theorem le_of_lt_minimalPeriod_of_iterate_eq {m n : ℕ} (hm : m < minimalPeriod
(hmn : (f^[m]) x = (f^[n]) x) : m ≤ n :=
by
by_contra' hmn'
- rw [← Nat.add_sub_of_le hmn'.le, add_comm, iterate_add_apply] at hmn
+ rw [← Nat.add_sub_of_le hmn'.le, add_comm, iterate_add_apply] at hmn
exact
((is_periodic_pt.minimal_period_le (tsub_pos_of_lt hmn')
(is_periodic_pt_of_mem_periodic_pts_of_is_periodic_pt_iterate
@@ -685,8 +685,8 @@ theorem nodup_periodicOrbit : (periodicOrbit f x).Nodup :=
by
rw [periodic_orbit, Cycle.nodup_coe_iff, List.nodup_map_iff_inj_on (List.nodup_range _)]
intro m hm n hn hmn
- rw [List.mem_range] at hm hn
- rwa [eq_iff_lt_minimal_period_of_iterate_eq hm hn] at hmn
+ rw [List.mem_range] at hm hn
+ rwa [eq_iff_lt_minimal_period_of_iterate_eq hm hn] at hmn
#align function.nodup_periodic_orbit Function.nodup_periodicOrbit
-/
mathlib commit https://github.com/leanprover-community/mathlib/commit/917c3c072e487b3cccdbfeff17e75b40e45f66cb
@@ -326,7 +326,7 @@ theorem Semiconj.mapsTo_periodicPts {g : α → β} (h : Semiconj g fa fb) :
MapsTo g (periodicPts fa) (periodicPts fb) := fun x ⟨n, hn, hx⟩ => ⟨n, hn, hx.map h⟩
#align function.semiconj.maps_to_periodic_pts Function.Semiconj.mapsTo_periodicPts
-open Classical
+open scoped Classical
noncomputable section
mathlib commit https://github.com/leanprover-community/mathlib/commit/917c3c072e487b3cccdbfeff17e75b40e45f66cb
@@ -95,12 +95,6 @@ protected theorem isFixedPt (hf : IsPeriodicPt f n x) : IsFixedPt (f^[n]) x :=
#align function.is_periodic_pt.is_fixed_pt Function.IsPeriodicPt.isFixedPt
-/
-/- warning: function.is_periodic_pt.map -> Function.IsPeriodicPt.map is a dubious translation:
-lean 3 declaration is
- forall {α : Type.{u1}} {β : Type.{u2}} {fa : α -> α} {fb : β -> β} {x : α} {n : Nat}, (Function.IsPeriodicPt.{u1} α fa n x) -> (forall {g : α -> β}, (Function.Semiconj.{u1, u2} α β g fa fb) -> (Function.IsPeriodicPt.{u2} β fb n (g x)))
-but is expected to have type
- forall {α : Type.{u2}} {β : Type.{u1}} {fa : α -> α} {fb : β -> β} {x : α} {n : Nat}, (Function.IsPeriodicPt.{u2} α fa n x) -> (forall {g : α -> β}, (Function.Semiconj.{u2, u1} α β g fa fb) -> (Function.IsPeriodicPt.{u1} β fb n (g x)))
-Case conversion may be inaccurate. Consider using '#align function.is_periodic_pt.map Function.IsPeriodicPt.mapₓ'. -/
protected theorem map (hx : IsPeriodicPt fa n x) {g : α → β} (hg : Semiconj g fa fb) :
IsPeriodicPt fb n (g x) :=
hx.map (hg.iterate_right n)
@@ -254,12 +248,6 @@ theorem mem_ptsOfPeriod : x ∈ ptsOfPeriod f n ↔ IsPeriodicPt f n x :=
#align function.mem_pts_of_period Function.mem_ptsOfPeriod
-/
-/- warning: function.semiconj.maps_to_pts_of_period -> Function.Semiconj.mapsTo_ptsOfPeriod is a dubious translation:
-lean 3 declaration is
- forall {α : Type.{u1}} {β : Type.{u2}} {fa : α -> α} {fb : β -> β} {g : α -> β}, (Function.Semiconj.{u1, u2} α β g fa fb) -> (forall (n : Nat), Set.MapsTo.{u1, u2} α β g (Function.ptsOfPeriod.{u1} α fa n) (Function.ptsOfPeriod.{u2} β fb n))
-but is expected to have type
- forall {α : Type.{u2}} {β : Type.{u1}} {fa : α -> α} {fb : β -> β} {g : α -> β}, (Function.Semiconj.{u2, u1} α β g fa fb) -> (forall (n : Nat), Set.MapsTo.{u2, u1} α β g (Function.ptsOfPeriod.{u2} α fa n) (Function.ptsOfPeriod.{u1} β fb n))
-Case conversion may be inaccurate. Consider using '#align function.semiconj.maps_to_pts_of_period Function.Semiconj.mapsTo_ptsOfPeriodₓ'. -/
theorem Semiconj.mapsTo_ptsOfPeriod {g : α → β} (h : Semiconj g fa fb) (n : ℕ) :
MapsTo g (ptsOfPeriod fa n) (ptsOfPeriod fb n) :=
(h.iterate_right n).mapsTo_fixedPoints
@@ -294,12 +282,6 @@ theorem mk_mem_periodicPts (hn : 0 < n) (hx : IsPeriodicPt f n x) : x ∈ period
#align function.mk_mem_periodic_pts Function.mk_mem_periodicPts
-/
-/- warning: function.mem_periodic_pts -> Function.mem_periodicPts is a dubious translation:
-lean 3 declaration is
- forall {α : Type.{u1}} {f : α -> α} {x : α}, Iff (Membership.Mem.{u1, u1} α (Set.{u1} α) (Set.hasMem.{u1} α) x (Function.periodicPts.{u1} α f)) (Exists.{1} Nat (fun (n : Nat) => Exists.{0} (GT.gt.{0} Nat Nat.hasLt n (OfNat.ofNat.{0} Nat 0 (OfNat.mk.{0} Nat 0 (Zero.zero.{0} Nat Nat.hasZero)))) (fun (H : GT.gt.{0} Nat Nat.hasLt n (OfNat.ofNat.{0} Nat 0 (OfNat.mk.{0} Nat 0 (Zero.zero.{0} Nat Nat.hasZero)))) => Function.IsPeriodicPt.{u1} α f n x)))
-but is expected to have type
- forall {α : Type.{u1}} {f : α -> α} {x : α}, Iff (Membership.mem.{u1, u1} α (Set.{u1} α) (Set.instMembershipSet.{u1} α) x (Function.periodicPts.{u1} α f)) (Exists.{1} Nat (fun (n : Nat) => And (GT.gt.{0} Nat instLTNat n (OfNat.ofNat.{0} Nat 0 (instOfNatNat 0))) (Function.IsPeriodicPt.{u1} α f n x)))
-Case conversion may be inaccurate. Consider using '#align function.mem_periodic_pts Function.mem_periodicPtsₓ'. -/
theorem mem_periodicPts : x ∈ periodicPts f ↔ ∃ n > 0, IsPeriodicPt f n x :=
Iff.rfl
#align function.mem_periodic_pts Function.mem_periodicPts
@@ -340,12 +322,6 @@ theorem bijOn_periodicPts : BijOn f (periodicPts f) (periodicPts f) :=
variable {f}
-/- warning: function.semiconj.maps_to_periodic_pts -> Function.Semiconj.mapsTo_periodicPts is a dubious translation:
-lean 3 declaration is
- forall {α : Type.{u1}} {β : Type.{u2}} {fa : α -> α} {fb : β -> β} {g : α -> β}, (Function.Semiconj.{u1, u2} α β g fa fb) -> (Set.MapsTo.{u1, u2} α β g (Function.periodicPts.{u1} α fa) (Function.periodicPts.{u2} β fb))
-but is expected to have type
- forall {α : Type.{u2}} {β : Type.{u1}} {fa : α -> α} {fb : β -> β} {g : α -> β}, (Function.Semiconj.{u2, u1} α β g fa fb) -> (Set.MapsTo.{u2, u1} α β g (Function.periodicPts.{u2} α fa) (Function.periodicPts.{u1} β fb))
-Case conversion may be inaccurate. Consider using '#align function.semiconj.maps_to_periodic_pts Function.Semiconj.mapsTo_periodicPtsₓ'. -/
theorem Semiconj.mapsTo_periodicPts {g : α → β} (h : Semiconj g fa fb) :
MapsTo g (periodicPts fa) (periodicPts fb) := fun x ⟨n, hn, hx⟩ => ⟨n, hn, hx.map h⟩
#align function.semiconj.maps_to_periodic_pts Function.Semiconj.mapsTo_periodicPts
@@ -540,12 +516,6 @@ theorem isPeriodicPt_iff_minimalPeriod_dvd : IsPeriodicPt f n x ↔ minimalPerio
open Nat
-/- warning: function.minimal_period_eq_minimal_period_iff -> Function.minimalPeriod_eq_minimalPeriod_iff is a dubious translation:
-lean 3 declaration is
- forall {α : Type.{u1}} {β : Type.{u2}} {f : α -> α} {x : α} {g : β -> β} {y : β}, Iff (Eq.{1} Nat (Function.minimalPeriod.{u1} α f x) (Function.minimalPeriod.{u2} β g y)) (forall (n : Nat), Iff (Function.IsPeriodicPt.{u1} α f n x) (Function.IsPeriodicPt.{u2} β g n y))
-but is expected to have type
- forall {α : Type.{u2}} {β : Type.{u1}} {f : α -> α} {x : α} {g : β -> β} {y : β}, Iff (Eq.{1} Nat (Function.minimalPeriod.{u2} α f x) (Function.minimalPeriod.{u1} β g y)) (forall (n : Nat), Iff (Function.IsPeriodicPt.{u2} α f n x) (Function.IsPeriodicPt.{u1} β g n y))
-Case conversion may be inaccurate. Consider using '#align function.minimal_period_eq_minimal_period_iff Function.minimalPeriod_eq_minimalPeriod_iffₓ'. -/
theorem minimalPeriod_eq_minimalPeriod_iff {g : β → β} {y : β} :
minimalPeriod f x = minimalPeriod g y ↔ ∀ n, IsPeriodicPt f n x ↔ IsPeriodicPt g n y := by
simp_rw [is_periodic_pt_iff_minimal_period_dvd, dvd_right_iff_eq]
@@ -792,12 +762,6 @@ theorem pow_smul_eq_iff_minimalPeriod_dvd {n : ℕ} :
#align add_action.nsmul_vadd_eq_iff_minimal_period_dvd AddAction.nsmul_vadd_eq_iff_minimalPeriod_dvd
-/
-/- warning: mul_action.zpow_smul_eq_iff_minimal_period_dvd -> MulAction.zpow_smul_eq_iff_minimalPeriod_dvd is a dubious translation:
-lean 3 declaration is
- forall {α : Type.{u1}} {β : Type.{u2}} [_inst_1 : Group.{u1} α] [_inst_2 : MulAction.{u1, u2} α β (DivInvMonoid.toMonoid.{u1} α (Group.toDivInvMonoid.{u1} α _inst_1))] {a : α} {b : β} {n : Int}, Iff (Eq.{succ u2} β (SMul.smul.{u1, u2} α β (MulAction.toHasSmul.{u1, u2} α β (DivInvMonoid.toMonoid.{u1} α (Group.toDivInvMonoid.{u1} α _inst_1)) _inst_2) (HPow.hPow.{u1, 0, u1} α Int α (instHPow.{u1, 0} α Int (DivInvMonoid.Pow.{u1} α (Group.toDivInvMonoid.{u1} α _inst_1))) a n) b) b) (Dvd.Dvd.{0} Int (semigroupDvd.{0} Int Int.semigroup) ((fun (a : Type) (b : Type) [self : HasLiftT.{1, 1} a b] => self.0) Nat Int (HasLiftT.mk.{1, 1} Nat Int (CoeTCₓ.coe.{1, 1} Nat Int (coeBase.{1, 1} Nat Int Int.hasCoe))) (Function.minimalPeriod.{u2} β (SMul.smul.{u1, u2} α β (MulAction.toHasSmul.{u1, u2} α β (DivInvMonoid.toMonoid.{u1} α (Group.toDivInvMonoid.{u1} α _inst_1)) _inst_2) a) b)) n)
-but is expected to have type
- forall {α : Type.{u1}} {β : Type.{u2}} [_inst_1 : Group.{u1} α] [_inst_2 : MulAction.{u1, u2} α β (DivInvMonoid.toMonoid.{u1} α (Group.toDivInvMonoid.{u1} α _inst_1))] {a : α} {b : β} {n : Int}, Iff (Eq.{succ u2} β (HSMul.hSMul.{u1, u2, u2} α β β (instHSMul.{u1, u2} α β (MulAction.toSMul.{u1, u2} α β (DivInvMonoid.toMonoid.{u1} α (Group.toDivInvMonoid.{u1} α _inst_1)) _inst_2)) (HPow.hPow.{u1, 0, u1} α Int α (instHPow.{u1, 0} α Int (DivInvMonoid.Pow.{u1} α (Group.toDivInvMonoid.{u1} α _inst_1))) a n) b) b) (Dvd.dvd.{0} Int Int.instDvdInt (Nat.cast.{0} Int instNatCastInt (Function.minimalPeriod.{u2} β ((fun (x._@.Mathlib.Dynamics.PeriodicPts._hyg.6834 : α) (x._@.Mathlib.Dynamics.PeriodicPts._hyg.6836 : β) => HSMul.hSMul.{u1, u2, u2} α β β (instHSMul.{u1, u2} α β (MulAction.toSMul.{u1, u2} α β (DivInvMonoid.toMonoid.{u1} α (Group.toDivInvMonoid.{u1} α _inst_1)) _inst_2)) x._@.Mathlib.Dynamics.PeriodicPts._hyg.6834 x._@.Mathlib.Dynamics.PeriodicPts._hyg.6836) a) b)) n)
-Case conversion may be inaccurate. Consider using '#align mul_action.zpow_smul_eq_iff_minimal_period_dvd MulAction.zpow_smul_eq_iff_minimalPeriod_dvdₓ'. -/
@[to_additive]
theorem zpow_smul_eq_iff_minimalPeriod_dvd {n : ℤ} :
a ^ n • b = b ↔ (Function.minimalPeriod ((· • ·) a) b : ℤ) ∣ n :=
mathlib commit https://github.com/leanprover-community/mathlib/commit/917c3c072e487b3cccdbfeff17e75b40e45f66cb
@@ -120,25 +120,19 @@ protected theorem apply (hx : IsPeriodicPt f n x) : IsPeriodicPt f n (f x) :=
#print Function.IsPeriodicPt.add /-
protected theorem add (hn : IsPeriodicPt f n x) (hm : IsPeriodicPt f m x) :
- IsPeriodicPt f (n + m) x := by
- rw [is_periodic_pt, iterate_add]
- exact hn.comp hm
+ IsPeriodicPt f (n + m) x := by rw [is_periodic_pt, iterate_add]; exact hn.comp hm
#align function.is_periodic_pt.add Function.IsPeriodicPt.add
-/
#print Function.IsPeriodicPt.left_of_add /-
theorem left_of_add (hn : IsPeriodicPt f (n + m) x) (hm : IsPeriodicPt f m x) :
- IsPeriodicPt f n x := by
- rw [is_periodic_pt, iterate_add] at hn
- exact hn.left_of_comp hm
+ IsPeriodicPt f n x := by rw [is_periodic_pt, iterate_add] at hn; exact hn.left_of_comp hm
#align function.is_periodic_pt.left_of_add Function.IsPeriodicPt.left_of_add
-/
#print Function.IsPeriodicPt.right_of_add /-
theorem right_of_add (hn : IsPeriodicPt f (n + m) x) (hm : IsPeriodicPt f n x) :
- IsPeriodicPt f m x := by
- rw [add_comm] at hn
- exact hn.left_of_add hm
+ IsPeriodicPt f m x := by rw [add_comm] at hn; exact hn.left_of_add hm
#align function.is_periodic_pt.right_of_add Function.IsPeriodicPt.right_of_add
-/
@@ -182,10 +176,7 @@ protected theorem iterate (hf : IsPeriodicPt f n x) (m : ℕ) : IsPeriodicPt (f^
#print Function.IsPeriodicPt.comp /-
theorem comp {g : α → α} (hco : Commute f g) (hf : IsPeriodicPt f n x) (hg : IsPeriodicPt g n x) :
- IsPeriodicPt (f ∘ g) n x :=
- by
- rw [is_periodic_pt, hco.comp_iterate]
- exact hf.comp hg
+ IsPeriodicPt (f ∘ g) n x := by rw [is_periodic_pt, hco.comp_iterate]; exact hf.comp hg
#align function.is_periodic_pt.comp Function.IsPeriodicPt.comp
-/
@@ -390,11 +381,8 @@ theorem iterate_minimalPeriod : (f^[minimalPeriod f x]) x = x :=
#print Function.iterate_add_minimalPeriod_eq /-
@[simp]
-theorem iterate_add_minimalPeriod_eq : (f^[n + minimalPeriod f x]) x = (f^[n]) x :=
- by
- rw [iterate_add_apply]
- congr
- exact is_periodic_pt_minimal_period f x
+theorem iterate_add_minimalPeriod_eq : (f^[n + minimalPeriod f x]) x = (f^[n]) x := by
+ rw [iterate_add_apply]; congr ; exact is_periodic_pt_minimal_period f x
#align function.iterate_add_minimal_period_eq Function.iterate_add_minimalPeriod_eq
-/
@@ -682,9 +670,7 @@ theorem periodicOrbit_length : (periodicOrbit f x).length = minimalPeriod f x :=
#print Function.periodicOrbit_eq_nil_iff_not_periodic_pt /-
@[simp]
theorem periodicOrbit_eq_nil_iff_not_periodic_pt :
- periodicOrbit f x = Cycle.nil ↔ x ∉ periodicPts f :=
- by
- simp [periodic_orbit]
+ periodicOrbit f x = Cycle.nil ↔ x ∉ periodicPts f := by simp [periodic_orbit];
exact minimal_period_eq_zero_iff_nmem_periodic_pts
#align function.periodic_orbit_eq_nil_iff_not_periodic_pt Function.periodicOrbit_eq_nil_iff_not_periodic_pt
-/
mathlib commit https://github.com/leanprover-community/mathlib/commit/917c3c072e487b3cccdbfeff17e75b40e45f66cb
@@ -630,7 +630,6 @@ private theorem minimal_period_iterate_eq_div_gcd_aux (h : 0 < gcd (minimalPerio
apply is_periodic_pt.minimal_period_dvd
rw [is_periodic_pt, is_fixed_pt, iterate_mul]
exact is_periodic_pt_minimal_period _ _
-#align function.minimal_period_iterate_eq_div_gcd_aux function.minimal_period_iterate_eq_div_gcd_aux
#print Function.minimalPeriod_iterate_eq_div_gcd /-
theorem minimalPeriod_iterate_eq_div_gcd (h : n ≠ 0) :
mathlib commit https://github.com/leanprover-community/mathlib/commit/e3fb84046afd187b710170887195d50bada934ee
@@ -334,16 +334,16 @@ theorem bUnion_ptsOfPeriod : (⋃ n > 0, ptsOfPeriod f n) = periodicPts f :=
#align function.bUnion_pts_of_period Function.bUnion_ptsOfPeriod
-/
-#print Function.unionᵢ_pNat_ptsOfPeriod /-
-theorem unionᵢ_pNat_ptsOfPeriod : (⋃ n : ℕ+, ptsOfPeriod f n) = periodicPts f :=
- supᵢ_subtype.trans <| bUnion_ptsOfPeriod f
-#align function.Union_pnat_pts_of_period Function.unionᵢ_pNat_ptsOfPeriod
+#print Function.iUnion_pNat_ptsOfPeriod /-
+theorem iUnion_pNat_ptsOfPeriod : (⋃ n : ℕ+, ptsOfPeriod f n) = periodicPts f :=
+ iSup_subtype.trans <| bUnion_ptsOfPeriod f
+#align function.Union_pnat_pts_of_period Function.iUnion_pNat_ptsOfPeriod
-/
#print Function.bijOn_periodicPts /-
theorem bijOn_periodicPts : BijOn f (periodicPts f) (periodicPts f) :=
- unionᵢ_pNat_ptsOfPeriod f ▸
- bijOn_unionᵢ_of_directed (directed_ptsOfPeriod_pNat f) fun i => bijOn_ptsOfPeriod f i.Pos
+ iUnion_pNat_ptsOfPeriod f ▸
+ bijOn_iUnion_of_directed (directed_ptsOfPeriod_pNat f) fun i => bijOn_ptsOfPeriod f i.Pos
#align function.bij_on_periodic_pts Function.bijOn_periodicPts
-/
mathlib commit https://github.com/leanprover-community/mathlib/commit/36b8aa61ea7c05727161f96a0532897bd72aedab
@@ -811,7 +811,7 @@ theorem pow_smul_eq_iff_minimalPeriod_dvd {n : ℕ} :
lean 3 declaration is
forall {α : Type.{u1}} {β : Type.{u2}} [_inst_1 : Group.{u1} α] [_inst_2 : MulAction.{u1, u2} α β (DivInvMonoid.toMonoid.{u1} α (Group.toDivInvMonoid.{u1} α _inst_1))] {a : α} {b : β} {n : Int}, Iff (Eq.{succ u2} β (SMul.smul.{u1, u2} α β (MulAction.toHasSmul.{u1, u2} α β (DivInvMonoid.toMonoid.{u1} α (Group.toDivInvMonoid.{u1} α _inst_1)) _inst_2) (HPow.hPow.{u1, 0, u1} α Int α (instHPow.{u1, 0} α Int (DivInvMonoid.Pow.{u1} α (Group.toDivInvMonoid.{u1} α _inst_1))) a n) b) b) (Dvd.Dvd.{0} Int (semigroupDvd.{0} Int Int.semigroup) ((fun (a : Type) (b : Type) [self : HasLiftT.{1, 1} a b] => self.0) Nat Int (HasLiftT.mk.{1, 1} Nat Int (CoeTCₓ.coe.{1, 1} Nat Int (coeBase.{1, 1} Nat Int Int.hasCoe))) (Function.minimalPeriod.{u2} β (SMul.smul.{u1, u2} α β (MulAction.toHasSmul.{u1, u2} α β (DivInvMonoid.toMonoid.{u1} α (Group.toDivInvMonoid.{u1} α _inst_1)) _inst_2) a) b)) n)
but is expected to have type
- forall {α : Type.{u1}} {β : Type.{u2}} [_inst_1 : Group.{u1} α] [_inst_2 : MulAction.{u1, u2} α β (DivInvMonoid.toMonoid.{u1} α (Group.toDivInvMonoid.{u1} α _inst_1))] {a : α} {b : β} {n : Int}, Iff (Eq.{succ u2} β (HSMul.hSMul.{u1, u2, u2} α β β (instHSMul.{u1, u2} α β (MulAction.toSMul.{u1, u2} α β (DivInvMonoid.toMonoid.{u1} α (Group.toDivInvMonoid.{u1} α _inst_1)) _inst_2)) (HPow.hPow.{u1, 0, u1} α Int α (instHPow.{u1, 0} α Int (DivInvMonoid.Pow.{u1} α (Group.toDivInvMonoid.{u1} α _inst_1))) a n) b) b) (Dvd.dvd.{0} Int Int.instDvdInt (Nat.cast.{0} Int instNatCastInt (Function.minimalPeriod.{u2} β ((fun (x._@.Mathlib.Dynamics.PeriodicPts._hyg.6836 : α) (x._@.Mathlib.Dynamics.PeriodicPts._hyg.6838 : β) => HSMul.hSMul.{u1, u2, u2} α β β (instHSMul.{u1, u2} α β (MulAction.toSMul.{u1, u2} α β (DivInvMonoid.toMonoid.{u1} α (Group.toDivInvMonoid.{u1} α _inst_1)) _inst_2)) x._@.Mathlib.Dynamics.PeriodicPts._hyg.6836 x._@.Mathlib.Dynamics.PeriodicPts._hyg.6838) a) b)) n)
+ forall {α : Type.{u1}} {β : Type.{u2}} [_inst_1 : Group.{u1} α] [_inst_2 : MulAction.{u1, u2} α β (DivInvMonoid.toMonoid.{u1} α (Group.toDivInvMonoid.{u1} α _inst_1))] {a : α} {b : β} {n : Int}, Iff (Eq.{succ u2} β (HSMul.hSMul.{u1, u2, u2} α β β (instHSMul.{u1, u2} α β (MulAction.toSMul.{u1, u2} α β (DivInvMonoid.toMonoid.{u1} α (Group.toDivInvMonoid.{u1} α _inst_1)) _inst_2)) (HPow.hPow.{u1, 0, u1} α Int α (instHPow.{u1, 0} α Int (DivInvMonoid.Pow.{u1} α (Group.toDivInvMonoid.{u1} α _inst_1))) a n) b) b) (Dvd.dvd.{0} Int Int.instDvdInt (Nat.cast.{0} Int instNatCastInt (Function.minimalPeriod.{u2} β ((fun (x._@.Mathlib.Dynamics.PeriodicPts._hyg.6834 : α) (x._@.Mathlib.Dynamics.PeriodicPts._hyg.6836 : β) => HSMul.hSMul.{u1, u2, u2} α β β (instHSMul.{u1, u2} α β (MulAction.toSMul.{u1, u2} α β (DivInvMonoid.toMonoid.{u1} α (Group.toDivInvMonoid.{u1} α _inst_1)) _inst_2)) x._@.Mathlib.Dynamics.PeriodicPts._hyg.6834 x._@.Mathlib.Dynamics.PeriodicPts._hyg.6836) a) b)) n)
Case conversion may be inaccurate. Consider using '#align mul_action.zpow_smul_eq_iff_minimal_period_dvd MulAction.zpow_smul_eq_iff_minimalPeriod_dvdₓ'. -/
@[to_additive]
theorem zpow_smul_eq_iff_minimalPeriod_dvd {n : ℤ} :
mathlib commit https://github.com/leanprover-community/mathlib/commit/0e2aab2b0d521f060f62a14d2cf2e2c54e8491d6
@@ -504,8 +504,8 @@ theorem minimalPeriod_id : minimalPeriod id x = 1 :=
#align function.minimal_period_id Function.minimalPeriod_id
-/
-#print Function.is_fixed_point_iff_minimalPeriod_eq_one /-
-theorem is_fixed_point_iff_minimalPeriod_eq_one : minimalPeriod f x = 1 ↔ IsFixedPt f x :=
+#print Function.minimalPeriod_eq_one_iff_isFixedPt /-
+theorem minimalPeriod_eq_one_iff_isFixedPt : minimalPeriod f x = 1 ↔ IsFixedPt f x :=
by
refine' ⟨fun h => _, fun h => _⟩
· rw [← iterate_one f]
@@ -516,7 +516,7 @@ theorem is_fixed_point_iff_minimalPeriod_eq_one : minimalPeriod f x = 1 ↔ IsFi
exact
((h.is_periodic_pt 1).minimalPeriod_le Nat.one_pos).antisymm
(Nat.succ_le_of_lt ((h.is_periodic_pt 1).minimalPeriod_pos Nat.one_pos))
-#align function.is_fixed_point_iff_minimal_period_eq_one Function.is_fixed_point_iff_minimalPeriod_eq_one
+#align function.is_fixed_point_iff_minimal_period_eq_one Function.minimalPeriod_eq_one_iff_isFixedPt
-/
#print Function.IsPeriodicPt.eq_zero_of_lt_minimalPeriod /-
@@ -567,7 +567,7 @@ theorem minimalPeriod_eq_minimalPeriod_iff {g : β → β} {y : β} :
theorem minimalPeriod_eq_prime {p : ℕ} [hp : Fact p.Prime] (hper : IsPeriodicPt f p x)
(hfix : ¬IsFixedPt f x) : minimalPeriod f x = p :=
(hp.out.eq_one_or_self_of_dvd _ hper.minimalPeriod_dvd).resolve_left
- (mt is_fixed_point_iff_minimalPeriod_eq_one.1 hfix)
+ (mt minimalPeriod_eq_one_iff_isFixedPt.1 hfix)
#align function.minimal_period_eq_prime Function.minimalPeriod_eq_prime
-/
mathlib commit https://github.com/leanprover-community/mathlib/commit/c9236f47f5b9df573443aa499c0d3968769628b7
@@ -811,7 +811,7 @@ theorem pow_smul_eq_iff_minimalPeriod_dvd {n : ℕ} :
lean 3 declaration is
forall {α : Type.{u1}} {β : Type.{u2}} [_inst_1 : Group.{u1} α] [_inst_2 : MulAction.{u1, u2} α β (DivInvMonoid.toMonoid.{u1} α (Group.toDivInvMonoid.{u1} α _inst_1))] {a : α} {b : β} {n : Int}, Iff (Eq.{succ u2} β (SMul.smul.{u1, u2} α β (MulAction.toHasSmul.{u1, u2} α β (DivInvMonoid.toMonoid.{u1} α (Group.toDivInvMonoid.{u1} α _inst_1)) _inst_2) (HPow.hPow.{u1, 0, u1} α Int α (instHPow.{u1, 0} α Int (DivInvMonoid.Pow.{u1} α (Group.toDivInvMonoid.{u1} α _inst_1))) a n) b) b) (Dvd.Dvd.{0} Int (semigroupDvd.{0} Int Int.semigroup) ((fun (a : Type) (b : Type) [self : HasLiftT.{1, 1} a b] => self.0) Nat Int (HasLiftT.mk.{1, 1} Nat Int (CoeTCₓ.coe.{1, 1} Nat Int (coeBase.{1, 1} Nat Int Int.hasCoe))) (Function.minimalPeriod.{u2} β (SMul.smul.{u1, u2} α β (MulAction.toHasSmul.{u1, u2} α β (DivInvMonoid.toMonoid.{u1} α (Group.toDivInvMonoid.{u1} α _inst_1)) _inst_2) a) b)) n)
but is expected to have type
- forall {α : Type.{u1}} {β : Type.{u2}} [_inst_1 : Group.{u1} α] [_inst_2 : MulAction.{u1, u2} α β (DivInvMonoid.toMonoid.{u1} α (Group.toDivInvMonoid.{u1} α _inst_1))] {a : α} {b : β} {n : Int}, Iff (Eq.{succ u2} β (HSMul.hSMul.{u1, u2, u2} α β β (instHSMul.{u1, u2} α β (MulAction.toSMul.{u1, u2} α β (DivInvMonoid.toMonoid.{u1} α (Group.toDivInvMonoid.{u1} α _inst_1)) _inst_2)) (HPow.hPow.{u1, 0, u1} α Int α (instHPow.{u1, 0} α Int (DivInvMonoid.Pow.{u1} α (Group.toDivInvMonoid.{u1} α _inst_1))) a n) b) b) (Dvd.dvd.{0} Int Int.instDvdInt (Nat.cast.{0} Int instNatCastInt (Function.minimalPeriod.{u2} β ((fun (x._@.Mathlib.Dynamics.PeriodicPts._hyg.6837 : α) (x._@.Mathlib.Dynamics.PeriodicPts._hyg.6839 : β) => HSMul.hSMul.{u1, u2, u2} α β β (instHSMul.{u1, u2} α β (MulAction.toSMul.{u1, u2} α β (DivInvMonoid.toMonoid.{u1} α (Group.toDivInvMonoid.{u1} α _inst_1)) _inst_2)) x._@.Mathlib.Dynamics.PeriodicPts._hyg.6837 x._@.Mathlib.Dynamics.PeriodicPts._hyg.6839) a) b)) n)
+ forall {α : Type.{u1}} {β : Type.{u2}} [_inst_1 : Group.{u1} α] [_inst_2 : MulAction.{u1, u2} α β (DivInvMonoid.toMonoid.{u1} α (Group.toDivInvMonoid.{u1} α _inst_1))] {a : α} {b : β} {n : Int}, Iff (Eq.{succ u2} β (HSMul.hSMul.{u1, u2, u2} α β β (instHSMul.{u1, u2} α β (MulAction.toSMul.{u1, u2} α β (DivInvMonoid.toMonoid.{u1} α (Group.toDivInvMonoid.{u1} α _inst_1)) _inst_2)) (HPow.hPow.{u1, 0, u1} α Int α (instHPow.{u1, 0} α Int (DivInvMonoid.Pow.{u1} α (Group.toDivInvMonoid.{u1} α _inst_1))) a n) b) b) (Dvd.dvd.{0} Int Int.instDvdInt (Nat.cast.{0} Int instNatCastInt (Function.minimalPeriod.{u2} β ((fun (x._@.Mathlib.Dynamics.PeriodicPts._hyg.6836 : α) (x._@.Mathlib.Dynamics.PeriodicPts._hyg.6838 : β) => HSMul.hSMul.{u1, u2, u2} α β β (instHSMul.{u1, u2} α β (MulAction.toSMul.{u1, u2} α β (DivInvMonoid.toMonoid.{u1} α (Group.toDivInvMonoid.{u1} α _inst_1)) _inst_2)) x._@.Mathlib.Dynamics.PeriodicPts._hyg.6836 x._@.Mathlib.Dynamics.PeriodicPts._hyg.6838) a) b)) n)
Case conversion may be inaccurate. Consider using '#align mul_action.zpow_smul_eq_iff_minimal_period_dvd MulAction.zpow_smul_eq_iff_minimalPeriod_dvdₓ'. -/
@[to_additive]
theorem zpow_smul_eq_iff_minimalPeriod_dvd {n : ℤ} :
mathlib commit https://github.com/leanprover-community/mathlib/commit/ce86f4e05e9a9b8da5e316b22c76ce76440c56a1
@@ -702,7 +702,7 @@ theorem periodicOrbit_eq_nil_of_not_periodic_pt (h : x ∉ periodicPts f) :
theorem mem_periodicOrbit_iff (hx : x ∈ periodicPts f) :
y ∈ periodicOrbit f x ↔ ∃ n, (f^[n]) x = y :=
by
- simp only [periodic_orbit, Cycle.mem_coe_iff, List.mem_map', List.mem_range]
+ simp only [periodic_orbit, Cycle.mem_coe_iff, List.mem_map, List.mem_range]
use fun ⟨a, ha, ha'⟩ => ⟨a, ha'⟩
rintro ⟨n, rfl⟩
use n % minimal_period f x, mod_lt _ (minimal_period_pos_of_mem_periodic_pts hx)
mathlib commit https://github.com/leanprover-community/mathlib/commit/da3fc4a33ff6bc75f077f691dc94c217b8d41559
@@ -811,7 +811,7 @@ theorem pow_smul_eq_iff_minimalPeriod_dvd {n : ℕ} :
lean 3 declaration is
forall {α : Type.{u1}} {β : Type.{u2}} [_inst_1 : Group.{u1} α] [_inst_2 : MulAction.{u1, u2} α β (DivInvMonoid.toMonoid.{u1} α (Group.toDivInvMonoid.{u1} α _inst_1))] {a : α} {b : β} {n : Int}, Iff (Eq.{succ u2} β (SMul.smul.{u1, u2} α β (MulAction.toHasSmul.{u1, u2} α β (DivInvMonoid.toMonoid.{u1} α (Group.toDivInvMonoid.{u1} α _inst_1)) _inst_2) (HPow.hPow.{u1, 0, u1} α Int α (instHPow.{u1, 0} α Int (DivInvMonoid.Pow.{u1} α (Group.toDivInvMonoid.{u1} α _inst_1))) a n) b) b) (Dvd.Dvd.{0} Int (semigroupDvd.{0} Int Int.semigroup) ((fun (a : Type) (b : Type) [self : HasLiftT.{1, 1} a b] => self.0) Nat Int (HasLiftT.mk.{1, 1} Nat Int (CoeTCₓ.coe.{1, 1} Nat Int (coeBase.{1, 1} Nat Int Int.hasCoe))) (Function.minimalPeriod.{u2} β (SMul.smul.{u1, u2} α β (MulAction.toHasSmul.{u1, u2} α β (DivInvMonoid.toMonoid.{u1} α (Group.toDivInvMonoid.{u1} α _inst_1)) _inst_2) a) b)) n)
but is expected to have type
- forall {α : Type.{u1}} {β : Type.{u2}} [_inst_1 : Group.{u1} α] [_inst_2 : MulAction.{u1, u2} α β (DivInvMonoid.toMonoid.{u1} α (Group.toDivInvMonoid.{u1} α _inst_1))] {a : α} {b : β} {n : Int}, Iff (Eq.{succ u2} β (HSMul.hSMul.{u1, u2, u2} α β β (instHSMul.{u1, u2} α β (MulAction.toSMul.{u1, u2} α β (DivInvMonoid.toMonoid.{u1} α (Group.toDivInvMonoid.{u1} α _inst_1)) _inst_2)) (HPow.hPow.{u1, 0, u1} α Int α (instHPow.{u1, 0} α Int (DivInvMonoid.Pow.{u1} α (Group.toDivInvMonoid.{u1} α _inst_1))) a n) b) b) (Dvd.dvd.{0} Int Int.instDvdInt (Nat.cast.{0} Int Int.instNatCastInt (Function.minimalPeriod.{u2} β ((fun (x._@.Mathlib.Dynamics.PeriodicPts._hyg.6837 : α) (x._@.Mathlib.Dynamics.PeriodicPts._hyg.6839 : β) => HSMul.hSMul.{u1, u2, u2} α β β (instHSMul.{u1, u2} α β (MulAction.toSMul.{u1, u2} α β (DivInvMonoid.toMonoid.{u1} α (Group.toDivInvMonoid.{u1} α _inst_1)) _inst_2)) x._@.Mathlib.Dynamics.PeriodicPts._hyg.6837 x._@.Mathlib.Dynamics.PeriodicPts._hyg.6839) a) b)) n)
+ forall {α : Type.{u1}} {β : Type.{u2}} [_inst_1 : Group.{u1} α] [_inst_2 : MulAction.{u1, u2} α β (DivInvMonoid.toMonoid.{u1} α (Group.toDivInvMonoid.{u1} α _inst_1))] {a : α} {b : β} {n : Int}, Iff (Eq.{succ u2} β (HSMul.hSMul.{u1, u2, u2} α β β (instHSMul.{u1, u2} α β (MulAction.toSMul.{u1, u2} α β (DivInvMonoid.toMonoid.{u1} α (Group.toDivInvMonoid.{u1} α _inst_1)) _inst_2)) (HPow.hPow.{u1, 0, u1} α Int α (instHPow.{u1, 0} α Int (DivInvMonoid.Pow.{u1} α (Group.toDivInvMonoid.{u1} α _inst_1))) a n) b) b) (Dvd.dvd.{0} Int Int.instDvdInt (Nat.cast.{0} Int instNatCastInt (Function.minimalPeriod.{u2} β ((fun (x._@.Mathlib.Dynamics.PeriodicPts._hyg.6837 : α) (x._@.Mathlib.Dynamics.PeriodicPts._hyg.6839 : β) => HSMul.hSMul.{u1, u2, u2} α β β (instHSMul.{u1, u2} α β (MulAction.toSMul.{u1, u2} α β (DivInvMonoid.toMonoid.{u1} α (Group.toDivInvMonoid.{u1} α _inst_1)) _inst_2)) x._@.Mathlib.Dynamics.PeriodicPts._hyg.6837 x._@.Mathlib.Dynamics.PeriodicPts._hyg.6839) a) b)) n)
Case conversion may be inaccurate. Consider using '#align mul_action.zpow_smul_eq_iff_minimal_period_dvd MulAction.zpow_smul_eq_iff_minimalPeriod_dvdₓ'. -/
@[to_additive]
theorem zpow_smul_eq_iff_minimalPeriod_dvd {n : ℤ} :
mathlib commit https://github.com/leanprover-community/mathlib/commit/ce7e9d53d4bbc38065db3b595cd5bd73c323bc1d
@@ -318,7 +318,7 @@ theorem isPeriodicPt_of_mem_periodicPts_of_isPeriodicPt_iterate (hx : x ∈ peri
(hm : IsPeriodicPt f m ((f^[n]) x)) : IsPeriodicPt f m x :=
by
rcases hx with ⟨r, hr, hr'⟩
- convert (hm.apply_iterate ((n / r + 1) * r - n)).Eq
+ convert(hm.apply_iterate ((n / r + 1) * r - n)).Eq
suffices n ≤ (n / r + 1) * r by
rw [← iterate_add_apply, Nat.sub_add_cancel this, iterate_mul, (hr'.iterate _).Eq]
rw [add_mul, one_mul]
@@ -811,7 +811,7 @@ theorem pow_smul_eq_iff_minimalPeriod_dvd {n : ℕ} :
lean 3 declaration is
forall {α : Type.{u1}} {β : Type.{u2}} [_inst_1 : Group.{u1} α] [_inst_2 : MulAction.{u1, u2} α β (DivInvMonoid.toMonoid.{u1} α (Group.toDivInvMonoid.{u1} α _inst_1))] {a : α} {b : β} {n : Int}, Iff (Eq.{succ u2} β (SMul.smul.{u1, u2} α β (MulAction.toHasSmul.{u1, u2} α β (DivInvMonoid.toMonoid.{u1} α (Group.toDivInvMonoid.{u1} α _inst_1)) _inst_2) (HPow.hPow.{u1, 0, u1} α Int α (instHPow.{u1, 0} α Int (DivInvMonoid.Pow.{u1} α (Group.toDivInvMonoid.{u1} α _inst_1))) a n) b) b) (Dvd.Dvd.{0} Int (semigroupDvd.{0} Int Int.semigroup) ((fun (a : Type) (b : Type) [self : HasLiftT.{1, 1} a b] => self.0) Nat Int (HasLiftT.mk.{1, 1} Nat Int (CoeTCₓ.coe.{1, 1} Nat Int (coeBase.{1, 1} Nat Int Int.hasCoe))) (Function.minimalPeriod.{u2} β (SMul.smul.{u1, u2} α β (MulAction.toHasSmul.{u1, u2} α β (DivInvMonoid.toMonoid.{u1} α (Group.toDivInvMonoid.{u1} α _inst_1)) _inst_2) a) b)) n)
but is expected to have type
- forall {α : Type.{u1}} {β : Type.{u2}} [_inst_1 : Group.{u1} α] [_inst_2 : MulAction.{u1, u2} α β (DivInvMonoid.toMonoid.{u1} α (Group.toDivInvMonoid.{u1} α _inst_1))] {a : α} {b : β} {n : Int}, Iff (Eq.{succ u2} β (HSMul.hSMul.{u1, u2, u2} α β β (instHSMul.{u1, u2} α β (MulAction.toSMul.{u1, u2} α β (DivInvMonoid.toMonoid.{u1} α (Group.toDivInvMonoid.{u1} α _inst_1)) _inst_2)) (HPow.hPow.{u1, 0, u1} α Int α (instHPow.{u1, 0} α Int (DivInvMonoid.Pow.{u1} α (Group.toDivInvMonoid.{u1} α _inst_1))) a n) b) b) (Dvd.dvd.{0} Int Int.instDvdInt (Nat.cast.{0} Int Int.instNatCastInt (Function.minimalPeriod.{u2} β ((fun (x._@.Mathlib.Dynamics.PeriodicPts._hyg.6698 : α) (x._@.Mathlib.Dynamics.PeriodicPts._hyg.6700 : β) => HSMul.hSMul.{u1, u2, u2} α β β (instHSMul.{u1, u2} α β (MulAction.toSMul.{u1, u2} α β (DivInvMonoid.toMonoid.{u1} α (Group.toDivInvMonoid.{u1} α _inst_1)) _inst_2)) x._@.Mathlib.Dynamics.PeriodicPts._hyg.6698 x._@.Mathlib.Dynamics.PeriodicPts._hyg.6700) a) b)) n)
+ forall {α : Type.{u1}} {β : Type.{u2}} [_inst_1 : Group.{u1} α] [_inst_2 : MulAction.{u1, u2} α β (DivInvMonoid.toMonoid.{u1} α (Group.toDivInvMonoid.{u1} α _inst_1))] {a : α} {b : β} {n : Int}, Iff (Eq.{succ u2} β (HSMul.hSMul.{u1, u2, u2} α β β (instHSMul.{u1, u2} α β (MulAction.toSMul.{u1, u2} α β (DivInvMonoid.toMonoid.{u1} α (Group.toDivInvMonoid.{u1} α _inst_1)) _inst_2)) (HPow.hPow.{u1, 0, u1} α Int α (instHPow.{u1, 0} α Int (DivInvMonoid.Pow.{u1} α (Group.toDivInvMonoid.{u1} α _inst_1))) a n) b) b) (Dvd.dvd.{0} Int Int.instDvdInt (Nat.cast.{0} Int Int.instNatCastInt (Function.minimalPeriod.{u2} β ((fun (x._@.Mathlib.Dynamics.PeriodicPts._hyg.6837 : α) (x._@.Mathlib.Dynamics.PeriodicPts._hyg.6839 : β) => HSMul.hSMul.{u1, u2, u2} α β β (instHSMul.{u1, u2} α β (MulAction.toSMul.{u1, u2} α β (DivInvMonoid.toMonoid.{u1} α (Group.toDivInvMonoid.{u1} α _inst_1)) _inst_2)) x._@.Mathlib.Dynamics.PeriodicPts._hyg.6837 x._@.Mathlib.Dynamics.PeriodicPts._hyg.6839) a) b)) n)
Case conversion may be inaccurate. Consider using '#align mul_action.zpow_smul_eq_iff_minimal_period_dvd MulAction.zpow_smul_eq_iff_minimalPeriod_dvdₓ'. -/
@[to_additive]
theorem zpow_smul_eq_iff_minimalPeriod_dvd {n : ℤ} :
mathlib commit https://github.com/leanprover-community/mathlib/commit/bd9851ca476957ea4549eb19b40e7b5ade9428cc
@@ -542,15 +542,11 @@ theorem nodup_periodicOrbit : (periodicOrbit f x).Nodup := by
rwa [iterate_eq_iterate_iff_of_lt_minimalPeriod hm hn] at hmn
#align function.nodup_periodic_orbit Function.nodup_periodicOrbit
-set_option linter.deprecated false in
theorem periodicOrbit_apply_iterate_eq (hx : x ∈ periodicPts f) (n : ℕ) :
periodicOrbit f (f^[n] x) = periodicOrbit f x :=
- Eq.symm <|
- Cycle.coe_eq_coe.2 <|
- ⟨n, by
- apply List.ext_nthLe _ fun m _ _ => _
- · simp [minimalPeriod_apply_iterate hx]
- · simp [List.nthLe_rotate, iterate_add_apply]⟩
+ Eq.symm <| Cycle.coe_eq_coe.2 <| .intro n <|
+ List.ext_get (by simp [minimalPeriod_apply_iterate hx]) fun m _ _ ↦ by
+ simp [List.get_rotate, iterate_add_apply]
#align function.periodic_orbit_apply_iterate_eq Function.periodicOrbit_apply_iterate_eq
theorem periodicOrbit_apply_eq (hx : x ∈ periodicPts f) :
coe_nat
to natCast
(#11637)
Reduce the diff of #11499
All in the Int
namespace:
ofNat_eq_cast
→ ofNat_eq_natCast
cast_eq_cast_iff_Nat
→ natCast_inj
natCast_eq_ofNat
→ ofNat_eq_natCast
coe_nat_sub
→ natCast_sub
coe_nat_nonneg
→ natCast_nonneg
sign_coe_add_one
→ sign_natCast_add_one
nat_succ_eq_int_succ
→ natCast_succ
succ_neg_nat_succ
→ succ_neg_natCast_succ
coe_pred_of_pos
→ natCast_pred_of_pos
coe_nat_div
→ natCast_div
coe_nat_ediv
→ natCast_ediv
sign_coe_nat_of_nonzero
→ sign_natCast_of_ne_zero
toNat_coe_nat
→ toNat_natCast
toNat_coe_nat_add_one
→ toNat_natCast_add_one
coe_nat_dvd
→ natCast_dvd_natCast
coe_nat_dvd_left
→ natCast_dvd
coe_nat_dvd_right
→ dvd_natCast
le_coe_nat_sub
→ le_natCast_sub
succ_coe_nat_pos
→ succ_natCast_pos
coe_nat_modEq_iff
→ natCast_modEq_iff
coe_natAbs
→ natCast_natAbs
coe_nat_eq_zero
→ natCast_eq_zero
coe_nat_ne_zero
→ natCast_ne_zero
coe_nat_ne_zero_iff_pos
→ natCast_ne_zero_iff_pos
abs_coe_nat
→ abs_natCast
coe_nat_nonpos_iff
→ natCast_nonpos_iff
Also rename Nat.coe_nat_dvd
to Nat.cast_dvd_cast
@@ -676,9 +676,9 @@ theorem pow_smul_eq_iff_period_dvd {n : ℕ} {m : M} {a : α} :
theorem zpow_smul_eq_iff_period_dvd {j : ℤ} {g : G} {a : α} :
g ^ j • a = a ↔ (period g a : ℤ) ∣ j := by
rcases j with n | n
- · rw [Int.ofNat_eq_coe, zpow_natCast, Int.coe_nat_dvd, pow_smul_eq_iff_period_dvd]
- · rw [Int.negSucc_coe, zpow_neg, zpow_natCast, inv_smul_eq_iff, eq_comm, dvd_neg, Int.coe_nat_dvd,
- pow_smul_eq_iff_period_dvd]
+ · rw [Int.ofNat_eq_coe, zpow_natCast, Int.natCast_dvd_natCast, pow_smul_eq_iff_period_dvd]
+ · rw [Int.negSucc_coe, zpow_neg, zpow_natCast, inv_smul_eq_iff, eq_comm, dvd_neg,
+ Int.natCast_dvd_natCast, pow_smul_eq_iff_period_dvd]
@[to_additive (attr := simp)]
theorem pow_mod_period_smul (n : ℕ) {m : M} {a : α} :
zpow_coe_nat
to zpow_natCast
(#11528)
... and add a deprecated alias for the old name. This is mostly just me discovering the power of F2
@@ -676,8 +676,8 @@ theorem pow_smul_eq_iff_period_dvd {n : ℕ} {m : M} {a : α} :
theorem zpow_smul_eq_iff_period_dvd {j : ℤ} {g : G} {a : α} :
g ^ j • a = a ↔ (period g a : ℤ) ∣ j := by
rcases j with n | n
- · rw [Int.ofNat_eq_coe, zpow_coe_nat, Int.coe_nat_dvd, pow_smul_eq_iff_period_dvd]
- · rw [Int.negSucc_coe, zpow_neg, zpow_coe_nat, inv_smul_eq_iff, eq_comm, dvd_neg, Int.coe_nat_dvd,
+ · rw [Int.ofNat_eq_coe, zpow_natCast, Int.coe_nat_dvd, pow_smul_eq_iff_period_dvd]
+ · rw [Int.negSucc_coe, zpow_neg, zpow_natCast, inv_smul_eq_iff, eq_comm, dvd_neg, Int.coe_nat_dvd,
pow_smul_eq_iff_period_dvd]
@[to_additive (attr := simp)]
open Classical
(#11199)
We remove all but one open Classical
s, instead preferring to use open scoped Classical
. The only real side-effect this led to is moving a couple declarations to use Exists.choose
instead of Classical.choose
.
The first few commits are explicitly labelled regex replaces for ease of review.
@@ -265,7 +265,7 @@ theorem Semiconj.mapsTo_periodicPts {g : α → β} (h : Semiconj g fa fb) :
MapsTo g (periodicPts fa) (periodicPts fb) := fun _ ⟨n, hn, hx⟩ => ⟨n, hn, hx.map h⟩
#align function.semiconj.maps_to_periodic_pts Function.Semiconj.mapsTo_periodicPts
-open Classical
+open scoped Classical
noncomputable section
Homogenises porting notes via capitalisation and addition of whitespace.
It makes the following changes:
@@ -236,7 +236,7 @@ theorem isPeriodicPt_of_mem_periodicPts_of_isPeriodicPt_iterate (hx : x ∈ peri
(hm : IsPeriodicPt f m (f^[n] x)) : IsPeriodicPt f m x := by
rcases hx with ⟨r, hr, hr'⟩
suffices n ≤ (n / r + 1) * r by
- -- porting note: convert used to unfold IsPeriodicPt
+ -- Porting note: convert used to unfold IsPeriodicPt
change _ = _
convert (hm.apply_iterate ((n / r + 1) * r - n)).eq <;>
rw [← iterate_add_apply, Nat.sub_add_cancel this, iterate_mul, (hr'.iterate _).eq]
zpow_ofNat
and ofNat_zsmul
(#10969)
Previously these were syntactically identical to the corresponding zpow_coe_nat
and coe_nat_zsmul
lemmas, now they are about OfNat.ofNat
.
Unfortunately, almost every call site uses the ofNat
name to refer to Nat.cast
, so the downstream proofs had to be adjusted too.
@@ -676,8 +676,8 @@ theorem pow_smul_eq_iff_period_dvd {n : ℕ} {m : M} {a : α} :
theorem zpow_smul_eq_iff_period_dvd {j : ℤ} {g : G} {a : α} :
g ^ j • a = a ↔ (period g a : ℤ) ∣ j := by
rcases j with n | n
- · rw [Int.ofNat_eq_coe, zpow_ofNat, Int.coe_nat_dvd, pow_smul_eq_iff_period_dvd]
- · rw [Int.negSucc_coe, zpow_neg, zpow_ofNat, inv_smul_eq_iff, eq_comm, dvd_neg, Int.coe_nat_dvd,
+ · rw [Int.ofNat_eq_coe, zpow_coe_nat, Int.coe_nat_dvd, pow_smul_eq_iff_period_dvd]
+ · rw [Int.negSucc_coe, zpow_neg, zpow_coe_nat, inv_smul_eq_iff, eq_comm, dvd_neg, Int.coe_nat_dvd,
pow_smul_eq_iff_period_dvd]
@[to_additive (attr := simp)]
Defines MulAction.period g a
as a wrapper around Function.minimalPeriod (fun x => g • x) a
,
allowing for some cleaner proofs involving the period of a group action.
The existing MulAction.*_minimalPeriod_*
lemmas are changed to be defined using their now-preferred MulAction.*_period_*
counterparts,
although they will only be made deprecated in another pull request.
The Mathlib.GroupTheory.GroupAction.Period
module is also created, for additional lemmas around MulAction.period
.
Some core lemmas need to remain in Mathlib.Dynamics.PeriodicPts
, as they are needed for ZMod
and the quotient group.
@@ -27,6 +27,8 @@ A point `x : α` is a periodic point of `f : α → α` of period `n` if `f^[n]
* `minimalPeriod f x` : the minimal period of a point `x` under an endomorphism `f` or zero
if `x` is not a periodic point of `f`.
* `orbit f x`: the cycle `[x, f x, f (f x), ...]` for a periodic point.
+* `MulAction.period g x` : the minimal period of a point `x` under the multiplicative action of `g`;
+ an equivalent `AddAction.period g x` is defined for additive actions.
## Main statements
@@ -628,22 +630,101 @@ namespace MulAction
open Function
-variable {α β : Type*} [Group α] [MulAction α β] {a : α} {b : β}
+universe u v
+variable {α : Type v}
+variable {G : Type u} [Group G] [MulAction G α]
+variable {M : Type u} [Monoid M] [MulAction M α]
+
+/--
+The period of a multiplicative action of `g` on `a` is the smallest positive `n` such that
+`g ^ n • a = a`, or `0` if such an `n` does not exist.
+-/
+@[to_additive "The period of an additive action of `g` on `a` is the smallest positive `n`
+such that `(n • g) +ᵥ a = a`, or `0` if such an `n` does not exist."]
+noncomputable def period (m : M) (a : α) : ℕ := minimalPeriod (fun x => m • x) a
+
+/-- `MulAction.period m a` is definitionally equal to `Function.minimalPeriod (m • ·) a`. -/
+@[to_additive "`AddAction.period m a` is definitionally equal to
+`Function.minimalPeriod (m +ᵥ ·) a`"]
+theorem period_eq_minimalPeriod {m : M} {a : α} :
+ MulAction.period m a = minimalPeriod (fun x => m • x) a := rfl
+
+/-- `m ^ (period m a)` fixes `a`. -/
+@[to_additive (attr := simp) "`(period m a) • m` fixes `a`."]
+theorem pow_period_smul (m : M) (a : α) : m ^ (period m a) • a = a := by
+ rw [period_eq_minimalPeriod, ← smul_iterate_apply, iterate_minimalPeriod]
+
+@[to_additive]
+lemma isPeriodicPt_smul_iff {m : M} {a : α} {n : ℕ} :
+ IsPeriodicPt (m • ·) n a ↔ m ^ n • a = a := by
+ rw [← smul_iterate_apply, IsPeriodicPt, IsFixedPt]
+
+/-! ### Multiples of `MulAction.period`
+
+It is easy to convince oneself that if `g ^ n • a = a` (resp. `(n • g) +ᵥ a = a`),
+then `n` must be a multiple of `period g a`.
+
+This also holds for negative powers/multiples.
+-/
+
+@[to_additive]
+theorem pow_smul_eq_iff_period_dvd {n : ℕ} {m : M} {a : α} :
+ m ^ n • a = a ↔ period m a ∣ n := by
+ rw [period_eq_minimalPeriod, ← isPeriodicPt_iff_minimalPeriod_dvd, isPeriodicPt_smul_iff]
+
+@[to_additive]
+theorem zpow_smul_eq_iff_period_dvd {j : ℤ} {g : G} {a : α} :
+ g ^ j • a = a ↔ (period g a : ℤ) ∣ j := by
+ rcases j with n | n
+ · rw [Int.ofNat_eq_coe, zpow_ofNat, Int.coe_nat_dvd, pow_smul_eq_iff_period_dvd]
+ · rw [Int.negSucc_coe, zpow_neg, zpow_ofNat, inv_smul_eq_iff, eq_comm, dvd_neg, Int.coe_nat_dvd,
+ pow_smul_eq_iff_period_dvd]
+
+@[to_additive (attr := simp)]
+theorem pow_mod_period_smul (n : ℕ) {m : M} {a : α} :
+ m ^ (n % period m a) • a = m ^ n • a := by
+ conv_rhs => rw [← Nat.mod_add_div n (period m a), pow_add, mul_smul,
+ pow_smul_eq_iff_period_dvd.mpr (dvd_mul_right _ _)]
+
+@[to_additive (attr := simp)]
+theorem zpow_mod_period_smul (j : ℤ) {g : G} {a : α} :
+ g ^ (j % (period g a : ℤ)) • a = g ^ j • a := by
+ conv_rhs => rw [← Int.emod_add_ediv j (period g a), zpow_add, mul_smul,
+ zpow_smul_eq_iff_period_dvd.mpr (dvd_mul_right _ _)]
+
+@[to_additive (attr := simp)]
+theorem pow_add_period_smul (n : ℕ) (m : M) (a : α) :
+ m ^ (n + period m a) • a = m ^ n • a := by
+ rw [← pow_mod_period_smul, Nat.add_mod_right, pow_mod_period_smul]
+
+@[to_additive (attr := simp)]
+theorem pow_period_add_smul (n : ℕ) (m : M) (a : α) :
+ m ^ (period m a + n) • a = m ^ n • a := by
+ rw [← pow_mod_period_smul, Nat.add_mod_left, pow_mod_period_smul]
+
+@[to_additive (attr := simp)]
+theorem zpow_add_period_smul (i : ℤ) (g : G) (a : α) :
+ g ^ (i + period g a) • a = g ^ i • a := by
+ rw [← zpow_mod_period_smul, Int.add_emod_self, zpow_mod_period_smul]
+
+@[to_additive (attr := simp)]
+theorem zpow_period_add_smul (i : ℤ) (g : G) (a : α) :
+ g ^ (period g a + i) • a = g ^ i • a := by
+ rw [← zpow_mod_period_smul, Int.add_emod_self_left, zpow_mod_period_smul]
+
+variable {a : G} {b : α}
@[to_additive]
theorem pow_smul_eq_iff_minimalPeriod_dvd {n : ℕ} :
- a ^ n • b = b ↔ Function.minimalPeriod (a • ·) b ∣ n := by
- rw [← isPeriodicPt_iff_minimalPeriod_dvd, IsPeriodicPt, IsFixedPt, smul_iterate]
+ a ^ n • b = b ↔ minimalPeriod (a • ·) b ∣ n := by
+ rw [← period_eq_minimalPeriod, pow_smul_eq_iff_period_dvd]
#align mul_action.pow_smul_eq_iff_minimal_period_dvd MulAction.pow_smul_eq_iff_minimalPeriod_dvd
#align add_action.nsmul_vadd_eq_iff_minimal_period_dvd AddAction.nsmul_vadd_eq_iff_minimalPeriod_dvd
@[to_additive]
theorem zpow_smul_eq_iff_minimalPeriod_dvd {n : ℤ} :
- a ^ n • b = b ↔ (Function.minimalPeriod (a • ·) b : ℤ) ∣ n := by
- cases n
- · rw [Int.ofNat_eq_coe, zpow_ofNat, Int.coe_nat_dvd, pow_smul_eq_iff_minimalPeriod_dvd]
- · rw [Int.negSucc_coe, zpow_neg, zpow_ofNat, inv_smul_eq_iff, eq_comm, dvd_neg, Int.coe_nat_dvd,
- pow_smul_eq_iff_minimalPeriod_dvd]
+ a ^ n • b = b ↔ (minimalPeriod (a • ·) b : ℤ) ∣ n := by
+ rw [← period_eq_minimalPeriod, zpow_smul_eq_iff_period_dvd]
#align mul_action.zpow_smul_eq_iff_minimal_period_dvd MulAction.zpow_smul_eq_iff_minimalPeriod_dvd
#align add_action.zsmul_vadd_eq_iff_minimal_period_dvd AddAction.zsmul_vadd_eq_iff_minimalPeriod_dvd
@@ -651,19 +732,15 @@ variable (a b)
@[to_additive (attr := simp)]
theorem pow_smul_mod_minimalPeriod (n : ℕ) :
- a ^ (n % Function.minimalPeriod (a • ·) b) • b = a ^ n • b := by
- conv_rhs =>
- rw [← Nat.mod_add_div n (minimalPeriod (a • ·) b), pow_add, mul_smul,
- pow_smul_eq_iff_minimalPeriod_dvd.mpr (dvd_mul_right _ _)]
+ a ^ (n % minimalPeriod (a • ·) b) • b = a ^ n • b := by
+ rw [← period_eq_minimalPeriod, pow_mod_period_smul]
#align mul_action.pow_smul_mod_minimal_period MulAction.pow_smul_mod_minimalPeriod
#align add_action.nsmul_vadd_mod_minimal_period AddAction.nsmul_vadd_mod_minimalPeriod
@[to_additive (attr := simp)]
theorem zpow_smul_mod_minimalPeriod (n : ℤ) :
- a ^ (n % (Function.minimalPeriod (a • ·) b : ℤ)) • b = a ^ n • b := by
- conv_rhs =>
- rw [← Int.emod_add_ediv n (minimalPeriod ((a • ·)) b), zpow_add, mul_smul,
- zpow_smul_eq_iff_minimalPeriod_dvd.mpr (dvd_mul_right _ _)]
+ a ^ (n % (minimalPeriod (a • ·) b : ℤ)) • b = a ^ n • b := by
+ rw [← period_eq_minimalPeriod, zpow_mod_period_smul]
#align mul_action.zpow_smul_mod_minimal_period MulAction.zpow_smul_mod_minimalPeriod
#align add_action.zsmul_vadd_mod_minimal_period AddAction.zsmul_vadd_mod_minimalPeriod
@@ -564,7 +564,7 @@ theorem periodicOrbit_chain (r : α → α → Prop) {f : α → α} {x : α} :
rw [periodicOrbit, ← Cycle.map_coe, Cycle.chain_map, ← hM, Cycle.chain_range_succ]
refine' ⟨_, fun H => ⟨_, fun m hm => H _ (hm.trans (Nat.lt_succ_self _))⟩⟩
· rintro ⟨hr, H⟩ n hn
- cases' eq_or_lt_of_le (lt_succ_iff.1 hn) with hM' hM'
+ cases' eq_or_lt_of_le (Nat.lt_succ_iff.1 hn) with hM' hM'
· rwa [hM', hM, iterate_minimalPeriod]
· exact H _ hM'
· rw [iterate_zero_apply]
$
with <|
(#9319)
See Zulip thread for the discussion.
@@ -353,7 +353,7 @@ theorem le_of_lt_minimalPeriod_of_iterate_eq {m n : ℕ} (hm : m < minimalPeriod
hm
#align function.le_of_lt_minimal_period_of_iterate_eq Function.le_of_lt_minimalPeriod_of_iterate_eq
-theorem iterate_injOn_Iio_minimalPeriod : (Iio $ minimalPeriod f x).InjOn (f^[·] x) :=
+theorem iterate_injOn_Iio_minimalPeriod : (Iio <| minimalPeriod f x).InjOn (f^[·] x) :=
fun _m hm _n hn hmn ↦ (le_of_lt_minimalPeriod_of_iterate_eq hm hmn).antisymm
(le_of_lt_minimalPeriod_of_iterate_eq hn hmn.symm)
#align function.eq_of_lt_minimal_period_of_iterate_eq Function.iterate_injOn_Iio_minimalPeriod
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
.
@@ -114,7 +114,7 @@ theorem right_of_add (hn : IsPeriodicPt f (n + m) x) (hm : IsPeriodicPt f n x) :
protected theorem sub (hm : IsPeriodicPt f m x) (hn : IsPeriodicPt f n x) :
IsPeriodicPt f (m - n) x := by
- cases' le_total n m with h h
+ rcases le_total n m with h | h
· refine' left_of_add _ hn
rwa [tsub_add_cancel_of_le h]
· rw [tsub_eq_zero_iff_le.mpr h]
(· op ·) a
by (a op ·)
(#8843)
I used the regex \(\(· (.) ·\) (.)\)
, replacing with ($2 $1 ·)
.
@@ -632,14 +632,14 @@ variable {α β : Type*} [Group α] [MulAction α β] {a : α} {b : β}
@[to_additive]
theorem pow_smul_eq_iff_minimalPeriod_dvd {n : ℕ} :
- a ^ n • b = b ↔ Function.minimalPeriod ((· • ·) a) b ∣ n := by
+ a ^ n • b = b ↔ Function.minimalPeriod (a • ·) b ∣ n := by
rw [← isPeriodicPt_iff_minimalPeriod_dvd, IsPeriodicPt, IsFixedPt, smul_iterate]
#align mul_action.pow_smul_eq_iff_minimal_period_dvd MulAction.pow_smul_eq_iff_minimalPeriod_dvd
#align add_action.nsmul_vadd_eq_iff_minimal_period_dvd AddAction.nsmul_vadd_eq_iff_minimalPeriod_dvd
@[to_additive]
theorem zpow_smul_eq_iff_minimalPeriod_dvd {n : ℤ} :
- a ^ n • b = b ↔ (Function.minimalPeriod ((· • ·) a) b : ℤ) ∣ n := by
+ a ^ n • b = b ↔ (Function.minimalPeriod (a • ·) b : ℤ) ∣ n := by
cases n
· rw [Int.ofNat_eq_coe, zpow_ofNat, Int.coe_nat_dvd, pow_smul_eq_iff_minimalPeriod_dvd]
· rw [Int.negSucc_coe, zpow_neg, zpow_ofNat, inv_smul_eq_iff, eq_comm, dvd_neg, Int.coe_nat_dvd,
@@ -651,16 +651,16 @@ variable (a b)
@[to_additive (attr := simp)]
theorem pow_smul_mod_minimalPeriod (n : ℕ) :
- a ^ (n % Function.minimalPeriod ((· • ·) a) b) • b = a ^ n • b := by
+ a ^ (n % Function.minimalPeriod (a • ·) b) • b = a ^ n • b := by
conv_rhs =>
- rw [← Nat.mod_add_div n (minimalPeriod ((· • ·) a) b), pow_add, mul_smul,
+ rw [← Nat.mod_add_div n (minimalPeriod (a • ·) b), pow_add, mul_smul,
pow_smul_eq_iff_minimalPeriod_dvd.mpr (dvd_mul_right _ _)]
#align mul_action.pow_smul_mod_minimal_period MulAction.pow_smul_mod_minimalPeriod
#align add_action.nsmul_vadd_mod_minimal_period AddAction.nsmul_vadd_mod_minimalPeriod
@[to_additive (attr := simp)]
theorem zpow_smul_mod_minimalPeriod (n : ℤ) :
- a ^ (n % (Function.minimalPeriod ((· • ·) a) b : ℤ)) • b = a ^ n • b := by
+ a ^ (n % (Function.minimalPeriod (a • ·) b : ℤ)) • b = a ^ n • b := by
conv_rhs =>
rw [← Int.emod_add_ediv n (minimalPeriod ((a • ·)) b), zpow_add, mul_smul,
zpow_smul_eq_iff_minimalPeriod_dvd.mpr (dvd_mul_right _ _)]
@@ -343,7 +343,7 @@ theorem minimalPeriod_apply (hx : x ∈ periodicPts f) : minimalPeriod f (f x) =
theorem le_of_lt_minimalPeriod_of_iterate_eq {m n : ℕ} (hm : m < minimalPeriod f x)
(hmn : f^[m] x = f^[n] x) : m ≤ n := by
- by_contra' hmn'
+ by_contra! hmn'
rw [← Nat.add_sub_of_le hmn'.le, add_comm, iterate_add_apply] at hmn
exact
((IsPeriodicPt.minimalPeriod_le (tsub_pos_of_lt hmn')
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.
Function.eq_of_lt_minimalPeriod_of_iterate_eq
→ Function.iterate_injOn_Iio_minimalPeriod
Function.eq_iff_lt_minimalPeriod_of_iterate_eq
→ Function.iterate_eq_iterate_iff_of_lt_minimalPeriod
isOfFinOrder_iff_coe
→ Submonoid.isOfFinOrder_coe
orderOf_pos'
→ IsOfFinOrder.orderOf_pos
pow_eq_mod_orderOf
→ pow_mod_orderOf
(and turned around)pow_injective_of_lt_orderOf
→ pow_injOn_Iio_orderOf
mem_powers_iff_mem_range_order_of'
→ IsOfFinOrder.mem_powers_iff_mem_range_orderOf
orderOf_pow''
→ IsOfFinOrder.orderOf_pow
orderOf_pow_coprime
→ Nat.Coprime.orderOf_pow
zpow_eq_mod_orderOf
→ zpow_mod_orderOf
(and turned around)exists_pow_eq_one
→ isOfFinOrder_of_finite
pow_apply_eq_pow_mod_orderOf_cycleOf_apply
→ pow_mod_orderOf_cycleOf_apply
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
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.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.@@ -353,18 +353,17 @@ theorem le_of_lt_minimalPeriod_of_iterate_eq {m n : ℕ} (hm : m < minimalPeriod
hm
#align function.le_of_lt_minimal_period_of_iterate_eq Function.le_of_lt_minimalPeriod_of_iterate_eq
-theorem eq_of_lt_minimalPeriod_of_iterate_eq {m n : ℕ} (hm : m < minimalPeriod f x)
- (hn : n < minimalPeriod f x) (hmn : f^[m] x = f^[n] x) : m = n :=
- (le_of_lt_minimalPeriod_of_iterate_eq hm hmn).antisymm
+theorem iterate_injOn_Iio_minimalPeriod : (Iio $ minimalPeriod f x).InjOn (f^[·] x) :=
+ fun _m hm _n hn hmn ↦ (le_of_lt_minimalPeriod_of_iterate_eq hm hmn).antisymm
(le_of_lt_minimalPeriod_of_iterate_eq hn hmn.symm)
-#align function.eq_of_lt_minimal_period_of_iterate_eq Function.eq_of_lt_minimalPeriod_of_iterate_eq
+#align function.eq_of_lt_minimal_period_of_iterate_eq Function.iterate_injOn_Iio_minimalPeriod
-theorem eq_iff_lt_minimalPeriod_of_iterate_eq {m n : ℕ} (hm : m < minimalPeriod f x)
+theorem iterate_eq_iterate_iff_of_lt_minimalPeriod {m n : ℕ} (hm : m < minimalPeriod f x)
(hn : n < minimalPeriod f x) : f^[m] x = f^[n] x ↔ m = n :=
- ⟨eq_of_lt_minimalPeriod_of_iterate_eq hm hn, congr_arg (Nat.iterate f · x)⟩
-#align function.eq_iff_lt_minimal_period_of_iterate_eq Function.eq_iff_lt_minimalPeriod_of_iterate_eq
+ iterate_injOn_Iio_minimalPeriod.eq_iff hm hn
+#align function.eq_iff_lt_minimal_period_of_iterate_eq Function.iterate_eq_iterate_iff_of_lt_minimalPeriod
-theorem minimalPeriod_id : minimalPeriod id x = 1 :=
+@[simp] theorem minimalPeriod_id : minimalPeriod id x = 1 :=
((is_periodic_id _ _).minimalPeriod_le Nat.one_pos).antisymm
(Nat.succ_le_of_lt ((is_periodic_id _ _).minimalPeriod_pos Nat.one_pos))
#align function.minimal_period_id Function.minimalPeriod_id
@@ -538,7 +537,7 @@ theorem nodup_periodicOrbit : (periodicOrbit f x).Nodup := by
rw [periodicOrbit, Cycle.nodup_coe_iff, List.nodup_map_iff_inj_on (List.nodup_range _)]
intro m hm n hn hmn
rw [List.mem_range] at hm hn
- rwa [eq_iff_lt_minimalPeriod_of_iterate_eq hm hn] at hmn
+ rwa [iterate_eq_iterate_iff_of_lt_minimalPeriod hm hn] at hmn
#align function.nodup_periodic_orbit Function.nodup_periodicOrbit
set_option linter.deprecated false in
Hom
and file name (#8095)
I believe the file defining a type of morphisms belongs alongside the file defining the structure this morphism works on. So I would like to reorganize the files in the Mathlib.Algebra.Hom
folder so that e.g. Mathlib.Algebra.Hom.Ring
becomes Mathlib.Algebra.Ring.Hom
and Mathlib.Algebra.Hom.NonUnitalAlg
becomes Mathlib.Algebra.Algebra.NonUnitalHom
.
While fixing the imports I went ahead and sorted them for good luck.
The full list of changes is: renamed: Mathlib/Algebra/Hom/NonUnitalAlg.lean -> Mathlib/Algebra/Algebra/NonUnitalHom.lean renamed: Mathlib/Algebra/Hom/Aut.lean -> Mathlib/Algebra/Group/Aut.lean renamed: Mathlib/Algebra/Hom/Commute.lean -> Mathlib/Algebra/Group/Commute/Hom.lean renamed: Mathlib/Algebra/Hom/Embedding.lean -> Mathlib/Algebra/Group/Embedding.lean renamed: Mathlib/Algebra/Hom/Equiv/Basic.lean -> Mathlib/Algebra/Group/Equiv/Basic.lean renamed: Mathlib/Algebra/Hom/Equiv/TypeTags.lean -> Mathlib/Algebra/Group/Equiv/TypeTags.lean renamed: Mathlib/Algebra/Hom/Equiv/Units/Basic.lean -> Mathlib/Algebra/Group/Units/Equiv.lean renamed: Mathlib/Algebra/Hom/Equiv/Units/GroupWithZero.lean -> Mathlib/Algebra/GroupWithZero/Units/Equiv.lean renamed: Mathlib/Algebra/Hom/Freiman.lean -> Mathlib/Algebra/Group/Freiman.lean renamed: Mathlib/Algebra/Hom/Group/Basic.lean -> Mathlib/Algebra/Group/Hom/Basic.lean renamed: Mathlib/Algebra/Hom/Group/Defs.lean -> Mathlib/Algebra/Group/Hom/Defs.lean renamed: Mathlib/Algebra/Hom/GroupAction.lean -> Mathlib/GroupTheory/GroupAction/Hom.lean renamed: Mathlib/Algebra/Hom/GroupInstances.lean -> Mathlib/Algebra/Group/Hom/Instances.lean renamed: Mathlib/Algebra/Hom/Iterate.lean -> Mathlib/Algebra/GroupPower/IterateHom.lean renamed: Mathlib/Algebra/Hom/Centroid.lean -> Mathlib/Algebra/Ring/CentroidHom.lean renamed: Mathlib/Algebra/Hom/Ring/Basic.lean -> Mathlib/Algebra/Ring/Hom/Basic.lean renamed: Mathlib/Algebra/Hom/Ring/Defs.lean -> Mathlib/Algebra/Ring/Hom/Defs.lean renamed: Mathlib/Algebra/Hom/Units.lean -> Mathlib/Algebra/Group/Units/Hom.lean
Zulip thread: https://leanprover.zulipchat.com/#narrow/stream/287929-mathlib4/topic/Reorganizing.20.60Mathlib.2EAlgebra.2EHom.60
@@ -3,10 +3,10 @@ Copyright (c) 2020 Yury G. Kudryashov. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Yury G. Kudryashov
-/
-import Mathlib.Algebra.Hom.Iterate
+import Mathlib.Algebra.GroupPower.IterateHom
import Mathlib.Data.List.Cycle
-import Mathlib.Data.PNat.Basic
import Mathlib.Data.Nat.Prime
+import Mathlib.Data.PNat.Basic
import Mathlib.Dynamics.FixedPoints.Basic
import Mathlib.GroupTheory.GroupAction.Group
Removes nonterminal simps on lines looking like simp [...]
@@ -504,7 +504,7 @@ theorem periodicOrbit_length : (periodicOrbit f x).length = minimalPeriod f x :=
@[simp]
theorem periodicOrbit_eq_nil_iff_not_periodic_pt :
periodicOrbit f x = Cycle.nil ↔ x ∉ periodicPts f := by
- simp [periodicOrbit]
+ simp only [periodicOrbit._eq_1, Cycle.coe_eq_nil, List.map_eq_nil, List.range_eq_nil]
exact minimalPeriod_eq_zero_iff_nmem_periodicPts
#align function.periodic_orbit_eq_nil_iff_not_periodic_pt Function.periodicOrbit_eq_nil_iff_not_periodic_pt
@@ -435,13 +435,13 @@ theorem Commute.minimalPeriod_of_comp_dvd_mul {g : α → α} (h : Commute f g)
#align function.commute.minimal_period_of_comp_dvd_mul Function.Commute.minimalPeriod_of_comp_dvd_mul
theorem Commute.minimalPeriod_of_comp_eq_mul_of_coprime {g : α → α} (h : Commute f g)
- (hco : coprime (minimalPeriod f x) (minimalPeriod g x)) :
+ (hco : Coprime (minimalPeriod f x) (minimalPeriod g x)) :
minimalPeriod (f ∘ g) x = minimalPeriod f x * minimalPeriod g x := by
apply h.minimalPeriod_of_comp_dvd_mul.antisymm
suffices
∀ {f g : α → α},
Commute f g →
- coprime (minimalPeriod f x) (minimalPeriod g x) →
+ Coprime (minimalPeriod f x) (minimalPeriod g x) →
minimalPeriod f x ∣ minimalPeriod (f ∘ g) x from
hco.mul_dvd_of_dvd_of_dvd (this h hco) (h.comp_eq.symm ▸ this h.symm hco.symm)
intro f g h hco
@@ -457,7 +457,7 @@ private theorem minimalPeriod_iterate_eq_div_gcd_aux (h : 0 < gcd (minimalPeriod
rw [IsPeriodicPt, IsFixedPt, ← iterate_mul, ← Nat.mul_div_assoc _ (gcd_dvd_left _ _),
mul_comm, Nat.mul_div_assoc _ (gcd_dvd_right _ _), mul_comm, iterate_mul]
exact (isPeriodicPt_minimalPeriod f x).iterate _
- · apply coprime.dvd_of_dvd_mul_right (coprime_div_gcd_div_gcd h)
+ · apply Coprime.dvd_of_dvd_mul_right (coprime_div_gcd_div_gcd h)
apply Nat.dvd_of_mul_dvd_mul_right h
rw [Nat.div_mul_cancel (gcd_dvd_left _ _), mul_assoc, Nat.div_mul_cancel (gcd_dvd_right _ _),
mul_comm]
@@ -435,13 +435,13 @@ theorem Commute.minimalPeriod_of_comp_dvd_mul {g : α → α} (h : Commute f g)
#align function.commute.minimal_period_of_comp_dvd_mul Function.Commute.minimalPeriod_of_comp_dvd_mul
theorem Commute.minimalPeriod_of_comp_eq_mul_of_coprime {g : α → α} (h : Commute f g)
- (hco : Coprime (minimalPeriod f x) (minimalPeriod g x)) :
+ (hco : coprime (minimalPeriod f x) (minimalPeriod g x)) :
minimalPeriod (f ∘ g) x = minimalPeriod f x * minimalPeriod g x := by
apply h.minimalPeriod_of_comp_dvd_mul.antisymm
suffices
∀ {f g : α → α},
Commute f g →
- Coprime (minimalPeriod f x) (minimalPeriod g x) →
+ coprime (minimalPeriod f x) (minimalPeriod g x) →
minimalPeriod f x ∣ minimalPeriod (f ∘ g) x from
hco.mul_dvd_of_dvd_of_dvd (this h hco) (h.comp_eq.symm ▸ this h.symm hco.symm)
intro f g h hco
@@ -457,7 +457,7 @@ private theorem minimalPeriod_iterate_eq_div_gcd_aux (h : 0 < gcd (minimalPeriod
rw [IsPeriodicPt, IsFixedPt, ← iterate_mul, ← Nat.mul_div_assoc _ (gcd_dvd_left _ _),
mul_comm, Nat.mul_div_assoc _ (gcd_dvd_right _ _), mul_comm, iterate_mul]
exact (isPeriodicPt_minimalPeriod f x).iterate _
- · apply Coprime.dvd_of_dvd_mul_right (coprime_div_gcd_div_gcd h)
+ · apply coprime.dvd_of_dvd_mul_right (coprime_div_gcd_div_gcd h)
apply Nat.dvd_of_mul_dvd_mul_right h
rw [Nat.div_mul_cancel (gcd_dvd_left _ _), mul_assoc, Nat.div_mul_cancel (gcd_dvd_right _ _),
mul_comm]
Some changes have already been review and delegated in #6910 and #7148.
The diff that needs looking at is https://github.com/leanprover-community/mathlib4/pull/7174/commits/64d6d07ee18163627c8f517eb31455411921c5ac
The std bump PR was insta-merged already!
Co-authored-by: leanprover-community-mathlib4-bot <leanprover-community-mathlib4-bot@users.noreply.github.com> Co-authored-by: Scott Morrison <scott.morrison@gmail.com>
@@ -435,13 +435,13 @@ theorem Commute.minimalPeriod_of_comp_dvd_mul {g : α → α} (h : Commute f g)
#align function.commute.minimal_period_of_comp_dvd_mul Function.Commute.minimalPeriod_of_comp_dvd_mul
theorem Commute.minimalPeriod_of_comp_eq_mul_of_coprime {g : α → α} (h : Commute f g)
- (hco : coprime (minimalPeriod f x) (minimalPeriod g x)) :
+ (hco : Coprime (minimalPeriod f x) (minimalPeriod g x)) :
minimalPeriod (f ∘ g) x = minimalPeriod f x * minimalPeriod g x := by
apply h.minimalPeriod_of_comp_dvd_mul.antisymm
suffices
∀ {f g : α → α},
Commute f g →
- coprime (minimalPeriod f x) (minimalPeriod g x) →
+ Coprime (minimalPeriod f x) (minimalPeriod g x) →
minimalPeriod f x ∣ minimalPeriod (f ∘ g) x from
hco.mul_dvd_of_dvd_of_dvd (this h hco) (h.comp_eq.symm ▸ this h.symm hco.symm)
intro f g h hco
@@ -457,7 +457,7 @@ private theorem minimalPeriod_iterate_eq_div_gcd_aux (h : 0 < gcd (minimalPeriod
rw [IsPeriodicPt, IsFixedPt, ← iterate_mul, ← Nat.mul_div_assoc _ (gcd_dvd_left _ _),
mul_comm, Nat.mul_div_assoc _ (gcd_dvd_right _ _), mul_comm, iterate_mul]
exact (isPeriodicPt_minimalPeriod f x).iterate _
- · apply coprime.dvd_of_dvd_mul_right (coprime_div_gcd_div_gcd h)
+ · apply Coprime.dvd_of_dvd_mul_right (coprime_div_gcd_div_gcd h)
apply Nat.dvd_of_mul_dvd_mul_right h
rw [Nat.div_mul_cancel (gcd_dvd_left _ _), mul_assoc, Nat.div_mul_cancel (gcd_dvd_right _ _),
mul_comm]
Many proofs use the "stream of consciousness" style from Lean 3, rather than have ... :=
or suffices ... from/by
.
This PR updates a fraction of these to the preferred Lean 4 style.
I think a good goal would be to delete the "deferred" versions of have
, suffices
, and let
at the bottom of Mathlib.Tactic.Have
(Anyone who would like to contribute more cleanup is welcome to push directly to this branch.)
Co-authored-by: Scott Morrison <scott.morrison@gmail.com>
@@ -438,12 +438,12 @@ theorem Commute.minimalPeriod_of_comp_eq_mul_of_coprime {g : α → α} (h : Com
(hco : coprime (minimalPeriod f x) (minimalPeriod g x)) :
minimalPeriod (f ∘ g) x = minimalPeriod f x * minimalPeriod g x := by
apply h.minimalPeriod_of_comp_dvd_mul.antisymm
- suffices :
+ suffices
∀ {f g : α → α},
Commute f g →
coprime (minimalPeriod f x) (minimalPeriod g x) →
- minimalPeriod f x ∣ minimalPeriod (f ∘ g) x
- · exact hco.mul_dvd_of_dvd_of_dvd (this h hco) (h.comp_eq.symm ▸ this h.symm hco.symm)
+ minimalPeriod f x ∣ minimalPeriod (f ∘ g) x from
+ hco.mul_dvd_of_dvd_of_dvd (this h hco) (h.comp_eq.symm ▸ this h.symm hco.symm)
intro f g h hco
refine' hco.dvd_of_dvd_mul_left (IsPeriodicPt.left_of_comp h _ _).minimalPeriod_dvd
· exact (isPeriodicPt_minimalPeriod _ _).const_mul _
Function.Commute
(#6456)
This PR protects Function.Commute
, so that it no longer clashes with Commute
in the root namespace, as suggested by @j-loreaux in #6290.
@@ -46,6 +46,8 @@ open Set
namespace Function
+open Function (Commute)
+
variable {α : Type*} {β : Type*} {f fa : α → α} {fb : β → β} {x y : α} {m n : ℕ}
/-- A point `x` is a periodic point of `f : α → α` of period `n` if `f^[n] x = x`.
@@ -421,18 +423,18 @@ theorem minimalPeriod_eq_prime_pow {p k : ℕ} [hp : Fact p.Prime] (hk : ¬IsPer
rwa [← isPeriodicPt_iff_minimalPeriod_dvd]
#align function.minimal_period_eq_prime_pow Function.minimalPeriod_eq_prime_pow
-theorem Commute.minimalPeriod_of_comp_dvd_lcm {g : α → α} (h : Function.Commute f g) :
+theorem Commute.minimalPeriod_of_comp_dvd_lcm {g : α → α} (h : Commute f g) :
minimalPeriod (f ∘ g) x ∣ Nat.lcm (minimalPeriod f x) (minimalPeriod g x) := by
rw [← isPeriodicPt_iff_minimalPeriod_dvd]
exact (isPeriodicPt_minimalPeriod f x).comp_lcm h (isPeriodicPt_minimalPeriod g x)
#align function.commute.minimal_period_of_comp_dvd_lcm Function.Commute.minimalPeriod_of_comp_dvd_lcm
-theorem Commute.minimalPeriod_of_comp_dvd_mul {g : α → α} (h : Function.Commute f g) :
+theorem Commute.minimalPeriod_of_comp_dvd_mul {g : α → α} (h : Commute f g) :
minimalPeriod (f ∘ g) x ∣ minimalPeriod f x * minimalPeriod g x :=
dvd_trans h.minimalPeriod_of_comp_dvd_lcm (lcm_dvd_mul _ _)
#align function.commute.minimal_period_of_comp_dvd_mul Function.Commute.minimalPeriod_of_comp_dvd_mul
-theorem Commute.minimalPeriod_of_comp_eq_mul_of_coprime {g : α → α} (h : Function.Commute f g)
+theorem Commute.minimalPeriod_of_comp_eq_mul_of_coprime {g : α → α} (h : Commute f g)
(hco : coprime (minimalPeriod f x) (minimalPeriod g x)) :
minimalPeriod (f ∘ g) x = minimalPeriod f x * minimalPeriod g x := by
apply h.minimalPeriod_of_comp_dvd_mul.antisymm
Type _
and Sort _
(#6499)
We remove all possible occurences of Type _
and Sort _
in favor of Type*
and Sort*
.
This has nice performance benefits.
@@ -46,7 +46,7 @@ open Set
namespace Function
-variable {α : Type _} {β : Type _} {f fa : α → α} {fb : β → β} {x y : α} {m n : ℕ}
+variable {α : Type*} {β : Type*} {f fa : α → α} {fb : β → β} {x y : α} {m n : ℕ}
/-- A point `x` is a periodic point of `f : α → α` of period `n` if `f^[n] x = x`.
Note that we do not require `0 < n` in this definition. Many theorems about periodic points
@@ -589,7 +589,7 @@ end Function
namespace Function
-variable {α β : Type _} {f : α → α} {g : β → β} {x : α × β} {a : α} {b : β} {m n : ℕ}
+variable {α β : Type*} {f : α → α} {g : β → β} {x : α × β} {a : α} {b : β} {m n : ℕ}
@[simp]
theorem iterate_prod_map (f : α → α) (g : β → β) (n : ℕ) :
@@ -627,7 +627,7 @@ namespace MulAction
open Function
-variable {α β : Type _} [Group α] [MulAction α β] {a : α} {b : β}
+variable {α β : Type*} [Group α] [MulAction α β] {a : α} {b : β}
@[to_additive]
theorem pow_smul_eq_iff_minimalPeriod_dvd {n : ℕ} :
@@ -2,11 +2,6 @@
Copyright (c) 2020 Yury G. Kudryashov. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Yury G. Kudryashov
-
-! This file was ported from Lean 3 source module dynamics.periodic_pts
-! leanprover-community/mathlib commit d07245fd37786daa997af4f1a73a49fa3b748408
-! Please do not edit these lines, except to modify the commit id
-! if you have ported upstream changes.
-/
import Mathlib.Algebra.Hom.Iterate
import Mathlib.Data.List.Cycle
@@ -15,6 +10,8 @@ import Mathlib.Data.Nat.Prime
import Mathlib.Dynamics.FixedPoints.Basic
import Mathlib.GroupTheory.GroupAction.Group
+#align_import dynamics.periodic_pts from "leanprover-community/mathlib"@"d07245fd37786daa997af4f1a73a49fa3b748408"
+
/-!
# Periodic points
@@ -4,7 +4,7 @@ Released under Apache 2.0 license as described in the file LICENSE.
Authors: Yury G. Kudryashov
! This file was ported from Lean 3 source module dynamics.periodic_pts
-! leanprover-community/mathlib commit f7fc89d5d5ff1db2d1242c7bb0e9062ce47ef47c
+! leanprover-community/mathlib commit d07245fd37786daa997af4f1a73a49fa3b748408
! Please do not edit these lines, except to modify the commit id
! if you have ported upstream changes.
-/
@@ -590,6 +590,42 @@ end -- noncomputable
end Function
+namespace Function
+
+variable {α β : Type _} {f : α → α} {g : β → β} {x : α × β} {a : α} {b : β} {m n : ℕ}
+
+@[simp]
+theorem iterate_prod_map (f : α → α) (g : β → β) (n : ℕ) :
+ (Prod.map f g)^[n] = Prod.map (f^[n]) (g^[n]) := by induction n <;> simp [*, Prod.map_comp_map]
+#align function.iterate_prod_map Function.iterate_prod_map
+
+@[simp]
+theorem isFixedPt_prod_map (x : α × β) :
+ IsFixedPt (Prod.map f g) x ↔ IsFixedPt f x.1 ∧ IsFixedPt g x.2 :=
+ Prod.ext_iff
+#align function.is_fixed_pt_prod_map Function.isFixedPt_prod_map
+
+@[simp]
+theorem isPeriodicPt_prod_map (x : α × β) :
+ IsPeriodicPt (Prod.map f g) n x ↔ IsPeriodicPt f n x.1 ∧ IsPeriodicPt g n x.2 := by
+ simp [IsPeriodicPt]
+#align function.is_periodic_pt_prod_map Function.isPeriodicPt_prod_map
+
+theorem minimalPeriod_prod_map (f : α → α) (g : β → β) (x : α × β) :
+ minimalPeriod (Prod.map f g) x = (minimalPeriod f x.1).lcm (minimalPeriod g x.2) :=
+ eq_of_forall_dvd <| by cases x; simp [← isPeriodicPt_iff_minimalPeriod_dvd, Nat.lcm_dvd_iff]
+#align function.minimal_period_prod_map Function.minimalPeriod_prod_map
+
+theorem minimalPeriod_fst_dvd : minimalPeriod f x.1 ∣ minimalPeriod (Prod.map f g) x := by
+ rw [minimalPeriod_prod_map]; exact Nat.dvd_lcm_left _ _
+#align function.minimal_period_fst_dvd Function.minimalPeriod_fst_dvd
+
+theorem minimalPeriod_snd_dvd : minimalPeriod g x.2 ∣ minimalPeriod (Prod.map f g) x := by
+ rw [minimalPeriod_prod_map]; exact Nat.dvd_lcm_right _ _
+#align function.minimal_period_snd_dvd Function.minimalPeriod_snd_dvd
+
+end Function
+
namespace MulAction
open Function
@@ -245,11 +245,11 @@ theorem isPeriodicPt_of_mem_periodicPts_of_isPeriodicPt_iterate (hx : x ∈ peri
variable (f)
-theorem bUnion_ptsOfPeriod : (⋃ n > 0, ptsOfPeriod f n) = periodicPts f :=
+theorem bUnion_ptsOfPeriod : ⋃ n > 0, ptsOfPeriod f n = periodicPts f :=
Set.ext fun x => by simp [mem_periodicPts]
#align function.bUnion_pts_of_period Function.bUnion_ptsOfPeriod
-theorem iUnion_pNat_ptsOfPeriod : (⋃ n : ℕ+, ptsOfPeriod f n) = periodicPts f :=
+theorem iUnion_pNat_ptsOfPeriod : ⋃ n : ℕ+, ptsOfPeriod f n = periodicPts f :=
iSup_subtype.trans <| bUnion_ptsOfPeriod f
#align function.Union_pnat_pts_of_period Function.iUnion_pNat_ptsOfPeriod
@@ -55,7 +55,7 @@ variable {α : Type _} {β : Type _} {f fa : α → α} {fb : β → β} {x y :
Note that we do not require `0 < n` in this definition. Many theorems about periodic points
need this assumption. -/
def IsPeriodicPt (f : α → α) (n : ℕ) (x : α) :=
- IsFixedPt (f^[n]) x
+ IsFixedPt f^[n] x
#align function.is_periodic_pt Function.IsPeriodicPt
/-- A fixed point of `f` is a periodic point of `f` of any prescribed period. -/
@@ -78,7 +78,7 @@ namespace IsPeriodicPt
instance [DecidableEq α] {f : α → α} {n : ℕ} {x : α} : Decidable (IsPeriodicPt f n x) :=
IsFixedPt.decidable
-protected theorem isFixedPt (hf : IsPeriodicPt f n x) : IsFixedPt (f^[n]) x :=
+protected theorem isFixedPt (hf : IsPeriodicPt f n x) : IsFixedPt f^[n] x :=
hf
#align function.is_periodic_pt.is_fixed_pt Function.IsPeriodicPt.isFixedPt
@@ -87,7 +87,7 @@ protected theorem map (hx : IsPeriodicPt fa n x) {g : α → β} (hg : Semiconj
IsFixedPt.map hx (hg.iterate_right n)
#align function.is_periodic_pt.map Function.IsPeriodicPt.map
-theorem apply_iterate (hx : IsPeriodicPt f n x) (m : ℕ) : IsPeriodicPt f n ((f^[m]) x) :=
+theorem apply_iterate (hx : IsPeriodicPt f n x) (m : ℕ) : IsPeriodicPt f n (f^[m] x) :=
hx.map <| Commute.iterate_self f m
#align function.is_periodic_pt.apply_iterate Function.IsPeriodicPt.apply_iterate
@@ -135,7 +135,7 @@ theorem trans_dvd (hm : IsPeriodicPt f m x) {n : ℕ} (hn : m ∣ n) : IsPeriodi
hk.symm ▸ hm.mul_const k
#align function.is_periodic_pt.trans_dvd Function.IsPeriodicPt.trans_dvd
-protected theorem iterate (hf : IsPeriodicPt f n x) (m : ℕ) : IsPeriodicPt (f^[m]) n x := by
+protected theorem iterate (hf : IsPeriodicPt f n x) (m : ℕ) : IsPeriodicPt f^[m] n x := by
rw [IsPeriodicPt, ← iterate_mul, mul_comm, iterate_mul]
exact hf.isFixedPt.iterate m
#align function.is_periodic_pt.iterate Function.IsPeriodicPt.iterate
@@ -157,7 +157,7 @@ theorem left_of_comp {g : α → α} (hco : Commute f g) (hfg : IsPeriodicPt (f
exact hfg.left_of_comp hg
#align function.is_periodic_pt.left_of_comp Function.IsPeriodicPt.left_of_comp
-theorem iterate_mod_apply (h : IsPeriodicPt f n x) (m : ℕ) : (f^[m % n]) x = (f^[m]) x := by
+theorem iterate_mod_apply (h : IsPeriodicPt f n x) (m : ℕ) : f^[m % n] x = f^[m] x := by
conv_rhs => rw [← Nat.mod_add_div m n, iterate_add_apply, (h.mul_const _).eq]
#align function.is_periodic_pt.iterate_mod_apply Function.IsPeriodicPt.iterate_mod_apply
@@ -210,7 +210,7 @@ theorem bijOn_ptsOfPeriod (f : α → α) {n : ℕ} (hn : 0 < n) :
BijOn f (ptsOfPeriod f n) (ptsOfPeriod f n) :=
⟨(Commute.refl f).mapsTo_ptsOfPeriod n, fun x hx y hy hxy => hx.eq_of_apply_eq_same hy hn hxy,
fun x hx =>
- ⟨(f^[n.pred]) x, hx.apply_iterate _, by
+ ⟨f^[n.pred] x, hx.apply_iterate _, by
rw [← comp_apply (f := f), comp_iterate_pred_of_pos f hn, hx.eq]⟩⟩
#align function.bij_on_pts_of_period Function.bijOn_ptsOfPeriod
@@ -232,7 +232,7 @@ theorem mem_periodicPts : x ∈ periodicPts f ↔ ∃ n > 0, IsPeriodicPt f n x
#align function.mem_periodic_pts Function.mem_periodicPts
theorem isPeriodicPt_of_mem_periodicPts_of_isPeriodicPt_iterate (hx : x ∈ periodicPts f)
- (hm : IsPeriodicPt f m ((f^[n]) x)) : IsPeriodicPt f m x := by
+ (hm : IsPeriodicPt f m (f^[n] x)) : IsPeriodicPt f m x := by
rcases hx with ⟨r, hr, hr'⟩
suffices n ≤ (n / r + 1) * r by
-- porting note: convert used to unfold IsPeriodicPt
@@ -282,19 +282,19 @@ theorem isPeriodicPt_minimalPeriod (f : α → α) (x : α) : IsPeriodicPt f (mi
#align function.is_periodic_pt_minimal_period Function.isPeriodicPt_minimalPeriod
@[simp]
-theorem iterate_minimalPeriod : (f^[minimalPeriod f x]) x = x :=
+theorem iterate_minimalPeriod : f^[minimalPeriod f x] x = x :=
isPeriodicPt_minimalPeriod f x
#align function.iterate_minimal_period Function.iterate_minimalPeriod
@[simp]
-theorem iterate_add_minimalPeriod_eq : (f^[n + minimalPeriod f x]) x = (f^[n]) x := by
+theorem iterate_add_minimalPeriod_eq : f^[n + minimalPeriod f x] x = f^[n] x := by
rw [iterate_add_apply]
congr
exact isPeriodicPt_minimalPeriod f x
#align function.iterate_add_minimal_period_eq Function.iterate_add_minimalPeriod_eq
@[simp]
-theorem iterate_mod_minimalPeriod_eq : (f^[n % minimalPeriod f x]) x = (f^[n]) x :=
+theorem iterate_mod_minimalPeriod_eq : f^[n % minimalPeriod f x] x = f^[n] x :=
(isPeriodicPt_minimalPeriod f x).iterate_mod_apply n
#align function.iterate_mod_minimal_period_eq Function.iterate_mod_minimalPeriod_eq
@@ -327,7 +327,7 @@ theorem IsPeriodicPt.minimalPeriod_le (hn : 0 < n) (hx : IsPeriodicPt f n x) :
#align function.is_periodic_pt.minimal_period_le Function.IsPeriodicPt.minimalPeriod_le
theorem minimalPeriod_apply_iterate (hx : x ∈ periodicPts f) (n : ℕ) :
- minimalPeriod f ((f^[n]) x) = minimalPeriod f x := by
+ minimalPeriod f (f^[n] x) = minimalPeriod f x := by
apply
(IsPeriodicPt.minimalPeriod_le (minimalPeriod_pos_of_mem_periodicPts hx) _).antisymm
((isPeriodicPt_of_mem_periodicPts_of_isPeriodicPt_iterate hx
@@ -343,7 +343,7 @@ theorem minimalPeriod_apply (hx : x ∈ periodicPts f) : minimalPeriod f (f x) =
#align function.minimal_period_apply Function.minimalPeriod_apply
theorem le_of_lt_minimalPeriod_of_iterate_eq {m n : ℕ} (hm : m < minimalPeriod f x)
- (hmn : (f^[m]) x = (f^[n]) x) : m ≤ n := by
+ (hmn : f^[m] x = f^[n] x) : m ≤ n := by
by_contra' hmn'
rw [← Nat.add_sub_of_le hmn'.le, add_comm, iterate_add_apply] at hmn
exact
@@ -355,13 +355,13 @@ theorem le_of_lt_minimalPeriod_of_iterate_eq {m n : ℕ} (hm : m < minimalPeriod
#align function.le_of_lt_minimal_period_of_iterate_eq Function.le_of_lt_minimalPeriod_of_iterate_eq
theorem eq_of_lt_minimalPeriod_of_iterate_eq {m n : ℕ} (hm : m < minimalPeriod f x)
- (hn : n < minimalPeriod f x) (hmn : (f^[m]) x = (f^[n]) x) : m = n :=
+ (hn : n < minimalPeriod f x) (hmn : f^[m] x = f^[n] x) : m = n :=
(le_of_lt_minimalPeriod_of_iterate_eq hm hmn).antisymm
(le_of_lt_minimalPeriod_of_iterate_eq hn hmn.symm)
#align function.eq_of_lt_minimal_period_of_iterate_eq Function.eq_of_lt_minimalPeriod_of_iterate_eq
theorem eq_iff_lt_minimalPeriod_of_iterate_eq {m n : ℕ} (hm : m < minimalPeriod f x)
- (hn : n < minimalPeriod f x) : (f^[m]) x = (f^[n]) x ↔ m = n :=
+ (hn : n < minimalPeriod f x) : f^[m] x = f^[n] x ↔ m = n :=
⟨eq_of_lt_minimalPeriod_of_iterate_eq hm hn, congr_arg (Nat.iterate f · x)⟩
#align function.eq_iff_lt_minimal_period_of_iterate_eq Function.eq_iff_lt_minimalPeriod_of_iterate_eq
@@ -452,7 +452,7 @@ theorem Commute.minimalPeriod_of_comp_eq_mul_of_coprime {g : α → α} (h : Fun
#align function.commute.minimal_period_of_comp_eq_mul_of_coprime Function.Commute.minimalPeriod_of_comp_eq_mul_of_coprime
private theorem minimalPeriod_iterate_eq_div_gcd_aux (h : 0 < gcd (minimalPeriod f x) n) :
- minimalPeriod (f^[n]) x = minimalPeriod f x / Nat.gcd (minimalPeriod f x) n := by
+ minimalPeriod f^[n] x = minimalPeriod f x / Nat.gcd (minimalPeriod f x) n := by
apply Nat.dvd_antisymm
· apply IsPeriodicPt.minimalPeriod_dvd
rw [IsPeriodicPt, IsFixedPt, ← iterate_mul, ← Nat.mul_div_assoc _ (gcd_dvd_left _ _),
@@ -467,12 +467,12 @@ private theorem minimalPeriod_iterate_eq_div_gcd_aux (h : 0 < gcd (minimalPeriod
exact isPeriodicPt_minimalPeriod _ _
theorem minimalPeriod_iterate_eq_div_gcd (h : n ≠ 0) :
- minimalPeriod (f^[n]) x = minimalPeriod f x / Nat.gcd (minimalPeriod f x) n :=
+ minimalPeriod f^[n] x = minimalPeriod f x / Nat.gcd (minimalPeriod f x) n :=
minimalPeriod_iterate_eq_div_gcd_aux <| gcd_pos_of_pos_right _ (Nat.pos_of_ne_zero h)
#align function.minimal_period_iterate_eq_div_gcd Function.minimalPeriod_iterate_eq_div_gcd
theorem minimalPeriod_iterate_eq_div_gcd' (h : x ∈ periodicPts f) :
- minimalPeriod (f^[n]) x = minimalPeriod f x / Nat.gcd (minimalPeriod f x) n :=
+ minimalPeriod f^[n] x = minimalPeriod f x / Nat.gcd (minimalPeriod f x) n :=
minimalPeriod_iterate_eq_div_gcd_aux <|
gcd_pos_of_pos_left n (minimalPeriod_pos_iff_mem_periodicPts.mpr h)
#align function.minimal_period_iterate_eq_div_gcd' Function.minimalPeriod_iterate_eq_div_gcd'
@@ -482,18 +482,18 @@ the minimal period of `x`.
If `x` is not a periodic point, then this is the empty (aka nil) cycle. -/
def periodicOrbit (f : α → α) (x : α) : Cycle α :=
- (List.range (minimalPeriod f x)).map fun n => (f^[n]) x
+ (List.range (minimalPeriod f x)).map fun n => f^[n] x
#align function.periodic_orbit Function.periodicOrbit
/-- The definition of a periodic orbit, in terms of `List.map`. -/
theorem periodicOrbit_def (f : α → α) (x : α) :
- periodicOrbit f x = (List.range (minimalPeriod f x)).map fun n => (f^[n]) x :=
+ periodicOrbit f x = (List.range (minimalPeriod f x)).map fun n => f^[n] x :=
rfl
#align function.periodic_orbit_def Function.periodicOrbit_def
/-- The definition of a periodic orbit, in terms of `Cycle.map`. -/
theorem periodicOrbit_eq_cycle_map (f : α → α) (x : α) :
- periodicOrbit f x = (List.range (minimalPeriod f x) : Cycle ℕ).map fun n => (f^[n]) x :=
+ periodicOrbit f x = (List.range (minimalPeriod f x) : Cycle ℕ).map fun n => f^[n] x :=
rfl
#align function.periodic_orbit_eq_cycle_map Function.periodicOrbit_eq_cycle_map
@@ -516,7 +516,7 @@ theorem periodicOrbit_eq_nil_of_not_periodic_pt (h : x ∉ periodicPts f) :
@[simp]
theorem mem_periodicOrbit_iff (hx : x ∈ periodicPts f) :
- y ∈ periodicOrbit f x ↔ ∃ n, (f^[n]) x = y := by
+ y ∈ periodicOrbit f x ↔ ∃ n, f^[n] x = y := by
simp only [periodicOrbit, Cycle.mem_coe_iff, List.mem_map, List.mem_range]
use fun ⟨a, _, ha'⟩ => ⟨a, ha'⟩
rintro ⟨n, rfl⟩
@@ -526,7 +526,7 @@ theorem mem_periodicOrbit_iff (hx : x ∈ periodicPts f) :
@[simp]
theorem iterate_mem_periodicOrbit (hx : x ∈ periodicPts f) (n : ℕ) :
- (f^[n]) x ∈ periodicOrbit f x :=
+ f^[n] x ∈ periodicOrbit f x :=
(mem_periodicOrbit_iff hx).2 ⟨n, rfl⟩
#align function.iterate_mem_periodic_orbit Function.iterate_mem_periodicOrbit
@@ -544,7 +544,7 @@ theorem nodup_periodicOrbit : (periodicOrbit f x).Nodup := by
set_option linter.deprecated false in
theorem periodicOrbit_apply_iterate_eq (hx : x ∈ periodicPts f) (n : ℕ) :
- periodicOrbit f ((f^[n]) x) = periodicOrbit f x :=
+ periodicOrbit f (f^[n] x) = periodicOrbit f x :=
Eq.symm <|
Cycle.coe_eq_coe.2 <|
⟨n, by
@@ -559,7 +559,7 @@ theorem periodicOrbit_apply_eq (hx : x ∈ periodicPts f) :
#align function.periodic_orbit_apply_eq Function.periodicOrbit_apply_eq
theorem periodicOrbit_chain (r : α → α → Prop) {f : α → α} {x : α} :
- (periodicOrbit f x).Chain r ↔ ∀ n < minimalPeriod f x, r ((f^[n]) x) ((f^[n + 1]) x) := by
+ (periodicOrbit f x).Chain r ↔ ∀ n < minimalPeriod f x, r (f^[n] x) (f^[n + 1] x) := by
by_cases hx : x ∈ periodicPts f
· have hx' := minimalPeriod_pos_of_mem_periodicPts hx
have hM := Nat.sub_add_cancel (succ_le_iff.2 hx')
@@ -578,7 +578,7 @@ theorem periodicOrbit_chain (r : α → α → Prop) {f : α → α} {x : α} :
#align function.periodic_orbit_chain Function.periodicOrbit_chain
theorem periodicOrbit_chain' (r : α → α → Prop) {f : α → α} {x : α} (hx : x ∈ periodicPts f) :
- (periodicOrbit f x).Chain r ↔ ∀ n, r ((f^[n]) x) ((f^[n + 1]) x) := by
+ (periodicOrbit f x).Chain r ↔ ∀ n, r (f^[n] x) (f^[n + 1] x) := by
rw [periodicOrbit_chain r]
refine' ⟨fun H n => _, fun H n _ => H n⟩
rw [iterate_succ_apply, ← iterate_mod_minimalPeriod_eq, ← iterate_mod_minimalPeriod_eq (n := n),
This makes a mathlib4 version of mathlib3's tactic.basic
, now called Mathlib.Tactic.Common
, which imports all tactics which do not have significant theory requirements, and then is imported all across the base of the hierarchy.
This ensures that all common tactics are available nearly everywhere in the library, rather than having to be imported one-by-one as you need them.
Co-authored-by: Scott Morrison <scott.morrison@gmail.com>
@@ -14,7 +14,6 @@ import Mathlib.Data.PNat.Basic
import Mathlib.Data.Nat.Prime
import Mathlib.Dynamics.FixedPoints.Basic
import Mathlib.GroupTheory.GroupAction.Group
-import Mathlib.Tactic.NthRewrite
/-!
# Periodic points
sSup
/iSup
(#3938)
As discussed on Zulip
supₛ
→ sSup
infₛ
→ sInf
supᵢ
→ iSup
infᵢ
→ iInf
bsupₛ
→ bsSup
binfₛ
→ bsInf
bsupᵢ
→ biSup
binfᵢ
→ biInf
csupₛ
→ csSup
cinfₛ
→ csInf
csupᵢ
→ ciSup
cinfᵢ
→ ciInf
unionₛ
→ sUnion
interₛ
→ sInter
unionᵢ
→ iUnion
interᵢ
→ iInter
bunionₛ
→ bsUnion
binterₛ
→ bsInter
bunionᵢ
→ biUnion
binterᵢ
→ biInter
Co-authored-by: Parcly Taxel <reddeloostw@gmail.com>
@@ -250,13 +250,13 @@ theorem bUnion_ptsOfPeriod : (⋃ n > 0, ptsOfPeriod f n) = periodicPts f :=
Set.ext fun x => by simp [mem_periodicPts]
#align function.bUnion_pts_of_period Function.bUnion_ptsOfPeriod
-theorem unionᵢ_pNat_ptsOfPeriod : (⋃ n : ℕ+, ptsOfPeriod f n) = periodicPts f :=
- supᵢ_subtype.trans <| bUnion_ptsOfPeriod f
-#align function.Union_pnat_pts_of_period Function.unionᵢ_pNat_ptsOfPeriod
+theorem iUnion_pNat_ptsOfPeriod : (⋃ n : ℕ+, ptsOfPeriod f n) = periodicPts f :=
+ iSup_subtype.trans <| bUnion_ptsOfPeriod f
+#align function.Union_pnat_pts_of_period Function.iUnion_pNat_ptsOfPeriod
theorem bijOn_periodicPts : BijOn f (periodicPts f) (periodicPts f) :=
- unionᵢ_pNat_ptsOfPeriod f ▸
- bijOn_unionᵢ_of_directed (directed_ptsOfPeriod_pNat f) fun i => bijOn_ptsOfPeriod f i.pos
+ iUnion_pNat_ptsOfPeriod f ▸
+ bijOn_iUnion_of_directed (directed_ptsOfPeriod_pNat f) fun i => bijOn_ptsOfPeriod f i.pos
#align function.bij_on_periodic_pts Function.bijOn_periodicPts
variable {f}
@@ -371,7 +371,7 @@ theorem minimalPeriod_id : minimalPeriod id x = 1 :=
(Nat.succ_le_of_lt ((is_periodic_id _ _).minimalPeriod_pos Nat.one_pos))
#align function.minimal_period_id Function.minimalPeriod_id
-theorem is_fixed_point_iff_minimalPeriod_eq_one : minimalPeriod f x = 1 ↔ IsFixedPt f x := by
+theorem minimalPeriod_eq_one_iff_isFixedPt : minimalPeriod f x = 1 ↔ IsFixedPt f x := by
refine' ⟨fun h => _, fun h => _⟩
· rw [← iterate_one f]
refine' Function.IsPeriodicPt.isFixedPt _
@@ -380,7 +380,7 @@ theorem is_fixed_point_iff_minimalPeriod_eq_one : minimalPeriod f x = 1 ↔ IsFi
· exact
((h.isPeriodicPt 1).minimalPeriod_le Nat.one_pos).antisymm
(Nat.succ_le_of_lt ((h.isPeriodicPt 1).minimalPeriod_pos Nat.one_pos))
-#align function.is_fixed_point_iff_minimal_period_eq_one Function.is_fixed_point_iff_minimalPeriod_eq_one
+#align function.is_fixed_point_iff_minimal_period_eq_one Function.minimalPeriod_eq_one_iff_isFixedPt
theorem IsPeriodicPt.eq_zero_of_lt_minimalPeriod (hx : IsPeriodicPt f n x)
(hn : n < minimalPeriod f x) : n = 0 :=
@@ -416,7 +416,7 @@ theorem minimalPeriod_eq_minimalPeriod_iff {g : β → β} {y : β} :
theorem minimalPeriod_eq_prime {p : ℕ} [hp : Fact p.Prime] (hper : IsPeriodicPt f p x)
(hfix : ¬IsFixedPt f x) : minimalPeriod f x = p :=
(hp.out.eq_one_or_self_of_dvd _ hper.minimalPeriod_dvd).resolve_left
- (mt is_fixed_point_iff_minimalPeriod_eq_one.1 hfix)
+ (mt minimalPeriod_eq_one_iff_isFixedPt.1 hfix)
#align function.minimal_period_eq_prime Function.minimalPeriod_eq_prime
theorem minimalPeriod_eq_prime_pow {p k : ℕ} [hp : Fact p.Prime] (hk : ¬IsPeriodicPt f (p ^ k) x)
Match https://github.com/leanprover-community/mathlib/pull/18698 and a bit of https://github.com/leanprover-community/mathlib/pull/18785.
algebra.divisibility.basic
@70d50ecfd4900dd6d328da39ab7ebd516abe4025
..e8638a0fcaf73e4500469f368ef9494e495099b3
algebra.euclidean_domain.basic
@655994e298904d7e5bbd1e18c95defd7b543eb94
..e8638a0fcaf73e4500469f368ef9494e495099b3
algebra.group.units
@369525b73f229ccd76a6ec0e0e0bf2be57599768
..e8638a0fcaf73e4500469f368ef9494e495099b3
algebra.group_with_zero.basic
@2196ab363eb097c008d4497125e0dde23fb36db2
..e8638a0fcaf73e4500469f368ef9494e495099b3
algebra.group_with_zero.divisibility
@f1a2caaf51ef593799107fe9a8d5e411599f3996
..e8638a0fcaf73e4500469f368ef9494e495099b3
algebra.group_with_zero.units.basic
@70d50ecfd4900dd6d328da39ab7ebd516abe4025
..df5e9937a06fdd349fc60106f54b84d47b1434f0
algebra.order.monoid.canonical.defs
@de87d5053a9fe5cbde723172c0fb7e27e7436473
..e8638a0fcaf73e4500469f368ef9494e495099b3
algebra.ring.divisibility
@f1a2caaf51ef593799107fe9a8d5e411599f3996
..e8638a0fcaf73e4500469f368ef9494e495099b3
data.int.dvd.basic
@e1bccd6e40ae78370f01659715d3c948716e3b7e
..e8638a0fcaf73e4500469f368ef9494e495099b3
data.int.dvd.pow
@b3f25363ae62cb169e72cd6b8b1ac97bacf21ca7
..e8638a0fcaf73e4500469f368ef9494e495099b3
data.int.order.basic
@728baa2f54e6062c5879a3e397ac6bac323e506f
..e8638a0fcaf73e4500469f368ef9494e495099b3
data.nat.gcd.basic
@a47cda9662ff3925c6df271090b5808adbca5b46
..e8638a0fcaf73e4500469f368ef9494e495099b3
data.nat.order.basic
@26f081a2fb920140ed5bc5cc5344e84bcc7cb2b2
..e8638a0fcaf73e4500469f368ef9494e495099b3
data.nat.order.lemmas
@2258b40dacd2942571c8ce136215350c702dc78f
..e8638a0fcaf73e4500469f368ef9494e495099b3
group_theory.perm.cycle.basic
@92ca63f0fb391a9ca5f22d2409a6080e786d99f7
..e8638a0fcaf73e4500469f368ef9494e495099b3
number_theory.divisors
@f7fc89d5d5ff1db2d1242c7bb0e9062ce47ef47c
..e8638a0fcaf73e4500469f368ef9494e495099b3
number_theory.pythagorean_triples
@70fd9563a21e7b963887c9360bd29b2393e6225a
..e8638a0fcaf73e4500469f368ef9494e495099b3
number_theory.zsqrtd.basic
@7ec294687917cbc5c73620b4414ae9b5dd9ae1b4
..e8638a0fcaf73e4500469f368ef9494e495099b3
ring_theory.multiplicity
@ceb887ddf3344dab425292e497fa2af91498437c
..e8638a0fcaf73e4500469f368ef9494e495099b3
Co-authored-by: Jeremy Tan Jie Rui <reddeloostw@gmail.com>
@@ -439,7 +439,7 @@ theorem Commute.minimalPeriod_of_comp_dvd_mul {g : α → α} (h : Function.Comm
theorem Commute.minimalPeriod_of_comp_eq_mul_of_coprime {g : α → α} (h : Function.Commute f g)
(hco : coprime (minimalPeriod f x) (minimalPeriod g x)) :
minimalPeriod (f ∘ g) x = minimalPeriod f x * minimalPeriod g x := by
- apply dvd_antisymm h.minimalPeriod_of_comp_dvd_mul
+ apply h.minimalPeriod_of_comp_dvd_mul.antisymm
suffices :
∀ {f g : α → α},
Commute f g →
Notably incorporates https://github.com/leanprover/std4/pull/98 and https://github.com/leanprover/std4/pull/109.
https://github.com/leanprover/std4/pull/98 moves a number of lemmas from Mathlib to Std, so the bump requires deleting them in Mathlib. I did check on each lemma whether its attributes were kept in the move (and gave attribute markings in Mathlib if they were not present in Std), but a reviewer may wish to re-check.
List.mem_map
changed statement from b ∈ l.map f ↔ ∃ a, a ∈ l ∧ b = f a
to b ∈ l.map f ↔ ∃ a, a ∈ l ∧ f a = b
. Similarly for List.exists_of_mem_map
. This was a deliberate change, so I have simply adjusted proofs (many become simpler, which supports the change). I also deleted List.mem_map'
, List.exists_of_mem_map'
, which were temporary versions in Mathlib while waiting for this change (replacing their uses with the unprimed versions).
Also, the lemma sublist_nil_iff_eq_nil
seems to have been renamed to sublist_nil
during the move, so I added an alias for the old name.
(another issue fixed during review by @digama0) List.Sublist.filter
had an argument change from explicit to implicit. This appears to have been an oversight (cc @JamesGallicchio). I have temporarily introduced List.Sublist.filter'
with the argument explicit, and replaced Mathlib uses of Sublist.filter
with Sublist.filter'
. Later we can fix the argument in Std, and then delete List.Sublist.filter'
.
@@ -518,7 +518,7 @@ theorem periodicOrbit_eq_nil_of_not_periodic_pt (h : x ∉ periodicPts f) :
@[simp]
theorem mem_periodicOrbit_iff (hx : x ∈ periodicPts f) :
y ∈ periodicOrbit f x ↔ ∃ n, (f^[n]) x = y := by
- simp only [periodicOrbit, Cycle.mem_coe_iff, List.mem_map', List.mem_range]
+ simp only [periodicOrbit, Cycle.mem_coe_iff, List.mem_map, List.mem_range]
use fun ⟨a, _, ha'⟩ => ⟨a, ha'⟩
rintro ⟨n, rfl⟩
use n % minimalPeriod f x, mod_lt _ (minimalPeriod_pos_of_mem_periodicPts hx)
congr!
and convert
(#2606)
congr!
, convert
, and convert_to
to control parts of the congruence algorithm, in particular transparency settings when applying congruence lemmas.congr!
now applies congruence lemmas with reducible transparency by default. This prevents it from unfolding definitions when applying congruence lemmas. It also now tries both the LHS-biased and RHS-biased simp congruence lemmas, with a configuration option to set which it should try first.HEq
congruence lemma generator that gives each hypothesis access to the proofs of previous hypotheses. This means that if you have an equality ⊢ ⟨a, x⟩ = ⟨b, y⟩
of sigma types, congr!
turns this into goals ⊢ a = b
and ⊢ a = b → HEq x y
(note that congr!
will also auto-introduce a = b
for you in the second goal). This congruence lemma generator applies to more cases than the simp congruence lemma generator does.congr!
(and hence convert
) are more careful about applying lemmas that don't force definitions to unfold. There were a number of cases in mathlib where the implementation of congr
was being abused to unfold definitions.set_option trace.congr! true
you can see what congr!
sees when it is deciding on congruence lemmas.convert_to
to do using 1
when there is no using
clause, to match its documentation.Note that congr!
is more capable than congr
at finding a way to equate left-hand sides and right-hand sides, so you will frequently need to limit its depth with a using
clause. However, there is also a new heuristic to prevent considering unlikely-to-be-provable type equalities (controlled by the typeEqs
option), which can help limit the depth automatically.
There is also a predefined configuration that you can invoke with, for example, convert (config := .unfoldSameFun) h
, that causes it to behave more like congr
, including using default transparency when unfolding.
@@ -235,9 +235,11 @@ theorem mem_periodicPts : x ∈ periodicPts f ↔ ∃ n > 0, IsPeriodicPt f n x
theorem isPeriodicPt_of_mem_periodicPts_of_isPeriodicPt_iterate (hx : x ∈ periodicPts f)
(hm : IsPeriodicPt f m ((f^[n]) x)) : IsPeriodicPt f m x := by
rcases hx with ⟨r, hr, hr'⟩
- convert (hm.apply_iterate ((n / r + 1) * r - n)).eq
suffices n ≤ (n / r + 1) * r by
- rw [← iterate_add_apply, Nat.sub_add_cancel this, iterate_mul, (hr'.iterate _).eq]
+ -- porting note: convert used to unfold IsPeriodicPt
+ change _ = _
+ convert (hm.apply_iterate ((n / r + 1) * r - n)).eq <;>
+ rw [← iterate_add_apply, Nat.sub_add_cancel this, iterate_mul, (hr'.iterate _).eq]
rw [add_mul, one_mul]
exact (Nat.lt_div_mul_add hr).le
#align function.is_periodic_pt_of_mem_periodic_pts_of_is_periodic_pt_iterate Function.isPeriodicPt_of_mem_periodicPts_of_isPeriodicPt_iterate
The unported dependencies are