Skip to content

Commit 8365433

Browse files
authored
[Refractor] contradiction over ⊥-elim in trans∧tri⇒respʳ & trans∧tri⇒respˡ def (#2657)
* [Refractor] contradiction over ⊥-elim in trans∧tri⇒respʳ & trans∧tri⇒respˡ def * [Refractor] contradiction over ⊥-elim in trans∧tri⇒respʳ & trans∧tri⇒respˡ def * contradiction over bot/elim
1 parent 98ab95e commit 8365433

File tree

1 file changed

+6
-7
lines changed

1 file changed

+6
-7
lines changed

src/Relation/Binary/Consequences.agda

+6-7
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,13 @@
88

99
module Relation.Binary.Consequences where
1010

11-
open import Data.Empty using (⊥-elim)
1211
open import Data.Product.Base using (_,_)
1312
open import Data.Sum.Base as Sum using (inj₁; inj₂; [_,_]′)
1413
open import Function.Base using (_∘_; _∘₂_; _$_; flip)
1514
open import Level using (Level)
1615
open import Relation.Binary.Core
1716
open import Relation.Binary.Definitions
18-
open import Relation.Nullary.Negation.Core using (¬_)
17+
open import Relation.Nullary.Negation.Core using (¬_; contradiction)
1918
open import Relation.Nullary.Decidable.Core
2019
using (yes; no; recompute; map′; dec⇒maybe)
2120
open import Relation.Unary using (∁; Pred)
@@ -121,7 +120,7 @@ module _ {_≈_ : Rel A ℓ₁} {_<_ : Rel A ℓ₂} where
121120
irrefl (antisym x<y y<x) x<y
122121

123122
asym⇒antisym : Asymmetric _<_ Antisymmetric _≈_ _<_
124-
asym⇒antisym asym x<y y<x = ⊥-elim (asym x<y y<x)
123+
asym⇒antisym asym x<y y<x = contradiction y<x (asym x<y)
125124

126125
asym⇒irr : _<_ Respects₂ _≈_ Symmetric _≈_
127126
Asymmetric _<_ Irreflexive _≈_ _<_
@@ -157,16 +156,16 @@ module _ {_≈_ : Rel A ℓ₁} {_<_ : Rel A ℓ₂} where
157156
_<_ Respectsʳ _≈_
158157
trans∧tri⇒respʳ sym ≈-tr <-tr tri {x} {y} {z} y≈z x<y with tri x z
159158
... | tri< x<z _ _ = x<z
160-
... | tri≈ _ x≈z _ = ⊥-elim (tri⇒irr tri (≈-tr x≈z (sym y≈z)) x<y)
161-
... | tri> _ _ z<x = ⊥-elim (tri⇒irr tri (sym y≈z) (<-tr z<x x<y))
159+
... | tri≈ _ x≈z _ = contradiction x<y (tri⇒irr tri (≈-tr x≈z (sym y≈z)))
160+
... | tri> _ _ z<x = contradiction (<-tr z<x x<y) (tri⇒irr tri (sym y≈z))
162161

163162
trans∧tri⇒respˡ : Transitive _≈_
164163
Transitive _<_ Trichotomous _≈_ _<_
165164
_<_ Respectsˡ _≈_
166165
trans∧tri⇒respˡ ≈-tr <-tr tri {z} {_} {y} x≈y x<z with tri y z
167166
... | tri< y<z _ _ = y<z
168-
... | tri≈ _ y≈z _ = ⊥-elim (tri⇒irr tri (≈-tr x≈y y≈z) x<z)
169-
... | tri> _ _ z<y = ⊥-elim (tri⇒irr tri x≈y (<-tr x<z z<y))
167+
... | tri≈ _ y≈z _ = contradiction x<z (tri⇒irr tri (≈-tr x≈y y≈z))
168+
... | tri> _ _ z<y = contradiction (<-tr x<z z<y) (tri⇒irr tri x≈y)
170169

171170
trans∧tri⇒resp : Symmetric _≈_ Transitive _≈_
172171
Transitive _<_ Trichotomous _≈_ _<_

0 commit comments

Comments
 (0)