Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/gmalecha/coq-extensible-records
Implementation of extensible records in Coq
https://github.com/gmalecha/coq-extensible-records
Last synced: about 1 month ago
JSON representation
Implementation of extensible records in Coq
- Host: GitHub
- URL: https://github.com/gmalecha/coq-extensible-records
- Owner: gmalecha
- License: mit
- Created: 2015-04-16T00:53:32.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2019-08-16T16:40:58.000Z (over 5 years ago)
- Last Synced: 2023-04-30T20:32:50.012Z (over 1 year ago)
- Language: Coq
- Size: 14.6 KB
- Stars: 6
- Watchers: 3
- Forks: 1
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
coq-extensible-records
======================Implementation of extensible records in Coq. These records use string
keys and have a canonical representation allowing you to state
equality of two records using standard equality (see examples/Demo.v).Usage
-----The type of extensible records is ```record``` (defined in CoreRecord), but the library Notation provides *reasonable* (but not ideal) syntax for them.
{@ @} (* empty record *)
{@ ("x" %e nat) @} (* record with a single field "x" of type nat *)
{@ ("x" %e nat) , ("y" %e bool) @} (* "x" is a nat, "y" is a bool *)Record values are defined using ```{# #}```.
{# #} : {@ @}
{# "x" :- 3 #} : {@ ("x" %e nat) @}
{# "x" :- 3 ; "y" :- true #} : {@ ("x" %e nat) , ("y" %e bool) @}Note: Some records may need annotations for record scope, i.e. add %record as in
{# "x" :- 3 #}%record : {@ ("x" %e nat) @}
Records also support 'with' notation.
{# bar with "x" :- 4 #}
{# bar with "x" :- 4 ; "y" :- false #}All of these operations are completely definitional
Goal ({# "x" :- 3 ; "y" :- true #} !! "x"%string) = 3.
Proof.
reflexivity.
Defined.Goal {# "x" :- 3 ; "y" :- true #} = {# "y" :- true ; "x" :- 3 #}.
Proof.
reflexivity.
Defined.Bugs
----If you find a bug or have an enhancement suggestion, please report it on github: https://github.com/gmalecha/coq-extensible-records/issues
Install with OPAM
-----------------
Run:opam install coq-extensible-records
See http://coq.io/opam/ for opam configuration