diff --git a/Mathlib/CategoryTheory/ConcreteCategory/Basic.lean b/Mathlib/CategoryTheory/ConcreteCategory/Basic.lean index 90b3840786416d..942e1a43e44c80 100644 --- a/Mathlib/CategoryTheory/ConcreteCategory/Basic.lean +++ b/Mathlib/CategoryTheory/ConcreteCategory/Basic.lean @@ -1,7 +1,8 @@ /- Copyright (c) 2018 Kim Morrison. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. -Authors: Kim Morrison, Johannes Hölzl, Reid Barton, Sean Leather, Yury Kudryashov, Anne Baanen, Dagur Asgeirsson +Authors: Kim Morrison, Johannes Hölzl, Reid Barton, Sean Leather, Yury Kudryashov, Anne Baanen, + Dagur Asgeirsson -/ module diff --git a/Mathlib/Data/Nat/Choose/Basic.lean b/Mathlib/Data/Nat/Choose/Basic.lean index 15a5c95dae82b6..efef1f793d39f9 100644 --- a/Mathlib/Data/Nat/Choose/Basic.lean +++ b/Mathlib/Data/Nat/Choose/Basic.lean @@ -1,7 +1,8 @@ /- Copyright (c) 2018 Chris Hughes. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. -Authors: Chris Hughes, Bhavik Mehta, Stuart Presnell, Antoine Chambert-Loir, María-Inés de Frutos—Fernández +Authors: Chris Hughes, Bhavik Mehta, Stuart Presnell, Antoine Chambert-Loir, + María-Inés de Frutos—Fernández -/ module diff --git a/Mathlib/RingTheory/Valuation/LocalSubring.lean b/Mathlib/RingTheory/Valuation/LocalSubring.lean index 72196d82e10894..2af44c2628170a 100644 --- a/Mathlib/RingTheory/Valuation/LocalSubring.lean +++ b/Mathlib/RingTheory/Valuation/LocalSubring.lean @@ -1,5 +1,6 @@ /- -Copyright (c) 2024 Andrew Yang, Yaël Dillies, Javier López-Contreras, Daniel Funck, Junyan Xu. All rights reserved. +Copyright (c) 2024 Andrew Yang, Yaël Dillies, Javier López-Contreras, Daniel Funck, Junyan Xu. +All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Andrew Yang, Yaël Dillies, Javier López-Contreras, Daniel Funck, Junyan Xu -/ @@ -12,6 +13,10 @@ public import Mathlib.RingTheory.Polynomial.Ideal public import Mathlib.RingTheory.Valuation.Integral public import Mathlib.RingTheory.Valuation.ValuationSubring +-- The copyright notice exceeds the maximum column width, but the `linter.style.header` linter +-- flags the copyright notice if "All rights reserved." is not on the same line as "Copyright". +set_option linter.style.header false + /-! # Valuation subrings are exactly the maximal local subrings diff --git a/Mathlib/Tactic/CancelDenoms.lean b/Mathlib/Tactic/CancelDenoms.lean index 0f0d02d1e46f15..feb75d4d83bb9e 100644 --- a/Mathlib/Tactic/CancelDenoms.lean +++ b/Mathlib/Tactic/CancelDenoms.lean @@ -2,3 +2,5 @@ module public import Mathlib.Tactic.CancelDenoms.Core public import Mathlib.Tactic.NormNum.Ineq + +set_option linter.style.header false diff --git a/Mathlib/Tactic/DefEqTransformations.lean b/Mathlib/Tactic/DefEqTransformations.lean index 8cf395eb1e2cc0..94d36c226bbe5d 100644 --- a/Mathlib/Tactic/DefEqTransformations.lean +++ b/Mathlib/Tactic/DefEqTransformations.lean @@ -309,7 +309,7 @@ def etaStruct? (e : Expr) (tryWhnfR : Bool := true) : MetaM (Option Expr) := do let .const f _ := e.getAppFn | return none let some (ConstantInfo.ctorInfo fVal) := (← getEnv).find? f | return none unless 0 < fVal.numFields && e.getAppNumArgs == fVal.numParams + fVal.numFields do return none - unless isStructureLike (← getEnv) fVal.induct do return none + unless isStructure (← getEnv) fVal.induct do return none let args := e.getAppArgs let mut x? ← findProj fVal args pure if tryWhnfR then diff --git a/Mathlib/Tactic/Linter.lean b/Mathlib/Tactic/Linter.lean index 310e9d9a6e06cf..8bd76d57ce0b46 100644 --- a/Mathlib/Tactic/Linter.lean +++ b/Mathlib/Tactic/Linter.lean @@ -16,3 +16,5 @@ public import Mathlib.Tactic.Linter.PPRoundtrip public import Mathlib.Tactic.Linter.PrivateModule public import Mathlib.Tactic.Linter.UnusedInstancesInType public import Mathlib.Tactic.Linter.UpstreamableDecl + +set_option linter.style.header false diff --git a/Mathlib/Tactic/Linter/Header.lean b/Mathlib/Tactic/Linter/Header.lean index bd62c956b86f14..5e3afb470296e6 100644 --- a/Mathlib/Tactic/Linter/Header.lean +++ b/Mathlib/Tactic/Linter/Header.lean @@ -419,13 +419,14 @@ def headerLinter : Linter where run := withSetOptionIn fun stx ↦ do | .original lead .. => lead.toString | _ => "" -- Report any errors about the copyright line. - if mainModule != `Mathlib.Init then + if mainModule != `Mathlib.Init && mainModule != `Mathlib.Tactic then for (stx, m) in copyrightHeaderChecks copyright do Linter.logLint linter.style.header stx m!"* '{stx.getAtomVal}':\n{m}\n" -- Report a missing module doc-string. match afterImports with | none => return | some (.node _ ``Lean.Parser.Command.moduleDoc _) => return + | some (.node _ ``Lean.Parser.Command.eoi _) => return | some rest => Linter.logLint linter.style.header rest m!"The module doc-string for a file should be the first command after the imports.\n\ diff --git a/Mathlib/Tactic/Monotonicity.lean b/Mathlib/Tactic/Monotonicity.lean index a4a268ac4657c8..dec6ecbf4cfbca 100644 --- a/Mathlib/Tactic/Monotonicity.lean +++ b/Mathlib/Tactic/Monotonicity.lean @@ -2,3 +2,5 @@ module public import Mathlib.Tactic.Monotonicity.Basic public import Mathlib.Tactic.Monotonicity.Lemmas + +set_option linter.style.header false diff --git a/Mathlib/Tactic/NormNum.lean b/Mathlib/Tactic/NormNum.lean index 160c73ae742daf..7a839bb5977144 100644 --- a/Mathlib/Tactic/NormNum.lean +++ b/Mathlib/Tactic/NormNum.lean @@ -9,3 +9,5 @@ public import Mathlib.Tactic.NormNum.Ineq public import Mathlib.Tactic.NormNum.Inv public import Mathlib.Tactic.NormNum.OfScientific public import Mathlib.Tactic.NormNum.Pow + +set_option linter.style.header false diff --git a/Mathlib/Tactic/Positivity.lean b/Mathlib/Tactic/Positivity.lean index c55fd1e6a882e6..eaffac58155e49 100644 --- a/Mathlib/Tactic/Positivity.lean +++ b/Mathlib/Tactic/Positivity.lean @@ -2,3 +2,5 @@ module public import Mathlib.Tactic.Positivity.Basic public import Mathlib.Tactic.Positivity.Finset + +set_option linter.style.header false diff --git a/Mathlib/Tactic/Ring.lean b/Mathlib/Tactic/Ring.lean index 4bddcebb2e6a40..a0dab621a2ef7c 100644 --- a/Mathlib/Tactic/Ring.lean +++ b/Mathlib/Tactic/Ring.lean @@ -3,3 +3,5 @@ module public import Mathlib.Tactic.Ring.Basic public import Mathlib.Tactic.Ring.PNat public import Mathlib.Tactic.Ring.RingNF + +set_option linter.style.header false diff --git a/Mathlib/Tactic/Translate/Core.lean b/Mathlib/Tactic/Translate/Core.lean index a1b04042a52202..2f7ddc6de98496 100644 --- a/Mathlib/Tactic/Translate/Core.lean +++ b/Mathlib/Tactic/Translate/Core.lean @@ -291,14 +291,14 @@ structure Config : Type where /-- The given name of the target. -/ tgt : Name := Name.anonymous /-- An optional doc string. -/ - doc : Option String := none + doc : Option String := .none /-- If `allowAutoName` is `false` (default) then we check whether the given name can be auto-generated. -/ allowAutoName : Bool := false /-- The arguments that should be reordered when translating, using cycle notation. -/ - reorder? : Option Reorder := none + reorder? : Option Reorder := .none /-- The argument used to determine whether this constant should be translated. -/ - relevantArg? : Option RelevantArg := none + relevantArg? : Option RelevantArg := .none /-- The attributes which we want to give to the original and translated declaration. For `simps` this will also add generated lemmas to the translation dictionary. -/ attrs : Array Syntax := #[] diff --git a/lake-manifest.json b/lake-manifest.json index b5083d35a59ab6..dc38ffed83c002 100644 --- a/lake-manifest.json +++ b/lake-manifest.json @@ -5,10 +5,10 @@ "type": "git", "subDir": null, "scope": "leanprover-community", - "rev": "8629a535d10cd7edfbf1a2c5cdfbaeee135a62cd", + "rev": "c7314e41459a8c0aa8c9b610748c72292851625d", "name": "plausible", "manifestFile": "lake-manifest.json", - "inputRev": "main", + "inputRev": "nightly-testing", "inherited": false, "configFile": "lakefile.toml"}, {"url": "https://github.com/leanprover-community/LeanSearchClient", @@ -25,7 +25,7 @@ "type": "git", "subDir": null, "scope": "leanprover-community", - "rev": "f7f57d837a219a8e298798faba94bc7082111a7d", + "rev": "f207d9fcf0cef00ba79962a33ef156061914d9c7", "name": "importGraph", "manifestFile": "lake-manifest.json", "inputRev": "main", @@ -65,7 +65,7 @@ "type": "git", "subDir": null, "scope": "leanprover-community", - "rev": "922c94b86687f3b7ab165d43ce9ddee610696d0c", + "rev": "4f2de985dc0dd8daac986dcdb4cc9ea38774d35a", "name": "batteries", "manifestFile": "lake-manifest.json", "inputRev": "nightly-testing", @@ -75,10 +75,10 @@ "type": "git", "subDir": null, "scope": "leanprover", - "rev": "06c8b4d690d9b7ef98d594672bbdaa618156215a", + "rev": "3de531c1135f5e3a01f3ac04830996fda476b28e", "name": "Cli", "manifestFile": "lake-manifest.json", - "inputRev": "v4.29.0-rc4", + "inputRev": "v4.29.0-rc6", "inherited": true, "configFile": "lakefile.toml"}], "name": "mathlib", diff --git a/lean-toolchain b/lean-toolchain index fd315255c53152..a07c58f5e4e07a 100644 --- a/lean-toolchain +++ b/lean-toolchain @@ -1 +1 @@ -leanprover/lean4:nightly-2026-03-05 +leanprover/lean4:nightly-2026-03-09