]> matita.cs.unibo.it Git - helm.git/blob - matita/matita/contribs/lambda_delta/Basic_2/grammar/term.ma
- support for atomic arities and candidates of reducibility started
[helm.git] / matita / matita / contribs / lambda_delta / Basic_2 / grammar / term.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 include "Basic_2/grammar/item.ma".
16
17 (* TERMS ********************************************************************)
18
19 (* terms *)
20 inductive term: Type[0] ≝
21   | TAtom: item0 → term               (* atomic item construction *)
22   | TPair: item2 → term → term → term (* binary item construction *)
23 .
24
25 interpretation "sort (term)" 'Star k = (TAtom (Sort k)).
26
27 interpretation "local reference (term)" 'LRef i = (TAtom (LRef i)).
28
29 interpretation "global reference (term)" 'GRef p = (TAtom (GRef p)).
30
31 interpretation "term construction (atomic)" 'SItem I = (TAtom I).
32
33 interpretation "term construction (binary)" 'SItem I T1 T2 = (TPair I T1 T2).
34
35 interpretation "term binding construction (binary)" 'SBind I T1 T2 = (TPair (Bind I) T1 T2).
36
37 interpretation "term flat construction (binary)" 'SFlat I T1 T2 = (TPair (Flat I) T1 T2).
38
39 (* Basic inversion lemmas ***************************************************)
40
41 lemma discr_tpair_xy_x: ∀I,T,V. 𝕔{I} V. T = V → False.
42 #I #T #V elim V -V
43 [ #J #H destruct
44 | #J #W #U #IHW #_ #H destruct
45   -H >e0 in e1; normalize (**) (* destruct: one quality is not simplified, the destucted equality is not erased *)
46   /2 width=1/
47 ]
48 qed-.
49
50 (* Basic_1: was: thead_x_y_y *)
51 lemma discr_tpair_xy_y: ∀I,V,T. 𝕔{I} V. T = T → False.
52 #I #V #T elim T -T
53 [ #J #H destruct
54 | #J #W #U #_ #IHU #H destruct
55   -H (**) (* destruct: the destucted equality is not erased *)
56   /2 width=1/
57 ]
58 qed-.
59
60 (* Basic properties *********************************************************)
61
62 (* Basic_1: was: term_dec *)
63 axiom term_eq_dec: ∀T1,T2:term. Decidable (T1 = T2).
64
65 (* Basic_1: removed theorems 3:
66             not_void_abst not_abbr_void not_abst_void
67 *)