Skip to content

Commit dfa9ed6

Browse files
bsauljamesmckinna
andauthored
Rename overloaded sym in apartness (#2576)
* rename apartness sym to #-sym * update CHANGLOG * fix ws * remove redundant #-sym * rename other imports * move to bug-fixes * fix ws * Update CHANGELOG.md --------- Co-authored-by: jamesmckinna <[email protected]>
1 parent fc26114 commit dfa9ed6

File tree

3 files changed

+9
-24
lines changed

3 files changed

+9
-24
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,10 @@ Highlights
99
Bug-fixes
1010
---------
1111

12+
* In `Algebra.Apartness.Structures`, renamed `sym` from `IsApartnessRelation`
13+
to `#-sym` in order to avoid overloaded projection.
14+
`irrefl` and `cotrans` are similarly renamed for the sake of consistency.
15+
1216
Non-backwards compatible changes
1317
--------------------------------
1418

src/Algebra/Apartness/Properties/HeytingCommutativeRing.agda

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -64,30 +64,6 @@ x#0y#0→xy#0 {x} {y} x#0 y#0 = helper (#⇒invertible x#0) (#⇒invertible y#0)
6464
y⁻¹ * (y - 0#) ≈⟨ y⁻¹*y≈1 ⟩
6565
1# ∎
6666

67-
#-sym : Symmetric _#_
68-
#-sym {x} {y} x#y = invertibleˡ⇒# (- x-y⁻¹ , x-y⁻¹*y-x≈1)
69-
where
70-
open ≈-Reasoning setoid
71-
InvX-Y : Invertible _≈_ 1# _*_ (x - y)
72-
InvX-Y = #⇒invertible x#y
73-
74-
x-y⁻¹ = InvX-Y .proj₁
75-
76-
y-x≈-[x-y] : y - x ≈ - (x - y)
77-
y-x≈-[x-y] = begin
78-
y - x ≈⟨ +-congʳ (-‿involutive y) ⟨
79-
- - y - x ≈⟨ -‿anti-homo-+ x (- y) ⟨
80-
- (x - y) ∎
81-
82-
x-y⁻¹*y-x≈1 : (- x-y⁻¹) * (y - x) ≈ 1#
83-
x-y⁻¹*y-x≈1 = begin
84-
(- x-y⁻¹) * (y - x) ≈⟨ -‿distribˡ-* x-y⁻¹ (y - x) ⟨
85-
- (x-y⁻¹ * (y - x)) ≈⟨ -‿cong (*-congˡ y-x≈-[x-y]) ⟩
86-
- (x-y⁻¹ * - (x - y)) ≈⟨ -‿cong (-‿distribʳ-* x-y⁻¹ (x - y)) ⟨
87-
- - (x-y⁻¹ * (x - y)) ≈⟨ -‿involutive (x-y⁻¹ * ((x - y))) ⟩
88-
x-y⁻¹ * (x - y) ≈⟨ InvX-Y .proj₂ .proj₁ ⟩
89-
1# ∎
90-
9167
#-congʳ : x ≈ y x # z y # z
9268
#-congʳ {x} {y} {z} x≈y x#z = helper (#⇒invertible x#z)
9369
where

src/Algebra/Apartness/Structures.agda

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,11 @@ record IsHeytingCommutativeRing : Set (c ⊔ ℓ₁ ⊔ ℓ₂) where
3434

3535
open IsCommutativeRing isCommutativeRing public
3636
open IsApartnessRelation isApartnessRelation public
37+
renaming
38+
( irrefl to #-irrefl
39+
; sym to #-sym
40+
; cotrans to #-cotrans
41+
)
3742

3843
field
3944
#⇒invertible : {x y} x # y Invertible 1# _*_ (x - y)

0 commit comments

Comments
 (0)