( ce: ComputeEngine, op: Expression, part: SubjectPart )
| 27 | * when the operand is a symbol with no value, look up assumed bounds for the |
| 28 | * corresponding subject (e.g. `im:tau` after `assume(Im(tau) > 0)`) and |
| 29 | * derive the sign from them (docs/fungrim/FUNGRIM-PLAN-3-ASSUMPTIONS.md §5.1b). |
| 30 | * |
| 31 | * Reads the fact index directly (never `ask()`), so it works inside |
| 32 | * `verify()`. Returns `undefined` when the facts don't entail a sign. |
| 33 | */ |
| 34 | export function signFromAssumedPart( |
| 35 | ce: ComputeEngine, |
| 36 | op: Expression, |
| 37 | part: SubjectPart |
| 38 | ): Sign | undefined { |
| 39 | if (!isSymbol(op) || op.value !== undefined) return undefined; |
| 40 | // Fast gate: engines with no assumptions do no index work. |
| 41 | if (!hasAssumptions(ce)) return undefined; |
| 42 | return signFromBounds( |
| 43 | getInequalityBoundsFromAssumptions(ce, { symbol: op.symbol, part }) |
no test coverage detected