Debian Codegraph @

src/Codata/Musical/Colist/Relation/Unary/All/Properties.agda

raw
1 ------------------------------------------------------------------------
2 -- The Agda standard library
3 --
4 -- Coinductive lists where all elements satisfy a predicate
5 ------------------------------------------------------------------------
6
7 {-# OPTIONS --cubical-compatible --guardedness #-}
8
9 module Codata.Musical.Colist.Relation.Unary.All.Properties where
10
11 open import Codata.Musical.Colist.Base using (Colist; _∷_)
12 open import Codata.Musical.Colist.Relation.Unary.All using (All; []; _∷_)
13 open import Function.Base using (_∋_)
14 open import Level using (Level; _⊔_)
15 open import Relation.Binary.PropositionalEquality.Core using (_≡_; refl)
16 open import Relation.Unary using (Pred)
17
18 private
19 variable
20 a b p : Level
21 A : Set a
22 B : Set b
23 P : Pred A p
24
25 ∷-injectiveˡ : ∀ {x xs px qx pxs qxs} →
26 (All P (x ∷ xs) ∋ px ∷ pxs) ≡ qx ∷ qxs → px ≡ qx
27 ∷-injectiveˡ refl = refl
28
29 ∷-injectiveʳ : ∀ {x xs px qx pxs qxs} →
30 (All P (x ∷ xs) ∋ px ∷ pxs) ≡ qx ∷ qxs → pxs ≡ qxs
31 ∷-injectiveʳ refl = refl