Skip to content

Commit f1c04a7

Browse files
alokclaude
andcommitted
style: fix spelling errors in Lean/ docstrings
This PR fixes spelling errors in Lean compiler documentation: - "occuring" → "occurring" in LibrarySuggestions/Basic.lean (2 occurrences) - "the the" → "the" in Meta/Match/Match.lean - "interatively" → "iteratively" in Meta/Match/Match.lean - "with with" → "with" in DefEqAttrib.lean - "We we" → "We" in Meta/WHNF.lean - "of of" → "of" in Shell.lean - "have have" → "have" in Compiler/LCNF/Specialize.lean 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
1 parent ef9777e commit f1c04a7

File tree

8 files changed

+10
-10
lines changed

8 files changed

+10
-10
lines changed

src/Lean/Compiler/LCNF/Specialize.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -226,7 +226,7 @@ def shouldSpecialize (specEntry : SpecEntry) (args : Array Arg) : SpecializeM Bo
226226
If we have `f p` where `p` is a param it makes no sense to specialize as we will just
227227
close over `p` again and will have made no progress.
228228
229-
The reason for doing this only for declarations which have have already been specialised
229+
The reason for doing this only for declarations which have already been specialised
230230
themselves is, that we *must* always specialize declarations that are marked with
231231
`@[specialize]`. This is because the specializer will not specialize their bodies because it
232232
waits for the bodies to be specialized at the call site. This is for example important in

src/Lean/DefEqAttrib.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ Marks the theorem as a definitional equality.
5656
The theorem must be an equality that holds by `rfl`. This allows `dsimp` to use this theorem
5757
when rewriting.
5858
59-
A theorem with with a definition that is (syntactically) `:= rfl` is implicitly marked `@[defeq]`.
59+
A theorem with a definition that is (syntactically) `:= rfl` is implicitly marked `@[defeq]`.
6060
To avoid this behavior, write `:= (rfl)` instead.
6161
6262
The attribute should be given before a `@[simp]` attribute to have effect.

src/Lean/Elab/PreDefinition/FixedParams.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -462,7 +462,7 @@ def FixedParamPerms.erase (fixedParamPerms : FixedParamPerms) (xs : Array Expr)
462462
assert! paramIdx < mapping.size
463463
if let some fixedParamIdx := mapping[paramIdx]! then
464464
mask := mask.set! fixedParamIdx true
465-
-- Take the transitive closure under under `fixedParamPerms.revDeps`.
465+
-- Take the transitive closure under `fixedParamPerms.revDeps`.
466466
let mut changed := true
467467
while changed do
468468
changed := false

src/Lean/LibrarySuggestions/Basic.lean

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -92,10 +92,10 @@ end FoldRelevantConstantsImpl
9292
@[implemented_by FoldRelevantConstantsImpl.foldUnsafe]
9393
public opaque foldRelevantConstants {α : Type} (e : Expr) (init : α) (f : Name → α → MetaM α) : MetaM α := pure init
9494

95-
/-- Collect the constants occuring in `e` (once each), skipping instance arguments and proofs. -/
95+
/-- Collect the constants occurring in `e` (once each), skipping instance arguments and proofs. -/
9696
public def relevantConstants (e : Expr) : MetaM (Array Name) := foldRelevantConstants e #[] (fun n ns => return ns.push n)
9797

98-
/-- Collect the constants occuring in `e` (once each), skipping instance arguments and proofs. -/
98+
/-- Collect the constants occurring in `e` (once each), skipping instance arguments and proofs. -/
9999
public def relevantConstantsAsSet (e : Expr) : MetaM NameSet := foldRelevantConstants e ∅ (fun n ns => return ns.insert n)
100100

101101
end Lean.Expr

src/Lean/Meta/Match/Match.lean

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,9 @@ import Lean.Meta.Match.NamedPatterns
2222

2323
/-!
2424
This module implements the backend of match compilation. The elaborator has already elaborated
25-
the patterns and the the expected type of the matcher is known.
25+
the patterns and the expected type of the matcher is known.
2626
27-
The match compilation task is represented as a `Problem`, which is then processed interatively by
27+
The match compilation task is represented as a `Problem`, which is then processed iteratively by
2828
the `process` function. It has various “moves” which it tries in a particular order, to make progress
2929
on the problem, possibly splitting it.
3030

src/Lean/Meta/WHNF.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -210,7 +210,7 @@ private def isWFRec (declName : Name) : Bool :=
210210
/--
211211
Helper method for `reduceRec`.
212212
We use it to ensure we don't expose `Nat.add` when reducing `Nat.rec`.
213-
We we use the following trick, if `e` can be expressed as an offset `(a, k)` with `k > 0`,
213+
We use the following trick: if `e` can be expressed as an offset `(a, k)` with `k > 0`,
214214
we create a new expression `Nat.succ e'` where `e'` is `a` for `k = 1`, or `a + (k-1)` for `k > 1`.
215215
See issue #3022
216216
-/

src/Lean/Server/FileWorker/RequestHandling.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ def findCompletionCmdDataAtPos
3333
: ServerTask (Option (Syntax × Elab.InfoTree)) :=
3434
-- `findCmdDataAtPos` may produce an incorrect snapshot when `pos` is in whitespace.
3535
-- However, most completions don't need trailing whitespace at the term level;
36-
-- synthetic completions are the only notions of completion that care care about whitespace.
36+
-- synthetic completions are the only notions of completion that care about whitespace.
3737
-- Synthetic tactic completion only needs the `ContextInfo` of the command, so any snapshot
3838
-- will do.
3939
-- Synthetic field completion in `{ }` doesn't care about whitespace;

src/Lean/Shell.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ opaque Internal.enableDebug (tag : @& String) : BaseIO Unit
108108
/--
109109
Lean's short version string (i.e., what is printed by `lean --short-version`).
110110
111-
This is the Lean equivalent of of the C++ `LEAN_VERSION_STRING` / `g_short_version_string`.
111+
This is the Lean equivalent of the C++ `LEAN_VERSION_STRING` / `g_short_version_string`.
112112
-/
113113
def shortVersionString : String :=
114114
if version.specialDesc ≠ "" then

0 commit comments

Comments
 (0)