Mercurial > hg > Members > atton > similar_monad
changeset 31:33b386de3f56
Proof list-associative
author | Yasutaka Higa <e115763@ie.u-ryukyu.ac.jp> |
---|---|
date | Sat, 18 Oct 2014 13:38:29 +0900 |
parents | c2f40b6d4027 |
children | 71906644d206 |
files | agda/list.agda |
diffstat | 1 files changed, 6 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/agda/list.agda Tue Oct 07 15:32:11 2014 +0900 +++ b/agda/list.agda Sat Oct 18 13:38:29 2014 +0900 @@ -24,4 +24,9 @@ x :: (xs ++ []) ≡⟨ cong (_::_ x) (empty-append xs) ⟩ x :: xs - ∎ \ No newline at end of file + ∎ + + +list-associative : {A : Set} -> (a b c : List A) -> (a ++ (b ++ c)) ≡ ((a ++ b) ++ c) +list-associative [] b c = refl +list-associative (x :: a) b c = cong (_::_ x) (list-associative a b c) \ No newline at end of file