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

avoid sortedness errors with polymorphically let-bound constants #544

Merged
merged 1 commit into from
May 16, 2024

Conversation

MichaelRawson
Copy link
Contributor

Fixes bug 1 of #542 by providing a fast path for constants in getResultSort that also does not assert a condition that isn't true for let-bound constants.

A TFX1 $let might capture sort variables. Consider e.g. polymorphic lists and the following axiom.

tff(bug, axiom, ![A: $tType]: $let(x: list(A), x := nil(A), e)).

In the expression e, x: list(A). But this is a non-polymorphic constant (both term and type arity 0) with a variable in its result sort, which SortHelper doesn't like. It seems to be eliminated just fine in later FOOLing around.

@MichaelRawson MichaelRawson force-pushed the michael-sorthelper-let branch from 215a508 to 9c6400d Compare May 16, 2024 09:01
@MichaelRawson
Copy link
Contributor Author

A completely different solution, should be ready for re-review. Thanks @mezpusz !

Copy link
Contributor

@mezpusz mezpusz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks fine to me, thanks for taking care of this!

@MichaelRawson MichaelRawson merged commit 3798853 into master May 16, 2024
1 check passed
@MichaelRawson MichaelRawson deleted the michael-sorthelper-let branch May 16, 2024 12:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants