diff options
author | Helmut Grohne <helmut@subdivi.de> | 2012-11-02 15:19:40 +0100 |
---|---|---|
committer | Helmut Grohne <helmut@subdivi.de> | 2012-11-02 15:19:40 +0100 |
commit | b1ff726734b60d82270fb77a0bdc70ecea20a9b5 (patch) | |
tree | 68a281588c219a594bed88b6b0a91e2b982ca7c4 | |
parent | 2d58e07b44098b13cbdb2da83e8fcc6b33616ac9 (diff) | |
download | bidiragda-b1ff726734b60d82270fb77a0bdc70ecea20a9b5.tar.gz |
rewrite checkInsert using "... |" notation
Less characters => more readable.
-rw-r--r-- | CheckInsert.agda | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/CheckInsert.agda b/CheckInsert.agda index 6b5473a..600b754 100644 --- a/CheckInsert.agda +++ b/CheckInsert.agda @@ -17,10 +17,10 @@ open import FinMap checkInsert : {n : ℕ} → Fin n → Carrier → FinMapMaybe n Carrier → Maybe (FinMapMaybe n Carrier) checkInsert i b m with lookupM i m -checkInsert i b m | just c with deq b c -checkInsert i b m | just .b | yes refl = just m -checkInsert i b m | just c | no ¬p = nothing -checkInsert i b m | nothing = just (insert i b m) +... | nothing = just (insert i b m) +... | just c with deq b c +... | yes b≡c = just m +... | no b≢c = nothing record checkInsertProof {n : ℕ} (i : Fin n) (x : Carrier) (m : FinMapMaybe n Carrier) (P : Set) : Set where field |