ComputerAidedLL / click-and-collect

A web interactive tool for building proofs in the sequent calculus of Linear Logic, with its backend written in OCaml
GNU Lesser General Public License v2.1
17 stars 2 forks source link

commute weakenings downwards #93

Closed etiennecallies closed 3 years ago

etiennecallies commented 3 years ago
olaure01 commented 3 years ago
* I removed the `remove_loop` since it seems that commuting weakenings is enough to prevent looping in proof result. I would be happy to set it back if we find a counter-example.

What about issue #84 ?

etiennecallies commented 3 years ago
* I removed the `remove_loop` since it seems that commuting weakenings is enough to prevent looping in proof result. I would be happy to set it back if we find a counter-example.

What about issue #84 ?

Well, I can't reproduce the issue on https://linearon.modusponens.dev/?s=%21%28%3F%21A%261%29+%E2%8A%A2+%3F%21A

olaure01 commented 3 years ago

Probably nothing to do with weakening but because of the new call loop for the prover which explores "short" proofs first in pre-prod. I do not remember exactly which version is in prod but possibly the one working directly with bound 3.

olaure01 commented 3 years ago

I didn't succeed in finding an example where weakenings above With are not in the same order in both premises.

There is at least this: 1,?(A*A),?(B*B*B)&?C. I am still trying to figure out if it can be worse with the current prover.

etiennecallies commented 3 years ago

Probably nothing to do with weakening but because of the new call loop for the prover which explores "short" proofs first in pre-prod. I do not remember exactly which version is in prod but possibly the one working directly with bound 3.

image You're absolutely right! I Nothing to do with weakenings. I tried with fixed exponential bound to 3, and there is a loop. Do we assume that the way we increment exponential bound prevents from looping? Or do I put back the remove_loop method?

olaure01 commented 3 years ago

Here is a loop: ?_,??(1&1). But I don't know if it occurs before weakening commutation.

etiennecallies commented 3 years ago

I didn't succeed in finding an example where weakenings above With are not in the same order in both premises.

There is at least this: 1,?(A*A),?(B*B*B)&?C. I am still trying to figure out if it can be worse with the current prover.

I just added a commit with a swap on weakenings above With, and this solve this particular case https://linearon.modusponens.dev/?s=1%2C%3F%28A*A%29%2C%3F%28B*B*B%29%26%3FC

But doesn't solve this one https://linearon.modusponens.dev/?s=%3FA%5E%2C%28A%7CA%29%261%2C%3F%28B*B%29%2C%3F%28_*_%29

olaure01 commented 3 years ago

Yep. Similar examples: ??1,?(_&1) or ?1,?A,_&1

etiennecallies commented 3 years ago

?_,??(1&1)

Fair enough :) I put the remove_loop method back.

olaure01 commented 3 years ago

Look at: (1|1)*_,?(?1*?1) Loop generated after weakening commutation on the left, and stupid proof on the right (but this is what the algorithm is asked to do: select big ?-formulas first). So loop-detection should be run again after weakening commutation. I don't know if it is better to put it before exchange-commutation or after or both.

etiennecallies commented 3 years ago

Look at: (1|1)*_,?(?1*?1) Loop generated after weakening commutation on the left, and stupid proof on the right (but this is what the algorithm is asked to do: select big ?-formulas first). So loop-detection should be run again after weakening commutation. I don't know if it is better to put it before exchange-commutation or after or both.

Before exchange commutations: ccLLproof (4)

After exchange commutations: ccLLproof (5)

Both: ccLLproof (3)

I vote both.

olaure01 commented 3 years ago

Concerning the additive/weakening commutation, another example similar to those above:

!(?!A&?!B) ⊢ !?(!A&!B)

but probably interesting to add it to the test suite as well since it is in the list of examples.

etiennecallies commented 3 years ago

Concerning the additive/weakening commutation, another example similar to those above:

!(?!A&?!B) ⊢ !?(!A&!B)

but probably interesting to add it to the test suite as well since it is in the list of examples.

I added a test that checks that the simplified proof is exactly this one https://linearon.modusponens.dev/?s=%21%28%3F%21A%26%3F%21B%29+%E2%8A%A2+%21%3F%28%21A%26%21B%29