Skip to content

Commit

Permalink
Fix agda#2396 by removing redundant zero in IsNonAssociativeRing
Browse files Browse the repository at this point in the history
The zero field in the IsNonAssociativeRing was redundant, and could
be replaced with a proof based on the other properties.
  • Loading branch information
lexvanderstoep authored and = committed Jun 16, 2024
1 parent 18ab15e commit 12493b4
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions src/Algebra/Structures.agda
Original file line number Diff line number Diff line change
Expand Up @@ -799,7 +799,6 @@ record IsNonAssociativeRing (+ * : Op₂ A) (-_ : Op₁ A) (0# 1# : A) : Set (a
*-cong : Congruent₂ *
*-identity : Identity 1# *
distrib : * DistributesOver +
zero : Zero 0# *

open IsAbelianGroup +-isAbelianGroup public
renaming
Expand Down Expand Up @@ -827,18 +826,21 @@ record IsNonAssociativeRing (+ * : Op₂ A) (-_ : Op₁ A) (0# 1# : A) : Set (a
; isGroup to +-isGroup
)

zeroˡ : LeftZero 0# *
zeroˡ = proj₁ zero

zeroʳ : RightZero 0# *
zeroʳ = proj₂ zero

distribˡ : * DistributesOverˡ +
distribˡ = proj₁ distrib

distribʳ : * DistributesOverʳ +
distribʳ = proj₂ distrib

zeroˡ : LeftZero 0# *
zeroˡ = Consequences.assoc∧distribʳ∧idʳ∧invʳ⇒zeˡ setoid +-cong *-cong +-assoc distribʳ +-identityʳ -‿inverseʳ

zeroʳ : RightZero 0# *
zeroʳ = Consequences.assoc∧distribˡ∧idʳ∧invʳ⇒zeʳ setoid +-cong *-cong +-assoc distribˡ +-identityʳ -‿inverseʳ

zero : Zero 0# *
zero = zeroˡ , zeroʳ

*-isMagma : IsMagma *
*-isMagma = record
{ isEquivalence = isEquivalence
Expand Down

0 comments on commit 12493b4

Please sign in to comment.