Skip to content

Commit bb09da0

Browse files
Update lean-toolchain for leanprover/lean4#10967
2 parents 8d21653 + daa2157 commit bb09da0

File tree

98 files changed

+1788
-505
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

98 files changed

+1788
-505
lines changed

Cache/IO.lean

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,9 @@ def isPartOfMathlibCache (mod : Name) : Bool := #[
4141
-- Allow PRs to upload oleans for Reap for testing.
4242
`Requests,
4343
`OpenAIClient,
44-
`Reap,].contains mod.getRoot
44+
`Reap,
45+
-- Allow PRs to upload oleans for Canonical for testing.
46+
`Canonical,].contains mod.getRoot
4547

4648
/-- Target directory for caching -/
4749
initialize CACHEDIR : FilePath ← do

Mathlib.lean

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2833,6 +2833,7 @@ import Mathlib.CategoryTheory.Sites.Hypercover.Homotopy
28332833
import Mathlib.CategoryTheory.Sites.Hypercover.IsSheaf
28342834
import Mathlib.CategoryTheory.Sites.Hypercover.One
28352835
import Mathlib.CategoryTheory.Sites.Hypercover.Zero
2836+
import Mathlib.CategoryTheory.Sites.Hypercover.ZeroFamily
28362837
import Mathlib.CategoryTheory.Sites.IsSheafFor
28372838
import Mathlib.CategoryTheory.Sites.JointlySurjective
28382839
import Mathlib.CategoryTheory.Sites.LeftExact
@@ -3650,6 +3651,7 @@ import Mathlib.Data.Rat.Cardinal
36503651
import Mathlib.Data.Rat.Cast.CharZero
36513652
import Mathlib.Data.Rat.Cast.Defs
36523653
import Mathlib.Data.Rat.Cast.Lemmas
3654+
import Mathlib.Data.Rat.Cast.OfScientific
36533655
import Mathlib.Data.Rat.Cast.Order
36543656
import Mathlib.Data.Rat.Defs
36553657
import Mathlib.Data.Rat.Denumerable
@@ -5384,6 +5386,7 @@ import Mathlib.Probability.Independence.InfinitePi
53845386
import Mathlib.Probability.Independence.Integrable
53855387
import Mathlib.Probability.Independence.Integration
53865388
import Mathlib.Probability.Independence.Kernel
5389+
import Mathlib.Probability.Independence.Process
53875390
import Mathlib.Probability.Independence.ZeroOne
53885391
import Mathlib.Probability.Integration
53895392
import Mathlib.Probability.Kernel.Basic

Mathlib/Algebra/Group/Action/Defs.lean

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -584,7 +584,7 @@ class IsLeftCancelSMul [SMul G P] : Prop where
584584

585585
@[to_additive]
586586
lemma IsLeftCancelSMul.left_cancel {G P} [SMul G P] [IsLeftCancelSMul G P] (a : G) (b c : P) :
587-
a • b = a • c → b = c := IsLeftCancelSMul.left_cancel' a b c
587+
a • b = a • c → b = c := IsLeftCancelSMul.left_cancel' a b c
588588

589589
@[to_additive]
590590
instance [LeftCancelMonoid G] : IsLeftCancelSMul G G where
@@ -601,11 +601,11 @@ class IsCancelSMul [SMul G P] : Prop extends IsLeftCancelSMul G P where
601601

602602
@[to_additive]
603603
lemma IsCancelSMul.left_cancel {G P} [SMul G P] [IsCancelSMul G P] (a : G) (b c : P) :
604-
a • b = a • c → b = c := IsLeftCancelSMul.left_cancel' a b c
604+
a • b = a • c → b = c := IsLeftCancelSMul.left_cancel' a b c
605605

606606
@[to_additive]
607607
lemma IsCancelSMul.right_cancel {G P} [SMul G P] [IsCancelSMul G P] (a b : G) (c : P) :
608-
a • c = b • c → a = b := IsCancelSMul.right_cancel' a b c
608+
a • c = b • c → a = b := IsCancelSMul.right_cancel' a b c
609609

610610
@[to_additive]
611611
instance [CancelMonoid G] : IsCancelSMul G G where

Mathlib/Algebra/Group/Basic.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ import Mathlib.Tactic.SplitIfs
1515
1616
This file lists various basic lemmas about semigroups, monoids, and groups. Most proofs are
1717
one-liners from the corresponding axioms. For the definitions of semigroups, monoids and groups, see
18-
`Algebra/Group/Defs.lean`.
18+
`Mathlib/Algebra/Group/Defs.lean`.
1919
-/
2020

2121
assert_not_exists MonoidWithZero DenselyOrdered

Mathlib/Algebra/Group/Torsion.lean

Lines changed: 29 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -35,19 +35,27 @@ lemma pow_left_injective (hn : n ≠ 0) : Injective fun a : M ↦ a ^ n :=
3535
@[to_additive nsmul_right_inj]
3636
lemma pow_left_inj (hn : n ≠ 0) : a ^ n = b ^ n ↔ a = b := (pow_left_injective hn).eq_iff
3737

38-
@[to_additive]
39-
lemma IsMulTorsionFree.pow_eq_one_iff (hn : n ≠ 0) : a ^ n = 1 ↔ a = 1 :=
40-
fun h ↦ by rwa [← pow_left_inj hn, one_pow], fun h ↦ by rw [h, one_pow]
38+
@[to_additive IsAddTorsionFree.nsmul_eq_zero_iff_right]
39+
lemma IsMulTorsionFree.pow_eq_one_iff_left (hn : n ≠ 0) : a ^ n = 1 ↔ a = 1 := by
40+
rw [← pow_left_inj (a := a) hn, one_pow]
4141

42-
@[to_additive]
43-
lemma IsMulTorsionFree.pow_eq_one_iff' (ha : a ≠ 1) : a ^ n = 1 ↔ n = 0 := by
44-
refine ⟨fun h ↦ ?_, fun h ↦ by rw [h, pow_zero]⟩
45-
by_contra h'
46-
simpa [h] using (pow_left_injective h').ne ha
42+
-- We want to use `IsAddTorsion.nsmul_eq_zero_iff` earlier than `smul_eq_zero`.
43+
@[to_additive (attr := simp high)]
44+
lemma IsMulTorsionFree.pow_eq_one_iff : a ^ n = 1 ↔ a = 1 ∨ n = 0 := by
45+
obtain rfl | hn := eq_or_ne n 0 <;> simp [pow_eq_one_iff_left, *]
46+
47+
@[to_additive IsAddTorsionFree.nsmul_eq_zero_iff_left]
48+
lemma IsMulTorsionFree.pow_eq_one_iff_right (ha : a ≠ 1) : a ^ n = 1 ↔ n = 0 := by simp [*]
49+
50+
@[deprecated (since := "2025-10-19")]
51+
alias IsAddTorsionFree.nsmul_eq_zero_iff' := IsAddTorsionFree.nsmul_eq_zero_iff_left
52+
53+
@[deprecated (since := "2025-10-19")]
54+
alias IsMulTorsionFree.pow_eq_one_iff' := IsMulTorsionFree.pow_eq_one_iff_right
4755

4856
/-- See `sq_eq_one_iff` for a version that holds in rings. -/
4957
@[to_additive two_nsmul_eq_zero]
50-
lemma sq_eq_one : a ^ 2 = 1 ↔ a = 1 := IsMulTorsionFree.pow_eq_one_iff (by cutsat)
58+
lemma sq_eq_one : a ^ 2 = 1 ↔ a = 1 := IsMulTorsionFree.pow_eq_one_iff_left (by cutsat)
5159

5260
end Monoid
5361

@@ -69,6 +77,18 @@ lemma zpow_left_inj (hn : n ≠ 0) : a ^ n = b ^ n ↔ a = b := (zpow_left_injec
6977
and `zsmul_lt_zsmul_iff'`. -/]
7078
lemma zpow_eq_zpow_iff' (hn : n ≠ 0) : a ^ n = b ^ n ↔ a = b := zpow_left_inj hn
7179

80+
@[to_additive IsAddTorsionFree.zsmul_eq_zero_iff_right]
81+
lemma IsMulTorsionFree.zpow_eq_one_iff_left (hn : n ≠ 0) : a ^ n = 1 ↔ a = 1 := by
82+
rw [← zpow_left_inj (a := a) hn, one_zpow]
83+
84+
-- We want to use `IsAddTorsion.zsmul_eq_zero_iff` earlier than `smul_eq_zero`.
85+
@[to_additive (attr := simp high)]
86+
lemma IsMulTorsionFree.zpow_eq_one_iff : a ^ n = 1 ↔ a = 1 ∨ n = 0 := by
87+
obtain rfl | hn := eq_or_ne n 0 <;> simp [zpow_eq_one_iff_left, *]
88+
89+
@[to_additive IsAddTorsionFree.zsmul_eq_zero_iff_left]
90+
lemma IsMulTorsionFree.zpow_eq_one_iff_right (ha : a ≠ 1) : a ^ n = 1 ↔ n = 0 := by simp [*]
91+
7292
@[to_additive] lemma self_eq_inv : a = a⁻¹ ↔ a = 1 := by rw [← sq_eq_one, sq, mul_eq_one_iff_eq_inv]
7393
@[to_additive] lemma inv_eq_self : a⁻¹ = a ↔ a = 1 := by rw [eq_comm, self_eq_inv]
7494
@[to_additive] lemma self_ne_inv : a ≠ a⁻¹ ↔ a ≠ 1 := self_eq_inv.ne

Mathlib/Algebra/GroupWithZero/Torsion.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ instance : IsMulTorsionFree M := by
3737
← associated_iff_normalizedFactors_eq_normalizedFactors hx hy] at this
3838
replace hx : IsLeftRegular (x ^ n) := (IsLeftCancelMulZero.mul_left_cancel_of_ne_zero hx).pow n
3939
rw [← hu, mul_pow, eq_comm, IsLeftRegular.mul_left_eq_self_iff hx, ← Units.val_pow_eq_pow_val,
40-
Units.val_eq_one, IsMulTorsionFree.pow_eq_one_iff hn] at hxy
40+
Units.val_eq_one, IsMulTorsionFree.pow_eq_one_iff_left hn] at hxy
4141
rwa [hxy, Units.val_one, mul_one] at hu
4242

4343
end UniqueFactorizationMonoid

Mathlib/Algebra/Lie/Abelian.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ theorem Function.Injective.isLieAbelian {R : Type u} {L₁ : Type v} {L₂ : Typ
6464
calc
6565
f ⁅x, y⁆ = ⁅f x, f y⁆ := LieHom.map_lie f x y
6666
_ = 0 := trivial_lie_zero _ _ _ _
67-
_ = f 0 := f.toLinearMap.map_zero.symm}
67+
_ = f 0 := (map_zero _).symm}
6868

6969
theorem Function.Surjective.isLieAbelian {R : Type u} {L₁ : Type v} {L₂ : Type w} [CommRing R]
7070
[LieRing L₁] [LieRing L₂] [LieAlgebra R L₁] [LieAlgebra R L₂] {f : L₁ →ₗ⁅R⁆ L₂}

Mathlib/Algebra/Lie/Basic.lean

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -568,9 +568,9 @@ theorem coe_injective : @Injective (L₁ ≃ₗ⁅R⁆ L₂) (L₁ → L₂) (
568568

569569
instance : LinearEquivClass (L₁ ≃ₗ⁅R⁆ L₂) R L₁ L₂ where
570570
map_add _ _ _ := by
571-
rw [← @coe_toLinearEquiv, map_add]
571+
rw [← coe_toLinearEquiv, map_add]
572572
map_smulₛₗ _ _ _ := by
573-
rw [← @coe_toLinearEquiv, map_smul, RingHom.id_apply]
573+
rw [← coe_toLinearEquiv, map_smul, RingHom.id_apply]
574574

575575
@[ext]
576576
theorem ext {f g : L₁ ≃ₗ⁅R⁆ L₂} (h : ∀ x, f x = g x) : f = g :=

Mathlib/Algebra/Lie/Character.lean

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -48,11 +48,14 @@ theorem lieCharacter_apply_of_mem_derived (χ : LieCharacter R L) {x : L}
4848
(h : x ∈ derivedSeries R L 1) : χ x = 0 := by
4949
rw [derivedSeries_def, derivedSeriesOfIdeal_succ, derivedSeriesOfIdeal_zero, ←
5050
LieSubmodule.mem_toSubmodule, LieSubmodule.lieIdeal_oper_eq_linear_span] at h
51-
refine Submodule.span_induction ?_ ?_ ?_ ?_ h
52-
· rintro y ⟨⟨z, hz⟩, ⟨⟨w, hw⟩, rfl⟩⟩; apply lieCharacter_apply_lie
53-
· exact χ.toLinearMap.map_zero
54-
· intro y z _ _ hy hz; rw [map_add, hy, hz, add_zero]
55-
· intro t y _ hy; rw [map_smul, hy, smul_zero]
51+
induction h using Submodule.span_induction with
52+
| mem y h =>
53+
simp only [Subtype.exists, LieSubmodule.mem_top, exists_const, Set.mem_setOf_eq] at h
54+
obtain ⟨z, w, rfl⟩ := h
55+
exact lieCharacter_apply_lie ..
56+
| zero => exact map_zero _
57+
| add y z _ _ hy hz => rw [map_add, hy, hz, add_zero]
58+
| smul t y _ hy => rw [map_smul, hy, smul_zero]
5659

5760
/-- For an Abelian Lie algebra, characters are just linear forms. -/
5861
@[simps! apply symm_apply]

Mathlib/Algebra/Lie/Weights/IsSimple.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,7 @@ private theorem invtSubmoduleToLieIdeal_aux (hm_α : m_α ∈ sl2SubmoduleOfRoot
211211
· have hx_χ_in_H : x_χ ∈ H.toLieSubmodule := by
212212
rw [← rootSpace_zero_eq K L H]
213213
convert hx_χ; ext h; simp only [Pi.zero_apply]
214-
have h_apply : (χ.toLinear : H → K) h = 0 := by rw [w_chi]; rfl
214+
have h_apply : (χ.toLinear : H → K) h = 0 := by rw [w_chi, LinearMap.zero_apply]
215215
exact h_apply.symm
216216
apply LieSubmodule.mem_iSup_of_mem ⟨α, hαq, hα₀⟩
217217
rw [← (by rfl : ⁅(⟨x_χ, hx_χ_in_H⟩ : H), m_α⁆ = ⁅x_χ, m_α⁆)]

0 commit comments

Comments
 (0)