Skip to content

Commit f6c6f9a

Browse files
committed
chore: bump agda
1 parent 2ee9977 commit f6c6f9a

File tree

10 files changed

+47
-16
lines changed

10 files changed

+47
-16
lines changed

1lab.agda-lib

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,3 +12,4 @@ flags:
1212
--guardedness
1313
--two-level
1414
-W noUnsupportedIndexedMatch
15+
--experimental-lazy-instances

src/1Lab/HLevel.lagda.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -140,6 +140,12 @@ record is-contr {ℓ} (A : Type ℓ) : Type ℓ where
140140
open is-contr public
141141
```
142142

143+
<!--
144+
```agda
145+
{-# INLINE contr #-}
146+
```
147+
-->
148+
143149
We can now write down the definition of `is-hlevel`{.Agda}, as a
144150
function of the type *and* the specific level. Note that, even though
145151
that being a proposition is equivalent to having contractible identity

src/Algebra/Ring/Cat/Initial.lagda.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -152,15 +152,15 @@ paper, following the ring laws.
152152
153153
open is-ring-hom
154154
155-
z-natdiff : ∀ x y → ℤ↪R (x ℕ- y) ≡ e x R.- e y
156-
z-natdiff x zero = R.intror R.inv-unit
157-
z-natdiff zero (suc y) = R.introl refl
158-
z-natdiff (suc x) (suc y) = z-natdiff x y ∙ e-tr x y
155+
z-nat-diff : ∀ x y → ℤ↪R (x ℕ- y) ≡ e x R.- e y
156+
z-nat-diff x zero = R.intror R.inv-unit
157+
z-nat-diff zero (suc y) = R.introl refl
158+
z-nat-diff (suc x) (suc y) = z-nat-diff x y ∙ e-tr x y
159159
160160
z-add : ∀ x y → ℤ↪R (x +ℤ y) ≡ ℤ↪R x R.+ ℤ↪R y
161161
z-add (pos x) (pos y) = e-add x y
162-
z-add (pos x) (negsuc y) = z-natdiff x (suc y)
163-
z-add (negsuc x) (pos y) = z-natdiff y (suc x) ∙ R.+-commutes
162+
z-add (pos x) (negsuc y) = z-nat-diff x (suc y)
163+
z-add (negsuc x) (pos y) = z-nat-diff y (suc x) ∙ R.+-commutes
164164
z-add (negsuc x) (negsuc y) =
165165
R.- (e 1 R.+ e (suc x Nat.+ y)) ≡⟨ ap R.-_ (ap₂ R._+_ refl (e-add (suc x) y) ∙ R.extendl R.+-commutes) ⟩
166166
R.- (e (suc x) R.+ (e 1 R.+ e y)) ≡⟨ R.a.inv-comm ⟩

src/Data/Finset/Properties.agda

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,9 @@ private variable
1717
ℓ ℓ' ℓ'' : Level
1818
A B C : Type ℓ
1919

20-
∈ᶠˢ-map : (f : A B) {x : B} (xs : Finset A) x ∈ mapᶠˢ f xs ∃[ (y , _) ∈ fibreᵢ f x ] y ∈ xs
20+
∈ᶠˢ-map
21+
: {A : Type ℓ} {B : Type ℓ'} (f : A B) {x : B}
22+
(xs : Finset A) x ∈ mapᶠˢ f xs ∃[ (y , _) ∈ fibreᵢ f x ] y ∈ xs
2123
∈ᶠˢ-map f {x} xs w = Finset-elim-prop (λ xs x ∈ mapᶠˢ f xs ∃[ (y , _) ∈ fibreᵢ f x ] y ∈ xs)
2224
(λ w absurd (¬mem-[] w))
2325
(λ y ind ∈ᶠˢ-split (λ { p inc ((y , symᵢ p) , hereₛ) }) λ w case ind w of λ x p h inc ((x , p) , thereₛ h))

src/Data/Int/Order.lagda.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -253,6 +253,9 @@ abstract
253253
*ℤ-cancel-≤r {possuc x} {y = negsuc y} {negsuc z} ⦃ pos _ ⦄ p = neg≤neg
254254
(Nat.*-cancel-≤r (suc x) (Nat.+-reflects-≤l (z * suc x) (y * suc x) x (unneg≤neg p)))
255255
256+
*ℤ-cancel-≤l : ∀ {x y z} ⦃ _ : Positive x ⦄ → (x *ℤ y) ≤ (x *ℤ z) → y ≤ z
257+
*ℤ-cancel-≤l {x} {y} {z} p = *ℤ-cancel-≤r {x} {y} {z} (≤-trans (≤-refl' (*ℤ-commutative y x)) (≤-trans p (≤-refl' (*ℤ-commutative x z))))
258+
256259
*ℤ-preserves-≤r : ∀ {x y} z ⦃ _ : Positive z ⦄ → x ≤ y → (x *ℤ z) ≤ (y *ℤ z)
257260
*ℤ-preserves-≤r {pos x} {pos y} (possuc z) ⦃ pos z ⦄ p = apos≤apos {x * suc z} {y * suc z} (Nat.*-preserves-≤r x y (suc z) (unpos≤pos p))
258261
*ℤ-preserves-≤r {negsuc x} {pos y} (possuc z) ⦃ pos z ⦄ p = ≤-trans neg≤pos (≤-refl' (sym (assign-pos (y * suc z))))

src/Data/Rational/Base.lagda.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -96,9 +96,8 @@ _*ℚ_ (inc x) (inc y) = inc (x L.*ₗ y)
9696
-- The requirement of having a proper match means we can't use a record
9797
-- (even a no-eta pattern record), since Agda doesn't count those as
9898
-- proper. Therefore, we have to use a data type.
99-
private
100-
unℚ : ℚ → ⌞ L.S⁻¹R ⌟
101-
unℚ (inc x) = x
99+
unℚ : ℚ → ⌞ L.S⁻¹R ⌟
100+
unℚ (inc x) = x
102101
```
103102
-->
104103

src/Data/Rational/Order.lagda.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -383,6 +383,12 @@ abstract
383383
... | inl x=y = absurd (x≠y x=y)
384384
... | inr x<y = x<y
385385
386+
*ℚ-cancel-<l : ∀ {x y r} ⦃ _ : Positive r ⦄ → (r *ℚ x) < (r *ℚ y) → x < y
387+
unquoteDef *ℚ-cancel-<l = do
388+
by-elim-ℚ *ℚ-cancel-<l λ d x y r ⦃ rpos ⦄ α →
389+
let instance _ = rpos .lower in
390+
common-denom-< (ℤ.*ℤ-cancel-<l {x = r} (<-common-denom ⦃ _ ⦄ α))
391+
386392
absℚ : ℚ → ℚ
387393
absℚ (inc x) = ℚ.inc $ ℚ-rec absᶠ absᶠ-resp (inc x) where
388394
absᶠ : Fraction → _

src/Data/Rational/Properties.lagda.md

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
open import 1Lab.Prelude
44
55
open import Algebra.Ring.Commutative
6+
open import Algebra.Ring.Solver
67
open import Algebra.Monoid
78
89
open import Data.Rational.Reflection
@@ -14,7 +15,7 @@ import Algebra.Ring.Reasoning as Kit
1415
1516
import Data.Int.Properties as ℤ
1617
import Data.Int.Order as ℤ
17-
import Data.Int.Base as ℤ
18+
import Data.Int.Base as ℤ renaming (_+ℤ_ to _+_ ; _-ℤ_ to _-_ ; _*ℤ_ to _*_)
1819
```
1920
-->
2021

@@ -26,6 +27,8 @@ module Data.Rational.Properties where
2627

2728
<!--
2829
```agda
30+
open Explicit ℤ-comm
31+
2932
private module ℚr = Kit (ℚ-ring .fst , record { CRing-on (ℚ-ring .snd) })
3033
open ℚr renaming (*-negater to *ℚ-negater ; *-negatel to *ℚ-negatel) using () public
3134
@@ -173,6 +176,17 @@ abstract
173176
∙ /ℚ-scaler ∙ ap (λ e → e /ℚ d) (*ℚ-associative _ _ d) ∙ /ℚ-factorr)
174177
```
175178

179+
## Operations with same denominator
180+
181+
```agda
182+
abstract
183+
+ℚ-common-denom : ∀ d x y ⦃ _ : ℤ.Positive d ⦄ → (x / d) +ℚ (y / d) ≡ (x ℤ.+ y) / d
184+
+ℚ-common-denom d x y = ext (solve 3 (λ x y d → ((x :* d) :+ (y :* d)) :* d ≔ (x :+ y) :* (d :* d)) x y d refl)
185+
186+
-ℚ-common-denom : ∀ d x y ⦃ _ : ℤ.Positive d ⦄ → (x / d) -ℚ (y / d) ≡ (x ℤ.- y) / d
187+
-ℚ-common-denom d x y = ext (solve 3 (λ x y d → ((x :* d) :+ ((:- y) :* d)) :* d ≔ (x :+ (:- y)) :* (d :* d)) x y d refl)
188+
```
189+
176190
## Positivity
177191

178192
```agda
@@ -189,8 +203,8 @@ abstract
189203
d@(ℤ.possuc d') ⦃ ℤ.pos .d' ⦄ (ℤ.possuc x) px → inc (ℤ.pos d')
190204
191205
by-elim-ℚ +ℚ-nonneg-positive λ where
192-
d (ℤ.posz) b (inc x) (inc y) → inc (subst ℤ.Positive (sym (ℤ.+ℤ-zerol (b ℤ.* d))) (ℤ.*ℤ-positive y auto))
193-
d (ℤ.possuc a) b (inc x) (inc y) → inc (ℤ.+ℤ-positive {ℤ.possuc a ℤ.* d} {b ℤ.* d} (ℤ.*ℤ-positive (ℤ.pos a) auto) (ℤ.*ℤ-positive y auto))
206+
d (ℤ.posz) b (inc x) (inc y) → inc (subst ℤ.Positive (sym (ℤ.+ℤ-zerol (b ℤ.* d))) (ℤ.*ℤ-positive y auto))
207+
d (ℤ.possuc a) b (inc x) (inc y) → inc (ℤ.+ℤ-positive {ℤ.possuc a ℤ.* d} {b ℤ.* d} (ℤ.*ℤ-positive (ℤ.pos a) auto) (ℤ.*ℤ-positive y auto))
194208
195209
/ℚ-positive : ∀ {x y} (p : Positive x) (q : Positive y) → Positive ((x /ℚ y) ⦃ inc (positive→nonzero q) ⦄)
196210
/ℚ-positive {y = y} p q = subst Positive

support/nix/dep/Agda/github.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,6 @@
33
"repo": "agda",
44
"branch": "master",
55
"private": false,
6-
"rev": "3bcf0086b1ac20f6900ba270510b28f0b25406a9",
7-
"sha256": "191mr86zkd402spl66sjwsrq1f9k0l31zwjdw1f04sm61xs5kiwf"
6+
"rev": "93af60bf20f1d2887b2642e2297f99f3c18035f3",
7+
"sha256": "15pmlg8zhaxfp1w20mplqvn425drb90bcslqvn3j1nf4wlcnchjs"
88
}

support/shake/app/Shake/AgdaCompile.hs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ import Agda.Interaction.FindFile (SourceFile(..))
2828
import Agda.TypeChecking.Monad.Base (srcFromPath)
2929
import Agda.TypeChecking.Pretty.Warning
3030
import Agda.TypeChecking.Errors
31-
import Agda.Interaction.Imports
31+
import Agda.Interaction.Imports hiding (getInterface)
3232
import Agda.Interaction.Options
3333
import Agda.Syntax.Common (Cubical(CFull))
3434
import Agda.Syntax.Common.Pretty

0 commit comments

Comments
 (0)