Skip to content

Commit

Permalink
bump to nightly-2023-02-22-21
Browse files Browse the repository at this point in the history
  • Loading branch information
leanprover-community-bot committed Feb 22, 2023
1 parent a19f979 commit 0652cf4
Show file tree
Hide file tree
Showing 17 changed files with 740 additions and 190 deletions.
2 changes: 1 addition & 1 deletion Mathbin/Algebra/CharP/Basic.lean
Expand Up @@ -50,7 +50,7 @@ theorem CharP.cast_card_eq_zero [AddGroupWithOne R] [Fintype R] : (Fintype.card
#align char_p.cast_card_eq_zero CharP.cast_card_eq_zero

theorem CharP.addOrderOf_one (R) [Semiring R] : CharP R (addOrderOf (1 : R)) :=
fun n => by rw [← Nat.smul_one_eq_coe, add_orderOf_dvd_iff_nsmul_eq_zero]⟩
fun n => by rw [← Nat.smul_one_eq_coe, addOrderOf_dvd_iff_nsmul_eq_zero]⟩
#align char_p.add_order_of_one CharP.addOrderOf_one

theorem CharP.int_cast_eq_zero_iff [AddGroupWithOne R] (p : ℕ) [CharP R p] (a : ℤ) :
Expand Down
2 changes: 1 addition & 1 deletion Mathbin/Algebra/CharP/CharAndCard.lean
Expand Up @@ -71,7 +71,7 @@ theorem prime_dvd_char_iff_dvd_card {R : Type _} [CommRing R] [Fintype R] (p :
fun h => _⟩
by_contra h₀
rcases exists_prime_addOrderOf_dvd_card p h with ⟨r, hr⟩
have hr₁ := add_orderOf_nsmul_eq_zero r
have hr₁ := addOrderOf_nsmul_eq_zero r
rw [hr, nsmul_eq_mul] at hr₁
rcases IsUnit.exists_left_inv ((isUnit_iff_not_dvd_char R p).mpr h₀) with ⟨u, hu⟩
apply_fun (· * ·) u at hr₁
Expand Down
8 changes: 4 additions & 4 deletions Mathbin/Algebra/Module/Torsion.lean
Expand Up @@ -834,9 +834,9 @@ theorem isTorsion_iff_isTorsion_nat [AddCommMonoid M] :
AddMonoid.IsTorsion M ↔ Module.IsTorsion ℕ M :=
by
refine' ⟨fun h x => _, fun h x => _⟩
· obtain ⟨n, h0, hn⟩ := (is_of_fin_add_order_iff_nsmul_eq_zero x).mp (h x)
· obtain ⟨n, h0, hn⟩ := (isOfFinAddOrder_iff_nsmul_eq_zero x).mp (h x)
exact ⟨⟨n, mem_nonZeroDivisors_of_ne_zero <| ne_of_gt h0⟩, hn⟩
· rw [is_of_fin_add_order_iff_nsmul_eq_zero]
· rw [isOfFinAddOrder_iff_nsmul_eq_zero]
obtain ⟨n, hn⟩ := @h x
refine' ⟨n, Nat.pos_of_ne_zero (nonZeroDivisors.coe_ne_zero _), hn⟩
#align add_monoid.is_torsion_iff_is_torsion_nat AddMonoid.isTorsion_iff_isTorsion_nat
Expand All @@ -845,11 +845,11 @@ theorem isTorsion_iff_isTorsion_int [AddCommGroup M] :
AddMonoid.IsTorsion M ↔ Module.IsTorsion ℤ M :=
by
refine' ⟨fun h x => _, fun h x => _⟩
· obtain ⟨n, h0, hn⟩ := (is_of_fin_add_order_iff_nsmul_eq_zero x).mp (h x)
· obtain ⟨n, h0, hn⟩ := (isOfFinAddOrder_iff_nsmul_eq_zero x).mp (h x)
exact
⟨⟨n, mem_nonZeroDivisors_of_ne_zero <| ne_of_gt <| int.coe_nat_pos.mpr h0⟩,
(coe_nat_zsmul _ _).trans hn⟩
· rw [is_of_fin_add_order_iff_nsmul_eq_zero]
· rw [isOfFinAddOrder_iff_nsmul_eq_zero]
obtain ⟨n, hn⟩ := @h x
exact exists_nsmul_eq_zero_of_zsmul_eq_zero (nonZeroDivisors.coe_ne_zero n) hn
#align add_monoid.is_torsion_iff_is_torsion_int AddMonoid.isTorsion_iff_isTorsion_int
Expand Down
42 changes: 42 additions & 0 deletions Mathbin/CategoryTheory/LiftingProperties/Adjunction.lean

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions Mathbin/Data/Zmod/Basic.lean
Expand Up @@ -111,14 +111,14 @@ theorem addOrderOf_coe (a : ℕ) {n : ℕ} (n0 : n ≠ 0) : addOrderOf (a : ZMod
by
cases a
simp [Nat.pos_of_ne_zero n0]
rw [← Nat.smul_one_eq_coe, add_orderOf_nsmul' _ a.succ_ne_zero, ZMod.addOrderOf_one]
rw [← Nat.smul_one_eq_coe, addOrderOf_nsmul' _ a.succ_ne_zero, ZMod.addOrderOf_one]
#align zmod.add_order_of_coe ZMod.addOrderOf_coe

/-- This lemma works in the case in which `a ≠ 0`. The version where
`zmod n` is not infinite, i.e. `n ≠ 0`, is `add_order_of_coe`. -/
@[simp]
theorem addOrderOf_coe' {a : ℕ} (n : ℕ) (a0 : a ≠ 0) : addOrderOf (a : ZMod n) = n / n.gcd a := by
rw [← Nat.smul_one_eq_coe, add_orderOf_nsmul' _ a0, ZMod.addOrderOf_one]
rw [← Nat.smul_one_eq_coe, addOrderOf_nsmul' _ a0, ZMod.addOrderOf_one]
#align zmod.add_order_of_coe' ZMod.addOrderOf_coe'

/-- We have that `ring_char (zmod n) = n`. -/
Expand Down
2 changes: 1 addition & 1 deletion Mathbin/Dynamics/Ergodic/AddCircle.lean
Expand Up @@ -122,7 +122,7 @@ theorem ergodicZsmul {n : ℤ} (hn : 1 < |n|) : Ergodic fun y : AddCircle T => n
have hu₀ : ∀ j, addOrderOf (u j) = n.nat_abs ^ j := fun j =>
add_order_of_div_of_gcd_eq_one (pow_pos (pos_of_gt hn) j) (gcd_one_left _)
have hnu : ∀ j, n ^ j • u j = 0 := fun j => by
rw [← add_orderOf_dvd_iff_zsmul_eq_zero, hu₀, Int.coe_nat_pow, Int.coe_natAbs, ← abs_pow,
rw [← addOrderOf_dvd_iff_zsmul_eq_zero, hu₀, Int.coe_nat_pow, Int.coe_natAbs, ← abs_pow,
abs_dvd]
have hu₁ : ∀ j, (u j +ᵥ s : Set _) =ᵐ[volume] s := fun j => by
rw [vadd_eq_self_of_preimage_zsmul_eq_self hs' (hnu j)]
Expand Down
2 changes: 1 addition & 1 deletion Mathbin/GroupTheory/Exponent.lean
Expand Up @@ -233,7 +233,7 @@ theorem exponent_ne_zero_iff_range_orderOf_finite (h : ∀ g : G, 0 < orderOf g)
refine' ⟨fun he => _, fun he => _⟩
· by_contra h
obtain ⟨m, ⟨t, rfl⟩, het⟩ := Set.Infinite.exists_nat_lt h (exponent G)
exact pow_ne_one_of_lt_order_of' he het (pow_exponent_eq_one t)
exact pow_ne_one_of_lt_orderOf' he het (pow_exponent_eq_one t)
· lift Set.range orderOf to Finset ℕ using he with t ht
have htpos : 0 < t.prod id :=
by
Expand Down

0 comments on commit 0652cf4

Please sign in to comment.