Upload
others
View
7
Download
0
Embed Size (px)
Citation preview
.
.Adjunction Based Categorical Logic Programming
Ed Morehouse
Wesleyan University
March 30, 2012
A Brief History of Logic Programming Proof Search in Proof Theory Adjunctions in Categorical Proof Theory Connective Chirality and Search Strategy References
Outline
...1 A Brief History of Logic Programming
...2 Proof Search in Proof Theory
...3 Adjunctions in Categorical Proof Theory
...4 Connective Chirality and Search Strategy
Ed Morehouse Adjunction Based Categorical Logic Programming
A Brief History of Logic Programming Proof Search in Proof Theory Adjunctions in Categorical Proof Theory Connective Chirality and Search Strategy References
...1 A Brief History of Logic Programming
Ed Morehouse Adjunction Based Categorical Logic Programming
A Brief History of Logic Programming Proof Search in Proof Theory Adjunctions in Categorical Proof Theory Connective Chirality and Search Strategy References
In the beginning there was PROLOG
PROLOG has:
the logic of Horn clauses
operational semantics of resolution
denotational semantics based in model theory (classical logic)
Weaknesses:
to be practical, incorporates extra-logical features (e.g. assert/retract, cut)
not clear how to extend to other logics
ālogic programming is logic plus controlā ā Kowalski
How to get the logic to do more of the work?
Ed Morehouse Adjunction Based Categorical Logic Programming
A Brief History of Logic Programming Proof Search in Proof Theory Adjunctions in Categorical Proof Theory Connective Chirality and Search Strategy References
In the beginning there was PROLOG
PROLOG has:
the logic of Horn clauses
operational semantics of resolution
denotational semantics based in model theory (classical logic)
Weaknesses:
to be practical, incorporates extra-logical features (e.g. assert/retract, cut)
not clear how to extend to other logics
ālogic programming is logic plus controlā ā Kowalski
How to get the logic to do more of the work?
Ed Morehouse Adjunction Based Categorical Logic Programming
A Brief History of Logic Programming Proof Search in Proof Theory Adjunctions in Categorical Proof Theory Connective Chirality and Search Strategy References
In the beginning there was PROLOG
PROLOG has:
the logic of Horn clauses
operational semantics of resolution
denotational semantics based in model theory (classical logic)
Weaknesses:
to be practical, incorporates extra-logical features (e.g. assert/retract, cut)
not clear how to extend to other logics
ālogic programming is logic plus controlā ā Kowalski
How to get the logic to do more of the work?
Ed Morehouse Adjunction Based Categorical Logic Programming
A Brief History of Logic Programming Proof Search in Proof Theory Adjunctions in Categorical Proof Theory Connective Chirality and Search Strategy References
The Miller Revolution
Dale Miller realized the connective of implication could interpret scoping andmodules [Mil89]:
The goal D ā G could mean, ātry to satisfy the goal G in the current environmentaugmented by the local assumption Dā.
But not classically:
G1āØ (DāG2) ā” G1āØĀ¬DāØG2 ā” (DāG1)āØG2 ā” (DāG1)āØ (DāG2)
Intuitionistic logic makes a natural choice.
Ed Morehouse Adjunction Based Categorical Logic Programming
A Brief History of Logic Programming Proof Search in Proof Theory Adjunctions in Categorical Proof Theory Connective Chirality and Search Strategy References
The Miller Revolution
Dale Miller realized the connective of implication could interpret scoping andmodules [Mil89]:
The goal D ā G could mean, ātry to satisfy the goal G in the current environmentaugmented by the local assumption Dā.
But not classically:
G1āØ (DāG2) ā” G1āØĀ¬DāØG2 ā” (DāG1)āØG2 ā” (DāG1)āØ (DāG2)
Intuitionistic logic makes a natural choice.
Ed Morehouse Adjunction Based Categorical Logic Programming
A Brief History of Logic Programming Proof Search in Proof Theory Adjunctions in Categorical Proof Theory Connective Chirality and Search Strategy References
Abstract Logic Programming Languages
Miller et al [Mil+91] proposed an operational semantics for goal-directed proofsearch in intuitionistic logic by taking inversions of natural deduction introductionrules (sequent right rules) as search instructions (ā¢ ):
SUCCESS : Ī ā¢ ā¤ alwaysFAILURE : Ī ā¢ ā„ never
BOTH : Ī ā¢ A ā§ B only if Ī ā¢ A and Ī ā¢ BEITHER : Ī ā¢ A āØ B only if Ī ā¢ A or Ī ā¢ B
AUGMENT : Ī ā¢ A ā B only if Ī , A ā¢ BGENERIC : Ī ā¢ āš„ ā¶ X . A only if Ī ā¢ A [š„ā¦š] for š ā FV(Ī , A)
INSTANCE : Ī ā¢ āš„ ā¶ X . A only if Ī ā¢ A [š„ā¦š”] for some š” ā¶ X
Ed Morehouse Adjunction Based Categorical Logic Programming
A Brief History of Logic Programming Proof Search in Proof Theory Adjunctions in Categorical Proof Theory Connective Chirality and Search Strategy References
Abstract Logic Programming Languages
Miller et al [Mil+91] proposed an operational semantics for goal-directed proofsearch in intuitionistic logic by taking inversions of natural deduction introductionrules (sequent right rules) as search instructions (ā¢ ):
Easy to understand and implementNot complete (eg: A āØ B ā¬ A āØ B)They then investigated fragments of intuitionistic logics for which it is complete,calling them āabstract logic programming languagesā.The largest such fragment they identified, āhereditarily Harrop logicā, is insome sense maximal (via interpolation) [Har94].Not a complete specification: what to do with atomic goals?A natural goal-directed choice is backward-chaining ā cf. Coqās apply tactic
These ideas led to the development of Ī»-PROLOG.
Ed Morehouse Adjunction Based Categorical Logic Programming
A Brief History of Logic Programming Proof Search in Proof Theory Adjunctions in Categorical Proof Theory Connective Chirality and Search Strategy References
...2 Proof Search in Proof Theory
Ed Morehouse Adjunction Based Categorical Logic Programming
A Brief History of Logic Programming Proof Search in Proof Theory Adjunctions in Categorical Proof Theory Connective Chirality and Search Strategy References
Proof Theory and Proof Search
Proof search in proof theory is an active field, with surprisingly little interaction withlogic programming.
A common approach: invent clever (often complicated) sequent calculi withstructural properties that facilitate proof search (eg: contraction-free [Dyc92],permutation-free [DP96], focused [How98] [Sim12] ).
Unfortunately, all that cleverness tends to make them difficult to reason about
Being āfar fromā natural deduction, it can be non-trivial to show equivalence,cut-admissibility; to add proof terms, etc.
But this work need be done only once, so this approach is certainly workable(cf. Coqās firstorder tactic)
Ed Morehouse Adjunction Based Categorical Logic Programming
A Brief History of Logic Programming Proof Search in Proof Theory Adjunctions in Categorical Proof Theory Connective Chirality and Search Strategy References
Proof Theory and Proof Search
Proof search in proof theory is an active field, with surprisingly little interaction withlogic programming.
A common approach: invent clever (often complicated) sequent calculi withstructural properties that facilitate proof search (eg: contraction-free [Dyc92],permutation-free [DP96], focused [How98] [Sim12] ).
Unfortunately, all that cleverness tends to make them difficult to reason about
Being āfar fromā natural deduction, it can be non-trivial to show equivalence,cut-admissibility; to add proof terms, etc.
But this work need be done only once, so this approach is certainly workable(cf. Coqās firstorder tactic)
Ed Morehouse Adjunction Based Categorical Logic Programming
A Brief History of Logic Programming Proof Search in Proof Theory Adjunctions in Categorical Proof Theory Connective Chirality and Search Strategy References
Search Strategies in Sequent Calculi
A different approach: stick with a simple sequent calculus āclose toā naturaldeduction and add a layer of search strategy on top.
This approach can describe Millerās uniform proof(goal-directed strategy),Simmonsā structural focalization (via erasure), potentially others.
We investigate this approach in a categorical setting.
Ed Morehouse Adjunction Based Categorical Logic Programming
A Brief History of Logic Programming Proof Search in Proof Theory Adjunctions in Categorical Proof Theory Connective Chirality and Search Strategy References
Why Categorical Proof Theory?
Advantages of categorical proof theory:
Categorical logic / type theory a very active field, with many powerful toolsfrom category theory proper
Allows us to choose how much syntax we care about (eg: āprojections insteadof variablesā (open-Ī±-equivalence) [AM89], normal proof-term equivalence(Ī²Ī·-equivalence) [Law69] [See83], proof-term rewriting [Gha95] [Gar09] )
Structural properties can be built-in (eg: interpreting contexts as cartesianproducts realize weakening as projection and contraction as internal diagonal)
Mostly does away with distinction between natural deduction and sequentcalculus (N.D. derivations and S.C. proofs are just arrows)
Uniform treatment of semantics: build a generic model in the classifyingcategory of a logic, then models are simply functors [LS86]
Ed Morehouse Adjunction Based Categorical Logic Programming
A Brief History of Logic Programming Proof Search in Proof Theory Adjunctions in Categorical Proof Theory Connective Chirality and Search Strategy References
...3 Adjunctions in Categorical Proof Theory
Ed Morehouse Adjunction Based Categorical Logic Programming
A Brief History of Logic Programming Proof Search in Proof Theory Adjunctions in Categorical Proof Theory Connective Chirality and Search Strategy References
Adjointness in Foundations
Each connective of first-order intuitionistic logic is determined by an adjunction(thanks Bill Lawvere! [Law69])
It turns out that this fact alone is enough to ensure many good properties of thelogic:
harmony (local soundness and completeness)
permutation conversions of ā„ , āØ , ānormalizability of natural deduction derivations (thanks Dag Prawitz! [Pra65])
sequent cut elimination
etc. (?)
Most inference rules and properties of first-order intuitionistic natural deduction andsequent calculus arise uniformly from the adjoint formulations of the connectives.So we can generate proof theory from category theory.
Ed Morehouse Adjunction Based Categorical Logic Programming
A Brief History of Logic Programming Proof Search in Proof Theory Adjunctions in Categorical Proof Theory Connective Chirality and Search Strategy References
Adjointness in Foundations
Each connective of first-order intuitionistic logic is determined by an adjunction(thanks Bill Lawvere! [Law69])
It turns out that this fact alone is enough to ensure many good properties of thelogic:
harmony (local soundness and completeness)
permutation conversions of ā„ , āØ , ānormalizability of natural deduction derivations (thanks Dag Prawitz! [Pra65])
sequent cut elimination
etc. (?)
Most inference rules and properties of first-order intuitionistic natural deduction andsequent calculus arise uniformly from the adjoint formulations of the connectives.So we can generate proof theory from category theory.
Ed Morehouse Adjunction Based Categorical Logic Programming
A Brief History of Logic Programming Proof Search in Proof Theory Adjunctions in Categorical Proof Theory Connective Chirality and Search Strategy References
Example Right Connective
Conjunction isan introduction and two elimination inference rules:
A BA ā§ B ā§+ A ā§ B
A ā§ā A ā§ BB ā§ā
which are harmonious:
š š
ā§ ā§ā§
ā¹ā§
š
ā°ā§ ā¹ā§
ā°ā§ ā§
ā°ā§ ā§
ā§ ā§
Ed Morehouse Adjunction Based Categorical Logic Programming
A Brief History of Logic Programming Proof Search in Proof Theory Adjunctions in Categorical Proof Theory Connective Chirality and Search Strategy References
Example Right Connective
Conjunction isa cartesian product, i.e. the right adjoint to a diagonal functor (ā ā£ ā§):
Ī ā§ Īš ā§š
%%KKKKK
KKKKKK
KKKKK
Prop ā¶ Ī āØš ,š ā©//
ā( )
OO
A ā§ B
Prop Ć Prop ā¶ āĪ (š ,š ) //
āāØš ,š ā©%%KK
KKKK
KKKK
KKKK
KK(A , B)
ā
ā(A ā§ B)
( , )( , )
OO
Ed Morehouse Adjunction Based Categorical Logic Programming
A Brief History of Logic Programming Proof Search in Proof Theory Adjunctions in Categorical Proof Theory Connective Chirality and Search Strategy References
Deriving the Introduction Rule
In the syntax of derivations, this tells us that there is a natural bijection:
āĪš
(A , B)ā
ā¼Ī
āĪš
(A , B)ā§(A , B)
The natural isomophism āā is interchangable for ā§+By being a natural isomorphism, it is automatically invertible
The rule determines an arrow from the major premise to the conclusion ofthe rule in one category (Prop) from an arrow (derivation) determined by theminor premise in another category (Prop Ć Prop).
Ed Morehouse Adjunction Based Categorical Logic Programming
A Brief History of Logic Programming Proof Search in Proof Theory Adjunctions in Categorical Proof Theory Connective Chirality and Search Strategy References
Deriving the Introduction Rule
In the syntax of derivations, this tells us that there is a natural bijection:
ĪšA
ĪšB
āā¼
Ī
ĪšA
ĪšB
A ā§ B ā§+ā
The natural isomophism āā is interchangable for ā§+By being a natural isomorphism, it is automatically invertible
The rule determines an arrow from the major premise to the conclusion ofthe rule in one category (Prop) from an arrow (derivation) determined by theminor premise in another category (Prop Ć Prop).
Ed Morehouse Adjunction Based Categorical Logic Programming
A Brief History of Logic Programming Proof Search in Proof Theory Adjunctions in Categorical Proof Theory Connective Chirality and Search Strategy References
Deriving the Introduction Rule
In the syntax of derivations, this tells us that there is a natural bijection:
ĪšA
ĪšB
āā¼
Ī
ĪšA
ĪšB
A ā§ B ā§+ā
The natural isomophism āā is interchangable for ā§+By being a natural isomorphism, it is automatically invertible
The rule determines an arrow from the major premise to the conclusion ofthe rule in one category (Prop) from an arrow (derivation) determined by theminor premise in another category (Prop Ć Prop).
Ed Morehouse Adjunction Based Categorical Logic Programming
A Brief History of Logic Programming Proof Search in Proof Theory Adjunctions in Categorical Proof Theory Connective Chirality and Search Strategy References
Deriving the Elimination Rule
The counit of the adjunction Īµ is the ordered pair of projections inProp Ć Prop:
A B ā¼A ā§ BA šš š” A ā§ B
B š šš
This is exactly the ordered pair of elimination rules for ā§.
Ed Morehouse Adjunction Based Categorical Logic Programming
A Brief History of Logic Programming Proof Search in Proof Theory Adjunctions in Categorical Proof Theory Connective Chirality and Search Strategy References
Deriving the Elimination Rule
The counit of the adjunction Īµ is the ordered pair of projections inProp Ć Prop:
A B ā¼A ā§ BA ā§ā A ā§ B
B ā§ā
This is exactly the ordered pair of elimination rules for ā§.
Ed Morehouse Adjunction Based Categorical Logic Programming
A Brief History of Logic Programming Proof Search in Proof Theory Adjunctions in Categorical Proof Theory Connective Chirality and Search Strategy References
Local Soundness
We can now see how the local reduction (in Prop Ć Prop !):
š š
ā§ ā§ ā
ā§
š š
ā§ ā§ ā
ā§ā¹ā§
š š
is natural deduction notation for:
ā((š , š )ā) ā Īµ(A , B) = (š , š )
This is the universal property of the counit.
Ed Morehouse Adjunction Based Categorical Logic Programming
A Brief History of Logic Programming Proof Search in Proof Theory Adjunctions in Categorical Proof Theory Connective Chirality and Search Strategy References
Local Soundness
We can now see how the local reduction (in Prop Ć Prop !):
š š
ā§ ā§ ā
ā§
š š
ā§ ā§ ā
ā§ā¹ā§
š š
is natural deduction notation for:
ā((š , š )ā) ā Īµ(A , B) = (š , š )
This is the universal property of the counit.
Ed Morehouse Adjunction Based Categorical Logic Programming
A Brief History of Logic Programming Proof Search in Proof Theory Adjunctions in Categorical Proof Theory Connective Chirality and Search Strategy References
Local Completeness
Similarly, the local expansion:
ā°ā§ ā¹ā§
ā°ā§ ā§
ā°ā§ ā§
ā§ ā§ ā
is natural deduction notation for:
ā° = (ā°āÆ)ā ( )ā
= (āā° ā Īµ(Ī , Ī))ā
Ed Morehouse Adjunction Based Categorical Logic Programming
A Brief History of Logic Programming Proof Search in Proof Theory Adjunctions in Categorical Proof Theory Connective Chirality and Search Strategy References
Natural Deduction for Right Connectives
Pleasingly, the same relationship holds for all the connectives defined by rightadjoint functors (ā¤ , ā§ , ā , ā1). We call them right connectives.
introduction rule corresponds to taking the adjoint complement āā
elimination rule corresponds to composing the component of the counit Īµlocal reduction corresponds to taking the shortcut Ī²local expansion corresponds to conjugating āāÆ with Ī²
1almostEd Morehouse Adjunction Based Categorical Logic Programming
A Brief History of Logic Programming Proof Search in Proof Theory Adjunctions in Categorical Proof Theory Connective Chirality and Search Strategy References
Natural Deduction for Left Connectives
The situation for connectives defined by left adjoint functors (ā„ , āØ , ā), leftconnectives, is nearly dual but there is a complication:
Intuitionistic derivations are asymmetrical : they must have a single conclusion butmay have multiple premisses.
Because the natural bijections of left connectives are determined by āarrows out ofārather than āarrows intoā them, it is necessary to ensure that their elimination rulesare compatible with contexts.
This requires satisfying the distributive law and Frobenius reciprocity :
Ī , A āØ B ā” (Ī ā§ A) āØ (Ī ā§ B) Ī , āš„ . A ā” āš„ . Ī ā§ A
Categorically, we get this for free in BCCC (categry of (small) bicartesian closedcategories and functors) ā Thanks Nobuo Yoneda!
Ed Morehouse Adjunction Based Categorical Logic Programming
A Brief History of Logic Programming Proof Search in Proof Theory Adjunctions in Categorical Proof Theory Connective Chirality and Search Strategy References
Natural Deduction for Left Connectives
The situation for connectives defined by left adjoint functors (ā„ , āØ , ā), leftconnectives, is nearly dual but there is a complication:
Intuitionistic derivations are asymmetrical : they must have a single conclusion butmay have multiple premisses.
Because the natural bijections of left connectives are determined by āarrows out ofārather than āarrows intoā them, it is necessary to ensure that their elimination rulesare compatible with contexts.
This requires satisfying the distributive law and Frobenius reciprocity :
Ī , A āØ B ā” (Ī ā§ A) āØ (Ī ā§ B) Ī , āš„ . A ā” āš„ . Ī ā§ A
Categorically, we get this for free in BCCC (categry of (small) bicartesian closedcategories and functors) ā Thanks Nobuo Yoneda!
Ed Morehouse Adjunction Based Categorical Logic Programming
A Brief History of Logic Programming Proof Search in Proof Theory Adjunctions in Categorical Proof Theory Connective Chirality and Search Strategy References
Natural Deduction for Left Connectives
The situation for connectives defined by left adjoint functors (ā„ , āØ , ā), leftconnectives, is nearly dual but there is a complication:
Intuitionistic derivations are asymmetrical : they must have a single conclusion butmay have multiple premisses.
Because the natural bijections of left connectives are determined by āarrows out ofārather than āarrows intoā them, it is necessary to ensure that their elimination rulesare compatible with contexts.
This requires satisfying the distributive law and Frobenius reciprocity :
Ī , A āØ B ā” (Ī ā§ A) āØ (Ī ā§ B) Ī , āš„ . A ā” āš„ . Ī ā§ A
Categorically, we get this for free in BCCC (categry of (small) bicartesian closedcategories and functors) ā Thanks Nobuo Yoneda!
Ed Morehouse Adjunction Based Categorical Logic Programming
A Brief History of Logic Programming Proof Search in Proof Theory Adjunctions in Categorical Proof Theory Connective Chirality and Search Strategy References
Natural Deduction for Left Connectives
The situation for connectives defined by left adjoint functors (ā„ , āØ , ā), leftconnectives, is nearly dual but there is a complication:
Intuitionistic derivations are asymmetrical : they must have a single conclusion butmay have multiple premisses.
Because the natural bijections of left connectives are determined by āarrows out ofārather than āarrows intoā them, it is necessary to ensure that their elimination rulesare compatible with contexts.
This requires satisfying the distributive law and Frobenius reciprocity :
Ī , A āØ B ā” (Ī ā§ A) āØ (Ī ā§ B) Ī , āš„ . A ā” āš„ . Ī ā§ A
Categorically, we get this for free in BCCC (categry of (small) bicartesian closedcategories and functors) ā Thanks Nobuo Yoneda!
Ed Morehouse Adjunction Based Categorical Logic Programming
A Brief History of Logic Programming Proof Search in Proof Theory Adjunctions in Categorical Proof Theory Connective Chirality and Search Strategy References
Example Left Connective
Existential quantification isa pair of inference rules:
š” ā¶ X A[š„ā¦š”]āš„ ā¶ X . A ā+ āš„ ā¶ X . A
[š ā¶ X] [A[š„ā¦š]]šB
B āā
š may not occur outside of š or in any open premise
which satisfy:local soundnesslocal completenesspermutation conversion
Ed Morehouse Adjunction Based Categorical Logic Programming
A Brief History of Logic Programming Proof Search in Proof Theory Adjunctions in Categorical Proof Theory Connective Chirality and Search Strategy References
Example Left Connective
Existential quantification isin a hyperdoctrine, the left adjoint to a typing-context weakening (āļæ½ļæ½ ā£ ļæ½ļæ½ā):
ļæ½ļæ½ā(āš„ ā¶ X . A)
ā( š)
''OOOOO
OOOOOO
OOOOOO
OO
āProp(Ī¦ , š„ ā¶ X) ā¶ A š
//
( )
OO
ļæ½ļæ½āB
Prop(Ī¦) ā¶ āš„ ā¶ X . A š //
ā ā¶ .š''OO
OOOOOO
OOOOOO
OOOOO
B
āš„ ā¶ X . ļæ½ļæ½āB
( )
OO
Ed Morehouse Adjunction Based Categorical Logic Programming
A Brief History of Logic Programming Proof Search in Proof Theory Adjunctions in Categorical Proof Theory Connective Chirality and Search Strategy References
Deriving the Elimination Rule
In the syntax of derivations, this tells us that there is a natural bijection:
Aš
ļæ½ļæ½ā(B)āÆ
ā¼āļæ½ļæ½(A)
Aš
ļæ½ļæ½ā(B)B
But this is not interchangeable for āā. The problem is that there is in general anambient logical context, Ī, that may be used in both branches. Given:
ā° ā¶ Prop(Ī¦) (Ī ā āš„ ā¶ X . A) š ā¶ Prop(Ī¦ , š„ ā¶ X) (ļæ½ļæ½āĪ ā§ A ā ļæ½ļæ½ā(B))we get the rule we want if we can fill the gap š:
Ī āØ ,ā°ā© // Ī ā§ āš„ ā¶ X . A //______ āš„ ā¶ X . (ļæ½ļæ½āĪ ā§ A) šāÆ// B
This is just Frobenius reciprocity (context distributivity for ā).Ed Morehouse Adjunction Based Categorical Logic Programming
A Brief History of Logic Programming Proof Search in Proof Theory Adjunctions in Categorical Proof Theory Connective Chirality and Search Strategy References
Deriving the Elimination Rule
In the syntax of derivations, this tells us that there is a natural bijection:
AšB
āÆā¼
āš„ ā¶ X . A
AšB
B āāā
But this is not interchangeable for āā. The problem is that there is in general anambient logical context, Ī, that may be used in both branches. Given:
ā° ā¶ Prop(Ī¦) (Ī ā āš„ ā¶ X . A) š ā¶ Prop(Ī¦ , š„ ā¶ X) (ļæ½ļæ½āĪ ā§ A ā ļæ½ļæ½ā(B))we get the rule we want if we can fill the gap š:
Ī āØ ,ā°ā© // Ī ā§ āš„ ā¶ X . A //______ āš„ ā¶ X . (ļæ½ļæ½āĪ ā§ A) šāÆ// B
This is just Frobenius reciprocity (context distributivity for ā).Ed Morehouse Adjunction Based Categorical Logic Programming
A Brief History of Logic Programming Proof Search in Proof Theory Adjunctions in Categorical Proof Theory Connective Chirality and Search Strategy References
Deriving the Elimination Rule
In the syntax of derivations, this tells us that there is a natural bijection:
AšB
āÆā¼
āš„ ā¶ X . A
AšB
B āāā
But this is not interchangeable for āā. The problem is that there is in general anambient logical context, Ī, that may be used in both branches. Given:
ā° ā¶ Prop(Ī¦) (Ī ā āš„ ā¶ X . A) š ā¶ Prop(Ī¦ , š„ ā¶ X) (ļæ½ļæ½āĪ ā§ A ā ļæ½ļæ½ā(B))we get the rule we want if we can fill the gap š:
Ī āØ ,ā°ā© // Ī ā§ āš„ ā¶ X . A //______ āš„ ā¶ X . (ļæ½ļæ½āĪ ā§ A) šāÆ// B
This is just Frobenius reciprocity (context distributivity for ā).Ed Morehouse Adjunction Based Categorical Logic Programming
A Brief History of Logic Programming Proof Search in Proof Theory Adjunctions in Categorical Proof Theory Connective Chirality and Search Strategy References
Deriving the Elimination Rule
In the syntax of derivations, this tells us that there is a natural bijection:
AšB
āÆā¼
āš„ ā¶ X . A
AšB
B āāā
But this is not interchangeable for āā. The problem is that there is in general anambient logical context, Ī, that may be used in both branches. Given:
ā° ā¶ Prop(Ī¦) (Ī ā āš„ ā¶ X . A) š ā¶ Prop(Ī¦ , š„ ā¶ X) (ļæ½ļæ½āĪ ā§ A ā ļæ½ļæ½ā(B))we get the rule we want if we can fill the gap š:
Ī āØ ,ā°ā© // Ī ā§ āš„ ā¶ X . A //______ āš„ ā¶ X . (ļæ½ļæ½āĪ ā§ A) šāÆ// B
This is just Frobenius reciprocity (context distributivity for ā).Ed Morehouse Adjunction Based Categorical Logic Programming
A Brief History of Logic Programming Proof Search in Proof Theory Adjunctions in Categorical Proof Theory Connective Chirality and Search Strategy References
Deriving the Elimination Rule
In the syntax of derivations, this tells us that there is a natural bijection:
AšB
āÆā¼
āš„ ā¶ X . A
AšB
B āāā
But this is not interchangeable for āā. The problem is that there is in general anambient logical context, Ī, that may be used in both branches. Given:
ā° ā¶ Prop(Ī¦) (Ī ā āš„ ā¶ X . A) š ā¶ Prop(Ī¦ , š„ ā¶ X) (ļæ½ļæ½āĪ ā§ A ā ļæ½ļæ½ā(B))we get the rule we want if we can fill the gap š:
Ī āØ ,ā°ā© // Ī ā§ āš„ ā¶ X . A //______ āš„ ā¶ X . (ļæ½ļæ½āĪ ā§ A) šāÆ// B
This is just Frobenius reciprocity (context distributivity for ā).Ed Morehouse Adjunction Based Categorical Logic Programming
A Brief History of Logic Programming Proof Search in Proof Theory Adjunctions in Categorical Proof Theory Connective Chirality and Search Strategy References
Deriving the Introduction Rule
The unit of the adjunction Ī·:
A ā¼A
ļæ½ļæ½ā(āš„ ā¶ X . A) ā+ā
Also not interchangeable for ā+: lives in the wrong category (Prop(Ī¦ , š„ ā¶ X)).But it can be reindexed along any term-in-context Ī¦ ā¢ š” ā¶ X
ā ā¶ . ā(ā ā¶ . ) ā ā¶ .
( )
OO
[ ā¦ ]
ā( ( ))
OO
, ā¶oo oojj
Ed Morehouse Adjunction Based Categorical Logic Programming
A Brief History of Logic Programming Proof Search in Proof Theory Adjunctions in Categorical Proof Theory Connective Chirality and Search Strategy References
Deriving the Introduction Rule
The unit of the adjunction Ī·:
A ā¼A
ļæ½ļæ½ā(āš„ ā¶ X . A) ā+ā
Also not interchangeable for ā+: lives in the wrong category (Prop(Ī¦ , š„ ā¶ X)).But it can be reindexed along any term-in-context Ī¦ ā¢ š” ā¶ X
ā ā¶ . ā(ā ā¶ . ) ā ā¶ .
( )
OO
[ ā¦ ]
ā( ( ))
OO
, ā¶oo oojj
Ed Morehouse Adjunction Based Categorical Logic Programming
A Brief History of Logic Programming Proof Search in Proof Theory Adjunctions in Categorical Proof Theory Connective Chirality and Search Strategy References
Deriving the Permutation Conversion
Local reductions and expansions are pretty straightforward.
We point out the permutation conversion required for the proof ofnormalizability:
ā ā¶ .
[ ]š ā ā
ā°ā¹ā
ā ā¶ .
[ ]š ā āā° ā
ā
Categorically, this is the forward direction of:
šāÆ ā ā° = (š ā ļæ½ļæ½ā(ā°))āÆ
which is a direct consequence of the nautrality of the bijection of theadjunction.
Ed Morehouse Adjunction Based Categorical Logic Programming
A Brief History of Logic Programming Proof Search in Proof Theory Adjunctions in Categorical Proof Theory Connective Chirality and Search Strategy References
Deriving the Permutation Conversion
Local reductions and expansions are pretty straightforward.
We point out the permutation conversion required for the proof ofnormalizability:
ā ā¶ .
[ ]š ā ā
ā°ā¹ā
ā ā¶ .
[ ]š ā āā° ā
ā
Categorically, this is the forward direction of:
šāÆ ā ā° = (š ā ļæ½ļæ½ā(ā°))āÆ
which is a direct consequence of the nautrality of the bijection of theadjunction.
Ed Morehouse Adjunction Based Categorical Logic Programming
A Brief History of Logic Programming Proof Search in Proof Theory Adjunctions in Categorical Proof Theory Connective Chirality and Search Strategy References
Categorical Sequent Calculus
These ideas extend directly to sequent calculi āclose toā natural deduction.
We have used this to give categorical operational interpretation to Millerāsconnectives as search instructions.
Points to note:
Right rules of right connectives and left rules of left connectives (āeigenrulesā)take adjoint complements, (modulo left context distribution) so are invertible
Most āanderrulesā compose a (co)unit, those for the quantifiers allow us todelay the choice of instantiating term (cf: Coqās āeā-tactics)
Left rule for ā a bit different (incorporates a built-in cut), restricting this leads tovarious (partial) proof search strategies (eg: backward and forward chaining)
Free hyperdoctrine (indexed bicartesian closed category) provides acategorical generic model for proof search
Ed Morehouse Adjunction Based Categorical Logic Programming
A Brief History of Logic Programming Proof Search in Proof Theory Adjunctions in Categorical Proof Theory Connective Chirality and Search Strategy References
Categorical Sequent Calculus
These ideas extend directly to sequent calculi āclose toā natural deduction.
We have used this to give categorical operational interpretation to Millerāsconnectives as search instructions.
Points to note:
Right rules of right connectives and left rules of left connectives (āeigenrulesā)take adjoint complements, (modulo left context distribution) so are invertible
Most āanderrulesā compose a (co)unit, those for the quantifiers allow us todelay the choice of instantiating term (cf: Coqās āeā-tactics)
Left rule for ā a bit different (incorporates a built-in cut), restricting this leads tovarious (partial) proof search strategies (eg: backward and forward chaining)
Free hyperdoctrine (indexed bicartesian closed category) provides acategorical generic model for proof search
Ed Morehouse Adjunction Based Categorical Logic Programming
A Brief History of Logic Programming Proof Search in Proof Theory Adjunctions in Categorical Proof Theory Connective Chirality and Search Strategy References
...4 Connective Chirality and Search Strategy
Ed Morehouse Adjunction Based Categorical Logic Programming
A Brief History of Logic Programming Proof Search in Proof Theory Adjunctions in Categorical Proof Theory Connective Chirality and Search Strategy References
Constructivity of Intuitionistic Logic
Can be understood to mean:
Disjuntion Property
ā¢ A āØ B āŗ ā¢ A or ā¢ B
Existence Property
ā¢ āš„ ā¶ X . A āŗ ā¢ A [š„ā¦š”] for some š” ā¶ X
By analogy, we add:
Falsity Propertyā¢ ā„ āŗ never
which simply expresses consistency.
Ed Morehouse Adjunction Based Categorical Logic Programming
A Brief History of Logic Programming Proof Search in Proof Theory Adjunctions in Categorical Proof Theory Connective Chirality and Search Strategy References
Constructivity of Intuitionistic Logic
Can be understood to mean:
Disjuntion Property
ā¢ A āØ B āŗ ā¢ A or ā¢ B
Existence Property
ā¢ āš„ ā¶ X . A āŗ ā¢ A [š„ā¦š”] for some š” ā¶ X
By analogy, we add:
Falsity Propertyā¢ ā„ āŗ never
which simply expresses consistency.
Ed Morehouse Adjunction Based Categorical Logic Programming
A Brief History of Logic Programming Proof Search in Proof Theory Adjunctions in Categorical Proof Theory Connective Chirality and Search Strategy References
Constructivity of Intuitionistic Logic
In the ā60ās, Kleene and Harrop noticed:
Strong Disjuntion Property: If Ī contains no strictly positive disjunctionthen:
Ī ā¢ A āØ B āŗ Ī ā¢ A or Ī ā¢ B
Strong Existence Property: If Ī contains no strictly positive disjunction orexistential then:
Ī ā¢ āš„ ā¶ X . A āŗ Ī ā¢ A [š„ā¦š”] for some š” ā¶ X
Continuing the analogy:
Strong Falsity Property: If Ī contains no strictly positive ā„ (negation) then:
Ī ā¢ ā„ āŗ never
Ed Morehouse Adjunction Based Categorical Logic Programming
A Brief History of Logic Programming Proof Search in Proof Theory Adjunctions in Categorical Proof Theory Connective Chirality and Search Strategy References
Constructivity of Intuitionistic Logic
In the ā60ās, Kleene and Harrop noticed:
Strong Disjuntion Property: If Ī contains no strictly positive disjunctionthen:
Ī ā¢ A āØ B āŗ Ī ā¢ A or Ī ā¢ B
Strong Existence Property: If Ī contains no strictly positive disjunction orexistential then:
Ī ā¢ āš„ ā¶ X . A āŗ Ī ā¢ A [š„ā¦š”] for some š” ā¶ X
Continuing the analogy:
Strong Falsity Property: If Ī contains no strictly positive ā„ (negation) then:
Ī ā¢ ā„ āŗ never
Ed Morehouse Adjunction Based Categorical Logic Programming
A Brief History of Logic Programming Proof Search in Proof Theory Adjunctions in Categorical Proof Theory Connective Chirality and Search Strategy References
Constructive Sequents
This gives a sufficient condition for the invertibility of right rules of leftconnectives.
Recall that right rules of right connectives are always invertible by the naturalbijections of their adjunctions.
By restricting left connectives to occur only positively on the right and onlynegatively on the left of a sequent we have a system where all right rules areinvertible. We call these āconstructive sequentsā.
This validates the completeness of goal directed search for constructivesequents.
Ed Morehouse Adjunction Based Categorical Logic Programming
A Brief History of Logic Programming Proof Search in Proof Theory Adjunctions in Categorical Proof Theory Connective Chirality and Search Strategy References
Constructive Sequents
This gives a sufficient condition for the invertibility of right rules of leftconnectives.
Recall that right rules of right connectives are always invertible by the naturalbijections of their adjunctions.
By restricting left connectives to occur only positively on the right and onlynegatively on the left of a sequent we have a system where all right rules areinvertible. We call these āconstructive sequentsā.
This validates the completeness of goal directed search for constructivesequents.
Ed Morehouse Adjunction Based Categorical Logic Programming
A Brief History of Logic Programming Proof Search in Proof Theory Adjunctions in Categorical Proof Theory Connective Chirality and Search Strategy References
Hereditarily Harrop Logic
Recursive grammar for constructive sequents
Let š and š¢ be the sets of constructive antecedents (āprogram formulaeā) andconstructive succedents (āgoal formulaeā).
They may be defined by the recursive grammars:
D ā©“ P | ā¤ | D ā§ D | āš„ ā¶ X . D | G ā DG ā©“ P | ā¤ | ā„ | G ā§ G | G āØ G | āš„ ā¶ X . G | āš„ ā¶ X . G | D ā G
where P is the class of atomic propositions.
This is essentially the same as hereditarily Harrop program and goal formula, whichdonāt contain ā¤ and ā„, respectively (the enrichment is of little practical use).
Ed Morehouse Adjunction Based Categorical Logic Programming
A Brief History of Logic Programming Proof Search in Proof Theory Adjunctions in Categorical Proof Theory Connective Chirality and Search Strategy References
Hereditarily Harrop Logic
Recursive grammar for constructive sequents
Let š and š¢ be the sets of constructive antecedents (āprogram formulaeā) andconstructive succedents (āgoal formulaeā).
They may be defined by the recursive grammars:
D ā©“ P | ā¤ | D ā§ D | āš„ ā¶ X . D | G ā DG ā©“ P | ā¤ | ā„ | G ā§ G | G āØ G | āš„ ā¶ X . G | āš„ ā¶ X . G | D ā G
where P is the class of atomic propositions.
This is essentially the same as hereditarily Harrop program and goal formula, whichdonāt contain ā¤ and ā„, respectively (the enrichment is of little practical use).
Ed Morehouse Adjunction Based Categorical Logic Programming
A Brief History of Logic Programming Proof Search in Proof Theory Adjunctions in Categorical Proof Theory Connective Chirality and Search Strategy References
Goal Directed Search for Atoms
Recall only right propositions may occur positively in constructive contexts(antecedents)
Positive occurrences of right connectives can be rewritten by the naturalbijection of their adjunction
In particular, constructive contexts can be rewritten with the propositions instrictly positive position all atoms
This allows a strategy of goal directed search for atoms
Ed Morehouse Adjunction Based Categorical Logic Programming
A Brief History of Logic Programming Proof Search in Proof Theory Adjunctions in Categorical Proof Theory Connective Chirality and Search Strategy References
Backward Chaining
š„ ā¶ Xš„ ā¶ X
Ī ā¹ G(P Ļ = PĻ)Ī , P ā¹ P
šššš”
Ī , G ā P ā¹ PāL
ā® āL
Ī , āļæ½ļæ½ ā¶ X . G ā P ā¹ PāL
Ī ā¹ P šLā® āR
Categorically, this corresponds to pre-composing an arrow named by a programclause with a derivation of an instance of the goal.
Ed Morehouse Adjunction Based Categorical Logic Programming
A Brief History of Logic Programming Proof Search in Proof Theory Adjunctions in Categorical Proof Theory Connective Chirality and Search Strategy References
References..
Andrea Asperti and Simone Martini. āProjections Instead of Variables: acategory theoretic interpretation of logic programsā. In: InternationalConference for Logic Programming. MIT Press, 1989.Roy Dyckhoff. āContraction-Free Sequent Calculi for Intuitionistic Logicā.In: Journal of Symbolic Logic 57.3 (1992), pp. 795ā807.Roy Dyckhoff and LuĆs Pinto. āUniform Proofs and Natural Deductionsā.In: International Conference on Automated Deduction. 1994.Roy Dyckhoff and LuĆs Pinto. A Permutation-Free Sequent Calculus forIntuitionistic Logic. Tech. rep. St. Andrews University, 1996.Richard Garner. āTwo-Dimensional Models of Type Theoryā. In:Mathematical Structures in Computer Science 19.4 (2009), 687ā736.url: http://arxiv.org/abs/0808.2122v2.Neil Ghani. āAdjoint Rewritingā. PhD thesis. University of Edinburgh,1995.James Harland. āA Proof-theoretic Analysis of Goal-directed Provabilityā.In: Journal of Logic and Computation 4.1 (1994), pp. 69ā88.Jacob Howe. āProof Search Issues in Some Non-Classical Logicsā.PhD thesis. University of St. Andrews, 1998.Joachim Lambek and Philip Scott. Introduction to Higher OrderCategorical Logic. Cambridge University Press, 1986.F. William Lawvere. āAdjointness in Foundationsā. In: Dialectica 23(1969).Dale Miller. āA Logical Analysis of Modules in Logic Programmingā. In:Journal of Logic Programming 6 (1989), pp. 79ā108.Dale Miller et al. āUniform Proofs as a Foundation for LogicProgrammingā. In: Annals of Pure and Applied Logic 51 (1991).Dag Prawitz. Natural Deduction: A Proof-Theoretical Study . StockholmStudies in Philosophy 3. Almqvist and Wiksell, 1965.Robert Seely. āHyperdoctrines, Natural Deduction and the BeckConditionā. In: Zeitscrift fĆ¼r Mathematische Logik und Grundlagen derMathematik (1983).Robert J. Simmons. āStructural Focalizationā. In: (2012).
Ed Morehouse Adjunction Based Categorical Logic Programming