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/notation/relations/suptermoptalt_6.ma".
16 include "basic_2/relocation/fsupq.ma".
18 (* OPTIONAL SUPCLOSURE ******************************************************)
20 (* alternative definition of fsupq *)
21 definition fsupqa: tri_relation genv lenv term ≝ tri_RC … fsup.
24 "optional structural successor (closure) alternative"
25 'SupTermOptAlt G1 L1 T1 G2 L2 T2 = (fsupqa G1 L1 T1 G2 L2 T2).
27 (* Basic properties *********************************************************)
29 lemma fsupqa_refl: tri_reflexive … fsupqa.
32 lemma fsupqa_drop: ∀G,L,K,T,U,e.
33 ⇩[0, e] L ≡ K → ⇧[0, e] T ≡ U → ⦃G, L, U⦄ ⊃⊃⸮ ⦃G, K, T⦄.
34 #G #L #K #T #U #e #HLK #HTU elim (eq_or_gt e)
35 /3 width=5 by fsup_drop_lt, or_introl/ #H destruct
36 >(ldrop_inv_O2 … HLK) -L >(lift_inv_O2 … HTU) -T //
39 (* Main properties **********************************************************)
41 theorem fsupq_fsupqa: ∀G1,G2,L1,L2,T1,T2. ⦃G1, L1, T1⦄ ⊃⸮ ⦃G2, L2, T2⦄ → ⦃G1, L1, T1⦄ ⊃⊃⸮ ⦃G2, L2, T2⦄.
42 #G1 #G2 #L1 #L2 #T1 #T2 #H elim H -G1 -G2 -L1 -L2 -T1 -T2
43 /2 width=3 by fsupqa_drop, fsup_lref_O, fsup_pair_sn, fsup_bind_dx, fsup_flat_dx, or_introl/
46 (* Main inversion properties ************************************************)
48 theorem fsupqa_inv_fsupq: ∀G1,G2,L1,L2,T1,T2. ⦃G1, L1, T1⦄ ⊃⊃⸮ ⦃G2, L2, T2⦄ → ⦃G1, L1, T1⦄ ⊃⸮ ⦃G2, L2, T2⦄.
49 #G1 #G2 #L1 #L2 #T1 #T2 #H elim H -H /2 width=1 by fsup_fsupq/
50 * #H1 #H2 #H3 destruct //
53 (* Advanced inversion lemmas ************************************************)
55 lemma fsupq_inv_gen: ∀G1,G2,L1,L2,T1,T2. ⦃G1, L1, T1⦄ ⊃⸮ ⦃G2, L2, T2⦄ →
56 ⦃G1, L1, T1⦄ ⊃ ⦃G2, L2, T2⦄ ∨ (∧∧ G1 = G2 & L1 = L2 & T1 = T2).
57 #G1 #G2 #L1 #L2 #T1 #T2 #H elim (fsupq_fsupqa … H) -H [| * ]
58 /2 width=1 by or_introl/