YES
0 QTRS
↳1 QTRSRRRProof (⇔, 63 ms)
↳2 QTRS
↳3 RisEmptyProof (⇔, 0 ms)
↳4 YES
fac(0) → 1
fac(s(x)) → *(s(x), fac(x))
floop(0, y) → y
floop(s(x), y) → floop(x, *(s(x), y))
*(x, 0) → 0
*(x, s(y)) → +(*(x, y), x)
+(x, 0) → x
+(x, s(y)) → s(+(x, y))
1 → s(0)
fac(0) → s(0)
fac1 > 1 > [0, s1]
fac1 > *2 > +2 > [0, s1]
floop2 > *2 > +2 > [0, s1]
fac1: [1]
0: multiset
1: multiset
s1: multiset
*2: [2,1]
floop2: [1,2]
+2: multiset
fac(0) → 1
fac(s(x)) → *(s(x), fac(x))
floop(0, y) → y
floop(s(x), y) → floop(x, *(s(x), y))
*(x, 0) → 0
*(x, s(y)) → +(*(x, y), x)
+(x, 0) → x
+(x, s(y)) → s(+(x, y))
1 → s(0)
fac(0) → s(0)