| 1 |
------------------------------------------------------------------------ |
| 2 |
-- The Agda standard library |
| 3 |
-- |
| 4 |
-- This module is DEPRECATED. |
| 5 |
------------------------------------------------------------------------ |
| 6 |
|
| 7 |
{-# OPTIONS --cubical-compatible --safe #-} |
| 8 |
|
| 9 |
open import Algebra |
| 10 |
|
| 11 |
module Algebra.Operations.Ring |
| 12 |
{ℓ₁ ℓ₂} (ring : RawRing ℓ₁ ℓ₂) |
| 13 |
where |
| 14 |
|
| 15 |
{-# WARNING_ON_IMPORT |
| 16 |
"Algebra.Operations.Ring was deprecated in v1.5. |
| 17 |
Use Algebra.Properties.Semiring.Exp(.TCOptimised) instead." |
| 18 |
#-} |
| 19 |
|
| 20 |
open import Data.Nat.Base as ℕ using (ℕ; suc; zero) |
| 21 |
|
| 22 |
open RawRing ring |
| 23 |
|
| 24 |
infixr 8 _^_+1 |
| 25 |
_^_+1 : Carrier → ℕ → Carrier |
| 26 |
x ^ zero +1 = x |
| 27 |
x ^ suc n +1 = (x ^ n +1) * x |
| 28 |
|
| 29 |
infixr 8 _^_ |
| 30 |
_^_ : Carrier → ℕ → Carrier |
| 31 |
x ^ zero = 1# |
| 32 |
x ^ suc i = x ^ i +1 |
| 33 |
{-# INLINE _^_ #-} |