I am studying the algorithm W. From my understand, algorithm W takes (Γ,expr) as input ,where Γ is the context, and expr is the expression. The output is a substitution σ. Then I can use the substitution σ to take another (Γ,expr) as σ(Γ,expr).
What confuses me is what to do next. Since expr can have cases as: variable, abstraction, application, condition, fix-point expression, and let expression.
What is the purpose of having different cases of expr? What should I do in the next step?