We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent b29cf96 commit 00a4b72Copy full SHA for 00a4b72
Katydid/Std/Lists.lean
@@ -825,6 +825,20 @@ theorem list_drop_app (n: Nat) (xs ys: List α):
825
simp
826
exact ih n
827
828
+-- list_drop_app's alternative proof using revert instead of generalizing
829
+theorem list_drop_app' (n: Nat) (xs ys: List α):
830
+ drop n (xs ++ ys) = (drop n xs) ++ (drop (n - length xs) ys) := by
831
+ revert n
832
+ induction xs with
833
+ | nil => simp
834
+ | cons x xs ih =>
835
+ intro n
836
+ cases n with
837
+ | zero => simp
838
+ | succ n =>
839
+ simp
840
+ exact ih n
841
+
842
theorem list_take_length_prefix_is_prefix (xs ys: List α):
843
take (length xs) (xs ++ ys) = xs := by
844
induction xs with
0 commit comments