Skip to content

Commit 1e1ed16

Browse files
alokclaude
andauthored
doc: correct typos in documentation and comments (#11465)
This PR fixes various typos across the codebase in documentation and comments. - `infered` → `inferred` (ParserCompiler.lean) - `declartation` → `declaration` (Cleanup.lean) - `certian` → `certain` (CasesInfo.lean) - `wil` → `will` (Cache.lean) - `the the` → `the` (multiple files - PrefixTree.lean, Sum/Basic.lean, List/Nat/Perm.lean, Time.lean, Bounded.lean, Lake files) - `to to` → `to` (MutualInductive.lean, simp_bubblesort_256.lean) - Grammar improvements in Bounded.lean and Time.lean All changes are to comments and documentation only - no functional changes. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: Claude <[email protected]>
1 parent 226a90f commit 1e1ed16

File tree

13 files changed

+17
-17
lines changed

13 files changed

+17
-17
lines changed

src/Init/Data/List/Nat/Perm.lean

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,14 +60,14 @@ theorem set_set_perm {as : List α} {i j : Nat} (h₁ : i < as.length) (h₂ : j
6060

6161
namespace Perm
6262

63-
/-- Variant of `List.Perm.take` specifying the the permutation is constant after `i` elementwise. -/
63+
/-- Variant of `List.Perm.take` specifying that the permutation is constant after `i` elementwise. -/
6464
theorem take_of_getElem? {l₁ l₂ : List α} (h : l₁ ~ l₂) {i : Nat} (w : ∀ j, i ≤ j → l₁[j]? = l₂[j]?) :
6565
l₁.take i ~ l₂.take i := by
6666
refine h.take (Perm.of_eq ?_)
6767
ext1 j
6868
simpa using w (i + j) (by omega)
6969

70-
/-- Variant of `List.Perm.drop` specifying the the permutation is constant before `i` elementwise. -/
70+
/-- Variant of `List.Perm.drop` specifying that the permutation is constant before `i` elementwise. -/
7171
theorem drop_of_getElem? {l₁ l₂ : List α} (h : l₁ ~ l₂) {i : Nat} (w : ∀ j, j < i → l₁[j]? = l₂[j]?) :
7272
l₁.drop i ~ l₂.drop i := by
7373
refine h.drop (Perm.of_eq ?_)

src/Init/Data/Sum/Basic.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ public section
1313
/-!
1414
# Disjoint union of types
1515
16-
This file defines basic operations on the the sum type `α ⊕ β`.
16+
This file defines basic operations on the sum type `α ⊕ β`.
1717
1818
`α ⊕ β` is the type made of a copy of `α` and a copy of `β`. It is also called *disjoint union*.
1919

src/Lean/Data/PrefixTree.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ partial def find? (cmp : α → α → Ordering) (t : PrefixTreeNode α β cmp)
5252
| some t => loop t ks
5353
loop t k
5454

55-
/-- Returns the the value of the longest key in `t` that is a prefix of `k`, if any. -/
55+
/-- Returns the value of the longest key in `t` that is a prefix of `k`, if any. -/
5656
@[inline]
5757
partial def findLongestPrefix? (cmp : α → α → Ordering) (t : PrefixTreeNode α β cmp) (k : List α) : Option β :=
5858
let rec @[specialize] loop acc?

src/Lean/Elab/MutualInductive.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1173,7 +1173,7 @@ private def checkNoInductiveNameConflicts (elabs : Array InductiveElabStep1) (is
11731173
let throwErrorsAt (init cur : Syntax) (msg : MessageData) : TermElabM Unit := do
11741174
logErrorAt init msg
11751175
throwErrorAt cur msg
1176-
-- Maps names of inductive types to to `true` and those of constructors to `false`, along with syntax refs
1176+
-- Maps names of inductive types to `true` and those of constructors to `false`, along with syntax refs
11771177
let mut uniqueNames : Std.HashMap Name (Bool × Syntax) := {}
11781178
let declString := if isCoinductive then "coinductive predicate" else "inductive type"
11791179
trace[Elab.inductive] "deckString: {declString}"

src/Lean/Meta/CasesInfo.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ It is used in particular by the code generator to replace calls to such function
2626
`cases` construct.
2727
2828
The `getSparseCasesInfo?` function calculates the `CasesInfo` from the type of the declaration, and
29-
makes certian assumptions about their shapes. If this is too fragile, the `sparseCasesOn` env
29+
makes certain assumptions about their shapes. If this is too fragile, the `sparseCasesOn` env
3030
extension could carry more information from which the shape can be calculated..
3131
-/
3232

src/Lean/Meta/Tactic/Cleanup.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ where
7272
- It occurs in the target type, or
7373
- There is a relevant variable `y` that depends on `x`, or
7474
- If `indirectProps` is true, the type of `x` is a proposition and it depends on a relevant variable `y`.
75-
- If `indirectProps` is true, `x` is a local declartation and its value mentions a relevant variable `y`.
75+
- If `indirectProps` is true, `x` is a local declaration and its value mentions a relevant variable `y`.
7676
7777
By default, `toPreserve := #[]` and `indirectProps := true`. These settings are used in the mathlib tactic `extract_goal`
7878
to give the user more control over which variables to include.

src/Lean/ParserCompiler.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ partial def compileParserExpr (e : Expr) : MetaM Expr := do
107107
name := c', levelParams := []
108108
type := ty, value := value, hints := ReducibilityHints.opaque, safety := DefinitionSafety.safe
109109
}
110-
-- usually `meta` is infered during compilation for auxiliary definitions, but as
110+
-- usually `meta` is inferred during compilation for auxiliary definitions, but as
111111
-- `ctx.combinatorAttr` may enforce correct use of the modifier, infer now.
112112
if isMarkedMeta (← getEnv) c then
113113
modifyEnv (markMeta · c')

src/Std/Time.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,7 @@ The supported formats include:
171171
- `EEEE`: Displays the full day name (e.g., "Tuesday").
172172
- `EEEEE`: Displays the narrow day name (e.g., "T" for Tuesday).
173173
- `e`: Represents the weekday as number or text.
174-
- `e`, `ee`: Displays the the as a number, starting from 1 (Monday) to 7 (Sunday).
174+
- `e`, `ee`: Displays the weekday as a number, starting from 1 (Monday) to 7 (Sunday).
175175
- `eee`, `eeee`, `eeeee`: Displays the weekday as text (same format as `E`).
176176
- `F`: Represents the week of the month that the first week starts on the first day of the month (e.g., "3").
177177
- `a`: Represents the AM or PM designation of the day.

src/Std/Time/Internal/Bounded.lean

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ instance : LawfulEqOrd (Bounded rel n m) where
6161
variable {rel a b}
6262

6363
/--
64-
A `Bounded` integer that the relation used is the the less-equal relation so, it includes all
64+
A `Bounded` integer where the relation used is the less-equal relation, so it includes all
6565
integers that `lo ≤ val ≤ hi`.
6666
-/
6767
abbrev LE := @Bounded LE.le
@@ -74,7 +74,7 @@ def cast {rel : Int → Int → Prop} {lo₁ lo₂ hi₁ hi₂ : Int} (h₁ : lo
7474
.mk b.val ⟨h₁ ▸ b.property.1, h₂ ▸ b.property.2
7575

7676
/--
77-
A `Bounded` integer that the relation used is the the less-than relation so, it includes all
77+
A `Bounded` integer where the relation used is the less-than relation, so it includes all
7878
integers that `lo < val < hi`.
7979
-/
8080
abbrev LT := @Bounded LT.lt

src/lake/Lake/Build/Common.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -499,7 +499,7 @@ public class ResolveOutputs (m : Type v → Type w) (α : Type v) where
499499

500500
open ResolveOutputs in
501501
/--
502-
Retrieve artifacts from the Lake cache using the the outputs stored
502+
Retrieve artifacts from the Lake cache using the outputs stored
503503
in either the saved trace file or in the cached input-to-content mapping.
504504
505505
**For internal use only.**

0 commit comments

Comments
 (0)