From 2f59a3471e7cd78ef2b449d728b94b87c4f4c30e Mon Sep 17 00:00:00 2001 From: Wilf Wilson Date: Mon, 22 Nov 2021 17:30:32 +0000 Subject: [PATCH] =?UTF-8?q?prop.gd:=20add=20"condition=20true=20=E2=86=92?= =?UTF-8?q?=20property=20false"=20implications?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- gap/prop.gd | 42 ++++++++++++++++++++++++++++++++++++++++++ tst/standard/prop.tst | 4 ++-- 2 files changed, 44 insertions(+), 2 deletions(-) diff --git a/gap/prop.gd b/gap/prop.gd index fa1a51fc7..550d28ffa 100644 --- a/gap/prop.gd +++ b/gap/prop.gd @@ -108,3 +108,45 @@ InstallTrueMethod(IsNonemptyDigraph, IsDigraph and DigraphHasLoops); InstallTrueMethod(DigraphHasLoops, IsReflexiveDigraph and DigraphHasAVertex); InstallTrueMethod(DigraphHasAVertex, IsDigraph and IsNonemptyDigraph); InstallTrueMethod(DigraphHasAVertex, IsDigraph and IsDirectedTree); + +# Implications that something is false + +InstallTrueMethod(HasDigraphHasLoops, IsAcyclicDigraph); +InstallTrueMethod(HasDigraphHasLoops, IsTournament); +InstallTrueMethod(HasDigraphHasLoops, IsUndirectedForest); +InstallTrueMethod(HasDigraphHasLoops, IsDirectedTree); +InstallTrueMethod(HasDigraphHasLoops, IsEmptyDigraph); +InstallTrueMethod(HasDigraphHasLoops, IsCompleteDigraph and IsNonemptyDigraph); +InstallTrueMethod(HasDigraphHasLoops, IsBipartiteDigraph); + +# The following are usually redundant because of immediate methods +InstallTrueMethod(HasIsNonemptyDigraph, IsEmptyDigraph); +InstallTrueMethod(HasIsEmptyDigraph, IsDigraph and IsNonemptyDigraph); +InstallTrueMethod(HasDigraphHasAVertex, DigraphHasNoVertices); +InstallTrueMethod(HasDigraphHasNoVertices, DigraphHasAVertex); + +InstallTrueMethod(HasIsAcyclicDigraph, IsCompleteDigraph and IsNonemptyDigraph); +InstallTrueMethod(HasIsAcyclicDigraph, IsDigraph and DigraphHasLoops); +InstallTrueMethod(HasIsAcyclicDigraph, + IsStronglyConnectedDigraph and IsNonemptyDigraph); +InstallTrueMethod(HasIsAntisymmetricDigraph, + IsCompleteDigraph and IsNonemptyDigraph); +InstallTrueMethod(HasIsChainDigraph, IsDigraph and DigraphHasLoops); +InstallTrueMethod(HasIsChainDigraph, IsSymmetricDigraph and IsNonemptyDigraph); +InstallTrueMethod(HasIsCompleteDigraph, IsDigraph and DigraphHasLoops); +InstallTrueMethod(HasIsReflexiveDigraph, + IsAcyclicDigraph and DigraphHasAVertex); + +InstallTrueMethod(HasIsSymmetricDigraph, IsAcyclicDigraph + and IsNonemptyDigraph); +InstallTrueMethod(HasIsSymmetricDigraph, IsDirectedTree and IsNonemptyDigraph); +InstallTrueMethod(HasIsSymmetricDigraph, IsTournament and IsNonemptyDigraph); + +InstallTrueMethod(HasIsMultiDigraph, IsChainDigraph); +InstallTrueMethod(HasIsMultiDigraph, IsCompleteDigraph); +InstallTrueMethod(HasIsMultiDigraph, IsCompleteMultipartiteDigraph); +InstallTrueMethod(HasIsMultiDigraph, IsCycleDigraph); +InstallTrueMethod(HasIsMultiDigraph, IsEmptyDigraph); +InstallTrueMethod(HasIsMultiDigraph, IsFunctionalDigraph); +InstallTrueMethod(HasIsMultiDigraph, IsTournament); +InstallTrueMethod(HasIsMultiDigraph, IsUndirectedForest); diff --git a/tst/standard/prop.tst b/tst/standard/prop.tst index 9540440d3..b5fec84a7 100644 --- a/tst/standard/prop.tst +++ b/tst/standard/prop.tst @@ -1,7 +1,7 @@ ############################################################################# ## #W standard/prop.tst -#Y Copyright (C) 2014-17 James D. Mitchell +#Y Copyright (C) 2014-21 James D. Mitchell ## Wilf A. Wilson ## ## Licensing information can be found in the README file of this package. @@ -139,7 +139,7 @@ gap> gr := Digraph([[1]]);; gap> DigraphHasLoops(gr); true gap> HasIsAcyclicDigraph(gr); -false +true gap> IsAcyclicDigraph(gr); false gap> gr := Digraph([[2], []]);