| 1 |
------------------------------------------------------------------------ |
| 2 |
-- The Agda standard library |
| 3 |
-- |
| 4 |
-- Properties of divisibility over commutative magmas |
| 5 |
------------------------------------------------------------------------ |
| 6 |
|
| 7 |
{-# OPTIONS --cubical-compatible --safe #-} |
| 8 |
|
| 9 |
open import Algebra using (CommutativeMagma) |
| 10 |
|
| 11 |
module Algebra.Properties.CommutativeMagma.Divisibility |
| 12 |
{a ℓ} (CM : CommutativeMagma a ℓ) |
| 13 |
where |
| 14 |
|
| 15 |
open import Data.Product.Base using (_×_; _,_) |
| 16 |
|
| 17 |
open CommutativeMagma CM using (magma; _≈_; _∙_; comm) |
| 18 |
|
| 19 |
------------------------------------------------------------------------ |
| 20 |
-- Re-export the contents of magmas |
| 21 |
|
| 22 |
open import Algebra.Properties.Magma.Divisibility magma public |
| 23 |
using (_∣_; _,_) |
| 24 |
renaming ( ∣ʳ-respʳ-≈ to ∣-respʳ-≈ |
| 25 |
; ∣ʳ-respˡ-≈ to ∣-respˡ-≈ |
| 26 |
; ∣ʳ-resp-≈ to ∣-resp-≈ |
| 27 |
; x∣ʳyx to x∣yx |
| 28 |
; xy≈z⇒y∣ʳz to xy≈z⇒y∣z |
| 29 |
) |
| 30 |
|
| 31 |
------------------------------------------------------------------------ |
| 32 |
-- Further properties |
| 33 |
|
| 34 |
x∣xy : ∀ x y → x ∣ x ∙ y |
| 35 |
x∣xy x y = y , comm y x |
| 36 |
|
| 37 |
xy≈z⇒x∣z : ∀ x y {z} → x ∙ y ≈ z → x ∣ z |
| 38 |
xy≈z⇒x∣z x y xy≈z = ∣-respʳ-≈ xy≈z (x∣xy x y) |
| 39 |
|
| 40 |
x|xy∧y|xy : ∀ x y → (x ∣ x ∙ y) × (y ∣ x ∙ y) |
| 41 |
x|xy∧y|xy x y = x∣xy x y , x∣yx y x |
| 42 |
|
| 43 |
xy≈z⇒x|z∧y|z : ∀ x y {z} → x ∙ y ≈ z → x ∣ z × y ∣ z |
| 44 |
xy≈z⇒x|z∧y|z x y xy≈z = xy≈z⇒x∣z x y xy≈z , xy≈z⇒y∣z x y xy≈z |
| 45 |
|
| 46 |
------------------------------------------------------------------------ |
| 47 |
-- DEPRECATED NAMES |
| 48 |
------------------------------------------------------------------------ |
| 49 |
-- Please use the new names as continuing support for the old names is |
| 50 |
-- not guaranteed. |
| 51 |
|
| 52 |
-- Version 2.2 |
| 53 |
|
| 54 |
∣-factors = x|xy∧y|xy |
| 55 |
{-# WARNING_ON_USAGE ∣-factors |
| 56 |
"Warning: ∣-factors was deprecated in v2.2. |
| 57 |
Please use x|xy∧y|xy instead. " |
| 58 |
#-} |
| 59 |
∣-factors-≈ = xy≈z⇒x|z∧y|z |
| 60 |
{-# WARNING_ON_USAGE ∣-factors-≈ |
| 61 |
"Warning: ∣-factors-≈ was deprecated in v2.2. |
| 62 |
Please use xy≈z⇒x|z∧y|z instead. " |
| 63 |
#-} |