updated Agda
This commit is contained in:
parent
2e93d44877
commit
2871611bec
2 changed files with 2 additions and 6 deletions
|
@ -281,11 +281,10 @@ that `even (n + m)` holds.
|
|||
|
||||
Agda includes special notation to support just this
|
||||
kind of reasoning. To enable this notation, we use
|
||||
pragmas to tell Agda which types and constructors
|
||||
correspond to equivalence and refl.
|
||||
pragmas to tell Agda which type
|
||||
corresponds to equivalence.
|
||||
\begin{code}
|
||||
{-# BUILTIN EQUALITY _≡_ #-}
|
||||
{-# BUILTIN REFL refl #-}
|
||||
\end{code}
|
||||
|
||||
We can then prove the desired property as follows.
|
||||
|
|
|
@ -14,7 +14,6 @@ import Relation.Binary.PropositionalEquality as Eq
|
|||
open Eq using (_≡_; refl; sym; trans; cong)
|
||||
open Eq.≡-Reasoning
|
||||
open import Data.Nat using (ℕ; zero; suc; _+_; _*_)
|
||||
open import Data.Nat.Properties.Simple using (distribʳ-*-+; *-comm)
|
||||
\end{code}
|
||||
|
||||
## Lists
|
||||
|
@ -72,8 +71,6 @@ of `List A` by `List ℕ`, say.
|
|||
Including the lines
|
||||
\begin{code}
|
||||
{-# BUILTIN LIST List #-}
|
||||
{-# BUILTIN NIL [] #-}
|
||||
{-# BUILTIN CONS _∷_ #-}
|
||||
\end{code}
|
||||
tells Agda that the type `List` corresponds to the Haskell type
|
||||
list, and the constructors `[]` and `_∷_` correspond to nil and
|
||||
|
|
Loading…
Reference in a new issue