NB. Definitions to convert J expressions to Math notation.

x =: 'x'
y =: 'y'

math_pat =: 3 : 0
'''',y,'('',y,'')''',LF,':',LF,'''',y,'('',x,'','',y,'')'''
)

f =: (3 : (math_pat 'f')) :. (3 : (math_pat 'f_inv'))
g =: (3 : (math_pat 'g')) :. (3 : (math_pat 'g_inv'))
h =: (3 : (math_pat 'h')) :. (3 : (math_pat 'h_inv'))
i =: (3 : (math_pat 'i')) :. (3 : (math_pat 'i_inv'))

f g y
(f g) y
x f g y
x (f g) y
f g h y
(f g h) y
x f g h y
x (f g h) y
( display &. (f&g)) y
