Skip to content

Commit a0d62f5

Browse files
committed
Auto-resolved conflicts in lean-toolchain and lake-manifest.json
2 parents 25918fa + 34527c1 commit a0d62f5

File tree

150 files changed

+2378
-338
lines changed

Some content is hidden

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

150 files changed

+2378
-338
lines changed

Archive/Examples/Kuratowski.lean

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ complements of the closed sets, and `s` and `sᶜ` which are neither closed nor
2222
This reduces `14*13/2 = 91` inequalities to check down to `6*5/2 = 15` inequalities.
2323
We'll further show that the 15 inequalities follow from a subset of 6 by algebra.
2424
25-
There are charaterizations and criteria for a set to be a 14-set in the paper
25+
There are characterizations and criteria for a set to be a 14-set in the paper
2626
"Characterization of Kuratowski 14-Sets" by Eric Langford which we do not formalize.
2727
2828
## Main definitions
@@ -63,7 +63,7 @@ theorem sum_map_theClosedSix_add_compl (s : Set X) :
6363
((theClosedSix s).map fun t ↦ {t} + {tᶜ}).sum = theClosedSix s + theOpenSix s :=
6464
Multiset.sum_map_add
6565

66-
/-- `theFourteen s` can be splitted into 3 subsets. -/
66+
/-- `theFourteen s` can be split into 3 subsets. -/
6767
theorem theFourteen_eq_pair_add_theClosedSix_add_theOpenSix (s : Set X) :
6868
theFourteen s = {s, sᶜ} + theClosedSix s + theOpenSix s := by
6969
rw [add_assoc, ← sum_map_theClosedSix_add_compl]; rfl

Archive/Wiedijk100Theorems/AbelRuffini.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ theorem real_roots_Phi_ge (hab : b < a) : 2 ≤ Fintype.card ((Φ ℚ a b).rootS
143143
Finset.card_insert_of_notMem (mt Finset.mem_singleton.mp hxy)]
144144

145145
theorem complex_roots_Phi (h : (Φ ℚ a b).Separable) : Fintype.card ((Φ ℚ a b).rootSet ℂ) = 5 :=
146-
(card_rootSet_eq_natDegree h (IsAlgClosed.splits_codomain _)).trans (natDegree_Phi a b)
146+
(card_rootSet_eq_natDegree h (IsAlgClosed.splits _)).trans (natDegree_Phi a b)
147147

148148
theorem gal_Phi (hab : b < a) (h_irred : Irreducible (Φ ℚ a b)) :
149149
Bijective (galActionHom (Φ ℚ a b) ℂ) := by

Archive/Wiedijk100Theorems/BallotProblem.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -218,7 +218,7 @@ theorem first_vote_pos :
218218
count_countedSequence, count_countedSequence, one_mul, zero_mul, add_zero,
219219
Nat.cast_add, Nat.cast_one, mul_comm, ← div_eq_mul_inv, ENNReal.div_eq_div_iff]
220220
· norm_cast
221-
rw [mul_comm _ (p + 1), ← Nat.succ_eq_add_one p, Nat.succ_add, Nat.succ_mul_choose_eq,
221+
rw [mul_comm _ (p + 1), add_right_comm, Nat.add_one_mul_choose_eq,
222222
mul_comm]
223223
all_goals simp [(Nat.choose_pos <| le_add_of_nonneg_right zero_le').ne']
224224
· simp

Mathlib.lean

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -533,6 +533,7 @@ public import Mathlib.Algebra.Homology.BifunctorAssociator
533533
public import Mathlib.Algebra.Homology.BifunctorFlip
534534
public import Mathlib.Algebra.Homology.BifunctorHomotopy
535535
public import Mathlib.Algebra.Homology.BifunctorShift
536+
public import Mathlib.Algebra.Homology.CochainComplexOpposite
536537
public import Mathlib.Algebra.Homology.CommSq
537538
public import Mathlib.Algebra.Homology.ComplexShape
538539
public import Mathlib.Algebra.Homology.ComplexShapeSigns
@@ -2473,6 +2474,7 @@ public import Mathlib.CategoryTheory.Generator.Preadditive
24732474
public import Mathlib.CategoryTheory.Generator.Presheaf
24742475
public import Mathlib.CategoryTheory.Generator.Sheaf
24752476
public import Mathlib.CategoryTheory.Generator.StrongGenerator
2477+
public import Mathlib.CategoryTheory.Generator.Type
24762478
public import Mathlib.CategoryTheory.GlueData
24772479
public import Mathlib.CategoryTheory.GradedObject
24782480
public import Mathlib.CategoryTheory.GradedObject.Associator
@@ -2941,6 +2943,7 @@ public import Mathlib.CategoryTheory.Presentable.IsCardinalFiltered
29412943
public import Mathlib.CategoryTheory.Presentable.Limits
29422944
public import Mathlib.CategoryTheory.Presentable.LocallyPresentable
29432945
public import Mathlib.CategoryTheory.Presentable.OrthogonalReflection
2946+
public import Mathlib.CategoryTheory.Presentable.Presheaf
29442947
public import Mathlib.CategoryTheory.Presentable.Retracts
29452948
public import Mathlib.CategoryTheory.Presentable.StrongGenerator
29462949
public import Mathlib.CategoryTheory.Presentable.Type
@@ -3099,6 +3102,7 @@ public import Mathlib.CategoryTheory.Triangulated.Opposite.Basic
30993102
public import Mathlib.CategoryTheory.Triangulated.Opposite.Functor
31003103
public import Mathlib.CategoryTheory.Triangulated.Opposite.Pretriangulated
31013104
public import Mathlib.CategoryTheory.Triangulated.Opposite.Triangle
3105+
public import Mathlib.CategoryTheory.Triangulated.Opposite.Triangulated
31023106
public import Mathlib.CategoryTheory.Triangulated.Orthogonal
31033107
public import Mathlib.CategoryTheory.Triangulated.Pretriangulated
31043108
public import Mathlib.CategoryTheory.Triangulated.Rotate
@@ -3167,6 +3171,7 @@ public import Mathlib.Combinatorics.HalesJewett
31673171
public import Mathlib.Combinatorics.Hall.Basic
31683172
public import Mathlib.Combinatorics.Hall.Finite
31693173
public import Mathlib.Combinatorics.Hindman
3174+
public import Mathlib.Combinatorics.KatonaCircle
31703175
public import Mathlib.Combinatorics.Matroid.Basic
31713176
public import Mathlib.Combinatorics.Matroid.Circuit
31723177
public import Mathlib.Combinatorics.Matroid.Closure
@@ -4156,6 +4161,7 @@ public import Mathlib.Geometry.Euclidean.MongePoint
41564161
public import Mathlib.Geometry.Euclidean.PerpBisector
41574162
public import Mathlib.Geometry.Euclidean.Projection
41584163
public import Mathlib.Geometry.Euclidean.SignedDist
4164+
public import Mathlib.Geometry.Euclidean.Similarity
41594165
public import Mathlib.Geometry.Euclidean.Simplex
41604166
public import Mathlib.Geometry.Euclidean.Sphere.Basic
41614167
public import Mathlib.Geometry.Euclidean.Sphere.OrthRadius
@@ -4656,8 +4662,10 @@ public import Mathlib.LinearAlgebra.PerfectPairing.Matrix
46564662
public import Mathlib.LinearAlgebra.PerfectPairing.Restrict
46574663
public import Mathlib.LinearAlgebra.Pi
46584664
public import Mathlib.LinearAlgebra.PiTensorProduct
4665+
public import Mathlib.LinearAlgebra.PiTensorProduct.Basis
46594666
public import Mathlib.LinearAlgebra.PiTensorProduct.DFinsupp
46604667
public import Mathlib.LinearAlgebra.PiTensorProduct.DirectSum
4668+
public import Mathlib.LinearAlgebra.PiTensorProduct.Dual
46614669
public import Mathlib.LinearAlgebra.PiTensorProduct.Finsupp
46624670
public import Mathlib.LinearAlgebra.Prod
46634671
public import Mathlib.LinearAlgebra.Projection
@@ -5209,6 +5217,7 @@ public import Mathlib.NumberTheory.LegendreSymbol.ZModChar
52095217
public import Mathlib.NumberTheory.LocalField.Basic
52105218
public import Mathlib.NumberTheory.LucasLehmer
52115219
public import Mathlib.NumberTheory.LucasPrimality
5220+
public import Mathlib.NumberTheory.MahlerMeasure
52125221
public import Mathlib.NumberTheory.MaricaSchoenheim
52135222
public import Mathlib.NumberTheory.Modular
52145223
public import Mathlib.NumberTheory.ModularForms.ArithmeticSubgroups
@@ -7053,7 +7062,7 @@ public import Mathlib.Topology.ContinuousMap.Weierstrass
70537062
public import Mathlib.Topology.ContinuousMap.ZeroAtInfty
70547063
public import Mathlib.Topology.ContinuousOn
70557064
public import Mathlib.Topology.Convenient.GeneratedBy
7056-
public import Mathlib.Topology.Covering
7065+
public import Mathlib.Topology.Covering.Basic
70577066
public import Mathlib.Topology.Defs.Basic
70587067
public import Mathlib.Topology.Defs.Filter
70597068
public import Mathlib.Topology.Defs.Induced

Mathlib/Algebra/Category/ModuleCat/ChangeOfRings.lean

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -487,8 +487,11 @@ def HomEquiv.fromRestriction {X : ModuleCat R} {Y : ModuleCat S}
487487
{ toFun := fun s : S => g <| (s • y : Y)
488488
map_add' := fun s1 s2 : S => by simp only [add_smul]; rw [map_add]
489489
map_smul' := fun r (s : S) => by
490-
rw [ModuleCat.restrictScalars.smul_def _ (M := ModuleCat.of _ _) _ _, ← g.hom.map_smul]
491-
simp [mul_smul] }
490+
-- Porting note: dsimp clears out some rw's but less eager to apply others with Lean 4
491+
dsimp
492+
rw [← g.hom.map_smul]
493+
erw [smul_eq_mul, mul_smul]
494+
rfl }
492495
map_add' := fun y1 y2 : Y =>
493496
LinearMap.ext fun s : S => by
494497
simp [smul_add, map_add]

Mathlib/Algebra/Group/Int/Defs.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ instance instAddCommGroup : AddCommGroup ℤ where
5252
zsmul_neg' m n := by simp only [negSucc_eq, natCast_succ, Int.neg_mul]
5353
sub_eq_add_neg _ _ := Int.sub_eq_add_neg
5454

55-
-- Thise instance can also be found from the `LinearOrderedCommMonoidWithZero ℤ` instance by
55+
-- This instance can also be found from the `LinearOrderedCommMonoidWithZero ℤ` instance by
5656
-- typeclass search, but it is better practice to not rely on algebraic order theory to prove
5757
-- purely algebraic results on concrete types. Eg the results can be made available earlier.
5858

Lines changed: 181 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,181 @@
1+
/-
2+
Copyright (c) 2025 Joël Riou. All rights reserved.
3+
Released under Apache 2.0 license as described in the file LICENSE.
4+
Authors: Joël Riou
5+
-/
6+
module
7+
8+
public import Mathlib.Algebra.Homology.Opposite
9+
public import Mathlib.Algebra.Homology.Embedding.Restriction
10+
11+
/-!
12+
# Opposite categories of cochain complexes
13+
14+
We construct an equivalence of categories `CochainComplex.opEquivalence C`
15+
between `(CochainComplex C ℤ)ᵒᵖ` and `CochainComplex Cᵒᵖ ℤ`, and we show
16+
that two morphisms in `CochainComplex C ℤ` are homotopic iff they are
17+
homotopic as morphisms in `CochainComplex Cᵒᵖ ℤ`.
18+
19+
-/
20+
21+
@[expose] public section
22+
23+
noncomputable section
24+
25+
open Opposite CategoryTheory Limits
26+
27+
variable (C : Type*) [Category C]
28+
29+
namespace ComplexShape
30+
31+
/-- The embedding of the complex shape `up ℤ` in `down ℤ` given by `n ↦ -n`. -/
32+
@[simps]
33+
def embeddingUpIntDownInt : (up ℤ).Embedding (down ℤ) where
34+
f n := -n
35+
injective_f _ _ := by simp
36+
rel := by simp
37+
38+
instance : embeddingUpIntDownInt.IsRelIff where
39+
rel' := by dsimp; lia
40+
41+
/-- The embedding of the complex shape `down ℤ` in `up ℤ` given by `n ↦ -n`. -/
42+
@[simps]
43+
def embeddingDownIntUpInt : (down ℤ).Embedding (up ℤ) where
44+
f n := -n
45+
injective_f _ _ := by simp
46+
rel := by dsimp; lia
47+
48+
instance : embeddingDownIntUpInt.IsRelIff where
49+
rel' := by dsimp; lia
50+
51+
end ComplexShape
52+
53+
namespace ChainComplex
54+
55+
variable [HasZeroMorphisms C]
56+
57+
attribute [local simp] HomologicalComplex.XIsoOfEq in
58+
/-- The equivalence of categories `ChainComplex C ℤ ≌ CochainComplex C ℤ`. -/
59+
def cochainComplexEquivalence :
60+
ChainComplex C ℤ ≌ CochainComplex C ℤ where
61+
functor := ComplexShape.embeddingUpIntDownInt.restrictionFunctor C
62+
inverse := ComplexShape.embeddingDownIntUpInt.restrictionFunctor C
63+
unitIso :=
64+
NatIso.ofComponents (fun K ↦ HomologicalComplex.Hom.isoOfComponents
65+
(fun n ↦ K.XIsoOfEq (by simp)))
66+
counitIso :=
67+
NatIso.ofComponents (fun K ↦ HomologicalComplex.Hom.isoOfComponents
68+
(fun n ↦ K.XIsoOfEq (by simp)))
69+
70+
end ChainComplex
71+
72+
namespace CochainComplex
73+
74+
/-- The equivalence of categories `(CochainComplex C ℤ)ᵒᵖ ≌ CochainComplex Cᵒᵖ ℤ`. -/
75+
def opEquivalence [HasZeroMorphisms C] :
76+
(CochainComplex C ℤ)ᵒᵖ ≌ CochainComplex Cᵒᵖ ℤ :=
77+
(HomologicalComplex.opEquivalence C (.up ℤ)).trans
78+
(ChainComplex.cochainComplexEquivalence _)
79+
80+
variable {C} [Preadditive C]
81+
82+
attribute [local simp] opEquivalence ChainComplex.cochainComplexEquivalence
83+
84+
section
85+
86+
variable {K L : CochainComplex C ℤ} {f g : K ⟶ L}
87+
88+
/-- Given an homotopy between morphisms of cochain complexes indexed by `ℤ`,
89+
this is the corresponding homotopy between morphisms of cochain complexes
90+
in the opposite category. -/
91+
def homotopyOp (h : Homotopy f g) :
92+
Homotopy ((opEquivalence C).functor.map f.op)
93+
((opEquivalence C).functor.map g.op) where
94+
hom p q := (h.hom (-q) (-p)).op
95+
zero p q hpq := by
96+
rw [h.zero, op_zero]
97+
dsimp at hpq ⊢
98+
lia
99+
comm n := by
100+
dsimp
101+
simp only [h.comm, op_add, add_left_inj]
102+
rw [add_comm]
103+
congr 1
104+
· rw [prevD_eq _ (j' := - (n + 1)) (by simp)]
105+
symm
106+
exact dNext_eq _ (i' := n + 1) (by simp)
107+
· rw [dNext_eq _ (i' := - (n - 1)) (by dsimp; lia)]
108+
symm
109+
exact prevD_eq _ (j' := n - 1) (by simp)
110+
111+
lemma homotopyOp_hom_eq (h : Homotopy f g)
112+
(p q p' q' : ℤ) (hp : p + p' = 0 := by lia) (hq : q + q' = 0 := by lia) :
113+
(homotopyOp h).hom p q =
114+
(L.XIsoOfEq (by dsimp; lia)).hom.op ≫ (h.hom q' p').op ≫
115+
(K.XIsoOfEq (by dsimp; lia)).hom.op := by
116+
obtain rfl : p' = -p := by lia
117+
obtain rfl : q' = -q := by lia
118+
simp [homotopyOp]
119+
120+
/-- The homotopy between two morphisms of cochain complexes indexed by `ℤ`
121+
which correspond to an homotopy between morphisms of cochain complexes
122+
in the opposite category. -/
123+
def homotopyUnop (h : Homotopy ((opEquivalence C).functor.map f.op)
124+
((opEquivalence C).functor.map g.op)) :
125+
Homotopy f g where
126+
hom p q := (K.XIsoOfEq (by simp)).hom ≫ (h.hom (-q) (-p)).unop ≫ (L.XIsoOfEq (by simp)).hom
127+
zero p q hpq := by
128+
rw [h.zero, unop_zero, zero_comp, comp_zero]
129+
dsimp at hpq ⊢
130+
lia
131+
comm n := Quiver.Hom.op_inj (by
132+
have H (p q p' q' : ℤ) (hp : p = p') (hq : q = q') :
133+
h.hom p q = (L.XIsoOfEq (by simpa using hp.symm)).hom.op ≫ h.hom p' q' ≫
134+
(K.XIsoOfEq (by simpa)).hom.op := by
135+
subst hp hq
136+
simp
137+
obtain ⟨n, rfl⟩ : ∃ (m : ℤ), n = -m := ⟨-n , by simp⟩
138+
have := h.comm n
139+
dsimp at this
140+
rw [op_add, op_add, this, add_left_inj, add_comm]
141+
congr 1
142+
· refine (prevD_eq _ (j' := n - 1) (by dsimp; lia)).trans ?_
143+
rw [dNext_eq _ (i' := - (n - 1)) (by dsimp; lia)]
144+
dsimp
145+
simp [H (- -n) (- -(n - 1)) n (n - 1) (by lia) (by lia), ← op_comp_assoc]
146+
· refine (dNext_eq _ (i' := n + 1) (by dsimp)).trans ?_
147+
rw [prevD_eq _ (j' := - (n + 1)) (by simp)]
148+
dsimp
149+
simp [H (- -(n + 1)) (- -n) (n + 1) n (by simp) (by simp), ← op_comp_assoc, ← op_comp])
150+
151+
lemma homotopyUnop_hom_eq
152+
(h : Homotopy ((opEquivalence C).functor.map f.op)
153+
((opEquivalence C).functor.map g.op))
154+
(p q p' q' : ℤ) (hp : p + p' = 0 := by lia) (hq : q + q' = 0 := by lia) :
155+
(homotopyUnop h).hom p q =
156+
(K.XIsoOfEq (by dsimp; lia)).hom ≫ (h.hom q' p').unop ≫
157+
(L.XIsoOfEq (by dsimp; lia)).hom := by
158+
obtain rfl : p' = -p := by lia
159+
obtain rfl : q' = -q := by lia
160+
simp [homotopyUnop]
161+
162+
end
163+
164+
/-- Two morphisms of cochain complexes indexed by `ℤ` are homotopic iff
165+
they are homotopic after the application of the functor
166+
`(opEquivalence C).functor : (CochainComplex C ℤ)ᵒᵖ ⥤ CochainComplex Cᵒᵖ ℤ`. -/
167+
def homotopyOpEquiv {K L : CochainComplex C ℤ} {f g : K ⟶ L} :
168+
Homotopy f g ≃ Homotopy ((opEquivalence C).functor.map f.op)
169+
((opEquivalence C).functor.map g.op) where
170+
toFun h := homotopyOp h
171+
invFun h := homotopyUnop h
172+
left_inv h := by
173+
ext p q
174+
simp [homotopyUnop_hom_eq _ p q (-p) (-q),
175+
homotopyOp_hom_eq _ (-q) (-p) q p]
176+
right_inv h := by
177+
ext p q
178+
simp [homotopyOp_hom_eq _ p q (-p) (-q),
179+
homotopyUnop_hom_eq _ (-q) (-p) q p]
180+
181+
end CochainComplex

Mathlib/Algebra/MvPolynomial/Nilpotent.lean

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,10 +34,8 @@ private theorem isNilpotent_iff_of_fintype [Fintype σ] :
3434
rw [← IsNilpotent.map_iff (rename_injective _ e.symm.injective), h₁,
3535
(Finsupp.equivCongrLeft e).forall_congr_left]
3636
simp [Finsupp.equivMapDomain_eq_mapDomain, coeff_rename_mapDomain _ e.symm.injective]
37-
· intro P
38-
simp [Unique.forall_iff, ← IsNilpotent.map_iff (isEmptyRingEquiv R PEmpty).injective,
37+
· simp [Unique.forall_iff, ← IsNilpotent.map_iff (isEmptyRingEquiv R PEmpty).injective,
3938
-isEmptyRingEquiv_apply, isEmptyRingEquiv_eq_coeff_zero]
40-
rfl
4139
· intro α _ H P
4240
obtain ⟨P, rfl⟩ := (optionEquivLeft _ _).symm.surjective P
4341
simp [IsNilpotent.map_iff (optionEquivLeft _ _).symm.injective,

Mathlib/Algebra/Polynomial/Eval/Degree.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ theorem eval_monomial_one_add_sub [CommRing S] (d : ℕ) (y : S) :
8080
rw [sum_range_succ, mul_add, Nat.choose_self, Nat.cast_one, one_mul, add_sub_cancel_right,
8181
mul_sum, sum_range_succ', Nat.cast_zero, zero_mul, mul_zero, add_zero]
8282
refine sum_congr rfl fun y _hy => ?_
83-
rw [← mul_assoc, ← mul_assoc, ← Nat.cast_mul, Nat.succ_mul_choose_eq, Nat.cast_mul,
83+
rw [← mul_assoc, ← mul_assoc, ← Nat.cast_mul, Nat.add_one_mul_choose_eq, Nat.cast_mul,
8484
Nat.add_sub_cancel]
8585

8686
end Eval

Mathlib/Algebra/SkewPolynomial/Basic.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ Furthermore, with this notation `φ^[n](a) = (ofAdd n) • a`, see `φ_iterate_a
3838
3939
## Implementation notes
4040
41-
The implementation uses `Muliplicative ℕ` instead of `ℕ` as some notion
41+
The implementation uses `Multiplicative ℕ` instead of `ℕ` as some notion
4242
of `AddSkewMonoidAlgebra` like the current implementation of `Polynomials` in Mathlib.
4343
4444
This decision was made because we use the type class `MulSemiringAction` to specify the properties

0 commit comments

Comments
 (0)