Skip to content

Change eq semantics for binders in Lambda#633

Merged
joscoh merged 2 commits intomainfrom
josh/eq-semantics
Mar 21, 2026
Merged

Change eq semantics for binders in Lambda#633
joscoh merged 2 commits intomainfrom
josh/eq-semantics

Conversation

@joscoh
Copy link
Contributor

@joscoh joscoh commented Mar 20, 2026

Issue #, if available:

Description of changes: Change semantics for equality to avoid returning false when two lambda or quantifier bodies are syntactically different, because this says nothing about whether or not they are semantically distinct. For example, \x.if true then 0 else 1 and \x.0 are syntactically different but semantically equal. This PR changes the semantics so that equalities of terms containing binders only reduce if they are syntactically equal; otherwise the semantics is stuck.

Note that we will need to change the typing rules to prove progress, since evaluation can now get stuck on well-typed terms. But we will have to determine whether that involves a direct change to the typing rules, a change to canonical values, etc and it should be finalized once the type system is fully settled (it may change as a result of the future denotational semantics).

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@joscoh joscoh marked this pull request as ready for review March 20, 2026 22:52
@joscoh joscoh requested a review from a team March 20, 2026 22:52
@joscoh joscoh changed the title Change eq semantics for binders Change eq semantics for binders in Lambda Mar 20, 2026
@joscoh joscoh added this pull request to the merge queue Mar 21, 2026
Merged via the queue into main with commit 3cdf200 Mar 21, 2026
15 checks passed
@joscoh joscoh deleted the josh/eq-semantics branch March 21, 2026 00:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants