| 1 |
------------------------------------------------------------------------ |
| 2 |
-- The Agda standard library |
| 3 |
-- |
| 4 |
-- Exponentiation over a semiring optimised for type-checking. |
| 5 |
------------------------------------------------------------------------ |
| 6 |
|
| 7 |
{-# OPTIONS --cubical-compatible --safe #-} |
| 8 |
|
| 9 |
open import Algebra.Bundles using (CommutativeSemiring) |
| 10 |
|
| 11 |
|
| 12 |
module Algebra.Properties.CommutativeSemiring.Exp.TCOptimised |
| 13 |
{a ℓ} (S : CommutativeSemiring a ℓ) where |
| 14 |
|
| 15 |
open CommutativeSemiring S |
| 16 |
open import Relation.Binary.Reasoning.Setoid setoid |
| 17 |
|
| 18 |
import Algebra.Properties.CommutativeMonoid.Mult.TCOptimised *-commutativeMonoid as Mult |
| 19 |
|
| 20 |
------------------------------------------------------------------------ |
| 21 |
-- Re-export definition and properties for semirings |
| 22 |
open import Data.Nat.Base as ℕ using (zero; suc) |
| 23 |
import Data.Nat.Properties as ℕ using (+-assoc; +-identityˡ; +-identityʳ) |
| 24 |
open import Relation.Binary.PropositionalEquality.Core using (_≡_) |
| 25 |
open import Algebra.Properties.Semiring.Exp.TCOptimised semiring public |
| 26 |
|
| 27 |
------------------------------------------------------------------------ |
| 28 |
-- Properties |
| 29 |
|
| 30 |
^-distrib-* : ∀ x y n → (x * y) ^ n ≈ x ^ n * y ^ n |
| 31 |
^-distrib-* = Mult.×-distrib-+ |