Skip to content

Differentiation of TermS and Subst#49

Merged
jespercockx merged 23 commits intojespercockx:mainfrom
EwenBC:telescope-split
Apr 16, 2025
Merged

Differentiation of TermS and Subst#49
jespercockx merged 23 commits intojespercockx:mainfrom
EwenBC:telescope-split

Conversation

@EwenBC
Copy link
Collaborator

@EwenBC EwenBC commented Mar 17, 2025

Trying to split the Subst datatype into a datatype for Substitutions and one for arguments. And adding the notion of RScope instead of reversing Scope.

@jespercockx
Copy link
Owner

I merged the other PR, please rebase this one on top of current master and I'll review it.

@EwenBC EwenBC changed the title TypeS for substitutions Differentiation of TermS and Subst Mar 26, 2025
@EwenBC EwenBC marked this pull request as ready for review April 2, 2025 15:55
data Branches α where
BsNil : Branches α mempty
BsCons : Branch α c → Branches α cs → Branches α (c ◃ cs)
BsCons : Branch α c → Branches α cs → Branches α (cs ▸ c)
Copy link
Owner

Choose a reason for hiding this comment

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

Why would you use RScope here? It doesn't really make sense to me since the new branch is added on the left.

Copy link
Collaborator Author

@EwenBC EwenBC Apr 3, 2025

Choose a reason for hiding this comment

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

I didn't use RScope here, this is the notation for Scope, the notation for RScope is x ◂ rβ.
I kept the previous datatype. (It's very confusing because the new notation for Scope is cs ▸ c and the previous one was c ◃ cs)

Copy link
Owner

Choose a reason for hiding this comment

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

Ah, well then I think this is a good opportunity to also use RScope :)

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

It was a bigger change than I would have thought. I had to make some changes in the Scope library.

@jespercockx
Copy link
Owner

Thank you! I have a few small remarks, but otherwise this looks very good.

@EwenBC EwenBC marked this pull request as draft April 3, 2025 13:37
@EwenBC
Copy link
Collaborator Author

EwenBC commented Apr 3, 2025

The last commit depends on a new PR in Scope.

@EwenBC EwenBC mentioned this pull request Apr 7, 2025
@jespercockx
Copy link
Owner

This is still marked as a draft, but I assume it's ready now?

@EwenBC EwenBC marked this pull request as ready for review April 16, 2025 12:54
@EwenBC
Copy link
Collaborator Author

EwenBC commented Apr 16, 2025

Yes, I noted it as a draft so that it wouldn't be merged before updating flake.nix to add the last PR in Scope.

@jespercockx jespercockx merged commit 9041683 into jespercockx:main Apr 16, 2025
2 checks passed
EwenBC added a commit to EwenBC/agda-core that referenced this pull request Apr 17, 2025
* TypeS

* Changes in Typing rules

* TypeChecker updated

* begin update of unification

* partial refactoring using RScope

* changes up to Typechecker

* agda code fully updated with RScope

* fix test file

* moving renaming helpers from unification to unifier

* update RScope and Scope up to substitute

* update RScope and Scope all files

* fixing Haskell

* notations

* evalCon and evalData

* remove commented code

* update Scope lib

* fix Haskell

* added tyBBranch' to fix a strange extraction bug probably linked to record types

* fix ToCore.hs

* corrections

* whitespace

* RScope in Branches

* update scope
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