# PatternMatchPushDown(S, A, B)¶

fixPredicate(f) returns g defined by g(a) = f(a::B).
patternMatch(expr, pat, res) matches the pattern pat to the expression expr; res contains the variables of pat which are already matched and their matches. Note: this function handles type towers by changing the predicates and calling the matching function provided by A.