@@ -30,9 +30,8 @@ open import Data.Sum.Base using (_⊎_; [_,_]′; inj₁; inj₂)
3030import Data.Sign as Sign
3131open import Function.Base using (_on_; _$_; _∘_; flip)
3232open 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)
3635open import Relation.Binary.Core using (_⇒_; _Preserves_⟶_; _Preserves₂_⟶_⟶_)
3736open import Relation.Binary.Bundles
3837 using (Setoid; DecSetoid; Preorder; TotalPreorder; Poset; TotalOrder; DecTotalOrder; StrictPartialOrder; StrictTotalOrder; DenseLinearOrder)
@@ -43,7 +42,6 @@ open import Relation.Binary.Definitions
4342import Relation.Binary.Consequences as BC
4443open import Relation.Binary.PropositionalEquality
4544import Relation.Binary.Properties.Poset as PosetProperties
46- open import Relation.Nullary using (yes; no)
4745import Relation.Binary.Reasoning.Setoid as SetoidReasoning
4846
4947open import Algebra.Properties.CommutativeSemigroup ℤ.*-commutativeSemigroup
@@ -105,20 +103,20 @@ infix 4 _≃?_
105103_≃?_ : Decidable _≃_
106104p ≃? q = Dec.map′ *≡* drop-*≡* (↥ p ℤ.* ↧ q ℤ.≟ ↥ q ℤ.* ↧ p)
107105
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ℚᵘ)
110108
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
113111
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)
116114
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
122120
123121≃-isEquivalence : IsEquivalence _≃_
124122≃-isEquivalence = record
@@ -133,16 +131,16 @@ p ≃? q = Dec.map′ *≡* drop-*≡* (↥ p ℤ.* ↧ q ℤ.≟ ↥ q ℤ.*
133131 ; _≟_ = _≃?_
134132 }
135133
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
141139 }
142140
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
146144
147145≃-setoid : Setoid 0ℓ 0ℓ
148146≃-setoid = record
@@ -1127,11 +1125,11 @@ p≤q⇒0≤q-p {p} {q} p≤q = begin
11271125*-inverseʳ : ∀ p .{{_ : NonZero p}} → p * 1/ p ≃ 1ℚᵘ
11281126*-inverseʳ p = ≃-trans (*-comm p (1/ p)) (*-inverseˡ p)
11291127
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)
11321130 where instance
11331131 _ : 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)
11351133
11361134*-zeroˡ : LeftZero _≃_ 0ℚᵘ _*_
11371135*-zeroˡ p@record{} = *≡* refl
@@ -1142,8 +1140,8 @@ p≤q⇒0≤q-p {p} {q} p≤q = begin
11421140*-zero : Zero _≃_ 0ℚᵘ _*_
11431141*-zero = *-zeroˡ , *-zeroʳ
11441142
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
11471145 0ℚᵘ ≈˘⟨ *-zeroˡ 1/p-q ⟩
11481146 0ℚᵘ * 1/p-q ≈˘⟨ *-congʳ (p≃q⇒p-q≃0 p q p≃q) ⟩
11491147 (p - q) * 1/p-q ≈⟨ x*1/x≃1 ⟩
@@ -1390,18 +1388,18 @@ nonNeg*nonNeg⇒nonNeg p q = nonNegative
13901388 ; *-comm = *-comm
13911389 }
13921390
1393- +-*-isHeytingCommutativeRing : IsHeytingCommutativeRing _≃_ _≠ _ _+_ _*_ -_ 0ℚᵘ 1ℚᵘ
1391+ +-*-isHeytingCommutativeRing : IsHeytingCommutativeRing _≃_ _≄ _ _+_ _*_ -_ 0ℚᵘ 1ℚᵘ
13941392+-*-isHeytingCommutativeRing = record
13951393 { isCommutativeRing = +-*-isCommutativeRing
1396- ; isApartnessRelation = ≠ -isApartnessRelation
1397- ; #⇒invertible = ≠ ⇒invertible
1398- ; invertible⇒# = invertible⇒≠
1394+ ; isApartnessRelation = ≄ -isApartnessRelation
1395+ ; #⇒invertible = ≄ ⇒invertible
1396+ ; invertible⇒# = invertible⇒≄
13991397 }
14001398
1401- +-*-isHeytingField : IsHeytingField _≃_ _≠ _ _+_ _*_ -_ 0ℚᵘ 1ℚᵘ
1399+ +-*-isHeytingField : IsHeytingField _≃_ _≄ _ _+_ _*_ -_ 0ℚᵘ 1ℚᵘ
14021400+-*-isHeytingField = record
14031401 { isHeytingCommutativeRing = +-*-isHeytingCommutativeRing
1404- ; tight = ≠ -tight
1402+ ; tight = ≄ -tight
14051403 }
14061404
14071405------------------------------------------------------------------------
0 commit comments