Skip to content

Commit 8807893

Browse files
authored
chore: fix spelling mistakes (#8324)
Co-authored-by: euprunin <[email protected]>
1 parent 6ca31ba commit 8807893

File tree

37 files changed

+54
-54
lines changed

37 files changed

+54
-54
lines changed

doc/dev/release_checklist.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ We'll use `v4.6.0` as the intended release version as a running example.
6969
- `repl`:
7070
There are two copies of `lean-toolchain`/`lakefile.lean`:
7171
in the root, and in `test/Mathlib/`. Edit both, and run `lake update` in both directories.
72-
- An awkward situtation that sometimes occurs (e.g. with Verso) is that the `master`/`main` branch has already been moved
72+
- An awkward situation that sometimes occurs (e.g. with Verso) is that the `master`/`main` branch has already been moved
7373
to a nightly toolchain that comes *after* the stable toolchain we are
7474
targeting. In this case it is necessary to create a branch `releases/v4.6.0` from the last commit which was on
7575
an earlier toolchain, move that branch to the stable toolchain, and create the toolchain tag from that branch.

src/Init/Core.lean

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -944,7 +944,7 @@ theorem eqRec_heq {α : Sort u} {φ : α → Sort v} {a a' : α} : (h : a = a')
944944
| rfl, p => HEq.refl p
945945

946946
/--
947-
Heterogenous equality with an `Eq.rec` application on the left is equivalent to a heterogenous
947+
Heterogeneous equality with an `Eq.rec` application on the left is equivalent to a heterogeneous
948948
equality on the original term.
949949
-/
950950
theorem eqRec_heq_iff {α : Sort u} {a : α} {motive : (b : α) → a = b → Sort v}
@@ -953,7 +953,7 @@ theorem eqRec_heq_iff {α : Sort u} {a : α} {motive : (b : α) → a = b → So
953953
h.rec (fun _ => ⟨id, id⟩) c
954954

955955
/--
956-
Heterogenous equality with an `Eq.rec` application on the right is equivalent to a heterogenous
956+
Heterogeneous equality with an `Eq.rec` application on the right is equivalent to a heterogeneous
957957
equality on the original term.
958958
-/
959959
theorem heq_eqRec_iff {α : Sort u} {a : α} {motive : (b : α) → a = b → Sort v}

src/Init/Data/BitVec/Folds.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ the final bitvector.
2323
It produces a sequence of state values `[s_0, s_1 .. s_w]` and a bitvector `v` where `f i s_i =
2424
(s_{i+1}, b_i)` and `b_i` is bit `i`th least-significant bit in `v` (e.g., `getLsb v i = b_i`).
2525
26-
The theorem `iunfoldr_replace` allows uses of `BitVec.iunfoldr` to be replaced wiht declarative
26+
The theorem `iunfoldr_replace` allows uses of `BitVec.iunfoldr` to be replaced with declarative
2727
specifications that are easier to reason about.
2828
-/
2929
def iunfoldr (f : Fin w → α → α × Bool) (s : α) : α × BitVec w :=

src/Init/Data/Option/Coe.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import Init.Coe
1111
/-!
1212
In this file, we define the coercion `α → Option α`.
1313
14-
The use of this coercion is **banned** in `Init` and `Std` (but allowed everwhere else). For this
14+
The use of this coercion is **banned** in `Init` and `Std` (but allowed everywhere else). For this
1515
reason, we define it in this file, which must not be imported anywhere in `Init` or `Std` (this
1616
is enforced by the test `importStructure.lean`).
1717
-/

src/Init/Prelude.lean

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1818,7 +1818,7 @@ theorem Nat.succ_pos (n : Nat) : LT.lt 0 (succ n) :=
18181818

18191819
set_option bootstrap.genMatcherCode false in
18201820
/--
1821-
The predecessor of a natural number is one less than it. The precedessor of `0` is defined to be
1821+
The predecessor of a natural number is one less than it. The predecessor of `0` is defined to be
18221822
`0`.
18231823
18241824
This definition is overridden in the compiler with an efficient implementation. This definition is
@@ -1958,7 +1958,7 @@ instance instSubNat : Sub Nat where
19581958
sub := Nat.sub
19591959

19601960
/--
1961-
Gets the word size of the curent platform. The word size may be 64 or 32 bits.
1961+
Gets the word size of the current platform. The word size may be 64 or 32 bits.
19621962
19631963
This function is opaque because there is no guarantee at compile time that the target will have the
19641964
same word size as the host. It also helps avoid having type checking be architecture-dependent.
@@ -3409,7 +3409,7 @@ instance {ε : Type u} {α : Type v} [Inhabited ε] : Inhabited (Except ε α) w
34093409
Exception monads provide the ability to throw errors and handle errors.
34103410
34113411
In this class, `ε` is a `semiOutParam`, which means that it can influence the choice of instance.
3412-
`MonadExcept ε` provides the same operations, but requires that `ε` be inferrable from `m`.
3412+
`MonadExcept ε` provides the same operations, but requires that `ε` be inferable from `m`.
34133413
34143414
`tryCatchThe`, which takes an explicit exception type, is used to desugar `try ... catch ...` steps
34153415
inside `do`-blocks when the handlers have type annotations.
@@ -3589,7 +3589,7 @@ be read, but not written. A `MonadWithReader ρ` instance additionally allows th
35893589
overridden for a sub-computation.
35903590
35913591
In this class, `ρ` is a `semiOutParam`, which means that it can influence the choice of instance.
3592-
`MonadReader ρ` provides the same operations, but requires that `ρ` be inferrable from `m`.
3592+
`MonadReader ρ` provides the same operations, but requires that `ρ` be inferable from `m`.
35933593
-/
35943594
-- Note: This class can be seen as a simplification of the more "principled" definition
35953595
-- ```
@@ -3641,7 +3641,7 @@ instance {ρ : Type u} {m : Type u → Type v} [Monad m] : MonadReaderOf ρ (Rea
36413641
A reader monad that additionally allows the value to be locally overridden.
36423642
36433643
In this class, `ρ` is a `semiOutParam`, which means that it can influence the choice of instance.
3644-
`MonadWithReader ρ` provides the same operations, but requires that `ρ` be inferrable from `m`.
3644+
`MonadWithReader ρ` provides the same operations, but requires that `ρ` be inferable from `m`.
36453645
-/
36463646
class MonadWithReaderOf (ρ : semiOutParam (Type u)) (m : Type u → Type v) where
36473647
/--
@@ -3698,7 +3698,7 @@ Instances may implement these operations by passing state values around, by usin
36983698
reference cell (e.g. `ST.Ref σ`), or in other ways.
36993699
37003700
In this class, `σ` is a `semiOutParam`, which means that it can influence the choice of instance.
3701-
`MonadState σ` provides the same operations, but requires that `σ` be inferrable from `m`.
3701+
`MonadState σ` provides the same operations, but requires that `σ` be inferable from `m`.
37023702
37033703
The mutable state of a state monad is visible between multiple `do`-blocks or functions, unlike
37043704
[local mutable state](lean-manual://section/do-notation-let-mut) in `do`-notation.

src/Init/System/IO.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -728,7 +728,7 @@ Use `IO.getStderr` to get the current standard error stream.
728728
/--
729729
Iterates an `IO` action. Starting with an initial state, the action is applied repeatedly until it
730730
returns a final value in `Sum.inr`. Each time it returns `Sum.inl`, the returned value is treated as
731-
a new sate.
731+
a new state.
732732
-/
733733
@[specialize] partial def iterate (a : α) (f : α → IO (Sum α β)) : IO β := do
734734
let v ← f a

src/Lean/Elab/Command.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -236,7 +236,7 @@ private def runCore (x : CoreM α) : CommandElabM α := do
236236
nextMacroScope := coreS.nextMacroScope
237237
ngen := coreS.ngen
238238
infoState.trees := s.infoState.trees.append coreS.infoState.trees
239-
-- we assume substitution of `assingment` has already happened, but for lazy assignments we only
239+
-- we assume substitution of `assignment` has already happened, but for lazy assignments we only
240240
-- do it at the very end
241241
infoState.lazyAssignment := coreS.infoState.lazyAssignment
242242
traceState.traces := coreS.traceState.traces.map fun t => { t with ref := replaceRef t.ref ctx.ref }

src/Lean/Elab/MutualDef.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1085,7 +1085,7 @@ where
10851085
-- that depends only on a part of the ref
10861086
addDeclarationRangesForBuiltin declId.declName view.modifiers.stx view.ref
10871087
elabSync headers isRflLike := do
1088-
-- If the reflexivity holds publically as well (we're still inside `withExporting` here), export
1088+
-- If the reflexivity holds publicly as well (we're still inside `withExporting` here), export
10891089
-- the body even if it is a theorem so that it is recognized as a rfl theorem even without
10901090
-- `import all`.
10911091
let rflPublic ← pure isRflLike <&&> pure (← getEnv).header.isModule <&&>

src/Lean/Elab/StructInst.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1217,7 +1217,7 @@ private def expandNonAtomicExplicitSources (stx : Syntax) : TermElabM (Option Sy
12171217
where
12181218
/--
12191219
If the source is a local, we can use it.
1220-
*However*, we need to watch out that the local doesn't have implicit arguemnts,
1220+
*However*, we need to watch out that the local doesn't have implicit arguments,
12211221
since that could cause multiple evaluation.
12221222
For simplicity, we just check that the fvar isn't a forall.
12231223
-/

src/Lean/Elab/Structure.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -855,7 +855,7 @@ private def registerFailedToInferDefaultValue (fieldName : Name) (e : Expr) (ref
855855
Goes through all the natural mvars appearing in `e`, assigning any whose type is one of the inherited parents.
856856
857857
Rationale 1: Structures can only extend a parent once.
858-
There should be no other occurences of a parent except for the parent itself.
858+
There should be no other occurrences of a parent except for the parent itself.
859859
860860
Rationale 2: Consider the following code in the test `lean/run/balg.lean`:
861861
```lean

0 commit comments

Comments
 (0)