8.25/3.70 YES 10.15/4.27 proof of /export/starexec/sandbox/benchmark/theBenchmark.hs 10.15/4.27 # AProVE Commit ID: 48fb2092695e11cc9f56e44b17a92a5f88ffb256 marcel 20180622 unpublished dirty 10.15/4.27 10.15/4.27 10.15/4.27 H-Termination with start terms of the given HASKELL could be proven: 10.15/4.27 10.15/4.27 (0) HASKELL 10.15/4.27 (1) BR [EQUIVALENT, 0 ms] 10.15/4.27 (2) HASKELL 10.15/4.27 (3) COR [EQUIVALENT, 0 ms] 10.15/4.27 (4) HASKELL 10.15/4.27 (5) Narrow [SOUND, 0 ms] 10.15/4.27 (6) QDP 10.15/4.27 (7) QDPSizeChangeProof [EQUIVALENT, 0 ms] 10.15/4.27 (8) YES 10.15/4.27 10.15/4.27 10.15/4.27 ---------------------------------------- 10.15/4.27 10.15/4.27 (0) 10.15/4.27 Obligation: 10.15/4.27 mainModule Main 10.15/4.27 module Main where { 10.15/4.27 import qualified Prelude; 10.15/4.27 data List a = Cons a (List a) | Nil ; 10.15/4.27 10.15/4.27 data MyBool = MyTrue | MyFalse ; 10.15/4.27 10.15/4.27 data MyInt = Pos Main.Nat | Neg Main.Nat ; 10.15/4.27 10.15/4.27 data Main.Nat = Succ Main.Nat | Zero ; 10.15/4.27 10.15/4.27 data Ordering = LT | EQ | GT ; 10.15/4.27 10.15/4.27 compareMyInt :: MyInt -> MyInt -> Ordering; 10.15/4.27 compareMyInt = primCmpInt; 10.15/4.27 10.15/4.27 esEsOrdering :: Ordering -> Ordering -> MyBool; 10.15/4.27 esEsOrdering LT LT = MyTrue; 10.15/4.27 esEsOrdering LT EQ = MyFalse; 10.15/4.27 esEsOrdering LT GT = MyFalse; 10.15/4.27 esEsOrdering EQ LT = MyFalse; 10.15/4.27 esEsOrdering EQ EQ = MyTrue; 10.15/4.27 esEsOrdering EQ GT = MyFalse; 10.15/4.27 esEsOrdering GT LT = MyFalse; 10.15/4.27 esEsOrdering GT EQ = MyFalse; 10.15/4.27 esEsOrdering GT GT = MyTrue; 10.15/4.27 10.15/4.27 fsEsOrdering :: Ordering -> Ordering -> MyBool; 10.15/4.27 fsEsOrdering x y = not (esEsOrdering x y); 10.15/4.27 10.15/4.27 ltEsMyInt :: MyInt -> MyInt -> MyBool; 10.15/4.27 ltEsMyInt x y = fsEsOrdering (compareMyInt x y) GT; 10.15/4.27 10.15/4.27 msMyInt :: MyInt -> MyInt -> MyInt; 10.15/4.27 msMyInt = primMinusInt; 10.15/4.27 10.15/4.27 not :: MyBool -> MyBool; 10.15/4.27 not MyTrue = MyFalse; 10.15/4.27 not MyFalse = MyTrue; 10.15/4.27 10.15/4.27 primCmpInt :: MyInt -> MyInt -> Ordering; 10.15/4.27 primCmpInt (Main.Pos Main.Zero) (Main.Pos Main.Zero) = EQ; 10.15/4.27 primCmpInt (Main.Pos Main.Zero) (Main.Neg Main.Zero) = EQ; 10.15/4.27 primCmpInt (Main.Neg Main.Zero) (Main.Pos Main.Zero) = EQ; 10.15/4.27 primCmpInt (Main.Neg Main.Zero) (Main.Neg Main.Zero) = EQ; 10.15/4.27 primCmpInt (Main.Pos x) (Main.Pos y) = primCmpNat x y; 10.15/4.27 primCmpInt (Main.Pos x) (Main.Neg y) = GT; 10.15/4.27 primCmpInt (Main.Neg x) (Main.Pos y) = LT; 10.15/4.27 primCmpInt (Main.Neg x) (Main.Neg y) = primCmpNat y x; 10.15/4.27 10.15/4.27 primCmpNat :: Main.Nat -> Main.Nat -> Ordering; 10.15/4.27 primCmpNat Main.Zero Main.Zero = EQ; 10.15/4.27 primCmpNat Main.Zero (Main.Succ y) = LT; 10.15/4.27 primCmpNat (Main.Succ x) Main.Zero = GT; 10.15/4.27 primCmpNat (Main.Succ x) (Main.Succ y) = primCmpNat x y; 10.15/4.27 10.15/4.27 primMinusInt :: MyInt -> MyInt -> MyInt; 10.15/4.27 primMinusInt (Main.Pos x) (Main.Neg y) = Main.Pos (primPlusNat x y); 10.15/4.27 primMinusInt (Main.Neg x) (Main.Pos y) = Main.Neg (primPlusNat x y); 10.15/4.27 primMinusInt (Main.Neg x) (Main.Neg y) = primMinusNat y x; 10.15/4.27 primMinusInt (Main.Pos x) (Main.Pos y) = primMinusNat x y; 10.15/4.27 10.15/4.27 primMinusNat :: Main.Nat -> Main.Nat -> MyInt; 10.15/4.27 primMinusNat Main.Zero Main.Zero = Main.Pos Main.Zero; 10.15/4.27 primMinusNat Main.Zero (Main.Succ y) = Main.Neg (Main.Succ y); 10.15/4.27 primMinusNat (Main.Succ x) Main.Zero = Main.Pos (Main.Succ x); 10.15/4.27 primMinusNat (Main.Succ x) (Main.Succ y) = primMinusNat x y; 10.15/4.27 10.15/4.27 primPlusNat :: Main.Nat -> Main.Nat -> Main.Nat; 10.15/4.27 primPlusNat Main.Zero Main.Zero = Main.Zero; 10.15/4.27 primPlusNat Main.Zero (Main.Succ y) = Main.Succ y; 10.15/4.27 primPlusNat (Main.Succ x) Main.Zero = Main.Succ x; 10.15/4.27 primPlusNat (Main.Succ x) (Main.Succ y) = Main.Succ (Main.Succ (primPlusNat x y)); 10.15/4.27 10.15/4.27 repeat :: a -> List a; 10.15/4.27 repeat x = repeatXs x; 10.15/4.27 10.15/4.27 repeatXs wx = Cons wx (repeatXs wx); 10.15/4.27 10.15/4.27 replicate :: MyInt -> a -> List a; 10.15/4.27 replicate n x = take n (repeat x); 10.15/4.27 10.15/4.27 take :: MyInt -> List a -> List a; 10.15/4.27 take n vv = take3 n vv; 10.15/4.27 take vw Nil = take1 vw Nil; 10.15/4.27 take n (Cons x xs) = take0 n (Cons x xs); 10.15/4.27 10.15/4.27 take0 n (Cons x xs) = Cons x (take (msMyInt n (Main.Pos (Main.Succ Main.Zero))) xs); 10.15/4.27 10.15/4.27 take1 vw Nil = Nil; 10.15/4.27 take1 vz wu = take0 vz wu; 10.15/4.27 10.15/4.27 take2 n vv MyTrue = Nil; 10.15/4.27 take2 n vv MyFalse = take1 n vv; 10.15/4.27 10.15/4.27 take3 n vv = take2 n vv (ltEsMyInt n (Main.Pos Main.Zero)); 10.15/4.27 take3 wv ww = take1 wv ww; 10.15/4.27 10.15/4.27 } 10.15/4.27 10.15/4.27 ---------------------------------------- 10.15/4.27 10.15/4.27 (1) BR (EQUIVALENT) 10.15/4.27 Replaced joker patterns by fresh variables and removed binding patterns. 10.15/4.27 ---------------------------------------- 10.15/4.27 10.15/4.27 (2) 10.15/4.27 Obligation: 10.15/4.27 mainModule Main 10.15/4.27 module Main where { 10.15/4.27 import qualified Prelude; 10.15/4.27 data List a = Cons a (List a) | Nil ; 10.15/4.27 10.15/4.27 data MyBool = MyTrue | MyFalse ; 10.15/4.27 10.15/4.27 data MyInt = Pos Main.Nat | Neg Main.Nat ; 10.15/4.27 10.15/4.27 data Main.Nat = Succ Main.Nat | Zero ; 10.15/4.27 10.15/4.27 data Ordering = LT | EQ | GT ; 10.15/4.27 10.15/4.27 compareMyInt :: MyInt -> MyInt -> Ordering; 10.15/4.27 compareMyInt = primCmpInt; 10.15/4.27 10.15/4.27 esEsOrdering :: Ordering -> Ordering -> MyBool; 10.15/4.27 esEsOrdering LT LT = MyTrue; 10.15/4.27 esEsOrdering LT EQ = MyFalse; 10.15/4.27 esEsOrdering LT GT = MyFalse; 10.15/4.27 esEsOrdering EQ LT = MyFalse; 10.15/4.27 esEsOrdering EQ EQ = MyTrue; 10.15/4.27 esEsOrdering EQ GT = MyFalse; 10.15/4.27 esEsOrdering GT LT = MyFalse; 10.15/4.27 esEsOrdering GT EQ = MyFalse; 10.15/4.27 esEsOrdering GT GT = MyTrue; 10.15/4.27 10.15/4.27 fsEsOrdering :: Ordering -> Ordering -> MyBool; 10.15/4.27 fsEsOrdering x y = not (esEsOrdering x y); 10.15/4.27 10.15/4.27 ltEsMyInt :: MyInt -> MyInt -> MyBool; 10.15/4.27 ltEsMyInt x y = fsEsOrdering (compareMyInt x y) GT; 10.15/4.27 10.15/4.27 msMyInt :: MyInt -> MyInt -> MyInt; 10.15/4.27 msMyInt = primMinusInt; 10.15/4.27 10.15/4.27 not :: MyBool -> MyBool; 10.15/4.27 not MyTrue = MyFalse; 10.15/4.27 not MyFalse = MyTrue; 10.15/4.27 10.15/4.27 primCmpInt :: MyInt -> MyInt -> Ordering; 10.15/4.27 primCmpInt (Main.Pos Main.Zero) (Main.Pos Main.Zero) = EQ; 10.15/4.27 primCmpInt (Main.Pos Main.Zero) (Main.Neg Main.Zero) = EQ; 10.15/4.27 primCmpInt (Main.Neg Main.Zero) (Main.Pos Main.Zero) = EQ; 10.15/4.27 primCmpInt (Main.Neg Main.Zero) (Main.Neg Main.Zero) = EQ; 10.15/4.27 primCmpInt (Main.Pos x) (Main.Pos y) = primCmpNat x y; 10.15/4.27 primCmpInt (Main.Pos x) (Main.Neg y) = GT; 10.15/4.27 primCmpInt (Main.Neg x) (Main.Pos y) = LT; 10.15/4.27 primCmpInt (Main.Neg x) (Main.Neg y) = primCmpNat y x; 10.15/4.27 10.15/4.27 primCmpNat :: Main.Nat -> Main.Nat -> Ordering; 10.15/4.27 primCmpNat Main.Zero Main.Zero = EQ; 10.15/4.27 primCmpNat Main.Zero (Main.Succ y) = LT; 10.15/4.27 primCmpNat (Main.Succ x) Main.Zero = GT; 10.15/4.27 primCmpNat (Main.Succ x) (Main.Succ y) = primCmpNat x y; 10.15/4.27 10.15/4.27 primMinusInt :: MyInt -> MyInt -> MyInt; 10.15/4.27 primMinusInt (Main.Pos x) (Main.Neg y) = Main.Pos (primPlusNat x y); 10.15/4.27 primMinusInt (Main.Neg x) (Main.Pos y) = Main.Neg (primPlusNat x y); 10.15/4.27 primMinusInt (Main.Neg x) (Main.Neg y) = primMinusNat y x; 10.15/4.27 primMinusInt (Main.Pos x) (Main.Pos y) = primMinusNat x y; 10.15/4.27 10.15/4.27 primMinusNat :: Main.Nat -> Main.Nat -> MyInt; 10.15/4.27 primMinusNat Main.Zero Main.Zero = Main.Pos Main.Zero; 10.15/4.27 primMinusNat Main.Zero (Main.Succ y) = Main.Neg (Main.Succ y); 10.15/4.27 primMinusNat (Main.Succ x) Main.Zero = Main.Pos (Main.Succ x); 10.15/4.27 primMinusNat (Main.Succ x) (Main.Succ y) = primMinusNat x y; 10.15/4.27 10.15/4.27 primPlusNat :: Main.Nat -> Main.Nat -> Main.Nat; 10.15/4.27 primPlusNat Main.Zero Main.Zero = Main.Zero; 10.15/4.27 primPlusNat Main.Zero (Main.Succ y) = Main.Succ y; 10.15/4.27 primPlusNat (Main.Succ x) Main.Zero = Main.Succ x; 10.15/4.27 primPlusNat (Main.Succ x) (Main.Succ y) = Main.Succ (Main.Succ (primPlusNat x y)); 10.15/4.27 10.15/4.27 repeat :: a -> List a; 10.15/4.27 repeat x = repeatXs x; 10.15/4.27 10.15/4.27 repeatXs wx = Cons wx (repeatXs wx); 10.15/4.27 10.15/4.27 replicate :: MyInt -> a -> List a; 10.15/4.27 replicate n x = take n (repeat x); 10.15/4.27 10.15/4.27 take :: MyInt -> List a -> List a; 10.15/4.27 take n vv = take3 n vv; 10.15/4.27 take vw Nil = take1 vw Nil; 10.15/4.27 take n (Cons x xs) = take0 n (Cons x xs); 10.15/4.27 10.15/4.27 take0 n (Cons x xs) = Cons x (take (msMyInt n (Main.Pos (Main.Succ Main.Zero))) xs); 10.15/4.27 10.15/4.27 take1 vw Nil = Nil; 10.15/4.27 take1 vz wu = take0 vz wu; 10.15/4.27 10.15/4.27 take2 n vv MyTrue = Nil; 10.15/4.27 take2 n vv MyFalse = take1 n vv; 10.15/4.27 10.15/4.27 take3 n vv = take2 n vv (ltEsMyInt n (Main.Pos Main.Zero)); 10.15/4.27 take3 wv ww = take1 wv ww; 10.15/4.27 10.15/4.27 } 10.15/4.27 10.15/4.27 ---------------------------------------- 10.15/4.27 10.15/4.27 (3) COR (EQUIVALENT) 10.15/4.27 Cond Reductions: 10.15/4.27 The following Function with conditions 10.15/4.27 "undefined |Falseundefined; 10.15/4.27 " 10.15/4.27 is transformed to 10.15/4.27 "undefined = undefined1; 10.15/4.27 " 10.15/4.27 "undefined0 True = undefined; 10.15/4.27 " 10.15/4.27 "undefined1 = undefined0 False; 10.15/4.27 " 10.15/4.27 10.15/4.27 ---------------------------------------- 10.15/4.27 10.15/4.27 (4) 10.15/4.27 Obligation: 10.15/4.27 mainModule Main 10.15/4.27 module Main where { 10.15/4.27 import qualified Prelude; 10.15/4.27 data List a = Cons a (List a) | Nil ; 10.15/4.27 10.15/4.27 data MyBool = MyTrue | MyFalse ; 10.15/4.27 10.15/4.27 data MyInt = Pos Main.Nat | Neg Main.Nat ; 10.15/4.27 10.15/4.27 data Main.Nat = Succ Main.Nat | Zero ; 10.15/4.27 10.15/4.27 data Ordering = LT | EQ | GT ; 10.15/4.27 10.15/4.27 compareMyInt :: MyInt -> MyInt -> Ordering; 10.15/4.27 compareMyInt = primCmpInt; 10.15/4.27 10.15/4.27 esEsOrdering :: Ordering -> Ordering -> MyBool; 10.15/4.27 esEsOrdering LT LT = MyTrue; 10.15/4.27 esEsOrdering LT EQ = MyFalse; 10.15/4.27 esEsOrdering LT GT = MyFalse; 10.15/4.27 esEsOrdering EQ LT = MyFalse; 10.15/4.27 esEsOrdering EQ EQ = MyTrue; 10.15/4.27 esEsOrdering EQ GT = MyFalse; 10.15/4.27 esEsOrdering GT LT = MyFalse; 10.15/4.27 esEsOrdering GT EQ = MyFalse; 10.15/4.27 esEsOrdering GT GT = MyTrue; 10.15/4.27 10.15/4.27 fsEsOrdering :: Ordering -> Ordering -> MyBool; 10.15/4.27 fsEsOrdering x y = not (esEsOrdering x y); 10.15/4.27 10.15/4.27 ltEsMyInt :: MyInt -> MyInt -> MyBool; 10.15/4.27 ltEsMyInt x y = fsEsOrdering (compareMyInt x y) GT; 10.15/4.27 10.15/4.27 msMyInt :: MyInt -> MyInt -> MyInt; 10.15/4.27 msMyInt = primMinusInt; 10.15/4.27 10.15/4.27 not :: MyBool -> MyBool; 10.15/4.27 not MyTrue = MyFalse; 10.15/4.27 not MyFalse = MyTrue; 10.15/4.27 10.15/4.27 primCmpInt :: MyInt -> MyInt -> Ordering; 10.15/4.27 primCmpInt (Main.Pos Main.Zero) (Main.Pos Main.Zero) = EQ; 10.15/4.27 primCmpInt (Main.Pos Main.Zero) (Main.Neg Main.Zero) = EQ; 10.15/4.27 primCmpInt (Main.Neg Main.Zero) (Main.Pos Main.Zero) = EQ; 10.15/4.27 primCmpInt (Main.Neg Main.Zero) (Main.Neg Main.Zero) = EQ; 10.15/4.27 primCmpInt (Main.Pos x) (Main.Pos y) = primCmpNat x y; 10.15/4.27 primCmpInt (Main.Pos x) (Main.Neg y) = GT; 10.15/4.27 primCmpInt (Main.Neg x) (Main.Pos y) = LT; 10.15/4.27 primCmpInt (Main.Neg x) (Main.Neg y) = primCmpNat y x; 10.15/4.27 10.15/4.27 primCmpNat :: Main.Nat -> Main.Nat -> Ordering; 10.15/4.27 primCmpNat Main.Zero Main.Zero = EQ; 10.15/4.27 primCmpNat Main.Zero (Main.Succ y) = LT; 10.15/4.27 primCmpNat (Main.Succ x) Main.Zero = GT; 10.15/4.27 primCmpNat (Main.Succ x) (Main.Succ y) = primCmpNat x y; 10.15/4.27 10.15/4.27 primMinusInt :: MyInt -> MyInt -> MyInt; 10.15/4.27 primMinusInt (Main.Pos x) (Main.Neg y) = Main.Pos (primPlusNat x y); 10.15/4.27 primMinusInt (Main.Neg x) (Main.Pos y) = Main.Neg (primPlusNat x y); 10.15/4.27 primMinusInt (Main.Neg x) (Main.Neg y) = primMinusNat y x; 10.15/4.27 primMinusInt (Main.Pos x) (Main.Pos y) = primMinusNat x y; 10.15/4.27 10.15/4.27 primMinusNat :: Main.Nat -> Main.Nat -> MyInt; 10.15/4.27 primMinusNat Main.Zero Main.Zero = Main.Pos Main.Zero; 10.15/4.27 primMinusNat Main.Zero (Main.Succ y) = Main.Neg (Main.Succ y); 10.15/4.27 primMinusNat (Main.Succ x) Main.Zero = Main.Pos (Main.Succ x); 10.15/4.27 primMinusNat (Main.Succ x) (Main.Succ y) = primMinusNat x y; 10.15/4.27 10.15/4.27 primPlusNat :: Main.Nat -> Main.Nat -> Main.Nat; 10.15/4.27 primPlusNat Main.Zero Main.Zero = Main.Zero; 10.15/4.27 primPlusNat Main.Zero (Main.Succ y) = Main.Succ y; 10.15/4.27 primPlusNat (Main.Succ x) Main.Zero = Main.Succ x; 10.15/4.27 primPlusNat (Main.Succ x) (Main.Succ y) = Main.Succ (Main.Succ (primPlusNat x y)); 10.15/4.27 10.15/4.27 repeat :: a -> List a; 10.15/4.27 repeat x = repeatXs x; 10.15/4.27 10.15/4.27 repeatXs wx = Cons wx (repeatXs wx); 10.15/4.27 10.15/4.27 replicate :: MyInt -> a -> List a; 10.15/4.27 replicate n x = take n (repeat x); 10.15/4.27 10.15/4.27 take :: MyInt -> List a -> List a; 10.15/4.27 take n vv = take3 n vv; 10.15/4.27 take vw Nil = take1 vw Nil; 10.15/4.27 take n (Cons x xs) = take0 n (Cons x xs); 10.15/4.27 10.15/4.27 take0 n (Cons x xs) = Cons x (take (msMyInt n (Main.Pos (Main.Succ Main.Zero))) xs); 10.15/4.27 10.15/4.27 take1 vw Nil = Nil; 10.15/4.27 take1 vz wu = take0 vz wu; 10.15/4.27 10.15/4.27 take2 n vv MyTrue = Nil; 10.15/4.27 take2 n vv MyFalse = take1 n vv; 10.15/4.27 10.15/4.27 take3 n vv = take2 n vv (ltEsMyInt n (Main.Pos Main.Zero)); 10.15/4.27 take3 wv ww = take1 wv ww; 10.15/4.27 10.15/4.27 } 10.15/4.27 10.15/4.27 ---------------------------------------- 10.15/4.27 10.15/4.27 (5) Narrow (SOUND) 10.15/4.27 Haskell To QDPs 10.15/4.27 10.15/4.27 digraph dp_graph { 10.15/4.27 node [outthreshold=100, inthreshold=100];1[label="replicate",fontsize=16,color="grey",shape="box"];1 -> 3[label="",style="dashed", color="grey", weight=3]; 10.15/4.27 3[label="replicate wy3",fontsize=16,color="grey",shape="box"];3 -> 4[label="",style="dashed", color="grey", weight=3]; 10.15/4.27 4[label="replicate wy3 wy4",fontsize=16,color="black",shape="triangle"];4 -> 5[label="",style="solid", color="black", weight=3]; 10.15/4.27 5[label="take wy3 (repeat wy4)",fontsize=16,color="black",shape="box"];5 -> 6[label="",style="solid", color="black", weight=3]; 10.15/4.27 6[label="take3 wy3 (repeat wy4)",fontsize=16,color="black",shape="box"];6 -> 7[label="",style="solid", color="black", weight=3]; 10.15/4.27 7[label="take2 wy3 (repeat wy4) (ltEsMyInt wy3 (Pos Zero))",fontsize=16,color="black",shape="box"];7 -> 8[label="",style="solid", color="black", weight=3]; 10.15/4.27 8[label="take2 wy3 (repeat wy4) (fsEsOrdering (compareMyInt wy3 (Pos Zero)) GT)",fontsize=16,color="black",shape="box"];8 -> 9[label="",style="solid", color="black", weight=3]; 10.15/4.27 9[label="take2 wy3 (repeat wy4) (not (esEsOrdering (compareMyInt wy3 (Pos Zero)) GT))",fontsize=16,color="black",shape="box"];9 -> 10[label="",style="solid", color="black", weight=3]; 10.15/4.27 10[label="take2 wy3 (repeat wy4) (not (esEsOrdering (primCmpInt wy3 (Pos Zero)) GT))",fontsize=16,color="burlywood",shape="box"];61[label="wy3/Pos wy30",fontsize=10,color="white",style="solid",shape="box"];10 -> 61[label="",style="solid", color="burlywood", weight=9]; 10.15/4.27 61 -> 11[label="",style="solid", color="burlywood", weight=3]; 10.15/4.27 62[label="wy3/Neg wy30",fontsize=10,color="white",style="solid",shape="box"];10 -> 62[label="",style="solid", color="burlywood", weight=9]; 10.15/4.27 62 -> 12[label="",style="solid", color="burlywood", weight=3]; 10.15/4.27 11[label="take2 (Pos wy30) (repeat wy4) (not (esEsOrdering (primCmpInt (Pos wy30) (Pos Zero)) GT))",fontsize=16,color="burlywood",shape="box"];63[label="wy30/Succ wy300",fontsize=10,color="white",style="solid",shape="box"];11 -> 63[label="",style="solid", color="burlywood", weight=9]; 10.15/4.27 63 -> 13[label="",style="solid", color="burlywood", weight=3]; 10.15/4.27 64[label="wy30/Zero",fontsize=10,color="white",style="solid",shape="box"];11 -> 64[label="",style="solid", color="burlywood", weight=9]; 10.15/4.27 64 -> 14[label="",style="solid", color="burlywood", weight=3]; 10.15/4.27 12[label="take2 (Neg wy30) (repeat wy4) (not (esEsOrdering (primCmpInt (Neg wy30) (Pos Zero)) GT))",fontsize=16,color="burlywood",shape="box"];65[label="wy30/Succ wy300",fontsize=10,color="white",style="solid",shape="box"];12 -> 65[label="",style="solid", color="burlywood", weight=9]; 10.15/4.27 65 -> 15[label="",style="solid", color="burlywood", weight=3]; 10.15/4.27 66[label="wy30/Zero",fontsize=10,color="white",style="solid",shape="box"];12 -> 66[label="",style="solid", color="burlywood", weight=9]; 10.15/4.27 66 -> 16[label="",style="solid", color="burlywood", weight=3]; 10.15/4.27 13[label="take2 (Pos (Succ wy300)) (repeat wy4) (not (esEsOrdering (primCmpInt (Pos (Succ wy300)) (Pos Zero)) GT))",fontsize=16,color="black",shape="box"];13 -> 17[label="",style="solid", color="black", weight=3]; 10.15/4.27 14[label="take2 (Pos Zero) (repeat wy4) (not (esEsOrdering (primCmpInt (Pos Zero) (Pos Zero)) GT))",fontsize=16,color="black",shape="box"];14 -> 18[label="",style="solid", color="black", weight=3]; 10.15/4.27 15[label="take2 (Neg (Succ wy300)) (repeat wy4) (not (esEsOrdering (primCmpInt (Neg (Succ wy300)) (Pos Zero)) GT))",fontsize=16,color="black",shape="box"];15 -> 19[label="",style="solid", color="black", weight=3]; 10.15/4.27 16[label="take2 (Neg Zero) (repeat wy4) (not (esEsOrdering (primCmpInt (Neg Zero) (Pos Zero)) GT))",fontsize=16,color="black",shape="box"];16 -> 20[label="",style="solid", color="black", weight=3]; 10.15/4.27 17[label="take2 (Pos (Succ wy300)) (repeat wy4) (not (esEsOrdering (primCmpNat (Succ wy300) Zero) GT))",fontsize=16,color="black",shape="box"];17 -> 21[label="",style="solid", color="black", weight=3]; 10.15/4.27 18[label="take2 (Pos Zero) (repeat wy4) (not (esEsOrdering EQ GT))",fontsize=16,color="black",shape="box"];18 -> 22[label="",style="solid", color="black", weight=3]; 10.15/4.27 19[label="take2 (Neg (Succ wy300)) (repeat wy4) (not (esEsOrdering LT GT))",fontsize=16,color="black",shape="box"];19 -> 23[label="",style="solid", color="black", weight=3]; 10.15/4.27 20[label="take2 (Neg Zero) (repeat wy4) (not (esEsOrdering EQ GT))",fontsize=16,color="black",shape="box"];20 -> 24[label="",style="solid", color="black", weight=3]; 10.15/4.27 21[label="take2 (Pos (Succ wy300)) (repeat wy4) (not (esEsOrdering GT GT))",fontsize=16,color="black",shape="box"];21 -> 25[label="",style="solid", color="black", weight=3]; 10.15/4.27 22[label="take2 (Pos Zero) (repeat wy4) (not MyFalse)",fontsize=16,color="black",shape="box"];22 -> 26[label="",style="solid", color="black", weight=3]; 10.15/4.27 23[label="take2 (Neg (Succ wy300)) (repeat wy4) (not MyFalse)",fontsize=16,color="black",shape="box"];23 -> 27[label="",style="solid", color="black", weight=3]; 10.15/4.27 24[label="take2 (Neg Zero) (repeat wy4) (not MyFalse)",fontsize=16,color="black",shape="box"];24 -> 28[label="",style="solid", color="black", weight=3]; 10.15/4.27 25[label="take2 (Pos (Succ wy300)) (repeat wy4) (not MyTrue)",fontsize=16,color="black",shape="box"];25 -> 29[label="",style="solid", color="black", weight=3]; 10.15/4.27 26[label="take2 (Pos Zero) (repeat wy4) MyTrue",fontsize=16,color="black",shape="box"];26 -> 30[label="",style="solid", color="black", weight=3]; 10.15/4.27 27[label="take2 (Neg (Succ wy300)) (repeat wy4) MyTrue",fontsize=16,color="black",shape="box"];27 -> 31[label="",style="solid", color="black", weight=3]; 10.15/4.27 28[label="take2 (Neg Zero) (repeat wy4) MyTrue",fontsize=16,color="black",shape="box"];28 -> 32[label="",style="solid", color="black", weight=3]; 10.15/4.27 29[label="take2 (Pos (Succ wy300)) (repeat wy4) MyFalse",fontsize=16,color="black",shape="box"];29 -> 33[label="",style="solid", color="black", weight=3]; 10.15/4.27 30[label="Nil",fontsize=16,color="green",shape="box"];31[label="Nil",fontsize=16,color="green",shape="box"];32[label="Nil",fontsize=16,color="green",shape="box"];33[label="take1 (Pos (Succ wy300)) (repeat wy4)",fontsize=16,color="black",shape="box"];33 -> 34[label="",style="solid", color="black", weight=3]; 10.15/4.27 34[label="take1 (Pos (Succ wy300)) (repeatXs wy4)",fontsize=16,color="black",shape="triangle"];34 -> 35[label="",style="solid", color="black", weight=3]; 10.15/4.27 35[label="take1 (Pos (Succ wy300)) (Cons wy4 (repeatXs wy4))",fontsize=16,color="black",shape="box"];35 -> 36[label="",style="solid", color="black", weight=3]; 10.15/4.27 36[label="take0 (Pos (Succ wy300)) (Cons wy4 (repeatXs wy4))",fontsize=16,color="black",shape="box"];36 -> 37[label="",style="solid", color="black", weight=3]; 10.15/4.27 37[label="Cons wy4 (take (msMyInt (Pos (Succ wy300)) (Pos (Succ Zero))) (repeatXs wy4))",fontsize=16,color="green",shape="box"];37 -> 38[label="",style="dashed", color="green", weight=3]; 10.15/4.27 38[label="take (msMyInt (Pos (Succ wy300)) (Pos (Succ Zero))) (repeatXs wy4)",fontsize=16,color="black",shape="box"];38 -> 39[label="",style="solid", color="black", weight=3]; 10.15/4.27 39[label="take3 (msMyInt (Pos (Succ wy300)) (Pos (Succ Zero))) (repeatXs wy4)",fontsize=16,color="black",shape="box"];39 -> 40[label="",style="solid", color="black", weight=3]; 10.15/4.27 40[label="take2 (msMyInt (Pos (Succ wy300)) (Pos (Succ Zero))) (repeatXs wy4) (ltEsMyInt (msMyInt (Pos (Succ wy300)) (Pos (Succ Zero))) (Pos Zero))",fontsize=16,color="black",shape="box"];40 -> 41[label="",style="solid", color="black", weight=3]; 10.15/4.27 41[label="take2 (msMyInt (Pos (Succ wy300)) (Pos (Succ Zero))) (repeatXs wy4) (fsEsOrdering (compareMyInt (msMyInt (Pos (Succ wy300)) (Pos (Succ Zero))) (Pos Zero)) GT)",fontsize=16,color="black",shape="box"];41 -> 42[label="",style="solid", color="black", weight=3]; 10.15/4.27 42[label="take2 (msMyInt (Pos (Succ wy300)) (Pos (Succ Zero))) (repeatXs wy4) (not (esEsOrdering (compareMyInt (msMyInt (Pos (Succ wy300)) (Pos (Succ Zero))) (Pos Zero)) GT))",fontsize=16,color="black",shape="box"];42 -> 43[label="",style="solid", color="black", weight=3]; 10.15/4.27 43[label="take2 (msMyInt (Pos (Succ wy300)) (Pos (Succ Zero))) (repeatXs wy4) (not (esEsOrdering (primCmpInt (msMyInt (Pos (Succ wy300)) (Pos (Succ Zero))) (Pos Zero)) GT))",fontsize=16,color="black",shape="box"];43 -> 44[label="",style="solid", color="black", weight=3]; 10.15/4.27 44[label="take2 (primMinusInt (Pos (Succ wy300)) (Pos (Succ Zero))) (repeatXs wy4) (not (esEsOrdering (primCmpInt (primMinusInt (Pos (Succ wy300)) (Pos (Succ Zero))) (Pos Zero)) GT))",fontsize=16,color="black",shape="box"];44 -> 45[label="",style="solid", color="black", weight=3]; 10.15/4.27 45[label="take2 (primMinusNat (Succ wy300) (Succ Zero)) (repeatXs wy4) (not (esEsOrdering (primCmpInt (primMinusNat (Succ wy300) (Succ Zero)) (Pos Zero)) GT))",fontsize=16,color="black",shape="box"];45 -> 46[label="",style="solid", color="black", weight=3]; 10.15/4.27 46[label="take2 (primMinusNat wy300 Zero) (repeatXs wy4) (not (esEsOrdering (primCmpInt (primMinusNat wy300 Zero) (Pos Zero)) GT))",fontsize=16,color="burlywood",shape="box"];67[label="wy300/Succ wy3000",fontsize=10,color="white",style="solid",shape="box"];46 -> 67[label="",style="solid", color="burlywood", weight=9]; 10.15/4.27 67 -> 47[label="",style="solid", color="burlywood", weight=3]; 10.15/4.27 68[label="wy300/Zero",fontsize=10,color="white",style="solid",shape="box"];46 -> 68[label="",style="solid", color="burlywood", weight=9]; 10.15/4.27 68 -> 48[label="",style="solid", color="burlywood", weight=3]; 10.15/4.27 47[label="take2 (primMinusNat (Succ wy3000) Zero) (repeatXs wy4) (not (esEsOrdering (primCmpInt (primMinusNat (Succ wy3000) Zero) (Pos Zero)) GT))",fontsize=16,color="black",shape="box"];47 -> 49[label="",style="solid", color="black", weight=3]; 10.15/4.27 48[label="take2 (primMinusNat Zero Zero) (repeatXs wy4) (not (esEsOrdering (primCmpInt (primMinusNat Zero Zero) (Pos Zero)) GT))",fontsize=16,color="black",shape="box"];48 -> 50[label="",style="solid", color="black", weight=3]; 10.15/4.27 49[label="take2 (Pos (Succ wy3000)) (repeatXs wy4) (not (esEsOrdering (primCmpInt (Pos (Succ wy3000)) (Pos Zero)) GT))",fontsize=16,color="black",shape="box"];49 -> 51[label="",style="solid", color="black", weight=3]; 10.15/4.27 50[label="take2 (Pos Zero) (repeatXs wy4) (not (esEsOrdering (primCmpInt (Pos Zero) (Pos Zero)) GT))",fontsize=16,color="black",shape="box"];50 -> 52[label="",style="solid", color="black", weight=3]; 10.15/4.27 51[label="take2 (Pos (Succ wy3000)) (repeatXs wy4) (not (esEsOrdering (primCmpNat (Succ wy3000) Zero) GT))",fontsize=16,color="black",shape="box"];51 -> 53[label="",style="solid", color="black", weight=3]; 10.15/4.27 52[label="take2 (Pos Zero) (repeatXs wy4) (not (esEsOrdering EQ GT))",fontsize=16,color="black",shape="box"];52 -> 54[label="",style="solid", color="black", weight=3]; 10.15/4.27 53[label="take2 (Pos (Succ wy3000)) (repeatXs wy4) (not (esEsOrdering GT GT))",fontsize=16,color="black",shape="box"];53 -> 55[label="",style="solid", color="black", weight=3]; 10.15/4.27 54[label="take2 (Pos Zero) (repeatXs wy4) (not MyFalse)",fontsize=16,color="black",shape="box"];54 -> 56[label="",style="solid", color="black", weight=3]; 10.15/4.27 55[label="take2 (Pos (Succ wy3000)) (repeatXs wy4) (not MyTrue)",fontsize=16,color="black",shape="box"];55 -> 57[label="",style="solid", color="black", weight=3]; 10.15/4.27 56[label="take2 (Pos Zero) (repeatXs wy4) MyTrue",fontsize=16,color="black",shape="box"];56 -> 58[label="",style="solid", color="black", weight=3]; 10.15/4.27 57[label="take2 (Pos (Succ wy3000)) (repeatXs wy4) MyFalse",fontsize=16,color="black",shape="box"];57 -> 59[label="",style="solid", color="black", weight=3]; 10.15/4.27 58[label="Nil",fontsize=16,color="green",shape="box"];59 -> 34[label="",style="dashed", color="red", weight=0]; 10.15/4.27 59[label="take1 (Pos (Succ wy3000)) (repeatXs wy4)",fontsize=16,color="magenta"];59 -> 60[label="",style="dashed", color="magenta", weight=3]; 10.15/4.27 60[label="wy3000",fontsize=16,color="green",shape="box"];} 10.15/4.27 10.15/4.27 ---------------------------------------- 10.15/4.27 10.15/4.27 (6) 10.15/4.27 Obligation: 10.15/4.27 Q DP problem: 10.15/4.27 The TRS P consists of the following rules: 10.15/4.27 10.15/4.27 new_take1(Main.Succ(wy3000), wy4, h) -> new_take1(wy3000, wy4, h) 10.15/4.27 10.15/4.27 R is empty. 10.15/4.27 Q is empty. 10.15/4.27 We have to consider all minimal (P,Q,R)-chains. 10.15/4.27 ---------------------------------------- 10.15/4.27 10.15/4.27 (7) QDPSizeChangeProof (EQUIVALENT) 10.15/4.27 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.15/4.27 10.15/4.27 From the DPs we obtained the following set of size-change graphs: 10.15/4.27 *new_take1(Main.Succ(wy3000), wy4, h) -> new_take1(wy3000, wy4, h) 10.15/4.27 The graph contains the following edges 1 > 1, 2 >= 2, 3 >= 3 10.15/4.27 10.15/4.27 10.15/4.27 ---------------------------------------- 10.15/4.27 10.15/4.27 (8) 10.15/4.27 YES 10.32/4.57 EOF