jssandh2 / coq-types

A repository containing an implementation of certain Types (such as Nat, Bool, etc.) in Coq, with Theorems and Functions

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

TYPES & THEOREMS

  • A repository containing an implementation of certain Types (such as Nat, Bool, etc.) in Coq, with Theorems and Functions. There are also dedicated files to writing styles of Proofs (such as Induction, etc.)

REPOSITORY

INSTALLATION

Clone the Repository

  • To clone the repository :
cd /directory/to/clone/in
git clone git@github.com:jssandh2/coq-types.git

Install Coq

  • The current code can compile with Coq 8.5 and higher
  • My suggestion is to install Coq 8.6 using Brew :
brew install coq
  • Compilation of Coq files can be done from the Command line or inside the Editor itself :
cd /directory/of/coq/file
coqc filename.v

STRUCTURE

Directories

  • Each Type/Proof is implemented in a separate directory inside :
    • Types :
      • Nat : Implementation of the Natural Numbers, verified with Theorems - src/Types/Nat
      • Bool : Implementation of the Booleans, verified with Theorems - src/Types/Bool
      • NatBinary : Implementation of the Natural Numbers with {Even,Odd} Functions, verified with Theorems - src/Types/NatBinary
    • Proofs :
      • Induction : Implementation of many Theorems regarding {Nat,NatBinary} with Induction - src/Proofs/Induction
  • Some folders have a corresponding *.vo file with them, which is necessary to use as linkage. Specifically :
Require Export * (* Here * = (src/Type/a/ filename) \/ (src/Proof/b/ filename) *)

uses the .vo file extension to "link" appropriate files. This allows you to use types defined in *.v in your current file.

  • To create a *.vo file, simply compile the .v file.

Functions

  • Each type is implemented, with functions that are verified using Example and Proof statements
  • The majority of the code is inspired from Software Foundations, and therefore, there is significant overlap in the code. However, the main idea here is to solve the Exercises and reimplement certain functions on my own in a more efficient manner

About

A repository containing an implementation of certain Types (such as Nat, Bool, etc.) in Coq, with Theorems and Functions

License:Apache License 2.0


Languages

Language:Coq 100.0%