Debian Codegraph @

src/Algebra/Properties/Ring.agda

raw
1 ------------------------------------------------------------------------
2 -- The Agda standard library
3 --
4 -- Some basic properties of Rings
5 ------------------------------------------------------------------------
6
7 {-# OPTIONS --cubical-compatible --safe #-}
8
9 open import Algebra using (Ring)
10
11 module Algebra.Properties.Ring {r₁ r₂} (R : Ring r₁ r₂) where
12
13 open Ring R
14
15 import Algebra.Properties.RingWithoutOne as RingWithoutOneProperties
16 open import Function.Base using (_$_)
17 open import Relation.Binary.Reasoning.Setoid setoid
18 open import Algebra.Definitions _≈_
19
20 ------------------------------------------------------------------------
21 -- Export properties of rings without a 1#.
22
23 open RingWithoutOneProperties ringWithoutOne public
24
25 ------------------------------------------------------------------------
26 -- Extra properties of 1#
27
28 -1*x≈-x : ∀ x → - 1# * x ≈ - x
29 -1*x≈-x x = begin
30 - 1# * x ≈⟨ -‿distribˡ-* 1# x ⟨
31 - (1# * x) ≈⟨ -‿cong ( *-identityˡ x ) ⟩
32 - x ∎