Open palmskog opened 9 months ago
@palmskog Trocq is currently missing a user interface overall (not just Isomorphism). I will try to list the API I had in mind from our meetings with @amahboubi and @ecranceMERCE, ASAP, so that we can discuss it altogether. Thank you for contributing this piece of the API.
Sounds good. For full transparency, one of my motivating examples is this issue:
One way to improve the success rate on mathcomp problems could be to preprocess mathcomp goals into a form which CoqHammer can handle better. This wouldn't actually require much modification of CoqHammer itself.
In a typical use of Trakt, the user can relatively easily declare "partial isomorphisms" for goal transfers, such as that
nat
toZ
for allx >= 0
. This allows preprocessing goals onnat
to become goals onZ
that include the>= 0
constraint.With Trocq, the same transfer can be done by declaring
nat
as parametrically related toZ
at some appropriate level of the Trocq hierarchy by, e.g., defining a Coq record with the following fields:Even with this witness accepted by Trocq, the user still needs to do custom ad-hoc post-processing to get the
Z
s out from the sigma types and get goals equivalent to Trakt.It would be nice if Trocq could provide a Trakt-like command
Isomorphism A B record
that turns a declaration into the right Trocq witness in the hierarchy and enables goal transfer post-processing.Credit to @ecranceMERCE for the technical details here which I think should be preserved as useful in future work.