Skip to content

Commit 60d3d62

Browse files
jmougeotjamesmckinna
authored andcommitted
[Refractor] contradiction over ⊥-elim in (agda#2669)
1 parent 6604e16 commit 60d3d62

File tree

2 files changed

+3
-6
lines changed

2 files changed

+3
-6
lines changed

src/Data/List/Fresh/Relation/Unary/All/Properties.agda

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,10 @@ module Data.List.Fresh.Relation.Unary.All.Properties where
1010

1111
open import Data.List.Fresh using (List#; []; cons; _∷#_; _#_)
1212
open import Data.List.Fresh.Relation.Unary.All using (All; []; _∷_; append)
13-
open import Data.Empty using (⊥; ⊥-elim)
1413
open import Data.Nat.Base using (ℕ; zero; suc)
1514
open import Data.Product.Base using (_,_)
1615
open import Function.Base using (_∘′_)
1716
open import Level using (Level; _⊔_; Lift)
18-
open import Relation.Nullary.Negation.Core using (¬_)
1917
open import Relation.Unary as U using (Pred)
2018
open import Relation.Binary.Core using (Rel)
2119
open import Relation.Binary.PropositionalEquality.Core using (_≡_; refl; cong)

src/Data/List/Fresh/Relation/Unary/Any/Properties.agda

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99
module Data.List.Fresh.Relation.Unary.Any.Properties where
1010

1111
open import Data.Bool.Base using (true; false)
12-
open import Data.Empty using (⊥; ⊥-elim)
1312
open import Data.List.Fresh using (List#; _∷#_; _#_; NonEmpty; cons; length; [])
1413
open import Data.List.Fresh.Relation.Unary.All using (All; _∷_; append; [])
1514
open 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₂)
1918
open import Function.Base using (_∘′_)
2019
open import Level using (Level; _⊔_; Lift)
2120
open import Relation.Nullary.Reflects using (invert)
22-
open import Relation.Nullary.Negation.Core using (¬_)
2321
open import Relation.Nullary.Decidable.Core
2422
open import Relation.Unary as U using (Pred)
2523
open import Relation.Binary.Core using (Rel)
2624
open import Relation.Nary using (∀[_]; _⇒_; ∁; Decidable)
2725
open import Relation.Binary.PropositionalEquality.Core using (_≡_; refl; cong)
26+
open import Relation.Nullary.Negation.Core using (contradiction; ¬_)
2827

2928
private
3029
variable
@@ -56,15 +55,15 @@ module _ {R : Rel A r} {P : Pred A p} {Q : Pred A q} (P⇒¬Q : ∀[ P ⇒ ∁ Q
5655
module _ {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

Comments
 (0)