1 minute read

We state “A is true”, then “A” is a proposition, and “A is true” as a whole is a judgement.

Some examples of application of logic branches in programming languagues:

K knows A epistemic logic distributed computing
A true at time t temporal logic partitial evaluation
A is a resource linear logic concurrent computing
A is possible lax logic monad
A is valid modal logic runtime code generation

Defining a JudgementPermalink

To define a judgement, we must have Introduction rules (I), and Elimination rules (E). They must satisfy Local Soundness (checks elimination rules are not too strong) such that for every way to apply the elimination rules, we can reduce it to one that already existed. The process of doing that is called local reduction. (β rule) They should also satisfy Local Completeness (checks elimination rules are not too weak) such that there is someway to apply the elimination rules so that from the pieces we can re-introduce what the original proposition is. The process of doing that is called local expansion. (η rule)

Note: MN means M applies to N

Some notations:

ΓM:A means M is a proof of A is true, or M is a program of type A, where Γ:=|Γx:A

[N/x]M means substitude N for x based on the structure of M (plug in N for x)

ExamplesPermalink

To define AB true:Permalink

Introduction rule (I):

A true,B trueAB true

or

ΓM:A,ΓN:BΓ⊢<M,N>:AB

Elimination rules (E):

AB trueA true

or

ΓM:ABΓfirst M:A AB trueB true

or

ΓM:ABΓsecond M:B

Check Local Soundness by local reduction:

A true,B trueAB trueA trueRA true

or

first<M,N>RM A true,B trueAB trueB trueRB true

or

second<M,N>RN

Check Local Completeness by local expansion:

AB trueEAB trueA true AB trueB trueAB true

or

M:ABE<first M,second M>

To define implication():Permalink

Introduction rule(Ix) (x means an assumption):

A true¯x B trueAB true

or

Γx:AM:Bλx.M:AB

Elimination rule(E):

AB true,A trueB true

or

ΓM:AB,ΓN:AΓMN:B

Local reduction:

(λx.M)NR[N/x]M

Local expansion:

M:ABEλx.Mx

Comments