You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The plugin is still in an experimental state. It is not very user friendly (lack of good error messages) and still contains bugs. But is useable enough to "translate" a large chunk of standard library.
26
-
29
+
A Coq plugin providing commands for generating parametricity statements.
30
+
Typical applications of such statements are in data refinement proofs.
31
+
Note that the plugin is still in an experimental state - it is not very user
32
+
friendly (lack of good error messages) and still contains bugs. But it
33
+
is usable enough to "translate" a large chunk of the standard library.
27
34
28
35
## Meta
29
36
@@ -37,9 +44,8 @@ The plugin is still in an experimental state. It is not very user friendly (lack
37
44
- Matthieu Sozeau
38
45
- Coq-community maintainer(s):
39
46
- Pierre Roux ([**@proux01**](https://github.com/proux01))
40
-
- License: [MIT](LICENSE)
41
-
- Compatible Coq versions: The master branch tracks the development version of Coq, see releases for compatibility with released versions of Coq.
42
-
47
+
- License: [MIT License](LICENSE)
48
+
- Compatible Coq versions: The master branch tracks the development version of Coq, see releases for compatibility with released versions of Coq
43
49
- Additional dependencies: none
44
50
- Coq namespace: `Param`
45
51
- Related publication(s):
@@ -65,37 +71,57 @@ make install
65
71
```
66
72
67
73
68
-
Available commands
69
-
------------------
70
-
71
-
The default arity is 2.
72
-
73
-
- Parametricity *ident* as *name*[arity *n*].
74
-
75
-
Declare the translation named *name* from the translation of the constant or inductive *ident*.
The default name for the translation of the constant or inductive *ident* is automatically generated (from its unqualified name).
80
-
You can use the `Recursive` option to recursively translate all the constants and inductives which are used by *ident*.
81
-
You can use the `qualified` option to use a qualified default name for the translated constants and inductives. The default name then has the form `Module_o_Submodule_o_ident` if *ident* lies in the `Module.Submodule` namespace.
Define a new constant named *name* obtained by computing the parametricity translation of *term*.
86
-
87
-
- Parametricity Module *modulepath*.
74
+
## Usage and Commands
88
75
89
-
Recursively translate everything in a module.
90
-
91
-
- Realizer *constant or variable*[as *name*][arity *n*] := *term*.
76
+
To load the plugin and make its commands available:
77
+
```coq
78
+
From Param Require Import Param.
79
+
```
92
80
93
-
Declare *term* to be the translation of a constant.
94
-
Useful to translate terms containing section variables, or axioms.
81
+
The command scheme for named translations is:
82
+
```
83
+
Parametricity <ident> as <name> [arity <n>].
84
+
```
85
+
For example, the following command generates a translation named `my_param`
86
+
of the constant or inductive `my_id` with arity 2 (the default):
87
+
```coq
88
+
Parametricity my_id as my_param.
89
+
```
95
90
96
-
Note that both translating a term or module may lead to proof obligations (for some fixpoints and opaque terms if you did not import `ProofIrrelevence`).
91
+
The command scheme for automatically named translations is:
Copy file name to clipboardExpand all lines: coq-paramcoq.opam
+6-3Lines changed: 6 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -9,10 +9,13 @@ license: "MIT"
9
9
10
10
synopsis: "Plugin for generating parametricity statements to perform refinement proofs"
11
11
description: """
12
-
The plugin is still in an experimental state. It is not very user friendly (lack of good error messages) and still contains bugs. But is useable enough to "translate" a large chunk of standard library.
13
-
"""
12
+
A Coq plugin providing commands for generating parametricity statements.
13
+
Typical applications of such statements are in data refinement proofs.
14
+
Note that the plugin is still in an experimental state - it is not very user
15
+
friendly (lack of good error messages) and still contains bugs. But it
16
+
is usable enough to "translate" a large chunk of the standard library."""
The default name for the translation of the constant or inductive *ident* is automatically generated (from its unqualified name).
61
-
You can use the `Recursive` option to recursively translate all the constants and inductives which are used by *ident*.
62
-
You can use the `qualified` option to use a qualified default name for the translated constants and inductives. The default name then has the form `Module_o_Submodule_o_ident` if *ident* lies in the `Module.Submodule` namespace.
This defines a new constant containing the parametricity translation of
101
+
the given term.
76
102
77
-
Note that both translating a term or module may lead to proof obligations (for some fixpoints and opaque terms if you did not import `ProofIrrelevence`).
103
+
To recursively translate everything in a module:
104
+
```coq
105
+
Parametricity Module <module_path>.
106
+
```
78
107
79
-
- [Global | Local] Parametricity Tactic := t.
108
+
When translating terms containing section variables or axioms,
109
+
it may be useful to declare a term to be the translation of a constant:
0 commit comments