Skip to content

Commit 20764d1

Browse files
committed
Fix chapter12 list formatting
1 parent 109c727 commit 20764d1

4 files changed

Lines changed: 21 additions & 10 deletions

File tree

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12719,11 +12719,13 @@ The **Curry--Howard--Lambek correspondence** states that three seemingly differe
1271912719
#### What the Correspondence Means
1272012720

1272112721
A **cartesian closed category** (CCC) -- a category with products, exponentials, and a terminal object -- is simultaneously:
12722+
1272212723
1. A model of propositional logic (the internal logic of the category)
1272312724
2. A model of the simply-typed lambda calculus (types are objects, terms are morphisms)
1272412725
3. A category with enough structure to interpret all of functional programming
1272512726

1272612727
The OCaml type system lives in this world. When we write `let f : 'a * 'b -> 'b * 'a = fun (x, y) -> (y, x)`, we are simultaneously:
12728+
1272712729
- **Proving** the logical tautology $A \wedge B \Rightarrow B \wedge A$
1272812730
- **Programming** the swap function on pairs
1272912731
- **Constructing** a morphism $A \times B \to B \times A$ in a CCC

chapter12/README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1009,11 +1009,13 @@ The **Curry--Howard--Lambek correspondence** states that three seemingly differe
10091009
#### What the Correspondence Means
10101010

10111011
A **cartesian closed category** (CCC) -- a category with products, exponentials, and a terminal object -- is simultaneously:
1012+
10121013
1. A model of propositional logic (the internal logic of the category)
10131014
2. A model of the simply-typed lambda calculus (types are objects, terms are morphisms)
10141015
3. A category with enough structure to interpret all of functional programming
10151016

10161017
The OCaml type system lives in this world. When we write `let f : 'a * 'b -> 'b * 'a = fun (x, y) -> (y, x)`, we are simultaneously:
1018+
10171019
- **Proving** the logical tautology $A \wedge B \Rightarrow B \wedge A$
10181020
- **Programming** the swap function on pairs
10191021
- **Constructing** a morphism $A \times B \to B \times A$ in a CCC

pdfs/new_book.pdf

14.8 MB
Binary file not shown.

site/new_book.html

Lines changed: 17 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -16526,18 +16526,25 @@ <h2 id="curryhowardlambek-the-trinity">12.10 Curry–Howard–Lambek: The
1652616526
<h3 id="what-the-correspondence-means">What the Correspondence
1652716527
Means</h3>
1652816528
<p>A <strong>cartesian closed category</strong> (CCC) – a category with
16529-
products, exponentials, and a terminal object – is simultaneously: 1. A
16530-
model of propositional logic (the internal logic of the category) 2. A
16531-
model of the simply-typed lambda calculus (types are objects, terms are
16532-
morphisms) 3. A category with enough structure to interpret all of
16533-
functional programming</p>
16529+
products, exponentials, and a terminal object – is simultaneously:</p>
16530+
<ol type="1">
16531+
<li>A model of propositional logic (the internal logic of the
16532+
category)</li>
16533+
<li>A model of the simply-typed lambda calculus (types are objects,
16534+
terms are morphisms)</li>
16535+
<li>A category with enough structure to interpret all of functional
16536+
programming</li>
16537+
</ol>
1653416538
<p>The OCaml type system lives in this world. When we write
1653516539
<code>let f : 'a * 'b -&gt; 'b * 'a = fun (x, y) -&gt; (y, x)</code>, we
16536-
are simultaneously: - <strong>Proving</strong> the logical tautology
16537-
<span class="math inline">A \wedge B \Rightarrow B \wedge A</span> -
16538-
<strong>Programming</strong> the swap function on pairs -
16539-
<strong>Constructing</strong> a morphism <span class="math inline">A
16540-
\times B \to B \times A</span> in a CCC</p>
16540+
are simultaneously:</p>
16541+
<ul>
16542+
<li><strong>Proving</strong> the logical tautology <span
16543+
class="math inline">A \wedge B \Rightarrow B \wedge A</span></li>
16544+
<li><strong>Programming</strong> the swap function on pairs</li>
16545+
<li><strong>Constructing</strong> a morphism <span class="math inline">A
16546+
\times B \to B \times A</span> in a CCC</li>
16547+
</ul>
1654116548
<div class="sourceCode" id="cb493"><pre
1654216549
class="sourceCode ocaml"><code class="sourceCode ocaml"><span id="cb493-1"><a href="#cb493-1" aria-hidden="true" tabindex="-1"></a><span class="co">(* Programs that are simultaneously logical proofs *)</span></span>
1654316550
<span id="cb493-2"><a href="#cb493-2" aria-hidden="true" tabindex="-1"></a><span class="co">(* and morphisms in a cartesian closed category: *)</span></span>

0 commit comments

Comments
 (0)