forked from agda/agda-stdlib
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathAll.agda
27 lines (21 loc) · 769 Bytes
/
All.agda
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
------------------------------------------------------------------------
-- The Agda standard library
--
-- Coinductive lists where all elements satisfy a predicate
------------------------------------------------------------------------
{-# OPTIONS --cubical-compatible --guardedness #-}
module Codata.Musical.Colist.Relation.Unary.All where
open import Codata.Musical.Colist.Base
open import Codata.Musical.Notation
open import Level using (Level; _⊔_)
open import Relation.Unary using (Pred)
private
variable
a b p : Level
A : Set a
B : Set b
P : Pred A p
data All {A : Set a} (P : Pred A p) : Pred (Colist A) (a ⊔ p) where
[] : All P []
_∷_ : ∀ {x xs} (px : P x) (pxs : ∞ (All P (♭ xs))) → All P (x ∷ xs)
infixr 5 _∷_