Skip to content

Commit baee917

Browse files
authored
[Refractor] contradiction over ⊥-elim in (#2672)
1 parent 53baaa2 commit baee917

File tree

1 file changed

+10
-9
lines changed

1 file changed

+10
-9
lines changed

src/Data/List/Relation/Binary/Infix/Heterogeneous/Properties.agda

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,12 @@ module Data.List.Relation.Binary.Infix.Heterogeneous.Properties where
1010

1111
open import Level using (Level; _⊔_)
1212
open import Data.Bool.Base using (true; false)
13-
open import Data.Empty using (⊥-elim)
1413
open import Data.List.Base as List using (List; []; _∷_; length; map; filter; replicate)
1514
open import Data.List.Relation.Binary.Infix.Heterogeneous
1615
open import Data.List.Relation.Binary.Prefix.Heterogeneous as Prefix
1716
using (Prefix; []; _∷_)
17+
open import Data.List.Relation.Binary.Pointwise.Base as Pointwise
18+
using (Pointwise)
1819
import Data.List.Relation.Binary.Prefix.Heterogeneous.Properties as Prefix
1920
open import Data.List.Relation.Binary.Suffix.Heterogeneous as Suffix
2021
using (Suffix; here; there)
@@ -28,8 +29,8 @@ open import Relation.Unary as U using (Pred)
2829
open import Relation.Binary.Core using (REL; _⇒_)
2930
open import Relation.Binary.Definitions using (Decidable; Trans; Antisym)
3031
open import Relation.Binary.PropositionalEquality.Core using (_≢_; refl; cong)
31-
open import Data.List.Relation.Binary.Pointwise.Base as Pointwise
32-
using (Pointwise)
32+
open import Relation.Nullary.Negation.Core using (contradiction)
33+
3334

3435

3536
private
@@ -99,20 +100,20 @@ module _ {c t} {C : Set c} {T : REL A C t} where
99100
antisym : Antisym R S T Antisym (Infix R) (Infix S) (Pointwise T)
100101
antisym asym (here p) (here q) = Prefix.antisym asym p q
101102
antisym asym {i = a ∷ as} {j = bs} p@(here _) (there q)
102-
= ⊥-elim $′ ℕ.<-irrefl refl $′ begin-strict
103+
= contradiction (begin-strict
103104
length as <⟨ length-mono p ⟩
104105
length bs ≤⟨ length-mono q ⟩
105-
length as ∎ where open ℕ.≤-Reasoning
106+
length as ∎) (ℕ.<-irrefl refl) where open ℕ.≤-Reasoning
106107
antisym asym {i = as} {j = b ∷ bs} (there p) q@(here _)
107-
= ⊥-elim $′ ℕ.<-irrefl refl $′ begin-strict
108+
= contradiction (begin-strict
108109
length bs <⟨ length-mono q ⟩
109110
length as ≤⟨ length-mono p ⟩
110-
length bs ∎ where open ℕ.≤-Reasoning
111+
length bs ∎) (ℕ.<-irrefl refl) where open ℕ.≤-Reasoning
111112
antisym asym {i = a ∷ as} {j = b ∷ bs} (there p) (there q)
112-
= ⊥-elim $′ ℕ.<-irrefl refl $′ begin-strict
113+
= contradiction (begin-strict
113114
length as <⟨ length-mono p ⟩
114115
length bs <⟨ length-mono q ⟩
115-
length as ∎ where open ℕ.≤-Reasoning
116+
length as ∎) (ℕ.<-irrefl refl) where open ℕ.≤-Reasoning
116117

117118
------------------------------------------------------------------------
118119
-- map

0 commit comments

Comments
 (0)