Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: typo in Meta.unfoldProjInstWhenInstances? #4139

Merged
merged 1 commit into from
May 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/Lean/Meta/ExprDefEq.lean
Original file line number Diff line number Diff line change
Expand Up @@ -1904,8 +1904,8 @@ private def isDefEqUnitLike (t : Expr) (s : Expr) : MetaM Bool := do
-/
private def isDefEqProjInst (t : Expr) (s : Expr) : MetaM LBool := do
if (← getTransparency) != .instances then return .undef
let t? ← unfoldProjInstWhenIntances? t
let s? ← unfoldProjInstWhenIntances? s
let t? ← unfoldProjInstWhenInstances? t
let s? ← unfoldProjInstWhenInstances? s
if t?.isSome || s?.isSome then
toLBoolM <| Meta.isExprDefEqAux (t?.getD t) (s?.getD s)
else
Expand Down
6 changes: 3 additions & 3 deletions src/Lean/Meta/WHNF.lean
Original file line number Diff line number Diff line change
Expand Up @@ -712,11 +712,11 @@ mutual
| _ => return none

/--
Auxiliary method for unfolding a class projection. when transparency is set to `TransparencyMode.instances`.
Auxiliary method for unfolding a class projection when transparency is set to `TransparencyMode.instances`.
Recall that class instance projections are not marked with `[reducible]` because we want them to be
in "reducible canonical form".
-/
partial def unfoldProjInstWhenIntances? (e : Expr) : MetaM (Option Expr) := do
partial def unfoldProjInstWhenInstances? (e : Expr) : MetaM (Option Expr) := do
if (← getTransparency) != TransparencyMode.instances then
return none
else
Expand All @@ -726,7 +726,7 @@ mutual
partial def unfoldDefinition? (e : Expr) : MetaM (Option Expr) :=
match e with
| .app f _ =>
matchConstAux f.getAppFn (fun _ => unfoldProjInstWhenIntances? e) fun fInfo fLvls => do
matchConstAux f.getAppFn (fun _ => unfoldProjInstWhenInstances? e) fun fInfo fLvls => do
if fInfo.levelParams.length != fLvls.length then
return none
else
Expand Down
Loading