|
1 | 1 | import { NumericValue } from '../numeric-value/types'; |
2 | 2 | import type { BoxedExpression } from '../global-types'; |
3 | 3 | import { AbstractTensor } from '../tensor/tensors'; |
4 | | -import { getInequalityBoundsFromAssumptions } from '../assume'; |
| 4 | +// Dynamic import to avoid circular dependency |
5 | 5 |
|
6 | 6 | /** |
7 | 7 | * Structural equality of boxed expressions. |
@@ -201,6 +201,8 @@ export function cmp( |
201 | 201 | if (!b.isNumberLiteral) { |
202 | 202 | // Check if b is a symbol with inequality assumptions |
203 | 203 | if (b.symbol) { |
| 204 | + // Dynamic import to avoid circular dependency |
| 205 | + const { getInequalityBoundsFromAssumptions } = require('../assume'); |
204 | 206 | const bounds = getInequalityBoundsFromAssumptions(a.engine, b.symbol); |
205 | 207 | const aNum = |
206 | 208 | typeof a.numericValue === 'number' |
@@ -262,6 +264,8 @@ export function cmp( |
262 | 264 | if (typeof b === 'number') { |
263 | 265 | // Check if a is a symbol with inequality assumptions |
264 | 266 | if (a.symbol) { |
| 267 | + // Dynamic import to avoid circular dependency |
| 268 | + const { getInequalityBoundsFromAssumptions } = require('../assume'); |
265 | 269 | const bounds = getInequalityBoundsFromAssumptions(a.engine, a.symbol); |
266 | 270 |
|
267 | 271 | // We're comparing a (symbol) to b (number) |
@@ -348,6 +352,8 @@ export function cmp( |
348 | 352 |
|
349 | 353 | // Check inequality assumptions for the symbol |
350 | 354 | if (b.isNumberLiteral) { |
| 355 | + // Dynamic import to avoid circular dependency |
| 356 | + const { getInequalityBoundsFromAssumptions } = require('../assume'); |
351 | 357 | const bounds = getInequalityBoundsFromAssumptions(a.engine, a.symbol); |
352 | 358 | const bNum = |
353 | 359 | typeof b.numericValue === 'number' |
|
0 commit comments