Skip to content

Commit 004f545

Browse files
committed
merge master
2 parents 12ba7ac + 6437a62 commit 004f545

File tree

33 files changed

+597
-60
lines changed

33 files changed

+597
-60
lines changed

Mathlib.lean

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2128,6 +2128,7 @@ import Mathlib.CategoryTheory.Iso
21282128
import Mathlib.CategoryTheory.IsomorphismClasses
21292129
import Mathlib.CategoryTheory.Join.Basic
21302130
import Mathlib.CategoryTheory.Join.Final
2131+
import Mathlib.CategoryTheory.Join.Opposites
21312132
import Mathlib.CategoryTheory.Join.Sum
21322133
import Mathlib.CategoryTheory.LiftingProperties.Adjunction
21332134
import Mathlib.CategoryTheory.LiftingProperties.Basic
@@ -6093,6 +6094,7 @@ import Mathlib.Topology.CompactOpen
60936094
import Mathlib.Topology.Compactification.OnePoint
60946095
import Mathlib.Topology.Compactification.OnePoint.Basic
60956096
import Mathlib.Topology.Compactification.OnePoint.ProjectiveLine
6097+
import Mathlib.Topology.Compactification.OnePoint.Sphere
60966098
import Mathlib.Topology.Compactification.OnePointEquiv
60976099
import Mathlib.Topology.Compactness.Bases
60986100
import Mathlib.Topology.Compactness.Compact

Mathlib/Algebra/BigOperators/Group/Finset/Basic.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ theorem prod_pair [DecidableEq ι] {a b : ι} (h : a ≠ b) :
7272

7373
@[to_additive (attr := simp)]
7474
theorem prod_image [DecidableEq ι] {s : Finset κ} {g : κ → ι} :
75-
(∀ x ∈ s, ∀ y ∈ s, g x = g y → x = y) → ∏ x ∈ s.image g, f x = ∏ x ∈ s, f (g x) :=
75+
Set.InjOn g s → ∏ x ∈ s.image g, f x = ∏ x ∈ s, f (g x) :=
7676
fold_image
7777

7878
@[to_additive]

Mathlib/Algebra/BigOperators/Group/Finset/Preimage.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ lemma prod_preimage' (f : ι → κ) [DecidablePred (· ∈ Set.range f)] (s : F
2626
classical
2727
calc
2828
∏ x ∈ preimage s f hf, g (f x) = ∏ x ∈ image f (preimage s f hf), g x :=
29-
Eq.symm <| prod_image <| by simpa only [mem_preimage, Set.InjOn] using hf
29+
Eq.symm <| prod_image <| by simpa [mem_preimage, Set.InjOn] using hf
3030
_ = ∏ x ∈ s with x ∈ Set.range f, g x := by rw [image_preimage]
3131

3232
@[to_additive]

Mathlib/Algebra/BigOperators/Intervals.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ theorem prod_Ico_reflect (f : ℕ → M) (k : ℕ) {m n : ℕ} (h : m ≤ n + 1)
147147
rcases lt_or_le k m with hkm | hkm
148148
· rw [← Nat.Ico_image_const_sub_eq_Ico (this _ hkm)]
149149
refine (prod_image ?_).symm
150-
simp only [mem_Ico]
150+
simp only [mem_Ico, Set.InjOn, mem_coe]
151151
rintro i ⟨_, im⟩ j ⟨_, jm⟩ Hij
152152
rw [← tsub_tsub_cancel_of_le (this _ im), Hij, tsub_tsub_cancel_of_le (this _ jm)]
153153
· have : n + 1 - k ≤ n + 1 - m := by

Mathlib/Algebra/CharP/Invertible.lean

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -67,9 +67,8 @@ theorem CharP.isUnit_intCast_iff {z : ℤ} (hp : p.Prime) : IsUnit (z : R) ↔
6767

6868
end Ring
6969

70-
section Field
71-
72-
variable [Field K]
70+
section Semifield
71+
variable [Semifield K]
7372

7473
/-- A natural number `t` is invertible in a field `K` if the characteristic of `K` does not divide
7574
`t`. -/
@@ -90,11 +89,10 @@ def invertibleOfCharPNotDvd {p : ℕ} [CharP K p] {t : ℕ} (not_dvd : ¬p ∣ t
9089
instance invertibleOfPos [CharZero K] (n : ℕ) [NeZero n] : Invertible (n : K) :=
9190
invertibleOfNonzero <| NeZero.out
9291

93-
end Field
94-
95-
section DivisionRing
92+
end Semifield
9693

97-
variable [DivisionRing K] [CharZero K]
94+
section DivisionSemiring
95+
variable [DivisionSemiring K] [CharZero K]
9896

9997
instance invertibleSucc (n : ℕ) : Invertible (n.succ : K) :=
10098
invertibleOfNonzero (Nat.cast_ne_zero.mpr (Nat.succ_ne_zero _))
@@ -111,4 +109,4 @@ instance invertibleTwo : Invertible (2 : K) :=
111109
instance invertibleThree : Invertible (3 : K) :=
112110
invertibleOfNonzero (mod_cast (by decide : 30))
113111

114-
end DivisionRing
112+
end DivisionSemiring

Mathlib/Algebra/Group/Submonoid/Basic.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -302,7 +302,7 @@ theorem disjoint_def' {p₁ p₂ : Submonoid M} :
302302

303303
variable {t : Set M}
304304

305-
@[to_additive (attr := simp)]
305+
@[to_additive] -- this must not be a simp-lemma as the conclusion applies to `hts`, causing loops
306306
lemma closure_sdiff_eq_closure (hts : t ⊆ closure (s \ t)) : closure (s \ t) = closure s := by
307307
refine (closure_mono Set.diff_subset).antisymm <| closure_le.mpr <| fun x hxs ↦ ?_
308308
by_cases hxt : x ∈ t

Mathlib/Algebra/GroupWithZero/Basic.lean

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -262,14 +262,14 @@ theorem GroupWithZero.mul_left_injective (h : x ≠ 0) :
262262
Function.Injective fun y => y * x := fun y y' w => by
263263
simpa only [mul_assoc, mul_inv_cancel₀ h, mul_one] using congr_arg (fun y => y * x⁻¹) w
264264

265-
@[simp]
265+
@[simp high] -- should take priority over `IsUnit.mul_inv_cancel_right`
266266
theorem inv_mul_cancel_right₀ (h : b ≠ 0) (a : G₀) : a * b⁻¹ * b = a :=
267267
calc
268268
a * b⁻¹ * b = a * (b⁻¹ * b) := mul_assoc _ _ _
269269
_ = a := by simp [h]
270270

271271

272-
@[simp]
272+
@[simp high] -- should take priority over `IsUnit.mul_inv_cancel_left`
273273
theorem inv_mul_cancel_left₀ (h : a ≠ 0) (b : G₀) : a⁻¹ * (a * b) = b :=
274274
calc
275275
a⁻¹ * (a * b) = a⁻¹ * a * b := (mul_assoc _ _ _).symm

Mathlib/Algebra/GroupWithZero/Defs.lean

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,7 @@ variable [GroupWithZero G₀] {a : G₀}
205205

206206
@[simp] lemma inv_zero : (0 : G₀)⁻¹ = 0 := GroupWithZero.inv_zero
207207

208-
@[simp]
208+
@[simp high] -- should take priority over `IsUnit.mul_inv_cancel`
209209
lemma mul_inv_cancel₀ (h : a ≠ 0) : a * a⁻¹ = 1 := GroupWithZero.mul_inv_cancel a h
210210

211211
-- See note [lower instance priority]
@@ -232,13 +232,13 @@ section GroupWithZero
232232

233233
variable [GroupWithZero G₀] {a b : G₀}
234234

235-
@[simp]
235+
@[simp high] -- should take priority over `IsUnit.mul_inv_cancel_right`
236236
theorem mul_inv_cancel_right₀ (h : b ≠ 0) (a : G₀) : a * b * b⁻¹ = a :=
237237
calc
238238
a * b * b⁻¹ = a * (b * b⁻¹) := mul_assoc _ _ _
239239
_ = a := by simp [h]
240240

241-
@[simp]
241+
@[simp high] -- should take priority over `IsUnit.mul_inv_cancel_left`
242242
theorem mul_inv_cancel_left₀ (h : a ≠ 0) (b : G₀) : a * (a⁻¹ * b) = b :=
243243
calc
244244
a * (a⁻¹ * b) = a * a⁻¹ * b := (mul_assoc _ _ _).symm

Mathlib/Algebra/GroupWithZero/NeZero.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ theorem inv_ne_zero (h : a ≠ 0) : a⁻¹ ≠ 0 := fun a_eq_0 => by
4848
have := mul_inv_cancel₀ h
4949
simp only [a_eq_0, mul_zero, zero_ne_one] at this
5050

51-
@[simp]
51+
@[simp high] -- should take priority over `IsUnit.inv_mul_cancel`
5252
theorem inv_mul_cancel₀ (h : a ≠ 0) : a⁻¹ * a = 1 :=
5353
calc
5454
a⁻¹ * a = a⁻¹ * a * a⁻¹ * a⁻¹⁻¹ := by simp [inv_ne_zero h]

Mathlib/Algebra/Homology/DifferentialObject.lean

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,14 +41,18 @@ abbrev objEqToHom {i j : β} (h : i = j) :
4141
theorem objEqToHom_refl (i : β) : X.objEqToHom (refl i) = 𝟙 _ :=
4242
rfl
4343

44-
@[reassoc (attr := simp)]
44+
-- Removing `@[simp]`, because it is in the opposite direction of `eqToHom_naturality`.
45+
-- Having both causes an infinite loop in the simpNF linter.
46+
@[reassoc]
4547
theorem objEqToHom_d {x y : β} (h : x = y) :
4648
X.objEqToHom h ≫ X.d y = X.d x ≫ X.objEqToHom (by cases h; rfl) := by cases h; simp
4749

4850
@[reassoc (attr := simp)]
4951
theorem d_squared_apply {x : β} : X.d x ≫ X.d _ = 0 := congr_fun X.d_squared _
5052

51-
@[reassoc (attr := simp)]
53+
-- Removing `@[simp]`, because it is in the opposite direction of `eqToHom_naturality`.
54+
-- Having both causes an infinite loop in the simpNF linter.
55+
@[reassoc]
5256
theorem eqToHom_f' {X Y : DifferentialObject ℤ (GradedObjectWithShift b V)} (f : X ⟶ Y) {x y : β}
5357
(h : x = y) : X.objEqToHom h ≫ f.f y = f.f x ≫ Y.objEqToHom h := by cases h; simp
5458

@@ -79,7 +83,7 @@ def dgoToHomologicalComplex :
7983
shape := fun i j w => by dsimp at w; convert dif_neg w
8084
d_comp_d' := fun i j k hij hjk => by
8185
dsimp at hij hjk; substs hij hjk
82-
simp }
86+
simp [objEqToHom_d_assoc] }
8387
map {X Y} f :=
8488
{ f := f.f
8589
comm' := fun i j h => by

0 commit comments

Comments
 (0)