Debian Codegraph @

src/Algebra/Module/Definitions/Left.agda

raw
1 ------------------------------------------------------------------------
2 -- The Agda standard library
3 --
4 -- Properties of left-scaling
5 ------------------------------------------------------------------------
6
7 {-# OPTIONS --cubical-compatible --safe #-}
8
9 open import Relation.Binary.Core
10 using (Rel; _Preserves_⟶_; _Preserves₂_⟶_⟶_)
11
12 -- The properties are parameterised by the two carriers and
13 -- the result equality.
14
15 module Algebra.Module.Definitions.Left
16 {a b ℓb} (A : Set a) {B : Set b} (_≈_ : Rel B ℓb)
17 where
18
19 ------------------------------------------------------------------------
20 -- Binary operations
21
22 open import Algebra.Core using (Op₂)
23 open import Algebra.Module.Core using (Opₗ)
24
25 ------------------------------------------------------------------------
26 -- Properties of operations
27
28 LeftIdentity : A → Opₗ A B → Set _
29 LeftIdentity a _∙ᴮ_ = ∀ m → (a ∙ᴮ m) ≈ m
30
31 Associative : Op₂ A → Opₗ A B → Set _
32 Associative _∙ᴬ_ _∙ᴮ_ = ∀ x y m → ((x ∙ᴬ y) ∙ᴮ m) ≈ (x ∙ᴮ (y ∙ᴮ m))
33
34 infix 4 _DistributesOverˡ_ _DistributesOverʳ_⟶_
35
36 _DistributesOverˡ_ : Opₗ A B → Op₂ B → Set _
37 _*_ DistributesOverˡ _+_ =
38 ∀ x m n → (x * (m + n)) ≈ ((x * m) + (x * n))
39
40 _DistributesOverʳ_⟶_ : Opₗ A B → Op₂ A → Op₂ B → Set _
41 _*_ DistributesOverʳ _+ᴬ_ ⟶ _+ᴮ_ =
42 ∀ x m n → ((m +ᴬ n) * x) ≈ ((m * x) +ᴮ (n * x))
43
44 LeftZero : A → B → Opₗ A B → Set _
45 LeftZero zᴬ zᴮ _∙_ = ∀ x → (zᴬ ∙ x) ≈ zᴮ
46
47 RightZero : B → Opₗ A B → Set _
48 RightZero z _∙_ = ∀ x → (x ∙ z) ≈ z
49
50 Commutative : Opₗ A B → Set _
51 Commutative _∙_ = ∀ x y m → (x ∙ (y ∙ m)) ≈ (y ∙ (x ∙ m))
52
53 LeftCongruent : Opₗ A B → Set _
54 LeftCongruent _∙_ = ∀ {x} → (x ∙_) Preserves _≈_ ⟶ _≈_
55
56 RightCongruent : ∀ {ℓa} → Rel A ℓa → Opₗ A B → Set _
57 RightCongruent ≈ᴬ _∙_ = ∀ {m} → (_∙ m) Preserves ≈ᴬ ⟶ _≈_
58
59 Congruent : ∀ {ℓa} → Rel A ℓa → Opₗ A B → Set _
60 Congruent ≈ᴬ ∙ = ∙ Preserves₂ ≈ᴬ ⟶ _≈_ ⟶ _≈_