Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 3 additions & 4 deletions src/Codata/Guarded/Stream/Relation/Unary/Any.agda
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,9 @@
module Codata.Guarded.Stream.Relation.Unary.Any where

open import Codata.Guarded.Stream as Stream using (Stream)
open import Data.Empty using (⊥-elim)
open import Data.Nat.Base hiding (_⊔_)
open import Level hiding (zero; suc)
open import Relation.Nullary.Negation.Core using (¬_)
open import Relation.Nullary.Negation.Core using (¬_; contradiction)
open import Relation.Unary using (Pred; _⊆_)

private
Expand All @@ -28,10 +27,10 @@ data Any {A : Set a} (P : Pred A p) : Stream A → Set (a ⊔ p) where

head : ¬ Any P (Stream.tail xs) → Any P xs → P (Stream.head xs)
head ¬t (here h) = h
head ¬t (there t) = ⊥-elim (¬t t)
head ¬t (there t) = contradiction t ¬t

tail : ¬ P (Stream.head xs) → Any P xs → Any P (Stream.tail xs)
tail ¬h (here h) = ⊥-elim (¬h h)
tail ¬h (here h) = contradiction h ¬h
tail ¬h (there t) = t

map : P ⊆ Q → Any P ⊆ Any Q
Expand Down