Skip to content

Commit c062e48

Browse files
Update lean-toolchain for leanprover/lean4#11220
2 parents dc56b80 + eda6b96 commit c062e48

File tree

11 files changed

+23
-12
lines changed

11 files changed

+23
-12
lines changed

Mathlib/NumberTheory/SumTwoSquares.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -222,7 +222,7 @@ theorem Nat.eq_sq_add_sq_iff {n : ℕ} :
222222
refine eq_sq_add_sq_iff_eq_sq_mul.trans ⟨fun ⟨a, b, h₁, h₂⟩ q hq h ↦ ?_, fun H ↦ ?_⟩
223223
· have : Fact q.Prime := ⟨prime_of_mem_primeFactors hq⟩
224224
have : q ∣ b → q ∈ b.primeFactors := by grind [mem_primeFactors]
225-
grind [padicValNat.mul, padicValNat.pow,
225+
grind (splits := 10) [padicValNat.mul, padicValNat.pow,
226226
padicValNat.eq_zero_of_not_dvd, mod_four_ne_three_of_mem_primeFactors_of_isSquare_neg_one]
227227
· obtain ⟨b, a, hb₀, ha₀, hab, hb⟩ := sq_mul_squarefree_of_pos hn₀
228228
refine ⟨a, b, hab.symm, ZMod.isSquare_neg_one_iff_forall_mem_primeFactors_mod_four_ne_three hb

Mathlib/Tactic/Linter/DeprecatedSyntaxLinter.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ where `<option>` contains `maxHeartbeats`, then it returns
107107
108108
Otherwise, it returns `none`.
109109
-/
110-
def getSetOptionMaxHeartbeatsComment : Syntax → Option (Name × Nat × Substring)
110+
def getSetOptionMaxHeartbeatsComment : Syntax → Option (Name × Nat × Substring.Raw)
111111
| stx@`(command|set_option $mh $n:num in $_) =>
112112
let opt := mh.getId
113113
if !opt.components.contains `maxHeartbeats then

Mathlib/Tactic/Linter/Header.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ In conclusion, either the parsing is successful, and the linter can continue wit
9797
or the parsing is not successful and the linter will flag a missing module doc-string!
9898
-/
9999
def parseUpToHere (pos : String.Pos.Raw) (post : String := "") : CommandElabM Syntax := do
100-
let upToHere : Substring := { str := (← getFileMap).source, startPos := ⟨0⟩, stopPos := pos }
100+
let upToHere : Substring.Raw := { str := (← getFileMap).source, startPos := ⟨0⟩, stopPos := pos }
101101
-- Append a further string after the content of `upToHere`.
102102
Parser.testParseModule (← getEnv) "linter.style.header" (upToHere.toString ++ post)
103103

Mathlib/Tactic/Linter/PPRoundtrip.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ def posToShiftedPos (lths : Array Nat) (diff : Nat) : Nat := Id.run do
8484

8585
/-- `zoomString str centre offset` returns the substring of `str` consisting of the `offset`
8686
characters around the `centre`th character. -/
87-
def zoomString (str : String) (centre offset : Nat) : Substring :=
87+
def zoomString (str : String) (centre offset : Nat) : Substring.Raw :=
8888
{ str := str, startPos := ⟨centre - offset⟩, stopPos := ⟨centre + offset⟩ }
8989

9090
/-- `capSourceInfo s p` "shortens" all end-position information in the `SourceInfo` `s` to be

Mathlib/Tactic/Simps/Basic.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -507,7 +507,7 @@ This is checked by inspecting whether the first character of the remaining part
507507
508508
We use this variant because the latter is often a different field with an auto-generated name.
509509
-/
510-
private def dropPrefixIfNotNumber? (s : String) (pre : String) : Option Substring := do
510+
private def dropPrefixIfNotNumber? (s : String) (pre : String) : Option Substring.Raw := do
511511
let ret ← s.dropPrefix? pre
512512
-- flag is true when the remaining part is nonempty and starts with a digit.
513513
let flag := ret.toString.toList.head?.elim false Char.isDigit

Mathlib/Tactic/ToExpr.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ instance [ToLevel.{u}] : ToExpr PUnit.{u+1} where
2323
toTypeExpr := mkConst ``PUnit [toLevel.{u+1}]
2424

2525
deriving instance ToExpr for String.Pos.Raw
26-
deriving instance ToExpr for Substring
26+
deriving instance ToExpr for Substring.Raw
2727
deriving instance ToExpr for SourceInfo
2828
deriving instance ToExpr for Syntax
2929

Mathlib/Topology/MetricSpace/Pseudo/Defs.lean

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -594,6 +594,10 @@ theorem isBounded_iff {s : Set α} :
594594
rw [isBounded_def, ← Filter.mem_sets, @PseudoMetricSpace.cobounded_sets α, mem_setOf_eq,
595595
compl_compl]
596596

597+
lemma boundedSpace_iff : BoundedSpace α ↔ ∃ C, ∀ a b : α, dist a b ≤ C := by
598+
rw [← isBounded_univ, Metric.isBounded_iff]
599+
simp
600+
597601
theorem isBounded_iff_eventually {s : Set α} :
598602
IsBounded s ↔ ∀ᶠ C in atTop, ∀ ⦃x⦄, x ∈ s → ∀ ⦃y⦄, y ∈ s → dist x y ≤ C :=
599603
isBounded_iff.trans
@@ -610,6 +614,13 @@ theorem isBounded_iff_nndist {s : Set α} :
610614
simp only [isBounded_iff_exists_ge 0, NNReal.exists, ← NNReal.coe_le_coe, ← dist_nndist,
611615
NNReal.coe_mk, exists_prop]
612616

617+
lemma boundedSpace_iff_nndist : BoundedSpace α ↔ ∃ C, ∀ a b : α, nndist a b ≤ C := by
618+
rw [← isBounded_univ, Metric.isBounded_iff_nndist]
619+
simp
620+
621+
lemma boundedSpace_iff_edist : BoundedSpace α ↔ ∃ C : ℝ≥0, ∀ a b : α, edist a b ≤ C := by
622+
simp [Metric.boundedSpace_iff_nndist]
623+
613624
theorem toUniformSpace_eq :
614625
‹PseudoMetricSpace α›.toUniformSpace = .ofDist dist dist_self dist_comm dist_triangle :=
615626
UniformSpace.ext PseudoMetricSpace.uniformity_dist

Mathlib/Util/Superscript.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ partial def scriptFnNoAntiquot (m : Mapping) (errorMsg : String) (p : ParserFn)
148148
if s.hasError then return s
149149
let rec
150150
/-- Applies the alignment mapping to a `Substring`. -/
151-
alignSubstr : Substring → Substring
151+
alignSubstr : Substring.Raw → Substring.Raw
152152
| ⟨_newStr, start, stop⟩ => c.substring (align start) (align stop),
153153
/-- Applies the alignment mapping to a `SourceInfo`. -/
154154
alignInfo : SourceInfo → SourceInfo

lake-manifest.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,10 +35,10 @@
3535
"type": "git",
3636
"subDir": null,
3737
"scope": "leanprover-community",
38-
"rev": "fb8ed0a85a96e3176f6e94b20d413ea72d92576d",
38+
"rev": "9ca66a6f83caf151b447a9102554c8eccf33c70f",
3939
"name": "proofwidgets",
4040
"manifestFile": "lake-manifest.json",
41-
"inputRev": "v0.0.77",
41+
"inputRev": "v0.0.80-pre1",
4242
"inherited": false,
4343
"configFile": "lakefile.lean"},
4444
{"url": "https://github.com/leanprover-community/aesop",
@@ -65,7 +65,7 @@
6565
"type": "git",
6666
"subDir": null,
6767
"scope": "leanprover-community",
68-
"rev": "68933c0ffa67a70297e5f7cd025708eac1e32b9f",
68+
"rev": "f80f38d975a7e02e8e2f3b07c1e3b847dcd4e6ec",
6969
"name": "batteries",
7070
"manifestFile": "lake-manifest.json",
7171
"inputRev": "lean-pr-testing-11220",

lakefile.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ open Lake DSL
99
require "leanprover-community" / "batteries" @ git "lean-pr-testing-11220"
1010
require "leanprover-community" / "Qq" @ git "master"
1111
require "leanprover-community" / "aesop" @ git "nightly-testing"
12-
require "leanprover-community" / "proofwidgets" @ git "v0.0.77" -- ProofWidgets should always be pinned to a specific version
12+
require "leanprover-community" / "proofwidgets" @ git "v0.0.80-pre1" -- ProofWidgets should always be pinned to a specific version
1313
with NameMap.empty.insert `errorOnBuild
1414
"ProofWidgets not up-to-date. \
1515
Please run `lake exe cache get` to fetch the latest ProofWidgets. \

0 commit comments

Comments
 (0)