Skip to content

Commit

Permalink
ring localisations and rational numbers (#429)
Browse files Browse the repository at this point in the history
numbers 👎
  • Loading branch information
plt-amy authored Sep 8, 2024
1 parent a122947 commit afcf848
Show file tree
Hide file tree
Showing 79 changed files with 2,208 additions and 378 deletions.
4 changes: 2 additions & 2 deletions src/1Lab/Equiv.lagda.md
Original file line number Diff line number Diff line change
Expand Up @@ -945,7 +945,7 @@ Lift-ap
Lift-ap (f , eqv) .fst (lift x) = lift (f x)
Lift-ap f .snd .is-eqv (lift y) .centre = lift (Equiv.from f y) , ap lift (Equiv.ε f y)
Lift-ap f .snd .is-eqv (lift y) .paths (lift x , q) i = lift (p i .fst) , λ j lift (p i .snd j)
where p = f .snd .is-eqv y .paths (x , ap Lift.lower q)
where p = f .snd .is-eqv y .paths (x , ap lower q)
```

### Involutions
Expand Down Expand Up @@ -1090,7 +1090,7 @@ syntax ≃⟨⟩-syntax x q p = x ≃⟨ p ⟩ q
lift-inj
: {ℓ ℓ'} {A : Type ℓ} {a b : A}
lift {ℓ = ℓ'} a ≡ lift {ℓ = ℓ'} b a ≡ b
lift-inj p = ap Lift.lower p
lift-inj p = ap lower p

-- Fibres of composites are given by pairs of fibres.
fibre-∘-≃
Expand Down
4 changes: 2 additions & 2 deletions src/1Lab/HLevel/Closure.lagda.md
Original file line number Diff line number Diff line change
Expand Up @@ -266,13 +266,13 @@ successor universe:
```agda
opaque
Lift-is-hlevel : n is-hlevel A n is-hlevel (Lift ℓ' A) n
Lift-is-hlevel n a-hl = retract→is-hlevel n lift Lift.lower (λ _ refl) a-hl
Lift-is-hlevel n a-hl = retract→is-hlevel n lift lower (λ _ refl) a-hl
```

<!--
```agda
Lift-is-hlevel' : n is-hlevel (Lift ℓ' A) n is-hlevel A n
Lift-is-hlevel' n lift-hl = retract→is-hlevel n Lift.lower lift (λ _ refl) lift-hl
Lift-is-hlevel' n lift-hl = retract→is-hlevel n lower lift (λ _ refl) lift-hl
```
-->

Expand Down
2 changes: 1 addition & 1 deletion src/1Lab/HLevel/Universe.lagda.md
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ Prop ℓ = n-Type ℓ 1
```agda
¬Set-is-prop : ¬ is-prop (Set ℓ)
¬Set-is-prop prop =
Lift.lower $
lower $
transport (ap ∣_∣ (prop (el (Lift _ ⊤) (hlevel 2)) (el (Lift _ ⊥) (hlevel 2)))) (lift tt)
```
-->
Expand Down
1 change: 1 addition & 0 deletions src/1Lab/Reflection/Deriving/Show.agda
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ open import Data.Char.Base
open import Data.Fin.Base
open import Data.Vec.Base hiding (map)
open import Data.Nat.Base
open import Data.Int.Base using (Int ; pos ; negsuc)

open import Meta.Foldable
open import Meta.Append
Expand Down
2 changes: 2 additions & 0 deletions src/1Lab/Type.lagda.md
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,8 @@ record Lift {a} ℓ (A : Type a) : Type (a ⊔ ℓ) where

<!--
```agda
open Lift public

instance
Lift-instance : {ℓ ℓ'} {A : Type ℓ} ⦃ A ⦄ Lift ℓ' A
Lift-instance ⦃ x ⦄ = lift x
Expand Down
2 changes: 1 addition & 1 deletion src/1Lab/Underlying.agda
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ instance
: {ℓ ℓ'} {A : Type ℓ} ⦃ ua : Underlying A ⦄
Underlying (Lift ℓ' A)
Underlying-Lift ⦃ ua ⦄ .ℓ-underlying = ua .ℓ-underlying
Underlying-Lift .⌞_⌟ x = ⌞ x .Lift.lower ⌟
Underlying-Lift .⌞_⌟ x = ⌞ x .lower ⌟

Underlying-Bool : Underlying Bool
Underlying-Bool = record { ⌞_⌟ = So }
Expand Down
6 changes: 3 additions & 3 deletions src/1Lab/Univalence.lagda.md
Original file line number Diff line number Diff line change
Expand Up @@ -466,10 +466,10 @@ ident=lift} is still an equivalence:
univalence-lift : {A B : Type ℓ} is-equiv (λ e lift (path→equiv {A = A} {B} e))
univalence-lift {ℓ = ℓ} = is-iso→is-equiv morp where
morp : is-iso (λ e lift {ℓ = lsuc ℓ} (path→equiv e))
morp .is-iso.inv x = ua (x .Lift.lower)
morp .is-iso.inv x = ua (x .lower)
morp .is-iso.rinv x =
lift (path→equiv (ua (x .Lift.lower))) ≡⟨ ap lift (Path≃Equiv .snd .is-iso.rinv _) ⟩
x
lift (path→equiv (ua (x .lower))) ≡⟨ ap lift (Path≃Equiv .snd .is-iso.rinv _) ⟩
x ∎
morp .is-iso.linv x = Path≃Equiv .snd .is-iso.linv _
```

Expand Down
10 changes: 4 additions & 6 deletions src/Algebra/Group.lagda.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@ open import 1Lab.Prelude

open import Algebra.Magma.Unital hiding (idl ; idr)
open import Algebra.Semigroup
open import Algebra.Monoid hiding (idl ; idr)
open import Algebra.Monoid
open import Algebra.Magma

open import Cat.Instances.Delooping
import Algebra.Monoid.Reasoning as Mon

import Cat.Reasoning
open is-monoid hiding (idl ; idr)
```
-->

Expand Down Expand Up @@ -93,9 +93,7 @@ give the unit, both on the left and on the right:
underlying-monoid = A , record
{ identity = unit ; _⋆_ = _*_ ; has-is-monoid = has-is-monoid }

open Cat.Reasoning (B (underlying-monoid .snd))
hiding (id ; assoc ; idl ; idr ; invr ; invl ; to ; from ; inverses ; _∘_)
public
open Mon underlying-monoid public
```
-->

Expand Down
2 changes: 1 addition & 1 deletion src/Algebra/Group/Ab/Sum.lagda.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@
open import Algebra.Group.Cat.FinitelyComplete
open import Algebra.Group.Cat.Base
open import Algebra.Group.Ab
open import Algebra.Prelude
open import Algebra.Group

open import Cat.Diagram.Product
open import Cat.Prelude
```
-->

Expand Down
5 changes: 4 additions & 1 deletion src/Algebra/Group/Action.lagda.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,16 @@
open import Algebra.Group.Cat.FinitelyComplete
open import Algebra.Group.Cat.Base
open import Algebra.Group.Solver
open import Algebra.Prelude
open import Algebra.Group

open import Cat.Instances.Delooping
open import Cat.Instances.Functor
open import Cat.Instances.Sets
open import Cat.Diagram.Zero
open import Cat.Prelude

import Cat.Functor.Reasoning as Functor-kit
import Cat.Reasoning as Cat
```
-->

Expand Down
3 changes: 2 additions & 1 deletion src/Algebra/Group/Cat/Base.lagda.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
<!--
```agda
open import Algebra.Semigroup using (is-semigroup)
open import Algebra.Prelude
open import Algebra.Monoid using (is-monoid)
open import Algebra.Group
open import Algebra.Magma using (is-magma)

open import Cat.Displayed.Univalence.Thin
open import Cat.Functor.Properties
open import Cat.Prelude

import Cat.Reasoning as Cat
```
-->

Expand Down
3 changes: 2 additions & 1 deletion src/Algebra/Group/Cat/Monadic.lagda.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,16 @@
```agda
open import Algebra.Group.Cat.Base
open import Algebra.Group.Free
open import Algebra.Prelude
open import Algebra.Monoid
open import Algebra.Group

open import Cat.Functor.Adjoint.Monadic
open import Cat.Functor.Adjoint.Monad
open import Cat.Functor.Equivalence
open import Cat.Functor.Properties
open import Cat.Functor.Adjoint
open import Cat.Diagram.Monad
open import Cat.Prelude

import Algebra.Group.Cat.Base as Grp

Expand Down
4 changes: 3 additions & 1 deletion src/Algebra/Group/Concrete/Semidirect.lagda.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,11 @@ open import Algebra.Group.Semidirect
open import Algebra.Group.Cat.Base
open import Algebra.Group.Concrete
open import Algebra.Group.Action
open import Algebra.Prelude
open import Algebra.Group

open import Cat.Univalent
open import Cat.Prelude

open import Homotopy.Connectedness

open ConcreteGroup
Expand Down
5 changes: 4 additions & 1 deletion src/Algebra/Group/Free/Product.lagda.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,13 @@ open import 1Lab.Reflection.Induction

open import Algebra.Group.Cat.FinitelyComplete
open import Algebra.Group.Cat.Base
open import Algebra.Prelude
open import Algebra.Group

open import Cat.Diagram.Colimit.Finite
open import Cat.Diagram.Coproduct
open import Cat.Diagram.Pushout
open import Cat.Diagram.Zero
open import Cat.Prelude

open Finitely-cocomplete
open is-group-hom
Expand Down
7 changes: 4 additions & 3 deletions src/Algebra/Group/Instances/Cyclic.lagda.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,16 @@ open import Algebra.Group.Instances.Integers
open import Algebra.Group.Cat.Base
open import Algebra.Group.Subgroup
open import Algebra.Group.Ab
open import Algebra.Prelude
open import Algebra.Group

open import Cat.Prelude

open import Data.Int.Divisible
open import Data.Int.Universal
open import Data.Fin.Closure
open import Data.Int.DivMod
open import Data.Fin
open import Data.Int
open import Data.Int hiding (Positive)
open import Data.Nat

open represents-subgroup
Expand Down Expand Up @@ -82,7 +83,7 @@ _·ℤ : ∀ (n : Nat) → normal-subgroup ℤ λ i → el (n ∣ℤ i) (∣ℤ-
where
x≡y+x-y : x ≡ y +ℤ (x -ℤ y)
x≡y+x-y =
x ≡⟨ ℤ.insertl {h = y} (ℤ.inverser {x = y}) ⟩
x ≡⟨ ℤ.insertl {y} (ℤ.inverser {x = y}) ⟩
y +ℤ (negℤ y +ℤ x) ≡⟨ ap (y +ℤ_) (+ℤ-commutative (negℤ y) x) ⟩
y +ℤ (x -ℤ y) ∎
Expand Down
4 changes: 3 additions & 1 deletion src/Algebra/Group/Instances/Dihedral.lagda.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@ open import Algebra.Group.Semidirect
open import Algebra.Group.Cat.Base
open import Algebra.Group.Action
open import Algebra.Group.Ab
open import Algebra.Prelude

open import Cat.Functor.Base
open import Cat.Prelude
```
-->

Expand Down
4 changes: 2 additions & 2 deletions src/Algebra/Group/Instances/Integers.lagda.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@
```agda
open import Algebra.Group.Cat.Base
open import Algebra.Group.Ab
open import Algebra.Prelude
open import Algebra.Group

open import Cat.Functor.Adjoint
open import Cat.Prelude

open import Data.Int.Universal
open import Data.Nat.Order
open import Data.Int
open import Data.Int hiding (Positive)
open import Data.Nat

open is-group-hom
Expand Down
3 changes: 2 additions & 1 deletion src/Algebra/Group/Semidirect.lagda.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,10 @@
open import Algebra.Group.Cat.FinitelyComplete
open import Algebra.Group.Cat.Base
open import Algebra.Group.Action
open import Algebra.Prelude
open import Algebra.Group

open import Cat.Prelude

open is-group-hom
open make-group
```
Expand Down
2 changes: 1 addition & 1 deletion src/Algebra/Group/Subgroup.lagda.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@
```agda
open import Algebra.Group.Cat.FinitelyComplete
open import Algebra.Group.Cat.Base
open import Algebra.Prelude
open import Algebra.Group

open import Cat.Diagram.Equaliser.Kernel
open import Cat.Diagram.Coequaliser
open import Cat.Diagram.Equaliser
open import Cat.Diagram.Zero
open import Cat.Prelude

open import Data.Power

Expand Down
2 changes: 1 addition & 1 deletion src/Algebra/Magma.lagda.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ binary operation `⋆`, on which no further laws are imposed.
underlying-set : Set
underlying-set = el _ has-is-set

instance
opaque instance
magma-hlevel : {n} H-Level A (2 + n)
magma-hlevel = basic-instance 2 has-is-set

Expand Down
2 changes: 2 additions & 0 deletions src/Algebra/Magma/Unital/EckmannHilton.lagda.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ open import 1Lab.Prelude
open import Algebra.Magma.Unital
open import Algebra.Semigroup
open import Algebra.Monoid

open is-monoid
```
-->

Expand Down
2 changes: 1 addition & 1 deletion src/Algebra/Monoid.lagda.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ record is-monoid (id : A) (_⋆_ : A → A → A) : Type (level-of A) where
idl : {x : A} id ⋆ x ≡ x
idr : {x : A} x ⋆ id ≡ x

open is-monoid public
open is-monoid
```

The condition of $(A, 0, \star)$ defining a monoid is a proposition, so
Expand Down
1 change: 1 addition & 0 deletions src/Algebra/Monoid/Category.lagda.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ module Algebra.Monoid.Category where
```
open Precategory
open is-semigroup
open is-monoid
open is-magma
open Monoid-hom
open Monoid-on
Expand Down
Loading

0 comments on commit afcf848

Please sign in to comment.