Skip to main content

simplify_at

Function simplify_at 

Source
pub fn simplify_at(
    pool: &ExprPool,
    builtins: &BuiltinSymbols,
    id: ExprId,
    level: u8,
) -> ExprId
Expand description

Simplification gated by a level (spec §8.3/§13.2): a lower simplify_level reduces how many rules are applied, while intern-time level-0/1 canonicalization (0*x→0, 1*x→x, constant merging) always holds. Level >= 2 enables the symbolic rules (builtin constant folding, sqrt-elimination, Euler’s formula); level 3 is a superset for future rationalization rules.