1 (**************************************************************************)
4 (* ||A|| A project by Andrea Asperti *)
6 (* ||I|| Developers: *)
7 (* ||T|| The HELM team. *)
8 (* ||A|| http://helm.cs.unibo.it *)
10 (* \ / This file is distributed under the terms of the *)
11 (* v GNU General Public License Version 2 *)
13 (**************************************************************************)
15 (* THE FORMAL SYSTEM λδ: MATITA SOURCE FILES
16 * - Patience on me to gain peace and perfection! -
17 * [ suggested invocation to start formal specifications with ]
18 * Context-sensitive subject equivalence for atomic arity assignment: 2012 April 16
19 * Context-sensitive strong normalization for simply typed terms: 2012 March 15
20 * Support for abstract candidates of reducibility closed: 2012 January 27
21 * Confluence for context-sensitive parallel reduction: 2011 September 21
22 * Confluence for context-free parallel reduction: 2011 September 6
23 * Specification starts: 2011 April 17
26 include "ground_2/star.ma".
27 include "basic_2/notation.ma".
29 (* ATOMIC ARITY *************************************************************)
31 inductive aarity: Type[0] ≝
32 | AAtom: aarity (* atomic aarity construction *)
33 | APair: aarity → aarity → aarity (* binary aarity construction *)
36 interpretation "aarity construction (atomic)"
39 interpretation "aarity construction (binary)"
40 'SnItem2 A1 A2 = (APair A1 A2).
42 (* Basic inversion lemmas ***************************************************)
44 lemma discr_apair_xy_x: ∀A,B. ②B. A = B → ⊥.
47 | #Y #X #IHY #_ #H destruct
48 -H >e0 in e1; normalize (**) (* destruct: one quality is not simplified, the destucted equality is not erased *)
53 lemma discr_tpair_xy_y: ∀B,A. ②B. A = A → ⊥.
56 | #Y #X #_ #IHX #H destruct
57 -H (**) (* destruct: the destucted equality is not erased *)
62 (* Basic properties *********************************************************)
64 lemma aarity_eq_dec: ∀A1,A2:aarity. Decidable (A1 = A2).
66 [ #A2 elim A2 -A2 /2 width=1/
67 #B2 #A2 #_ #_ @or_intror #H destruct
68 | #B1 #A1 #IHB1 #IHA1 #A2 elim A2 -A2
69 [ -IHB1 -IHA1 @or_intror #H destruct
70 | #B2 #A2 #_ #_ elim (IHB1 B2) -IHB1
71 [ #H destruct elim (IHA1 A2) -IHA1
72 [ #H destruct /2 width=1/
73 | #HA12 @or_intror #H destruct /2 width=1/
75 | -IHA1 #HB12 @or_intror #H destruct /2 width=1/