The L-Framework Structural in Rewriting

Carlos Olarte Joint work with Elaine Pimentel and Camilo Rocha. Avispa 25 Años Logical Frameworks

Consider the following inference rule (tensor in Linear Logic): Γ ⊢ ∆ ⊢ F G ⊗ Γ, ∆ ⊢ F ⊗ G R

Horn Clauses (Prolog)

prove Upsilon (F tensor G) :- split Upsilon Gamma Delta, prove Gamma F, prove Delta G .

Rewriting Logic (Maude) rl [tensorR] : Gamma, Delta |- F x G => (Gamma |- F) , (Delta |-G) .

Gap between what is represented and its representation

Rewriting Logic can rightfully be said to have “-representational distance” as a semantic and logical framework. (José Meseguer)

Carlos Olarte, Joint work with Elaine Pimentel and Camilo Rocha. 2 Where is the Magic ?

Rewriting logic: Equational theory + rewriting rules

• Propositional logic

op empty : -> Context [ctor] . op _,_ : Context Context -> Context [assoc comm id: empty] . eq F:Formula, F:Formula = F:Formula . --- idempotency

• Linear Logic (no weakening / contraction)

op _,_ : Context Context -> Context [assoc comm id: empty] .

• Lambek’s without exchange

op _,_ : Context Context -> Context .

The general point is that, by choosing the right equations , we can capture any desired structural axiom. (José Meseguer)

Carlos Olarte, Joint work with Elaine Pimentel and Camilo Rocha. 3 Determinism vs Non-Determinism

Back to the tensor rule:

Γ ⊢ F ∆ ⊢ G Γ, F1, F2 ⊢ G ⊗R ⊗L Γ, ∆ ⊢ F ⊗ G Γ, F1 ⊗ F2 ⊢ G

Equations

Deterministic (invertible) rules that can be eagerly applied. eq [tensorL] : Gamma, F1 * F2 |- G = Gamma, F1 , F2 |- G .

Rules

Non-deterministic (non-invertible) rules where backtracking is needed. rl [tensorR] : Gamma, Delta |- F x G => (Gamma |- F) , (Delta |-G) .

Carlos Olarte, Joint work with Elaine Pimentel and Camilo Rocha. 4 Structural Properties of Systems

In good sequent systems the cut-elimination theorem holds, i.e., proofs using the cut rule can be transformed into cut-free proofs.

Γ ⊢ ∆, F Γ, F ⊢ ∆ cut Γ ⊢ ∆

• Analytic proofs: (subformula property) • Consistency. • A cut-free system is more amenable for automatic reasoning.

How to prove cut-elimination for a given system?

It is often quite elaborated and exponentially exhaustive: • Several proof obligations showing how cut permutes down. • For that, it is useful to prove that some rules are invertible and some structural rules are admissible.

Carlos Olarte, Joint work with Elaine Pimentel and Camilo Rocha. 5 In this talk

Relying on rewrite and narrowing-based reasoning we introduce sufficient conditions and procedures for proving :

• admissibility of structural rules (weakening and contraction). • invertibility of inference rules. • permutability of inference rules (under certain conditions). • cut-elimination of the system.

RL as a meta-logical framework in action.

The L-Framework( https://carlosolarte.github.io/L-framework/) • A reflective implementation of our procedures in Maude. • General enough for proving properties of different propositional systems: intuitionistic and classical logics, linear logic, and normal modal logics.

Carlos Olarte, Joint work with Elaine Pimentel and Camilo Rocha. 6 Outline

1 Rewriting Logic

2 Sequent Systems

3 Meta-theorems of sequent systems in RL

4 Reflective Implementation and case studies

5 Concluding remarks

Carlos Olarte, Joint work with Elaine Pimentel and Camilo Rocha. 7 Rewrite Theories

A rewrite theory is the specification unit in rewriting logic

Definition (Rewrite Theory)

A tuple R = (Σ, E ∪ B, R) consisting of: • (Σ, E ∪ B) is an equational theory • B is a set of structural axioms (assoc, comm, id). • R is a set of labeled conditional rewrite rules l → r if C • (Σ, E ∪ B) specifies states and deterministic computations • R specifies dynamic, concurrent behaviors

′ ′ ′ RL proves sentences of the form t → t (R ¬ t → t ) where t, t ∈ TΣ(X). 1 →R is computable if the executability conditions hold (R is finite, equations in E are terminating and ground confluent, etc. )

Carlos Olarte, Joint work with Elaine Pimentel and Camilo Rocha. 8 Maude

• A high-performance rewriting logic engine • A system module defines a rewrite theory R. • Executes admissible system modules (confluence and termination of E, coherence of R w.r.t. E, ... ) • Several generic formal analysis tools (rewrite, search, LTL model checker,etc). • Reflective capabilities (RL as a meta-logical framework).

http://maude.cs.illinois.edu/

Carlos Olarte, Joint work with Elaine Pimentel and Camilo Rocha. 9 Plan

1 Rewriting Logic

2 Sequent Systems

3 Meta-theorems of sequent systems in RL

4 Reflective Implementation and case studies

5 Concluding remarks

Carlos Olarte, Joint work with Elaine Pimentel and Camilo Rocha. 10 Sequent Systems

A sequent is an expression of the form Γ ⊢ ∆:

• Γ is the the antecedent and ∆ the succedent. • According to structural properties, Γ, ∆ can be sets, multisets or lists of formulas. • ∆ can be a multiset (multi-conclusion) or restricted to one formula (single-conclusion) • When Γ is empty it is called one-sided (otherwise, two-sided).

Inference Rules

S1⋯Sn R S

• S is the conclusion and S1⋯Sn the premises. • If the premises are empty, then R is an axiom.

Carlos Olarte, Joint work with Elaine Pimentel and Camilo Rocha. 11 An example: Intuitionistic Propositional Logic

Syntax

F, G ∶∶= p ∣ ⊤ ∣ ⊥ ∣ F ∨ G ∣ F ∧ G ∣ F ⊃ G

Some of the rules of the system G3ip (single-conclusion, two-sided):

I ⊤ Γ, p ⊢ p Γ ⊢ ⊤ R

Γ, ⊢ Γ, ⊢ F C G C Γ ⊢ F ∨L i ∨Ri Γ, F ∨ G ⊢ C Γ ⊢ F1 ∨ F2

Γ, F ⊃ G ⊢ F Γ, G ⊢ C Γ, F ⊢ G ⊃ ⊃ Γ, F ⊃ G ⊢ C L Γ ⊢ F ⊃ G R

Carlos Olarte, Joint work with Elaine Pimentel and Camilo Rocha. 12 The OL in the L-Framework

We shall call Object Logic (OL) to the logical system we are analyzing. Defining the syntax and inference rules of the OL is quite easy.

Generic constructs from the L-Framework sort Formula . sort MSFormula . --- Multiset of Formulas op * : -> MSFormula . --- Empty multiset --- Multiset union op _;_ : MSFormula MSFormula -> MSFormula [assoc comm id: * ] .

Particular instance for the OL mod G3i is ... op _/\_ : Formula Formula -> Formula . --- Inference rules rl [AndL] : F /\ G ; C |-- H => F ; G ; C |-- H . rl [AndR] : C |-- F /\ G => ( C |-- F) | ( C |-- G) . ... endm

Carlos Olarte, Joint work with Elaine Pimentel and Camilo Rocha. 13 The OL in the L-Framework

A correct proof search procedure for free:

Maude> search [1] in G3i : p(1) /\ p(2) |-- p(2) /\ p(1) =>* proved .

Solution 1 (state 7)

Maude> show path 7 . state 0, Sequent: p(1) /\ p(2) |-- p(2) /\ p(1) ===[ rl C ; F /\ G |-- H => F ; C ; G |-- H [label AndL] . ]===> state 1, Sequent: p(1) ; p(2) |-- p(2) /\ p(1) ===[ rl C |-- F /\ G => (C |-- F) | (C |-- G) [label AndR] . ]===> state 3, Goal: (p(1) ; p(2) |-- p(2)) | (p(1) ; p(2) |-- p(1)) ===[ rl P ; C |-- P => proved [label I] . ]===> state 5, Sequent: p(1) ; p(2) |-- p(1) ===[ rl P ; C |-- P => proved [label I] . ]===> state 7, Goal: proved

Carlos Olarte, Joint work with Elaine Pimentel and Camilo Rocha. 14 Properties of inference rules

Definition

A rule S1 ⋯ Sn R S is called:

1. admissible if S is derivable whenever S1, ..., Sn are derivable. S S 2. invertible if the rules S1, ⋯, Sn are admissible.

Carlos Olarte, Joint work with Elaine Pimentel and Camilo Rocha. 15 Proving Invertibility

The proof of invertibility proceeds by induction on the height of the derivation (and then, case analysis on the last rule applied).

Consider the proof o invertibility of ∨L and the case ⊃R:

Γ, F ∨ G, A ⊢ B ⊃R Γ, F ∨ G ⊢ A ⊃ B

We can assume by induction (on a shorter derivation):

• Γ, F, A ⊢ B

• Γ, G, A ⊢ B

and then we conclude: Γ, F, A ⊢ B Γ, G, A ⊢ B ⊃R and ⊃R Goal1 ∶ Γ, F ⊢ A ⊃ B Goal2 ∶ Γ, G ⊢ A ⊃ B

Carlos Olarte, Joint work with Elaine Pimentel and Camilo Rocha. 16 Admissibility of structural rules

We know that ⊃R is invertible in G3ip. However, the case ⊃L fails:

Γ, A ⊃ B ⊢ A Γ, B ⊢ F ⊃ G ⊃ Γ, A ⊃ B ⊢ F ⊃ G L

We know that:

• Γ, A ⊃ B ⊢ A (by hypothesis) • Γ, B, F ⊢ G (by induction)

But this is not enough to complete the following figure: ?? Γ, A ⊃ B, F ⊢ A Γ, B, F ⊢ G ⊃L Goal ∶ Γ, A ⊃ B, F ⊢ G

The admissibility of weakening is missing!

Carlos Olarte, Joint work with Elaine Pimentel and Camilo Rocha. 17 Admissibility of Structural Rules

The following structural rules are admissible in G3ip

Γ ⊢ C Γ, F, F ⊢ C W C Γ, F ⊢ C Γ, F ⊢ C

1. Admissibility of W is proved by induction on the height of the derivation. 2. The admissibility of C requires invertibility results. Consider, e.g., the case

Γ, F ∨ G , F ⊢ C Γ, F ∨ G , G ⊢ C ∨L Γ, F ∨ G, F ∨ G ⊢ C

By invertibility of ∨L, we have Γ, F,F ⊢ C and, by induction, Γ, F ⊢ C as needed (the same for G).

Carlos Olarte, Joint work with Elaine Pimentel and Camilo Rocha. 18 Cut-Elimination

The following rule is admissible in G3ip

[Π] [Σ] Γ ⊢ A Γ, A ⊢ B Cut Γ ⊢ B

Nested induction: on the complexity of A and subinduction on the sum of the heights of [Π] and [Σ].

Principal cases

Γ ⊢ B Γ ⊢n A Γ ⊢n B Γ, A, B ⊢m C W ∧R ∧L Γ, A ⊢ B Γ, A, B ⊢ C ↝ Γ ⊢s(n) A ∧ B Γ, A ∧ B ⊢s(m) C Cut Cut Γ ⊢ A Γ, A ⊢ C Γ ⊢ C Cut Γ ⊢ C

Carlos Olarte, Joint work with Elaine Pimentel and Camilo Rocha. 19 Cut-Elimination

The following rule is admissible in G3ip

[Π] [Σ] Γ ⊢ A Γ, A ⊢ B Cut Γ ⊢ B

Nested induction: on the complexity of A and subinduction on the sum of the heights of [Π] and [Σ].

Non-principal cases

Γ, F, G ⊢n A Γ, F, G ⊢n A Γ, F, G , A ⊢s(m) B ∧L Cut ↝ ⊢ Γ, F ∧ G ⊢s(n) A Γ, F ∧ G, A ⊢s(m) B Γ, F, G B Cut ∧L Γ, F ∧ G ⊢ B Γ, F ∧ G ⊢ B

Carlos Olarte, Joint work with Elaine Pimentel and Camilo Rocha. 19 Plan

1 Rewriting Logic

2 Sequent Systems

3 Meta-theorems of sequent systems in RL

4 Reflective Implementation and case studies

5 Concluding remarks

Carlos Olarte, Joint work with Elaine Pimentel and Camilo Rocha. 20 Meta-theorems of sequent systems in RL:Invertibility

Consider invertibility of ∧R. We need to prove the following: • Assuming that Γ ⊢ F ∧ G is derivable, • Show that both Γ ⊢ F and Γ ⊢ G are derivable.

The proof needs to consider all the possible derivations for Γ ⊢ F ∧ G:

Step 1

Unify the head of ∧R with all the rules of the system.

?Γ1 ⊢?F1 ?Γ1 ⊢?G1 ?Γ1, ?F2 ⊢?C ?Γ1, ?G2 ⊢?C ∧R ∨L ?Γ1 ⊢?F1∧?G1 + ?Γ2, ?F2∨?G2 ⊢?C ↝

?Γ3, ?F2∨?G2 ⊢ ?F1∧?G1

and consider the following ground sequent (freezing the variables):

Γ3, F2 ∨ G2 ⊢ F1 ∧ G1

Carlos Olarte, Joint work with Elaine Pimentel and Camilo Rocha. 21 Meta-theorems of sequent systems in RL

Step 2

Apply the rule ∨L on the ground sequent:

Γ3, F2 ⊢ F1 ∧ G1 Γ3, G2 ⊢ F1 ∧ G1 ∨L Γ3, F2 ∨ G2 ⊢ F1 ∧ G1

Step3

Collect all possible hypotheses by applying the theorem (just a rewriting rule!) to the in the premises above.

Now we know, e.g. that the following sequents are derivable:

• Γ3, F2 ⊢ F1 ∧ G1 (hypothesis above)

• Γ3, F2 ⊢ F1 (by induction)

• Γ3, F2 ⊢ G1 (by induction)

Carlos Olarte, Joint work with Elaine Pimentel and Camilo Rocha. 22 Meta-theorems of sequent systems in RL

Step 4

Using all the hypotheses, find a proof of the goals.

The goal here is to prove the following ground sequents:

• Γ3, F2 ∨ G2 ⊢ F1 and

• Γ3, F2 ∨ G2 ⊢ G1

A search procedure with the System + Hypotheses is enough.

Carlos Olarte, Joint work with Elaine Pimentel and Camilo Rocha. 23 Meta-theorems of sequent systems in RL

Definition (Local Invertibility)

Let S be a sequent system and H be a (possibly empty) set of rules. Consider the following annotated inference rules:

k ∶ S1 ⋯ k ∶ Sm m ∶ T1 ⋯ m ∶ Tn rs rt s(k) ∶ S s(m) ∶ T

Under the assumption H, the premise l ∈ 1..m of the rule rs is height-preserving invertible relative to the rule rt iff for each θ ∈ CSU(s(k) ∶ S, s(m) ∶ T):

H ∪ R ∪ m ∶ T θ j ∈ 1..n ∪ m ∶ S γ γ ∈ CSU k ∶ S, m ∶ T θ ⊩ k ∶ S θ S t( j) ∣ z  {( l) ∣ ( ( j) )} ( l) j∈1..n

Global view: extended theory ⊩ premise of s is provable

i.e., Si → proved in the extended theory.

Carlos Olarte, Joint work with Elaine Pimentel and Camilo Rocha. 24 Meta-theorems of sequent systems in RL

Definition (Local Invertibility)

k ∶ S1 ⋯ k ∶ Sm m ∶ T1 ⋯ m ∶ Tn rs rt s(k) ∶ S s(m) ∶ T

Under the assumption H, the premise l ∈ 1..m of the rule rs is height-preserving invertible relative to the rule rt iff for each θ ∈ CSU ( s(k) ∶ S , s(m) ∶ T )

H ∪ R ∪ m ∶ T θ j ∈ 1..n ∪ m ∶ S γ γ ∈ CSU k ∶ S, m ∶ T θ ⊩ k ∶ S θ S t( j) ∣ z  {( l) ∣ ( ( j) )} ( l) j∈1..n

We consider all possible sequents where both rs and rt can be applied.

Carlos Olarte, Joint work with Elaine Pimentel and Camilo Rocha. 25 Meta-theorems of sequent systems in RL

Definition (Local Invertibility)

k ∶ S1 ⋯ k ∶ Sl ⋯ k ∶ Sm m ∶ T1 ⋯ m ∶ Tn rs rt s(k) ∶ S s(m) ∶ T

Under the assumption H, the premise l ∈ 1..m of the rule rs is height-preserving invertible relative to the rule rt iff for each θ ∈ CSU(s(k) ∶ S, s(m) ∶ T):

H ∪ R ∪ m ∶ T θ j ∈ 1..n ∪ m ∶ S γ γ ∈ CSU k ∶ S, m ∶ T θ ⊩ k ∶ S θ S t( j) ∣ z  {( l) ∣ ( ( j) )} ( l) j∈1..n

The goal is to prove all the premises of rs .

Carlos Olarte, Joint work with Elaine Pimentel and Camilo Rocha. 26 Meta-theorems of sequent systems in RL

Definition (Local Invertibility)

Let S be a sequent system ...

k ∶ S1 ⋯ k ∶ Sl ⋯ k ∶ Sm m ∶ T1 ⋯ m ∶ Tn rs rt s(k) ∶ S s(m) ∶ T

Under the assumption H , the premise l ∈ 1..m of the rule rs is height-preserving invertible relative to the rule rt iff for each θ ∈ CSU(s(k) ∶ S, s(m) ∶ T):

H ∪ R ∪ m ∶ T θ j ∈ 1..n ∪ m ∶ S γ γ ∈ CSU k ∶ S, m ∶ T θ ⊩ k ∶ S θ S t( j) ∣ z  {( l) ∣ ( ( j) )} ( l) j∈1..n

External theorems (rewrite rules) are assumed as well as the rules of the system.

Carlos Olarte, Joint work with Elaine Pimentel and Camilo Rocha. 27 Meta-theorems of sequent systems in RL

Definition (Local Invertibility)

m ∶ T1 ⋯ m ∶ Tn k ∶ S1 ⋯ k ∶ Sl ⋯ k ∶ Sm rs rt s(k) ∶ S s(m) ∶ T

Under the assumption H, the premise l ∈ 1..m of the rule rs is height-preserving invertible relative to the rule rt iff for each θ ∈ CSU(s(k) ∶ S, s(m) ∶ T):

H ∪ R ∪ m ∶ T θ j ∈ 1..n ∪ m ∶ S γ γ ∈ CSU k ∶ S, m ∶ T θ ⊩ k ∶ S θ S t( j) ∣ z  {( l) ∣ ( ( j) )} ( l) j∈1..n

The premises of rt are assumed as provable (rules of the form seq → proved)

Carlos Olarte, Joint work with Elaine Pimentel and Camilo Rocha. 28 Meta-theorems of sequent systems in RL

Definition (Local Invertibility)

k ∶ S1 ⋯ k ∶ Sl ⋯ k ∶ Sm m ∶ T1 ⋯ m ∶ Tj ⋯m ∶ Tn r s rt s(k) ∶ S s(m) ∶ T

Under the assumption H, the premise l ∈ 1..m of the rule rs is height-preserving invertible relative to the rule rt iff for each θ ∈ CSU(s(k) ∶ S, s(m) ∶ T):

... m ∶ S γ γ ∈ CSU k ∶ S , m ∶ T θ ⊩ ...  { ( l) ∣ ( ( j) )} j∈1..n

Inductive reasoning: If rs can be applied on the premises of rt , the resulting

sequents Sl are provable (with the same height).

Carlos Olarte, Joint work with Elaine Pimentel and Camilo Rocha. 29 Meta-theorems of sequent systems in RL

Now we have to repeat the same procedure for all the possible rules in the system S.

Theorem

Let S be a sequent system and rs an inference rule in S. If rs is invertible relative to each rt in S, then rs is height-preserving invertible in S.

Carlos Olarte, Joint work with Elaine Pimentel and Camilo Rocha. 30 Admissibility of Structural Rules

Definition (Local admissibility)

Let S be a sequent system, I be a (possibly empty) set of rules, and rt ∈ S and rs be rules given by S k ∶ T1 ⋯ k ∶ Tn 1 r rt s s(k) ∶ T S

The rule rs is height-preserving admissible relative to rt in S under the assumptions I iff assuming that i ∶ S1 is provable then, for each θ ∈ CSU(i ∶ S1, s(k) ∶ T),

R ∪ {(k ∶ T )θ ∣ j ∈ 1..n} ∪ {(∀x)(kθ ∶ S → kθ ∶ S)} ⊩ (i ∶ S)θ S j I ⃗ 1

Theorem

Let S be a sequent system and S1 rs S

be an inference rule. If rs is admissible relative to each rt in S, then rs is admissible in S.

Carlos Olarte, Joint work with Elaine Pimentel and Camilo Rocha. 31 Cut elimination conditions

Definition (Cut-elimination relative to two rules)

Let S be a sequent system and H and I a set of rules. Let

n ∶ S1 ⋯ n ∶ Sm k ∶ T1 ⋯ k ∶ Tn rs rt s(n) ∶ S s(k) ∶ T be inference rules in S. Under the assumptions H and I, the cut rule is admissible relative to rs and rt iff for each θ ∈ CSU(S, lcut) and γ ∈ CSU(T, rcutθ):

H ∪ RS ∪ ind-F ∪ ind-H ∪ ∈ ∈ ⊩ {(n ∶ Sj)γ, Sjγ ∣ j 1..m}I ∪ {(n ∶ Tj)γ, Tjγ ∣ j 1..n}I hcutγ where the variables in S and T are assumed disjoint and

ind-F = t(hcut → lcut ∣ rcut)[t/A] ∣ t ≺ Aγz ind-H = {hcut → (nγ ∶ lcut ∣ s(n)γ ∶ rcut)[Aγ/A]}∪ {hcut → (s(n)γ ∶ lcut ∣ nγ ∶ rcut)[Aγ/A]}

Carlos Olarte, Joint work with Elaine Pimentel and Camilo Rocha. 32 Cut elimination conditions

Definition (Cut-elimination relative to two rules)

Let S be a sequent system and H and I a set of rules. Let

n ∶ S1 ⋯ n ∶ Sm k ∶ T1 ⋯ k ∶ Tn rs rt s(n) ∶ S s(k) ∶ T be inference rules in S. Under the assumptions H and I, the cut rule is admissible relative

to rs and rt iff for each θ ∈ CSU(S, lcut) and γ ∈ CSU(T, rcutθ) :

∈ ∈ ⊩ ...{(n ∶ Sj)γ, Sjγ ∣ j 1..m}I ∪ {(n ∶ Tj)γ, Tjγ ∣ j 1..n}I hcutγ

lcut rcut Cut hcut

rs is applied on the left premise and rt is applied on the right premise.

Carlos Olarte, Joint work with Elaine Pimentel and Camilo Rocha. 33 Cut elimination conditions

Definition (Cut-elimination relative to two rules)

n ∶ S1 ⋯ n ∶ Sm k ∶ T1 ⋯ k ∶ Tn rs rt s(n) ∶ S s(k) ∶ T ... ∪ ind-F ∪ ind-H ∪ ... ⊩ hcutγ

ind-F = v(hcut → lcut ∣ rcut)[t/A] ∣ t ≺ Aγ |

ind-H = {hcut → ( nγ ∶ lcut ∣ s(n)γ ∶ rcut)[Aγ/A]}∪

{hcut → ( s(n)γ ∶ lcut ∣ nγ ∶ rcut)[Aγ/A]}

inf-F is instantiated with proper subterms. ind-H is instantiated with shorter derivations.

Carlos Olarte, Joint work with Elaine Pimentel and Camilo Rocha. 34 Cut elimination conditions

Finally, we test all the possible combinations of rules.

Theorem

Let S be a sequent system and H and I be set of rules. If for each rs and rt ∈ S the cut-rule is admissible relative to rs and rt under the assumptions H and I, then the cut-rule is admissible in S.

Carlos Olarte, Joint work with Elaine Pimentel and Camilo Rocha. 35 Plan

1 Rewriting Logic

2 Sequent Systems

3 Meta-theorems of sequent systems in RL

4 Reflective Implementation and case studies

5 Concluding remarks

Carlos Olarte, Joint work with Elaine Pimentel and Camilo Rocha. 36 Reflective Implementation

Reflection (META-LEVEL in Maude) allows to:

• manipulate the theory RS; • check whether R ¬ s → proved • Solve the unification problems, replace variables with fresh constants, etc.

The L-Framework provides the machinery needed to attempt proofs of:

• Admissibility of structural rules: W and C. • Invertibility analyses. • Permutability analyses (some restrictions are in order). • Identity expansion. • Cut-Elimination. Different cut-rules are already specified: multiplicative, additive, one-sided, dyadic, systems, etc.

Carlos Olarte, Joint work with Elaine Pimentel and Camilo Rocha. 37 Case studies

G3ip – Intuitionistic, two-sided, single-conclusion, propositional logic.

Invertibilities Structural G3ipW G3ip+inv ⊤ ⊤ ⊥ ⊃ ⊃ ⊃pR ⊃ I ∨L ∨Ri ∧L ∧R R L L L R L WC R C

✓T ✓T ✓F ✓T ✓T ✓T ✓T ✓T ✓F X ✓T ✓T X ✓T ✓T

Multi-conclusion Propositional Intuitionistic Logic (mLJ)

Invertibilities Structural mLJ+inv I ∨L ∨R ∧L ∧R ⊤R ⊤L ⊥L ⊃L ⊃R WCC

✓T ✓T ✓T ✓T ✓T ✓T ✓T ✓T ✓T ✓F ✓T X ✓T

Propositional classical logic

Invertibilities Structural G3cp+inv I ∨L ∨R ∧L ∧R ⊤R ⊤L ⊥L ⊃L ⊃R WCC

✓T ✓T ✓T ✓T ✓T ✓T ✓T ✓T ✓T ✓T ✓T X ✓T

Carlos Olarte, Joint work with Elaine Pimentel and Camilo Rocha. 38 Case studies

Linear logic: monadic and dyadic systems:

LL and D−LL LL D−LL D−LL+Wc 1 ⊥ ⊤ ⊗ & ⊕i !??C ?W ? copy ? O ✓T ✓T ✓T ✓F ✓T ✓T ✓F ✓F ✓F ✓T ✓F X ✓F ✓T

Plus the following theorem: If ⊢ Γ, !F then ⊢ Γ, F

Normal Modal Logics: K and S4

Invertibilities Structural Modal Rules K+inv S4+inv I ∨L ∨R ∧L ∧R ⊤R ⊤L ⊥L ⊃L ⊃R W C k 4 T C C

✓T ✓T ✓T ✓T ✓T ✓T ✓T ✓T ✓T ✓T ✓T X ✓F ✓F ✓T ✓T ✓T

Carlos Olarte, Joint work with Elaine Pimentel and Camilo Rocha. 39 Cut-Elimination

Cut-elimination theorems for:

• LJ (additive and multiplicative cut) • mLJ (multiple conclusion system) • LK (multiple conclusion)

• Modal systems K, T and S4. • MALL (one sided, multiplicative) • LL with explicit ?W and ?C. Two cut-rules that need to be simultaneously eliminated:

⊥ ⊥ n ⊢ Γ, F ⊢ ∆, F ⊢ Γ, !F ⊢ ∆, (?F ) Cut mCut ⊢ Γ, ∆ ⊢ Γ, ∆

• LL dyadic system.

⊥ ⊥ ⊢ Γ ∶ ∆1, F ⊢ Γ ∶ ∆2, F ⊢ Γ ∶ !F ⊢ Γ, F ∶ ∆ Cut Cut! ⊢ Γ ∶ ∆1, ∆2 ⊢ Γ ∶ ∆

Carlos Olarte, Joint work with Elaine Pimentel and Camilo Rocha. 40 The L-Framework

https://carlosolarte.github.io/L-framework/

Carlos Olarte, Joint work with Elaine Pimentel and Camilo Rocha. 41 Plan

1 Rewriting Logic

2 Sequent Systems

3 Meta-theorems of sequent systems in RL

4 Reflective Implementation and case studies

5 Concluding remarks

Carlos Olarte, Joint work with Elaine Pimentel and Camilo Rocha. 42 Concluding Remarks

• We gave sufficient conditions for proving structural properties of sequent systems and used RL as a meta-logical framework. • Our approach is generic (mild restrictions are imposed on sequents) and modular (properties can be proved incrementally). • Thanks to the reflective capabilities in Maude, the implementation was reasonable simple. • RL provided a straightforward encoding for the inference system and properties of interest. • Several (successful) test cases.

Future directions

• conditions for variants of sequent systems (e.g., nested and hyper-sequents). • exporting Maude’s proof objects to a proof assistant. • proof-assistant like environment.

Carlos Olarte, Joint work with Elaine Pimentel and Camilo Rocha. 43 Thanks!

Carlos Olarte, Joint work with Elaine Pimentel and Camilo Rocha. 44