8.17/3.66 YES 10.13/4.18 proof of /export/starexec/sandbox/benchmark/theBenchmark.hs 10.13/4.18 # AProVE Commit ID: 48fb2092695e11cc9f56e44b17a92a5f88ffb256 marcel 20180622 unpublished dirty 10.13/4.18 10.13/4.18 10.13/4.18 H-Termination with start terms of the given HASKELL could be proven: 10.13/4.18 10.13/4.18 (0) HASKELL 10.13/4.18 (1) BR [EQUIVALENT, 0 ms] 10.13/4.18 (2) HASKELL 10.13/4.18 (3) COR [EQUIVALENT, 0 ms] 10.13/4.18 (4) HASKELL 10.13/4.18 (5) Narrow [SOUND, 0 ms] 10.13/4.18 (6) QDP 10.13/4.18 (7) TransformationProof [EQUIVALENT, 0 ms] 10.13/4.18 (8) QDP 10.13/4.18 (9) DependencyGraphProof [EQUIVALENT, 0 ms] 10.13/4.18 (10) QDP 10.13/4.18 (11) UsableRulesProof [EQUIVALENT, 0 ms] 10.13/4.18 (12) QDP 10.13/4.18 (13) QReductionProof [EQUIVALENT, 0 ms] 10.13/4.18 (14) QDP 10.13/4.18 (15) QDPSizeChangeProof [EQUIVALENT, 0 ms] 10.13/4.18 (16) YES 10.13/4.18 10.13/4.18 10.13/4.18 ---------------------------------------- 10.13/4.18 10.13/4.18 (0) 10.13/4.18 Obligation: 10.13/4.18 mainModule Main 10.13/4.18 module Main where { 10.13/4.18 import qualified Prelude; 10.13/4.18 data List a = Cons a (List a) | Nil ; 10.13/4.18 10.13/4.18 data MyBool = MyTrue | MyFalse ; 10.13/4.18 10.13/4.18 data MyInt = Pos Main.Nat | Neg Main.Nat ; 10.13/4.18 10.13/4.18 data Main.Nat = Succ Main.Nat | Zero ; 10.13/4.18 10.13/4.18 data Ordering = LT | EQ | GT ; 10.13/4.18 10.13/4.18 compareMyInt :: MyInt -> MyInt -> Ordering; 10.13/4.18 compareMyInt = primCmpInt; 10.13/4.18 10.13/4.18 drop :: MyInt -> List a -> List a; 10.13/4.18 drop n xs = drop3 n xs; 10.13/4.18 drop vv Nil = drop1 vv Nil; 10.13/4.18 drop n (Cons vw xs) = drop0 n (Cons vw xs); 10.13/4.18 10.13/4.18 drop0 n (Cons vw xs) = drop (msMyInt n (Main.Pos (Main.Succ Main.Zero))) xs; 10.13/4.18 10.13/4.18 drop1 vv Nil = Nil; 10.13/4.18 drop1 vz wu = drop0 vz wu; 10.13/4.18 10.13/4.18 drop2 n xs MyTrue = xs; 10.13/4.18 drop2 n xs MyFalse = drop1 n xs; 10.13/4.18 10.13/4.18 drop3 n xs = drop2 n xs (ltEsMyInt n (Main.Pos Main.Zero)); 10.13/4.18 drop3 wv ww = drop1 wv ww; 10.13/4.18 10.13/4.18 esEsOrdering :: Ordering -> Ordering -> MyBool; 10.13/4.18 esEsOrdering LT LT = MyTrue; 10.13/4.18 esEsOrdering LT EQ = MyFalse; 10.13/4.18 esEsOrdering LT GT = MyFalse; 10.13/4.18 esEsOrdering EQ LT = MyFalse; 10.13/4.18 esEsOrdering EQ EQ = MyTrue; 10.13/4.18 esEsOrdering EQ GT = MyFalse; 10.13/4.18 esEsOrdering GT LT = MyFalse; 10.13/4.18 esEsOrdering GT EQ = MyFalse; 10.13/4.18 esEsOrdering GT GT = MyTrue; 10.13/4.18 10.13/4.18 fsEsOrdering :: Ordering -> Ordering -> MyBool; 10.13/4.18 fsEsOrdering x y = not (esEsOrdering x y); 10.13/4.18 10.13/4.18 ltEsMyInt :: MyInt -> MyInt -> MyBool; 10.13/4.18 ltEsMyInt x y = fsEsOrdering (compareMyInt x y) GT; 10.13/4.18 10.13/4.18 msMyInt :: MyInt -> MyInt -> MyInt; 10.13/4.18 msMyInt = primMinusInt; 10.13/4.18 10.13/4.18 not :: MyBool -> MyBool; 10.13/4.18 not MyTrue = MyFalse; 10.13/4.18 not MyFalse = MyTrue; 10.13/4.18 10.13/4.18 primCmpInt :: MyInt -> MyInt -> Ordering; 10.13/4.18 primCmpInt (Main.Pos Main.Zero) (Main.Pos Main.Zero) = EQ; 10.13/4.18 primCmpInt (Main.Pos Main.Zero) (Main.Neg Main.Zero) = EQ; 10.13/4.18 primCmpInt (Main.Neg Main.Zero) (Main.Pos Main.Zero) = EQ; 10.13/4.18 primCmpInt (Main.Neg Main.Zero) (Main.Neg Main.Zero) = EQ; 10.13/4.18 primCmpInt (Main.Pos x) (Main.Pos y) = primCmpNat x y; 10.13/4.18 primCmpInt (Main.Pos x) (Main.Neg y) = GT; 10.13/4.18 primCmpInt (Main.Neg x) (Main.Pos y) = LT; 10.13/4.18 primCmpInt (Main.Neg x) (Main.Neg y) = primCmpNat y x; 10.13/4.18 10.13/4.18 primCmpNat :: Main.Nat -> Main.Nat -> Ordering; 10.13/4.18 primCmpNat Main.Zero Main.Zero = EQ; 10.13/4.18 primCmpNat Main.Zero (Main.Succ y) = LT; 10.13/4.18 primCmpNat (Main.Succ x) Main.Zero = GT; 10.13/4.18 primCmpNat (Main.Succ x) (Main.Succ y) = primCmpNat x y; 10.13/4.18 10.13/4.18 primMinusInt :: MyInt -> MyInt -> MyInt; 10.13/4.18 primMinusInt (Main.Pos x) (Main.Neg y) = Main.Pos (primPlusNat x y); 10.13/4.18 primMinusInt (Main.Neg x) (Main.Pos y) = Main.Neg (primPlusNat x y); 10.13/4.18 primMinusInt (Main.Neg x) (Main.Neg y) = primMinusNat y x; 10.13/4.18 primMinusInt (Main.Pos x) (Main.Pos y) = primMinusNat x y; 10.13/4.18 10.13/4.18 primMinusNat :: Main.Nat -> Main.Nat -> MyInt; 10.13/4.18 primMinusNat Main.Zero Main.Zero = Main.Pos Main.Zero; 10.13/4.18 primMinusNat Main.Zero (Main.Succ y) = Main.Neg (Main.Succ y); 10.13/4.18 primMinusNat (Main.Succ x) Main.Zero = Main.Pos (Main.Succ x); 10.13/4.18 primMinusNat (Main.Succ x) (Main.Succ y) = primMinusNat x y; 10.13/4.18 10.13/4.18 primPlusNat :: Main.Nat -> Main.Nat -> Main.Nat; 10.13/4.18 primPlusNat Main.Zero Main.Zero = Main.Zero; 10.13/4.18 primPlusNat Main.Zero (Main.Succ y) = Main.Succ y; 10.13/4.18 primPlusNat (Main.Succ x) Main.Zero = Main.Succ x; 10.13/4.18 primPlusNat (Main.Succ x) (Main.Succ y) = Main.Succ (Main.Succ (primPlusNat x y)); 10.13/4.18 10.13/4.18 } 10.13/4.18 10.13/4.18 ---------------------------------------- 10.13/4.18 10.13/4.18 (1) BR (EQUIVALENT) 10.13/4.18 Replaced joker patterns by fresh variables and removed binding patterns. 10.13/4.18 ---------------------------------------- 10.13/4.18 10.13/4.18 (2) 10.13/4.18 Obligation: 10.13/4.18 mainModule Main 10.13/4.18 module Main where { 10.13/4.18 import qualified Prelude; 10.13/4.18 data List a = Cons a (List a) | Nil ; 10.13/4.18 10.13/4.18 data MyBool = MyTrue | MyFalse ; 10.13/4.18 10.13/4.18 data MyInt = Pos Main.Nat | Neg Main.Nat ; 10.13/4.18 10.13/4.18 data Main.Nat = Succ Main.Nat | Zero ; 10.13/4.18 10.13/4.18 data Ordering = LT | EQ | GT ; 10.13/4.18 10.13/4.18 compareMyInt :: MyInt -> MyInt -> Ordering; 10.13/4.18 compareMyInt = primCmpInt; 10.13/4.18 10.13/4.18 drop :: MyInt -> List a -> List a; 10.13/4.18 drop n xs = drop3 n xs; 10.13/4.18 drop vv Nil = drop1 vv Nil; 10.13/4.18 drop n (Cons vw xs) = drop0 n (Cons vw xs); 10.13/4.18 10.13/4.18 drop0 n (Cons vw xs) = drop (msMyInt n (Main.Pos (Main.Succ Main.Zero))) xs; 10.13/4.18 10.13/4.18 drop1 vv Nil = Nil; 10.13/4.18 drop1 vz wu = drop0 vz wu; 10.13/4.18 10.13/4.18 drop2 n xs MyTrue = xs; 10.13/4.18 drop2 n xs MyFalse = drop1 n xs; 10.13/4.18 10.13/4.18 drop3 n xs = drop2 n xs (ltEsMyInt n (Main.Pos Main.Zero)); 10.13/4.18 drop3 wv ww = drop1 wv ww; 10.13/4.18 10.13/4.18 esEsOrdering :: Ordering -> Ordering -> MyBool; 10.13/4.18 esEsOrdering LT LT = MyTrue; 10.13/4.18 esEsOrdering LT EQ = MyFalse; 10.13/4.18 esEsOrdering LT GT = MyFalse; 10.13/4.18 esEsOrdering EQ LT = MyFalse; 10.13/4.18 esEsOrdering EQ EQ = MyTrue; 10.13/4.18 esEsOrdering EQ GT = MyFalse; 10.13/4.18 esEsOrdering GT LT = MyFalse; 10.13/4.18 esEsOrdering GT EQ = MyFalse; 10.13/4.18 esEsOrdering GT GT = MyTrue; 10.13/4.18 10.13/4.18 fsEsOrdering :: Ordering -> Ordering -> MyBool; 10.13/4.18 fsEsOrdering x y = not (esEsOrdering x y); 10.13/4.18 10.13/4.18 ltEsMyInt :: MyInt -> MyInt -> MyBool; 10.13/4.18 ltEsMyInt x y = fsEsOrdering (compareMyInt x y) GT; 10.13/4.18 10.13/4.18 msMyInt :: MyInt -> MyInt -> MyInt; 10.13/4.18 msMyInt = primMinusInt; 10.13/4.18 10.13/4.18 not :: MyBool -> MyBool; 10.13/4.18 not MyTrue = MyFalse; 10.13/4.18 not MyFalse = MyTrue; 10.13/4.18 10.13/4.18 primCmpInt :: MyInt -> MyInt -> Ordering; 10.13/4.18 primCmpInt (Main.Pos Main.Zero) (Main.Pos Main.Zero) = EQ; 10.13/4.18 primCmpInt (Main.Pos Main.Zero) (Main.Neg Main.Zero) = EQ; 10.13/4.18 primCmpInt (Main.Neg Main.Zero) (Main.Pos Main.Zero) = EQ; 10.13/4.18 primCmpInt (Main.Neg Main.Zero) (Main.Neg Main.Zero) = EQ; 10.13/4.18 primCmpInt (Main.Pos x) (Main.Pos y) = primCmpNat x y; 10.13/4.18 primCmpInt (Main.Pos x) (Main.Neg y) = GT; 10.13/4.18 primCmpInt (Main.Neg x) (Main.Pos y) = LT; 10.13/4.18 primCmpInt (Main.Neg x) (Main.Neg y) = primCmpNat y x; 10.13/4.18 10.13/4.18 primCmpNat :: Main.Nat -> Main.Nat -> Ordering; 10.13/4.18 primCmpNat Main.Zero Main.Zero = EQ; 10.13/4.18 primCmpNat Main.Zero (Main.Succ y) = LT; 10.13/4.18 primCmpNat (Main.Succ x) Main.Zero = GT; 10.13/4.18 primCmpNat (Main.Succ x) (Main.Succ y) = primCmpNat x y; 10.13/4.18 10.13/4.18 primMinusInt :: MyInt -> MyInt -> MyInt; 10.13/4.18 primMinusInt (Main.Pos x) (Main.Neg y) = Main.Pos (primPlusNat x y); 10.13/4.18 primMinusInt (Main.Neg x) (Main.Pos y) = Main.Neg (primPlusNat x y); 10.13/4.18 primMinusInt (Main.Neg x) (Main.Neg y) = primMinusNat y x; 10.13/4.18 primMinusInt (Main.Pos x) (Main.Pos y) = primMinusNat x y; 10.13/4.18 10.13/4.18 primMinusNat :: Main.Nat -> Main.Nat -> MyInt; 10.13/4.18 primMinusNat Main.Zero Main.Zero = Main.Pos Main.Zero; 10.13/4.18 primMinusNat Main.Zero (Main.Succ y) = Main.Neg (Main.Succ y); 10.13/4.18 primMinusNat (Main.Succ x) Main.Zero = Main.Pos (Main.Succ x); 10.13/4.18 primMinusNat (Main.Succ x) (Main.Succ y) = primMinusNat x y; 10.13/4.18 10.13/4.18 primPlusNat :: Main.Nat -> Main.Nat -> Main.Nat; 10.13/4.18 primPlusNat Main.Zero Main.Zero = Main.Zero; 10.13/4.18 primPlusNat Main.Zero (Main.Succ y) = Main.Succ y; 10.13/4.18 primPlusNat (Main.Succ x) Main.Zero = Main.Succ x; 10.13/4.18 primPlusNat (Main.Succ x) (Main.Succ y) = Main.Succ (Main.Succ (primPlusNat x y)); 10.13/4.18 10.13/4.18 } 10.13/4.18 10.13/4.18 ---------------------------------------- 10.13/4.18 10.13/4.18 (3) COR (EQUIVALENT) 10.13/4.18 Cond Reductions: 10.13/4.18 The following Function with conditions 10.13/4.18 "undefined |Falseundefined; 10.13/4.18 " 10.13/4.18 is transformed to 10.13/4.18 "undefined = undefined1; 10.13/4.18 " 10.13/4.18 "undefined0 True = undefined; 10.13/4.18 " 10.13/4.18 "undefined1 = undefined0 False; 10.13/4.18 " 10.13/4.18 10.13/4.18 ---------------------------------------- 10.13/4.18 10.13/4.18 (4) 10.13/4.18 Obligation: 10.13/4.18 mainModule Main 10.13/4.18 module Main where { 10.13/4.18 import qualified Prelude; 10.13/4.18 data List a = Cons a (List a) | Nil ; 10.13/4.18 10.13/4.18 data MyBool = MyTrue | MyFalse ; 10.13/4.18 10.13/4.18 data MyInt = Pos Main.Nat | Neg Main.Nat ; 10.13/4.18 10.13/4.18 data Main.Nat = Succ Main.Nat | Zero ; 10.13/4.18 10.13/4.18 data Ordering = LT | EQ | GT ; 10.13/4.18 10.13/4.18 compareMyInt :: MyInt -> MyInt -> Ordering; 10.13/4.18 compareMyInt = primCmpInt; 10.13/4.18 10.13/4.18 drop :: MyInt -> List a -> List a; 10.13/4.18 drop n xs = drop3 n xs; 10.13/4.18 drop vv Nil = drop1 vv Nil; 10.13/4.18 drop n (Cons vw xs) = drop0 n (Cons vw xs); 10.13/4.18 10.13/4.18 drop0 n (Cons vw xs) = drop (msMyInt n (Main.Pos (Main.Succ Main.Zero))) xs; 10.13/4.18 10.13/4.18 drop1 vv Nil = Nil; 10.13/4.18 drop1 vz wu = drop0 vz wu; 10.13/4.18 10.13/4.18 drop2 n xs MyTrue = xs; 10.13/4.18 drop2 n xs MyFalse = drop1 n xs; 10.13/4.18 10.13/4.18 drop3 n xs = drop2 n xs (ltEsMyInt n (Main.Pos Main.Zero)); 10.13/4.18 drop3 wv ww = drop1 wv ww; 10.13/4.18 10.13/4.18 esEsOrdering :: Ordering -> Ordering -> MyBool; 10.13/4.18 esEsOrdering LT LT = MyTrue; 10.13/4.18 esEsOrdering LT EQ = MyFalse; 10.13/4.18 esEsOrdering LT GT = MyFalse; 10.13/4.18 esEsOrdering EQ LT = MyFalse; 10.13/4.18 esEsOrdering EQ EQ = MyTrue; 10.13/4.18 esEsOrdering EQ GT = MyFalse; 10.13/4.18 esEsOrdering GT LT = MyFalse; 10.13/4.18 esEsOrdering GT EQ = MyFalse; 10.13/4.18 esEsOrdering GT GT = MyTrue; 10.13/4.18 10.13/4.18 fsEsOrdering :: Ordering -> Ordering -> MyBool; 10.13/4.18 fsEsOrdering x y = not (esEsOrdering x y); 10.13/4.18 10.13/4.18 ltEsMyInt :: MyInt -> MyInt -> MyBool; 10.13/4.18 ltEsMyInt x y = fsEsOrdering (compareMyInt x y) GT; 10.13/4.18 10.13/4.18 msMyInt :: MyInt -> MyInt -> MyInt; 10.13/4.18 msMyInt = primMinusInt; 10.13/4.18 10.13/4.18 not :: MyBool -> MyBool; 10.13/4.18 not MyTrue = MyFalse; 10.13/4.18 not MyFalse = MyTrue; 10.13/4.18 10.13/4.18 primCmpInt :: MyInt -> MyInt -> Ordering; 10.13/4.18 primCmpInt (Main.Pos Main.Zero) (Main.Pos Main.Zero) = EQ; 10.13/4.18 primCmpInt (Main.Pos Main.Zero) (Main.Neg Main.Zero) = EQ; 10.13/4.18 primCmpInt (Main.Neg Main.Zero) (Main.Pos Main.Zero) = EQ; 10.13/4.18 primCmpInt (Main.Neg Main.Zero) (Main.Neg Main.Zero) = EQ; 10.13/4.18 primCmpInt (Main.Pos x) (Main.Pos y) = primCmpNat x y; 10.13/4.18 primCmpInt (Main.Pos x) (Main.Neg y) = GT; 10.13/4.18 primCmpInt (Main.Neg x) (Main.Pos y) = LT; 10.13/4.18 primCmpInt (Main.Neg x) (Main.Neg y) = primCmpNat y x; 10.13/4.18 10.13/4.18 primCmpNat :: Main.Nat -> Main.Nat -> Ordering; 10.13/4.18 primCmpNat Main.Zero Main.Zero = EQ; 10.13/4.18 primCmpNat Main.Zero (Main.Succ y) = LT; 10.13/4.18 primCmpNat (Main.Succ x) Main.Zero = GT; 10.13/4.18 primCmpNat (Main.Succ x) (Main.Succ y) = primCmpNat x y; 10.13/4.18 10.13/4.18 primMinusInt :: MyInt -> MyInt -> MyInt; 10.13/4.18 primMinusInt (Main.Pos x) (Main.Neg y) = Main.Pos (primPlusNat x y); 10.13/4.18 primMinusInt (Main.Neg x) (Main.Pos y) = Main.Neg (primPlusNat x y); 10.13/4.18 primMinusInt (Main.Neg x) (Main.Neg y) = primMinusNat y x; 10.13/4.18 primMinusInt (Main.Pos x) (Main.Pos y) = primMinusNat x y; 10.13/4.18 10.13/4.18 primMinusNat :: Main.Nat -> Main.Nat -> MyInt; 10.13/4.18 primMinusNat Main.Zero Main.Zero = Main.Pos Main.Zero; 10.13/4.18 primMinusNat Main.Zero (Main.Succ y) = Main.Neg (Main.Succ y); 10.13/4.18 primMinusNat (Main.Succ x) Main.Zero = Main.Pos (Main.Succ x); 10.13/4.18 primMinusNat (Main.Succ x) (Main.Succ y) = primMinusNat x y; 10.13/4.18 10.13/4.18 primPlusNat :: Main.Nat -> Main.Nat -> Main.Nat; 10.13/4.18 primPlusNat Main.Zero Main.Zero = Main.Zero; 10.13/4.18 primPlusNat Main.Zero (Main.Succ y) = Main.Succ y; 10.13/4.18 primPlusNat (Main.Succ x) Main.Zero = Main.Succ x; 10.13/4.18 primPlusNat (Main.Succ x) (Main.Succ y) = Main.Succ (Main.Succ (primPlusNat x y)); 10.13/4.18 10.13/4.18 } 10.13/4.18 10.13/4.18 ---------------------------------------- 10.13/4.18 10.13/4.18 (5) Narrow (SOUND) 10.13/4.18 Haskell To QDPs 10.13/4.18 10.13/4.18 digraph dp_graph { 10.13/4.18 node [outthreshold=100, inthreshold=100];1[label="drop",fontsize=16,color="grey",shape="box"];1 -> 3[label="",style="dashed", color="grey", weight=3]; 10.13/4.18 3[label="drop wx3",fontsize=16,color="grey",shape="box"];3 -> 4[label="",style="dashed", color="grey", weight=3]; 10.13/4.18 4[label="drop wx3 wx4",fontsize=16,color="black",shape="triangle"];4 -> 5[label="",style="solid", color="black", weight=3]; 10.13/4.18 5[label="drop3 wx3 wx4",fontsize=16,color="black",shape="box"];5 -> 6[label="",style="solid", color="black", weight=3]; 10.13/4.18 6[label="drop2 wx3 wx4 (ltEsMyInt wx3 (Pos Zero))",fontsize=16,color="black",shape="box"];6 -> 7[label="",style="solid", color="black", weight=3]; 10.13/4.18 7[label="drop2 wx3 wx4 (fsEsOrdering (compareMyInt wx3 (Pos Zero)) GT)",fontsize=16,color="black",shape="box"];7 -> 8[label="",style="solid", color="black", weight=3]; 10.13/4.18 8[label="drop2 wx3 wx4 (not (esEsOrdering (compareMyInt wx3 (Pos Zero)) GT))",fontsize=16,color="black",shape="box"];8 -> 9[label="",style="solid", color="black", weight=3]; 10.13/4.18 9[label="drop2 wx3 wx4 (not (esEsOrdering (primCmpInt wx3 (Pos Zero)) GT))",fontsize=16,color="burlywood",shape="box"];47[label="wx3/Pos wx30",fontsize=10,color="white",style="solid",shape="box"];9 -> 47[label="",style="solid", color="burlywood", weight=9]; 10.13/4.18 47 -> 10[label="",style="solid", color="burlywood", weight=3]; 10.13/4.18 48[label="wx3/Neg wx30",fontsize=10,color="white",style="solid",shape="box"];9 -> 48[label="",style="solid", color="burlywood", weight=9]; 10.13/4.18 48 -> 11[label="",style="solid", color="burlywood", weight=3]; 10.13/4.18 10[label="drop2 (Pos wx30) wx4 (not (esEsOrdering (primCmpInt (Pos wx30) (Pos Zero)) GT))",fontsize=16,color="burlywood",shape="box"];49[label="wx30/Succ wx300",fontsize=10,color="white",style="solid",shape="box"];10 -> 49[label="",style="solid", color="burlywood", weight=9]; 10.13/4.18 49 -> 12[label="",style="solid", color="burlywood", weight=3]; 10.13/4.18 50[label="wx30/Zero",fontsize=10,color="white",style="solid",shape="box"];10 -> 50[label="",style="solid", color="burlywood", weight=9]; 10.13/4.18 50 -> 13[label="",style="solid", color="burlywood", weight=3]; 10.13/4.18 11[label="drop2 (Neg wx30) wx4 (not (esEsOrdering (primCmpInt (Neg wx30) (Pos Zero)) GT))",fontsize=16,color="burlywood",shape="box"];51[label="wx30/Succ wx300",fontsize=10,color="white",style="solid",shape="box"];11 -> 51[label="",style="solid", color="burlywood", weight=9]; 10.13/4.18 51 -> 14[label="",style="solid", color="burlywood", weight=3]; 10.13/4.18 52[label="wx30/Zero",fontsize=10,color="white",style="solid",shape="box"];11 -> 52[label="",style="solid", color="burlywood", weight=9]; 10.13/4.18 52 -> 15[label="",style="solid", color="burlywood", weight=3]; 10.13/4.18 12[label="drop2 (Pos (Succ wx300)) wx4 (not (esEsOrdering (primCmpInt (Pos (Succ wx300)) (Pos Zero)) GT))",fontsize=16,color="black",shape="box"];12 -> 16[label="",style="solid", color="black", weight=3]; 10.13/4.18 13[label="drop2 (Pos Zero) wx4 (not (esEsOrdering (primCmpInt (Pos Zero) (Pos Zero)) GT))",fontsize=16,color="black",shape="box"];13 -> 17[label="",style="solid", color="black", weight=3]; 10.13/4.18 14[label="drop2 (Neg (Succ wx300)) wx4 (not (esEsOrdering (primCmpInt (Neg (Succ wx300)) (Pos Zero)) GT))",fontsize=16,color="black",shape="box"];14 -> 18[label="",style="solid", color="black", weight=3]; 10.13/4.18 15[label="drop2 (Neg Zero) wx4 (not (esEsOrdering (primCmpInt (Neg Zero) (Pos Zero)) GT))",fontsize=16,color="black",shape="box"];15 -> 19[label="",style="solid", color="black", weight=3]; 10.13/4.18 16[label="drop2 (Pos (Succ wx300)) wx4 (not (esEsOrdering (primCmpNat (Succ wx300) Zero) GT))",fontsize=16,color="black",shape="box"];16 -> 20[label="",style="solid", color="black", weight=3]; 10.13/4.18 17[label="drop2 (Pos Zero) wx4 (not (esEsOrdering EQ GT))",fontsize=16,color="black",shape="box"];17 -> 21[label="",style="solid", color="black", weight=3]; 10.13/4.18 18[label="drop2 (Neg (Succ wx300)) wx4 (not (esEsOrdering LT GT))",fontsize=16,color="black",shape="box"];18 -> 22[label="",style="solid", color="black", weight=3]; 10.13/4.18 19[label="drop2 (Neg Zero) wx4 (not (esEsOrdering EQ GT))",fontsize=16,color="black",shape="box"];19 -> 23[label="",style="solid", color="black", weight=3]; 10.13/4.18 20[label="drop2 (Pos (Succ wx300)) wx4 (not (esEsOrdering GT GT))",fontsize=16,color="black",shape="box"];20 -> 24[label="",style="solid", color="black", weight=3]; 10.13/4.18 21[label="drop2 (Pos Zero) wx4 (not MyFalse)",fontsize=16,color="black",shape="box"];21 -> 25[label="",style="solid", color="black", weight=3]; 10.13/4.18 22[label="drop2 (Neg (Succ wx300)) wx4 (not MyFalse)",fontsize=16,color="black",shape="box"];22 -> 26[label="",style="solid", color="black", weight=3]; 10.13/4.18 23[label="drop2 (Neg Zero) wx4 (not MyFalse)",fontsize=16,color="black",shape="box"];23 -> 27[label="",style="solid", color="black", weight=3]; 10.13/4.18 24[label="drop2 (Pos (Succ wx300)) wx4 (not MyTrue)",fontsize=16,color="black",shape="box"];24 -> 28[label="",style="solid", color="black", weight=3]; 10.13/4.18 25[label="drop2 (Pos Zero) wx4 MyTrue",fontsize=16,color="black",shape="box"];25 -> 29[label="",style="solid", color="black", weight=3]; 10.13/4.18 26[label="drop2 (Neg (Succ wx300)) wx4 MyTrue",fontsize=16,color="black",shape="box"];26 -> 30[label="",style="solid", color="black", weight=3]; 10.13/4.18 27[label="drop2 (Neg Zero) wx4 MyTrue",fontsize=16,color="black",shape="box"];27 -> 31[label="",style="solid", color="black", weight=3]; 10.13/4.18 28[label="drop2 (Pos (Succ wx300)) wx4 MyFalse",fontsize=16,color="black",shape="box"];28 -> 32[label="",style="solid", color="black", weight=3]; 10.13/4.18 29[label="wx4",fontsize=16,color="green",shape="box"];30[label="wx4",fontsize=16,color="green",shape="box"];31[label="wx4",fontsize=16,color="green",shape="box"];32[label="drop1 (Pos (Succ wx300)) wx4",fontsize=16,color="burlywood",shape="box"];53[label="wx4/Cons wx40 wx41",fontsize=10,color="white",style="solid",shape="box"];32 -> 53[label="",style="solid", color="burlywood", weight=9]; 10.13/4.18 53 -> 33[label="",style="solid", color="burlywood", weight=3]; 10.13/4.18 54[label="wx4/Nil",fontsize=10,color="white",style="solid",shape="box"];32 -> 54[label="",style="solid", color="burlywood", weight=9]; 10.13/4.18 54 -> 34[label="",style="solid", color="burlywood", weight=3]; 10.13/4.18 33[label="drop1 (Pos (Succ wx300)) (Cons wx40 wx41)",fontsize=16,color="black",shape="box"];33 -> 35[label="",style="solid", color="black", weight=3]; 10.13/4.18 34[label="drop1 (Pos (Succ wx300)) Nil",fontsize=16,color="black",shape="box"];34 -> 36[label="",style="solid", color="black", weight=3]; 10.13/4.18 35[label="drop0 (Pos (Succ wx300)) (Cons wx40 wx41)",fontsize=16,color="black",shape="box"];35 -> 37[label="",style="solid", color="black", weight=3]; 10.13/4.18 36[label="Nil",fontsize=16,color="green",shape="box"];37 -> 4[label="",style="dashed", color="red", weight=0]; 10.13/4.18 37[label="drop (msMyInt (Pos (Succ wx300)) (Pos (Succ Zero))) wx41",fontsize=16,color="magenta"];37 -> 38[label="",style="dashed", color="magenta", weight=3]; 10.13/4.18 37 -> 39[label="",style="dashed", color="magenta", weight=3]; 10.13/4.18 38[label="wx41",fontsize=16,color="green",shape="box"];39[label="msMyInt (Pos (Succ wx300)) (Pos (Succ Zero))",fontsize=16,color="black",shape="box"];39 -> 40[label="",style="solid", color="black", weight=3]; 10.13/4.18 40[label="primMinusInt (Pos (Succ wx300)) (Pos (Succ Zero))",fontsize=16,color="black",shape="box"];40 -> 41[label="",style="solid", color="black", weight=3]; 10.13/4.18 41[label="primMinusNat (Succ wx300) (Succ Zero)",fontsize=16,color="black",shape="box"];41 -> 42[label="",style="solid", color="black", weight=3]; 10.13/4.18 42[label="primMinusNat wx300 Zero",fontsize=16,color="burlywood",shape="box"];55[label="wx300/Succ wx3000",fontsize=10,color="white",style="solid",shape="box"];42 -> 55[label="",style="solid", color="burlywood", weight=9]; 10.13/4.18 55 -> 43[label="",style="solid", color="burlywood", weight=3]; 10.13/4.18 56[label="wx300/Zero",fontsize=10,color="white",style="solid",shape="box"];42 -> 56[label="",style="solid", color="burlywood", weight=9]; 10.13/4.18 56 -> 44[label="",style="solid", color="burlywood", weight=3]; 10.13/4.18 43[label="primMinusNat (Succ wx3000) Zero",fontsize=16,color="black",shape="box"];43 -> 45[label="",style="solid", color="black", weight=3]; 10.13/4.18 44[label="primMinusNat Zero Zero",fontsize=16,color="black",shape="box"];44 -> 46[label="",style="solid", color="black", weight=3]; 10.13/4.18 45[label="Pos (Succ wx3000)",fontsize=16,color="green",shape="box"];46[label="Pos Zero",fontsize=16,color="green",shape="box"];} 10.13/4.18 10.13/4.18 ---------------------------------------- 10.13/4.18 10.13/4.18 (6) 10.13/4.18 Obligation: 10.13/4.18 Q DP problem: 10.13/4.18 The TRS P consists of the following rules: 10.13/4.18 10.13/4.18 new_drop(Main.Pos(Main.Succ(wx300)), Cons(wx40, wx41), h) -> new_drop(new_primMinusNat(wx300), wx41, h) 10.13/4.18 10.13/4.18 The TRS R consists of the following rules: 10.13/4.18 10.13/4.18 new_primMinusNat(Main.Succ(wx3000)) -> Main.Pos(Main.Succ(wx3000)) 10.13/4.18 new_primMinusNat(Main.Zero) -> Main.Pos(Main.Zero) 10.13/4.18 10.13/4.18 The set Q consists of the following terms: 10.13/4.18 10.13/4.18 new_primMinusNat(Main.Zero) 10.13/4.18 new_primMinusNat(Main.Succ(x0)) 10.13/4.18 10.13/4.18 We have to consider all minimal (P,Q,R)-chains. 10.13/4.18 ---------------------------------------- 10.13/4.18 10.13/4.18 (7) TransformationProof (EQUIVALENT) 10.13/4.18 By narrowing [LPAR04] the rule new_drop(Main.Pos(Main.Succ(wx300)), Cons(wx40, wx41), h) -> new_drop(new_primMinusNat(wx300), wx41, h) at position [0] we obtained the following new rules [LPAR04]: 10.13/4.18 10.13/4.18 (new_drop(Main.Pos(Main.Succ(Main.Succ(x0))), Cons(y1, y2), y3) -> new_drop(Main.Pos(Main.Succ(x0)), y2, y3),new_drop(Main.Pos(Main.Succ(Main.Succ(x0))), Cons(y1, y2), y3) -> new_drop(Main.Pos(Main.Succ(x0)), y2, y3)) 10.13/4.18 (new_drop(Main.Pos(Main.Succ(Main.Zero)), Cons(y1, y2), y3) -> new_drop(Main.Pos(Main.Zero), y2, y3),new_drop(Main.Pos(Main.Succ(Main.Zero)), Cons(y1, y2), y3) -> new_drop(Main.Pos(Main.Zero), y2, y3)) 10.13/4.18 10.13/4.18 10.13/4.18 ---------------------------------------- 10.13/4.18 10.13/4.18 (8) 10.13/4.18 Obligation: 10.13/4.18 Q DP problem: 10.13/4.18 The TRS P consists of the following rules: 10.13/4.18 10.13/4.18 new_drop(Main.Pos(Main.Succ(Main.Succ(x0))), Cons(y1, y2), y3) -> new_drop(Main.Pos(Main.Succ(x0)), y2, y3) 10.13/4.18 new_drop(Main.Pos(Main.Succ(Main.Zero)), Cons(y1, y2), y3) -> new_drop(Main.Pos(Main.Zero), y2, y3) 10.13/4.18 10.13/4.18 The TRS R consists of the following rules: 10.13/4.18 10.13/4.18 new_primMinusNat(Main.Succ(wx3000)) -> Main.Pos(Main.Succ(wx3000)) 10.13/4.18 new_primMinusNat(Main.Zero) -> Main.Pos(Main.Zero) 10.13/4.18 10.13/4.18 The set Q consists of the following terms: 10.13/4.18 10.13/4.18 new_primMinusNat(Main.Zero) 10.13/4.18 new_primMinusNat(Main.Succ(x0)) 10.13/4.18 10.13/4.18 We have to consider all minimal (P,Q,R)-chains. 10.13/4.18 ---------------------------------------- 10.13/4.18 10.13/4.18 (9) DependencyGraphProof (EQUIVALENT) 10.13/4.18 The approximation of the Dependency Graph [LPAR04,FROCOS05,EDGSTAR] contains 1 SCC with 1 less node. 10.13/4.18 ---------------------------------------- 10.13/4.18 10.13/4.18 (10) 10.13/4.18 Obligation: 10.13/4.18 Q DP problem: 10.13/4.18 The TRS P consists of the following rules: 10.13/4.18 10.13/4.18 new_drop(Main.Pos(Main.Succ(Main.Succ(x0))), Cons(y1, y2), y3) -> new_drop(Main.Pos(Main.Succ(x0)), y2, y3) 10.13/4.18 10.13/4.18 The TRS R consists of the following rules: 10.13/4.18 10.13/4.18 new_primMinusNat(Main.Succ(wx3000)) -> Main.Pos(Main.Succ(wx3000)) 10.13/4.18 new_primMinusNat(Main.Zero) -> Main.Pos(Main.Zero) 10.13/4.18 10.13/4.18 The set Q consists of the following terms: 10.13/4.18 10.13/4.18 new_primMinusNat(Main.Zero) 10.13/4.18 new_primMinusNat(Main.Succ(x0)) 10.13/4.18 10.13/4.18 We have to consider all minimal (P,Q,R)-chains. 10.13/4.18 ---------------------------------------- 10.13/4.18 10.13/4.18 (11) UsableRulesProof (EQUIVALENT) 10.13/4.18 As all Q-normal forms are R-normal forms we are in the innermost case. Hence, by the usable rules processor [LPAR04] we can delete all non-usable rules [FROCOS05] from R. 10.13/4.18 ---------------------------------------- 10.13/4.18 10.13/4.18 (12) 10.13/4.18 Obligation: 10.13/4.18 Q DP problem: 10.13/4.18 The TRS P consists of the following rules: 10.13/4.18 10.13/4.18 new_drop(Main.Pos(Main.Succ(Main.Succ(x0))), Cons(y1, y2), y3) -> new_drop(Main.Pos(Main.Succ(x0)), y2, y3) 10.13/4.18 10.13/4.18 R is empty. 10.13/4.18 The set Q consists of the following terms: 10.13/4.18 10.13/4.18 new_primMinusNat(Main.Zero) 10.13/4.18 new_primMinusNat(Main.Succ(x0)) 10.13/4.18 10.13/4.18 We have to consider all minimal (P,Q,R)-chains. 10.13/4.18 ---------------------------------------- 10.13/4.18 10.13/4.18 (13) QReductionProof (EQUIVALENT) 10.13/4.18 We deleted the following terms from Q as each root-symbol of these terms does neither occur in P nor in R.[THIEMANN]. 10.13/4.18 10.13/4.18 new_primMinusNat(Main.Zero) 10.13/4.18 new_primMinusNat(Main.Succ(x0)) 10.13/4.18 10.13/4.18 10.13/4.18 ---------------------------------------- 10.13/4.18 10.13/4.18 (14) 10.13/4.18 Obligation: 10.13/4.18 Q DP problem: 10.13/4.18 The TRS P consists of the following rules: 10.13/4.18 10.13/4.18 new_drop(Main.Pos(Main.Succ(Main.Succ(x0))), Cons(y1, y2), y3) -> new_drop(Main.Pos(Main.Succ(x0)), y2, y3) 10.13/4.18 10.13/4.18 R is empty. 10.13/4.18 Q is empty. 10.13/4.18 We have to consider all minimal (P,Q,R)-chains. 10.13/4.18 ---------------------------------------- 10.13/4.18 10.13/4.18 (15) QDPSizeChangeProof (EQUIVALENT) 10.13/4.18 By using the subterm criterion [SUBTERM_CRITERION] together with the size-change analysis [AAECC05] we have proven that there are no infinite chains for this DP problem. 10.13/4.18 10.13/4.18 From the DPs we obtained the following set of size-change graphs: 10.13/4.18 *new_drop(Main.Pos(Main.Succ(Main.Succ(x0))), Cons(y1, y2), y3) -> new_drop(Main.Pos(Main.Succ(x0)), y2, y3) 10.13/4.18 The graph contains the following edges 2 > 2, 3 >= 3 10.13/4.18 10.13/4.18 10.13/4.18 ---------------------------------------- 10.13/4.18 10.13/4.18 (16) 10.13/4.18 YES 10.17/4.22 EOF