sTermOfTao (Fun f terms) s =
    S.member f (functions s) &&
    length terms == (farity f) &&
    all (flip isTermOfTao s) terms

isTermOfTao (Fun f terms) s =
    S.member f (functions s) &&
    length terms == (farity f) &&
    all (flip isTermOfTao s) terms
isTermOfTao (Fun f terms) s =
    S.member f (functions s) &&
    length terms == (farity f) &&
    all (flip isTermOfTao s) terms