I am trying to prove the following theorem:
theorem list_take_take (n n: Nat) (xs: List α):
take n (take m xs) = take (min n m) xs := by
revert m xs
induction n with
| zero =>
intro m xs
rw [nat_min_zero]
repeat rw [take]
| succ n ihn =>
intro m xs
cases m with
| zero =>
rw [take, min]
simp
rw [take]
apply list_take_nil
| succ m =>
unfold min
split
· -- case: succ n ≤ succ m
-- how do I rewrite succ n ≤ succ m to n ≤ m
-- using Nat.succ_le_succ or Nat.le_of_succ_le_succ?
sorry
· sorry
When I get to the split tactic, it splits the if statement that resulted from unfolding the min function, but the new hypothesis succ n ≤ succ m has no name, so I can't rewrite it to n ≤ m. Is there a way to name the hypothesis that will result from using the split tactic or is there another way to do cases on the comparison?
Note: this question is about Lean4 and not Lean3