Skip to content

Commit

Permalink
fixes agda#2458
Browse files Browse the repository at this point in the history
  • Loading branch information
jamesmckinna committed Aug 29, 2024
1 parent 355ac25 commit 9d310ab
Show file tree
Hide file tree
Showing 9 changed files with 27 additions and 16 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,11 @@ Deprecated modules
Deprecated names
----------------

* In `Algebra.Morphism.Structures`:
```agda
homo ↦ ∙-homo
```

* In `Data.Vec.Properties`:
```agda
++-assoc _ ↦ ++-assoc-eqFree
Expand Down
4 changes: 2 additions & 2 deletions src/Algebra/Lattice/Morphism/Structures.agda
Original file line number Diff line number Diff line change
Expand Up @@ -58,13 +58,13 @@ module LatticeMorphisms (L₁ : RawLattice a ℓ₁) (L₂ : RawLattice b ℓ₂
∧-isMagmaHomomorphism : ∧.IsMagmaHomomorphism ⟦_⟧
∧-isMagmaHomomorphism = record
{ isRelHomomorphism = isRelHomomorphism
; homo = ∧-homo
; ∙-homo = ∧-homo
}

∨-isMagmaHomomorphism : ∨.IsMagmaHomomorphism ⟦_⟧
∨-isMagmaHomomorphism = record
{ isRelHomomorphism = isRelHomomorphism
; homo = ∨-homo
; ∙-homo = ∨-homo
}

record IsLatticeMonomorphism (⟦_⟧ : A B) : Set (a ⊔ ℓ₁ ⊔ ℓ₂) where
Expand Down
2 changes: 1 addition & 1 deletion src/Algebra/Morphism/Construct/Initial.agda
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ isMagmaHomomorphism : (M : RawMagma m ℓm) →
IsMagmaHomomorphism rawMagma M zero
isMagmaHomomorphism M = record
{ isRelHomomorphism = record { cong = cong (RawMagma._≈_ M) }
; homo = λ()
; ∙-homo = λ()
}

isMagmaMonomorphism : (M : RawMagma m ℓm)
Expand Down
2 changes: 1 addition & 1 deletion src/Algebra/Morphism/Construct/Terminal.agda
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ isMagmaHomomorphism : (M : RawMagma a ℓa) →
IsMagmaHomomorphism M rawMagma one
isMagmaHomomorphism M = record
{ isRelHomomorphism = record { cong = _ }
; homo = _
; ∙-homo = _
}

isMonoidHomomorphism : (M : RawMonoid a ℓa)
Expand Down
20 changes: 13 additions & 7 deletions src/Algebra/Morphism/Structures.agda
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,14 @@ module MagmaMorphisms (M₁ : RawMagma a ℓ₁) (M₂ : RawMagma b ℓ₂) wher
record IsMagmaHomomorphism (⟦_⟧ : A B) : Set (a ⊔ ℓ₁ ⊔ ℓ₂) where
field
isRelHomomorphism : IsRelHomomorphism _≈₁_ _≈₂_ ⟦_⟧
homo : Homomorphic₂ ⟦_⟧ _∙_ _◦_
∙-homo : Homomorphic₂ ⟦_⟧ _∙_ _◦_

-- Deprecated.
homo = ∙-homo
{-# WARNING_ON_USAGE homo
"Warning: homo was deprecated in v2.2.
Please use ∙-homo instead. "
#-}

open IsRelHomomorphism isRelHomomorphism public
renaming (cong to ⟦⟧-cong)
Expand Down Expand Up @@ -200,7 +207,6 @@ module GroupMorphisms (G₁ : RawGroup a ℓ₁) (G₂ : RawGroup b ℓ₂) wher
injective : Injective _≈₁_ _≈₂_ ⟦_⟧

open IsGroupHomomorphism isGroupHomomorphism public
renaming (homo to ∙-homo)

isMonoidMonomorphism : IsMonoidMonomorphism ⟦_⟧
isMonoidMonomorphism = record
Expand Down Expand Up @@ -265,7 +271,7 @@ module NearSemiringMorphisms (R₁ : RawNearSemiring a ℓ₁) (R₂ : RawNearSe
*-isMagmaHomomorphism : *.IsMagmaHomomorphism ⟦_⟧
*-isMagmaHomomorphism = record
{ isRelHomomorphism = isRelHomomorphism
; homo = *-homo
; ∙-homo = *-homo
}

record IsNearSemiringMonomorphism (⟦_⟧ : A B) : Set (a ⊔ ℓ₁ ⊔ ℓ₂) where
Expand Down Expand Up @@ -430,7 +436,7 @@ module RingWithoutOneMorphisms (R₁ : RawRingWithoutOne a ℓ₁) (R₂ : RawRi
*-isMagmaHomomorphism : *.IsMagmaHomomorphism ⟦_⟧
*-isMagmaHomomorphism = record
{ isRelHomomorphism = isRelHomomorphism
; homo = *-homo
; ∙-homo = *-homo
}

record IsRingWithoutOneMonomorphism (⟦_⟧ : A B) : Set (a ⊔ ℓ₁ ⊔ ℓ₂) where
Expand Down Expand Up @@ -623,19 +629,19 @@ module QuasigroupMorphisms (Q₁ : RawQuasigroup a ℓ₁) (Q₂ : RawQuasigroup
∙-isMagmaHomomorphism : ∙.IsMagmaHomomorphism ⟦_⟧
∙-isMagmaHomomorphism = record
{ isRelHomomorphism = isRelHomomorphism
; homo = ∙-homo
; ∙-homo = ∙-homo
}

\\-isMagmaHomomorphism : \\.IsMagmaHomomorphism ⟦_⟧
\\-isMagmaHomomorphism = record
{ isRelHomomorphism = isRelHomomorphism
; homo = \\-homo
; ∙-homo = \\-homo
}

//-isMagmaHomomorphism : //.IsMagmaHomomorphism ⟦_⟧
//-isMagmaHomomorphism = record
{ isRelHomomorphism = isRelHomomorphism
; homo = //-homo
; ∙-homo = //-homo
}

record IsQuasigroupMonomorphism (⟦_⟧ : A B) : Set (a ⊔ ℓ₁ ⊔ ℓ₂) where
Expand Down
2 changes: 1 addition & 1 deletion src/Data/List/Properties.agda
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,7 @@ module _ (A : Set a) where
{ isRelHomomorphism = record
{ cong = cong length
}
; homo = λ xs ys length-++ xs {ys}
; ∙-homo = λ xs ys length-++ xs {ys}
}

length-isMonoidHomomorphism : IsMonoidHomomorphism (++-[]-rawMonoid A) +-0-rawMonoid length
Expand Down
4 changes: 2 additions & 2 deletions src/Data/Parity/Properties.agda
Original file line number Diff line number Diff line change
Expand Up @@ -422,7 +422,7 @@ toSign-isMagmaHomomorphism : IsMagmaHomomorphism ℙ.+-rawMagma 𝕊.*-rawMagma
toSign-isMagmaHomomorphism = record
{ isRelHomomorphism = record
{ cong = cong toSign }
; homo = +-homo-*
; ∙-homo = +-homo-*
}

toSign-isMagmaMonomorphism : IsMagmaMonomorphism ℙ.+-rawMagma 𝕊.*-rawMagma toSign
Expand Down Expand Up @@ -532,7 +532,7 @@ parity-isMagmaHomomorphism : IsMagmaHomomorphism ℕ.+-rawMagma ℙ.+-rawMagma p
parity-isMagmaHomomorphism = record
{ isRelHomomorphism = record
{ cong = cong parity }
; homo = +-homo-+
; ∙-homo = +-homo-+
}

parity-isMonoidHomomorphism : IsMonoidHomomorphism ℕ.+-0-rawMonoid ℙ.+-0-rawMonoid parity
Expand Down
2 changes: 1 addition & 1 deletion src/Function/Endo/Propositional.agda
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ module _ (f : Endo) where
^-isMagmaHomomorphism : IsMagmaHomomorphism +-rawMagma ∘-rawMagma (f ^_)
^-isMagmaHomomorphism = record
{ isRelHomomorphism = record { cong = cong (f ^_) }
; homo = ^-homo
; ∙-homo = ^-homo
}

^-isMonoidHomomorphism : IsMonoidHomomorphism +-0-rawMonoid ∘-id-rawMonoid (f ^_)
Expand Down
2 changes: 1 addition & 1 deletion src/Function/Endo/Setoid.agda
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ module _ (f : Endo) where
^-isMagmaHomomorphism : IsMagmaHomomorphism +-rawMagma ∘-rawMagma (f ^_)
^-isMagmaHomomorphism = record
{ isRelHomomorphism = record { cong = ^-cong₂ }
; homo = ^-homo
; ∙-homo = ^-homo
}

^-isMonoidHomomorphism : IsMonoidHomomorphism +-0-rawMonoid ∘-id-rawMonoid (f ^_)
Expand Down

0 comments on commit 9d310ab

Please sign in to comment.