]> matita.cs.unibo.it Git - helm.git/blob - matita/matita/contribs/lambda_delta/basic_2/grammar/aarity.ma
- support for pointwise extensions of a term relation started ...
[helm.git] / matita / matita / contribs / lambda_delta / basic_2 / grammar / aarity.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 (* THE FORMAL SYSTEM λδ: MATITA SOURCE FILES
16  * Suggested invocation to start formal specifications with:
17  *   - Patience on me to gain peace and perfection! -
18  * 2012 July 26:
19  *   term binders polarized to control ζ reduction.
20  * 2012 April 16 (anniversary milestone):
21  *   context-sensitive subject equivalence for atomic arity assignment.
22  * 2012 March 15:
23  *   context-sensitive strong normalization for simply typed terms.
24  * 2012 January 27:
25  *   support for abstract candidates of reducibility.
26  * 2011 September 21:
27  *   confluence for context-sensitive parallel reduction. 
28  * 2011 September 6:
29  *   confluence for context-free parallel reduction.
30  * 2011 April 17:
31  *   specification starts.
32  *)
33
34 include "ground_2/star.ma".
35 include "basic_2/notation.ma".
36
37 (* ATOMIC ARITY *************************************************************)
38
39 inductive aarity: Type[0] ≝
40   | AAtom: aarity                   (* atomic aarity construction *)
41   | APair: aarity → aarity → aarity (* binary aarity construction *)
42 .
43
44 interpretation "aarity construction (atomic)"
45    'Item0 = AAtom.
46
47 interpretation "aarity construction (binary)"
48    'SnItem2 A1 A2 = (APair A1 A2).
49
50 (* Basic inversion lemmas ***************************************************)
51
52 lemma discr_apair_xy_x: ∀A,B. ②B. A = B → ⊥.
53 #A #B elim B -B
54 [ #H destruct
55 | #Y #X #IHY #_ #H destruct
56   -H >e0 in e1; normalize (**) (* destruct: one quality is not simplified, the destucted equality is not erased *)
57   /2 width=1/
58 ]
59 qed-.
60
61 lemma discr_tpair_xy_y: ∀B,A. ②B. A = A → ⊥.
62 #B #A elim A -A
63 [ #H destruct
64 | #Y #X #_ #IHX #H destruct
65   -H (**) (* destruct: the destucted equality is not erased *)
66   /2 width=1/
67 ]
68 qed-.
69
70 (* Basic properties *********************************************************)
71
72 lemma aarity_eq_dec: ∀A1,A2:aarity. Decidable (A1 = A2).
73 #A1 elim A1 -A1
74 [ #A2 elim A2 -A2 /2 width=1/
75   #B2 #A2 #_ #_ @or_intror #H destruct
76 | #B1 #A1 #IHB1 #IHA1 #A2 elim A2 -A2
77   [ -IHB1 -IHA1 @or_intror #H destruct
78   | #B2 #A2 #_ #_ elim (IHB1 B2) -IHB1
79     [ #H destruct elim (IHA1 A2) -IHA1
80       [ #H destruct /2 width=1/
81       | #HA12 @or_intror #H destruct /2 width=1/
82       ]
83     | -IHA1 #HB12 @or_intror #H destruct /2 width=1/
84     ]
85   ]
86 ]
87 qed-.