Skip to content

Commit c78a96f

Browse files
committed
fix
2 parents b98ab8b + ce9ef8b commit c78a96f

209 files changed

Lines changed: 6103 additions & 2102 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.

.docker/gitpod/Dockerfile

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,10 @@ RUN curl https://raw.githubusercontent.com/leanprover/elan/master/elan-init.sh -
2525
# install whichever toolchain mathlib is currently using
2626
RUN . ~/.profile && elan toolchain install $(curl https://raw.githubusercontent.com/leanprover-community/mathlib4/master/lean-toolchain)
2727

28-
ENV PATH="/home/gitpod/.local/bin:/home/gitpod/.elan/bin:${PATH}"
28+
# install neovim (for any lean.nvim user), via tarball since the appimage doesn't work for some reason, and jammy's version is ancient
29+
RUN curl -s -L https://github.com/neovim/neovim/releases/download/stable/nvim-linux64.tar.gz | tar xzf - && sudo mv nvim-linux64 /opt/nvim
30+
31+
ENV PATH="/home/gitpod/.local/bin:/home/gitpod/.elan/bin:/opt/nvim/bin:${PATH}"
2932

3033
# fix the infoview when the container is used on gitpod:
3134
ENV VSCODE_API_VERSION="1.50.0"

Archive/Wiedijk100Theorems/Partition.lean

Lines changed: 13 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -384,19 +384,11 @@ theorem partialOddGF_prop [Field α] (n m : ℕ) :
384384
α) =
385385
coeff α n (partialOddGF m) := by
386386
rw [partialOddGF]
387-
-- Porting note: `convert` timeouts. Please revert to `convert` when the performance of `convert`
388-
-- is improved.
389-
refine Eq.trans ?_
390-
(Eq.trans (partialGF_prop α n ((range m).map mkOdd) ?_ (fun _ => Set.univ) fun _ _ => trivial)
391-
(Eq.symm ?_))
387+
convert partialGF_prop α n
388+
((range m).map mkOdd) _ (fun _ => Set.univ) (fun _ _ => trivial) using 2
392389
· congr
393390
simp only [true_and_iff, forall_const, Set.mem_univ]
394-
· intro i
395-
rw [mem_map]
396-
rintro ⟨a, -, rfl⟩
397-
exact Nat.succ_pos _
398-
· congr 1
399-
rw [Finset.prod_map]
391+
· rw [Finset.prod_map]
400392
simp_rw [num_series']
401393
congr! 2 with x
402394
ext k
@@ -406,6 +398,10 @@ theorem partialOddGF_prop [Field α] (n m : ℕ) :
406398
apply mul_comm
407399
rintro ⟨a_w, -, rfl⟩
408400
apply Dvd.intro_left a_w rfl
401+
· intro i
402+
rw [mem_map]
403+
rintro ⟨a, -, rfl⟩
404+
exact Nat.succ_pos _
409405
#align theorems_100.partial_odd_gf_prop Theorems100.partialOddGF_prop
410406

411407
/-- If m is big enough, the partial product's coefficient counts the number of odd partitions -/
@@ -438,23 +434,20 @@ theorem partialDistinctGF_prop [CommSemiring α] (n m : ℕ) :
438434
α) =
439435
coeff α n (partialDistinctGF m) := by
440436
rw [partialDistinctGF]
441-
-- Porting note: `convert` timeouts. Please revert to `convert` when the performance of `convert`
442-
-- is improved.
443-
refine Eq.trans ?_
444-
(Eq.trans (partialGF_prop α n ((range m).map ⟨Nat.succ, Nat.succ_injective⟩) ?_
445-
(fun _ => {0, 1}) fun _ _ => Or.inl rfl) (Eq.symm ?_))
437+
convert partialGF_prop α n
438+
((range m).map ⟨Nat.succ, Nat.succ_injective⟩) _ (fun _ => {0, 1}) (fun _ _ => Or.inl rfl)
439+
using 2
446440
· congr
447441
congr! with p
448442
rw [Multiset.nodup_iff_count_le_one]
449443
congr! with i
450444
rcases Multiset.count i p.parts with (_ | _ | ms) <;> simp
445+
· simp_rw [Finset.prod_map, two_series]
446+
congr with i
447+
simp [Set.image_pair]
451448
· simp only [mem_map, Function.Embedding.coeFn_mk]
452449
rintro i ⟨_, _, rfl⟩
453450
apply Nat.succ_pos
454-
· congr 1
455-
simp_rw [Finset.prod_map, two_series]
456-
congr with i
457-
simp [Set.image_pair]
458451
#align theorems_100.partial_distinct_gf_prop Theorems100.partialDistinctGF_prop
459452

460453
/-- If m is big enough, the partial product's coefficient counts the number of distinct partitions

Mathlib.lean

Lines changed: 19 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -155,6 +155,9 @@ import Mathlib.Algebra.FreeAlgebra
155155
import Mathlib.Algebra.FreeMonoid.Basic
156156
import Mathlib.Algebra.FreeMonoid.Count
157157
import Mathlib.Algebra.FreeNonUnitalNonAssocAlgebra
158+
import Mathlib.Algebra.Function.Finite
159+
import Mathlib.Algebra.Function.Indicator
160+
import Mathlib.Algebra.Function.Support
158161
import Mathlib.Algebra.GCDMonoid.Basic
159162
import Mathlib.Algebra.GCDMonoid.Div
160163
import Mathlib.Algebra.GCDMonoid.Finset
@@ -267,7 +270,6 @@ import Mathlib.Algebra.Homology.ShortExact.Abelian
267270
import Mathlib.Algebra.Homology.ShortExact.Preadditive
268271
import Mathlib.Algebra.Homology.Single
269272
import Mathlib.Algebra.Homology.SingleHomology
270-
import Mathlib.Algebra.IndicatorFunction
271273
import Mathlib.Algebra.Invertible.Basic
272274
import Mathlib.Algebra.Invertible.Defs
273275
import Mathlib.Algebra.Invertible.GroupWithZero
@@ -308,6 +310,7 @@ import Mathlib.Algebra.Module.Basic
308310
import Mathlib.Algebra.Module.BigOperators
309311
import Mathlib.Algebra.Module.Bimodule
310312
import Mathlib.Algebra.Module.DedekindDomain
313+
import Mathlib.Algebra.Module.DirectLimitAndTensorProduct
311314
import Mathlib.Algebra.Module.Equiv
312315
import Mathlib.Algebra.Module.GradedModule
313316
import Mathlib.Algebra.Module.Hom
@@ -414,6 +417,7 @@ import Mathlib.Algebra.Order.Sub.Canonical
414417
import Mathlib.Algebra.Order.Sub.Defs
415418
import Mathlib.Algebra.Order.Sub.Prod
416419
import Mathlib.Algebra.Order.Sub.WithTop
420+
import Mathlib.Algebra.Order.Support
417421
import Mathlib.Algebra.Order.ToIntervalMod
418422
import Mathlib.Algebra.Order.UpperLower
419423
import Mathlib.Algebra.Order.WithZero
@@ -475,7 +479,6 @@ import Mathlib.Algebra.Star.SelfAdjoint
475479
import Mathlib.Algebra.Star.StarAlgHom
476480
import Mathlib.Algebra.Star.Subalgebra
477481
import Mathlib.Algebra.Star.Unitary
478-
import Mathlib.Algebra.Support
479482
import Mathlib.Algebra.Symmetrized
480483
import Mathlib.Algebra.TrivSqZeroExt
481484
import Mathlib.Algebra.Tropical.Basic
@@ -1244,6 +1247,7 @@ import Mathlib.CategoryTheory.Sites.Closed
12441247
import Mathlib.CategoryTheory.Sites.Coherent
12451248
import Mathlib.CategoryTheory.Sites.CompatiblePlus
12461249
import Mathlib.CategoryTheory.Sites.CompatibleSheafification
1250+
import Mathlib.CategoryTheory.Sites.ConcreteSheafification
12471251
import Mathlib.CategoryTheory.Sites.ConstantSheaf
12481252
import Mathlib.CategoryTheory.Sites.CoverLifting
12491253
import Mathlib.CategoryTheory.Sites.CoverPreserving
@@ -1265,7 +1269,6 @@ import Mathlib.CategoryTheory.Sites.RegularExtensive
12651269
import Mathlib.CategoryTheory.Sites.Sheaf
12661270
import Mathlib.CategoryTheory.Sites.SheafHom
12671271
import Mathlib.CategoryTheory.Sites.SheafOfTypes
1268-
import Mathlib.CategoryTheory.Sites.Sheafification
12691272
import Mathlib.CategoryTheory.Sites.Sieves
12701273
import Mathlib.CategoryTheory.Sites.Spaces
12711274
import Mathlib.CategoryTheory.Sites.Subsheaf
@@ -1287,6 +1290,7 @@ import Mathlib.CategoryTheory.Sums.Associator
12871290
import Mathlib.CategoryTheory.Sums.Basic
12881291
import Mathlib.CategoryTheory.Thin
12891292
import Mathlib.CategoryTheory.Triangulated.Basic
1293+
import Mathlib.CategoryTheory.Triangulated.Functor
12901294
import Mathlib.CategoryTheory.Triangulated.Opposite
12911295
import Mathlib.CategoryTheory.Triangulated.Pretriangulated
12921296
import Mathlib.CategoryTheory.Triangulated.Rotate
@@ -1328,6 +1332,7 @@ import Mathlib.Combinatorics.Quiver.Push
13281332
import Mathlib.Combinatorics.Quiver.SingleObj
13291333
import Mathlib.Combinatorics.Quiver.Subquiver
13301334
import Mathlib.Combinatorics.Quiver.Symmetric
1335+
import Mathlib.Combinatorics.Schnirelmann
13311336
import Mathlib.Combinatorics.SetFamily.CauchyDavenport
13321337
import Mathlib.Combinatorics.SetFamily.Compression.Down
13331338
import Mathlib.Combinatorics.SetFamily.Compression.UV
@@ -1513,6 +1518,7 @@ import Mathlib.Data.Finset.Pairwise
15131518
import Mathlib.Data.Finset.Pi
15141519
import Mathlib.Data.Finset.PiInduction
15151520
import Mathlib.Data.Finset.Pointwise
1521+
import Mathlib.Data.Finset.Pointwise.Interval
15161522
import Mathlib.Data.Finset.Powerset
15171523
import Mathlib.Data.Finset.Preimage
15181524
import Mathlib.Data.Finset.Prod
@@ -1675,6 +1681,7 @@ import Mathlib.Data.Matrix.Rank
16751681
import Mathlib.Data.Matrix.Reflection
16761682
import Mathlib.Data.Matrix.RowCol
16771683
import Mathlib.Data.Matroid.Basic
1684+
import Mathlib.Data.Matroid.Dual
16781685
import Mathlib.Data.Matroid.IndepAxioms
16791686
import Mathlib.Data.Matroid.Init
16801687
import Mathlib.Data.Multiset.Antidiagonal
@@ -2002,7 +2009,9 @@ import Mathlib.Data.ZMod.Algebra
20022009
import Mathlib.Data.ZMod.Basic
20032010
import Mathlib.Data.ZMod.Coprime
20042011
import Mathlib.Data.ZMod.Defs
2012+
import Mathlib.Data.ZMod.Factorial
20052013
import Mathlib.Data.ZMod.IntUnitsPower
2014+
import Mathlib.Data.ZMod.Module
20062015
import Mathlib.Data.ZMod.Parity
20072016
import Mathlib.Data.ZMod.Quotient
20082017
import Mathlib.Data.ZMod.Units
@@ -2302,7 +2311,6 @@ import Mathlib.Lean.Meta.Simp
23022311
import Mathlib.Lean.Name
23032312
import Mathlib.Lean.PrettyPrinter.Delaborator
23042313
import Mathlib.Lean.SMap
2305-
import Mathlib.Lean.System.IO
23062314
import Mathlib.Lean.Thunk
23072315
import Mathlib.LinearAlgebra.AdicCompletion
23082316
import Mathlib.LinearAlgebra.AffineSpace.AffineEquiv
@@ -2329,6 +2337,7 @@ import Mathlib.LinearAlgebra.Basis.Bilinear
23292337
import Mathlib.LinearAlgebra.Basis.Flag
23302338
import Mathlib.LinearAlgebra.Basis.VectorSpace
23312339
import Mathlib.LinearAlgebra.BilinearForm.Basic
2340+
import Mathlib.LinearAlgebra.BilinearForm.DualLattice
23322341
import Mathlib.LinearAlgebra.BilinearForm.Hom
23332342
import Mathlib.LinearAlgebra.BilinearForm.Orthogonal
23342343
import Mathlib.LinearAlgebra.BilinearForm.Properties
@@ -2363,6 +2372,7 @@ import Mathlib.LinearAlgebra.ExteriorAlgebra.Basic
23632372
import Mathlib.LinearAlgebra.ExteriorAlgebra.Grading
23642373
import Mathlib.LinearAlgebra.ExteriorAlgebra.OfAlternating
23652374
import Mathlib.LinearAlgebra.FiniteDimensional
2375+
import Mathlib.LinearAlgebra.FiniteSpan
23662376
import Mathlib.LinearAlgebra.Finrank
23672377
import Mathlib.LinearAlgebra.Finsupp
23682378
import Mathlib.LinearAlgebra.FinsuppVectorSpace
@@ -2452,6 +2462,8 @@ import Mathlib.LinearAlgebra.QuadraticForm.TensorProduct.Isometries
24522462
import Mathlib.LinearAlgebra.Quotient
24532463
import Mathlib.LinearAlgebra.QuotientPi
24542464
import Mathlib.LinearAlgebra.Ray
2465+
import Mathlib.LinearAlgebra.Reflection
2466+
import Mathlib.LinearAlgebra.RootSystem.Basic
24552467
import Mathlib.LinearAlgebra.SModEq
24562468
import Mathlib.LinearAlgebra.SesquilinearForm
24572469
import Mathlib.LinearAlgebra.Span
@@ -2486,9 +2498,9 @@ import Mathlib.Logic.Equiv.Fin
24862498
import Mathlib.Logic.Equiv.Fintype
24872499
import Mathlib.Logic.Equiv.Functor
24882500
import Mathlib.Logic.Equiv.List
2489-
import Mathlib.Logic.Equiv.LocalEquiv
24902501
import Mathlib.Logic.Equiv.Nat
24912502
import Mathlib.Logic.Equiv.Option
2503+
import Mathlib.Logic.Equiv.PartialEquiv
24922504
import Mathlib.Logic.Equiv.Set
24932505
import Mathlib.Logic.Equiv.TransferInstance
24942506
import Mathlib.Logic.Function.Basic
@@ -3004,6 +3016,7 @@ import Mathlib.RingTheory.Coprime.Ideal
30043016
import Mathlib.RingTheory.Coprime.Lemmas
30053017
import Mathlib.RingTheory.DedekindDomain.AdicValuation
30063018
import Mathlib.RingTheory.DedekindDomain.Basic
3019+
import Mathlib.RingTheory.DedekindDomain.Different
30073020
import Mathlib.RingTheory.DedekindDomain.Dvr
30083021
import Mathlib.RingTheory.DedekindDomain.Factorization
30093022
import Mathlib.RingTheory.DedekindDomain.FiniteAdeleRing
@@ -3058,6 +3071,7 @@ import Mathlib.RingTheory.Jacobson
30583071
import Mathlib.RingTheory.JacobsonIdeal
30593072
import Mathlib.RingTheory.Kaehler
30603073
import Mathlib.RingTheory.LaurentSeries
3074+
import Mathlib.RingTheory.LittleWedderburn
30613075
import Mathlib.RingTheory.LocalProperties
30623076
import Mathlib.RingTheory.Localization.AsSubring
30633077
import Mathlib.RingTheory.Localization.AtPrime

Mathlib/Algebra/Algebra/Spectrum.lean

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,10 +119,17 @@ theorem zero_mem_iff {a : A} : (0 : R) ∈ σ a ↔ ¬IsUnit a := by
119119
rw [mem_iff, map_zero, zero_sub, IsUnit.neg_iff]
120120
#align spectrum.zero_mem_iff spectrum.zero_mem_iff
121121

122+
alias ⟨not_isUnit_of_zero_mem, zero_mem⟩ := spectrum.zero_mem_iff
123+
122124
theorem zero_not_mem_iff {a : A} : (0 : R) ∉ σ a ↔ IsUnit a := by
123125
rw [zero_mem_iff, Classical.not_not]
124126
#align spectrum.zero_not_mem_iff spectrum.zero_not_mem_iff
125127

128+
alias ⟨isUnit_of_zero_not_mem, zero_not_mem⟩ := spectrum.zero_not_mem_iff
129+
130+
lemma subset_singleton_zero_compl {a : A} (ha : IsUnit a) : spectrum R a ⊆ {0}ᶜ :=
131+
Set.subset_compl_singleton_iff.mpr <| spectrum.zero_not_mem R ha
132+
126133
variable {R}
127134

128135
theorem mem_resolventSet_of_left_right_inverse {r : R} {a b c : A} (h₁ : (↑ₐ r - a) * b = 1)

0 commit comments

Comments
 (0)