>>12154681the grammar for the problem is:
[problem] := [expr] "= 19"
[expr] := [unary_op] | [binary_op] | [number]
[unary_op] := "(" [unary_func] [expr] ")"
[unary_func] := "+", "-", "!", "sqrt"
[binary_op] := "(" [expr] [binary_func] [expr] ")"
[binary_func] := "+" | "-" | "*" | "/" | "^"
[number] := "1" | "2" | "3"
this can be used to expand expressions mechanically.
the only real problem to consider is with ! and sqrt. since these are unary operations, an unlimited number of combinations of ! and sqrt could potentially be applied to an expression. you'd have to prove that you can exhaust the possibilities with a finite number of symbols. i can't demonstrate that at the moment.
the numbers could also be any base, which makes things more complicated, but this could easily be incorporated into a program.