I'm proving that a simple propositional logic satisfies Aristotle's thesis.
I'm curious how to improve the code in question.
Here are the things I know that are wrong with it:
- I'm using
nat
as the set of variables. I'm not sure how to fix this. I at first tried makingOpenWff
depend on a parameterV : Set
but that's not right. We don't have a well-formed formula for every possible set of variables. - I'm representing an environment as
env : nat -> TruthValue
. In order to prove a statement for all environments, I instead iterated over all truth values and looked at constant environments in a lemma calledAristotleImpl
. I'm curious if there's a better strategy that works here.
And here's what I'm trying to do next:
- Figure out how to state and prove that substitution instances of true well-formed formulas are true.
Context: Connexive Logics And Logics With Separate Truth and Falsity Conditions
I'm investigating a simple connexive logic. For some background on connexive logics, see this video.
In particular, I'm looking at some interesting ways of defining a logical system that satisfies Aristotle's thesis (shown below).
$$ A \to \lnot A \;\; \textit{never has a designated truth value} \;\; \text{is Aristotle's thesis} $$
Hitoshi Omori remarks at around 18m39s that intepreting $\to$ as the classical biconditional works and is the simplest possible connexive logic. This remark is mostly intended to show that adding a few axioms to a KD-like system results in a collapse of sorts, and $\to$ being biconditional-like is a fate that we want to avoid.
In that presentation and also in this paper there are quite a few systems that are defined by giving separate truth and falsity conditions.
I had an idea a few days ago to do something kind of similar and look at truth conditions and formula complexity. Formula complexity being a thing that we get to define as builders of the system (similar to falsity conditions) that's inspired by a concept that's normally primitive (the length of a formula (or a formula not being true in the case of falsity conditions)). I'm looking at a couple of different choices for how to define formula complexity (such as only counting binary connectives) and how to use $<,\le,=, \neq$ comparisons in the truth conditions of formulas, I'm just picking an easy one here to formalize in Coq as a starting point.
Every well-formed formula $\varphi$ is true or not true. Additionally, every well-formed formula has a complexity, denoted $|\varphi|$, which is inspired by the number of connectives that a well-formed formula contains.
Suppose I have the connectives $\lnot$ and $\to$.
If $\alpha$ is a primitive variable, then $\alpha$ is true if and only if $\alpha$ is true in the current context.
$\lnot \alpha$ is true if and only if $\alpha$ is not true.
$\alpha \to \beta$ is true if and only if ($\alpha$ is true iff $\beta$ is true) or ($\alpha$ is not true and $\alpha$ and $\beta$ have the same complexity).
If $\alpha$ is a primitive variable, $|\alpha|$ is the complexity of $\alpha$ in the current context.
$|\lnot \alpha|$ is equal to $1+|\alpha|$.
$|\alpha \to \beta|$ is equal to $1+|\alpha|+|\beta|$.
So, $A \to \lnot A$ is clearly a contradiction because $A$ and $\lnot A$ will never have the same length and will never have the same truth value.
Here's the code. Its biggest problem probably is the use of nat
as the wff's rather than a more appropriate type.
Require Import Arith.
Record TruthValue : Type :=
{ truth : Prop
; complexity : nat
}.
Inductive OpenWff : Type :=
| Var : nat -> OpenWff
| Not : OpenWff -> OpenWff
| Imp : OpenWff -> OpenWff -> OpenWff.
Fixpoint Complexity (wff: OpenWff) (env : nat -> TruthValue) : nat :=
match wff with
| Var v => complexity (env v)
| Not wff' => 1 + Complexity wff' env
| Imp a b => 1 + (Complexity a env) + (Complexity b env)
end.
Fixpoint Truth (wff : OpenWff) (env : nat -> TruthValue) : Prop :=
match wff with
| Var v => truth (env v)
| Not wff' => not (Truth wff' env)
| Imp a b => (
((Truth a env) <-> (Truth b env)) \/
((not (Truth a env)) /\ Complexity a env = Complexity b env )
)
end.
Lemma AristotleImpl : forall tv : TruthValue, not (Truth (Imp (Var 0) (Not (Var 0))) (fun x => tv)).
Proof.
intros.
unfold Truth.
intuition.
induction tv.
unfold Complexity in H1.
simpl in H.
simpl in H1.
induction complexity0.
discriminate.
intuition.
Qed.
Theorem Aristotle : forall env : nat -> TruthValue, not (Truth (Imp (Var 0) (Not (Var 0))) env).
Proof.
intros.
apply AristotleImpl.
Qed.
nat
as the set of variables? This is extremely common in logic. Or rather, usually one says "I have countable many different variables", meaning the set of variables is isomorphic to the natural numbers. Which properties do you want of your variables? For example, how many variables do you want (a constant finite amount, a constant amount depending on some parameter, countable many, more)? If you know the answer to that question, it will probably be easier to define an appropriate set of variables. $\endgroup$OpenWff
. $\endgroup$code-review
andproof-review
which is narrower in scope? The thing I want to improve is my definition, since I think it's too rigid. The proof itself is just a flat list of tactics that doesn't name anything, but I am okay with that for now. $\endgroup$V : Set
but that's not right. We don't have a well-formed formula for every possible set of variables." So you mean that there are some sets of variables that you do not want to accept? If so, what are the properties of the sets of variables that you find acceptable? $\endgroup$nat
. What I want to do is make the typeOpenWff
depend on a parameterV
. When I tried to do that, though, I couldn't complete the inductive definition, I kept getting"the parameters do not bind in patterns"
. $\endgroup$