feat: soundness and completeness of linear logic phase semantics#424
feat: soundness and completeness of linear logic phase semantics#424tannerduve wants to merge 21 commits intoleanprover:mainfrom
Conversation
9a97ac2 to
2574110
Compare
fb557ae to
4abde37
Compare
cf5fa04 to
aa382c6
Compare
Co-authored-by: Bhavik Mehta <b-mehta@users.noreply.github.com>
|
Could you please do a pass fixing indentation issues? I started to mark them all individually but I think it is just easier to point out that this in general doesn't adhere to indentation at four spaces for theorem statements using multiple lines. |
definitely. I was unaware of this convention for some reason. |
|
just fixed, lmk if there are other issues wrt indentation or style conventions I've missed |
chenson2018
left a comment
There was a problem hiding this comment.
This isn't comprehensive, but a few style things I noticed. The formatting in general is a bit rough at the moment, I assume because of the AI usage.
I'd prefer to have @fmontesi review the actual content.
Co-authored-by: Chris Henson <46805207+chenson2018@users.noreply.github.com>
Co-authored-by: Chris Henson <46805207+chenson2018@users.noreply.github.com>
Co-authored-by: Chris Henson <46805207+chenson2018@users.noreply.github.com>
Co-authored-by: Chris Henson <46805207+chenson2018@users.noreply.github.com>
fmontesi
left a comment
There was a problem hiding this comment.
This looks pretty good to me, thanks!!
I've left a few comments where I had doubts.
| variable {Atom : Type u} | ||
|
|
||
| /-- The canonical monoid for the completeness construction: sequents under multiset addition. -/ | ||
| @[reducible] def CanonM (Atom : Type u) : Type u := Multiplicative (Sequent Atom) |
There was a problem hiding this comment.
Is this different from Sequent.Context? If not, does it give any advantage to define it like this? (Perhaps it's how Sequent.Context should be defined.)
There was a problem hiding this comment.
(PS: this is mostly for my own curiosity for now, not fundamental for this PR.)
There was a problem hiding this comment.
The reason for this def is that the regular Monoid class is multiplicative, and multisets are additive. The three options would be
- the way I've done here
- removing
CanonMand changingSequent.Contextto beMultiplicative (Sequent Atom) - removing
CanonMand making PhaseSpace anAddMonoid
1 and 2 seem most sensible but it's unclear to me which is better.
|
addressed these, thanks! @fmontesi |
This PR proves that the sequent calculus for full classical linear logic (CLL) is sound with respect to phase semantics, and proves completeness for MALL, the multiplicative-additive fragment of classical linear logic. Specifically it shows that every provable sequent is valid in every phase space, and constructs a syntactic phase model to prove that semantic validity implies provability for MALL.
Note on AI usage: Aleph prover proved several lemmas used in proving completeness, and these proofs were heavily iterated on and golfed by me, ensuring they meet style standards.
A couple of proofs could possibly be further golfed, open to receiving help with this