use of substitute

I have a function of 3 variables F = F(a,b,c),
3 functions of 2 variables A(m,n), B(m,n) and C(m,n)

How do we input this in cadabra?

f(m,n) = F(A(m,n),B(m,n),C(m,n))


I also want to calculate the chain rule (partial derivative) and calculate the 2nd partial derivative.

What have you tried so far?

\mu,\nu::Coordinate;
a,b,c::Coordinate;
F:=F(a,b,c);
A:=A(\mu,\nu);
B:=B(\mu,\nu);
C:=C(\mu,\nu);
Seems to work

substitute(F, $a -> A$);
substitute(F, $b -> B$);
substitute(F, $c -> C$);
Also seems to work

I tried this example from the site: