File tree Expand file tree Collapse file tree 2 files changed +36
-0
lines changed
src/Relation/Binary/Morphism/Construct Expand file tree Collapse file tree 2 files changed +36
-0
lines changed Original file line number Diff line number Diff line change @@ -105,6 +105,10 @@ New modules
105105 Data.List.NonEmpty.Membership.Setoid
106106 ```
107107
108+ * ` Relation.Binary.Morphism.Construct.On ` : given a relation ` _∼_ ` on ` B ` ,
109+ and a function ` f : A → B ` , construct the canonical ` IsRelMonomorphism `
110+ between ` _∼_ on f ` and ` _∼_ ` , witnessed by ` f ` itself.
111+
108112Additions to existing modules
109113-----------------------------
110114
Original file line number Diff line number Diff line change 1+ ------------------------------------------------------------------------
2+ -- The Agda standard library
3+ --
4+ -- Construct monomorphism from a relation and a function via `_on_`
5+ ------------------------------------------------------------------------
6+
7+ {-# OPTIONS --cubical-compatible --safe #-}
8+
9+ open import Relation.Binary.Core using (Rel)
10+
11+ module Relation.Binary.Morphism.Construct.On
12+ {a b ℓ} {A : Set a} {B : Set b} (_∼_ : Rel B ℓ) (f : A → B)
13+ where
14+
15+ open import Function.Base using (id; _on_)
16+ open import Relation.Binary.Morphism.Structures
17+ using (IsRelHomomorphism; IsRelMonomorphism)
18+
19+ ------------------------------------------------------------------------
20+ -- Definition
21+
22+ _≈_ : Rel A _
23+ _≈_ = _∼_ on f
24+
25+ isRelHomomorphism : IsRelHomomorphism _≈_ _∼_ f
26+ isRelHomomorphism = record { cong = id }
27+
28+ isRelMonomorphism : IsRelMonomorphism _≈_ _∼_ f
29+ isRelMonomorphism = record
30+ { isHomomorphism = isRelHomomorphism
31+ ; injective = id
32+ }
You can’t perform that action at this time.
0 commit comments