I tried to define a simple rule defining how \[Lambda]
λ acts on \[Psi][n]ψ[n]
:
myrule1 = \[Lambda]λ \[Psi][n_]ψ[n_] -> \[Alpha][nα[n + 1] \[Psi][nψ[n + 1];
The result I get is correct provided there's just one \[Lambda]
λ on the RHS of \[Psi][n]ψ[n]
. For instance:
\[Lambda]^2λ^2 \[Psi][n]ψ[n] //. myrule1
isn't computed at all. On the other hand, if I do it step by step:
\[Lambda]λ \[Alpha][1α[1 + n] \[Psi][1ψ[1 + n] /. myrule1
I get the correct result. I tried to define a new rule:
myrule2 = \[Lambda]^m_λ^m_ \[Psi][n_]ψ[n_] -> \[Alpha][nα[n + 1] \[Lambda]^λ^(m - 1) \[Psi][nψ[n + 1];
but it doesn't work.
Since the recursive method seemed to work, I created a function which multiplies \[Psi][m]ψ[m]
by \[Lambda]
λ n
times:
times\[Lambda][n_]timesλ[n_] := Nest[Times[\[Lambda]Nest[Times[λ, #] /. myrule1 &, \[Psi][m]ψ[m], n] &
But this is a very crude way of solving this problem.
Do you have any other ideas?