stdlib2 icon indicating copy to clipboard operation
stdlib2 copied to clipboard

all functions should come with parametricity proofs

Open andres-erbsen opened this issue 6 years ago • 2 comments

User developments often use stdlib functions with inputs whose natural equivalence relation does not coincide with Logc.eq: most importantly functions, but also Q, non-hprop sigma types, etc. Then they eventually need the fact that (forall x y, x = y -> f x = g y) -> stdlibfunc f a = stdlibfunc g a. stdlib should make lemmas of this form easily accessible, ideally in a systematic auto-generated form.

andres-erbsen avatar Jun 06 '18 13:06 andres-erbsen

We should definitely derive things like this automatically via template-coq (see https://github.com/aa755/paramcoq-iff). Generating them would guarantee that naming is consistent and make it easy for new user-defined types to use similar conventions.

gmalecha avatar Jun 18 '18 13:06 gmalecha

Such lemmas should arguably have type Proper ... stdlibfunc, and often be typeclass instances (unless they are not applicable by typeclass search).

Blaisorblade avatar Mar 25 '20 19:03 Blaisorblade