8.06/3.60 YES 9.90/4.11 proof of /export/starexec/sandbox/benchmark/theBenchmark.hs 9.90/4.11 # AProVE Commit ID: 48fb2092695e11cc9f56e44b17a92a5f88ffb256 marcel 20180622 unpublished dirty 9.90/4.11 9.90/4.11 9.90/4.11 H-Termination with start terms of the given HASKELL could be proven: 9.90/4.11 9.90/4.11 (0) HASKELL 9.90/4.11 (1) BR [EQUIVALENT, 0 ms] 9.90/4.11 (2) HASKELL 9.90/4.11 (3) COR [EQUIVALENT, 0 ms] 9.90/4.11 (4) HASKELL 9.90/4.11 (5) NumRed [SOUND, 1 ms] 9.90/4.11 (6) HASKELL 9.90/4.11 (7) Narrow [SOUND, 0 ms] 9.90/4.11 (8) QDP 9.90/4.11 (9) TransformationProof [EQUIVALENT, 0 ms] 9.90/4.11 (10) QDP 9.90/4.11 (11) DependencyGraphProof [EQUIVALENT, 0 ms] 9.90/4.11 (12) QDP 9.90/4.11 (13) UsableRulesProof [EQUIVALENT, 0 ms] 9.90/4.11 (14) QDP 9.90/4.11 (15) QReductionProof [EQUIVALENT, 0 ms] 9.90/4.11 (16) QDP 9.90/4.11 (17) QDPSizeChangeProof [EQUIVALENT, 0 ms] 9.90/4.11 (18) YES 9.90/4.11 9.90/4.11 9.90/4.11 ---------------------------------------- 9.90/4.11 9.90/4.11 (0) 9.90/4.11 Obligation: 9.90/4.11 mainModule Main 9.90/4.11 module Main where { 9.90/4.11 import qualified Prelude; 9.90/4.11 } 9.90/4.11 9.90/4.11 ---------------------------------------- 9.90/4.11 9.90/4.11 (1) BR (EQUIVALENT) 9.90/4.11 Replaced joker patterns by fresh variables and removed binding patterns. 9.90/4.11 ---------------------------------------- 9.90/4.11 9.90/4.11 (2) 9.90/4.11 Obligation: 9.90/4.11 mainModule Main 9.90/4.11 module Main where { 9.90/4.11 import qualified Prelude; 9.90/4.11 } 9.90/4.11 9.90/4.11 ---------------------------------------- 9.90/4.11 9.90/4.11 (3) COR (EQUIVALENT) 9.90/4.11 Cond Reductions: 9.90/4.11 The following Function with conditions 9.90/4.11 "!! (x : vw) 0 = x; 9.90/4.11 !! (vx : xs) n|n > 0xs !! (n - 1); 9.90/4.11 !! (vy : vz) wu = error []; 9.90/4.11 !! [] wv = error []; 9.90/4.11 " 9.90/4.11 is transformed to 9.90/4.11 "!! (x : vw) yv = emEm5 (x : vw) yv; 9.90/4.11 !! (vx : xs) n = emEm3 (vx : xs) n; 9.90/4.11 !! (vy : vz) wu = emEm1 (vy : vz) wu; 9.90/4.11 !! [] wv = emEm0 [] wv; 9.90/4.11 " 9.90/4.11 "emEm0 [] wv = error []; 9.90/4.11 " 9.90/4.11 "emEm1 (vy : vz) wu = error []; 9.90/4.11 emEm1 xv xw = emEm0 xv xw; 9.90/4.11 " 9.90/4.11 "emEm2 vx xs n True = xs !! (n - 1); 9.90/4.11 emEm2 vx xs n False = emEm1 (vx : xs) n; 9.90/4.11 " 9.90/4.11 "emEm3 (vx : xs) n = emEm2 vx xs n (n > 0); 9.90/4.11 emEm3 xy xz = emEm1 xy xz; 9.90/4.11 " 9.90/4.11 "emEm4 True (x : vw) yv = x; 9.90/4.11 emEm4 yw yx yy = emEm3 yx yy; 9.90/4.11 " 9.90/4.11 "emEm5 (x : vw) yv = emEm4 (yv == 0) (x : vw) yv; 9.90/4.11 emEm5 yz zu = emEm3 yz zu; 9.90/4.11 " 9.90/4.11 The following Function with conditions 9.90/4.11 "undefined |Falseundefined; 9.90/4.11 " 9.90/4.11 is transformed to 9.90/4.11 "undefined = undefined1; 9.90/4.11 " 9.90/4.11 "undefined0 True = undefined; 9.90/4.11 " 9.90/4.11 "undefined1 = undefined0 False; 9.90/4.11 " 9.90/4.11 9.90/4.11 ---------------------------------------- 9.90/4.11 9.90/4.11 (4) 9.90/4.11 Obligation: 9.90/4.11 mainModule Main 9.90/4.11 module Main where { 9.90/4.11 import qualified Prelude; 9.90/4.11 } 9.90/4.11 9.90/4.11 ---------------------------------------- 9.90/4.11 9.90/4.11 (5) NumRed (SOUND) 9.90/4.11 Num Reduction:All numbers are transformed to their corresponding representation with Succ, Pred and Zero. 9.90/4.11 ---------------------------------------- 9.90/4.11 9.90/4.11 (6) 9.90/4.11 Obligation: 9.90/4.11 mainModule Main 9.90/4.11 module Main where { 9.90/4.11 import qualified Prelude; 9.90/4.11 } 9.90/4.11 9.90/4.11 ---------------------------------------- 9.90/4.11 9.90/4.11 (7) Narrow (SOUND) 9.90/4.11 Haskell To QDPs 9.90/4.11 9.90/4.11 digraph dp_graph { 9.90/4.11 node [outthreshold=100, inthreshold=100];1[label="(!!)",fontsize=16,color="grey",shape="box"];1 -> 3[label="",style="dashed", color="grey", weight=3]; 9.90/4.11 3[label="(!!) zv3",fontsize=16,color="grey",shape="box"];3 -> 4[label="",style="dashed", color="grey", weight=3]; 9.90/4.11 4[label="(!!) zv3 zv4",fontsize=16,color="burlywood",shape="triangle"];50[label="zv3/zv30 : zv31",fontsize=10,color="white",style="solid",shape="box"];4 -> 50[label="",style="solid", color="burlywood", weight=9]; 9.90/4.11 50 -> 5[label="",style="solid", color="burlywood", weight=3]; 9.90/4.11 51[label="zv3/[]",fontsize=10,color="white",style="solid",shape="box"];4 -> 51[label="",style="solid", color="burlywood", weight=9]; 9.90/4.11 51 -> 6[label="",style="solid", color="burlywood", weight=3]; 9.90/4.11 5[label="(!!) (zv30 : zv31) zv4",fontsize=16,color="black",shape="box"];5 -> 7[label="",style="solid", color="black", weight=3]; 9.90/4.11 6[label="(!!) [] zv4",fontsize=16,color="black",shape="box"];6 -> 8[label="",style="solid", color="black", weight=3]; 9.90/4.11 7[label="emEm5 (zv30 : zv31) zv4",fontsize=16,color="black",shape="box"];7 -> 9[label="",style="solid", color="black", weight=3]; 9.90/4.11 8[label="emEm0 [] zv4",fontsize=16,color="black",shape="box"];8 -> 10[label="",style="solid", color="black", weight=3]; 9.90/4.11 9[label="emEm4 (zv4 == Pos Zero) (zv30 : zv31) zv4",fontsize=16,color="black",shape="box"];9 -> 11[label="",style="solid", color="black", weight=3]; 9.90/4.11 10[label="error []",fontsize=16,color="black",shape="triangle"];10 -> 12[label="",style="solid", color="black", weight=3]; 9.90/4.11 11[label="emEm4 (primEqInt zv4 (Pos Zero)) (zv30 : zv31) zv4",fontsize=16,color="burlywood",shape="box"];52[label="zv4/Pos zv40",fontsize=10,color="white",style="solid",shape="box"];11 -> 52[label="",style="solid", color="burlywood", weight=9]; 9.90/4.11 52 -> 13[label="",style="solid", color="burlywood", weight=3]; 9.90/4.11 53[label="zv4/Neg zv40",fontsize=10,color="white",style="solid",shape="box"];11 -> 53[label="",style="solid", color="burlywood", weight=9]; 9.90/4.11 53 -> 14[label="",style="solid", color="burlywood", weight=3]; 9.90/4.11 12[label="error []",fontsize=16,color="red",shape="box"];13[label="emEm4 (primEqInt (Pos zv40) (Pos Zero)) (zv30 : zv31) (Pos zv40)",fontsize=16,color="burlywood",shape="box"];54[label="zv40/Succ zv400",fontsize=10,color="white",style="solid",shape="box"];13 -> 54[label="",style="solid", color="burlywood", weight=9]; 9.90/4.11 54 -> 15[label="",style="solid", color="burlywood", weight=3]; 9.90/4.11 55[label="zv40/Zero",fontsize=10,color="white",style="solid",shape="box"];13 -> 55[label="",style="solid", color="burlywood", weight=9]; 9.90/4.11 55 -> 16[label="",style="solid", color="burlywood", weight=3]; 9.90/4.11 14[label="emEm4 (primEqInt (Neg zv40) (Pos Zero)) (zv30 : zv31) (Neg zv40)",fontsize=16,color="burlywood",shape="box"];56[label="zv40/Succ zv400",fontsize=10,color="white",style="solid",shape="box"];14 -> 56[label="",style="solid", color="burlywood", weight=9]; 9.90/4.11 56 -> 17[label="",style="solid", color="burlywood", weight=3]; 9.90/4.11 57[label="zv40/Zero",fontsize=10,color="white",style="solid",shape="box"];14 -> 57[label="",style="solid", color="burlywood", weight=9]; 9.90/4.11 57 -> 18[label="",style="solid", color="burlywood", weight=3]; 9.90/4.11 15[label="emEm4 (primEqInt (Pos (Succ zv400)) (Pos Zero)) (zv30 : zv31) (Pos (Succ zv400))",fontsize=16,color="black",shape="box"];15 -> 19[label="",style="solid", color="black", weight=3]; 9.90/4.11 16[label="emEm4 (primEqInt (Pos Zero) (Pos Zero)) (zv30 : zv31) (Pos Zero)",fontsize=16,color="black",shape="box"];16 -> 20[label="",style="solid", color="black", weight=3]; 9.90/4.11 17[label="emEm4 (primEqInt (Neg (Succ zv400)) (Pos Zero)) (zv30 : zv31) (Neg (Succ zv400))",fontsize=16,color="black",shape="box"];17 -> 21[label="",style="solid", color="black", weight=3]; 9.90/4.11 18[label="emEm4 (primEqInt (Neg Zero) (Pos Zero)) (zv30 : zv31) (Neg Zero)",fontsize=16,color="black",shape="box"];18 -> 22[label="",style="solid", color="black", weight=3]; 9.90/4.11 19[label="emEm4 False (zv30 : zv31) (Pos (Succ zv400))",fontsize=16,color="black",shape="box"];19 -> 23[label="",style="solid", color="black", weight=3]; 9.90/4.11 20[label="emEm4 True (zv30 : zv31) (Pos Zero)",fontsize=16,color="black",shape="box"];20 -> 24[label="",style="solid", color="black", weight=3]; 9.90/4.11 21[label="emEm4 False (zv30 : zv31) (Neg (Succ zv400))",fontsize=16,color="black",shape="box"];21 -> 25[label="",style="solid", color="black", weight=3]; 9.90/4.11 22[label="emEm4 True (zv30 : zv31) (Neg Zero)",fontsize=16,color="black",shape="box"];22 -> 26[label="",style="solid", color="black", weight=3]; 9.90/4.11 23[label="emEm3 (zv30 : zv31) (Pos (Succ zv400))",fontsize=16,color="black",shape="box"];23 -> 27[label="",style="solid", color="black", weight=3]; 9.90/4.11 24[label="zv30",fontsize=16,color="green",shape="box"];25[label="emEm3 (zv30 : zv31) (Neg (Succ zv400))",fontsize=16,color="black",shape="box"];25 -> 28[label="",style="solid", color="black", weight=3]; 9.90/4.11 26[label="zv30",fontsize=16,color="green",shape="box"];27[label="emEm2 zv30 zv31 (Pos (Succ zv400)) (Pos (Succ zv400) > Pos Zero)",fontsize=16,color="black",shape="box"];27 -> 29[label="",style="solid", color="black", weight=3]; 9.90/4.11 28[label="emEm2 zv30 zv31 (Neg (Succ zv400)) (Neg (Succ zv400) > Pos Zero)",fontsize=16,color="black",shape="box"];28 -> 30[label="",style="solid", color="black", weight=3]; 9.90/4.11 29[label="emEm2 zv30 zv31 (Pos (Succ zv400)) (compare (Pos (Succ zv400)) (Pos Zero) == GT)",fontsize=16,color="black",shape="box"];29 -> 31[label="",style="solid", color="black", weight=3]; 9.90/4.11 30[label="emEm2 zv30 zv31 (Neg (Succ zv400)) (compare (Neg (Succ zv400)) (Pos Zero) == GT)",fontsize=16,color="black",shape="box"];30 -> 32[label="",style="solid", color="black", weight=3]; 9.90/4.11 31[label="emEm2 zv30 zv31 (Pos (Succ zv400)) (primCmpInt (Pos (Succ zv400)) (Pos Zero) == GT)",fontsize=16,color="black",shape="box"];31 -> 33[label="",style="solid", color="black", weight=3]; 9.90/4.11 32[label="emEm2 zv30 zv31 (Neg (Succ zv400)) (primCmpInt (Neg (Succ zv400)) (Pos Zero) == GT)",fontsize=16,color="black",shape="box"];32 -> 34[label="",style="solid", color="black", weight=3]; 9.90/4.11 33[label="emEm2 zv30 zv31 (Pos (Succ zv400)) (primCmpNat (Succ zv400) Zero == GT)",fontsize=16,color="black",shape="box"];33 -> 35[label="",style="solid", color="black", weight=3]; 9.90/4.11 34[label="emEm2 zv30 zv31 (Neg (Succ zv400)) (LT == GT)",fontsize=16,color="black",shape="box"];34 -> 36[label="",style="solid", color="black", weight=3]; 9.90/4.11 35[label="emEm2 zv30 zv31 (Pos (Succ zv400)) (GT == GT)",fontsize=16,color="black",shape="box"];35 -> 37[label="",style="solid", color="black", weight=3]; 9.90/4.11 36[label="emEm2 zv30 zv31 (Neg (Succ zv400)) False",fontsize=16,color="black",shape="box"];36 -> 38[label="",style="solid", color="black", weight=3]; 9.90/4.11 37[label="emEm2 zv30 zv31 (Pos (Succ zv400)) True",fontsize=16,color="black",shape="box"];37 -> 39[label="",style="solid", color="black", weight=3]; 9.90/4.11 38[label="emEm1 (zv30 : zv31) (Neg (Succ zv400))",fontsize=16,color="black",shape="box"];38 -> 40[label="",style="solid", color="black", weight=3]; 9.90/4.11 39 -> 4[label="",style="dashed", color="red", weight=0]; 9.90/4.11 39[label="zv31 !! (Pos (Succ zv400) - Pos (Succ Zero))",fontsize=16,color="magenta"];39 -> 41[label="",style="dashed", color="magenta", weight=3]; 9.90/4.11 39 -> 42[label="",style="dashed", color="magenta", weight=3]; 9.90/4.11 40 -> 10[label="",style="dashed", color="red", weight=0]; 9.90/4.11 40[label="error []",fontsize=16,color="magenta"];41[label="zv31",fontsize=16,color="green",shape="box"];42[label="Pos (Succ zv400) - Pos (Succ Zero)",fontsize=16,color="black",shape="box"];42 -> 43[label="",style="solid", color="black", weight=3]; 9.90/4.11 43[label="primMinusInt (Pos (Succ zv400)) (Pos (Succ Zero))",fontsize=16,color="black",shape="box"];43 -> 44[label="",style="solid", color="black", weight=3]; 9.90/4.11 44[label="primMinusNat (Succ zv400) (Succ Zero)",fontsize=16,color="black",shape="box"];44 -> 45[label="",style="solid", color="black", weight=3]; 9.90/4.11 45[label="primMinusNat zv400 Zero",fontsize=16,color="burlywood",shape="box"];58[label="zv400/Succ zv4000",fontsize=10,color="white",style="solid",shape="box"];45 -> 58[label="",style="solid", color="burlywood", weight=9]; 9.90/4.11 58 -> 46[label="",style="solid", color="burlywood", weight=3]; 9.90/4.11 59[label="zv400/Zero",fontsize=10,color="white",style="solid",shape="box"];45 -> 59[label="",style="solid", color="burlywood", weight=9]; 9.90/4.11 59 -> 47[label="",style="solid", color="burlywood", weight=3]; 9.90/4.11 46[label="primMinusNat (Succ zv4000) Zero",fontsize=16,color="black",shape="box"];46 -> 48[label="",style="solid", color="black", weight=3]; 9.90/4.11 47[label="primMinusNat Zero Zero",fontsize=16,color="black",shape="box"];47 -> 49[label="",style="solid", color="black", weight=3]; 9.90/4.11 48[label="Pos (Succ zv4000)",fontsize=16,color="green",shape="box"];49[label="Pos Zero",fontsize=16,color="green",shape="box"];} 9.90/4.11 9.90/4.11 ---------------------------------------- 9.90/4.11 9.90/4.11 (8) 9.90/4.11 Obligation: 9.90/4.11 Q DP problem: 9.90/4.11 The TRS P consists of the following rules: 9.90/4.11 9.90/4.11 new_emEm(:(zv30, zv31), Pos(Succ(zv400)), h) -> new_emEm(zv31, new_primMinusNat(zv400), h) 9.90/4.11 9.90/4.11 The TRS R consists of the following rules: 9.90/4.11 9.90/4.11 new_primMinusNat(Succ(zv4000)) -> Pos(Succ(zv4000)) 9.90/4.11 new_primMinusNat(Zero) -> Pos(Zero) 9.90/4.11 9.90/4.11 The set Q consists of the following terms: 9.90/4.11 9.90/4.11 new_primMinusNat(Succ(x0)) 9.90/4.11 new_primMinusNat(Zero) 9.90/4.11 9.90/4.11 We have to consider all minimal (P,Q,R)-chains. 9.90/4.11 ---------------------------------------- 9.90/4.11 9.90/4.11 (9) TransformationProof (EQUIVALENT) 9.90/4.11 By narrowing [LPAR04] the rule new_emEm(:(zv30, zv31), Pos(Succ(zv400)), h) -> new_emEm(zv31, new_primMinusNat(zv400), h) at position [1] we obtained the following new rules [LPAR04]: 9.90/4.11 9.90/4.11 (new_emEm(:(y0, y1), Pos(Succ(Succ(x0))), y3) -> new_emEm(y1, Pos(Succ(x0)), y3),new_emEm(:(y0, y1), Pos(Succ(Succ(x0))), y3) -> new_emEm(y1, Pos(Succ(x0)), y3)) 9.90/4.11 (new_emEm(:(y0, y1), Pos(Succ(Zero)), y3) -> new_emEm(y1, Pos(Zero), y3),new_emEm(:(y0, y1), Pos(Succ(Zero)), y3) -> new_emEm(y1, Pos(Zero), y3)) 9.90/4.11 9.90/4.11 9.90/4.11 ---------------------------------------- 9.90/4.11 9.90/4.11 (10) 9.90/4.11 Obligation: 9.90/4.11 Q DP problem: 9.90/4.11 The TRS P consists of the following rules: 9.90/4.11 9.90/4.11 new_emEm(:(y0, y1), Pos(Succ(Succ(x0))), y3) -> new_emEm(y1, Pos(Succ(x0)), y3) 9.90/4.11 new_emEm(:(y0, y1), Pos(Succ(Zero)), y3) -> new_emEm(y1, Pos(Zero), y3) 9.90/4.11 9.90/4.11 The TRS R consists of the following rules: 9.90/4.11 9.90/4.11 new_primMinusNat(Succ(zv4000)) -> Pos(Succ(zv4000)) 9.90/4.11 new_primMinusNat(Zero) -> Pos(Zero) 9.90/4.11 9.90/4.11 The set Q consists of the following terms: 9.90/4.11 9.90/4.11 new_primMinusNat(Succ(x0)) 9.90/4.11 new_primMinusNat(Zero) 9.90/4.11 9.90/4.11 We have to consider all minimal (P,Q,R)-chains. 9.90/4.11 ---------------------------------------- 9.90/4.11 9.90/4.11 (11) DependencyGraphProof (EQUIVALENT) 9.90/4.11 The approximation of the Dependency Graph [LPAR04,FROCOS05,EDGSTAR] contains 1 SCC with 1 less node. 9.90/4.11 ---------------------------------------- 9.90/4.11 9.90/4.11 (12) 9.90/4.11 Obligation: 9.90/4.11 Q DP problem: 9.90/4.11 The TRS P consists of the following rules: 9.90/4.11 9.90/4.11 new_emEm(:(y0, y1), Pos(Succ(Succ(x0))), y3) -> new_emEm(y1, Pos(Succ(x0)), y3) 9.90/4.11 9.90/4.11 The TRS R consists of the following rules: 9.90/4.11 9.90/4.11 new_primMinusNat(Succ(zv4000)) -> Pos(Succ(zv4000)) 9.90/4.11 new_primMinusNat(Zero) -> Pos(Zero) 9.90/4.11 9.90/4.11 The set Q consists of the following terms: 9.90/4.11 9.90/4.11 new_primMinusNat(Succ(x0)) 9.90/4.11 new_primMinusNat(Zero) 9.90/4.11 9.90/4.11 We have to consider all minimal (P,Q,R)-chains. 9.90/4.11 ---------------------------------------- 9.90/4.11 9.90/4.11 (13) UsableRulesProof (EQUIVALENT) 9.90/4.11 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. 9.90/4.11 ---------------------------------------- 9.90/4.11 9.90/4.11 (14) 9.90/4.11 Obligation: 9.90/4.11 Q DP problem: 9.90/4.11 The TRS P consists of the following rules: 9.90/4.11 9.90/4.11 new_emEm(:(y0, y1), Pos(Succ(Succ(x0))), y3) -> new_emEm(y1, Pos(Succ(x0)), y3) 9.90/4.11 9.90/4.11 R is empty. 9.90/4.11 The set Q consists of the following terms: 9.90/4.11 9.90/4.11 new_primMinusNat(Succ(x0)) 9.90/4.11 new_primMinusNat(Zero) 9.90/4.11 9.90/4.11 We have to consider all minimal (P,Q,R)-chains. 9.90/4.11 ---------------------------------------- 9.90/4.11 9.90/4.11 (15) QReductionProof (EQUIVALENT) 9.90/4.11 We deleted the following terms from Q as each root-symbol of these terms does neither occur in P nor in R.[THIEMANN]. 9.90/4.11 9.90/4.11 new_primMinusNat(Succ(x0)) 9.90/4.11 new_primMinusNat(Zero) 9.90/4.11 9.90/4.11 9.90/4.11 ---------------------------------------- 9.90/4.11 9.90/4.11 (16) 9.90/4.11 Obligation: 9.90/4.11 Q DP problem: 9.90/4.11 The TRS P consists of the following rules: 9.90/4.11 9.90/4.11 new_emEm(:(y0, y1), Pos(Succ(Succ(x0))), y3) -> new_emEm(y1, Pos(Succ(x0)), y3) 9.90/4.11 9.90/4.11 R is empty. 9.90/4.11 Q is empty. 9.90/4.11 We have to consider all minimal (P,Q,R)-chains. 9.90/4.11 ---------------------------------------- 9.90/4.11 9.90/4.11 (17) QDPSizeChangeProof (EQUIVALENT) 9.90/4.11 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. 9.90/4.11 9.90/4.11 From the DPs we obtained the following set of size-change graphs: 9.90/4.11 *new_emEm(:(y0, y1), Pos(Succ(Succ(x0))), y3) -> new_emEm(y1, Pos(Succ(x0)), y3) 9.90/4.11 The graph contains the following edges 1 > 1, 3 >= 3 9.90/4.11 9.90/4.11 9.90/4.11 ---------------------------------------- 9.90/4.11 9.90/4.11 (18) 9.90/4.11 YES 10.12/4.14 EOF