]> matita.cs.unibo.it Git - helm.git/blob - matita/matita/contribs/lambda_delta/basic_2/etc/csup/csupp.etc
c28eaea73c654245336e4a44738f6b5635d85985
[helm.git] / matita / matita / contribs / lambda_delta / basic_2 / etc / csup / csupp.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 notation "hvbox( ⦃ L1, break T1 ⦄ > + break ⦃ L2 , break T2 ⦄ )"
16    non associative with precedence 45
17    for @{ 'SupTermPlus $L1 $T1 $L2 $T2 }.
18
19 include "basic_2/substitution/csup.ma".
20
21 (* PLUS-ITERATED SUPCLOSURE *************************************************)
22
23 definition csupp: bi_relation lenv term ≝ bi_TC … csup.
24
25 interpretation "plus-iterated structural predecessor (closure)"
26    'SupTermPlus L1 T1 L2 T2 = (csupp L1 T1 L2 T2).
27
28 (* Basic eliminators ********************************************************)
29
30 lemma csupp_ind: ∀L1,T1. ∀R:relation2 lenv term.
31                  (∀L2,T2. ⦃L1, T1⦄ > ⦃L2, T2⦄ → R L2 T2) →
32                  (∀L,T,L2,T2. ⦃L1, T1⦄ >+ ⦃L, T⦄ → ⦃L, T⦄ > ⦃L2, T2⦄ → R L T → R L2 T2) →
33                  ∀L2,T2. ⦃L1, T1⦄ >+ ⦃L2, T2⦄ → R L2 T2.
34 #L1 #T1 #R #IH1 #IH2 #L2 #T2 #H
35 @(bi_TC_ind … IH1 IH2 ? ? H)
36 qed-.
37
38 lemma csupp_ind_dx: ∀L2,T2. ∀R:relation2 lenv term.
39                     (∀L1,T1. ⦃L1, T1⦄ > ⦃L2, T2⦄ → R L1 T1) →
40                     (∀L1,L,T1,T. ⦃L1, T1⦄ > ⦃L, T⦄ → ⦃L, T⦄ >+ ⦃L2, T2⦄ → R L T → R L1 T1) →
41                     ∀L1,T1. ⦃L1, T1⦄ >+ ⦃L2, T2⦄ → R L1 T1.
42 #L2 #T2 #R #IH1 #IH2 #L1 #T1 #H
43 @(bi_TC_ind_dx … IH1 IH2 ? ? H)
44 qed-.
45
46 (* Basic properties *********************************************************)
47
48 lemma csup_csupp: ∀L1,L2,T1,T2. ⦃L1, T1⦄ > ⦃L2, T2⦄ → ⦃L1, T1⦄ >+ ⦃L2, T2⦄.
49 /2 width=1/ qed.
50
51 lemma csupp_strap1: ∀L1,L,L2,T1,T,T2. ⦃L1, T1⦄ >+ ⦃L, T⦄ → ⦃L, T⦄ > ⦃L2, T2⦄ →
52                     ⦃L1, T1⦄ >+ ⦃L2, T2⦄.
53 /2 width=4/ qed.
54
55 lemma csupp_strap2: ∀L1,L,L2,T1,T,T2. ⦃L1, T1⦄ > ⦃L, T⦄ → ⦃L, T⦄ >+ ⦃L2, T2⦄ →
56                     ⦃L1, T1⦄ >+ ⦃L2, T2⦄.
57 /2 width=4/ qed.
58
59 (* Basic forward lemmas *****************************************************)
60
61 lemma csupp_fwd_cw: ∀L1,L2,T1,T2. ⦃L1, T1⦄ >+ ⦃L2, T2⦄ → #{L2, T2} < #{L1, T1}.
62 #L1 #L2 #T1 #T2 #H @(csupp_ind … H) -L2 -T2
63 /3 width=3 by csup_fwd_cw, transitive_lt/
64 qed-.