Skip to Content.
Sympa Menu

coq-club - Re: [Coq-Club] Decidability of Propositional Logic

coq-club AT inria.fr

Subject: The Coq mailing list

List archive

Re: [Coq-Club] Decidability of Propositional Logic


Chronological Thread 
  • From: gallego AT cri.ensmp.fr (Emilio Jesús Gallego Arias)
  • To: coq-club AT inria.fr
  • Subject: Re: [Coq-Club] Decidability of Propositional Logic
  • Date: Sun, 29 Nov 2015 02:40:11 +0100
  • Authentication-results: mail3-smtp-sop.national.inria.fr; spf=None smtp.pra=gallego AT cri.ensmp.fr; spf=Pass smtp.mailfrom=gsmlcc-coq-club AT m.gmane.org; spf=Pass smtp.helo=postmaster AT plane.gmane.org
  • Cancel-lock: sha1:a68+DUGLpf74F27CZR8/xy07weM=
  • Ironport-phdr: 9a23:HlBSuRYM4GLn4KBImblY9Uf/LSx+4OfEezUN459isYplN5qZpcm4bnLW6fgltlLVR4KTs6sC0LqL9fC9EjVfu96oizMrTt9lb1c9k8IYnggtUoauKHbQC7rUVRE8B9lIT1R//nu2YgB/Ecf6YEDO8DXptWZBUiv2OQc9HOnpAIma153xjLDvvc2OKFwX3nKUWvBbElaflU3prM4YgI9veO4a6yDihT92QdlQ3n5iPlmJnhzxtY+a9Z9n9DlM6bp6r5YTGfayQ6NtRrtBST8iLmod5cvxtBCFQxHcyGEbVzAZmx5MDgfCxBrgX9H8tDD/rqxzwmHaEMj3SbEzERav9DVwADDhjCMKODlx2XvWg9cx3/ETmw6ouxEqm92cW4qSLvcrJq4=

Hello Jeffrey,

"Terrell, Jeffrey"
<jeffrey.terrell AT kcl.ac.uk>
writes:
> Does anyone know of a Coq proof that propositional logic is decidable?

If you are looking for a more compact solution you could just build an
interpretation from propositional formulae to bool; decidability then
follows.

A quick example building such a function is attached below.

Best regards,
Emilio

Require Import ssreflect ssrfun ssrbool eqtype ssrnat fintype finfun.

Section PL.

Variable (n : nat).

Inductive PropF : Type :=
| Var of 'I_n
| Bot
| Conj of PropF & PropF
| Disj of PropF & PropF
| Impl of PropF & PropF
.

Definition inter (v : {ffun 'I_n -> bool}) :=
fix i p := match p with
| Var i => v i
| Bot => false
| Conj p1 p2 => i p1 && i p2
| Disj p1 p2 => i p1 || i p2
| Impl p1 p2 => i p1 ==> i p2
end.

Definition models (p : PropF) := [forall v, inter v p].

End PL.

About models.
(* models : forall n : nat, PropF n -> bool *)




Archive powered by MHonArc 2.6.18.

Top of Page