]> matita.cs.unibo.it Git - helm.git/blob - matita/matita/contribs/lambdadelta/basic_2A/static/aaa_fqus.ma
update in lambdadelta
[helm.git] / matita / matita / contribs / lambdadelta / basic_2A / static / aaa_fqus.ma
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_2A/multiple/fqus_alt.ma".
16 include "basic_2A/static/aaa_lift.ma".
17
18 (* ATONIC ARITY ASSIGNMENT ON TERMS *****************************************)
19
20 (* Properties on supclosure *************************************************)
21
22 lemma aaa_fqu_conf: ∀G1,G2,L1,L2,T1,T2. ⦃G1, L1, T1⦄ ⊐ ⦃G2, L2, T2⦄ →
23                     ∀A1. ⦃G1, L1⦄ ⊢ T1 ⁝ A1 → ∃A2. ⦃G2, L2⦄ ⊢ T2 ⁝ A2.
24 #G1 #G2 #L1 #L2 #T1 #T2 #H elim H -G1 -G2 -L1 -L2 -T1 -T2
25 [ #I #G #L #T #A #H elim (aaa_inv_lref … H) -H
26   #J #K #V #H #HA lapply (drop_inv_O2 … H) -H
27   #H destruct /2 width=2 by ex_intro/
28 | * [ #a ] * #G #L #V #T #X #H
29   [ elim (aaa_inv_abbr … H)
30   | elim (aaa_inv_abst … H)
31   | elim (aaa_inv_appl … H)
32   | elim (aaa_inv_cast … H)
33   ] -H /2 width=2 by ex_intro/
34 | #a * #G #L #V #T #X #H
35   [ elim (aaa_inv_abbr … H)
36   | elim (aaa_inv_abst … H)
37   ] -H /2 width=2 by ex_intro/
38 | * #G #L #V #T #X #H
39   [ elim (aaa_inv_appl … H)
40   | elim (aaa_inv_cast … H)
41   ] -H /2 width=2 by ex_intro/
42 | /3 width=9 by aaa_inv_lift, ex_intro/
43 ]
44 qed-.
45
46 lemma aaa_fquq_conf: ∀G1,G2,L1,L2,T1,T2. ⦃G1, L1, T1⦄ ⊐⸮ ⦃G2, L2, T2⦄ →
47                      ∀A1. ⦃G1, L1⦄ ⊢ T1 ⁝ A1 → ∃A2. ⦃G2, L2⦄ ⊢ T2 ⁝ A2.
48 #G1 #G2 #L1 #L2 #T1 #T2 #H elim(fquq_inv_gen … H) -H /2 width=6 by aaa_fqu_conf/
49 * #H1 #H2 #H3 destruct /2 width=2 by ex_intro/
50 qed-.
51
52 lemma aaa_fqup_conf: ∀G1,G2,L1,L2,T1,T2. ⦃G1, L1, T1⦄ ⊐+ ⦃G2, L2, T2⦄ →
53                      ∀A1. ⦃G1, L1⦄ ⊢ T1 ⁝ A1 → ∃A2. ⦃G2, L2⦄ ⊢ T2 ⁝ A2.
54 #G1 #G2 #L1 #L2 #T1 #T2 #H @(fqup_ind … H) -G2 -L2 -T2
55 [2: #G #G2 #L #L2 #T #T2 #_ #H2 #IH1 #A #HA elim (IH1 … HA) -IH1 -A ]
56 /2 width=6 by aaa_fqu_conf/
57 qed-.
58
59 lemma aaa_fqus_conf: ∀G1,G2,L1,L2,T1,T2. ⦃G1, L1, T1⦄ ⊐* ⦃G2, L2, T2⦄ →
60                      ∀A1. ⦃G1, L1⦄ ⊢ T1 ⁝ A1 → ∃A2. ⦃G2, L2⦄ ⊢ T2 ⁝ A2.
61 #G1 #G2 #L1 #L2 #T1 #T2 #H elim(fqus_inv_gen … H) -H /2 width=6 by aaa_fqup_conf/
62 * #H1 #H2 #H3 destruct /2 width=2 by ex_intro/
63 qed-.