From 71025b5f1d0a11b0cf373192210b293a77d45c04 Mon Sep 17 00:00:00 2001 From: Helmut Grohne Date: Mon, 27 Jan 2014 09:31:56 +0100 Subject: cleanup unused functions and useless steps --- Generic.agda | 10 ---------- 1 file changed, 10 deletions(-) (limited to 'Generic.agda') diff --git a/Generic.agda b/Generic.agda index 2ef374c..4e55c21 100644 --- a/Generic.agda +++ b/Generic.agda @@ -15,10 +15,6 @@ open import Relation.Binary.PropositionalEquality using (_≗_ ; cong ; subst ; open Category.Functor.RawFunctor {Level.zero} Data.Maybe.functor using (_<$>_) open Category.Monad.RawMonad {Level.zero} Data.Maybe.monad using (_>>=_) -∷-injective : {A : Set} {n : ℕ} {x y : A} {xs ys : Vec A n} → - (x ∷V xs) ≡ (y ∷V ys) → x ≡ y × xs ≡ ys -∷-injective refl = refl , refl - just-injective : {A : Set} → {x y : A} → Maybe.just x ≡ Maybe.just y → x ≡ y just-injective refl = refl @@ -26,12 +22,6 @@ length-replicate : {A : Set} {a : A} → (n : ℕ) → length (replicate n a) length-replicate zero = refl length-replicate (suc n) = cong suc (length-replicate n) -map-just-injective : {A : Set} {n : ℕ} {xs ys : Vec A n} → - map Maybe.just xs ≡ map Maybe.just ys → xs ≡ ys -map-just-injective {xs = []V} {ys = []V} p = refl -map-just-injective {xs = x ∷V xs′} {ys = y ∷V ys′} p with ∷-injective p -map-just-injective {xs = x ∷V xs′} {ys = .x ∷V ys′} p | refl , p′ = cong (_∷V_ x) (map-just-injective p′) - mapMV : {A B : Set} {n : ℕ} → (A → Maybe B) → Vec A n → Maybe (Vec B n) mapMV f []V = just []V mapMV f (x ∷V xs) = (f x) >>= (λ y → (_∷V_ y) <$> (mapMV f xs)) -- cgit v1.2.3