99module Data.List.Fresh.Relation.Unary.Any.Properties where
1010
1111open import Data.Bool.Base using (true; false)
12- open import Data.Empty using (⊥; ⊥-elim)
1312open import Data.List.Fresh using (List#; _∷#_; _#_; NonEmpty; cons; length; [])
1413open import Data.List.Fresh.Relation.Unary.All using (All; _∷_; append; [])
1514open import Data.List.Fresh.Relation.Unary.Any using (Any; here; there; _─_)
@@ -19,12 +18,12 @@ open import Data.Sum.Base as Sum using (_⊎_; inj₁; inj₂)
1918open import Function.Base using (_∘′_)
2019open import Level using (Level; _⊔_; Lift)
2120open import Relation.Nullary.Reflects using (invert)
22- open import Relation.Nullary.Negation.Core using (¬_)
2321open import Relation.Nullary.Decidable.Core
2422open import Relation.Unary as U using (Pred)
2523open import Relation.Binary.Core using (Rel)
2624open import Relation.Nary using (∀[_]; _⇒_; ∁; Decidable)
2725open import Relation.Binary.PropositionalEquality.Core using (_≡_; refl; cong)
26+ open import Relation.Nullary.Negation.Core using (contradiction; ¬_)
2827
2928private
3029 variable
@@ -56,15 +55,15 @@ module _ {R : Rel A r} {P : Pred A p} {Q : Pred A q} (P⇒¬Q : ∀[ P ⇒ ∁ Q
5655module _ {R : Rel A r} {P : Pred A p} {Q : Pred A q} (P? : Decidable P) where
5756
5857 ¬All⇒Any : {xs : List# A R} → ¬ (All P xs) → Any (∁ P) xs
59- ¬All⇒Any {xs = []} ¬ps = ⊥-elim (¬ps [])
58+ ¬All⇒Any {xs = []} ¬ps = contradiction [] ¬ps
6059 ¬All⇒Any {xs = x ∷# xs} ¬ps with P? x
6160 ... | true because [p] = there (¬All⇒Any (¬ps ∘′ (invert [p] ∷_)))
6261 ... | false because [¬p] = here (invert [¬p])
6362
6463 ¬Any⇒All : {xs : List# A R} → ¬ (Any P xs) → All (∁ P) xs
6564 ¬Any⇒All {xs = []} ¬ps = []
6665 ¬Any⇒All {xs = x ∷# xs} ¬ps with P? x
67- ... | true because [p] = ⊥-elim (¬ps ( here (invert [p])))
66+ ... | true because [p] = contradiction ( here (invert [p])) ¬ps
6867 ... | false because [¬p] = invert [¬p] ∷ ¬Any⇒All (¬ps ∘′ there)
6968
7069------------------------------------------------------------------------
0 commit comments