关系约束可以筛选结果[#120]

下面查询微分规则:

((differentiate-constant (forward check) #f) (differentiate-variable (forward check) #f) (differentiate-independent (forward check) #f) (differentiate-negation (forward check) #f) (differentiate-sum (forward check) #f) (differentiate-difference (forward check) #f) (differentiate-product (forward check) "Generate the derivative of each factor separately and sum the two products. This rule constructs derivative terms; subsequent differentiation and simplification steps compute and reduce them.") (differentiate-power (forward check) #f) (differentiate-quotient (forward check) "Apply the quotient rule on the domain where the denominator is nonzero. The derivative remains a symbolic term until later passes process its operands and simplify the result.") (differentiate-sin (forward check) #f) (differentiate-cos (forward check) #f) (differentiate-exp (forward check) #f) (differentiate-log (forward check) #f) (differentiate-function (forward check) "Apply the shared function chain rule using one-based argument positions. C1 permits one derivative, C2 permits two, and smooth permits higher derivatives."))

ruleo描述规则目录中的事实;query声明要返回哪些逻辑变量;把类别固定为differentiate会只返回匹配的规则。关系可以进一步组合,而不需要手写列表过滤代码。

查询空间和分量规则:

((components-sum components (forward check) #f) (components-difference components (forward check) #f) (components-negation components (forward check) #f) (components-scale-left components (forward check) #f) (components-scale-right components (forward check) #f) (components-quotient components (forward check) #f) (components-dot components (forward check) #f) (components-cross components (forward check) #f) (components-zero components (forward check) #f) (gradient-components spatial (forward check) #f) (divergence-components spatial (forward check) #f) (curl-components spatial (forward check) #f) (laplacian-scalar-components spatial (forward check) #f) (laplacian-vector-components spatial (forward check) #f))

run*收集满足目标的所有解;conde表示两种可接受类别;==统一类别变量与符号。以上目标只是在规则目录上查询,尚未对某个表达式运行计算。