summaryrefslogtreecommitdiff
path: root/Bidir.agda
diff options
context:
space:
mode:
authorHelmut Grohne <helmut@subdivi.de>2012-09-26 15:35:32 +0200
committerHelmut Grohne <helmut@subdivi.de>2012-09-26 15:35:32 +0200
commitc1d4b4bd8d8c785a4745cb8be5d2b6094bd38def (patch)
treefee40f7c1de57058f81995733deb414ae4380b07 /Bidir.agda
parent01273a8a6109d9e45c9c24b6049c63f8321de403 (diff)
downloadbidiragda-c1d4b4bd8d8c785a4745cb8be5d2b6094bd38def.tar.gz
import [_] instead of Reveal_is_
This makes things a little shorter and more readable.
Diffstat (limited to 'Bidir.agda')
-rw-r--r--Bidir.agda12
1 files changed, 6 insertions, 6 deletions
diff --git a/Bidir.agda b/Bidir.agda
index 98cb93c..721b2b2 100644
--- a/Bidir.agda
+++ b/Bidir.agda
@@ -16,7 +16,7 @@ open import Function using (id ; _∘_ ; flip)
open import Relation.Nullary using (yes ; no ; ¬_)
open import Relation.Nullary.Negation using (contradiction)
open import Relation.Binary.Core using (_≡_ ; refl)
-open import Relation.Binary.PropositionalEquality using (cong ; sym ; inspect ; Reveal_is_ ; _≗_ ; trans)
+open import Relation.Binary.PropositionalEquality using (cong ; sym ; inspect ; [_] ; _≗_ ; trans)
open Relation.Binary.PropositionalEquality.≡-Reasoning using (begin_ ; _≡⟨_⟩_ ; _∎)
open import FinMap
@@ -66,8 +66,8 @@ lemma-∉-lookupM-assoc eq i [] [] h ph i∉is = begin
≡⟨ lemma-lookupM-empty i ⟩
nothing ∎
lemma-∉-lookupM-assoc eq i (i' ∷ is') (x' ∷ xs') h ph i∉is with assoc eq is' xs' | inspect (assoc eq is') xs'
-lemma-∉-lookupM-assoc eq i (i' ∷ is') (x' ∷ xs') h () i∉is | nothing | Reveal_is_.[_] ph'
-lemma-∉-lookupM-assoc eq i (i' ∷ is') (x' ∷ xs') h ph i∉is | just h' | Reveal_is_.[_] ph' = apply-checkInsertProof eq i' x' h' record {
+lemma-∉-lookupM-assoc eq i (i' ∷ is') (x' ∷ xs') h () i∉is | nothing | [ ph' ]
+lemma-∉-lookupM-assoc eq i (i' ∷ is') (x' ∷ xs') h ph i∉is | just h' | [ ph' ] = apply-checkInsertProof eq i' x' h' record {
same = λ lookupM-i'-h'≡just-x' → begin
lookupM i h
≡⟨ cong (lookupM i) (lemma-from-just (trans (sym ph) (lemma-checkInsert-same eq i' x' h' lookupM-i'-h'≡just-x'))) ⟩
@@ -91,8 +91,8 @@ _in-domain-of_ is h = All (λ i → ∃ λ x → lookupM i h ≡ just x) is
lemma-assoc-domain : {m n : ℕ} {A : Set} → (eq : EqInst A) → (is : Vec (Fin n) m) → (xs : Vec A m) → (h : FinMapMaybe n A) → assoc eq is xs ≡ just h → (toList is) in-domain-of h
lemma-assoc-domain eq [] [] h ph = Data.List.All.[]
lemma-assoc-domain eq (i' ∷ is') (x' ∷ xs') h ph with assoc eq is' xs' | inspect (assoc eq is') xs'
-lemma-assoc-domain eq (i' ∷ is') (x' ∷ xs') h () | nothing | ph'
-lemma-assoc-domain eq (i' ∷ is') (x' ∷ xs') h ph | just h' | Reveal_is_.[_] ph' = apply-checkInsertProof eq i' x' h' record {
+lemma-assoc-domain eq (i' ∷ is') (x' ∷ xs') h () | nothing | [ ph' ]
+lemma-assoc-domain eq (i' ∷ is') (x' ∷ xs') h ph | just h' | [ ph' ] = apply-checkInsertProof eq i' x' h' record {
same = λ lookupM-i'-h'≡just-x' → Data.List.All._∷_
(x' , (trans (cong (lookupM i') (lemma-from-just (trans (sym ph) (lemma-checkInsert-same eq i' x' h' lookupM-i'-h'≡just-x')))) lookupM-i'-h'≡just-x'))
(lemma-assoc-domain eq is' xs' h (trans ph' (trans (sym (lemma-checkInsert-same eq i' x' h' lookupM-i'-h'≡just-x')) ph)))
@@ -132,7 +132,7 @@ lemma-2 : {Ï„ : Set} {m n : â„•} → (eq : EqInst Ï„) → (is : Vec (Fin n) m) â
lemma-2 eq [] [] h p = refl
lemma-2 eq (i ∷ is) (x ∷ xs) h p with assoc eq is xs | inspect (assoc eq is) xs
lemma-2 eq (i ∷ is) (x ∷ xs) h () | nothing | _
-lemma-2 eq (i ∷ is) (x ∷ xs) h p | just h' | Reveal_is_.[_] ir = begin
+lemma-2 eq (i ∷ is) (x ∷ xs) h p | just h' | [ ir ] = begin
map (flip lookupM h) (i ∷ is)
≡⟨ refl ⟩
lookupM i h ∷ map (flip lookupM h) is