diff --git a/gap/prop.gd b/gap/prop.gd index e58a20579..553c683fb 100644 --- a/gap/prop.gd +++ b/gap/prop.gd @@ -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", diff --git a/gap/prop.gi b/gap/prop.gi index 0f4fd0d18..33b0b2660 100644 --- a/gap/prop.gi +++ b/gap/prop.gi @@ -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);