@@ -258,7 +258,7 @@ def Folder.rightAnnihilator [Literal α] [BEq α] (annihilator : α) (zero : α)
258258 mkLit zero
259259
260260def Folder.divShift [Literal α] [BEq α] (shiftRight : Name) (pow2 : α → α) (log2 : α → α) : Folder := fun args => do
261- unless (← getEnv).contains shiftRight do return none
261+ unless (← getDecl? shiftRight).isSome do return none
262262 let #[lhs, .fvar fvarId] := args | return none
263263 let some rhs ← getLit fvarId | return none
264264 let exponent := log2 rhs
@@ -267,7 +267,7 @@ def Folder.divShift [Literal α] [BEq α] (shiftRight : Name) (pow2 : α → α)
267267 return some <| .const shiftRight [] #[lhs, .fvar shiftLit]
268268
269269def Folder.mulRhsShift [Literal α] [BEq α] (shiftLeft : Name) (pow2 : α → α) (log2 : α → α) : Folder := fun args => do
270- unless (← getEnv).contains shiftLeft do return none
270+ unless (← getDecl? shiftLeft).isSome do return none
271271 let #[lhs, .fvar fvarId] := args | return none
272272 let some rhs ← getLit fvarId | return none
273273 let exponent := log2 rhs
@@ -276,7 +276,7 @@ def Folder.mulRhsShift [Literal α] [BEq α] (shiftLeft : Name) (pow2 : α →
276276 return some <| .const shiftLeft [] #[lhs, .fvar shiftLit]
277277
278278def Folder.mulLhsShift [Literal α] [BEq α] (shiftLeft : Name) (pow2 : α → α) (log2 : α → α) : Folder := fun args => do
279- unless (← getEnv).contains shiftLeft do return none
279+ unless (← getDecl? shiftLeft).isSome do return none
280280 let #[.fvar fvarId, rhs] := args | return none
281281 let some lhs ← getLit fvarId | return none
282282 let exponent := log2 lhs
0 commit comments