Debian Codegraph @

src/Algebra/Properties/Semigroup/Divisibility.agda

raw
1 ------------------------------------------------------------------------
2 -- The Agda standard library
3 --
4 -- Properties of divisibility over semigroups
5 ------------------------------------------------------------------------
6
7 {-# OPTIONS --cubical-compatible --safe #-}
8
9 open import Algebra.Bundles using (Semigroup)
10
11 module Algebra.Properties.Semigroup.Divisibility
12 {a ℓ} (S : Semigroup a ℓ) where
13
14 open import Data.Product.Base using (_,_)
15 open import Relation.Binary.Definitions using (Transitive)
16
17 open Semigroup S
18
19 ------------------------------------------------------------------------
20 -- Re-export magma divisibility
21
22 open import Algebra.Properties.Magma.Divisibility magma public
23
24 ------------------------------------------------------------------------
25 -- Properties of _∣ʳ_
26
27 x∣ʳy⇒x∣ʳzy : ∀ {x y} z → x ∣ʳ y → x ∣ʳ z ∙ y
28 x∣ʳy⇒x∣ʳzy z (p , px≈y) = z ∙ p , trans (assoc z p _) (∙-congˡ px≈y)
29
30 x∣ʳy⇒xz∣ʳyz : ∀ {x y} z → x ∣ʳ y → x ∙ z ∣ʳ y ∙ z
31 x∣ʳy⇒xz∣ʳyz z (p , px≈y) = p , trans (sym (assoc p _ z)) (∙-congʳ px≈y)
32
33 ∣ʳ-trans : Transitive _∣ʳ_
34 ∣ʳ-trans (p , px≈y) (q , qy≈z) =
35 q ∙ p , trans (assoc q p _) (trans (∙-congˡ px≈y) qy≈z)
36
37 ------------------------------------------------------------------------
38 -- Properties of _∣ˡ__
39
40 x∣ˡy⇒x∣ˡyz : ∀ {x y} z → x ∣ˡ y → x ∣ˡ y ∙ z
41 x∣ˡy⇒x∣ˡyz z (p , xp≈y) = p ∙ z , trans (sym (assoc _ p z)) (∙-congʳ xp≈y)
42
43 x∣ˡy⇒zx∣ˡzy : ∀ {x y} z → x ∣ˡ y → z ∙ x ∣ˡ z ∙ y
44 x∣ˡy⇒zx∣ˡzy z (p , xp≈y) = p , trans (assoc z _ p) (∙-congˡ xp≈y)
45
46 ∣ˡ-trans : Transitive _∣ˡ_
47 ∣ˡ-trans (p , xp≈y) (q , yq≈z) =
48 p ∙ q , trans (sym (assoc _ p q)) (trans (∙-congʳ xp≈y) yq≈z)
49
50 ------------------------------------------------------------------------
51 -- Properties of _∥_
52
53 ∥-trans : Transitive _∥_
54 ∥-trans (x∣y , y∣x) (y∣z , z∣y) = ∣ʳ-trans x∣y y∣z , ∣ʳ-trans z∣y y∣x
55
56
57 ------------------------------------------------------------------------
58 -- DEPRECATED NAMES
59 ------------------------------------------------------------------------
60 -- Please use the new names as continuing support for the old names is
61 -- not guaranteed.
62
63 -- Version 2.3
64
65 ∣∣-trans = ∥-trans
66 {-# WARNING_ON_USAGE ∣∣-trans
67 "Warning: ∣∣-trans was deprecated in v2.3.
68 Please use ∥-trans instead. "
69 #-}
70
71 ∣-trans = ∣ʳ-trans
72 {-# WARNING_ON_USAGE ∣-trans
73 "Warning: ∣-trans was deprecated in v2.3.
74 Please use ∣ʳ-trans instead. "
75 #-}