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

Some recursive Fin functions #1077

Merged
merged 1 commit into from
Nov 9, 2023
Merged

Conversation

dolio
Copy link
Contributor

@dolio dolio commented Nov 8, 2023

Adds Fin to and a generalized version of to Fin (using _<_ rather than just successor).

I found myself needing these when using these as variables in well-scoped lambda terms.

Found myself needing these when using these as variables in well-scoped
lambda terms.
@mortberg
Copy link
Collaborator

mortberg commented Nov 8, 2023

Looks good to me, but why use the recursive Fin instead of the one in Fin.Base?

@dolio
Copy link
Contributor Author

dolio commented Nov 8, 2023

I find the recursive Fin better to use in most situations. The other one uses k + m = n ordering, and with cubical paths, this does nothing to rule out impossible pattern matching cases.

@mortberg mortberg merged commit 4de6b69 into agda:master Nov 9, 2023
@mortberg
Copy link
Collaborator

mortberg commented Nov 9, 2023

I find the recursive Fin better to use in most situations. The other one uses k + m = n ordering, and with cubical paths, this does nothing to rule out impossible pattern matching cases.

Ok, it's a bit unfortunate that we have 3 different Fin's in the library which are in use... It could be nice to have only one and develop all the theory once and for all instead of three times...

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