Skip to content

Commit 2521caa

Browse files

File tree

82 files changed

+465
-528
lines changed

Some content is hidden

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

82 files changed

+465
-528
lines changed

.github/workflows/nightly-docgen.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ jobs:
5757
[[require]]
5858
scope = "leanprover"
5959
name = "doc-gen4"
60-
rev = "nightly-testing"
60+
rev = "main"
6161
EOF
6262
6363
# Initialise docbuild as a Lean project

Cache/IO.lean

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ def CURLBIN :=
7070

7171
/-- leantar version at https://github.com/digama0/leangz -/
7272
def LEANTARVERSION :=
73-
"0.1.16-pre3"
73+
"0.1.15"
7474

7575
def EXE := if System.Platform.isWindows then ".exe" else ""
7676

@@ -90,7 +90,7 @@ def getLeanTar : IO String := do
9090
/-- Bump this number to invalidate the cache, in case the existing hashing inputs are insufficient.
9191
It is not a global counter, and can be reset to 0 as long as the lean githash or lake manifest has
9292
changed since the last time this counter was touched. -/
93-
def rootHashGeneration : UInt64 := 3
93+
def rootHashGeneration : UInt64 := 0
9494

9595
/--
9696
`CacheM` stores the following information:
@@ -311,18 +311,10 @@ def mkBuildPaths (mod : Name) : CacheM <| List (FilePath × Bool) := do
311311
return [
312312
-- Note that `packCache` below requires that the `.trace` file is first in this list.
313313
(packageDir / LIBDIR / path.withExtension "trace", true),
314-
-- Note: the `.olean`, `.olean.server`, `.olean.private` files must be consecutive,
315-
-- and in this order. The corresponding `.hash` files can come afterwards, in any order.
316314
(packageDir / LIBDIR / path.withExtension "olean", true),
317-
(packageDir / LIBDIR / path.withExtension "olean.server", false),
318-
(packageDir / LIBDIR / path.withExtension "olean.private", false),
319315
(packageDir / LIBDIR / path.withExtension "olean.hash", true),
320-
(packageDir / LIBDIR / path.withExtension "olean.server.hash", false),
321-
(packageDir / LIBDIR / path.withExtension "olean.private.hash", false),
322316
(packageDir / LIBDIR / path.withExtension "ilean", true),
323317
(packageDir / LIBDIR / path.withExtension "ilean.hash", true),
324-
(packageDir / LIBDIR / path.withExtension "ir", false),
325-
(packageDir / LIBDIR / path.withExtension "ir.hash", false),
326318
(packageDir / IRDIR / path.withExtension "c", true),
327319
(packageDir / IRDIR / path.withExtension "c.hash", true),
328320
(packageDir / LIBDIR / path.withExtension "extra", false)]

Cache/Requests.lean

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ def extractRepoFromUrl (url : String) : Option String := do
3131
let url := url.stripSuffix ".git"
3232
let pos ← url.revFind (· == '/')
3333
let pos ← url.revFindAux (fun c => c == '/' || c == ':') pos
34-
return (String.Pos.Raw.extract url) (String.Pos.Raw.next url pos) url.endPos
34+
return url.extract (url.next pos) url.endPos
3535

3636
/-- Spot check if a URL is valid for a git remote -/
3737
def isRemoteURL (url : String) : Bool :=
@@ -81,12 +81,12 @@ def findMathlibRemote (mathlibDepPath : FilePath) : IO String := do
8181
Ensure Git is installed.\n\
8282
Stdout:\n{remotesInfo.stdout.trim}\nStderr:\n{remotesInfo.stderr.trim}\n"
8383

84-
let remoteLines := remotesInfo.stdout.splitToList (· == '\n')
84+
let remoteLines := remotesInfo.stdout.split (· == '\n')
8585
let mut mathlibRemote : Option String := none
8686
let mut originPointsToMathlib : Bool := false
8787

8888
for line in remoteLines do
89-
let parts := line.trim.splitToList (· == '\t')
89+
let parts := line.trim.split (· == '\t')
9090
if parts.length >= 2 then
9191
let remoteName := parts[0]!
9292
let remoteUrl := parts[1]!.takeWhile (· != ' ') -- Remove (fetch) or (push) suffix
@@ -115,7 +115,7 @@ def findMathlibRemote (mathlibDepPath : FilePath) : IO String := do
115115
Extracts PR number from a git ref like "refs/remotes/upstream/pr/1234"
116116
-/
117117
def extractPRNumber (ref : String) : Option Nat := do
118-
let parts := ref.splitToList (· == '/')
118+
let parts := ref.split (· == '/')
119119
if parts.length >= 2 && parts[parts.length - 2]! == "pr" then
120120
let prStr := parts[parts.length - 1]!
121121
prStr.toNat?

Mathlib.lean

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4159,7 +4159,6 @@ import Mathlib.InformationTheory.KullbackLeibler.KLFun
41594159
import Mathlib.Init
41604160
import Mathlib.Lean.ContextInfo
41614161
import Mathlib.Lean.CoreM
4162-
import Mathlib.Lean.Elab.InfoTree
41634162
import Mathlib.Lean.Elab.Tactic.Basic
41644163
import Mathlib.Lean.Elab.Tactic.Meta
41654164
import Mathlib.Lean.Elab.Term

Mathlib/Algebra/Algebra/StrictPositivity.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ lemma _root_.IsUnit.isStrictlyPositive [LE A] [Monoid A] [Zero A]
6060
lemma isSelfAdjoint [Semiring A] [PartialOrder A] [StarRing A] [StarOrderedRing A] {a : A}
6161
(ha : IsStrictlyPositive a) : IsSelfAdjoint a := ha.nonneg.isSelfAdjoint
6262

63-
@[simp, grind .]
63+
@[simp, grind]
6464
lemma _root_.isStrictlyPositive_one [LE A] [Monoid A] [Zero A] [ZeroLEOneClass A] :
6565
IsStrictlyPositive (1 : A) := iff_of_unital.mpr ⟨zero_le_one, isUnit_one⟩
6666

Mathlib/Algebra/BigOperators/Group/List/Basic.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ theorem prod_concat : (l.concat a).prod = l.prod * a := by
5353
theorem prod_flatten {l : List (List M)} : l.flatten.prod = (l.map List.prod).prod := by
5454
induction l with
5555
| nil => simp
56-
| cons head tail ih => simp only [*, List.flatten_cons, map, prod_append, prod_cons]
56+
| cons head tail ih => simp only [*, List.flatten, map, prod_append, prod_cons]
5757

5858
open scoped Relator in
5959
@[to_additive]

Mathlib/Algebra/BigOperators/Group/List/Lemmas.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ lemma drop_take_succ_flatten_eq_getElem (L : List (List α)) (i : Nat) (h : i <
138138
have : (L.map length).take i = ((L.take (i + 1)).map length).take i := by
139139
simp [map_take, take_take, Nat.min_eq_left]
140140
simp only [this, take_sum_flatten, drop_sum_flatten,
141-
drop_take_succ_eq_cons_getElem, h, flatten_nil, flatten_cons, append_nil]
141+
drop_take_succ_eq_cons_getElem, h, flatten, append_nil]
142142

143143
end List
144144

Mathlib/Algebra/Notation/Defs.lean

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,10 @@ attribute [to_additive existing (reorder := 1 2, 5 6) hSMul] HPow.hPow
7474
attribute [to_additive existing (reorder := 1 2, 4 5) smul] Pow.pow
7575

7676
attribute [to_additive (attr := default_instance)] instHSMul
77+
78+
@[to_additive]
79+
theorem SMul.smul_eq_hSMul {α β} [SMul α β] : (SMul.smul : α → β → β) = HSMul.hSMul := rfl
80+
7781
attribute [to_additive existing (reorder := 1 2)] instHPow
7882

7983
variable {G : Type*}

Mathlib/Algebra/Order/Ring/Unbundled/Rat.lean

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -120,10 +120,7 @@ instance : AddLeftMono ℚ where
120120

121121
theorem div_lt_div_iff_mul_lt_mul {a b c d : ℤ} (b_pos : 0 < b) (d_pos : 0 < d) :
122122
(a : ℚ) / b < c / d ↔ a * d < c * b := by
123-
simp only [lt_iff_le_not_ge]
124-
apply and_congr
125-
· simp [div_def', Rat.divInt_le_divInt b_pos d_pos]
126-
· simp [div_def', Rat.divInt_le_divInt d_pos b_pos]
123+
grind [lt_iff_le_not_ge, Rat.divInt_le_divInt, div_def', num_intCast, den_intCast]
127124

128125
theorem lt_one_iff_num_lt_denom {q : ℚ} : q < 1 ↔ q.num < q.den := by simp [Rat.lt_iff]
129126

Mathlib/Algebra/Polynomial/RuleOfSigns.lean

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -244,12 +244,6 @@ private lemma exists_cons_of_leadingCoeff_pos (η) (h₁ : 0 < leadingCoeff P) (
244244
by_cases h₉ : ((X - C η) * P).nextCoeff = 0
245245
· suffices ((X - C η) * P).eraseLead = ((X - C η) * P.eraseLead).eraseLead by
246246
have := coeffList_eraseLead (mul_ne_zero (X_sub_C_ne_zero η) h₃)
247-
#adaptation_note
248-
/--
249-
Moving from `nightly-2025-10-13` to `nightly-2025-10-19`
250-
we now need to provide an intermediate step.
251-
-/
252-
have : ((X - C η) * P).natDegree - ((X - C η) * P).eraseLead.degree.succ = n + 1 := by grind
253247
grind [leadingCoeff_mul, leadingCoeff_X_sub_C]
254248
suffices C η * monomial P.natDegree P.leadingCoeff = monomial P.natDegree P.nextCoeff by
255249
grind [X_mul_monomial, sub_mul, mul_sub, self_sub_monomial_natDegree_leadingCoeff]

0 commit comments

Comments
 (0)