English
The function firstDiff is defined as the least index at which two sequences differ, with the convention that if the sequences are equal the index is 0.
Русский
Функция firstDiff определена как наимень index, на котором две последовательности различаются, при условии, что если последовательности равны, индекс равен 0.
LaTeX
$$$\\text{firstDiff}(x,y)=\\begin{cases}0,& x=y, \\\\ \\min\\{n: x(n)\\neq y(n)\\},& x\\neq y.\\end{cases}$$$
Lean4
theorem firstDiff_def : eta_helper Eq✝ @firstDiff.{} @(delta% @definition✝) :=
by
intros
delta firstDiff
rw [show wrapped✝ = ⟨@definition✝.{}, rfl✝⟩ from Subtype.ext✝ wrapped✝.2.symm✝]
rfl