What is missing is a proper separation of the logics. Instead
of solving algebra problems we can use McCunes counter
model finder to solve logic problems. The approach is to see
logical connectives through the lense of algebra,
considering (->)/2 a binary operation on truth values:
|- A -> B |- A
-------------------- (Modus Ponens)
|- B
-------- (Axiom Schema i)
|- A_i
We erase the combinatory expression s from the judgment
|- s : A and consider judgment |- A. We do not ask for a congruence
relation, only a consequence relation. We can now show that
Affine Logic (BCK) does not generally admit contraction:
problem(2, (
(![X]:![Y]:t((X -> (Y -> X))) &
![X]:![Y]:(t((X -> Y)) & t(X) => t(Y)) &
![X]:![Y]:![Z]:t(((Y -> Z) -> ((X -> Y) -> (X -> Z)))) &
![X]:![Y]:![Z]:t(((X -> (Y -> Z)) -> (Y -> (X -> Z)))))
=> t(((a->(a->b))->(a->b))))).
The first found counter model is a three-valued logic,
not from some text book:
?- between(1,3,N), problem(2, F), solve(F, N, R), !,
show(R), fail.
a = 1 b = 2
t(0) = 1 t(1) = 0 t(2) = 0
(0 -> 0) = 0 (0 -> 1) = 1 (0 -> 2) = 2
(1 -> 0) = 0 (1 -> 1) = 0 (1 -> 2) = 1
(2 -> 0) = 0 (2 -> 1) = 0 (2 -> 2) = 0
fail.
In summary it turns out that an according t/1 predicate for singled
out truth values leads to relative short counter models that separate
the investigated logics. We didn’t need to go beyond three valued logics:
Logic |
Weakening K |
Contraction W |
Minimal SK |
|
|
Relevant SBCI |
No |
|
Affine BCK |
|
No |
Linear BCI |
No |
No |
Source code:
quine.p.log (5,8 KB)
mccune.p.log (5,8 KB)
truthy.p.log (3,4 KB)
Disclaimer: The file mccune.p
contains a very simple Prolog mace4
implementation, it can be speed up by various methods.