diff --git a/pyk/src/pyk/k2lean4/model.py b/pyk/src/pyk/k2lean4/model.py index dcff434b92..704e05315f 100644 --- a/pyk/src/pyk/k2lean4/model.py +++ b/pyk/src/pyk/k2lean4/model.py @@ -9,7 +9,7 @@ from collections.abc import Iterable from typing import Final -_LEAN_KEYWORDS: Final = {'ite', 'end', 'where'} # Words that cannot be a the name of a declaration +_LEAN_WORDS: Final = {'ite', 'end', 'where'} # Words that cannot be a the name of a declaration def indent(text: str, n: int) -> str: @@ -24,10 +24,10 @@ def mask_name(name: str, mask: str | None) -> str: """Append `mask` to `name` if `name` is in `_LEAN_KEYWORDS`.""" if name == '': return '' - elif name not in _LEAN_KEYWORDS: + elif name not in _LEAN_WORDS: return name else: - return f'{name}{mask}' if mask is not None and is not '' else f'{name}Mask' + return f'{name}{mask}' if mask is not None and mask != '' else f'{name}Mask' @final