Skip to content

Let bindings#5

Merged
shilangyu merged 20 commits intomainfrom
feat/let-binding
Apr 15, 2025
Merged

Let bindings#5
shilangyu merged 20 commits intomainfrom
feat/let-binding

Conversation

@shilangyu
Copy link
Owner

No description provided.

@shilangyu shilangyu changed the title WIP: Let bindings Let bindings Apr 15, 2025
Copy link
Collaborator

@j-f-ox j-f-ox left a comment

Choose a reason for hiding this comment

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

Great work cleaning up proofs and adding the new features 👍

IsWellFormedTy T1 ->
HasTy Γ t1 T1 ->
HasTy (T1 :: Γ) t2 T2 ->
HasTy Γ (Term.bind t1 t2) T2
Copy link
Collaborator

Choose a reason for hiding this comment

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

Just out of curiosity, why do we need T1 to be well-formed but not T2?

Copy link
Owner Author

Choose a reason for hiding this comment

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

In theory we could sprinkle IsWellFormedTy on every type. But in practice IsWellFormedTy is implied for other types since they are mentioned in the constructor (HasTy Γ (Term.bind t1 t2) T2, T1 does not appear here so it is not implied to be wellformed, hence it needs to be added to assumptions).

Maybe I should add a HasTy implies IsWellFormedTy theorem just to make sure we have this property?

@shilangyu shilangyu merged commit 6534c48 into main Apr 15, 2025
1 check passed
@shilangyu shilangyu deleted the feat/let-binding branch April 15, 2025 20:39
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.

2 participants