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

Combinator creating full parametricity witnesses from individual record fields #24

Open
ecranceMERCE opened this issue Jan 18, 2024 · 1 comment
Labels
enhancement New feature or request

Comments

@ecranceMERCE
Copy link
Collaborator

This repository contains a few files giving parametricity proofs for inductive types like nat, bool, option, but also equality and vectors for example. It looks like we first define the individual fields (i.e., map from nat to nat, then map_in_R, etc.), then a proof of equivalence between the relation and its symmetrisation:

R_sym : forall x x', sym_rel R x' x <~> R x x'

before actually building the full record at level $(m, n)$ by taking $m$ fields for R and $n$ fields for sym_rel R, then glueing both subrecords using R_sym so that the second one typechecks as the contravariant field of the Param record.

Can this symmetry proof be made automatically just from the definition of R, even when R is non-trivial and provided by the user?
Can the whole process be automated so that the user just has to input the individual fields and Trocq generates all the possible records (possibly on the fly during the translation)?

@CohenCyril
Copy link
Collaborator

There are two ways to go about that:

  1. Modify and use HB (cf Adapt and use HB to generate Trocq relational structures #28)
  2. Implement some of the features of HB in Trocq

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants