MCPcopy Create free account
hub / github.com/cortex-js/compute-engine / assumeBound

Function assumeBound

src/compute-engine/assume.ts:1000–1010  ·  view source on GitHub ↗

* Assume `symbol bound` by delegating to `assumeInequality` (which * performs the §4.3 consistency checks and stores the normalized fact). * * Non-numeric or infinite bounds are skipped: membership in * `Range(1, +∞)` yields only the lower bound fact.

(
  ce: ComputeEngine,
  symbol: string,
  op: 'Less' | 'LessEqual' | 'Greater' | 'GreaterEqual',
  bound: Expression
)

Source from the content-addressed store, hash-verified

998 }
999
1000 if (
1001 assumeBound(ce, symbol, loStrict ? 'Greater' : 'GreaterEqual', lo) ===
1002 'contradiction'
1003 )
1004 return 'contradiction';
1005 if (
1006 assumeBound(ce, symbol, hiStrict ? 'Less' : 'LessEqual', hi) ===
1007 'contradiction'
1008 )
1009 return 'contradiction';
1010 return 'ok';
1011 }
1012
1013 // 4. SetMinus(S, T): recurse on S, then store exclusions

Callers 1

assumeElementOfSetFunction · 0.85

Calls 4

isNumberFunction · 0.90
assumeInequalityFunction · 0.85
functionMethod · 0.65
symbolMethod · 0.65

Tested by

no test coverage detected