*** 1 Progress [(?,O(n^3))] *** Considered Problem: Strict DP Rules: Strict TRS Rules: gcd(0(),y) -> y gcd(s(x),0()) -> s(x) gcd(s(x),s(y)) -> if_gcd(le(y,x),s(x),s(y)) if_gcd(false(),s(x),s(y)) -> gcd(minus(y,x),s(x)) if_gcd(true(),s(x),s(y)) -> gcd(minus(x,y),s(y)) if_minus(false(),s(x),y) -> s(minus(x,y)) if_minus(true(),s(x),y) -> 0() le(0(),y) -> true() le(s(x),0()) -> false() le(s(x),s(y)) -> le(x,y) minus(0(),y) -> 0() minus(s(x),y) -> if_minus(le(s(x),y),s(x),y) Weak DP Rules: Weak TRS Rules: Signature: {gcd/2,if_gcd/3,if_minus/3,le/2,minus/2} / {0/0,false/0,s/1,true/0} Obligation: Innermost basic terms: {gcd,if_gcd,if_minus,le,minus}/{0,false,s,true} Applied Processor: DependencyPairs {dpKind_ = DT} Proof: We add the following dependency tuples: Strict DPs gcd#(0(),y) -> c_1() gcd#(s(x),0()) -> c_2() gcd#(s(x),s(y)) -> c_3(if_gcd#(le(y,x),s(x),s(y)),le#(y,x)) if_gcd#(false(),s(x),s(y)) -> c_4(gcd#(minus(y,x),s(x)),minus#(y,x)) if_gcd#(true(),s(x),s(y)) -> c_5(gcd#(minus(x,y),s(y)),minus#(x,y)) if_minus#(false(),s(x),y) -> c_6(minus#(x,y)) if_minus#(true(),s(x),y) -> c_7() le#(0(),y) -> c_8() le#(s(x),0()) -> c_9() le#(s(x),s(y)) -> c_10(le#(x,y)) minus#(0(),y) -> c_11() minus#(s(x),y) -> c_12(if_minus#(le(s(x),y),s(x),y),le#(s(x),y)) Weak DPs and mark the set of starting terms. *** 1.1 Progress [(?,O(n^3))] *** Considered Problem: Strict DP Rules: gcd#(0(),y) -> c_1() gcd#(s(x),0()) -> c_2() gcd#(s(x),s(y)) -> c_3(if_gcd#(le(y,x),s(x),s(y)),le#(y,x)) if_gcd#(false(),s(x),s(y)) -> c_4(gcd#(minus(y,x),s(x)),minus#(y,x)) if_gcd#(true(),s(x),s(y)) -> c_5(gcd#(minus(x,y),s(y)),minus#(x,y)) if_minus#(false(),s(x),y) -> c_6(minus#(x,y)) if_minus#(true(),s(x),y) -> c_7() le#(0(),y) -> c_8() le#(s(x),0()) -> c_9() le#(s(x),s(y)) -> c_10(le#(x,y)) minus#(0(),y) -> c_11() minus#(s(x),y) -> c_12(if_minus#(le(s(x),y),s(x),y),le#(s(x),y)) Strict TRS Rules: Weak DP Rules: Weak TRS Rules: gcd(0(),y) -> y gcd(s(x),0()) -> s(x) gcd(s(x),s(y)) -> if_gcd(le(y,x),s(x),s(y)) if_gcd(false(),s(x),s(y)) -> gcd(minus(y,x),s(x)) if_gcd(true(),s(x),s(y)) -> gcd(minus(x,y),s(y)) if_minus(false(),s(x),y) -> s(minus(x,y)) if_minus(true(),s(x),y) -> 0() le(0(),y) -> true() le(s(x),0()) -> false() le(s(x),s(y)) -> le(x,y) minus(0(),y) -> 0() minus(s(x),y) -> if_minus(le(s(x),y),s(x),y) Signature: {gcd/2,if_gcd/3,if_minus/3,le/2,minus/2,gcd#/2,if_gcd#/3,if_minus#/3,le#/2,minus#/2} / {0/0,false/0,s/1,true/0,c_1/0,c_2/0,c_3/2,c_4/2,c_5/2,c_6/1,c_7/0,c_8/0,c_9/0,c_10/1,c_11/0,c_12/2} Obligation: Innermost basic terms: {gcd#,if_gcd#,if_minus#,le#,minus#}/{0,false,s,true} Applied Processor: UsableRules Proof: We replace rewrite rules by usable rules: if_minus(false(),s(x),y) -> s(minus(x,y)) if_minus(true(),s(x),y) -> 0() le(0(),y) -> true() le(s(x),0()) -> false() le(s(x),s(y)) -> le(x,y) minus(0(),y) -> 0() minus(s(x),y) -> if_minus(le(s(x),y),s(x),y) gcd#(0(),y) -> c_1() gcd#(s(x),0()) -> c_2() gcd#(s(x),s(y)) -> c_3(if_gcd#(le(y,x),s(x),s(y)),le#(y,x)) if_gcd#(false(),s(x),s(y)) -> c_4(gcd#(minus(y,x),s(x)),minus#(y,x)) if_gcd#(true(),s(x),s(y)) -> c_5(gcd#(minus(x,y),s(y)),minus#(x,y)) if_minus#(false(),s(x),y) -> c_6(minus#(x,y)) if_minus#(true(),s(x),y) -> c_7() le#(0(),y) -> c_8() le#(s(x),0()) -> c_9() le#(s(x),s(y)) -> c_10(le#(x,y)) minus#(0(),y) -> c_11() minus#(s(x),y) -> c_12(if_minus#(le(s(x),y),s(x),y),le#(s(x),y)) *** 1.1.1 Progress [(?,O(n^3))] *** Considered Problem: Strict DP Rules: gcd#(0(),y) -> c_1() gcd#(s(x),0()) -> c_2() gcd#(s(x),s(y)) -> c_3(if_gcd#(le(y,x),s(x),s(y)),le#(y,x)) if_gcd#(false(),s(x),s(y)) -> c_4(gcd#(minus(y,x),s(x)),minus#(y,x)) if_gcd#(true(),s(x),s(y)) -> c_5(gcd#(minus(x,y),s(y)),minus#(x,y)) if_minus#(false(),s(x),y) -> c_6(minus#(x,y)) if_minus#(true(),s(x),y) -> c_7() le#(0(),y) -> c_8() le#(s(x),0()) -> c_9() le#(s(x),s(y)) -> c_10(le#(x,y)) minus#(0(),y) -> c_11() minus#(s(x),y) -> c_12(if_minus#(le(s(x),y),s(x),y),le#(s(x),y)) Strict TRS Rules: Weak DP Rules: Weak TRS Rules: if_minus(false(),s(x),y) -> s(minus(x,y)) if_minus(true(),s(x),y) -> 0() le(0(),y) -> true() le(s(x),0()) -> false() le(s(x),s(y)) -> le(x,y) minus(0(),y) -> 0() minus(s(x),y) -> if_minus(le(s(x),y),s(x),y) Signature: {gcd/2,if_gcd/3,if_minus/3,le/2,minus/2,gcd#/2,if_gcd#/3,if_minus#/3,le#/2,minus#/2} / {0/0,false/0,s/1,true/0,c_1/0,c_2/0,c_3/2,c_4/2,c_5/2,c_6/1,c_7/0,c_8/0,c_9/0,c_10/1,c_11/0,c_12/2} Obligation: Innermost basic terms: {gcd#,if_gcd#,if_minus#,le#,minus#}/{0,false,s,true} Applied Processor: PredecessorEstimation {onSelection = all simple predecessor estimation selector} Proof: We estimate the number of application of {1,2,7,8,9,11} by application of Pre({1,2,7,8,9,11}) = {3,4,5,6,10,12}. Here rules are labelled as follows: 1: gcd#(0(),y) -> c_1() 2: gcd#(s(x),0()) -> c_2() 3: gcd#(s(x),s(y)) -> c_3(if_gcd#(le(y,x),s(x),s(y)) ,le#(y,x)) 4: if_gcd#(false(),s(x),s(y)) -> c_4(gcd#(minus(y,x),s(x)) ,minus#(y,x)) 5: if_gcd#(true(),s(x),s(y)) -> c_5(gcd#(minus(x,y),s(y)) ,minus#(x,y)) 6: if_minus#(false(),s(x),y) -> c_6(minus#(x,y)) 7: if_minus#(true(),s(x),y) -> c_7() 8: le#(0(),y) -> c_8() 9: le#(s(x),0()) -> c_9() 10: le#(s(x),s(y)) -> c_10(le#(x,y)) 11: minus#(0(),y) -> c_11() 12: minus#(s(x),y) -> c_12(if_minus#(le(s(x),y) ,s(x) ,y) ,le#(s(x),y)) *** 1.1.1.1 Progress [(?,O(n^3))] *** Considered Problem: Strict DP Rules: gcd#(s(x),s(y)) -> c_3(if_gcd#(le(y,x),s(x),s(y)),le#(y,x)) if_gcd#(false(),s(x),s(y)) -> c_4(gcd#(minus(y,x),s(x)),minus#(y,x)) if_gcd#(true(),s(x),s(y)) -> c_5(gcd#(minus(x,y),s(y)),minus#(x,y)) if_minus#(false(),s(x),y) -> c_6(minus#(x,y)) le#(s(x),s(y)) -> c_10(le#(x,y)) minus#(s(x),y) -> c_12(if_minus#(le(s(x),y),s(x),y),le#(s(x),y)) Strict TRS Rules: Weak DP Rules: gcd#(0(),y) -> c_1() gcd#(s(x),0()) -> c_2() if_minus#(true(),s(x),y) -> c_7() le#(0(),y) -> c_8() le#(s(x),0()) -> c_9() minus#(0(),y) -> c_11() Weak TRS Rules: if_minus(false(),s(x),y) -> s(minus(x,y)) if_minus(true(),s(x),y) -> 0() le(0(),y) -> true() le(s(x),0()) -> false() le(s(x),s(y)) -> le(x,y) minus(0(),y) -> 0() minus(s(x),y) -> if_minus(le(s(x),y),s(x),y) Signature: {gcd/2,if_gcd/3,if_minus/3,le/2,minus/2,gcd#/2,if_gcd#/3,if_minus#/3,le#/2,minus#/2} / {0/0,false/0,s/1,true/0,c_1/0,c_2/0,c_3/2,c_4/2,c_5/2,c_6/1,c_7/0,c_8/0,c_9/0,c_10/1,c_11/0,c_12/2} Obligation: Innermost basic terms: {gcd#,if_gcd#,if_minus#,le#,minus#}/{0,false,s,true} Applied Processor: RemoveWeakSuffixes Proof: Consider the dependency graph 1:S:gcd#(s(x),s(y)) -> c_3(if_gcd#(le(y,x),s(x),s(y)),le#(y,x)) -->_2 le#(s(x),s(y)) -> c_10(le#(x,y)):5 -->_1 if_gcd#(true(),s(x),s(y)) -> c_5(gcd#(minus(x,y),s(y)),minus#(x,y)):3 -->_1 if_gcd#(false(),s(x),s(y)) -> c_4(gcd#(minus(y,x),s(x)),minus#(y,x)):2 -->_2 le#(s(x),0()) -> c_9():11 -->_2 le#(0(),y) -> c_8():10 2:S:if_gcd#(false(),s(x),s(y)) -> c_4(gcd#(minus(y,x),s(x)),minus#(y,x)) -->_2 minus#(s(x),y) -> c_12(if_minus#(le(s(x),y),s(x),y),le#(s(x),y)):6 -->_2 minus#(0(),y) -> c_11():12 -->_1 gcd#(0(),y) -> c_1():7 -->_1 gcd#(s(x),s(y)) -> c_3(if_gcd#(le(y,x),s(x),s(y)),le#(y,x)):1 3:S:if_gcd#(true(),s(x),s(y)) -> c_5(gcd#(minus(x,y),s(y)),minus#(x,y)) -->_2 minus#(s(x),y) -> c_12(if_minus#(le(s(x),y),s(x),y),le#(s(x),y)):6 -->_2 minus#(0(),y) -> c_11():12 -->_1 gcd#(0(),y) -> c_1():7 -->_1 gcd#(s(x),s(y)) -> c_3(if_gcd#(le(y,x),s(x),s(y)),le#(y,x)):1 4:S:if_minus#(false(),s(x),y) -> c_6(minus#(x,y)) -->_1 minus#(s(x),y) -> c_12(if_minus#(le(s(x),y),s(x),y),le#(s(x),y)):6 -->_1 minus#(0(),y) -> c_11():12 5:S:le#(s(x),s(y)) -> c_10(le#(x,y)) -->_1 le#(s(x),0()) -> c_9():11 -->_1 le#(0(),y) -> c_8():10 -->_1 le#(s(x),s(y)) -> c_10(le#(x,y)):5 6:S:minus#(s(x),y) -> c_12(if_minus#(le(s(x),y),s(x),y),le#(s(x),y)) -->_2 le#(s(x),0()) -> c_9():11 -->_1 if_minus#(true(),s(x),y) -> c_7():9 -->_2 le#(s(x),s(y)) -> c_10(le#(x,y)):5 -->_1 if_minus#(false(),s(x),y) -> c_6(minus#(x,y)):4 7:W:gcd#(0(),y) -> c_1() 8:W:gcd#(s(x),0()) -> c_2() 9:W:if_minus#(true(),s(x),y) -> c_7() 10:W:le#(0(),y) -> c_8() 11:W:le#(s(x),0()) -> c_9() 12:W:minus#(0(),y) -> c_11() The following weak DPs constitute a sub-graph of the DG that is closed under successors. The DPs are removed. 8: gcd#(s(x),0()) -> c_2() 7: gcd#(0(),y) -> c_1() 12: minus#(0(),y) -> c_11() 9: if_minus#(true(),s(x),y) -> c_7() 10: le#(0(),y) -> c_8() 11: le#(s(x),0()) -> c_9() *** 1.1.1.1.1 Progress [(?,O(n^3))] *** Considered Problem: Strict DP Rules: gcd#(s(x),s(y)) -> c_3(if_gcd#(le(y,x),s(x),s(y)),le#(y,x)) if_gcd#(false(),s(x),s(y)) -> c_4(gcd#(minus(y,x),s(x)),minus#(y,x)) if_gcd#(true(),s(x),s(y)) -> c_5(gcd#(minus(x,y),s(y)),minus#(x,y)) if_minus#(false(),s(x),y) -> c_6(minus#(x,y)) le#(s(x),s(y)) -> c_10(le#(x,y)) minus#(s(x),y) -> c_12(if_minus#(le(s(x),y),s(x),y),le#(s(x),y)) Strict TRS Rules: Weak DP Rules: Weak TRS Rules: if_minus(false(),s(x),y) -> s(minus(x,y)) if_minus(true(),s(x),y) -> 0() le(0(),y) -> true() le(s(x),0()) -> false() le(s(x),s(y)) -> le(x,y) minus(0(),y) -> 0() minus(s(x),y) -> if_minus(le(s(x),y),s(x),y) Signature: {gcd/2,if_gcd/3,if_minus/3,le/2,minus/2,gcd#/2,if_gcd#/3,if_minus#/3,le#/2,minus#/2} / {0/0,false/0,s/1,true/0,c_1/0,c_2/0,c_3/2,c_4/2,c_5/2,c_6/1,c_7/0,c_8/0,c_9/0,c_10/1,c_11/0,c_12/2} Obligation: Innermost basic terms: {gcd#,if_gcd#,if_minus#,le#,minus#}/{0,false,s,true} Applied Processor: DecomposeDG {onSelection = all below first cut in WDG, onUpper = Just someStrategy, onLower = Nothing} Proof: We decompose the input problem according to the dependency graph into the upper component gcd#(s(x),s(y)) -> c_3(if_gcd#(le(y,x),s(x),s(y)),le#(y,x)) if_gcd#(false(),s(x),s(y)) -> c_4(gcd#(minus(y,x),s(x)),minus#(y,x)) if_gcd#(true(),s(x),s(y)) -> c_5(gcd#(minus(x,y),s(y)),minus#(x,y)) and a lower component if_minus#(false(),s(x),y) -> c_6(minus#(x,y)) le#(s(x),s(y)) -> c_10(le#(x,y)) minus#(s(x),y) -> c_12(if_minus#(le(s(x),y),s(x),y),le#(s(x),y)) Further, following extension rules are added to the lower component. gcd#(s(x),s(y)) -> if_gcd#(le(y,x),s(x),s(y)) gcd#(s(x),s(y)) -> le#(y,x) if_gcd#(false(),s(x),s(y)) -> gcd#(minus(y,x),s(x)) if_gcd#(false(),s(x),s(y)) -> minus#(y,x) if_gcd#(true(),s(x),s(y)) -> gcd#(minus(x,y),s(y)) if_gcd#(true(),s(x),s(y)) -> minus#(x,y) *** 1.1.1.1.1.1 Progress [(?,O(n^1))] *** Considered Problem: Strict DP Rules: gcd#(s(x),s(y)) -> c_3(if_gcd#(le(y,x),s(x),s(y)),le#(y,x)) if_gcd#(false(),s(x),s(y)) -> c_4(gcd#(minus(y,x),s(x)),minus#(y,x)) if_gcd#(true(),s(x),s(y)) -> c_5(gcd#(minus(x,y),s(y)),minus#(x,y)) Strict TRS Rules: Weak DP Rules: Weak TRS Rules: if_minus(false(),s(x),y) -> s(minus(x,y)) if_minus(true(),s(x),y) -> 0() le(0(),y) -> true() le(s(x),0()) -> false() le(s(x),s(y)) -> le(x,y) minus(0(),y) -> 0() minus(s(x),y) -> if_minus(le(s(x),y),s(x),y) Signature: {gcd/2,if_gcd/3,if_minus/3,le/2,minus/2,gcd#/2,if_gcd#/3,if_minus#/3,le#/2,minus#/2} / {0/0,false/0,s/1,true/0,c_1/0,c_2/0,c_3/2,c_4/2,c_5/2,c_6/1,c_7/0,c_8/0,c_9/0,c_10/1,c_11/0,c_12/2} Obligation: Innermost basic terms: {gcd#,if_gcd#,if_minus#,le#,minus#}/{0,false,s,true} Applied Processor: PredecessorEstimationCP {onSelectionCP = any intersect of rules of CDG leaf and strict-rules, withComplexityPair = NaturalMI {miDimension = 1, miDegree = 1, miKind = Algebraic, uargs = UArgs, urules = URules, selector = Nothing, greedy = NoGreedy}} Proof: We first use the processor NaturalMI {miDimension = 1, miDegree = 1, miKind = Algebraic, uargs = UArgs, urules = URules, selector = Nothing, greedy = NoGreedy} to orient following rules strictly: 2: if_gcd#(false(),s(x),s(y)) -> c_4(gcd#(minus(y,x),s(x)) ,minus#(y,x)) The strictly oriented rules are moved into the weak component. *** 1.1.1.1.1.1.1 Progress [(?,O(n^1))] *** Considered Problem: Strict DP Rules: gcd#(s(x),s(y)) -> c_3(if_gcd#(le(y,x),s(x),s(y)),le#(y,x)) if_gcd#(false(),s(x),s(y)) -> c_4(gcd#(minus(y,x),s(x)),minus#(y,x)) if_gcd#(true(),s(x),s(y)) -> c_5(gcd#(minus(x,y),s(y)),minus#(x,y)) Strict TRS Rules: Weak DP Rules: Weak TRS Rules: if_minus(false(),s(x),y) -> s(minus(x,y)) if_minus(true(),s(x),y) -> 0() le(0(),y) -> true() le(s(x),0()) -> false() le(s(x),s(y)) -> le(x,y) minus(0(),y) -> 0() minus(s(x),y) -> if_minus(le(s(x),y),s(x),y) Signature: {gcd/2,if_gcd/3,if_minus/3,le/2,minus/2,gcd#/2,if_gcd#/3,if_minus#/3,le#/2,minus#/2} / {0/0,false/0,s/1,true/0,c_1/0,c_2/0,c_3/2,c_4/2,c_5/2,c_6/1,c_7/0,c_8/0,c_9/0,c_10/1,c_11/0,c_12/2} Obligation: Innermost basic terms: {gcd#,if_gcd#,if_minus#,le#,minus#}/{0,false,s,true} Applied Processor: NaturalMI {miDimension = 1, miDegree = 1, miKind = Algebraic, uargs = UArgs, urules = URules, selector = Just first alternative for predecessorEstimation any intersect of rules of CDG leaf and strict-rules, greedy = NoGreedy} Proof: We apply a matrix interpretation of kind constructor based matrix interpretation: The following argument positions are considered usable: uargs(c_3) = {1}, uargs(c_4) = {1}, uargs(c_5) = {1} Following symbols are considered usable: {if_minus,minus,gcd#,if_gcd#,if_minus#,le#,minus#} TcT has computed the following interpretation: p(0) = [0] p(false) = [0] p(gcd) = [2] x2 + [0] p(if_gcd) = [2] x1 + [1] x2 + [1] x3 + [8] p(if_minus) = [1] x2 + [0] p(le) = [0] p(minus) = [1] x1 + [0] p(s) = [1] x1 + [2] p(true) = [0] p(gcd#) = [4] x1 + [4] x2 + [12] p(if_gcd#) = [4] x2 + [4] x3 + [8] p(if_minus#) = [1] x2 + [1] p(le#) = [1] x1 + [0] p(minus#) = [8] x2 + [0] p(c_1) = [0] p(c_2) = [0] p(c_3) = [1] x1 + [4] p(c_4) = [1] x1 + [0] p(c_5) = [1] x1 + [4] p(c_6) = [1] x1 + [2] p(c_7) = [4] p(c_8) = [2] p(c_9) = [8] p(c_10) = [1] x1 + [0] p(c_11) = [0] p(c_12) = [2] x1 + [2] Following rules are strictly oriented: if_gcd#(false(),s(x),s(y)) = [4] x + [4] y + [24] > [4] x + [4] y + [20] = c_4(gcd#(minus(y,x),s(x)) ,minus#(y,x)) Following rules are (at-least) weakly oriented: gcd#(s(x),s(y)) = [4] x + [4] y + [28] >= [4] x + [4] y + [28] = c_3(if_gcd#(le(y,x),s(x),s(y)) ,le#(y,x)) if_gcd#(true(),s(x),s(y)) = [4] x + [4] y + [24] >= [4] x + [4] y + [24] = c_5(gcd#(minus(x,y),s(y)) ,minus#(x,y)) if_minus(false(),s(x),y) = [1] x + [2] >= [1] x + [2] = s(minus(x,y)) if_minus(true(),s(x),y) = [1] x + [2] >= [0] = 0() minus(0(),y) = [0] >= [0] = 0() minus(s(x),y) = [1] x + [2] >= [1] x + [2] = if_minus(le(s(x),y),s(x),y) *** 1.1.1.1.1.1.1.1 Progress [(?,O(1))] *** Considered Problem: Strict DP Rules: gcd#(s(x),s(y)) -> c_3(if_gcd#(le(y,x),s(x),s(y)),le#(y,x)) if_gcd#(true(),s(x),s(y)) -> c_5(gcd#(minus(x,y),s(y)),minus#(x,y)) Strict TRS Rules: Weak DP Rules: if_gcd#(false(),s(x),s(y)) -> c_4(gcd#(minus(y,x),s(x)),minus#(y,x)) Weak TRS Rules: if_minus(false(),s(x),y) -> s(minus(x,y)) if_minus(true(),s(x),y) -> 0() le(0(),y) -> true() le(s(x),0()) -> false() le(s(x),s(y)) -> le(x,y) minus(0(),y) -> 0() minus(s(x),y) -> if_minus(le(s(x),y),s(x),y) Signature: {gcd/2,if_gcd/3,if_minus/3,le/2,minus/2,gcd#/2,if_gcd#/3,if_minus#/3,le#/2,minus#/2} / {0/0,false/0,s/1,true/0,c_1/0,c_2/0,c_3/2,c_4/2,c_5/2,c_6/1,c_7/0,c_8/0,c_9/0,c_10/1,c_11/0,c_12/2} Obligation: Innermost basic terms: {gcd#,if_gcd#,if_minus#,le#,minus#}/{0,false,s,true} Applied Processor: Assumption Proof: () *** 1.1.1.1.1.1.2 Progress [(?,O(n^1))] *** Considered Problem: Strict DP Rules: gcd#(s(x),s(y)) -> c_3(if_gcd#(le(y,x),s(x),s(y)),le#(y,x)) if_gcd#(true(),s(x),s(y)) -> c_5(gcd#(minus(x,y),s(y)),minus#(x,y)) Strict TRS Rules: Weak DP Rules: if_gcd#(false(),s(x),s(y)) -> c_4(gcd#(minus(y,x),s(x)),minus#(y,x)) Weak TRS Rules: if_minus(false(),s(x),y) -> s(minus(x,y)) if_minus(true(),s(x),y) -> 0() le(0(),y) -> true() le(s(x),0()) -> false() le(s(x),s(y)) -> le(x,y) minus(0(),y) -> 0() minus(s(x),y) -> if_minus(le(s(x),y),s(x),y) Signature: {gcd/2,if_gcd/3,if_minus/3,le/2,minus/2,gcd#/2,if_gcd#/3,if_minus#/3,le#/2,minus#/2} / {0/0,false/0,s/1,true/0,c_1/0,c_2/0,c_3/2,c_4/2,c_5/2,c_6/1,c_7/0,c_8/0,c_9/0,c_10/1,c_11/0,c_12/2} Obligation: Innermost basic terms: {gcd#,if_gcd#,if_minus#,le#,minus#}/{0,false,s,true} Applied Processor: PredecessorEstimationCP {onSelectionCP = any intersect of rules of CDG leaf and strict-rules, withComplexityPair = NaturalMI {miDimension = 3, miDegree = 1, miKind = Algebraic, uargs = UArgs, urules = URules, selector = Nothing, greedy = NoGreedy}} Proof: We first use the processor NaturalMI {miDimension = 3, miDegree = 1, miKind = Algebraic, uargs = UArgs, urules = URules, selector = Nothing, greedy = NoGreedy} to orient following rules strictly: 2: if_gcd#(true(),s(x),s(y)) -> c_5(gcd#(minus(x,y),s(y)) ,minus#(x,y)) The strictly oriented rules are moved into the weak component. *** 1.1.1.1.1.1.2.1 Progress [(?,O(n^1))] *** Considered Problem: Strict DP Rules: gcd#(s(x),s(y)) -> c_3(if_gcd#(le(y,x),s(x),s(y)),le#(y,x)) if_gcd#(true(),s(x),s(y)) -> c_5(gcd#(minus(x,y),s(y)),minus#(x,y)) Strict TRS Rules: Weak DP Rules: if_gcd#(false(),s(x),s(y)) -> c_4(gcd#(minus(y,x),s(x)),minus#(y,x)) Weak TRS Rules: if_minus(false(),s(x),y) -> s(minus(x,y)) if_minus(true(),s(x),y) -> 0() le(0(),y) -> true() le(s(x),0()) -> false() le(s(x),s(y)) -> le(x,y) minus(0(),y) -> 0() minus(s(x),y) -> if_minus(le(s(x),y),s(x),y) Signature: {gcd/2,if_gcd/3,if_minus/3,le/2,minus/2,gcd#/2,if_gcd#/3,if_minus#/3,le#/2,minus#/2} / {0/0,false/0,s/1,true/0,c_1/0,c_2/0,c_3/2,c_4/2,c_5/2,c_6/1,c_7/0,c_8/0,c_9/0,c_10/1,c_11/0,c_12/2} Obligation: Innermost basic terms: {gcd#,if_gcd#,if_minus#,le#,minus#}/{0,false,s,true} Applied Processor: NaturalMI {miDimension = 3, miDegree = 1, miKind = Algebraic, uargs = UArgs, urules = URules, selector = Just first alternative for predecessorEstimation any intersect of rules of CDG leaf and strict-rules, greedy = NoGreedy} Proof: We apply a matrix interpretation of kind constructor based matrix interpretation (containing no more than 1 non-zero interpretation-entries in the diagonal of the component-wise maxima): The following argument positions are considered usable: uargs(c_3) = {1}, uargs(c_4) = {1}, uargs(c_5) = {1} Following symbols are considered usable: {if_minus,minus,gcd#,if_gcd#,if_minus#,le#,minus#} TcT has computed the following interpretation: p(0) = [0] [0] [1] p(false) = [0] [0] [0] p(gcd) = [0] [0] [0] p(if_gcd) = [0] [0] [0] p(if_minus) = [0 1 0] [0] [0 1 0] x2 + [0] [0 0 0] [1] p(le) = [0 0 1] [0] [0 0 0] x2 + [0] [0 0 0] [1] p(minus) = [0 1 0] [0] [0 1 0] x1 + [0] [0 0 1] [0] p(s) = [0 1 0] [0] [0 1 1] x1 + [0] [0 0 0] [1] p(true) = [0] [0] [0] p(gcd#) = [1 1 1] [1 1 0] [1] [0 0 0] x1 + [0 0 1] x2 + [1] [1 0 1] [0 0 0] [0] p(if_gcd#) = [1 1 0] [1 1 1] [1] [0 1 0] x2 + [1 1 1] x3 + [1] [1 1 1] [1 1 1] [0] p(if_minus#) = [0] [0] [0] p(le#) = [0] [0] [0] p(minus#) = [0 1 0] [0 0 0] [1] [0 0 0] x1 + [0 0 1] x2 + [0] [0 1 0] [0 1 0] [0] p(c_1) = [0] [0] [0] p(c_2) = [0] [0] [0] p(c_3) = [1 0 0] [0] [0 0 0] x1 + [1] [0 0 0] [0] p(c_4) = [1 0 0] [0 0 0] [0] [0 0 1] x1 + [1 1 0] x2 + [0] [0 1 1] [0 1 0] [0] p(c_5) = [1 0 0] [0 0 0] [0] [0 1 0] x1 + [0 1 1] x2 + [0] [0 0 0] [1 1 1] [1] p(c_6) = [0] [0] [0] p(c_7) = [0] [0] [0] p(c_8) = [0] [0] [0] p(c_9) = [0] [0] [0] p(c_10) = [0] [0] [0] p(c_11) = [0] [0] [0] p(c_12) = [0] [0] [0] Following rules are strictly oriented: if_gcd#(true(),s(x),s(y)) = [0 2 1] [0 2 1] [2] [0 1 1] x + [0 2 1] y + [2] [0 2 1] [0 2 1] [2] > [0 2 1] [0 2 1] [1] [0 1 0] x + [0 1 1] y + [2] [0 2 0] [0 1 1] [2] = c_5(gcd#(minus(x,y),s(y)) ,minus#(x,y)) Following rules are (at-least) weakly oriented: gcd#(s(x),s(y)) = [0 2 1] [0 2 1] [2] [0 0 0] x + [0 0 0] y + [2] [0 1 0] [0 0 0] [1] >= [0 2 1] [0 2 1] [2] [0 0 0] x + [0 0 0] y + [1] [0 0 0] [0 0 0] [0] = c_3(if_gcd#(le(y,x),s(x),s(y)) ,le#(y,x)) if_gcd#(false(),s(x),s(y)) = [0 2 1] [0 2 1] [2] [0 1 1] x + [0 2 1] y + [2] [0 2 1] [0 2 1] [2] >= [0 2 1] [0 2 1] [1] [0 0 1] x + [0 2 1] y + [1] [0 0 1] [0 1 1] [2] = c_4(gcd#(minus(y,x),s(x)) ,minus#(y,x)) if_minus(false(),s(x),y) = [0 1 1] [0] [0 1 1] x + [0] [0 0 0] [1] >= [0 1 0] [0] [0 1 1] x + [0] [0 0 0] [1] = s(minus(x,y)) if_minus(true(),s(x),y) = [0 1 1] [0] [0 1 1] x + [0] [0 0 0] [1] >= [0] [0] [1] = 0() minus(0(),y) = [0] [0] [1] >= [0] [0] [1] = 0() minus(s(x),y) = [0 1 1] [0] [0 1 1] x + [0] [0 0 0] [1] >= [0 1 1] [0] [0 1 1] x + [0] [0 0 0] [1] = if_minus(le(s(x),y),s(x),y) *** 1.1.1.1.1.1.2.1.1 Progress [(?,O(1))] *** Considered Problem: Strict DP Rules: gcd#(s(x),s(y)) -> c_3(if_gcd#(le(y,x),s(x),s(y)),le#(y,x)) Strict TRS Rules: Weak DP Rules: if_gcd#(false(),s(x),s(y)) -> c_4(gcd#(minus(y,x),s(x)),minus#(y,x)) if_gcd#(true(),s(x),s(y)) -> c_5(gcd#(minus(x,y),s(y)),minus#(x,y)) Weak TRS Rules: if_minus(false(),s(x),y) -> s(minus(x,y)) if_minus(true(),s(x),y) -> 0() le(0(),y) -> true() le(s(x),0()) -> false() le(s(x),s(y)) -> le(x,y) minus(0(),y) -> 0() minus(s(x),y) -> if_minus(le(s(x),y),s(x),y) Signature: {gcd/2,if_gcd/3,if_minus/3,le/2,minus/2,gcd#/2,if_gcd#/3,if_minus#/3,le#/2,minus#/2} / {0/0,false/0,s/1,true/0,c_1/0,c_2/0,c_3/2,c_4/2,c_5/2,c_6/1,c_7/0,c_8/0,c_9/0,c_10/1,c_11/0,c_12/2} Obligation: Innermost basic terms: {gcd#,if_gcd#,if_minus#,le#,minus#}/{0,false,s,true} Applied Processor: Assumption Proof: () *** 1.1.1.1.1.1.2.2 Progress [(?,O(n^1))] *** Considered Problem: Strict DP Rules: gcd#(s(x),s(y)) -> c_3(if_gcd#(le(y,x),s(x),s(y)),le#(y,x)) Strict TRS Rules: Weak DP Rules: if_gcd#(false(),s(x),s(y)) -> c_4(gcd#(minus(y,x),s(x)),minus#(y,x)) if_gcd#(true(),s(x),s(y)) -> c_5(gcd#(minus(x,y),s(y)),minus#(x,y)) Weak TRS Rules: if_minus(false(),s(x),y) -> s(minus(x,y)) if_minus(true(),s(x),y) -> 0() le(0(),y) -> true() le(s(x),0()) -> false() le(s(x),s(y)) -> le(x,y) minus(0(),y) -> 0() minus(s(x),y) -> if_minus(le(s(x),y),s(x),y) Signature: {gcd/2,if_gcd/3,if_minus/3,le/2,minus/2,gcd#/2,if_gcd#/3,if_minus#/3,le#/2,minus#/2} / {0/0,false/0,s/1,true/0,c_1/0,c_2/0,c_3/2,c_4/2,c_5/2,c_6/1,c_7/0,c_8/0,c_9/0,c_10/1,c_11/0,c_12/2} Obligation: Innermost basic terms: {gcd#,if_gcd#,if_minus#,le#,minus#}/{0,false,s,true} Applied Processor: PredecessorEstimationCP {onSelectionCP = any intersect of rules of CDG leaf and strict-rules, withComplexityPair = NaturalMI {miDimension = 3, miDegree = 1, miKind = Algebraic, uargs = UArgs, urules = URules, selector = Nothing, greedy = NoGreedy}} Proof: We first use the processor NaturalMI {miDimension = 3, miDegree = 1, miKind = Algebraic, uargs = UArgs, urules = URules, selector = Nothing, greedy = NoGreedy} to orient following rules strictly: 1: gcd#(s(x),s(y)) -> c_3(if_gcd#(le(y,x),s(x),s(y)) ,le#(y,x)) Consider the set of all dependency pairs 1: gcd#(s(x),s(y)) -> c_3(if_gcd#(le(y,x),s(x),s(y)) ,le#(y,x)) 2: if_gcd#(false(),s(x),s(y)) -> c_4(gcd#(minus(y,x),s(x)) ,minus#(y,x)) 3: if_gcd#(true(),s(x),s(y)) -> c_5(gcd#(minus(x,y),s(y)) ,minus#(x,y)) Processor NaturalMI {miDimension = 3, miDegree = 1, miKind = Algebraic, uargs = UArgs, urules = URules, selector = Nothing, greedy = NoGreedy}induces the complexity certificateTIME (?,O(n^1)) SPACE(?,?)on application of the dependency pairs {1} These cover all (indirect) predecessors of dependency pairs {1,2,3} their number of applications is equally bounded. The dependency pairs are shifted into the weak component. *** 1.1.1.1.1.1.2.2.1 Progress [(?,O(n^1))] *** Considered Problem: Strict DP Rules: gcd#(s(x),s(y)) -> c_3(if_gcd#(le(y,x),s(x),s(y)),le#(y,x)) Strict TRS Rules: Weak DP Rules: if_gcd#(false(),s(x),s(y)) -> c_4(gcd#(minus(y,x),s(x)),minus#(y,x)) if_gcd#(true(),s(x),s(y)) -> c_5(gcd#(minus(x,y),s(y)),minus#(x,y)) Weak TRS Rules: if_minus(false(),s(x),y) -> s(minus(x,y)) if_minus(true(),s(x),y) -> 0() le(0(),y) -> true() le(s(x),0()) -> false() le(s(x),s(y)) -> le(x,y) minus(0(),y) -> 0() minus(s(x),y) -> if_minus(le(s(x),y),s(x),y) Signature: {gcd/2,if_gcd/3,if_minus/3,le/2,minus/2,gcd#/2,if_gcd#/3,if_minus#/3,le#/2,minus#/2} / {0/0,false/0,s/1,true/0,c_1/0,c_2/0,c_3/2,c_4/2,c_5/2,c_6/1,c_7/0,c_8/0,c_9/0,c_10/1,c_11/0,c_12/2} Obligation: Innermost basic terms: {gcd#,if_gcd#,if_minus#,le#,minus#}/{0,false,s,true} Applied Processor: NaturalMI {miDimension = 3, miDegree = 1, miKind = Algebraic, uargs = UArgs, urules = URules, selector = Just first alternative for predecessorEstimation any intersect of rules of CDG leaf and strict-rules, greedy = NoGreedy} Proof: We apply a matrix interpretation of kind constructor based matrix interpretation (containing no more than 1 non-zero interpretation-entries in the diagonal of the component-wise maxima): The following argument positions are considered usable: uargs(c_3) = {1}, uargs(c_4) = {1}, uargs(c_5) = {1} Following symbols are considered usable: {if_minus,minus,gcd#,if_gcd#,if_minus#,le#,minus#} TcT has computed the following interpretation: p(0) = [0] [0] [0] p(false) = [0] [0] [0] p(gcd) = [0] [0] [0] p(if_gcd) = [0] [0] [0] p(if_minus) = [1 0 1] [0] [0 1 0] x2 + [0] [0 0 0] [1] p(le) = [0] [0] [0] p(minus) = [0 1 0] [0] [0 1 0] x1 + [0] [0 0 1] [1] p(s) = [0 1 0] [0] [0 1 0] x1 + [1] [0 0 0] [1] p(true) = [0] [0] [0] p(gcd#) = [1 1 0] [1 1 1] [0] [0 0 1] x1 + [0 0 1] x2 + [0] [0 0 0] [1 0 0] [1] p(if_gcd#) = [1 1 0] [1 1 0] [0] [0 1 0] x2 + [1 0 0] x3 + [0] [1 1 0] [1 1 1] [0] p(if_minus#) = [0] [0] [0] p(le#) = [0] [0] [0] p(minus#) = [0] [1] [0] p(c_1) = [0] [0] [0] p(c_2) = [0] [0] [0] p(c_3) = [1 0 0] [0] [0 0 0] x1 + [1] [0 0 0] [1] p(c_4) = [1 0 0] [0] [0 0 1] x1 + [0] [1 0 0] [0] p(c_5) = [1 0 0] [0 0 0] [0] [0 0 0] x1 + [0 1 0] x2 + [0] [1 0 0] [0 0 0] [0] p(c_6) = [0] [0] [0] p(c_7) = [0] [0] [0] p(c_8) = [0] [0] [0] p(c_9) = [0] [0] [0] p(c_10) = [0] [0] [0] p(c_11) = [0] [0] [0] p(c_12) = [0] [0] [0] Following rules are strictly oriented: gcd#(s(x),s(y)) = [0 2 0] [0 2 0] [3] [0 0 0] x + [0 0 0] y + [2] [0 0 0] [0 1 0] [1] > [0 2 0] [0 2 0] [2] [0 0 0] x + [0 0 0] y + [1] [0 0 0] [0 0 0] [1] = c_3(if_gcd#(le(y,x),s(x),s(y)) ,le#(y,x)) Following rules are (at-least) weakly oriented: if_gcd#(false(),s(x),s(y)) = [0 2 0] [0 2 0] [2] [0 1 0] x + [0 1 0] y + [1] [0 2 0] [0 2 0] [3] >= [0 2 0] [0 2 0] [2] [0 1 0] x + [0 0 0] y + [1] [0 2 0] [0 2 0] [2] = c_4(gcd#(minus(y,x),s(x)) ,minus#(y,x)) if_gcd#(true(),s(x),s(y)) = [0 2 0] [0 2 0] [2] [0 1 0] x + [0 1 0] y + [1] [0 2 0] [0 2 0] [3] >= [0 2 0] [0 2 0] [2] [0 0 0] x + [0 0 0] y + [1] [0 2 0] [0 2 0] [2] = c_5(gcd#(minus(x,y),s(y)) ,minus#(x,y)) if_minus(false(),s(x),y) = [0 1 0] [1] [0 1 0] x + [1] [0 0 0] [1] >= [0 1 0] [0] [0 1 0] x + [1] [0 0 0] [1] = s(minus(x,y)) if_minus(true(),s(x),y) = [0 1 0] [1] [0 1 0] x + [1] [0 0 0] [1] >= [0] [0] [0] = 0() minus(0(),y) = [0] [0] [1] >= [0] [0] [0] = 0() minus(s(x),y) = [0 1 0] [1] [0 1 0] x + [1] [0 0 0] [2] >= [0 1 0] [1] [0 1 0] x + [1] [0 0 0] [1] = if_minus(le(s(x),y),s(x),y) *** 1.1.1.1.1.1.2.2.1.1 Progress [(?,O(1))] *** Considered Problem: Strict DP Rules: Strict TRS Rules: Weak DP Rules: gcd#(s(x),s(y)) -> c_3(if_gcd#(le(y,x),s(x),s(y)),le#(y,x)) if_gcd#(false(),s(x),s(y)) -> c_4(gcd#(minus(y,x),s(x)),minus#(y,x)) if_gcd#(true(),s(x),s(y)) -> c_5(gcd#(minus(x,y),s(y)),minus#(x,y)) Weak TRS Rules: if_minus(false(),s(x),y) -> s(minus(x,y)) if_minus(true(),s(x),y) -> 0() le(0(),y) -> true() le(s(x),0()) -> false() le(s(x),s(y)) -> le(x,y) minus(0(),y) -> 0() minus(s(x),y) -> if_minus(le(s(x),y),s(x),y) Signature: {gcd/2,if_gcd/3,if_minus/3,le/2,minus/2,gcd#/2,if_gcd#/3,if_minus#/3,le#/2,minus#/2} / {0/0,false/0,s/1,true/0,c_1/0,c_2/0,c_3/2,c_4/2,c_5/2,c_6/1,c_7/0,c_8/0,c_9/0,c_10/1,c_11/0,c_12/2} Obligation: Innermost basic terms: {gcd#,if_gcd#,if_minus#,le#,minus#}/{0,false,s,true} Applied Processor: Assumption Proof: () *** 1.1.1.1.1.1.2.2.2 Progress [(O(1),O(1))] *** Considered Problem: Strict DP Rules: Strict TRS Rules: Weak DP Rules: gcd#(s(x),s(y)) -> c_3(if_gcd#(le(y,x),s(x),s(y)),le#(y,x)) if_gcd#(false(),s(x),s(y)) -> c_4(gcd#(minus(y,x),s(x)),minus#(y,x)) if_gcd#(true(),s(x),s(y)) -> c_5(gcd#(minus(x,y),s(y)),minus#(x,y)) Weak TRS Rules: if_minus(false(),s(x),y) -> s(minus(x,y)) if_minus(true(),s(x),y) -> 0() le(0(),y) -> true() le(s(x),0()) -> false() le(s(x),s(y)) -> le(x,y) minus(0(),y) -> 0() minus(s(x),y) -> if_minus(le(s(x),y),s(x),y) Signature: {gcd/2,if_gcd/3,if_minus/3,le/2,minus/2,gcd#/2,if_gcd#/3,if_minus#/3,le#/2,minus#/2} / {0/0,false/0,s/1,true/0,c_1/0,c_2/0,c_3/2,c_4/2,c_5/2,c_6/1,c_7/0,c_8/0,c_9/0,c_10/1,c_11/0,c_12/2} Obligation: Innermost basic terms: {gcd#,if_gcd#,if_minus#,le#,minus#}/{0,false,s,true} Applied Processor: RemoveWeakSuffixes Proof: Consider the dependency graph 1:W:gcd#(s(x),s(y)) -> c_3(if_gcd#(le(y,x),s(x),s(y)),le#(y,x)) -->_1 if_gcd#(true(),s(x),s(y)) -> c_5(gcd#(minus(x,y),s(y)),minus#(x,y)):3 -->_1 if_gcd#(false(),s(x),s(y)) -> c_4(gcd#(minus(y,x),s(x)),minus#(y,x)):2 2:W:if_gcd#(false(),s(x),s(y)) -> c_4(gcd#(minus(y,x),s(x)),minus#(y,x)) -->_1 gcd#(s(x),s(y)) -> c_3(if_gcd#(le(y,x),s(x),s(y)),le#(y,x)):1 3:W:if_gcd#(true(),s(x),s(y)) -> c_5(gcd#(minus(x,y),s(y)),minus#(x,y)) -->_1 gcd#(s(x),s(y)) -> c_3(if_gcd#(le(y,x),s(x),s(y)),le#(y,x)):1 The following weak DPs constitute a sub-graph of the DG that is closed under successors. The DPs are removed. 1: gcd#(s(x),s(y)) -> c_3(if_gcd#(le(y,x),s(x),s(y)) ,le#(y,x)) 3: if_gcd#(true(),s(x),s(y)) -> c_5(gcd#(minus(x,y),s(y)) ,minus#(x,y)) 2: if_gcd#(false(),s(x),s(y)) -> c_4(gcd#(minus(y,x),s(x)) ,minus#(y,x)) *** 1.1.1.1.1.1.2.2.2.1 Progress [(O(1),O(1))] *** Considered Problem: Strict DP Rules: Strict TRS Rules: Weak DP Rules: Weak TRS Rules: if_minus(false(),s(x),y) -> s(minus(x,y)) if_minus(true(),s(x),y) -> 0() le(0(),y) -> true() le(s(x),0()) -> false() le(s(x),s(y)) -> le(x,y) minus(0(),y) -> 0() minus(s(x),y) -> if_minus(le(s(x),y),s(x),y) Signature: {gcd/2,if_gcd/3,if_minus/3,le/2,minus/2,gcd#/2,if_gcd#/3,if_minus#/3,le#/2,minus#/2} / {0/0,false/0,s/1,true/0,c_1/0,c_2/0,c_3/2,c_4/2,c_5/2,c_6/1,c_7/0,c_8/0,c_9/0,c_10/1,c_11/0,c_12/2} Obligation: Innermost basic terms: {gcd#,if_gcd#,if_minus#,le#,minus#}/{0,false,s,true} Applied Processor: EmptyProcessor Proof: The problem is already closed. The intended complexity is O(1). *** 1.1.1.1.1.2 Progress [(?,O(n^2))] *** Considered Problem: Strict DP Rules: if_minus#(false(),s(x),y) -> c_6(minus#(x,y)) le#(s(x),s(y)) -> c_10(le#(x,y)) minus#(s(x),y) -> c_12(if_minus#(le(s(x),y),s(x),y),le#(s(x),y)) Strict TRS Rules: Weak DP Rules: gcd#(s(x),s(y)) -> if_gcd#(le(y,x),s(x),s(y)) gcd#(s(x),s(y)) -> le#(y,x) if_gcd#(false(),s(x),s(y)) -> gcd#(minus(y,x),s(x)) if_gcd#(false(),s(x),s(y)) -> minus#(y,x) if_gcd#(true(),s(x),s(y)) -> gcd#(minus(x,y),s(y)) if_gcd#(true(),s(x),s(y)) -> minus#(x,y) Weak TRS Rules: if_minus(false(),s(x),y) -> s(minus(x,y)) if_minus(true(),s(x),y) -> 0() le(0(),y) -> true() le(s(x),0()) -> false() le(s(x),s(y)) -> le(x,y) minus(0(),y) -> 0() minus(s(x),y) -> if_minus(le(s(x),y),s(x),y) Signature: {gcd/2,if_gcd/3,if_minus/3,le/2,minus/2,gcd#/2,if_gcd#/3,if_minus#/3,le#/2,minus#/2} / {0/0,false/0,s/1,true/0,c_1/0,c_2/0,c_3/2,c_4/2,c_5/2,c_6/1,c_7/0,c_8/0,c_9/0,c_10/1,c_11/0,c_12/2} Obligation: Innermost basic terms: {gcd#,if_gcd#,if_minus#,le#,minus#}/{0,false,s,true} Applied Processor: PredecessorEstimationCP {onSelectionCP = any intersect of rules of CDG leaf and strict-rules, withComplexityPair = NaturalMI {miDimension = 2, miDegree = 2, miKind = Algebraic, uargs = UArgs, urules = URules, selector = Nothing, greedy = NoGreedy}} Proof: We first use the processor NaturalMI {miDimension = 2, miDegree = 2, miKind = Algebraic, uargs = UArgs, urules = URules, selector = Nothing, greedy = NoGreedy} to orient following rules strictly: 2: le#(s(x),s(y)) -> c_10(le#(x,y)) The strictly oriented rules are moved into the weak component. *** 1.1.1.1.1.2.1 Progress [(?,O(n^2))] *** Considered Problem: Strict DP Rules: if_minus#(false(),s(x),y) -> c_6(minus#(x,y)) le#(s(x),s(y)) -> c_10(le#(x,y)) minus#(s(x),y) -> c_12(if_minus#(le(s(x),y),s(x),y),le#(s(x),y)) Strict TRS Rules: Weak DP Rules: gcd#(s(x),s(y)) -> if_gcd#(le(y,x),s(x),s(y)) gcd#(s(x),s(y)) -> le#(y,x) if_gcd#(false(),s(x),s(y)) -> gcd#(minus(y,x),s(x)) if_gcd#(false(),s(x),s(y)) -> minus#(y,x) if_gcd#(true(),s(x),s(y)) -> gcd#(minus(x,y),s(y)) if_gcd#(true(),s(x),s(y)) -> minus#(x,y) Weak TRS Rules: if_minus(false(),s(x),y) -> s(minus(x,y)) if_minus(true(),s(x),y) -> 0() le(0(),y) -> true() le(s(x),0()) -> false() le(s(x),s(y)) -> le(x,y) minus(0(),y) -> 0() minus(s(x),y) -> if_minus(le(s(x),y),s(x),y) Signature: {gcd/2,if_gcd/3,if_minus/3,le/2,minus/2,gcd#/2,if_gcd#/3,if_minus#/3,le#/2,minus#/2} / {0/0,false/0,s/1,true/0,c_1/0,c_2/0,c_3/2,c_4/2,c_5/2,c_6/1,c_7/0,c_8/0,c_9/0,c_10/1,c_11/0,c_12/2} Obligation: Innermost basic terms: {gcd#,if_gcd#,if_minus#,le#,minus#}/{0,false,s,true} Applied Processor: NaturalMI {miDimension = 2, miDegree = 2, miKind = Algebraic, uargs = UArgs, urules = URules, selector = Just first alternative for predecessorEstimation any intersect of rules of CDG leaf and strict-rules, greedy = NoGreedy} Proof: We apply a matrix interpretation of kind constructor based matrix interpretation: The following argument positions are considered usable: uargs(c_6) = {1}, uargs(c_10) = {1}, uargs(c_12) = {1,2} Following symbols are considered usable: {if_minus,minus,gcd#,if_gcd#,if_minus#,le#,minus#} TcT has computed the following interpretation: p(0) = [0] [0] p(false) = [0] [0] p(gcd) = [1 0] x1 + [2] [0 0] [2] p(if_gcd) = [0 1] x2 + [0 0] x3 + [0] [2 1] [0 2] [0] p(if_minus) = [1 0] x2 + [0] [0 1] [0] p(le) = [0] [0] p(minus) = [1 0] x1 + [0] [0 1] [0] p(s) = [1 2] x1 + [0] [0 1] [1] p(true) = [0] [0] p(gcd#) = [2 2] x1 + [2 0] x2 + [2] [0 1] [0 1] [3] p(if_gcd#) = [2 1] x2 + [2 0] x3 + [3] [0 1] [0 1] [3] p(if_minus#) = [2 0] x2 + [2 2] x3 + [0] [1 1] [2 0] [0] p(le#) = [0 1] x1 + [0] [0 0] [0] p(minus#) = [2 2] x1 + [2 2] x2 + [0] [0 1] [0 0] [0] p(c_1) = [1] [0] p(c_2) = [1] [2] p(c_3) = [0 1] x2 + [0] [2 2] [0] p(c_4) = [0] [0] p(c_5) = [0 0] x2 + [1] [0 2] [0] p(c_6) = [1 2] x1 + [0] [0 0] [0] p(c_7) = [0] [0] p(c_8) = [1] [0] p(c_9) = [2] [0] p(c_10) = [1 0] x1 + [0] [0 0] [0] p(c_11) = [0] [2] p(c_12) = [1 0] x1 + [2 0] x2 + [0] [0 0] [0 0] [1] Following rules are strictly oriented: le#(s(x),s(y)) = [0 1] x + [1] [0 0] [0] > [0 1] x + [0] [0 0] [0] = c_10(le#(x,y)) Following rules are (at-least) weakly oriented: gcd#(s(x),s(y)) = [2 6] x + [2 4] y + [4] [0 1] [0 1] [5] >= [2 5] x + [2 4] y + [4] [0 1] [0 1] [5] = if_gcd#(le(y,x),s(x),s(y)) gcd#(s(x),s(y)) = [2 6] x + [2 4] y + [4] [0 1] [0 1] [5] >= [0 1] y + [0] [0 0] [0] = le#(y,x) if_gcd#(false(),s(x),s(y)) = [2 5] x + [2 4] y + [4] [0 1] [0 1] [5] >= [2 4] x + [2 2] y + [2] [0 1] [0 1] [4] = gcd#(minus(y,x),s(x)) if_gcd#(false(),s(x),s(y)) = [2 5] x + [2 4] y + [4] [0 1] [0 1] [5] >= [2 2] x + [2 2] y + [0] [0 0] [0 1] [0] = minus#(y,x) if_gcd#(true(),s(x),s(y)) = [2 5] x + [2 4] y + [4] [0 1] [0 1] [5] >= [2 2] x + [2 4] y + [2] [0 1] [0 1] [4] = gcd#(minus(x,y),s(y)) if_gcd#(true(),s(x),s(y)) = [2 5] x + [2 4] y + [4] [0 1] [0 1] [5] >= [2 2] x + [2 2] y + [0] [0 1] [0 0] [0] = minus#(x,y) if_minus#(false(),s(x),y) = [2 4] x + [2 2] y + [0] [1 3] [2 0] [1] >= [2 4] x + [2 2] y + [0] [0 0] [0 0] [0] = c_6(minus#(x,y)) minus#(s(x),y) = [2 6] x + [2 2] y + [2] [0 1] [0 0] [1] >= [2 6] x + [2 2] y + [2] [0 0] [0 0] [1] = c_12(if_minus#(le(s(x),y) ,s(x) ,y) ,le#(s(x),y)) if_minus(false(),s(x),y) = [1 2] x + [0] [0 1] [1] >= [1 2] x + [0] [0 1] [1] = s(minus(x,y)) if_minus(true(),s(x),y) = [1 2] x + [0] [0 1] [1] >= [0] [0] = 0() minus(0(),y) = [0] [0] >= [0] [0] = 0() minus(s(x),y) = [1 2] x + [0] [0 1] [1] >= [1 2] x + [0] [0 1] [1] = if_minus(le(s(x),y),s(x),y) *** 1.1.1.1.1.2.1.1 Progress [(?,O(1))] *** Considered Problem: Strict DP Rules: if_minus#(false(),s(x),y) -> c_6(minus#(x,y)) minus#(s(x),y) -> c_12(if_minus#(le(s(x),y),s(x),y),le#(s(x),y)) Strict TRS Rules: Weak DP Rules: gcd#(s(x),s(y)) -> if_gcd#(le(y,x),s(x),s(y)) gcd#(s(x),s(y)) -> le#(y,x) if_gcd#(false(),s(x),s(y)) -> gcd#(minus(y,x),s(x)) if_gcd#(false(),s(x),s(y)) -> minus#(y,x) if_gcd#(true(),s(x),s(y)) -> gcd#(minus(x,y),s(y)) if_gcd#(true(),s(x),s(y)) -> minus#(x,y) le#(s(x),s(y)) -> c_10(le#(x,y)) Weak TRS Rules: if_minus(false(),s(x),y) -> s(minus(x,y)) if_minus(true(),s(x),y) -> 0() le(0(),y) -> true() le(s(x),0()) -> false() le(s(x),s(y)) -> le(x,y) minus(0(),y) -> 0() minus(s(x),y) -> if_minus(le(s(x),y),s(x),y) Signature: {gcd/2,if_gcd/3,if_minus/3,le/2,minus/2,gcd#/2,if_gcd#/3,if_minus#/3,le#/2,minus#/2} / {0/0,false/0,s/1,true/0,c_1/0,c_2/0,c_3/2,c_4/2,c_5/2,c_6/1,c_7/0,c_8/0,c_9/0,c_10/1,c_11/0,c_12/2} Obligation: Innermost basic terms: {gcd#,if_gcd#,if_minus#,le#,minus#}/{0,false,s,true} Applied Processor: Assumption Proof: () *** 1.1.1.1.1.2.2 Progress [(?,O(n^1))] *** Considered Problem: Strict DP Rules: if_minus#(false(),s(x),y) -> c_6(minus#(x,y)) minus#(s(x),y) -> c_12(if_minus#(le(s(x),y),s(x),y),le#(s(x),y)) Strict TRS Rules: Weak DP Rules: gcd#(s(x),s(y)) -> if_gcd#(le(y,x),s(x),s(y)) gcd#(s(x),s(y)) -> le#(y,x) if_gcd#(false(),s(x),s(y)) -> gcd#(minus(y,x),s(x)) if_gcd#(false(),s(x),s(y)) -> minus#(y,x) if_gcd#(true(),s(x),s(y)) -> gcd#(minus(x,y),s(y)) if_gcd#(true(),s(x),s(y)) -> minus#(x,y) le#(s(x),s(y)) -> c_10(le#(x,y)) Weak TRS Rules: if_minus(false(),s(x),y) -> s(minus(x,y)) if_minus(true(),s(x),y) -> 0() le(0(),y) -> true() le(s(x),0()) -> false() le(s(x),s(y)) -> le(x,y) minus(0(),y) -> 0() minus(s(x),y) -> if_minus(le(s(x),y),s(x),y) Signature: {gcd/2,if_gcd/3,if_minus/3,le/2,minus/2,gcd#/2,if_gcd#/3,if_minus#/3,le#/2,minus#/2} / {0/0,false/0,s/1,true/0,c_1/0,c_2/0,c_3/2,c_4/2,c_5/2,c_6/1,c_7/0,c_8/0,c_9/0,c_10/1,c_11/0,c_12/2} Obligation: Innermost basic terms: {gcd#,if_gcd#,if_minus#,le#,minus#}/{0,false,s,true} Applied Processor: RemoveWeakSuffixes Proof: Consider the dependency graph 1:S:if_minus#(false(),s(x),y) -> c_6(minus#(x,y)) -->_1 minus#(s(x),y) -> c_12(if_minus#(le(s(x),y),s(x),y),le#(s(x),y)):2 2:S:minus#(s(x),y) -> c_12(if_minus#(le(s(x),y),s(x),y),le#(s(x),y)) -->_2 le#(s(x),s(y)) -> c_10(le#(x,y)):9 -->_1 if_minus#(false(),s(x),y) -> c_6(minus#(x,y)):1 3:W:gcd#(s(x),s(y)) -> if_gcd#(le(y,x),s(x),s(y)) -->_1 if_gcd#(true(),s(x),s(y)) -> minus#(x,y):8 -->_1 if_gcd#(true(),s(x),s(y)) -> gcd#(minus(x,y),s(y)):7 -->_1 if_gcd#(false(),s(x),s(y)) -> minus#(y,x):6 -->_1 if_gcd#(false(),s(x),s(y)) -> gcd#(minus(y,x),s(x)):5 4:W:gcd#(s(x),s(y)) -> le#(y,x) -->_1 le#(s(x),s(y)) -> c_10(le#(x,y)):9 5:W:if_gcd#(false(),s(x),s(y)) -> gcd#(minus(y,x),s(x)) -->_1 gcd#(s(x),s(y)) -> le#(y,x):4 -->_1 gcd#(s(x),s(y)) -> if_gcd#(le(y,x),s(x),s(y)):3 6:W:if_gcd#(false(),s(x),s(y)) -> minus#(y,x) -->_1 minus#(s(x),y) -> c_12(if_minus#(le(s(x),y),s(x),y),le#(s(x),y)):2 7:W:if_gcd#(true(),s(x),s(y)) -> gcd#(minus(x,y),s(y)) -->_1 gcd#(s(x),s(y)) -> le#(y,x):4 -->_1 gcd#(s(x),s(y)) -> if_gcd#(le(y,x),s(x),s(y)):3 8:W:if_gcd#(true(),s(x),s(y)) -> minus#(x,y) -->_1 minus#(s(x),y) -> c_12(if_minus#(le(s(x),y),s(x),y),le#(s(x),y)):2 9:W:le#(s(x),s(y)) -> c_10(le#(x,y)) -->_1 le#(s(x),s(y)) -> c_10(le#(x,y)):9 The following weak DPs constitute a sub-graph of the DG that is closed under successors. The DPs are removed. 4: gcd#(s(x),s(y)) -> le#(y,x) 9: le#(s(x),s(y)) -> c_10(le#(x,y)) *** 1.1.1.1.1.2.2.1 Progress [(?,O(n^1))] *** Considered Problem: Strict DP Rules: if_minus#(false(),s(x),y) -> c_6(minus#(x,y)) minus#(s(x),y) -> c_12(if_minus#(le(s(x),y),s(x),y),le#(s(x),y)) Strict TRS Rules: Weak DP Rules: gcd#(s(x),s(y)) -> if_gcd#(le(y,x),s(x),s(y)) if_gcd#(false(),s(x),s(y)) -> gcd#(minus(y,x),s(x)) if_gcd#(false(),s(x),s(y)) -> minus#(y,x) if_gcd#(true(),s(x),s(y)) -> gcd#(minus(x,y),s(y)) if_gcd#(true(),s(x),s(y)) -> minus#(x,y) Weak TRS Rules: if_minus(false(),s(x),y) -> s(minus(x,y)) if_minus(true(),s(x),y) -> 0() le(0(),y) -> true() le(s(x),0()) -> false() le(s(x),s(y)) -> le(x,y) minus(0(),y) -> 0() minus(s(x),y) -> if_minus(le(s(x),y),s(x),y) Signature: {gcd/2,if_gcd/3,if_minus/3,le/2,minus/2,gcd#/2,if_gcd#/3,if_minus#/3,le#/2,minus#/2} / {0/0,false/0,s/1,true/0,c_1/0,c_2/0,c_3/2,c_4/2,c_5/2,c_6/1,c_7/0,c_8/0,c_9/0,c_10/1,c_11/0,c_12/2} Obligation: Innermost basic terms: {gcd#,if_gcd#,if_minus#,le#,minus#}/{0,false,s,true} Applied Processor: SimplifyRHS Proof: Consider the dependency graph 1:S:if_minus#(false(),s(x),y) -> c_6(minus#(x,y)) -->_1 minus#(s(x),y) -> c_12(if_minus#(le(s(x),y),s(x),y),le#(s(x),y)):2 2:S:minus#(s(x),y) -> c_12(if_minus#(le(s(x),y),s(x),y),le#(s(x),y)) -->_1 if_minus#(false(),s(x),y) -> c_6(minus#(x,y)):1 3:W:gcd#(s(x),s(y)) -> if_gcd#(le(y,x),s(x),s(y)) -->_1 if_gcd#(true(),s(x),s(y)) -> minus#(x,y):8 -->_1 if_gcd#(true(),s(x),s(y)) -> gcd#(minus(x,y),s(y)):7 -->_1 if_gcd#(false(),s(x),s(y)) -> minus#(y,x):6 -->_1 if_gcd#(false(),s(x),s(y)) -> gcd#(minus(y,x),s(x)):5 5:W:if_gcd#(false(),s(x),s(y)) -> gcd#(minus(y,x),s(x)) -->_1 gcd#(s(x),s(y)) -> if_gcd#(le(y,x),s(x),s(y)):3 6:W:if_gcd#(false(),s(x),s(y)) -> minus#(y,x) -->_1 minus#(s(x),y) -> c_12(if_minus#(le(s(x),y),s(x),y),le#(s(x),y)):2 7:W:if_gcd#(true(),s(x),s(y)) -> gcd#(minus(x,y),s(y)) -->_1 gcd#(s(x),s(y)) -> if_gcd#(le(y,x),s(x),s(y)):3 8:W:if_gcd#(true(),s(x),s(y)) -> minus#(x,y) -->_1 minus#(s(x),y) -> c_12(if_minus#(le(s(x),y),s(x),y),le#(s(x),y)):2 Due to missing edges in the depndency graph, the right-hand sides of following rules could be simplified: minus#(s(x),y) -> c_12(if_minus#(le(s(x),y),s(x),y)) *** 1.1.1.1.1.2.2.1.1 Progress [(?,O(n^1))] *** Considered Problem: Strict DP Rules: if_minus#(false(),s(x),y) -> c_6(minus#(x,y)) minus#(s(x),y) -> c_12(if_minus#(le(s(x),y),s(x),y)) Strict TRS Rules: Weak DP Rules: gcd#(s(x),s(y)) -> if_gcd#(le(y,x),s(x),s(y)) if_gcd#(false(),s(x),s(y)) -> gcd#(minus(y,x),s(x)) if_gcd#(false(),s(x),s(y)) -> minus#(y,x) if_gcd#(true(),s(x),s(y)) -> gcd#(minus(x,y),s(y)) if_gcd#(true(),s(x),s(y)) -> minus#(x,y) Weak TRS Rules: if_minus(false(),s(x),y) -> s(minus(x,y)) if_minus(true(),s(x),y) -> 0() le(0(),y) -> true() le(s(x),0()) -> false() le(s(x),s(y)) -> le(x,y) minus(0(),y) -> 0() minus(s(x),y) -> if_minus(le(s(x),y),s(x),y) Signature: {gcd/2,if_gcd/3,if_minus/3,le/2,minus/2,gcd#/2,if_gcd#/3,if_minus#/3,le#/2,minus#/2} / {0/0,false/0,s/1,true/0,c_1/0,c_2/0,c_3/2,c_4/2,c_5/2,c_6/1,c_7/0,c_8/0,c_9/0,c_10/1,c_11/0,c_12/1} Obligation: Innermost basic terms: {gcd#,if_gcd#,if_minus#,le#,minus#}/{0,false,s,true} Applied Processor: PredecessorEstimationCP {onSelectionCP = any intersect of rules of CDG leaf and strict-rules, withComplexityPair = NaturalMI {miDimension = 1, miDegree = 1, miKind = Algebraic, uargs = UArgs, urules = URules, selector = Nothing, greedy = NoGreedy}} Proof: We first use the processor NaturalMI {miDimension = 1, miDegree = 1, miKind = Algebraic, uargs = UArgs, urules = URules, selector = Nothing, greedy = NoGreedy} to orient following rules strictly: 1: if_minus#(false(),s(x),y) -> c_6(minus#(x,y)) The strictly oriented rules are moved into the weak component. *** 1.1.1.1.1.2.2.1.1.1 Progress [(?,O(n^1))] *** Considered Problem: Strict DP Rules: if_minus#(false(),s(x),y) -> c_6(minus#(x,y)) minus#(s(x),y) -> c_12(if_minus#(le(s(x),y),s(x),y)) Strict TRS Rules: Weak DP Rules: gcd#(s(x),s(y)) -> if_gcd#(le(y,x),s(x),s(y)) if_gcd#(false(),s(x),s(y)) -> gcd#(minus(y,x),s(x)) if_gcd#(false(),s(x),s(y)) -> minus#(y,x) if_gcd#(true(),s(x),s(y)) -> gcd#(minus(x,y),s(y)) if_gcd#(true(),s(x),s(y)) -> minus#(x,y) Weak TRS Rules: if_minus(false(),s(x),y) -> s(minus(x,y)) if_minus(true(),s(x),y) -> 0() le(0(),y) -> true() le(s(x),0()) -> false() le(s(x),s(y)) -> le(x,y) minus(0(),y) -> 0() minus(s(x),y) -> if_minus(le(s(x),y),s(x),y) Signature: {gcd/2,if_gcd/3,if_minus/3,le/2,minus/2,gcd#/2,if_gcd#/3,if_minus#/3,le#/2,minus#/2} / {0/0,false/0,s/1,true/0,c_1/0,c_2/0,c_3/2,c_4/2,c_5/2,c_6/1,c_7/0,c_8/0,c_9/0,c_10/1,c_11/0,c_12/1} Obligation: Innermost basic terms: {gcd#,if_gcd#,if_minus#,le#,minus#}/{0,false,s,true} Applied Processor: NaturalMI {miDimension = 1, miDegree = 1, miKind = Algebraic, uargs = UArgs, urules = URules, selector = Just first alternative for predecessorEstimation any intersect of rules of CDG leaf and strict-rules, greedy = NoGreedy} Proof: We apply a matrix interpretation of kind constructor based matrix interpretation: The following argument positions are considered usable: uargs(c_6) = {1}, uargs(c_12) = {1} Following symbols are considered usable: {if_minus,minus,gcd#,if_gcd#,if_minus#,le#,minus#} TcT has computed the following interpretation: p(0) = [0] p(false) = [0] p(gcd) = [1] x1 + [1] x2 + [1] p(if_gcd) = [1] x2 + [4] p(if_minus) = [1] x2 + [0] p(le) = [0] p(minus) = [1] x1 + [0] p(s) = [1] x1 + [2] p(true) = [2] p(gcd#) = [1] x1 + [1] x2 + [14] p(if_gcd#) = [1] x2 + [1] x3 + [12] p(if_minus#) = [1] x2 + [9] p(le#) = [1] x2 + [0] p(minus#) = [1] x1 + [9] p(c_1) = [4] p(c_2) = [1] p(c_3) = [2] x1 + [1] p(c_4) = [1] p(c_5) = [1] x1 + [1] x2 + [2] p(c_6) = [1] x1 + [0] p(c_7) = [1] p(c_8) = [8] p(c_9) = [0] p(c_10) = [2] p(c_11) = [0] p(c_12) = [1] x1 + [0] Following rules are strictly oriented: if_minus#(false(),s(x),y) = [1] x + [11] > [1] x + [9] = c_6(minus#(x,y)) Following rules are (at-least) weakly oriented: gcd#(s(x),s(y)) = [1] x + [1] y + [18] >= [1] x + [1] y + [16] = if_gcd#(le(y,x),s(x),s(y)) if_gcd#(false(),s(x),s(y)) = [1] x + [1] y + [16] >= [1] x + [1] y + [16] = gcd#(minus(y,x),s(x)) if_gcd#(false(),s(x),s(y)) = [1] x + [1] y + [16] >= [1] y + [9] = minus#(y,x) if_gcd#(true(),s(x),s(y)) = [1] x + [1] y + [16] >= [1] x + [1] y + [16] = gcd#(minus(x,y),s(y)) if_gcd#(true(),s(x),s(y)) = [1] x + [1] y + [16] >= [1] x + [9] = minus#(x,y) minus#(s(x),y) = [1] x + [11] >= [1] x + [11] = c_12(if_minus#(le(s(x),y) ,s(x) ,y)) if_minus(false(),s(x),y) = [1] x + [2] >= [1] x + [2] = s(minus(x,y)) if_minus(true(),s(x),y) = [1] x + [2] >= [0] = 0() minus(0(),y) = [0] >= [0] = 0() minus(s(x),y) = [1] x + [2] >= [1] x + [2] = if_minus(le(s(x),y),s(x),y) *** 1.1.1.1.1.2.2.1.1.1.1 Progress [(?,O(1))] *** Considered Problem: Strict DP Rules: minus#(s(x),y) -> c_12(if_minus#(le(s(x),y),s(x),y)) Strict TRS Rules: Weak DP Rules: gcd#(s(x),s(y)) -> if_gcd#(le(y,x),s(x),s(y)) if_gcd#(false(),s(x),s(y)) -> gcd#(minus(y,x),s(x)) if_gcd#(false(),s(x),s(y)) -> minus#(y,x) if_gcd#(true(),s(x),s(y)) -> gcd#(minus(x,y),s(y)) if_gcd#(true(),s(x),s(y)) -> minus#(x,y) if_minus#(false(),s(x),y) -> c_6(minus#(x,y)) Weak TRS Rules: if_minus(false(),s(x),y) -> s(minus(x,y)) if_minus(true(),s(x),y) -> 0() le(0(),y) -> true() le(s(x),0()) -> false() le(s(x),s(y)) -> le(x,y) minus(0(),y) -> 0() minus(s(x),y) -> if_minus(le(s(x),y),s(x),y) Signature: {gcd/2,if_gcd/3,if_minus/3,le/2,minus/2,gcd#/2,if_gcd#/3,if_minus#/3,le#/2,minus#/2} / {0/0,false/0,s/1,true/0,c_1/0,c_2/0,c_3/2,c_4/2,c_5/2,c_6/1,c_7/0,c_8/0,c_9/0,c_10/1,c_11/0,c_12/1} Obligation: Innermost basic terms: {gcd#,if_gcd#,if_minus#,le#,minus#}/{0,false,s,true} Applied Processor: Assumption Proof: () *** 1.1.1.1.1.2.2.1.1.2 Progress [(?,O(n^1))] *** Considered Problem: Strict DP Rules: minus#(s(x),y) -> c_12(if_minus#(le(s(x),y),s(x),y)) Strict TRS Rules: Weak DP Rules: gcd#(s(x),s(y)) -> if_gcd#(le(y,x),s(x),s(y)) if_gcd#(false(),s(x),s(y)) -> gcd#(minus(y,x),s(x)) if_gcd#(false(),s(x),s(y)) -> minus#(y,x) if_gcd#(true(),s(x),s(y)) -> gcd#(minus(x,y),s(y)) if_gcd#(true(),s(x),s(y)) -> minus#(x,y) if_minus#(false(),s(x),y) -> c_6(minus#(x,y)) Weak TRS Rules: if_minus(false(),s(x),y) -> s(minus(x,y)) if_minus(true(),s(x),y) -> 0() le(0(),y) -> true() le(s(x),0()) -> false() le(s(x),s(y)) -> le(x,y) minus(0(),y) -> 0() minus(s(x),y) -> if_minus(le(s(x),y),s(x),y) Signature: {gcd/2,if_gcd/3,if_minus/3,le/2,minus/2,gcd#/2,if_gcd#/3,if_minus#/3,le#/2,minus#/2} / {0/0,false/0,s/1,true/0,c_1/0,c_2/0,c_3/2,c_4/2,c_5/2,c_6/1,c_7/0,c_8/0,c_9/0,c_10/1,c_11/0,c_12/1} Obligation: Innermost basic terms: {gcd#,if_gcd#,if_minus#,le#,minus#}/{0,false,s,true} Applied Processor: PredecessorEstimationCP {onSelectionCP = any intersect of rules of CDG leaf and strict-rules, withComplexityPair = NaturalMI {miDimension = 1, miDegree = 1, miKind = Algebraic, uargs = UArgs, urules = URules, selector = Nothing, greedy = NoGreedy}} Proof: We first use the processor NaturalMI {miDimension = 1, miDegree = 1, miKind = Algebraic, uargs = UArgs, urules = URules, selector = Nothing, greedy = NoGreedy} to orient following rules strictly: 1: minus#(s(x),y) -> c_12(if_minus#(le(s(x),y) ,s(x) ,y)) Consider the set of all dependency pairs 1: minus#(s(x),y) -> c_12(if_minus#(le(s(x),y) ,s(x) ,y)) 2: gcd#(s(x),s(y)) -> if_gcd#(le(y ,x) ,s(x) ,s(y)) 3: if_gcd#(false(),s(x),s(y)) -> gcd#(minus(y,x),s(x)) 4: if_gcd#(false(),s(x),s(y)) -> minus#(y,x) 5: if_gcd#(true(),s(x),s(y)) -> gcd#(minus(x,y),s(y)) 6: if_gcd#(true(),s(x),s(y)) -> minus#(x,y) 7: if_minus#(false(),s(x),y) -> c_6(minus#(x,y)) Processor NaturalMI {miDimension = 1, miDegree = 1, miKind = Algebraic, uargs = UArgs, urules = URules, selector = Nothing, greedy = NoGreedy}induces the complexity certificateTIME (?,O(n^1)) SPACE(?,?)on application of the dependency pairs {1} These cover all (indirect) predecessors of dependency pairs {1,7} their number of applications is equally bounded. The dependency pairs are shifted into the weak component. *** 1.1.1.1.1.2.2.1.1.2.1 Progress [(?,O(n^1))] *** Considered Problem: Strict DP Rules: minus#(s(x),y) -> c_12(if_minus#(le(s(x),y),s(x),y)) Strict TRS Rules: Weak DP Rules: gcd#(s(x),s(y)) -> if_gcd#(le(y,x),s(x),s(y)) if_gcd#(false(),s(x),s(y)) -> gcd#(minus(y,x),s(x)) if_gcd#(false(),s(x),s(y)) -> minus#(y,x) if_gcd#(true(),s(x),s(y)) -> gcd#(minus(x,y),s(y)) if_gcd#(true(),s(x),s(y)) -> minus#(x,y) if_minus#(false(),s(x),y) -> c_6(minus#(x,y)) Weak TRS Rules: if_minus(false(),s(x),y) -> s(minus(x,y)) if_minus(true(),s(x),y) -> 0() le(0(),y) -> true() le(s(x),0()) -> false() le(s(x),s(y)) -> le(x,y) minus(0(),y) -> 0() minus(s(x),y) -> if_minus(le(s(x),y),s(x),y) Signature: {gcd/2,if_gcd/3,if_minus/3,le/2,minus/2,gcd#/2,if_gcd#/3,if_minus#/3,le#/2,minus#/2} / {0/0,false/0,s/1,true/0,c_1/0,c_2/0,c_3/2,c_4/2,c_5/2,c_6/1,c_7/0,c_8/0,c_9/0,c_10/1,c_11/0,c_12/1} Obligation: Innermost basic terms: {gcd#,if_gcd#,if_minus#,le#,minus#}/{0,false,s,true} Applied Processor: NaturalMI {miDimension = 1, miDegree = 1, miKind = Algebraic, uargs = UArgs, urules = URules, selector = Just first alternative for predecessorEstimation any intersect of rules of CDG leaf and strict-rules, greedy = NoGreedy} Proof: We apply a matrix interpretation of kind constructor based matrix interpretation: The following argument positions are considered usable: uargs(c_6) = {1}, uargs(c_12) = {1} Following symbols are considered usable: {if_minus,minus,gcd#,if_gcd#,if_minus#,le#,minus#} TcT has computed the following interpretation: p(0) = [0] p(false) = [0] p(gcd) = [1] x1 + [1] x2 + [2] p(if_gcd) = [2] x3 + [1] p(if_minus) = [1] x2 + [0] p(le) = [0] p(minus) = [1] x1 + [0] p(s) = [1] x1 + [1] p(true) = [0] p(gcd#) = [1] x1 + [1] x2 + [5] p(if_gcd#) = [1] x2 + [1] x3 + [5] p(if_minus#) = [1] x2 + [1] x3 + [0] p(le#) = [2] x2 + [0] p(minus#) = [1] x1 + [1] x2 + [1] p(c_1) = [2] p(c_2) = [0] p(c_3) = [2] x1 + [8] x2 + [1] p(c_4) = [2] x1 + [2] x2 + [8] p(c_5) = [1] x2 + [0] p(c_6) = [1] x1 + [0] p(c_7) = [1] p(c_8) = [2] p(c_9) = [1] p(c_10) = [0] p(c_11) = [4] p(c_12) = [1] x1 + [0] Following rules are strictly oriented: minus#(s(x),y) = [1] x + [1] y + [2] > [1] x + [1] y + [1] = c_12(if_minus#(le(s(x),y) ,s(x) ,y)) Following rules are (at-least) weakly oriented: gcd#(s(x),s(y)) = [1] x + [1] y + [7] >= [1] x + [1] y + [7] = if_gcd#(le(y,x),s(x),s(y)) if_gcd#(false(),s(x),s(y)) = [1] x + [1] y + [7] >= [1] x + [1] y + [6] = gcd#(minus(y,x),s(x)) if_gcd#(false(),s(x),s(y)) = [1] x + [1] y + [7] >= [1] x + [1] y + [1] = minus#(y,x) if_gcd#(true(),s(x),s(y)) = [1] x + [1] y + [7] >= [1] x + [1] y + [6] = gcd#(minus(x,y),s(y)) if_gcd#(true(),s(x),s(y)) = [1] x + [1] y + [7] >= [1] x + [1] y + [1] = minus#(x,y) if_minus#(false(),s(x),y) = [1] x + [1] y + [1] >= [1] x + [1] y + [1] = c_6(minus#(x,y)) if_minus(false(),s(x),y) = [1] x + [1] >= [1] x + [1] = s(minus(x,y)) if_minus(true(),s(x),y) = [1] x + [1] >= [0] = 0() minus(0(),y) = [0] >= [0] = 0() minus(s(x),y) = [1] x + [1] >= [1] x + [1] = if_minus(le(s(x),y),s(x),y) *** 1.1.1.1.1.2.2.1.1.2.1.1 Progress [(?,O(1))] *** Considered Problem: Strict DP Rules: Strict TRS Rules: Weak DP Rules: gcd#(s(x),s(y)) -> if_gcd#(le(y,x),s(x),s(y)) if_gcd#(false(),s(x),s(y)) -> gcd#(minus(y,x),s(x)) if_gcd#(false(),s(x),s(y)) -> minus#(y,x) if_gcd#(true(),s(x),s(y)) -> gcd#(minus(x,y),s(y)) if_gcd#(true(),s(x),s(y)) -> minus#(x,y) if_minus#(false(),s(x),y) -> c_6(minus#(x,y)) minus#(s(x),y) -> c_12(if_minus#(le(s(x),y),s(x),y)) Weak TRS Rules: if_minus(false(),s(x),y) -> s(minus(x,y)) if_minus(true(),s(x),y) -> 0() le(0(),y) -> true() le(s(x),0()) -> false() le(s(x),s(y)) -> le(x,y) minus(0(),y) -> 0() minus(s(x),y) -> if_minus(le(s(x),y),s(x),y) Signature: {gcd/2,if_gcd/3,if_minus/3,le/2,minus/2,gcd#/2,if_gcd#/3,if_minus#/3,le#/2,minus#/2} / {0/0,false/0,s/1,true/0,c_1/0,c_2/0,c_3/2,c_4/2,c_5/2,c_6/1,c_7/0,c_8/0,c_9/0,c_10/1,c_11/0,c_12/1} Obligation: Innermost basic terms: {gcd#,if_gcd#,if_minus#,le#,minus#}/{0,false,s,true} Applied Processor: Assumption Proof: () *** 1.1.1.1.1.2.2.1.1.2.2 Progress [(O(1),O(1))] *** Considered Problem: Strict DP Rules: Strict TRS Rules: Weak DP Rules: gcd#(s(x),s(y)) -> if_gcd#(le(y,x),s(x),s(y)) if_gcd#(false(),s(x),s(y)) -> gcd#(minus(y,x),s(x)) if_gcd#(false(),s(x),s(y)) -> minus#(y,x) if_gcd#(true(),s(x),s(y)) -> gcd#(minus(x,y),s(y)) if_gcd#(true(),s(x),s(y)) -> minus#(x,y) if_minus#(false(),s(x),y) -> c_6(minus#(x,y)) minus#(s(x),y) -> c_12(if_minus#(le(s(x),y),s(x),y)) Weak TRS Rules: if_minus(false(),s(x),y) -> s(minus(x,y)) if_minus(true(),s(x),y) -> 0() le(0(),y) -> true() le(s(x),0()) -> false() le(s(x),s(y)) -> le(x,y) minus(0(),y) -> 0() minus(s(x),y) -> if_minus(le(s(x),y),s(x),y) Signature: {gcd/2,if_gcd/3,if_minus/3,le/2,minus/2,gcd#/2,if_gcd#/3,if_minus#/3,le#/2,minus#/2} / {0/0,false/0,s/1,true/0,c_1/0,c_2/0,c_3/2,c_4/2,c_5/2,c_6/1,c_7/0,c_8/0,c_9/0,c_10/1,c_11/0,c_12/1} Obligation: Innermost basic terms: {gcd#,if_gcd#,if_minus#,le#,minus#}/{0,false,s,true} Applied Processor: RemoveWeakSuffixes Proof: Consider the dependency graph 1:W:gcd#(s(x),s(y)) -> if_gcd#(le(y,x),s(x),s(y)) -->_1 if_gcd#(true(),s(x),s(y)) -> minus#(x,y):5 -->_1 if_gcd#(true(),s(x),s(y)) -> gcd#(minus(x,y),s(y)):4 -->_1 if_gcd#(false(),s(x),s(y)) -> minus#(y,x):3 -->_1 if_gcd#(false(),s(x),s(y)) -> gcd#(minus(y,x),s(x)):2 2:W:if_gcd#(false(),s(x),s(y)) -> gcd#(minus(y,x),s(x)) -->_1 gcd#(s(x),s(y)) -> if_gcd#(le(y,x),s(x),s(y)):1 3:W:if_gcd#(false(),s(x),s(y)) -> minus#(y,x) -->_1 minus#(s(x),y) -> c_12(if_minus#(le(s(x),y),s(x),y)):7 4:W:if_gcd#(true(),s(x),s(y)) -> gcd#(minus(x,y),s(y)) -->_1 gcd#(s(x),s(y)) -> if_gcd#(le(y,x),s(x),s(y)):1 5:W:if_gcd#(true(),s(x),s(y)) -> minus#(x,y) -->_1 minus#(s(x),y) -> c_12(if_minus#(le(s(x),y),s(x),y)):7 6:W:if_minus#(false(),s(x),y) -> c_6(minus#(x,y)) -->_1 minus#(s(x),y) -> c_12(if_minus#(le(s(x),y),s(x),y)):7 7:W:minus#(s(x),y) -> c_12(if_minus#(le(s(x),y),s(x),y)) -->_1 if_minus#(false(),s(x),y) -> c_6(minus#(x,y)):6 The following weak DPs constitute a sub-graph of the DG that is closed under successors. The DPs are removed. 1: gcd#(s(x),s(y)) -> if_gcd#(le(y ,x) ,s(x) ,s(y)) 4: if_gcd#(true(),s(x),s(y)) -> gcd#(minus(x,y),s(y)) 2: if_gcd#(false(),s(x),s(y)) -> gcd#(minus(y,x),s(x)) 3: if_gcd#(false(),s(x),s(y)) -> minus#(y,x) 5: if_gcd#(true(),s(x),s(y)) -> minus#(x,y) 7: minus#(s(x),y) -> c_12(if_minus#(le(s(x),y) ,s(x) ,y)) 6: if_minus#(false(),s(x),y) -> c_6(minus#(x,y)) *** 1.1.1.1.1.2.2.1.1.2.2.1 Progress [(O(1),O(1))] *** Considered Problem: Strict DP Rules: Strict TRS Rules: Weak DP Rules: Weak TRS Rules: if_minus(false(),s(x),y) -> s(minus(x,y)) if_minus(true(),s(x),y) -> 0() le(0(),y) -> true() le(s(x),0()) -> false() le(s(x),s(y)) -> le(x,y) minus(0(),y) -> 0() minus(s(x),y) -> if_minus(le(s(x),y),s(x),y) Signature: {gcd/2,if_gcd/3,if_minus/3,le/2,minus/2,gcd#/2,if_gcd#/3,if_minus#/3,le#/2,minus#/2} / {0/0,false/0,s/1,true/0,c_1/0,c_2/0,c_3/2,c_4/2,c_5/2,c_6/1,c_7/0,c_8/0,c_9/0,c_10/1,c_11/0,c_12/1} Obligation: Innermost basic terms: {gcd#,if_gcd#,if_minus#,le#,minus#}/{0,false,s,true} Applied Processor: EmptyProcessor Proof: The problem is already closed. The intended complexity is O(1).