File tree 4 files changed +25
-9
lines changed
4 files changed +25
-9
lines changed Original file line number Diff line number Diff line change @@ -1048,6 +1048,10 @@ Non-backwards compatible changes
1048
1048
1049
1049
* In ` Algebra.Core ` the operations ` Opₗ ` and ` Opᵣ ` have moved to ` Algebra.Module.Core ` .
1050
1050
1051
+ * In ` Algebra.Definitions.RawMagma.Divisibility ` the definitions for ` _∣ˡ_ ` and ` _∣ʳ_ `
1052
+ have been changed from being defined as raw products to being defined as records. However,
1053
+ the record constructors are called ` _,_ ` so the changes required are minimal.
1054
+
1051
1055
* In ` Codata.Guarded.Stream ` the following functions have been modified to have simpler definitions:
1052
1056
* ` cycle `
1053
1057
* ` interleave⁺ `
Original file line number Diff line number Diff line change @@ -27,18 +27,31 @@ open RawMagma M renaming (Carrier to A)
27
27
28
28
infix 5 _∣ˡ_ _∤ˡ_ _∣ʳ_ _∤ʳ_ _∣_ _∤_
29
29
30
- -- Divisibility from the left
31
-
32
- _∣ˡ_ : Rel A (a ⊔ ℓ)
33
- x ∣ˡ y = ∃ λ q → (x ∙ q) ≈ y
30
+ -- Divisibility from the left.
31
+ --
32
+ -- This and, the definition of right divisibility below, are defined as
33
+ -- records rather than in terms of the base product type in order to
34
+ -- make the use of pattern synonyms more ergonomic (see #2216 for
35
+ -- further details). The record field names are not designed to be
36
+ -- used explicitly and indeed aren't re-exported publicly by
37
+ -- `Algebra.X.Properties.Divisibility` modules.
38
+
39
+ record _∣ˡ_ (x y : A) : Set (a ⊔ ℓ) where
40
+ constructor _,_
41
+ field
42
+ quotient : A
43
+ equality : x ∙ quotient ≈ y
34
44
35
45
_∤ˡ_ : Rel A (a ⊔ ℓ)
36
46
x ∤ˡ y = ¬ x ∣ˡ y
37
47
38
48
-- Divisibility from the right
39
49
40
- _∣ʳ_ : Rel A (a ⊔ ℓ)
41
- x ∣ʳ y = ∃ λ q → (q ∙ x) ≈ y
50
+ record _∣ʳ_ (x y : A) : Set (a ⊔ ℓ) where
51
+ constructor _,_
52
+ field
53
+ quotient : A
54
+ equality : quotient ∙ x ≈ y
42
55
43
56
_∤ʳ_ : Rel A (a ⊔ ℓ)
44
57
x ∤ʳ y = ¬ x ∣ʳ y
Original file line number Diff line number Diff line change @@ -18,7 +18,7 @@ open Magma M
18
18
-- Re-export divisibility relations publicly
19
19
20
20
open import Algebra.Definitions.RawMagma rawMagma public
21
- using (_∣_; _∤_; _∣∣_; _∤∤_; _∣ˡ_; _∤ˡ_; _∣ʳ_; _∤ʳ_)
21
+ using (_∣_; _∤_; _∣∣_; _∤∤_; _∣ˡ_; _∤ˡ_; _∣ʳ_; _∤ʳ_; _,_ )
22
22
23
23
------------------------------------------------------------------------
24
24
-- Properties of divisibility
Original file line number Diff line number Diff line change 12
12
module Data.Nat.Base where
13
13
14
14
open import Algebra.Bundles.Raw using (RawMagma; RawMonoid; RawNearSemiring; RawSemiring)
15
- open import Algebra.Definitions.RawMagma using (_∣ˡ_)
15
+ open import Algebra.Definitions.RawMagma using (_∣ˡ_; _,_ )
16
16
open import Data.Bool.Base using (Bool; true; false; T; not)
17
17
open import Data.Parity.Base using (Parity; 0ℙ; 1ℙ)
18
- open import Data.Product.Base using (_,_)
19
18
open import Level using (0ℓ)
20
19
open import Relation.Binary.Core using (Rel)
21
20
open import Relation.Binary.PropositionalEquality.Core
You can’t perform that action at this time.
0 commit comments