fbpx
Wikipedia

B, C, K, W system

The B, C, K, W system is a variant of combinatory logic that takes as primitive the combinators B, C, K, and W. This system was discovered by Haskell Curry in his doctoral thesis Grundlagen der kombinatorischen Logik, whose results are set out in Curry (1930).

Definition edit

The combinators are defined as follows:

  • B x y z = x (y z)
  • C x y z = x z y
  • K x y = x
  • W x y = x y y

Intuitively,

  • B x y is the composition of x and y;
  • C x is x with the flipped arguments order;
  • K x is the "constant x" function, which discards the next argument;
  • W duplicates its second argument for the doubled application to the first. Thus, it "joins" its first argument's two expectations for input into one.

Connection to other combinators edit

In recent decades, the SKI combinator calculus, with only two primitive combinators, K and S, has become the canonical approach to combinatory logic. B, C, and W can be expressed in terms of S and K as follows:

  • B = S (K S) K
  • C = S (S (K (S (K S) K)) S) (K K)
  • K = K
  • W = S S (S K)

Another way is, having defined B as above, to further define C = S(BBS)(KK) and W = CSI.

Going the other direction, SKI can be defined in terms of B, C, K, W as:

  • I = W K
  • K = K
  • S = B (B (B W) C) (B B) = B (B W) (B B C).[1]

Also of note, Y combinator has a short expression in this system, as Y = BU(CBU), where U = WI = SII is the self-application combinator. Then we have Yg = U(BgU) = BgU(BgU) = g(U(BgU)) = g(Yg).

Connection to intuitionistic logic edit

The combinators B, C, K and W correspond to four well-known axioms of sentential logic:

AB: (BC) → ((AB) → (AC)),
AC: (A → (BC)) → (B → (AC)),
AK: A → (BA),
AW: (A → (AB)) → (AB).

Function application corresponds to the rule modus ponens:

MP: from AB and A infer B.

The axioms AB, AC, AK and AW, and the rule MP are complete for the implicational fragment of intuitionistic logic. In order for combinatory logic to have as a model:

See also edit

Notes edit

  1. ^ Raymond Smullyan (1994) Diagonalization and Self-Reference. Oxford Univ. Press: 344, 3.6(d) and 3.7.

References edit

  • Hendrik Pieter Barendregt (1984) The Lambda Calculus, Its Syntax and Semantics, Vol. 103 in Studies in Logic and the Foundations of Mathematics. North-Holland. ISBN 0-444-87508-5
  • Haskell Curry (1930) "Grundlagen der kombinatorischen Logik," Amer. J. Math. 52: 509–536; 789–834. https://doi.org/10.2307/2370619
  • Curry, Haskell B.; Hindley, J. Roger; Seldin, Jonathan P. (1972). Combinatory Logic. Vol. II. Amsterdam: North Holland. ISBN 0-7204-2208-6.
  • Raymond Smullyan (1994) Diagonalization and Self-Reference. Oxford Univ. Press.

External links edit

  • Keenan, David C. (2001) "To Dissect a Mockingbird."
  • Rathman, Chris, "Combinator Birds."
  • ""

system, variant, combinatory, logic, that, takes, primitive, combinators, this, system, discovered, haskell, curry, doctoral, thesis, grundlagen, kombinatorischen, logik, whose, results, curry, 1930, contents, definition, connection, other, combinators, connec. The B C K W system is a variant of combinatory logic that takes as primitive the combinators B C K and W This system was discovered by Haskell Curry in his doctoral thesis Grundlagen der kombinatorischen Logik whose results are set out in Curry 1930 Contents 1 Definition 2 Connection to other combinators 3 Connection to intuitionistic logic 4 See also 5 Notes 6 References 7 External linksDefinition editThe combinators are defined as follows B x y z x y z C x y z x z y K x y x W x y x y yIntuitively B x y is the composition of x and y C x is x with the flipped arguments order K x is the constant x function which discards the next argument W duplicates its second argument for the doubled application to the first Thus it joins its first argument s two expectations for input into one Connection to other combinators editIn recent decades the SKI combinator calculus with only two primitive combinators K and S has become the canonical approach to combinatory logic B C and W can be expressed in terms of S and K as follows B S K S K C S S K S K S K S K K K K W S S S K Another way is having defined B as above to further define C S BBS KK and W CSI Going the other direction SKI can be defined in terms of B C K W as I W K K K S B B B W C B B B B W B B C 1 Also of note Y combinator has a short expression in this system as Y BU CBU where U WI SII is the self application combinator Then we have Yg U BgU BgU BgU g U BgU g Yg Connection to intuitionistic logic editThe combinators B C K and W correspond to four well known axioms of sentential logic AB B C A B A C AC A B C B A C AK A B A AW A A B A B Function application corresponds to the rule modus ponens MP from A B and A infer B The axioms AB AC AK and AW and the rule MP are complete for the implicational fragment of intuitionistic logic In order for combinatory logic to have as a model The implicational fragment of classical logic would require the combinatory analog to the law of excluded middle e g Peirce s law Complete classical logic would require the combinatory analog to the sentential axiom F A See also editCombinatory logic SKI combinator calculus Lambda calculus To Mock a MockingbirdNotes edit Raymond Smullyan 1994 Diagonalization and Self Reference Oxford Univ Press 344 3 6 d and 3 7 References editHendrik Pieter Barendregt 1984 The Lambda Calculus Its Syntax and Semantics Vol 103 in Studies in Logic and the Foundations of Mathematics North Holland ISBN 0 444 87508 5 Haskell Curry 1930 Grundlagen der kombinatorischen Logik Amer J Math 52 509 536 789 834 https doi org 10 2307 2370619 Curry Haskell B Hindley J Roger Seldin Jonathan P 1972 Combinatory Logic Vol II Amsterdam North Holland ISBN 0 7204 2208 6 Raymond Smullyan 1994 Diagonalization and Self Reference Oxford Univ Press External links editKeenan David C 2001 To Dissect a Mockingbird Rathman Chris Combinator Birds Drag n Drop Combinators Java Applet Retrieved from https en wikipedia org w index php title B C K W system amp oldid 1192928766, wikipedia, wiki, book, books, library,

article

, read, download, free, free download, mp3, video, mp4, 3gp, jpg, jpeg, gif, png, picture, music, song, movie, book, game, games.