Automating search of linear inferences in propositional...

47
Automating search of linear inferences in propositional logic Alvin ˇ Sipraga University of Bath 13 December, 2012

Transcript of Automating search of linear inferences in propositional...

Page 1: Automating search of linear inferences in propositional logicarcturus.su/mimir/autolininf-p.pdfLinear inferences A linear inference is a sound implication A! B, free of negation, and

Automating search of linear inferences inpropositional logic

Alvin Sipraga

University of Bath

13 December, 2012

Page 2: Automating search of linear inferences in propositional logicarcturus.su/mimir/autolininf-p.pdfLinear inferences A linear inference is a sound implication A! B, free of negation, and

Linear inferences

A linear inference is a sound implication A→ B, free of negation,and where every variable occurs exactly once in the premiss andconclusion (i.e. it is balanced).

Some examples:

I (a ∧ b) ∨ c→ a ∨ b ∨ c

I (a ∧ e ∧ f) ∨ (b ∧ [d ∨ c]) → (a ∧ e ∧ f) ∨ b ∨ d ∨ c

are linear inferences. However:

I [a ∨ b] ∧ [a ∨ c] → a ∨ b (unbalanced)

I a ∨ b→ a ∧ b (unsound)

I ¬ (a ∧ b) ∨ c→ ¬a ∨ ¬b ∨ c (negation)

are not.

Page 3: Automating search of linear inferences in propositional logicarcturus.su/mimir/autolininf-p.pdfLinear inferences A linear inference is a sound implication A! B, free of negation, and

Linear inferences

A linear inference is a sound implication A→ B, free of negation,and where every variable occurs exactly once in the premiss andconclusion (i.e. it is balanced).

Some examples:

I (a ∧ b) ∨ c→ a ∨ b ∨ c

I (a ∧ e ∧ f) ∨ (b ∧ [d ∨ c]) → (a ∧ e ∧ f) ∨ b ∨ d ∨ c

are linear inferences. However:

I [a ∨ b] ∧ [a ∨ c] → a ∨ b (unbalanced)

I a ∨ b→ a ∧ b (unsound)

I ¬ (a ∧ b) ∨ c→ ¬a ∨ ¬b ∨ c (negation)

are not.

Page 4: Automating search of linear inferences in propositional logicarcturus.su/mimir/autolininf-p.pdfLinear inferences A linear inference is a sound implication A! B, free of negation, and

Linear inferences

A linear inference is a sound implication A→ B, free of negation,and where every variable occurs exactly once in the premiss andconclusion (i.e. it is balanced).

Some examples:

I (a ∧ b) ∨ c→ a ∨ b ∨ c

I (a ∧ e ∧ f) ∨ (b ∧ [d ∨ c]) → (a ∧ e ∧ f) ∨ b ∨ d ∨ c

are linear inferences.

However:

I [a ∨ b] ∧ [a ∨ c] → a ∨ b (unbalanced)

I a ∨ b→ a ∧ b (unsound)

I ¬ (a ∧ b) ∨ c→ ¬a ∨ ¬b ∨ c (negation)

are not.

Page 5: Automating search of linear inferences in propositional logicarcturus.su/mimir/autolininf-p.pdfLinear inferences A linear inference is a sound implication A! B, free of negation, and

Linear inferences

A linear inference is a sound implication A→ B, free of negation,and where every variable occurs exactly once in the premiss andconclusion (i.e. it is balanced).

Some examples:

I (a ∧ b) ∨ c→ a ∨ b ∨ c

I (a ∧ e ∧ f) ∨ (b ∧ [d ∨ c]) → (a ∧ e ∧ f) ∨ b ∨ d ∨ c

are linear inferences. However:

I [a ∨ b] ∧ [a ∨ c] → a ∨ b (unbalanced)

I a ∨ b→ a ∧ b (unsound)

I ¬ (a ∧ b) ∨ c→ ¬a ∨ ¬b ∨ c (negation)

are not.

Page 6: Automating search of linear inferences in propositional logicarcturus.su/mimir/autolininf-p.pdfLinear inferences A linear inference is a sound implication A! B, free of negation, and

Linear inferencesWhy negation free?

If an inference is balanced, the negation free condition we set is forclarity. Any instance of negation can be reduced by de Morgan’slaws to atom-by-atom negation. Since each atom occurs onlyonce, we can then replace them.

¬(a ∧ [b ∨ c])−−−−−−−−−−−−−−¬a ∨ ¬ [b ∨ c]−−−−−−−−−−−−−−−¬a ∨ (¬b ∧ ¬c)

Note that balancedness ensures either only x or ¬x occur – notboth. In the above example we would replace ¬a, ¬b, ¬c withfresh variables a′, b′, c′ respectively for an equivalent negation freeformula.

Page 7: Automating search of linear inferences in propositional logicarcturus.su/mimir/autolininf-p.pdfLinear inferences A linear inference is a sound implication A! B, free of negation, and

Linear inferencesWhy negation free?

If an inference is balanced, the negation free condition we set is forclarity. Any instance of negation can be reduced by de Morgan’slaws to atom-by-atom negation. Since each atom occurs onlyonce, we can then replace them.

¬(a ∧ [b ∨ c])−−−−−−−−−−−−−−¬a ∨ ¬ [b ∨ c]−−−−−−−−−−−−−−−¬a ∨ (¬b ∧ ¬c)

Note that balancedness ensures either only x or ¬x occur – notboth. In the above example we would replace ¬a, ¬b, ¬c withfresh variables a′, b′, c′ respectively for an equivalent negation freeformula.

Page 8: Automating search of linear inferences in propositional logicarcturus.su/mimir/autolininf-p.pdfLinear inferences A linear inference is a sound implication A! B, free of negation, and

Linear inferencesWhy negation free?

If an inference is balanced, the negation free condition we set is forclarity. Any instance of negation can be reduced by de Morgan’slaws to atom-by-atom negation. Since each atom occurs onlyonce, we can then replace them.

¬(a ∧ [b ∨ c])−−−−−−−−−−−−−−¬a ∨ ¬ [b ∨ c]−−−−−−−−−−−−−−−¬a ∨ (¬b ∧ ¬c)

Note that balancedness ensures either only x or ¬x occur – notboth. In the above example we would replace ¬a, ¬b, ¬c withfresh variables a′, b′, c′ respectively for an equivalent negation freeformula.

Page 9: Automating search of linear inferences in propositional logicarcturus.su/mimir/autolininf-p.pdfLinear inferences A linear inference is a sound implication A! B, free of negation, and

Three linear inference rules

Within deep inference, there are three important linear inferencerules, some of which may be familiar: mix, switch and medial.

a ∧ bmix −−−−−

a ∨ b

a ∧ [b ∨ c]s −−−−−−−−−−−(a ∧ b) ∨ c

(a ∧ b) ∨ (c ∧ d)m −−−−−−−−−−−−−−−−−

[a ∨ c] ∧ [b ∨ d]

I These are strict implications

I Composition of these rules is the basis of the study

Example

a ∧ [b ∨ (c ∧ d)] → [a ∨ c] ∧ [b ∨ d]

a ∧ [b ∨ (c ∧ d)]s −−−−−−−−−−−−−−−−−(a ∧ b) ∨ (c ∧ d)

m −−−−−−−−−−−−−−−−−[a ∨ c] ∧ [b ∨ d]

Page 10: Automating search of linear inferences in propositional logicarcturus.su/mimir/autolininf-p.pdfLinear inferences A linear inference is a sound implication A! B, free of negation, and

Three linear inference rules

Within deep inference, there are three important linear inferencerules, some of which may be familiar: mix, switch and medial.

a ∧ bmix −−−−−

a ∨ b

a ∧ [b ∨ c]s −−−−−−−−−−−(a ∧ b) ∨ c

(a ∧ b) ∨ (c ∧ d)m −−−−−−−−−−−−−−−−−

[a ∨ c] ∧ [b ∨ d]

I These are strict implications

I Composition of these rules is the basis of the study

Example

a ∧ [b ∨ (c ∧ d)] → [a ∨ c] ∧ [b ∨ d]

a ∧ [b ∨ (c ∧ d)]s −−−−−−−−−−−−−−−−−(a ∧ b) ∨ (c ∧ d)

m −−−−−−−−−−−−−−−−−[a ∨ c] ∧ [b ∨ d]

Page 11: Automating search of linear inferences in propositional logicarcturus.su/mimir/autolininf-p.pdfLinear inferences A linear inference is a sound implication A! B, free of negation, and

Three linear inference rules

Within deep inference, there are three important linear inferencerules, some of which may be familiar: mix, switch and medial.

a ∧ bmix −−−−−

a ∨ b

a ∧ [b ∨ c]s −−−−−−−−−−−(a ∧ b) ∨ c

(a ∧ b) ∨ (c ∧ d)m −−−−−−−−−−−−−−−−−

[a ∨ c] ∧ [b ∨ d]

I These are strict implications

I Composition of these rules is the basis of the study

Example

a ∧ [b ∨ (c ∧ d)] → [a ∨ c] ∧ [b ∨ d]

a ∧ [b ∨ (c ∧ d)]s −−−−−−−−−−−−−−−−−(a ∧ b) ∨ (c ∧ d)

m −−−−−−−−−−−−−−−−−[a ∨ c] ∧ [b ∨ d]

Page 12: Automating search of linear inferences in propositional logicarcturus.su/mimir/autolininf-p.pdfLinear inferences A linear inference is a sound implication A! B, free of negation, and

Three linear inference rulesBuilding a basis

We would like to understand the space of linear inferences better.One way of looking at this is to treat the three rules we introducedas a basis for generating linear inferences. But are these three rulessufficient to span all linear inferences?

Answer: no. Straßburger offered the following counterexample with36 variables:∧

1≤i≤18

[ai ∨ bi] → ([a1 ∨ a2 ∨ a3] ∧ [a7 ∨ a8 ∨ a9] ∧ [a13 ∨ a14 ∨ a15])

∧([b1 ∨ a4 ∨ a5] ∧ [b7 ∨ a10 ∨ a11] ∧ [b13 ∨ a16 ∨ a17])

∧([b2 ∨ b4 ∨ a6] ∧ [b8 ∨ b10 ∨ a12] ∧ [b14 ∨ b16 ∨ a18])

∧([b3 ∨ b5 ∨ b6] ∧ [b9 ∨ b11 ∨ b12] ∧ [b15 ∨ b17 ∨ b18])

which can not be generated using the mix, switch and medial rules.

Page 13: Automating search of linear inferences in propositional logicarcturus.su/mimir/autolininf-p.pdfLinear inferences A linear inference is a sound implication A! B, free of negation, and

Three linear inference rulesBuilding a basis

We would like to understand the space of linear inferences better.One way of looking at this is to treat the three rules we introducedas a basis for generating linear inferences. But are these three rulessufficient to span all linear inferences?

Answer: no. Straßburger offered the following counterexample with36 variables:∧

1≤i≤18

[ai ∨ bi] → ([a1 ∨ a2 ∨ a3] ∧ [a7 ∨ a8 ∨ a9] ∧ [a13 ∨ a14 ∨ a15])

∧([b1 ∨ a4 ∨ a5] ∧ [b7 ∨ a10 ∨ a11] ∧ [b13 ∨ a16 ∨ a17])

∧([b2 ∨ b4 ∨ a6] ∧ [b8 ∨ b10 ∨ a12] ∧ [b14 ∨ b16 ∨ a18])

∧([b3 ∨ b5 ∨ b6] ∧ [b9 ∨ b11 ∨ b12] ∧ [b15 ∨ b17 ∨ b18])

which can not be generated using the mix, switch and medial rules.

Page 14: Automating search of linear inferences in propositional logicarcturus.su/mimir/autolininf-p.pdfLinear inferences A linear inference is a sound implication A! B, free of negation, and

Three linear inference rulesBuilding a basis

We would like to understand the space of linear inferences better.One way of looking at this is to treat the three rules we introducedas a basis for generating linear inferences. But are these three rulessufficient to span all linear inferences?

Answer: no. Straßburger offered the following counterexample with36 variables:∧

1≤i≤18

[ai ∨ bi] → ([a1 ∨ a2 ∨ a3] ∧ [a7 ∨ a8 ∨ a9] ∧ [a13 ∨ a14 ∨ a15])

∧([b1 ∨ a4 ∨ a5] ∧ [b7 ∨ a10 ∨ a11] ∧ [b13 ∨ a16 ∨ a17])

∧([b2 ∨ b4 ∨ a6] ∧ [b8 ∨ b10 ∨ a12] ∧ [b14 ∨ b16 ∨ a18])

∧([b3 ∨ b5 ∨ b6] ∧ [b9 ∨ b11 ∨ b12] ∧ [b15 ∨ b17 ∨ b18])

which can not be generated using the mix, switch and medial rules.

Page 15: Automating search of linear inferences in propositional logicarcturus.su/mimir/autolininf-p.pdfLinear inferences A linear inference is a sound implication A! B, free of negation, and

Three linear inference rulesApproach

This raises the question:

I What is the greatest number of variables in a linear inferencewhere we can be sure mix, switch and medial provide acomplete basis?

I What is the simplest linear inference for which switch, mixand medial are insufficient?

I No known theoretical method for answering this.

I But we can apply a brute force method by freely applying thethree rules.

So we can think about it like this: for each linear inferenceA→ B, is it provable by mix, switch and medial? Supposing wedo this systematically by considering first all formulae of size 3,then 4, and so on, we will answer the question.

Page 16: Automating search of linear inferences in propositional logicarcturus.su/mimir/autolininf-p.pdfLinear inferences A linear inference is a sound implication A! B, free of negation, and

Three linear inference rulesApproach

This raises the question:

I What is the greatest number of variables in a linear inferencewhere we can be sure mix, switch and medial provide acomplete basis?

I What is the simplest linear inference for which switch, mixand medial are insufficient?

I No known theoretical method for answering this.

I But we can apply a brute force method by freely applying thethree rules.

So we can think about it like this: for each linear inferenceA→ B, is it provable by mix, switch and medial? Supposing wedo this systematically by considering first all formulae of size 3,then 4, and so on, we will answer the question.

Page 17: Automating search of linear inferences in propositional logicarcturus.su/mimir/autolininf-p.pdfLinear inferences A linear inference is a sound implication A! B, free of negation, and

Three linear inference rulesExample

A→ B

A

B

Page 18: Automating search of linear inferences in propositional logicarcturus.su/mimir/autolininf-p.pdfLinear inferences A linear inference is a sound implication A! B, free of negation, and

A naıve algorithm

function provable(A,B) {

nextAs = exhaust(A);

for each A’ in nextAs {

if(A’==B) return true;

if(provable(A’,B)) return true;

}

return false;

}

BFs = genbfs(n)

for A in BFs {

for B in BFs {

if(A!=B and sound(A,B)) {

if(!provable(A,B)) {

print "new inference A->B";

exit;

}

}

}

}

print "no new inferences under n variables";

exit;

Page 19: Automating search of linear inferences in propositional logicarcturus.su/mimir/autolininf-p.pdfLinear inferences A linear inference is a sound implication A! B, free of negation, and

A naıve algorithm

function provable(A,B) {

nextAs = exhaust(A);

for each A’ in nextAs {

if(A’==B) return true;

if(provable(A’,B)) return true;

}

return false;

}

BFs = genbfs(n)

for A in BFs {

for B in BFs {

if(A!=B and sound(A,B)) {

if(!provable(A,B)) {

print "new inference A->B";

exit;

}

}

}

}

print "no new inferences under n variables";

exit;

Page 20: Automating search of linear inferences in propositional logicarcturus.su/mimir/autolininf-p.pdfLinear inferences A linear inference is a sound implication A! B, free of negation, and

A naıve algorithm

function provable(A,B) {

nextAs = exhaust(A);

for each A’ in nextAs {

if(A’==B) return true;

if(provable(A’,B)) return true;

}

return false;

}

BFs = genbfs(n)

for A in BFs {

for B in BFs {

if(A!=B and sound(A,B)) {

if(!provable(A,B)) {

print "new inference A->B";

exit;

}

}

}

}

print "no new inferences under n variables";

exit;

Page 21: Automating search of linear inferences in propositional logicarcturus.su/mimir/autolininf-p.pdfLinear inferences A linear inference is a sound implication A! B, free of negation, and

A naıve algorithm

There are a few considerations we should make, in particularwhether the algorithm will always return. In fact it its current stateit won’t unless we clearly define what we mean for two formulae tobe equal and how to implement it.

Page 22: Automating search of linear inferences in propositional logicarcturus.su/mimir/autolininf-p.pdfLinear inferences A linear inference is a sound implication A! B, free of negation, and

A naıve algorithmEnsuring termination

Consider:a ∧ b ∧ c ∧ d b ∧ a ∧ c ∧ d

Clearly equal up to commutativity.

A possible scenario could be something of this form:

...comm. −−−−−−−−−−−−−

b ∧ a ∧ c ∧ dcomm. −−−−−−−−−−−−−

a ∧ b ∧ c ∧ dcomm. −−−−−−−−−−−−−

b ∧ a ∧ c ∧ dcomm. −−−−−−−−−−−−−

...

Could something like this still happen in other cases?

Page 23: Automating search of linear inferences in propositional logicarcturus.su/mimir/autolininf-p.pdfLinear inferences A linear inference is a sound implication A! B, free of negation, and

A naıve algorithmEnsuring termination

Consider:a ∧ b ∧ c ∧ d b ∧ a ∧ c ∧ d

Clearly equal up to commutativity.

A possible scenario could be something of this form:

...comm. −−−−−−−−−−−−−

b ∧ a ∧ c ∧ dcomm. −−−−−−−−−−−−−

a ∧ b ∧ c ∧ dcomm. −−−−−−−−−−−−−

b ∧ a ∧ c ∧ dcomm. −−−−−−−−−−−−−

...

Could something like this still happen in other cases?

Page 24: Automating search of linear inferences in propositional logicarcturus.su/mimir/autolininf-p.pdfLinear inferences A linear inference is a sound implication A! B, free of negation, and

A naıve algorithmEnsuring termination

Consider:a ∧ b ∧ c ∧ d b ∧ a ∧ c ∧ d

Clearly equal up to commutativity.

A possible scenario could be something of this form:

...comm. −−−−−−−−−−−−−

b ∧ a ∧ c ∧ dcomm. −−−−−−−−−−−−−

a ∧ b ∧ c ∧ dcomm. −−−−−−−−−−−−−

b ∧ a ∧ c ∧ dcomm. −−−−−−−−−−−−−

...

Could something like this still happen in other cases?

Page 25: Automating search of linear inferences in propositional logicarcturus.su/mimir/autolininf-p.pdfLinear inferences A linear inference is a sound implication A! B, free of negation, and

A naıve algorithmEnsuring termination

Consider:a ∧ b ∧ c ∧ d b ∧ a ∧ c ∧ d

Clearly equal up to commutativity.

A possible scenario could be something of this form:

...comm. −−−−−−−−−−−−−

b ∧ a ∧ c ∧ dcomm. −−−−−−−−−−−−−

a ∧ b ∧ c ∧ dcomm. −−−−−−−−−−−−−

b ∧ a ∧ c ∧ dcomm. −−−−−−−−−−−−−

...

Could something like this still happen in other cases?

Page 26: Automating search of linear inferences in propositional logicarcturus.su/mimir/autolininf-p.pdfLinear inferences A linear inference is a sound implication A! B, free of negation, and

A naıve algorithmEnsuring termination

DefinitionDefine the equivalence relation = by taking the reflexive,symmetric and transitive closure of the following equations:

A ? B = B ? A, commutativity

(A ? B) ? C = A ? (B ? C), associativity

for ? ∈ {∧, ∨} where A,B,C are formulae.

Theorem (Gurvich)

Any sound linear inference rule that is invertible is a subrelation of=, where = is equivalence up to commutativity and associativity.

So consider formulae equal up to =, which ensures termination bythe above theorem.

Page 27: Automating search of linear inferences in propositional logicarcturus.su/mimir/autolininf-p.pdfLinear inferences A linear inference is a sound implication A! B, free of negation, and

A naıve algorithmTrivial linear inferences

Consider the inference a ∧ [b ∨ c] → a ∨ (b ∧ c). Exhausting allpossible applications of mix, switch and medial (up topermutation), we have:

a ∧ [b ∨ c]mix −−−−−−−−−−

a ∨ b ∨ c

a ∧ [b ∨ c]s −−−−−−−−−−−(a ∧ b) ∨ c

a ∧ [b ∨ c]s −−−−−−−−−−−(a ∧ b) ∨ c

mix −−−−−−−−−−−a ∨ b ∨ c

The conclusion a ∨ (b ∧ c) does not appear here, so as far as thealgorithm is concerned, this is a new inference!

How do we characterise this unwanted type of inference?

a ∧ [> ∨ c]−−−−−−−−−−−−a ∨ (⊥ ∧ c)

“Trivial at b.”

Page 28: Automating search of linear inferences in propositional logicarcturus.su/mimir/autolininf-p.pdfLinear inferences A linear inference is a sound implication A! B, free of negation, and

A naıve algorithmTrivial linear inferences

Consider the inference a ∧ [b ∨ c] → a ∨ (b ∧ c).

Exhausting allpossible applications of mix, switch and medial (up topermutation), we have:

a ∧ [b ∨ c]mix −−−−−−−−−−

a ∨ b ∨ c

a ∧ [b ∨ c]s −−−−−−−−−−−(a ∧ b) ∨ c

a ∧ [b ∨ c]s −−−−−−−−−−−(a ∧ b) ∨ c

mix −−−−−−−−−−−a ∨ b ∨ c

The conclusion a ∨ (b ∧ c) does not appear here, so as far as thealgorithm is concerned, this is a new inference!

How do we characterise this unwanted type of inference?

a ∧ [> ∨ c]−−−−−−−−−−−−a ∨ (⊥ ∧ c)

“Trivial at b.”

Page 29: Automating search of linear inferences in propositional logicarcturus.su/mimir/autolininf-p.pdfLinear inferences A linear inference is a sound implication A! B, free of negation, and

A naıve algorithmTrivial linear inferences

Consider the inference a ∧ [b ∨ c] → a ∨ (b ∧ c). Exhausting allpossible applications of mix, switch and medial (up topermutation), we have:

a ∧ [b ∨ c]mix −−−−−−−−−−

a ∨ b ∨ c

a ∧ [b ∨ c]s −−−−−−−−−−−(a ∧ b) ∨ c

a ∧ [b ∨ c]s −−−−−−−−−−−(a ∧ b) ∨ c

mix −−−−−−−−−−−a ∨ b ∨ c

The conclusion a ∨ (b ∧ c) does not appear here, so as far as thealgorithm is concerned, this is a new inference!

How do we characterise this unwanted type of inference?

a ∧ [> ∨ c]−−−−−−−−−−−−a ∨ (⊥ ∧ c)

“Trivial at b.”

Page 30: Automating search of linear inferences in propositional logicarcturus.su/mimir/autolininf-p.pdfLinear inferences A linear inference is a sound implication A! B, free of negation, and

A naıve algorithmTrivial linear inferences

Consider the inference a ∧ [b ∨ c] → a ∨ (b ∧ c). Exhausting allpossible applications of mix, switch and medial (up topermutation), we have:

a ∧ [b ∨ c]mix −−−−−−−−−−

a ∨ b ∨ c

a ∧ [b ∨ c]s −−−−−−−−−−−(a ∧ b) ∨ c

a ∧ [b ∨ c]s −−−−−−−−−−−(a ∧ b) ∨ c

mix −−−−−−−−−−−a ∨ b ∨ c

The conclusion a ∨ (b ∧ c) does not appear here, so as far as thealgorithm is concerned, this is a new inference!

How do we characterise this unwanted type of inference?

a ∧ [> ∨ c]−−−−−−−−−−−−a ∨ (⊥ ∧ c)

“Trivial at b.”

Page 31: Automating search of linear inferences in propositional logicarcturus.su/mimir/autolininf-p.pdfLinear inferences A linear inference is a sound implication A! B, free of negation, and

A naıve algorithmTrivial linear inferences

TheoremIf ρ : F{a} → G{a} is trivial at a, then:

1. ρ can be reduced to a linear inference ρ′ with strictly fewervariables;

2. ρ can be derived from ρ′ using units.

Example (mix)

a ∧ b−−−−−a ∨ b

a ∧>−−−−−−a ∨⊥

mix is trivial (at b)

Proposition

Suppose A,B,C,D are balanced formulae whereA⇒ B ⇒ C ⇒ D. Suppose B → C is trivial. Then A→ D istrivial.

Page 32: Automating search of linear inferences in propositional logicarcturus.su/mimir/autolininf-p.pdfLinear inferences A linear inference is a sound implication A! B, free of negation, and

A naıve algorithmTrivial linear inferences

TheoremIf ρ : F{a} → G{a} is trivial at a, then:

1. ρ can be reduced to a linear inference ρ′ with strictly fewervariables;

2. ρ can be derived from ρ′ using units.

Example (mix)

a ∧ b−−−−−a ∨ b

a ∧>−−−−−−a ∨⊥

mix is trivial (at b)

Proposition

Suppose A,B,C,D are balanced formulae whereA⇒ B ⇒ C ⇒ D. Suppose B → C is trivial. Then A→ D istrivial.

Page 33: Automating search of linear inferences in propositional logicarcturus.su/mimir/autolininf-p.pdfLinear inferences A linear inference is a sound implication A! B, free of negation, and

A naıve algorithmTrivial linear inferences

TheoremIf ρ : F{a} → G{a} is trivial at a, then:

1. ρ can be reduced to a linear inference ρ′ with strictly fewervariables;

2. ρ can be derived from ρ′ using units.

Example (mix)

a ∧ b−−−−−a ∨ b

a ∧>−−−−−−a ∨⊥

mix is trivial (at b)

Proposition

Suppose A,B,C,D are balanced formulae whereA⇒ B ⇒ C ⇒ D. Suppose B → C is trivial. Then A→ D istrivial.

Page 34: Automating search of linear inferences in propositional logicarcturus.su/mimir/autolininf-p.pdfLinear inferences A linear inference is a sound implication A! B, free of negation, and

A naıve algorithm

function provable(A,B) {

nextAs = exhaust(A);

for each A’ in nextAs {

if(A’==B) return true;

if(provable(A’,B)) return true;

}

return false;

}

BFs = genbfs(n)

for A in BFs {

for B in BFs {

if(A!=B and sound(A,B)) {

if(!provable(A,B)) {

print "new inference A->B";

exit;

}

}

}

}

print "no new inferences under n variables";

exit;

Page 35: Automating search of linear inferences in propositional logicarcturus.su/mimir/autolininf-p.pdfLinear inferences A linear inference is a sound implication A! B, free of negation, and

Optimisation

The algorithm presented is slow. Next are two improvements thatreduce redundancy, which we can summarise as follows:

I Why check both of the following inferences?

(a ∧ b) ∨ c→ a ∨ b ∨ c,

(a ∧ c) ∨ b→ a ∨ b ∨ c.

I Does provable() need to be recursive? A→ B:

A{s,m} −−

A′∗ −−B

A′ → B would be checked anyway.

Page 36: Automating search of linear inferences in propositional logicarcturus.su/mimir/autolininf-p.pdfLinear inferences A linear inference is a sound implication A! B, free of negation, and

Optimisation

The algorithm presented is slow. Next are two improvements thatreduce redundancy, which we can summarise as follows:

I Why check both of the following inferences?

(a ∧ b) ∨ c→ a ∨ b ∨ c,

(a ∧ c) ∨ b→ a ∨ b ∨ c.

I Does provable() need to be recursive?

A→ B:

A{s,m} −−

A′∗ −−B

A′ → B would be checked anyway.

Page 37: Automating search of linear inferences in propositional logicarcturus.su/mimir/autolininf-p.pdfLinear inferences A linear inference is a sound implication A! B, free of negation, and

Optimisation

The algorithm presented is slow. Next are two improvements thatreduce redundancy, which we can summarise as follows:

I Why check both of the following inferences?

(a ∧ b) ∨ c→ a ∨ b ∨ c,

(a ∧ c) ∨ b→ a ∨ b ∨ c.

I Does provable() need to be recursive? A→ B:

A{s,m} −−

A′∗ −−B

A′ → B would be checked anyway.

Page 38: Automating search of linear inferences in propositional logicarcturus.su/mimir/autolininf-p.pdfLinear inferences A linear inference is a sound implication A! B, free of negation, and

A naıve algorithmFinal version

function provable(A,B) {

nextAs = exhaust(A);

for each A’ in nextAs {

if(sound(A’,B)) return true; /* *** */

}

return false;

}

BFs = genbfs(n)

for A in BFs {

for B in BFs {

if(A!=B and sound(A,B) and !trivial(A,B)) { /* *** */

if(!provable(A,B)) {

print "new inference A->B";

exit;

}

}

}

}

print "no new inferences under n variables";

exit;

Page 39: Automating search of linear inferences in propositional logicarcturus.su/mimir/autolininf-p.pdfLinear inferences A linear inference is a sound implication A! B, free of negation, and

Implementation

I C was chosen to write the program to make the most oflimited memory/computing power.

I Storage of formulae proved to be very important.

I The mix, switch and medial rules were implemented ad hoc -automatic implementation is a much harder problem.

I Execution became unrealistic on a regular desktop machine forchecks on all linear inferences of sizes 7 or more.

Page 40: Automating search of linear inferences in propositional logicarcturus.su/mimir/autolininf-p.pdfLinear inferences A linear inference is a sound implication A! B, free of negation, and

ImplementationStorage of formulae

[a ∨ c] ∧ [b ∨ e] ∧ f ∧ g

a

c

be

f

g

orand

Page 41: Automating search of linear inferences in propositional logicarcturus.su/mimir/autolininf-p.pdfLinear inferences A linear inference is a sound implication A! B, free of negation, and

SummaryI Generating all linear inferences of up to 3 variables by hand is

simple.

I We have found that switch and medial also span all linearinferences of up to 6 variables.

I Simpler linear inference that can not be generated:

[a ∨ (b ∧ c)] ∧ [(d ∧ e) ∨ (f ∧ g)] ∧ [(h ∧ i) ∨ j]−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−([d ∨ h] ∧ [a ∨ (e ∧ i)]) ∨ ([(b ∧ f) ∨ j] ∧ [c ∨ g])

I Reduces the problem to searching for linear inferences ofbetween 7 and 9 variables.

I It is known that proof search in a certain deep inferencesystem (KS) can be efficiently reduced to the problem of{s,m} derivability.

I The implementation includes a small library of functions formanipulating formulae stored in the specified format – couldperhaps be a framework for a more general deep inferencetool.

Page 42: Automating search of linear inferences in propositional logicarcturus.su/mimir/autolininf-p.pdfLinear inferences A linear inference is a sound implication A! B, free of negation, and

SummaryI Generating all linear inferences of up to 3 variables by hand is

simple.I We have found that switch and medial also span all linear

inferences of up to 6 variables.

I Simpler linear inference that can not be generated:

[a ∨ (b ∧ c)] ∧ [(d ∧ e) ∨ (f ∧ g)] ∧ [(h ∧ i) ∨ j]−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−([d ∨ h] ∧ [a ∨ (e ∧ i)]) ∨ ([(b ∧ f) ∨ j] ∧ [c ∨ g])

I Reduces the problem to searching for linear inferences ofbetween 7 and 9 variables.

I It is known that proof search in a certain deep inferencesystem (KS) can be efficiently reduced to the problem of{s,m} derivability.

I The implementation includes a small library of functions formanipulating formulae stored in the specified format – couldperhaps be a framework for a more general deep inferencetool.

Page 43: Automating search of linear inferences in propositional logicarcturus.su/mimir/autolininf-p.pdfLinear inferences A linear inference is a sound implication A! B, free of negation, and

SummaryI Generating all linear inferences of up to 3 variables by hand is

simple.I We have found that switch and medial also span all linear

inferences of up to 6 variables.I Simpler linear inference that can not be generated:

[a ∨ (b ∧ c)] ∧ [(d ∧ e) ∨ (f ∧ g)] ∧ [(h ∧ i) ∨ j]−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−([d ∨ h] ∧ [a ∨ (e ∧ i)]) ∨ ([(b ∧ f) ∨ j] ∧ [c ∨ g])

I Reduces the problem to searching for linear inferences ofbetween 7 and 9 variables.

I It is known that proof search in a certain deep inferencesystem (KS) can be efficiently reduced to the problem of{s,m} derivability.

I The implementation includes a small library of functions formanipulating formulae stored in the specified format – couldperhaps be a framework for a more general deep inferencetool.

Page 44: Automating search of linear inferences in propositional logicarcturus.su/mimir/autolininf-p.pdfLinear inferences A linear inference is a sound implication A! B, free of negation, and

SummaryI Generating all linear inferences of up to 3 variables by hand is

simple.I We have found that switch and medial also span all linear

inferences of up to 6 variables.I Simpler linear inference that can not be generated:

[a ∨ (b ∧ c)] ∧ [(d ∧ e) ∨ (f ∧ g)] ∧ [(h ∧ i) ∨ j]−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−([d ∨ h] ∧ [a ∨ (e ∧ i)]) ∨ ([(b ∧ f) ∨ j] ∧ [c ∨ g])

I Reduces the problem to searching for linear inferences ofbetween 7 and 9 variables.

I It is known that proof search in a certain deep inferencesystem (KS) can be efficiently reduced to the problem of{s,m} derivability.

I The implementation includes a small library of functions formanipulating formulae stored in the specified format – couldperhaps be a framework for a more general deep inferencetool.

Page 45: Automating search of linear inferences in propositional logicarcturus.su/mimir/autolininf-p.pdfLinear inferences A linear inference is a sound implication A! B, free of negation, and

SummaryI Generating all linear inferences of up to 3 variables by hand is

simple.I We have found that switch and medial also span all linear

inferences of up to 6 variables.I Simpler linear inference that can not be generated:

[a ∨ (b ∧ c)] ∧ [(d ∧ e) ∨ (f ∧ g)] ∧ [(h ∧ i) ∨ j]−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−([d ∨ h] ∧ [a ∨ (e ∧ i)]) ∨ ([(b ∧ f) ∨ j] ∧ [c ∨ g])

I Reduces the problem to searching for linear inferences ofbetween 7 and 9 variables.

I It is known that proof search in a certain deep inferencesystem (KS) can be efficiently reduced to the problem of{s,m} derivability.

I The implementation includes a small library of functions formanipulating formulae stored in the specified format – couldperhaps be a framework for a more general deep inferencetool.

Page 46: Automating search of linear inferences in propositional logicarcturus.su/mimir/autolininf-p.pdfLinear inferences A linear inference is a sound implication A! B, free of negation, and

SummaryI Generating all linear inferences of up to 3 variables by hand is

simple.I We have found that switch and medial also span all linear

inferences of up to 6 variables.I Simpler linear inference that can not be generated:

[a ∨ (b ∧ c)] ∧ [(d ∧ e) ∨ (f ∧ g)] ∧ [(h ∧ i) ∨ j]−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−([d ∨ h] ∧ [a ∨ (e ∧ i)]) ∨ ([(b ∧ f) ∨ j] ∧ [c ∨ g])

I Reduces the problem to searching for linear inferences ofbetween 7 and 9 variables.

I It is known that proof search in a certain deep inferencesystem (KS) can be efficiently reduced to the problem of{s,m} derivability.

I The implementation includes a small library of functions formanipulating formulae stored in the specified format – couldperhaps be a framework for a more general deep inferencetool.

Page 47: Automating search of linear inferences in propositional logicarcturus.su/mimir/autolininf-p.pdfLinear inferences A linear inference is a sound implication A! B, free of negation, and

Thanks for listening!