Skip to content

Commit e3d2520

Browse files
committed
test resolve conflict: Prod.lean, MulAntidiagonal.lean, HahnSeries/Multiplication.lean
1 parent 800c1ac commit e3d2520

File tree

2 files changed

+17
-15
lines changed

2 files changed

+17
-15
lines changed

Mathlib/Data/Finset/MulAntidiagonal.lean

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,8 @@ noncomputable def mulAntidiagonal : Finset (α × α) :=
6666
variable {hs ht a} {u : Set α} {hu : u.IsPWO} {x : α × α}
6767

6868
@[to_additive (attr := simp)]
69-
theorem mem_mulAntidiagonal : x ∈ mulAntidiagonal hs ht a ↔ x.1 ∈ s ∧ x.2 ∈ t ∧ x.1 * x.2 = a := by
69+
theorem mem_setMulAntidiagonal :
70+
x ∈ mulAntidiagonal hs ht a ↔ x.1 ∈ s ∧ x.2 ∈ t ∧ x.1 * x.2 = a := by
7071
simp only [mulAntidiagonal, Set.Finite.mem_toFinset, Set.mem_mulAntidiagonal]
7172

7273
@[to_additive]
@@ -79,14 +80,14 @@ theorem mulAntidiagonal_mono_right (h : u ⊆ t) :
7980
Set.Finite.toFinset_mono <| Set.mulAntidiagonal_mono_right h
8081

8182
@[to_additive]
82-
theorem swap_mem_mulAntidiagonal :
83+
theorem swap_mem_setMulAntidiagonal :
8384
x.swap ∈ Finset.mulAntidiagonal hs ht a ↔ x ∈ Finset.mulAntidiagonal ht hs a := by
8485
simp
8586

8687
@[to_additive]
8788
theorem support_mulAntidiagonal_subset_mul : { a | (mulAntidiagonal hs ht a).Nonempty } ⊆ s * t :=
8889
fun a ⟨b, hb⟩ => by
89-
rw [mem_mulAntidiagonal] at hb
90+
rw [mem_setMulAntidiagonal] at hb
9091
exact ⟨b.1, hb.1, b.2, hb.2
9192

9293
@[to_additive]
@@ -98,7 +99,7 @@ theorem mulAntidiagonal_min_mul_min {α} [CommMonoid α] [LinearOrder α] [IsOrd
9899
{s t : Set α} (hs : s.IsWF) (ht : t.IsWF) (hns : s.Nonempty) (hnt : t.Nonempty) :
99100
mulAntidiagonal hs.isPWO ht.isPWO (hs.min hns * ht.min hnt) = {(hs.min hns, ht.min hnt)} := by
100101
ext ⟨a, b⟩
101-
simp only [mem_mulAntidiagonal, mem_singleton, Prod.ext_iff]
102+
simp only [mem_setMulAntidiagonal, mem_singleton, Prod.ext_iff]
102103
constructor
103104
· rintro ⟨has, hat, hst⟩
104105
obtain rfl :=

Mathlib/RingTheory/HahnSeries/Multiplication.lean

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -413,9 +413,9 @@ protected lemma map_mul [NonUnitalNonAssocSemiring R] [NonUnitalNonAssocSemiring
413413
ext
414414
simp only [map_coeff, coeff_mul, map_sum, map_mul]
415415
refine Eq.symm (sum_subset (fun gh hgh => ?_) (fun gh hgh hz => ?_))
416-
· simp_all only [mem_addAntidiagonal, mem_support, map_coeff, ne_eq, and_true]
416+
· simp_all only [mem_setAddAntidiagonal, mem_support, map_coeff, ne_eq, and_true]
417417
exact ⟨fun h => hgh.1 (map_zero f ▸ congrArg f h), fun h => hgh.2.1 (map_zero f ▸ congrArg f h)⟩
418-
· simp_all only [mem_addAntidiagonal, mem_support, ne_eq, map_coeff, and_true,
418+
· simp_all only [mem_setAddAntidiagonal, mem_support, ne_eq, map_coeff, and_true,
419419
not_and, not_not]
420420
by_cases h : f (x.coeff gh.1) = 0
421421
· exact mul_eq_zero_of_left h (f (y.coeff gh.2))
@@ -458,14 +458,14 @@ theorem coeff_mul_single_add [NonUnitalNonAssocSemiring R] {r : R} {x : R⟦Γ
458458
rw [sum_congr _ fun _ _ => rfl, sum_empty]
459459
ext ⟨a1, a2⟩
460460
simp only [notMem_empty, not_and, Set.mem_singleton_iff,
461-
mem_addAntidiagonal, iff_false]
461+
mem_setAddAntidiagonal, iff_false]
462462
rintro h2 rfl h1
463463
rw [← add_right_cancel h1] at hx
464464
exact h2 hx
465465
trans ∑ ij ∈ {(a, b)}, x.coeff ij.fst * (single b r).coeff ij.snd
466466
· apply sum_congr _ fun _ _ => rfl
467467
ext ⟨a1, a2⟩
468-
simp only [Set.mem_singleton_iff, Prod.mk_inj, mem_addAntidiagonal, mem_singleton]
468+
simp only [Set.mem_singleton_iff, Prod.mk_inj, mem_setAddAntidiagonal, mem_singleton]
469469
constructor
470470
· rintro ⟨_, rfl, h1⟩
471471
exact ⟨add_right_cancel h1, rfl⟩
@@ -629,7 +629,8 @@ instance [NonUnitalCommSemiring R] : NonUnitalCommSemiring R⟦Γ⟧ where
629629
mul_comm x y := by
630630
ext
631631
simp_rw [coeff_mul, mul_comm]
632-
exact Finset.sum_equiv (Equiv.prodComm _ _) (fun _ ↦ swap_mem_addAntidiagonal.symm) <| by simp
632+
exact Finset.sum_equiv (Equiv.prodComm _ _)
633+
(fun _ ↦ swap_mem_setAddAntidiagonal.symm) <| by simp
633634

634635
instance [CommSemiring R] : CommSemiring R⟦Γ⟧ where
635636
instance [NonUnitalNonAssocRing R] : NonUnitalNonAssocRing R⟦Γ⟧ where
@@ -786,7 +787,7 @@ theorem single_mul_single {a b : Γ} {r s : R} :
786787
· rw [h, coeff_mul_single_add]
787788
simp
788789
· rw [coeff_single_of_ne h, coeff_mul, sum_eq_zero]
789-
simp_rw [mem_addAntidiagonal]
790+
simp_rw [mem_setAddAntidiagonal]
790791
rintro ⟨y, z⟩ ⟨hy, hz, rfl⟩
791792
rw [eq_of_mem_support_single hy, eq_of_mem_support_single hz] at h
792793
exact (h rfl).elim
@@ -875,17 +876,17 @@ theorem embDomain_mul [NonUnitalNonAssocSemiring R] (f : Γ ↪o Γ')
875876
· simp
876877
apply sum_subset
877878
· rintro ⟨i, j⟩ hij
878-
simp only [mem_map, mem_addAntidiagonal,
879+
simp only [mem_map, mem_setAddAntidiagonal,
879880
Function.Embedding.coe_prodMap, mem_support, Prod.exists] at hij
880881
obtain ⟨i, j, ⟨hx, hy, rfl⟩, rfl, rfl⟩ := hij
881882
simp [hx, hy, hf]
882883
· rintro ⟨_, _⟩ h1 h2
883884
contrapose! h2
884885
obtain ⟨i, _, rfl⟩ := support_embDomain_subset (ne_zero_and_ne_zero_of_mul h2).1
885886
obtain ⟨j, _, rfl⟩ := support_embDomain_subset (ne_zero_and_ne_zero_of_mul h2).2
886-
simp only [mem_map, mem_addAntidiagonal,
887+
simp only [mem_map, mem_setAddAntidiagonal,
887888
Function.Embedding.coe_prodMap, mem_support, Prod.exists]
888-
simp only [mem_addAntidiagonal, embDomain_coeff, mem_support, ← hf,
889+
simp only [mem_setAddAntidiagonal, embDomain_coeff, mem_support, ← hf,
889890
OrderEmbedding.eq_iff_eq] at h1
890891
exact ⟨i, j, h1, rfl⟩
891892
· rw [embDomain_notin_range hg, eq_comm]
@@ -985,7 +986,7 @@ instance [IsCancelAdd R] [IsCancelMulZero R] : IsCancelMulZero R⟦Γ⟧ where
985986
sum_eq_sum_iff_single (i := (x.order, a)), mul_right_inj' (coeff_order_eq_zero.not.2 hx)]
986987
· simp [hx]
987988
grind
988-
· simp +contextual only [mem_union, mem_addAntidiagonal, mul_eq_mul_left_iff, Prod.mk.injEq,
989+
· simp +contextual only [mem_union, mem_setAddAntidiagonal, mul_eq_mul_left_iff, Prod.mk.injEq,
989990
ne_eq, ← and_or_left, ← or_and_right, or_false, and_imp, Prod.forall, mem_support, not_and]
990991
rintro b c hxb - hbc hbc'
991992
contrapose! hbc'
@@ -1007,7 +1008,7 @@ instance [IsCancelAdd R] [IsCancelMulZero R] : IsCancelMulZero R⟦Γ⟧ where
10071008
sum_eq_sum_iff_single (i := (a, x.order)), mul_left_inj' (coeff_order_eq_zero.not.2 hx)]
10081009
· simp [hx]
10091010
grind
1010-
· simp +contextual only [mem_union, mem_addAntidiagonal, mul_eq_mul_right_iff, Prod.mk.injEq,
1011+
· simp +contextual only [mem_union, mem_setAddAntidiagonal, mul_eq_mul_right_iff, Prod.mk.injEq,
10111012
ne_eq, ← or_and_right, or_false, and_imp, Prod.forall, mem_support, not_and]
10121013
rintro b c - hxb hbc hbc'
10131014
contrapose! hbc'

0 commit comments

Comments
 (0)