diff --git a/dev/.documenter-siteinfo.json b/dev/.documenter-siteinfo.json index a1a5e05ba..5fab822ea 100644 --- a/dev/.documenter-siteinfo.json +++ b/dev/.documenter-siteinfo.json @@ -1 +1 @@ -{"documenter":{"julia_version":"1.10.4","generation_timestamp":"2024-08-16T15:11:47","documenter_version":"1.5.0"}} \ No newline at end of file +{"documenter":{"julia_version":"1.10.5","generation_timestamp":"2024-08-30T21:01:23","documenter_version":"1.6.0"}} \ No newline at end of file diff --git a/dev/apis/categorical_algebra/index.html b/dev/apis/categorical_algebra/index.html index b496005b1..9d1ed0b37 100644 --- a/dev/apis/categorical_algebra/index.html +++ b/dev/apis/categorical_algebra/index.html @@ -1,11 +1,11 @@ -Categorical algebra · Catlab.jl

Categorical algebra

Sets and Relations

The following APIs implement FinSet, the category of Finite Sets (actually the skeleton of FinSet). The objects of this category are natural numbers where n represents a set with n elements. The morphisms are functions between such sets. We use the skeleton of FinSet in order to ensure that all sets are finite and morphisms can be stored using lists of integers. Finite relations are built out of FinSet and can be used to do some relational algebra.

Catlab.CategoricalAlgebra.SetsModule

Category of (possibly infinite) sets and functions.

This module defines generic types for the category of sets (SetOb, SetFunction), as well as a few basic concrete types, such as a wrapper type to view Julia types as sets (TypeSet). Extensive support for finite sets is provided by another module, FinSets.

source
Catlab.CategoricalAlgebra.Sets.SetFunctionType

Abstract type for morphism in the category Set.

Every instance of SetFunction{<:SetOb{T},<:SetOb{T′}} is callable with elements of type T, returning an element of type T′.

Note: This type would be better called simply Function but that name is already taken by the base Julia type.

source
Catlab.CategoricalAlgebra.Sets.SetObType

Abstract type for object in the category Set.

The type parameter T is the element type of the set.

Note: This type is more abstract than the built-in Julia types AbstractSet and Set, which are intended for data structures for finite sets. Those are encompassed by the subtype FinSet.

source
AlgebraicInterfaces.ObMethod

Forgetful functor Ob: Cat → Set.

Sends a category to its set of objects and a functor to its object map.

source
Catlab.CategoricalAlgebra.FinSets.FinFunctionType

Function between finite sets.

The function can be defined implicitly by an arbitrary Julia function, in which case it is evaluated lazily, or explictly by a vector of integers. In the vector representation, the function (1↦1, 2↦3, 3↦2, 4↦3), for example, is represented by the vector [1,3,2,3].

FinFunctions can be constructed with or without an explicitly provided codomain. If a codomain is provided, by default the constructor checks it is valid.

This type is mildly generalized by FinDomFunction.

source
Catlab.CategoricalAlgebra.FinSets.FinSetType

Finite set.

A finite set has abstract type FinSet{S,T}. The second type parameter T is the element type of the set and the first parameter S is the collection type, which can be a subtype of AbstractSet or another Julia collection type. In addition, the skeleton of the category FinSet is the important special case S = Int. The set ${1,…,n}$ is represented by the object FinSet(n) of type FinSet{Int,Int}.

source
Catlab.CategoricalAlgebra.FinSets.TabularLimitType

Limit of finite sets viewed as a table.

Any limit of finite sets can be canonically viewed as a table (TabularSet) whose columns are the legs of the limit cone and whose rows correspond to elements of the limit object. To construct this table from an already computed limit, call TabularLimit(::AbstractLimit; ...). The column names of the table are given by the optional argument names.

In this tabular form, applying the universal property of the limit is trivial since it is just tupling. Thus, this representation can be useful when the original limit algorithm does not support efficient application of the universal property. On the other hand, this representation has the disadvantage of generally making the element type of the limit set more complicated.

source
Catlab.CategoricalAlgebra.FinSets.TabularSetType

Finite set whose elements are rows of a table.

The underlying table should be compliant with Tables.jl. For the sake of uniformity, the rows are provided as named tuples, which assumes that the table is not "extremely wide". This should not be a major limitation in practice but see the Tables.jl documentation for further discussion.

source
Catlab.CategoricalAlgebra.FinSets.VarFunctionType

Data type for a morphism of VarSet{T}s. Note we can equivalently view these as morphisms [n]+T -> [m]+T fixing T or as morphisms [n] -> [m]+T, in the typical Kleisli category yoga.

Currently, domains are treated as VarSets. The codom field is treated as a FinSet{Int}. Note that the codom accessor gives a VarSet while the codom field is just that VarSet's FinSet of AttrVars. This could be generalized to being FinSet{Symbol} to allow for symbolic attributes. (Likewise, AttrVars will have to wrap Any rather than Int)

source
Catlab.CategoricalAlgebra.FinRelations.FinRelationType

Binary relation between finite sets.

A morphism in the category of finite sets and relations. The relation can be represented implicitly by an arbitrary Julia function mapping pairs of elements to booleans or explicitly by a matrix (dense or sparse) taking values in the rig of booleans (BoolRig).

source

Free Diagrams, Limits, and Colimits

The following modules define free diagrams in an arbitrary category and specify limit and colimit cones over said diagrams. Thes constructions enjoy the fullest support for FinSet and are used below to define presheaf categories as C-Sets. The general idea of these functions is that you set up a limit computation by specifying a diagram and asking for a limit or colimit cone, which is returned as a struct containing the apex object and the leg morphisms. This cone structure can be queried using the functions apex and legs. Julia's multiple dispatch feature is heavily used to specialize limit and colimit computations for various diagram shapes like product/coproduct and equalizer/coequalizer. As a consumer of this API, it is highly recommended that you use multiple dispatch to specialize your code on the diagram shape whenever possible.

Catlab.CategoricalAlgebra.FreeDiagramsModule

Free diagrams in a category.

A free diagram in a category is a diagram whose shape is a free category. Examples include the empty diagram, pairs of objects, discrete diagrams, parallel pairs, composable pairs, and spans and cospans. Limits and colimits are most commonly taken over free diagrams.

source
Catlab.CategoricalAlgebra.FreeDiagrams.BipartiteFreeDiagramType

A free diagram with a bipartite structure.

Such diagrams include most of the fixed shapes, such as spans, cospans, and parallel morphisms. They are also the generic shape of diagrams for limits and colimits arising from undirected wiring diagrams. For limits, the boxes correspond to vertices in $V₁$ and the junctions to vertices in $V₂$. Colimits are dual.

source
Catlab.CategoricalAlgebra.FreeDiagrams.BipartiteFreeDiagramMethod

Convert a free diagram to a bipartite free diagram.

Reduce a free diagram to a free bipartite diagram with the same limit (the default, colimit=false) or the same colimit (colimit=true). The reduction is essentially the same in both cases, except for the choice of where to put isolated vertices, where we follow the conventions described at cone_objects and cocone_objects. The resulting object is a bipartite free diagram equipped with maps from the vertices of the bipartite diagram to the vertices of the original diagram.

source
Catlab.CategoricalAlgebra.FreeDiagrams.bundle_legsMethod

Bundle together legs of a multi(co)span.

For example, calling bundle_legs(span, SVector((1,2),(3,4))) on a multispan with four legs gives a span whose left leg bundles legs 1 and 2 and whose right leg bundles legs 3 and 4. Note that in addition to bundling, this function can also permute legs and discard them.

The bundling is performed using the universal property of (co)products, which assumes that these (co)limits exist.

source
Catlab.CategoricalAlgebra.FreeDiagrams.cone_objectsMethod

Objects in diagram that will have explicit legs in limit cone.

In category theory, it is common practice to elide legs of limit cones that can be computed from other legs, especially for diagrams of certain fixed shapes. For example, when it taking a pullback (the limit of a cospan), the limit object is often treated as having two projections, rather than three. This function encodes such conventions by listing the objects in the diagram that will have corresponding legs in the limit object created by Catlab.

See also: cocone_objects.

source
Catlab.CategoricalAlgebra.Limits.SpecializeLimitType

Meta-algorithm that reduces general limits to common special cases.

Reduces limits of free diagrams that happen to be discrete to products. If this fails, fall back to the given algorithm (if any).

TODO: Reduce free diagrams that are (multi)cospans to (wide) pullbacks.

source
Catlab.CategoricalAlgebra.Limits.colimitMethod

Colimit of a diagram.

To define colimits in a category with objects Ob, override the method colimit(::FreeDiagram{Ob}) for general colimits or colimit(::D) with suitable type D <: FixedShapeFreeDiagram{Ob} for colimits of specific shape, such as coproducts or coequalizers.

See also: limit

source
Catlab.CategoricalAlgebra.Limits.epi_monoMethod

The image and coimage are isomorphic. We get this isomorphism using univeral properties.

  CoIm′ ╌╌> I ↠ CoIm
+Categorical algebra · Catlab.jl

Categorical algebra

Sets and Relations

The following APIs implement FinSet, the category of Finite Sets (actually the skeleton of FinSet). The objects of this category are natural numbers where n represents a set with n elements. The morphisms are functions between such sets. We use the skeleton of FinSet in order to ensure that all sets are finite and morphisms can be stored using lists of integers. Finite relations are built out of FinSet and can be used to do some relational algebra.

Catlab.CategoricalAlgebra.SetsModule

Category of (possibly infinite) sets and functions.

This module defines generic types for the category of sets (SetOb, SetFunction), as well as a few basic concrete types, such as a wrapper type to view Julia types as sets (TypeSet). Extensive support for finite sets is provided by another module, FinSets.

source
Catlab.CategoricalAlgebra.Sets.SetFunctionType

Abstract type for morphism in the category Set.

Every instance of SetFunction{<:SetOb{T},<:SetOb{T′}} is callable with elements of type T, returning an element of type T′.

Note: This type would be better called simply Function but that name is already taken by the base Julia type.

source
Catlab.CategoricalAlgebra.Sets.SetObType

Abstract type for object in the category Set.

The type parameter T is the element type of the set.

Note: This type is more abstract than the built-in Julia types AbstractSet and Set, which are intended for data structures for finite sets. Those are encompassed by the subtype FinSet.

source
AlgebraicInterfaces.ObMethod

Forgetful functor Ob: Cat → Set.

Sends a category to its set of objects and a functor to its object map.

source
Catlab.CategoricalAlgebra.FinSets.FinFunctionType

Function between finite sets.

The function can be defined implicitly by an arbitrary Julia function, in which case it is evaluated lazily, or explictly by a vector of integers. In the vector representation, the function (1↦1, 2↦3, 3↦2, 4↦3), for example, is represented by the vector [1,3,2,3].

FinFunctions can be constructed with or without an explicitly provided codomain. If a codomain is provided, by default the constructor checks it is valid.

This type is mildly generalized by FinDomFunction.

source
Catlab.CategoricalAlgebra.FinSets.FinSetType

Finite set.

A finite set has abstract type FinSet{S,T}. The second type parameter T is the element type of the set and the first parameter S is the collection type, which can be a subtype of AbstractSet or another Julia collection type. In addition, the skeleton of the category FinSet is the important special case S = Int. The set ${1,…,n}$ is represented by the object FinSet(n) of type FinSet{Int,Int}.

source
Catlab.CategoricalAlgebra.FinSets.TabularLimitType

Limit of finite sets viewed as a table.

Any limit of finite sets can be canonically viewed as a table (TabularSet) whose columns are the legs of the limit cone and whose rows correspond to elements of the limit object. To construct this table from an already computed limit, call TabularLimit(::AbstractLimit; ...). The column names of the table are given by the optional argument names.

In this tabular form, applying the universal property of the limit is trivial since it is just tupling. Thus, this representation can be useful when the original limit algorithm does not support efficient application of the universal property. On the other hand, this representation has the disadvantage of generally making the element type of the limit set more complicated.

source
Catlab.CategoricalAlgebra.FinSets.TabularSetType

Finite set whose elements are rows of a table.

The underlying table should be compliant with Tables.jl. For the sake of uniformity, the rows are provided as named tuples, which assumes that the table is not "extremely wide". This should not be a major limitation in practice but see the Tables.jl documentation for further discussion.

source
Catlab.CategoricalAlgebra.FinSets.VarFunctionType

Data type for a morphism of VarSet{T}s. Note we can equivalently view these as morphisms [n]+T -> [m]+T fixing T or as morphisms [n] -> [m]+T, in the typical Kleisli category yoga.

Currently, domains are treated as VarSets. The codom field is treated as a FinSet{Int}. Note that the codom accessor gives a VarSet while the codom field is just that VarSet's FinSet of AttrVars. This could be generalized to being FinSet{Symbol} to allow for symbolic attributes. (Likewise, AttrVars will have to wrap Any rather than Int)

source
Catlab.CategoricalAlgebra.FinRelations.FinRelationType

Binary relation between finite sets.

A morphism in the category of finite sets and relations. The relation can be represented implicitly by an arbitrary Julia function mapping pairs of elements to booleans or explicitly by a matrix (dense or sparse) taking values in the rig of booleans (BoolRig).

source

Free Diagrams, Limits, and Colimits

The following modules define free diagrams in an arbitrary category and specify limit and colimit cones over said diagrams. Thes constructions enjoy the fullest support for FinSet and are used below to define presheaf categories as C-Sets. The general idea of these functions is that you set up a limit computation by specifying a diagram and asking for a limit or colimit cone, which is returned as a struct containing the apex object and the leg morphisms. This cone structure can be queried using the functions apex and legs. Julia's multiple dispatch feature is heavily used to specialize limit and colimit computations for various diagram shapes like product/coproduct and equalizer/coequalizer. As a consumer of this API, it is highly recommended that you use multiple dispatch to specialize your code on the diagram shape whenever possible.

Catlab.CategoricalAlgebra.FreeDiagramsModule

Free diagrams in a category.

A free diagram in a category is a diagram whose shape is a free category. Examples include the empty diagram, pairs of objects, discrete diagrams, parallel pairs, composable pairs, and spans and cospans. Limits and colimits are most commonly taken over free diagrams.

source
Catlab.CategoricalAlgebra.FreeDiagrams.BipartiteFreeDiagramType

A free diagram with a bipartite structure.

Such diagrams include most of the fixed shapes, such as spans, cospans, and parallel morphisms. They are also the generic shape of diagrams for limits and colimits arising from undirected wiring diagrams. For limits, the boxes correspond to vertices in $V₁$ and the junctions to vertices in $V₂$. Colimits are dual.

source
Catlab.CategoricalAlgebra.FreeDiagrams.BipartiteFreeDiagramMethod

Convert a free diagram to a bipartite free diagram.

Reduce a free diagram to a free bipartite diagram with the same limit (the default, colimit=false) or the same colimit (colimit=true). The reduction is essentially the same in both cases, except for the choice of where to put isolated vertices, where we follow the conventions described at cone_objects and cocone_objects. The resulting object is a bipartite free diagram equipped with maps from the vertices of the bipartite diagram to the vertices of the original diagram.

source
Catlab.CategoricalAlgebra.FreeDiagrams.bundle_legsMethod

Bundle together legs of a multi(co)span.

For example, calling bundle_legs(span, SVector((1,2),(3,4))) on a multispan with four legs gives a span whose left leg bundles legs 1 and 2 and whose right leg bundles legs 3 and 4. Note that in addition to bundling, this function can also permute legs and discard them.

The bundling is performed using the universal property of (co)products, which assumes that these (co)limits exist.

source
Catlab.CategoricalAlgebra.FreeDiagrams.cone_objectsMethod

Objects in diagram that will have explicit legs in limit cone.

In category theory, it is common practice to elide legs of limit cones that can be computed from other legs, especially for diagrams of certain fixed shapes. For example, when it taking a pullback (the limit of a cospan), the limit object is often treated as having two projections, rather than three. This function encodes such conventions by listing the objects in the diagram that will have corresponding legs in the limit object created by Catlab.

See also: cocone_objects.

source
Catlab.CategoricalAlgebra.Limits.SpecializeLimitType

Meta-algorithm that reduces general limits to common special cases.

Reduces limits of free diagrams that happen to be discrete to products. If this fails, fall back to the given algorithm (if any).

TODO: Reduce free diagrams that are (multi)cospans to (wide) pullbacks.

source
Catlab.CategoricalAlgebra.Limits.colimitMethod

Colimit of a diagram.

To define colimits in a category with objects Ob, override the method colimit(::FreeDiagram{Ob}) for general colimits or colimit(::D) with suitable type D <: FixedShapeFreeDiagram{Ob} for colimits of specific shape, such as coproducts or coequalizers.

See also: limit

source
Catlab.CategoricalAlgebra.Limits.limitMethod

Limit of a diagram.

To define limits in a category with objects Ob, override the method limit(::FreeDiagram{Ob}) for general limits or limit(::D) with suitable type D <: FixedShapeFreeDiagram{Ob} for limits of specific shape, such as products or equalizers.

See also: colimit

source
Catlab.CategoricalAlgebra.Limits.pullbackMethod

Pullback of a pair of morphisms with common codomain.

To implement for a type T, define the method limit(::Cospan{T}) and/or limit(::Multicospan{T}) or, if you have already implemented products and equalizers, rely on the default implementation.

source
Catlab.CategoricalAlgebra.Limits.pushoutMethod

Pushout of a pair of morphisms with common domain.

To implement for a type T, define the method colimit(::Span{T}) and/or colimit(::Multispan{T}) or, if you have already implemented coproducts and coequalizers, rely on the default implementation.

source
Catlab.Theories.coequalizerMethod

Coequalizer of morphisms with common domain and codomain.

To implement for a type T, define the method colimit(::ParallelPair{T}) or colimit(::ParallelMorphisms{T}).

source
Catlab.Theories.copairMethod

Copairing of morphisms: universal property of coproducts/pushouts.

To implement for coproducts of type T, define the method universal(::BinaryCoproduct{T}, ::Cospan{T}) and/or universal(::Coproduct{T}, ::Multicospan{T}) and similarly for pushouts.

source
Catlab.Theories.coproductMethod

Coproduct of objects.

To implement for a type T, define the method colimit(::ObjectPair{T}) and/or colimit(::DiscreteDiagram{T}).

source
Catlab.Theories.createMethod

Unique morphism out of an initial object.

To implement for a type T, define the method universal(::Initial{T}, ::SMulticospan{0,T}).

source
Catlab.Theories.deleteMethod

Unique morphism into a terminal object.

To implement for a type T, define the method universal(::Terminal{T}, ::SMultispan{0,T}).

source
Catlab.Theories.equalizerMethod

Equalizer of morphisms with common domain and codomain.

To implement for a type T, define the method limit(::ParallelPair{T}) and/or limit(::ParallelMorphisms{T}).

source
Catlab.Theories.factorizeMethod

Factor morphism through (co)equalizer, via the universal property.

To implement for equalizers of type T, define the method universal(::Equalizer{T}, ::SMultispan{1,T}). For coequalizers of type T, define the method universal(::Coequalizer{T}, ::SMulticospan{1,T}).

source
Catlab.Theories.pairMethod

Pairing of morphisms: universal property of products/pullbacks.

To implement for products of type T, define the method universal(::BinaryProduct{T}, ::Span{T}) and/or universal(::Product{T}, ::Multispan{T}) and similarly for pullbacks.

source
Catlab.Theories.productMethod

Product of objects.

To implement for a type T, define the method limit(::ObjectPair{T}) and/or limit(::DiscreteDiagram{T}).

source
Catlab.Theories.universalFunction
universal(lim,cone)

Universal property of (co)limits.

Compute the morphism whose existence and uniqueness is guaranteed by the universal property of (co)limits.

See also: limit, colimit.

source

Categories

Catlab.CategoricalAlgebra.CategoriesModule

2-category of categories, functors, and natural transformations.

Categories in mathematics appear in the large, often as categories of sets with extra structure, and in the small, as algebraic structures that generalize groups, monoids, preorders, and graphs. This division manifests in Catlab as well. Large categories (in spirit, if not in the technical sense) occur throughout Catlab as @instances of the theory of categories. For computational reasons, small categories are usually presented by generators and relations.

This module provides a minimal interface to accomodate both situations. Category instances are supported through the wrapper type TypeCat. Finitely presented categories are provided by another module, FinCats.

source
Catlab.CategoricalAlgebra.Categories.CategoryType

Abstract base type for a category.

The objects and morphisms in the category have Julia types Ob and Hom, respectively. Note that these types do not necessarily form an @instance of the theory of categories, as they may not meaningfully form a category outside the context of this object. For example, a finite category regarded as a reflexive graph with a composition operation might have type Cat{Int,Int}, where the objects and morphisms are numerical identifiers for vertices and edges in the graph.

The basic operations available in any category are: dom, codom, id, compose.

source
Catlab.CategoricalAlgebra.Categories.FunctorType

Abstract base type for a functor between categories.

A functor has a domain and a codomain (dom and codom), which are categories, and object and morphism maps, which can be evaluated using ob_map and hom_map. The functor object can also be called directly when the objects and morphisms have distinct Julia types. This is sometimes but not always the case (see Category), so when writing generic code one should prefer the ob_map and hom_map functions.

source
Catlab.CategoricalAlgebra.Categories.TransformationType

Abstract base type for a natural transformation between functors.

A natural transformation $α: F ⇒ G$ has a domain $F$ and codomain $G$ (dom and codom), which are functors $F,G: C → D$ having the same domain $C$ and codomain $D$. The transformation consists of a component $αₓ: Fx → Gx$ in $D$ for each object $x ∈ C$, accessible using component or indexing notation (Base.getindex).

source
AlgebraicInterfaces.obFunction

Coerce or look up object in category.

Converts the input to an object in the category, which should be of type Ob in a category of type Cat{Ob,Hom}. How this works depends on the category, but a common case is to look up objects, which might be integers or GAT expressions, by their human-readable name, usually a symbol.

See also: hom.

source
GATlab.Stdlib.StdModels.opMethod

Oppositization 2-functor.

The oppositization endo-2-functor on Cat, sending a category to its opposite, is covariant on objects and morphisms and contravariant on 2-morphisms, i.e., is a 2-functor $op: Catᶜᵒ → Cat$. For more explanation, see the nLab.

source
Catlab.CategoricalAlgebra.FinCatsModule

2-category of finitely presented categories.

This module is for the 2-category Cat what the module FinSets is for the category Set: a finitary, combinatorial setting where explicit calculations can be carried out. We emphasize that the prefix Fin means "finitely presented," not "finite," as finite categories are too restrictive a notion for many purposes. For example, the free category on a graph is finite if and only if the graph is DAG, which is a fairly special condition. This usage of Fin is also consistent with FinSet because for sets, being finite and being finitely presented are equivalent.

source
Catlab.CategoricalAlgebra.FinCats.FinCatGraphEqType

Category presented by a finite graph together with path equations.

The objects of the category are vertices in the graph and the morphisms are paths, quotiented by the congruence relation generated by the path equations. See (Spivak, 2014, Category theory for the sciences, §4.5).

source
Catlab.CategoricalAlgebra.FinCats.FinCatPresentationType

Category defined by a Presentation object.

The presentation type can, of course, be a category (Theories.Category). It can also be a schema (Theories.Schema). In this case, the schema's objects and attribute types are regarded as the category's objects and the schema's morphisms, attributes, and attribute types as the category's morphisms (where the attribute types are identity morphisms). When the schema is formalized as a profunctor whose codomain category is discrete, this amounts to taking the collage of the profunctor.

source
Catlab.CategoricalAlgebra.FinCats.FinTransformationType

A natural transformation whose domain category is finitely generated.

This type is for natural transformations $α: F ⇒ G: C → D$ such that the domain category $C$ is finitely generated. Such a natural transformation is given by a finite amount of data (one morphism in $D$ for each generating object of $C$) and its naturality is verified by finitely many equations (one equation for each generating morphism of $C$).

source
Catlab.CategoricalAlgebra.FinCats.dom_to_graphMethod

Reinterpret a functor on a finitely presented category as a functor on the equivalent category (ignoring equations) free on a graph. Also normalizes the input to have vector obmap and hommap, with valtype optionally specified. This is useful when the domain is empty or when the maps might be tightly typed but need to allow for types such as that of identity morphisms upon mutation.

source
Catlab.CategoricalAlgebra.FinCats.forceFunction

Force evaluation of lazily defined function or functor. The resulting obmap and hommap are guaranteed to have valtype or eltype, as appropriate, equal to Ob and Hom, respectively.

source
Catlab.CategoricalAlgebra.FinCats.hom_generatorFunction

Coerce or look up morphism generator in a finitely presented category.

Since morphism generators often have a different data type than morphisms (e.g., in a free category on a graph, the morphism generators are edges and the morphisms are paths), the return type of this function is generally different than that of hom.

source
Catlab.CategoricalAlgebra.FinCats.is_functorialMethod

Is the purported functor on a presented category functorial?

This function checks that functor preserves domains and codomains. When check_equations is true (the default is false), it also purports to check that the functor preserves all equations in the domain category. No nontrivial checks are currently implemented, so this only functions for identity functors.

See also: `functoriality_failures' and is_natural.

source
Catlab.CategoricalAlgebra.FinCats.is_initialMethod

Dual to a final functor, an initial functor is one for which pulling back diagrams along it does not change the limits of these diagrams.

This amounts to checking, for a functor C->D, that, for every object d in Ob(D), the comma category (F/d) is connected.

source
Catlab.CategoricalAlgebra.FinCats.is_naturalMethod

Is the transformation between FinDomFunctors a natural transformation?

This function uses the fact that to check whether a transformation is natural, it suffices to check the naturality equations on a generating set of morphisms of the domain category. In some cases, checking the equations may be expensive or impossible. When the keyword argument check_equations is false, only the domains and codomains of the components are checked.

See also: is_functorial.

source
Catlab.CategoricalAlgebra.FinCats.make_mapMethod

Maps f over a UnitRange to produce a Vector, or else over anything to produce a Dict. The type paramter functions to ensure the return type is as desired even when the input is empty.

source
Catlab.CategoricalAlgebra.FinCats.ob_generatorFunction

Coerce or look up object generator in a finitely presented category.

Because object generators usually coincide with objects, the default method for ob in finitely presented categories simply calls this function.

source
Catlab.CategoricalAlgebra.FinCats.ob_generatorsFunction

Object generators of finitely presented category.

The object generators of finite presented category are almost always the same as the objects. In principle, however, it is possible to have equations between objects, so that there are fewer objects than object generators.

source

Acsets

Overview and Theory

For an in depth look into the theory behind acsets, we refer the reader to our paper on the subject, which also gives some sense as to how the implementation works. Here, we give a brief tutorial before the the API documentation.

The most essential part of the acset machinery is the schema. The schema parameterizes the acset: each schema corresponds to a different type of acset. Schemas consist of four parts.

  • Objects $X,Y$ ((X,Y,Z)::Ob)
  • Homomorphisms $f \colon X \to Y$ (f :: Hom(X,Y)), which go from objects to objects
  • Attribute types $\mathtt{T}$ (T :: AttrType)
  • Attributes $a \colon X \to \mathtt{T}$ (a :: Attr(X,T)), which go from objects to data types

For those with a categorical background, a schema is a presentation of a category $|S|$ along with a functor $S$ from $|S|$ to the arrow category $0 \to 1$, such that $S^{-1}(1)$ is discrete.

An acset $F$ on a schema consists of...

  • a set $F(X)$ of "primary keys" for each object
  • a function $F(f) \colon F(X) \to F(Y)$ for each morphism
  • a Julia data type $F(\mathtt{T})$ for each data type $\mathtt{T}$
  • a function $F(a) \colon F(X) \to F(\mathtt{T})$ for each attribute $a$.

For those with a categorical background, an acset on a schema $S$ consists of a functor from $S$ to $\mathsf{Set}$, such that objects in $S^{-1}(0)$ map to finite sets, and objects in $S^{-1}(1)$ map to sets that represent types. For any particular functor $K \colon S^{-1}(1) \to \mathsf{Set}$, we can also take the category of acsets that restrict to this map on $S^{-1}$.

We can also add equations to this presentation, but we currently do nothing with those equations in the implementation; they mostly serve as documentation.

We will now give an example of how this all works in practice.

using GATlab, Catlab.CategoricalAlgebra
+    R ╌╌> Im′
source
Catlab.CategoricalAlgebra.Limits.limitMethod

Limit of a diagram.

To define limits in a category with objects Ob, override the method limit(::FreeDiagram{Ob}) for general limits or limit(::D) with suitable type D <: FixedShapeFreeDiagram{Ob} for limits of specific shape, such as products or equalizers.

See also: colimit

source
Catlab.CategoricalAlgebra.Limits.pullbackMethod

Pullback of a pair of morphisms with common codomain.

To implement for a type T, define the method limit(::Cospan{T}) and/or limit(::Multicospan{T}) or, if you have already implemented products and equalizers, rely on the default implementation.

source
Catlab.CategoricalAlgebra.Limits.pushoutMethod

Pushout of a pair of morphisms with common domain.

To implement for a type T, define the method colimit(::Span{T}) and/or colimit(::Multispan{T}) or, if you have already implemented coproducts and coequalizers, rely on the default implementation.

source
Catlab.Theories.coequalizerMethod

Coequalizer of morphisms with common domain and codomain.

To implement for a type T, define the method colimit(::ParallelPair{T}) or colimit(::ParallelMorphisms{T}).

source
Catlab.Theories.copairMethod

Copairing of morphisms: universal property of coproducts/pushouts.

To implement for coproducts of type T, define the method universal(::BinaryCoproduct{T}, ::Cospan{T}) and/or universal(::Coproduct{T}, ::Multicospan{T}) and similarly for pushouts.

source
Catlab.Theories.coproductMethod

Coproduct of objects.

To implement for a type T, define the method colimit(::ObjectPair{T}) and/or colimit(::DiscreteDiagram{T}).

source
Catlab.Theories.createMethod

Unique morphism out of an initial object.

To implement for a type T, define the method universal(::Initial{T}, ::SMulticospan{0,T}).

source
Catlab.Theories.deleteMethod

Unique morphism into a terminal object.

To implement for a type T, define the method universal(::Terminal{T}, ::SMultispan{0,T}).

source
Catlab.Theories.equalizerMethod

Equalizer of morphisms with common domain and codomain.

To implement for a type T, define the method limit(::ParallelPair{T}) and/or limit(::ParallelMorphisms{T}).

source
Catlab.Theories.factorizeMethod

Factor morphism through (co)equalizer, via the universal property.

To implement for equalizers of type T, define the method universal(::Equalizer{T}, ::SMultispan{1,T}). For coequalizers of type T, define the method universal(::Coequalizer{T}, ::SMulticospan{1,T}).

source
Catlab.Theories.pairMethod

Pairing of morphisms: universal property of products/pullbacks.

To implement for products of type T, define the method universal(::BinaryProduct{T}, ::Span{T}) and/or universal(::Product{T}, ::Multispan{T}) and similarly for pullbacks.

source
Catlab.Theories.productMethod

Product of objects.

To implement for a type T, define the method limit(::ObjectPair{T}) and/or limit(::DiscreteDiagram{T}).

source
Catlab.Theories.universalFunction
universal(lim,cone)

Universal property of (co)limits.

Compute the morphism whose existence and uniqueness is guaranteed by the universal property of (co)limits.

See also: limit, colimit.

source

Categories

Catlab.CategoricalAlgebra.CategoriesModule

2-category of categories, functors, and natural transformations.

Categories in mathematics appear in the large, often as categories of sets with extra structure, and in the small, as algebraic structures that generalize groups, monoids, preorders, and graphs. This division manifests in Catlab as well. Large categories (in spirit, if not in the technical sense) occur throughout Catlab as @instances of the theory of categories. For computational reasons, small categories are usually presented by generators and relations.

This module provides a minimal interface to accomodate both situations. Category instances are supported through the wrapper type TypeCat. Finitely presented categories are provided by another module, FinCats.

source
Catlab.CategoricalAlgebra.Categories.CategoryType

Abstract base type for a category.

The objects and morphisms in the category have Julia types Ob and Hom, respectively. Note that these types do not necessarily form an @instance of the theory of categories, as they may not meaningfully form a category outside the context of this object. For example, a finite category regarded as a reflexive graph with a composition operation might have type Cat{Int,Int}, where the objects and morphisms are numerical identifiers for vertices and edges in the graph.

The basic operations available in any category are: dom, codom, id, compose.

source
Catlab.CategoricalAlgebra.Categories.FunctorType

Abstract base type for a functor between categories.

A functor has a domain and a codomain (dom and codom), which are categories, and object and morphism maps, which can be evaluated using ob_map and hom_map. The functor object can also be called directly when the objects and morphisms have distinct Julia types. This is sometimes but not always the case (see Category), so when writing generic code one should prefer the ob_map and hom_map functions.

source
Catlab.CategoricalAlgebra.Categories.TransformationType

Abstract base type for a natural transformation between functors.

A natural transformation $α: F ⇒ G$ has a domain $F$ and codomain $G$ (dom and codom), which are functors $F,G: C → D$ having the same domain $C$ and codomain $D$. The transformation consists of a component $αₓ: Fx → Gx$ in $D$ for each object $x ∈ C$, accessible using component or indexing notation (Base.getindex).

source
AlgebraicInterfaces.obFunction

Coerce or look up object in category.

Converts the input to an object in the category, which should be of type Ob in a category of type Cat{Ob,Hom}. How this works depends on the category, but a common case is to look up objects, which might be integers or GAT expressions, by their human-readable name, usually a symbol.

See also: hom.

source
GATlab.Stdlib.StdModels.opMethod

Oppositization 2-functor.

The oppositization endo-2-functor on Cat, sending a category to its opposite, is covariant on objects and morphisms and contravariant on 2-morphisms, i.e., is a 2-functor $op: Catᶜᵒ → Cat$. For more explanation, see the nLab.

source
Catlab.CategoricalAlgebra.FinCatsModule

2-category of finitely presented categories.

This module is for the 2-category Cat what the module FinSets is for the category Set: a finitary, combinatorial setting where explicit calculations can be carried out. We emphasize that the prefix Fin means "finitely presented," not "finite," as finite categories are too restrictive a notion for many purposes. For example, the free category on a graph is finite if and only if the graph is DAG, which is a fairly special condition. This usage of Fin is also consistent with FinSet because for sets, being finite and being finitely presented are equivalent.

source
Catlab.CategoricalAlgebra.FinCats.FinCatGraphEqType

Category presented by a finite graph together with path equations.

The objects of the category are vertices in the graph and the morphisms are paths, quotiented by the congruence relation generated by the path equations. See (Spivak, 2014, Category theory for the sciences, §4.5).

source
Catlab.CategoricalAlgebra.FinCats.FinCatPresentationType

Category defined by a Presentation object.

The presentation type can, of course, be a category (Theories.Category). It can also be a schema (Theories.Schema). In this case, the schema's objects and attribute types are regarded as the category's objects and the schema's morphisms, attributes, and attribute types as the category's morphisms (where the attribute types are identity morphisms). When the schema is formalized as a profunctor whose codomain category is discrete, this amounts to taking the collage of the profunctor.

source
Catlab.CategoricalAlgebra.FinCats.FinTransformationType

A natural transformation whose domain category is finitely generated.

This type is for natural transformations $α: F ⇒ G: C → D$ such that the domain category $C$ is finitely generated. Such a natural transformation is given by a finite amount of data (one morphism in $D$ for each generating object of $C$) and its naturality is verified by finitely many equations (one equation for each generating morphism of $C$).

source
Catlab.CategoricalAlgebra.FinCats.dom_to_graphMethod

Reinterpret a functor on a finitely presented category as a functor on the equivalent category (ignoring equations) free on a graph. Also normalizes the input to have vector obmap and hommap, with valtype optionally specified. This is useful when the domain is empty or when the maps might be tightly typed but need to allow for types such as that of identity morphisms upon mutation.

source
Catlab.CategoricalAlgebra.FinCats.forceFunction

Force evaluation of lazily defined function or functor. The resulting obmap and hommap are guaranteed to have valtype or eltype, as appropriate, equal to Ob and Hom, respectively.

source
Catlab.CategoricalAlgebra.FinCats.hom_generatorFunction

Coerce or look up morphism generator in a finitely presented category.

Since morphism generators often have a different data type than morphisms (e.g., in a free category on a graph, the morphism generators are edges and the morphisms are paths), the return type of this function is generally different than that of hom.

source
Catlab.CategoricalAlgebra.FinCats.is_functorialMethod

Is the purported functor on a presented category functorial?

This function checks that functor preserves domains and codomains. When check_equations is true (the default is false), it also purports to check that the functor preserves all equations in the domain category. No nontrivial checks are currently implemented, so this only functions for identity functors.

See also: `functoriality_failures' and is_natural.

source
Catlab.CategoricalAlgebra.FinCats.is_initialMethod

Dual to a final functor, an initial functor is one for which pulling back diagrams along it does not change the limits of these diagrams.

This amounts to checking, for a functor C->D, that, for every object d in Ob(D), the comma category (F/d) is connected.

source
Catlab.CategoricalAlgebra.FinCats.is_naturalMethod

Is the transformation between FinDomFunctors a natural transformation?

This function uses the fact that to check whether a transformation is natural, it suffices to check the naturality equations on a generating set of morphisms of the domain category. In some cases, checking the equations may be expensive or impossible. When the keyword argument check_equations is false, only the domains and codomains of the components are checked.

See also: is_functorial.

source
Catlab.CategoricalAlgebra.FinCats.make_mapMethod

Maps f over a UnitRange to produce a Vector, or else over anything to produce a Dict. The type paramter functions to ensure the return type is as desired even when the input is empty.

source
Catlab.CategoricalAlgebra.FinCats.ob_generatorFunction

Coerce or look up object generator in a finitely presented category.

Because object generators usually coincide with objects, the default method for ob in finitely presented categories simply calls this function.

source
Catlab.CategoricalAlgebra.FinCats.ob_generatorsFunction

Object generators of finitely presented category.

The object generators of finite presented category are almost always the same as the objects. In principle, however, it is possible to have equations between objects, so that there are fewer objects than object generators.

source

Acsets

Overview and Theory

For an in depth look into the theory behind acsets, we refer the reader to our paper on the subject, which also gives some sense as to how the implementation works. Here, we give a brief tutorial before the the API documentation.

The most essential part of the acset machinery is the schema. The schema parameterizes the acset: each schema corresponds to a different type of acset. Schemas consist of four parts.

  • Objects $X,Y$ ((X,Y,Z)::Ob)
  • Homomorphisms $f \colon X \to Y$ (f :: Hom(X,Y)), which go from objects to objects
  • Attribute types $\mathtt{T}$ (T :: AttrType)
  • Attributes $a \colon X \to \mathtt{T}$ (a :: Attr(X,T)), which go from objects to data types

For those with a categorical background, a schema is a presentation of a category $|S|$ along with a functor $S$ from $|S|$ to the arrow category $0 \to 1$, such that $S^{-1}(1)$ is discrete.

An acset $F$ on a schema consists of...

  • a set $F(X)$ of "primary keys" for each object
  • a function $F(f) \colon F(X) \to F(Y)$ for each morphism
  • a Julia data type $F(\mathtt{T})$ for each data type $\mathtt{T}$
  • a function $F(a) \colon F(X) \to F(\mathtt{T})$ for each attribute $a$.

For those with a categorical background, an acset on a schema $S$ consists of a functor from $S$ to $\mathsf{Set}$, such that objects in $S^{-1}(0)$ map to finite sets, and objects in $S^{-1}(1)$ map to sets that represent types. For any particular functor $K \colon S^{-1}(1) \to \mathsf{Set}$, we can also take the category of acsets that restrict to this map on $S^{-1}$.

We can also add equations to this presentation, but we currently do nothing with those equations in the implementation; they mostly serve as documentation.

We will now give an example of how this all works in practice.

using GATlab, Catlab.CategoricalAlgebra
 
 # Write down the schema for a weighted graph
 @present SchWeightedGraph(FreeSchema) begin
@@ -76,8 +76,8 @@
 

API

The mathematical abstraction of an acset can of course be implemented in many different ways. Currently, there are three implementations of acsets in Catlab, which share a great deal of code.

These implementations can be split into two categories.

The first category is static acset types. In this implementation, different schemas correspond to different Julia types. Methods on these Julia types are then custom-generated for the schema, using CompTime.jl.

Under this category, there are two classes of static acset types. The first class is acset types that are generated using the @acset_type macro. These acset types are custom-derived structs. The advantage of this is that the structs have names like Graph or WiringDiagram that are printed out in error messages. The disadvantage is that if you are taking in schemas at runtime, you have to eval code in order to use them.

Here is an example of using @acset_type

@acset_type WeightedGraph(SchWeightedGraph, index=[:src,:tgt])
 g = WeightedGraph()

The second class is AnonACSets. Like acset types derived from @acset_type, these contain the schema in their type. However, they also contain the type of their fields in their types, so the types printed out in error messages are long and ugly. The advantage of these is that they can be used in situations where the schema is passed in at runtime, and they don't require using eval to create a new acset type.

Here is an example of using AnonACSet

const WeightedGraph = AnonACSetType(SchWeightedGraph, index=[:src,:tgt])
-g = WeightedGraph()

The second category is dynamic acset types. Currently, there is just one type that falls under this category: DynamicACSet. This type has a field for the schema, and no code-generation is done for operations on acsets of this type. This means that if the schema is large compared to the data, this type will often be faster than the static acsets.

However, dynamics acsets are a new addition to Catlab, and much of the machinery of limits, colimits, and other high-level acset constructions assumes that the schema of an acset can be derived from the type. Thus, more work will have to be done before dynamic acsets become a drop-in replacement for static acsets.

Here is an example of using a dynamic acset

g = DynamicACSet("WeightedGraph", SchWeightedGraph; index=[:src,:tgt])
Catlab.CategoricalAlgebra.CSets.ACSetTransformationType

Transformation between attributed C-sets.

Homomorphisms of attributed C-sets generalize homomorphisms of C-sets (CSetTransformation), which you should understand before reading this.

A homomorphism of attributed C-sets with schema S: C ↛ A (a profunctor) is a natural transformation between the corresponding functors col(S) → Set, where col(S) is the collage of S. When the components on attribute types, indexed by objects of A, are all identity functions, the morphism is called tight; in general, it is called loose. With this terminology, acsets on a fixed schema are the objects of an ℳ-category (see Catlab.Theories.MCategory). Calling ACSetTransformation will construct a tight or loose morphism as appropriate, depending on which components are specified.

Since every tight morphism can be considered a loose one, the distinction between tight and loose may seem a minor technicality, but it has important consequences because limits and colimits in a category depend as much on the morphisms as on the objects. In particular, limits and colimits of acsets differ greatly depending on whether they are taken in the category of acsets with tight morphisms or with loose morphisms. Tight morphisms suffice for many purposes, including most applications of colimits. However, when computing limits of acsets, loose morphisms are usually preferable. For more information about limits and colimits in these categories, see TightACSetTransformation and LooseACSetTransformation.

source
Catlab.CategoricalAlgebra.CSets.CSetTransformationType

Transformation between C-sets.

Recall that a C-set homomorphism is a natural transformation: a transformation between functors C → Set satisfying the naturality axiom for every morphism, or equivalently every generating morphism, in C.

This data type records the data of a C-set transformation. Naturality is not strictly enforced but is expected to be satisfied. It can be checked using the function is_natural.

If the schema of the dom and codom has attributes, this has the semantics of being a valid C-set transformation on the combinatorial data alone (including attribute variables, if any).

source
Catlab.CategoricalAlgebra.CSets.LooseACSetTransformationType

Loose transformation between attributed C-sets.

Limits and colimits in the category of attributed C-sets and loose homomorphisms are computed pointwise on both objects and attribute types. This implies that (co)limits of Julia types must be computed. Due to limitations in the expressivity of Julia's type system, only certain simple kinds of (co)limits, such as products, are supported.

Alternatively, colimits involving loose acset transformations can be constructed with respect to explicitly given attribute type components for the legs of the cocone, via the keyword argument type_components to colimit and related functions. This uses the universal property of the colimit. To see how this works, notice that a diagram of acsets and loose acset transformations can be expressed as a diagram D: J → C-Set (for the C-sets) along with another diagram A: J → C-Set (for the attribute sets) and a natural transformation α: D ⇒ A (assigning attributes). Given a natural transformation τ: A ⇒ ΔB to a constant functor ΔB, with components given by type_components, the composite transformation α⋅τ: D ⇒ ΔB is a cocone under D, hence factors through the colimit cocone of D. This factoring yields an assigment of attributes to the colimit in C-Set.

For the distinction between tight and loose, see ACSetTranformation.

source
Catlab.CategoricalAlgebra.CSets.TightACSetTransformationType

Tight transformation between attributed C-sets.

The category of attributed C-sets and tight homomorphisms is isomorphic to a slice category of C-Set, as explained in our paper "Categorical Data Structures for Technical Computing". Colimits in this category thus reduce to colimits of C-sets, by a standard result about slice categories. Limits are more complicated and are currently not supported.

For the distinction between tight and loose, see ACSetTranformation.

source
Catlab.CategoricalAlgebra.CSets.in_boundsMethod

Check whether an ACSetTransformation is still valid, despite possible deletion of elements in the codomain. An ACSetTransformation that isn't in bounds will throw an error, rather than return false, if run through is_natural.

source
Catlab.CategoricalAlgebra.CSets.naturality_failuresMethod

Returns a dictionary whose keys are contained in the names in arrows(S) and whose value at :f, for an arrow (f,c,d), is a lazy iterator over the elements of X(c) on which α's naturality square for f does not commute. Components should be a NamedTuple or Dictionary with keys contained in the names of S's morphisms and values vectors or dicts defining partial functions from X(c) to Y(c).

source
Catlab.CategoricalAlgebra.FinCats.is_naturalMethod

Check naturality condition for a purported ACSetTransformation, α: X→Y. For each hom in the schema, e.g. h: m → n, the following square must commute:

     αₘ
+g = WeightedGraph()

The second category is dynamic acset types. Currently, there is just one type that falls under this category: DynamicACSet. This type has a field for the schema, and no code-generation is done for operations on acsets of this type. This means that if the schema is large compared to the data, this type will often be faster than the static acsets.

However, dynamics acsets are a new addition to Catlab, and much of the machinery of limits, colimits, and other high-level acset constructions assumes that the schema of an acset can be derived from the type. Thus, more work will have to be done before dynamic acsets become a drop-in replacement for static acsets.

Here is an example of using a dynamic acset

g = DynamicACSet("WeightedGraph", SchWeightedGraph; index=[:src,:tgt])
Catlab.CategoricalAlgebra.CSets.ACSetTransformationType

Transformation between attributed C-sets.

Homomorphisms of attributed C-sets generalize homomorphisms of C-sets (CSetTransformation), which you should understand before reading this.

A homomorphism of attributed C-sets with schema S: C ↛ A (a profunctor) is a natural transformation between the corresponding functors col(S) → Set, where col(S) is the collage of S. When the components on attribute types, indexed by objects of A, are all identity functions, the morphism is called tight; in general, it is called loose. With this terminology, acsets on a fixed schema are the objects of an ℳ-category (see Catlab.Theories.MCategory). Calling ACSetTransformation will construct a tight or loose morphism as appropriate, depending on which components are specified.

Since every tight morphism can be considered a loose one, the distinction between tight and loose may seem a minor technicality, but it has important consequences because limits and colimits in a category depend as much on the morphisms as on the objects. In particular, limits and colimits of acsets differ greatly depending on whether they are taken in the category of acsets with tight morphisms or with loose morphisms. Tight morphisms suffice for many purposes, including most applications of colimits. However, when computing limits of acsets, loose morphisms are usually preferable. For more information about limits and colimits in these categories, see TightACSetTransformation and LooseACSetTransformation.

source
Catlab.CategoricalAlgebra.CSets.CSetTransformationType

Transformation between C-sets.

Recall that a C-set homomorphism is a natural transformation: a transformation between functors C → Set satisfying the naturality axiom for every morphism, or equivalently every generating morphism, in C.

This data type records the data of a C-set transformation. Naturality is not strictly enforced but is expected to be satisfied. It can be checked using the function is_natural.

If the schema of the dom and codom has attributes, this has the semantics of being a valid C-set transformation on the combinatorial data alone (including attribute variables, if any).

source
Catlab.CategoricalAlgebra.CSets.LooseACSetTransformationType

Loose transformation between attributed C-sets.

Limits and colimits in the category of attributed C-sets and loose homomorphisms are computed pointwise on both objects and attribute types. This implies that (co)limits of Julia types must be computed. Due to limitations in the expressivity of Julia's type system, only certain simple kinds of (co)limits, such as products, are supported.

Alternatively, colimits involving loose acset transformations can be constructed with respect to explicitly given attribute type components for the legs of the cocone, via the keyword argument type_components to colimit and related functions. This uses the universal property of the colimit. To see how this works, notice that a diagram of acsets and loose acset transformations can be expressed as a diagram D: J → C-Set (for the C-sets) along with another diagram A: J → C-Set (for the attribute sets) and a natural transformation α: D ⇒ A (assigning attributes). Given a natural transformation τ: A ⇒ ΔB to a constant functor ΔB, with components given by type_components, the composite transformation α⋅τ: D ⇒ ΔB is a cocone under D, hence factors through the colimit cocone of D. This factoring yields an assigment of attributes to the colimit in C-Set.

For the distinction between tight and loose, see ACSetTranformation.

source
Catlab.CategoricalAlgebra.CSets.TightACSetTransformationType

Tight transformation between attributed C-sets.

The category of attributed C-sets and tight homomorphisms is isomorphic to a slice category of C-Set, as explained in our paper "Categorical Data Structures for Technical Computing". Colimits in this category thus reduce to colimits of C-sets, by a standard result about slice categories. Limits are more complicated and are currently not supported.

For the distinction between tight and loose, see ACSetTranformation.

source
Catlab.CategoricalAlgebra.CSets.in_boundsMethod

Check whether an ACSetTransformation is still valid, despite possible deletion of elements in the codomain. An ACSetTransformation that isn't in bounds will throw an error, rather than return false, if run through is_natural.

source
Catlab.CategoricalAlgebra.CSets.naturality_failuresMethod

Returns a dictionary whose keys are contained in the names in arrows(S) and whose value at :f, for an arrow (f,c,d), is a lazy iterator over the elements of X(c) on which α's naturality square for f does not commute. Components should be a NamedTuple or Dictionary with keys contained in the names of S's morphisms and values vectors or dicts defining partial functions from X(c) to Y(c).

source
Catlab.CategoricalAlgebra.FinCats.is_naturalMethod

Check naturality condition for a purported ACSetTransformation, α: X→Y. For each hom in the schema, e.g. h: m → n, the following square must commute:

     αₘ
   Xₘ --> Yₘ
 Xₕ ↓  ✓  ↓ Yₕ
   Xₙ --> Yₙ
-     αₙ

You're allowed to run this on a named tuple partly specifying an ACSetTransformation, though at this time the domain and codomain must be fully specified ACSets.

source
Catlab.CategoricalAlgebra.FunctorialDataMigrations.internal_homMethod

Objects: Fᴳ(c) = C-Set(C × G, F) where C is the representable c

Given a map f: a->b, we compute that f(Aᵢ) = Bⱼ by constructing the following: Aᵢ A × G → F f*↑ ↑ ↑ ↗ Bⱼ find the hom Bⱼ that makes this commute B × G

where f* is given by yoneda.

source
Catlab.CategoricalAlgebra.FunctorialDataMigrations.representableMethod

Construct a representable C-set.

Recall that a representable C-set is one of form $C(c,-): C → Set$ for some object $c ∈ C$.

This function computes the $c$ representable as the left pushforward data migration of the singleton ${c}$-set along the inclusion functor ${c} ↪ C$, which works because left Kan extensions take representables to representables (Mac Lane 1978, Exercise X.3.2). Besides the intrinsic difficulties with representables (they can be infinite), this function thus inherits any limitations of our implementation of left pushforward data migrations.

source
Catlab.CategoricalAlgebra.FunctorialDataMigrations.subobject_classifierMethod

The subobject classifier Ω in a presheaf topos is the presheaf that sends each object A to the set of sieves on it (equivalently, the set of subobjects of the representable presheaf for A). Counting subobjects gives us the number of A parts; the hom data for f:A->B for subobject Aᵢ is determined via:

Aᵢ ↪ A ↑ ↑ f* PB⌝↪ B (PB picks out a subobject of B, up to isomorphism.)

(where A and B are the representables for objects A and B and f* is the unique map from B into the A which sends the point of B to f applied to the point of A)

Returns the classifier as well as a dictionary of subobjects corresponding to the parts of the classifier.

source
Catlab.CategoricalAlgebra.FunctorialDataMigrations.yonedaMethod

Compute the Yoneda embedding of a category C in the category of C-sets.

Because Catlab privileges copresheaves (C-sets) over presheaves, this is the contravariant Yoneda embedding, i.e., the embedding functor C^op → C-Set.

The first argument cons is a constructor for the ACSet, such as a struct acset type. If representables have already been computed (which can be expensive), they can be supplied via the cache keyword argument.

Returns a FinDomFunctor with domain op(C).

source
Catlab.CategoricalAlgebra.ChaseModule

The chase is an algorithm which subjects a C-Set instance to constraints expressed in the language of regular logic, called embedded dependencies (EDs, or 'triggers').

A morphism S->T, encodes an embedded dependency. If the pattern S is matched (via a homomorphism S->I), we demand there exist a morphism T->I (for some database instance I) that makes the triangle commute in order to satisfy the dependency (if this is not the case, then the trigger is 'active').

Homomorphisms can merge elements and introduce new ones. The former kind are called "equality generating dependencies" (EGDs) and the latter "tuple generating dependencies" (TGDs). Any homomorphism can be factored into EGD and TGD components by, respectively, restricting the codomain to the image or restricting the domain to the coimage.

source
Catlab.CategoricalAlgebra.Chase.chaseMethod
chase(I::ACSet, Σ::AbstractDict, n::Int)

Chase a C-Set or C-Rel instance given a list of embedded dependencies. This may not terminate, so a bound n on the number of iterations is required.

[,]

ΣS ⟶ Iₙ ⊕↓ ⋮ (resulting morphism) ΣT ... Iₙ₊₁

There is a copy of S and T for each active trigger. A trigger is a map from S into the current instance. What makes it 'active' is that there is no morphism from T to I that makes the triangle commute.

Each iteration constructs the above pushout square. The result is a morphism, so that one can keep track of the provenance of elements in the original CSet instance within the chased result.

Whether or not the result is due to success or timeout is returned as a boolean flag.

TODO: this algorithm could be made more efficient by homomorphism caching.

source
Catlab.CategoricalAlgebra.StructuredCospans.StructuredCospanType

Structured cospan.

The first type parameter L encodes a functor L: A → X from the base category A, often FinSet, to a category X with "extra structure." An L-structured cospan is then a cospan in X whose feet are images under L of objects in A. The category X is assumed to have pushouts.

Structured cospans form a double category with no further assumptions on the functor L. To obtain a symmetric monoidal double category, L must preserve finite coproducts. In practice, L usually has a right adjoint R: X → A, which implies that L preserves all finite colimits. It also allows structured cospans to be constructed more conveniently from an object x in X plus a cospan in A with apex R(x).

See also: StructuredMulticospan.

source
Catlab.CategoricalAlgebra.StructuredCospans.OpenACSetTypesMethod

Create types for open attributed C-sets from an attributed C-set type.

The type parameters of the given acset type should not be instantiated with specific Julia types. This function returns a pair of types, one for objects, a subtype of StructuredCospanOb, and one for morphisms, a subtype of StructuredMulticospan. Both types will have the same type parameters for attribute types as the given acset type.

Mathematically speaking, this function sets up structured (multi)cospans with a functor $L: A → X$ between categories of acsets that creates "discrete acsets." Such a "discrete acset functor" is a functor that is left adjoint to a certain kind of forgetful functor between categories of acsets, namely one that is a pullback along an inclusion of schemas such that the image of inclusion has no outgoing arrows. For example, the schema inclusion ${V} ↪ {E ⇉ V}$ has this property but ${E} ↪ {E ⇉ V}$ does not.

See also: OpenCSetTypes.

source
+ αₙ

You're allowed to run this on a named tuple partly specifying an ACSetTransformation, though at this time the domain and codomain must be fully specified ACSets.

source
Catlab.CategoricalAlgebra.FunctorialDataMigrationsModule

Functorial data migration for attributed C-sets.

source
Catlab.CategoricalAlgebra.FunctorialDataMigrations.DataMigrationFunctorType

Data migration functor given contravariantly. Stores a contravariant migration.

source
Catlab.CategoricalAlgebra.FunctorialDataMigrations.internal_homMethod

Objects: Fᴳ(c) = C-Set(C × G, F) where C is the representable c

Given a map f: a->b, we compute that f(Aᵢ) = Bⱼ by constructing the following: Aᵢ A × G → F f*↑ ↑ ↑ ↗ Bⱼ find the hom Bⱼ that makes this commute B × G

where f* is given by yoneda.

source
Catlab.CategoricalAlgebra.FunctorialDataMigrations.migrate!Method

Contravariantly migrate data from the acset Y to the acset X.

This is the mutating variant of migrate!. When the functor on schemas is the identity, this operation is equivalent to copy_parts!.

source
Catlab.CategoricalAlgebra.FunctorialDataMigrations.migrateMethod

Apply a $Δ$ migration by simple precomposition.

source
Catlab.CategoricalAlgebra.FunctorialDataMigrations.migrateMethod

Contravariantly migrate data from the acset Y to a new acset of type T.

The mutating variant of this function is migrate!.

source
Catlab.CategoricalAlgebra.FunctorialDataMigrations.representableMethod

Construct a representable C-set.

Recall that a representable C-set is one of form $C(c,-): C → Set$ for some object $c ∈ C$.

This function computes the $c$ representable as the left pushforward data migration of the singleton ${c}$-set along the inclusion functor ${c} ↪ C$, which works because left Kan extensions take representables to representables (Mac Lane 1978, Exercise X.3.2). Besides the intrinsic difficulties with representables (they can be infinite), this function thus inherits any limitations of our implementation of left pushforward data migrations.

source
Catlab.CategoricalAlgebra.FunctorialDataMigrations.subobject_classifierMethod

The subobject classifier Ω in a presheaf topos is the presheaf that sends each object A to the set of sieves on it (equivalently, the set of subobjects of the representable presheaf for A). Counting subobjects gives us the number of A parts; the hom data for f:A->B for subobject Aᵢ is determined via:

Aᵢ ↪ A ↑ ↑ f* PB⌝↪ B (PB picks out a subobject of B, up to isomorphism.)

(where A and B are the representables for objects A and B and f* is the unique map from B into the A which sends the point of B to f applied to the point of A)

Returns the classifier as well as a dictionary of subobjects corresponding to the parts of the classifier.

source
Catlab.CategoricalAlgebra.FunctorialDataMigrations.yonedaMethod

Compute the Yoneda embedding of a category C in the category of C-sets.

Because Catlab privileges copresheaves (C-sets) over presheaves, this is the contravariant Yoneda embedding, i.e., the embedding functor C^op → C-Set.

The first argument cons is a constructor for the ACSet, such as a struct acset type. If representables have already been computed (which can be expensive), they can be supplied via the cache keyword argument.

Returns a FinDomFunctor with domain op(C).

source
GATlab.Models.SymbolicModels.functorMethod

Gives the underlying schema functor of a data migration seen as a functor of acset categories.

source
Catlab.CategoricalAlgebra.ChaseModule

The chase is an algorithm which subjects a C-Set instance to constraints expressed in the language of regular logic, called embedded dependencies (EDs, or 'triggers').

A morphism S->T, encodes an embedded dependency. If the pattern S is matched (via a homomorphism S->I), we demand there exist a morphism T->I (for some database instance I) that makes the triangle commute in order to satisfy the dependency (if this is not the case, then the trigger is 'active').

Homomorphisms can merge elements and introduce new ones. The former kind are called "equality generating dependencies" (EGDs) and the latter "tuple generating dependencies" (TGDs). Any homomorphism can be factored into EGD and TGD components by, respectively, restricting the codomain to the image or restricting the domain to the coimage.

source
Catlab.CategoricalAlgebra.Chase.chaseMethod
chase(I::ACSet, Σ::AbstractDict, n::Int)

Chase a C-Set or C-Rel instance given a list of embedded dependencies. This may not terminate, so a bound n on the number of iterations is required.

[,]

ΣS ⟶ Iₙ ⊕↓ ⋮ (resulting morphism) ΣT ... Iₙ₊₁

There is a copy of S and T for each active trigger. A trigger is a map from S into the current instance. What makes it 'active' is that there is no morphism from T to I that makes the triangle commute.

Each iteration constructs the above pushout square. The result is a morphism, so that one can keep track of the provenance of elements in the original CSet instance within the chased result.

Whether or not the result is due to success or timeout is returned as a boolean flag.

TODO: this algorithm could be made more efficient by homomorphism caching.

source
Catlab.CategoricalAlgebra.StructuredCospansModule

Structured cospans.

This module provides a generic interface for structured cospans with a concrete implementation for attributed C-sets.

source
Catlab.CategoricalAlgebra.StructuredCospans.OpenACSetLegType

Leg of a structured (multi)cospan of acsets in R-form.

A convenience type that contains the data of an acset transformation, except for the codomain, since that data is already given by the decoration of the R-form structured cospan.

source
Catlab.CategoricalAlgebra.StructuredCospans.StructuredCospanType

Structured cospan.

The first type parameter L encodes a functor L: A → X from the base category A, often FinSet, to a category X with "extra structure." An L-structured cospan is then a cospan in X whose feet are images under L of objects in A. The category X is assumed to have pushouts.

Structured cospans form a double category with no further assumptions on the functor L. To obtain a symmetric monoidal double category, L must preserve finite coproducts. In practice, L usually has a right adjoint R: X → A, which implies that L preserves all finite colimits. It also allows structured cospans to be constructed more conveniently from an object x in X plus a cospan in A with apex R(x).

See also: StructuredMulticospan.

source
Catlab.CategoricalAlgebra.StructuredCospans.StructuredCospanMethod

Construct structured cospan in R-form.

source
Catlab.CategoricalAlgebra.StructuredCospans.StructuredCospanMethod

Construct structured cospan in L-form.

source
Catlab.CategoricalAlgebra.StructuredCospans.StructuredCospanObType

Object in the category of L-structured cospans.

source
Catlab.CategoricalAlgebra.StructuredCospans.StructuredMulticospanType

Structured multicospan.

A structured multicospan is like a structured cospan except that it may have a number of legs different than two.

See also: StructuredCospan.

source
Catlab.CategoricalAlgebra.StructuredCospans.StructuredMulticospanMethod

Construct structured multicospan in R-form.

source
Catlab.CategoricalAlgebra.StructuredCospans.OpenACSetTypesMethod

Create types for open attributed C-sets from an attributed C-set type.

The type parameters of the given acset type should not be instantiated with specific Julia types. This function returns a pair of types, one for objects, a subtype of StructuredCospanOb, and one for morphisms, a subtype of StructuredMulticospan. Both types will have the same type parameters for attribute types as the given acset type.

Mathematically speaking, this function sets up structured (multi)cospans with a functor $L: A → X$ between categories of acsets that creates "discrete acsets." Such a "discrete acset functor" is a functor that is left adjoint to a certain kind of forgetful functor between categories of acsets, namely one that is a pullback along an inclusion of schemas such that the image of inclusion has no outgoing arrows. For example, the schema inclusion ${V} ↪ {E ⇉ V}$ has this property but ${E} ↪ {E ⇉ V}$ does not.

See also: OpenCSetTypes.

source
Catlab.CategoricalAlgebra.StructuredCospans.OpenCSetTypesMethod

Create types for open C-sets from a C-set type.

A special case of OpenACSetTypes. See there for details.

source
diff --git a/dev/apis/graphics/index.html b/dev/apis/graphics/index.html index de1d4abb7..b519a150e 100644 --- a/dev/apis/graphics/index.html +++ b/dev/apis/graphics/index.html @@ -1,2 +1,2 @@ -Graphics · Catlab.jl

Graphics

Catlab.Graphics.GraphvizGraphs.parse_graphvizMethod

Parse Graphviz output in JSON format.

Returns a property graph with graph layout and other metadata. Each node has a position and size.

All units are in points. Note that Graphviz has 72 points per inch.

source
Catlab.Graphics.GraphvizGraphs.to_graphvizMethod

Convert a property graph to a Graphviz graph.

This method is usually more convenient than direct AST manipulation for creating simple Graphviz graphs. For more advanced features, like nested subgraphs, you must use the Graphviz AST.

source
Catlab.Graphics.GraphvizGraphs.to_graphvizMethod

Visualize a bipartite graph using Graphviz.

Works for both directed and undirected bipartite graphs. Both types of vertices in the bipartite graph become nodes in the Graphviz graph.

Arguments

  • prog="dot": Graphviz program to use
  • graph_attrs: Graph-level Graphviz attributes
  • node_attrs: Node-level Graphviz attributes
  • edge_attrs: Edge-level Graphviz attributes
  • node_labels=false: whether to label nodes and if so, which pair of data attributes to use
  • edge_labels=false: whether to label edges and if so, which data attribute (undirected case) or pair of attributes (directed case) to use
  • invis_edge=true: whether to add invisible edges between vertices of same type, which ensures that the order of the nodes is preserved.
source
Catlab.Graphics.GraphvizGraphs.to_graphvizMethod

Convert a graph to a Graphviz graph.

A simple default style is applied. For more control over the visual appearance, first convert the graph to a property graph, define the Graphviz attributes as needed, and finally convert the property graph to a Graphviz graph.

source
Catlab.Graphics.GraphvizGraphs.to_graphvizMethod

Visualize a graph homomorphism using Graphviz.

Visualize a homomorphism (ACSetTransformation) between two graphs (instances of AbstractGraph). By default, the domain and codomain are drawn as subgraphs and the vertex mapping is drawn using dotted edges, whereas the edge map is suppressed. The vertex and edge mapping can also be shown using colors, via the node_colors and edge_colors keyword arguments.

Arguments

  • draw_codom=true: whether to draw the codomain graph
  • draw_mapping=true: whether to draw the vertex mapping using edges
  • prog="dot": Graphviz program to use
  • graph_attrs: Graph-level Graphviz attributes
  • node_attrs: Node-level Graphviz attributes
  • edge_attrs: Edge-level Graphviz attributes
  • node_labels=false: whether to draw node labels and which vertex attribute to use
  • edge_labels=false: whether to draw edge labels and which edge attribute to use
  • node_colors=!draw_codom: whether and how to color nodes based on vertex map
  • edge_colors=!draw_codom: whether and how to color edges based on edge map
source
Catlab.Graphics.GraphvizGraphs.to_graphvizMethod

Draw an undirected wiring diagram using Graphviz.

Creates an undirected, bipartite Graphviz graph, with the boxes and outer ports of the diagram becoming nodes of one kind and the junctions of the diagram becoming nodes of the second kind.

Arguments

  • graph_name="G": name of Graphviz graph
  • prog="neato": Graphviz program, usually "neato" or "fdp"
  • box_labels=false: if boolean, whether to label boxes with their number; if a symbol, name of data attribute for box label
  • port_labels=false: whether to label ports with their number
  • junction_labels=false: if boolean, whether to label junctions with their number; if a symbol, name of data attribute for junction label
  • junction_size="0.075": size of junction nodes, in inches
  • implicit_junctions=false: whether to represent a junction implicity as a wire when it has exactly two incident ports
  • graph_attrs=Dict(): top-level graph attributes
  • node_attrs=Dict(): top-level node attributes
  • edge_attrs=Dict(): top-level edge attributes
source
Catlab.Graphics.GraphvizGraphs.to_graphvizMethod

Draw a circular port graph using Graphviz.

Creates a Graphviz graph. Ports are currently not respected in the image, but the port index for each box can be displayed to provide clarification.

Arguments

  • graph_name="G": name of Graphviz graph
  • prog="neato": Graphviz program, usually "neato" or "fdp"
  • box_labels=false: whether to label boxes with their number
  • port_labels=false: whether to label ports with their number
  • graph_attrs=Dict(): top-level graph attributes
  • node_attrs=Dict(): top-level node attributes
  • edge_attrs=Dict(): top-level edge attributes

TODO: The lack of ports might be able to be resolved by introducing an extra node per port which is connected to its box with an edge of length 0.

source
Catlab.Graphics.GraphvizGraphs.to_graphvizMethod

Draw a wiring diagram using Graphviz.

The input can also be a morphism expression, in which case it is first converted into a wiring diagram. This function requires Graphviz v2.42 or higher.

Arguments

  • graph_name="G": name of Graphviz digraph
  • orientation=TopToBottom: orientation of layout. One of LeftToRight, RightToLeft, TopToBottom, or BottomToTop.
  • node_labels=true: whether to label the nodes
  • labels=false: whether to label the edges
  • label_attr=:label: what kind of edge label to use (if labels is true). One of :label, :xlabel, :headlabel, or :taillabel.
  • port_size="24": minimum size of ports on box, in points
  • junction_size="0.05": size of junction nodes, in inches
  • outer_ports=true: whether to display the outer box's input and output ports. If disabled, no incoming or outgoing wires will be shown either!
  • anchor_outer_ports=true: whether to enforce ordering of the outer box's input and output, i.e., ordering of the incoming and outgoing wires
  • graph_attrs=Dict(): top-level graph attributes
  • node_attrs=Dict(): top-level node attributes
  • edge_attrs=Dict(): top-level edge attributes
  • cell_attrs=Dict(): main cell attributes in node HTML-like label
source
Catlab.Graphics.GraphvizWiringDiagrams.graphviz_layoutMethod

Lay out directed wiring diagram using Graphviz.

Note: At this time, only the positions and sizes of the boxes, and the positions of the outer ports, are used. The positions of the box ports and the splines for the wires are ignored.

source
Catlab.Graphics.WiringDiagramLayoutsModule

Backend-agnostic layout of wiring diagrams via morphism expressions.

This module lays out wiring diagrams for visualization, independent of any specific graphics system. It uses the structure of a morphism expression to determine the layout. Thus, the first step of the algorithm is to convert the wiring diagram to a symbolic expression, using the submodule WiringDiagrams.Expressions. Morphism expressions may also be given directly.

source
Catlab.Graphics.WiringDiagramLayouts.layout_diagramMethod

Lay out a wiring diagram or morphism expression for visualization.

If a wiring diagram is given, it is first to converted to a morphism expression.

The layout is calculated with respect to a cartesian coordinate system with origin at the center of the diagram and the positive y-axis pointing downwards. Box positions are relative to their centers. All positions and sizes are dimensionless (unitless).

source
+Graphics · Catlab.jl

Graphics

Catlab.Graphics.GraphvizGraphs.parse_graphvizMethod

Parse Graphviz output in JSON format.

Returns a property graph with graph layout and other metadata. Each node has a position and size.

All units are in points. Note that Graphviz has 72 points per inch.

source
Catlab.Graphics.GraphvizGraphs.to_graphvizMethod

Convert a property graph to a Graphviz graph.

This method is usually more convenient than direct AST manipulation for creating simple Graphviz graphs. For more advanced features, like nested subgraphs, you must use the Graphviz AST.

source
Catlab.Graphics.GraphvizGraphs.to_graphvizMethod

Visualize a bipartite graph using Graphviz.

Works for both directed and undirected bipartite graphs. Both types of vertices in the bipartite graph become nodes in the Graphviz graph.

Arguments

  • prog="dot": Graphviz program to use
  • graph_attrs: Graph-level Graphviz attributes
  • node_attrs: Node-level Graphviz attributes
  • edge_attrs: Edge-level Graphviz attributes
  • node_labels=false: whether to label nodes and if so, which pair of data attributes to use
  • edge_labels=false: whether to label edges and if so, which data attribute (undirected case) or pair of attributes (directed case) to use
  • invis_edge=true: whether to add invisible edges between vertices of same type, which ensures that the order of the nodes is preserved.
source
Catlab.Graphics.GraphvizGraphs.to_graphvizMethod

Convert a graph to a Graphviz graph.

A simple default style is applied. For more control over the visual appearance, first convert the graph to a property graph, define the Graphviz attributes as needed, and finally convert the property graph to a Graphviz graph.

source
Catlab.Graphics.GraphvizGraphs.to_graphvizMethod

Visualize a graph homomorphism using Graphviz.

Visualize a homomorphism (ACSetTransformation) between two graphs (instances of AbstractGraph). By default, the domain and codomain are drawn as subgraphs and the vertex mapping is drawn using dotted edges, whereas the edge map is suppressed. The vertex and edge mapping can also be shown using colors, via the node_colors and edge_colors keyword arguments.

Arguments

  • draw_codom=true: whether to draw the codomain graph
  • draw_mapping=true: whether to draw the vertex mapping using edges
  • prog="dot": Graphviz program to use
  • graph_attrs: Graph-level Graphviz attributes
  • node_attrs: Node-level Graphviz attributes
  • edge_attrs: Edge-level Graphviz attributes
  • node_labels=false: whether to draw node labels and which vertex attribute to use
  • edge_labels=false: whether to draw edge labels and which edge attribute to use
  • node_colors=!draw_codom: whether and how to color nodes based on vertex map
  • edge_colors=!draw_codom: whether and how to color edges based on edge map
source
Catlab.Graphics.GraphvizGraphs.to_graphvizMethod

Draw an undirected wiring diagram using Graphviz.

Creates an undirected, bipartite Graphviz graph, with the boxes and outer ports of the diagram becoming nodes of one kind and the junctions of the diagram becoming nodes of the second kind.

Arguments

  • graph_name="G": name of Graphviz graph
  • prog="neato": Graphviz program, usually "neato" or "fdp"
  • box_labels=false: if boolean, whether to label boxes with their number; if a symbol, name of data attribute for box label
  • port_labels=false: whether to label ports with their number
  • junction_labels=false: if boolean, whether to label junctions with their number; if a symbol, name of data attribute for junction label
  • junction_size="0.075": size of junction nodes, in inches
  • implicit_junctions=false: whether to represent a junction implicity as a wire when it has exactly two incident ports
  • graph_attrs=Dict(): top-level graph attributes
  • node_attrs=Dict(): top-level node attributes
  • edge_attrs=Dict(): top-level edge attributes
source
Catlab.Graphics.GraphvizGraphs.to_graphvizMethod

Draw a circular port graph using Graphviz.

Creates a Graphviz graph. Ports are currently not respected in the image, but the port index for each box can be displayed to provide clarification.

Arguments

  • graph_name="G": name of Graphviz graph
  • prog="neato": Graphviz program, usually "neato" or "fdp"
  • box_labels=false: whether to label boxes with their number
  • port_labels=false: whether to label ports with their number
  • graph_attrs=Dict(): top-level graph attributes
  • node_attrs=Dict(): top-level node attributes
  • edge_attrs=Dict(): top-level edge attributes

TODO: The lack of ports might be able to be resolved by introducing an extra node per port which is connected to its box with an edge of length 0.

source
Catlab.Graphics.GraphvizGraphs.to_graphvizMethod

Draw a wiring diagram using Graphviz.

The input can also be a morphism expression, in which case it is first converted into a wiring diagram. This function requires Graphviz v2.42 or higher.

Arguments

  • graph_name="G": name of Graphviz digraph
  • orientation=TopToBottom: orientation of layout. One of LeftToRight, RightToLeft, TopToBottom, or BottomToTop.
  • node_labels=true: whether to label the nodes
  • labels=false: whether to label the edges
  • label_attr=:label: what kind of edge label to use (if labels is true). One of :label, :xlabel, :headlabel, or :taillabel.
  • port_size="24": minimum size of ports on box, in points
  • junction_size="0.05": size of junction nodes, in inches
  • outer_ports=true: whether to display the outer box's input and output ports. If disabled, no incoming or outgoing wires will be shown either!
  • anchor_outer_ports=true: whether to enforce ordering of the outer box's input and output, i.e., ordering of the incoming and outgoing wires
  • graph_attrs=Dict(): top-level graph attributes
  • node_attrs=Dict(): top-level node attributes
  • edge_attrs=Dict(): top-level edge attributes
  • cell_attrs=Dict(): main cell attributes in node HTML-like label
source
Catlab.Graphics.GraphvizWiringDiagrams.graphviz_layoutMethod

Lay out directed wiring diagram using Graphviz.

Note: At this time, only the positions and sizes of the boxes, and the positions of the outer ports, are used. The positions of the box ports and the splines for the wires are ignored.

source
Catlab.Graphics.WiringDiagramLayoutsModule

Backend-agnostic layout of wiring diagrams via morphism expressions.

This module lays out wiring diagrams for visualization, independent of any specific graphics system. It uses the structure of a morphism expression to determine the layout. Thus, the first step of the algorithm is to convert the wiring diagram to a symbolic expression, using the submodule WiringDiagrams.Expressions. Morphism expressions may also be given directly.

source
Catlab.Graphics.WiringDiagramLayouts.layout_diagramMethod

Lay out a wiring diagram or morphism expression for visualization.

If a wiring diagram is given, it is first to converted to a morphism expression.

The layout is calculated with respect to a cartesian coordinate system with origin at the center of the diagram and the positive y-axis pointing downwards. Box positions are relative to their centers. All positions and sizes are dimensionless (unitless).

source
diff --git a/dev/apis/graphs/index.html b/dev/apis/graphs/index.html index 60875cca6..959a283dd 100644 --- a/dev/apis/graphs/index.html +++ b/dev/apis/graphs/index.html @@ -1,2 +1,2 @@ -Graphs · Catlab.jl

Graphs

Catlab.Graphs.BasicGraphsModule

Data structures for graphs, based on C-sets.

This module provides the category theorist's four basic kinds of graphs: graphs (aka directed multigraphs), symmetric graphs, reflexive graphs, and symmetric reflexive graphs. It also defines half-edge graphs, which are isomorphic to symmetric graphs, and a few standard kinds of attributed graphs, such as weighted graphs.

The graphs API generally follows that of Graphs.jl, with some departures due to differences between the data structures.

source
Catlab.Graphs.BasicGraphs.HasGraphType

Abstract type for C-sets that contain a graph.

This type encompasses C-sets where the schema for graphs is a subcategory of C. This includes, for example, graphs, symmetric graphs, and reflexive graphs, but not half-edge graphs.

source
Catlab.Graphs.BasicGraphs.HasVerticesType

Abstract type for C-sets that contain vertices.

This type encompasses C-sets where the schema C contains an object V interpreted as vertices. This includes, for example, graphs and half-edge graphs, but not bipartite graphs or wiring diagrams.

source
Catlab.Graphs.BasicGraphs.LabeledGraphType

A labeled graph.

By convention, a "labeled graph" without qualification is a vertex-labeled graph. We do not require that the label be unique, and in this data type, the label attribute is not indexed.

source
Base.invMethod

Involution on half-edge(s) in a half-edge graph.

source
Catlab.Graphs.BasicGraphs.add_dangling_edge!Method

Add a dangling edge to a half-edge graph.

A "dangling edge" is a half-edge that is paired with itself under the half-edge involution. They are usually interpreted differently than "self-loops", i.e., a pair of distinct half-edges incident to the same vertex.

source
Catlab.Graphs.BasicGraphs.neMethod

Number of edges in a graph, or between two vertices in a graph.

In a symmetric graph, this function counts both edges in each edge pair, so that the number of edges in a symmetric graph is twice the number of edges in the corresponding undirected graph (at least when the edge involution has no fixed points).

source
Catlab.Graphs.BasicGraphs.neighborsMethod

Neighbors of vertex in a graph.

In a graph, this function is an alias for outneighbors; in a symmetric graph, a vertex has the same out-neighbors and as in-neighbors, so the distinction is moot.

In the presence of multiple edges, neighboring vertices are given with multiplicity. To get the unique neighbors, call unique(neighbors(g)).

source
Catlab.Graphs.BasicGraphs.rem_vertex!Method

Remove a vertex from a graph.

When keep_edges is false (the default), all edges incident to the vertex are also deleted. When keep_edges is true, incident edges are preserved but their source/target vertices become undefined.

source
Catlab.Graphs.BipartiteGraphsModule

Bipartite graphs, directed and undirected, as C-sets.

A graph theorist might call these "bipartitioned graphs," as in a graph equipped with a bipartition, as opposed to "bipartite graphs," as in a graph that can be bipartitioned. Here we use the former notion, which is more natural from the structuralist perspective, but the latter terminology, which is shorter and more familiar.

source
Catlab.Graphs.BipartiteGraphs.UndirectedBipartiteGraphType

An undirected bipartite graph.

It is a matter of perspective whether to consider such graphs "undirected," in the sense that the edges have no orientation, or "unidirected," in the sense that all edges go from vertices of type 1 to vertices of type 2.

source
Catlab.Graphs.NamedGraphsModule

Extends the basic graph types with vertex and/or edge names.

Naming vertices and edges and looking them up by name is a common requirement. This module provides a simple interface and default graph types for named graphs. Names are understood to be unique within the graph but are not assumed to be strings or symbols.

source
Catlab.Graphs.PropertyGraphs.PropertyGraphType

Graph with properties.

"Property graphs" are graphs with arbitrary named properties on the graph, vertices, and edges. They are intended for applications with a large number of ad-hoc properties. If you have a small number of known properties, it is better and more efficient to create a specialized C-set type using @acset_type.

See also: SymmetricPropertyGraph.

source
Catlab.Graphs.GraphAlgorithms.transitive_reduction!Method

Transitive reduction of a DAG.

The algorithm computes the longest paths in the DAGs and keeps only the edges corresponding to longest paths of length 1. Requires a topological sort, which is computed if it is not supplied.

source
Catlab.Graphs.GraphGenerators.erdos_renyiMethod
erdos_renyi(GraphType, n, p)

Create an Erdős–Rényi random graph with n vertices. Edges are added between pairs of vertices with probability p.

Optional Arguments

  • seed=-1: set the RNG seed.
  • rng: set the RNG directly

References

  • https://github.com/JuliaGraphs/LightGraphs.jl/blob/2a644c2b15b444e7f32f73021ec276aa9fc8ba30/src/SimpleGraphs/generators/randgraphs.jl
source
Catlab.Graphs.GraphGenerators.expected_degree_graphMethod
expected_degree_graph(GraphType, ω)

Given a vector of expected degrees ω indexed by vertex, create a random undirected graph in which vertices i and j are connected with probability ω[i]*ω[j]/sum(ω).

Optional Arguments

  • seed=-1: set the RNG seed.
  • rng: set the RNG directly

Implementation Notes

The algorithm should work well for maximum(ω) << sum(ω). As maximum(ω) approaches sum(ω), some deviations from the expected values are likely.

References

source
Catlab.Graphs.GraphGenerators.watts_strogatzMethod
watts_strogatz(n, k, β)

Return a Watts-Strogatz small world random graph with n vertices, each with expected degree k (or `k

  • 1ifkis odd). Edges are randomized per the model based on probabilityβ`.

The algorithm proceeds as follows. First, a perfect 1-lattice is constructed, where each vertex has exacly div(k, 2) neighbors on each side (i.e., k or k - 1 in total). Then the following steps are repeated for a hop length i of 1 through div(k, 2).

  1. Consider each vertex s in turn, along with the edge to its ith nearest neighbor t, in a clockwise sense.

  2. Generate a uniformly random number r. If r ≥ β, then the edge (s, t) is left unaltered. Otherwise, the edge is deleted and rewired so that s is connected to some vertex d, chosen uniformly at random from the entire graph, excluding s and its neighbors. (Note that t is a valid candidate.)

For β = 0, the graph will remain a 1-lattice, and for β = 1, all edges will be rewired randomly.

Optional Arguments

  • is_directed=false: if true, return a directed graph.
  • seed=-1: set the RNG seed.

References

source
+Graphs · Catlab.jl

Graphs

Catlab.Graphs.BasicGraphsModule

Data structures for graphs, based on C-sets.

This module provides the category theorist's four basic kinds of graphs: graphs (aka directed multigraphs), symmetric graphs, reflexive graphs, and symmetric reflexive graphs. It also defines half-edge graphs, which are isomorphic to symmetric graphs, and a few standard kinds of attributed graphs, such as weighted graphs.

The graphs API generally follows that of Graphs.jl, with some departures due to differences between the data structures.

source
Catlab.Graphs.BasicGraphs.HasGraphType

Abstract type for C-sets that contain a graph.

This type encompasses C-sets where the schema for graphs is a subcategory of C. This includes, for example, graphs, symmetric graphs, and reflexive graphs, but not half-edge graphs.

source
Catlab.Graphs.BasicGraphs.HasVerticesType

Abstract type for C-sets that contain vertices.

This type encompasses C-sets where the schema C contains an object V interpreted as vertices. This includes, for example, graphs and half-edge graphs, but not bipartite graphs or wiring diagrams.

source
Catlab.Graphs.BasicGraphs.LabeledGraphType

A labeled graph.

By convention, a "labeled graph" without qualification is a vertex-labeled graph. We do not require that the label be unique, and in this data type, the label attribute is not indexed.

source
Base.invMethod

Involution on half-edge(s) in a half-edge graph.

source
Catlab.Graphs.BasicGraphs.add_dangling_edge!Method

Add a dangling edge to a half-edge graph.

A "dangling edge" is a half-edge that is paired with itself under the half-edge involution. They are usually interpreted differently than "self-loops", i.e., a pair of distinct half-edges incident to the same vertex.

source
Catlab.Graphs.BasicGraphs.neMethod

Number of edges in a graph, or between two vertices in a graph.

In a symmetric graph, this function counts both edges in each edge pair, so that the number of edges in a symmetric graph is twice the number of edges in the corresponding undirected graph (at least when the edge involution has no fixed points).

source
Catlab.Graphs.BasicGraphs.neighborsMethod

Neighbors of vertex in a graph.

In a graph, this function is an alias for outneighbors; in a symmetric graph, a vertex has the same out-neighbors and as in-neighbors, so the distinction is moot.

In the presence of multiple edges, neighboring vertices are given with multiplicity. To get the unique neighbors, call unique(neighbors(g)).

source
Catlab.Graphs.BasicGraphs.rem_vertex!Method

Remove a vertex from a graph.

When keep_edges is false (the default), all edges incident to the vertex are also deleted. When keep_edges is true, incident edges are preserved but their source/target vertices become undefined.

source
Catlab.Graphs.BipartiteGraphsModule

Bipartite graphs, directed and undirected, as C-sets.

A graph theorist might call these "bipartitioned graphs," as in a graph equipped with a bipartition, as opposed to "bipartite graphs," as in a graph that can be bipartitioned. Here we use the former notion, which is more natural from the structuralist perspective, but the latter terminology, which is shorter and more familiar.

source
Catlab.Graphs.BipartiteGraphs.UndirectedBipartiteGraphType

An undirected bipartite graph.

It is a matter of perspective whether to consider such graphs "undirected," in the sense that the edges have no orientation, or "unidirected," in the sense that all edges go from vertices of type 1 to vertices of type 2.

source
Catlab.Graphs.NamedGraphsModule

Extends the basic graph types with vertex and/or edge names.

Naming vertices and edges and looking them up by name is a common requirement. This module provides a simple interface and default graph types for named graphs. Names are understood to be unique within the graph but are not assumed to be strings or symbols.

source
Catlab.Graphs.PropertyGraphs.PropertyGraphType

Graph with properties.

"Property graphs" are graphs with arbitrary named properties on the graph, vertices, and edges. They are intended for applications with a large number of ad-hoc properties. If you have a small number of known properties, it is better and more efficient to create a specialized C-set type using @acset_type.

See also: SymmetricPropertyGraph.

source
Catlab.Graphs.GraphAlgorithms.transitive_reduction!Method

Transitive reduction of a DAG.

The algorithm computes the longest paths in the DAGs and keeps only the edges corresponding to longest paths of length 1. Requires a topological sort, which is computed if it is not supplied.

source
Catlab.Graphs.GraphGenerators.erdos_renyiMethod
erdos_renyi(GraphType, n, p)

Create an Erdős–Rényi random graph with n vertices. Edges are added between pairs of vertices with probability p.

Optional Arguments

  • seed=-1: set the RNG seed.
  • rng: set the RNG directly

References

  • https://github.com/JuliaGraphs/LightGraphs.jl/blob/2a644c2b15b444e7f32f73021ec276aa9fc8ba30/src/SimpleGraphs/generators/randgraphs.jl
source
Catlab.Graphs.GraphGenerators.expected_degree_graphMethod
expected_degree_graph(GraphType, ω)

Given a vector of expected degrees ω indexed by vertex, create a random undirected graph in which vertices i and j are connected with probability ω[i]*ω[j]/sum(ω).

Optional Arguments

  • seed=-1: set the RNG seed.
  • rng: set the RNG directly

Implementation Notes

The algorithm should work well for maximum(ω) << sum(ω). As maximum(ω) approaches sum(ω), some deviations from the expected values are likely.

References

source
Catlab.Graphs.GraphGenerators.watts_strogatzMethod
watts_strogatz(n, k, β)

Return a Watts-Strogatz small world random graph with n vertices, each with expected degree k (or `k

  • 1ifkis odd). Edges are randomized per the model based on probabilityβ`.

The algorithm proceeds as follows. First, a perfect 1-lattice is constructed, where each vertex has exacly div(k, 2) neighbors on each side (i.e., k or k - 1 in total). Then the following steps are repeated for a hop length i of 1 through div(k, 2).

  1. Consider each vertex s in turn, along with the edge to its ith nearest neighbor t, in a clockwise sense.

  2. Generate a uniformly random number r. If r ≥ β, then the edge (s, t) is left unaltered. Otherwise, the edge is deleted and rewired so that s is connected to some vertex d, chosen uniformly at random from the entire graph, excluding s and its neighbors. (Note that t is a valid candidate.)

For β = 0, the graph will remain a 1-lattice, and for β = 1, all edges will be rewired randomly.

Optional Arguments

  • is_directed=false: if true, return a directed graph.
  • seed=-1: set the RNG seed.

References

source
diff --git a/dev/apis/programs/index.html b/dev/apis/programs/index.html index 0898203c8..c4c4a101e 100644 --- a/dev/apis/programs/index.html +++ b/dev/apis/programs/index.html @@ -1,6 +1,6 @@ -Programs · Catlab.jl

Programs

The module Catlab.Programs provides domain-specific languages (DSLs) for constructing diagrams of various kinds. The DSLs, implemented as Julia macros, are based on the syntax of the Julia language but often interpret that syntax very differently from standard Julia programs. Conversely, this module offers preliminary support for generating Julia code from wiring diagrams.

There are two major macros for constructing wiring diagrams:

  • @program, for directed wiring diagrams (DWDs)
  • @relation, for undirected wiring diagrams (UWDs)

There is a family of related macros for constructing category-theoretic diagrams included in DataMigrations.jl.

API

Catlab.Programs.GenerateJuliaPrograms.evaluateMethod

Evaluate a morphism as a function.

If the morphism will be evaluated only once (possibly with vectorized inputs), then direct evaluation will be much faster than compiling (via compile) and evaluating a standard Julia function.

Compare with functor.

source
Catlab.Programs.ParseJuliaPrograms.@programMacro

Parse a wiring diagram from a Julia program.

For the most part, this is standard Julia code but a few liberties are taken with the syntax. Products are represented as tuples. So if x and y are variables of type $X$ and $Y$, then (x,y) has type $X ⊗ Y$. Also, both () and nothing are interpreted as the monoidal unit $I$.

Unlike standard Julia, the function call expressions f(x,y) and f((x,y)) are equivalent. Consequently, given morphisms $f: W → X ⊗ Y$ and $g: X ⊗ Y → Z$, the code

x, y = f(w)
-g(x,y)

is equivalent to g(f(w)). In standard Julia, at most one of these calls to g would be valid, unless g had multiple signatures.

The diagonals (copying and deleting) of a cartesian category are implicit in the Julia syntax: copying is variable reuse and deleting is variable non-use. For the codiagonals (merging and creating), a special syntax is provided, reinterpreting Julia's vector literals. The merging of x1 and x2 is represented by the vector [x1,x2] and creation by the empty vector []. For example, f([x1,x2]) translates to compose(mmerge(X),f).

This macro is a wrapper around parse_wiring_diagram.

source
Catlab.Programs.RelationalPrograms.@relationMacro

Construct an undirected wiring diagram using relation notation.

Unlike the @program macro for directed wiring diagrams, this macro departs significantly from the usual semantics of the Julia programming language. Function calls with $n$ arguments are now interpreted as assertions that an $n$-ary relation holds at a particular point. For example, the composite of binary relations $R ⊆ X × Y$ and $S ⊆ Y × Z$ can be represented as an undirected wiring diagram by the macro call

@relation (x,z) where (x::X, y::Y, z::Z) begin
+Programs · Catlab.jl

Programs

The module Catlab.Programs provides domain-specific languages (DSLs) for constructing diagrams of various kinds. The DSLs, implemented as Julia macros, are based on the syntax of the Julia language but often interpret that syntax very differently from standard Julia programs. Conversely, this module offers preliminary support for generating Julia code from wiring diagrams.

There are two major macros for constructing wiring diagrams:

  • @program, for directed wiring diagrams (DWDs)
  • @relation, for undirected wiring diagrams (UWDs)

There is a family of related macros for constructing category-theoretic diagrams included in DataMigrations.jl.

API

Catlab.Programs.GenerateJuliaPrograms.evaluateMethod

Evaluate a morphism as a function.

If the morphism will be evaluated only once (possibly with vectorized inputs), then direct evaluation will be much faster than compiling (via compile) and evaluating a standard Julia function.

Compare with functor.

source
Catlab.Programs.ParseJuliaPrograms.@programMacro

Parse a wiring diagram from a Julia program.

For the most part, this is standard Julia code but a few liberties are taken with the syntax. Products are represented as tuples. So if x and y are variables of type $X$ and $Y$, then (x,y) has type $X ⊗ Y$. Also, both () and nothing are interpreted as the monoidal unit $I$.

Unlike standard Julia, the function call expressions f(x,y) and f((x,y)) are equivalent. Consequently, given morphisms $f: W → X ⊗ Y$ and $g: X ⊗ Y → Z$, the code

x, y = f(w)
+g(x,y)

is equivalent to g(f(w)). In standard Julia, at most one of these calls to g would be valid, unless g had multiple signatures.

The diagonals (copying and deleting) of a cartesian category are implicit in the Julia syntax: copying is variable reuse and deleting is variable non-use. For the codiagonals (merging and creating), a special syntax is provided, reinterpreting Julia's vector literals. The merging of x1 and x2 is represented by the vector [x1,x2] and creation by the empty vector []. For example, f([x1,x2]) translates to compose(mmerge(X),f).

This macro is a wrapper around parse_wiring_diagram.

source
Catlab.Programs.RelationalPrograms.@relationMacro

Construct an undirected wiring diagram using relation notation.

Unlike the @program macro for directed wiring diagrams, this macro departs significantly from the usual semantics of the Julia programming language. Function calls with $n$ arguments are now interpreted as assertions that an $n$-ary relation holds at a particular point. For example, the composite of binary relations $R ⊆ X × Y$ and $S ⊆ Y × Z$ can be represented as an undirected wiring diagram by the macro call

@relation (x,z) where (x::X, y::Y, z::Z) begin
   R(x,y)
   S(y,z)
-end

In general, the context in the where clause defines the set of junctions in the diagram and variable sharing defines the wiring of ports to junctions. If the where clause is omitted, the set of junctions is inferred from the variables used in the macro call.

The ports and junctions of the diagram may be typed or untyped, and the ports may be named or unnamed. Thus, four possible types of undirected wiring diagrams may be returned, with the type determined by the form of relation header:

  1. Untyped, unnamed: @relation (x,z) where (x,y,z) ...
  2. Typed, unnamed: @relation (x,z) where (x::X, y::Y, z::Z) ...
  3. Untyped, named: @relation (out1=x, out2=z) where (x,y,z) ...
  4. Typed, named: @relation (out=1, out2=z) where (x::X, y::Y, z::Z) ...

All four types of diagram are subtypes of RelationDiagram.

source
+end

In general, the context in the where clause defines the set of junctions in the diagram and variable sharing defines the wiring of ports to junctions. If the where clause is omitted, the set of junctions is inferred from the variables used in the macro call.

The ports and junctions of the diagram may be typed or untyped, and the ports may be named or unnamed. Thus, four possible types of undirected wiring diagrams may be returned, with the type determined by the form of relation header:

  1. Untyped, unnamed: @relation (x,z) where (x,y,z) ...
  2. Typed, unnamed: @relation (x,z) where (x::X, y::Y, z::Z) ...
  3. Untyped, named: @relation (out1=x, out2=z) where (x,y,z) ...
  4. Typed, named: @relation (out=1, out2=z) where (x::X, y::Y, z::Z) ...

All four types of diagram are subtypes of RelationDiagram.

source
diff --git a/dev/apis/theories/index.html b/dev/apis/theories/index.html index 051e30ec6..e5e1e8901 100644 --- a/dev/apis/theories/index.html +++ b/dev/apis/theories/index.html @@ -1,2 +1,2 @@ -Standard library of theories · Catlab.jl

Standard library of theories

Through the module Catlab.Theories, Catlab provides a standard library of generalized algebraic theories for categories, monoidal categories, and other categorical structures. The theories correspond, in most cases, to standard definitions in category theory and they are used throughout Catlab and the AlgebraicJulia ecosystem to structure programs and provide a common interface for applied category theory. The module also provides default syntax systems for many of the theories.

Categorical structures for which theories are provided include:

  • categories
  • monoidal and symmetric monoidal categories
  • cartesian and cocartesian categories
  • semiadditive categories/biproduct categories
  • hypergraph categories
  • bicategories of relations
  • categories with two monoidal products, such as distributive monoidal categories

The contents of this module can be supplemented by the user, and it is even possible to use many parts of Catlab without using this module. The user is free to create new syntax systems for the theories defined here and also to define entirely new theories.

Catlab.TheoriesModule

Catlab's standard library of generalized algebraic theories.

The focus is on categories and monoidal categories, but other related structures are also included.

source
Catlab.Theories.CategoryExprType

Base type for GAT expressions in categories or other categorical structures.

All symbolic expression types exported by Catlab.Theories are subtypes of this abstract type.

source
Base.collectMethod

Collect generators of object in monoidal category as a vector.

source
Base.ndimsMethod

Number of "dimensions" of object in monoidal category.

source
+Standard library of theories · Catlab.jl

Standard library of theories

Through the module Catlab.Theories, Catlab provides a standard library of generalized algebraic theories for categories, monoidal categories, and other categorical structures. The theories correspond, in most cases, to standard definitions in category theory and they are used throughout Catlab and the AlgebraicJulia ecosystem to structure programs and provide a common interface for applied category theory. The module also provides default syntax systems for many of the theories.

Categorical structures for which theories are provided include:

  • categories
  • monoidal and symmetric monoidal categories
  • cartesian and cocartesian categories
  • semiadditive categories/biproduct categories
  • hypergraph categories
  • bicategories of relations
  • categories with two monoidal products, such as distributive monoidal categories

The contents of this module can be supplemented by the user, and it is even possible to use many parts of Catlab without using this module. The user is free to create new syntax systems for the theories defined here and also to define entirely new theories.

Catlab.TheoriesModule

Catlab's standard library of generalized algebraic theories.

The focus is on categories and monoidal categories, but other related structures are also included.

source
Catlab.Theories.CategoryExprType

Base type for GAT expressions in categories or other categorical structures.

All symbolic expression types exported by Catlab.Theories are subtypes of this abstract type.

source
Base.collectMethod

Collect generators of object in monoidal category as a vector.

source
Base.ndimsMethod

Number of "dimensions" of object in monoidal category.

source
diff --git a/dev/apis/wiring_diagrams/index.html b/dev/apis/wiring_diagrams/index.html index 87a90a8ca..d2fab2b0e 100644 --- a/dev/apis/wiring_diagrams/index.html +++ b/dev/apis/wiring_diagrams/index.html @@ -1,2 +1,2 @@ -Wiring diagrams · Catlab.jl

Wiring diagrams

Catlab.WiringDiagrams.DirectedWiringDiagramsModule

Data structure for (directed) wiring diagrams, aka string diagrams.

A (directed) wiring diagram consists of a collection of boxes with input and output ports connected by wires. A box can be atomic (possessing no internal structure) or can itself be a wiring diagram. Thus, wiring diagrams can be nested recursively. Wiring diagrams are closely related to what the CS literature calls "directed graphs with ports" or more simply "port graphs". The main difference is that a wiring diagram has an "outer box": a wiring diagram has its own ports that can be connected to the ports of its boxes.

This module provides a generic data structure for wiring diagrams. Arbitrary data can be attached to the boxes, ports, and wires of a wiring diagram. The diagrams are "abstract" in the sense that they cannot be directly rendered as raster or vector graphics. However, they form a useful intermediate representation that can be serialized to and from GraphML or translated into Graphviz or other declarative diagram languages.

source
Catlab.CategoricalAlgebra.FinCats.graphMethod

Grapn underlying wiring diagram, including parts for noin-internal wires.

The graph has two special vertices representing the input and output boundaries of the outer box.

source
Catlab.WiringDiagrams.DirectedWiringDiagrams.encapsulated_subdiagramMethod

Create an encapsulating box for a set of boxes in a wiring diagram.

To a first approximation, the union of input ports of the given boxes will become the inputs ports of the encapsulating box and likewise for the output ports. However, when copies or merges occur, as in a cartesian or cocartesian category, a simplification procedure may reduce the number of ports on the encapsulating box.

Specifically:

  1. Each input port of an encapsulated box will have at most one incoming wire

from the encapsulating outer box, and each output port of an encapsulated box will have at most one outgoing wire to the encapsulating outer box.

  1. A set of ports connected to the same outside (non-encapsulated) ports will be

simplified into a single port of the encapsulating box.

See also induced_subdiagram.

source
Catlab.WiringDiagrams.DirectedWiringDiagrams.ocomposeMethod

Operadic composition of wiring diagrams.

This generic function has two different signatures, corresponding to the "full" and "partial" notions of operadic composition (Yau, 2018, Operads of Wiring Diagrams, Definitions 2.3 and 2.10).

This operation is a simple wrapper around substitute.

source
Catlab.WiringDiagrams.DirectedWiringDiagrams.add_wire!Method

Wire together two ports in an undirected wiring diagram.

A convenience method that creates and sets junctions as needed. Ports are only allowed to have one junction, so if both ports already have junctions, then the second port is assigned the junction of the first. The handling of the two arguments is otherwise symmetric.

FIXME: When both ports already have junctions, the two junctions should be merged. To do this, we must implement merge_junctions! and thus also rem_part!.

source
Catlab.WiringDiagrams.MonoidalDirectedWiringDiagramsModule

Wiring diagrams as a symmetric monoidal category.

This module provides a high-level categorical interface to wiring diagrams, building on the low-level imperative interface and the operadic interface. It also defines data types and functions to represent diagonals, codiagonals, duals, caps, cups, daggers, and other gadgets in wiring diagrams.

source
Catlab.WiringDiagrams.WiringDiagramAlgorithms.crossing_minimization_by_sortMethod

Crossing minimization by sorting a univariate statistic.

The boxes in sources and/or targets are fixed and the boxes in vs are permuted. A permutation σ of the latter is returned, such that vs[σ] are the sorted box IDs. Both one-sided and two-sided crossing minimization are supported, depending on whether just one, or both, of sources and targets are given.

In this simple but popular heuristic algorithm, the boxes are permuted by sorting a univariate statistic of the positions of incoming and/or outgoing wires. Typical choices are:

  • mean: the sample mean, yielding the "barycenter method"
  • median: the sample median

In both cases, this algorithm has the property that if there is a permutation with no crossings, it will find it.

source
Catlab.WiringDiagrams.WiringDiagramAlgorithms.normalize_copy!Method

Normalize copies in a wiring diagram.

This function maximizes sharing of intermediate computations in a wiring diagram where copies are natural.

This algorithm is basically the same as the congruence closure algorithm on term graphs, in the special case of the empty relation R = ∅ (Baader & Nipkow, 1998, Term Rewriting and All That, Sec. 4.4). The main difference is the possibility of zero or many function outputs.

source
Catlab.WiringDiagrams.WiringDiagramSerializationModule

Conventions for serialization of wiring diagrams.

Defines a consistent set of names for boxes, ports, and wires to be used when serializing wiring diagrams, as well as conventions for serializing box, port, and wire attributes.

source
Catlab.WiringDiagrams.GraphMLWiringDiagramsModule

Serialize abstract wiring diagrams as GraphML.

Serialization of box, port, and wire values can be overloaded by data type (see convert_to_graphml_data and convert_from_graphml_data).

GraphML is the closest thing to a de jure and de facto standard in the space of graph data formats, supported by a variety of graph applications and libraries. We depart mildly from the GraphML spec by allowing JSON data attributes for GraphML nodes, ports, and edges.

References:

  • GraphML Primer: http://graphml.graphdrawing.org/primer/graphml-primer.html
  • GraphML DTD: http://graphml.graphdrawing.org/specification/dtd.html
source
Catlab.WiringDiagrams.JSONWiringDiagramsModule

Serialize abstract wiring diagrams as JSON.

JSON data formats are convenient when programming for the web. Unfortunately, no standard for JSON graph formats has gained any kind of widespread adoption. We adopt a format compatible with that used by the KEILER project and its successor ELK (Eclipse Layout Kernel). This format is roughly feature compatible with GraphML, supporting nested graphs and ports. It also supports layout information like node position and size.

References:

  • KEILER's JSON graph format: https://rtsys.informatik.uni-kiel.de/confluence/display/KIELER/JSON+Graph+Format
  • ELK's JSON graph format: https://www.eclipse.org/elk/documentation/tooldevelopers/graphdatastructure/jsonformat.html
source
+Wiring diagrams · Catlab.jl

Wiring diagrams

Catlab.WiringDiagrams.DirectedWiringDiagramsModule

Data structure for (directed) wiring diagrams, aka string diagrams.

A (directed) wiring diagram consists of a collection of boxes with input and output ports connected by wires. A box can be atomic (possessing no internal structure) or can itself be a wiring diagram. Thus, wiring diagrams can be nested recursively. Wiring diagrams are closely related to what the CS literature calls "directed graphs with ports" or more simply "port graphs". The main difference is that a wiring diagram has an "outer box": a wiring diagram has its own ports that can be connected to the ports of its boxes.

This module provides a generic data structure for wiring diagrams. Arbitrary data can be attached to the boxes, ports, and wires of a wiring diagram. The diagrams are "abstract" in the sense that they cannot be directly rendered as raster or vector graphics. However, they form a useful intermediate representation that can be serialized to and from GraphML or translated into Graphviz or other declarative diagram languages.

source
Catlab.CategoricalAlgebra.FinCats.graphMethod

Grapn underlying wiring diagram, including parts for noin-internal wires.

The graph has two special vertices representing the input and output boundaries of the outer box.

source
Catlab.WiringDiagrams.DirectedWiringDiagrams.encapsulated_subdiagramMethod

Create an encapsulating box for a set of boxes in a wiring diagram.

To a first approximation, the union of input ports of the given boxes will become the inputs ports of the encapsulating box and likewise for the output ports. However, when copies or merges occur, as in a cartesian or cocartesian category, a simplification procedure may reduce the number of ports on the encapsulating box.

Specifically:

  1. Each input port of an encapsulated box will have at most one incoming wire

from the encapsulating outer box, and each output port of an encapsulated box will have at most one outgoing wire to the encapsulating outer box.

  1. A set of ports connected to the same outside (non-encapsulated) ports will be

simplified into a single port of the encapsulating box.

See also induced_subdiagram.

source
Catlab.WiringDiagrams.DirectedWiringDiagrams.ocomposeMethod

Operadic composition of wiring diagrams.

This generic function has two different signatures, corresponding to the "full" and "partial" notions of operadic composition (Yau, 2018, Operads of Wiring Diagrams, Definitions 2.3 and 2.10).

This operation is a simple wrapper around substitute.

source
Catlab.WiringDiagrams.DirectedWiringDiagrams.add_wire!Method

Wire together two ports in an undirected wiring diagram.

A convenience method that creates and sets junctions as needed. Ports are only allowed to have one junction, so if both ports already have junctions, then the second port is assigned the junction of the first. The handling of the two arguments is otherwise symmetric.

FIXME: When both ports already have junctions, the two junctions should be merged. To do this, we must implement merge_junctions! and thus also rem_part!.

source
Catlab.WiringDiagrams.MonoidalDirectedWiringDiagramsModule

Wiring diagrams as a symmetric monoidal category.

This module provides a high-level categorical interface to wiring diagrams, building on the low-level imperative interface and the operadic interface. It also defines data types and functions to represent diagonals, codiagonals, duals, caps, cups, daggers, and other gadgets in wiring diagrams.

source
Catlab.WiringDiagrams.WiringDiagramAlgorithms.crossing_minimization_by_sortMethod

Crossing minimization by sorting a univariate statistic.

The boxes in sources and/or targets are fixed and the boxes in vs are permuted. A permutation σ of the latter is returned, such that vs[σ] are the sorted box IDs. Both one-sided and two-sided crossing minimization are supported, depending on whether just one, or both, of sources and targets are given.

In this simple but popular heuristic algorithm, the boxes are permuted by sorting a univariate statistic of the positions of incoming and/or outgoing wires. Typical choices are:

  • mean: the sample mean, yielding the "barycenter method"
  • median: the sample median

In both cases, this algorithm has the property that if there is a permutation with no crossings, it will find it.

source
Catlab.WiringDiagrams.WiringDiagramAlgorithms.normalize_copy!Method

Normalize copies in a wiring diagram.

This function maximizes sharing of intermediate computations in a wiring diagram where copies are natural.

This algorithm is basically the same as the congruence closure algorithm on term graphs, in the special case of the empty relation R = ∅ (Baader & Nipkow, 1998, Term Rewriting and All That, Sec. 4.4). The main difference is the possibility of zero or many function outputs.

source
Catlab.WiringDiagrams.WiringDiagramSerializationModule

Conventions for serialization of wiring diagrams.

Defines a consistent set of names for boxes, ports, and wires to be used when serializing wiring diagrams, as well as conventions for serializing box, port, and wire attributes.

source
Catlab.WiringDiagrams.GraphMLWiringDiagramsModule

Serialize abstract wiring diagrams as GraphML.

Serialization of box, port, and wire values can be overloaded by data type (see convert_to_graphml_data and convert_from_graphml_data).

GraphML is the closest thing to a de jure and de facto standard in the space of graph data formats, supported by a variety of graph applications and libraries. We depart mildly from the GraphML spec by allowing JSON data attributes for GraphML nodes, ports, and edges.

References:

  • GraphML Primer: http://graphml.graphdrawing.org/primer/graphml-primer.html
  • GraphML DTD: http://graphml.graphdrawing.org/specification/dtd.html
source
Catlab.WiringDiagrams.JSONWiringDiagramsModule

Serialize abstract wiring diagrams as JSON.

JSON data formats are convenient when programming for the web. Unfortunately, no standard for JSON graph formats has gained any kind of widespread adoption. We adopt a format compatible with that used by the KEILER project and its successor ELK (Eclipse Layout Kernel). This format is roughly feature compatible with GraphML, supporting nested graphs and ports. It also supports layout information like node position and size.

References:

  • KEILER's JSON graph format: https://rtsys.informatik.uni-kiel.de/confluence/display/KIELER/JSON+Graph+Format
  • ELK's JSON graph format: https://www.eclipse.org/elk/documentation/tooldevelopers/graphdatastructure/jsonformat.html
source
diff --git a/dev/assets/documenter.js b/dev/assets/documenter.js index b2bdd43ee..82252a11d 100644 --- a/dev/assets/documenter.js +++ b/dev/assets/documenter.js @@ -77,30 +77,35 @@ require(['jquery'], function($) { let timer = 0; var isExpanded = true; -$(document).on("click", ".docstring header", function () { - let articleToggleTitle = "Expand docstring"; - - debounce(() => { - if ($(this).siblings("section").is(":visible")) { - $(this) - .find(".docstring-article-toggle-button") - .removeClass("fa-chevron-down") - .addClass("fa-chevron-right"); - } else { - $(this) - .find(".docstring-article-toggle-button") - .removeClass("fa-chevron-right") - .addClass("fa-chevron-down"); +$(document).on( + "click", + ".docstring .docstring-article-toggle-button", + function () { + let articleToggleTitle = "Expand docstring"; + const parent = $(this).parent(); + + debounce(() => { + if (parent.siblings("section").is(":visible")) { + parent + .find("a.docstring-article-toggle-button") + .removeClass("fa-chevron-down") + .addClass("fa-chevron-right"); + } else { + parent + .find("a.docstring-article-toggle-button") + .removeClass("fa-chevron-right") + .addClass("fa-chevron-down"); - articleToggleTitle = "Collapse docstring"; - } + articleToggleTitle = "Collapse docstring"; + } - $(this) - .find(".docstring-article-toggle-button") - .prop("title", articleToggleTitle); - $(this).siblings("section").slideToggle(); - }); -}); + parent + .children(".docstring-article-toggle-button") + .prop("title", articleToggleTitle); + parent.siblings("section").slideToggle(); + }); + } +); $(document).on("click", ".docs-article-toggle-button", function (event) { let articleToggleTitle = "Expand docstring"; @@ -110,7 +115,7 @@ $(document).on("click", ".docs-article-toggle-button", function (event) { debounce(() => { if (isExpanded) { $(this).removeClass("fa-chevron-up").addClass("fa-chevron-down"); - $(".docstring-article-toggle-button") + $("a.docstring-article-toggle-button") .removeClass("fa-chevron-down") .addClass("fa-chevron-right"); @@ -119,7 +124,7 @@ $(document).on("click", ".docs-article-toggle-button", function (event) { $(".docstring section").slideUp(animationSpeed); } else { $(this).removeClass("fa-chevron-down").addClass("fa-chevron-up"); - $(".docstring-article-toggle-button") + $("a.docstring-article-toggle-button") .removeClass("fa-chevron-right") .addClass("fa-chevron-down"); diff --git a/dev/devdocs/style/index.html b/dev/devdocs/style/index.html index db08d4a79..e9e8d9f42 100644 --- a/dev/devdocs/style/index.html +++ b/dev/devdocs/style/index.html @@ -6,4 +6,4 @@ ######### # Subsection -#-----------

Guidelines for pull requests

Every pull request to Catlab should be reviewed by at least one person. Following are some things to check when making a PR yourself or reviewing someone else's PR. The goal of this list is to ensure that the Catlab codebase is robust and maintainable. When any of these guidelines are violated, it should be documented in a comment on the PR page.

Note: This list only includes the mechanical things. When a reviewing a PR you should always use your own judgment in asking questions and making comments about API and algorithm design. That's the hard part!

Tests and code coverage

Documentation

Version control

Backwards compatibility

Reflecting Catlab's dual status as a research project and a user-facing library, we want to give ourselves space to experiment while also not annoying our users and each other by needlessly breaking things.

+#-----------

Guidelines for pull requests

Every pull request to Catlab should be reviewed by at least one person. Following are some things to check when making a PR yourself or reviewing someone else's PR. The goal of this list is to ensure that the Catlab codebase is robust and maintainable. When any of these guidelines are violated, it should be documented in a comment on the PR page.

Note: This list only includes the mechanical things. When a reviewing a PR you should always use your own judgment in asking questions and making comments about API and algorithm design. That's the hard part!

Tests and code coverage

Documentation

Version control

Backwards compatibility

Reflecting Catlab's dual status as a research project and a user-facing library, we want to give ourselves space to experiment while also not annoying our users and each other by needlessly breaking things.

diff --git a/dev/generated/graphics/composejl_wiring_diagrams.ipynb b/dev/generated/graphics/composejl_wiring_diagrams.ipynb index bf241ad05..a409dce91 100644 --- a/dev/generated/graphics/composejl_wiring_diagrams.ipynb +++ b/dev/generated/graphics/composejl_wiring_diagrams.ipynb @@ -77,24 +77,24 @@ " stroke-width=\"0.3\"\n", " font-size=\"3.88\"\n", "\n", - " id=\"img-7a32c3a6\">\n", + " id=\"img-5c53baa0\">\n", "\n", " \n", " \n", " \n", "\n", - "\n", + "\n", " \n", " \n", " \n", "\n", - "\n", + "\n", " \n", " \n", " \n", "\n", - "\n", - " \n", + "\n", + " \n", " \n", " \n", " \n", @@ -139,7 +139,7 @@ " \n", " \n", "\n", - "\n", + "\n", " \n", " \n", " f\n", @@ -310,18 +310,18 @@ " \n", " \n", "\n", - "\n", + "\n", " \n", " \n", " \n", "\n", - "\n", + "\n", " \n", " \n", " \n", "\n", - "\n", - " \n", + "\n", + " \n", " \n", " \n", " \n", @@ -366,7 +366,7 @@ " \n", " \n", "\n", - "\n", + "\n", " \n", " \n", " f\n", @@ -404,29 +404,29 @@ " stroke-width=\"0.3\"\n", " font-size=\"3.88\"\n", "\n", - " id=\"img-47aebda4\">\n", + " id=\"img-72d605ce\">\n", "\n", " \n", " \n", " \n", "\n", - "\n", + "\n", " \n", " \n", " \n", "\n", - "\n", + "\n", " \n", " \n", " \n", "\n", - "\n", + "\n", " \n", " \n", " \n", "\n", - "\n", - " \n", + "\n", + " \n", " \n", " \n", " \n", @@ -471,15 +471,15 @@ " \n", " \n", "\n", - "\n", + "\n", " \n", " \n", " g\n", " \n", " \n", "\n", - "\n", - " \n", + "\n", + " \n", " \n", " \n", " \n", @@ -524,7 +524,7 @@ " \n", " \n", "\n", - "\n", + "\n", " \n", " \n", " f\n", @@ -695,23 +695,23 @@ " \n", " \n", "\n", - "\n", + "\n", " \n", " \n", " \n", "\n", - "\n", + "\n", " \n", " \n", " \n", "\n", - "\n", + "\n", " \n", " \n", " \n", "\n", - "\n", - " \n", + "\n", + " \n", " \n", " \n", " \n", @@ -756,15 +756,15 @@ " \n", " \n", "\n", - "\n", + "\n", " \n", " \n", " g\n", " \n", " \n", "\n", - "\n", - " \n", + "\n", + " \n", " \n", " \n", " \n", @@ -809,7 +809,7 @@ " \n", " \n", "\n", - "\n", + "\n", " \n", " \n", " f\n", @@ -847,34 +847,34 @@ " stroke-width=\"0.3\"\n", " font-size=\"3.88\"\n", "\n", - " id=\"img-acec1b6a\">\n", + " id=\"img-35b859ad\">\n", "\n", " \n", " \n", " \n", "\n", - "\n", + "\n", " \n", " \n", " \n", "\n", - "\n", + "\n", " \n", " \n", " \n", "\n", - "\n", + "\n", " \n", " \n", " \n", "\n", - "\n", + "\n", " \n", " \n", " \n", "\n", - "\n", - " \n", + "\n", + " \n", " \n", " \n", " \n", @@ -919,15 +919,15 @@ " \n", " \n", "\n", - "\n", + "\n", " \n", " \n", " g\n", " \n", " \n", "\n", - "\n", - " \n", + "\n", + " \n", " \n", " \n", " \n", @@ -972,7 +972,7 @@ " \n", " \n", "\n", - "\n", + "\n", " \n", " \n", " f\n", @@ -1143,28 +1143,28 @@ " \n", " \n", "\n", - "\n", + "\n", " \n", " \n", " \n", "\n", - "\n", + "\n", " \n", " \n", " \n", "\n", - "\n", + "\n", " \n", " \n", " \n", "\n", - "\n", + "\n", " \n", " \n", " \n", "\n", - "\n", - " \n", + "\n", + " \n", " \n", " \n", " \n", @@ -1209,15 +1209,15 @@ " \n", " \n", "\n", - "\n", + "\n", " \n", " \n", " g\n", " \n", " \n", "\n", - "\n", - " \n", + "\n", + " \n", " \n", " \n", " \n", @@ -1262,7 +1262,7 @@ " \n", " \n", "\n", - "\n", + "\n", " \n", " \n", " f\n", @@ -1308,134 +1308,134 @@ " stroke-width=\"0.3\"\n", " font-size=\"3.88\"\n", "\n", - " id=\"img-fd3a40dd\">\n", + " id=\"img-2551d761\">\n", "\n", " \n", " \n", " \n", "\n", - "\n", + "\n", " \n", " \n", " \n", "\n", - "\n", + "\n", " \n", " \n", " \n", "\n", - "\n", + "\n", " \n", " \n", " \n", "\n", - "\n", + "\n", " \n", " \n", " \n", "\n", - "\n", + "\n", " \n", " \n", " \n", "\n", - "\n", + "\n", " \n", " \n", " \n", "\n", - "\n", + "\n", " \n", " \n", " \n", "\n", - "\n", + "\n", " \n", " \n", " \n", "\n", - "\n", + "\n", " \n", " \n", " \n", "\n", - "\n", + "\n", " \n", " \n", " \n", "\n", - "\n", + "\n", " \n", " \n", " \n", "\n", - "\n", + "\n", " \n", " \n", " \n", "\n", - "\n", + "\n", " \n", " \n", " \n", "\n", - "\n", + "\n", " \n", " \n", " \n", "\n", - "\n", + "\n", " \n", " \n", " \n", "\n", - "\n", + "\n", " \n", " \n", " \n", "\n", - "\n", + "\n", " \n", " \n", " \n", "\n", - "\n", + "\n", " \n", " \n", " \n", "\n", - "\n", + "\n", " \n", " \n", " \n", "\n", - "\n", + "\n", " \n", " \n", " \n", "\n", - "\n", + "\n", " \n", " \n", " \n", "\n", - "\n", + "\n", " \n", " \n", " \n", "\n", - "\n", + "\n", " \n", " \n", " \n", "\n", - "\n", + "\n", " \n", " \n", " \n", "\n", - "\n", - " \n", + "\n", + " \n", " \n", " \n", " \n", @@ -1480,15 +1480,15 @@ " \n", " \n", "\n", - "\n", + "\n", " \n", " \n", " g\n", " \n", " \n", "\n", - "\n", - " \n", + "\n", + " \n", " \n", " \n", " \n", @@ -1533,15 +1533,15 @@ " \n", " \n", "\n", - "\n", + "\n", " \n", " \n", " f\n", " \n", " \n", "\n", - "\n", - " \n", + "\n", + " \n", " \n", " \n", " \n", @@ -1586,15 +1586,15 @@ " \n", " \n", "\n", - "\n", + "\n", " \n", " \n", " k\n", " \n", " \n", "\n", - "\n", - " \n", + "\n", + " \n", " \n", " \n", " \n", @@ -1639,15 +1639,15 @@ " \n", " \n", "\n", - "\n", + "\n", " \n", " \n", " h\n", " \n", " \n", "\n", - "\n", - " \n", + "\n", + " \n", " \n", " \n", " \n", @@ -1692,15 +1692,15 @@ " \n", " \n", "\n", - "\n", + "\n", " \n", " \n", " m\n", " \n", " \n", "\n", - "\n", - " \n", + "\n", + " \n", " \n", " \n", " \n", @@ -1745,15 +1745,15 @@ " \n", " \n", "\n", - "\n", + "\n", " \n", " \n", " n\n", " \n", " \n", "\n", - "\n", - " \n", + "\n", + " \n", " \n", " \n", " \n", @@ -1798,15 +1798,15 @@ " \n", " \n", "\n", - "\n", + "\n", " \n", " \n", " l\n", " \n", " \n", "\n", - "\n", - " \n", + "\n", + " \n", " \n", " \n", " \n", @@ -1851,15 +1851,15 @@ " \n", " \n", "\n", - "\n", + "\n", " \n", " \n", " n\n", " \n", " \n", "\n", - "\n", - " \n", + "\n", + " \n", " \n", " \n", " \n", @@ -1904,15 +1904,15 @@ " \n", " \n", "\n", - "\n", + "\n", " \n", " \n", " m\n", " \n", " \n", "\n", - "\n", - " \n", + "\n", + " \n", " \n", " \n", " \n", @@ -1957,15 +1957,15 @@ " \n", " \n", "\n", - "\n", + "\n", " \n", " \n", " k\n", " \n", " \n", "\n", - "\n", - " \n", + "\n", + " \n", " \n", " \n", " \n", @@ -2010,15 +2010,15 @@ " \n", " \n", "\n", - "\n", + "\n", " \n", " \n", " h\n", " \n", " \n", "\n", - "\n", - " \n", + "\n", + " \n", " \n", " \n", " \n", @@ -2063,15 +2063,15 @@ " \n", " \n", "\n", - "\n", + "\n", " \n", " \n", " g\n", " \n", " \n", "\n", - "\n", - " \n", + "\n", + " \n", " \n", " \n", " \n", @@ -2116,7 +2116,7 @@ " \n", " \n", "\n", - "\n", + "\n", " \n", " \n", " f\n", @@ -2287,128 +2287,128 @@ " \n", " \n", "\n", - "\n", + "\n", " \n", " \n", " \n", "\n", - "\n", + "\n", " \n", " \n", " \n", "\n", - "\n", + "\n", " \n", " \n", " \n", "\n", - "\n", + "\n", " \n", " \n", " \n", "\n", - "\n", + "\n", " \n", " \n", " \n", "\n", - "\n", + "\n", " \n", " \n", " \n", "\n", - "\n", + "\n", " \n", " \n", " \n", "\n", - "\n", + "\n", " \n", " \n", " \n", "\n", - "\n", + "\n", " \n", " \n", " \n", "\n", - "\n", + "\n", " \n", " \n", " \n", "\n", - "\n", + "\n", " \n", " \n", " \n", "\n", - "\n", + "\n", " \n", " \n", " \n", "\n", - "\n", + "\n", " \n", " \n", " \n", "\n", - "\n", + "\n", " \n", " \n", " \n", "\n", - "\n", + "\n", " \n", " \n", " \n", "\n", - "\n", + "\n", " \n", " \n", " \n", "\n", - "\n", + "\n", " \n", " \n", " \n", "\n", - "\n", + "\n", " \n", " \n", " \n", "\n", - "\n", + "\n", " \n", " \n", " \n", "\n", - "\n", + "\n", " \n", " \n", " \n", "\n", - "\n", + "\n", " \n", " \n", " \n", "\n", - "\n", + "\n", " \n", " \n", " \n", "\n", - "\n", + "\n", " \n", " \n", " \n", "\n", - "\n", + "\n", " \n", " \n", " \n", "\n", - "\n", - " \n", + "\n", + " \n", " \n", " \n", " \n", @@ -2453,15 +2453,15 @@ " \n", " \n", "\n", - "\n", + "\n", " \n", " \n", " g\n", " \n", " \n", "\n", - "\n", - " \n", + "\n", + " \n", " \n", " \n", " \n", @@ -2506,15 +2506,15 @@ " \n", " \n", "\n", - "\n", + "\n", " \n", " \n", " f\n", " \n", " \n", "\n", - "\n", - " \n", + "\n", + " \n", " \n", " \n", " \n", @@ -2559,15 +2559,15 @@ " \n", " \n", "\n", - "\n", + "\n", " \n", " \n", " k\n", " \n", " \n", "\n", - "\n", - " \n", + "\n", + " \n", " \n", " \n", " \n", @@ -2612,15 +2612,15 @@ " \n", " \n", "\n", - "\n", + "\n", " \n", " \n", " h\n", " \n", " \n", "\n", - "\n", - " \n", + "\n", + " \n", " \n", " \n", " \n", @@ -2665,15 +2665,15 @@ " \n", " \n", "\n", - "\n", + "\n", " \n", " \n", " m\n", " \n", " \n", "\n", - "\n", - " \n", + "\n", + " \n", " \n", " \n", " \n", @@ -2718,15 +2718,15 @@ " \n", " \n", "\n", - "\n", + "\n", " \n", " \n", " n\n", " \n", " \n", "\n", - "\n", - " \n", + "\n", + " \n", " \n", " \n", " \n", @@ -2771,15 +2771,15 @@ " \n", " \n", "\n", - "\n", + "\n", " \n", " \n", " l\n", " \n", " \n", "\n", - "\n", - " \n", + "\n", + " \n", " \n", " \n", " \n", @@ -2824,15 +2824,15 @@ " \n", " \n", "\n", - "\n", + "\n", " \n", " \n", " n\n", " \n", " \n", "\n", - "\n", - " \n", + "\n", + " \n", " \n", " \n", " \n", @@ -2877,15 +2877,15 @@ " \n", " \n", "\n", - "\n", + "\n", " \n", " \n", " m\n", " \n", " \n", "\n", - "\n", - " \n", + "\n", + " \n", " \n", " \n", " \n", @@ -2930,15 +2930,15 @@ " \n", " \n", "\n", - "\n", + "\n", " \n", " \n", " k\n", " \n", " \n", "\n", - "\n", - " \n", + "\n", + " \n", " \n", " \n", " \n", @@ -2983,15 +2983,15 @@ " \n", " \n", "\n", - "\n", + "\n", " \n", " \n", " h\n", " \n", " \n", "\n", - "\n", - " \n", + "\n", + " \n", " \n", " \n", " \n", @@ -3036,15 +3036,15 @@ " \n", " \n", "\n", - "\n", + "\n", " \n", " \n", " g\n", " \n", " \n", "\n", - "\n", - " \n", + "\n", + " \n", " \n", " \n", " \n", @@ -3089,7 +3089,7 @@ " \n", " \n", "\n", - "\n", + "\n", " \n", " \n", " f\n", @@ -3138,13 +3138,13 @@ " stroke-width=\"0.3\"\n", " font-size=\"3.88\"\n", "\n", - " id=\"img-8b04391b\">\n", + " id=\"img-e7616e37\">\n", "\n", " \n", " \n", " \n", "\n", - "\n", + "\n", " \n", " \n", " \n", @@ -3316,7 +3316,7 @@ " \n", " \n", "\n", - "\n", + "\n", " \n", " \n", " \n", @@ -3355,13 +3355,13 @@ " stroke-width=\"0.3\"\n", " font-size=\"3.88\"\n", "\n", - " id=\"img-35ac638c\">\n", + " id=\"img-47a68374\">\n", "\n", " \n", " \n", " \n", "\n", - "\n", + "\n", " \n", " \n", " \n", @@ -3369,7 +3369,7 @@ " \n", " \n", "\n", - "\n", + "\n", " \n", " \n", " \n", @@ -3541,7 +3541,7 @@ " \n", " \n", "\n", - "\n", + "\n", " \n", " \n", " \n", @@ -3549,7 +3549,7 @@ " \n", " \n", "\n", - "\n", + "\n", " \n", " \n", " \n", @@ -3588,13 +3588,13 @@ " stroke-width=\"0.3\"\n", " font-size=\"3.88\"\n", "\n", - " id=\"img-4db21357\">\n", + " id=\"img-757e2bc5\">\n", "\n", " \n", " \n", " \n", "\n", - "\n", + "\n", " \n", " \n", " \n", @@ -3602,7 +3602,7 @@ " \n", " \n", "\n", - "\n", + "\n", " \n", " \n", " \n", @@ -3610,7 +3610,7 @@ " \n", " \n", "\n", - "\n", + "\n", " \n", " \n", " \n", @@ -3618,7 +3618,7 @@ " \n", " \n", "\n", - "\n", + "\n", " \n", " \n", " \n", @@ -3626,8 +3626,8 @@ " \n", " \n", "\n", - "\n", - " \n", + "\n", + " \n", " \n", " \n", " \n", @@ -3672,15 +3672,15 @@ " \n", " \n", "\n", - "\n", + "\n", " \n", " \n", " f\n", " \n", " \n", "\n", - "\n", - " \n", + "\n", + " \n", " \n", " \n", " \n", @@ -3725,7 +3725,7 @@ " \n", " \n", "\n", - "\n", + "\n", " \n", " \n", " g\n", @@ -3896,7 +3896,7 @@ " \n", " \n", "\n", - "\n", + "\n", " \n", " \n", " \n", @@ -3904,7 +3904,7 @@ " \n", " \n", "\n", - "\n", + "\n", " \n", " \n", " \n", @@ -3912,7 +3912,7 @@ " \n", " \n", "\n", - "\n", + "\n", " \n", " \n", " \n", @@ -3920,7 +3920,7 @@ " \n", " \n", "\n", - "\n", + "\n", " \n", " \n", " \n", @@ -3928,8 +3928,8 @@ " \n", " \n", "\n", - "\n", - " \n", + "\n", + " \n", " \n", " \n", " \n", @@ -3974,15 +3974,15 @@ " \n", " \n", "\n", - "\n", + "\n", " \n", " \n", " f\n", " \n", " \n", "\n", - "\n", - " \n", + "\n", + " \n", " \n", " \n", " \n", @@ -4027,7 +4027,7 @@ " \n", " \n", "\n", - "\n", + "\n", " \n", " \n", " g\n", @@ -4073,13 +4073,13 @@ " stroke-width=\"0.3\"\n", " font-size=\"3.88\"\n", "\n", - " id=\"img-198b535d\">\n", + " id=\"img-724b42f3\">\n", "\n", " \n", " \n", " \n", "\n", - "\n", + "\n", " \n", " \n", " \n", @@ -4093,7 +4093,7 @@ " \n", " \n", "\n", - "\n", + "\n", " \n", " \n", " \n", @@ -4107,7 +4107,7 @@ " \n", " \n", "\n", - "\n", + "\n", " \n", " \n", " \n", @@ -4285,7 +4285,7 @@ " \n", " \n", "\n", - "\n", + "\n", " \n", " \n", " \n", @@ -4299,7 +4299,7 @@ " \n", " \n", "\n", - "\n", + "\n", " \n", " \n", " \n", @@ -4313,7 +4313,7 @@ " \n", " \n", "\n", - "\n", + "\n", " \n", " \n", " \n", @@ -4369,23 +4369,23 @@ " stroke-width=\"0.3\"\n", " font-size=\"3.88\"\n", "\n", - " id=\"img-9c687ddd\">\n", + " id=\"img-579e637c\">\n", "\n", " \n", " \n", " \n", "\n", - "\n", + "\n", " \n", " \n", " \n", "\n", - "\n", + "\n", " \n", " \n", " \n", "\n", - "\n", + "\n", " \n", " \n", " \n", @@ -4554,17 +4554,17 @@ " \n", " \n", "\n", - "\n", + "\n", " \n", " \n", " \n", "\n", - "\n", + "\n", " \n", " \n", " \n", "\n", - "\n", + "\n", " \n", " \n", " \n", @@ -4607,28 +4607,28 @@ " stroke-width=\"0.3\"\n", " font-size=\"3.88\"\n", "\n", - " id=\"img-2ece86dc\">\n", + " id=\"img-dc7c74a2\">\n", "\n", " \n", " \n", " \n", "\n", - "\n", + "\n", " \n", " \n", " \n", "\n", - "\n", + "\n", " \n", " \n", " \n", "\n", - "\n", + "\n", " \n", " \n", " \n", "\n", - "\n", + "\n", " \n", " \n", " \n", @@ -4797,22 +4797,22 @@ " \n", " \n", "\n", - "\n", + "\n", " \n", " \n", " \n", "\n", - "\n", + "\n", " \n", " \n", " \n", "\n", - "\n", + "\n", " \n", " \n", " \n", "\n", - "\n", + "\n", " \n", " \n", " \n", @@ -4851,18 +4851,18 @@ " stroke-width=\"0.3\"\n", " font-size=\"3.88\"\n", "\n", - " id=\"img-7dc719ba\">\n", + " id=\"img-0e6d9bd3\">\n", "\n", " \n", " \n", " \n", "\n", - "\n", + "\n", " \n", " \n", " \n", "\n", - "\n", + "\n", " \n", " \n", " \n", @@ -5031,12 +5031,12 @@ " \n", " \n", "\n", - "\n", + "\n", " \n", " \n", " \n", "\n", - "\n", + "\n", " \n", " \n", " \n", @@ -5072,49 +5072,49 @@ " stroke-width=\"0.3\"\n", " font-size=\"3.88\"\n", "\n", - " id=\"img-d3c2d0bf\">\n", + " id=\"img-34c8e2ea\">\n", "\n", " \n", " \n", " \n", "\n", - "\n", + "\n", " \n", " \n", " \n", "\n", - "\n", + "\n", " \n", " \n", " \n", "\n", - "\n", + "\n", " \n", " \n", " \n", "\n", - "\n", + "\n", " \n", " \n", " \n", "\n", - "\n", + "\n", " \n", " \n", " \n", "\n", - "\n", + "\n", " \n", " \n", " \n", "\n", - "\n", + "\n", " \n", " \n", " \n", "\n", - "\n", - " \n", + "\n", + " \n", " \n", " \n", " \n", @@ -5159,15 +5159,15 @@ " \n", " \n", "\n", - "\n", + "\n", " \n", " \n", " f\n", " \n", " \n", "\n", - "\n", - " \n", + "\n", + " \n", " \n", " \n", " \n", @@ -5212,14 +5212,14 @@ " \n", " \n", "\n", - "\n", + "\n", " \n", " \n", " f\n", " \n", " \n", "\n", - "\n", + "\n", " \n", " \n", " \n", @@ -5388,43 +5388,43 @@ " \n", " \n", "\n", - "\n", + "\n", " \n", " \n", " \n", "\n", - "\n", + "\n", " \n", " \n", " \n", "\n", - "\n", + "\n", " \n", " \n", " \n", "\n", - "\n", + "\n", " \n", " \n", " \n", "\n", - "\n", + "\n", " \n", " \n", " \n", "\n", - "\n", + "\n", " \n", " \n", " \n", "\n", - "\n", + "\n", " \n", " \n", " \n", "\n", - "\n", - " \n", + "\n", + " \n", " \n", " \n", " \n", @@ -5469,15 +5469,15 @@ " \n", " \n", "\n", - "\n", + "\n", " \n", " \n", " f\n", " \n", " \n", "\n", - "\n", - " \n", + "\n", + " \n", " \n", " \n", " \n", @@ -5522,14 +5522,14 @@ " \n", " \n", "\n", - "\n", + "\n", " \n", " \n", " f\n", " \n", " \n", "\n", - "\n", + "\n", " \n", " \n", " \n", @@ -5565,48 +5565,48 @@ " stroke-width=\"0.3\"\n", " font-size=\"3.88\"\n", "\n", - " id=\"img-e6349855\">\n", + " id=\"img-9f2a5b0c\">\n", "\n", " \n", " \n", " \n", "\n", - "\n", + "\n", " \n", " \n", " \n", "\n", - "\n", + "\n", " \n", " \n", " \n", "\n", - "\n", + "\n", " \n", " \n", " \n", "\n", - "\n", + "\n", " \n", " \n", " \n", "\n", - "\n", + "\n", " \n", " \n", " \n", "\n", - "\n", + "\n", " \n", " \n", " \n", "\n", - "\n", + "\n", " \n", " \n", " \n", "\n", - "\n", + "\n", " \n", " \n", " \n", @@ -5775,42 +5775,42 @@ " \n", " \n", "\n", - "\n", + "\n", " \n", " \n", " \n", "\n", - "\n", + "\n", " \n", " \n", " \n", "\n", - "\n", + "\n", " \n", " \n", " \n", "\n", - "\n", + "\n", " \n", " \n", " \n", "\n", - "\n", + "\n", " \n", " \n", " \n", "\n", - "\n", + "\n", " \n", " \n", " \n", "\n", - "\n", + "\n", " \n", " \n", " \n", "\n", - "\n", + "\n", " \n", " \n", " \n", @@ -5846,68 +5846,68 @@ " stroke-width=\"0.3\"\n", " font-size=\"3.88\"\n", "\n", - " id=\"img-3f528d7d\">\n", + " id=\"img-de88c67c\">\n", "\n", " \n", " \n", " \n", "\n", - "\n", + "\n", " \n", " \n", " \n", "\n", - "\n", + "\n", " \n", " \n", " \n", "\n", - "\n", + "\n", " \n", " \n", " \n", "\n", - "\n", + "\n", " \n", " \n", " \n", "\n", - "\n", + "\n", " \n", " \n", " \n", "\n", - "\n", + "\n", " \n", " \n", " \n", "\n", - "\n", + "\n", " \n", " \n", " \n", "\n", - "\n", + "\n", " \n", " \n", " \n", "\n", - "\n", + "\n", " \n", " \n", " \n", "\n", - "\n", + "\n", " \n", " \n", " \n", "\n", - "\n", + "\n", " \n", " \n", " \n", "\n", - "\n", + "\n", " \n", " \n", " \n", @@ -6076,62 +6076,62 @@ " \n", " \n", "\n", - "\n", + "\n", " \n", " \n", " \n", "\n", - "\n", + "\n", " \n", " \n", " \n", "\n", - "\n", + "\n", " \n", " \n", " \n", "\n", - "\n", + "\n", " \n", " \n", " \n", "\n", - "\n", + "\n", " \n", " \n", " \n", "\n", - "\n", + "\n", " \n", " \n", " \n", "\n", - "\n", + "\n", " \n", " \n", " \n", "\n", - "\n", + "\n", " \n", " \n", " \n", "\n", - "\n", + "\n", " \n", " \n", " \n", "\n", - "\n", + "\n", " \n", " \n", " \n", "\n", - "\n", + "\n", " \n", " \n", " \n", "\n", - "\n", + "\n", " \n", " \n", " \n", @@ -6181,18 +6181,18 @@ " stroke-width=\"0.3\"\n", " font-size=\"3.88\"\n", "\n", - " id=\"img-6fc790ae\">\n", + " id=\"img-a1d43165\">\n", "\n", " \n", " \n", " \n", "\n", - "\n", + "\n", " \n", " \n", " \n", "\n", - "\n", + "\n", " \n", " \n", " \n", @@ -6361,12 +6361,12 @@ " \n", " \n", "\n", - "\n", + "\n", " \n", " \n", " \n", "\n", - "\n", + "\n", " \n", " \n", " \n", @@ -6404,18 +6404,18 @@ " stroke-width=\"0.3\"\n", " font-size=\"3.88\"\n", "\n", - " id=\"img-400f6779\">\n", + " id=\"img-6e4d5b39\">\n", "\n", " \n", " \n", " \n", "\n", - "\n", + "\n", " \n", " \n", " \n", "\n", - "\n", + "\n", " \n", " \n", " \n", @@ -6584,12 +6584,12 @@ " \n", " \n", "\n", - "\n", + "\n", " \n", " \n", " \n", "\n", - "\n", + "\n", " \n", " \n", " \n", @@ -6634,13 +6634,13 @@ " stroke-width=\"0.3\"\n", " font-size=\"3.88\"\n", "\n", - " id=\"img-439b3fd9\">\n", + " id=\"img-1761170b\">\n", "\n", " \n", " \n", " \n", "\n", - "\n", + "\n", " \n", " \n", " \n", @@ -6651,17 +6651,17 @@ " \n", " \n", "\n", - "\n", + "\n", " \n", " \n", " \n", "\n", - "\n", + "\n", " \n", " \n", " \n", "\n", - "\n", + "\n", " \n", " \n", " \n", @@ -6672,8 +6672,8 @@ " \n", " \n", "\n", - "\n", - " \n", + "\n", + " \n", " \n", " \n", " \n", @@ -6718,7 +6718,7 @@ " \n", " \n", "\n", - "\n", + "\n", " \n", " \n", " f\n", @@ -6889,7 +6889,7 @@ " \n", " \n", "\n", - "\n", + "\n", " \n", " \n", " \n", @@ -6900,17 +6900,17 @@ " \n", " \n", "\n", - "\n", + "\n", " \n", " \n", " \n", "\n", - "\n", + "\n", " \n", " \n", " \n", "\n", - "\n", + "\n", " \n", " \n", " \n", @@ -6921,8 +6921,8 @@ " \n", " \n", "\n", - "\n", - " \n", + "\n", + " \n", " \n", " \n", " \n", @@ -6967,7 +6967,7 @@ " \n", " \n", "\n", - "\n", + "\n", " \n", " \n", " f\n", @@ -7025,43 +7025,43 @@ " stroke-width=\"0.3\"\n", " font-size=\"3.88\"\n", "\n", - " id=\"img-0e1ab512\">\n", + " id=\"img-a92eb72a\">\n", "\n", " \n", " \n", " \n", "\n", - "\n", + "\n", " \n", " \n", " \n", "\n", - "\n", + "\n", " \n", " \n", " \n", "\n", - "\n", + "\n", " \n", " \n", " \n", "\n", - "\n", + "\n", " \n", " \n", " \n", "\n", - "\n", + "\n", " \n", " \n", " \n", "\n", - "\n", + "\n", " \n", " \n", " \n", "\n", - "\n", + "\n", " \n", " \n", " \n", @@ -7230,37 +7230,37 @@ " \n", " \n", "\n", - "\n", + "\n", " \n", " \n", " \n", "\n", - "\n", + "\n", " \n", " \n", " \n", "\n", - "\n", + "\n", " \n", " \n", " \n", "\n", - "\n", + "\n", " \n", " \n", " \n", "\n", - "\n", + "\n", " \n", " \n", " \n", "\n", - "\n", + "\n", " \n", " \n", " \n", "\n", - "\n", + "\n", " \n", " \n", " \n", @@ -7298,33 +7298,33 @@ " stroke-width=\"0.3\"\n", " font-size=\"3.88\"\n", "\n", - " id=\"img-dc374878\">\n", + " id=\"img-5aff864a\">\n", "\n", " \n", " \n", " \n", "\n", - "\n", + "\n", " \n", " \n", " \n", "\n", - "\n", + "\n", " \n", " \n", " \n", "\n", - "\n", + "\n", " \n", " \n", " \n", "\n", - "\n", + "\n", " \n", " \n", " \n", "\n", - "\n", + "\n", " \n", " \n", " \n", @@ -7332,7 +7332,7 @@ " \n", " \n", "\n", - "\n", + "\n", " \n", " \n", " \n", @@ -7340,32 +7340,32 @@ " \n", " \n", "\n", - "\n", + "\n", " \n", " \n", " \n", "\n", - "\n", + "\n", " \n", " \n", " \n", "\n", - "\n", + "\n", " \n", " \n", " \n", "\n", - "\n", + "\n", " \n", " \n", " \n", "\n", - "\n", + "\n", " \n", " \n", " \n", "\n", - "\n", + "\n", " \n", " \n", " \n", @@ -7534,27 +7534,27 @@ " \n", " \n", "\n", - "\n", + "\n", " \n", " \n", " \n", "\n", - "\n", + "\n", " \n", " \n", " \n", "\n", - "\n", + "\n", " \n", " \n", " \n", "\n", - "\n", + "\n", " \n", " \n", " \n", "\n", - "\n", + "\n", " \n", " \n", " \n", @@ -7562,7 +7562,7 @@ " \n", " \n", "\n", - "\n", + "\n", " \n", " \n", " \n", @@ -7570,32 +7570,32 @@ " \n", " \n", "\n", - "\n", + "\n", " \n", " \n", " \n", "\n", - "\n", + "\n", " \n", " \n", " \n", "\n", - "\n", + "\n", " \n", " \n", " \n", "\n", - "\n", + "\n", " \n", " \n", " \n", "\n", - "\n", + "\n", " \n", " \n", " \n", "\n", - "\n", + "\n", " \n", " \n", " \n", @@ -7646,29 +7646,29 @@ " stroke-width=\"0.3\"\n", " font-size=\"3.88\"\n", "\n", - " id=\"img-df8d5da6\">\n", + " id=\"img-d5e8ae50\">\n", "\n", " \n", " \n", " \n", "\n", - "\n", + "\n", " \n", " \n", " \n", "\n", - "\n", + "\n", " \n", " \n", " \n", "\n", - "\n", + "\n", " \n", " \n", " \n", "\n", - "\n", - " \n", + "\n", + " \n", " \n", " \n", " \n", @@ -7713,15 +7713,15 @@ " \n", " \n", "\n", - "\n", + "\n", " \n", " \n", " g\n", " \n", " \n", "\n", - "\n", - " \n", + "\n", + " \n", " \n", " \n", " \n", @@ -7766,7 +7766,7 @@ " \n", " \n", "\n", - "\n", + "\n", " \n", " \n", " f\n", @@ -7937,23 +7937,23 @@ " \n", " \n", "\n", - "\n", + "\n", " \n", " \n", " \n", "\n", - "\n", + "\n", " \n", " \n", " \n", "\n", - "\n", + "\n", " \n", " \n", " \n", "\n", - "\n", - " \n", + "\n", + " \n", " \n", " \n", " \n", @@ -7998,15 +7998,15 @@ " \n", " \n", "\n", - "\n", + "\n", " \n", " \n", " g\n", " \n", " \n", "\n", - "\n", - " \n", + "\n", + " \n", " \n", " \n", " \n", @@ -8051,7 +8051,7 @@ " \n", " \n", "\n", - "\n", + "\n", " \n", " \n", " f\n", @@ -8096,43 +8096,43 @@ " stroke-width=\"0.3\"\n", " font-size=\"3.88\"\n", "\n", - " id=\"img-7698ffe8\">\n", + " id=\"img-fa74b0a5\">\n", "\n", " \n", " \n", " \n", "\n", - "\n", + "\n", " \n", " \n", " \n", "\n", - "\n", + "\n", " \n", " \n", " \n", "\n", - "\n", + "\n", " \n", " \n", " \n", "\n", - "\n", + "\n", " \n", " \n", " \n", "\n", - "\n", + "\n", " \n", " \n", " \n", "\n", - "\n", + "\n", " \n", " \n", " \n", "\n", - "\n", + "\n", " \n", " \n", " \n", @@ -8301,37 +8301,37 @@ " \n", " \n", "\n", - "\n", + "\n", " \n", " \n", " \n", "\n", - "\n", + "\n", " \n", " \n", " \n", "\n", - "\n", + "\n", " \n", " \n", " \n", "\n", - "\n", + "\n", " \n", " \n", " \n", "\n", - "\n", + "\n", " \n", " \n", " \n", "\n", - "\n", + "\n", " \n", " \n", " \n", "\n", - "\n", + "\n", " \n", " \n", " \n", @@ -8379,34 +8379,34 @@ " stroke-width=\"0.3\"\n", " font-size=\"3.88\"\n", "\n", - " id=\"img-8b45a21a\">\n", + " id=\"img-de6ef627\">\n", "\n", " \n", " \n", " \n", "\n", - "\n", + "\n", " \n", " \n", " \n", "\n", - "\n", + "\n", " \n", " \n", " \n", "\n", - "\n", + "\n", " \n", " \n", " \n", "\n", - "\n", + "\n", " \n", " \n", " \n", "\n", - "\n", - " \n", + "\n", + " \n", " \n", " \n", " \n", @@ -8451,15 +8451,15 @@ " \n", " \n", "\n", - "\n", + "\n", " \n", " \n", " g\n", " \n", " \n", "\n", - "\n", - " \n", + "\n", + " \n", " \n", " \n", " \n", @@ -8504,7 +8504,7 @@ " \n", " \n", "\n", - "\n", + "\n", " \n", " \n", " f\n", @@ -8675,28 +8675,28 @@ " \n", " \n", "\n", - "\n", + "\n", " \n", " \n", " \n", "\n", - "\n", + "\n", " \n", " \n", " \n", "\n", - "\n", + "\n", " \n", " \n", " \n", "\n", - "\n", + "\n", " \n", " \n", " \n", "\n", - "\n", - " \n", + "\n", + " \n", " \n", " \n", " \n", @@ -8741,15 +8741,15 @@ " \n", " \n", "\n", - "\n", + "\n", " \n", " \n", " g\n", " \n", " \n", "\n", - "\n", - " \n", + "\n", + " \n", " \n", " \n", " \n", @@ -8794,7 +8794,7 @@ " \n", " \n", "\n", - "\n", + "\n", " \n", " \n", " f\n", @@ -8842,45 +8842,45 @@ " stroke-width=\"0.3\"\n", " font-size=\"3.88\"\n", "\n", - " id=\"img-90b1c02b\">\n", + " id=\"img-d69e1524\">\n", "\n", " \n", " \n", " \n", "\n", - "\n", + "\n", " \n", " \n", " \n", "\n", - "\n", + "\n", " \n", " \n", " \n", "\n", - "\n", + "\n", " \n", " \n", " \n", "\n", - "\n", + "\n", " \n", " \n", " \n", "\n", - "\n", + "\n", " \n", " \n", " g\n", " \n", " \n", "\n", - "\n", + "\n", " \n", " \n", " \n", "\n", - "\n", + "\n", " \n", " \n", " f\n", @@ -9051,39 +9051,39 @@ " \n", " \n", "\n", - "\n", + "\n", " \n", " \n", " \n", "\n", - "\n", + "\n", " \n", " \n", " \n", "\n", - "\n", + "\n", " \n", " \n", " \n", "\n", - "\n", + "\n", " \n", " \n", " \n", "\n", - "\n", + "\n", " \n", " \n", " g\n", " \n", " \n", "\n", - "\n", + "\n", " \n", " \n", " \n", "\n", - "\n", + "\n", " \n", " \n", " f\n", @@ -9197,11 +9197,11 @@ "file_extension": ".jl", "mimetype": "application/julia", "name": "julia", - "version": "1.10.4" + "version": "1.10.5" }, "kernelspec": { "name": "julia-1.10", - "display_name": "Julia 1.10.4", + "display_name": "Julia 1.10.5", "language": "julia" } }, diff --git a/dev/generated/graphics/composejl_wiring_diagrams/dd193a1b.svg b/dev/generated/graphics/composejl_wiring_diagrams/2ef9e866.svg similarity index 90% rename from dev/generated/graphics/composejl_wiring_diagrams/dd193a1b.svg rename to dev/generated/graphics/composejl_wiring_diagrams/2ef9e866.svg index 6dcac81aa..f73c5d66d 100644 --- a/dev/generated/graphics/composejl_wiring_diagrams/dd193a1b.svg +++ b/dev/generated/graphics/composejl_wiring_diagrams/2ef9e866.svg @@ -13,128 +13,128 @@ - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - - + + @@ -179,15 +179,15 @@ - + g - - + + @@ -232,15 +232,15 @@ - + f - - + + @@ -285,15 +285,15 @@ - + k - - + + @@ -338,15 +338,15 @@ - + h - - + + @@ -391,15 +391,15 @@ - + m - - + + @@ -444,15 +444,15 @@ - + n - - + + @@ -497,15 +497,15 @@ - + l - - + + @@ -550,15 +550,15 @@ - + n - - + + @@ -603,15 +603,15 @@ - + m - - + + @@ -656,15 +656,15 @@ - + k - - + + @@ -709,15 +709,15 @@ - + h - - + + @@ -762,15 +762,15 @@ - + g - - + + @@ -815,7 +815,7 @@ - + f diff --git a/dev/generated/graphics/composejl_wiring_diagrams/index.html b/dev/generated/graphics/composejl_wiring_diagrams/index.html index ee991733c..6d77a308e 100644 --- a/dev/generated/graphics/composejl_wiring_diagrams/index.html +++ b/dev/generated/graphics/composejl_wiring_diagrams/index.html @@ -19,18 +19,18 @@ - + - + - - + + @@ -75,7 +75,7 @@ - + f @@ -98,23 +98,23 @@ - + - + - + - - + + @@ -159,15 +159,15 @@ - + g - - + + @@ -212,7 +212,7 @@ - + f @@ -235,28 +235,28 @@ - + - + - + - + - - + + @@ -301,15 +301,15 @@ - + g - - + + @@ -354,7 +354,7 @@ - + f @@ -366,7 +366,7 @@ m, n = Hom(:m, B⊗A, A⊗B), Hom(:n, D⊗C, C⊗D) q = Hom(:l, A⊗B⊗C⊗D, D⊗C⊗B⊗A) -to_composejl((f⊗g⊗h⊗k)⋅(m⊗n)⋅q⋅(n⊗m)⋅(h⊗k⊗f⊗g))Example block output

Identities and braidings appear as wires.

to_composejl(id(A))
- + @@ -405,7 +405,7 @@ - + @@ -413,7 +413,7 @@ - + @@ -437,7 +437,7 @@ - + @@ -445,7 +445,7 @@ - + @@ -453,7 +453,7 @@ - + @@ -461,7 +461,7 @@ - + @@ -469,8 +469,8 @@ - - + + @@ -515,15 +515,15 @@ - + f - - + + @@ -568,7 +568,7 @@ - + g @@ -593,7 +593,7 @@ - + @@ -607,7 +607,7 @@ - + @@ -621,7 +621,7 @@ - + @@ -651,17 +651,17 @@ - + - + - + @@ -685,22 +685,22 @@ - + - + - + - + @@ -721,12 +721,12 @@ - + - + @@ -747,43 +747,43 @@ - + - + - + - + - + - + - + - - + + @@ -828,15 +828,15 @@ - + f - - + + @@ -881,14 +881,14 @@ - + f - + @@ -909,42 +909,42 @@ - + - + - + - + - + - + - + - + @@ -965,62 +965,62 @@ - + - + - + - + - + - + - + - + - + - + - + - + @@ -1043,12 +1043,12 @@ - + - + @@ -1069,12 +1069,12 @@ - + - + @@ -1098,7 +1098,7 @@ - + @@ -1109,17 +1109,17 @@ - + - + - + @@ -1130,8 +1130,8 @@ - - + + @@ -1176,7 +1176,7 @@ - + f @@ -1201,37 +1201,37 @@ - + - + - + - + - + - + - + @@ -1252,27 +1252,27 @@ - + - + - + - + - + @@ -1280,7 +1280,7 @@ - + @@ -1288,32 +1288,32 @@ - + - + - + - + - + - + @@ -1341,23 +1341,23 @@ - + - + - + - - + + @@ -1402,15 +1402,15 @@ - + g - - + + @@ -1455,7 +1455,7 @@ - + f @@ -1483,37 +1483,37 @@ - + - + - + - + - + - + - + @@ -1536,28 +1536,28 @@ - + - + - + - + - - + + @@ -1602,15 +1602,15 @@ - + g - - + + @@ -1655,7 +1655,7 @@ - + f @@ -1678,39 +1678,39 @@ - + - + - + - + - + g - + - + f @@ -1751,4 +1751,4 @@ \begin{scope} \draw (12,8) node [text=mycolor000000,rotate around={-0: (0,0)},inner sep=0.0]{\fontsize{12mm}{14.4mm}\selectfont $\text{f}$}; \end{scope} -\end{tikzpicture} +\end{tikzpicture} diff --git a/dev/generated/graphics/graphviz_graphs.ipynb b/dev/generated/graphics/graphviz_graphs.ipynb index 54a8e0e0e..b9ecc572b 100644 --- a/dev/generated/graphics/graphviz_graphs.ipynb +++ b/dev/generated/graphics/graphviz_graphs.ipynb @@ -1030,11 +1030,11 @@ "file_extension": ".jl", "mimetype": "application/julia", "name": "julia", - "version": "1.10.4" + "version": "1.10.5" }, "kernelspec": { "name": "julia-1.10", - "display_name": "Julia 1.10.4", + "display_name": "Julia 1.10.5", "language": "julia" } }, diff --git a/dev/generated/graphics/graphviz_graphs/index.html b/dev/generated/graphics/graphviz_graphs/index.html index 04cffbda2..d081d1c5d 100644 --- a/dev/generated/graphics/graphviz_graphs/index.html +++ b/dev/generated/graphics/graphviz_graphs/index.html @@ -711,4 +711,4 @@ -'/> +'/> diff --git a/dev/generated/graphics/graphviz_wiring_diagrams.ipynb b/dev/generated/graphics/graphviz_wiring_diagrams.ipynb index af7bd8581..46f011716 100644 --- a/dev/generated/graphics/graphviz_wiring_diagrams.ipynb +++ b/dev/generated/graphics/graphviz_wiring_diagrams.ipynb @@ -2190,11 +2190,11 @@ "file_extension": ".jl", "mimetype": "application/julia", "name": "julia", - "version": "1.10.4" + "version": "1.10.5" }, "kernelspec": { "name": "julia-1.10", - "display_name": "Julia 1.10.4", + "display_name": "Julia 1.10.5", "language": "julia" } }, diff --git a/dev/generated/graphics/graphviz_wiring_diagrams/index.html b/dev/generated/graphics/graphviz_wiring_diagrams/index.html index 952fedfe8..6c79eb57c 100644 --- a/dev/generated/graphics/graphviz_wiring_diagrams/index.html +++ b/dev/generated/graphics/graphviz_wiring_diagrams/index.html @@ -1539,4 +1539,4 @@ :rankdir => "TB" :_subgraph_cnt => 2 :objects => Object[{… - :edges => Object[{… + :edges => Object[{… diff --git a/dev/generated/graphics/layouts_vs_drawings.ipynb b/dev/generated/graphics/layouts_vs_drawings.ipynb index 00ec2d733..36a19d346 100644 --- a/dev/generated/graphics/layouts_vs_drawings.ipynb +++ b/dev/generated/graphics/layouts_vs_drawings.ipynb @@ -375,59 +375,59 @@ " stroke-width=\"0.3\"\n", " font-size=\"3.88\"\n", "\n", - " id=\"img-cfc53dd9\">\n", + " id=\"img-378611dc\">\n", "\n", " \n", " \n", " \n", "\n", - "\n", + "\n", " \n", " \n", " \n", "\n", - "\n", + "\n", " \n", " \n", " \n", "\n", - "\n", + "\n", " \n", " \n", " \n", "\n", - "\n", + "\n", " \n", " \n", " \n", "\n", - "\n", + "\n", " \n", " \n", " \n", "\n", - "\n", + "\n", " \n", " \n", " \n", "\n", - "\n", + "\n", " \n", " \n", " \n", "\n", - "\n", + "\n", " \n", " \n", " \n", "\n", - "\n", + "\n", " \n", " \n", " \n", "\n", - "\n", - " \n", + "\n", + " \n", " \n", " \n", " \n", @@ -472,15 +472,15 @@ " \n", " \n", "\n", - "\n", + "\n", " \n", " \n", " h\n", " \n", " \n", "\n", - "\n", - " \n", + "\n", + " \n", " \n", " \n", " \n", @@ -525,15 +525,15 @@ " \n", " \n", "\n", - "\n", + "\n", " \n", " \n", " g\n", " \n", " \n", "\n", - "\n", - " \n", + "\n", + " \n", " \n", " \n", " \n", @@ -578,15 +578,15 @@ " \n", " \n", "\n", - "\n", + "\n", " \n", " \n", " f\n", " \n", " \n", "\n", - "\n", - " \n", + "\n", + " \n", " \n", " \n", " \n", @@ -631,15 +631,15 @@ " \n", " \n", "\n", - "\n", + "\n", " \n", " \n", " g\n", " \n", " \n", "\n", - "\n", - " \n", + "\n", + " \n", " \n", " \n", " \n", @@ -684,15 +684,15 @@ " \n", " \n", "\n", - "\n", + "\n", " \n", " \n", " f\n", " \n", " \n", "\n", - "\n", - " \n", + "\n", + " \n", " \n", " \n", " \n", @@ -737,7 +737,7 @@ " \n", " \n", "\n", - "\n", + "\n", " \n", " \n", " f\n", @@ -908,53 +908,53 @@ " \n", " \n", "\n", - "\n", + "\n", " \n", " \n", " \n", "\n", - "\n", + "\n", " \n", " \n", " \n", "\n", - "\n", + "\n", " \n", " \n", " \n", "\n", - "\n", + "\n", " \n", " \n", " \n", "\n", - "\n", + "\n", " \n", " \n", " \n", "\n", - "\n", + "\n", " \n", " \n", " \n", "\n", - "\n", + "\n", " \n", " \n", " \n", "\n", - "\n", + "\n", " \n", " \n", " \n", "\n", - "\n", + "\n", " \n", " \n", " \n", "\n", - "\n", - " \n", + "\n", + " \n", " \n", " \n", " \n", @@ -999,15 +999,15 @@ " \n", " \n", "\n", - "\n", + "\n", " \n", " \n", " h\n", " \n", " \n", "\n", - "\n", - " \n", + "\n", + " \n", " \n", " \n", " \n", @@ -1052,15 +1052,15 @@ " \n", " \n", "\n", - "\n", + "\n", " \n", " \n", " g\n", " \n", " \n", "\n", - "\n", - " \n", + "\n", + " \n", " \n", " \n", " \n", @@ -1105,15 +1105,15 @@ " \n", " \n", "\n", - "\n", + "\n", " \n", " \n", " f\n", " \n", " \n", "\n", - "\n", - " \n", + "\n", + " \n", " \n", " \n", " \n", @@ -1158,15 +1158,15 @@ " \n", " \n", "\n", - "\n", + "\n", " \n", " \n", " g\n", " \n", " \n", "\n", - "\n", - " \n", + "\n", + " \n", " \n", " \n", " \n", @@ -1211,15 +1211,15 @@ " \n", " \n", "\n", - "\n", + "\n", " \n", " \n", " f\n", " \n", " \n", "\n", - "\n", - " \n", + "\n", + " \n", " \n", " \n", " \n", @@ -1264,7 +1264,7 @@ " \n", " \n", "\n", - "\n", + "\n", " \n", " \n", " f\n", @@ -1306,68 +1306,68 @@ "\n", "\n", "\n", - "\n", + "\n", "\n", "\n", - "\n", + "\n", "\n", "\n", - "\n", + "\n", "\n", "\n", - "\n", + "\n", "\n", "\n", "\n", - "\n", + "\n", " \n", "\n", - "\n", + "\n", " \n", "\n", - "\n", + "\n", " \n", "\n", - "\n", + "\n", " \n", "\n", - "\n", + "\n", " \n", "\n", - "\n", + "\n", " \n", "\n", "\n", "\n", "\n", "\n", - " \n", + " \n", "\n", "\n", "\n", - " \n", + " \n", "\n", "\n", "\n", - " \n", + " \n", "\n", - "\n", + "\n", "\n", "\n", "\n", - " \n", + " \n", "\n", - "\n", + "\n", "\n", "\n", "\n", - " \n", + " \n", "\n", - "\n", + "\n", "\n", "\n", "\n", - " \n", + " \n", "\n", "\n", "\n", @@ -1375,13 +1375,13 @@ "\n", "\n", "\n", - "\n", + "\n", "\n", "\n", - "\n", + "\n", "\n", "\n", - "\n", + "\n", "\n", "\n", "\n", @@ -1435,59 +1435,59 @@ " stroke-width=\"0.3\"\n", " font-size=\"3.88\"\n", "\n", - " id=\"img-e1c42d4d\">\n", + " id=\"img-d2b3bb1a\">\n", "\n", " \n", " \n", " \n", "\n", - "\n", + "\n", " \n", " \n", " \n", "\n", - "\n", + "\n", " \n", " \n", " \n", "\n", - "\n", + "\n", " \n", " \n", " \n", "\n", - "\n", + "\n", " \n", " \n", " \n", "\n", - "\n", + "\n", " \n", " \n", " \n", "\n", - "\n", + "\n", " \n", " \n", " \n", "\n", - "\n", + "\n", " \n", " \n", " \n", "\n", - "\n", + "\n", " \n", " \n", " \n", "\n", - "\n", + "\n", " \n", " \n", " \n", "\n", - "\n", - " \n", + "\n", + " \n", " \n", " \n", " \n", @@ -1532,15 +1532,15 @@ " \n", " \n", "\n", - "\n", + "\n", " \n", " \n", " h\n", " \n", " \n", "\n", - "\n", - " \n", + "\n", + " \n", " \n", " \n", " \n", @@ -1585,15 +1585,15 @@ " \n", " \n", "\n", - "\n", + "\n", " \n", " \n", " g\n", " \n", " \n", "\n", - "\n", - " \n", + "\n", + " \n", " \n", " \n", " \n", @@ -1638,15 +1638,15 @@ " \n", " \n", "\n", - "\n", + "\n", " \n", " \n", " f\n", " \n", " \n", "\n", - "\n", - " \n", + "\n", + " \n", " \n", " \n", " \n", @@ -1691,15 +1691,15 @@ " \n", " \n", "\n", - "\n", + "\n", " \n", " \n", " g\n", " \n", " \n", "\n", - "\n", - " \n", + "\n", + " \n", " \n", " \n", " \n", @@ -1744,15 +1744,15 @@ " \n", " \n", "\n", - "\n", + "\n", " \n", " \n", " f\n", " \n", " \n", "\n", - "\n", - " \n", + "\n", + " \n", " \n", " \n", " \n", @@ -1797,7 +1797,7 @@ " \n", " \n", "\n", - "\n", + "\n", " \n", " \n", " f\n", @@ -1968,53 +1968,53 @@ " \n", " \n", "\n", - "\n", + "\n", " \n", " \n", " \n", "\n", - "\n", + "\n", " \n", " \n", " \n", "\n", - "\n", + "\n", " \n", " \n", " \n", "\n", - "\n", + "\n", " \n", " \n", " \n", "\n", - "\n", + "\n", " \n", " \n", " \n", "\n", - "\n", + "\n", " \n", " \n", " \n", "\n", - "\n", + "\n", " \n", " \n", " \n", "\n", - "\n", + "\n", " \n", " \n", " \n", "\n", - "\n", + "\n", " \n", " \n", " \n", "\n", - "\n", - " \n", + "\n", + " \n", " \n", " \n", " \n", @@ -2059,15 +2059,15 @@ " \n", " \n", "\n", - "\n", + "\n", " \n", " \n", " h\n", " \n", " \n", "\n", - "\n", - " \n", + "\n", + " \n", " \n", " \n", " \n", @@ -2112,15 +2112,15 @@ " \n", " \n", "\n", - "\n", + "\n", " \n", " \n", " g\n", " \n", " \n", "\n", - "\n", - " \n", + "\n", + " \n", " \n", " \n", " \n", @@ -2165,15 +2165,15 @@ " \n", " \n", "\n", - "\n", + "\n", " \n", " \n", " f\n", " \n", " \n", "\n", - "\n", - " \n", + "\n", + " \n", " \n", " \n", " \n", @@ -2218,15 +2218,15 @@ " \n", " \n", "\n", - "\n", + "\n", " \n", " \n", " g\n", " \n", " \n", "\n", - "\n", - " \n", + "\n", + " \n", " \n", " \n", " \n", @@ -2271,15 +2271,15 @@ " \n", " \n", "\n", - "\n", + "\n", " \n", " \n", " f\n", " \n", " \n", "\n", - "\n", - " \n", + "\n", + " \n", " \n", " \n", " \n", @@ -2324,7 +2324,7 @@ " \n", " \n", "\n", - "\n", + "\n", " \n", " \n", " f\n", @@ -2358,53 +2358,53 @@ "\n", "\n", "\n", - "\n", + "\n", "\n", "\n", - "\n", + "\n", "\n", "\n", - "\n", + "\n", "\n", "\n", - "\n", + "\n", "\n", "\n", "\n", - "\n", + "\n", " \n", "\n", - "\n", + "\n", " \n", "\n", - "\n", + "\n", " \n", "\n", "\n", "\n", "\n", "\n", - " \n", + " \n", "\n", "\n", "\n", - " \n", + " \n", "\n", "\n", "\n", - " \n", + " \n", "\n", "\n", "\n", - " \n", + " \n", "\n", "\n", "\n", - " \n", + " \n", "\n", "\n", "\n", - " \n", + " \n", "\n", "\n", "\n", @@ -2412,13 +2412,13 @@ "\n", "\n", "\n", - "\n", + "\n", "\n", "\n", - "\n", + "\n", "\n", "\n", - "\n", + "\n", "\n", "\n", "\n", @@ -2444,11 +2444,11 @@ "file_extension": ".jl", "mimetype": "application/julia", "name": "julia", - "version": "1.10.4" + "version": "1.10.5" }, "kernelspec": { "name": "julia-1.10", - "display_name": "Julia 1.10.4", + "display_name": "Julia 1.10.5", "language": "julia" } }, diff --git a/dev/generated/graphics/layouts_vs_drawings/88d08333.svg b/dev/generated/graphics/layouts_vs_drawings/1721eca6.svg similarity index 92% rename from dev/generated/graphics/layouts_vs_drawings/88d08333.svg rename to dev/generated/graphics/layouts_vs_drawings/1721eca6.svg index 30cb7854b..fa7061fc4 100644 --- a/dev/generated/graphics/layouts_vs_drawings/88d08333.svg +++ b/dev/generated/graphics/layouts_vs_drawings/1721eca6.svg @@ -2,53 +2,53 @@ - + - + - + - + - + - + - + - + - + - + - + - + - + @@ -56,13 +56,13 @@ - + - + - + diff --git a/dev/generated/graphics/layouts_vs_drawings/08d6b9a8.svg b/dev/generated/graphics/layouts_vs_drawings/1f813c1b.svg similarity index 91% rename from dev/generated/graphics/layouts_vs_drawings/08d6b9a8.svg rename to dev/generated/graphics/layouts_vs_drawings/1f813c1b.svg index c96e65014..95ab1270c 100644 --- a/dev/generated/graphics/layouts_vs_drawings/08d6b9a8.svg +++ b/dev/generated/graphics/layouts_vs_drawings/1f813c1b.svg @@ -13,53 +13,53 @@ - + - + - + - + - + - + - + - + - + - - + + @@ -104,15 +104,15 @@ - + h - - + + @@ -157,15 +157,15 @@ - + g - - + + @@ -210,15 +210,15 @@ - + f - - + + @@ -263,15 +263,15 @@ - + g - - + + @@ -316,15 +316,15 @@ - + f - - + + @@ -369,7 +369,7 @@ - + f diff --git a/dev/generated/graphics/layouts_vs_drawings/d79747b2.svg b/dev/generated/graphics/layouts_vs_drawings/69a0a811.svg similarity index 90% rename from dev/generated/graphics/layouts_vs_drawings/d79747b2.svg rename to dev/generated/graphics/layouts_vs_drawings/69a0a811.svg index d31d10aa7..a08e86ed3 100644 --- a/dev/generated/graphics/layouts_vs_drawings/d79747b2.svg +++ b/dev/generated/graphics/layouts_vs_drawings/69a0a811.svg @@ -2,68 +2,68 @@ - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + @@ -71,13 +71,13 @@ - + - + - + diff --git a/dev/generated/graphics/layouts_vs_drawings/5951d9bd.svg b/dev/generated/graphics/layouts_vs_drawings/a9229ee7.svg similarity index 92% rename from dev/generated/graphics/layouts_vs_drawings/5951d9bd.svg rename to dev/generated/graphics/layouts_vs_drawings/a9229ee7.svg index 9b1f9e7f4..f02fdfecb 100644 --- a/dev/generated/graphics/layouts_vs_drawings/5951d9bd.svg +++ b/dev/generated/graphics/layouts_vs_drawings/a9229ee7.svg @@ -13,53 +13,53 @@ - + - + - + - + - + - + - + - + - + - - + + @@ -104,15 +104,15 @@ - + h - - + + @@ -157,15 +157,15 @@ - + g - - + + @@ -210,15 +210,15 @@ - + f - - + + @@ -263,15 +263,15 @@ - + g - - + + @@ -316,15 +316,15 @@ - + f - - + + @@ -369,7 +369,7 @@ - + f diff --git a/dev/generated/graphics/layouts_vs_drawings/index.html b/dev/generated/graphics/layouts_vs_drawings/index.html index 534c99db2..83032efa4 100644 --- a/dev/generated/graphics/layouts_vs_drawings/index.html +++ b/dev/generated/graphics/layouts_vs_drawings/index.html @@ -249,8 +249,8 @@

'/>

To get just the layout from Graphviz, we call graphviz_layout instead. We can then render this layout using Compose.jl. Note that the Graphviz layout has units in points.

import Compose
 
 layout = graphviz_layout(diagram, orientation=LeftToRight)
-layout_to_composejl(layout, base_unit=Compose.pt)
Example block output

The same layout can be rendered in TikZ:

import TikzPictures
+layout_to_composejl(layout, base_unit=Compose.pt)
Example block output

The same layout can be rendered in TikZ:

import TikzPictures
 
-layout_to_tikz(layout, base_unit="1pt")
Example block output

Series-parallel layout

Catlab has its own layout system based on series-parallel decomposition. In this case, the layout exactly recovers the structure of the morphism expression created at the beginning.

layout = layout_diagram(FreeSymmetricMonoidalCategory, diagram,
+layout_to_tikz(layout, base_unit="1pt")
Example block output

Series-parallel layout

Catlab has its own layout system based on series-parallel decomposition. In this case, the layout exactly recovers the structure of the morphism expression created at the beginning.

layout = layout_diagram(FreeSymmetricMonoidalCategory, diagram,
                         orientation=LeftToRight)
-layout_to_composejl(layout)
Example block output
layout_to_tikz(layout)
Example block output +layout_to_composejl(layout)Example block output
layout_to_tikz(layout)
Example block output diff --git a/dev/generated/graphics/tikz_wiring_diagrams.ipynb b/dev/generated/graphics/tikz_wiring_diagrams.ipynb index 986acc794..5e82c6a36 100644 --- a/dev/generated/graphics/tikz_wiring_diagrams.ipynb +++ b/dev/generated/graphics/tikz_wiring_diagrams.ipynb @@ -73,37 +73,37 @@ "\n", "\n", "\n", - "\n", + "\n", "\n", "\n", - "\n", + "\n", "\n", "\n", - "\n", + "\n", "\n", "\n", - "\n", + "\n", "\n", "\n", "\n", - "\n", + "\n", " \n", "\n", "\n", "\n", "\n", "\n", - " \n", + " \n", "\n", "\n", "\n", - " \n", + " \n", "\n", - "\n", + "\n", "\n", "\n", "\n", - " \n", + " \n", "\n", "\n", "\n", @@ -132,48 +132,48 @@ "\n", "\n", "\n", - "\n", + "\n", "\n", "\n", - "\n", + "\n", "\n", "\n", - "\n", + "\n", "\n", "\n", - "\n", + "\n", "\n", "\n", - "\n", + "\n", "\n", "\n", "\n", - "\n", + "\n", " \n", "\n", "\n", "\n", "\n", "\n", - " \n", + " \n", "\n", "\n", "\n", - " \n", + " \n", "\n", "\n", "\n", - " \n", + " \n", "\n", "\n", "\n", - " \n", + " \n", "\n", - "\n", + "\n", "\n", "\n", "\n", - " \n", + " \n", "\n", "\n", "\n", @@ -202,57 +202,57 @@ "\n", "\n", "\n", - "\n", + "\n", "\n", "\n", - "\n", + "\n", "\n", "\n", - "\n", + "\n", "\n", "\n", - "\n", + "\n", "\n", "\n", - "\n", + "\n", "\n", "\n", "\n", - "\n", + "\n", " \n", "\n", - "\n", + "\n", " \n", "\n", "\n", "\n", "\n", "\n", - " \n", + " \n", "\n", "\n", "\n", - " \n", + " \n", "\n", "\n", "\n", - " \n", + " \n", "\n", "\n", "\n", - " \n", + " \n", "\n", - "\n", + "\n", "\n", "\n", "\n", - " \n", + " \n", "\n", - "\n", + "\n", "\n", "\n", "\n", - " \n", + " \n", "\n", "\n", "\n", @@ -289,96 +289,96 @@ "\n", "\n", "\n", - "\n", + "\n", "\n", "\n", - "\n", + "\n", "\n", "\n", - "\n", + "\n", "\n", "\n", - "\n", + "\n", "\n", "\n", - "\n", + "\n", "\n", "\n", - "\n", + "\n", "\n", "\n", - "\n", + "\n", "\n", "\n", - "\n", + "\n", "\n", "\n", "\n", - "\n", + "\n", " \n", "\n", - "\n", + "\n", " \n", "\n", - "\n", + "\n", " \n", "\n", - "\n", + "\n", " \n", "\n", "\n", "\n", "\n", "\n", - " \n", + " \n", "\n", "\n", "\n", - " \n", + " \n", "\n", "\n", "\n", - " \n", + " \n", "\n", "\n", "\n", - " \n", + " \n", "\n", "\n", "\n", - " \n", + " \n", "\n", "\n", "\n", - " \n", + " \n", "\n", "\n", "\n", - " \n", + " \n", "\n", "\n", "\n", - " \n", + " \n", "\n", "\n", "\n", - " \n", + " \n", "\n", "\n", "\n", - " \n", + " \n", "\n", "\n", "\n", - " \n", + " \n", "\n", "\n", "\n", - " \n", + " \n", "\n", "\n", "\n", - " \n", + " \n", "\n", "\n", "\n", @@ -400,16 +400,16 @@ "\n", "\n", "\n", - "\n", + "\n", "\n", "\n", - "\n", + "\n", "\n", "\n", - "\n", + "\n", "\n", "\n", - "\n", + "\n", "\n", "\n", "\n", @@ -450,23 +450,23 @@ "\n", "\n", "\n", - "\n", + "\n", "\n", "\n", - "\n", + "\n", "\n", "\n", "\n", - "\n", + "\n", " \n", "\n", "\n", "\n", - "\n", + "\n", "\n", "\n", "\n", - " \n", + " \n", "\n", "\n", "\n", @@ -495,35 +495,35 @@ "\n", "\n", "\n", - "\n", + "\n", "\n", "\n", - "\n", + "\n", "\n", "\n", - "\n", + "\n", "\n", "\n", "\n", - "\n", + "\n", " \n", "\n", - "\n", + "\n", " \n", "\n", "\n", "\n", - "\n", + "\n", "\n", "\n", "\n", - " \n", + " \n", "\n", - "\n", + "\n", "\n", "\n", "\n", - " \n", + " \n", "\n", "\n", "\n", @@ -552,32 +552,32 @@ "\n", "\n", "\n", - "\n", + "\n", "\n", "\n", - "\n", + "\n", "\n", "\n", - "\n", + "\n", "\n", "\n", "\n", - "\n", + "\n", " \n", "\n", "\n", "\n", "\n", "\n", - " \n", + " \n", "\n", "\n", "\n", - " \n", + " \n", "\n", "\n", "\n", - "\n", + "\n", "\n", "\n", "\n", @@ -616,97 +616,97 @@ "\n", "\n", "\n", - "\n", + "\n", "\n", "\n", - "\n", + "\n", "\n", "\n", - "\n", + "\n", "\n", "\n", - "\n", + "\n", "\n", "\n", "\n", - "\n", + "\n", " \n", "\n", - "\n", + "\n", " \n", "\n", - "\n", + "\n", " \n", "\n", - "\n", + "\n", " \n", "\n", - "\n", + "\n", " \n", "\n", - "\n", + "\n", " \n", "\n", - "\n", + "\n", " \n", "\n", - "\n", + "\n", " \n", "\n", - "\n", + "\n", " \n", "\n", "\n", "\n", - "\n", + "\n", "\n", "\n", "\n", - " \n", + " \n", "\n", "\n", - "\n", + "\n", "\n", "\n", "\n", - " \n", + " \n", "\n", "\n", - "\n", + "\n", "\n", "\n", - "\n", + "\n", "\n", "\n", "\n", - " \n", + " \n", "\n", "\n", - "\n", + "\n", "\n", "\n", "\n", - " \n", + " \n", "\n", "\n", - "\n", + "\n", "\n", "\n", - "\n", + "\n", "\n", "\n", "\n", - " \n", + " \n", "\n", "\n", - "\n", + "\n", "\n", "\n", "\n", - " \n", + " \n", "\n", "\n", - "\n", + "\n", "\n", "\n", "\n", @@ -748,97 +748,97 @@ "\n", "\n", "\n", - "\n", + "\n", "\n", "\n", - "\n", + "\n", "\n", "\n", - "\n", + "\n", "\n", "\n", - "\n", + "\n", "\n", "\n", "\n", - "\n", + "\n", " \n", "\n", - "\n", + "\n", " \n", "\n", - "\n", + "\n", " \n", "\n", - "\n", + "\n", " \n", "\n", - "\n", + "\n", " \n", "\n", - "\n", + "\n", " \n", "\n", - "\n", + "\n", " \n", "\n", - "\n", + "\n", " \n", "\n", - "\n", + "\n", " \n", "\n", "\n", "\n", - "\n", + "\n", "\n", "\n", "\n", - " \n", + " \n", "\n", "\n", - "\n", + "\n", "\n", "\n", "\n", - " \n", + " \n", "\n", "\n", - "\n", + "\n", "\n", "\n", - "\n", + "\n", "\n", "\n", "\n", - " \n", + " \n", "\n", "\n", - "\n", + "\n", "\n", "\n", "\n", - " \n", + " \n", "\n", "\n", - "\n", + "\n", "\n", "\n", - "\n", + "\n", "\n", "\n", "\n", - " \n", + " \n", "\n", "\n", - "\n", + "\n", "\n", "\n", "\n", - " \n", + " \n", "\n", "\n", - "\n", + "\n", "\n", "\n", "\n", @@ -876,17 +876,17 @@ "\n", "\n", "\n", - "\n", + "\n", "\n", "\n", - "\n", + "\n", "\n", "\n", "\n", - "\n", + "\n", " \n", "\n", - "\n", + "\n", " \n", "\n", "\n", @@ -894,12 +894,12 @@ "\n", "\n", "\n", - " \n", + " \n", "\n", - "\n", + "\n", "\n", "\n", - "\n", + "\n", "\n", "\n", "\n", @@ -932,10 +932,10 @@ "\n", "\n", "\n", - "\n", + "\n", "\n", "\n", - "\n", + "\n", "\n", "\n", "\n", @@ -944,7 +944,7 @@ "\n", "\n", "\n", - " \n", + " \n", "\n", "\n", "\n", @@ -973,20 +973,20 @@ "\n", "\n", "\n", - "\n", + "\n", "\n", "\n", - "\n", + "\n", "\n", "\n", - "\n", + "\n", "\n", "\n", - "\n", + "\n", "\n", "\n", "\n", - "\n", + "\n", " \n", "\n", "\n", @@ -994,26 +994,26 @@ "\n", "\n", "\n", - " \n", + " \n", "\n", "\n", "\n", - " \n", + " \n", "\n", "\n", "\n", "\n", - " \n", + " \n", "\n", "\n", "\n", "\n", "\n", - "\n", + "\n", "\n", "\n", "\n", - " \n", + " \n", "\n", "\n", "\n", @@ -1042,26 +1042,26 @@ "\n", "\n", "\n", - "\n", + "\n", "\n", "\n", - "\n", + "\n", "\n", "\n", - "\n", + "\n", "\n", "\n", "\n", - "\n", + "\n", " \n", "\n", - "\n", + "\n", " \n", "\n", - "\n", + "\n", " \n", "\n", - "\n", + "\n", " \n", "\n", "\n", @@ -1070,22 +1070,22 @@ "\n", "\n", "\n", - " \n", + " \n", "\n", "\n", "\n", - " \n", + " \n", "\n", - "\n", + "\n", "\n", "\n", - "\n", + "\n", "\n", "\n", - "\n", + "\n", "\n", "\n", - "\n", + "\n", "\n", "\n", "\n", @@ -1115,35 +1115,35 @@ "\n", "\n", "\n", - "\n", + "\n", "\n", "\n", - "\n", + "\n", "\n", "\n", - "\n", + "\n", "\n", "\n", - "\n", + "\n", "\n", "\n", "\n", - "\n", + "\n", " \n", "\n", - "\n", + "\n", " \n", "\n", - "\n", + "\n", " \n", "\n", - "\n", + "\n", " \n", "\n", - "\n", + "\n", " \n", "\n", - "\n", + "\n", " \n", "\n", "\n", @@ -1153,32 +1153,32 @@ "\n", "\n", "\n", - " \n", + " \n", "\n", "\n", "\n", - " \n", + " \n", "\n", "\n", "\n", - " \n", + " \n", "\n", - "\n", + "\n", "\n", "\n", - "\n", + "\n", "\n", "\n", - "\n", + "\n", "\n", "\n", - "\n", + "\n", "\n", "\n", - "\n", + "\n", "\n", "\n", - "\n", + "\n", "\n", "\n", "\n", @@ -1222,41 +1222,41 @@ "\n", "\n", "\n", - "\n", + "\n", "\n", "\n", - "\n", + "\n", "\n", "\n", "\n", - "\n", + "\n", " \n", "\n", - "\n", + "\n", " \n", "\n", "\n", "\n", - "\n", + "\n", "\n", "\n", "\n", - " \n", + " \n", "\n", "\n", "\n", - " \n", + " \n", "\n", "\n", - "\n", + "\n", "\n", "\n", "\n", - " \n", + " \n", "\n", "\n", "\n", - " \n", + " \n", "\n", "\n", "\n", @@ -1288,10 +1288,10 @@ "\n", "\n", "\n", - "\n", + "\n", "\n", "\n", - "\n", + "\n", "\n", "\n", "\n", @@ -1299,20 +1299,20 @@ "\n", "\n", "\n", - " \n", + " \n", "\n", "\n", "\n", - " \n", + " \n", "\n", "\n", "\n", "\n", - " \n", + " \n", "\n", "\n", "\n", - " \n", + " \n", "\n", "\n", "\n", @@ -1351,26 +1351,26 @@ "\n", "\n", "\n", - "\n", + "\n", "\n", "\n", - "\n", + "\n", "\n", "\n", "\n", - "\n", + "\n", " \n", "\n", "\n", "\n", "\n", "\n", - " \n", + " \n", "\n", "\n", "\n", "\n", - "\n", + "\n", "\n", "\n", "\n", @@ -1419,10 +1419,10 @@ "\n", "\n", "\n", - "\n", + "\n", " \n", "\n", - "\n", + "\n", " \n", "\n", "\n", @@ -1432,10 +1432,10 @@ "\n", "\n", "\n", - "\n", + "\n", "\n", "\n", - "\n", + "\n", "\n", "\n", "\n", @@ -1466,10 +1466,10 @@ "\n", "\n", "\n", - "\n", + "\n", " \n", "\n", - "\n", + "\n", " \n", "\n", "\n", @@ -1484,10 +1484,10 @@ "\n", "\n", "\n", - "\n", + "\n", "\n", "\n", - "\n", + "\n", "\n", "\n", "\n", @@ -1532,32 +1532,32 @@ "\n", "\n", "\n", - "\n", + "\n", "\n", "\n", - "\n", + "\n", "\n", "\n", - "\n", + "\n", "\n", "\n", "\n", - "\n", + "\n", " \n", "\n", "\n", "\n", "\n", "\n", - " \n", + " \n", "\n", "\n", "\n", - " \n", + " \n", "\n", "\n", "\n", - "\n", + "\n", "\n", "\n", "\n", @@ -1591,10 +1591,10 @@ "\n", "\n", "\n", - "\n", + "\n", " \n", "\n", - "\n", + "\n", " \n", "\n", "\n", @@ -1604,10 +1604,10 @@ "\n", "\n", "\n", - "\n", + "\n", "\n", "\n", - "\n", + "\n", "\n", "\n", "\n", @@ -1651,32 +1651,32 @@ "\n", "\n", "\n", - "\n", + "\n", "\n", "\n", - "\n", + "\n", "\n", "\n", - "\n", + "\n", "\n", "\n", "\n", - "\n", + "\n", " \n", "\n", "\n", "\n", "\n", "\n", - " \n", + " \n", "\n", "\n", "\n", - " \n", + " \n", "\n", "\n", "\n", - "\n", + "\n", "\n", "\n", "\n", @@ -1706,32 +1706,32 @@ "\n", "\n", "\n", - "\n", + "\n", "\n", "\n", - "\n", + "\n", "\n", "\n", - "\n", + "\n", "\n", "\n", "\n", - "\n", + "\n", " \n", "\n", "\n", "\n", "\n", "\n", - " \n", + " \n", "\n", "\n", "\n", - " \n", + " \n", "\n", "\n", "\n", - "\n", + "\n", "\n", "\n", "\n", @@ -1763,32 +1763,32 @@ "\n", "\n", "\n", - "\n", + "\n", "\n", "\n", - "\n", + "\n", "\n", "\n", - "\n", + "\n", "\n", "\n", "\n", - "\n", + "\n", " \n", "\n", "\n", "\n", "\n", "\n", - " \n", + " \n", "\n", "\n", "\n", - " \n", + " \n", "\n", "\n", "\n", - "\n", + "\n", "\n", "\n", "\n", @@ -1820,32 +1820,32 @@ "\n", "\n", "\n", - "\n", + "\n", "\n", "\n", - "\n", + "\n", "\n", "\n", - "\n", + "\n", "\n", "\n", "\n", - "\n", + "\n", " \n", "\n", "\n", "\n", "\n", "\n", - " \n", + " \n", "\n", "\n", "\n", - " \n", + " \n", "\n", "\n", "\n", - "\n", + "\n", "\n", "\n", "\n", @@ -1928,11 +1928,11 @@ "file_extension": ".jl", "mimetype": "application/julia", "name": "julia", - "version": "1.10.4" + "version": "1.10.5" }, "kernelspec": { "name": "julia-1.10", - "display_name": "Julia 1.10.4", + "display_name": "Julia 1.10.5", "language": "julia" } }, diff --git a/dev/generated/graphics/tikz_wiring_diagrams/2c2fa0dd.svg b/dev/generated/graphics/tikz_wiring_diagrams/20c52817.svg similarity index 90% rename from dev/generated/graphics/tikz_wiring_diagrams/2c2fa0dd.svg rename to dev/generated/graphics/tikz_wiring_diagrams/20c52817.svg index 37591cbbd..ed23602fc 100644 --- a/dev/generated/graphics/tikz_wiring_diagrams/2c2fa0dd.svg +++ b/dev/generated/graphics/tikz_wiring_diagrams/20c52817.svg @@ -2,57 +2,57 @@ - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + diff --git a/dev/generated/graphics/tikz_wiring_diagrams/1d3ce9c8.svg b/dev/generated/graphics/tikz_wiring_diagrams/591aee71.svg similarity index 85% rename from dev/generated/graphics/tikz_wiring_diagrams/1d3ce9c8.svg rename to dev/generated/graphics/tikz_wiring_diagrams/591aee71.svg index 6f9e76bff..2bceedfdd 100644 --- a/dev/generated/graphics/tikz_wiring_diagrams/1d3ce9c8.svg +++ b/dev/generated/graphics/tikz_wiring_diagrams/591aee71.svg @@ -2,97 +2,97 @@ - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + diff --git a/dev/generated/graphics/tikz_wiring_diagrams/fec5c463.svg b/dev/generated/graphics/tikz_wiring_diagrams/66634134.svg similarity index 93% rename from dev/generated/graphics/tikz_wiring_diagrams/fec5c463.svg rename to dev/generated/graphics/tikz_wiring_diagrams/66634134.svg index 8d6f69b88..b7836b64e 100644 --- a/dev/generated/graphics/tikz_wiring_diagrams/fec5c463.svg +++ b/dev/generated/graphics/tikz_wiring_diagrams/66634134.svg @@ -2,96 +2,96 @@ - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + @@ -113,16 +113,16 @@ - + - + - + - + diff --git a/dev/generated/graphics/tikz_wiring_diagrams/bf0079ea.svg b/dev/generated/graphics/tikz_wiring_diagrams/7d38f969.svg similarity index 84% rename from dev/generated/graphics/tikz_wiring_diagrams/bf0079ea.svg rename to dev/generated/graphics/tikz_wiring_diagrams/7d38f969.svg index ffc595830..dbcfca867 100644 --- a/dev/generated/graphics/tikz_wiring_diagrams/bf0079ea.svg +++ b/dev/generated/graphics/tikz_wiring_diagrams/7d38f969.svg @@ -2,97 +2,97 @@ - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + diff --git a/dev/generated/graphics/tikz_wiring_diagrams/996bd02d.svg b/dev/generated/graphics/tikz_wiring_diagrams/c2ed8efa.svg similarity index 89% rename from dev/generated/graphics/tikz_wiring_diagrams/996bd02d.svg rename to dev/generated/graphics/tikz_wiring_diagrams/c2ed8efa.svg index 0c5d52d2f..ad7f8f3e6 100644 --- a/dev/generated/graphics/tikz_wiring_diagrams/996bd02d.svg +++ b/dev/generated/graphics/tikz_wiring_diagrams/c2ed8efa.svg @@ -2,35 +2,35 @@ - + - + - + - + - + - + - + - + - + - + @@ -40,32 +40,32 @@ - + - + - + - + - + - + - + - + - + diff --git a/dev/generated/graphics/tikz_wiring_diagrams/317f4c87.svg b/dev/generated/graphics/tikz_wiring_diagrams/c7485a9e.svg similarity index 93% rename from dev/generated/graphics/tikz_wiring_diagrams/317f4c87.svg rename to dev/generated/graphics/tikz_wiring_diagrams/c7485a9e.svg index 00dd88e1d..8705dbec5 100644 --- a/dev/generated/graphics/tikz_wiring_diagrams/317f4c87.svg +++ b/dev/generated/graphics/tikz_wiring_diagrams/c7485a9e.svg @@ -2,20 +2,20 @@ - + - + - + - + - + @@ -23,26 +23,26 @@ - + - + - + - + - + diff --git a/dev/generated/graphics/tikz_wiring_diagrams/15b04bc0.svg b/dev/generated/graphics/tikz_wiring_diagrams/d6686d1b.svg similarity index 91% rename from dev/generated/graphics/tikz_wiring_diagrams/15b04bc0.svg rename to dev/generated/graphics/tikz_wiring_diagrams/d6686d1b.svg index 444b0651f..68f1f01a3 100644 --- a/dev/generated/graphics/tikz_wiring_diagrams/15b04bc0.svg +++ b/dev/generated/graphics/tikz_wiring_diagrams/d6686d1b.svg @@ -2,48 +2,48 @@ - + - + - + - + - + - + - + - + - + - + - + - + diff --git a/dev/generated/graphics/tikz_wiring_diagrams/index.html b/dev/generated/graphics/tikz_wiring_diagrams/index.html index 720acbb87..0218712b5 100644 --- a/dev/generated/graphics/tikz_wiring_diagrams/index.html +++ b/dev/generated/graphics/tikz_wiring_diagrams/index.html @@ -9,66 +9,66 @@ - + - + - + - + - + - + - + - + - + -'/>
to_tikz(f⋅g, labels=true)
Example block output
to_tikz(f⊗g, labels=true, orientation=TopToBottom)
Example block output

Here is a more complex example, involving generators with compound domains and codomains.

h, k = Hom(:h, C, D),  Hom(:k, D, C)
+'/>
to_tikz(f⋅g, labels=true)
Example block output
to_tikz(f⊗g, labels=true, orientation=TopToBottom)
Example block output

Here is a more complex example, involving generators with compound domains and codomains.

h, k = Hom(:h, C, D),  Hom(:k, D, C)
 m, n = Hom(:m, B⊗A, A⊗B), Hom(:n, D⊗C, C⊗D)
 q = Hom(:l, A⊗B⊗C⊗D, D⊗C⊗B⊗A)
 
-to_tikz((f⊗g⊗h⊗k)⋅(m⊗n)⋅q⋅(n⊗m)⋅(h⊗k⊗f⊗g))
Example block output

Identities and braidings appear as wires.

to_tikz(id(A), labels=true)
- + - + - + - + - + @@ -77,35 +77,35 @@ - + - + - + - + - + - + - + - + - + @@ -114,32 +114,32 @@ - + - + - + - + - + - + - + @@ -149,25 +149,25 @@ '/>

The isomorphism $A \otimes B \otimes C \to C \otimes B \otimes A$ induced by the permutation $(3\ 2\ 1)$ is a composite of braidings and identities.

σ = (braid(A,B) ⊗ id(C)) ⋅ (id(B) ⊗ braid(A,C) ⋅ (braid(B,C) ⊗ id(A)))
 
 to_tikz(σ, arrowtip="Stealth", arrowtip_pos="-0.1pt",
-        labels=true, labels_pos="0.1pt")
Example block output

By default, anchor points are added along identity and braiding wires to reproduce the expression structure in the layout. The anchors can be disabled to get a more "unbiased" layout.

to_tikz(σ, anchor_wires=false, arrowtip="Stealth", arrowtip_pos="-0.1pt",
-        labels=true, labels_pos="0.1pt")
Example block output

Biproduct category

A, B, C = Ob(FreeBiproductCategory, :A, :B, :C)
+        labels=true, labels_pos="0.1pt")
Example block output

By default, anchor points are added along identity and braiding wires to reproduce the expression structure in the layout. The anchors can be disabled to get a more "unbiased" layout.

to_tikz(σ, anchor_wires=false, arrowtip="Stealth", arrowtip_pos="-0.1pt",
+        labels=true, labels_pos="0.1pt")
Example block output

Biproduct category

A, B, C = Ob(FreeBiproductCategory, :A, :B, :C)
 f = Hom(:f, A, B)
 
 to_tikz(mcopy(A), labels=true)
to_tikz(mcopy(A)⋅(f⊗f)⋅mmerge(B), labels=true)
Example block output
to_tikz(mcopy(A⊗B), orientation=TopToBottom, labels=true)
to_tikz(mcopy(A)⋅(f⊗f)⋅mmerge(B), labels=true)
Example block output
to_tikz(mcopy(A⊗B), orientation=TopToBottom, labels=true)
to_tikz(mcopy(A⊗B⊗C), orientation=TopToBottom, labels=true)
Example block output

Compact closed category

The unit and co-unit of a compact closed category appear as caps and cups.

A, B = Ob(FreeCompactClosedCategory, :A, :B)
+'/>
to_tikz(mcopy(A⊗B⊗C), orientation=TopToBottom, labels=true)
Example block output

Compact closed category

The unit and co-unit of a compact closed category appear as caps and cups.

A, B = Ob(FreeCompactClosedCategory, :A, :B)
 
 to_tikz(dunit(A), arrowtip="Stealth", labels=true)
- + - + @@ -390,10 +390,10 @@ - + - + @@ -402,10 +402,10 @@ '/>
to_tikz((mcopy(X)⊕mcopy(X)) ⋅ (id(X)⊕swap(X,X)⊕id(X)) ⋅ (plus(X)⊕plus(X)))
- + - + @@ -490,10 +490,10 @@ - + - + @@ -503,32 +503,32 @@ - + - + - + - + - + - + - + @@ -540,32 +540,32 @@ - + - + - + - + - + - + - + @@ -577,32 +577,32 @@ - + - + - + - + - + - + - + @@ -614,32 +614,32 @@ - + - + - + - + - + - + - + @@ -658,4 +658,4 @@ \path[wire] (root.west) to[out=0,in=-180] (n1.west); \path[wire] (n1.east) to[out=0,in=-180] (n2.west); \path[wire] (n2.east) to[out=0,in=180] (root.east); -\end{tikzpicture}
+\end{tikzpicture}
diff --git a/dev/generated/graphs/graphs.ipynb b/dev/generated/graphs/graphs.ipynb index abb5fc440..cdcd829d8 100644 --- a/dev/generated/graphs/graphs.ipynb +++ b/dev/generated/graphs/graphs.ipynb @@ -2071,11 +2071,11 @@ "file_extension": ".jl", "mimetype": "application/julia", "name": "julia", - "version": "1.10.4" + "version": "1.10.5" }, "kernelspec": { "name": "julia-1.10", - "display_name": "Julia 1.10.4", + "display_name": "Julia 1.10.5", "language": "julia" } }, diff --git a/dev/generated/graphs/graphs/index.html b/dev/generated/graphs/graphs/index.html index 683336010..ede7eb6bb 100644 --- a/dev/generated/graphs/graphs/index.html +++ b/dev/generated/graphs/graphs/index.html @@ -1122,4 +1122,4 @@
-'/> +'/> diff --git a/dev/generated/graphs/graphs_label.ipynb b/dev/generated/graphs/graphs_label.ipynb index 8949d15a2..962698487 100644 --- a/dev/generated/graphs/graphs_label.ipynb +++ b/dev/generated/graphs/graphs_label.ipynb @@ -2462,11 +2462,11 @@ "file_extension": ".jl", "mimetype": "application/julia", "name": "julia", - "version": "1.10.4" + "version": "1.10.5" }, "kernelspec": { "name": "julia-1.10", - "display_name": "Julia 1.10.4", + "display_name": "Julia 1.10.5", "language": "julia" } }, diff --git a/dev/generated/graphs/graphs_label/index.html b/dev/generated/graphs/graphs_label/index.html index 0b5456937..dbc09efe0 100644 --- a/dev/generated/graphs/graphs_label/index.html +++ b/dev/generated/graphs/graphs_label/index.html @@ -1139,4 +1139,4 @@
-'/> +'/> diff --git a/dev/generated/graphs/subgraphs.ipynb b/dev/generated/graphs/subgraphs.ipynb index bece0bad0..2aeb161fe 100644 --- a/dev/generated/graphs/subgraphs.ipynb +++ b/dev/generated/graphs/subgraphs.ipynb @@ -1544,11 +1544,11 @@ "file_extension": ".jl", "mimetype": "application/julia", "name": "julia", - "version": "1.10.4" + "version": "1.10.5" }, "kernelspec": { "name": "julia-1.10", - "display_name": "Julia 1.10.4", + "display_name": "Julia 1.10.5", "language": "julia" } }, diff --git a/dev/generated/graphs/subgraphs/index.html b/dev/generated/graphs/subgraphs/index.html index 8f4902c13..f3235b135 100644 --- a/dev/generated/graphs/subgraphs/index.html +++ b/dev/generated/graphs/subgraphs/index.html @@ -1158,4 +1158,4 @@
-'/> +'/> diff --git a/dev/generated/sketches/cat_elements.ipynb b/dev/generated/sketches/cat_elements.ipynb index 28a73e53b..303a362d0 100644 --- a/dev/generated/sketches/cat_elements.ipynb +++ b/dev/generated/sketches/cat_elements.ipynb @@ -1589,11 +1589,11 @@ "file_extension": ".jl", "mimetype": "application/julia", "name": "julia", - "version": "1.10.4" + "version": "1.10.5" }, "kernelspec": { "name": "julia-1.10", - "display_name": "Julia 1.10.4", + "display_name": "Julia 1.10.5", "language": "julia" } }, diff --git a/dev/generated/sketches/cat_elements/index.html b/dev/generated/sketches/cat_elements/index.html index 305eebe8d..194acdf9a 100644 --- a/dev/generated/sketches/cat_elements/index.html +++ b/dev/generated/sketches/cat_elements/index.html @@ -737,4 +737,4 @@
-'/>

As a very advanced exercise, you could try to implement one or both directions of the isomorphism above.

+'/>

As a very advanced exercise, you could try to implement one or both directions of the isomorphism above.

diff --git a/dev/generated/sketches/meets.ipynb b/dev/generated/sketches/meets.ipynb index cfb28cc41..66f25d736 100644 --- a/dev/generated/sketches/meets.ipynb +++ b/dev/generated/sketches/meets.ipynb @@ -575,7 +575,7 @@ { "output_type": "execute_result", "data": { - "text/plain": "Test.DefaultTestSet(\"Meets\", Any[], 6, false, false, true, 1.723821025351506e9, 1.72382102545984e9, false, \"/home/runner/work/Catlab.jl/Catlab.jl/docs/src/generated/sketches/meets.ipynb\")" + "text/plain": "Test.DefaultTestSet(\"Meets\", Any[], 6, false, false, true, 1.725051603298305e9, 1.72505160340709e9, false, \"/home/runner/work/Catlab.jl/Catlab.jl/docs/src/generated/sketches/meets.ipynb\")" }, "metadata": {}, "execution_count": 13 @@ -868,7 +868,7 @@ { "output_type": "execute_result", "data": { - "text/plain": "Test.DefaultTestSet(\"meets2\", Any[], 8, false, false, true, 1.723821025514412e9, 1.723821025514598e9, false, \"/home/runner/work/Catlab.jl/Catlab.jl/docs/src/generated/sketches/meets.ipynb\")" + "text/plain": "Test.DefaultTestSet(\"meets2\", Any[], 8, false, false, true, 1.725051603461309e9, 1.72505160346149e9, false, \"/home/runner/work/Catlab.jl/Catlab.jl/docs/src/generated/sketches/meets.ipynb\")" }, "metadata": {}, "execution_count": 17 @@ -914,11 +914,11 @@ "file_extension": ".jl", "mimetype": "application/julia", "name": "julia", - "version": "1.10.4" + "version": "1.10.5" }, "kernelspec": { "name": "julia-1.10", - "display_name": "Julia 1.10.4", + "display_name": "Julia 1.10.5", "language": "julia" } }, diff --git a/dev/generated/sketches/meets/index.html b/dev/generated/sketches/meets/index.html index 0aad6c620..ab54c8784 100644 --- a/dev/generated/sketches/meets/index.html +++ b/dev/generated/sketches/meets/index.html @@ -226,7 +226,7 @@ @test meet(g, 1, 4) == 1 @test meet(g, 1, 1) == 1 @test meet(g, 2, 2) == 2 -end
Test.DefaultTestSet("Meets", Any[], 6, false, false, true, 1.723821092260594e9, 1.723821092310903e9, false, "meets.md")

Another Example:

@present P(FreeSchema) begin
+end
Test.DefaultTestSet("Meets", Any[], 6, false, false, true, 1.725051668685984e9, 1.725051668733502e9, false, "meets.md")

Another Example:

@present P(FreeSchema) begin
   (a₁,a₂,a₃,a₄, a₅)::Ob
   f::Hom(a₁, a₂)
   g::Hom(a₁, a₃)
@@ -395,4 +395,4 @@ 

Test suite @test meet(g, 2, 2) == 2 @test meet(g, 3, 5) == nothing @test meet(g, 2, 5) == 5 -end

Test.DefaultTestSet("meets2", Any[], 8, false, false, true, 1.72382109237246e9, 1.723821092372633e9, false, "meets.md")

Exercise 3

Make bigger preorders to test corner cases in the above code. If you find an example that breaks these implementations, please report it.

Exercise 4

Implement the dual constructions for joins.

+end
Test.DefaultTestSet("meets2", Any[], 8, false, false, true, 1.725051668793645e9, 1.725051668793813e9, false, "meets.md")

Exercise 3

Make bigger preorders to test corner cases in the above code. If you find an example that breaks these implementations, please report it.

Exercise 4

Implement the dual constructions for joins.

diff --git a/dev/generated/sketches/partitions.ipynb b/dev/generated/sketches/partitions.ipynb index 2d6687bba..50d99f44c 100644 --- a/dev/generated/sketches/partitions.ipynb +++ b/dev/generated/sketches/partitions.ipynb @@ -225,59 +225,59 @@ "\n", "\n", "\n", - "\n", + "\n", "\n", "\n", - "\n", + "\n", "\n", "\n", - "\n", + "\n", "\n", "\n", - "\n", + "\n", "\n", "\n", - "\n", + "\n", "\n", "\n", - "\n", + "\n", "\n", "\n", - "\n", + "\n", "\n", "\n", - "\n", + "\n", "\n", "\n", "\n", "\n", "\n", "\n", - " \n", + " \n", "\n", "\n", - " \n", + " \n", "\n", "\n", - " \n", + " \n", "\n", "\n", "\n", "\n", "\n", - " \n", + " \n", "\n", "\n", "\n", "\n", "\n", - " \n", + " \n", "\n", "\n", "\n", "\n", "\n", - " \n", + " \n", "\n", "\n", "\n", @@ -417,129 +417,129 @@ "\n", "\n", "\n", - "\n", + "\n", "\n", "\n", - "\n", + "\n", "\n", "\n", - "\n", + "\n", "\n", "\n", - "\n", + "\n", "\n", "\n", - "\n", + "\n", "\n", "\n", - "\n", + "\n", "\n", "\n", - "\n", + "\n", "\n", "\n", - "\n", + "\n", "\n", "\n", - "\n", + "\n", "\n", "\n", - "\n", + "\n", "\n", "\n", - "\n", + "\n", "\n", "\n", - "\n", + "\n", "\n", "\n", - "\n", + "\n", "\n", "\n", - "\n", + "\n", "\n", "\n", - "\n", + "\n", "\n", "\n", "\n", "\n", "\n", "\n", - " \n", + " \n", "\n", "\n", - " \n", + " \n", "\n", "\n", - " \n", + " \n", "\n", "\n", - " \n", + " \n", "\n", "\n", - " \n", + " \n", "\n", "\n", "\n", "\n", - " \n", + " \n", "\n", "\n", "\n", "\n", "\n", - " \n", + " \n", "\n", "\n", "\n", "\n", "\n", - " \n", + " \n", "\n", "\n", "\n", "\n", - " \n", + " \n", "\n", "\n", - " \n", + " \n", "\n", "\n", "\n", "\n", "\n", - " \n", + " \n", "\n", "\n", - " \n", + " \n", "\n", "\n", - " \n", + " \n", "\n", "\n", - " \n", + " \n", "\n", "\n", - " \n", + " \n", "\n", "\n", - " \n", + " \n", "\n", "\n", - " \n", + " \n", "\n", "\n", - " \n", + " \n", "\n", "\n", - " \n", + " \n", "\n", "\n", - " \n", + " \n", "\n", "\n", - " \n", + " \n", "\n", "\n", "\n", @@ -577,11 +577,11 @@ "file_extension": ".jl", "mimetype": "application/julia", "name": "julia", - "version": "1.10.4" + "version": "1.10.5" }, "kernelspec": { "name": "julia-1.10", - "display_name": "Julia 1.10.4", + "display_name": "Julia 1.10.5", "language": "julia" } }, diff --git a/dev/generated/sketches/partitions/a70dadc0.svg b/dev/generated/sketches/partitions/15f23b31.svg similarity index 92% rename from dev/generated/sketches/partitions/a70dadc0.svg rename to dev/generated/sketches/partitions/15f23b31.svg index 680805727..0154efcbc 100644 --- a/dev/generated/sketches/partitions/a70dadc0.svg +++ b/dev/generated/sketches/partitions/15f23b31.svg @@ -2,59 +2,59 @@ - + - + - + - + - + - + - + - + - + - + - + - + - + - + diff --git a/dev/generated/sketches/partitions/a7f33ee2.svg b/dev/generated/sketches/partitions/51657d3e.svg similarity index 87% rename from dev/generated/sketches/partitions/a7f33ee2.svg rename to dev/generated/sketches/partitions/51657d3e.svg index c349d1c84..0f5fa798d 100644 --- a/dev/generated/sketches/partitions/a7f33ee2.svg +++ b/dev/generated/sketches/partitions/51657d3e.svg @@ -2,129 +2,129 @@ - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + diff --git a/dev/generated/sketches/partitions/index.html b/dev/generated/sketches/partitions/index.html index 6e11c8f8d..1c5f23089 100644 --- a/dev/generated/sketches/partitions/index.html +++ b/dev/generated/sketches/partitions/index.html @@ -34,7 +34,7 @@ \arrow["g"', two heads, from=1-1, to=3-4] """; -TikzCD(triangle, preamble=TikzCDs.Styles.Quiver)Example block output

Let's take a look at an example:

A = FinSet(4)
+TikzCD(triangle, preamble=TikzCDs.Styles.Quiver)
Example block output

Let's take a look at an example:

A = FinSet(4)
 Q = FinSet(3)
 P = FinSet(2)
 
@@ -69,4 +69,4 @@
 \arrow["{f\cdot h\cdot h^\prime = g\cdot h^\prime}"', two heads, from=1-1, to=5-4]
 """;
 
-TikzCD(refinement, preamble=TikzCDs.Styles.Quiver)
Example block output +TikzCD(refinement, preamble=TikzCDs.Styles.Quiver)Example block output diff --git a/dev/generated/sketches/preorders.ipynb b/dev/generated/sketches/preorders.ipynb index a6285aef7..d2b2c1779 100644 --- a/dev/generated/sketches/preorders.ipynb +++ b/dev/generated/sketches/preorders.ipynb @@ -667,11 +667,11 @@ "file_extension": ".jl", "mimetype": "application/julia", "name": "julia", - "version": "1.10.4" + "version": "1.10.5" }, "kernelspec": { "name": "julia-1.10", - "display_name": "Julia 1.10.4", + "display_name": "Julia 1.10.5", "language": "julia" } }, diff --git a/dev/generated/sketches/preorders/index.html b/dev/generated/sketches/preorders/index.html index d83a53b06..414e4da7b 100644 --- a/dev/generated/sketches/preorders/index.html +++ b/dev/generated/sketches/preorders/index.html @@ -136,4 +136,4 @@ Fₒ = Dict(:X=>:a, :Y=>:b, :Z=>:c) Fₕ = Dict(:f=>:ab, :g=>[:bc, :cd]) F = FinFunctor(Fₒ, Fₕ, P, Q) -@test !is_functorial(F)
Test Passed

Monotone maps are functors for thin categories. One of the benefits of category theory is that we find abstractions that work in multiple domains. The abstraction of preserving the domains and codomains of morphisms is a key abstraction that we can use to define many notions in mathematics.

+@test !is_functorial(F)
Test Passed

Monotone maps are functors for thin categories. One of the benefits of category theory is that we find abstractions that work in multiple domains. The abstraction of preserving the domains and codomains of morphisms is a key abstraction that we can use to define many notions in mathematics.

diff --git a/dev/generated/sketches/smc.ipynb b/dev/generated/sketches/smc.ipynb index 3a99e6412..9f1d814ed 100644 --- a/dev/generated/sketches/smc.ipynb +++ b/dev/generated/sketches/smc.ipynb @@ -1092,11 +1092,11 @@ "file_extension": ".jl", "mimetype": "application/julia", "name": "julia", - "version": "1.10.4" + "version": "1.10.5" }, "kernelspec": { "name": "julia-1.10", - "display_name": "Julia 1.10.4", + "display_name": "Julia 1.10.5", "language": "julia" } }, diff --git a/dev/generated/sketches/smc/index.html b/dev/generated/sketches/smc/index.html index 1f4cf19f0..b3a9122ee 100644 --- a/dev/generated/sketches/smc/index.html +++ b/dev/generated/sketches/smc/index.html @@ -395,4 +395,4 @@
-'/>

You can visualize the copy and delete morphisms explicitly with the add_junctions function. The dots with one wire input and multiple outputs are copying values and dots with no wires out are deletions (discarding values). Not all instances of a SymmetricMonoidalCategory support copy and delete, for example, in manufacturing you can't duplicate a resource, and in chemistry you can't discard species. Catlab would enforce that when you tried to interpret the wiring diagram in a specific SMC.

draw(add_junctions(recipe))
Example block output

For more details about working with wiring diagrams in Catlab, you should look at the vignettes under wiring_diagrams which explain how wiring diagrams interact with SMC expressions and the basics of constructing and manipulation wiring diagrams.

+'/>

You can visualize the copy and delete morphisms explicitly with the add_junctions function. The dots with one wire input and multiple outputs are copying values and dots with no wires out are deletions (discarding values). Not all instances of a SymmetricMonoidalCategory support copy and delete, for example, in manufacturing you can't duplicate a resource, and in chemistry you can't discard species. Catlab would enforce that when you tried to interpret the wiring diagram in a specific SMC.

draw(add_junctions(recipe))
Example block output

For more details about working with wiring diagrams in Catlab, you should look at the vignettes under wiring_diagrams which explain how wiring diagrams interact with SMC expressions and the basics of constructing and manipulation wiring diagrams.

diff --git a/dev/generated/wiring_diagrams/diagrams_and_expressions.ipynb b/dev/generated/wiring_diagrams/diagrams_and_expressions.ipynb index 0eb33b577..e6fb45f6d 100644 --- a/dev/generated/wiring_diagrams/diagrams_and_expressions.ipynb +++ b/dev/generated/wiring_diagrams/diagrams_and_expressions.ipynb @@ -602,11 +602,11 @@ "file_extension": ".jl", "mimetype": "application/julia", "name": "julia", - "version": "1.10.4" + "version": "1.10.5" }, "kernelspec": { "name": "julia-1.10", - "display_name": "Julia 1.10.4", + "display_name": "Julia 1.10.5", "language": "julia" } }, diff --git a/dev/generated/wiring_diagrams/diagrams_and_expressions/index.html b/dev/generated/wiring_diagrams/diagrams_and_expressions/index.html index 24107e8d4..b5a72ef47 100644 --- a/dev/generated/wiring_diagrams/diagrams_and_expressions/index.html +++ b/dev/generated/wiring_diagrams/diagrams_and_expressions/index.html @@ -241,4 +241,4 @@
-'/>
roundtrip_expr(expr)

\[\left(\Delta_{A} \otimes \Delta_{B}\right) \cdot \left(\mathrm{id}_{A} \otimes \sigma_{A,B} \otimes \mathrm{id}_{B}\right) : A \otimes B \to A \otimes B \otimes A \otimes B\]

The equation just witnessed,

\[\Delta_{A \otimes B} = (\Delta_A \otimes \Delta_B) \cdot (1_A \otimes \sigma_{A,B} \otimes 1_B),\]

is one of the coherence laws for cartesian products (arXiv:0908.3347, Table 7). Another coherence law for products is

\[\lozenge_{A \otimes B} = \lozenge_A \otimes \lozenge_B.\]

expr = delete(A ⊗ B)

\[\lozenge_{A \otimes B} : A \otimes B \to I\]

roundtrip_expr(expr)

\[\lozenge_{A} \otimes \lozenge_{B} : A \otimes B \to I\]

+'/>
roundtrip_expr(expr)

\[\left(\Delta_{A} \otimes \Delta_{B}\right) \cdot \left(\mathrm{id}_{A} \otimes \sigma_{A,B} \otimes \mathrm{id}_{B}\right) : A \otimes B \to A \otimes B \otimes A \otimes B\]

The equation just witnessed,

\[\Delta_{A \otimes B} = (\Delta_A \otimes \Delta_B) \cdot (1_A \otimes \sigma_{A,B} \otimes 1_B),\]

is one of the coherence laws for cartesian products (arXiv:0908.3347, Table 7). Another coherence law for products is

\[\lozenge_{A \otimes B} = \lozenge_A \otimes \lozenge_B.\]

expr = delete(A ⊗ B)

\[\lozenge_{A \otimes B} : A \otimes B \to I\]

roundtrip_expr(expr)

\[\lozenge_{A} \otimes \lozenge_{B} : A \otimes B \to I\]

diff --git a/dev/generated/wiring_diagrams/wd_cset.ipynb b/dev/generated/wiring_diagrams/wd_cset.ipynb index 49d01c9bf..6946a22db 100644 --- a/dev/generated/wiring_diagrams/wd_cset.ipynb +++ b/dev/generated/wiring_diagrams/wd_cset.ipynb @@ -2802,11 +2802,11 @@ "file_extension": ".jl", "mimetype": "application/julia", "name": "julia", - "version": "1.10.4" + "version": "1.10.5" }, "kernelspec": { "name": "julia-1.10", - "display_name": "Julia 1.10.4", + "display_name": "Julia 1.10.5", "language": "julia" } }, diff --git a/dev/generated/wiring_diagrams/wd_cset/index.html b/dev/generated/wiring_diagrams/wd_cset/index.html index 631afa823..1d2edae55 100644 --- a/dev/generated/wiring_diagrams/wd_cset/index.html +++ b/dev/generated/wiring_diagrams/wd_cset/index.html @@ -1637,4 +1637,4 @@

« Wiring diagrams and syntactic expressionsDrawing graphs in Graphviz »
+'/>

Almost every application of graphs in computer science could be better served by using one of these extensions to the basic graph data structure.

diff --git a/dev/generated/wiring_diagrams/wiring_diagram_basics.ipynb b/dev/generated/wiring_diagrams/wiring_diagram_basics.ipynb index 1ecac515e..7d3f8cd89 100644 --- a/dev/generated/wiring_diagrams/wiring_diagram_basics.ipynb +++ b/dev/generated/wiring_diagrams/wiring_diagram_basics.ipynb @@ -966,11 +966,11 @@ "file_extension": ".jl", "mimetype": "application/julia", "name": "julia", - "version": "1.10.4" + "version": "1.10.5" }, "kernelspec": { "name": "julia-1.10", - "display_name": "Julia 1.10.4", + "display_name": "Julia 1.10.5", "language": "julia" } }, diff --git a/dev/generated/wiring_diagrams/wiring_diagram_basics/index.html b/dev/generated/wiring_diagrams/wiring_diagram_basics/index.html index 3da878d41..4c843cb15 100644 --- a/dev/generated/wiring_diagrams/wiring_diagram_basics/index.html +++ b/dev/generated/wiring_diagrams/wiring_diagram_basics/index.html @@ -506,4 +506,4 @@ -'/> +'/> diff --git a/dev/index.html b/dev/index.html index cefed338c..78cb8b40a 100644 --- a/dev/index.html +++ b/dev/index.html @@ -20,4 +20,4 @@ x2::Int end

That is, we assume that all subtypes of a certain abstract types have the same field names, and are organized in roughly the same way. There is no way of enforcing this within Julia, so instead we leave a comment on the abstract type to document that we are working this way.

Note that this is contrary to the standard wisdom in Julia that one should as much as possible access structs through methods, not field accesses. The reason why we do not do this here is twofold. First of all, sometimes it can be annoying to write out the trivial field-access methods in addition to defining the struct. For instance, we have 12 different structs in src/acsets/ColumnImplementations.jl that all are subtypes of an Abstract Field Convention abstract type. It would be 24 lines of boilerplate to write out the field accessors for these types with little appreciable benefit. The second reason is that the Abstract Field Convention is a stronger guarantee than an interface: we are claiming that any subtype has precisely these fields in this order, and no others! This is essential for defining methods like copy, which might be defined as follows.

function copy(p::T) where {T<:Pair}
   T(p.x1, p.x2)
-end

So the Abstract Field Convention is stronger than a normal interface. It's not really about encapsulating data, it's more about cutting down on long names in debug messages.

Table of Contents

+end

So the Abstract Field Convention is stronger than a normal interface. It's not really about encapsulating data, it's more about cutting down on long names in debug messages.

Table of Contents