Introduction Sequent calculus Natural deduction Results Preliminaries Vector notation Recall M , N ::= λ x . M (1st form) x � | (2nd form) N ( λ x . M ) N � | N (3rd form) Relaxed vector notation: 3rd form becomes M � N This introduces the need for vector bookkeeping M [] = M ( x � Q ) N � x ( � QN � N = N ) ( P � Q ) N � P ( � QN � N = N )
Introduction Sequent calculus Natural deduction Results Preliminaries A variant of Parigot’s λµ -calculus...
Introduction Sequent calculus Natural deduction Results Preliminaries A variant of Parigot’s λµ -calculus... ... called λµ -calculus
Introduction Sequent calculus Natural deduction Results Preliminaries A variant of Parigot’s λµ -calculus... ... called λµ -calculus ... whose management of sequents’ RHS we want to “dualize”
Introduction Sequent calculus Natural deduction Results Preliminaries A variant of Parigot’s λµ -calculus... ... called λµ -calculus ... whose management of sequents’ RHS we want to “dualize” Control points M ˆ a , where a , b , · · · are co-variables Control operator µ a . M
Introduction Sequent calculus Natural deduction Results Preliminaries A variant of Parigot’s λµ -calculus... ... called λµ -calculus ... whose management of sequents’ RHS we want to “dualize” Control points M ˆ a , where a , b , · · · are co-variables Control operator µ a . M Control operation: if C = ([ · ] N 1 · · · N m )ˆ b C [ µ a . M ] → [ C / a ] M
Introduction Sequent calculus Natural deduction Results Preliminaries A variant of Parigot’s λµ -calculus... ... called λµ -calculus ... whose management of sequents’ RHS we want to “dualize” Control points M ˆ a , where a , b , · · · are co-variables Control operator µ a . M Control operation: if C = ([ · ] N 1 · · · N m )ˆ b C [ µ a . M ] → [ C / a ] M Context substitution (rather than “structural substitution”) a ) = C [ M ′ ] where M ′ = [ C / a ] M [ C / a ]( M ˆ
Introduction Sequent calculus Natural deduction Results The λ ˜ µ -calculus Syntax of proof expressions
Introduction Sequent calculus Natural deduction Results The λ ˜ µ -calculus Syntax of proof expressions (Terms) t , u , v ::= λ x . t (1st form) | x ˆ k (2nd form, co-control point) | tk (3rd form) (Generalized vectors) ::= [] (empty vector) k | µ x . v ˜ (co-control operator) | u :: k (vector constructor)
Introduction Sequent calculus Natural deduction Results The λ ˜ µ -calculus Typing Recall (terms) t , u , v ::= λ x . t | x ˆ k | tk (gen. vectors) ::= [] | ˜ µ x . t | u :: k k
Introduction Sequent calculus Natural deduction Results The λ ˜ µ -calculus Typing Recall (terms) t , u , v ::= λ x . t | x ˆ k | tk (gen. vectors) ::= [] | ˜ µ x . t | u :: k k Sequents Γ ⊢ t : A and Γ | A ⊢ k : A
Introduction Sequent calculus Natural deduction Results The λ ˜ µ -calculus Typing Recall (terms) t , u , v ::= λ x . t | x ˆ k | tk (gen. vectors) ::= [] | ˜ µ x . t | u :: k k Sequents Γ ⊢ t : A and Γ | A ⊢ k : A Typing/inference rules Cut Γ ⊢ t : A Γ | A ⊢ k : B Ax Γ | A ⊢ [] : A Γ ⊢ tk : B Pass Γ , x : A | A ⊢ k : B Act Γ , x : A ⊢ v : B Γ , x : A ⊢ x ˆ k : B Γ | A ⊢ ˜ µ x . v : B ⊃ L Γ ⊢ u : A Γ | B ⊢ k : C Γ , x : A ⊢ t : B ⊃ R Γ ⊢ λ x . t : A ⊃ B Γ | A ⊃ B ⊢ u :: k : C
Introduction Sequent calculus Natural deduction Results The λ ˜ µ -calculus Derived syntax
Introduction Sequent calculus Natural deduction Results The λ ˜ µ -calculus Derived syntax Concatenation of two generalized vectors k @ k ′ []@ k ′ = k ′ ( u :: k )@ k ′ = u :: ( k @ k ′ ) (˜ µ x . t )@ k ′ = µ x . tk ′ ˜
Introduction Sequent calculus Natural deduction Results The λ ˜ µ -calculus Derived syntax: co-continuations
Introduction Sequent calculus Natural deduction Results The λ ˜ µ -calculus Derived syntax: co-continuations Recall (terms) t , u , v ::= λ x . t | x ˆ k | tk (gen. vectors) ::= [] | ˜ µ x . t | u :: k k
Introduction Sequent calculus Natural deduction Results The λ ˜ µ -calculus Derived syntax: co-continuations Recall (terms) t , u , v ::= λ x . t | x ˆ k | tk (gen. vectors) ::= [] | ˜ µ x . t | u :: k k Co-continuations H ::= x ˆ[ · ] | t ([ · ]) | H [ u :: [ · ]] Hence co-continuations have the forms x ˆ( u 1 :: · · · :: u m :: [ · ]) or t ( u 1 :: · · · :: u m :: [ · ]) ( m ≥ 0) that is, a non-abstraction with a hole at the right end hole expects a vector
Introduction Sequent calculus Natural deduction Results The λ ˜ µ -calculus Derived syntax: co-continuations Recall (terms) t , u , v ::= λ x . t | x ˆ k | tk (gen. vectors) ::= [] | ˜ µ x . t | u :: k k Co-continuations H ::= x ˆ[ · ] | t ([ · ]) | H [ u :: [ · ]] Hence co-continuations have the forms x ˆ( u 1 :: · · · :: u m :: [ · ]) or t ( u 1 :: · · · :: u m :: [ · ]) ( m ≥ 0) that is, a non-abstraction with a hole at the right end hole expects a vector Co-continuation substitution [ H / x ] t and [ H / x ] k [ H / x ]( x ˆ k ) = H [ k ′ ] with k ′ = [ H / x ] k
Introduction Sequent calculus Natural deduction Results The λ ˜ µ -calculus Reduction Recall (terms) t , u , v ::= λ x . t | x ˆ k | tk (gen. vectors) k ::= [] | ˜ µ x . t | u :: k
Introduction Sequent calculus Natural deduction Results The λ ˜ µ -calculus Reduction Recall (terms) t , u , v ::= λ x . t | x ˆ k | tk (gen. vectors) k ::= [] | ˜ µ x . t | u :: k Reduction rules ( β ) ( λ x . t )( u :: k ) → ( u (˜ µ x . t )) k (˜ µ ) H [˜ µ x . t ] → [ H / x ] t ( ǫ ) t [] → t ( π 1 ) ( x ˆ k ) k ′ → x ˆ( k @ k ′ ) ( π 2 ) ( tk ) k ′ → t ( k @ k ′ )
Introduction Sequent calculus Natural deduction Results The λ ˜ µ -calculus Reduction Recall (terms) t , u , v ::= λ x . t | x ˆ k | tk (gen. vectors) k ::= [] | ˜ µ x . t | u :: k Reduction rules ( β ) ( λ x . t )( u :: k ) → ( u (˜ µ x . t )) k (˜ µ ) H [˜ µ x . t ] → [ H / x ] t ( ǫ ) t [] → t ( π 1 ) ( x ˆ k ) k ′ → x ˆ( k @ k ′ ) ( π 2 ) ( tk ) k ′ → t ( k @ k ′ ) Interp: formal vector notation with first-class co-control β : function call µ : co-control operation ˜ ǫ and π i : vector bookkeeping in relaxed vector notation
Introduction Sequent calculus Natural deduction Results The λ ˜ µ -calculus Reduction Recall the ˜ µ -rule: H [˜ µ x . t ] → [ H / x ] t
Introduction Sequent calculus Natural deduction Results The λ ˜ µ -calculus Reduction Recall the ˜ µ -rule: H [˜ µ x . t ] → [ H / x ] t Partition of ˜ µ ( ρ ) y ˆ(˜ µ x . t ) → [ y ˆ([ · ]) / x ] t ( σ ) t (˜ µ x . t ) → [ t ([ · ]) / x ] t ( τ ) H [ u :: ˜ µ x . t ] → [ H [ u :: [ · ]] / x ] t
Introduction Sequent calculus Natural deduction Results The λ ˜ µ -calculus Reduction Recall the ˜ µ -rule: H [˜ µ x . t ] → [ H / x ] t Partition of ˜ µ ( ρ ) y ˆ(˜ µ x . t ) → [ y ˆ([ · ]) / x ] t ( σ ) t (˜ µ x . t ) → [ t ([ · ]) / x ] t ( τ ) H [ u :: ˜ µ x . t ] → [ H [ u :: [ · ]] / x ] t Logical procedures cut-elimination β, σ, ǫ, π µ -elimination = co-control ˜ ρ, τ, σ permutation τ, σ, ǫ, π focalization ρ, τ
Introduction Sequent calculus Natural deduction Results NATURAL DEDUCTION
Introduction Sequent calculus Natural deduction Results Preliminaries Developing natural deduction
Introduction Sequent calculus Natural deduction Results Preliminaries Developing natural deduction Bidirectional syntax
Introduction Sequent calculus Natural deduction Results Preliminaries Developing natural deduction Bidirectional syntax Let-expressions (“Lets” vs cuts) Lets vs explicit substitutions
Introduction Sequent calculus Natural deduction Results Preliminaries Developing natural deduction Bidirectional syntax Let-expressions (“Lets” vs cuts) Lets vs explicit substitutions Isomorphic to sequent calculus
Introduction Sequent calculus Natural deduction Results The system Syntax of proof terms of λ let
Introduction Sequent calculus Natural deduction Results The system Syntax of proof terms of λ let (Terms) M , N , P ::= λ x . M (abstraction) | app( H ) (applicative term) | let x := H in P (let-expression) (Heads) ::= (variable) H x | hd( M ) (head term) | HN (application)
Introduction Sequent calculus Natural deduction Results The system Typing in λ let Recall (Terms) M , N , P ::= λ x . M | app( H ) | let x := H in P (Heads) ::= x | hd( M ) | HN H
Introduction Sequent calculus Natural deduction Results The system Typing in λ let Recall (Terms) M , N , P ::= λ x . M | app( H ) | let x := H in P (Heads) ::= x | hd( M ) | HN H Sequents Γ ⊢ M : A and Γ ⊲ H : A
Introduction Sequent calculus Natural deduction Results The system Typing in λ let Recall (Terms) M , N , P ::= λ x . M | app( H ) | let x := H in P (Heads) ::= x | hd( M ) | HN H Sequents Γ ⊢ M : A and Γ ⊲ H : A Rules Γ ⊲ H : A Γ , x : A ⊢ P : B Γ , x : A ⊲ x : A Hyp Let Γ ⊢ let x := H in P : B Γ ⊲ H : A Γ ⊢ M : A Γ ⊢ app( H ) : A WCoercion Γ ⊲ hd( M ) : A SCoercion Γ , x : A ⊢ M : B Γ ⊲ H : A ⊃ B Γ ⊢ N : A Γ ⊢ λ x . M : A ⊃ B Intro Elim Γ ⊲ HN : B
Introduction Sequent calculus Natural deduction Results The system Derived syntax Recall (Terms) M , N , P ::= λ x . M | app( H ) | let x := H in P (Heads) H ::= x | hd( M ) | HN
Introduction Sequent calculus Natural deduction Results The system Derived syntax Recall (Terms) M , N , P ::= λ x . M | app( H ) | let x := H in P (Heads) H ::= x | hd( M ) | HN Continuations K ::= app([ · ]) | let x := [ · ] in P | K [[ · ] N ] Hence co-continuations have the forms app([ · ] N 1 · · · N m ) or let x := [ · ] N 1 · · · N m in P ( m ≥ 0) that is, a non-abstraction with a hole at the left end hole expects a head
Introduction Sequent calculus Natural deduction Results The system Reduction in λ let Recall (Terms) M , N , P ::= λ x . M | app( H ) | let x := H in P (Heads) ::= x | hd( M ) | HN H
Introduction Sequent calculus Natural deduction Results The system Reduction in λ let Recall (Terms) M , N , P ::= λ x . M | app( H ) | let x := H in P (Heads) ::= x | hd( M ) | HN H Rules (beta) hd( λ x . M ) N → hd(let x := hd( N ) in M ) (let) let x := H in P → [ H / x ] P (triv) app(hd( M )) → M (head 1 ) hd(app( H )) → H (head 2 ) K [hd(let x := H in P )] → let x := H in K [hd( P )]
Introduction Sequent calculus Natural deduction Results The system Reduction in λ let Recall (Terms) M , N , P ::= λ x . M | app( H ) | let x := H in P (Heads) ::= x | hd( M ) | HN H Rules (beta) hd( λ x . M ) N → hd(let x := hd( N ) in M ) (let) let x := H in P → [ H / x ] P (triv) app(hd( M )) → M (head 1 ) hd(app( H )) → H (head 2 ) K [hd(let x := H in P )] → let x := H in K [hd( P )] Comments: bidirectional, agnostic, computational λ -calculus
Introduction Sequent calculus Natural deduction Results Mapping sequent calculus
Introduction Sequent calculus Natural deduction Results Mapping sequent calculus Map Θ : λ ˜ µ → λ let x ˆ( u 1 :: · · · u m :: []) �→ app( xN 1 · · · N m ) x ˆ( u 1 :: · · · u m :: ˜ µ y . v ) �→ let y := ( xN 1 · · · N m ) in P t ( u 1 :: · · · u m :: []) �→ app(hd( M ) N 1 · · · N m ) t ( u 1 :: · · · u m :: ˜ µ y . v ) �→ let y := (hd( M ) N 1 · · · N m ) in P Replace each left-introduction by an elimination
Introduction Sequent calculus Natural deduction Results Mapping sequent calculus Map Θ : λ ˜ µ → λ let x ˆ( u 1 :: · · · u m :: []) �→ app( xN 1 · · · N m ) x ˆ( u 1 :: · · · u m :: ˜ µ y . v ) �→ let y := ( xN 1 · · · N m ) in P t ( u 1 :: · · · u m :: []) �→ app(hd( M ) N 1 · · · N m ) t ( u 1 :: · · · u m :: ˜ µ y . v ) �→ let y := (hd( M ) N 1 · · · N m ) in P Replace each left-introduction by an elimination Inversion of the associativity of non-abstractions
Introduction Sequent calculus Natural deduction Results Mapping sequent calculus Map Θ : λ ˜ µ → λ let x ˆ( u 1 :: · · · u m :: []) �→ app( xN 1 · · · N m ) x ˆ( u 1 :: · · · u m :: ˜ µ y . v ) �→ let y := ( xN 1 · · · N m ) in P t ( u 1 :: · · · u m :: []) �→ app(hd( M ) N 1 · · · N m ) t ( u 1 :: · · · u m :: ˜ µ y . v ) �→ let y := (hd( M ) N 1 · · · N m ) in P
Introduction Sequent calculus Natural deduction Results Mapping sequent calculus Map Θ : λ ˜ µ → λ let x ˆ( u 1 :: · · · u m :: []) �→ app( xN 1 · · · N m ) x ˆ( u 1 :: · · · u m :: ˜ µ y . v ) �→ let y := ( xN 1 · · · N m ) in P t ( u 1 :: · · · u m :: []) �→ app(hd( M ) N 1 · · · N m ) t ( u 1 :: · · · u m :: ˜ µ y . v ) �→ let y := (hd( M ) N 1 · · · N m ) in P Proof expressions of λ ˜ µ as instructions to build λ let proofs �→ K [hd( M )] where t �→ M and k �→ K tk x ˆ k �→ K [ x ] where k �→ K u :: k �→ K [[ · ] N ] where u �→ N and k �→ K µ x . v ˜ �→ let x := [ · ] in P where v �→ P [] �→ app([ · ])
Introduction Sequent calculus Natural deduction Results RESULTS
Introduction Sequent calculus Natural deduction Results Results Isomorphism
Introduction Sequent calculus Natural deduction Results Results Isomorphism µ ∼ Isomorphism Θ : λ ˜ = λ let
Introduction Sequent calculus Natural deduction Results Results Isomorphism µ ∼ Isomorphism Θ : λ ˜ = λ let Bijections of syntactic classes terms terms t M gen. vectors k K continuations co-continuations H heads H
Introduction Sequent calculus Natural deduction Results Results Isomorphism µ ∼ Isomorphism Θ : λ ˜ = λ let Bijections of syntactic classes terms terms t M gen. vectors k K continuations co-continuations H heads H Remark: exchange of primitive/derived concepts
Introduction Sequent calculus Natural deduction Results Results Isomorphism µ ∼ Isomorphism Θ : λ ˜ = λ let Bijections of syntactic classes terms terms t M gen. vectors k K continuations co-continuations H heads H Remark: exchange of primitive/derived concepts Isomorphism of reduction relations β beta µ ˜ let ǫ triv π head
Introduction Sequent calculus Natural deduction Results Results Curry Howard at last
Introduction Sequent calculus Natural deduction Results Results Curry Howard at last The two faces of the coin: Internal interpretation: formal vector notation with first-class co-control External interpretation: bidirectional, agnostic, computational λ -calculus
Introduction Sequent calculus Natural deduction Results Results Curry Howard at last The two faces of the coin: Internal interpretation: formal vector notation with first-class co-control External interpretation: bidirectional, agnostic, computational λ -calculus Example: expression x ˆ k Internal interpretation: co-control point, fill k in the hole of the co-continuation H that will substitute x
Introduction Sequent calculus Natural deduction Results Results Curry Howard at last The two faces of the coin: Internal interpretation: formal vector notation with first-class co-control External interpretation: bidirectional, agnostic, computational λ -calculus Example: expression x ˆ k Internal interpretation: co-control point, fill k in the hole of the co-continuation H that will substitute x External interpretation: fill head x in the hole of continuation K , where K = Θ k - an instruction for the construction of a λ let derivation ( fill x in k better notation for this reading)
Introduction Sequent calculus Natural deduction Results Results Curry Howard at last The two faces of the coin: Internal interpretation: formal vector notation with first-class co-control External interpretation: bidirectional, agnostic, computational λ -calculus Example: expression x ˆ k Internal interpretation: co-control point, fill k in the hole of the co-continuation H that will substitute x External interpretation: fill head x in the hole of continuation K , where K = Θ k - an instruction for the construction of a λ let derivation ( fill x in k better notation for this reading) Example: β -rule ( λ x . t )( u :: k ) → ( u (˜ µ x . t )) k Internal interpretation: β -rule of a relaxed vector notation
Introduction Sequent calculus Natural deduction Results Results Curry Howard at last The two faces of the coin: Internal interpretation: formal vector notation with first-class co-control External interpretation: bidirectional, agnostic, computational λ -calculus Example: expression x ˆ k Internal interpretation: co-control point, fill k in the hole of the co-continuation H that will substitute x External interpretation: fill head x in the hole of continuation K , where K = Θ k - an instruction for the construction of a λ let derivation ( fill x in k better notation for this reading) Example: β -rule ( λ x . t )( u :: k ) → ( u (˜ µ x . t )) k Internal interpretation: β -rule of a relaxed vector notation External interpretation: rule beta of λ let written in the notation of instructions that λ ˜ µ is
Introduction Sequent calculus Natural deduction Results Results More Results
Introduction Sequent calculus Natural deduction Results Results More Results Studying forgetful/desugaring maps λ let → λ one gets strong normalization of λ let, hence of λ ˜ µ
Introduction Sequent calculus Natural deduction Results Results More Results Studying forgetful/desugaring maps λ let → λ one gets strong normalization of λ let, hence of λ ˜ µ termination of the let rule, hence of ˜ µ rule of λ ˜ µ
Introduction Sequent calculus Natural deduction Results Results More Results Studying forgetful/desugaring maps λ let → λ one gets strong normalization of λ let, hence of λ ˜ µ termination of the let rule, hence of ˜ µ rule of λ ˜ µ the latter gives a focalization result: every t ∈ λ ˜ µ has a unique µ -nf (which is a LJT proof, if t is typable) ˜
Introduction Sequent calculus Natural deduction Results Results More Results Studying forgetful/desugaring maps λ let → λ one gets strong normalization of λ let, hence of λ ˜ µ termination of the let rule, hence of ˜ µ rule of λ ˜ µ the latter gives a focalization result: every t ∈ λ ˜ µ has a unique µ -nf (which is a LJT proof, if t is typable) ˜ Agnosticism theorem
Introduction Sequent calculus Natural deduction Results Results More Results Studying forgetful/desugaring maps λ let → λ one gets strong normalization of λ let, hence of λ ˜ µ termination of the let rule, hence of ˜ µ rule of λ ˜ µ the latter gives a focalization result: every t ∈ λ ˜ µ has a unique µ -nf (which is a LJT proof, if t is typable) ˜ Agnosticism theorem take the s.c. characterization of CBN and CBV...
Introduction Sequent calculus Natural deduction Results Results More Results Studying forgetful/desugaring maps λ let → λ one gets strong normalization of λ let, hence of λ ˜ µ termination of the let rule, hence of ˜ µ rule of λ ˜ µ the latter gives a focalization result: every t ∈ λ ˜ µ has a unique µ -nf (which is a LJT proof, if t is typable) ˜ Agnosticism theorem take the s.c. characterization of CBN and CBV... obtain the isomorphic characterization in n.d...
Introduction Sequent calculus Natural deduction Results Results More Results Studying forgetful/desugaring maps λ let → λ one gets strong normalization of λ let, hence of λ ˜ µ termination of the let rule, hence of ˜ µ rule of λ ˜ µ the latter gives a focalization result: every t ∈ λ ˜ µ has a unique µ -nf (which is a LJT proof, if t is typable) ˜ Agnosticism theorem take the s.c. characterization of CBN and CBV... obtain the isomorphic characterization in n.d... and see how CBN and CBV are superimposed in λ let
Introduction Sequent calculus Natural deduction Results Results More Results Studying forgetful/desugaring maps λ let → λ one gets strong normalization of λ let, hence of λ ˜ µ termination of the let rule, hence of ˜ µ rule of λ ˜ µ the latter gives a focalization result: every t ∈ λ ˜ µ has a unique µ -nf (which is a LJT proof, if t is typable) ˜ Agnosticism theorem take the s.c. characterization of CBN and CBV... obtain the isomorphic characterization in n.d... and see how CBN and CBV are superimposed in λ let “Co-control theorem” given that the let rule is isomorphic to the ˜ µ rule...
Introduction Sequent calculus Natural deduction Results Results More Results Studying forgetful/desugaring maps λ let → λ one gets strong normalization of λ let, hence of λ ˜ µ termination of the let rule, hence of ˜ µ rule of λ ˜ µ the latter gives a focalization result: every t ∈ λ ˜ µ has a unique µ -nf (which is a LJT proof, if t is typable) ˜ Agnosticism theorem take the s.c. characterization of CBN and CBV... obtain the isomorphic characterization in n.d... and see how CBN and CBV are superimposed in λ let “Co-control theorem” given that the let rule is isomorphic to the ˜ µ rule... one understands why co-control is almost invisible in n.d.
Introduction Sequent calculus Natural deduction Results Results Duality
Introduction Sequent calculus Natural deduction Results Results Duality Are control and co-control related by classical duality?
Introduction Sequent calculus Natural deduction Results Results Duality Are control and co-control related by classical duality? Not within classical sequent calculus!
Recommend
More recommend