Skip to content

Commit afde259

Browse files
committed
continue working on tutorial
1 parent a3f62ff commit afde259

File tree

2 files changed

+2
-6
lines changed

2 files changed

+2
-6
lines changed

tutorial/division_tests.dhall

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -92,10 +92,6 @@ let _ = assert : divmod 10 2 ≡ { div = 5, rem = 0 }
9292

9393
let _ = assert : divmod 10 3 { div = 3, rem = 1 }
9494

95-
let _ =
96-
./floatN.dhall
97-
sha256:2d21552714de4f3cf44c006ae1d8222b9954379c989dbd030663478f495e9f47
98-
9995
let Nonzero =
10096
λ(y : Natural)
10197
if Natural/isZero y

tutorial/programming_dhall.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4173,7 +4173,7 @@ So, we can just use values of type `Exists P` as functions, instead of using `un
41734173

41744174
#### Functions of existential types: the function extension rule
41754175

4176-
The fact that `unpack` is an identity function allows us to simplify the function type `Exists P → q`, where `q` is some fixed type.
4176+
The fact that `unpack` is an identity function allows us to simplify the function type `Exists P → q`, where `q` is some fixed type expression.
41774177

41784178
To see how, let us consider `P` as fixed and rewrite the type of `unpack P` by swapping some curried arguments.
41794179
We will denote the resulting function by `inE`:
@@ -4186,7 +4186,7 @@ let inE : ∀(r : Type) → (∀(t : Type) → P t → r) → (Exists P → r)
41864186

41874187
This type signature suggests that the function type `Exists P → r` (written in full as `(∀(a : Type) → (∀(t : Type) → P t → a) → a) → r`) is equivalent to a simpler type `∀(t : Type) → P t → r`.
41884188

4189-
Indeed, this type equivalence (an isomorphism) can be proved rigorously.
4189+
Indeed, one can prove regorously that there is an isomorphism between the types `Exists P → r` and `∀(t : Type) → P t → r` (where it is assumed that `r` does _not_ depend on `t`).
41904190
The function `inE` shown above gives one direction of the isomorphism.
41914191
The other direction is the function `outE`:
41924192

0 commit comments

Comments
 (0)