summaryrefslogtreecommitdiff
path: root/Generic.agda
diff options
context:
space:
mode:
Diffstat (limited to 'Generic.agda')
-rw-r--r--Generic.agda10
1 files changed, 0 insertions, 10 deletions
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))