import proveit
from proveit import Lambda, f, g, n
from proveit.core_expr_types import x_1_to_n, f__x_1_to_n, g__x_1_to_n
from proveit.logic import Forall, Equals
from proveit.numbers import Natural
theory = proveit.Theory() # the theorem's theory
%proving operator_substitution
repl_lambda = Lambda(f, f__x_1_to_n)
Equals(f, g).substitution(repl_lambda, assumptions=[Equals(f, g)])
%qed