Those typing rules are present on the "On the expressivity of elementary linear logic: characterizing Ptime and an exponential time hierarchy" paper:
From the “What part of Milner-Hindley do you not understand?” Stack Overflow question, I can read some of those in English, but it is still difficult to figure out how to make a type checker out of that. This is my attempt at reading the first 4 rules:
Ax: as an axiom, if x has type A, then x has type A. (Isn't that obvious?)
Cut: If a context
Γ
provest has type A
, and another context∆
, extended with the assertionx has type A
, provesu has type B
, then those two contexts together prove the substitution of all occurrences ofx
byt
inu
has typeB
. (What does that mean, though? Why there are two contexts, where the extra one comes from? Also, that seems like a rule for substitution, but how, if substitution isn't a term, but an operation? The classical Milner-Hindley has nothing like that; it has just a very simple rule for App.)Weak: If a context proves
t has type A
, then that context extended with the statementx has type B
still provest has type A
. (Again, isn't that obvious?)Contr: if a context extended with
x1 has type !A
andx2 has type !A
provest has type B
, then that context, extended withx has type !A
proves substituting all occurrences ofx1
andx2
byx
int
has typeB
. (Another rule for substitution, it seems? But why there are two terms above, one term below? Also, why those!
s? Where would that all show up on the type checker?)
I quite get what those rules want to say, but I am missing something before it truly clicks and I'm able to implement the corresponding type checker. How can I approach understanding those rules?