Skip to content

Commit

Permalink
Add IsModularLatticeDigraph
Browse files Browse the repository at this point in the history
  • Loading branch information
james-d-mitchell committed Mar 27, 2024
1 parent 397225b commit 61be0c9
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 6 deletions.
1 change: 1 addition & 0 deletions gap/prop.gd
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ DeclareProperty("IsJoinSemilatticeDigraph", IsDigraph);
DeclareProperty("IsMeetSemilatticeDigraph", IsDigraph);
DeclareProperty("IsPermutationDigraph", IsDigraph);
DeclareProperty("IsDistributiveLatticeDigraph", IsDigraph);
DeclareProperty("IsModularLatticeDigraph", IsDigraph);
DeclareSynonymAttr("IsLatticeDigraph",
IsMeetSemilatticeDigraph and IsJoinSemilatticeDigraph);
DeclareSynonymAttr("IsPreorderDigraph",
Expand Down
21 changes: 15 additions & 6 deletions gap/prop.gi
Original file line number Diff line number Diff line change
Expand Up @@ -661,19 +661,28 @@ end);

InstallMethod(IsDistributiveLatticeDigraph, "for a digraph", [IsDigraph],
function(D)
local N5, M3;
local M3;

if not IsLatticeDigraph(D) then
return false;
fi;

N5 := DigraphReflexiveTransitiveClosure(
Digraph([[2, 4], [3], [5], [5], []]));
M3 := DigraphReflexiveTransitiveClosure(
Digraph([[2, 3, 4], [5], [5], [5], []]));

if LatticeDigraphEmbedding(N5, D) <> fail or
LatticeDigraphEmbedding(M3, D) <> fail then
return IsModularLatticeDigraph(D) and
LatticeDigraphEmbedding(M3, D) = fail;
end);

InstallMethod(IsModularLatticeDigraph, "for a digraph", [IsDigraph],
function(D)
local N5;
if not IsLatticeDigraph(D) then
return false;
fi;
return true;

N5 := DigraphReflexiveTransitiveClosure(
Digraph([[2, 4], [3], [5], [5], []]));

return LatticeDigraphEmbedding(N5, D) = fail;
end);

0 comments on commit 61be0c9

Please sign in to comment.