Constructive Proofs of Completeness, Extra-intuitionistic Principles, and Delimited Control Operators Danko Ilik based on work with Hugo Herbelin Lyon, January 6, 2011
Completeness Proofs as Programs Research theme Definition (Completeness) φ is true iff φ is provable Application: � Automatic switching between model theoretic and proof theoretic reasoning (in Coq) Theoretical questions: � Algorithm behind Gödel’s completeness proof � Normalisation-by-evaluation for classical logic � Constructive proof of completeness for Kripke models
Talk Outline Constructive Completeness for Intuitionistic Logic Delimited Control Operators in Logic
Talk Outline Constructive Completeness for Intuitionistic Logic Delimited Control Operators in Logic
Constructive Completeness for Intuitionistic Logic Kinds of semantics: � Reformulation of derivation rules: BHK, Kleene’s realisability, Algebraic semantics � More independent: Beth, Kripke � cf. Boolean semantics and classical derivation systems Completeness for Kripke semantics: � Gödel-Kreisel’s meta-mathematical results (Kreisel 1962) � Classical Henkin-style proof (Kripke 1965) � Proof using the Fan Theorem (Veldman 1976) � Normalisation-by-evaluation gives a proof, but without ∨ , ∃
Gödel-Kreisel’s Meta-mathematical Results Strong Completeness, Weak Completeness, Markov’s Principle, and Double-negation Shift for Σ 0 1 -formulae ( ∀ M . M � φ ) − → ⊢ φ (SC) �⊢ φ − → ¬ ( ∀ M . M � φ ) (WC) For A 0 -decidable, ¬¬∃ nA 0 ( n ) → ∃ nA 0 ( n ), (MP) (DNS Σ ∀ α ¬¬∃ nA 0 ( α , n ) → ∀ α ∃ nA 0 ( α , n ), + ) (DNS Σ ) ∀ α ¬¬∃ nA 0 ( α , n ) → ¬¬∀ α ∃ nA 0 ( α , n ), Theorem (Gödel-Kreisel) � MP + WC → SC � SC → DNS Σ + → MP � WC → DNS Σ
Kripke Models Start with a structure K = ( K , ≤ , D , � , � ⊥ ), where ≤ is a partial order on K , and extend � to non-atomic formulas: w � A ∧ B w � A and w � B A ∨ B w � A or w � B A → B for any w ′ ≥ w , if w ′ � A then w ′ � B ∀ xP ( x ) for any w ′ ≥ w and any a ∈ D ( w ′ ), w ′ � P ( a ) ∃ xP ( x ) there is a ∈ D ( w ) such that w � P ( a ) ⊥ w � ⊥
Kripke Models Completeness Theorem (Completeness) ( ∀ K . ∀ w ∈ K . w � Γ → w � A ) − → Γ ⊢ A Prove the more general: Theorem (Completeness for U ) There is a so called “universal” model U such that ∀ Γ ∈ U . Γ � A − → Γ ⊢ A Proof. U : = ( U , ≤ , � , � ⊥ ), where � U is the set of contexts, assigning formulas to free variables � Γ 1 ≤ Γ 2 : = Γ 1 ⊆ Γ 2 � Γ � P : = Γ ⊢ P � Γ � ⊥ : = Γ � ⊥
Kripke Models Completeness - Veldman’s Proof For full intuitionistic logic – with ∨ and ∃ – Veldman used the Fan Theorem: ( ∀ α . ∃ n . A ( α n ) → ∃ N . ∀ α . ∃ k ≤ N . A ( α k ) (FAN) where α : N → 2 n , k , N : N α n : 2 ∗ and A is decidable i.e. A : 2 ∗ → 2
Kripke Models Normalisation-by-evaluation as Completeness Theorem (Completeness for U ) There is a so called “universal” model U such that ∀ Γ ∈ U . Γ � A − → Γ ⊢ A is a special case of Berger-Schwichtenberg’s – but without ∨ , ∃ Theorem (Normalisation-by-evaluation) → Γ ⊢ nf A ↓ A Γ (" reify ") : Γ � A − Γ (" reflect ") : Γ ⊢ ne A − ↑ A → Γ � A ↓ τ : = a �→ a τ -atomic ↓ τ → σ : = S �→ λ a . ↓ σ · ( S · ↑ τ · a ) a -fresh ↑ τ : = a �→ a τ -atomic ↑ τ → σ : = e �→ S �→↑ σ · ( e ( ↓ τ · S ))
Completeness/NBE for λ →∨ What the problem is Theorem (NBE) → Γ ⊢ nf A ↓ A Γ (" reify ") : Γ � A − Γ (" reflect ") : Γ ⊢ ne A − ↑ A → Γ � A Proof of case ↑ A ∨ B . Given a derivation Γ ⊢ ne A ∨ B , decide: Γ � A or Γ � B ?
Shift ( S ) and Reset (#) Delimited Control Operators Examples # V → V # F [ S k . p ] → # p { k : = λ x .# F [ x ]}
Shift ( S ) and Reset (#) Delimited Control Operators Examples # V → V # F [ S k . p ] → # p { k : = λ x .# F [ x ]} 1 + #(2 + S k . k ( k 4)) → 1 + #(( λ a .#(2 + a ))(( λ a .#(2 + a ))4)) → + 1 + #(#(#8)) → + 9
Completeness/NBE for λ →∨ Solution of Danvy: use shift and reset Theorem (NBE – Danvy) → Γ ⊢ nf A ↓ A Γ (" reify ") : Γ � A − Γ (" reflect ") : Γ ⊢ ne A − ↑ A → Γ � A Proof of case ↑ A ∨ B . Given a derivation ❡ of Γ ⊢ ne A ∨ B , decide: Γ � A or Γ � B , by S k . ❝❛s❡ ❡ ♦❢ ( ① .# k (left ↑ A ① : A , Γ ① )) ( ② .# k (right ↑ B ② : B , Γ ② ))
Completeness/NBE for λ →∨ Solution of Danvy: is it a proof? � We are convinced the program computes correctly � There should be a corresponding completeness proof for Kripke model � Type-and-effect system: types A → B become A / α → B / β , what is the logical meaning?
Completeness for Intuitionistic Predicate Logic (IQC) Extracting a notion of model from Danvy’s solution Like with Kripke models, start with a structure ( K , ≤ , D , � s , � ( · ) ⊥ ), and extend strong forcing ( � s ) to non-atomic formulas: w � s A ∧ B w � A and w � B A ∨ B w � A or w � B A → B for any w ′ ≥ w , if w ′ � A then w ′ � B ∀ xP ( x ) for any w ′ ≥ w and any a ∈ D ( w ′ ), w ′ � P ( a ) ∃ xP ( x ) there is a ∈ D ( w ) such that w � P ( a ) where the non-s-annotated � is (non-strong) forcing : w � A : = ∀ C . ∀ w 1 ≥ w .( ∀ w 2 ≥ w 1 . w 2 � s A → w 2 � C ⊥ ) → w 1 � C ⊥
Completeness for IQC via Kripke-style Models Theorem (NBE) → Γ ⊢ nf A ↓ A Γ (" reify ") : Γ � A − Γ (" reflect ") : Γ ⊢ ne A − ↑ A → Γ � A Proof of case ↑ A ∨ B . Given a derivation ❡ of Γ ⊢ ne A ∨ B , prove Γ � A ∨ B i.e. ∀ C . ∀ Γ 1 ≥ Γ . ( ∀ Γ 2 ≥ Γ 1 . Γ 2 � S A or Γ 2 � s B → Γ 2 ⊢ C ⊥ ) → Γ 1 ⊢ C ⊥ by C �→ Γ 1 �→ k �→ ❝❛s❡ ❡ ♦❢ ( ① . k (left ↑ A ① : A , Γ 1 ① )) ( ② . k (right ↑ B ② : B , Γ 1 ② ))
Conclusion of Part I Contribution: � New notion of model for Intuitionistic logic � β -Normalises λ -calculus with sum � Formalised in Coq � But, not as simple as Kripke models More details in my thesis: ✇✇✇✳❧✐①✳♣♦❧②t❡❝❤♥✐q✉❡✳❢r✴ ∼ ❞❛♥❦♦
Talk Outline Constructive Completeness for Intuitionistic Logic Delimited Control Operators in Logic
Delimited control operators in Logic � Should allow us to give a constructive proof of completeness for Kripke semantics (Danvy’s NBE functional program) � Herbelin: delimited control allows to derive Markov’s Principle (Herbelin 2010) and the Double Negation Shift � Allow to simulate any monadic computational effect (Filinski 1994)
❝❛s❡ ♦❢ ❞❡st ❛s ✐♥ ❝❛s❡ ♦❢ ❞❡st ❛s ✐♥ Proof term λ -calculus with S and # Proof terms: � � p , q , r :: = a | ι 1 p | ι 2 p | ❝❛s❡ p ♦❢ a . q � b . r | ( p , q ) | π 1 p | π 2 p | λ a . p | | pq | λ x . p | pt | ( t , p ) | ❞❡st p ❛s ( x . a ) ✐♥ q | # p | S k . p
❝❛s❡ ♦❢ ❞❡st ❛s ✐♥ ❝❛s❡ ♦❢ ❞❡st ❛s ✐♥ Proof term λ -calculus with S and # Proof terms: � � p , q , r :: = a | ι 1 p | ι 2 p | ❝❛s❡ p ♦❢ a . q � b . r | ( p , q ) | π 1 p | π 2 p | λ a . p | | pq | λ x . p | pt | ( t , p ) | ❞❡st p ❛s ( x . a ) ✐♥ q | # p | S k . p Values: V :: = a | ι 1 V | ι 2 V | ( V , V ) | ( t , V ) | λ a . p | λ x . p
❝❛s❡ ♦❢ ❞❡st ❛s ✐♥ Proof term λ -calculus with S and # Proof terms: � � p , q , r :: = a | ι 1 p | ι 2 p | ❝❛s❡ p ♦❢ a . q � b . r | ( p , q ) | π 1 p | π 2 p | λ a . p | | pq | λ x . p | pt | ( t , p ) | ❞❡st p ❛s ( x . a ) ✐♥ q | # p | S k . p Values: V :: = a | ι 1 V | ι 2 V | ( V , V ) | ( t , V ) | λ a . p | λ x . p Pure evaluation contexts: � � P :: = [ ] | ❝❛s❡ P ♦❢ | π 1 P | π 2 P | ❞❡st P ❛s ( x . a ) ✐♥ p | a 1 . p 1 � a 2 . p 2 Pq | ( λ a . q ) P | Pt | ι 1 P | ι 2 P | ( P , p ) | ( V , P ) | ( t , P )
Proof term λ -calculus with S and # Proof terms: � � p , q , r :: = a | ι 1 p | ι 2 p | ❝❛s❡ p ♦❢ a . q � b . r | ( p , q ) | π 1 p | π 2 p | λ a . p | | pq | λ x . p | pt | ( t , p ) | ❞❡st p ❛s ( x . a ) ✐♥ q | # p | S k . p Values: V :: = a | ι 1 V | ι 2 V | ( V , V ) | ( t , V ) | λ a . p | λ x . p Pure evaluation contexts: � � P :: = [ ] | ❝❛s❡ P ♦❢ | π 1 P | π 2 P | ❞❡st P ❛s ( x . a ) ✐♥ p | a 1 . p 1 � a 2 . p 2 Pq | ( λ a . q ) P | Pt | ι 1 P | ι 2 P | ( P , p ) | ( V , P ) | ( t , P ) Reduction: (Call-by-value strategy) � � ❝❛s❡ ι i V ♦❢ ( λ a . p ) V → p { V / a } a 1 . p 1 � a 2 . p 2 → p i { V / a i } ( λ x . p ) t → p { t / x } ❞❡st ( t , V ) ❛s ( x . a ) ✐♥ p → p { t / x }{ V / a } π i ( V 1 , V 2 ) → V i # P [ S k . p ] → # p {( λ a .# P [ a ])/ k } E [ p ] → E [ p ′ ] when p → p ′ # V → V
Recommend
More recommend