| 1 |
------------------------------------------------------------------------ |
| 2 |
-- The Agda standard library |
| 3 |
-- |
| 4 |
-- Propositional (intensional) equality - Algebraic structures |
| 5 |
------------------------------------------------------------------------ |
| 6 |
|
| 7 |
{-# OPTIONS --cubical-compatible --safe #-} |
| 8 |
|
| 9 |
module Relation.Binary.PropositionalEquality.Algebra where |
| 10 |
|
| 11 |
open import Algebra.Bundles using (Magma) |
| 12 |
open import Algebra.Core using (Op₂) |
| 13 |
open import Algebra.Structures using (IsMagma) |
| 14 |
open import Level using (Level) |
| 15 |
open import Relation.Binary.PropositionalEquality.Core using (_≡_; cong₂) |
| 16 |
open import Relation.Binary.PropositionalEquality.Properties using (isEquivalence) |
| 17 |
|
| 18 |
private |
| 19 |
variable |
| 20 |
a : Level |
| 21 |
A : Set a |
| 22 |
|
| 23 |
------------------------------------------------------------------------ |
| 24 |
-- Any operation forms a magma over _≡_ |
| 25 |
|
| 26 |
isMagma : (_∙_ : Op₂ A) → IsMagma _≡_ _∙_ |
| 27 |
isMagma _∙_ = record |
| 28 |
{ isEquivalence = isEquivalence |
| 29 |
; ∙-cong = cong₂ _∙_ |
| 30 |
} |
| 31 |
|
| 32 |
magma : (_∙_ : Op₂ A) → Magma _ _ |
| 33 |
magma _∙_ = record |
| 34 |
{ isMagma = isMagma _∙_ |
| 35 |
} |