Skip to content

Commit

Permalink
prop.gd: add "condition true → property false" implications
Browse files Browse the repository at this point in the history
  • Loading branch information
wilfwilson committed Nov 22, 2021
1 parent fd6bba1 commit 2f59a34
Show file tree
Hide file tree
Showing 2 changed files with 44 additions and 2 deletions.
42 changes: 42 additions & 0 deletions gap/prop.gd
Original file line number Diff line number Diff line change
Expand Up @@ -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);
4 changes: 2 additions & 2 deletions tst/standard/prop.tst
Original file line number Diff line number Diff line change
@@ -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.
Expand Down Expand Up @@ -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], []]);
Expand Down

0 comments on commit 2f59a34

Please sign in to comment.