English
A variant of the two-step induction rule that uses a cast to equate two expressions built from cons and append operations.
Русский
Вариант правила двухшаговой индукции, где применяется приведение для сопоставления выражений, построенных через cons и append.
LaTeX
$$$$ \\operatorname{twoStepInduction nil singleton cons_cons (x :: (y :: xs)) = \\text{cons\_append } x\\, (y :: xs)\\, z\\; (\\operatorname{twoStepInduction} nil singleton cons_cons (y :: xs)). $$$$
Lean4
@[gcongr]
theorem take (h : l₁ <+: l₂) (n : ℕ) : l₁.take n <+: l₂.take n := by
simpa [prefix_take_iff, Nat.min_le_left] using (take_prefix n l₁).trans h