Skip to content

Commit 403153d

Browse files
[Refractor] contradiction over ⊥-elim in antisymmetric def (agda#2665)
* [Refractor] contradiction over ⊥-elim in antisymmetric def * Update src/Data/List/Relation/Binary/Lex.agda whitespace --------- Co-authored-by: jamesmckinna <[email protected]>
1 parent 8a0c931 commit 403153d

File tree

1 file changed

+9
-8
lines changed

1 file changed

+9
-8
lines changed

src/Data/List/Relation/Binary/Lex.agda

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -8,23 +8,24 @@
88

99
module Data.List.Relation.Binary.Lex where
1010

11-
open import Data.Empty using (⊥; ⊥-elim)
1211
open import Data.Unit.Base using (⊤; tt)
1312
open import Data.Product.Base using (_×_; _,_; proj₁; proj₂; uncurry)
1413
open import Data.List.Base using (List; []; _∷_)
14+
open import Data.List.Relation.Binary.Pointwise.Base
15+
using (Pointwise; []; _∷_; head; tail)
1516
open import Data.Sum.Base using (_⊎_; inj₁; inj₂; [_,_])
1617
open import Function.Base using (_∘_; flip; id)
1718
open import Function.Bundles using (_⇔_; mk⇔)
1819
open import Level using (_⊔_)
19-
open import Relation.Nullary.Negation using (¬_)
20+
open import Relation.Nullary.Negation.Core using (¬_; contradiction)
2021
open import Relation.Nullary.Decidable as Dec
2122
using (Dec; yes; no; _×-dec_; _⊎-dec_)
2223
open import Relation.Binary.Core using (Rel)
2324
open import Relation.Binary.Structures using (IsEquivalence)
2425
open import Relation.Binary.Definitions
25-
using (Symmetric; Transitive; Irreflexive; Asymmetric; Antisymmetric; Decidable; _Respects₂_; _Respects_)
26-
open import Data.List.Relation.Binary.Pointwise.Base
27-
using (Pointwise; []; _∷_; head; tail)
26+
using (Symmetric; Transitive; Irreflexive; Asymmetric; Antisymmetric
27+
; Decidable; _Respects₂_; _Respects_)
28+
2829

2930
------------------------------------------------------------------------
3031
-- Re-exporting the core definitions and properties
@@ -57,9 +58,9 @@ module _ {a ℓ₁ ℓ₂} {A : Set a} {P : Set}
5758
where
5859
as : Antisymmetric _≋_ _<_
5960
as (base _) (base _) = []
60-
as (this x≺y) (this y≺x) = ⊥-elim (asym x≺y y≺x)
61-
as (this x≺y) (next y≈x ys<xs) = ⊥-elim (ir (sym y≈x) x≺y)
62-
as (next x≈y xs<ys) (this y≺x) = ⊥-elim (ir (sym x≈y) y≺x)
61+
as (this x≺y) (this y≺x) = contradiction y≺x (asym x≺y)
62+
as (this x≺y) (next y≈x ys<xs) = contradiction x≺y (ir (sym y≈x))
63+
as (next x≈y xs<ys) (this y≺x) = contradiction y≺x (ir (sym x≈y))
6364
as (next x≈y xs<ys) (next y≈x ys<xs) = x≈y ∷ as xs<ys ys<xs
6465

6566
toSum : {x y xs ys} (x ∷ xs) < (y ∷ ys) (x ≺ y ⊎ (x ≈ y × xs < ys))

0 commit comments

Comments
 (0)