From 61be0c98ebf01759839b01ec22e36a351b51d3d6 Mon Sep 17 00:00:00 2001 From: "James D. Mitchell" Date: Wed, 27 Mar 2024 15:10:37 +0000 Subject: [PATCH] Add IsModularLatticeDigraph --- gap/prop.gd | 1 + gap/prop.gi | 21 +++++++++++++++------ 2 files changed, 16 insertions(+), 6 deletions(-) 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);