README

#symsimplify

CAIMEOX/symbit/symsimplify is the public import path for this package.

General-purpose and targeted simplification passes, rational rewrites, radical and trigonometric simplifiers, traversal tools, and CSE.

#When To Use This Package

  • Import CAIMEOX/symbit/symsimplify directly when your code depends on this package's subsystem-specific types or algorithms.
  • Prefer this package over the root facade when you want the focused API surface listed below rather than a convenience wrapper.

#Key Public Entry Points

  • apply_at_level
  • apply_pattern
  • apply_patterns_once
  • besselsimp
  • collect
  • collect_abs
  • collect_const
  • collect_sqrt

#Example

///|
test "symsimplify runs targeted simplifiers" {
let x = @symcore.Expr::Symbol("x")
let expr = @symcore.mul([x, @symcore.pow(x, @symcore.int(-1))])
debug_inspect(simplify(expr), content="1")
}

  • CAIMEOX/symbit
  • CAIMEOX/symbit/symcore

#Further Reading

#
CseResult

pub(all) struct CseResult {
replacements : Array[(String,
Expr
)]
reduced_exprs : Array[
Expr
]
}

  • Does: Stores the replacements and reduced expressions produced by common-subexpression elimination.
  • Input: Constructed internally from Array[(String, Expr)] and Array[Expr].
  • Returns: One CseResult value.
  • Limits: Replacement names are generated placeholders and are not stable across algorithm changes.

#
CseResult::reduced_exprs_copy

fn CseResult::reduced_exprs_copy(self : CseResult) -> Array[
Expr
]

  • Does: Returns a defensive copy of the reduced expressions after extraction.
  • Input: One CseResult.
  • Returns: Array[Expr].
  • Limits: Returned expressions still reference the generated replacement names.

#
CseResult::replacement_count

fn CseResult::replacement_count(self : CseResult) -> Int

  • Does: Reports how many substitutions were extracted by CSE.
  • Input: One CseResult.
  • Returns: Int.
  • Limits: Counts only stored replacements and does not inspect reduced expressions again.

#
CseResult::replacements_copy

fn CseResult::replacements_copy(self : CseResult) -> Array[(String,
Expr
)]

  • Does: Returns a defensive copy of the extracted substitution list.
  • Input: One CseResult.
  • Returns: Array[(String, Expr)].
  • Limits: Names stay in generated placeholder form and are not re-simplified.

#
EPath

pub(all) struct EPath {
raw : String
selectors : Array[ESelector]
}

  • Does: Stores a parsed expression path and its selector sequence.
  • Input: The original raw path plus parsed selectors.
  • Returns: One EPath value.
  • Limits: The path grammar is limited to the selectors implemented here.

#
EPath::apply

  • Does: Applies one callback to every subexpression matched by one path.
  • Input: One EPath, one root Expr, and one callback (Expr) -> Expr.
  • Returns: One rewritten Expr.
  • Limits: Unsupported selectors leave the expression unchanged instead of raising.

#
EPath::new

fn EPath::new(path : String) -> EPath

  • Does: Parses one path string into an EPath selector sequence.
  • Input: One String.
  • Returns: One EPath.
  • Limits: Invalid or unsupported syntax falls back to the subset accepted by the local parser instead of raising.

#
EPath::select

  • Does: Selects every subexpression matched by one path.
  • Input: One EPath and one root Expr.
  • Returns: Array[Expr].
  • Limits: Unsupported selectors simply match nothing instead of raising.

#
ESelector

pub(all) struct ESelector {
attrs : Array[String]
types : Array[String]
span : ESpan
}

  • Does: Stores one parsed selector in an expression path.
  • Input: Attribute filters, type filters, and one ESpan.
  • Returns: One ESelector value.
  • Limits: Constructed selectors follow the parser rules in this package and do not validate against external schemas.

#
ESpan

pub(all) enum ESpan {
All
Index(Int)
Slice(Int?, Int?, Int?)
} derive(Eq,
Debug
)

  • Does: Describes which children of one selector step are addressed.
  • Input: One of All, Index(Int), or Slice(Int?, Int?, Int?).
  • Returns: One ESpan value.
  • Limits: Slice semantics are limited to the path parser implemented in this package.

#
SimplifyPattern

pub(all) enum SimplifyPattern {
FoldConstants
AddLikeTerms
MulLikeBases
PowDenest
TrigPythagorean
FunctionIdentities
} derive(Eq,
Debug
)

  • Does: Enumerates the local rewrite families used by pattern-driven simplification.
  • Input: One enum case.
  • Returns: One SimplifyPattern value.
  • Limits: Only the listed pattern families are available to the public front door.

#
SimplifyPlan

pub(all) enum SimplifyPlan {
Default
Aggressive
Custom(Array[SimplifyPattern])
} derive(Eq,
Debug
)

  • Does: Enumerates the supported simplify execution plans.
  • Input: One enum case, optionally carrying Array[SimplifyPattern] for Custom.
  • Returns: One SimplifyPlan value.
  • Limits: Custom plans run exactly the provided pattern list without extra validation.

#
apply_at_level

  • Does: Applies one callback to nodes at a fixed depth in the expression tree.
  • Input: One Expr, one callback, and optional level.
  • Returns: One rewritten Expr.
  • Limits: Negative levels are clamped to 0, and atoms are left untouched below that point.

#
apply_pattern

  • Does: Applies one simplify pattern to the current node only.
  • Input: One SimplifyPattern and one Expr.
  • Returns: One rewritten Expr.
  • Limits: Child traversal is handled by higher-level callers, not by this front door.

#
apply_patterns_once

  • Does: Applies each simplify pattern once over the whole expression tree.
  • Input: One Expr and one Array[SimplifyPattern].
  • Returns: One rewritten Expr.
  • Limits: This is a single-pass traversal and does not iterate to a fixpoint by itself.

#
besselsimp

fn besselsimp(expr :
Expr
, max_passes? : Int) ->
Expr

  • Does: Simplifies supported Bessel-function identities and recurrences.
  • Input: Any Expr plus optional max_passes.
  • Returns: One rewritten Expr.
  • Limits: Only the implemented Bessel families are rewritten; unsupported calls are returned unchanged.

#
collect

  • Does: Groups additive terms by powers of one target symbol.
  • Input: One expression and one target Expr, typically a symbol.
  • Returns: One rewritten Expr.
  • Limits: Non-symbol targets are left unchanged instead of raising an error.

#
collect_abs

  • Does: Collects repeated Abs factors inside multiplicative terms.
  • Input: Any Expr.
  • Returns: One rewritten Expr.
  • Limits: Only explicit Abs factors are grouped.

#
collect_const

  • Does: Factors a shared rational constant out of additive terms.
  • Input: Any Expr.
  • Returns: One rewritten Expr.
  • Limits: Only exact rational additive coefficients are combined; non-additive inputs are returned unchanged.

#
collect_sqrt

fn collect_sqrt(expr :
Expr
, evaluate? : Bool) ->
Expr

  • Does: Collects additive terms that share square-root factors.
  • Input: Any Expr plus optional evaluate.
  • Returns: One rewritten Expr.
  • Limits: The current front door ignores evaluate and uses the implemented structural collection only.

#
combsimp

fn combsimp(expr :
Expr
, max_passes? : Int) ->
Expr

  • Does: Simplifies supported combinatorial and factorial-style identities.
  • Input: Any Expr plus optional max_passes.
  • Returns: One rewritten Expr.
  • Limits: Only the implemented factorial, gamma, and binomial identities are applied.

#
cse

fn cse(exprs : Array[
Expr
], min_nodes? : Int) -> CseResult

  • Does: Performs common-subexpression elimination on one list of expressions.
  • Input: Array[Expr] plus optional min_nodes.
  • Returns: One CseResult.
  • Limits: Uses exact-structure matching and generated placeholder names, so algebraically equivalent but structurally different subtrees are not merged.

#
cse_reconstruct

fn cse_reconstruct(result : CseResult) -> Array[
Expr
]

  • Does: Reconstructs full expressions by substituting CSE replacements back into the reduced outputs.
  • Input: One CseResult.
  • Returns: Array[Expr].
  • Limits: Assumes the replacement list came from cse; malformed external data can reconstruct to nonsensical expressions.

#
denom

  • Does: Extracts the symbolic denominator of one expression.
  • Input: Any Expr.
  • Returns: One Expr.
  • Limits: Uses the same structural split as fraction, so unevaluated factors can remain in the result.

#
denom_expand

  • Does: Expands only the symbolic denominator of a rational expression.
  • Input: Any Expr.
  • Returns: One rewritten Expr.
  • Limits: Numerator structure is preserved exactly as split by the local fraction helper.

#
epath

  • Does: Convenience wrapper for parsing a path and selecting matches immediately.
  • Input: One path string and one root Expr.
  • Returns: Array[Expr].
  • Limits: Follows the same parser and matching limitations as EPath::new and EPath::select.

#
epath_apply

  • Does: Convenience wrapper for parsing a path and rewriting matches immediately.
  • Input: One path string, one root Expr, and one callback (Expr) -> Expr.
  • Returns: One rewritten Expr.
  • Limits: Follows the same parser and matching limitations as EPath::new and EPath::apply.

#
exptrigsimp

fn exptrigsimp(expr :
Expr
, max_passes? : Int) ->
Expr

  • Does: Switches between exponential and trigonometric forms to shorten an expression.
  • Input: Any Expr plus optional max_passes.
  • Returns: One rewritten Expr.
  • Limits: Only built-in rewrite families are tried, so expressions outside that surface are returned as-is.

#
factor_terms

  • Does: Factors common multiplicative terms out of additive expressions.
  • Input: Any Expr.
  • Returns: One rewritten Expr.
  • Limits: Only the implemented additive factoring cases are handled; non-additive inputs are returned unchanged.

#
fraction

  • Does: Decomposes one expression into a symbolic numerator and denominator pair.
  • Input: Any Expr.
  • Returns: (Expr, Expr) where the original expression is represented as num * den**-1.
  • Limits: Keeps symbolic factors unevaluated when no simpler exact split is available.

#
fraction_expand

  • Does: Expands both numerator and denominator parts of a rational expression.
  • Input: Any Expr.
  • Returns: One rewritten Expr.
  • Limits: Uses structural numerator/denominator splitting and multiplication expansion only.

  • Does: Runs the Fu trigonometric simplification strategy and then a final general simplify pass.
  • Input: Any Expr plus optional max_passes.
  • Returns: One rewritten Expr.
  • Limits: Uses the bounded Fu rule schedule implemented in this package only.

#
futrig

  • Does: Runs the Fu trigonometric simplification strategy without the final general simplify pass.
  • Input: Any Expr plus optional max_passes.
  • Returns: One rewritten Expr.
  • Limits: Uses the bounded Fu rule schedule implemented in this package only.

#
gammasimp

fn gammasimp(expr :
Expr
, max_passes? : Int) ->
Expr

  • Does: Applies Gamma-function simplifications and related exact identities.
  • Input: Any Expr plus optional max_passes.
  • Returns: One rewritten Expr.
  • Limits: Only supported Gamma/combinatorial identities are used; unsupported forms are left unchanged.

#
hyperexpand

fn hyperexpand(expr :
Expr
, max_passes? : Int) ->
Expr

  • Does: Expands supported hypergeometric calls into closed forms when known.
  • Input: Any Expr plus optional max_passes.
  • Returns: One rewritten Expr.
  • Limits: Only a small supported family of hypergeometric signatures is expanded.

#
hypersimilar

  • Does: Checks whether two sequences are hyper-similar in one index.
  • Input: Two expressions plus one index expression k.
  • Returns: Bool.
  • Limits: Non-symbol indices return false, and the decision is limited to the implemented rational-form check.

#
hypersimp

  • Does: Computes the hypergeometric term ratio f(k + 1) / f(k) when the index shift is supported.
  • Input: One expression f and one index expression k.
  • Returns: One Expr.
  • Limits: Non-symbol indices return 0 instead of raising, and unsupported terms can stay unsimplified.

#
kroneckersimp

fn kroneckersimp(expr :
Expr
, max_passes? : Int) ->
Expr

  • Does: Simplifies supported KroneckerDelta expressions.
  • Input: Any Expr plus optional max_passes.
  • Returns: One rewritten Expr.
  • Limits: Only the implemented delta identities are used; unsupported forms are returned unchanged.

#
logcombine

fn logcombine(expr :
Expr
, max_passes? : Int) ->
Expr

  • Does: Combines logarithmic sums and powers into more compact logarithmic forms.
  • Input: Any Expr plus optional max_passes.
  • Returns: One rewritten Expr.
  • Limits: Respects only the implemented algebraic identities and does not infer extra assumptions.

#
nsimplify

fn nsimplify(expr :
Expr
, constants? : Array[
Expr
], full? : Bool, rational? : Bool, max_passes? : Int) ->
Expr

  • Does: Rewrites exact numeric expressions into simpler symbolic forms and named constants.
  • Input: Any Expr, optional constant aliases, optional full, optional rational, and optional max_passes.
  • Returns: One rewritten Expr.
  • Limits: The search is heuristic, so unsupported constants or identities remain unchanged.

#
numer

  • Does: Extracts the symbolic numerator of one expression.
  • Input: Any Expr.
  • Returns: One Expr.
  • Limits: Uses the same structural split as fraction, so unevaluated factors can remain in the result.

#
numer_expand

  • Does: Expands only the symbolic numerator of a rational expression.
  • Input: Any Expr.
  • Returns: One rewritten Expr.
  • Limits: Denominator structure is preserved exactly as split by the local fraction helper.

#
plan_patterns

fn plan_patterns(plan : SimplifyPlan) -> Array[SimplifyPattern]

  • Does: Expands one simplify plan into the ordered pattern list it will run.
  • Input: One SimplifyPlan.
  • Returns: Array[SimplifyPattern].
  • Limits: Custom returns a shallow copy of the given list and does not normalize duplicates.

#
posify

  • Does: Replaces symbols with positivity-assumed stand-ins and records how to restore the originals.
  • Input: Any Expr.
  • Returns: (Expr, Map[String, Expr]) where the map restores the temporary symbols.
  • Limits: Uses simple name-based stand-ins and does not preserve richer assumption metadata.

#
powdenest

fn powdenest(expr :
Expr
, max_passes? : Int) ->
Expr

  • Does: Collapses nested powers when algebraic exponent rules allow it.
  • Input: Any Expr plus optional max_passes.
  • Returns: One rewritten Expr.
  • Limits: Stops after a bounded number of passes and leaves unsupported power patterns unchanged.

#
powsimp

  • Does: Combines powers with compatible bases and exponents.
  • Input: Any Expr plus optional max_passes.
  • Returns: One rewritten Expr.
  • Limits: Only the pattern-driven power rules in this package are applied.

#
rad_rationalize

  • Does: Rationalizes one symbolic fraction (num, den) by removing supported radicals from the denominator.
  • Input: Two expressions (num, den).
  • Returns: (Expr, Expr).
  • Limits: Unsupported denominators are returned unchanged.

#
radsimp

  • Does: Rationalizes supported radical denominators inside one expression.
  • Input: Any Expr plus optional max_passes.
  • Returns: One rewritten Expr.
  • Limits: Only the implemented radical-denominator patterns are handled.

#
ratsimp

  • Does: Rewrites additive rational expressions over a common denominator and reduces them.
  • Input: Any Expr plus optional max_passes.
  • Returns: One rewritten Expr.
  • Limits: Uses the local structural fraction splitter rather than a full polynomial-domain algorithm.

#
ratsimpmodprime

fn ratsimpmodprime(expr :
Expr
, basis? : Array[
Expr
], gens? : Array[
Expr
], quick? : Bool, polynomial? : Bool, max_passes? : Int) ->
Expr

  • Does: Exposes the modular rational-simplification front door.
  • Input: One expression plus optional basis, generators, quick/polynomial flags, and max_passes.
  • Returns: One rewritten Expr.
  • Limits: The current implementation ignores the modular arguments and falls back to ratsimp.

#
rcollect

  • Does: Applies collect recursively through the expression tree.
  • Input: One expression and one target Expr, typically a symbol.
  • Returns: One rewritten Expr.
  • Limits: Uses the same symbol-only front door as collect, so unsupported targets are propagated unchanged.

#
separatevars

fn separatevars(expr :
Expr
, force? : Bool) ->
Expr

  • Does: Separates multiplicative factors by symbolic variable sets when possible.
  • Input: Any Expr plus optional force.
  • Returns: One rewritten Expr.
  • Limits: Unsupported couplings remain unevaluated; force only widens rewrite attempts and does not guarantee separation.

#
signsimp

fn signsimp(expr :
Expr
, max_passes? : Int) ->
Expr

  • Does: Normalizes signs in additive and multiplicative expressions.
  • Input: Any Expr plus optional max_passes.
  • Returns: One rewritten Expr.
  • Limits: Uses the package's local canonical-sign rules and does not infer extra assumptions.

#
simplify

fn simplify(expr :
Expr
, plan? : SimplifyPlan, max_passes? : Int) ->
Expr

  • Does: Runs the package-level simplify pipeline on one expression.
  • Input: One Expr, optional SimplifyPlan, and optional max_passes.
  • Returns: One rewritten Expr.
  • Limits: The pipeline is heuristic and bounded by max_passes, so difficult expressions can remain only partially simplified.

#
simplify_with_patterns

fn simplify_with_patterns(expr :
Expr
, patterns : Array[SimplifyPattern], max_passes? : Int) ->
Expr

  • Does: Runs a custom ordered list of simplify patterns for a bounded number of passes.
  • Input: One Expr, one Array[SimplifyPattern], and optional max_passes.
  • Returns: One rewritten Expr.
  • Limits: Runs exactly the provided pattern list and stops after the bounded pass count.

#
split_surds

  • Does: Splits surd terms into a shared radical factor and two additive partitions.
  • Input: Any Expr, usually an additive radical expression.
  • Returns: (Expr, Expr, Expr).
  • Limits: Only the supported square-root integer pattern is recognized.

#
sqrtdenest

fn sqrtdenest(expr :
Expr
, max_passes? : Int) ->
Expr

  • Does: Denests supported nested square roots when algebraic identities apply.
  • Input: Any Expr plus optional max_passes.
  • Returns: One rewritten Expr.
  • Limits: Only the implemented denesting identities are used, so many nested radicals remain unchanged.

#
sub_post

  • Does: Runs the cleanup pass used after common-subexpression elimination.
  • Input: Any Expr.
  • Returns: One rewritten Expr.
  • Limits: Only the implemented sign-normalization cleanup is applied.

#
sub_pre

  • Does: Runs the structural pre-pass used before common-subexpression elimination.
  • Input: Any Expr.
  • Returns: One rewritten Expr.
  • Limits: Only the implemented subtraction-shape normalizations are applied.

#
tr0

  • Does: Applies the Fu trigonometric rewrite rule TR0.
  • Input: Any Expr.
  • Returns: One rewritten Expr.
  • Limits: Only the local TR0 rule family is applied, so unsupported shapes are returned unchanged.

#
tr1

  • Does: Applies the Fu trigonometric rewrite rule TR1.
  • Input: Any Expr.
  • Returns: One rewritten Expr.
  • Limits: Only the local TR1 rule family is applied, so unsupported shapes are returned unchanged.

#
tr10

  • Does: Applies the Fu trigonometric rewrite rule TR10.
  • Input: Any Expr.
  • Returns: One rewritten Expr.
  • Limits: Only the local TR10 rule family is applied, so unsupported shapes are returned unchanged.

#
tr10i

  • Does: Applies the Fu trigonometric rewrite rule TR10I.
  • Input: Any Expr.
  • Returns: One rewritten Expr.
  • Limits: Only the local TR10I rule family is applied, so unsupported shapes are returned unchanged.

#
tr11

  • Does: Applies the Fu trigonometric rewrite rule TR11.
  • Input: Any Expr.
  • Returns: One rewritten Expr.
  • Limits: Only the local TR11 rule family is applied, so unsupported shapes are returned unchanged.

#
tr111

  • Does: Applies the Fu trigonometric rewrite rule TR111.
  • Input: Any Expr.
  • Returns: One rewritten Expr.
  • Limits: Only the local TR111 rule family is applied, so unsupported shapes are returned unchanged.

#
tr12

  • Does: Applies the Fu trigonometric rewrite rule TR12.
  • Input: Any Expr.
  • Returns: One rewritten Expr.
  • Limits: Only the local TR12 rule family is applied, so unsupported shapes are returned unchanged.

#
tr12i

  • Does: Applies the Fu trigonometric rewrite rule TR12I.
  • Input: Any Expr.
  • Returns: One rewritten Expr.
  • Limits: Only the local TR12I rule family is applied, so unsupported shapes are returned unchanged.

#
tr13

  • Does: Applies the Fu trigonometric rewrite rule TR13.
  • Input: Any Expr.
  • Returns: One rewritten Expr.
  • Limits: Only the local TR13 rule family is applied, so unsupported shapes are returned unchanged.

#
tr14

  • Does: Applies the Fu trigonometric rewrite rule TR14.
  • Input: Any Expr.
  • Returns: One rewritten Expr.
  • Limits: Only the local TR14 rule family is applied, so unsupported shapes are returned unchanged.

#
tr15

fn tr15(expr :
Expr
, max? : Int, pow? : Bool) ->
Expr

  • Does: Applies the Fu trigonometric rewrite rule TR15.
  • Input: Any Expr plus optional max and pow.
  • Returns: One rewritten Expr.
  • Limits: Only the local TR15 rule family is applied, so unsupported shapes are returned unchanged.

#
tr16

fn tr16(expr :
Expr
, max? : Int, pow? : Bool) ->
Expr

  • Does: Applies the Fu trigonometric rewrite rule TR16.
  • Input: Any Expr plus optional max and pow.
  • Returns: One rewritten Expr.
  • Limits: Only the local TR16 rule family is applied, so unsupported shapes are returned unchanged.

#
tr2

  • Does: Applies the Fu trigonometric rewrite rule TR2.
  • Input: Any Expr.
  • Returns: One rewritten Expr.
  • Limits: Only the local TR2 rule family is applied, so unsupported shapes are returned unchanged.

#
tr22

fn tr22(expr :
Expr
, max? : Int, pow? : Bool) ->
Expr

  • Does: Applies the Fu trigonometric rewrite rule TR22.
  • Input: Any Expr plus optional max and pow.
  • Returns: One rewritten Expr.
  • Limits: Only the local TR22 rule family is applied, so unsupported shapes are returned unchanged.

#
tr2i

  • Does: Applies the Fu trigonometric rewrite rule TR2I.
  • Input: Any Expr plus optional half.
  • Returns: One rewritten Expr.
  • Limits: Only the local TR2I rule family is applied, so unsupported shapes are returned unchanged.

#
tr3

  • Does: Applies the Fu trigonometric rewrite rule TR3.
  • Input: Any Expr.
  • Returns: One rewritten Expr.
  • Limits: Only the local TR3 rule family is applied, so unsupported shapes are returned unchanged.

#
tr4

  • Does: Applies the Fu trigonometric rewrite rule TR4.
  • Input: Any Expr.
  • Returns: One rewritten Expr.
  • Limits: Only the local TR4 rule family is applied, so unsupported shapes are returned unchanged.

#
tr5

fn tr5(expr :
Expr
, max? : Int, pow? : Bool) ->
Expr

  • Does: Applies the Fu trigonometric rewrite rule TR5.
  • Input: Any Expr plus optional max and pow.
  • Returns: One rewritten Expr.
  • Limits: Only the local TR5 rule family is applied, so unsupported shapes are returned unchanged.

#
tr6

fn tr6(expr :
Expr
, max? : Int, pow? : Bool) ->
Expr

  • Does: Applies the Fu trigonometric rewrite rule TR6.
  • Input: Any Expr plus optional max and pow.
  • Returns: One rewritten Expr.
  • Limits: Only the local TR6 rule family is applied, so unsupported shapes are returned unchanged.

#
tr7

  • Does: Applies the Fu trigonometric rewrite rule TR7.
  • Input: Any Expr.
  • Returns: One rewritten Expr.
  • Limits: Only the local TR7 rule family is applied, so unsupported shapes are returned unchanged.

#
tr8

  • Does: Applies the Fu trigonometric rewrite rule TR8.
  • Input: Any Expr.
  • Returns: One rewritten Expr.
  • Limits: Only the local TR8 rule family is applied, so unsupported shapes are returned unchanged.

#
tr9

  • Does: Applies the Fu trigonometric rewrite rule TR9.
  • Input: Any Expr.
  • Returns: One rewritten Expr.
  • Limits: Only the local TR9 rule family is applied, so unsupported shapes are returned unchanged.

#
trigsimp

fn trigsimp(expr :
Expr
, max_passes? : Int) ->
Expr

  • Does: Simplifies trigonometric expressions with the package's supported trig identities.
  • Input: Any Expr plus optional max_passes.
  • Returns: One rewritten Expr.
  • Limits: Only the implemented trig and hyperbolic identities are used.

#
trmorrie

  • Does: Applies the Fu trigonometric rewrite rule TRMORRIE.
  • Input: Any Expr.
  • Returns: One rewritten Expr.
  • Limits: Only the local TRMORRIE rule family is applied, so unsupported shapes are returned unchanged.

#
trpower

  • Does: Applies the Fu trigonometric rewrite rule TRPOWER.
  • Input: Any Expr.
  • Returns: One rewritten Expr.
  • Limits: Only the local TRPOWER rule family is applied, so unsupported shapes are returned unchanged.