File tree Expand file tree Collapse file tree 4 files changed +25
-9
lines changed Expand file tree Collapse file tree 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
10481048
10491049* In ` Algebra.Core ` the operations ` Opₗ ` and ` Opᵣ ` have moved to ` Algebra.Module.Core ` .
10501050
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+
10511055* In ` Codata.Guarded.Stream ` the following functions have been modified to have simpler definitions:
10521056 * ` cycle `
10531057 * ` interleave⁺ `
Original file line number Diff line number Diff line change @@ -27,18 +27,31 @@ open RawMagma M renaming (Carrier to A)
2727
2828infix 5 _∣ˡ_ _∤ˡ_ _∣ʳ_ _∤ʳ_ _∣_ _∤_
2929
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
3444
3545_∤ˡ_ : Rel A (a ⊔ ℓ)
3646x ∤ˡ y = ¬ x ∣ˡ y
3747
3848-- Divisibility from the right
3949
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
4255
4356_∤ʳ_ : Rel A (a ⊔ ℓ)
4457x ∤ʳ y = ¬ x ∣ʳ y
Original file line number Diff line number Diff line change @@ -18,7 +18,7 @@ open Magma M
1818-- Re-export divisibility relations publicly
1919
2020open import Algebra.Definitions.RawMagma rawMagma public
21- using (_∣_; _∤_; _∣∣_; _∤∤_; _∣ˡ_; _∤ˡ_; _∣ʳ_; _∤ʳ_)
21+ using (_∣_; _∤_; _∣∣_; _∤∤_; _∣ˡ_; _∤ˡ_; _∣ʳ_; _∤ʳ_; _,_ )
2222
2323------------------------------------------------------------------------
2424-- Properties of divisibility
Original file line number Diff line number Diff line change 1212module Data.Nat.Base where
1313
1414open import Algebra.Bundles.Raw using (RawMagma; RawMonoid; RawNearSemiring; RawSemiring)
15- open import Algebra.Definitions.RawMagma using (_∣ˡ_)
15+ open import Algebra.Definitions.RawMagma using (_∣ˡ_; _,_ )
1616open import Data.Bool.Base using (Bool; true; false; T; not)
1717open import Data.Parity.Base using (Parity; 0ℙ; 1ℙ)
18- open import Data.Product.Base using (_,_)
1918open import Level using (0ℓ)
2019open import Relation.Binary.Core using (Rel)
2120open import Relation.Binary.PropositionalEquality.Core
You can’t perform that action at this time.
0 commit comments