From df12eba4771d71a06e80dcf8b7234b43e0974e24 Mon Sep 17 00:00:00 2001 From: Kevin Arlin Date: Thu, 11 Jan 2024 11:00:35 -0800 Subject: [PATCH] define id for attrtypes in categories presented by a pointed set schema. --- src/categorical_algebra/FinCats.jl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/categorical_algebra/FinCats.jl b/src/categorical_algebra/FinCats.jl index c2bbf709a..5f7e3f1ea 100644 --- a/src/categorical_algebra/FinCats.jl +++ b/src/categorical_algebra/FinCats.jl @@ -360,8 +360,8 @@ hom(::Union{FinCatPresentation{ThSchema.Meta.T},FinCatPresentation{ThPointedSetS gat_typeof(f) ∈ (:Hom, :Attr, :AttrType) ? f : error("Expression $f is not a morphism or attribute") -id(C::FinCatPresentation{ThSchema.Meta.T}, x::AttrTypeExpr) = x -compose(C::FinCatPresentation{ThSchema.Meta.T}, f::AttrTypeExpr, g::AttrTypeExpr) = +id(C::Union{FinCatPresentation{ThSchema.Meta.T},FinCatPresentation{ThPointedSetSchema.Meta.T}}, x::AttrTypeExpr) = x +compose(C::Union{FinCatPresentation{ThSchema.Meta.T},FinCatPresentation{ThPointedSetSchema.Meta.T}}, f::AttrTypeExpr, g::AttrTypeExpr) = (f == g) ? f : error("Invalid composite of attribute type identities: $f != $g") function Base.show(io::IO, C::FinCatPresentation)