]> matita.cs.unibo.it Git - helm.git/blob - matita/matita/contribs/lambdadelta/basic_2/etc/cnx/cnx.etc
- cprs and cnx on the way
[helm.git] / matita / matita / contribs / lambdadelta / basic_2 / etc / cnx / cnx.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/reduction/cnr.ma".
16
17 (* Basic inversion lemmas ***************************************************)
18
19 lemma cnx_inv_zeta: ∀h,o,G,L,V,T. ⦃G, L⦄ ⊢ ➡[h, o] 𝐍⦃+ⓓV.T⦄ → ⊥.
20 #h #o #G #L #V #T #H elim (is_lift_dec T 0 1)
21 [ * #U #HTU
22   lapply (H U ?) -H /2 width=3 by cpx_zeta/ #H destruct
23   elim (lift_inv_pair_xy_y … HTU)
24 | #HT
25   elim (cpr_delift G(⋆) V T (⋆.ⓓV) 0) // #T2 #T1 #HT2 #HT12
26   lapply (H (+ⓓV.T2) ?) -H /5 width=1 by cpr_cpx, tpr_cpr, cpr_bind/ -HT2
27   #H destruct /3 width=2 by ex_intro/
28 ]
29 qed-.
30
31 (* Basic forward lemmas *****************************************************)
32
33 lemma cnx_fwd_cnr: ∀h,o,G,L,T. ⦃G, L⦄ ⊢ ➡[h, o] 𝐍⦃T⦄ → ⦃G, L⦄ ⊢ ➡ 𝐍⦃T⦄.
34 #h #o #G #L #T #H #U #HTU
35 @H /2 width=1 by cpr_cpx/ (**) (* auto fails because a δ-expansion gets in the way *)
36 qed-.
37
38 (* Basic properties *********************************************************)
39
40 lemma cnx_lref_free: ∀h,o,G,L,i. |L| ≤ i → ⦃G, L⦄ ⊢ ➡[h, o] 𝐍⦃#i⦄.
41 #h #o #G #L #i #HL @cnx_lref_free >(drop_fwd_length … HL) -HL //
42 qed.
43
44 axiom cnx_dec: ∀h,o,G,L,T1. ⦃G, L⦄ ⊢ ➡[h, o] 𝐍⦃T1⦄ ∨
45                ∃∃T2. ⦃G, L⦄ ⊢ T1 ➡[h, o] T2 & (T1 = T2 → ⊥).