<p><span>It is not always clear what computer programs mean in the various languages in which they can be written, yet a picture can be worth 1000 words, a diagram 1000 instructions.</span></p><p><span>In this unique textbook/reference, programs are drawn as string diagrams in the language of catego
Programs as Diagrams: From Categorical Computability to Computable Categories (Theory and Applications of Computability)
β Scribed by Dusko Pavlovic
- Publisher
- Springer
- Year
- 2023
- Tongue
- English
- Leaves
- 261
- Edition
- 1st ed. 2023
- Category
- Library
No coin nor oath required. For personal study only.
β¦ Table of Contents
Preface
What?
Contents
1 Drawing Types and Functions
1.1 Types as Strings: Data Passing Without Variables
1.1.1 Types
1.1.2 Strings Instead of Variables
1.1.3 Tupling and Switching
1.2 Data Services: Copying and Deleting, Cartesianness
1.3 Monoidal Functions as Boxes
1.3.1 Composing Functions
1.3.2 The Middle-Two-Interchange Law
1.3.3 Sliding Boxes
1.4 Cartesian Functions as Boxes with a Dot
1.5 Categories: Universes of Types and Functions
1.6 Workout
1.7 Stories
1.7.1 Prehistory of Types
1.7.2 Categories as Type Universes
1.7.3 Logics of Types
1.7.3.1 Propositions-as-Types
1.7.3.2 Cartesian-Closed Categories
1.7.4 Categorical Diagrams: Chasing Arrows and Weaving Strings
1.7.4.1 Arrow Diagrams
1.7.4.2 String Diagrams
2 Monoidal Computer: Computability as a Structure
2.1 Computer as a Universal Machine
2.2 Universality of Program Evaluation
2.2.1 Program Evaluators
2.2.1.1 Definition
2.2.1.2 What Is the Difference Between Parameters and Inputs?
2.2.1.3 Constant Programs and Slicing Two Ways
2.2.2 Partial Evaluators
2.2.3 Composing Programs
2.3 Computable Types Are Retracts of Programming Languages
2.3.1 Data Are Programs
2.3.2 Types as Idempotents
2.3.3 Pairs of Programs Are Programs
2.3.4 Idempotents Split
2.4 Logic and Equality
2.4.1 Truth Values and Branching
2.4.2 Program Equality
2.4.3 The Type of Booleans
2.4.4 Propositional Connectives
2.4.5 Predicates and Decidability
2.5 Monoidal Computer
2.5.1 Definition
2.5.2 Examples
2.5.3 Program Evaluation as a Natural Operation
2.6 Workout
2.6.1 How Many Programs?
2.6.2 Counting by Evaluating: the Church Numerals
2.6.3 Monoid Computer?
2.6.3.1 Universal Program Evaluator {to.}to.2mu-:6muplus1muPP-3muβP
2.6.3.2 C Is the Idempotent Completion of Its Submonoid on P
2.6.3.3 Relating the Products in C and the Pairing on P
2.6.3.4 Reducing Program Evaluators {to.}to.AB to {to.}to.PP
2.7 Stories
2.7.1 Who Invented the Computer?
2.7.2 How Many Truth Values?
3 Fixpoints
3.1 Computable Functions Have Fixpoints
3.2 Divergent, Partial, Monoidal Computations
3.2.1 A Divergent Truth Value
3.2.2 Divergent Elements
3.2.3 A Divergent Program
3.2.4 Computations Are Monoidal
3.3 The Fundamental Theorem of Computation
3.3.1 Example: Polymorphic Quine
3.3.2 Example: Polymorphic Virus
3.4 -Combinators and Their Classifiers
3.4.1 -Combinator Constructions
3.4.2 -Combinator Classifiers
3.5 Software Systems as Systems of Equations
3.5.1 Smullyan Fixpoints
3.5.2 Systems of Program Equations
3.6 Workout
3.6.1 Divergence and Lazy Branching
3.6.2 Stateful Fixpoints
3.6.3 Qing, Kuine, Narcissist, Virus Generator
3.6.4 A Loopy Software System
3.7 Stories
4 What Can Be Computed
4.1 Reverse Programming
4.2 Numbers and Sequences
4.2.1 Counting Numbers
4.2.2 Numbers as Sets
4.2.3 Numbers as Programs
4.2.4 Type N as an Idempotent
4.2.5 Sequences
4.3 Counting Down: Induction and Recursion
4.3.1 Computing by Counting
4.3.2 Induction
4.3.3 Reverse Programming Induction
4.3.4 Recursion
4.3.5 Running Recursion
4.4 Counting up: Search and Loops
4.4.1 Search
4.4.2 Loops
4.5 Workout
4.5.1 Early Induction
4.5.2 Recursion Work
4.5.3 Search Work
4.6 Stories
4.6.1 Church's Reverse Programming
4.6.2 Story of Curly Brackets
4.6.3 The Church-Turing Thesis
4.6.4 Turing-Completeness
5 What Cannot Be Computed
5.1 Decidable Extensional Properties
5.2 GΓΆdel, Tarski: Provability and Truth Are Undecidable
5.3 Turing: Halting Is Undecidable
5.4 Rice: Decidable Extensional Predicates Are Constant
5.5 Workout
5.6 Stories
5.6.1 I Cannot Decide Whether I Lie
5.6.2 The Church-Turing Antithesis
6 Computing Programs
6.1 Idea of Metaprogramming
6.2 Compilation and Supercompilation
6.2.1 Compilation
6.2.2 Supercompilation
6.3 Metaprogramming Hyperfunctions
6.3.1 Ackermann's Hyperfunction
6.3.2 Metaprogramming Parametric Iteration
6.3.3 Metaprogramming a Hyperfunction
6.4 Metaprogramming Ordinals
6.4.1 Collection as Abstraction
6.4.2 Collecting Natural Numbers: The Ordinal Οas a Program
6.4.3 Transfinite Addition
6.4.4 Transfinite Multiplication
6.4.5 Transfinite Hyperfunction
6.4.6 Background: Computable Ordinal Notations
6.5 Workout
6.5.1 Is There a Fourth Futamura Projection?
6.5.2 Is Iteration All That Hyper?
6.6 Stories
6.6.1 Programming Languages
6.6.2 Software Systems and Networks
6.6.2.1 System Programming
6.6.2.2 Portable Executables
6.6.2.3 Interpreters and Scripting
6.6.3 Software
7 Stateful Computing
7.1 From Functions to Processes
7.2 Simulations as Process Morphisms
7.3 When Is a Process Computational?
7.4 Universality of Program Execution
7.5 Imperative Programs
7.6 Workout
7.6.1 Lossless Simulations
7.6.2 Program Execution as a Polymorphic Operation
7.7 Story
8 Program-Closed Categories: Computability as a Property
8.1 Program Order
8.1.1 Well-Order
8.1.2 Consequences of Well-Order
8.1.3 What If P Is Well-Ordered?
8.2 Program-Closed Categories
8.3 Programming Languages Are Isomorphic
8.3.1 The Isomorphism Theorem
8.3.2 Simulations Between Programming Languages
8.3.3 The Isomorphism Construction
8.4 Upshot: The Closures
8.4.1 Cartesian Closure
8.4.2 Program Closure
8.5 Workout
8.5.1 Exercises
8.5.2 Application: Associative Pairing Monoid Oracle
8.6 Story
8.6.1 Prehistory of Well-Order
8.6.2 Toward Categorical Computers
What??
1 What Am I?
2 What Are We Becoming?
3 What Computes?
Thanks
A On Categories and Functors
A.1 Categories
A.2 Six Concrete Categories
A.3 Functors
A.4 Natural Transformations
A.5 Equivalence of Categories
A.6 Exercises
B On Idempotents
C What Numbers Are Not
D Work
References
Index
π SIMILAR VOLUMES
It is not always clear what computer programs mean in the various languages in which they can be written, yet a picture can be worth 1000 words, a diagram 1000 instructions. In this unique textbook/reference, programs are drawn as string diagrams in the language of categories, which display a univer
CONTENTS ======== 1 Introduction 1.1 The contents 1.2 Accompanying texts 1.2.1 Textbooks on category theory 1.2.2 ML references and availability 1.2.3 A selection of textbooks on functional programming 1.3 Acknowledgements 2 Functional Programming in ML 2.1 Expressions, values and enviro