Skip to content

Commit

Permalink
Merge pull request #881 from AlgebraicJulia/idForPtdSetAttrtypes
Browse files Browse the repository at this point in the history
Adding missing `compose` and `id` methods for pointed set schemas
  • Loading branch information
epatters authored Jan 11, 2024
2 parents d21636c + df12eba commit 7facf5b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/categorical_algebra/FinCats.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 7facf5b

Please sign in to comment.