Skip to content

Commit

Permalink
doc: fix typos (#3178)
Browse files Browse the repository at this point in the history
  • Loading branch information
marcusrossel authored Jan 14, 2024
1 parent 42e6214 commit 12dc171
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/Init/Prelude.lean
Original file line number Diff line number Diff line change
Expand Up @@ -3231,7 +3231,7 @@ instance (σ : Type u) (m : Type u → Type v) [MonadStateOf σ m] : MonadState
/--
`modify (f : σ → σ)` applies the function `f` to the state.
It is equivalent to `do put (f (← get))`, but `modify f` may be preferable
It is equivalent to `do set (f (← get))`, but `modify f` may be preferable
because the former does not use the state linearly (without sufficient inlining).
-/
@[always_inline, inline]
Expand Down
5 changes: 2 additions & 3 deletions src/Lean/Expr.lean
Original file line number Diff line number Diff line change
Expand Up @@ -1198,10 +1198,9 @@ def hasLooseBVarInExplicitDomain : Expr → Nat → Bool → Bool

/--
Lower the loose bound variables `>= s` in `e` by `d`.
That is, a loose bound variable `bvar i`.
`i >= s` is mapped into `bvar (i-d)`.
That is, a loose bound variable `bvar i` with `i >= s` is mapped to `bvar (i-d)`.
Remark: if `s < d`, then result is `e`
Remark: if `s < d`, then the result is `e`.
-/
@[extern "lean_expr_lower_loose_bvars"]
opaque lowerLooseBVars (e : @& Expr) (s d : @& Nat) : Expr
Expand Down
2 changes: 1 addition & 1 deletion src/Lean/Meta/Basic.lean
Original file line number Diff line number Diff line change
Expand Up @@ -1218,7 +1218,7 @@ def withLocalDeclD (name : Name) (type : Expr) (k : Expr → n α) : n α :=
withLocalDecl name BinderInfo.default type k

/-- Append an array of free variables `xs` to the local context and execute `k xs`.
declInfos takes the form of an array consisting of:
`declInfos` takes the form of an array consisting of:
- the name of the variable
- the binder info of the variable
- a type constructor for the variable, where the array consists of all of the free variables
Expand Down
2 changes: 1 addition & 1 deletion src/Lean/Meta/Eqns.lean
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ private def mkSimpleEqThm (declName : Name) : MetaM (Option Name) := do

/--
Return equation theorems for the given declaration.
By default, we not create equation theorems for nonrecursive definitions.
By default, we do not create equation theorems for nonrecursive definitions.
You can use `nonRec := true` to override this behavior, a dummy `rfl` proof is created on the fly.
-/
def getEqnsFor? (declName : Name) (nonRec := false) : MetaM (Option (Array Name)) := withLCtx {} {} do
Expand Down

0 comments on commit 12dc171

Please sign in to comment.