]> matita.cs.unibo.it Git - helm.git/blob - matita/matita/tests/coercions_dependent.ma
init_copy init_match
[helm.git] / matita / matita / tests / coercions_dependent.ma
1 (**************************************************************************)
2 (*       ___                                                              *)
3 (*      ||M||                                                             *)
4 (*      ||A||       A project by Andrea Asperti                           *)
5 (*      ||T||                                                             *)
6 (*      ||I||       Developers:                                           *)
7 (*      ||T||         The HELM team.                                      *)
8 (*      ||A||         http://helm.cs.unibo.it                             *)
9 (*      \   /                                                             *)
10 (*       \ /        This file is distributed under the terms of the       *)
11 (*        v         GNU General Public License Version 2                  *)
12 (*                                                                        *)
13 (**************************************************************************)
14
15
16
17 include "nat/nat.ma".
18 include "list/list.ma".
19 include "decidable_kit/list_aux.ma".
20 (* tests from "Dependent Coersion" by Luo and Soloviev *)
21
22 inductive vec (A : Type) : nat -> Type :=
23  | vnil : vec A O
24  | vcons : ∀a:A.∀n:nat.vec A n -> vec A (S n).
25  
26 axiom c : ∀A,B.∀l:list A.vec B (length A l).
27
28 axiom veclen : ∀A,n.vec A n -> nat.
29
30 coercion cic:/matita/tests/coercions_dependent/c.con.
31
32 alias num (instance 0) = "natural number".
33 definition xxx := veclen nat ? [3; 4; 7].