Skip to content

Coq library for tactics, basic definitions, sets, maps

License

Notifications You must be signed in to change notification settings

mit-plv/coqutil

Repository files navigation

coqutil -- Various Coq Utilities

Contents:

  • Datatypes: Some utilities for existing datatypes, and new datatypes.
  • Decidable: BoolSpec-based decidability typeclasses. Allows one to write if MyType_eqb a b then ... else ... where MyType_eqb a b returns a bool, instead of writing if MyType_eq_dec a b then ... else ... where MyType_eq_dec a b returns a sumbool, while still getting a = b and a <> b as hypotheses (as opposed to MyType_eqb a b = true and MyType_eqb a b = false) after destructing the if (need to use destr instead of destruct). So one gets the benefits of Sumbool without getting its disadvantage of having to carry around proof terms, which can cause a blow-up under reduction if one is not careful.
  • Map: A typeclass based map library allowing one to abstract over the concrete implementation of maps. The implementations have to be extensional, which excludes certain efficient implementations, but simplifies proofs, because one can replace mapA with mapB if one can prove that mapA and mapB have the same contents. Comes with a solver which works reasonably fast on most map goals we have encountered so far.
  • Tactics: A collection of useful general-purpose tactics.
  • Word: Fixed width words for any width, in the same typeclass based style as the map library. Designed for the case where all words have the same (potentially abstract) bit width. Therefore, it does not provide functions to concatenate and split words, which is better addressed by bbv.
  • Z: Utilities to work with the Z type from Coq's standard library, including a tactic to prove Z equalities by splitting the equality into equalities on bit index ranges, a tactic to make lia capable of reasoning about goals with division and modulo, and a tactic to simplify expressions containing nested occurrences of mod, and more misc utilities.
  • Various macros, notations, and desirable default settings.

Each feature is intended to be as minimal and as independent of the other features as possible, so that users can pick just what they need.

About

Coq library for tactics, basic definitions, sets, maps

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages