]> matita.cs.unibo.it Git - helm.git/blob - matita/matita/contribs/lambdadelta/basic_2/etc_new/gget/gget_gget.etc
frees_drops completed!
[helm.git] / matita / matita / contribs / lambdadelta / basic_2 / etc_new / gget / gget_gget.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/substitution/gget.ma".
16
17 (* GLOBAL ENVIRONMENT READING ***********************************************)
18
19 (* Main properties **********************************************************)
20
21 theorem gget_mono: ∀G,G1,m. ⬇[m] G ≡ G1 → ∀G2. ⬇[m] G ≡ G2 → G1 = G2.
22 #G #G1 #m #H elim H -G -G1
23 [ #G #Hm #G2 #H
24   >(gget_inv_gt … H Hm) -H -Hm //
25 | #G #Hm #G2 #H
26   >(gget_inv_eq … H Hm) -H -Hm //
27 | #I #G #G1 #V #Hm #_ #IHG1 #G2 #H
28   lapply (gget_inv_lt … H Hm) -H -Hm /2 width=1 by/
29 ]
30 qed-.
31
32 lemma gget_dec: ∀G1,G2,m. Decidable (⬇[m] G1 ≡ G2).
33 #G1 #G2 #m
34 elim (gget_total m G1) #G #HG1
35 elim (eq_genv_dec G G2) #HG2
36 [ destruct /2 width=1 by or_introl/
37 | @or_intror #HG12
38   lapply (gget_mono … HG1 … HG12) -HG1 -HG12 /2 width=1 by/
39 ]
40 qed-.