Skip to content
Closed

Gis #1203

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 32 additions & 0 deletions doc/congsemigraph.xml
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,38 @@ gap> AsCongruenceByWangPair(cong);
</ManSection>
<#/GAPDoc>

<#GAPDoc Label="TraceOfCongruenceByWangPair">
<ManSection>
<Oper Name = "TraceOfCongruenceByWangPair" Arg = "cong"/>
<Returns>The trace of congruence by Wang pair.</Returns>
<Description>
This operation takes <A>cong</A>, a finite graph inverse semigroup
congruence represented by a Wang pair <P/>, and returns an object
representing the trace of <A>cong</A>. <Ref Attr="IsCongruenceByWangPair"/>
<Example><![CDATA[
gap> D := Digraph([[2, 3], [3], [4], []]);
<immutable digraph with 4 vertices, 4 edges>
gap> S := GraphInverseSemigroup(D);
<finite graph inverse semigroup with 4 vertices, 4 edges>
gap> cong := CongruenceByWangPair(S, [4], [2]);
<graph inverse semigroup congruence with H = [ 4 ] and W = [ 2 ]>
gap> tr := TraceOfCongruenceByWangPair(cong);
<trace of graph inverse semigroup congruence with H = [ 4 ] and W = [ 2 ]>
gap> a := S.2 * S.4 * S.4 ^ -1 * S.2 ^ -1;
e_2e_4e_4^-1e_2^-1
gap> ImagesElm(tr, a);
[ 0, v_4, e_4e_4^-1, e_2e_4e_4^-1e_2^-1, e_3e_4e_4^-1e_3^-1, e_1e_3e_4e_4^-1e_3^-1e_1^-1 ]
gap> b := S.8;
v_4
gap> CongruenceTestMembershipNC(tr, a, b);
true
gap> EquivalenceRelationPartition(tr);
[ [ 0, v_4, e_4e_4^-1, e_2e_4e_4^-1e_2^-1, e_3e_4e_4^-1e_3^-1, e_1e_3e_4e_4^-1e_3^-1e_1^-1 ], [ v_2, e_3e_3^-1 ], [ e_1e_1^-1, e_1e_3e_3^-1e_1^-1 ] ]
]]></Example>
</Description>
</ManSection>
<#/GAPDoc>

<#GAPDoc Label="GeneratingCongruencesOfLattice">
<ManSection>
<Attr Name = "GeneratingCongruencesOfLattice" Arg = "S"/>
Expand Down
77 changes: 74 additions & 3 deletions doc/semigraph.xml
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ gap> GraphOfGraphInverseSemigroup(S);

<#GAPDoc Label="IsGraphInverseSemigroupElementCollection">
<ManSection>
<Filt Name="IsGraphInverseSemigroupElementCollection" Type="category"/>
<Filt Name="IsGraphInverseSemigroupElementCollection" Type="Category"/>
<Description>
Every collection of elements of a graph inverse semigroup belongs to the
category <C>IsGraphInverseSemigroupElementCollection</C>. For example,
Expand Down Expand Up @@ -258,8 +258,8 @@ gap> VerticesOfGraphInverseSemigroup(S);
<Returns>A positive integer.</Returns>
<Description>
If <A>v</A> is a vertex of a graph inverse semigroup (i.e. it satisfies
<Ref Filt="IsGraphInverseSemigroupElement"/>), then this attribute returns
the index of this vertex in its graph inverse semigroup.<P/>
<Ref Filt="IsGraphInverseSemigroupElement"/>), then this attribute returns the
index of this vertex in <A>S</A>.<P/>

<Example><![CDATA[
gap> D := Digraph([[3, 4], [3, 4], [4], []]);
Expand All @@ -273,3 +273,74 @@ gap> IndexOfVertexOfGraphInverseSemigroup(v_3);
</Description>
</ManSection>
<#/GAPDoc>

<#GAPDoc Label="EdgesWithRange">
<ManSection>
<Attr Name="EdgesWithRange" Arg="x"/>
<Returns>A list of graph inverse semigroup elements.</Returns>
<Description>
If <A>x</A> is a vertex of a graph inverse semigroup (i.e. it satisfies
<Ref Filt="IsGraphInverseSemigroupElement"/>), then this attribute returns a list
of all edges <A>e</A> such that <A>Range(e)=x</A>. If <A>x</A> is not a vertex
then it returns all edges with range <A>Source(x)</A>.
</Description>
</ManSection>
<#/GAPDoc>

<#GAPDoc Label="PathsWithRange">
<ManSection>
<Attr Name="PathsWithRange" Arg="x"/>
<Returns>A list of graph inverse semigroup elements.</Returns>
<Description>
If <A>x</A> is a vertex of a graph inverse semigroup (i.e. it satisfies
<Ref Filt="IsGraphInverseSemigroupElement"/>), then this attribute returns a list
of all paths (products of edges) <A>p</A> such that <A>Range(p)=x</A>, including
vertices as paths of length 0. If <A>x</A> is not a vertex then it returns all
paths with range <A>Source(x)</A>.
</Description>
</ManSection>
<#/GAPDoc>

<#GAPDoc Label="EdgesWithSource">
<ManSection>
<Attr Name="EdgesWithSource" Arg="x"/>
<Returns>A list of graph inverse semigroup elements.</Returns>
<Description>
If <A>x</A> is a vertex of a graph inverse semigroup (i.e. it satisfies
<Ref Filt="IsGraphInverseSemigroupElement"/>), then this attribute returns a list
of all edges <A>e</A> such that <A>Source(e)=x</A>. If <A>x</A> is not a vertex
then it returns all edges with source <A>Range(x)</A>.
</Description>
</ManSection>
<#/GAPDoc>

<#GAPDoc Label="PathsWithSource">
<ManSection>
<Attr Name="PathsWithSource" Arg="x"/>
<Returns>A list of graph inverse semigroup elements.</Returns>
<Description>
If <A>x</A> is a vertex of a graph inverse semigroup (i.e. it satisfies
<Ref Filt="IsGraphInverseSemigroupElement"/>), then this attribute returns a list
of all paths (products of edges) <A>p</A> such that <A>Source(p)=x</A>, including
vertices as paths of length 0. If <A>x</A> is not a vertex then it returns all
paths with source <A>Range(x)</A>.
<Example><![CDATA[
gap> D := Digraph([[2, 3], [3, 4], [4], []]);
<immutable digraph with 4 vertices, 5 edges>
gap> S := GraphInverseSemigroup(D);
<finite graph inverse semigroup with 4 vertices, 5 edges>
gap> EdgesWithRange(VerticesOfGraphInverseSemigroup(G)[4]);
Error, Variable: 'G' must have a value
not in any function at *stdin*:3
gap> EdgesWithRange(VerticesOfGraphInverseSemigroup(S)[4]);
[ e_4, e_5 ]
gap> PathsWithRange(VerticesOfGraphInverseSemigroup(S)[4]);
[ v_4, e_4, e_1e_4, e_5, e_2e_5, e_3e_5, e_1e_3e_5 ]
gap> EdgesWithSource(VerticesOfGraphInverseSemigroup(S)[2]);
[ e_3, e_4 ]
gap> PathsWithSource(VerticesOfGraphInverseSemigroup(S)[2]);
[ v_2, e_3, e_3e_5, e_4 ]
]]></Example>
</Description>
</ManSection>
<#/GAPDoc>
5 changes: 5 additions & 0 deletions doc/z-chap07.xml
Original file line number Diff line number Diff line change
Expand Up @@ -248,6 +248,11 @@
<#Include Label = "IsGraphInverseSubsemigroup">
<#Include Label = "VerticesOfGraphInverseSemigroup">
<#Include Label = "IndexOfVertexOfGraphInverseSemigroup">
<#Include Label = "EdgesWithRange">
<#Include Label = "EdgesWithSource">
<#Include Label = "PathsWithRange">
<#Include Label = "PathsWithSource">


</Section>

Expand Down
16 changes: 15 additions & 1 deletion gap/congruences/congsemigraph.gd
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,20 @@ DeclareOperation("CongruenceByWangPair",
DeclareOperation("AsCongruenceByWangPair", [IsSemigroupCongruence]);

DeclareOperation("MinimalHereditarySubsetsVertex",
[IsGraphInverseSemigroup, IsPosInt]);
[IsDigraph, IsPosInt]);

DeclareAttribute("GeneratingCongruencesOfLattice", IsGraphInverseSemigroup);

DeclareCategory("IsTraceOfCongruenceByWangPair",
IsSemigroupCongruence
and CanComputeEquivalenceRelationPartition
and IsMagmaCongruence
and IsAttributeStoringRep
and IsFinite);

DeclareAttribute("TraceOfCongruenceByWangPair", IsCongruenceByWangPair);

DeclareAttribute("EdgesWithRange", IsGraphInverseSemigroupElement);
DeclareAttribute("EdgesWithSource", IsGraphInverseSemigroupElement);
DeclareOperation("PathsWithRange", [IsGraphInverseSemigroupElement]);
DeclareOperation("PathsWithSource", [IsGraphInverseSemigroupElement]);
Loading
Loading