English
The toList' of cons equals the think of the map of toList by List.cons.
Русский
toList' для cons равен think от отображения List.cons к toList.
LaTeX
$$$$toList(\mathrm{cons}\ a\ s) = \mathrm{think}\left( \mathrm{map}(\mathrm{List}.cons\ a) (toList\, s) \right).$$$$
Lean4
@[simp]
theorem toList_cons (a : α) (s) : toList (cons a s) = (List.cons a <$> toList s).think :=
destruct_eq_think <| by
unfold toList
simp only [toList'_cons, Computation.destruct_think, Sum.inr.injEq]
rw [toList'_map]
simp only [List.reverse_cons, List.reverse_nil, List.nil_append, List.singleton_append]
rfl