4.13/1.83 YES 4.21/1.85 proof of /export/starexec/sandbox/benchmark/theBenchmark.pl 4.21/1.85 # AProVE Commit ID: 48fb2092695e11cc9f56e44b17a92a5f88ffb256 marcel 20180622 unpublished dirty 4.21/1.85 4.21/1.85 4.21/1.85 Left Termination of the query pattern 4.21/1.85 4.21/1.85 div(g,g,a) 4.21/1.85 4.21/1.85 w.r.t. the given Prolog program could successfully be proven: 4.21/1.85 4.21/1.85 (0) Prolog 4.21/1.85 (1) PrologToPiTRSProof [SOUND, 0 ms] 4.21/1.85 (2) PiTRS 4.21/1.85 (3) DependencyPairsProof [EQUIVALENT, 2 ms] 4.21/1.85 (4) PiDP 4.21/1.85 (5) DependencyGraphProof [EQUIVALENT, 0 ms] 4.21/1.85 (6) PiDP 4.21/1.85 (7) UsableRulesProof [EQUIVALENT, 0 ms] 4.21/1.85 (8) PiDP 4.21/1.85 (9) PiDPToQDPProof [SOUND, 0 ms] 4.21/1.85 (10) QDP 4.21/1.85 (11) QDPSizeChangeProof [EQUIVALENT, 0 ms] 4.21/1.85 (12) YES 4.21/1.85 4.21/1.85 4.21/1.85 ---------------------------------------- 4.21/1.85 4.21/1.85 (0) 4.21/1.85 Obligation: 4.21/1.85 Clauses: 4.21/1.85 4.21/1.85 div(X, Y, Z) :- quot(X, Y, Y, Z). 4.21/1.85 quot(0, s(Y), s(Z), 0). 4.21/1.85 quot(s(X), s(Y), Z, U) :- quot(X, Y, Z, U). 4.21/1.85 quot(X, 0, s(Z), s(U)) :- quot(X, s(Z), s(Z), U). 4.21/1.85 4.21/1.85 4.21/1.85 Query: div(g,g,a) 4.21/1.85 ---------------------------------------- 4.21/1.85 4.21/1.85 (1) PrologToPiTRSProof (SOUND) 4.21/1.85 We use the technique of [TOCL09]. With regard to the inferred argument filtering the predicates were used in the following modes: 4.21/1.85 4.21/1.85 div_in_3: (b,b,f) 4.21/1.85 4.21/1.85 quot_in_4: (b,b,b,f) 4.21/1.85 4.21/1.85 Transforming Prolog into the following Term Rewriting System: 4.21/1.85 4.21/1.85 Pi-finite rewrite system: 4.21/1.85 The TRS R consists of the following rules: 4.21/1.85 4.21/1.85 div_in_gga(X, Y, Z) -> U1_gga(X, Y, Z, quot_in_ggga(X, Y, Y, Z)) 4.21/1.85 quot_in_ggga(0, s(Y), s(Z), 0) -> quot_out_ggga(0, s(Y), s(Z), 0) 4.21/1.85 quot_in_ggga(s(X), s(Y), Z, U) -> U2_ggga(X, Y, Z, U, quot_in_ggga(X, Y, Z, U)) 4.21/1.85 quot_in_ggga(X, 0, s(Z), s(U)) -> U3_ggga(X, Z, U, quot_in_ggga(X, s(Z), s(Z), U)) 4.21/1.85 U3_ggga(X, Z, U, quot_out_ggga(X, s(Z), s(Z), U)) -> quot_out_ggga(X, 0, s(Z), s(U)) 4.21/1.85 U2_ggga(X, Y, Z, U, quot_out_ggga(X, Y, Z, U)) -> quot_out_ggga(s(X), s(Y), Z, U) 4.21/1.85 U1_gga(X, Y, Z, quot_out_ggga(X, Y, Y, Z)) -> div_out_gga(X, Y, Z) 4.21/1.85 4.21/1.85 The argument filtering Pi contains the following mapping: 4.21/1.85 div_in_gga(x1, x2, x3) = div_in_gga(x1, x2) 4.21/1.85 4.21/1.85 U1_gga(x1, x2, x3, x4) = U1_gga(x1, x2, x4) 4.21/1.85 4.21/1.85 quot_in_ggga(x1, x2, x3, x4) = quot_in_ggga(x1, x2, x3) 4.21/1.85 4.21/1.85 0 = 0 4.21/1.85 4.21/1.85 s(x1) = s(x1) 4.21/1.85 4.21/1.85 quot_out_ggga(x1, x2, x3, x4) = quot_out_ggga(x1, x2, x3, x4) 4.21/1.85 4.21/1.85 U2_ggga(x1, x2, x3, x4, x5) = U2_ggga(x1, x2, x3, x5) 4.21/1.85 4.21/1.85 U3_ggga(x1, x2, x3, x4) = U3_ggga(x1, x2, x4) 4.21/1.85 4.21/1.85 div_out_gga(x1, x2, x3) = div_out_gga(x1, x2, x3) 4.21/1.85 4.21/1.85 4.21/1.85 4.21/1.85 4.21/1.85 4.21/1.85 Infinitary Constructor Rewriting Termination of PiTRS implies Termination of Prolog 4.21/1.85 4.21/1.85 4.21/1.85 4.21/1.85 ---------------------------------------- 4.21/1.85 4.21/1.85 (2) 4.21/1.85 Obligation: 4.21/1.85 Pi-finite rewrite system: 4.21/1.85 The TRS R consists of the following rules: 4.21/1.85 4.21/1.85 div_in_gga(X, Y, Z) -> U1_gga(X, Y, Z, quot_in_ggga(X, Y, Y, Z)) 4.21/1.85 quot_in_ggga(0, s(Y), s(Z), 0) -> quot_out_ggga(0, s(Y), s(Z), 0) 4.21/1.85 quot_in_ggga(s(X), s(Y), Z, U) -> U2_ggga(X, Y, Z, U, quot_in_ggga(X, Y, Z, U)) 4.21/1.85 quot_in_ggga(X, 0, s(Z), s(U)) -> U3_ggga(X, Z, U, quot_in_ggga(X, s(Z), s(Z), U)) 4.21/1.85 U3_ggga(X, Z, U, quot_out_ggga(X, s(Z), s(Z), U)) -> quot_out_ggga(X, 0, s(Z), s(U)) 4.21/1.85 U2_ggga(X, Y, Z, U, quot_out_ggga(X, Y, Z, U)) -> quot_out_ggga(s(X), s(Y), Z, U) 4.21/1.85 U1_gga(X, Y, Z, quot_out_ggga(X, Y, Y, Z)) -> div_out_gga(X, Y, Z) 4.21/1.85 4.21/1.85 The argument filtering Pi contains the following mapping: 4.21/1.85 div_in_gga(x1, x2, x3) = div_in_gga(x1, x2) 4.21/1.85 4.21/1.85 U1_gga(x1, x2, x3, x4) = U1_gga(x1, x2, x4) 4.21/1.85 4.21/1.85 quot_in_ggga(x1, x2, x3, x4) = quot_in_ggga(x1, x2, x3) 4.21/1.85 4.21/1.85 0 = 0 4.21/1.85 4.21/1.85 s(x1) = s(x1) 4.21/1.85 4.21/1.85 quot_out_ggga(x1, x2, x3, x4) = quot_out_ggga(x1, x2, x3, x4) 4.21/1.85 4.21/1.85 U2_ggga(x1, x2, x3, x4, x5) = U2_ggga(x1, x2, x3, x5) 4.21/1.85 4.21/1.85 U3_ggga(x1, x2, x3, x4) = U3_ggga(x1, x2, x4) 4.21/1.85 4.21/1.85 div_out_gga(x1, x2, x3) = div_out_gga(x1, x2, x3) 4.21/1.85 4.21/1.85 4.21/1.85 4.21/1.85 ---------------------------------------- 4.21/1.85 4.21/1.85 (3) DependencyPairsProof (EQUIVALENT) 4.21/1.85 Using Dependency Pairs [AG00,LOPSTR] we result in the following initial DP problem: 4.21/1.85 Pi DP problem: 4.21/1.85 The TRS P consists of the following rules: 4.21/1.85 4.21/1.85 DIV_IN_GGA(X, Y, Z) -> U1_GGA(X, Y, Z, quot_in_ggga(X, Y, Y, Z)) 4.21/1.85 DIV_IN_GGA(X, Y, Z) -> QUOT_IN_GGGA(X, Y, Y, Z) 4.21/1.85 QUOT_IN_GGGA(s(X), s(Y), Z, U) -> U2_GGGA(X, Y, Z, U, quot_in_ggga(X, Y, Z, U)) 4.21/1.85 QUOT_IN_GGGA(s(X), s(Y), Z, U) -> QUOT_IN_GGGA(X, Y, Z, U) 4.21/1.85 QUOT_IN_GGGA(X, 0, s(Z), s(U)) -> U3_GGGA(X, Z, U, quot_in_ggga(X, s(Z), s(Z), U)) 4.21/1.85 QUOT_IN_GGGA(X, 0, s(Z), s(U)) -> QUOT_IN_GGGA(X, s(Z), s(Z), U) 4.21/1.85 4.21/1.85 The TRS R consists of the following rules: 4.21/1.85 4.21/1.85 div_in_gga(X, Y, Z) -> U1_gga(X, Y, Z, quot_in_ggga(X, Y, Y, Z)) 4.21/1.85 quot_in_ggga(0, s(Y), s(Z), 0) -> quot_out_ggga(0, s(Y), s(Z), 0) 4.21/1.85 quot_in_ggga(s(X), s(Y), Z, U) -> U2_ggga(X, Y, Z, U, quot_in_ggga(X, Y, Z, U)) 4.21/1.85 quot_in_ggga(X, 0, s(Z), s(U)) -> U3_ggga(X, Z, U, quot_in_ggga(X, s(Z), s(Z), U)) 4.21/1.85 U3_ggga(X, Z, U, quot_out_ggga(X, s(Z), s(Z), U)) -> quot_out_ggga(X, 0, s(Z), s(U)) 4.21/1.85 U2_ggga(X, Y, Z, U, quot_out_ggga(X, Y, Z, U)) -> quot_out_ggga(s(X), s(Y), Z, U) 4.21/1.85 U1_gga(X, Y, Z, quot_out_ggga(X, Y, Y, Z)) -> div_out_gga(X, Y, Z) 4.21/1.85 4.21/1.85 The argument filtering Pi contains the following mapping: 4.21/1.85 div_in_gga(x1, x2, x3) = div_in_gga(x1, x2) 4.21/1.85 4.21/1.85 U1_gga(x1, x2, x3, x4) = U1_gga(x1, x2, x4) 4.21/1.85 4.21/1.85 quot_in_ggga(x1, x2, x3, x4) = quot_in_ggga(x1, x2, x3) 4.21/1.85 4.21/1.85 0 = 0 4.21/1.85 4.21/1.85 s(x1) = s(x1) 4.21/1.85 4.21/1.85 quot_out_ggga(x1, x2, x3, x4) = quot_out_ggga(x1, x2, x3, x4) 4.21/1.85 4.21/1.85 U2_ggga(x1, x2, x3, x4, x5) = U2_ggga(x1, x2, x3, x5) 4.21/1.85 4.21/1.85 U3_ggga(x1, x2, x3, x4) = U3_ggga(x1, x2, x4) 4.21/1.85 4.21/1.85 div_out_gga(x1, x2, x3) = div_out_gga(x1, x2, x3) 4.21/1.85 4.21/1.85 DIV_IN_GGA(x1, x2, x3) = DIV_IN_GGA(x1, x2) 4.21/1.85 4.21/1.85 U1_GGA(x1, x2, x3, x4) = U1_GGA(x1, x2, x4) 4.21/1.85 4.21/1.85 QUOT_IN_GGGA(x1, x2, x3, x4) = QUOT_IN_GGGA(x1, x2, x3) 4.21/1.85 4.21/1.85 U2_GGGA(x1, x2, x3, x4, x5) = U2_GGGA(x1, x2, x3, x5) 4.21/1.85 4.21/1.85 U3_GGGA(x1, x2, x3, x4) = U3_GGGA(x1, x2, x4) 4.21/1.85 4.21/1.85 4.21/1.85 We have to consider all (P,R,Pi)-chains 4.21/1.85 ---------------------------------------- 4.21/1.85 4.21/1.85 (4) 4.21/1.85 Obligation: 4.21/1.85 Pi DP problem: 4.21/1.85 The TRS P consists of the following rules: 4.21/1.85 4.21/1.85 DIV_IN_GGA(X, Y, Z) -> U1_GGA(X, Y, Z, quot_in_ggga(X, Y, Y, Z)) 4.21/1.85 DIV_IN_GGA(X, Y, Z) -> QUOT_IN_GGGA(X, Y, Y, Z) 4.21/1.85 QUOT_IN_GGGA(s(X), s(Y), Z, U) -> U2_GGGA(X, Y, Z, U, quot_in_ggga(X, Y, Z, U)) 4.21/1.85 QUOT_IN_GGGA(s(X), s(Y), Z, U) -> QUOT_IN_GGGA(X, Y, Z, U) 4.21/1.85 QUOT_IN_GGGA(X, 0, s(Z), s(U)) -> U3_GGGA(X, Z, U, quot_in_ggga(X, s(Z), s(Z), U)) 4.21/1.85 QUOT_IN_GGGA(X, 0, s(Z), s(U)) -> QUOT_IN_GGGA(X, s(Z), s(Z), U) 4.21/1.85 4.21/1.85 The TRS R consists of the following rules: 4.21/1.85 4.21/1.85 div_in_gga(X, Y, Z) -> U1_gga(X, Y, Z, quot_in_ggga(X, Y, Y, Z)) 4.21/1.85 quot_in_ggga(0, s(Y), s(Z), 0) -> quot_out_ggga(0, s(Y), s(Z), 0) 4.21/1.85 quot_in_ggga(s(X), s(Y), Z, U) -> U2_ggga(X, Y, Z, U, quot_in_ggga(X, Y, Z, U)) 4.21/1.85 quot_in_ggga(X, 0, s(Z), s(U)) -> U3_ggga(X, Z, U, quot_in_ggga(X, s(Z), s(Z), U)) 4.21/1.85 U3_ggga(X, Z, U, quot_out_ggga(X, s(Z), s(Z), U)) -> quot_out_ggga(X, 0, s(Z), s(U)) 4.21/1.85 U2_ggga(X, Y, Z, U, quot_out_ggga(X, Y, Z, U)) -> quot_out_ggga(s(X), s(Y), Z, U) 4.21/1.85 U1_gga(X, Y, Z, quot_out_ggga(X, Y, Y, Z)) -> div_out_gga(X, Y, Z) 4.21/1.85 4.21/1.85 The argument filtering Pi contains the following mapping: 4.21/1.85 div_in_gga(x1, x2, x3) = div_in_gga(x1, x2) 4.21/1.85 4.21/1.85 U1_gga(x1, x2, x3, x4) = U1_gga(x1, x2, x4) 4.21/1.85 4.21/1.85 quot_in_ggga(x1, x2, x3, x4) = quot_in_ggga(x1, x2, x3) 4.21/1.85 4.21/1.85 0 = 0 4.21/1.85 4.21/1.85 s(x1) = s(x1) 4.21/1.85 4.21/1.85 quot_out_ggga(x1, x2, x3, x4) = quot_out_ggga(x1, x2, x3, x4) 4.21/1.85 4.21/1.85 U2_ggga(x1, x2, x3, x4, x5) = U2_ggga(x1, x2, x3, x5) 4.21/1.85 4.21/1.85 U3_ggga(x1, x2, x3, x4) = U3_ggga(x1, x2, x4) 4.21/1.85 4.21/1.85 div_out_gga(x1, x2, x3) = div_out_gga(x1, x2, x3) 4.21/1.85 4.21/1.85 DIV_IN_GGA(x1, x2, x3) = DIV_IN_GGA(x1, x2) 4.21/1.85 4.21/1.85 U1_GGA(x1, x2, x3, x4) = U1_GGA(x1, x2, x4) 4.21/1.85 4.21/1.85 QUOT_IN_GGGA(x1, x2, x3, x4) = QUOT_IN_GGGA(x1, x2, x3) 4.21/1.85 4.21/1.85 U2_GGGA(x1, x2, x3, x4, x5) = U2_GGGA(x1, x2, x3, x5) 4.21/1.85 4.21/1.85 U3_GGGA(x1, x2, x3, x4) = U3_GGGA(x1, x2, x4) 4.21/1.85 4.21/1.85 4.21/1.85 We have to consider all (P,R,Pi)-chains 4.21/1.85 ---------------------------------------- 4.21/1.85 4.21/1.85 (5) DependencyGraphProof (EQUIVALENT) 4.21/1.85 The approximation of the Dependency Graph [LOPSTR] contains 1 SCC with 4 less nodes. 4.21/1.85 ---------------------------------------- 4.21/1.85 4.21/1.85 (6) 4.21/1.85 Obligation: 4.21/1.85 Pi DP problem: 4.21/1.85 The TRS P consists of the following rules: 4.21/1.85 4.21/1.85 QUOT_IN_GGGA(X, 0, s(Z), s(U)) -> QUOT_IN_GGGA(X, s(Z), s(Z), U) 4.21/1.85 QUOT_IN_GGGA(s(X), s(Y), Z, U) -> QUOT_IN_GGGA(X, Y, Z, U) 4.21/1.85 4.21/1.85 The TRS R consists of the following rules: 4.21/1.85 4.21/1.85 div_in_gga(X, Y, Z) -> U1_gga(X, Y, Z, quot_in_ggga(X, Y, Y, Z)) 4.21/1.85 quot_in_ggga(0, s(Y), s(Z), 0) -> quot_out_ggga(0, s(Y), s(Z), 0) 4.21/1.85 quot_in_ggga(s(X), s(Y), Z, U) -> U2_ggga(X, Y, Z, U, quot_in_ggga(X, Y, Z, U)) 4.21/1.85 quot_in_ggga(X, 0, s(Z), s(U)) -> U3_ggga(X, Z, U, quot_in_ggga(X, s(Z), s(Z), U)) 4.21/1.85 U3_ggga(X, Z, U, quot_out_ggga(X, s(Z), s(Z), U)) -> quot_out_ggga(X, 0, s(Z), s(U)) 4.21/1.85 U2_ggga(X, Y, Z, U, quot_out_ggga(X, Y, Z, U)) -> quot_out_ggga(s(X), s(Y), Z, U) 4.21/1.85 U1_gga(X, Y, Z, quot_out_ggga(X, Y, Y, Z)) -> div_out_gga(X, Y, Z) 4.21/1.85 4.21/1.85 The argument filtering Pi contains the following mapping: 4.21/1.85 div_in_gga(x1, x2, x3) = div_in_gga(x1, x2) 4.21/1.85 4.21/1.85 U1_gga(x1, x2, x3, x4) = U1_gga(x1, x2, x4) 4.21/1.85 4.21/1.85 quot_in_ggga(x1, x2, x3, x4) = quot_in_ggga(x1, x2, x3) 4.21/1.85 4.21/1.85 0 = 0 4.21/1.85 4.21/1.85 s(x1) = s(x1) 4.21/1.85 4.21/1.85 quot_out_ggga(x1, x2, x3, x4) = quot_out_ggga(x1, x2, x3, x4) 4.21/1.85 4.21/1.85 U2_ggga(x1, x2, x3, x4, x5) = U2_ggga(x1, x2, x3, x5) 4.21/1.85 4.21/1.85 U3_ggga(x1, x2, x3, x4) = U3_ggga(x1, x2, x4) 4.21/1.85 4.21/1.85 div_out_gga(x1, x2, x3) = div_out_gga(x1, x2, x3) 4.21/1.85 4.21/1.85 QUOT_IN_GGGA(x1, x2, x3, x4) = QUOT_IN_GGGA(x1, x2, x3) 4.21/1.85 4.21/1.85 4.21/1.85 We have to consider all (P,R,Pi)-chains 4.21/1.85 ---------------------------------------- 4.21/1.85 4.21/1.85 (7) UsableRulesProof (EQUIVALENT) 4.21/1.85 For (infinitary) constructor rewriting [LOPSTR] we can delete all non-usable rules from R. 4.21/1.85 ---------------------------------------- 4.21/1.85 4.21/1.85 (8) 4.21/1.85 Obligation: 4.21/1.85 Pi DP problem: 4.21/1.85 The TRS P consists of the following rules: 4.21/1.85 4.21/1.85 QUOT_IN_GGGA(X, 0, s(Z), s(U)) -> QUOT_IN_GGGA(X, s(Z), s(Z), U) 4.21/1.85 QUOT_IN_GGGA(s(X), s(Y), Z, U) -> QUOT_IN_GGGA(X, Y, Z, U) 4.21/1.85 4.21/1.85 R is empty. 4.21/1.85 The argument filtering Pi contains the following mapping: 4.21/1.85 0 = 0 4.21/1.85 4.21/1.85 s(x1) = s(x1) 4.21/1.85 4.21/1.85 QUOT_IN_GGGA(x1, x2, x3, x4) = QUOT_IN_GGGA(x1, x2, x3) 4.21/1.85 4.21/1.85 4.21/1.85 We have to consider all (P,R,Pi)-chains 4.21/1.85 ---------------------------------------- 4.21/1.85 4.21/1.85 (9) PiDPToQDPProof (SOUND) 4.21/1.85 Transforming (infinitary) constructor rewriting Pi-DP problem [LOPSTR] into ordinary QDP problem [LPAR04] by application of Pi. 4.21/1.85 ---------------------------------------- 4.21/1.85 4.21/1.85 (10) 4.21/1.85 Obligation: 4.21/1.85 Q DP problem: 4.21/1.85 The TRS P consists of the following rules: 4.21/1.85 4.21/1.85 QUOT_IN_GGGA(X, 0, s(Z)) -> QUOT_IN_GGGA(X, s(Z), s(Z)) 4.21/1.85 QUOT_IN_GGGA(s(X), s(Y), Z) -> QUOT_IN_GGGA(X, Y, Z) 4.21/1.85 4.21/1.85 R is empty. 4.21/1.85 Q is empty. 4.21/1.85 We have to consider all (P,Q,R)-chains. 4.21/1.85 ---------------------------------------- 4.21/1.85 4.21/1.85 (11) QDPSizeChangeProof (EQUIVALENT) 4.21/1.85 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. 4.21/1.85 4.21/1.85 From the DPs we obtained the following set of size-change graphs: 4.21/1.85 *QUOT_IN_GGGA(s(X), s(Y), Z) -> QUOT_IN_GGGA(X, Y, Z) 4.21/1.85 The graph contains the following edges 1 > 1, 2 > 2, 3 >= 3 4.21/1.85 4.21/1.85 4.21/1.85 *QUOT_IN_GGGA(X, 0, s(Z)) -> QUOT_IN_GGGA(X, s(Z), s(Z)) 4.21/1.85 The graph contains the following edges 1 >= 1, 3 >= 2, 3 >= 3 4.21/1.85 4.21/1.85 4.21/1.85 ---------------------------------------- 4.21/1.85 4.21/1.85 (12) 4.21/1.85 YES 4.21/1.88 EOF