0 Prolog
↳1 PrologToPiTRSProof (⇐)
↳2 PiTRS
↳3 DependencyPairsProof (⇔)
↳4 PiDP
↳5 DependencyGraphProof (⇔)
↳6 AND
↳7 PiDP
↳8 UsableRulesProof (⇔)
↳9 PiDP
↳10 PiDPToQDPProof (⇐)
↳11 QDP
↳12 QDPSizeChangeProof (⇔)
↳13 TRUE
↳14 PiDP
↳15 UsableRulesProof (⇔)
↳16 PiDP
↳17 PiDPToQDPProof (⇔)
↳18 QDP
↳19 QDPSizeChangeProof (⇔)
↳20 TRUE
↳21 PiDP
↳22 UsableRulesProof (⇔)
↳23 PiDP
↳24 PiDPToQDPProof (⇐)
↳25 QDP
↳26 QDPSizeChangeProof (⇔)
↳27 TRUE
↳28 PiDP
↳29 UsableRulesProof (⇔)
↳30 PiDP
↳31 PiDPToQDPProof (⇐)
↳32 QDP
↳33 QDPSizeChangeProof (⇔)
↳34 TRUE
↳35 PiDP
↳36 UsableRulesProof (⇔)
↳37 PiDP
↳38 PiDPToQDPProof (⇐)
↳39 QDP
↳40 QDPSizeChangeProof (⇔)
↳41 TRUE
↳42 PiDP
↳43 UsableRulesProof (⇔)
↳44 PiDP
↳45 PiDPToQDPProof (⇐)
↳46 QDP
↳47 QDPSizeChangeProof (⇔)
↳48 TRUE
↳49 PrologToPiTRSProof (⇐)
↳50 PiTRS
↳51 DependencyPairsProof (⇔)
↳52 PiDP
↳53 DependencyGraphProof (⇔)
↳54 AND
↳55 PiDP
↳56 UsableRulesProof (⇔)
↳57 PiDP
↳58 PiDPToQDPProof (⇐)
↳59 QDP
↳60 QDPSizeChangeProof (⇔)
↳61 TRUE
↳62 PiDP
↳63 UsableRulesProof (⇔)
↳64 PiDP
↳65 PiDPToQDPProof (⇔)
↳66 QDP
↳67 QDPSizeChangeProof (⇔)
↳68 TRUE
↳69 PiDP
↳70 UsableRulesProof (⇔)
↳71 PiDP
↳72 PiDPToQDPProof (⇐)
↳73 QDP
↳74 QDPSizeChangeProof (⇔)
↳75 TRUE
↳76 PiDP
↳77 UsableRulesProof (⇔)
↳78 PiDP
↳79 PiDPToQDPProof (⇐)
↳80 QDP
↳81 QDPSizeChangeProof (⇔)
↳82 TRUE
↳83 PiDP
↳84 UsableRulesProof (⇔)
↳85 PiDP
↳86 PiDPToQDPProof (⇐)
↳87 QDP
↳88 QDPSizeChangeProof (⇔)
↳89 TRUE
↳90 PiDP
↳91 UsableRulesProof (⇔)
↳92 PiDP
↳93 PiDPToQDPProof (⇐)
↳94 QDP
delete_in_aag(X, tree(X, void, Right), Right) → delete_out_aag(X, tree(X, void, Right), Right)
delete_in_aag(X, tree(X, Left, void), Left) → delete_out_aag(X, tree(X, Left, void), Left)
delete_in_aag(X, tree(X, Left, Right), tree(Y, Left, Right1)) → U1_aag(X, Left, Right, Y, Right1, delmin_in_agg(Right, Y, Right1))
delmin_in_agg(tree(Y, void, Right), Y, Right) → delmin_out_agg(tree(Y, void, Right), Y, Right)
delmin_in_agg(tree(X, Left, X1), Y, tree(X, Left1, X2)) → U6_agg(X, Left, X1, Y, Left1, X2, delmin_in_agg(Left, Y, Left1))
U6_agg(X, Left, X1, Y, Left1, X2, delmin_out_agg(Left, Y, Left1)) → delmin_out_agg(tree(X, Left, X1), Y, tree(X, Left1, X2))
U1_aag(X, Left, Right, Y, Right1, delmin_out_agg(Right, Y, Right1)) → delete_out_aag(X, tree(X, Left, Right), tree(Y, Left, Right1))
delete_in_aag(X, tree(Y, Left, Right), tree(Y, Left1, Right)) → U2_aag(X, Y, Left, Right, Left1, less_in_ag(X, Y))
less_in_ag(0, s(X3)) → less_out_ag(0, s(X3))
less_in_ag(s(X), s(Y)) → U7_ag(X, Y, less_in_ag(X, Y))
U7_ag(X, Y, less_out_ag(X, Y)) → less_out_ag(s(X), s(Y))
U2_aag(X, Y, Left, Right, Left1, less_out_ag(X, Y)) → U3_aag(X, Y, Left, Right, Left1, delete_in_gag(X, Left, Left1))
delete_in_gag(X, tree(X, void, Right), Right) → delete_out_gag(X, tree(X, void, Right), Right)
delete_in_gag(X, tree(X, Left, void), Left) → delete_out_gag(X, tree(X, Left, void), Left)
delete_in_gag(X, tree(X, Left, Right), tree(Y, Left, Right1)) → U1_gag(X, Left, Right, Y, Right1, delmin_in_agg(Right, Y, Right1))
U1_gag(X, Left, Right, Y, Right1, delmin_out_agg(Right, Y, Right1)) → delete_out_gag(X, tree(X, Left, Right), tree(Y, Left, Right1))
delete_in_gag(X, tree(Y, Left, Right), tree(Y, Left1, Right)) → U2_gag(X, Y, Left, Right, Left1, less_in_gg(X, Y))
less_in_gg(0, s(X3)) → less_out_gg(0, s(X3))
less_in_gg(s(X), s(Y)) → U7_gg(X, Y, less_in_gg(X, Y))
U7_gg(X, Y, less_out_gg(X, Y)) → less_out_gg(s(X), s(Y))
U2_gag(X, Y, Left, Right, Left1, less_out_gg(X, Y)) → U3_gag(X, Y, Left, Right, Left1, delete_in_gag(X, Left, Left1))
delete_in_gag(X, tree(Y, Left, Right), tree(Y, Left, Right1)) → U4_gag(X, Y, Left, Right, Right1, less_in_gg(Y, X))
U4_gag(X, Y, Left, Right, Right1, less_out_gg(Y, X)) → U5_gag(X, Y, Left, Right, Right1, delete_in_gag(X, Right, Right1))
U5_gag(X, Y, Left, Right, Right1, delete_out_gag(X, Right, Right1)) → delete_out_gag(X, tree(Y, Left, Right), tree(Y, Left, Right1))
U3_gag(X, Y, Left, Right, Left1, delete_out_gag(X, Left, Left1)) → delete_out_gag(X, tree(Y, Left, Right), tree(Y, Left1, Right))
U3_aag(X, Y, Left, Right, Left1, delete_out_gag(X, Left, Left1)) → delete_out_aag(X, tree(Y, Left, Right), tree(Y, Left1, Right))
delete_in_aag(X, tree(Y, Left, Right), tree(Y, Left, Right1)) → U4_aag(X, Y, Left, Right, Right1, less_in_ga(Y, X))
less_in_ga(0, s(X3)) → less_out_ga(0, s(X3))
less_in_ga(s(X), s(Y)) → U7_ga(X, Y, less_in_ga(X, Y))
U7_ga(X, Y, less_out_ga(X, Y)) → less_out_ga(s(X), s(Y))
U4_aag(X, Y, Left, Right, Right1, less_out_ga(Y, X)) → U5_aag(X, Y, Left, Right, Right1, delete_in_aag(X, Right, Right1))
U5_aag(X, Y, Left, Right, Right1, delete_out_aag(X, Right, Right1)) → delete_out_aag(X, tree(Y, Left, Right), tree(Y, Left, Right1))
Infinitary Constructor Rewriting Termination of PiTRS implies Termination of Prolog
delete_in_aag(X, tree(X, void, Right), Right) → delete_out_aag(X, tree(X, void, Right), Right)
delete_in_aag(X, tree(X, Left, void), Left) → delete_out_aag(X, tree(X, Left, void), Left)
delete_in_aag(X, tree(X, Left, Right), tree(Y, Left, Right1)) → U1_aag(X, Left, Right, Y, Right1, delmin_in_agg(Right, Y, Right1))
delmin_in_agg(tree(Y, void, Right), Y, Right) → delmin_out_agg(tree(Y, void, Right), Y, Right)
delmin_in_agg(tree(X, Left, X1), Y, tree(X, Left1, X2)) → U6_agg(X, Left, X1, Y, Left1, X2, delmin_in_agg(Left, Y, Left1))
U6_agg(X, Left, X1, Y, Left1, X2, delmin_out_agg(Left, Y, Left1)) → delmin_out_agg(tree(X, Left, X1), Y, tree(X, Left1, X2))
U1_aag(X, Left, Right, Y, Right1, delmin_out_agg(Right, Y, Right1)) → delete_out_aag(X, tree(X, Left, Right), tree(Y, Left, Right1))
delete_in_aag(X, tree(Y, Left, Right), tree(Y, Left1, Right)) → U2_aag(X, Y, Left, Right, Left1, less_in_ag(X, Y))
less_in_ag(0, s(X3)) → less_out_ag(0, s(X3))
less_in_ag(s(X), s(Y)) → U7_ag(X, Y, less_in_ag(X, Y))
U7_ag(X, Y, less_out_ag(X, Y)) → less_out_ag(s(X), s(Y))
U2_aag(X, Y, Left, Right, Left1, less_out_ag(X, Y)) → U3_aag(X, Y, Left, Right, Left1, delete_in_gag(X, Left, Left1))
delete_in_gag(X, tree(X, void, Right), Right) → delete_out_gag(X, tree(X, void, Right), Right)
delete_in_gag(X, tree(X, Left, void), Left) → delete_out_gag(X, tree(X, Left, void), Left)
delete_in_gag(X, tree(X, Left, Right), tree(Y, Left, Right1)) → U1_gag(X, Left, Right, Y, Right1, delmin_in_agg(Right, Y, Right1))
U1_gag(X, Left, Right, Y, Right1, delmin_out_agg(Right, Y, Right1)) → delete_out_gag(X, tree(X, Left, Right), tree(Y, Left, Right1))
delete_in_gag(X, tree(Y, Left, Right), tree(Y, Left1, Right)) → U2_gag(X, Y, Left, Right, Left1, less_in_gg(X, Y))
less_in_gg(0, s(X3)) → less_out_gg(0, s(X3))
less_in_gg(s(X), s(Y)) → U7_gg(X, Y, less_in_gg(X, Y))
U7_gg(X, Y, less_out_gg(X, Y)) → less_out_gg(s(X), s(Y))
U2_gag(X, Y, Left, Right, Left1, less_out_gg(X, Y)) → U3_gag(X, Y, Left, Right, Left1, delete_in_gag(X, Left, Left1))
delete_in_gag(X, tree(Y, Left, Right), tree(Y, Left, Right1)) → U4_gag(X, Y, Left, Right, Right1, less_in_gg(Y, X))
U4_gag(X, Y, Left, Right, Right1, less_out_gg(Y, X)) → U5_gag(X, Y, Left, Right, Right1, delete_in_gag(X, Right, Right1))
U5_gag(X, Y, Left, Right, Right1, delete_out_gag(X, Right, Right1)) → delete_out_gag(X, tree(Y, Left, Right), tree(Y, Left, Right1))
U3_gag(X, Y, Left, Right, Left1, delete_out_gag(X, Left, Left1)) → delete_out_gag(X, tree(Y, Left, Right), tree(Y, Left1, Right))
U3_aag(X, Y, Left, Right, Left1, delete_out_gag(X, Left, Left1)) → delete_out_aag(X, tree(Y, Left, Right), tree(Y, Left1, Right))
delete_in_aag(X, tree(Y, Left, Right), tree(Y, Left, Right1)) → U4_aag(X, Y, Left, Right, Right1, less_in_ga(Y, X))
less_in_ga(0, s(X3)) → less_out_ga(0, s(X3))
less_in_ga(s(X), s(Y)) → U7_ga(X, Y, less_in_ga(X, Y))
U7_ga(X, Y, less_out_ga(X, Y)) → less_out_ga(s(X), s(Y))
U4_aag(X, Y, Left, Right, Right1, less_out_ga(Y, X)) → U5_aag(X, Y, Left, Right, Right1, delete_in_aag(X, Right, Right1))
U5_aag(X, Y, Left, Right, Right1, delete_out_aag(X, Right, Right1)) → delete_out_aag(X, tree(Y, Left, Right), tree(Y, Left, Right1))
DELETE_IN_AAG(X, tree(X, Left, Right), tree(Y, Left, Right1)) → U1_AAG(X, Left, Right, Y, Right1, delmin_in_agg(Right, Y, Right1))
DELETE_IN_AAG(X, tree(X, Left, Right), tree(Y, Left, Right1)) → DELMIN_IN_AGG(Right, Y, Right1)
DELMIN_IN_AGG(tree(X, Left, X1), Y, tree(X, Left1, X2)) → U6_AGG(X, Left, X1, Y, Left1, X2, delmin_in_agg(Left, Y, Left1))
DELMIN_IN_AGG(tree(X, Left, X1), Y, tree(X, Left1, X2)) → DELMIN_IN_AGG(Left, Y, Left1)
DELETE_IN_AAG(X, tree(Y, Left, Right), tree(Y, Left1, Right)) → U2_AAG(X, Y, Left, Right, Left1, less_in_ag(X, Y))
DELETE_IN_AAG(X, tree(Y, Left, Right), tree(Y, Left1, Right)) → LESS_IN_AG(X, Y)
LESS_IN_AG(s(X), s(Y)) → U7_AG(X, Y, less_in_ag(X, Y))
LESS_IN_AG(s(X), s(Y)) → LESS_IN_AG(X, Y)
U2_AAG(X, Y, Left, Right, Left1, less_out_ag(X, Y)) → U3_AAG(X, Y, Left, Right, Left1, delete_in_gag(X, Left, Left1))
U2_AAG(X, Y, Left, Right, Left1, less_out_ag(X, Y)) → DELETE_IN_GAG(X, Left, Left1)
DELETE_IN_GAG(X, tree(X, Left, Right), tree(Y, Left, Right1)) → U1_GAG(X, Left, Right, Y, Right1, delmin_in_agg(Right, Y, Right1))
DELETE_IN_GAG(X, tree(X, Left, Right), tree(Y, Left, Right1)) → DELMIN_IN_AGG(Right, Y, Right1)
DELETE_IN_GAG(X, tree(Y, Left, Right), tree(Y, Left1, Right)) → U2_GAG(X, Y, Left, Right, Left1, less_in_gg(X, Y))
DELETE_IN_GAG(X, tree(Y, Left, Right), tree(Y, Left1, Right)) → LESS_IN_GG(X, Y)
LESS_IN_GG(s(X), s(Y)) → U7_GG(X, Y, less_in_gg(X, Y))
LESS_IN_GG(s(X), s(Y)) → LESS_IN_GG(X, Y)
U2_GAG(X, Y, Left, Right, Left1, less_out_gg(X, Y)) → U3_GAG(X, Y, Left, Right, Left1, delete_in_gag(X, Left, Left1))
U2_GAG(X, Y, Left, Right, Left1, less_out_gg(X, Y)) → DELETE_IN_GAG(X, Left, Left1)
DELETE_IN_GAG(X, tree(Y, Left, Right), tree(Y, Left, Right1)) → U4_GAG(X, Y, Left, Right, Right1, less_in_gg(Y, X))
DELETE_IN_GAG(X, tree(Y, Left, Right), tree(Y, Left, Right1)) → LESS_IN_GG(Y, X)
U4_GAG(X, Y, Left, Right, Right1, less_out_gg(Y, X)) → U5_GAG(X, Y, Left, Right, Right1, delete_in_gag(X, Right, Right1))
U4_GAG(X, Y, Left, Right, Right1, less_out_gg(Y, X)) → DELETE_IN_GAG(X, Right, Right1)
DELETE_IN_AAG(X, tree(Y, Left, Right), tree(Y, Left, Right1)) → U4_AAG(X, Y, Left, Right, Right1, less_in_ga(Y, X))
DELETE_IN_AAG(X, tree(Y, Left, Right), tree(Y, Left, Right1)) → LESS_IN_GA(Y, X)
LESS_IN_GA(s(X), s(Y)) → U7_GA(X, Y, less_in_ga(X, Y))
LESS_IN_GA(s(X), s(Y)) → LESS_IN_GA(X, Y)
U4_AAG(X, Y, Left, Right, Right1, less_out_ga(Y, X)) → U5_AAG(X, Y, Left, Right, Right1, delete_in_aag(X, Right, Right1))
U4_AAG(X, Y, Left, Right, Right1, less_out_ga(Y, X)) → DELETE_IN_AAG(X, Right, Right1)
delete_in_aag(X, tree(X, void, Right), Right) → delete_out_aag(X, tree(X, void, Right), Right)
delete_in_aag(X, tree(X, Left, void), Left) → delete_out_aag(X, tree(X, Left, void), Left)
delete_in_aag(X, tree(X, Left, Right), tree(Y, Left, Right1)) → U1_aag(X, Left, Right, Y, Right1, delmin_in_agg(Right, Y, Right1))
delmin_in_agg(tree(Y, void, Right), Y, Right) → delmin_out_agg(tree(Y, void, Right), Y, Right)
delmin_in_agg(tree(X, Left, X1), Y, tree(X, Left1, X2)) → U6_agg(X, Left, X1, Y, Left1, X2, delmin_in_agg(Left, Y, Left1))
U6_agg(X, Left, X1, Y, Left1, X2, delmin_out_agg(Left, Y, Left1)) → delmin_out_agg(tree(X, Left, X1), Y, tree(X, Left1, X2))
U1_aag(X, Left, Right, Y, Right1, delmin_out_agg(Right, Y, Right1)) → delete_out_aag(X, tree(X, Left, Right), tree(Y, Left, Right1))
delete_in_aag(X, tree(Y, Left, Right), tree(Y, Left1, Right)) → U2_aag(X, Y, Left, Right, Left1, less_in_ag(X, Y))
less_in_ag(0, s(X3)) → less_out_ag(0, s(X3))
less_in_ag(s(X), s(Y)) → U7_ag(X, Y, less_in_ag(X, Y))
U7_ag(X, Y, less_out_ag(X, Y)) → less_out_ag(s(X), s(Y))
U2_aag(X, Y, Left, Right, Left1, less_out_ag(X, Y)) → U3_aag(X, Y, Left, Right, Left1, delete_in_gag(X, Left, Left1))
delete_in_gag(X, tree(X, void, Right), Right) → delete_out_gag(X, tree(X, void, Right), Right)
delete_in_gag(X, tree(X, Left, void), Left) → delete_out_gag(X, tree(X, Left, void), Left)
delete_in_gag(X, tree(X, Left, Right), tree(Y, Left, Right1)) → U1_gag(X, Left, Right, Y, Right1, delmin_in_agg(Right, Y, Right1))
U1_gag(X, Left, Right, Y, Right1, delmin_out_agg(Right, Y, Right1)) → delete_out_gag(X, tree(X, Left, Right), tree(Y, Left, Right1))
delete_in_gag(X, tree(Y, Left, Right), tree(Y, Left1, Right)) → U2_gag(X, Y, Left, Right, Left1, less_in_gg(X, Y))
less_in_gg(0, s(X3)) → less_out_gg(0, s(X3))
less_in_gg(s(X), s(Y)) → U7_gg(X, Y, less_in_gg(X, Y))
U7_gg(X, Y, less_out_gg(X, Y)) → less_out_gg(s(X), s(Y))
U2_gag(X, Y, Left, Right, Left1, less_out_gg(X, Y)) → U3_gag(X, Y, Left, Right, Left1, delete_in_gag(X, Left, Left1))
delete_in_gag(X, tree(Y, Left, Right), tree(Y, Left, Right1)) → U4_gag(X, Y, Left, Right, Right1, less_in_gg(Y, X))
U4_gag(X, Y, Left, Right, Right1, less_out_gg(Y, X)) → U5_gag(X, Y, Left, Right, Right1, delete_in_gag(X, Right, Right1))
U5_gag(X, Y, Left, Right, Right1, delete_out_gag(X, Right, Right1)) → delete_out_gag(X, tree(Y, Left, Right), tree(Y, Left, Right1))
U3_gag(X, Y, Left, Right, Left1, delete_out_gag(X, Left, Left1)) → delete_out_gag(X, tree(Y, Left, Right), tree(Y, Left1, Right))
U3_aag(X, Y, Left, Right, Left1, delete_out_gag(X, Left, Left1)) → delete_out_aag(X, tree(Y, Left, Right), tree(Y, Left1, Right))
delete_in_aag(X, tree(Y, Left, Right), tree(Y, Left, Right1)) → U4_aag(X, Y, Left, Right, Right1, less_in_ga(Y, X))
less_in_ga(0, s(X3)) → less_out_ga(0, s(X3))
less_in_ga(s(X), s(Y)) → U7_ga(X, Y, less_in_ga(X, Y))
U7_ga(X, Y, less_out_ga(X, Y)) → less_out_ga(s(X), s(Y))
U4_aag(X, Y, Left, Right, Right1, less_out_ga(Y, X)) → U5_aag(X, Y, Left, Right, Right1, delete_in_aag(X, Right, Right1))
U5_aag(X, Y, Left, Right, Right1, delete_out_aag(X, Right, Right1)) → delete_out_aag(X, tree(Y, Left, Right), tree(Y, Left, Right1))
DELETE_IN_AAG(X, tree(X, Left, Right), tree(Y, Left, Right1)) → U1_AAG(X, Left, Right, Y, Right1, delmin_in_agg(Right, Y, Right1))
DELETE_IN_AAG(X, tree(X, Left, Right), tree(Y, Left, Right1)) → DELMIN_IN_AGG(Right, Y, Right1)
DELMIN_IN_AGG(tree(X, Left, X1), Y, tree(X, Left1, X2)) → U6_AGG(X, Left, X1, Y, Left1, X2, delmin_in_agg(Left, Y, Left1))
DELMIN_IN_AGG(tree(X, Left, X1), Y, tree(X, Left1, X2)) → DELMIN_IN_AGG(Left, Y, Left1)
DELETE_IN_AAG(X, tree(Y, Left, Right), tree(Y, Left1, Right)) → U2_AAG(X, Y, Left, Right, Left1, less_in_ag(X, Y))
DELETE_IN_AAG(X, tree(Y, Left, Right), tree(Y, Left1, Right)) → LESS_IN_AG(X, Y)
LESS_IN_AG(s(X), s(Y)) → U7_AG(X, Y, less_in_ag(X, Y))
LESS_IN_AG(s(X), s(Y)) → LESS_IN_AG(X, Y)
U2_AAG(X, Y, Left, Right, Left1, less_out_ag(X, Y)) → U3_AAG(X, Y, Left, Right, Left1, delete_in_gag(X, Left, Left1))
U2_AAG(X, Y, Left, Right, Left1, less_out_ag(X, Y)) → DELETE_IN_GAG(X, Left, Left1)
DELETE_IN_GAG(X, tree(X, Left, Right), tree(Y, Left, Right1)) → U1_GAG(X, Left, Right, Y, Right1, delmin_in_agg(Right, Y, Right1))
DELETE_IN_GAG(X, tree(X, Left, Right), tree(Y, Left, Right1)) → DELMIN_IN_AGG(Right, Y, Right1)
DELETE_IN_GAG(X, tree(Y, Left, Right), tree(Y, Left1, Right)) → U2_GAG(X, Y, Left, Right, Left1, less_in_gg(X, Y))
DELETE_IN_GAG(X, tree(Y, Left, Right), tree(Y, Left1, Right)) → LESS_IN_GG(X, Y)
LESS_IN_GG(s(X), s(Y)) → U7_GG(X, Y, less_in_gg(X, Y))
LESS_IN_GG(s(X), s(Y)) → LESS_IN_GG(X, Y)
U2_GAG(X, Y, Left, Right, Left1, less_out_gg(X, Y)) → U3_GAG(X, Y, Left, Right, Left1, delete_in_gag(X, Left, Left1))
U2_GAG(X, Y, Left, Right, Left1, less_out_gg(X, Y)) → DELETE_IN_GAG(X, Left, Left1)
DELETE_IN_GAG(X, tree(Y, Left, Right), tree(Y, Left, Right1)) → U4_GAG(X, Y, Left, Right, Right1, less_in_gg(Y, X))
DELETE_IN_GAG(X, tree(Y, Left, Right), tree(Y, Left, Right1)) → LESS_IN_GG(Y, X)
U4_GAG(X, Y, Left, Right, Right1, less_out_gg(Y, X)) → U5_GAG(X, Y, Left, Right, Right1, delete_in_gag(X, Right, Right1))
U4_GAG(X, Y, Left, Right, Right1, less_out_gg(Y, X)) → DELETE_IN_GAG(X, Right, Right1)
DELETE_IN_AAG(X, tree(Y, Left, Right), tree(Y, Left, Right1)) → U4_AAG(X, Y, Left, Right, Right1, less_in_ga(Y, X))
DELETE_IN_AAG(X, tree(Y, Left, Right), tree(Y, Left, Right1)) → LESS_IN_GA(Y, X)
LESS_IN_GA(s(X), s(Y)) → U7_GA(X, Y, less_in_ga(X, Y))
LESS_IN_GA(s(X), s(Y)) → LESS_IN_GA(X, Y)
U4_AAG(X, Y, Left, Right, Right1, less_out_ga(Y, X)) → U5_AAG(X, Y, Left, Right, Right1, delete_in_aag(X, Right, Right1))
U4_AAG(X, Y, Left, Right, Right1, less_out_ga(Y, X)) → DELETE_IN_AAG(X, Right, Right1)
delete_in_aag(X, tree(X, void, Right), Right) → delete_out_aag(X, tree(X, void, Right), Right)
delete_in_aag(X, tree(X, Left, void), Left) → delete_out_aag(X, tree(X, Left, void), Left)
delete_in_aag(X, tree(X, Left, Right), tree(Y, Left, Right1)) → U1_aag(X, Left, Right, Y, Right1, delmin_in_agg(Right, Y, Right1))
delmin_in_agg(tree(Y, void, Right), Y, Right) → delmin_out_agg(tree(Y, void, Right), Y, Right)
delmin_in_agg(tree(X, Left, X1), Y, tree(X, Left1, X2)) → U6_agg(X, Left, X1, Y, Left1, X2, delmin_in_agg(Left, Y, Left1))
U6_agg(X, Left, X1, Y, Left1, X2, delmin_out_agg(Left, Y, Left1)) → delmin_out_agg(tree(X, Left, X1), Y, tree(X, Left1, X2))
U1_aag(X, Left, Right, Y, Right1, delmin_out_agg(Right, Y, Right1)) → delete_out_aag(X, tree(X, Left, Right), tree(Y, Left, Right1))
delete_in_aag(X, tree(Y, Left, Right), tree(Y, Left1, Right)) → U2_aag(X, Y, Left, Right, Left1, less_in_ag(X, Y))
less_in_ag(0, s(X3)) → less_out_ag(0, s(X3))
less_in_ag(s(X), s(Y)) → U7_ag(X, Y, less_in_ag(X, Y))
U7_ag(X, Y, less_out_ag(X, Y)) → less_out_ag(s(X), s(Y))
U2_aag(X, Y, Left, Right, Left1, less_out_ag(X, Y)) → U3_aag(X, Y, Left, Right, Left1, delete_in_gag(X, Left, Left1))
delete_in_gag(X, tree(X, void, Right), Right) → delete_out_gag(X, tree(X, void, Right), Right)
delete_in_gag(X, tree(X, Left, void), Left) → delete_out_gag(X, tree(X, Left, void), Left)
delete_in_gag(X, tree(X, Left, Right), tree(Y, Left, Right1)) → U1_gag(X, Left, Right, Y, Right1, delmin_in_agg(Right, Y, Right1))
U1_gag(X, Left, Right, Y, Right1, delmin_out_agg(Right, Y, Right1)) → delete_out_gag(X, tree(X, Left, Right), tree(Y, Left, Right1))
delete_in_gag(X, tree(Y, Left, Right), tree(Y, Left1, Right)) → U2_gag(X, Y, Left, Right, Left1, less_in_gg(X, Y))
less_in_gg(0, s(X3)) → less_out_gg(0, s(X3))
less_in_gg(s(X), s(Y)) → U7_gg(X, Y, less_in_gg(X, Y))
U7_gg(X, Y, less_out_gg(X, Y)) → less_out_gg(s(X), s(Y))
U2_gag(X, Y, Left, Right, Left1, less_out_gg(X, Y)) → U3_gag(X, Y, Left, Right, Left1, delete_in_gag(X, Left, Left1))
delete_in_gag(X, tree(Y, Left, Right), tree(Y, Left, Right1)) → U4_gag(X, Y, Left, Right, Right1, less_in_gg(Y, X))
U4_gag(X, Y, Left, Right, Right1, less_out_gg(Y, X)) → U5_gag(X, Y, Left, Right, Right1, delete_in_gag(X, Right, Right1))
U5_gag(X, Y, Left, Right, Right1, delete_out_gag(X, Right, Right1)) → delete_out_gag(X, tree(Y, Left, Right), tree(Y, Left, Right1))
U3_gag(X, Y, Left, Right, Left1, delete_out_gag(X, Left, Left1)) → delete_out_gag(X, tree(Y, Left, Right), tree(Y, Left1, Right))
U3_aag(X, Y, Left, Right, Left1, delete_out_gag(X, Left, Left1)) → delete_out_aag(X, tree(Y, Left, Right), tree(Y, Left1, Right))
delete_in_aag(X, tree(Y, Left, Right), tree(Y, Left, Right1)) → U4_aag(X, Y, Left, Right, Right1, less_in_ga(Y, X))
less_in_ga(0, s(X3)) → less_out_ga(0, s(X3))
less_in_ga(s(X), s(Y)) → U7_ga(X, Y, less_in_ga(X, Y))
U7_ga(X, Y, less_out_ga(X, Y)) → less_out_ga(s(X), s(Y))
U4_aag(X, Y, Left, Right, Right1, less_out_ga(Y, X)) → U5_aag(X, Y, Left, Right, Right1, delete_in_aag(X, Right, Right1))
U5_aag(X, Y, Left, Right, Right1, delete_out_aag(X, Right, Right1)) → delete_out_aag(X, tree(Y, Left, Right), tree(Y, Left, Right1))
LESS_IN_GA(s(X), s(Y)) → LESS_IN_GA(X, Y)
delete_in_aag(X, tree(X, void, Right), Right) → delete_out_aag(X, tree(X, void, Right), Right)
delete_in_aag(X, tree(X, Left, void), Left) → delete_out_aag(X, tree(X, Left, void), Left)
delete_in_aag(X, tree(X, Left, Right), tree(Y, Left, Right1)) → U1_aag(X, Left, Right, Y, Right1, delmin_in_agg(Right, Y, Right1))
delmin_in_agg(tree(Y, void, Right), Y, Right) → delmin_out_agg(tree(Y, void, Right), Y, Right)
delmin_in_agg(tree(X, Left, X1), Y, tree(X, Left1, X2)) → U6_agg(X, Left, X1, Y, Left1, X2, delmin_in_agg(Left, Y, Left1))
U6_agg(X, Left, X1, Y, Left1, X2, delmin_out_agg(Left, Y, Left1)) → delmin_out_agg(tree(X, Left, X1), Y, tree(X, Left1, X2))
U1_aag(X, Left, Right, Y, Right1, delmin_out_agg(Right, Y, Right1)) → delete_out_aag(X, tree(X, Left, Right), tree(Y, Left, Right1))
delete_in_aag(X, tree(Y, Left, Right), tree(Y, Left1, Right)) → U2_aag(X, Y, Left, Right, Left1, less_in_ag(X, Y))
less_in_ag(0, s(X3)) → less_out_ag(0, s(X3))
less_in_ag(s(X), s(Y)) → U7_ag(X, Y, less_in_ag(X, Y))
U7_ag(X, Y, less_out_ag(X, Y)) → less_out_ag(s(X), s(Y))
U2_aag(X, Y, Left, Right, Left1, less_out_ag(X, Y)) → U3_aag(X, Y, Left, Right, Left1, delete_in_gag(X, Left, Left1))
delete_in_gag(X, tree(X, void, Right), Right) → delete_out_gag(X, tree(X, void, Right), Right)
delete_in_gag(X, tree(X, Left, void), Left) → delete_out_gag(X, tree(X, Left, void), Left)
delete_in_gag(X, tree(X, Left, Right), tree(Y, Left, Right1)) → U1_gag(X, Left, Right, Y, Right1, delmin_in_agg(Right, Y, Right1))
U1_gag(X, Left, Right, Y, Right1, delmin_out_agg(Right, Y, Right1)) → delete_out_gag(X, tree(X, Left, Right), tree(Y, Left, Right1))
delete_in_gag(X, tree(Y, Left, Right), tree(Y, Left1, Right)) → U2_gag(X, Y, Left, Right, Left1, less_in_gg(X, Y))
less_in_gg(0, s(X3)) → less_out_gg(0, s(X3))
less_in_gg(s(X), s(Y)) → U7_gg(X, Y, less_in_gg(X, Y))
U7_gg(X, Y, less_out_gg(X, Y)) → less_out_gg(s(X), s(Y))
U2_gag(X, Y, Left, Right, Left1, less_out_gg(X, Y)) → U3_gag(X, Y, Left, Right, Left1, delete_in_gag(X, Left, Left1))
delete_in_gag(X, tree(Y, Left, Right), tree(Y, Left, Right1)) → U4_gag(X, Y, Left, Right, Right1, less_in_gg(Y, X))
U4_gag(X, Y, Left, Right, Right1, less_out_gg(Y, X)) → U5_gag(X, Y, Left, Right, Right1, delete_in_gag(X, Right, Right1))
U5_gag(X, Y, Left, Right, Right1, delete_out_gag(X, Right, Right1)) → delete_out_gag(X, tree(Y, Left, Right), tree(Y, Left, Right1))
U3_gag(X, Y, Left, Right, Left1, delete_out_gag(X, Left, Left1)) → delete_out_gag(X, tree(Y, Left, Right), tree(Y, Left1, Right))
U3_aag(X, Y, Left, Right, Left1, delete_out_gag(X, Left, Left1)) → delete_out_aag(X, tree(Y, Left, Right), tree(Y, Left1, Right))
delete_in_aag(X, tree(Y, Left, Right), tree(Y, Left, Right1)) → U4_aag(X, Y, Left, Right, Right1, less_in_ga(Y, X))
less_in_ga(0, s(X3)) → less_out_ga(0, s(X3))
less_in_ga(s(X), s(Y)) → U7_ga(X, Y, less_in_ga(X, Y))
U7_ga(X, Y, less_out_ga(X, Y)) → less_out_ga(s(X), s(Y))
U4_aag(X, Y, Left, Right, Right1, less_out_ga(Y, X)) → U5_aag(X, Y, Left, Right, Right1, delete_in_aag(X, Right, Right1))
U5_aag(X, Y, Left, Right, Right1, delete_out_aag(X, Right, Right1)) → delete_out_aag(X, tree(Y, Left, Right), tree(Y, Left, Right1))
LESS_IN_GA(s(X), s(Y)) → LESS_IN_GA(X, Y)
LESS_IN_GA(s(X)) → LESS_IN_GA(X)
From the DPs we obtained the following set of size-change graphs:
LESS_IN_GG(s(X), s(Y)) → LESS_IN_GG(X, Y)
delete_in_aag(X, tree(X, void, Right), Right) → delete_out_aag(X, tree(X, void, Right), Right)
delete_in_aag(X, tree(X, Left, void), Left) → delete_out_aag(X, tree(X, Left, void), Left)
delete_in_aag(X, tree(X, Left, Right), tree(Y, Left, Right1)) → U1_aag(X, Left, Right, Y, Right1, delmin_in_agg(Right, Y, Right1))
delmin_in_agg(tree(Y, void, Right), Y, Right) → delmin_out_agg(tree(Y, void, Right), Y, Right)
delmin_in_agg(tree(X, Left, X1), Y, tree(X, Left1, X2)) → U6_agg(X, Left, X1, Y, Left1, X2, delmin_in_agg(Left, Y, Left1))
U6_agg(X, Left, X1, Y, Left1, X2, delmin_out_agg(Left, Y, Left1)) → delmin_out_agg(tree(X, Left, X1), Y, tree(X, Left1, X2))
U1_aag(X, Left, Right, Y, Right1, delmin_out_agg(Right, Y, Right1)) → delete_out_aag(X, tree(X, Left, Right), tree(Y, Left, Right1))
delete_in_aag(X, tree(Y, Left, Right), tree(Y, Left1, Right)) → U2_aag(X, Y, Left, Right, Left1, less_in_ag(X, Y))
less_in_ag(0, s(X3)) → less_out_ag(0, s(X3))
less_in_ag(s(X), s(Y)) → U7_ag(X, Y, less_in_ag(X, Y))
U7_ag(X, Y, less_out_ag(X, Y)) → less_out_ag(s(X), s(Y))
U2_aag(X, Y, Left, Right, Left1, less_out_ag(X, Y)) → U3_aag(X, Y, Left, Right, Left1, delete_in_gag(X, Left, Left1))
delete_in_gag(X, tree(X, void, Right), Right) → delete_out_gag(X, tree(X, void, Right), Right)
delete_in_gag(X, tree(X, Left, void), Left) → delete_out_gag(X, tree(X, Left, void), Left)
delete_in_gag(X, tree(X, Left, Right), tree(Y, Left, Right1)) → U1_gag(X, Left, Right, Y, Right1, delmin_in_agg(Right, Y, Right1))
U1_gag(X, Left, Right, Y, Right1, delmin_out_agg(Right, Y, Right1)) → delete_out_gag(X, tree(X, Left, Right), tree(Y, Left, Right1))
delete_in_gag(X, tree(Y, Left, Right), tree(Y, Left1, Right)) → U2_gag(X, Y, Left, Right, Left1, less_in_gg(X, Y))
less_in_gg(0, s(X3)) → less_out_gg(0, s(X3))
less_in_gg(s(X), s(Y)) → U7_gg(X, Y, less_in_gg(X, Y))
U7_gg(X, Y, less_out_gg(X, Y)) → less_out_gg(s(X), s(Y))
U2_gag(X, Y, Left, Right, Left1, less_out_gg(X, Y)) → U3_gag(X, Y, Left, Right, Left1, delete_in_gag(X, Left, Left1))
delete_in_gag(X, tree(Y, Left, Right), tree(Y, Left, Right1)) → U4_gag(X, Y, Left, Right, Right1, less_in_gg(Y, X))
U4_gag(X, Y, Left, Right, Right1, less_out_gg(Y, X)) → U5_gag(X, Y, Left, Right, Right1, delete_in_gag(X, Right, Right1))
U5_gag(X, Y, Left, Right, Right1, delete_out_gag(X, Right, Right1)) → delete_out_gag(X, tree(Y, Left, Right), tree(Y, Left, Right1))
U3_gag(X, Y, Left, Right, Left1, delete_out_gag(X, Left, Left1)) → delete_out_gag(X, tree(Y, Left, Right), tree(Y, Left1, Right))
U3_aag(X, Y, Left, Right, Left1, delete_out_gag(X, Left, Left1)) → delete_out_aag(X, tree(Y, Left, Right), tree(Y, Left1, Right))
delete_in_aag(X, tree(Y, Left, Right), tree(Y, Left, Right1)) → U4_aag(X, Y, Left, Right, Right1, less_in_ga(Y, X))
less_in_ga(0, s(X3)) → less_out_ga(0, s(X3))
less_in_ga(s(X), s(Y)) → U7_ga(X, Y, less_in_ga(X, Y))
U7_ga(X, Y, less_out_ga(X, Y)) → less_out_ga(s(X), s(Y))
U4_aag(X, Y, Left, Right, Right1, less_out_ga(Y, X)) → U5_aag(X, Y, Left, Right, Right1, delete_in_aag(X, Right, Right1))
U5_aag(X, Y, Left, Right, Right1, delete_out_aag(X, Right, Right1)) → delete_out_aag(X, tree(Y, Left, Right), tree(Y, Left, Right1))
LESS_IN_GG(s(X), s(Y)) → LESS_IN_GG(X, Y)
LESS_IN_GG(s(X), s(Y)) → LESS_IN_GG(X, Y)
From the DPs we obtained the following set of size-change graphs:
LESS_IN_AG(s(X), s(Y)) → LESS_IN_AG(X, Y)
delete_in_aag(X, tree(X, void, Right), Right) → delete_out_aag(X, tree(X, void, Right), Right)
delete_in_aag(X, tree(X, Left, void), Left) → delete_out_aag(X, tree(X, Left, void), Left)
delete_in_aag(X, tree(X, Left, Right), tree(Y, Left, Right1)) → U1_aag(X, Left, Right, Y, Right1, delmin_in_agg(Right, Y, Right1))
delmin_in_agg(tree(Y, void, Right), Y, Right) → delmin_out_agg(tree(Y, void, Right), Y, Right)
delmin_in_agg(tree(X, Left, X1), Y, tree(X, Left1, X2)) → U6_agg(X, Left, X1, Y, Left1, X2, delmin_in_agg(Left, Y, Left1))
U6_agg(X, Left, X1, Y, Left1, X2, delmin_out_agg(Left, Y, Left1)) → delmin_out_agg(tree(X, Left, X1), Y, tree(X, Left1, X2))
U1_aag(X, Left, Right, Y, Right1, delmin_out_agg(Right, Y, Right1)) → delete_out_aag(X, tree(X, Left, Right), tree(Y, Left, Right1))
delete_in_aag(X, tree(Y, Left, Right), tree(Y, Left1, Right)) → U2_aag(X, Y, Left, Right, Left1, less_in_ag(X, Y))
less_in_ag(0, s(X3)) → less_out_ag(0, s(X3))
less_in_ag(s(X), s(Y)) → U7_ag(X, Y, less_in_ag(X, Y))
U7_ag(X, Y, less_out_ag(X, Y)) → less_out_ag(s(X), s(Y))
U2_aag(X, Y, Left, Right, Left1, less_out_ag(X, Y)) → U3_aag(X, Y, Left, Right, Left1, delete_in_gag(X, Left, Left1))
delete_in_gag(X, tree(X, void, Right), Right) → delete_out_gag(X, tree(X, void, Right), Right)
delete_in_gag(X, tree(X, Left, void), Left) → delete_out_gag(X, tree(X, Left, void), Left)
delete_in_gag(X, tree(X, Left, Right), tree(Y, Left, Right1)) → U1_gag(X, Left, Right, Y, Right1, delmin_in_agg(Right, Y, Right1))
U1_gag(X, Left, Right, Y, Right1, delmin_out_agg(Right, Y, Right1)) → delete_out_gag(X, tree(X, Left, Right), tree(Y, Left, Right1))
delete_in_gag(X, tree(Y, Left, Right), tree(Y, Left1, Right)) → U2_gag(X, Y, Left, Right, Left1, less_in_gg(X, Y))
less_in_gg(0, s(X3)) → less_out_gg(0, s(X3))
less_in_gg(s(X), s(Y)) → U7_gg(X, Y, less_in_gg(X, Y))
U7_gg(X, Y, less_out_gg(X, Y)) → less_out_gg(s(X), s(Y))
U2_gag(X, Y, Left, Right, Left1, less_out_gg(X, Y)) → U3_gag(X, Y, Left, Right, Left1, delete_in_gag(X, Left, Left1))
delete_in_gag(X, tree(Y, Left, Right), tree(Y, Left, Right1)) → U4_gag(X, Y, Left, Right, Right1, less_in_gg(Y, X))
U4_gag(X, Y, Left, Right, Right1, less_out_gg(Y, X)) → U5_gag(X, Y, Left, Right, Right1, delete_in_gag(X, Right, Right1))
U5_gag(X, Y, Left, Right, Right1, delete_out_gag(X, Right, Right1)) → delete_out_gag(X, tree(Y, Left, Right), tree(Y, Left, Right1))
U3_gag(X, Y, Left, Right, Left1, delete_out_gag(X, Left, Left1)) → delete_out_gag(X, tree(Y, Left, Right), tree(Y, Left1, Right))
U3_aag(X, Y, Left, Right, Left1, delete_out_gag(X, Left, Left1)) → delete_out_aag(X, tree(Y, Left, Right), tree(Y, Left1, Right))
delete_in_aag(X, tree(Y, Left, Right), tree(Y, Left, Right1)) → U4_aag(X, Y, Left, Right, Right1, less_in_ga(Y, X))
less_in_ga(0, s(X3)) → less_out_ga(0, s(X3))
less_in_ga(s(X), s(Y)) → U7_ga(X, Y, less_in_ga(X, Y))
U7_ga(X, Y, less_out_ga(X, Y)) → less_out_ga(s(X), s(Y))
U4_aag(X, Y, Left, Right, Right1, less_out_ga(Y, X)) → U5_aag(X, Y, Left, Right, Right1, delete_in_aag(X, Right, Right1))
U5_aag(X, Y, Left, Right, Right1, delete_out_aag(X, Right, Right1)) → delete_out_aag(X, tree(Y, Left, Right), tree(Y, Left, Right1))
LESS_IN_AG(s(X), s(Y)) → LESS_IN_AG(X, Y)
LESS_IN_AG(s(Y)) → LESS_IN_AG(Y)
From the DPs we obtained the following set of size-change graphs:
DELMIN_IN_AGG(tree(X, Left, X1), Y, tree(X, Left1, X2)) → DELMIN_IN_AGG(Left, Y, Left1)
delete_in_aag(X, tree(X, void, Right), Right) → delete_out_aag(X, tree(X, void, Right), Right)
delete_in_aag(X, tree(X, Left, void), Left) → delete_out_aag(X, tree(X, Left, void), Left)
delete_in_aag(X, tree(X, Left, Right), tree(Y, Left, Right1)) → U1_aag(X, Left, Right, Y, Right1, delmin_in_agg(Right, Y, Right1))
delmin_in_agg(tree(Y, void, Right), Y, Right) → delmin_out_agg(tree(Y, void, Right), Y, Right)
delmin_in_agg(tree(X, Left, X1), Y, tree(X, Left1, X2)) → U6_agg(X, Left, X1, Y, Left1, X2, delmin_in_agg(Left, Y, Left1))
U6_agg(X, Left, X1, Y, Left1, X2, delmin_out_agg(Left, Y, Left1)) → delmin_out_agg(tree(X, Left, X1), Y, tree(X, Left1, X2))
U1_aag(X, Left, Right, Y, Right1, delmin_out_agg(Right, Y, Right1)) → delete_out_aag(X, tree(X, Left, Right), tree(Y, Left, Right1))
delete_in_aag(X, tree(Y, Left, Right), tree(Y, Left1, Right)) → U2_aag(X, Y, Left, Right, Left1, less_in_ag(X, Y))
less_in_ag(0, s(X3)) → less_out_ag(0, s(X3))
less_in_ag(s(X), s(Y)) → U7_ag(X, Y, less_in_ag(X, Y))
U7_ag(X, Y, less_out_ag(X, Y)) → less_out_ag(s(X), s(Y))
U2_aag(X, Y, Left, Right, Left1, less_out_ag(X, Y)) → U3_aag(X, Y, Left, Right, Left1, delete_in_gag(X, Left, Left1))
delete_in_gag(X, tree(X, void, Right), Right) → delete_out_gag(X, tree(X, void, Right), Right)
delete_in_gag(X, tree(X, Left, void), Left) → delete_out_gag(X, tree(X, Left, void), Left)
delete_in_gag(X, tree(X, Left, Right), tree(Y, Left, Right1)) → U1_gag(X, Left, Right, Y, Right1, delmin_in_agg(Right, Y, Right1))
U1_gag(X, Left, Right, Y, Right1, delmin_out_agg(Right, Y, Right1)) → delete_out_gag(X, tree(X, Left, Right), tree(Y, Left, Right1))
delete_in_gag(X, tree(Y, Left, Right), tree(Y, Left1, Right)) → U2_gag(X, Y, Left, Right, Left1, less_in_gg(X, Y))
less_in_gg(0, s(X3)) → less_out_gg(0, s(X3))
less_in_gg(s(X), s(Y)) → U7_gg(X, Y, less_in_gg(X, Y))
U7_gg(X, Y, less_out_gg(X, Y)) → less_out_gg(s(X), s(Y))
U2_gag(X, Y, Left, Right, Left1, less_out_gg(X, Y)) → U3_gag(X, Y, Left, Right, Left1, delete_in_gag(X, Left, Left1))
delete_in_gag(X, tree(Y, Left, Right), tree(Y, Left, Right1)) → U4_gag(X, Y, Left, Right, Right1, less_in_gg(Y, X))
U4_gag(X, Y, Left, Right, Right1, less_out_gg(Y, X)) → U5_gag(X, Y, Left, Right, Right1, delete_in_gag(X, Right, Right1))
U5_gag(X, Y, Left, Right, Right1, delete_out_gag(X, Right, Right1)) → delete_out_gag(X, tree(Y, Left, Right), tree(Y, Left, Right1))
U3_gag(X, Y, Left, Right, Left1, delete_out_gag(X, Left, Left1)) → delete_out_gag(X, tree(Y, Left, Right), tree(Y, Left1, Right))
U3_aag(X, Y, Left, Right, Left1, delete_out_gag(X, Left, Left1)) → delete_out_aag(X, tree(Y, Left, Right), tree(Y, Left1, Right))
delete_in_aag(X, tree(Y, Left, Right), tree(Y, Left, Right1)) → U4_aag(X, Y, Left, Right, Right1, less_in_ga(Y, X))
less_in_ga(0, s(X3)) → less_out_ga(0, s(X3))
less_in_ga(s(X), s(Y)) → U7_ga(X, Y, less_in_ga(X, Y))
U7_ga(X, Y, less_out_ga(X, Y)) → less_out_ga(s(X), s(Y))
U4_aag(X, Y, Left, Right, Right1, less_out_ga(Y, X)) → U5_aag(X, Y, Left, Right, Right1, delete_in_aag(X, Right, Right1))
U5_aag(X, Y, Left, Right, Right1, delete_out_aag(X, Right, Right1)) → delete_out_aag(X, tree(Y, Left, Right), tree(Y, Left, Right1))
DELMIN_IN_AGG(tree(X, Left, X1), Y, tree(X, Left1, X2)) → DELMIN_IN_AGG(Left, Y, Left1)
DELMIN_IN_AGG(Y, tree(X, Left1, X2)) → DELMIN_IN_AGG(Y, Left1)
From the DPs we obtained the following set of size-change graphs:
DELETE_IN_GAG(X, tree(Y, Left, Right), tree(Y, Left1, Right)) → U2_GAG(X, Y, Left, Right, Left1, less_in_gg(X, Y))
U2_GAG(X, Y, Left, Right, Left1, less_out_gg(X, Y)) → DELETE_IN_GAG(X, Left, Left1)
DELETE_IN_GAG(X, tree(Y, Left, Right), tree(Y, Left, Right1)) → U4_GAG(X, Y, Left, Right, Right1, less_in_gg(Y, X))
U4_GAG(X, Y, Left, Right, Right1, less_out_gg(Y, X)) → DELETE_IN_GAG(X, Right, Right1)
delete_in_aag(X, tree(X, void, Right), Right) → delete_out_aag(X, tree(X, void, Right), Right)
delete_in_aag(X, tree(X, Left, void), Left) → delete_out_aag(X, tree(X, Left, void), Left)
delete_in_aag(X, tree(X, Left, Right), tree(Y, Left, Right1)) → U1_aag(X, Left, Right, Y, Right1, delmin_in_agg(Right, Y, Right1))
delmin_in_agg(tree(Y, void, Right), Y, Right) → delmin_out_agg(tree(Y, void, Right), Y, Right)
delmin_in_agg(tree(X, Left, X1), Y, tree(X, Left1, X2)) → U6_agg(X, Left, X1, Y, Left1, X2, delmin_in_agg(Left, Y, Left1))
U6_agg(X, Left, X1, Y, Left1, X2, delmin_out_agg(Left, Y, Left1)) → delmin_out_agg(tree(X, Left, X1), Y, tree(X, Left1, X2))
U1_aag(X, Left, Right, Y, Right1, delmin_out_agg(Right, Y, Right1)) → delete_out_aag(X, tree(X, Left, Right), tree(Y, Left, Right1))
delete_in_aag(X, tree(Y, Left, Right), tree(Y, Left1, Right)) → U2_aag(X, Y, Left, Right, Left1, less_in_ag(X, Y))
less_in_ag(0, s(X3)) → less_out_ag(0, s(X3))
less_in_ag(s(X), s(Y)) → U7_ag(X, Y, less_in_ag(X, Y))
U7_ag(X, Y, less_out_ag(X, Y)) → less_out_ag(s(X), s(Y))
U2_aag(X, Y, Left, Right, Left1, less_out_ag(X, Y)) → U3_aag(X, Y, Left, Right, Left1, delete_in_gag(X, Left, Left1))
delete_in_gag(X, tree(X, void, Right), Right) → delete_out_gag(X, tree(X, void, Right), Right)
delete_in_gag(X, tree(X, Left, void), Left) → delete_out_gag(X, tree(X, Left, void), Left)
delete_in_gag(X, tree(X, Left, Right), tree(Y, Left, Right1)) → U1_gag(X, Left, Right, Y, Right1, delmin_in_agg(Right, Y, Right1))
U1_gag(X, Left, Right, Y, Right1, delmin_out_agg(Right, Y, Right1)) → delete_out_gag(X, tree(X, Left, Right), tree(Y, Left, Right1))
delete_in_gag(X, tree(Y, Left, Right), tree(Y, Left1, Right)) → U2_gag(X, Y, Left, Right, Left1, less_in_gg(X, Y))
less_in_gg(0, s(X3)) → less_out_gg(0, s(X3))
less_in_gg(s(X), s(Y)) → U7_gg(X, Y, less_in_gg(X, Y))
U7_gg(X, Y, less_out_gg(X, Y)) → less_out_gg(s(X), s(Y))
U2_gag(X, Y, Left, Right, Left1, less_out_gg(X, Y)) → U3_gag(X, Y, Left, Right, Left1, delete_in_gag(X, Left, Left1))
delete_in_gag(X, tree(Y, Left, Right), tree(Y, Left, Right1)) → U4_gag(X, Y, Left, Right, Right1, less_in_gg(Y, X))
U4_gag(X, Y, Left, Right, Right1, less_out_gg(Y, X)) → U5_gag(X, Y, Left, Right, Right1, delete_in_gag(X, Right, Right1))
U5_gag(X, Y, Left, Right, Right1, delete_out_gag(X, Right, Right1)) → delete_out_gag(X, tree(Y, Left, Right), tree(Y, Left, Right1))
U3_gag(X, Y, Left, Right, Left1, delete_out_gag(X, Left, Left1)) → delete_out_gag(X, tree(Y, Left, Right), tree(Y, Left1, Right))
U3_aag(X, Y, Left, Right, Left1, delete_out_gag(X, Left, Left1)) → delete_out_aag(X, tree(Y, Left, Right), tree(Y, Left1, Right))
delete_in_aag(X, tree(Y, Left, Right), tree(Y, Left, Right1)) → U4_aag(X, Y, Left, Right, Right1, less_in_ga(Y, X))
less_in_ga(0, s(X3)) → less_out_ga(0, s(X3))
less_in_ga(s(X), s(Y)) → U7_ga(X, Y, less_in_ga(X, Y))
U7_ga(X, Y, less_out_ga(X, Y)) → less_out_ga(s(X), s(Y))
U4_aag(X, Y, Left, Right, Right1, less_out_ga(Y, X)) → U5_aag(X, Y, Left, Right, Right1, delete_in_aag(X, Right, Right1))
U5_aag(X, Y, Left, Right, Right1, delete_out_aag(X, Right, Right1)) → delete_out_aag(X, tree(Y, Left, Right), tree(Y, Left, Right1))
DELETE_IN_GAG(X, tree(Y, Left, Right), tree(Y, Left1, Right)) → U2_GAG(X, Y, Left, Right, Left1, less_in_gg(X, Y))
U2_GAG(X, Y, Left, Right, Left1, less_out_gg(X, Y)) → DELETE_IN_GAG(X, Left, Left1)
DELETE_IN_GAG(X, tree(Y, Left, Right), tree(Y, Left, Right1)) → U4_GAG(X, Y, Left, Right, Right1, less_in_gg(Y, X))
U4_GAG(X, Y, Left, Right, Right1, less_out_gg(Y, X)) → DELETE_IN_GAG(X, Right, Right1)
less_in_gg(0, s(X3)) → less_out_gg(0, s(X3))
less_in_gg(s(X), s(Y)) → U7_gg(X, Y, less_in_gg(X, Y))
U7_gg(X, Y, less_out_gg(X, Y)) → less_out_gg(s(X), s(Y))
DELETE_IN_GAG(X, tree(Y, Left1, Right)) → U2_GAG(X, Left1, less_in_gg(X, Y))
U2_GAG(X, Left1, less_out_gg) → DELETE_IN_GAG(X, Left1)
DELETE_IN_GAG(X, tree(Y, Left, Right1)) → U4_GAG(X, Right1, less_in_gg(Y, X))
U4_GAG(X, Right1, less_out_gg) → DELETE_IN_GAG(X, Right1)
less_in_gg(0, s(X3)) → less_out_gg
less_in_gg(s(X), s(Y)) → U7_gg(less_in_gg(X, Y))
U7_gg(less_out_gg) → less_out_gg
less_in_gg(x0, x1)
U7_gg(x0)
From the DPs we obtained the following set of size-change graphs:
DELETE_IN_AAG(X, tree(Y, Left, Right), tree(Y, Left, Right1)) → U4_AAG(X, Y, Left, Right, Right1, less_in_ga(Y, X))
U4_AAG(X, Y, Left, Right, Right1, less_out_ga(Y, X)) → DELETE_IN_AAG(X, Right, Right1)
delete_in_aag(X, tree(X, void, Right), Right) → delete_out_aag(X, tree(X, void, Right), Right)
delete_in_aag(X, tree(X, Left, void), Left) → delete_out_aag(X, tree(X, Left, void), Left)
delete_in_aag(X, tree(X, Left, Right), tree(Y, Left, Right1)) → U1_aag(X, Left, Right, Y, Right1, delmin_in_agg(Right, Y, Right1))
delmin_in_agg(tree(Y, void, Right), Y, Right) → delmin_out_agg(tree(Y, void, Right), Y, Right)
delmin_in_agg(tree(X, Left, X1), Y, tree(X, Left1, X2)) → U6_agg(X, Left, X1, Y, Left1, X2, delmin_in_agg(Left, Y, Left1))
U6_agg(X, Left, X1, Y, Left1, X2, delmin_out_agg(Left, Y, Left1)) → delmin_out_agg(tree(X, Left, X1), Y, tree(X, Left1, X2))
U1_aag(X, Left, Right, Y, Right1, delmin_out_agg(Right, Y, Right1)) → delete_out_aag(X, tree(X, Left, Right), tree(Y, Left, Right1))
delete_in_aag(X, tree(Y, Left, Right), tree(Y, Left1, Right)) → U2_aag(X, Y, Left, Right, Left1, less_in_ag(X, Y))
less_in_ag(0, s(X3)) → less_out_ag(0, s(X3))
less_in_ag(s(X), s(Y)) → U7_ag(X, Y, less_in_ag(X, Y))
U7_ag(X, Y, less_out_ag(X, Y)) → less_out_ag(s(X), s(Y))
U2_aag(X, Y, Left, Right, Left1, less_out_ag(X, Y)) → U3_aag(X, Y, Left, Right, Left1, delete_in_gag(X, Left, Left1))
delete_in_gag(X, tree(X, void, Right), Right) → delete_out_gag(X, tree(X, void, Right), Right)
delete_in_gag(X, tree(X, Left, void), Left) → delete_out_gag(X, tree(X, Left, void), Left)
delete_in_gag(X, tree(X, Left, Right), tree(Y, Left, Right1)) → U1_gag(X, Left, Right, Y, Right1, delmin_in_agg(Right, Y, Right1))
U1_gag(X, Left, Right, Y, Right1, delmin_out_agg(Right, Y, Right1)) → delete_out_gag(X, tree(X, Left, Right), tree(Y, Left, Right1))
delete_in_gag(X, tree(Y, Left, Right), tree(Y, Left1, Right)) → U2_gag(X, Y, Left, Right, Left1, less_in_gg(X, Y))
less_in_gg(0, s(X3)) → less_out_gg(0, s(X3))
less_in_gg(s(X), s(Y)) → U7_gg(X, Y, less_in_gg(X, Y))
U7_gg(X, Y, less_out_gg(X, Y)) → less_out_gg(s(X), s(Y))
U2_gag(X, Y, Left, Right, Left1, less_out_gg(X, Y)) → U3_gag(X, Y, Left, Right, Left1, delete_in_gag(X, Left, Left1))
delete_in_gag(X, tree(Y, Left, Right), tree(Y, Left, Right1)) → U4_gag(X, Y, Left, Right, Right1, less_in_gg(Y, X))
U4_gag(X, Y, Left, Right, Right1, less_out_gg(Y, X)) → U5_gag(X, Y, Left, Right, Right1, delete_in_gag(X, Right, Right1))
U5_gag(X, Y, Left, Right, Right1, delete_out_gag(X, Right, Right1)) → delete_out_gag(X, tree(Y, Left, Right), tree(Y, Left, Right1))
U3_gag(X, Y, Left, Right, Left1, delete_out_gag(X, Left, Left1)) → delete_out_gag(X, tree(Y, Left, Right), tree(Y, Left1, Right))
U3_aag(X, Y, Left, Right, Left1, delete_out_gag(X, Left, Left1)) → delete_out_aag(X, tree(Y, Left, Right), tree(Y, Left1, Right))
delete_in_aag(X, tree(Y, Left, Right), tree(Y, Left, Right1)) → U4_aag(X, Y, Left, Right, Right1, less_in_ga(Y, X))
less_in_ga(0, s(X3)) → less_out_ga(0, s(X3))
less_in_ga(s(X), s(Y)) → U7_ga(X, Y, less_in_ga(X, Y))
U7_ga(X, Y, less_out_ga(X, Y)) → less_out_ga(s(X), s(Y))
U4_aag(X, Y, Left, Right, Right1, less_out_ga(Y, X)) → U5_aag(X, Y, Left, Right, Right1, delete_in_aag(X, Right, Right1))
U5_aag(X, Y, Left, Right, Right1, delete_out_aag(X, Right, Right1)) → delete_out_aag(X, tree(Y, Left, Right), tree(Y, Left, Right1))
DELETE_IN_AAG(X, tree(Y, Left, Right), tree(Y, Left, Right1)) → U4_AAG(X, Y, Left, Right, Right1, less_in_ga(Y, X))
U4_AAG(X, Y, Left, Right, Right1, less_out_ga(Y, X)) → DELETE_IN_AAG(X, Right, Right1)
less_in_ga(0, s(X3)) → less_out_ga(0, s(X3))
less_in_ga(s(X), s(Y)) → U7_ga(X, Y, less_in_ga(X, Y))
U7_ga(X, Y, less_out_ga(X, Y)) → less_out_ga(s(X), s(Y))
DELETE_IN_AAG(tree(Y, Left, Right1)) → U4_AAG(Right1, less_in_ga(Y))
U4_AAG(Right1, less_out_ga) → DELETE_IN_AAG(Right1)
less_in_ga(0) → less_out_ga
less_in_ga(s(X)) → U7_ga(less_in_ga(X))
U7_ga(less_out_ga) → less_out_ga
less_in_ga(x0)
U7_ga(x0)
From the DPs we obtained the following set of size-change graphs:
delete_in_aag(X, tree(X, void, Right), Right) → delete_out_aag(X, tree(X, void, Right), Right)
delete_in_aag(X, tree(X, Left, void), Left) → delete_out_aag(X, tree(X, Left, void), Left)
delete_in_aag(X, tree(X, Left, Right), tree(Y, Left, Right1)) → U1_aag(X, Left, Right, Y, Right1, delmin_in_agg(Right, Y, Right1))
delmin_in_agg(tree(Y, void, Right), Y, Right) → delmin_out_agg(tree(Y, void, Right), Y, Right)
delmin_in_agg(tree(X, Left, X1), Y, tree(X, Left1, X2)) → U6_agg(X, Left, X1, Y, Left1, X2, delmin_in_agg(Left, Y, Left1))
U6_agg(X, Left, X1, Y, Left1, X2, delmin_out_agg(Left, Y, Left1)) → delmin_out_agg(tree(X, Left, X1), Y, tree(X, Left1, X2))
U1_aag(X, Left, Right, Y, Right1, delmin_out_agg(Right, Y, Right1)) → delete_out_aag(X, tree(X, Left, Right), tree(Y, Left, Right1))
delete_in_aag(X, tree(Y, Left, Right), tree(Y, Left1, Right)) → U2_aag(X, Y, Left, Right, Left1, less_in_ag(X, Y))
less_in_ag(0, s(X3)) → less_out_ag(0, s(X3))
less_in_ag(s(X), s(Y)) → U7_ag(X, Y, less_in_ag(X, Y))
U7_ag(X, Y, less_out_ag(X, Y)) → less_out_ag(s(X), s(Y))
U2_aag(X, Y, Left, Right, Left1, less_out_ag(X, Y)) → U3_aag(X, Y, Left, Right, Left1, delete_in_gag(X, Left, Left1))
delete_in_gag(X, tree(X, void, Right), Right) → delete_out_gag(X, tree(X, void, Right), Right)
delete_in_gag(X, tree(X, Left, void), Left) → delete_out_gag(X, tree(X, Left, void), Left)
delete_in_gag(X, tree(X, Left, Right), tree(Y, Left, Right1)) → U1_gag(X, Left, Right, Y, Right1, delmin_in_agg(Right, Y, Right1))
U1_gag(X, Left, Right, Y, Right1, delmin_out_agg(Right, Y, Right1)) → delete_out_gag(X, tree(X, Left, Right), tree(Y, Left, Right1))
delete_in_gag(X, tree(Y, Left, Right), tree(Y, Left1, Right)) → U2_gag(X, Y, Left, Right, Left1, less_in_gg(X, Y))
less_in_gg(0, s(X3)) → less_out_gg(0, s(X3))
less_in_gg(s(X), s(Y)) → U7_gg(X, Y, less_in_gg(X, Y))
U7_gg(X, Y, less_out_gg(X, Y)) → less_out_gg(s(X), s(Y))
U2_gag(X, Y, Left, Right, Left1, less_out_gg(X, Y)) → U3_gag(X, Y, Left, Right, Left1, delete_in_gag(X, Left, Left1))
delete_in_gag(X, tree(Y, Left, Right), tree(Y, Left, Right1)) → U4_gag(X, Y, Left, Right, Right1, less_in_gg(Y, X))
U4_gag(X, Y, Left, Right, Right1, less_out_gg(Y, X)) → U5_gag(X, Y, Left, Right, Right1, delete_in_gag(X, Right, Right1))
U5_gag(X, Y, Left, Right, Right1, delete_out_gag(X, Right, Right1)) → delete_out_gag(X, tree(Y, Left, Right), tree(Y, Left, Right1))
U3_gag(X, Y, Left, Right, Left1, delete_out_gag(X, Left, Left1)) → delete_out_gag(X, tree(Y, Left, Right), tree(Y, Left1, Right))
U3_aag(X, Y, Left, Right, Left1, delete_out_gag(X, Left, Left1)) → delete_out_aag(X, tree(Y, Left, Right), tree(Y, Left1, Right))
delete_in_aag(X, tree(Y, Left, Right), tree(Y, Left, Right1)) → U4_aag(X, Y, Left, Right, Right1, less_in_ga(Y, X))
less_in_ga(0, s(X3)) → less_out_ga(0, s(X3))
less_in_ga(s(X), s(Y)) → U7_ga(X, Y, less_in_ga(X, Y))
U7_ga(X, Y, less_out_ga(X, Y)) → less_out_ga(s(X), s(Y))
U4_aag(X, Y, Left, Right, Right1, less_out_ga(Y, X)) → U5_aag(X, Y, Left, Right, Right1, delete_in_aag(X, Right, Right1))
U5_aag(X, Y, Left, Right, Right1, delete_out_aag(X, Right, Right1)) → delete_out_aag(X, tree(Y, Left, Right), tree(Y, Left, Right1))
Infinitary Constructor Rewriting Termination of PiTRS implies Termination of Prolog
delete_in_aag(X, tree(X, void, Right), Right) → delete_out_aag(X, tree(X, void, Right), Right)
delete_in_aag(X, tree(X, Left, void), Left) → delete_out_aag(X, tree(X, Left, void), Left)
delete_in_aag(X, tree(X, Left, Right), tree(Y, Left, Right1)) → U1_aag(X, Left, Right, Y, Right1, delmin_in_agg(Right, Y, Right1))
delmin_in_agg(tree(Y, void, Right), Y, Right) → delmin_out_agg(tree(Y, void, Right), Y, Right)
delmin_in_agg(tree(X, Left, X1), Y, tree(X, Left1, X2)) → U6_agg(X, Left, X1, Y, Left1, X2, delmin_in_agg(Left, Y, Left1))
U6_agg(X, Left, X1, Y, Left1, X2, delmin_out_agg(Left, Y, Left1)) → delmin_out_agg(tree(X, Left, X1), Y, tree(X, Left1, X2))
U1_aag(X, Left, Right, Y, Right1, delmin_out_agg(Right, Y, Right1)) → delete_out_aag(X, tree(X, Left, Right), tree(Y, Left, Right1))
delete_in_aag(X, tree(Y, Left, Right), tree(Y, Left1, Right)) → U2_aag(X, Y, Left, Right, Left1, less_in_ag(X, Y))
less_in_ag(0, s(X3)) → less_out_ag(0, s(X3))
less_in_ag(s(X), s(Y)) → U7_ag(X, Y, less_in_ag(X, Y))
U7_ag(X, Y, less_out_ag(X, Y)) → less_out_ag(s(X), s(Y))
U2_aag(X, Y, Left, Right, Left1, less_out_ag(X, Y)) → U3_aag(X, Y, Left, Right, Left1, delete_in_gag(X, Left, Left1))
delete_in_gag(X, tree(X, void, Right), Right) → delete_out_gag(X, tree(X, void, Right), Right)
delete_in_gag(X, tree(X, Left, void), Left) → delete_out_gag(X, tree(X, Left, void), Left)
delete_in_gag(X, tree(X, Left, Right), tree(Y, Left, Right1)) → U1_gag(X, Left, Right, Y, Right1, delmin_in_agg(Right, Y, Right1))
U1_gag(X, Left, Right, Y, Right1, delmin_out_agg(Right, Y, Right1)) → delete_out_gag(X, tree(X, Left, Right), tree(Y, Left, Right1))
delete_in_gag(X, tree(Y, Left, Right), tree(Y, Left1, Right)) → U2_gag(X, Y, Left, Right, Left1, less_in_gg(X, Y))
less_in_gg(0, s(X3)) → less_out_gg(0, s(X3))
less_in_gg(s(X), s(Y)) → U7_gg(X, Y, less_in_gg(X, Y))
U7_gg(X, Y, less_out_gg(X, Y)) → less_out_gg(s(X), s(Y))
U2_gag(X, Y, Left, Right, Left1, less_out_gg(X, Y)) → U3_gag(X, Y, Left, Right, Left1, delete_in_gag(X, Left, Left1))
delete_in_gag(X, tree(Y, Left, Right), tree(Y, Left, Right1)) → U4_gag(X, Y, Left, Right, Right1, less_in_gg(Y, X))
U4_gag(X, Y, Left, Right, Right1, less_out_gg(Y, X)) → U5_gag(X, Y, Left, Right, Right1, delete_in_gag(X, Right, Right1))
U5_gag(X, Y, Left, Right, Right1, delete_out_gag(X, Right, Right1)) → delete_out_gag(X, tree(Y, Left, Right), tree(Y, Left, Right1))
U3_gag(X, Y, Left, Right, Left1, delete_out_gag(X, Left, Left1)) → delete_out_gag(X, tree(Y, Left, Right), tree(Y, Left1, Right))
U3_aag(X, Y, Left, Right, Left1, delete_out_gag(X, Left, Left1)) → delete_out_aag(X, tree(Y, Left, Right), tree(Y, Left1, Right))
delete_in_aag(X, tree(Y, Left, Right), tree(Y, Left, Right1)) → U4_aag(X, Y, Left, Right, Right1, less_in_ga(Y, X))
less_in_ga(0, s(X3)) → less_out_ga(0, s(X3))
less_in_ga(s(X), s(Y)) → U7_ga(X, Y, less_in_ga(X, Y))
U7_ga(X, Y, less_out_ga(X, Y)) → less_out_ga(s(X), s(Y))
U4_aag(X, Y, Left, Right, Right1, less_out_ga(Y, X)) → U5_aag(X, Y, Left, Right, Right1, delete_in_aag(X, Right, Right1))
U5_aag(X, Y, Left, Right, Right1, delete_out_aag(X, Right, Right1)) → delete_out_aag(X, tree(Y, Left, Right), tree(Y, Left, Right1))
DELETE_IN_AAG(X, tree(X, Left, Right), tree(Y, Left, Right1)) → U1_AAG(X, Left, Right, Y, Right1, delmin_in_agg(Right, Y, Right1))
DELETE_IN_AAG(X, tree(X, Left, Right), tree(Y, Left, Right1)) → DELMIN_IN_AGG(Right, Y, Right1)
DELMIN_IN_AGG(tree(X, Left, X1), Y, tree(X, Left1, X2)) → U6_AGG(X, Left, X1, Y, Left1, X2, delmin_in_agg(Left, Y, Left1))
DELMIN_IN_AGG(tree(X, Left, X1), Y, tree(X, Left1, X2)) → DELMIN_IN_AGG(Left, Y, Left1)
DELETE_IN_AAG(X, tree(Y, Left, Right), tree(Y, Left1, Right)) → U2_AAG(X, Y, Left, Right, Left1, less_in_ag(X, Y))
DELETE_IN_AAG(X, tree(Y, Left, Right), tree(Y, Left1, Right)) → LESS_IN_AG(X, Y)
LESS_IN_AG(s(X), s(Y)) → U7_AG(X, Y, less_in_ag(X, Y))
LESS_IN_AG(s(X), s(Y)) → LESS_IN_AG(X, Y)
U2_AAG(X, Y, Left, Right, Left1, less_out_ag(X, Y)) → U3_AAG(X, Y, Left, Right, Left1, delete_in_gag(X, Left, Left1))
U2_AAG(X, Y, Left, Right, Left1, less_out_ag(X, Y)) → DELETE_IN_GAG(X, Left, Left1)
DELETE_IN_GAG(X, tree(X, Left, Right), tree(Y, Left, Right1)) → U1_GAG(X, Left, Right, Y, Right1, delmin_in_agg(Right, Y, Right1))
DELETE_IN_GAG(X, tree(X, Left, Right), tree(Y, Left, Right1)) → DELMIN_IN_AGG(Right, Y, Right1)
DELETE_IN_GAG(X, tree(Y, Left, Right), tree(Y, Left1, Right)) → U2_GAG(X, Y, Left, Right, Left1, less_in_gg(X, Y))
DELETE_IN_GAG(X, tree(Y, Left, Right), tree(Y, Left1, Right)) → LESS_IN_GG(X, Y)
LESS_IN_GG(s(X), s(Y)) → U7_GG(X, Y, less_in_gg(X, Y))
LESS_IN_GG(s(X), s(Y)) → LESS_IN_GG(X, Y)
U2_GAG(X, Y, Left, Right, Left1, less_out_gg(X, Y)) → U3_GAG(X, Y, Left, Right, Left1, delete_in_gag(X, Left, Left1))
U2_GAG(X, Y, Left, Right, Left1, less_out_gg(X, Y)) → DELETE_IN_GAG(X, Left, Left1)
DELETE_IN_GAG(X, tree(Y, Left, Right), tree(Y, Left, Right1)) → U4_GAG(X, Y, Left, Right, Right1, less_in_gg(Y, X))
DELETE_IN_GAG(X, tree(Y, Left, Right), tree(Y, Left, Right1)) → LESS_IN_GG(Y, X)
U4_GAG(X, Y, Left, Right, Right1, less_out_gg(Y, X)) → U5_GAG(X, Y, Left, Right, Right1, delete_in_gag(X, Right, Right1))
U4_GAG(X, Y, Left, Right, Right1, less_out_gg(Y, X)) → DELETE_IN_GAG(X, Right, Right1)
DELETE_IN_AAG(X, tree(Y, Left, Right), tree(Y, Left, Right1)) → U4_AAG(X, Y, Left, Right, Right1, less_in_ga(Y, X))
DELETE_IN_AAG(X, tree(Y, Left, Right), tree(Y, Left, Right1)) → LESS_IN_GA(Y, X)
LESS_IN_GA(s(X), s(Y)) → U7_GA(X, Y, less_in_ga(X, Y))
LESS_IN_GA(s(X), s(Y)) → LESS_IN_GA(X, Y)
U4_AAG(X, Y, Left, Right, Right1, less_out_ga(Y, X)) → U5_AAG(X, Y, Left, Right, Right1, delete_in_aag(X, Right, Right1))
U4_AAG(X, Y, Left, Right, Right1, less_out_ga(Y, X)) → DELETE_IN_AAG(X, Right, Right1)
delete_in_aag(X, tree(X, void, Right), Right) → delete_out_aag(X, tree(X, void, Right), Right)
delete_in_aag(X, tree(X, Left, void), Left) → delete_out_aag(X, tree(X, Left, void), Left)
delete_in_aag(X, tree(X, Left, Right), tree(Y, Left, Right1)) → U1_aag(X, Left, Right, Y, Right1, delmin_in_agg(Right, Y, Right1))
delmin_in_agg(tree(Y, void, Right), Y, Right) → delmin_out_agg(tree(Y, void, Right), Y, Right)
delmin_in_agg(tree(X, Left, X1), Y, tree(X, Left1, X2)) → U6_agg(X, Left, X1, Y, Left1, X2, delmin_in_agg(Left, Y, Left1))
U6_agg(X, Left, X1, Y, Left1, X2, delmin_out_agg(Left, Y, Left1)) → delmin_out_agg(tree(X, Left, X1), Y, tree(X, Left1, X2))
U1_aag(X, Left, Right, Y, Right1, delmin_out_agg(Right, Y, Right1)) → delete_out_aag(X, tree(X, Left, Right), tree(Y, Left, Right1))
delete_in_aag(X, tree(Y, Left, Right), tree(Y, Left1, Right)) → U2_aag(X, Y, Left, Right, Left1, less_in_ag(X, Y))
less_in_ag(0, s(X3)) → less_out_ag(0, s(X3))
less_in_ag(s(X), s(Y)) → U7_ag(X, Y, less_in_ag(X, Y))
U7_ag(X, Y, less_out_ag(X, Y)) → less_out_ag(s(X), s(Y))
U2_aag(X, Y, Left, Right, Left1, less_out_ag(X, Y)) → U3_aag(X, Y, Left, Right, Left1, delete_in_gag(X, Left, Left1))
delete_in_gag(X, tree(X, void, Right), Right) → delete_out_gag(X, tree(X, void, Right), Right)
delete_in_gag(X, tree(X, Left, void), Left) → delete_out_gag(X, tree(X, Left, void), Left)
delete_in_gag(X, tree(X, Left, Right), tree(Y, Left, Right1)) → U1_gag(X, Left, Right, Y, Right1, delmin_in_agg(Right, Y, Right1))
U1_gag(X, Left, Right, Y, Right1, delmin_out_agg(Right, Y, Right1)) → delete_out_gag(X, tree(X, Left, Right), tree(Y, Left, Right1))
delete_in_gag(X, tree(Y, Left, Right), tree(Y, Left1, Right)) → U2_gag(X, Y, Left, Right, Left1, less_in_gg(X, Y))
less_in_gg(0, s(X3)) → less_out_gg(0, s(X3))
less_in_gg(s(X), s(Y)) → U7_gg(X, Y, less_in_gg(X, Y))
U7_gg(X, Y, less_out_gg(X, Y)) → less_out_gg(s(X), s(Y))
U2_gag(X, Y, Left, Right, Left1, less_out_gg(X, Y)) → U3_gag(X, Y, Left, Right, Left1, delete_in_gag(X, Left, Left1))
delete_in_gag(X, tree(Y, Left, Right), tree(Y, Left, Right1)) → U4_gag(X, Y, Left, Right, Right1, less_in_gg(Y, X))
U4_gag(X, Y, Left, Right, Right1, less_out_gg(Y, X)) → U5_gag(X, Y, Left, Right, Right1, delete_in_gag(X, Right, Right1))
U5_gag(X, Y, Left, Right, Right1, delete_out_gag(X, Right, Right1)) → delete_out_gag(X, tree(Y, Left, Right), tree(Y, Left, Right1))
U3_gag(X, Y, Left, Right, Left1, delete_out_gag(X, Left, Left1)) → delete_out_gag(X, tree(Y, Left, Right), tree(Y, Left1, Right))
U3_aag(X, Y, Left, Right, Left1, delete_out_gag(X, Left, Left1)) → delete_out_aag(X, tree(Y, Left, Right), tree(Y, Left1, Right))
delete_in_aag(X, tree(Y, Left, Right), tree(Y, Left, Right1)) → U4_aag(X, Y, Left, Right, Right1, less_in_ga(Y, X))
less_in_ga(0, s(X3)) → less_out_ga(0, s(X3))
less_in_ga(s(X), s(Y)) → U7_ga(X, Y, less_in_ga(X, Y))
U7_ga(X, Y, less_out_ga(X, Y)) → less_out_ga(s(X), s(Y))
U4_aag(X, Y, Left, Right, Right1, less_out_ga(Y, X)) → U5_aag(X, Y, Left, Right, Right1, delete_in_aag(X, Right, Right1))
U5_aag(X, Y, Left, Right, Right1, delete_out_aag(X, Right, Right1)) → delete_out_aag(X, tree(Y, Left, Right), tree(Y, Left, Right1))
DELETE_IN_AAG(X, tree(X, Left, Right), tree(Y, Left, Right1)) → U1_AAG(X, Left, Right, Y, Right1, delmin_in_agg(Right, Y, Right1))
DELETE_IN_AAG(X, tree(X, Left, Right), tree(Y, Left, Right1)) → DELMIN_IN_AGG(Right, Y, Right1)
DELMIN_IN_AGG(tree(X, Left, X1), Y, tree(X, Left1, X2)) → U6_AGG(X, Left, X1, Y, Left1, X2, delmin_in_agg(Left, Y, Left1))
DELMIN_IN_AGG(tree(X, Left, X1), Y, tree(X, Left1, X2)) → DELMIN_IN_AGG(Left, Y, Left1)
DELETE_IN_AAG(X, tree(Y, Left, Right), tree(Y, Left1, Right)) → U2_AAG(X, Y, Left, Right, Left1, less_in_ag(X, Y))
DELETE_IN_AAG(X, tree(Y, Left, Right), tree(Y, Left1, Right)) → LESS_IN_AG(X, Y)
LESS_IN_AG(s(X), s(Y)) → U7_AG(X, Y, less_in_ag(X, Y))
LESS_IN_AG(s(X), s(Y)) → LESS_IN_AG(X, Y)
U2_AAG(X, Y, Left, Right, Left1, less_out_ag(X, Y)) → U3_AAG(X, Y, Left, Right, Left1, delete_in_gag(X, Left, Left1))
U2_AAG(X, Y, Left, Right, Left1, less_out_ag(X, Y)) → DELETE_IN_GAG(X, Left, Left1)
DELETE_IN_GAG(X, tree(X, Left, Right), tree(Y, Left, Right1)) → U1_GAG(X, Left, Right, Y, Right1, delmin_in_agg(Right, Y, Right1))
DELETE_IN_GAG(X, tree(X, Left, Right), tree(Y, Left, Right1)) → DELMIN_IN_AGG(Right, Y, Right1)
DELETE_IN_GAG(X, tree(Y, Left, Right), tree(Y, Left1, Right)) → U2_GAG(X, Y, Left, Right, Left1, less_in_gg(X, Y))
DELETE_IN_GAG(X, tree(Y, Left, Right), tree(Y, Left1, Right)) → LESS_IN_GG(X, Y)
LESS_IN_GG(s(X), s(Y)) → U7_GG(X, Y, less_in_gg(X, Y))
LESS_IN_GG(s(X), s(Y)) → LESS_IN_GG(X, Y)
U2_GAG(X, Y, Left, Right, Left1, less_out_gg(X, Y)) → U3_GAG(X, Y, Left, Right, Left1, delete_in_gag(X, Left, Left1))
U2_GAG(X, Y, Left, Right, Left1, less_out_gg(X, Y)) → DELETE_IN_GAG(X, Left, Left1)
DELETE_IN_GAG(X, tree(Y, Left, Right), tree(Y, Left, Right1)) → U4_GAG(X, Y, Left, Right, Right1, less_in_gg(Y, X))
DELETE_IN_GAG(X, tree(Y, Left, Right), tree(Y, Left, Right1)) → LESS_IN_GG(Y, X)
U4_GAG(X, Y, Left, Right, Right1, less_out_gg(Y, X)) → U5_GAG(X, Y, Left, Right, Right1, delete_in_gag(X, Right, Right1))
U4_GAG(X, Y, Left, Right, Right1, less_out_gg(Y, X)) → DELETE_IN_GAG(X, Right, Right1)
DELETE_IN_AAG(X, tree(Y, Left, Right), tree(Y, Left, Right1)) → U4_AAG(X, Y, Left, Right, Right1, less_in_ga(Y, X))
DELETE_IN_AAG(X, tree(Y, Left, Right), tree(Y, Left, Right1)) → LESS_IN_GA(Y, X)
LESS_IN_GA(s(X), s(Y)) → U7_GA(X, Y, less_in_ga(X, Y))
LESS_IN_GA(s(X), s(Y)) → LESS_IN_GA(X, Y)
U4_AAG(X, Y, Left, Right, Right1, less_out_ga(Y, X)) → U5_AAG(X, Y, Left, Right, Right1, delete_in_aag(X, Right, Right1))
U4_AAG(X, Y, Left, Right, Right1, less_out_ga(Y, X)) → DELETE_IN_AAG(X, Right, Right1)
delete_in_aag(X, tree(X, void, Right), Right) → delete_out_aag(X, tree(X, void, Right), Right)
delete_in_aag(X, tree(X, Left, void), Left) → delete_out_aag(X, tree(X, Left, void), Left)
delete_in_aag(X, tree(X, Left, Right), tree(Y, Left, Right1)) → U1_aag(X, Left, Right, Y, Right1, delmin_in_agg(Right, Y, Right1))
delmin_in_agg(tree(Y, void, Right), Y, Right) → delmin_out_agg(tree(Y, void, Right), Y, Right)
delmin_in_agg(tree(X, Left, X1), Y, tree(X, Left1, X2)) → U6_agg(X, Left, X1, Y, Left1, X2, delmin_in_agg(Left, Y, Left1))
U6_agg(X, Left, X1, Y, Left1, X2, delmin_out_agg(Left, Y, Left1)) → delmin_out_agg(tree(X, Left, X1), Y, tree(X, Left1, X2))
U1_aag(X, Left, Right, Y, Right1, delmin_out_agg(Right, Y, Right1)) → delete_out_aag(X, tree(X, Left, Right), tree(Y, Left, Right1))
delete_in_aag(X, tree(Y, Left, Right), tree(Y, Left1, Right)) → U2_aag(X, Y, Left, Right, Left1, less_in_ag(X, Y))
less_in_ag(0, s(X3)) → less_out_ag(0, s(X3))
less_in_ag(s(X), s(Y)) → U7_ag(X, Y, less_in_ag(X, Y))
U7_ag(X, Y, less_out_ag(X, Y)) → less_out_ag(s(X), s(Y))
U2_aag(X, Y, Left, Right, Left1, less_out_ag(X, Y)) → U3_aag(X, Y, Left, Right, Left1, delete_in_gag(X, Left, Left1))
delete_in_gag(X, tree(X, void, Right), Right) → delete_out_gag(X, tree(X, void, Right), Right)
delete_in_gag(X, tree(X, Left, void), Left) → delete_out_gag(X, tree(X, Left, void), Left)
delete_in_gag(X, tree(X, Left, Right), tree(Y, Left, Right1)) → U1_gag(X, Left, Right, Y, Right1, delmin_in_agg(Right, Y, Right1))
U1_gag(X, Left, Right, Y, Right1, delmin_out_agg(Right, Y, Right1)) → delete_out_gag(X, tree(X, Left, Right), tree(Y, Left, Right1))
delete_in_gag(X, tree(Y, Left, Right), tree(Y, Left1, Right)) → U2_gag(X, Y, Left, Right, Left1, less_in_gg(X, Y))
less_in_gg(0, s(X3)) → less_out_gg(0, s(X3))
less_in_gg(s(X), s(Y)) → U7_gg(X, Y, less_in_gg(X, Y))
U7_gg(X, Y, less_out_gg(X, Y)) → less_out_gg(s(X), s(Y))
U2_gag(X, Y, Left, Right, Left1, less_out_gg(X, Y)) → U3_gag(X, Y, Left, Right, Left1, delete_in_gag(X, Left, Left1))
delete_in_gag(X, tree(Y, Left, Right), tree(Y, Left, Right1)) → U4_gag(X, Y, Left, Right, Right1, less_in_gg(Y, X))
U4_gag(X, Y, Left, Right, Right1, less_out_gg(Y, X)) → U5_gag(X, Y, Left, Right, Right1, delete_in_gag(X, Right, Right1))
U5_gag(X, Y, Left, Right, Right1, delete_out_gag(X, Right, Right1)) → delete_out_gag(X, tree(Y, Left, Right), tree(Y, Left, Right1))
U3_gag(X, Y, Left, Right, Left1, delete_out_gag(X, Left, Left1)) → delete_out_gag(X, tree(Y, Left, Right), tree(Y, Left1, Right))
U3_aag(X, Y, Left, Right, Left1, delete_out_gag(X, Left, Left1)) → delete_out_aag(X, tree(Y, Left, Right), tree(Y, Left1, Right))
delete_in_aag(X, tree(Y, Left, Right), tree(Y, Left, Right1)) → U4_aag(X, Y, Left, Right, Right1, less_in_ga(Y, X))
less_in_ga(0, s(X3)) → less_out_ga(0, s(X3))
less_in_ga(s(X), s(Y)) → U7_ga(X, Y, less_in_ga(X, Y))
U7_ga(X, Y, less_out_ga(X, Y)) → less_out_ga(s(X), s(Y))
U4_aag(X, Y, Left, Right, Right1, less_out_ga(Y, X)) → U5_aag(X, Y, Left, Right, Right1, delete_in_aag(X, Right, Right1))
U5_aag(X, Y, Left, Right, Right1, delete_out_aag(X, Right, Right1)) → delete_out_aag(X, tree(Y, Left, Right), tree(Y, Left, Right1))
LESS_IN_GA(s(X), s(Y)) → LESS_IN_GA(X, Y)
delete_in_aag(X, tree(X, void, Right), Right) → delete_out_aag(X, tree(X, void, Right), Right)
delete_in_aag(X, tree(X, Left, void), Left) → delete_out_aag(X, tree(X, Left, void), Left)
delete_in_aag(X, tree(X, Left, Right), tree(Y, Left, Right1)) → U1_aag(X, Left, Right, Y, Right1, delmin_in_agg(Right, Y, Right1))
delmin_in_agg(tree(Y, void, Right), Y, Right) → delmin_out_agg(tree(Y, void, Right), Y, Right)
delmin_in_agg(tree(X, Left, X1), Y, tree(X, Left1, X2)) → U6_agg(X, Left, X1, Y, Left1, X2, delmin_in_agg(Left, Y, Left1))
U6_agg(X, Left, X1, Y, Left1, X2, delmin_out_agg(Left, Y, Left1)) → delmin_out_agg(tree(X, Left, X1), Y, tree(X, Left1, X2))
U1_aag(X, Left, Right, Y, Right1, delmin_out_agg(Right, Y, Right1)) → delete_out_aag(X, tree(X, Left, Right), tree(Y, Left, Right1))
delete_in_aag(X, tree(Y, Left, Right), tree(Y, Left1, Right)) → U2_aag(X, Y, Left, Right, Left1, less_in_ag(X, Y))
less_in_ag(0, s(X3)) → less_out_ag(0, s(X3))
less_in_ag(s(X), s(Y)) → U7_ag(X, Y, less_in_ag(X, Y))
U7_ag(X, Y, less_out_ag(X, Y)) → less_out_ag(s(X), s(Y))
U2_aag(X, Y, Left, Right, Left1, less_out_ag(X, Y)) → U3_aag(X, Y, Left, Right, Left1, delete_in_gag(X, Left, Left1))
delete_in_gag(X, tree(X, void, Right), Right) → delete_out_gag(X, tree(X, void, Right), Right)
delete_in_gag(X, tree(X, Left, void), Left) → delete_out_gag(X, tree(X, Left, void), Left)
delete_in_gag(X, tree(X, Left, Right), tree(Y, Left, Right1)) → U1_gag(X, Left, Right, Y, Right1, delmin_in_agg(Right, Y, Right1))
U1_gag(X, Left, Right, Y, Right1, delmin_out_agg(Right, Y, Right1)) → delete_out_gag(X, tree(X, Left, Right), tree(Y, Left, Right1))
delete_in_gag(X, tree(Y, Left, Right), tree(Y, Left1, Right)) → U2_gag(X, Y, Left, Right, Left1, less_in_gg(X, Y))
less_in_gg(0, s(X3)) → less_out_gg(0, s(X3))
less_in_gg(s(X), s(Y)) → U7_gg(X, Y, less_in_gg(X, Y))
U7_gg(X, Y, less_out_gg(X, Y)) → less_out_gg(s(X), s(Y))
U2_gag(X, Y, Left, Right, Left1, less_out_gg(X, Y)) → U3_gag(X, Y, Left, Right, Left1, delete_in_gag(X, Left, Left1))
delete_in_gag(X, tree(Y, Left, Right), tree(Y, Left, Right1)) → U4_gag(X, Y, Left, Right, Right1, less_in_gg(Y, X))
U4_gag(X, Y, Left, Right, Right1, less_out_gg(Y, X)) → U5_gag(X, Y, Left, Right, Right1, delete_in_gag(X, Right, Right1))
U5_gag(X, Y, Left, Right, Right1, delete_out_gag(X, Right, Right1)) → delete_out_gag(X, tree(Y, Left, Right), tree(Y, Left, Right1))
U3_gag(X, Y, Left, Right, Left1, delete_out_gag(X, Left, Left1)) → delete_out_gag(X, tree(Y, Left, Right), tree(Y, Left1, Right))
U3_aag(X, Y, Left, Right, Left1, delete_out_gag(X, Left, Left1)) → delete_out_aag(X, tree(Y, Left, Right), tree(Y, Left1, Right))
delete_in_aag(X, tree(Y, Left, Right), tree(Y, Left, Right1)) → U4_aag(X, Y, Left, Right, Right1, less_in_ga(Y, X))
less_in_ga(0, s(X3)) → less_out_ga(0, s(X3))
less_in_ga(s(X), s(Y)) → U7_ga(X, Y, less_in_ga(X, Y))
U7_ga(X, Y, less_out_ga(X, Y)) → less_out_ga(s(X), s(Y))
U4_aag(X, Y, Left, Right, Right1, less_out_ga(Y, X)) → U5_aag(X, Y, Left, Right, Right1, delete_in_aag(X, Right, Right1))
U5_aag(X, Y, Left, Right, Right1, delete_out_aag(X, Right, Right1)) → delete_out_aag(X, tree(Y, Left, Right), tree(Y, Left, Right1))
LESS_IN_GA(s(X), s(Y)) → LESS_IN_GA(X, Y)
LESS_IN_GA(s(X)) → LESS_IN_GA(X)
From the DPs we obtained the following set of size-change graphs:
LESS_IN_GG(s(X), s(Y)) → LESS_IN_GG(X, Y)
delete_in_aag(X, tree(X, void, Right), Right) → delete_out_aag(X, tree(X, void, Right), Right)
delete_in_aag(X, tree(X, Left, void), Left) → delete_out_aag(X, tree(X, Left, void), Left)
delete_in_aag(X, tree(X, Left, Right), tree(Y, Left, Right1)) → U1_aag(X, Left, Right, Y, Right1, delmin_in_agg(Right, Y, Right1))
delmin_in_agg(tree(Y, void, Right), Y, Right) → delmin_out_agg(tree(Y, void, Right), Y, Right)
delmin_in_agg(tree(X, Left, X1), Y, tree(X, Left1, X2)) → U6_agg(X, Left, X1, Y, Left1, X2, delmin_in_agg(Left, Y, Left1))
U6_agg(X, Left, X1, Y, Left1, X2, delmin_out_agg(Left, Y, Left1)) → delmin_out_agg(tree(X, Left, X1), Y, tree(X, Left1, X2))
U1_aag(X, Left, Right, Y, Right1, delmin_out_agg(Right, Y, Right1)) → delete_out_aag(X, tree(X, Left, Right), tree(Y, Left, Right1))
delete_in_aag(X, tree(Y, Left, Right), tree(Y, Left1, Right)) → U2_aag(X, Y, Left, Right, Left1, less_in_ag(X, Y))
less_in_ag(0, s(X3)) → less_out_ag(0, s(X3))
less_in_ag(s(X), s(Y)) → U7_ag(X, Y, less_in_ag(X, Y))
U7_ag(X, Y, less_out_ag(X, Y)) → less_out_ag(s(X), s(Y))
U2_aag(X, Y, Left, Right, Left1, less_out_ag(X, Y)) → U3_aag(X, Y, Left, Right, Left1, delete_in_gag(X, Left, Left1))
delete_in_gag(X, tree(X, void, Right), Right) → delete_out_gag(X, tree(X, void, Right), Right)
delete_in_gag(X, tree(X, Left, void), Left) → delete_out_gag(X, tree(X, Left, void), Left)
delete_in_gag(X, tree(X, Left, Right), tree(Y, Left, Right1)) → U1_gag(X, Left, Right, Y, Right1, delmin_in_agg(Right, Y, Right1))
U1_gag(X, Left, Right, Y, Right1, delmin_out_agg(Right, Y, Right1)) → delete_out_gag(X, tree(X, Left, Right), tree(Y, Left, Right1))
delete_in_gag(X, tree(Y, Left, Right), tree(Y, Left1, Right)) → U2_gag(X, Y, Left, Right, Left1, less_in_gg(X, Y))
less_in_gg(0, s(X3)) → less_out_gg(0, s(X3))
less_in_gg(s(X), s(Y)) → U7_gg(X, Y, less_in_gg(X, Y))
U7_gg(X, Y, less_out_gg(X, Y)) → less_out_gg(s(X), s(Y))
U2_gag(X, Y, Left, Right, Left1, less_out_gg(X, Y)) → U3_gag(X, Y, Left, Right, Left1, delete_in_gag(X, Left, Left1))
delete_in_gag(X, tree(Y, Left, Right), tree(Y, Left, Right1)) → U4_gag(X, Y, Left, Right, Right1, less_in_gg(Y, X))
U4_gag(X, Y, Left, Right, Right1, less_out_gg(Y, X)) → U5_gag(X, Y, Left, Right, Right1, delete_in_gag(X, Right, Right1))
U5_gag(X, Y, Left, Right, Right1, delete_out_gag(X, Right, Right1)) → delete_out_gag(X, tree(Y, Left, Right), tree(Y, Left, Right1))
U3_gag(X, Y, Left, Right, Left1, delete_out_gag(X, Left, Left1)) → delete_out_gag(X, tree(Y, Left, Right), tree(Y, Left1, Right))
U3_aag(X, Y, Left, Right, Left1, delete_out_gag(X, Left, Left1)) → delete_out_aag(X, tree(Y, Left, Right), tree(Y, Left1, Right))
delete_in_aag(X, tree(Y, Left, Right), tree(Y, Left, Right1)) → U4_aag(X, Y, Left, Right, Right1, less_in_ga(Y, X))
less_in_ga(0, s(X3)) → less_out_ga(0, s(X3))
less_in_ga(s(X), s(Y)) → U7_ga(X, Y, less_in_ga(X, Y))
U7_ga(X, Y, less_out_ga(X, Y)) → less_out_ga(s(X), s(Y))
U4_aag(X, Y, Left, Right, Right1, less_out_ga(Y, X)) → U5_aag(X, Y, Left, Right, Right1, delete_in_aag(X, Right, Right1))
U5_aag(X, Y, Left, Right, Right1, delete_out_aag(X, Right, Right1)) → delete_out_aag(X, tree(Y, Left, Right), tree(Y, Left, Right1))
LESS_IN_GG(s(X), s(Y)) → LESS_IN_GG(X, Y)
LESS_IN_GG(s(X), s(Y)) → LESS_IN_GG(X, Y)
From the DPs we obtained the following set of size-change graphs:
LESS_IN_AG(s(X), s(Y)) → LESS_IN_AG(X, Y)
delete_in_aag(X, tree(X, void, Right), Right) → delete_out_aag(X, tree(X, void, Right), Right)
delete_in_aag(X, tree(X, Left, void), Left) → delete_out_aag(X, tree(X, Left, void), Left)
delete_in_aag(X, tree(X, Left, Right), tree(Y, Left, Right1)) → U1_aag(X, Left, Right, Y, Right1, delmin_in_agg(Right, Y, Right1))
delmin_in_agg(tree(Y, void, Right), Y, Right) → delmin_out_agg(tree(Y, void, Right), Y, Right)
delmin_in_agg(tree(X, Left, X1), Y, tree(X, Left1, X2)) → U6_agg(X, Left, X1, Y, Left1, X2, delmin_in_agg(Left, Y, Left1))
U6_agg(X, Left, X1, Y, Left1, X2, delmin_out_agg(Left, Y, Left1)) → delmin_out_agg(tree(X, Left, X1), Y, tree(X, Left1, X2))
U1_aag(X, Left, Right, Y, Right1, delmin_out_agg(Right, Y, Right1)) → delete_out_aag(X, tree(X, Left, Right), tree(Y, Left, Right1))
delete_in_aag(X, tree(Y, Left, Right), tree(Y, Left1, Right)) → U2_aag(X, Y, Left, Right, Left1, less_in_ag(X, Y))
less_in_ag(0, s(X3)) → less_out_ag(0, s(X3))
less_in_ag(s(X), s(Y)) → U7_ag(X, Y, less_in_ag(X, Y))
U7_ag(X, Y, less_out_ag(X, Y)) → less_out_ag(s(X), s(Y))
U2_aag(X, Y, Left, Right, Left1, less_out_ag(X, Y)) → U3_aag(X, Y, Left, Right, Left1, delete_in_gag(X, Left, Left1))
delete_in_gag(X, tree(X, void, Right), Right) → delete_out_gag(X, tree(X, void, Right), Right)
delete_in_gag(X, tree(X, Left, void), Left) → delete_out_gag(X, tree(X, Left, void), Left)
delete_in_gag(X, tree(X, Left, Right), tree(Y, Left, Right1)) → U1_gag(X, Left, Right, Y, Right1, delmin_in_agg(Right, Y, Right1))
U1_gag(X, Left, Right, Y, Right1, delmin_out_agg(Right, Y, Right1)) → delete_out_gag(X, tree(X, Left, Right), tree(Y, Left, Right1))
delete_in_gag(X, tree(Y, Left, Right), tree(Y, Left1, Right)) → U2_gag(X, Y, Left, Right, Left1, less_in_gg(X, Y))
less_in_gg(0, s(X3)) → less_out_gg(0, s(X3))
less_in_gg(s(X), s(Y)) → U7_gg(X, Y, less_in_gg(X, Y))
U7_gg(X, Y, less_out_gg(X, Y)) → less_out_gg(s(X), s(Y))
U2_gag(X, Y, Left, Right, Left1, less_out_gg(X, Y)) → U3_gag(X, Y, Left, Right, Left1, delete_in_gag(X, Left, Left1))
delete_in_gag(X, tree(Y, Left, Right), tree(Y, Left, Right1)) → U4_gag(X, Y, Left, Right, Right1, less_in_gg(Y, X))
U4_gag(X, Y, Left, Right, Right1, less_out_gg(Y, X)) → U5_gag(X, Y, Left, Right, Right1, delete_in_gag(X, Right, Right1))
U5_gag(X, Y, Left, Right, Right1, delete_out_gag(X, Right, Right1)) → delete_out_gag(X, tree(Y, Left, Right), tree(Y, Left, Right1))
U3_gag(X, Y, Left, Right, Left1, delete_out_gag(X, Left, Left1)) → delete_out_gag(X, tree(Y, Left, Right), tree(Y, Left1, Right))
U3_aag(X, Y, Left, Right, Left1, delete_out_gag(X, Left, Left1)) → delete_out_aag(X, tree(Y, Left, Right), tree(Y, Left1, Right))
delete_in_aag(X, tree(Y, Left, Right), tree(Y, Left, Right1)) → U4_aag(X, Y, Left, Right, Right1, less_in_ga(Y, X))
less_in_ga(0, s(X3)) → less_out_ga(0, s(X3))
less_in_ga(s(X), s(Y)) → U7_ga(X, Y, less_in_ga(X, Y))
U7_ga(X, Y, less_out_ga(X, Y)) → less_out_ga(s(X), s(Y))
U4_aag(X, Y, Left, Right, Right1, less_out_ga(Y, X)) → U5_aag(X, Y, Left, Right, Right1, delete_in_aag(X, Right, Right1))
U5_aag(X, Y, Left, Right, Right1, delete_out_aag(X, Right, Right1)) → delete_out_aag(X, tree(Y, Left, Right), tree(Y, Left, Right1))
LESS_IN_AG(s(X), s(Y)) → LESS_IN_AG(X, Y)
LESS_IN_AG(s(Y)) → LESS_IN_AG(Y)
From the DPs we obtained the following set of size-change graphs:
DELMIN_IN_AGG(tree(X, Left, X1), Y, tree(X, Left1, X2)) → DELMIN_IN_AGG(Left, Y, Left1)
delete_in_aag(X, tree(X, void, Right), Right) → delete_out_aag(X, tree(X, void, Right), Right)
delete_in_aag(X, tree(X, Left, void), Left) → delete_out_aag(X, tree(X, Left, void), Left)
delete_in_aag(X, tree(X, Left, Right), tree(Y, Left, Right1)) → U1_aag(X, Left, Right, Y, Right1, delmin_in_agg(Right, Y, Right1))
delmin_in_agg(tree(Y, void, Right), Y, Right) → delmin_out_agg(tree(Y, void, Right), Y, Right)
delmin_in_agg(tree(X, Left, X1), Y, tree(X, Left1, X2)) → U6_agg(X, Left, X1, Y, Left1, X2, delmin_in_agg(Left, Y, Left1))
U6_agg(X, Left, X1, Y, Left1, X2, delmin_out_agg(Left, Y, Left1)) → delmin_out_agg(tree(X, Left, X1), Y, tree(X, Left1, X2))
U1_aag(X, Left, Right, Y, Right1, delmin_out_agg(Right, Y, Right1)) → delete_out_aag(X, tree(X, Left, Right), tree(Y, Left, Right1))
delete_in_aag(X, tree(Y, Left, Right), tree(Y, Left1, Right)) → U2_aag(X, Y, Left, Right, Left1, less_in_ag(X, Y))
less_in_ag(0, s(X3)) → less_out_ag(0, s(X3))
less_in_ag(s(X), s(Y)) → U7_ag(X, Y, less_in_ag(X, Y))
U7_ag(X, Y, less_out_ag(X, Y)) → less_out_ag(s(X), s(Y))
U2_aag(X, Y, Left, Right, Left1, less_out_ag(X, Y)) → U3_aag(X, Y, Left, Right, Left1, delete_in_gag(X, Left, Left1))
delete_in_gag(X, tree(X, void, Right), Right) → delete_out_gag(X, tree(X, void, Right), Right)
delete_in_gag(X, tree(X, Left, void), Left) → delete_out_gag(X, tree(X, Left, void), Left)
delete_in_gag(X, tree(X, Left, Right), tree(Y, Left, Right1)) → U1_gag(X, Left, Right, Y, Right1, delmin_in_agg(Right, Y, Right1))
U1_gag(X, Left, Right, Y, Right1, delmin_out_agg(Right, Y, Right1)) → delete_out_gag(X, tree(X, Left, Right), tree(Y, Left, Right1))
delete_in_gag(X, tree(Y, Left, Right), tree(Y, Left1, Right)) → U2_gag(X, Y, Left, Right, Left1, less_in_gg(X, Y))
less_in_gg(0, s(X3)) → less_out_gg(0, s(X3))
less_in_gg(s(X), s(Y)) → U7_gg(X, Y, less_in_gg(X, Y))
U7_gg(X, Y, less_out_gg(X, Y)) → less_out_gg(s(X), s(Y))
U2_gag(X, Y, Left, Right, Left1, less_out_gg(X, Y)) → U3_gag(X, Y, Left, Right, Left1, delete_in_gag(X, Left, Left1))
delete_in_gag(X, tree(Y, Left, Right), tree(Y, Left, Right1)) → U4_gag(X, Y, Left, Right, Right1, less_in_gg(Y, X))
U4_gag(X, Y, Left, Right, Right1, less_out_gg(Y, X)) → U5_gag(X, Y, Left, Right, Right1, delete_in_gag(X, Right, Right1))
U5_gag(X, Y, Left, Right, Right1, delete_out_gag(X, Right, Right1)) → delete_out_gag(X, tree(Y, Left, Right), tree(Y, Left, Right1))
U3_gag(X, Y, Left, Right, Left1, delete_out_gag(X, Left, Left1)) → delete_out_gag(X, tree(Y, Left, Right), tree(Y, Left1, Right))
U3_aag(X, Y, Left, Right, Left1, delete_out_gag(X, Left, Left1)) → delete_out_aag(X, tree(Y, Left, Right), tree(Y, Left1, Right))
delete_in_aag(X, tree(Y, Left, Right), tree(Y, Left, Right1)) → U4_aag(X, Y, Left, Right, Right1, less_in_ga(Y, X))
less_in_ga(0, s(X3)) → less_out_ga(0, s(X3))
less_in_ga(s(X), s(Y)) → U7_ga(X, Y, less_in_ga(X, Y))
U7_ga(X, Y, less_out_ga(X, Y)) → less_out_ga(s(X), s(Y))
U4_aag(X, Y, Left, Right, Right1, less_out_ga(Y, X)) → U5_aag(X, Y, Left, Right, Right1, delete_in_aag(X, Right, Right1))
U5_aag(X, Y, Left, Right, Right1, delete_out_aag(X, Right, Right1)) → delete_out_aag(X, tree(Y, Left, Right), tree(Y, Left, Right1))
DELMIN_IN_AGG(tree(X, Left, X1), Y, tree(X, Left1, X2)) → DELMIN_IN_AGG(Left, Y, Left1)
DELMIN_IN_AGG(Y, tree(X, Left1, X2)) → DELMIN_IN_AGG(Y, Left1)
From the DPs we obtained the following set of size-change graphs:
DELETE_IN_GAG(X, tree(Y, Left, Right), tree(Y, Left1, Right)) → U2_GAG(X, Y, Left, Right, Left1, less_in_gg(X, Y))
U2_GAG(X, Y, Left, Right, Left1, less_out_gg(X, Y)) → DELETE_IN_GAG(X, Left, Left1)
DELETE_IN_GAG(X, tree(Y, Left, Right), tree(Y, Left, Right1)) → U4_GAG(X, Y, Left, Right, Right1, less_in_gg(Y, X))
U4_GAG(X, Y, Left, Right, Right1, less_out_gg(Y, X)) → DELETE_IN_GAG(X, Right, Right1)
delete_in_aag(X, tree(X, void, Right), Right) → delete_out_aag(X, tree(X, void, Right), Right)
delete_in_aag(X, tree(X, Left, void), Left) → delete_out_aag(X, tree(X, Left, void), Left)
delete_in_aag(X, tree(X, Left, Right), tree(Y, Left, Right1)) → U1_aag(X, Left, Right, Y, Right1, delmin_in_agg(Right, Y, Right1))
delmin_in_agg(tree(Y, void, Right), Y, Right) → delmin_out_agg(tree(Y, void, Right), Y, Right)
delmin_in_agg(tree(X, Left, X1), Y, tree(X, Left1, X2)) → U6_agg(X, Left, X1, Y, Left1, X2, delmin_in_agg(Left, Y, Left1))
U6_agg(X, Left, X1, Y, Left1, X2, delmin_out_agg(Left, Y, Left1)) → delmin_out_agg(tree(X, Left, X1), Y, tree(X, Left1, X2))
U1_aag(X, Left, Right, Y, Right1, delmin_out_agg(Right, Y, Right1)) → delete_out_aag(X, tree(X, Left, Right), tree(Y, Left, Right1))
delete_in_aag(X, tree(Y, Left, Right), tree(Y, Left1, Right)) → U2_aag(X, Y, Left, Right, Left1, less_in_ag(X, Y))
less_in_ag(0, s(X3)) → less_out_ag(0, s(X3))
less_in_ag(s(X), s(Y)) → U7_ag(X, Y, less_in_ag(X, Y))
U7_ag(X, Y, less_out_ag(X, Y)) → less_out_ag(s(X), s(Y))
U2_aag(X, Y, Left, Right, Left1, less_out_ag(X, Y)) → U3_aag(X, Y, Left, Right, Left1, delete_in_gag(X, Left, Left1))
delete_in_gag(X, tree(X, void, Right), Right) → delete_out_gag(X, tree(X, void, Right), Right)
delete_in_gag(X, tree(X, Left, void), Left) → delete_out_gag(X, tree(X, Left, void), Left)
delete_in_gag(X, tree(X, Left, Right), tree(Y, Left, Right1)) → U1_gag(X, Left, Right, Y, Right1, delmin_in_agg(Right, Y, Right1))
U1_gag(X, Left, Right, Y, Right1, delmin_out_agg(Right, Y, Right1)) → delete_out_gag(X, tree(X, Left, Right), tree(Y, Left, Right1))
delete_in_gag(X, tree(Y, Left, Right), tree(Y, Left1, Right)) → U2_gag(X, Y, Left, Right, Left1, less_in_gg(X, Y))
less_in_gg(0, s(X3)) → less_out_gg(0, s(X3))
less_in_gg(s(X), s(Y)) → U7_gg(X, Y, less_in_gg(X, Y))
U7_gg(X, Y, less_out_gg(X, Y)) → less_out_gg(s(X), s(Y))
U2_gag(X, Y, Left, Right, Left1, less_out_gg(X, Y)) → U3_gag(X, Y, Left, Right, Left1, delete_in_gag(X, Left, Left1))
delete_in_gag(X, tree(Y, Left, Right), tree(Y, Left, Right1)) → U4_gag(X, Y, Left, Right, Right1, less_in_gg(Y, X))
U4_gag(X, Y, Left, Right, Right1, less_out_gg(Y, X)) → U5_gag(X, Y, Left, Right, Right1, delete_in_gag(X, Right, Right1))
U5_gag(X, Y, Left, Right, Right1, delete_out_gag(X, Right, Right1)) → delete_out_gag(X, tree(Y, Left, Right), tree(Y, Left, Right1))
U3_gag(X, Y, Left, Right, Left1, delete_out_gag(X, Left, Left1)) → delete_out_gag(X, tree(Y, Left, Right), tree(Y, Left1, Right))
U3_aag(X, Y, Left, Right, Left1, delete_out_gag(X, Left, Left1)) → delete_out_aag(X, tree(Y, Left, Right), tree(Y, Left1, Right))
delete_in_aag(X, tree(Y, Left, Right), tree(Y, Left, Right1)) → U4_aag(X, Y, Left, Right, Right1, less_in_ga(Y, X))
less_in_ga(0, s(X3)) → less_out_ga(0, s(X3))
less_in_ga(s(X), s(Y)) → U7_ga(X, Y, less_in_ga(X, Y))
U7_ga(X, Y, less_out_ga(X, Y)) → less_out_ga(s(X), s(Y))
U4_aag(X, Y, Left, Right, Right1, less_out_ga(Y, X)) → U5_aag(X, Y, Left, Right, Right1, delete_in_aag(X, Right, Right1))
U5_aag(X, Y, Left, Right, Right1, delete_out_aag(X, Right, Right1)) → delete_out_aag(X, tree(Y, Left, Right), tree(Y, Left, Right1))
DELETE_IN_GAG(X, tree(Y, Left, Right), tree(Y, Left1, Right)) → U2_GAG(X, Y, Left, Right, Left1, less_in_gg(X, Y))
U2_GAG(X, Y, Left, Right, Left1, less_out_gg(X, Y)) → DELETE_IN_GAG(X, Left, Left1)
DELETE_IN_GAG(X, tree(Y, Left, Right), tree(Y, Left, Right1)) → U4_GAG(X, Y, Left, Right, Right1, less_in_gg(Y, X))
U4_GAG(X, Y, Left, Right, Right1, less_out_gg(Y, X)) → DELETE_IN_GAG(X, Right, Right1)
less_in_gg(0, s(X3)) → less_out_gg(0, s(X3))
less_in_gg(s(X), s(Y)) → U7_gg(X, Y, less_in_gg(X, Y))
U7_gg(X, Y, less_out_gg(X, Y)) → less_out_gg(s(X), s(Y))
DELETE_IN_GAG(X, tree(Y, Left1, Right)) → U2_GAG(X, Y, Right, Left1, less_in_gg(X, Y))
U2_GAG(X, Y, Right, Left1, less_out_gg(X, Y)) → DELETE_IN_GAG(X, Left1)
DELETE_IN_GAG(X, tree(Y, Left, Right1)) → U4_GAG(X, Y, Left, Right1, less_in_gg(Y, X))
U4_GAG(X, Y, Left, Right1, less_out_gg(Y, X)) → DELETE_IN_GAG(X, Right1)
less_in_gg(0, s(X3)) → less_out_gg(0, s(X3))
less_in_gg(s(X), s(Y)) → U7_gg(X, Y, less_in_gg(X, Y))
U7_gg(X, Y, less_out_gg(X, Y)) → less_out_gg(s(X), s(Y))
less_in_gg(x0, x1)
U7_gg(x0, x1, x2)
From the DPs we obtained the following set of size-change graphs:
DELETE_IN_AAG(X, tree(Y, Left, Right), tree(Y, Left, Right1)) → U4_AAG(X, Y, Left, Right, Right1, less_in_ga(Y, X))
U4_AAG(X, Y, Left, Right, Right1, less_out_ga(Y, X)) → DELETE_IN_AAG(X, Right, Right1)
delete_in_aag(X, tree(X, void, Right), Right) → delete_out_aag(X, tree(X, void, Right), Right)
delete_in_aag(X, tree(X, Left, void), Left) → delete_out_aag(X, tree(X, Left, void), Left)
delete_in_aag(X, tree(X, Left, Right), tree(Y, Left, Right1)) → U1_aag(X, Left, Right, Y, Right1, delmin_in_agg(Right, Y, Right1))
delmin_in_agg(tree(Y, void, Right), Y, Right) → delmin_out_agg(tree(Y, void, Right), Y, Right)
delmin_in_agg(tree(X, Left, X1), Y, tree(X, Left1, X2)) → U6_agg(X, Left, X1, Y, Left1, X2, delmin_in_agg(Left, Y, Left1))
U6_agg(X, Left, X1, Y, Left1, X2, delmin_out_agg(Left, Y, Left1)) → delmin_out_agg(tree(X, Left, X1), Y, tree(X, Left1, X2))
U1_aag(X, Left, Right, Y, Right1, delmin_out_agg(Right, Y, Right1)) → delete_out_aag(X, tree(X, Left, Right), tree(Y, Left, Right1))
delete_in_aag(X, tree(Y, Left, Right), tree(Y, Left1, Right)) → U2_aag(X, Y, Left, Right, Left1, less_in_ag(X, Y))
less_in_ag(0, s(X3)) → less_out_ag(0, s(X3))
less_in_ag(s(X), s(Y)) → U7_ag(X, Y, less_in_ag(X, Y))
U7_ag(X, Y, less_out_ag(X, Y)) → less_out_ag(s(X), s(Y))
U2_aag(X, Y, Left, Right, Left1, less_out_ag(X, Y)) → U3_aag(X, Y, Left, Right, Left1, delete_in_gag(X, Left, Left1))
delete_in_gag(X, tree(X, void, Right), Right) → delete_out_gag(X, tree(X, void, Right), Right)
delete_in_gag(X, tree(X, Left, void), Left) → delete_out_gag(X, tree(X, Left, void), Left)
delete_in_gag(X, tree(X, Left, Right), tree(Y, Left, Right1)) → U1_gag(X, Left, Right, Y, Right1, delmin_in_agg(Right, Y, Right1))
U1_gag(X, Left, Right, Y, Right1, delmin_out_agg(Right, Y, Right1)) → delete_out_gag(X, tree(X, Left, Right), tree(Y, Left, Right1))
delete_in_gag(X, tree(Y, Left, Right), tree(Y, Left1, Right)) → U2_gag(X, Y, Left, Right, Left1, less_in_gg(X, Y))
less_in_gg(0, s(X3)) → less_out_gg(0, s(X3))
less_in_gg(s(X), s(Y)) → U7_gg(X, Y, less_in_gg(X, Y))
U7_gg(X, Y, less_out_gg(X, Y)) → less_out_gg(s(X), s(Y))
U2_gag(X, Y, Left, Right, Left1, less_out_gg(X, Y)) → U3_gag(X, Y, Left, Right, Left1, delete_in_gag(X, Left, Left1))
delete_in_gag(X, tree(Y, Left, Right), tree(Y, Left, Right1)) → U4_gag(X, Y, Left, Right, Right1, less_in_gg(Y, X))
U4_gag(X, Y, Left, Right, Right1, less_out_gg(Y, X)) → U5_gag(X, Y, Left, Right, Right1, delete_in_gag(X, Right, Right1))
U5_gag(X, Y, Left, Right, Right1, delete_out_gag(X, Right, Right1)) → delete_out_gag(X, tree(Y, Left, Right), tree(Y, Left, Right1))
U3_gag(X, Y, Left, Right, Left1, delete_out_gag(X, Left, Left1)) → delete_out_gag(X, tree(Y, Left, Right), tree(Y, Left1, Right))
U3_aag(X, Y, Left, Right, Left1, delete_out_gag(X, Left, Left1)) → delete_out_aag(X, tree(Y, Left, Right), tree(Y, Left1, Right))
delete_in_aag(X, tree(Y, Left, Right), tree(Y, Left, Right1)) → U4_aag(X, Y, Left, Right, Right1, less_in_ga(Y, X))
less_in_ga(0, s(X3)) → less_out_ga(0, s(X3))
less_in_ga(s(X), s(Y)) → U7_ga(X, Y, less_in_ga(X, Y))
U7_ga(X, Y, less_out_ga(X, Y)) → less_out_ga(s(X), s(Y))
U4_aag(X, Y, Left, Right, Right1, less_out_ga(Y, X)) → U5_aag(X, Y, Left, Right, Right1, delete_in_aag(X, Right, Right1))
U5_aag(X, Y, Left, Right, Right1, delete_out_aag(X, Right, Right1)) → delete_out_aag(X, tree(Y, Left, Right), tree(Y, Left, Right1))
DELETE_IN_AAG(X, tree(Y, Left, Right), tree(Y, Left, Right1)) → U4_AAG(X, Y, Left, Right, Right1, less_in_ga(Y, X))
U4_AAG(X, Y, Left, Right, Right1, less_out_ga(Y, X)) → DELETE_IN_AAG(X, Right, Right1)
less_in_ga(0, s(X3)) → less_out_ga(0, s(X3))
less_in_ga(s(X), s(Y)) → U7_ga(X, Y, less_in_ga(X, Y))
U7_ga(X, Y, less_out_ga(X, Y)) → less_out_ga(s(X), s(Y))
DELETE_IN_AAG(tree(Y, Left, Right1)) → U4_AAG(Y, Left, Right1, less_in_ga(Y))
U4_AAG(Y, Left, Right1, less_out_ga(Y)) → DELETE_IN_AAG(Right1)
less_in_ga(0) → less_out_ga(0)
less_in_ga(s(X)) → U7_ga(X, less_in_ga(X))
U7_ga(X, less_out_ga(X)) → less_out_ga(s(X))
less_in_ga(x0)
U7_ga(x0, x1)