Propositions and theories #
Main definitions #
Proposition: the type of propositions over a given type of atom. This type has aBotinstance wheneverAtomdoes, and aTopwheneverAtomis inhabited.Theory: set ofProposition.IsIntuitionistic: a theory is intuitionistic if it contains the principle of explosion.IsClassical: an intuitionistic theory is classical if it further contains double negation elimination.Proposition.subst: replaceatom xin aA : Proposition Atomwithf x, for a functionf : Atom → Proposition Atom'. This induces a monad structure onProposition, withpure := Proposition.atom.Theoryis a functor, by mapping each propositionA ∈ Ttof <$> A.Theory.intuitionisticCompletion: the freely generated intuitionistic theory extending a given theory.
Notation #
We instantiate the notation classes HasAnd, HasOr, HasImpl and HasNot for Proposition Atom
to give access to, respectively, the notations ∧, ∨, → and ¬ for propositional connectives.
In the case that Atom has a bottom element (respectively, is inhabited) we give instances
HasBot (Proposition Atom) and (respectively, HasTop (Proposition Atom)).
Propositions.
- atom {Atom : Type u} (x : Atom) : Proposition Atom
Propositional atoms
- and {Atom : Type u} (a b : Proposition Atom) : Proposition Atom
Conjunction
- or {Atom : Type u} (a b : Proposition Atom) : Proposition Atom
Disjunction
- imp {Atom : Type u} (a b : Proposition Atom) : Proposition Atom
Implication
Instances For
Instances For
Instances For
We view negation as a defined connective ~A := A → ⊥
Instances For
A fixed choice of a derivable proposition (of course any two are equivalent).
Instances For
Substitute each atom in a proposition for a proposition, possibly changing the atomic language.
Instances For
Theories are arbitrary sets of propositions.
Instances For
Extend a substitution from Proposition to Theory.
Instances For
The empty theory corresponds to minimal propositional logic.
Instances For
Intuitionistic propositional logic adds the principle of explosion (ex falso quodlibet).
Instances For
Classical logic further adds double negation elimination.
Instances For
An inference system is intuitionistic if it derives ex falso quodlibet. TODO: this should be
generalised outside the PL scope, once we have typeclasses to express that a type possesses an
implication connective.
- efq (A : Proposition Atom) : InferenceSystem.derivation S (HasImp.imp ⊥ A)
The principle of explosion (ex falso quolibet).
Instances
An inference system is classical if it validates double-negation elimination. TODO: this should
be generalised outside the PL scope, once we have typeclasses to express that a type possesses an
implication connective.
- dne (A : Proposition Atom) : InferenceSystem.derivation S (HasImp.imp (HasNot.not (HasNot.not A)) A)
Double-negation elimination.