In the standart way I have induction for list like this
lstx::lstBut I want:
lstlst ++ x::nilFor me, the place of x in the list is important.
I tried to write something like this, but not successful.
In such case, you need to prove your own induction principle. But here you're lucky because what you need is already in the standard library of Coq:
Require Import List.
Check rev_ind.
(*
rev_ind
: forall (A : Type) (P : list A -> Prop),
P nil ->
(forall (x : A) (l : list A), P l -> P (l ++ x :: nil)) ->
forall l : list A, P l
*)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With