0 Prolog
↳1 CutEliminatorProof (⇐)
↳2 Prolog
↳3 UndefinedPredicateHandlerProof (⇐)
↳4 Prolog
↳5 PrologToPiTRSProof (⇐)
↳6 PiTRS
↳7 DependencyPairsProof (⇔)
↳8 PiDP
↳9 DependencyGraphProof (⇔)
↳10 AND
↳11 PiDP
↳12 UsableRulesProof (⇔)
↳13 PiDP
↳14 PiDPToQDPProof (⇐)
↳15 QDP
↳16 Rewriting (⇔)
↳17 QDP
↳18 Rewriting (⇔)
↳19 QDP
↳20 UsableRulesProof (⇔)
↳21 QDP
↳22 QReductionProof (⇔)
↳23 QDP
↳24 NonTerminationProof (⇔)
↳25 FALSE
↳26 PiDP
↳27 UsableRulesProof (⇔)
↳28 PiDP
↳29 PiDPToQDPProof (⇐)
↳30 QDP
↳31 Rewriting (⇔)
↳32 QDP
↳33 Rewriting (⇔)
↳34 QDP
↳35 Rewriting (⇔)
↳36 QDP
↳37 UsableRulesProof (⇔)
↳38 QDP
↳39 QReductionProof (⇔)
↳40 QDP
↳41 Rewriting (⇔)
↳42 QDP
↳43 UsableRulesProof (⇔)
↳44 QDP
↳45 QReductionProof (⇔)
↳46 QDP
↳47 Narrowing (⇐)
↳48 QDP
↳49 Rewriting (⇔)
↳50 QDP
↳51 Rewriting (⇔)
↳52 QDP
↳53 Rewriting (⇔)
↳54 QDP
↳55 NonTerminationProof (⇔)
↳56 FALSE
↳57 PrologToPiTRSProof (⇐)
↳58 PiTRS
↳59 DependencyPairsProof (⇔)
↳60 PiDP
↳61 DependencyGraphProof (⇔)
↳62 AND
↳63 PiDP
↳64 UsableRulesProof (⇔)
↳65 PiDP
↳66 PiDPToQDPProof (⇐)
↳67 QDP
↳68 Rewriting (⇔)
↳69 QDP
↳70 Rewriting (⇔)
↳71 QDP
↳72 UsableRulesProof (⇔)
↳73 QDP
↳74 QReductionProof (⇔)
↳75 QDP
↳76 NonTerminationProof (⇔)
↳77 FALSE
↳78 PiDP
↳79 UsableRulesProof (⇔)
↳80 PiDP
↳81 PiDPToQDPProof (⇐)
↳82 QDP
↳83 Rewriting (⇔)
↳84 QDP
↳85 Rewriting (⇔)
↳86 QDP
↳87 Rewriting (⇔)
↳88 QDP
↳89 UsableRulesProof (⇔)
↳90 QDP
↳91 QReductionProof (⇔)
↳92 QDP
↳93 Rewriting (⇔)
↳94 QDP
↳95 UsableRulesProof (⇔)
↳96 QDP
↳97 QReductionProof (⇔)
↳98 QDP
↳99 Narrowing (⇐)
↳100 QDP
↳101 Rewriting (⇔)
↳102 QDP
↳103 Rewriting (⇔)
↳104 QDP
↳105 Rewriting (⇔)
↳106 QDP
↳107 NonTerminationProof (⇔)
↳108 FALSE
ordered_in_g([]) → U1_g(true_in_)
true_in_ → true_out_
U1_g(true_out_) → ordered_out_g([])
ordered_in_g(.(X1, [])) → U2_g(X1, true_in_)
U2_g(X1, true_out_) → ordered_out_g(.(X1, []))
ordered_in_g(Xs) → U3_g(Xs, head_in_ga(Xs, X))
head_in_ga([], X2) → head_out_ga([], X2)
head_in_ga(.(X, X3), X) → head_out_ga(.(X, X3), X)
U3_g(Xs, head_out_ga(Xs, X)) → U4_g(Xs, X, tail_in_ga(Xs, Ys))
tail_in_ga([], []) → tail_out_ga([], [])
tail_in_ga(.(X4, Xs), Xs) → tail_out_ga(.(X4, Xs), Xs)
U4_g(Xs, X, tail_out_ga(Xs, Ys)) → U5_g(Xs, X, Ys, head_in_ga(Ys, Y))
U5_g(Xs, X, Ys, head_out_ga(Ys, Y)) → U6_g(Xs, X, Ys, Y, tail_in_ga(Ys, Zs))
U6_g(Xs, X, Ys, Y, tail_out_ga(Ys, Zs)) → U7_g(Xs, X, Ys, Y, Zs, less_in_aa(X, s(Y)))
less_in_aa(0, s(X5)) → U9_aa(X5, true_in_)
U9_aa(X5, true_out_) → less_out_aa(0, s(X5))
less_in_aa(X, Y) → U10_aa(X, Y, p_in_aa(X, Px))
p_in_aa(0, 0) → p_out_aa(0, 0)
p_in_aa(s(X), X) → p_out_aa(s(X), X)
U10_aa(X, Y, p_out_aa(X, Px)) → U11_aa(X, Y, Px, p_in_aa(Y, Py))
U11_aa(X, Y, Px, p_out_aa(Y, Py)) → U12_aa(X, Y, less_in_aa(Px, Py))
U12_aa(X, Y, less_out_aa(Px, Py)) → less_out_aa(X, Y)
U7_g(Xs, X, Ys, Y, Zs, less_out_aa(X, s(Y))) → U8_g(Xs, ordered_in_a(.(Y, Zs)))
ordered_in_a([]) → U1_a(true_in_)
U1_a(true_out_) → ordered_out_a([])
ordered_in_a(.(X1, [])) → U2_a(X1, true_in_)
U2_a(X1, true_out_) → ordered_out_a(.(X1, []))
ordered_in_a(Xs) → U3_a(Xs, head_in_aa(Xs, X))
head_in_aa([], X2) → head_out_aa([], X2)
head_in_aa(.(X, X3), X) → head_out_aa(.(X, X3), X)
U3_a(Xs, head_out_aa(Xs, X)) → U4_a(Xs, X, tail_in_aa(Xs, Ys))
tail_in_aa([], []) → tail_out_aa([], [])
tail_in_aa(.(X4, Xs), Xs) → tail_out_aa(.(X4, Xs), Xs)
U4_a(Xs, X, tail_out_aa(Xs, Ys)) → U5_a(Xs, X, Ys, head_in_aa(Ys, Y))
U5_a(Xs, X, Ys, head_out_aa(Ys, Y)) → U6_a(Xs, X, Ys, Y, tail_in_aa(Ys, Zs))
U6_a(Xs, X, Ys, Y, tail_out_aa(Ys, Zs)) → U7_a(Xs, X, Ys, Y, Zs, less_in_aa(X, s(Y)))
U7_a(Xs, X, Ys, Y, Zs, less_out_aa(X, s(Y))) → U8_a(Xs, ordered_in_a(.(Y, Zs)))
U8_a(Xs, ordered_out_a(.(Y, Zs))) → ordered_out_a(Xs)
U8_g(Xs, ordered_out_a(.(Y, Zs))) → ordered_out_g(Xs)
Infinitary Constructor Rewriting Termination of PiTRS implies Termination of Prolog
ordered_in_g([]) → U1_g(true_in_)
true_in_ → true_out_
U1_g(true_out_) → ordered_out_g([])
ordered_in_g(.(X1, [])) → U2_g(X1, true_in_)
U2_g(X1, true_out_) → ordered_out_g(.(X1, []))
ordered_in_g(Xs) → U3_g(Xs, head_in_ga(Xs, X))
head_in_ga([], X2) → head_out_ga([], X2)
head_in_ga(.(X, X3), X) → head_out_ga(.(X, X3), X)
U3_g(Xs, head_out_ga(Xs, X)) → U4_g(Xs, X, tail_in_ga(Xs, Ys))
tail_in_ga([], []) → tail_out_ga([], [])
tail_in_ga(.(X4, Xs), Xs) → tail_out_ga(.(X4, Xs), Xs)
U4_g(Xs, X, tail_out_ga(Xs, Ys)) → U5_g(Xs, X, Ys, head_in_ga(Ys, Y))
U5_g(Xs, X, Ys, head_out_ga(Ys, Y)) → U6_g(Xs, X, Ys, Y, tail_in_ga(Ys, Zs))
U6_g(Xs, X, Ys, Y, tail_out_ga(Ys, Zs)) → U7_g(Xs, X, Ys, Y, Zs, less_in_aa(X, s(Y)))
less_in_aa(0, s(X5)) → U9_aa(X5, true_in_)
U9_aa(X5, true_out_) → less_out_aa(0, s(X5))
less_in_aa(X, Y) → U10_aa(X, Y, p_in_aa(X, Px))
p_in_aa(0, 0) → p_out_aa(0, 0)
p_in_aa(s(X), X) → p_out_aa(s(X), X)
U10_aa(X, Y, p_out_aa(X, Px)) → U11_aa(X, Y, Px, p_in_aa(Y, Py))
U11_aa(X, Y, Px, p_out_aa(Y, Py)) → U12_aa(X, Y, less_in_aa(Px, Py))
U12_aa(X, Y, less_out_aa(Px, Py)) → less_out_aa(X, Y)
U7_g(Xs, X, Ys, Y, Zs, less_out_aa(X, s(Y))) → U8_g(Xs, ordered_in_a(.(Y, Zs)))
ordered_in_a([]) → U1_a(true_in_)
U1_a(true_out_) → ordered_out_a([])
ordered_in_a(.(X1, [])) → U2_a(X1, true_in_)
U2_a(X1, true_out_) → ordered_out_a(.(X1, []))
ordered_in_a(Xs) → U3_a(Xs, head_in_aa(Xs, X))
head_in_aa([], X2) → head_out_aa([], X2)
head_in_aa(.(X, X3), X) → head_out_aa(.(X, X3), X)
U3_a(Xs, head_out_aa(Xs, X)) → U4_a(Xs, X, tail_in_aa(Xs, Ys))
tail_in_aa([], []) → tail_out_aa([], [])
tail_in_aa(.(X4, Xs), Xs) → tail_out_aa(.(X4, Xs), Xs)
U4_a(Xs, X, tail_out_aa(Xs, Ys)) → U5_a(Xs, X, Ys, head_in_aa(Ys, Y))
U5_a(Xs, X, Ys, head_out_aa(Ys, Y)) → U6_a(Xs, X, Ys, Y, tail_in_aa(Ys, Zs))
U6_a(Xs, X, Ys, Y, tail_out_aa(Ys, Zs)) → U7_a(Xs, X, Ys, Y, Zs, less_in_aa(X, s(Y)))
U7_a(Xs, X, Ys, Y, Zs, less_out_aa(X, s(Y))) → U8_a(Xs, ordered_in_a(.(Y, Zs)))
U8_a(Xs, ordered_out_a(.(Y, Zs))) → ordered_out_a(Xs)
U8_g(Xs, ordered_out_a(.(Y, Zs))) → ordered_out_g(Xs)
ORDERED_IN_G([]) → U1_G(true_in_)
ORDERED_IN_G([]) → TRUE_IN_
ORDERED_IN_G(.(X1, [])) → U2_G(X1, true_in_)
ORDERED_IN_G(.(X1, [])) → TRUE_IN_
ORDERED_IN_G(Xs) → U3_G(Xs, head_in_ga(Xs, X))
ORDERED_IN_G(Xs) → HEAD_IN_GA(Xs, X)
U3_G(Xs, head_out_ga(Xs, X)) → U4_G(Xs, X, tail_in_ga(Xs, Ys))
U3_G(Xs, head_out_ga(Xs, X)) → TAIL_IN_GA(Xs, Ys)
U4_G(Xs, X, tail_out_ga(Xs, Ys)) → U5_G(Xs, X, Ys, head_in_ga(Ys, Y))
U4_G(Xs, X, tail_out_ga(Xs, Ys)) → HEAD_IN_GA(Ys, Y)
U5_G(Xs, X, Ys, head_out_ga(Ys, Y)) → U6_G(Xs, X, Ys, Y, tail_in_ga(Ys, Zs))
U5_G(Xs, X, Ys, head_out_ga(Ys, Y)) → TAIL_IN_GA(Ys, Zs)
U6_G(Xs, X, Ys, Y, tail_out_ga(Ys, Zs)) → U7_G(Xs, X, Ys, Y, Zs, less_in_aa(X, s(Y)))
U6_G(Xs, X, Ys, Y, tail_out_ga(Ys, Zs)) → LESS_IN_AA(X, s(Y))
LESS_IN_AA(0, s(X5)) → U9_AA(X5, true_in_)
LESS_IN_AA(0, s(X5)) → TRUE_IN_
LESS_IN_AA(X, Y) → U10_AA(X, Y, p_in_aa(X, Px))
LESS_IN_AA(X, Y) → P_IN_AA(X, Px)
U10_AA(X, Y, p_out_aa(X, Px)) → U11_AA(X, Y, Px, p_in_aa(Y, Py))
U10_AA(X, Y, p_out_aa(X, Px)) → P_IN_AA(Y, Py)
U11_AA(X, Y, Px, p_out_aa(Y, Py)) → U12_AA(X, Y, less_in_aa(Px, Py))
U11_AA(X, Y, Px, p_out_aa(Y, Py)) → LESS_IN_AA(Px, Py)
U7_G(Xs, X, Ys, Y, Zs, less_out_aa(X, s(Y))) → U8_G(Xs, ordered_in_a(.(Y, Zs)))
U7_G(Xs, X, Ys, Y, Zs, less_out_aa(X, s(Y))) → ORDERED_IN_A(.(Y, Zs))
ORDERED_IN_A([]) → U1_A(true_in_)
ORDERED_IN_A([]) → TRUE_IN_
ORDERED_IN_A(.(X1, [])) → U2_A(X1, true_in_)
ORDERED_IN_A(.(X1, [])) → TRUE_IN_
ORDERED_IN_A(Xs) → U3_A(Xs, head_in_aa(Xs, X))
ORDERED_IN_A(Xs) → HEAD_IN_AA(Xs, X)
U3_A(Xs, head_out_aa(Xs, X)) → U4_A(Xs, X, tail_in_aa(Xs, Ys))
U3_A(Xs, head_out_aa(Xs, X)) → TAIL_IN_AA(Xs, Ys)
U4_A(Xs, X, tail_out_aa(Xs, Ys)) → U5_A(Xs, X, Ys, head_in_aa(Ys, Y))
U4_A(Xs, X, tail_out_aa(Xs, Ys)) → HEAD_IN_AA(Ys, Y)
U5_A(Xs, X, Ys, head_out_aa(Ys, Y)) → U6_A(Xs, X, Ys, Y, tail_in_aa(Ys, Zs))
U5_A(Xs, X, Ys, head_out_aa(Ys, Y)) → TAIL_IN_AA(Ys, Zs)
U6_A(Xs, X, Ys, Y, tail_out_aa(Ys, Zs)) → U7_A(Xs, X, Ys, Y, Zs, less_in_aa(X, s(Y)))
U6_A(Xs, X, Ys, Y, tail_out_aa(Ys, Zs)) → LESS_IN_AA(X, s(Y))
U7_A(Xs, X, Ys, Y, Zs, less_out_aa(X, s(Y))) → U8_A(Xs, ordered_in_a(.(Y, Zs)))
U7_A(Xs, X, Ys, Y, Zs, less_out_aa(X, s(Y))) → ORDERED_IN_A(.(Y, Zs))
ordered_in_g([]) → U1_g(true_in_)
true_in_ → true_out_
U1_g(true_out_) → ordered_out_g([])
ordered_in_g(.(X1, [])) → U2_g(X1, true_in_)
U2_g(X1, true_out_) → ordered_out_g(.(X1, []))
ordered_in_g(Xs) → U3_g(Xs, head_in_ga(Xs, X))
head_in_ga([], X2) → head_out_ga([], X2)
head_in_ga(.(X, X3), X) → head_out_ga(.(X, X3), X)
U3_g(Xs, head_out_ga(Xs, X)) → U4_g(Xs, X, tail_in_ga(Xs, Ys))
tail_in_ga([], []) → tail_out_ga([], [])
tail_in_ga(.(X4, Xs), Xs) → tail_out_ga(.(X4, Xs), Xs)
U4_g(Xs, X, tail_out_ga(Xs, Ys)) → U5_g(Xs, X, Ys, head_in_ga(Ys, Y))
U5_g(Xs, X, Ys, head_out_ga(Ys, Y)) → U6_g(Xs, X, Ys, Y, tail_in_ga(Ys, Zs))
U6_g(Xs, X, Ys, Y, tail_out_ga(Ys, Zs)) → U7_g(Xs, X, Ys, Y, Zs, less_in_aa(X, s(Y)))
less_in_aa(0, s(X5)) → U9_aa(X5, true_in_)
U9_aa(X5, true_out_) → less_out_aa(0, s(X5))
less_in_aa(X, Y) → U10_aa(X, Y, p_in_aa(X, Px))
p_in_aa(0, 0) → p_out_aa(0, 0)
p_in_aa(s(X), X) → p_out_aa(s(X), X)
U10_aa(X, Y, p_out_aa(X, Px)) → U11_aa(X, Y, Px, p_in_aa(Y, Py))
U11_aa(X, Y, Px, p_out_aa(Y, Py)) → U12_aa(X, Y, less_in_aa(Px, Py))
U12_aa(X, Y, less_out_aa(Px, Py)) → less_out_aa(X, Y)
U7_g(Xs, X, Ys, Y, Zs, less_out_aa(X, s(Y))) → U8_g(Xs, ordered_in_a(.(Y, Zs)))
ordered_in_a([]) → U1_a(true_in_)
U1_a(true_out_) → ordered_out_a([])
ordered_in_a(.(X1, [])) → U2_a(X1, true_in_)
U2_a(X1, true_out_) → ordered_out_a(.(X1, []))
ordered_in_a(Xs) → U3_a(Xs, head_in_aa(Xs, X))
head_in_aa([], X2) → head_out_aa([], X2)
head_in_aa(.(X, X3), X) → head_out_aa(.(X, X3), X)
U3_a(Xs, head_out_aa(Xs, X)) → U4_a(Xs, X, tail_in_aa(Xs, Ys))
tail_in_aa([], []) → tail_out_aa([], [])
tail_in_aa(.(X4, Xs), Xs) → tail_out_aa(.(X4, Xs), Xs)
U4_a(Xs, X, tail_out_aa(Xs, Ys)) → U5_a(Xs, X, Ys, head_in_aa(Ys, Y))
U5_a(Xs, X, Ys, head_out_aa(Ys, Y)) → U6_a(Xs, X, Ys, Y, tail_in_aa(Ys, Zs))
U6_a(Xs, X, Ys, Y, tail_out_aa(Ys, Zs)) → U7_a(Xs, X, Ys, Y, Zs, less_in_aa(X, s(Y)))
U7_a(Xs, X, Ys, Y, Zs, less_out_aa(X, s(Y))) → U8_a(Xs, ordered_in_a(.(Y, Zs)))
U8_a(Xs, ordered_out_a(.(Y, Zs))) → ordered_out_a(Xs)
U8_g(Xs, ordered_out_a(.(Y, Zs))) → ordered_out_g(Xs)
ORDERED_IN_G([]) → U1_G(true_in_)
ORDERED_IN_G([]) → TRUE_IN_
ORDERED_IN_G(.(X1, [])) → U2_G(X1, true_in_)
ORDERED_IN_G(.(X1, [])) → TRUE_IN_
ORDERED_IN_G(Xs) → U3_G(Xs, head_in_ga(Xs, X))
ORDERED_IN_G(Xs) → HEAD_IN_GA(Xs, X)
U3_G(Xs, head_out_ga(Xs, X)) → U4_G(Xs, X, tail_in_ga(Xs, Ys))
U3_G(Xs, head_out_ga(Xs, X)) → TAIL_IN_GA(Xs, Ys)
U4_G(Xs, X, tail_out_ga(Xs, Ys)) → U5_G(Xs, X, Ys, head_in_ga(Ys, Y))
U4_G(Xs, X, tail_out_ga(Xs, Ys)) → HEAD_IN_GA(Ys, Y)
U5_G(Xs, X, Ys, head_out_ga(Ys, Y)) → U6_G(Xs, X, Ys, Y, tail_in_ga(Ys, Zs))
U5_G(Xs, X, Ys, head_out_ga(Ys, Y)) → TAIL_IN_GA(Ys, Zs)
U6_G(Xs, X, Ys, Y, tail_out_ga(Ys, Zs)) → U7_G(Xs, X, Ys, Y, Zs, less_in_aa(X, s(Y)))
U6_G(Xs, X, Ys, Y, tail_out_ga(Ys, Zs)) → LESS_IN_AA(X, s(Y))
LESS_IN_AA(0, s(X5)) → U9_AA(X5, true_in_)
LESS_IN_AA(0, s(X5)) → TRUE_IN_
LESS_IN_AA(X, Y) → U10_AA(X, Y, p_in_aa(X, Px))
LESS_IN_AA(X, Y) → P_IN_AA(X, Px)
U10_AA(X, Y, p_out_aa(X, Px)) → U11_AA(X, Y, Px, p_in_aa(Y, Py))
U10_AA(X, Y, p_out_aa(X, Px)) → P_IN_AA(Y, Py)
U11_AA(X, Y, Px, p_out_aa(Y, Py)) → U12_AA(X, Y, less_in_aa(Px, Py))
U11_AA(X, Y, Px, p_out_aa(Y, Py)) → LESS_IN_AA(Px, Py)
U7_G(Xs, X, Ys, Y, Zs, less_out_aa(X, s(Y))) → U8_G(Xs, ordered_in_a(.(Y, Zs)))
U7_G(Xs, X, Ys, Y, Zs, less_out_aa(X, s(Y))) → ORDERED_IN_A(.(Y, Zs))
ORDERED_IN_A([]) → U1_A(true_in_)
ORDERED_IN_A([]) → TRUE_IN_
ORDERED_IN_A(.(X1, [])) → U2_A(X1, true_in_)
ORDERED_IN_A(.(X1, [])) → TRUE_IN_
ORDERED_IN_A(Xs) → U3_A(Xs, head_in_aa(Xs, X))
ORDERED_IN_A(Xs) → HEAD_IN_AA(Xs, X)
U3_A(Xs, head_out_aa(Xs, X)) → U4_A(Xs, X, tail_in_aa(Xs, Ys))
U3_A(Xs, head_out_aa(Xs, X)) → TAIL_IN_AA(Xs, Ys)
U4_A(Xs, X, tail_out_aa(Xs, Ys)) → U5_A(Xs, X, Ys, head_in_aa(Ys, Y))
U4_A(Xs, X, tail_out_aa(Xs, Ys)) → HEAD_IN_AA(Ys, Y)
U5_A(Xs, X, Ys, head_out_aa(Ys, Y)) → U6_A(Xs, X, Ys, Y, tail_in_aa(Ys, Zs))
U5_A(Xs, X, Ys, head_out_aa(Ys, Y)) → TAIL_IN_AA(Ys, Zs)
U6_A(Xs, X, Ys, Y, tail_out_aa(Ys, Zs)) → U7_A(Xs, X, Ys, Y, Zs, less_in_aa(X, s(Y)))
U6_A(Xs, X, Ys, Y, tail_out_aa(Ys, Zs)) → LESS_IN_AA(X, s(Y))
U7_A(Xs, X, Ys, Y, Zs, less_out_aa(X, s(Y))) → U8_A(Xs, ordered_in_a(.(Y, Zs)))
U7_A(Xs, X, Ys, Y, Zs, less_out_aa(X, s(Y))) → ORDERED_IN_A(.(Y, Zs))
ordered_in_g([]) → U1_g(true_in_)
true_in_ → true_out_
U1_g(true_out_) → ordered_out_g([])
ordered_in_g(.(X1, [])) → U2_g(X1, true_in_)
U2_g(X1, true_out_) → ordered_out_g(.(X1, []))
ordered_in_g(Xs) → U3_g(Xs, head_in_ga(Xs, X))
head_in_ga([], X2) → head_out_ga([], X2)
head_in_ga(.(X, X3), X) → head_out_ga(.(X, X3), X)
U3_g(Xs, head_out_ga(Xs, X)) → U4_g(Xs, X, tail_in_ga(Xs, Ys))
tail_in_ga([], []) → tail_out_ga([], [])
tail_in_ga(.(X4, Xs), Xs) → tail_out_ga(.(X4, Xs), Xs)
U4_g(Xs, X, tail_out_ga(Xs, Ys)) → U5_g(Xs, X, Ys, head_in_ga(Ys, Y))
U5_g(Xs, X, Ys, head_out_ga(Ys, Y)) → U6_g(Xs, X, Ys, Y, tail_in_ga(Ys, Zs))
U6_g(Xs, X, Ys, Y, tail_out_ga(Ys, Zs)) → U7_g(Xs, X, Ys, Y, Zs, less_in_aa(X, s(Y)))
less_in_aa(0, s(X5)) → U9_aa(X5, true_in_)
U9_aa(X5, true_out_) → less_out_aa(0, s(X5))
less_in_aa(X, Y) → U10_aa(X, Y, p_in_aa(X, Px))
p_in_aa(0, 0) → p_out_aa(0, 0)
p_in_aa(s(X), X) → p_out_aa(s(X), X)
U10_aa(X, Y, p_out_aa(X, Px)) → U11_aa(X, Y, Px, p_in_aa(Y, Py))
U11_aa(X, Y, Px, p_out_aa(Y, Py)) → U12_aa(X, Y, less_in_aa(Px, Py))
U12_aa(X, Y, less_out_aa(Px, Py)) → less_out_aa(X, Y)
U7_g(Xs, X, Ys, Y, Zs, less_out_aa(X, s(Y))) → U8_g(Xs, ordered_in_a(.(Y, Zs)))
ordered_in_a([]) → U1_a(true_in_)
U1_a(true_out_) → ordered_out_a([])
ordered_in_a(.(X1, [])) → U2_a(X1, true_in_)
U2_a(X1, true_out_) → ordered_out_a(.(X1, []))
ordered_in_a(Xs) → U3_a(Xs, head_in_aa(Xs, X))
head_in_aa([], X2) → head_out_aa([], X2)
head_in_aa(.(X, X3), X) → head_out_aa(.(X, X3), X)
U3_a(Xs, head_out_aa(Xs, X)) → U4_a(Xs, X, tail_in_aa(Xs, Ys))
tail_in_aa([], []) → tail_out_aa([], [])
tail_in_aa(.(X4, Xs), Xs) → tail_out_aa(.(X4, Xs), Xs)
U4_a(Xs, X, tail_out_aa(Xs, Ys)) → U5_a(Xs, X, Ys, head_in_aa(Ys, Y))
U5_a(Xs, X, Ys, head_out_aa(Ys, Y)) → U6_a(Xs, X, Ys, Y, tail_in_aa(Ys, Zs))
U6_a(Xs, X, Ys, Y, tail_out_aa(Ys, Zs)) → U7_a(Xs, X, Ys, Y, Zs, less_in_aa(X, s(Y)))
U7_a(Xs, X, Ys, Y, Zs, less_out_aa(X, s(Y))) → U8_a(Xs, ordered_in_a(.(Y, Zs)))
U8_a(Xs, ordered_out_a(.(Y, Zs))) → ordered_out_a(Xs)
U8_g(Xs, ordered_out_a(.(Y, Zs))) → ordered_out_g(Xs)
LESS_IN_AA(X, Y) → U10_AA(X, Y, p_in_aa(X, Px))
U10_AA(X, Y, p_out_aa(X, Px)) → U11_AA(X, Y, Px, p_in_aa(Y, Py))
U11_AA(X, Y, Px, p_out_aa(Y, Py)) → LESS_IN_AA(Px, Py)
ordered_in_g([]) → U1_g(true_in_)
true_in_ → true_out_
U1_g(true_out_) → ordered_out_g([])
ordered_in_g(.(X1, [])) → U2_g(X1, true_in_)
U2_g(X1, true_out_) → ordered_out_g(.(X1, []))
ordered_in_g(Xs) → U3_g(Xs, head_in_ga(Xs, X))
head_in_ga([], X2) → head_out_ga([], X2)
head_in_ga(.(X, X3), X) → head_out_ga(.(X, X3), X)
U3_g(Xs, head_out_ga(Xs, X)) → U4_g(Xs, X, tail_in_ga(Xs, Ys))
tail_in_ga([], []) → tail_out_ga([], [])
tail_in_ga(.(X4, Xs), Xs) → tail_out_ga(.(X4, Xs), Xs)
U4_g(Xs, X, tail_out_ga(Xs, Ys)) → U5_g(Xs, X, Ys, head_in_ga(Ys, Y))
U5_g(Xs, X, Ys, head_out_ga(Ys, Y)) → U6_g(Xs, X, Ys, Y, tail_in_ga(Ys, Zs))
U6_g(Xs, X, Ys, Y, tail_out_ga(Ys, Zs)) → U7_g(Xs, X, Ys, Y, Zs, less_in_aa(X, s(Y)))
less_in_aa(0, s(X5)) → U9_aa(X5, true_in_)
U9_aa(X5, true_out_) → less_out_aa(0, s(X5))
less_in_aa(X, Y) → U10_aa(X, Y, p_in_aa(X, Px))
p_in_aa(0, 0) → p_out_aa(0, 0)
p_in_aa(s(X), X) → p_out_aa(s(X), X)
U10_aa(X, Y, p_out_aa(X, Px)) → U11_aa(X, Y, Px, p_in_aa(Y, Py))
U11_aa(X, Y, Px, p_out_aa(Y, Py)) → U12_aa(X, Y, less_in_aa(Px, Py))
U12_aa(X, Y, less_out_aa(Px, Py)) → less_out_aa(X, Y)
U7_g(Xs, X, Ys, Y, Zs, less_out_aa(X, s(Y))) → U8_g(Xs, ordered_in_a(.(Y, Zs)))
ordered_in_a([]) → U1_a(true_in_)
U1_a(true_out_) → ordered_out_a([])
ordered_in_a(.(X1, [])) → U2_a(X1, true_in_)
U2_a(X1, true_out_) → ordered_out_a(.(X1, []))
ordered_in_a(Xs) → U3_a(Xs, head_in_aa(Xs, X))
head_in_aa([], X2) → head_out_aa([], X2)
head_in_aa(.(X, X3), X) → head_out_aa(.(X, X3), X)
U3_a(Xs, head_out_aa(Xs, X)) → U4_a(Xs, X, tail_in_aa(Xs, Ys))
tail_in_aa([], []) → tail_out_aa([], [])
tail_in_aa(.(X4, Xs), Xs) → tail_out_aa(.(X4, Xs), Xs)
U4_a(Xs, X, tail_out_aa(Xs, Ys)) → U5_a(Xs, X, Ys, head_in_aa(Ys, Y))
U5_a(Xs, X, Ys, head_out_aa(Ys, Y)) → U6_a(Xs, X, Ys, Y, tail_in_aa(Ys, Zs))
U6_a(Xs, X, Ys, Y, tail_out_aa(Ys, Zs)) → U7_a(Xs, X, Ys, Y, Zs, less_in_aa(X, s(Y)))
U7_a(Xs, X, Ys, Y, Zs, less_out_aa(X, s(Y))) → U8_a(Xs, ordered_in_a(.(Y, Zs)))
U8_a(Xs, ordered_out_a(.(Y, Zs))) → ordered_out_a(Xs)
U8_g(Xs, ordered_out_a(.(Y, Zs))) → ordered_out_g(Xs)
LESS_IN_AA(X, Y) → U10_AA(X, Y, p_in_aa(X, Px))
U10_AA(X, Y, p_out_aa(X, Px)) → U11_AA(X, Y, Px, p_in_aa(Y, Py))
U11_AA(X, Y, Px, p_out_aa(Y, Py)) → LESS_IN_AA(Px, Py)
p_in_aa(0, 0) → p_out_aa(0, 0)
p_in_aa(s(X), X) → p_out_aa(s(X), X)
LESS_IN_AA → U10_AA(p_in_aa)
U10_AA(p_out_aa) → U11_AA(p_in_aa)
U11_AA(p_out_aa) → LESS_IN_AA
p_in_aa → p_out_aa
p_in_aa
LESS_IN_AA → U10_AA(p_out_aa)
U10_AA(p_out_aa) → U11_AA(p_in_aa)
U11_AA(p_out_aa) → LESS_IN_AA
LESS_IN_AA → U10_AA(p_out_aa)
p_in_aa → p_out_aa
p_in_aa
U10_AA(p_out_aa) → U11_AA(p_out_aa)
U11_AA(p_out_aa) → LESS_IN_AA
LESS_IN_AA → U10_AA(p_out_aa)
U10_AA(p_out_aa) → U11_AA(p_out_aa)
p_in_aa → p_out_aa
p_in_aa
U11_AA(p_out_aa) → LESS_IN_AA
LESS_IN_AA → U10_AA(p_out_aa)
U10_AA(p_out_aa) → U11_AA(p_out_aa)
p_in_aa
p_in_aa
U11_AA(p_out_aa) → LESS_IN_AA
LESS_IN_AA → U10_AA(p_out_aa)
U10_AA(p_out_aa) → U11_AA(p_out_aa)
U6_A(Xs, X, Ys, Y, tail_out_aa(Ys, Zs)) → U7_A(Xs, X, Ys, Y, Zs, less_in_aa(X, s(Y)))
U7_A(Xs, X, Ys, Y, Zs, less_out_aa(X, s(Y))) → ORDERED_IN_A(.(Y, Zs))
ORDERED_IN_A(Xs) → U3_A(Xs, head_in_aa(Xs, X))
U3_A(Xs, head_out_aa(Xs, X)) → U4_A(Xs, X, tail_in_aa(Xs, Ys))
U4_A(Xs, X, tail_out_aa(Xs, Ys)) → U5_A(Xs, X, Ys, head_in_aa(Ys, Y))
U5_A(Xs, X, Ys, head_out_aa(Ys, Y)) → U6_A(Xs, X, Ys, Y, tail_in_aa(Ys, Zs))
ordered_in_g([]) → U1_g(true_in_)
true_in_ → true_out_
U1_g(true_out_) → ordered_out_g([])
ordered_in_g(.(X1, [])) → U2_g(X1, true_in_)
U2_g(X1, true_out_) → ordered_out_g(.(X1, []))
ordered_in_g(Xs) → U3_g(Xs, head_in_ga(Xs, X))
head_in_ga([], X2) → head_out_ga([], X2)
head_in_ga(.(X, X3), X) → head_out_ga(.(X, X3), X)
U3_g(Xs, head_out_ga(Xs, X)) → U4_g(Xs, X, tail_in_ga(Xs, Ys))
tail_in_ga([], []) → tail_out_ga([], [])
tail_in_ga(.(X4, Xs), Xs) → tail_out_ga(.(X4, Xs), Xs)
U4_g(Xs, X, tail_out_ga(Xs, Ys)) → U5_g(Xs, X, Ys, head_in_ga(Ys, Y))
U5_g(Xs, X, Ys, head_out_ga(Ys, Y)) → U6_g(Xs, X, Ys, Y, tail_in_ga(Ys, Zs))
U6_g(Xs, X, Ys, Y, tail_out_ga(Ys, Zs)) → U7_g(Xs, X, Ys, Y, Zs, less_in_aa(X, s(Y)))
less_in_aa(0, s(X5)) → U9_aa(X5, true_in_)
U9_aa(X5, true_out_) → less_out_aa(0, s(X5))
less_in_aa(X, Y) → U10_aa(X, Y, p_in_aa(X, Px))
p_in_aa(0, 0) → p_out_aa(0, 0)
p_in_aa(s(X), X) → p_out_aa(s(X), X)
U10_aa(X, Y, p_out_aa(X, Px)) → U11_aa(X, Y, Px, p_in_aa(Y, Py))
U11_aa(X, Y, Px, p_out_aa(Y, Py)) → U12_aa(X, Y, less_in_aa(Px, Py))
U12_aa(X, Y, less_out_aa(Px, Py)) → less_out_aa(X, Y)
U7_g(Xs, X, Ys, Y, Zs, less_out_aa(X, s(Y))) → U8_g(Xs, ordered_in_a(.(Y, Zs)))
ordered_in_a([]) → U1_a(true_in_)
U1_a(true_out_) → ordered_out_a([])
ordered_in_a(.(X1, [])) → U2_a(X1, true_in_)
U2_a(X1, true_out_) → ordered_out_a(.(X1, []))
ordered_in_a(Xs) → U3_a(Xs, head_in_aa(Xs, X))
head_in_aa([], X2) → head_out_aa([], X2)
head_in_aa(.(X, X3), X) → head_out_aa(.(X, X3), X)
U3_a(Xs, head_out_aa(Xs, X)) → U4_a(Xs, X, tail_in_aa(Xs, Ys))
tail_in_aa([], []) → tail_out_aa([], [])
tail_in_aa(.(X4, Xs), Xs) → tail_out_aa(.(X4, Xs), Xs)
U4_a(Xs, X, tail_out_aa(Xs, Ys)) → U5_a(Xs, X, Ys, head_in_aa(Ys, Y))
U5_a(Xs, X, Ys, head_out_aa(Ys, Y)) → U6_a(Xs, X, Ys, Y, tail_in_aa(Ys, Zs))
U6_a(Xs, X, Ys, Y, tail_out_aa(Ys, Zs)) → U7_a(Xs, X, Ys, Y, Zs, less_in_aa(X, s(Y)))
U7_a(Xs, X, Ys, Y, Zs, less_out_aa(X, s(Y))) → U8_a(Xs, ordered_in_a(.(Y, Zs)))
U8_a(Xs, ordered_out_a(.(Y, Zs))) → ordered_out_a(Xs)
U8_g(Xs, ordered_out_a(.(Y, Zs))) → ordered_out_g(Xs)
U6_A(Xs, X, Ys, Y, tail_out_aa(Ys, Zs)) → U7_A(Xs, X, Ys, Y, Zs, less_in_aa(X, s(Y)))
U7_A(Xs, X, Ys, Y, Zs, less_out_aa(X, s(Y))) → ORDERED_IN_A(.(Y, Zs))
ORDERED_IN_A(Xs) → U3_A(Xs, head_in_aa(Xs, X))
U3_A(Xs, head_out_aa(Xs, X)) → U4_A(Xs, X, tail_in_aa(Xs, Ys))
U4_A(Xs, X, tail_out_aa(Xs, Ys)) → U5_A(Xs, X, Ys, head_in_aa(Ys, Y))
U5_A(Xs, X, Ys, head_out_aa(Ys, Y)) → U6_A(Xs, X, Ys, Y, tail_in_aa(Ys, Zs))
less_in_aa(0, s(X5)) → U9_aa(X5, true_in_)
less_in_aa(X, Y) → U10_aa(X, Y, p_in_aa(X, Px))
head_in_aa([], X2) → head_out_aa([], X2)
head_in_aa(.(X, X3), X) → head_out_aa(.(X, X3), X)
tail_in_aa([], []) → tail_out_aa([], [])
tail_in_aa(.(X4, Xs), Xs) → tail_out_aa(.(X4, Xs), Xs)
U9_aa(X5, true_out_) → less_out_aa(0, s(X5))
U10_aa(X, Y, p_out_aa(X, Px)) → U11_aa(X, Y, Px, p_in_aa(Y, Py))
true_in_ → true_out_
p_in_aa(0, 0) → p_out_aa(0, 0)
p_in_aa(s(X), X) → p_out_aa(s(X), X)
U11_aa(X, Y, Px, p_out_aa(Y, Py)) → U12_aa(X, Y, less_in_aa(Px, Py))
U12_aa(X, Y, less_out_aa(Px, Py)) → less_out_aa(X, Y)
U6_A(tail_out_aa) → U7_A(less_in_aa)
U7_A(less_out_aa) → ORDERED_IN_A
ORDERED_IN_A → U3_A(head_in_aa)
U3_A(head_out_aa) → U4_A(tail_in_aa)
U4_A(tail_out_aa) → U5_A(head_in_aa)
U5_A(head_out_aa) → U6_A(tail_in_aa)
less_in_aa → U9_aa(true_in_)
less_in_aa → U10_aa(p_in_aa)
head_in_aa → head_out_aa
tail_in_aa → tail_out_aa
U9_aa(true_out_) → less_out_aa
U10_aa(p_out_aa) → U11_aa(p_in_aa)
true_in_ → true_out_
p_in_aa → p_out_aa
U11_aa(p_out_aa) → U12_aa(less_in_aa)
U12_aa(less_out_aa) → less_out_aa
less_in_aa
head_in_aa
tail_in_aa
U9_aa(x0)
U10_aa(x0)
true_in_
p_in_aa
U11_aa(x0)
U12_aa(x0)
ORDERED_IN_A → U3_A(head_out_aa)
U6_A(tail_out_aa) → U7_A(less_in_aa)
U7_A(less_out_aa) → ORDERED_IN_A
U3_A(head_out_aa) → U4_A(tail_in_aa)
U4_A(tail_out_aa) → U5_A(head_in_aa)
U5_A(head_out_aa) → U6_A(tail_in_aa)
ORDERED_IN_A → U3_A(head_out_aa)
less_in_aa → U9_aa(true_in_)
less_in_aa → U10_aa(p_in_aa)
head_in_aa → head_out_aa
tail_in_aa → tail_out_aa
U9_aa(true_out_) → less_out_aa
U10_aa(p_out_aa) → U11_aa(p_in_aa)
true_in_ → true_out_
p_in_aa → p_out_aa
U11_aa(p_out_aa) → U12_aa(less_in_aa)
U12_aa(less_out_aa) → less_out_aa
less_in_aa
head_in_aa
tail_in_aa
U9_aa(x0)
U10_aa(x0)
true_in_
p_in_aa
U11_aa(x0)
U12_aa(x0)
U3_A(head_out_aa) → U4_A(tail_out_aa)
U6_A(tail_out_aa) → U7_A(less_in_aa)
U7_A(less_out_aa) → ORDERED_IN_A
U4_A(tail_out_aa) → U5_A(head_in_aa)
U5_A(head_out_aa) → U6_A(tail_in_aa)
ORDERED_IN_A → U3_A(head_out_aa)
U3_A(head_out_aa) → U4_A(tail_out_aa)
less_in_aa → U9_aa(true_in_)
less_in_aa → U10_aa(p_in_aa)
head_in_aa → head_out_aa
tail_in_aa → tail_out_aa
U9_aa(true_out_) → less_out_aa
U10_aa(p_out_aa) → U11_aa(p_in_aa)
true_in_ → true_out_
p_in_aa → p_out_aa
U11_aa(p_out_aa) → U12_aa(less_in_aa)
U12_aa(less_out_aa) → less_out_aa
less_in_aa
head_in_aa
tail_in_aa
U9_aa(x0)
U10_aa(x0)
true_in_
p_in_aa
U11_aa(x0)
U12_aa(x0)
U4_A(tail_out_aa) → U5_A(head_out_aa)
U6_A(tail_out_aa) → U7_A(less_in_aa)
U7_A(less_out_aa) → ORDERED_IN_A
U5_A(head_out_aa) → U6_A(tail_in_aa)
ORDERED_IN_A → U3_A(head_out_aa)
U3_A(head_out_aa) → U4_A(tail_out_aa)
U4_A(tail_out_aa) → U5_A(head_out_aa)
less_in_aa → U9_aa(true_in_)
less_in_aa → U10_aa(p_in_aa)
head_in_aa → head_out_aa
tail_in_aa → tail_out_aa
U9_aa(true_out_) → less_out_aa
U10_aa(p_out_aa) → U11_aa(p_in_aa)
true_in_ → true_out_
p_in_aa → p_out_aa
U11_aa(p_out_aa) → U12_aa(less_in_aa)
U12_aa(less_out_aa) → less_out_aa
less_in_aa
head_in_aa
tail_in_aa
U9_aa(x0)
U10_aa(x0)
true_in_
p_in_aa
U11_aa(x0)
U12_aa(x0)
U6_A(tail_out_aa) → U7_A(less_in_aa)
U7_A(less_out_aa) → ORDERED_IN_A
U5_A(head_out_aa) → U6_A(tail_in_aa)
ORDERED_IN_A → U3_A(head_out_aa)
U3_A(head_out_aa) → U4_A(tail_out_aa)
U4_A(tail_out_aa) → U5_A(head_out_aa)
tail_in_aa → tail_out_aa
less_in_aa → U9_aa(true_in_)
less_in_aa → U10_aa(p_in_aa)
p_in_aa → p_out_aa
U10_aa(p_out_aa) → U11_aa(p_in_aa)
U11_aa(p_out_aa) → U12_aa(less_in_aa)
U12_aa(less_out_aa) → less_out_aa
true_in_ → true_out_
U9_aa(true_out_) → less_out_aa
less_in_aa
head_in_aa
tail_in_aa
U9_aa(x0)
U10_aa(x0)
true_in_
p_in_aa
U11_aa(x0)
U12_aa(x0)
head_in_aa
U6_A(tail_out_aa) → U7_A(less_in_aa)
U7_A(less_out_aa) → ORDERED_IN_A
U5_A(head_out_aa) → U6_A(tail_in_aa)
ORDERED_IN_A → U3_A(head_out_aa)
U3_A(head_out_aa) → U4_A(tail_out_aa)
U4_A(tail_out_aa) → U5_A(head_out_aa)
tail_in_aa → tail_out_aa
less_in_aa → U9_aa(true_in_)
less_in_aa → U10_aa(p_in_aa)
p_in_aa → p_out_aa
U10_aa(p_out_aa) → U11_aa(p_in_aa)
U11_aa(p_out_aa) → U12_aa(less_in_aa)
U12_aa(less_out_aa) → less_out_aa
true_in_ → true_out_
U9_aa(true_out_) → less_out_aa
less_in_aa
tail_in_aa
U9_aa(x0)
U10_aa(x0)
true_in_
p_in_aa
U11_aa(x0)
U12_aa(x0)
U5_A(head_out_aa) → U6_A(tail_out_aa)
U6_A(tail_out_aa) → U7_A(less_in_aa)
U7_A(less_out_aa) → ORDERED_IN_A
ORDERED_IN_A → U3_A(head_out_aa)
U3_A(head_out_aa) → U4_A(tail_out_aa)
U4_A(tail_out_aa) → U5_A(head_out_aa)
U5_A(head_out_aa) → U6_A(tail_out_aa)
tail_in_aa → tail_out_aa
less_in_aa → U9_aa(true_in_)
less_in_aa → U10_aa(p_in_aa)
p_in_aa → p_out_aa
U10_aa(p_out_aa) → U11_aa(p_in_aa)
U11_aa(p_out_aa) → U12_aa(less_in_aa)
U12_aa(less_out_aa) → less_out_aa
true_in_ → true_out_
U9_aa(true_out_) → less_out_aa
less_in_aa
tail_in_aa
U9_aa(x0)
U10_aa(x0)
true_in_
p_in_aa
U11_aa(x0)
U12_aa(x0)
U6_A(tail_out_aa) → U7_A(less_in_aa)
U7_A(less_out_aa) → ORDERED_IN_A
ORDERED_IN_A → U3_A(head_out_aa)
U3_A(head_out_aa) → U4_A(tail_out_aa)
U4_A(tail_out_aa) → U5_A(head_out_aa)
U5_A(head_out_aa) → U6_A(tail_out_aa)
less_in_aa → U9_aa(true_in_)
less_in_aa → U10_aa(p_in_aa)
p_in_aa → p_out_aa
U10_aa(p_out_aa) → U11_aa(p_in_aa)
U11_aa(p_out_aa) → U12_aa(less_in_aa)
U12_aa(less_out_aa) → less_out_aa
true_in_ → true_out_
U9_aa(true_out_) → less_out_aa
less_in_aa
tail_in_aa
U9_aa(x0)
U10_aa(x0)
true_in_
p_in_aa
U11_aa(x0)
U12_aa(x0)
tail_in_aa
U6_A(tail_out_aa) → U7_A(less_in_aa)
U7_A(less_out_aa) → ORDERED_IN_A
ORDERED_IN_A → U3_A(head_out_aa)
U3_A(head_out_aa) → U4_A(tail_out_aa)
U4_A(tail_out_aa) → U5_A(head_out_aa)
U5_A(head_out_aa) → U6_A(tail_out_aa)
less_in_aa → U9_aa(true_in_)
less_in_aa → U10_aa(p_in_aa)
p_in_aa → p_out_aa
U10_aa(p_out_aa) → U11_aa(p_in_aa)
U11_aa(p_out_aa) → U12_aa(less_in_aa)
U12_aa(less_out_aa) → less_out_aa
true_in_ → true_out_
U9_aa(true_out_) → less_out_aa
less_in_aa
U9_aa(x0)
U10_aa(x0)
true_in_
p_in_aa
U11_aa(x0)
U12_aa(x0)
U6_A(tail_out_aa) → U7_A(U9_aa(true_in_))
U6_A(tail_out_aa) → U7_A(U10_aa(p_in_aa))
U7_A(less_out_aa) → ORDERED_IN_A
ORDERED_IN_A → U3_A(head_out_aa)
U3_A(head_out_aa) → U4_A(tail_out_aa)
U4_A(tail_out_aa) → U5_A(head_out_aa)
U5_A(head_out_aa) → U6_A(tail_out_aa)
U6_A(tail_out_aa) → U7_A(U9_aa(true_in_))
U6_A(tail_out_aa) → U7_A(U10_aa(p_in_aa))
less_in_aa → U9_aa(true_in_)
less_in_aa → U10_aa(p_in_aa)
p_in_aa → p_out_aa
U10_aa(p_out_aa) → U11_aa(p_in_aa)
U11_aa(p_out_aa) → U12_aa(less_in_aa)
U12_aa(less_out_aa) → less_out_aa
true_in_ → true_out_
U9_aa(true_out_) → less_out_aa
less_in_aa
U9_aa(x0)
U10_aa(x0)
true_in_
p_in_aa
U11_aa(x0)
U12_aa(x0)
U6_A(tail_out_aa) → U7_A(U9_aa(true_out_))
U7_A(less_out_aa) → ORDERED_IN_A
ORDERED_IN_A → U3_A(head_out_aa)
U3_A(head_out_aa) → U4_A(tail_out_aa)
U4_A(tail_out_aa) → U5_A(head_out_aa)
U5_A(head_out_aa) → U6_A(tail_out_aa)
U6_A(tail_out_aa) → U7_A(U10_aa(p_in_aa))
U6_A(tail_out_aa) → U7_A(U9_aa(true_out_))
less_in_aa → U9_aa(true_in_)
less_in_aa → U10_aa(p_in_aa)
p_in_aa → p_out_aa
U10_aa(p_out_aa) → U11_aa(p_in_aa)
U11_aa(p_out_aa) → U12_aa(less_in_aa)
U12_aa(less_out_aa) → less_out_aa
true_in_ → true_out_
U9_aa(true_out_) → less_out_aa
less_in_aa
U9_aa(x0)
U10_aa(x0)
true_in_
p_in_aa
U11_aa(x0)
U12_aa(x0)
U6_A(tail_out_aa) → U7_A(U10_aa(p_out_aa))
U7_A(less_out_aa) → ORDERED_IN_A
ORDERED_IN_A → U3_A(head_out_aa)
U3_A(head_out_aa) → U4_A(tail_out_aa)
U4_A(tail_out_aa) → U5_A(head_out_aa)
U5_A(head_out_aa) → U6_A(tail_out_aa)
U6_A(tail_out_aa) → U7_A(U9_aa(true_out_))
U6_A(tail_out_aa) → U7_A(U10_aa(p_out_aa))
less_in_aa → U9_aa(true_in_)
less_in_aa → U10_aa(p_in_aa)
p_in_aa → p_out_aa
U10_aa(p_out_aa) → U11_aa(p_in_aa)
U11_aa(p_out_aa) → U12_aa(less_in_aa)
U12_aa(less_out_aa) → less_out_aa
true_in_ → true_out_
U9_aa(true_out_) → less_out_aa
less_in_aa
U9_aa(x0)
U10_aa(x0)
true_in_
p_in_aa
U11_aa(x0)
U12_aa(x0)
U6_A(tail_out_aa) → U7_A(less_out_aa)
U7_A(less_out_aa) → ORDERED_IN_A
ORDERED_IN_A → U3_A(head_out_aa)
U3_A(head_out_aa) → U4_A(tail_out_aa)
U4_A(tail_out_aa) → U5_A(head_out_aa)
U5_A(head_out_aa) → U6_A(tail_out_aa)
U6_A(tail_out_aa) → U7_A(U10_aa(p_out_aa))
U6_A(tail_out_aa) → U7_A(less_out_aa)
less_in_aa → U9_aa(true_in_)
less_in_aa → U10_aa(p_in_aa)
p_in_aa → p_out_aa
U10_aa(p_out_aa) → U11_aa(p_in_aa)
U11_aa(p_out_aa) → U12_aa(less_in_aa)
U12_aa(less_out_aa) → less_out_aa
true_in_ → true_out_
U9_aa(true_out_) → less_out_aa
less_in_aa
U9_aa(x0)
U10_aa(x0)
true_in_
p_in_aa
U11_aa(x0)
U12_aa(x0)
ordered_in_g([]) → U1_g(true_in_)
true_in_ → true_out_
U1_g(true_out_) → ordered_out_g([])
ordered_in_g(.(X1, [])) → U2_g(X1, true_in_)
U2_g(X1, true_out_) → ordered_out_g(.(X1, []))
ordered_in_g(Xs) → U3_g(Xs, head_in_ga(Xs, X))
head_in_ga([], X2) → head_out_ga([], X2)
head_in_ga(.(X, X3), X) → head_out_ga(.(X, X3), X)
U3_g(Xs, head_out_ga(Xs, X)) → U4_g(Xs, X, tail_in_ga(Xs, Ys))
tail_in_ga([], []) → tail_out_ga([], [])
tail_in_ga(.(X4, Xs), Xs) → tail_out_ga(.(X4, Xs), Xs)
U4_g(Xs, X, tail_out_ga(Xs, Ys)) → U5_g(Xs, X, Ys, head_in_ga(Ys, Y))
U5_g(Xs, X, Ys, head_out_ga(Ys, Y)) → U6_g(Xs, X, Ys, Y, tail_in_ga(Ys, Zs))
U6_g(Xs, X, Ys, Y, tail_out_ga(Ys, Zs)) → U7_g(Xs, X, Ys, Y, Zs, less_in_aa(X, s(Y)))
less_in_aa(0, s(X5)) → U9_aa(X5, true_in_)
U9_aa(X5, true_out_) → less_out_aa(0, s(X5))
less_in_aa(X, Y) → U10_aa(X, Y, p_in_aa(X, Px))
p_in_aa(0, 0) → p_out_aa(0, 0)
p_in_aa(s(X), X) → p_out_aa(s(X), X)
U10_aa(X, Y, p_out_aa(X, Px)) → U11_aa(X, Y, Px, p_in_aa(Y, Py))
U11_aa(X, Y, Px, p_out_aa(Y, Py)) → U12_aa(X, Y, less_in_aa(Px, Py))
U12_aa(X, Y, less_out_aa(Px, Py)) → less_out_aa(X, Y)
U7_g(Xs, X, Ys, Y, Zs, less_out_aa(X, s(Y))) → U8_g(Xs, ordered_in_a(.(Y, Zs)))
ordered_in_a([]) → U1_a(true_in_)
U1_a(true_out_) → ordered_out_a([])
ordered_in_a(.(X1, [])) → U2_a(X1, true_in_)
U2_a(X1, true_out_) → ordered_out_a(.(X1, []))
ordered_in_a(Xs) → U3_a(Xs, head_in_aa(Xs, X))
head_in_aa([], X2) → head_out_aa([], X2)
head_in_aa(.(X, X3), X) → head_out_aa(.(X, X3), X)
U3_a(Xs, head_out_aa(Xs, X)) → U4_a(Xs, X, tail_in_aa(Xs, Ys))
tail_in_aa([], []) → tail_out_aa([], [])
tail_in_aa(.(X4, Xs), Xs) → tail_out_aa(.(X4, Xs), Xs)
U4_a(Xs, X, tail_out_aa(Xs, Ys)) → U5_a(Xs, X, Ys, head_in_aa(Ys, Y))
U5_a(Xs, X, Ys, head_out_aa(Ys, Y)) → U6_a(Xs, X, Ys, Y, tail_in_aa(Ys, Zs))
U6_a(Xs, X, Ys, Y, tail_out_aa(Ys, Zs)) → U7_a(Xs, X, Ys, Y, Zs, less_in_aa(X, s(Y)))
U7_a(Xs, X, Ys, Y, Zs, less_out_aa(X, s(Y))) → U8_a(Xs, ordered_in_a(.(Y, Zs)))
U8_a(Xs, ordered_out_a(.(Y, Zs))) → ordered_out_a(Xs)
U8_g(Xs, ordered_out_a(.(Y, Zs))) → ordered_out_g(Xs)
Infinitary Constructor Rewriting Termination of PiTRS implies Termination of Prolog
ordered_in_g([]) → U1_g(true_in_)
true_in_ → true_out_
U1_g(true_out_) → ordered_out_g([])
ordered_in_g(.(X1, [])) → U2_g(X1, true_in_)
U2_g(X1, true_out_) → ordered_out_g(.(X1, []))
ordered_in_g(Xs) → U3_g(Xs, head_in_ga(Xs, X))
head_in_ga([], X2) → head_out_ga([], X2)
head_in_ga(.(X, X3), X) → head_out_ga(.(X, X3), X)
U3_g(Xs, head_out_ga(Xs, X)) → U4_g(Xs, X, tail_in_ga(Xs, Ys))
tail_in_ga([], []) → tail_out_ga([], [])
tail_in_ga(.(X4, Xs), Xs) → tail_out_ga(.(X4, Xs), Xs)
U4_g(Xs, X, tail_out_ga(Xs, Ys)) → U5_g(Xs, X, Ys, head_in_ga(Ys, Y))
U5_g(Xs, X, Ys, head_out_ga(Ys, Y)) → U6_g(Xs, X, Ys, Y, tail_in_ga(Ys, Zs))
U6_g(Xs, X, Ys, Y, tail_out_ga(Ys, Zs)) → U7_g(Xs, X, Ys, Y, Zs, less_in_aa(X, s(Y)))
less_in_aa(0, s(X5)) → U9_aa(X5, true_in_)
U9_aa(X5, true_out_) → less_out_aa(0, s(X5))
less_in_aa(X, Y) → U10_aa(X, Y, p_in_aa(X, Px))
p_in_aa(0, 0) → p_out_aa(0, 0)
p_in_aa(s(X), X) → p_out_aa(s(X), X)
U10_aa(X, Y, p_out_aa(X, Px)) → U11_aa(X, Y, Px, p_in_aa(Y, Py))
U11_aa(X, Y, Px, p_out_aa(Y, Py)) → U12_aa(X, Y, less_in_aa(Px, Py))
U12_aa(X, Y, less_out_aa(Px, Py)) → less_out_aa(X, Y)
U7_g(Xs, X, Ys, Y, Zs, less_out_aa(X, s(Y))) → U8_g(Xs, ordered_in_a(.(Y, Zs)))
ordered_in_a([]) → U1_a(true_in_)
U1_a(true_out_) → ordered_out_a([])
ordered_in_a(.(X1, [])) → U2_a(X1, true_in_)
U2_a(X1, true_out_) → ordered_out_a(.(X1, []))
ordered_in_a(Xs) → U3_a(Xs, head_in_aa(Xs, X))
head_in_aa([], X2) → head_out_aa([], X2)
head_in_aa(.(X, X3), X) → head_out_aa(.(X, X3), X)
U3_a(Xs, head_out_aa(Xs, X)) → U4_a(Xs, X, tail_in_aa(Xs, Ys))
tail_in_aa([], []) → tail_out_aa([], [])
tail_in_aa(.(X4, Xs), Xs) → tail_out_aa(.(X4, Xs), Xs)
U4_a(Xs, X, tail_out_aa(Xs, Ys)) → U5_a(Xs, X, Ys, head_in_aa(Ys, Y))
U5_a(Xs, X, Ys, head_out_aa(Ys, Y)) → U6_a(Xs, X, Ys, Y, tail_in_aa(Ys, Zs))
U6_a(Xs, X, Ys, Y, tail_out_aa(Ys, Zs)) → U7_a(Xs, X, Ys, Y, Zs, less_in_aa(X, s(Y)))
U7_a(Xs, X, Ys, Y, Zs, less_out_aa(X, s(Y))) → U8_a(Xs, ordered_in_a(.(Y, Zs)))
U8_a(Xs, ordered_out_a(.(Y, Zs))) → ordered_out_a(Xs)
U8_g(Xs, ordered_out_a(.(Y, Zs))) → ordered_out_g(Xs)
ORDERED_IN_G([]) → U1_G(true_in_)
ORDERED_IN_G([]) → TRUE_IN_
ORDERED_IN_G(.(X1, [])) → U2_G(X1, true_in_)
ORDERED_IN_G(.(X1, [])) → TRUE_IN_
ORDERED_IN_G(Xs) → U3_G(Xs, head_in_ga(Xs, X))
ORDERED_IN_G(Xs) → HEAD_IN_GA(Xs, X)
U3_G(Xs, head_out_ga(Xs, X)) → U4_G(Xs, X, tail_in_ga(Xs, Ys))
U3_G(Xs, head_out_ga(Xs, X)) → TAIL_IN_GA(Xs, Ys)
U4_G(Xs, X, tail_out_ga(Xs, Ys)) → U5_G(Xs, X, Ys, head_in_ga(Ys, Y))
U4_G(Xs, X, tail_out_ga(Xs, Ys)) → HEAD_IN_GA(Ys, Y)
U5_G(Xs, X, Ys, head_out_ga(Ys, Y)) → U6_G(Xs, X, Ys, Y, tail_in_ga(Ys, Zs))
U5_G(Xs, X, Ys, head_out_ga(Ys, Y)) → TAIL_IN_GA(Ys, Zs)
U6_G(Xs, X, Ys, Y, tail_out_ga(Ys, Zs)) → U7_G(Xs, X, Ys, Y, Zs, less_in_aa(X, s(Y)))
U6_G(Xs, X, Ys, Y, tail_out_ga(Ys, Zs)) → LESS_IN_AA(X, s(Y))
LESS_IN_AA(0, s(X5)) → U9_AA(X5, true_in_)
LESS_IN_AA(0, s(X5)) → TRUE_IN_
LESS_IN_AA(X, Y) → U10_AA(X, Y, p_in_aa(X, Px))
LESS_IN_AA(X, Y) → P_IN_AA(X, Px)
U10_AA(X, Y, p_out_aa(X, Px)) → U11_AA(X, Y, Px, p_in_aa(Y, Py))
U10_AA(X, Y, p_out_aa(X, Px)) → P_IN_AA(Y, Py)
U11_AA(X, Y, Px, p_out_aa(Y, Py)) → U12_AA(X, Y, less_in_aa(Px, Py))
U11_AA(X, Y, Px, p_out_aa(Y, Py)) → LESS_IN_AA(Px, Py)
U7_G(Xs, X, Ys, Y, Zs, less_out_aa(X, s(Y))) → U8_G(Xs, ordered_in_a(.(Y, Zs)))
U7_G(Xs, X, Ys, Y, Zs, less_out_aa(X, s(Y))) → ORDERED_IN_A(.(Y, Zs))
ORDERED_IN_A([]) → U1_A(true_in_)
ORDERED_IN_A([]) → TRUE_IN_
ORDERED_IN_A(.(X1, [])) → U2_A(X1, true_in_)
ORDERED_IN_A(.(X1, [])) → TRUE_IN_
ORDERED_IN_A(Xs) → U3_A(Xs, head_in_aa(Xs, X))
ORDERED_IN_A(Xs) → HEAD_IN_AA(Xs, X)
U3_A(Xs, head_out_aa(Xs, X)) → U4_A(Xs, X, tail_in_aa(Xs, Ys))
U3_A(Xs, head_out_aa(Xs, X)) → TAIL_IN_AA(Xs, Ys)
U4_A(Xs, X, tail_out_aa(Xs, Ys)) → U5_A(Xs, X, Ys, head_in_aa(Ys, Y))
U4_A(Xs, X, tail_out_aa(Xs, Ys)) → HEAD_IN_AA(Ys, Y)
U5_A(Xs, X, Ys, head_out_aa(Ys, Y)) → U6_A(Xs, X, Ys, Y, tail_in_aa(Ys, Zs))
U5_A(Xs, X, Ys, head_out_aa(Ys, Y)) → TAIL_IN_AA(Ys, Zs)
U6_A(Xs, X, Ys, Y, tail_out_aa(Ys, Zs)) → U7_A(Xs, X, Ys, Y, Zs, less_in_aa(X, s(Y)))
U6_A(Xs, X, Ys, Y, tail_out_aa(Ys, Zs)) → LESS_IN_AA(X, s(Y))
U7_A(Xs, X, Ys, Y, Zs, less_out_aa(X, s(Y))) → U8_A(Xs, ordered_in_a(.(Y, Zs)))
U7_A(Xs, X, Ys, Y, Zs, less_out_aa(X, s(Y))) → ORDERED_IN_A(.(Y, Zs))
ordered_in_g([]) → U1_g(true_in_)
true_in_ → true_out_
U1_g(true_out_) → ordered_out_g([])
ordered_in_g(.(X1, [])) → U2_g(X1, true_in_)
U2_g(X1, true_out_) → ordered_out_g(.(X1, []))
ordered_in_g(Xs) → U3_g(Xs, head_in_ga(Xs, X))
head_in_ga([], X2) → head_out_ga([], X2)
head_in_ga(.(X, X3), X) → head_out_ga(.(X, X3), X)
U3_g(Xs, head_out_ga(Xs, X)) → U4_g(Xs, X, tail_in_ga(Xs, Ys))
tail_in_ga([], []) → tail_out_ga([], [])
tail_in_ga(.(X4, Xs), Xs) → tail_out_ga(.(X4, Xs), Xs)
U4_g(Xs, X, tail_out_ga(Xs, Ys)) → U5_g(Xs, X, Ys, head_in_ga(Ys, Y))
U5_g(Xs, X, Ys, head_out_ga(Ys, Y)) → U6_g(Xs, X, Ys, Y, tail_in_ga(Ys, Zs))
U6_g(Xs, X, Ys, Y, tail_out_ga(Ys, Zs)) → U7_g(Xs, X, Ys, Y, Zs, less_in_aa(X, s(Y)))
less_in_aa(0, s(X5)) → U9_aa(X5, true_in_)
U9_aa(X5, true_out_) → less_out_aa(0, s(X5))
less_in_aa(X, Y) → U10_aa(X, Y, p_in_aa(X, Px))
p_in_aa(0, 0) → p_out_aa(0, 0)
p_in_aa(s(X), X) → p_out_aa(s(X), X)
U10_aa(X, Y, p_out_aa(X, Px)) → U11_aa(X, Y, Px, p_in_aa(Y, Py))
U11_aa(X, Y, Px, p_out_aa(Y, Py)) → U12_aa(X, Y, less_in_aa(Px, Py))
U12_aa(X, Y, less_out_aa(Px, Py)) → less_out_aa(X, Y)
U7_g(Xs, X, Ys, Y, Zs, less_out_aa(X, s(Y))) → U8_g(Xs, ordered_in_a(.(Y, Zs)))
ordered_in_a([]) → U1_a(true_in_)
U1_a(true_out_) → ordered_out_a([])
ordered_in_a(.(X1, [])) → U2_a(X1, true_in_)
U2_a(X1, true_out_) → ordered_out_a(.(X1, []))
ordered_in_a(Xs) → U3_a(Xs, head_in_aa(Xs, X))
head_in_aa([], X2) → head_out_aa([], X2)
head_in_aa(.(X, X3), X) → head_out_aa(.(X, X3), X)
U3_a(Xs, head_out_aa(Xs, X)) → U4_a(Xs, X, tail_in_aa(Xs, Ys))
tail_in_aa([], []) → tail_out_aa([], [])
tail_in_aa(.(X4, Xs), Xs) → tail_out_aa(.(X4, Xs), Xs)
U4_a(Xs, X, tail_out_aa(Xs, Ys)) → U5_a(Xs, X, Ys, head_in_aa(Ys, Y))
U5_a(Xs, X, Ys, head_out_aa(Ys, Y)) → U6_a(Xs, X, Ys, Y, tail_in_aa(Ys, Zs))
U6_a(Xs, X, Ys, Y, tail_out_aa(Ys, Zs)) → U7_a(Xs, X, Ys, Y, Zs, less_in_aa(X, s(Y)))
U7_a(Xs, X, Ys, Y, Zs, less_out_aa(X, s(Y))) → U8_a(Xs, ordered_in_a(.(Y, Zs)))
U8_a(Xs, ordered_out_a(.(Y, Zs))) → ordered_out_a(Xs)
U8_g(Xs, ordered_out_a(.(Y, Zs))) → ordered_out_g(Xs)
ORDERED_IN_G([]) → U1_G(true_in_)
ORDERED_IN_G([]) → TRUE_IN_
ORDERED_IN_G(.(X1, [])) → U2_G(X1, true_in_)
ORDERED_IN_G(.(X1, [])) → TRUE_IN_
ORDERED_IN_G(Xs) → U3_G(Xs, head_in_ga(Xs, X))
ORDERED_IN_G(Xs) → HEAD_IN_GA(Xs, X)
U3_G(Xs, head_out_ga(Xs, X)) → U4_G(Xs, X, tail_in_ga(Xs, Ys))
U3_G(Xs, head_out_ga(Xs, X)) → TAIL_IN_GA(Xs, Ys)
U4_G(Xs, X, tail_out_ga(Xs, Ys)) → U5_G(Xs, X, Ys, head_in_ga(Ys, Y))
U4_G(Xs, X, tail_out_ga(Xs, Ys)) → HEAD_IN_GA(Ys, Y)
U5_G(Xs, X, Ys, head_out_ga(Ys, Y)) → U6_G(Xs, X, Ys, Y, tail_in_ga(Ys, Zs))
U5_G(Xs, X, Ys, head_out_ga(Ys, Y)) → TAIL_IN_GA(Ys, Zs)
U6_G(Xs, X, Ys, Y, tail_out_ga(Ys, Zs)) → U7_G(Xs, X, Ys, Y, Zs, less_in_aa(X, s(Y)))
U6_G(Xs, X, Ys, Y, tail_out_ga(Ys, Zs)) → LESS_IN_AA(X, s(Y))
LESS_IN_AA(0, s(X5)) → U9_AA(X5, true_in_)
LESS_IN_AA(0, s(X5)) → TRUE_IN_
LESS_IN_AA(X, Y) → U10_AA(X, Y, p_in_aa(X, Px))
LESS_IN_AA(X, Y) → P_IN_AA(X, Px)
U10_AA(X, Y, p_out_aa(X, Px)) → U11_AA(X, Y, Px, p_in_aa(Y, Py))
U10_AA(X, Y, p_out_aa(X, Px)) → P_IN_AA(Y, Py)
U11_AA(X, Y, Px, p_out_aa(Y, Py)) → U12_AA(X, Y, less_in_aa(Px, Py))
U11_AA(X, Y, Px, p_out_aa(Y, Py)) → LESS_IN_AA(Px, Py)
U7_G(Xs, X, Ys, Y, Zs, less_out_aa(X, s(Y))) → U8_G(Xs, ordered_in_a(.(Y, Zs)))
U7_G(Xs, X, Ys, Y, Zs, less_out_aa(X, s(Y))) → ORDERED_IN_A(.(Y, Zs))
ORDERED_IN_A([]) → U1_A(true_in_)
ORDERED_IN_A([]) → TRUE_IN_
ORDERED_IN_A(.(X1, [])) → U2_A(X1, true_in_)
ORDERED_IN_A(.(X1, [])) → TRUE_IN_
ORDERED_IN_A(Xs) → U3_A(Xs, head_in_aa(Xs, X))
ORDERED_IN_A(Xs) → HEAD_IN_AA(Xs, X)
U3_A(Xs, head_out_aa(Xs, X)) → U4_A(Xs, X, tail_in_aa(Xs, Ys))
U3_A(Xs, head_out_aa(Xs, X)) → TAIL_IN_AA(Xs, Ys)
U4_A(Xs, X, tail_out_aa(Xs, Ys)) → U5_A(Xs, X, Ys, head_in_aa(Ys, Y))
U4_A(Xs, X, tail_out_aa(Xs, Ys)) → HEAD_IN_AA(Ys, Y)
U5_A(Xs, X, Ys, head_out_aa(Ys, Y)) → U6_A(Xs, X, Ys, Y, tail_in_aa(Ys, Zs))
U5_A(Xs, X, Ys, head_out_aa(Ys, Y)) → TAIL_IN_AA(Ys, Zs)
U6_A(Xs, X, Ys, Y, tail_out_aa(Ys, Zs)) → U7_A(Xs, X, Ys, Y, Zs, less_in_aa(X, s(Y)))
U6_A(Xs, X, Ys, Y, tail_out_aa(Ys, Zs)) → LESS_IN_AA(X, s(Y))
U7_A(Xs, X, Ys, Y, Zs, less_out_aa(X, s(Y))) → U8_A(Xs, ordered_in_a(.(Y, Zs)))
U7_A(Xs, X, Ys, Y, Zs, less_out_aa(X, s(Y))) → ORDERED_IN_A(.(Y, Zs))
ordered_in_g([]) → U1_g(true_in_)
true_in_ → true_out_
U1_g(true_out_) → ordered_out_g([])
ordered_in_g(.(X1, [])) → U2_g(X1, true_in_)
U2_g(X1, true_out_) → ordered_out_g(.(X1, []))
ordered_in_g(Xs) → U3_g(Xs, head_in_ga(Xs, X))
head_in_ga([], X2) → head_out_ga([], X2)
head_in_ga(.(X, X3), X) → head_out_ga(.(X, X3), X)
U3_g(Xs, head_out_ga(Xs, X)) → U4_g(Xs, X, tail_in_ga(Xs, Ys))
tail_in_ga([], []) → tail_out_ga([], [])
tail_in_ga(.(X4, Xs), Xs) → tail_out_ga(.(X4, Xs), Xs)
U4_g(Xs, X, tail_out_ga(Xs, Ys)) → U5_g(Xs, X, Ys, head_in_ga(Ys, Y))
U5_g(Xs, X, Ys, head_out_ga(Ys, Y)) → U6_g(Xs, X, Ys, Y, tail_in_ga(Ys, Zs))
U6_g(Xs, X, Ys, Y, tail_out_ga(Ys, Zs)) → U7_g(Xs, X, Ys, Y, Zs, less_in_aa(X, s(Y)))
less_in_aa(0, s(X5)) → U9_aa(X5, true_in_)
U9_aa(X5, true_out_) → less_out_aa(0, s(X5))
less_in_aa(X, Y) → U10_aa(X, Y, p_in_aa(X, Px))
p_in_aa(0, 0) → p_out_aa(0, 0)
p_in_aa(s(X), X) → p_out_aa(s(X), X)
U10_aa(X, Y, p_out_aa(X, Px)) → U11_aa(X, Y, Px, p_in_aa(Y, Py))
U11_aa(X, Y, Px, p_out_aa(Y, Py)) → U12_aa(X, Y, less_in_aa(Px, Py))
U12_aa(X, Y, less_out_aa(Px, Py)) → less_out_aa(X, Y)
U7_g(Xs, X, Ys, Y, Zs, less_out_aa(X, s(Y))) → U8_g(Xs, ordered_in_a(.(Y, Zs)))
ordered_in_a([]) → U1_a(true_in_)
U1_a(true_out_) → ordered_out_a([])
ordered_in_a(.(X1, [])) → U2_a(X1, true_in_)
U2_a(X1, true_out_) → ordered_out_a(.(X1, []))
ordered_in_a(Xs) → U3_a(Xs, head_in_aa(Xs, X))
head_in_aa([], X2) → head_out_aa([], X2)
head_in_aa(.(X, X3), X) → head_out_aa(.(X, X3), X)
U3_a(Xs, head_out_aa(Xs, X)) → U4_a(Xs, X, tail_in_aa(Xs, Ys))
tail_in_aa([], []) → tail_out_aa([], [])
tail_in_aa(.(X4, Xs), Xs) → tail_out_aa(.(X4, Xs), Xs)
U4_a(Xs, X, tail_out_aa(Xs, Ys)) → U5_a(Xs, X, Ys, head_in_aa(Ys, Y))
U5_a(Xs, X, Ys, head_out_aa(Ys, Y)) → U6_a(Xs, X, Ys, Y, tail_in_aa(Ys, Zs))
U6_a(Xs, X, Ys, Y, tail_out_aa(Ys, Zs)) → U7_a(Xs, X, Ys, Y, Zs, less_in_aa(X, s(Y)))
U7_a(Xs, X, Ys, Y, Zs, less_out_aa(X, s(Y))) → U8_a(Xs, ordered_in_a(.(Y, Zs)))
U8_a(Xs, ordered_out_a(.(Y, Zs))) → ordered_out_a(Xs)
U8_g(Xs, ordered_out_a(.(Y, Zs))) → ordered_out_g(Xs)
LESS_IN_AA(X, Y) → U10_AA(X, Y, p_in_aa(X, Px))
U10_AA(X, Y, p_out_aa(X, Px)) → U11_AA(X, Y, Px, p_in_aa(Y, Py))
U11_AA(X, Y, Px, p_out_aa(Y, Py)) → LESS_IN_AA(Px, Py)
ordered_in_g([]) → U1_g(true_in_)
true_in_ → true_out_
U1_g(true_out_) → ordered_out_g([])
ordered_in_g(.(X1, [])) → U2_g(X1, true_in_)
U2_g(X1, true_out_) → ordered_out_g(.(X1, []))
ordered_in_g(Xs) → U3_g(Xs, head_in_ga(Xs, X))
head_in_ga([], X2) → head_out_ga([], X2)
head_in_ga(.(X, X3), X) → head_out_ga(.(X, X3), X)
U3_g(Xs, head_out_ga(Xs, X)) → U4_g(Xs, X, tail_in_ga(Xs, Ys))
tail_in_ga([], []) → tail_out_ga([], [])
tail_in_ga(.(X4, Xs), Xs) → tail_out_ga(.(X4, Xs), Xs)
U4_g(Xs, X, tail_out_ga(Xs, Ys)) → U5_g(Xs, X, Ys, head_in_ga(Ys, Y))
U5_g(Xs, X, Ys, head_out_ga(Ys, Y)) → U6_g(Xs, X, Ys, Y, tail_in_ga(Ys, Zs))
U6_g(Xs, X, Ys, Y, tail_out_ga(Ys, Zs)) → U7_g(Xs, X, Ys, Y, Zs, less_in_aa(X, s(Y)))
less_in_aa(0, s(X5)) → U9_aa(X5, true_in_)
U9_aa(X5, true_out_) → less_out_aa(0, s(X5))
less_in_aa(X, Y) → U10_aa(X, Y, p_in_aa(X, Px))
p_in_aa(0, 0) → p_out_aa(0, 0)
p_in_aa(s(X), X) → p_out_aa(s(X), X)
U10_aa(X, Y, p_out_aa(X, Px)) → U11_aa(X, Y, Px, p_in_aa(Y, Py))
U11_aa(X, Y, Px, p_out_aa(Y, Py)) → U12_aa(X, Y, less_in_aa(Px, Py))
U12_aa(X, Y, less_out_aa(Px, Py)) → less_out_aa(X, Y)
U7_g(Xs, X, Ys, Y, Zs, less_out_aa(X, s(Y))) → U8_g(Xs, ordered_in_a(.(Y, Zs)))
ordered_in_a([]) → U1_a(true_in_)
U1_a(true_out_) → ordered_out_a([])
ordered_in_a(.(X1, [])) → U2_a(X1, true_in_)
U2_a(X1, true_out_) → ordered_out_a(.(X1, []))
ordered_in_a(Xs) → U3_a(Xs, head_in_aa(Xs, X))
head_in_aa([], X2) → head_out_aa([], X2)
head_in_aa(.(X, X3), X) → head_out_aa(.(X, X3), X)
U3_a(Xs, head_out_aa(Xs, X)) → U4_a(Xs, X, tail_in_aa(Xs, Ys))
tail_in_aa([], []) → tail_out_aa([], [])
tail_in_aa(.(X4, Xs), Xs) → tail_out_aa(.(X4, Xs), Xs)
U4_a(Xs, X, tail_out_aa(Xs, Ys)) → U5_a(Xs, X, Ys, head_in_aa(Ys, Y))
U5_a(Xs, X, Ys, head_out_aa(Ys, Y)) → U6_a(Xs, X, Ys, Y, tail_in_aa(Ys, Zs))
U6_a(Xs, X, Ys, Y, tail_out_aa(Ys, Zs)) → U7_a(Xs, X, Ys, Y, Zs, less_in_aa(X, s(Y)))
U7_a(Xs, X, Ys, Y, Zs, less_out_aa(X, s(Y))) → U8_a(Xs, ordered_in_a(.(Y, Zs)))
U8_a(Xs, ordered_out_a(.(Y, Zs))) → ordered_out_a(Xs)
U8_g(Xs, ordered_out_a(.(Y, Zs))) → ordered_out_g(Xs)
LESS_IN_AA(X, Y) → U10_AA(X, Y, p_in_aa(X, Px))
U10_AA(X, Y, p_out_aa(X, Px)) → U11_AA(X, Y, Px, p_in_aa(Y, Py))
U11_AA(X, Y, Px, p_out_aa(Y, Py)) → LESS_IN_AA(Px, Py)
p_in_aa(0, 0) → p_out_aa(0, 0)
p_in_aa(s(X), X) → p_out_aa(s(X), X)
LESS_IN_AA → U10_AA(p_in_aa)
U10_AA(p_out_aa) → U11_AA(p_in_aa)
U11_AA(p_out_aa) → LESS_IN_AA
p_in_aa → p_out_aa
p_in_aa
LESS_IN_AA → U10_AA(p_out_aa)
U10_AA(p_out_aa) → U11_AA(p_in_aa)
U11_AA(p_out_aa) → LESS_IN_AA
LESS_IN_AA → U10_AA(p_out_aa)
p_in_aa → p_out_aa
p_in_aa
U10_AA(p_out_aa) → U11_AA(p_out_aa)
U11_AA(p_out_aa) → LESS_IN_AA
LESS_IN_AA → U10_AA(p_out_aa)
U10_AA(p_out_aa) → U11_AA(p_out_aa)
p_in_aa → p_out_aa
p_in_aa
U11_AA(p_out_aa) → LESS_IN_AA
LESS_IN_AA → U10_AA(p_out_aa)
U10_AA(p_out_aa) → U11_AA(p_out_aa)
p_in_aa
p_in_aa
U11_AA(p_out_aa) → LESS_IN_AA
LESS_IN_AA → U10_AA(p_out_aa)
U10_AA(p_out_aa) → U11_AA(p_out_aa)
U6_A(Xs, X, Ys, Y, tail_out_aa(Ys, Zs)) → U7_A(Xs, X, Ys, Y, Zs, less_in_aa(X, s(Y)))
U7_A(Xs, X, Ys, Y, Zs, less_out_aa(X, s(Y))) → ORDERED_IN_A(.(Y, Zs))
ORDERED_IN_A(Xs) → U3_A(Xs, head_in_aa(Xs, X))
U3_A(Xs, head_out_aa(Xs, X)) → U4_A(Xs, X, tail_in_aa(Xs, Ys))
U4_A(Xs, X, tail_out_aa(Xs, Ys)) → U5_A(Xs, X, Ys, head_in_aa(Ys, Y))
U5_A(Xs, X, Ys, head_out_aa(Ys, Y)) → U6_A(Xs, X, Ys, Y, tail_in_aa(Ys, Zs))
ordered_in_g([]) → U1_g(true_in_)
true_in_ → true_out_
U1_g(true_out_) → ordered_out_g([])
ordered_in_g(.(X1, [])) → U2_g(X1, true_in_)
U2_g(X1, true_out_) → ordered_out_g(.(X1, []))
ordered_in_g(Xs) → U3_g(Xs, head_in_ga(Xs, X))
head_in_ga([], X2) → head_out_ga([], X2)
head_in_ga(.(X, X3), X) → head_out_ga(.(X, X3), X)
U3_g(Xs, head_out_ga(Xs, X)) → U4_g(Xs, X, tail_in_ga(Xs, Ys))
tail_in_ga([], []) → tail_out_ga([], [])
tail_in_ga(.(X4, Xs), Xs) → tail_out_ga(.(X4, Xs), Xs)
U4_g(Xs, X, tail_out_ga(Xs, Ys)) → U5_g(Xs, X, Ys, head_in_ga(Ys, Y))
U5_g(Xs, X, Ys, head_out_ga(Ys, Y)) → U6_g(Xs, X, Ys, Y, tail_in_ga(Ys, Zs))
U6_g(Xs, X, Ys, Y, tail_out_ga(Ys, Zs)) → U7_g(Xs, X, Ys, Y, Zs, less_in_aa(X, s(Y)))
less_in_aa(0, s(X5)) → U9_aa(X5, true_in_)
U9_aa(X5, true_out_) → less_out_aa(0, s(X5))
less_in_aa(X, Y) → U10_aa(X, Y, p_in_aa(X, Px))
p_in_aa(0, 0) → p_out_aa(0, 0)
p_in_aa(s(X), X) → p_out_aa(s(X), X)
U10_aa(X, Y, p_out_aa(X, Px)) → U11_aa(X, Y, Px, p_in_aa(Y, Py))
U11_aa(X, Y, Px, p_out_aa(Y, Py)) → U12_aa(X, Y, less_in_aa(Px, Py))
U12_aa(X, Y, less_out_aa(Px, Py)) → less_out_aa(X, Y)
U7_g(Xs, X, Ys, Y, Zs, less_out_aa(X, s(Y))) → U8_g(Xs, ordered_in_a(.(Y, Zs)))
ordered_in_a([]) → U1_a(true_in_)
U1_a(true_out_) → ordered_out_a([])
ordered_in_a(.(X1, [])) → U2_a(X1, true_in_)
U2_a(X1, true_out_) → ordered_out_a(.(X1, []))
ordered_in_a(Xs) → U3_a(Xs, head_in_aa(Xs, X))
head_in_aa([], X2) → head_out_aa([], X2)
head_in_aa(.(X, X3), X) → head_out_aa(.(X, X3), X)
U3_a(Xs, head_out_aa(Xs, X)) → U4_a(Xs, X, tail_in_aa(Xs, Ys))
tail_in_aa([], []) → tail_out_aa([], [])
tail_in_aa(.(X4, Xs), Xs) → tail_out_aa(.(X4, Xs), Xs)
U4_a(Xs, X, tail_out_aa(Xs, Ys)) → U5_a(Xs, X, Ys, head_in_aa(Ys, Y))
U5_a(Xs, X, Ys, head_out_aa(Ys, Y)) → U6_a(Xs, X, Ys, Y, tail_in_aa(Ys, Zs))
U6_a(Xs, X, Ys, Y, tail_out_aa(Ys, Zs)) → U7_a(Xs, X, Ys, Y, Zs, less_in_aa(X, s(Y)))
U7_a(Xs, X, Ys, Y, Zs, less_out_aa(X, s(Y))) → U8_a(Xs, ordered_in_a(.(Y, Zs)))
U8_a(Xs, ordered_out_a(.(Y, Zs))) → ordered_out_a(Xs)
U8_g(Xs, ordered_out_a(.(Y, Zs))) → ordered_out_g(Xs)
U6_A(Xs, X, Ys, Y, tail_out_aa(Ys, Zs)) → U7_A(Xs, X, Ys, Y, Zs, less_in_aa(X, s(Y)))
U7_A(Xs, X, Ys, Y, Zs, less_out_aa(X, s(Y))) → ORDERED_IN_A(.(Y, Zs))
ORDERED_IN_A(Xs) → U3_A(Xs, head_in_aa(Xs, X))
U3_A(Xs, head_out_aa(Xs, X)) → U4_A(Xs, X, tail_in_aa(Xs, Ys))
U4_A(Xs, X, tail_out_aa(Xs, Ys)) → U5_A(Xs, X, Ys, head_in_aa(Ys, Y))
U5_A(Xs, X, Ys, head_out_aa(Ys, Y)) → U6_A(Xs, X, Ys, Y, tail_in_aa(Ys, Zs))
less_in_aa(0, s(X5)) → U9_aa(X5, true_in_)
less_in_aa(X, Y) → U10_aa(X, Y, p_in_aa(X, Px))
head_in_aa([], X2) → head_out_aa([], X2)
head_in_aa(.(X, X3), X) → head_out_aa(.(X, X3), X)
tail_in_aa([], []) → tail_out_aa([], [])
tail_in_aa(.(X4, Xs), Xs) → tail_out_aa(.(X4, Xs), Xs)
U9_aa(X5, true_out_) → less_out_aa(0, s(X5))
U10_aa(X, Y, p_out_aa(X, Px)) → U11_aa(X, Y, Px, p_in_aa(Y, Py))
true_in_ → true_out_
p_in_aa(0, 0) → p_out_aa(0, 0)
p_in_aa(s(X), X) → p_out_aa(s(X), X)
U11_aa(X, Y, Px, p_out_aa(Y, Py)) → U12_aa(X, Y, less_in_aa(Px, Py))
U12_aa(X, Y, less_out_aa(Px, Py)) → less_out_aa(X, Y)
U6_A(tail_out_aa) → U7_A(less_in_aa)
U7_A(less_out_aa) → ORDERED_IN_A
ORDERED_IN_A → U3_A(head_in_aa)
U3_A(head_out_aa) → U4_A(tail_in_aa)
U4_A(tail_out_aa) → U5_A(head_in_aa)
U5_A(head_out_aa) → U6_A(tail_in_aa)
less_in_aa → U9_aa(true_in_)
less_in_aa → U10_aa(p_in_aa)
head_in_aa → head_out_aa
tail_in_aa → tail_out_aa
U9_aa(true_out_) → less_out_aa
U10_aa(p_out_aa) → U11_aa(p_in_aa)
true_in_ → true_out_
p_in_aa → p_out_aa
U11_aa(p_out_aa) → U12_aa(less_in_aa)
U12_aa(less_out_aa) → less_out_aa
less_in_aa
head_in_aa
tail_in_aa
U9_aa(x0)
U10_aa(x0)
true_in_
p_in_aa
U11_aa(x0)
U12_aa(x0)
ORDERED_IN_A → U3_A(head_out_aa)
U6_A(tail_out_aa) → U7_A(less_in_aa)
U7_A(less_out_aa) → ORDERED_IN_A
U3_A(head_out_aa) → U4_A(tail_in_aa)
U4_A(tail_out_aa) → U5_A(head_in_aa)
U5_A(head_out_aa) → U6_A(tail_in_aa)
ORDERED_IN_A → U3_A(head_out_aa)
less_in_aa → U9_aa(true_in_)
less_in_aa → U10_aa(p_in_aa)
head_in_aa → head_out_aa
tail_in_aa → tail_out_aa
U9_aa(true_out_) → less_out_aa
U10_aa(p_out_aa) → U11_aa(p_in_aa)
true_in_ → true_out_
p_in_aa → p_out_aa
U11_aa(p_out_aa) → U12_aa(less_in_aa)
U12_aa(less_out_aa) → less_out_aa
less_in_aa
head_in_aa
tail_in_aa
U9_aa(x0)
U10_aa(x0)
true_in_
p_in_aa
U11_aa(x0)
U12_aa(x0)
U3_A(head_out_aa) → U4_A(tail_out_aa)
U6_A(tail_out_aa) → U7_A(less_in_aa)
U7_A(less_out_aa) → ORDERED_IN_A
U4_A(tail_out_aa) → U5_A(head_in_aa)
U5_A(head_out_aa) → U6_A(tail_in_aa)
ORDERED_IN_A → U3_A(head_out_aa)
U3_A(head_out_aa) → U4_A(tail_out_aa)
less_in_aa → U9_aa(true_in_)
less_in_aa → U10_aa(p_in_aa)
head_in_aa → head_out_aa
tail_in_aa → tail_out_aa
U9_aa(true_out_) → less_out_aa
U10_aa(p_out_aa) → U11_aa(p_in_aa)
true_in_ → true_out_
p_in_aa → p_out_aa
U11_aa(p_out_aa) → U12_aa(less_in_aa)
U12_aa(less_out_aa) → less_out_aa
less_in_aa
head_in_aa
tail_in_aa
U9_aa(x0)
U10_aa(x0)
true_in_
p_in_aa
U11_aa(x0)
U12_aa(x0)
U4_A(tail_out_aa) → U5_A(head_out_aa)
U6_A(tail_out_aa) → U7_A(less_in_aa)
U7_A(less_out_aa) → ORDERED_IN_A
U5_A(head_out_aa) → U6_A(tail_in_aa)
ORDERED_IN_A → U3_A(head_out_aa)
U3_A(head_out_aa) → U4_A(tail_out_aa)
U4_A(tail_out_aa) → U5_A(head_out_aa)
less_in_aa → U9_aa(true_in_)
less_in_aa → U10_aa(p_in_aa)
head_in_aa → head_out_aa
tail_in_aa → tail_out_aa
U9_aa(true_out_) → less_out_aa
U10_aa(p_out_aa) → U11_aa(p_in_aa)
true_in_ → true_out_
p_in_aa → p_out_aa
U11_aa(p_out_aa) → U12_aa(less_in_aa)
U12_aa(less_out_aa) → less_out_aa
less_in_aa
head_in_aa
tail_in_aa
U9_aa(x0)
U10_aa(x0)
true_in_
p_in_aa
U11_aa(x0)
U12_aa(x0)
U6_A(tail_out_aa) → U7_A(less_in_aa)
U7_A(less_out_aa) → ORDERED_IN_A
U5_A(head_out_aa) → U6_A(tail_in_aa)
ORDERED_IN_A → U3_A(head_out_aa)
U3_A(head_out_aa) → U4_A(tail_out_aa)
U4_A(tail_out_aa) → U5_A(head_out_aa)
tail_in_aa → tail_out_aa
less_in_aa → U9_aa(true_in_)
less_in_aa → U10_aa(p_in_aa)
p_in_aa → p_out_aa
U10_aa(p_out_aa) → U11_aa(p_in_aa)
U11_aa(p_out_aa) → U12_aa(less_in_aa)
U12_aa(less_out_aa) → less_out_aa
true_in_ → true_out_
U9_aa(true_out_) → less_out_aa
less_in_aa
head_in_aa
tail_in_aa
U9_aa(x0)
U10_aa(x0)
true_in_
p_in_aa
U11_aa(x0)
U12_aa(x0)
head_in_aa
U6_A(tail_out_aa) → U7_A(less_in_aa)
U7_A(less_out_aa) → ORDERED_IN_A
U5_A(head_out_aa) → U6_A(tail_in_aa)
ORDERED_IN_A → U3_A(head_out_aa)
U3_A(head_out_aa) → U4_A(tail_out_aa)
U4_A(tail_out_aa) → U5_A(head_out_aa)
tail_in_aa → tail_out_aa
less_in_aa → U9_aa(true_in_)
less_in_aa → U10_aa(p_in_aa)
p_in_aa → p_out_aa
U10_aa(p_out_aa) → U11_aa(p_in_aa)
U11_aa(p_out_aa) → U12_aa(less_in_aa)
U12_aa(less_out_aa) → less_out_aa
true_in_ → true_out_
U9_aa(true_out_) → less_out_aa
less_in_aa
tail_in_aa
U9_aa(x0)
U10_aa(x0)
true_in_
p_in_aa
U11_aa(x0)
U12_aa(x0)
U5_A(head_out_aa) → U6_A(tail_out_aa)
U6_A(tail_out_aa) → U7_A(less_in_aa)
U7_A(less_out_aa) → ORDERED_IN_A
ORDERED_IN_A → U3_A(head_out_aa)
U3_A(head_out_aa) → U4_A(tail_out_aa)
U4_A(tail_out_aa) → U5_A(head_out_aa)
U5_A(head_out_aa) → U6_A(tail_out_aa)
tail_in_aa → tail_out_aa
less_in_aa → U9_aa(true_in_)
less_in_aa → U10_aa(p_in_aa)
p_in_aa → p_out_aa
U10_aa(p_out_aa) → U11_aa(p_in_aa)
U11_aa(p_out_aa) → U12_aa(less_in_aa)
U12_aa(less_out_aa) → less_out_aa
true_in_ → true_out_
U9_aa(true_out_) → less_out_aa
less_in_aa
tail_in_aa
U9_aa(x0)
U10_aa(x0)
true_in_
p_in_aa
U11_aa(x0)
U12_aa(x0)
U6_A(tail_out_aa) → U7_A(less_in_aa)
U7_A(less_out_aa) → ORDERED_IN_A
ORDERED_IN_A → U3_A(head_out_aa)
U3_A(head_out_aa) → U4_A(tail_out_aa)
U4_A(tail_out_aa) → U5_A(head_out_aa)
U5_A(head_out_aa) → U6_A(tail_out_aa)
less_in_aa → U9_aa(true_in_)
less_in_aa → U10_aa(p_in_aa)
p_in_aa → p_out_aa
U10_aa(p_out_aa) → U11_aa(p_in_aa)
U11_aa(p_out_aa) → U12_aa(less_in_aa)
U12_aa(less_out_aa) → less_out_aa
true_in_ → true_out_
U9_aa(true_out_) → less_out_aa
less_in_aa
tail_in_aa
U9_aa(x0)
U10_aa(x0)
true_in_
p_in_aa
U11_aa(x0)
U12_aa(x0)
tail_in_aa
U6_A(tail_out_aa) → U7_A(less_in_aa)
U7_A(less_out_aa) → ORDERED_IN_A
ORDERED_IN_A → U3_A(head_out_aa)
U3_A(head_out_aa) → U4_A(tail_out_aa)
U4_A(tail_out_aa) → U5_A(head_out_aa)
U5_A(head_out_aa) → U6_A(tail_out_aa)
less_in_aa → U9_aa(true_in_)
less_in_aa → U10_aa(p_in_aa)
p_in_aa → p_out_aa
U10_aa(p_out_aa) → U11_aa(p_in_aa)
U11_aa(p_out_aa) → U12_aa(less_in_aa)
U12_aa(less_out_aa) → less_out_aa
true_in_ → true_out_
U9_aa(true_out_) → less_out_aa
less_in_aa
U9_aa(x0)
U10_aa(x0)
true_in_
p_in_aa
U11_aa(x0)
U12_aa(x0)
U6_A(tail_out_aa) → U7_A(U9_aa(true_in_))
U6_A(tail_out_aa) → U7_A(U10_aa(p_in_aa))
U7_A(less_out_aa) → ORDERED_IN_A
ORDERED_IN_A → U3_A(head_out_aa)
U3_A(head_out_aa) → U4_A(tail_out_aa)
U4_A(tail_out_aa) → U5_A(head_out_aa)
U5_A(head_out_aa) → U6_A(tail_out_aa)
U6_A(tail_out_aa) → U7_A(U9_aa(true_in_))
U6_A(tail_out_aa) → U7_A(U10_aa(p_in_aa))
less_in_aa → U9_aa(true_in_)
less_in_aa → U10_aa(p_in_aa)
p_in_aa → p_out_aa
U10_aa(p_out_aa) → U11_aa(p_in_aa)
U11_aa(p_out_aa) → U12_aa(less_in_aa)
U12_aa(less_out_aa) → less_out_aa
true_in_ → true_out_
U9_aa(true_out_) → less_out_aa
less_in_aa
U9_aa(x0)
U10_aa(x0)
true_in_
p_in_aa
U11_aa(x0)
U12_aa(x0)
U6_A(tail_out_aa) → U7_A(U9_aa(true_out_))
U7_A(less_out_aa) → ORDERED_IN_A
ORDERED_IN_A → U3_A(head_out_aa)
U3_A(head_out_aa) → U4_A(tail_out_aa)
U4_A(tail_out_aa) → U5_A(head_out_aa)
U5_A(head_out_aa) → U6_A(tail_out_aa)
U6_A(tail_out_aa) → U7_A(U10_aa(p_in_aa))
U6_A(tail_out_aa) → U7_A(U9_aa(true_out_))
less_in_aa → U9_aa(true_in_)
less_in_aa → U10_aa(p_in_aa)
p_in_aa → p_out_aa
U10_aa(p_out_aa) → U11_aa(p_in_aa)
U11_aa(p_out_aa) → U12_aa(less_in_aa)
U12_aa(less_out_aa) → less_out_aa
true_in_ → true_out_
U9_aa(true_out_) → less_out_aa
less_in_aa
U9_aa(x0)
U10_aa(x0)
true_in_
p_in_aa
U11_aa(x0)
U12_aa(x0)
U6_A(tail_out_aa) → U7_A(U10_aa(p_out_aa))
U7_A(less_out_aa) → ORDERED_IN_A
ORDERED_IN_A → U3_A(head_out_aa)
U3_A(head_out_aa) → U4_A(tail_out_aa)
U4_A(tail_out_aa) → U5_A(head_out_aa)
U5_A(head_out_aa) → U6_A(tail_out_aa)
U6_A(tail_out_aa) → U7_A(U9_aa(true_out_))
U6_A(tail_out_aa) → U7_A(U10_aa(p_out_aa))
less_in_aa → U9_aa(true_in_)
less_in_aa → U10_aa(p_in_aa)
p_in_aa → p_out_aa
U10_aa(p_out_aa) → U11_aa(p_in_aa)
U11_aa(p_out_aa) → U12_aa(less_in_aa)
U12_aa(less_out_aa) → less_out_aa
true_in_ → true_out_
U9_aa(true_out_) → less_out_aa
less_in_aa
U9_aa(x0)
U10_aa(x0)
true_in_
p_in_aa
U11_aa(x0)
U12_aa(x0)
U6_A(tail_out_aa) → U7_A(less_out_aa)
U7_A(less_out_aa) → ORDERED_IN_A
ORDERED_IN_A → U3_A(head_out_aa)
U3_A(head_out_aa) → U4_A(tail_out_aa)
U4_A(tail_out_aa) → U5_A(head_out_aa)
U5_A(head_out_aa) → U6_A(tail_out_aa)
U6_A(tail_out_aa) → U7_A(U10_aa(p_out_aa))
U6_A(tail_out_aa) → U7_A(less_out_aa)
less_in_aa → U9_aa(true_in_)
less_in_aa → U10_aa(p_in_aa)
p_in_aa → p_out_aa
U10_aa(p_out_aa) → U11_aa(p_in_aa)
U11_aa(p_out_aa) → U12_aa(less_in_aa)
U12_aa(less_out_aa) → less_out_aa
true_in_ → true_out_
U9_aa(true_out_) → less_out_aa
less_in_aa
U9_aa(x0)
U10_aa(x0)
true_in_
p_in_aa
U11_aa(x0)
U12_aa(x0)