Skip to content

Commit 7ca5cd3

Browse files
authored
Merge branch 'master' into Bool-action
2 parents 2f104b6 + a3eb2ef commit 7ca5cd3

82 files changed

Lines changed: 711 additions & 268 deletions

Some content is hidden

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

.github/workflows/ci-ubuntu.yml

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -76,8 +76,7 @@ jobs:
7676
if [[ '${{ github.ref }}' == 'refs/heads/experimental' \
7777
|| '${{ github.base_ref }}' == 'experimental' ]]; then
7878
# Pick Agda version for experimental
79-
echo "AGDA_COMMIT=3d04bacca842729f9c0869b9287256321b5f450f" >> "${GITHUB_ENV}";
80-
# Andreas, 2025-10-07: 3d04bacca842729f9c0869b9287256321b5f450f is tags/v2.8.0
79+
echo "AGDA_COMMIT=tags/v2.8.0" >> "${GITHUB_ENV}";
8180
echo "AGDA_HTML_DIR=html/experimental" >> "${GITHUB_ENV}"
8281
else
8382
# Pick Agda version for master
@@ -170,8 +169,7 @@ jobs:
170169
171170
- name: Golden testing
172171
run: |
173-
${{ env.CABAL_V1_INSTALL }} clock
174-
make testsuite INTERACTIVE='' AGDA_EXEC='~/.cabal/bin/agda'
172+
make testsuite INTERACTIVE='' AGDA_EXEC='agda' GHC_EXEC='ghc'
175173
176174
177175
########################################################################

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ GenerateEverything
2727
Haskell
2828
html
2929
log
30+
logs/
3031
MAlonzo
3132
output
3233
runtests

CHANGELOG.md

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -161,6 +161,20 @@ Additions to existing modules
161161
⊕-∧-booleanRing : BooleanRing _ _
162162
```
163163

164+
* In `Algebra.Module.Properties.LeftModule`:
165+
```agda
166+
-1#*ₗm≈-ᴹm : ∀ m → - 1# *ₗ m ≈ᴹ -ᴹ m
167+
-‿distrib-*ₗ : ∀ r m → - r *ₗ m ≈ᴹ -ᴹ (r *ₗ m)
168+
-ᴹ‿distrib-*ₗ : ∀ r m → r *ₗ (-ᴹ m) ≈ᴹ -ᴹ (r *ₗ m)
169+
```
170+
171+
* In `Algebra.Module.Properties.RightModule`:
172+
```agda
173+
-1#*ₗm≈-ᴹm : m*ᵣ-1#≈-ᴹm : ∀ m → m *ᵣ (- 1#) ≈ᴹ -ᴹ m
174+
-‿distrib-*ᵣ : ∀ m r → m *ᵣ (- r) ≈ᴹ -ᴹ (m *ᵣ r)
175+
-ᴹ‿distrib-*ᵣ : ∀ m r → (-ᴹ m) *ᵣ r ≈ᴹ -ᴹ (m *ᵣ r)
176+
```
177+
164178
* In `Algebra.Properties.Monoid.Mult` properties of the Boolean action on a RawMonoid:
165179
```agda
166180
?>₀-homo-true : true ?>₀ x ≈ x
@@ -333,6 +347,17 @@ Additions to existing modules
333347
[_]⊢_ : (A → B) → Pred A ℓ → Pred B _
334348
```
335349

350+
* In `Relation.Unary.Properties`
351+
```agda
352+
_map-⊢_ : P ⊆ Q → f ⊢ P ⊆ f ⊢ Q
353+
map-⟨_⟩⊢_ : P ⊆ Q → ⟨ f ⟩⊢ P ⊆ ⟨ f ⟩⊢ Q
354+
map-[_]⊢_ : P ⊆ Q → [ f ]⊢ P ⊆ [ f ]⊢ Q
355+
⟨_⟩⊢⁻_ : ⟨ f ⟩⊢ P ⊆ Q → P ⊆ f ⊢ Q
356+
⟨_⟩⊢⁺_ : P ⊆ f ⊢ Q → ⟨ f ⟩⊢ P ⊆ Q
357+
[_]⊢⁻_ : Q ⊆ [ f ]⊢ P → f ⊢ Q ⊆ P
358+
[_]⊢⁺_ : f ⊢ Q ⊆ P → Q ⊆ [ f ]⊢ P
359+
```
360+
336361
* In `System.Random`:
337362
```agda
338363
randomIO : IO Bool

GNUmakefile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
GHC_EXEC ?= ghc
12
AGDA_EXEC ?= agda
23
AGDA_OPTIONS=-Werror
34
AGDA_RTS_OPTIONS=+RTS -M4.0G -H3.5G -A128M -RTS
@@ -14,7 +15,7 @@ test: doc/Everything.agda check-whitespace
1415
cd doc && $(AGDA) README.agda
1516

1617
testsuite:
17-
$(MAKE) -C tests test AGDA="$(AGDA)" AGDA_EXEC="$(AGDA_EXEC)" only=$(only)
18+
$(MAKE) -C tests test GHC_EXEC="$(GHC_EXEC)" AGDA="$(AGDA)" only=$(only)
1819

1920
fix-whitespace:
2021
$(CABAL_EXEC) exec -- fix-whitespace

README.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,17 @@ in glorious clickable HTML.
3232

3333
## Installation instructions
3434

35+
### Automated installation (currently experimental)
36+
37+
On Unix-style systems, it should be as simple as running the following command in
38+
a shell:
39+
40+
```shell
41+
sh -c "$(curl --proto '=https' --tlsv1.2 -s https://raw.githubusercontent.com/agda/agda-stdlib/refs/heads/master/stdlib-install.sh)"
42+
```
43+
44+
### Manual installation
45+
3546
See the [installation instructions](https://github.com/agda/agda-stdlib/blob/master/doc/installation-guide.md) for the latest version of the standard library.
3647

3748
#### Old versions of Agda

doc/installation-guide.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,21 @@ Installation instructions
33

44
Note: the full story on installing Agda libraries can be found at [readthedocs](http://agda.readthedocs.io/en/latest/tools/package-system.html).
55

6+
7+
## Automated installation on Unix-style systems
8+
9+
Running the following command in a terminal will download the
10+
[installation script](../stdlib-install.sh) and run it. It will
11+
ask you some questions about your setup and automatically install
12+
a version of the standard library compatible with your installed
13+
version of Agda.
14+
15+
```shell
16+
sh -c "$(curl --proto '=https' --tlsv1.2 -s https://raw.githubusercontent.com/agda/agda-stdlib/refs/heads/master/stdlib-install.sh)"
17+
```
18+
19+
## Manual installation
20+
621
Use version v2.3 of the standard library with Agda v2.8.0 or v2.7.0.1. You can find the correct version of the library to use for different Agda versions on the [Agda Wiki](https://wiki.portal.chalmers.se/agda/Libraries/StandardLibrary).
722

823
1. Navigate to a suitable directory `$HERE` (replace appropriately) where

doc/release-guide.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,10 @@ procedure should be followed:
5757
* Submit a pull request to update the version of standard library on Homebrew
5858
(https://github.com/Homebrew/homebrew-core/blob/master/Formula/agda.rb)
5959

60+
* Update the [install script](../stdlib-install.sh):
61+
62+
** The big `case` block mapping Agda versions to stdlib versions
63+
6064
* Update the Agda wiki:
6165

6266
** The standard library page.

src/Algebra/Module/Properties/LeftModule.agda

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,3 +23,27 @@ open import Algebra.Properties.AbelianGroup +ᴹ-abelianGroup public
2323
renaming (inverseˡ-unique to inverseˡ-uniqueᴹ
2424
; inverseʳ-unique to inverseʳ-uniqueᴹ
2525
; ⁻¹-involutive to -ᴹ-involutive)
26+
27+
open import Algebra.Properties.Ring ring
28+
29+
open import Relation.Binary.Reasoning.Setoid ≈ᴹ-setoid
30+
31+
-‿distrib-*ₗ : r m - r *ₗ m ≈ᴹ -ᴹ (r *ₗ m)
32+
-‿distrib-*ₗ r m = inverseʳ-uniqueᴹ (r *ₗ m) (- r *ₗ m) (begin
33+
r *ₗ m +ᴹ - r *ₗ m ≈⟨ *ₗ-distribʳ m r (- r) ⟨
34+
(r - r) *ₗ m ≈⟨ *ₗ-congʳ (-‿inverseʳ r) ⟩
35+
0# *ₗ m ≈⟨ *ₗ-zeroˡ m ⟩
36+
0ᴹ ∎)
37+
38+
-ᴹ‿distrib-*ₗ : r m r *ₗ (-ᴹ m) ≈ᴹ -ᴹ (r *ₗ m)
39+
-ᴹ‿distrib-*ₗ r m = inverseʳ-uniqueᴹ (r *ₗ m) (r *ₗ (-ᴹ m)) (begin
40+
r *ₗ m +ᴹ r *ₗ (-ᴹ m) ≈⟨ *ₗ-distribˡ r m (-ᴹ m) ⟨
41+
r *ₗ (m +ᴹ (-ᴹ m)) ≈⟨ *ₗ-congˡ (-ᴹ‿inverseʳ m) ⟩
42+
r *ₗ 0ᴹ ≈⟨ *ₗ-zeroʳ r ⟩
43+
0ᴹ ∎)
44+
45+
-1#*ₗm≈-ᴹm : m - 1# *ₗ m ≈ᴹ -ᴹ m
46+
-1#*ₗm≈-ᴹm m = begin
47+
- 1# *ₗ m ≈⟨ -‿distrib-*ₗ 1# m ⟩
48+
-ᴹ (1# *ₗ m) ≈⟨ -ᴹ‿cong (*ₗ-identityˡ m) ⟩
49+
-ᴹ m ∎

src/Algebra/Module/Properties/RightModule.agda

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,3 +23,28 @@ open import Algebra.Properties.AbelianGroup +ᴹ-abelianGroup public
2323
renaming (inverseˡ-unique to inverseˡ-uniqueᴹ
2424
; inverseʳ-unique to inverseʳ-uniqueᴹ
2525
; ⁻¹-involutive to -ᴹ-involutive)
26+
27+
open import Algebra.Properties.Ring ring
28+
29+
open import Relation.Binary.Reasoning.Setoid ≈ᴹ-setoid
30+
31+
-‿distrib-*ᵣ : m r m *ᵣ (- r) ≈ᴹ -ᴹ (m *ᵣ r)
32+
-‿distrib-*ᵣ m r = inverseʳ-uniqueᴹ (m *ᵣ r) (m *ᵣ - r) (begin
33+
m *ᵣ r +ᴹ m *ᵣ - r ≈⟨ *ᵣ-distribˡ m r (- r) ⟨
34+
m *ᵣ (r - r) ≈⟨ *ᵣ-congˡ (-‿inverseʳ r) ⟩
35+
m *ᵣ 0# ≈⟨ *ᵣ-zeroʳ m ⟩
36+
0ᴹ ∎)
37+
38+
-ᴹ‿distrib-*ᵣ : m r (-ᴹ m) *ᵣ r ≈ᴹ -ᴹ (m *ᵣ r)
39+
-ᴹ‿distrib-*ᵣ m r = inverseʳ-uniqueᴹ (m *ᵣ r) ((-ᴹ m) *ᵣ r) (begin
40+
m *ᵣ r +ᴹ (-ᴹ m) *ᵣ r ≈⟨ *ᵣ-distribʳ r m (-ᴹ m) ⟨
41+
(m +ᴹ -ᴹ m) *ᵣ r ≈⟨ *ᵣ-congʳ (-ᴹ‿inverseʳ m) ⟩
42+
0ᴹ *ᵣ r ≈⟨ *ᵣ-zeroˡ r ⟩
43+
0ᴹ ∎)
44+
45+
m*ᵣ-1#≈-ᴹm : m m *ᵣ (- 1#) ≈ᴹ -ᴹ m
46+
m*ᵣ-1#≈-ᴹm m = begin
47+
m *ᵣ (- 1#) ≈⟨ -‿distrib-*ᵣ m 1# ⟩
48+
-ᴹ (m *ᵣ 1#) ≈⟨ -ᴹ‿cong (*ᵣ-identityʳ m) ⟩
49+
-ᴹ m ∎
50+

src/Function/Related/TypeIsomorphisms.agda

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ open import Relation.Binary.PropositionalEquality.Properties
4141
using (module ≡-Reasoning)
4242
open import Relation.Nullary.Negation.Core using (¬_)
4343
import Relation.Nullary.Indexed as I
44+
open import Relation.Unary.Properties using (⟨_⟩⊢⁻_; ⟨_⟩⊢⁺_)
4445

4546
private
4647
variable
@@ -356,6 +357,6 @@ Related-cong {A = A} {B = B} {C = C} {D = D} A≈B C≈D = mk⇔
356357
-- restriction that the quantified variable is equal to the given one
357358

358359
∃-≡ : (P : A Set b) {x} P x ↔ (∃[ y ] y ≡ x × P y)
359-
∃-≡ P {x} = mk↔ₛ′ (λ Px x , refl , Px) (λ where (_ , refl , Py) Py)
360+
∃-≡ P {x} = mk↔ₛ′ (⟨ id ⟩⊢⁻ id) (⟨ id ⟩⊢⁺ id)
360361
(λ where (_ , refl , _) refl) (λ where _ refl)
361362

0 commit comments

Comments
 (0)