Skip to content

Commit 5d31747

Browse files
committed
Merge branch 'master' into modular-arithmetic
2 parents 7e6fc80 + f767c72 commit 5d31747

File tree

105 files changed

+3526
-1031
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

105 files changed

+3526
-1031
lines changed

.github/workflows/ci-ubuntu.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,11 +76,11 @@ jobs:
7676
if [[ '${{ github.ref }}' == 'refs/heads/experimental' \
7777
|| '${{ github.base_ref }}' == 'experimental' ]]; then
7878
# Pick Agda version for experimental
79-
echo "AGDA_COMMIT=18cc53941e924b144c0f1f3953280ef726009f7e" >> "${GITHUB_ENV}";
79+
echo "AGDA_COMMIT=ef912c68fd329ad3046d156e3c1a70a7fec19ba1" >> "${GITHUB_ENV}";
8080
echo "AGDA_HTML_DIR=html/experimental" >> "${GITHUB_ENV}"
8181
else
8282
# Pick Agda version for master
83-
echo "AGDA_COMMIT=tags/v2.7.0.1" >> "${GITHUB_ENV}";
83+
echo "AGDA_COMMIT=tags/v2.8.0-rc3" >> "${GITHUB_ENV}";
8484
echo "AGDA_HTML_DIR=html/master" >> "${GITHUB_ENV}"
8585
fi
8686

CHANGELOG.md

Lines changed: 34 additions & 254 deletions
Original file line numberDiff line numberDiff line change
@@ -1,299 +1,79 @@
1-
Version 2.3-dev
1+
Version 2.4-dev
22
===============
33

4-
The library has been tested using Agda 2.7.0 and 2.7.0.1.
4+
The library has been tested using Agda 2.8.0.
55

66
Highlights
77
----------
88

99
Bug-fixes
1010
---------
1111

12-
* In `Algebra.Apartness.Structures`, renamed `sym` from `IsApartnessRelation`
13-
to `#-sym` in order to avoid overloaded projection.
14-
`irrefl` and `cotrans` are similarly renamed for the sake of consistency.
15-
16-
* In `Algebra.Definitions.RawMagma` and `Relation.Binary.Construct.Interior.Symmetric`,
17-
the record constructors `_,_` incorrectly had no declared fixity. They have been given
18-
the fixity `infixr 4 _,_`, consistent with that of `Data.Product.Base`.
19-
20-
* In `Data.Product.Function.Dependent.Setoid`, `left-inverse` defined a
21-
`RightInverse`.
22-
This has been deprecated in favor or `rightInverse`, and a corrected (and
23-
correctly-named) function `leftInverse` has been added.
24-
25-
* The implementation of `_IsRelatedTo_` in `Relation.Binary.Reasoning.Base.Partial`
26-
has been modified to correctly support equational reasoning at the beginning and the end.
27-
The detail of this issue is described in [#2677](https://github.com/agda/agda-stdlib/pull/2677). Since the names of constructors
28-
of `_IsRelatedTo_` are changed and the reduction behaviour of reasoning steps
29-
are changed, this modification is non-backwards compatible.
12+
* Fix a type error in `README.Data.Fin.Relation.Unary.Top` within the definition of `>-weakInduction`.
3013

3114
Non-backwards compatible changes
3215
--------------------------------
3316

34-
* The implementation of `≤-total` in `Data.Nat.Properties` has been altered
35-
to use operations backed by primitives, rather than recursion, making it
36-
significantly faster. However, its reduction behaviour on open terms may have
37-
changed.
38-
3917
Minor improvements
4018
------------------
4119

42-
* Moved the concept `Irrelevant` of irrelevance (h-proposition) from `Relation.Nullary`
43-
to its own dedicated module `Relation.Nullary.Irrelevant`.
20+
* The type of `Relation.Nullary.Negation.Core.contradiction-irr` has been further
21+
weakened so that the negated hypothesis `¬ A` is marked as irrelevant. This is
22+
safe to do, in view of `Relation.Nullary.Recomputable.Properties.¬-recompute`.
23+
24+
* Refactored usages of `+-∸-assoc 1` to `∸-suc` in:
25+
```agda
26+
README.Data.Fin.Relation.Unary.Top
27+
Algebra.Properties.Semiring.Binomial
28+
Data.Fin.Subset.Properties
29+
Data.Nat.Binary.Subtraction
30+
Data.Nat.Combinatorics
31+
```
4432

4533
Deprecated modules
4634
------------------
4735

4836
Deprecated names
4937
----------------
5038

51-
* In `Algebra.Definitions.RawMagma`:
39+
* In `Algebra.Properties.CommutativeSemigroup`:
5240
```agda
53-
_∣∣_ ↦ _∥_
54-
_∤∤_ ↦ _∦_
55-
```
56-
57-
* In `Algebra.Lattice.Properties.BooleanAlgebra`
58-
```agda
59-
⊥≉⊤ ↦ ¬⊥≈⊤
60-
⊤≉⊥ ↦ ¬⊤≈⊥
61-
```
62-
63-
* In `Algebra.Module.Consequences`
64-
```agda
65-
*ₗ-assoc+comm⇒*ᵣ-assoc ↦ *ₗ-assoc∧comm⇒*ᵣ-assoc
66-
*ₗ-assoc+comm⇒*ₗ-*ᵣ-assoc ↦ *ₗ-assoc∧comm⇒*ₗ-*ᵣ-assoc
67-
*ᵣ-assoc+comm⇒*ₗ-assoc ↦ *ᵣ-assoc∧comm⇒*ₗ-assoc
68-
*ₗ-assoc+comm⇒*ₗ-*ᵣ-assoc ↦ *ₗ-assoc∧comm⇒*ₗ-*ᵣ-assoc
69-
```
70-
71-
* In `Algebra.Modules.Structures.IsLeftModule`:
72-
```agda
73-
uniqueˡ‿⁻ᴹ ↦ Algebra.Module.Properties.LeftModule.inverseˡ-uniqueᴹ
74-
uniqueʳ‿⁻ᴹ ↦ Algebra.Module.Properties.LeftModule.inverseʳ-uniqueᴹ
75-
```
76-
77-
* In `Algebra.Modules.Structures.IsRightModule`:
78-
```agda
79-
uniqueˡ‿⁻ᴹ ↦ Algebra.Module.Properties.RightModule.inverseˡ-uniqueᴹ
80-
uniqueʳ‿⁻ᴹ ↦ Algebra.Module.Properties.RightModule.inverseʳ-uniqueᴹ
81-
```
82-
83-
* In `Algebra.Properties.Magma.Divisibility`:
84-
```agda
85-
∣∣-sym ↦ ∥-sym
86-
∣∣-respˡ-≈ ↦ ∥-respˡ-≈
87-
∣∣-respʳ-≈ ↦ ∥-respʳ-≈
88-
∣∣-resp-≈ ↦ ∥-resp-≈
89-
∤∤-sym -≈ ↦ ∦-sym
90-
∤∤-respˡ-≈ ↦ ∦-respˡ-≈
91-
∤∤-respʳ-≈ ↦ ∦-respʳ-≈
92-
∤∤-resp-≈ ↦ ∦-resp-≈
93-
∣-respʳ-≈ ↦ ∣ʳ-respʳ-≈
94-
∣-respˡ-≈ ↦ ∣ʳ-respˡ-≈
95-
∣-resp-≈ ↦ ∣ʳ-resp-≈
96-
x∣yx ↦ x∣ʳyx
97-
xy≈z⇒y∣z ↦ xy≈z⇒y∣ʳz
98-
```
99-
100-
* In `Algebra.Properties.Monoid.Divisibility`:
101-
```agda
102-
∣∣-refl ↦ ∥-refl
103-
∣∣-reflexive ↦ ∥-reflexive
104-
∣∣-isEquivalence ↦ ∥-isEquivalence
105-
ε∣_ ↦ ε∣ʳ_
106-
∣-refl ↦ ∣ʳ-refl
107-
∣-reflexive ↦ ∣ʳ-reflexive
108-
∣-isPreorder ↦ ∣ʳ-isPreorder
109-
∣-preorder ↦ ∣ʳ-preorder
110-
```
111-
112-
* In `Algebra.Properties.Semigroup.Divisibility`:
113-
```agda
114-
∣∣-trans ↦ ∥-trans
115-
∣-trans ↦ ∣ʳ-trans
116-
```
117-
118-
* In `Algebra.Structures.Group`:
119-
```agda
120-
uniqueˡ-⁻¹ ↦ Algebra.Properties.Group.inverseˡ-unique
121-
uniqueʳ-⁻¹ ↦ Algebra.Properties.Group.inverseʳ-unique
122-
```
123-
124-
* In `Data.List.Base`:
125-
```agda
126-
and ↦ Data.Bool.ListAction.and
127-
or ↦ Data.Bool.ListAction.or
128-
any ↦ Data.Bool.ListAction.any
129-
all ↦ Data.Bool.ListAction.all
130-
sum ↦ Data.Nat.ListAction.sum
131-
product ↦ Data.Nat.ListAction.product
132-
```
133-
134-
* In `Data.List.Properties`:
135-
```agda
136-
sum-++ ↦ Data.Nat.ListAction.Properties.sum-++
137-
∈⇒∣product ↦ Data.Nat.ListAction.Properties.∈⇒∣product
138-
product≢0 ↦ Data.Nat.ListAction.Properties.product≢0
139-
∈⇒≤product ↦ Data.Nat.ListAction.Properties.∈⇒≤product
140-
```
141-
142-
* In `Data.List.Relation.Binary.Permutation.Propositional.Properties`:
143-
```agda
144-
sum-↭ ↦ Data.Nat.ListAction.Properties.sum-↭
145-
product-↭ ↦ Data.Nat.ListAction.Properties.product-↭
146-
```
147-
148-
* In `Data.Product.Function.Dependent.Setoid`:
149-
```agda
150-
left-inverse ↦ rightInverse
41+
interchange ↦ medial
15142
```
15243

15344
New modules
15445
-----------
15546

156-
* `Algebra.Module.Properties.{Bimodule|LeftModule|RightModule}`.
157-
158-
* `Data.List.Base.{and|or|any|all}` have been lifted out into `Data.Bool.ListAction`.
159-
160-
* `Data.List.Base.{sum|product}` and their properties have been lifted out into `Data.Nat.ListAction` and `Data.Nat.ListAction.Properties`.
161-
162-
* `Data.List.Relation.Binary.Prefix.Propositional.Properties` showing the equivalence to left divisibility induced by the list monoid.
47+
* `Data.List.Relation.Binary.Permutation.Algorithmic{.Properties}` for the Choudhury and Fiore definition of permutation, and its equivalence with `Declarative` below.
16348

164-
* `Data.List.Relation.Binary.Suffix.Propositional.Properties` showing the equivalence to right divisibility induced by the list monoid.
165-
166-
* `Data.Sign.Show` to show a sign
49+
* `Data.List.Relation.Binary.Permutation.Declarative{.Properties}` for the least congruence on `List` making `_++_` commutative, and its equivalence with the `Setoid` definition.
16750

16851
Additions to existing modules
16952
-----------------------------
17053

171-
* In `Algebra.Construct.Pointwise`:
172-
```agda
173-
isNearSemiring : IsNearSemiring _≈_ _+_ _*_ 0# →
174-
IsNearSemiring (liftRel _≈_) (lift₂ _+_) (lift₂ _*_) (lift₀ 0#)
175-
isSemiringWithoutOne : IsSemiringWithoutOne _≈_ _+_ _*_ 0# →
176-
IsSemiringWithoutOne (liftRel _≈_) (lift₂ _+_) (lift₂ _*_) (lift₀ 0#)
177-
isCommutativeSemiringWithoutOne : IsCommutativeSemiringWithoutOne _≈_ _+_ _*_ 0# →
178-
IsCommutativeSemiringWithoutOne (liftRel _≈_) (lift₂ _+_) (lift₂ _*_) (lift₀ 0#)
179-
isCommutativeSemiring : IsCommutativeSemiring _≈_ _+_ _*_ 0# 1# →
180-
IsCommutativeSemiring (liftRel _≈_) (lift₂ _+_) (lift₂ _*_) (lift₀ 0#) (lift₀ 1#)
181-
isIdempotentSemiring : IsIdempotentSemiring _≈_ _+_ _*_ 0# 1# →
182-
IsIdempotentSemiring (liftRel _≈_) (lift₂ _+_) (lift₂ _*_) (lift₀ 0#) (lift₀ 1#)
183-
isKleeneAlgebra : IsKleeneAlgebra _≈_ _+_ _*_ _⋆ 0# 1# →
184-
IsKleeneAlgebra (liftRel _≈_) (lift₂ _+_) (lift₂ _*_) (lift₁ _⋆) (lift₀ 0#) (lift₀ 1#)
185-
isQuasiring : IsQuasiring _≈_ _+_ _*_ 0# 1# →
186-
IsQuasiring (liftRel _≈_) (lift₂ _+_) (lift₂ _*_) (lift₀ 0#) (lift₀ 1#)
187-
isCommutativeRing : IsCommutativeRing _≈_ _+_ _*_ -_ 0# 1# →
188-
IsCommutativeRing (liftRel _≈_) (lift₂ _+_) (lift₂ _*_) (lift₁ -_) (lift₀ 0#) (lift₀ 1#)
189-
commutativeMonoid : CommutativeMonoid c ℓ → CommutativeMonoid (a ⊔ c) (a ⊔ ℓ)
190-
nearSemiring : NearSemiring c ℓ → NearSemiring (a ⊔ c) (a ⊔ ℓ)
191-
semiringWithoutOne : SemiringWithoutOne c ℓ → SemiringWithoutOne (a ⊔ c) (a ⊔ ℓ)
192-
commutativeSemiringWithoutOne : CommutativeSemiringWithoutOne c ℓ → CommutativeSemiringWithoutOne (a ⊔ c) (a ⊔ ℓ)
193-
commutativeSemiring : CommutativeSemiring c ℓ → CommutativeSemiring (a ⊔ c) (a ⊔ ℓ)
194-
idempotentSemiring : IdempotentSemiring c ℓ → IdempotentSemiring (a ⊔ c) (a ⊔ ℓ)
195-
kleeneAlgebra : KleeneAlgebra c ℓ → KleeneAlgebra (a ⊔ c) (a ⊔ ℓ)
196-
quasiring : Quasiring c ℓ → Quasiring (a ⊔ c) (a ⊔ ℓ)
197-
commutativeRing : CommutativeRing c ℓ → CommutativeRing (a ⊔ c) (a ⊔ ℓ)
198-
```
199-
200-
* In `Algebra.Modules.Properties`:
201-
```agda
202-
inverseˡ-uniqueᴹ : x +ᴹ y ≈ 0ᴹ → x ≈ -ᴹ y
203-
inverseʳ-uniqueᴹ : x +ᴹ y ≈ 0ᴹ → y ≈ -ᴹ x
204-
```
205-
206-
* In `Algebra.Properties.Magma.Divisibility`:
207-
```agda
208-
∣ˡ-respʳ-≈ : _∣ˡ_ Respectsʳ _≈_
209-
∣ˡ-respˡ-≈ : _∣ˡ_ Respectsˡ _≈_
210-
∣ˡ-resp-≈ : _∣ˡ_ Respects₂ _≈_
211-
x∣ˡxy : ∀ x y → x ∣ˡ x ∙ y
212-
xy≈z⇒x∣ˡz : ∀ x y {z} → x ∙ y ≈ z → x ∣ˡ z
213-
```
214-
215-
* In `Algebra.Properties.Monoid.Divisibility`:
216-
```agda
217-
ε∣ˡ_ : ∀ x → ε ∣ˡ x
218-
∣ˡ-refl : Reflexive _∣ˡ_
219-
∣ˡ-reflexive : _≈_ ⇒ _∣ˡ_
220-
∣ˡ-isPreorder : IsPreorder _≈_ _∣ˡ_
221-
∣ˡ-preorder : Preorder a ℓ _
222-
```
223-
224-
* In `Algebra.Properties.Semigroup.Divisibility`:
225-
```agda
226-
∣ˡ-trans : Transitive _∣ˡ_
227-
x∣ʳy⇒x∣ʳzy : x ∣ʳ y → x ∣ʳ z ∙ y
228-
x∣ʳy⇒xz∣ʳyz : x ∣ʳ y → x ∙ z ∣ʳ y ∙ z
229-
x∣ˡy⇒zx∣ˡzy : x ∣ˡ y → z ∙ x ∣ˡ z ∙ y
230-
x∣ˡy⇒x∣ˡyz : x ∣ˡ y → x ∣ˡ y ∙ z
231-
```
232-
233-
* In `Algebra.Properties.CommutativeSemigroup.Divisibility`:
234-
```agda
235-
∙-cong-∣ : x ∣ y → a ∣ b → x ∙ a ∣ y ∙ b
236-
```
237-
238-
* In `Data.List.Properties`:
239-
```agda
240-
map-applyUpTo : ∀ (f : ℕ → A) (g : A → B) n → map g (applyUpTo f n) ≡ applyUpTo (g ∘ f) n
241-
map-applyDownFrom : ∀ (f : ℕ → A) (g : A → B) n → map g (applyDownFrom f n) ≡ applyDownFrom (g ∘ f) n
242-
map-upTo : ∀ (f : ℕ → A) n → map f (upTo n) ≡ applyUpTo f n
243-
map-downFrom : ∀ (f : ℕ → A) n → map f (downFrom n) ≡ applyDownFrom f n
244-
```
245-
246-
* In `Data.List.Relation.Binary.Permutation.Propositional`:
247-
```agda
248-
↭⇒↭ₛ′ : IsEquivalence _≈_ → _↭_ ⇒ _↭ₛ′_
249-
```
250-
251-
* In `Data.List.Relation.Binary.Permutation.Propositional.Properties`:
252-
```agda
253-
filter-↭ : ∀ (P? : Pred.Decidable P) → xs ↭ ys → filter P? xs ↭ filter P? ys
254-
```
255-
256-
* In `Data.Product.Function.Dependent.Propositional`:
257-
```agda
258-
Σ-↪ : (I↪J : I ↪ J) → (∀ {j} → A (from I↪J j) ↪ B j) → Σ I A ↪ Σ J B
259-
```
260-
261-
* In `Data.Product.Function.Dependent.Setoid`:
262-
```agda
263-
rightInverse :
264-
(I↪J : I ↪ J) →
265-
(∀ {j} → RightInverse (A atₛ (from I↪J j)) (B atₛ j)) →
266-
RightInverse (I ×ₛ A) (J ×ₛ B)
267-
268-
leftInverse :
269-
(I↩J : I ↩ J) →
270-
(∀ {i} → LeftInverse (A atₛ i) (B atₛ (to I↩J i))) →
271-
LeftInverse (I ×ₛ A) (J ×ₛ B)
272-
```
273-
274-
* In `Data.Vec.Relation.Binary.Pointwise.Inductive`:
54+
* In `Algebra.Properties.RingWithoutOne`:
27555
```agda
276-
zipWith-assoc : Associative _∼_ f → Associative (Pointwise _∼_) (zipWith {n = n} f)
277-
zipWith-identityˡ: LeftIdentity _∼_ e f → LeftIdentity (Pointwise _∼_) (replicate n e) (zipWith f)
278-
zipWith-identityʳ: RightIdentity _∼_ e f → RightIdentity (Pointwise _∼_) (replicate n e) (zipWith f)
279-
zipWith-comm : Commutative _∼_ f → Commutative (Pointwise _∼_) (zipWith {n = n} f)
280-
zipWith-cong : Congruent₂ _∼_ f → Pointwise _∼_ ws xs → Pointwise _∼_ ys zs → Pointwise _∼_ (zipWith f ws ys) (zipWith f xs zs)
56+
[-x][-y]≈xy : ∀ x y → - x * - y ≈ x * y
28157
```
28258

283-
* In `Relation.Binary.Construct.Add.Infimum.Strict`:
59+
* In `Data.Fin.Permutation.Components`:
28460
```agda
285-
<₋-accessible-⊥₋ : Acc _<₋_ ⊥₋
286-
<₋-accessible[_] : Acc _<_ x → Acc _<₋_ [ x ]
287-
<₋-wellFounded : WellFounded _<_ → WellFounded _<₋_
61+
transpose[i,i,j]≡j : (i j : Fin n) → transpose i i j ≡ j
62+
transpose[i,j,j]≡i : (i j : Fin n) → transpose i j j ≡ i
63+
transpose[i,j,i]≡j : (i j : Fin n) → transpose i j i ≡ j
64+
transpose-transpose : transpose i j k ≡ l → transpose j i l ≡ k
28865
```
28966

290-
* In `Relation.Nullary.Decidable.Core`:
67+
* In `Data.Fin.Properties`:
29168
```agda
292-
⊤-dec : Dec {a} ⊤
293-
⊥-dec : Dec {a} ⊥
69+
≡-irrelevant : Irrelevant {A = Fin n} _≡_
70+
≟-≡ : (eq : i ≡ j) → (i ≟ j) ≡ yes eq
71+
≟-≡-refl : (i : Fin n) → (i ≟ i) ≡ yes refl
72+
≟-≢ : (i≢j : i ≢ j) → (i ≟ j) ≡ no i≢j
29473
```
29574

296-
* In `Relation.Nullary.Negation.Core`:
75+
* In `Data.Nat.Properties`:
29776
```agda
298-
contra-diagonal : (A → ¬ A) → ¬ A
77+
≟-≢ : (m≢n : m ≢ n) → (m ≟ n) ≡ no m≢n
78+
∸-suc : m ≤ n → suc n ∸ m ≡ suc (n ∸ m)
29979
```

CHANGELOG/v1.3.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -226,7 +226,7 @@ Deprecated modules
226226

227227
* A warning is now raised whenever you import a deprecated module. This should
228228
aid the transition to the new modules. These warnings can be disabled locally
229-
by adding the pragma `{-# OPTIONS --warn=noUserWarning #-}` to the top of a module.
229+
by adding the pragma `{-# OPTIONS --warning=noUserWarning #-}` to the top of a module.
230230

231231
The following modules have been renamed as part of a drive to improve
232232
consistency across the library. The deprecated modules still exist and

0 commit comments

Comments
 (0)