laws: (==) iff they are relabellings of each other

This commit is contained in:
hi 2025-08-16 08:58:22 +00:00
parent b0e98b0e51
commit 550e589bc8
2 changed files with 12 additions and 3 deletions

View file

@ -1,7 +1,7 @@
module Logic.Statement.Laws where
import Logic.Parse (eof, mkInput)
import Logic.Statement (Statement(..))
import Logic.Statement (Statement(..), relabellings)
import Logic.Statement.Parse (stmt)
import Logic.Statement.Serialize (serialize, SerializeFormat(Plain))
import Logic.Graph (bfs, verifyPath, VerifyPathError)
@ -20,8 +20,8 @@ data Law = Law
instance Eq Law where
law1 == law2 =
lawLhs law1 == lawLhs law2
&& lawRhs law1 == lawRhs law2
relabellings (lawLhs law1) (lawLhs law2)
&& relabellings (lawRhs law1) (lawRhs law2)
instance Show Law where
show law =