Skip to content

Commit

Permalink
Fixes #2166 by fixing names in IsSemilattice (#2211)
Browse files Browse the repository at this point in the history
* Fix names in IsSemilattice

* Add reference to changes to Semilattice to CHANGELOG
  • Loading branch information
MatthewDaggitt authored Nov 26, 2023
1 parent a148546 commit b9e132e
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 15 deletions.
4 changes: 3 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,9 @@ Non-backwards compatible changes
* Added new `IsBoundedSemilattice`/`BoundedSemilattice` records.

* Added new aliases `Is(Meet/Join)(Bounded)Semilattice` for `Is(Bounded)Semilattice`
which can be used to indicate meet/join-ness of the original structures.
which can be used to indicate meet/join-ness of the original structures, and
the field names in `IsSemilattice` and `Semilattice` have been renamed from
`∧-cong` to `∙-cong`to indicate their undirected nature.

* Finally, the following auxiliary files have been moved:
```agda
Expand Down
17 changes: 6 additions & 11 deletions src/Algebra/Lattice/Structures.agda
Original file line number Diff line number Diff line change
Expand Up @@ -37,30 +37,25 @@ record IsSemilattice (∙ : Op₂ A) : Set (a ⊔ ℓ) where
comm : Commutative ∙

open IsBand isBand public
renaming
( ∙-cong to ∧-cong
; ∙-congˡ to ∧-congˡ
; ∙-congʳ to ∧-congʳ
)

-- Used to bring names appropriate for a meet semilattice into scope.
IsMeetSemilattice = IsSemilattice
module IsMeetSemilattice {∧} (L : IsMeetSemilattice ∧) where
open IsSemilattice L public
renaming
( -cong to ∧-cong
; -congˡ to ∧-congˡ
; -congʳ to ∧-congʳ
( -cong to ∧-cong
; -congˡ to ∧-congˡ
; -congʳ to ∧-congʳ
)

-- Used to bring names appropriate for a join semilattice into scope.
IsJoinSemilattice = IsSemilattice
module IsJoinSemilattice {∨} (L : IsJoinSemilattice ∨) where
open IsSemilattice L public
renaming
( -cong to ∨-cong
; -congˡ to ∨-congˡ
; -congʳ to ∨-congʳ
( -cong to ∨-cong
; -congˡ to ∨-congˡ
; -congʳ to ∨-congʳ
)

------------------------------------------------------------------------
Expand Down
6 changes: 3 additions & 3 deletions src/Relation/Binary/Construct/NaturalOrder/Left.agda
Original file line number Diff line number Diff line change
Expand Up @@ -99,21 +99,21 @@ module _ (semi : IsSemilattice _∙_) where

x∙y≤x : x y (x ∙ y) ≤ x
x∙y≤x x y = begin
x ∙ y ≈⟨ -cong (sym (idem x)) S.refl ⟩
x ∙ y ≈⟨ -cong (sym (idem x)) S.refl ⟩
(x ∙ x) ∙ y ≈⟨ assoc x x y ⟩
x ∙ (x ∙ y) ≈⟨ comm x (x ∙ y) ⟩
(x ∙ y) ∙ x ∎

x∙y≤y : x y (x ∙ y) ≤ y
x∙y≤y x y = begin
x ∙ y ≈⟨ -cong S.refl (sym (idem y)) ⟩
x ∙ y ≈⟨ -cong S.refl (sym (idem y)) ⟩
x ∙ (y ∙ y) ≈⟨ sym (assoc x y y) ⟩
(x ∙ y) ∙ y ∎

∙-presʳ-≤ : {x y} z z ≤ x z ≤ y z ≤ (x ∙ y)
∙-presʳ-≤ {x} {y} z z≤x z≤y = begin
z ≈⟨ z≤y ⟩
z ∙ y ≈⟨ -cong z≤x S.refl ⟩
z ∙ y ≈⟨ -cong z≤x S.refl ⟩
(z ∙ x) ∙ y ≈⟨ assoc z x y ⟩
z ∙ (x ∙ y) ∎

Expand Down

0 comments on commit b9e132e

Please sign in to comment.