]> matita.cs.unibo.it Git - helm.git/blob - matita/matita/contribs/lambda/term.ma
- lambda: some parts commented out, some refactoring
[helm.git] / matita / matita / contribs / lambda / 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 (* Initial invocation: - Patience on us to gain peace and perfection! - *)
16
17 include "preamble.ma".
18
19 (* TERM STRUCTURE ***********************************************************)
20
21 (* Policy: term metavariables : A, B, C, D, M, N
22            depth metavariables: i, j
23 *)
24 inductive term: Type[0] ≝
25 | VRef: nat  → term        (* variable reference by depth *)
26 | Abst: term → term        (* function formation          *)
27 | Appl: term → term → term (* function application        *)
28 .
29
30 interpretation "term construction (variable reference by index)"
31    'VariableReferenceByIndex i = (VRef i).
32
33 interpretation "term construction (abstraction)"
34    'Abstraction A = (Abst A).
35
36 interpretation "term construction (application)"
37    'Application C A = (Appl C A).
38
39 notation "hvbox( # term 90 i )"
40  non associative with precedence 90
41  for @{ 'VariableReferenceByIndex $i }.
42
43 notation "hvbox( 𝛌  . term 46 A )"
44    non associative with precedence 46
45    for @{ 'Abstraction $A }.
46
47 notation "hvbox( @ term 46 C . break term 46 A )"
48    non associative with precedence 46
49    for @{ 'Application $C $A }.
50 (*
51 definition appl_compatible_dx: predicate (relation term) ≝ λR.
52                                ∀B,A1,A2. R A1 A2 → R (@B.A1) (@B.A2).
53
54 lemma star_appl_compatible_dx: ∀R. appl_compatible_dx R →
55                                appl_compatible_dx (star … R).
56 #R #HR #B #A1 #A2 #H elim H -A2 // /3 width=3/
57 qed.
58 *)