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 include "Ground_2/star.ma".
16 include "Basic_2/notation.ma".
18 (* ATOMIC ARITY *************************************************************)
20 inductive aarity: Type[0] ≝
21 | AAtom: aarity (* atomic aarity construction *)
22 | APair: aarity → aarity → aarity (* binary aarity construction *)
25 interpretation "aarity construction (atomic)" 'SItem = AAtom.
27 interpretation "aarity construction (binary)" 'SItem A1 A2 = (APair A1 A2).
29 (* Basic inversion lemmas ***************************************************)
31 lemma discr_apair_xy_x: ∀A,B. 𝕔 B. A = B → False.
34 | #Y #X #IHY #_ #H destruct
35 -H >e0 in e1; normalize (**) (* destruct: one quality is not simplified, the destucted equality is not erased *)
40 lemma discr_tpair_xy_y: ∀B,A. 𝕔 B. A = A → False.
43 | #Y #X #_ #IHX #H destruct
44 -H (**) (* destruct: the destucted equality is not erased *)
49 (* Basic properties *********************************************************)
51 lemma aarity_eq_dec: ∀A1,A2:aarity. Decidable (A1 = A2).
53 [ #A2 elim A2 -A2 /2 width=1/
54 #B2 #A2 #_ #_ @or_intror #H destruct
55 | #B1 #A1 #IHB1 #IHA1 #A2 elim A2 -A2
56 [ -IHB1 -IHA1 @or_intror #H destruct
57 | #B2 #A2 #_ #_ elim (IHB1 B2) -IHB1
58 [ #H destruct elim (IHA1 A2) -IHA1
59 [ #H destruct /2 width=1/
60 | #HA12 @or_intror #H destruct /2 width=1/
62 | -IHA1 #HB12 @or_intror #H destruct /2 width=1/