import proveit
theory = proveit.Theory() # the theorem's theory
from proveit import n, x, y, defaults
from proveit.numbers import zero
from proveit.numbers.ordering import max_def_bin
%proving max_nat_n_zero_is_n
defaults.assumptions = max_nat_n_zero_is_n.conditions
max_def_bin
In the following instantiation, we need to set auto_simplify=False, else we over-simplify and end up with the unhelpful $n = n$:
max_def_bin_inst = max_def_bin.instantiate({x: n, y: zero}, auto_simplify=False)
Prove-It can then complete the formal proof on its own, but it's nice to explicitly show the final step before handing it off to Prove-It:
max_def_bin_inst.inner_expr().rhs.simplify()
%qed