(* This program is free software; you can redistribute it and/or      *)
(* modify it under the terms of the GNU Lesser General Public License *)
(* as published by the Free Software Foundation; either version 2.1   *)
(* of the License, or (at your option) any later version.             *)
(*                                                                    *)
(* This program is distributed in the hope that it will be useful,    *)
(* but WITHOUT ANY WARRANTY; without even the implied warranty of     *)
(* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the      *)
(* GNU General Public License for more details.                       *)
(*                                                                    *)
(* You should have received a copy of the GNU Lesser General Public   *)
(* License along with this program; if not, write to the Free         *)
(* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *)
(* 02110-1301 USA                                                     *)
(** %\subsection*{ support :  omit.v }%*)
(** - (omit v i) = $\langle v_0...v_{i-1},v_{i+1}...v_{n-1}\rangle$ *)
Set Implicit Arguments.
Unset Strict Implicit.
Require Export empty.
Require Export conshdtl.
(** %\label{omit}% *)
Definition omit :
forall (A : Setoid) (n : Nat), seq n A -> fin n -> seq (pred n) A.
destruct n.
auto.
induction  n as [| n Hrecn].
intros.
apply (empty_seq A).
intros.
case X0.
intro x; case x.
intro.
exact (Seqtl X).
intros.
exact (head X;; Hrecn (Seqtl X) (Build_finiteT (lt_S_n _ _ in_range_prf))).
Defined.

(* Specifications: *)
Lemma omit_comp :
forall (A : Setoid) (n : Nat) (v v' : seq n A) (i i' : fin n),
v =' v' in _ -> i =' i' in _ -> omit v i =' omit v' i' in _.