summaryrefslogtreecommitdiff
path: root/FinMap.agda
diff options
context:
space:
mode:
authorHelmut Grohne <helmut@subdivi.de>2012-10-25 12:53:19 +0200
committerHelmut Grohne <helmut@subdivi.de>2012-10-25 12:53:19 +0200
commit7dcad0cd17c75867c2ce10ac72c9863fb3ed2e94 (patch)
treea0c6cca57eca277ff0d647d6d9fdab3e97146a3d /FinMap.agda
parentf622e4cfa50a46761a7344c9ad980f983f5f42ec (diff)
downloadbidiragda-7dcad0cd17c75867c2ce10ac72c9863fb3ed2e94.tar.gz
rename lemma-from-just to just-injective
We already have suc-injective and \::-injective. Consistency!
Diffstat (limited to 'FinMap.agda')
-rw-r--r--FinMap.agda6
1 files changed, 3 insertions, 3 deletions
diff --git a/FinMap.agda b/FinMap.agda
index 4fc3e18..c085b24 100644
--- a/FinMap.agda
+++ b/FinMap.agda
@@ -68,13 +68,13 @@ lemma-lookupM-insert-other zero (suc j) a (x ∷ xs) p = refl
lemma-lookupM-insert-other (suc i) zero a (x ∷ xs) p = refl
lemma-lookupM-insert-other (suc i) (suc j) a (x ∷ xs) p = lemma-lookupM-insert-other i j a xs (contraposition (cong suc) p)
-lemma-from-just : {A : Set} → {x y : A} → _≡_ {_} {Maybe A} (just x) (just y) → x ≡ y
-lemma-from-just refl = refl
+just-injective : {A : Set} → {x y : A} → _≡_ {_} {Maybe A} (just x) (just y) → x ≡ y
+just-injective refl = refl
lemma-lookupM-restrict : {A : Set} {n : ℕ} → (i : Fin n) → (f : Fin n → A) → (is : List (Fin n)) → (a : A) → lookupM i (restrict f is) ≡ just a → f i ≡ a
lemma-lookupM-restrict i f [] a p = lemma-just≢nothing (trans (sym p) (lemma-lookupM-empty i))
lemma-lookupM-restrict i f (i' ∷ is) a p with i ≟ i'
-lemma-lookupM-restrict i f (.i ∷ is) a p | yes refl = lemma-from-just (begin
+lemma-lookupM-restrict i f (.i ∷ is) a p | yes refl = just-injective (begin
just (f i)
≡⟨ sym (lemma-lookupM-insert i (f i) (restrict f is)) ⟩
lookupM i (insert i (f i) (restrict f is))