GithubHelp home page GithubHelp logo

dunnl / dprop Goto Github PK

View Code? Open in Web Editor NEW
3.0 1.0 1.0 268 KB

A deep embedding of propositional logic in Coq

Home Page: https://dunnl.github.io/dprop/

Makefile 1.88% Coq 77.93% HTML 1.59% JavaScript 9.41% CSS 9.20%

dprop's Introduction

DProp

https://dunnl.github.io/dprop/

DProp ("Dee prop"): A deep embedding of classical propositional logic into Coq.

⚠️ This repo is still under development. The homework exercises may be slightly impacted by changes.

Errata for PL clubbers doing the homework (mistakes/clarifications fixed between Monday's announcement and Friday's talk):

  • Exercise 6 has to be proved on pen and paper, not Coq
  • Some commits define negation elimination as ex falso which isn't complete
  • My "double negation elimination" rule was actually reductio ad absurdum

This file is a quick tutorial to using Coq as a logical framework to study propositional logic, which is synonymous to saying we are providing a deep embedding (a shallow embedding would like more like the section "Minimal Logic" in the basic Coq tutorial). This file is the backbone of a PL club presentation, as well as "homework" for the willing.

We start by defining the synax of propositional logic, taking as primitives conjunction, negation, and the top element. From there we define the semantics, but instead of looking at propositions as bool values, we interpret into Coq's Prop sort. This is essentially a kind of algebraic semantics. To get soundness, we have to require that valuations come with a proof that their range satisfies the law of excluded middle, which is essentially requiring that the codomain forms a boolean algebra.

There are about 10 SF-inspired exercises in the file. Some are easy, some are hard. We talk about soundness, and state completeness but admit it as an axiom. Near the end there are some notes on syntactical incompleteness. A proof by induction on deductions fails due to lack of normal forms (cut elimination), but the result can be shown easily using soundness. Finally, some commentary at the end is given for understanding Gödel's completeness and first incompleteness theorem using what we've learned about propositional logic.

PRs/Emails/Corrections welcome

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.