Giter Site home page Giter Site logo

Comments (7)

epatters avatar epatters commented on May 27, 2024

Probably a bug. I'll look into it soon.

from catlab.jl.

jpfairbanks avatar jpfairbanks commented on May 27, 2024

Thanks, here is a related problem,

X,Y = Ob(FreeAbelianBicategoryRelations, :X, :Y)
f = Hom(:f, X,Y)
to_wiring_diagram(f)
wd(mplus(X))

MethodError: no method matching mplus(::Ports{Symbol})

from catlab.jl.

epatters avatar epatters commented on May 27, 2024

Having refreshed myself on the situation, I'd say that these are not so much bugs as features that I never implemented. Bicategories of relations in Catlab have been neglected, since I'm not currently using them in any computational project. But I would like to improve this.

I see two different issues here:

  1. Wiring diagrams for bicategories of relations: I need to implement the dagger and possibly a few other things. This should be fairly straightforward.

  2. Wiring diagrams for abelian bicategories of relations: there are now two different diagonal and codiagonal structures. How to best handle this will require some thought. The obvious strategy is to have two different kinds of junction nodes, but the Junction type is currently not very flexible.

from catlab.jl.

epatters avatar epatters commented on May 27, 2024

The first step is probably to resolve #54. Then we can make sure that all the operations in a bicategory of relations get properly translated into wiring diagrams.

from catlab.jl.

jpfairbanks avatar jpfairbanks commented on May 27, 2024

For making WDs for Rel, should we introduce a DaggerBox that has an AbstractBox in it tells you to flip it? I am thinking like this:

struct DaggerBox{T} where T<: AbstractBox
  box::T
end

dagger(b::Box) = DaggerBox(b)
dagger(b::DaggerBox) = b.box

Do you think this is the right approach?

from catlab.jl.

epatters avatar epatters commented on May 27, 2024

PR #68 is a start towards a proper implementation of wiring diagrams for bicategories of relations.

If I'm not mistaken, the dagger is now the only missing operation. I like the strategy suggested here. We would further write:

input_ports(box::DaggerBox) = output_ports(box.box)
output_ports(box::DaggerBox) = input_ports(box.box)

from catlab.jl.

epatters avatar epatters commented on May 27, 2024

Issues related to abelian bicategories of relations will be taken up in #70.

from catlab.jl.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.