Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
434 commits
Select commit Hold shift + click to select a range
c2704f3
More obvious fixes
grunweg Oct 19, 2025
bcc7be7
Perhaps less obvious?
grunweg Oct 19, 2025
003703d
More clear fixes
grunweg Oct 19, 2025
24b6438
More fixes
grunweg Oct 19, 2025
4f46d27
Disable a few false positives
grunweg Oct 19, 2025
c8d37e8
More fixes
grunweg Oct 19, 2025
3a2bc06
more fixes
grunweg Oct 19, 2025
37ca492
Disable 'no change at' warnings for now
grunweg Oct 19, 2025
16d0f6a
Merge branch 'master' into commandStart_more_uptodate
grunweg Oct 20, 2025
cc08cab
Merge branch 'master' into commandStart_more_uptodate
grunweg Dec 13, 2025
6899243
Fix many deprecation warnings
grunweg Dec 13, 2025
fbd6f42
fix?
adomani Dec 14, 2025
e2e468c
try to fix tests
adomani Dec 14, 2025
1ec872c
Merge branch 'master' into commandStart_more_uptodate
grunweg Dec 14, 2025
074ec7e
Down to one error and 37 warnings
grunweg Dec 14, 2025
ccd2861
Down to one error and four warnings; one requires rewriting using slices
grunweg Dec 14, 2025
17988db
fewer deprecations
adomani Dec 15, 2025
7902096
fixes for universe issues and panics
adomani Dec 15, 2025
f718921
fix more tests, ignore `grind_pattern`
adomani Dec 15, 2025
8c7cd6e
Merge branch 'master' into commandStart_more_uptodate
grunweg Dec 15, 2025
27c37a6
fix more errors, importing different aesop
adomani Dec 16, 2025
b14cd34
Merge branch 'master' into commandStart_more_uptodate
grunweg Dec 19, 2025
3d49189
Merge branch 'master' into commandStart_more_uptodate
grunweg Dec 22, 2025
1d13b3e
Disable the linter in a few more false positive cases; add failing te…
grunweg Dec 23, 2025
29e091c
Merge branch 'master' into commandStart_more_uptodate
grunweg Dec 23, 2025
32ce5ce
Fix and one more
grunweg Dec 23, 2025
d0910c9
More fixes; correct pretty-printing of introv tactic
grunweg Dec 23, 2025
6aca5dc
Fix more true positives
grunweg Dec 23, 2025
a1c8011
Broader linter disabling; annotate a few false positives
grunweg Dec 23, 2025
c544bf0
Broader linter disabling; annotate a few false positives
grunweg Dec 23, 2025
e3fb510
More true fixes
grunweg Dec 23, 2025
cdd5a94
More false positives
grunweg Dec 23, 2025
34a7b0f
More annotations
grunweg Dec 23, 2025
d6f90c2
Three more true fixes
grunweg Dec 23, 2025
e57defa
Two FPs
grunweg Dec 23, 2025
ec581eb
More false positives
grunweg Dec 23, 2025
1b42f06
Some true positive warning fixes
grunweg Dec 23, 2025
42d9cc6
one more false positive
grunweg Dec 23, 2025
4425138
Real fixes
grunweg Dec 23, 2025
d23d094
chore: disable the linter in a few buggy cases for now --- should fix…
grunweg Dec 23, 2025
41a2649
Smile more from a distance, and other real fixes
grunweg Dec 23, 2025
54d6820
Update Mathlib/Tactic/Linter/CommandStart.lean
grunweg Dec 23, 2025
8593888
Update Mathlib/Tactic/Linter/CommandStart.lean
grunweg Dec 23, 2025
5859124
tfae
adomani Dec 23, 2025
313efb8
space for shadow
adomani Dec 23, 2025
1964aa1
Merge branch 'commandStart_more_uptodate' of github.com:grunweg/mathl…
adomani Dec 23, 2025
c1b8a30
chore: annotate manual alignment
grunweg Dec 29, 2025
e3c88e4
feat: extend the commandStart linter to proof bodies
adomani Dec 29, 2025
7975cab
Annotate false positives around bundles: TODO fix!
grunweg Dec 29, 2025
2f982fd
ContinuousMultilinearMap changes
grunweg Dec 29, 2025
f30d12e
Disable linter where it's not clearly helpful/we prefer to postpone t…
grunweg Dec 29, 2025
a6832e3
TODO investigate: the linter is buggy here
grunweg Dec 29, 2025
be12f7b
Misc 'linter false positive's
grunweg Dec 29, 2025
75cb325
Document two false positives depending on core changes
grunweg Dec 29, 2025
39a3f43
Seems like legit fixes: double-check and land if so!
grunweg Dec 29, 2025
054fef3
Everything else; TODO digest
grunweg Dec 29, 2025
a2b1cfb
Update test output; unchecked. TODO are the unification hint changes …
grunweg Dec 29, 2025
63b912c
One more small false positive
grunweg Dec 29, 2025
138e7d3
One big file with issues
grunweg Dec 29, 2025
43dcd9b
True fixes
grunweg Dec 29, 2025
4975ee7
Remove \pi from the hack: this should be covered by unlintedNodes, bu…
grunweg Dec 29, 2025
f403b2d
Merge branch 'commandStart_more_uptodate' of github.com:grunweg/mathl…
adomani Dec 29, 2025
89d1b75
fix bundle and subscripts
adomani Dec 29, 2025
5cfd4ef
test update: two previously failing tests pass now
grunweg Dec 29, 2025
412f39b
Update another test for now-better behaviour
grunweg Dec 29, 2025
b72ced9
Comment two failing tests, TODO fix them!
grunweg Dec 29, 2025
b8ede04
Untested: remove exceptions for Bundle.TotalSpace fix
grunweg Dec 29, 2025
beac448
test update
grunweg Dec 29, 2025
51ac7df
chore: regression test for fresh bug in the pretty-printer
grunweg Dec 29, 2025
436b5f1
Two linter suggestions: unchecked if useful
grunweg Dec 29, 2025
bc5825b
Remove many now-superfluous blanket disablings
grunweg Dec 29, 2025
ecec79d
Remove now-superfluous exceptions
grunweg Dec 29, 2025
d24e2ea
Annotate more exceptions
grunweg Dec 29, 2025
1b6bc23
True fix
grunweg Dec 29, 2025
caf3032
Two more subscript fixes
grunweg Dec 29, 2025
ee518a6
shorter tests
adomani Dec 29, 2025
1f23f8d
Reduce diff: these should all be fixed at a different level
grunweg Dec 29, 2025
6c0a237
True fix
grunweg Dec 29, 2025
a088984
Subscript warnings seem all fixed now. Nine linter warnings are about
grunweg Dec 29, 2025
d01758c
Try paring back the hacks even more
grunweg Dec 29, 2025
38a4221
Try blocking unification hints properly: unsure if this worked!
grunweg Dec 29, 2025
956a71c
removal of old and unused code
adomani Dec 30, 2025
a0d8e61
Annotate remaining unification hints as Lean core bugs
grunweg Dec 30, 2025
ac233f8
One more warning: I don't feel strongly, so let's just follow the linter
grunweg Dec 30, 2025
10dd284
Disable linter on unification hints
grunweg Dec 30, 2025
7933b83
Peel back the hack again
grunweg Dec 30, 2025
7dbb53b
better parsing of Bundle
adomani Dec 30, 2025
bbeb6af
ignore meta defs
adomani Dec 30, 2025
5b1fbe3
More true fixes
grunweg Dec 30, 2025
618dab8
Annotate more false positives
grunweg Dec 30, 2025
bc41b50
More true fixes
grunweg Dec 30, 2025
9ffa80c
rfc: condvar changes, not exhaustive yet
grunweg Dec 30, 2025
cad7716
More condvar changes
grunweg Jan 7, 2026
ddef187
True fixes
grunweg Jan 7, 2026
3be5dac
More condvar fixes
grunweg Jan 7, 2026
797460f
More true fixes
grunweg Jan 7, 2026
e64b320
Two more annotations
grunweg Jan 7, 2026
ffc1902
True fixes
grunweg Jan 7, 2026
cadea73
Manual annotations
grunweg Jan 7, 2026
8a17f18
more true fixes
grunweg Jan 7, 2026
096fa23
True fixes
grunweg Jan 7, 2026
2b484fd
Two annotations
grunweg Jan 7, 2026
402ab1d
Merge branch 'master' into commandStart_more_uptodate
grunweg Jan 7, 2026
dfb003d
Try disabling on subtraction
grunweg Jan 7, 2026
b0625c8
Update test; more nuanced disabling of linter after subtraction
grunweg Jan 7, 2026
64cb7cb
Also extend the fix to superscripts: hopefully fixes the PoincareConj…
grunweg Jan 7, 2026
16d30f7
Merge branch 'master' into commandStart_more_uptodate
grunweg Jan 7, 2026
72055c1
True fixes
grunweg Jan 7, 2026
a936d82
Two annotations
grunweg Jan 7, 2026
1677903
True fixes
grunweg Jan 7, 2026
5a7877f
One more
grunweg Jan 7, 2026
ac0f6ac
chore: also exempt negation
grunweg Jan 7, 2026
20afabe
Remove many now-superfluous linter disablings
grunweg Jan 7, 2026
1d05a26
Fix deprecation warning
grunweg Jan 7, 2026
3de7835
Merge branch 'master' into commandStart_more_uptodate
grunweg Jan 7, 2026
a81ca8b
chore: rename files
grunweg Jan 7, 2026
8c8ed84
Adapt linter implementation; mk_all
grunweg Jan 7, 2026
4280f05
Update test
grunweg Jan 7, 2026
8406cb6
Replace annotations
grunweg Jan 7, 2026
56b83e5
fix: also replace remaining references
grunweg Jan 7, 2026
87550b4
chore: remove now-superfluous disablings
grunweg Jan 7, 2026
3db85e9
True fixes
grunweg Jan 7, 2026
1e1d4fb
Add docs: perhaps #mex should be removed instead?
grunweg Jan 7, 2026
64106c8
More
grunweg Jan 7, 2026
0b61d51
chore: rename file to WhitespaceLinter; remove two last unused option…
grunweg Jan 7, 2026
5160e2e
Merge branch 'master' into commandStart_more_uptodate
grunweg Jan 8, 2026
2aafa21
chore: fix Archive warnings
grunweg Jan 8, 2026
3d56be0
chore(Counterexamples): true fixes
grunweg Jan 8, 2026
5070f82
chore(Archive,Counterexamples): annotate false positives
grunweg Jan 8, 2026
1b6543f
Reduce diff: revert bad changes
grunweg Jan 8, 2026
ee758d6
Minimize diff
grunweg Jan 8, 2026
9c28370
Minimize diff
grunweg Jan 8, 2026
abb8923
chore: remove #mex command
grunweg Jan 8, 2026
7fa2cda
Merge branch 'master' into commandStart_more_uptodate
grunweg Jan 8, 2026
a95eef6
One more
grunweg Jan 8, 2026
5e8cd9b
Merge branch 'master' into commandStart_more_uptodate
grunweg Jan 8, 2026
3594243
chore: peel back hack one more level, by excluding suffices properly
grunweg Jan 8, 2026
6dad231
more String.norm
adomani Jan 8, 2026
161cfdf
Try different transposition of exceptions
grunweg Jan 8, 2026
957f9ea
chore: tests for the suffices tactic
grunweg Jan 8, 2026
57eb809
Properly disable the linter on suffices
grunweg Jan 8, 2026
ed7a7f8
Update test output
grunweg Jan 8, 2026
3595d26
Three more true fixes
grunweg Jan 8, 2026
d860e30
Fix the PostTuringMachine warning
grunweg Jan 8, 2026
0c8663e
Remove one more temporary hack
grunweg Jan 8, 2026
8312834
chore: re-instate the warning
grunweg Jan 8, 2026
690f0c1
Comment last former hack: seems still necessary
grunweg Jan 8, 2026
3065d50
Fix tests and test noisiness
grunweg Jan 9, 2026
d14edf5
chore: remove some obsolete test code, and update some test expectations
grunweg Jan 9, 2026
d80509a
Merge branch 'master' into commandStart_more_uptodate
grunweg Jan 9, 2026
a8b66f1
prune old code
adomani Jan 9, 2026
6e924c7
add Aesop import
adomani Jan 9, 2026
74c3f34
remove commented code
adomani Jan 9, 2026
d8bdf22
simplify PPref
adomani Jan 9, 2026
370a156
partially fix suffices
adomani Jan 9, 2026
34d88cb
Remove two superfluous exceptions
grunweg Jan 9, 2026
3a01cc8
Disable on one more linter false positive, related to comments in ind…
grunweg Jan 9, 2026
28b98c5
primes to nums, restore byTens
adomani Jan 9, 2026
3cff0db
eliminate mex
adomani Jan 9, 2026
6fb57c3
prune
adomani Jan 9, 2026
13f9dff
silence inductives
adomani Jan 9, 2026
10b06a5
Merge branch 'master' into commandStart_more_uptodate
adomani Jan 9, 2026
41cb069
Revert "Remove two superfluous exceptions"
adomani Jan 9, 2026
a1c01a8
new exception
adomani Jan 9, 2026
dfaa1c2
Merge branch 'master' into commandStart_more_uptodate
grunweg Jan 9, 2026
244aab3
Minor tweaks
grunweg Jan 10, 2026
feb0aee
Merge branch 'master' into commandStart_more_uptodate
grunweg Jan 10, 2026
11775d7
Use existing logic for superscripts and subscripts
grunweg Jan 10, 2026
9efb62a
One new exception
grunweg Jan 10, 2026
0443322
Merge branch 'master' into commandStart_more_uptodate
grunweg Jan 10, 2026
32197d0
import Qq.Typ for CI?
adomani Jan 10, 2026
a3c9cf7
Merge branch 'master' into commandStart_more_uptodate
grunweg Jan 11, 2026
d9f9a3a
New exceptions, and a few more fixes
grunweg Jan 12, 2026
826d552
Annotate three annotations
grunweg Jan 12, 2026
7084f2b
cdot in conv mode does the right thing on its own
adomani Jan 12, 2026
a276ce8
rcases does the right thing on its own
adomani Jan 12, 2026
a0fbac0
replace does the right thing on its own
adomani Jan 12, 2026
f72f6cb
restore `where` test
adomani Jan 12, 2026
ccea417
remove obsolete comment
adomani Jan 12, 2026
322f61f
have/let do the right thing on their own
adomani Jan 12, 2026
f47c18b
Use NameSet
adomani Jan 12, 2026
b1e3066
fix exception
adomani Jan 13, 2026
f8e47aa
Merge branch 'master' into commandStart_more_uptodate
grunweg Jan 13, 2026
93c7c37
Merge branch 'master' into commandStart_more_uptodate
grunweg Jan 14, 2026
f513483
chore: extend the whitespace linter to structure and instance fields
grunweg Jan 9, 2026
bca3390
chore: annotate more manual alignment
grunweg Jan 12, 2026
bbde152
chore: annotate false positive around extract_lets
grunweg Jan 14, 2026
a3cb90a
chore: annotate false positives around pretty-printing s!
grunweg Jan 12, 2026
40a4637
chore: annotate linter false positive around f!
grunweg Jan 12, 2026
79c0d2d
chore: be consistent about spacing before/after { }
grunweg Jan 12, 2026
96630cc
chore(ChangeOfRings): more consistent spacing and minor tweaks
grunweg Jan 14, 2026
15d4489
chore: a few more whitespace fixes
grunweg Jan 12, 2026
bcbbb8a
fix: pretty-printing of namePolyVars tactic (untested)
grunweg Jan 14, 2026
9b194d2
chore: annotate places with manual alignment
grunweg Jan 12, 2026
00c094f
Fixes
grunweg Jan 13, 2026
b20adb4
Spaces before or after { }
grunweg Jan 12, 2026
f074ad0
spacing around {}
grunweg Jan 12, 2026
8e5f8ff
chore: annotate more manual alignment
grunweg Jan 12, 2026
eafbda7
name_poly_vars has one last linter issue; let's disable it for now
grunweg Jan 14, 2026
89ec68e
Fix spacing issues
grunweg Jan 14, 2026
6e7b313
Annotate one false positive
grunweg Jan 14, 2026
9beabe6
Merge branch 'master' into commandStart_more_uptodate
grunweg Jan 15, 2026
f383919
Fix Counterexamples
grunweg Jan 15, 2026
00a489b
Try excluding name_poly_vars
grunweg Jan 15, 2026
ea81b2b
chore: disable the linter harder on name_poly_vars
grunweg Jan 15, 2026
0de1655
Update test: new behaviour is fine
grunweg Jan 16, 2026
4679d2b
Merge branch 'master' into commandStart_more_uptodate
grunweg Jan 16, 2026
9a5a53b
Update Mathlib/Tactic/Linter/Whitespace.lean
grunweg Jan 16, 2026
e1419b2
Fix
grunweg Jan 16, 2026
4a6f1b0
Merge branch 'master' into commandStart_more_uptodate
grunweg Jan 22, 2026
35ff5c5
Latest fixes
grunweg Jan 22, 2026
eb46a1e
Revert "fix: whitespace around conditional variance"
grunweg Jan 22, 2026
43d1218
chore: pretty-print conditional variance with spaces around it instea…
grunweg Jan 22, 2026
2909a0e
Revert "chore: pretty-print conditional variance with spaces around i…
grunweg Jan 22, 2026
b034542
style: change style around conditional expectation wrt a prob measure…
grunweg Jan 22, 2026
546bbb3
style: change pretty-printing to require vertical spaces in condition…
grunweg Jan 22, 2026
8079250
style: add spaces around notation for conditional expectation of a fu…
grunweg Jan 22, 2026
de43995
more
grunweg Jan 22, 2026
fae9bfb
more
grunweg Jan 22, 2026
e78517a
complete, condVar example also fixed!
grunweg Jan 22, 2026
427061f
Merge branch 'master' into commandStart_more_uptodate
grunweg Jan 26, 2026
f24eb45
Update for fixed upstream bug
grunweg Jan 26, 2026
12abb98
chore: fix new violations
grunweg Jan 28, 2026
8c78c0b
Annotate exceptions differently: somehow, they still don't work...
grunweg Jan 28, 2026
ba7556e
Merge branch 'master' into commandStart_more_uptodate
grunweg Jan 28, 2026
83237df
Fix new violations
grunweg Jan 29, 2026
7a85e64
Merge branch 'master' into commandStart_more_uptodate
grunweg Jan 29, 2026
5a8e640
Revert factorial changes: these are not desirable.
grunweg Jan 29, 2026
77e3e45
Hopefully fix name_poly_vars and factorial notation at the linter level
grunweg Jan 29, 2026
6f23d64
Fixes
grunweg Jan 29, 2026
f503a3e
Does this fix name_poly_vars?
grunweg Jan 29, 2026
c8f58a9
Nope, it doesn't. But three exceptions are fine to maintain by hand, …
grunweg Jan 30, 2026
ead49c8
Merge branch 'master' into commandStart_more_uptodate
grunweg Jan 30, 2026
8fafb73
Three more fixes
grunweg Jan 30, 2026
878abdb
Merge branch 'master' into commandStart_more_uptodate
grunweg Feb 5, 2026
21f39e4
More recent fixes
grunweg Feb 5, 2026
b88e662
Merge branch 'master' into commandStart_more_uptodate
grunweg Feb 6, 2026
ecfffeb
Merge branch 'master' into commandStart_more_uptodate
grunweg Feb 18, 2026
8cad83b
chore: some whitespace fixes; not exhaustive
grunweg Feb 21, 2026
0c0e6ce
Merge branch 'master' into commandStart_more_uptodate
grunweg Feb 28, 2026
5e87bb1
Fixes
grunweg Mar 1, 2026
769658d
Annotate one more false positive
grunweg Mar 1, 2026
33bdf27
Deprecation
grunweg Mar 1, 2026
9dc1607
Merge branch 'master' into commandStart_more_uptodate
grunweg Mar 7, 2026
38aa08d
chore: fix whitespace
grunweg Mar 7, 2026
d54a646
annotate one false positive
grunweg Mar 7, 2026
6dec27b
Merge branch 'master' into commandStart_more_uptodate
grunweg Mar 13, 2026
10e7bbc
chore: fix more whitespace
grunweg Mar 17, 2026
0422df4
chore: annotate one issue
grunweg Mar 17, 2026
fef903a
Merge branch 'master' into commandStart_more_uptodate
grunweg Mar 17, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions Archive/Imo/Imo2010Q5.lean
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ open Pi Equiv Function

namespace Imo2010Q5

set_option linter.style.whitespace false in -- linter false positive
/-- The predicate defining states of boxes reachable by the given moves. -/
inductive Reachable : (Fin 6 → ℕ) → Prop
/-- The starting position with one coin in each box -/
Expand Down
1 change: 1 addition & 0 deletions Archive/Wiedijk100Theorems/BuffonsNeedle.lean
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,7 @@ lemma integrable_needleCrossesIndicator :
neg_div, sub_neg_eq_add, add_halves, sub_zero, ← ENNReal.ofReal_mul hd.le,
ENNReal.ofReal_lt_top]

set_option linter.style.whitespace false in
include hd hB hBₘ in
/--
This is a common step in both the short and the long case to simplify the expectation of the
Expand Down
1 change: 1 addition & 0 deletions Counterexamples/CliffordAlgebraNotInjective.lean
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ noncomputable section
open LinearMap (BilinForm)
open LinearMap (BilinMap)

set_option linter.style.whitespace false in -- linter false positive
name_poly_vars X, Y, Z over ZMod 2

namespace Q60596
Expand Down
1 change: 1 addition & 0 deletions Counterexamples/HeawoodUnitDistance.lean
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ namespace SimpleGraph

open Finset

set_option linter.style.whitespace false in -- manual alignment is not recognised
/-- The Heawood graph, a notable simple graph on 14 vertices. The numbering corresponds to a
typical [Hamiltonian cycle-and-arcs drawing](https://commons.wikimedia.org/wiki/File:Heawood_Graph.svg). -/
def heawoodGraph : SimpleGraph (Fin 14) where
Expand Down
2 changes: 2 additions & 0 deletions Mathlib/Algebra/AffineMonoid/Basic.lean
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,12 @@ monoids.

public section

set_option linter.style.whitespace false in -- linter false positive
/-- An affine monoid is a finitely generated cancellative torsion-free commutative monoid. -/
class abbrev IsAffineAddMonoid (M : Type*) [AddCommMonoid M] : Prop :=
IsCancelAdd M, AddMonoid.FG M, IsAddTorsionFree M

set_option linter.style.whitespace false in -- linter false positive
/-- An affine monoid is a finitely generated cancellative torsion-free commutative monoid. -/
@[to_additive]
class abbrev IsAffineMonoid (M : Type*) [CommMonoid M] : Prop :=
Expand Down
2 changes: 1 addition & 1 deletion Mathlib/Algebra/Algebra/Operations.lean
Original file line number Diff line number Diff line change
Expand Up @@ -907,7 +907,7 @@ theorem restrictScalars_image_smul_eq {S M : Type*}
(algebraMap S R '' s • N).restrictScalars S = s • N.restrictScalars S := by
refine le_antisymm (fun x x_in ↦ ?_) (set_smul_le _ _ _ fun r x r_in x_in ↦ ?_)
· rw [restrictScalars_mem] at x_in
refine set_smul_inductionOn x x_in ?_ ?_ (fun _ _ _ _ h h' ↦ add_mem h h') (zero_mem _)
refine set_smul_inductionOn x x_in ?_ ?_ (fun _ _ _ _ h h' ↦ add_mem h h') (zero_mem _)
· rintro _ x ⟨r, r_in, rfl⟩ x_in
rw [algebraMap_smul]
exact mem_set_smul_of_mem_mem r_in x_in
Expand Down
2 changes: 2 additions & 0 deletions Mathlib/Algebra/Category/Grp/EpiMono.lean
Original file line number Diff line number Diff line change
Expand Up @@ -190,6 +190,7 @@ def g : B →* SX' where
ext
simp [mul_smul]

set_option linter.style.whitespace false in -- linter false positive
local notation "g" => g f

/-- Define `h : B ⟶ S(X')` to be `τ g τ⁻¹`
Expand All @@ -203,6 +204,7 @@ def h : B →* SX' where
ext
simp

set_option linter.style.whitespace false in -- linter false positive
local notation "h" => h f

/-!
Expand Down
4 changes: 4 additions & 0 deletions Mathlib/Algebra/Category/Ring/Basic.lean
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,7 @@ lemma hom_inv_apply {R S : SemiRingCat} (e : R ≅ S) (s : S) : e.hom (e.inv s)
instance : Inhabited SemiRingCat :=
⟨of PUnit⟩

set_option linter.style.whitespace false in -- the linter is wrong, even after lean4#11780
/-- This unification hint helps with problems of the form `(forget ?C).obj R =?= carrier R'`. -/
unif_hint forget_obj_eq_coe (R R' : SemiRingCat) where
R ≟ R' ⊢
Expand Down Expand Up @@ -319,6 +320,7 @@ lemma hom_inv_apply {R S : RingCat} (e : R ≅ S) (s : S) : e.hom (e.inv s) = s
instance : Inhabited RingCat :=
⟨of PUnit⟩

set_option linter.style.whitespace false in -- the linter is wrong, even after lean4#11780
/-- This unification hint helps with problems of the form `(forget ?C).obj R =?= carrier R'`.

An example where this is needed is in applying
Expand Down Expand Up @@ -498,6 +500,7 @@ lemma hom_inv_apply {R S : CommSemiRingCat} (e : R ≅ S) (s : S) : e.hom (e.inv
instance : Inhabited CommSemiRingCat :=
⟨of PUnit⟩

set_option linter.style.whitespace false in -- the linter is wrong, even after lean4#11780
/-- This unification hint helps with problems of the form `(forget ?C).obj R =?= carrier R'`. -/
unif_hint forget_obj_eq_coe (R R' : CommSemiRingCat) where
R ≟ R' ⊢
Expand Down Expand Up @@ -675,6 +678,7 @@ instance : Inhabited CommRingCat :=

lemma forget_obj {R : CommRingCat} : (forget CommRingCat).obj R = R := rfl

set_option linter.style.whitespace false in -- the linter is wrong, even after lean4#11780
/-- This unification hint helps with problems of the form `(forget ?C).obj R =?= carrier R'`.

An example where this is needed is in applying `TopCat.Presheaf.restrictOpen` to commutative rings.
Expand Down
4 changes: 2 additions & 2 deletions Mathlib/Algebra/GroupWithZero/Range.lean
Original file line number Diff line number Diff line change
Expand Up @@ -141,8 +141,8 @@ def ValueGroup₀.restrict₀ : A →*₀ ValueGroup₀ f where
toFun a :=
letI : DecidablePred fun b : B ↦ b = 0 := Classical.decPred fun b ↦ b = 0
if h : f a = 0 then 0 else (⟨Units.mk0 (f a) h, mem_valueGroup _ ⟨a, rfl⟩⟩ : valueGroup f)
map_one' := by simp [← WithZero.coe_one]
map_mul' := by aesop
map_one' := by simp [← WithZero.coe_one]
map_mul' := by aesop
map_zero' := by simp

namespace ValueGroup₀
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,7 @@ lemma δ_liftCochain (n' : ℤ) (hn' : n + 1 = n') :
dsimp [liftCochain, inl, inr]
ext p q hpq
simp [mappingCone.δ_liftCochain _ _ _ _ n' hn',
Cochain.δ_rightShift _ (-1) _ n' _ n (by lia),
Cochain.δ_rightShift _ (-1) _ n' _ n (by lia),
Cochain.rightShift_v (n := n) _ _ _ _ p _ _ (q + -1) (by lia),
Cochain.rightShift_v _ _ _ _ _ _ _ (q + -1) rfl,
Cochain.rightShift_v _ _ _ _ _ _ _ _ (add_zero (q + -1)),
Expand Down
2 changes: 1 addition & 1 deletion Mathlib/Algebra/Homology/Refinements.lean
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ lemma comp_homologyπ_eq_iff_up_to_refinements
(i j : ι) (hi : c.prev j = i)
{A : C} (z₂ z₂' : A ⟶ K.cycles j) : z₂ ≫ K.homologyπ j = z₂' ≫ K.homologyπ j ↔
∃ (A' : C) (π : A' ⟶ A) (_ : Epi π) (x₁ : A' ⟶ K.X i),
π ≫ z₂ = π ≫ z₂' + x₁ ≫ K.toCycles i j:= by
π ≫ z₂ = π ≫ z₂' + x₁ ≫ K.toCycles i j := by
subst hi
exact (K.sc j).comp_homologyπ_eq_iff_up_to_refinements z₂ z₂'

Expand Down
2 changes: 1 addition & 1 deletion Mathlib/Algebra/Homology/SpectralObject/Basic.lean
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ def sc₃ (n₀ n₁ : ℤ) (hn₁ : n₀ + 1 = n₁ := by lia) : ShortComplex C
ShortComplex.mk _ _ (X.zero₃ f g fg h n₀ n₁ hn₁)

lemma exact₁ (n₀ n₁ : ℤ) (hn₁ : n₀ + 1 = n₁ := by lia) :
(X.sc₁ f g fg h n₀ n₁ hn₁ ).Exact := by
(X.sc₁ f g fg h n₀ n₁ hn₁).Exact := by
subst h
exact (X.exact₁' n₀ n₁ hn₁ (mk₂ f g)).exact 0

Expand Down
8 changes: 4 additions & 4 deletions Mathlib/Algebra/Homology/SpectralObject/Cycles.lean
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ noncomputable def cyclesMap (α : mk₂ f g ⟶ mk₂ f' g') (n : ℤ) :
rw [Category.assoc, X.δ_naturality f g f' g'
(homMk₁ (α.app 0) (α.app 1) (naturality' α 0 1))
(homMk₁ (α.app 1) (α.app 2) (naturality' α 1 2)) n (n + 1),
iCycles_δ_assoc _ _ _ _ _ , zero_comp])
iCycles_δ_assoc _ _ _ _ _, zero_comp])

@[reassoc]
lemma cyclesMap_i (α : mk₂ f g ⟶ mk₂ f' g') (β : mk₁ g ⟶ mk₁ g') (n : ℤ)
Expand Down Expand Up @@ -256,8 +256,8 @@ lemma opcyclesMap_comp (α : mk₂ f g ⟶ mk₂ f' g') (α' : mk₂ f' g' ⟶ m
X.opcyclesMap f g f'' g'' α'' n := by
subst h
rw [← cancel_epi (X.pOpcycles f g n),
X.p_opcyclesMap_assoc f g f' g' α _ ,
X.p_opcyclesMap f' g' f'' g'' α' _ ,
X.p_opcyclesMap_assoc f g f' g' α _,
X.p_opcyclesMap f' g' f'' g'' α' _,
← Functor.map_comp_assoc]
exact (X.p_opcyclesMap _ _ _ _ _ _ _ (by cat_disch)).symm

Expand Down Expand Up @@ -483,7 +483,7 @@ lemma pOpcycles_δFromOpcycles (hn₁ : n₀ + 1 = n₁) :
@[reassoc (attr := simp)]
lemma fromOpcyles_δ (hn₁ : n₀ + 1 = n₁ := by lia) :
X.fromOpcycles f₂ f₃ f₂₃ h₂₃ n₀ ≫ X.δ f₁ f₂₃ n₀ n₁ hn₁ =
X.δFromOpcycles f₁ f₂ f₃ n₀ n₁ hn₁ := by
X.δFromOpcycles f₁ f₂ f₃ n₀ n₁ hn₁ := by
rw [← cancel_epi (X.pOpcycles f₂ f₃ n₀),
p_fromOpcycles_assoc, pOpcycles_δFromOpcycles,
X.δ_naturality f₁ f₂ f₁ f₂₃ (𝟙 _) (twoδ₂Toδ₁ f₂ f₃ f₂₃ h₂₃) n₀ n₁,
Expand Down
8 changes: 4 additions & 4 deletions Mathlib/Algebra/Homology/SpectralObject/Differentials.lean
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ noncomputable def d
X.descE f₃ f₄ f₅ _ rfl n₀ n₁ n₂ (X.δ (f₁ ≫ f₂) (f₃ ≫ f₄) n₁ n₂ hn₂ ≫
X.toCycles f₁ f₂ _ rfl n₂ ≫ X.πE f₁ f₂ f₃ n₁ n₂ n₃ hn₂ hn₃) (by
rw [X.δ_naturality_assoc (f₁ ≫ f₂) f₃ (f₁ ≫ f₂) (f₃ ≫ f₄)
(𝟙 _) (twoδ₂Toδ₁ f₃ f₄ _ rfl) n₁ n₂ rfl hn₂, Functor.map_id, id_comp,
(𝟙 _) (twoδ₂Toδ₁ f₃ f₄ _ rfl) n₁ n₂ rfl hn₂, Functor.map_id, id_comp,
δ_toCycles_assoc .., δToCycles_πE ..]) hn₁
(by rw [δ_δ_assoc .., zero_comp])

Expand Down Expand Up @@ -96,7 +96,7 @@ lemma d_d (hn₁ : n₀ + 1 = n₁ := by lia) (hn₂ : n₁ + 1 = n₂ := by lia
X.d f₃ f₄ f₅ f₆ f₇ n₀ n₁ n₂ n₃ hn₁ hn₂ hn₃ ≫
X.d f₁ f₂ f₃ f₄ f₅ n₁ n₂ n₃ n₄ hn₂ hn₃ hn₄ = 0 := by
rw [← cancel_epi (X.πE f₅ f₆ f₇ n₀ n₁ n₂ hn₁ hn₂),
← cancel_epi (X.toCycles f₅ f₆ _ rfl n₁ ), comp_zero, comp_zero,
← cancel_epi (X.toCycles f₅ f₆ _ rfl n₁), comp_zero, comp_zero,
X.toCycles_πE_d_assoc f₃ f₄ f₅ f₆ f₇ _ rfl _ rfl n₀ n₁ n₂ n₃ hn₁ hn₂ hn₃,
X.toCycles_πE_d f₁ f₂ f₃ f₄ f₅ _ rfl _ rfl n₁ n₂ n₃ n₄ hn₂ hn₃ hn₄,
δ_δ_assoc .., zero_comp]
Expand Down Expand Up @@ -175,7 +175,7 @@ lemma cyclesMap_Ψ_exact (hn₁ : n₀ + 1 = n₁ := by lia) :
X.liftCycles f₁₂ f₃ n₀ n₁ hn₁ (z ≫ X.iCycles f₂ f₃ n₀) ?_, ?_⟩ <;> dsimp
· rw [assoc, ← X.Ψ_fromOpcycles f₁ f₂ f₃ f₁₂ h₁₂ n₀ n₁ hn₁, reassoc_of% hz, zero_comp]
· rw [← cancel_mono (X.iCycles f₂ f₃ n₀), id_comp, assoc,
X.cyclesMap_i _ _ _ _ (threeδ₁Toδ₀ f₁ f₂ f₃ f₁₂ h₁₂) (𝟙 _) n₀ (by cat_disch) ,
X.cyclesMap_i _ _ _ _ (threeδ₁Toδ₀ f₁ f₂ f₃ f₁₂ h₁₂) (𝟙 _) n₀ (by cat_disch),
Functor.map_id, comp_id, liftCycles_i]

set_option backward.isDefEq.respectTransparency false in
Expand Down Expand Up @@ -209,7 +209,7 @@ lemma πE_d_ιE
(hn₁ : n₀ + 1 = n₁ := by lia) (hn₂ : n₁ + 1 = n₂ := by lia) (hn₃ : n₂ + 1 = n₃ := by lia) :
X.πE f₃ f₄ f₅ n₀ n₁ n₂ hn₁ hn₂ ≫ X.d f₁ f₂ f₃ f₄ f₅ n₀ n₁ n₂ n₃ hn₁ hn₂ hn₃ ≫
X.ιE f₁ f₂ f₃ n₁ n₂ n₃ hn₂ hn₃ = X.Ψ f₂ f₃ f₄ n₁ n₂ hn₂ := by
rw [← cancel_epi (X.toCycles f₃ f₄ _ rfl n₁ ), toCycles_Ψ ..,
rw [← cancel_epi (X.toCycles f₃ f₄ _ rfl n₁), toCycles_Ψ ..,
X.toCycles_πE_d_assoc f₁ f₂ f₃ f₄ f₅ _ rfl _ _ n₀ n₁ n₂ n₃ hn₁ hn₂ hn₃,
πE_ιE .., toCycles_i_assoc, ← X.δ_naturality_assoc (f₁ ≫ f₂) (f₃ ≫ f₄) f₂ (f₃ ≫ f₄)
(twoδ₁Toδ₀ f₁ f₂ _ rfl) (𝟙 _) n₁ n₂ rfl hn₂, Functor.map_id, id_comp]
Expand Down
2 changes: 1 addition & 1 deletion Mathlib/Algebra/Homology/SpectralObject/EpiMono.lean
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ lemma mono_map (α : mk₃ f₁ f₂ f₃ ⟶ mk₃ f₁' f₂ f₃) (n₀ n₁
(hα₃ : α.app 3 = 𝟙 _ := by cat_disch) (hn₁ : n₀ + 1 = n₁ := by lia)
(hn₂ : n₁ + 1 = n₂ := by lia) (hn₃ : n₂ + 1 = n₃ := by lia) :
Mono (X.map f₁ f₂ f₃ f₁' f₂ f₃ α n₀ n₁ n₂ hn₁ hn₂) := by
have := X.map_ιE _ _ _ _ _ _ α (𝟙 _) n₀ n₁ n₂
have := X.map_ιE _ _ _ _ _ _ α (𝟙 _) n₀ n₁ n₂
rw [opcyclesMap_id, comp_id] at this
exact mono_of_mono_fac this

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -277,7 +277,7 @@ by `data`. The conditions given allow to show that the homology of a page identi
to the next page. -/
class HasSpectralSequence : Prop where
isZero_H_obj_mk₁_i₀_le (r r' : ℤ) (pq : κ) (hpq : ∀ (pq' : κ), ¬ ((c r).Rel pq pq'))
(n : ℤ) (hn : n = data.deg pq + 1 )
(n : ℤ) (hn : n = data.deg pq + 1)
(hrr' : r + 1 = r' := by lia) (hr : r₀ ≤ r := by lia) :
IsZero ((X.H n).obj (mk₁ (homOfLE (data.i₀_le r r' pq))))
isZero_H_obj_mk₁_i₃_le (r r' : ℤ) (pq : κ) (hpq : ∀ (pq' : κ), ¬ ((c r).Rel pq' pq))
Expand Down Expand Up @@ -325,7 +325,7 @@ instance (E : SpectralObject C EInt) : E.HasSpectralSequence coreE₂Cohomologic
exact hpq _ rfl
isZero_H_obj_mk₁_i₃_le r r' pq hpq n hn hrr' hr := by
exfalso
exact hpq (pq - (r, 1-r)) (by simp)
exact hpq (pq - (r, 1 - r)) (by simp)

instance {l : ℕ} (E : SpectralObject C (Fin (l + 1))) :
E.HasSpectralSequence (coreE₂CohomologicalFin l) where
Expand Down Expand Up @@ -375,7 +375,7 @@ variable [Y.IsFirstQuadrant]

lemma isZero₁_of_isFirstQuadrant (i j : EInt) (hij : i ≤ j) (hj : j ≤ (0 : ℤ)) (n : ℤ) :
IsZero ((Y.H n).obj (mk₁ (homOfLE hij))) :=
IsFirstQuadrant.isZero₁ i j hij hj n
IsFirstQuadrant.isZero₁ i j hij hj n

lemma isZero₂_of_isFirstQuadrant (i j : EInt) (hij : i ≤ j) (n : ℤ) (hi : n < i) :
IsZero ((Y.H n).obj (mk₁ (homOfLE hij))) :=
Expand Down
4 changes: 2 additions & 2 deletions Mathlib/Algebra/Homology/SpectralObject/Page.lean
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ lemma shortComplexMap_id (hn₁ : n₀ + 1 = n₁ := by lia) (hn₂ : n₁ + 1 =

@[reassoc, simp]
lemma shortComplexMap_comp (hn₁ : n₀ + 1 = n₁ := by lia) (hn₂ : n₁ + 1 = n₂ := by lia) :
X.shortComplexMap f₁ f₂ f₃ f₁'' f₂'' f₃'' (α ≫ β) n₀ n₁ n₂ hn₁ hn₂ =
X.shortComplexMap f₁ f₂ f₃ f₁'' f₂'' f₃'' (α ≫ β) n₀ n₁ n₂ hn₁ hn₂ =
X.shortComplexMap f₁ f₂ f₃ f₁' f₂' f₃' α n₀ n₁ n₂ hn₁ hn₂ ≫
X.shortComplexMap f₁' f₂' f₃' f₁'' f₂'' f₃'' β n₀ n₁ n₂ hn₁ hn₂ := by
ext
Expand Down Expand Up @@ -621,7 +621,7 @@ lemma cokernelSequenceOpcyclesE_exact
/-- The map `E^n(f₁, f₂, f₃) ⟶ Z^n(f₁, f₂ ≫ f₃)`. -/
noncomputable def EToCycles (hn₁ : n₀ + 1 = n₁ := by lia) (hn₂ : n₁ + 1 = n₂ := by lia) :
X.E f₁ f₂ f₃ n₀ n₁ n₂ hn₁ hn₂ ⟶ X.cycles f₁ f₂₃ n₁ :=
X.liftCycles _ _ _ _ hn₂
X.liftCycles _ _ _ _ hn₂
(X.ιE f₁ f₂ f₃ n₀ n₁ n₂ hn₁ hn₂ ≫ X.fromOpcycles f₂ f₃ f₂₃ h₂₃ n₁) (by simp)

@[reassoc (attr := simp)]
Expand Down
1 change: 1 addition & 0 deletions Mathlib/Algebra/Module/TransferInstance.lean
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ def linearEquiv (e : α ≃ β) [AddCommMonoid β] [Module R β] :
simp only [toFun_as_coe, RingHom.id_apply, EmbeddingLike.apply_eq_iff_eq]
exact Iff.mpr (apply_eq_iff_eq_symm_apply _) rfl }

set_option linter.style.whitespace false in -- the linter is wrong, even after lean4#12006
variable (R) in
/-- Transfer `Module.IsTorsionFree` across an `Equiv` -/
protected lemma moduleIsTorsionFree (e : α ≃ β) [AddCommMonoid β] [Module R β]
Expand Down
2 changes: 2 additions & 0 deletions Mathlib/Algebra/Order/CauSeq/Basic.lean
Original file line number Diff line number Diff line change
Expand Up @@ -212,6 +212,7 @@ variable (abv) in
/-- The constant Cauchy sequence. -/
def const (x : β) : CauSeq β abv := ⟨fun _ ↦ x, IsCauSeq.const _⟩

set_option linter.style.whitespace false in -- linter false positive
/-- The constant Cauchy sequence -/
local notation "const" => const abv

Expand Down Expand Up @@ -567,6 +568,7 @@ end DivisionRing

section Abs

set_option linter.style.whitespace false in -- false positive in the linter
/-- The constant Cauchy sequence -/
local notation "const" => const abs

Expand Down
2 changes: 1 addition & 1 deletion Mathlib/Algebra/Order/GroupWithZero/Range.lean
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ variable (f) in
/-- The inclusion of `ValueGroup₀ f` into `WithZero Bˣ` as a homomorphism of monoids with zero. -/
def orderMonoidWithZeroHom : ValueGroup₀ f →*₀o WithZero Bˣ where
__ := WithZero.map' (valueGroup f).subtype
monotone' := map'_strictMono (Subtype.strictMono_coe _)|>.monotone
monotone' := map'_strictMono (Subtype.strictMono_coe _) |>.monotone

lemma monoidWithZeroHom_strictMono :
StrictMono (orderMonoidWithZeroHom f) :=
Expand Down
1 change: 1 addition & 0 deletions Mathlib/Algebra/Polynomial/RuleOfSigns.lean
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,7 @@ section OrderedRing

variable {R : Type*} [Ring R] [LinearOrder R] [IsOrderedRing R] (P : Polynomial R) {x : R}

set_option linter.style.whitespace false in -- linter suggestion is undesirable
/-- The number of sign changes does not change if we negate. -/
@[simp]
theorem signVariations_neg : signVariations (-P) = signVariations P := by
Expand Down
1 change: 1 addition & 0 deletions Mathlib/Algebra/Quaternion.lean
Original file line number Diff line number Diff line change
Expand Up @@ -1442,6 +1442,7 @@ theorem mk_univ_quaternionAlgebra : #(Set.univ : Set ℍ[R,c₁,c₂,c₃]) = #R
theorem mk_univ_quaternionAlgebra_of_infinite [Infinite R] :
#(Set.univ : Set ℍ[R,c₁,c₂,c₃]) = #R := by rw [mk_univ_quaternionAlgebra, pow_four]

set_option linter.style.whitespace false in -- linter false positive around s!, TODO fix properly
/-- Show the quaternion ⟨w, x, y, z⟩ as a string "{ re := w, imI := x, imJ := y, imK := z }".

For the typical case of quaternions over ℝ, each component will show as a Cauchy sequence due to
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,7 @@ universe r s u v

variable {R : Type r} {S : Type s} {A F : Type u} {B K : Type v}

set_option linter.style.whitespace false in -- linter false positive
name_poly_vars X, Y, Z over R

namespace WeierstrassCurve
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,7 @@ universe r s u v

variable {R : Type r} {S : Type s} {A F : Type u} {B K : Type v}

set_option linter.style.whitespace false in -- linter false positive
name_poly_vars X, Y, Z over R

namespace WeierstrassCurve
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,7 @@ lemma Y_eq_of_Y_ne [NoZeroDivisors R] {P Q : Fin 3 → R} (hP : W'.Equation P) (
sub_eq_zero.mp <| (mul_eq_zero.mp <| Y_sub_Y_mul_Y_sub_negY hP hQ hx).resolve_left <|
mul_ne_zero (mul_ne_zero hPz hQz) <| sub_ne_zero.mpr hy

set_option linter.style.whitespace false in -- TODO: fix the line break in the proof nicely!
lemma Y_eq_of_Y_ne' [NoZeroDivisors R] {P Q : Fin 3 → R} (hP : W'.Equation P) (hQ : W'.Equation Q)
(hPz : P z ≠ 0) (hQz : Q z ≠ 0) (hx : P x * Q z = Q x * P z)
(hy : P y * Q z ≠ W'.negY Q * P z) : P y * Q z = Q y * P z :=
Expand Down
2 changes: 1 addition & 1 deletion Mathlib/AlgebraicTopology/SimplicialComplex/Basic.lean
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,7 @@ instance : InfSet (AbstractSimplicialComplex ι) where
grind [IsRelLowerSet.mem_of_le, PreAbstractSimplicialComplex.isRelLowerSet_faces,
mem_iInter]
singleton_mem v := by
grind [Set.mem_iInter, Finset.singleton_nonempty, singleton_mem] }
grind [Set.mem_iInter, Finset.singleton_nonempty, singleton_mem] }

instance : Top (AbstractSimplicialComplex ι) where
top :=
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,7 @@ def idCompId (x : X _⦋0⦌₂) :
CompStruct (.id x) (.id x) (.id x) :=
idComp _

set_option linter.style.whitespace false in -- linter false positive
attribute [local simp ←] FunctorToTypes.naturality in
/-- The image of a `Edge.CompStruct` by a morphism of `2`-truncated
simplicial sets. -/
Expand Down
Loading
Loading