@@ -30,9 +30,8 @@ open import Data.Sum.Base using (_⊎_; [_,_]′; inj₁; inj₂)
30
30
import Data.Sign as Sign
31
31
open import Function.Base using (_on_; _$_; _∘_; flip)
32
32
open import Level using (0ℓ)
33
- open import Relation.Nullary using (¬_; yes; no)
34
- import Relation.Nullary.Decidable as Dec
35
- open import Relation.Nullary.Negation using (contradiction; contraposition)
33
+ open import Relation.Nullary.Decidable.Core as Dec using (yes; no)
34
+ open import Relation.Nullary.Negation.Core using (¬_; contradiction)
36
35
open import Relation.Binary.Core using (_⇒_; _Preserves_⟶_; _Preserves₂_⟶_⟶_)
37
36
open import Relation.Binary.Bundles
38
37
using (Setoid; DecSetoid; Preorder; TotalPreorder; Poset; TotalOrder; DecTotalOrder; StrictPartialOrder; StrictTotalOrder; DenseLinearOrder)
@@ -43,7 +42,6 @@ open import Relation.Binary.Definitions
43
42
import Relation.Binary.Consequences as BC
44
43
open import Relation.Binary.PropositionalEquality
45
44
import Relation.Binary.Properties.Poset as PosetProperties
46
- open import Relation.Nullary using (yes; no)
47
45
import Relation.Binary.Reasoning.Setoid as SetoidReasoning
48
46
49
47
open import Algebra.Properties.CommutativeSemigroup ℤ.*-commutativeSemigroup
@@ -105,20 +103,20 @@ infix 4 _≃?_
105
103
_≃?_ : Decidable _≃_
106
104
p ≃? q = Dec.map′ *≡* drop-*≡* (↥ p ℤ.* ↧ q ℤ.≟ ↥ q ℤ.* ↧ p)
107
105
108
- 0≠ 1 : 0ℚᵘ ≠ 1ℚᵘ
109
- 0≠ 1 = Dec.from-no (0ℚᵘ ≃? 1ℚᵘ)
106
+ 0≄ 1 : 0ℚᵘ ≄ 1ℚᵘ
107
+ 0≄ 1 = Dec.from-no (0ℚᵘ ≃? 1ℚᵘ)
110
108
111
- ≃-≠ -irreflexive : Irreflexive _≃_ _≠ _
112
- ≃-≠ -irreflexive x≃y x≠ y = x≠ y x≃y
109
+ ≃-≄ -irreflexive : Irreflexive _≃_ _≄ _
110
+ ≃-≄ -irreflexive x≃y x≄ y = x≄ y x≃y
113
111
114
- ≠ -symmetric : Symmetric _≠ _
115
- ≠ -symmetric x≠ y y≃x = x≠ y (≃-sym y≃x)
112
+ ≄ -symmetric : Symmetric _≄ _
113
+ ≄ -symmetric x≄ y y≃x = x≄ y (≃-sym y≃x)
116
114
117
- ≠ -cotransitive : Cotransitive _≠ _
118
- ≠ -cotransitive {x} {y} x≠ y z with x ≃? z | z ≃? y
119
- ... | no x≠ z | _ = inj₁ x≠ z
120
- ... | yes _ | no z≠ y = inj₂ z≠ y
121
- ... | yes x≃z | yes z≃y = contradiction (≃-trans x≃z z≃y) x≠ y
115
+ ≄ -cotransitive : Cotransitive _≄ _
116
+ ≄ -cotransitive {x} {y} x≄ y z with x ≃? z | z ≃? y
117
+ ... | no x≄ z | _ = inj₁ x≄ z
118
+ ... | yes _ | no z≄ y = inj₂ z≄ y
119
+ ... | yes x≃z | yes z≃y = contradiction (≃-trans x≃z z≃y) x≄ y
122
120
123
121
≃-isEquivalence : IsEquivalence _≃_
124
122
≃-isEquivalence = record
@@ -133,16 +131,16 @@ p ≃? q = Dec.map′ *≡* drop-*≡* (↥ p ℤ.* ↧ q ℤ.≟ ↥ q ℤ.*
133
131
; _≟_ = _≃?_
134
132
}
135
133
136
- ≠ -isApartnessRelation : IsApartnessRelation _≃_ _≠ _
137
- ≠ -isApartnessRelation = record
138
- { irrefl = ≃-≠ -irreflexive
139
- ; sym = ≠ -symmetric
140
- ; cotrans = ≠ -cotransitive
134
+ ≄ -isApartnessRelation : IsApartnessRelation _≃_ _≄ _
135
+ ≄ -isApartnessRelation = record
136
+ { irrefl = ≃-≄ -irreflexive
137
+ ; sym = ≄ -symmetric
138
+ ; cotrans = ≄ -cotransitive
141
139
}
142
140
143
- ≠ -tight : Tight _≃_ _≠ _
144
- proj₁ (≠ -tight p q) ¬p≠ q = Dec.decidable-stable (p ≃? q) ¬p≠ q
145
- proj₂ (≠ -tight p q) p≃q p≠ q = p≠ q p≃q
141
+ ≄ -tight : Tight _≃_ _≄ _
142
+ proj₁ (≄ -tight p q) ¬p≄ q = Dec.decidable-stable (p ≃? q) ¬p≄ q
143
+ proj₂ (≄ -tight p q) p≃q p≄ q = p≄ q p≃q
146
144
147
145
≃-setoid : Setoid 0ℓ 0ℓ
148
146
≃-setoid = record
@@ -1127,11 +1125,11 @@ p≤q⇒0≤q-p {p} {q} p≤q = begin
1127
1125
*-inverseʳ : ∀ p .{{_ : NonZero p}} → p * 1/ p ≃ 1ℚᵘ
1128
1126
*-inverseʳ p = ≃-trans (*-comm p (1/ p)) (*-inverseˡ p)
1129
1127
1130
- ≠ ⇒invertible : p ≠ q → Invertible _≃_ 1ℚᵘ _*_ (p - q)
1131
- ≠ ⇒invertible {p} {q} p≠ q = _ , *-inverseˡ (p - q) , *-inverseʳ (p - q)
1128
+ ≄ ⇒invertible : p ≄ q → Invertible _≃_ 1ℚᵘ _*_ (p - q)
1129
+ ≄ ⇒invertible {p} {q} p≄ q = _ , *-inverseˡ (p - q) , *-inverseʳ (p - q)
1132
1130
where instance
1133
1131
_ : NonZero (p - q)
1134
- _ = ≢-nonZero (p≠ q ∘ p-q≃0⇒p≃q p q)
1132
+ _ = ≢-nonZero (p≄ q ∘ p-q≃0⇒p≃q p q)
1135
1133
1136
1134
*-zeroˡ : LeftZero _≃_ 0ℚᵘ _*_
1137
1135
*-zeroˡ p@record{} = *≡* refl
@@ -1142,8 +1140,8 @@ p≤q⇒0≤q-p {p} {q} p≤q = begin
1142
1140
*-zero : Zero _≃_ 0ℚᵘ _*_
1143
1141
*-zero = *-zeroˡ , *-zeroʳ
1144
1142
1145
- invertible⇒≠ : Invertible _≃_ 1ℚᵘ _*_ (p - q) → p ≠ q
1146
- invertible⇒≠ {p} {q} (1/p-q , 1/x*x≃1 , x*1/x≃1) p≃q = 0≠ 1 (begin
1143
+ invertible⇒≄ : Invertible _≃_ 1ℚᵘ _*_ (p - q) → p ≄ q
1144
+ invertible⇒≄ {p} {q} (1/p-q , 1/x*x≃1 , x*1/x≃1) p≃q = 0≄ 1 (begin
1147
1145
0ℚᵘ ≈˘⟨ *-zeroˡ 1/p-q ⟩
1148
1146
0ℚᵘ * 1/p-q ≈˘⟨ *-congʳ (p≃q⇒p-q≃0 p q p≃q) ⟩
1149
1147
(p - q) * 1/p-q ≈⟨ x*1/x≃1 ⟩
@@ -1390,18 +1388,18 @@ nonNeg*nonNeg⇒nonNeg p q = nonNegative
1390
1388
; *-comm = *-comm
1391
1389
}
1392
1390
1393
- +-*-isHeytingCommutativeRing : IsHeytingCommutativeRing _≃_ _≠ _ _+_ _*_ -_ 0ℚᵘ 1ℚᵘ
1391
+ +-*-isHeytingCommutativeRing : IsHeytingCommutativeRing _≃_ _≄ _ _+_ _*_ -_ 0ℚᵘ 1ℚᵘ
1394
1392
+-*-isHeytingCommutativeRing = record
1395
1393
{ isCommutativeRing = +-*-isCommutativeRing
1396
- ; isApartnessRelation = ≠ -isApartnessRelation
1397
- ; #⇒invertible = ≠ ⇒invertible
1398
- ; invertible⇒# = invertible⇒≠
1394
+ ; isApartnessRelation = ≄ -isApartnessRelation
1395
+ ; #⇒invertible = ≄ ⇒invertible
1396
+ ; invertible⇒# = invertible⇒≄
1399
1397
}
1400
1398
1401
- +-*-isHeytingField : IsHeytingField _≃_ _≠ _ _+_ _*_ -_ 0ℚᵘ 1ℚᵘ
1399
+ +-*-isHeytingField : IsHeytingField _≃_ _≄ _ _+_ _*_ -_ 0ℚᵘ 1ℚᵘ
1402
1400
+-*-isHeytingField = record
1403
1401
{ isHeytingCommutativeRing = +-*-isHeytingCommutativeRing
1404
- ; tight = ≠ -tight
1402
+ ; tight = ≄ -tight
1405
1403
}
1406
1404
1407
1405
------------------------------------------------------------------------
0 commit comments