Zulip Chat Archive

Stream: Is there code for X?

Topic: List.drop of a positive


Jakob von Raumer (May 12 2025 at 11:32):

lemma drop_cons (xs : List α) (x : α) (h : 0 < i) : (x :: xs).drop i = xs.drop (i - 1) := by
  conv_lhs => rw [ Nat.sub_add_cancel (n := i) (m := 1) (by omega)]
  simp

We have the corresponding lemma for take but this seems to be missing? Or am I just unable to find it?

Markus Himmel (May 12 2025 at 11:57):

Yes, this seems to be missing.


Last updated: Dec 20 2025 at 21:32 UTC