Klasyczny rachunek sekwentów Logika intuicjonistyczna Sekwenty: koniunkcja {}}{ ϕ 1,, ϕ n }{{} zaªo»enia alternatywa {}}{ ψ 1,, ψ m }{{} wnioski (n, m 0) Wykªad 11 Aksjomaty: ϕ ϕ 26 kwietnia 2012 Reguªy: strukturalne, logiczne, reguªa ci cia Reguªy strukturalne Wymiana: Osªabianie: Skracanie: Γ, ϕ, ψ, Σ Γ, ψ, ϕ, Σ (LW) Γ, ϕ, ψ, Σ Γ, ψ, ϕ, Σ (PW) Γ Σ Γ, ϕ Σ (LO) Γ Σ (PO) Γ, ϕ, ϕ Σ Γ, ϕ Σ (LS) Γ ϕ, ϕ, Σ (PS) Mo»na uwa»a,»e sekwent to para zbiorów Reguªy logiczne (addytywne) Γ, ϕ i Σ Γ, ϕ 1 ϕ 2 Σ (LK) Γ ψ, Σ Γ ϕ ψ, Σ Γ, ϕ Σ Γ, ψ Σ Γ, ϕ ψ Σ (LA) Γ, ψ Σ (LI) Γ, ϕ ψ Σ Γ ϕ i, Σ Γ ϕ 1 ϕ 2, Σ Γ, ϕ ψ, Σ Γ ϕ ψ, Σ Γ, ϕ Σ (LN) Γ, ϕ Σ Γ ϕ, Σ (PK) (PA) (PI) (PN) Γ, (LF) Γ, Σ (PP)
Reguªa ci cia Gentzen's Hauptsatz Γ Σ Γ, ϕ Σ (cut) Twierdzenie (o eliminacji ci cia): Je±li sekwent Γ ma dowód, to ma dowód bez ci cia Peªno± : Sekwent ϕ 1,, ϕ n ψ 1,, ψ m ma dowód wtw, gdy ϕ 1 ϕ n ψ 1 ψ m jest tautologi Dowód u»ywa reguªy ci cia, np tak: Zasada podformuª: Formuªy wystepuj ce w przesªankach ka»dej reguªy s podformuªami formuª wyst puj cych w konkluzji Γ ϕ ψ Γ ϕ Γ, ψ ψ Γ, ϕ ψ ψ (MP) Γ ψ Dowód bez ci cia sekwentu ϕ u»ywa tylko podformuª ϕ Dowód budujemy od ko«ca, rozbieraj c formuªy na cz ±ci Przykªad eliminacji ci cia: Dowód Intuicjonistyczny rachunek sekwentów (R ) (1) Γ, ϕ ψ Γ ϕ ψ (2) Γ ϕ Γ ϑ (3) Γ, ψ ϑ Γ, ϕ ψ ϑ (L ) (Cut) Sekwenty maj co najwy»ej jedn formuª po prawej stronie Wymiana: Γ, ϕ, ψ, σ Γ, ψ, ϕ, σ (LW) przeksztaªcamy w dowód: (Cut) (2) Γ ϕ Γ ψ (1) Γ, ϕ ψ Γ ϑ (3) Γ, ψ ϑ (Cut) Osªabianie: Skracanie: Γ σ Γ, ϕ σ (LO) Γ Γ σ Γ, ϕ, ϕ σ Γ, ϕ σ (LS) (PO)
Intuicjonistyczny rachunek sekwentów Γ, ϕ i σ Γ, ϕ 1 ϕ 2 σ (LK) Γ ϕ Γ ψ Γ ϕ ψ Γ, ϕ σ Γ, ψ σ Γ, ϕ ψ σ (LA) Γ ϕ i Γ ϕ 1 ϕ 2 (PK) (PA) Przypisanie termów (1) Γ M : ϕ Γ N : ψ Γ M, N : ϕ ψ (PK) Γ ϕ Γ, ψ σ Γ, ϕ ψ σ (LI) Γ, ϕ ψ Γ ϕ ψ (PI) Γ M : ϕ i Γ in i (M) : ϕ 1 ϕ 2 (PA) Γ ϕ Γ, ϕ (LN) Γ, ϕ Γ ϕ (PN) Γ, x : ϕ M : ψ Γ λx ϕ M : ϕ ψ (PI) Γ, σ (LF) Γ (PP) Przypisanie termów (2) Postaci normalne Γ, x : ϕ i M : σ Γ, y : ϕ 1 ϕ 2 M[x := y{i}] : σ (LK) Γ, x : ϕ M : σ Γ, y : ψ N : σ Γ, z : ϕ ψ case z of [x]m or [y]n : σ (LA) Γ M : ϕ Γ, x : ψ N : σ Γ, y : ϕ ψ N[x := ym] : σ (LI) Γ, x : ε σ (x) (LF) Fakt: Termy dowodowe dla rachunku sekwentów bez ci cia, to dokªadnie postaci normalne ze wzgl du na beta-redukcje i permutacje Wniosek: Je±li α β, to α lub β Dowód: Je±li M : α β, to M = in Inaczej:»adna reguªa nie pasuje oprócz (R ) No dobrze, ale dlaczego to nie dziaªa dla logiki klasycznej? Bo jest jeszcze skracanie z prawej
Linear logic: the data ow paradigm Rules for conjunction in sequent calculus First choice: Correctness criterion = construction respecting resources Intuitionistic construction is a function, linear construction is an action Σ, α ρ Σ, α β ρ (L ) Γ α Γ α β Γ β (R ) An assumption has to be used (consumed) exactly once: cannot be re-used nor abandoned Second choice: But some resources are re-usable (!α) Σ, α, β ρ (L ) Σ, α β ρ Γ α β (R ) Γ, α β Dwie koniunkcje Tensor Wraz (with): Σ, α ρ Σ, α β ρ (L ) Γ α Γ α β Γ β (R ) An object of type α β is a pair of objects: one of type α, the other of type β Creating each component of the pair requires separate resources Consuming a pair requires using both components Tensor: Σ, α, β ρ Σ, α β ρ (L ) Γ α β (R ) Γ, α β Σ, α, β ρ, Π (L ) Σ, α β ρ, Π Γ α, Π β, Σ (R ) Γ, α β, Π, Σ
With Lizak An object of type α β is a virtual pair of objects (one of type α, the other of type β), from which exactly one can be potentially created from the same resources In other words, α β is a right of choice between α or β This right belongs to the consumer Linear implication α β represents the type of process in which the assumption (resource) α is processed into the conclusion β, without re-using any part of it, and without leaving any unused garbage Σ, α ρ, Π Σ, α β ρ, Π (L ) Γ α, Π Γ α β, Π Γ β, Π (R ), ψ Π Γ,, ϕ ψ Σ, Π (L ) Γ, ϕ ψ, Σ Γ ϕ ψ, Σ (R ) Negacja i dualno± Negation: Linear negation α is the dual type of α Producing data of type α is the same as consuming data of type α Plus: An object of type α β is a pair consisting of an object of type α or of type β, and a ag showing which case actually holds The right of choice between α or β belongs to the producer The consumer opens a box and uses the contents according to the instruction on the ag Γ, ϕ Σ (L ) Γ, ϕ Σ Γ ϕ, Σ (R ) Γ, ϕ Σ Γ, ψ Σ Γ, ϕ ψ Σ (L ) Γ ϕ i, Σ Γ ϕ 1 ϕ 2, Σ (R ) Note: Implications α β and β α are equivalent (Analogy with electric current) Duality: Plus ( ) is the other side of With ( ): (α β) α β (α β) α β (Receiving a surprise is sending the right of choice)
Przykªad obiadowy Of course: Type!α represents the ability to create any required amount of data of type α (Consumer of!α makes the decision) Maybe: An object of type?α is the ability to consume a certain amount of data of type α (Producer of?α makes the decision) 10 zª (pomidorowa krupnik) (kotlet ryba) (!ziemniaki!ry») (kompot jabªko) Duality: (!α)?(α ) and (?α)!(α ) Tego nie udowodnimy: Równowa»no± α, α α; α, α α β β; α β := (α β) (β α) α, α, α β, β β γ γ; α β α Fakt: Γ α β wtw, gdy Γ α β oraz Γ β α (α β γ) (α β) α γ
What is dual to? Translacja Girarda (α β) α β (α β) α β Γ, α Σ, β Π Γ,, α β Σ, Π (L ) Γ α, β, Σ Γ α β, Σ (R ) Par: Type α β represents communication: a fair contract between α and β (Receiving a pair of type α β is the same as sending α β iie, sending entanglement of α and β ) (α β) α β p = p, = 1, = 0; (α β) = α β ; (α β) =!α!β ; (α β) =!α β Twierdzenie: Nast puj ce warunki s równowa»ne: 1) Γ ϕ w logice intuicjonistycznej; 2)!Γ ϕ w intuicjonistycznej logice liniowej; 3)!Γ ϕ w klasycznej logice liniowej