Skip to content

Commit 81a9226

Browse files
committed
merge master
2 parents ba3e216 + 11bbb4e commit 81a9226

151 files changed

Lines changed: 1109 additions & 611 deletions

File tree

Some content is hidden

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

Mathlib.lean

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5439,6 +5439,7 @@ import Mathlib.RingTheory.LocalRing.RingHom.Basic
54395439
import Mathlib.RingTheory.LocalRing.Subring
54405440
import Mathlib.RingTheory.Localization.Algebra
54415441
import Mathlib.RingTheory.Localization.AsSubring
5442+
import Mathlib.RingTheory.Localization.AtPrime
54425443
import Mathlib.RingTheory.Localization.AtPrime.Basic
54435444
import Mathlib.RingTheory.Localization.Away.AdjoinRoot
54445445
import Mathlib.RingTheory.Localization.Away.Basic
@@ -6561,6 +6562,7 @@ import Mathlib.Topology.PreorderRestrict
65616562
import Mathlib.Topology.QuasiSeparated
65626563
import Mathlib.Topology.Semicontinuous
65636564
import Mathlib.Topology.SeparatedMap
6565+
import Mathlib.Topology.Separation.AlexandrovDiscrete
65646566
import Mathlib.Topology.Separation.Basic
65656567
import Mathlib.Topology.Separation.CompletelyRegular
65666568
import Mathlib.Topology.Separation.Connected

Mathlib/Algebra/AddConstMap/Basic.lean

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -265,8 +265,7 @@ protected theorem rel_map_of_Icc [AddCommGroup G] [LinearOrder G] [IsOrderedAddM
265265
-- If `R = (· < ·)`, then the proof looks like
266266
-- `f x < f (l + a) ≤ f (l + n • a) < f y`
267267
trans f (l + (1 : ℤ) • a)
268-
· rw [one_zsmul]
269-
exact hf x (Ico_subset_Icc_self hx) (l + a) (by simpa) hx.2
268+
· grind
270269
have hy : R (f (l + n • a)) (f y) := by
271270
rw [← sub_add_cancel y (n • a), map_add_zsmul, map_add_zsmul]
272271
refine hR _ <| hf _ ?_ _ (Ioc_subset_Icc_self hny) hny.1; simpa

Mathlib/Algebra/Algebra/Operations.lean

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -362,6 +362,9 @@ theorem algebraMap_mem (r : R) : algebraMap R A r ∈ (1 : Submodule R A) := by
362362
theorem mem_one {x : A} : x ∈ (1 : Submodule R A) ↔ ∃ y, algebraMap R A y = x := by
363363
simp [one_eq_range]
364364

365+
theorem smul_one_eq_span (x : A) : x • (1 : Submodule R A) = span R {x} := by
366+
rw [one_eq_span, smul_span, smul_set_singleton, smul_eq_mul, mul_one]
367+
365368
protected theorem map_one {A'} [Semiring A'] [Algebra R A'] (f : A →ₐ[R] A') :
366369
map f.toLinearMap (1 : Submodule R A) = 1 := by
367370
ext

Mathlib/Algebra/BigOperators/Associated.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ theorem Multiset.prod_primes_dvd [CancelCommMonoidWithZero M₀]
122122
| cons a s induct =>
123123
rw [Multiset.prod_cons]
124124
obtain ⟨k, rfl⟩ : a ∣ n := div a (Multiset.mem_cons_self a s)
125-
apply mul_dvd_mul_left a
125+
gcongr
126126
refine induct _ (fun a ha => h a (Multiset.mem_cons_of_mem ha)) (fun b b_in_s => ?_)
127127
fun a => (Multiset.countP_le_of_le _ (Multiset.le_cons_self _ _)).trans (uniq a)
128128
have b_div_n := div b (Multiset.mem_cons_of_mem b_in_s)

Mathlib/Algebra/BigOperators/Finsupp/Basic.lean

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -112,9 +112,7 @@ theorem prod_ite_eq' [DecidableEq α] (f : α →₀ M) (a : α) (b : α → M
112112
/-- A restatement of `sum_ite_self_eq` with the equality test reversed. -/
113113
theorem sum_ite_self_eq' [DecidableEq α] {N : Type*} [AddCommMonoid N] (f : α →₀ N) (a : α) :
114114
(f.sum fun x v => ite (x = a) v 0) = f a := by
115-
classical
116-
convert f.sum_ite_eq' a fun _ => id
117-
simp [ite_eq_right_iff.2 Eq.symm]
115+
simp
118116

119117
@[to_additive (attr := simp)]
120118
theorem prod_pow [Fintype α] (f : α →₀ ℕ) (g : α → N) :

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

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -830,10 +830,8 @@ theorem prod_unique_nonempty [Unique ι] (s : Finset ι) (f : ι → M) (h : s.N
830830
rw [h.eq_singleton_default, Finset.prod_singleton]
831831

832832
lemma prod_dvd_prod_of_dvd (f g : ι → M) (h : ∀ i ∈ s, f i ∣ g i) :
833-
∏ i ∈ s, f i ∣ ∏ i ∈ s, g i := by
834-
induction s using Finset.cons_induction with
835-
| empty => simp
836-
| cons a T haT IH => grind [mul_dvd_mul]
833+
∏ i ∈ s, f i ∣ ∏ i ∈ s, g i :=
834+
Multiset.prod_dvd_prod_of_dvd _ _ h
837835

838836
end CommMonoid
839837

Mathlib/Algebra/ContinuedFractions/ConvergentsEquiv.lean

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -304,8 +304,7 @@ theorem succ_nth_conv_eq_squashGCF_nth_conv [Field K]
304304
(contsAux_eq_contsAux_squashGCF_of_le n'.le_succ).symm]
305305
symm
306306
simpa only [eq1, eq2, eq3, eq4, mul_div_cancel_right₀ _ b_ne_zero]
307-
field_simp
308-
congr 1 <;> ring
307+
grind
309308

310309
end Squash
311310

@@ -350,9 +349,7 @@ theorem convs_eq_convs' [Field K] [LinearOrder K] [IsStrictOrderedRing K]
350349
suffices 0 < gp_m.a ∧ 0 < gp_m.b + gp_succ_m.a / gp_succ_m.b by
351350
have ot : g'.s.get? m = some ⟨gp_m.a, gp_m.b + gp_succ_m.a / gp_succ_m.b⟩ :=
352351
squashSeq_nth_of_not_terminated mth_s_eq s_succ_mth_eq
353-
have : gp' = ⟨gp_m.a, gp_m.b + gp_succ_m.a / gp_succ_m.b⟩ := by
354-
simp_all only [Option.some.injEq]
355-
rwa [this]
352+
grind
356353
have m_lt_n : m < m.succ := Nat.lt_succ_self m
357354
refine ⟨(s_pos (Nat.lt.step m_lt_n) mth_s_eq).left, ?_⟩
358355
refine add_pos (s_pos (Nat.lt.step m_lt_n) mth_s_eq).right ?_

Mathlib/Algebra/ContinuedFractions/Determinant.lean

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -60,10 +60,7 @@ theorem determinant_aux (hyp : n = 0 ∨ ¬(↑s : GenContFract K).TerminatedAt
6060
rw [gp_a_eq_one, this.symm]
6161
ring
6262
suffices pA * ppB - pB * ppA = (-1) ^ (n + 1) by grind
63-
suffices ppA * pB - ppB * pA = (-1) ^ n by
64-
have pow_succ_n : (-1 : K) ^ (n + 1) = -1 * (-1) ^ n := pow_succ' (-1) n
65-
rw [pow_succ_n, ← this]
66-
ring
63+
suffices ppA * pB - ppB * pA = (-1) ^ n by grind
6764
exact IH <| Or.inr <| mt (terminated_stable <| n.sub_le 1) not_terminated_at_n
6865

6966
/-- The determinant formula `Aₙ * Bₙ₊₁ - Bₙ * Aₙ₊₁ = (-1)^(n + 1)`. -/

Mathlib/Algebra/Divisibility/Basic.lean

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -187,11 +187,9 @@ section CommMonoid
187187

188188
variable [CommMonoid α] {a b : α}
189189

190-
@[gcongr]
191-
theorem mul_dvd_mul_right (h : a ∣ b) (c : α) : a * c ∣ b * c :=
192-
mul_dvd_mul h (dvd_refl c)
190+
theorem mul_dvd_mul_right (h : a ∣ b) (c : α) : a * c ∣ b * c := by
191+
gcongr
193192

194-
@[gcongr]
195193
theorem pow_dvd_pow_of_dvd (h : a ∣ b) (n : ℕ) : a ^ n ∣ b ^ n := by
196194
induction n with
197195
| zero => simp
@@ -201,6 +199,6 @@ theorem pow_dvd_pow_of_dvd (h : a ∣ b) (n : ℕ) : a ^ n ∣ b ^ n := by
201199

202200
@[gcongr]
203201
lemma pow_dvd_pow_of_dvd_of_le {m n : ℕ} (hab : a ∣ b) (hmn : m ≤ n) : a ^ m ∣ b ^ n := by
204-
trans (a ^ n) <;> gcongr
202+
trans (a ^ n) <;> [gcongr; apply_rules [pow_dvd_pow_of_dvd]]
205203

206204
end CommMonoid

Mathlib/Algebra/Divisibility/Hom.lean

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ attribute [local simp] mul_assoc mul_comm mul_left_comm
2323

2424
variable {M N : Type*}
2525

26+
@[gcongr]
2627
theorem map_dvd [Semigroup M] [Semigroup N] {F : Type*} [FunLike F M N] [MulHomClass F M N]
2728
(f : F) {a b} : a ∣ b → f a ∣ f b
2829
| ⟨c, h⟩ => ⟨f c, h.symm ▸ map_mul f a c⟩

0 commit comments

Comments
 (0)