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

Example with refinements #35

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Example with refinements #35

wants to merge 2 commits into from

Conversation

ecranceMERCE
Copy link
Collaborator

Currently, the type of vectors related to a function dropping the nat parameter and returning list. The problem is that this encoding makes it impossible to define a partial inverse function going back to vectors without having an inhabitant of the parameter to cover the case where the list is smaller than the expected index n.

Defining a version of vectors and lists taking an inhabited type {A : Type & A} as a parameter would be cumbersome because we would have to redefine all the operations on these custom versions, which brings back the complexity of handling Σ-types we wanted to avoid by relating vectors to lists in the first place (otherwise we would have chosen the following association:

Vector.t A n ~ {l : list A & length l = n}

The problem looks similar in the case of relating matrices to arrays of arrays, as this last container type does not have an index constraining its length.

@CohenCyril
Copy link
Collaborator

CohenCyril commented Feb 9, 2024

@ecranceMERCE a _CoqProject entry is missing to make the CI assess the new content.
I will add it.

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