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/reduction/cir.ma".
16 include "basic_2/reduction/cpr.ma".
18 (* CONTEXT-SENSITIVE PARALLEL REDUCTION FOR TERMS ***************************)
20 (* Advanced forward lemmas on irreducibility ********************************)
22 lemma cpr_fwd_cir: ∀G,L,T1,T2. ⦃G, L⦄ ⊢ T1 ➡ T2 → ⦃G, L⦄ ⊢ ➡ 𝐈⦃T1⦄ → T2 = T1.
23 #G #L #T1 #T2 #H elim H -G -L -T1 -T2
25 | #G #L #K #V1 #V2 #W2 #i #HLK #_ #HVW2 #IHV12 #H
26 elim (cir_inv_delta … HLK) //
27 | #a * #G #L #V1 #V2 #T1 #T2 #_ #_ #IHV1 #IHT1 #H
28 [ elim (cir_inv_bind … H) -H #HV1 #HT1 * #H destruct
29 lapply (IHV1 … HV1) -IHV1 -HV1 #H destruct
30 lapply (IHT1 … HT1) -IHT1 #H destruct //
31 | elim (cir_inv_ib2 … H) -H /3 width=2 by or_introl, eq_f2/
33 | * #G #L #V1 #V2 #T1 #T2 #_ #_ #IHV1 #IHT1 #H
34 [ elim (cir_inv_appl … H) -H #HV1 #HT1 #_
35 >IHV1 -IHV1 // -HV1 >IHT1 -IHT1 //
36 | elim (cir_inv_ri2 … H) /2 width=1 by/
38 | #G #L #V1 #T1 #T #T2 #_ #_ #_ #H
39 elim (cir_inv_ri2 … H) /2 width=1 by or_introl/
40 | #G #L #V1 #T1 #T2 #_ #_ #H
41 elim (cir_inv_ri2 … H) /2 width=1 by/
42 | #a #G #L #V1 #V2 #W1 #W2 #T1 #T2 #_ #_ #_ #_ #_ #_ #H
43 elim (cir_inv_appl … H) -H #_ #_ #H
44 elim (simple_inv_bind … H)
45 | #a #G #L #V #V1 #V2 #W1 #W2 #T1 #T2 #_ #_ #_ #_ #_ #_ #_ #H
46 elim (cir_inv_appl … H) -H #_ #_ #H
47 elim (simple_inv_bind … H)