literal principal root u^(1/n) (Rubi NthRoot)
(u: Expression, n: number)
| 1275 | u.ops.filter((t) => !t.has(x)).length === u.ops.length - 1 && |
| 1276 | u.ops.some((t) => isBX(t)) |
| 1277 | ); |
| 1278 | } |
| 1279 | |
| 1280 | function monomialQ(u: Expression, ctx: Ctx): boolean { |
| 1281 | const x = ctx.x; |
| 1282 | if (u.symbol === x) return true; |
| 1283 | if (u.operator === 'Power' && u.ops) |
| 1284 | return u.ops[0].symbol === x && !u.ops[1].has(x); |