Skip to content

Commit

Permalink
Merge pull request #2054 from bmastenbrook/patch-1
Browse files Browse the repository at this point in the history
Typo fixes for the theorem proving tutorial
  • Loading branch information
edwinb committed Mar 23, 2015
2 parents 7d76d93 + df1af5f commit a87a66b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
7 changes: 4 additions & 3 deletions docs/proofs/patterns.rst
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,8 @@ Again, the ``fromInteger 0`` is merely due to ``Nat`` being an instance
of the ``Num`` typeclass. So we know that ``k = plus k 0``, but how do
we use this to update the goal to ``S k = S k``?

To achieve this, provides a ``replace`` function as part of the prelude:
To achieve this, Idris provides a ``replace`` function as part of the
prelude:

.. code-block:: idris
Expand All @@ -195,8 +196,8 @@ Given a proof that ``x = y``, and a property ``P`` which holds for
``x``, we can get a proof of the same property for ``y``, because we
know ``x`` and ``y`` must be the same. In practice, this function can be
a little tricky to use because in general the implicit argument ``P``
can be hard to infer by unification, so provides a high level syntax
which calculates the property and applies replace:
can be hard to infer by unification, so Idris provides a high level
syntax which calculates the property and applies ``replace``:

.. code-block:: idris
Expand Down
4 changes: 2 additions & 2 deletions docs/proofs/pluscomm.rst
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ equalities between values in different types:
idris_not_php : 2 = "2"
Obviously, in Idris the type ``2 = 2`` is uninhabited, and one might
Obviously, in Idris the type ``2 = "2"`` is uninhabited, and one might
wonder why it is useful to be able to propose equalities between values
in different types. However, with dependent types, such equalities can
arise naturally. For example, if two vectors are equal, their lengths
Expand Down Expand Up @@ -177,7 +177,7 @@ given above as Idris type declarations:
Both of these properties (and many others) are proved for natural number
addition in the Idris standard library, using ``(+)`` from the ``Num``
type class rather than using ``plus`` directly. They have the names
``plusCommutative`` and ``plusAssociatie`` respectively.
``plusCommutative`` and ``plusAssociative`` respectively.

In the remainder of this tutorial, we will explore several different
ways of proving ``plus_commutes`` (or, to put it another way, writing
Expand Down

0 comments on commit a87a66b

Please sign in to comment.