proposition: Lemma SumType_proj_inj {n} (v : Vector.t Type n): forall tag (P : forall (tag : Fin.t n), Vector.nth v tag -> Type), forall el, P tag el -> P (SumType_index v (inj_SumType v tag el)) (SumType_proj v (inj_SumType v tag el)).
proof: Proof. induction v. - simpl; inversion tag. - intro; revert v IHv; pattern n, tag; apply Fin.caseS. + intros. revert X. destruct v; simpl; eauto. + intros. eapply (IHv _ (fun tag => P (Fin.FS tag))) in X. simpl; destruct v. * inversion p. * apply X. Qed.
imports: Coq.Vectors.Vector Coq.Vectors.Vector Fiat.Common.BoundedLookup