]> matita.cs.unibo.it Git - helm.git/blob - matita/matita/contribs/lambdadelta/basic_2/etc_2A1/fpn/bteq.etc
update in binaries for λδ
[helm.git] / matita / matita / contribs / lambdadelta / basic_2 / etc_2A1 / fpn / bteq.etc
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/notation/relations/bteq_6.ma".
16 include "basic_2/grammar/lenv_length.ma".
17 include "basic_2/grammar/genv.ma".
18
19 (* EQUIVALENT "BIG TREE" NORMAL FORMS ***************************************)
20
21 definition bteq: tri_relation genv lenv term ≝
22                  λG1,L1,T1,G2,L2,T2.
23                  ∧∧ G1 = G2 & |L1| = |L2| & T1 = T2.
24
25 interpretation
26    "equivalent 'big tree' normal forms (closure)"
27    'BTEq G1 L1 T1 G2 L2 T2 = (bteq G1 L1 T1 G2 L2 T2).
28
29 (* Basic_properties *********************************************************)
30
31 lemma bteq_refl: tri_reflexive … bteq.
32 /2 width=1 by and3_intro/ qed.
33
34 lemma bteq_sym: tri_symmetric … bteq.
35 #G1 #G2 #L1 #L2 #T1 #T2 * //
36 qed-.
37
38 lemma bteq_dec: ∀G1,G2,L1,L2,T1,T2. Decidable (⦃G1, L1, T1⦄ ⋕ ⦃G2, L2, T2⦄).
39 #G1 #G2 #L1 #L2 #T1 #T2 elim (genv_eq_dec G1 G2)
40 #H1G [2: @or_intror * #H2G #H2L #H2T destruct /2 width=1 by/ ]
41 elim (eq_nat_dec (|L1|) (|L2|))
42 #H1L [2: @or_intror * #H2G #H2L #H2T destruct /2 width=1 by/ ]
43 elim (term_eq_dec T1 T2)
44 #H1T [2: @or_intror * #H2G #H2L #H2T destruct /2 width=1 by/ ]
45 /3 width=1 by and3_intro, or_introl/
46 qed-.