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 "basic_2/notation/relations/bteq_6.ma".
16 include "basic_2/grammar/lenv_length.ma".
17 include "basic_2/grammar/genv.ma".
19 (* EQUIVALENT "BIG TREE" NORMAL FORMS ***************************************)
21 definition bteq: tri_relation genv lenv term ≝
23 ∧∧ G1 = G2 & |L1| = |L2| & T1 = T2.
26 "equivalent 'big tree' normal forms (closure)"
27 'BTEq G1 L1 T1 G2 L2 T2 = (bteq G1 L1 T1 G2 L2 T2).
29 (* Basic_properties *********************************************************)
31 lemma bteq_refl: tri_reflexive … bteq.
32 /2 width=1 by and3_intro/ qed.
34 lemma bteq_sym: tri_symmetric … bteq.
35 #G1 #G2 #L1 #L2 #T1 #T2 * //
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/