Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@ Highlights
Bug-fixes
---------

* In `Algebra.Apartness.Structures`, renamed `sym` from `IsApartnessRelation`
to `#-sym` in order to avoid overloaded projection.
`irrefl` and `cotrans` are similarly renamed for the sake of consistency.

Non-backwards compatible changes
--------------------------------

Expand Down
24 changes: 0 additions & 24 deletions src/Algebra/Apartness/Properties/HeytingCommutativeRing.agda
Original file line number Diff line number Diff line change
Expand Up @@ -64,30 +64,6 @@ x#0y#0→xy#0 {x} {y} x#0 y#0 = helper (#⇒invertible x#0) (#⇒invertible y#0)
y⁻¹ * (y - 0#) ≈⟨ y⁻¹*y≈1 ⟩
1# ∎

#-sym : Symmetric _#_
#-sym {x} {y} x#y = invertibleˡ⇒# (- x-y⁻¹ , x-y⁻¹*y-x≈1)
where
open ≈-Reasoning setoid
InvX-Y : Invertible _≈_ 1# _*_ (x - y)
InvX-Y = #⇒invertible x#y

x-y⁻¹ = InvX-Y .proj₁

y-x≈-[x-y] : y - x ≈ - (x - y)
y-x≈-[x-y] = begin
y - x ≈⟨ +-congʳ (-‿involutive y) ⟨
- - y - x ≈⟨ -‿anti-homo-+ x (- y) ⟨
- (x - y) ∎

x-y⁻¹*y-x≈1 : (- x-y⁻¹) * (y - x) ≈ 1#
x-y⁻¹*y-x≈1 = begin
(- x-y⁻¹) * (y - x) ≈⟨ -‿distribˡ-* x-y⁻¹ (y - x) ⟨
- (x-y⁻¹ * (y - x)) ≈⟨ -‿cong (*-congˡ y-x≈-[x-y]) ⟩
- (x-y⁻¹ * - (x - y)) ≈⟨ -‿cong (-‿distribʳ-* x-y⁻¹ (x - y)) ⟨
- - (x-y⁻¹ * (x - y)) ≈⟨ -‿involutive (x-y⁻¹ * ((x - y))) ⟩
x-y⁻¹ * (x - y) ≈⟨ InvX-Y .proj₂ .proj₁ ⟩
1# ∎

#-congʳ : x ≈ y → x # z → y # z
#-congʳ {x} {y} {z} x≈y x#z = helper (#⇒invertible x#z)
where
Expand Down
5 changes: 5 additions & 0 deletions src/Algebra/Apartness/Structures.agda
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,11 @@ record IsHeytingCommutativeRing : Set (c ⊔ ℓ₁ ⊔ ℓ₂) where

open IsCommutativeRing isCommutativeRing public
open IsApartnessRelation isApartnessRelation public
renaming
( irrefl to #-irrefl
; sym to #-sym
; cotrans to #-cotrans
)

field
#⇒invertible : ∀ {x y} → x # y → Invertible 1# _*_ (x - y)
Expand Down