Skip to content

Commit

Permalink
define id for attrtypes in categories presented by a pointed set schema.
Browse files Browse the repository at this point in the history
  • Loading branch information
Kevin Arlin committed Jan 11, 2024
1 parent d21636c commit df12eba
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) =

Check warning on line 364 in src/categorical_algebra/FinCats.jl

View check run for this annotation

Codecov / codecov/patch

src/categorical_algebra/FinCats.jl#L363-L364

Added lines #L363 - L364 were not covered by tests
(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 df12eba

Please sign in to comment.