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 "static_2/static/reqg_reqg.ma".
16 include "static_2/static/feqg.ma".
18 (* GENERIC EQUIVALENCE FOR CLOSURES ON REFERRED ENTRIES *********************)
20 (* Advanced properties ******************************************************)
23 reflexive … S → symmetric … S →
24 tri_symmetric … (feqg S).
25 #S #H1S #H2S #G1 #G2 #L1 #L2 #T1 #T2 * -G1 -L1 -T1
26 /3 width=1 by feqg_intro_dx, reqg_sym, teqg_sym/
30 (∀s1,s2. Decidable … (S s1 s2)) →
31 ∀G1,G2,L1,L2,T1,T2. Decidable (❪G1,L1,T1❫ ≛[S] ❪G2,L2,T2❫).
32 #S #HS #G1 #G2 #L1 #L2 #T1 #T2
33 elim (eq_genv_dec G1 G2) #HnG destruct
34 [ elim (reqg_dec … HS L1 L2 T1) #HnL
35 [ elim (teqg_dec … HS T1 T2) #HnT
36 [ /3 width=1 by feqg_intro_sn, or_introl/ ]
40 elim (feqg_inv_gen_sn … H) -H #H #HL #HT destruct
44 (* Main properties **********************************************************)
46 theorem feqg_trans (S):
47 reflexive … S → symmetric … S → Transitive … S →
48 tri_transitive … (feqg S).
49 #S #H1S #H2S #H3S #G1 #G #L1 #L #T1 #T * -G -L -T
50 #L #T #HL1 #HT1 #G2 #L2 #T2 * -G2 -L2 -T2
51 /4 width=8 by feqg_intro_sn, reqg_trans, teqg_reqg_div, teqg_trans/
54 theorem feqg_canc_sn (S):
55 reflexive … S → symmetric … S → Transitive … S →
56 ∀G,G1,L,L1,T,T1. ❪G,L,T❫ ≛[S] ❪G1,L1,T1❫ →
57 ∀G2,L2,T2. ❪G,L,T❫ ≛[S] ❪G2,L2,T2❫ → ❪G1,L1,T1❫ ≛[S] ❪G2,L2,T2❫.
58 /3 width=5 by feqg_trans, feqg_sym/ qed-.
60 theorem feqg_canc_dx (S):
61 reflexive … S → symmetric … S → Transitive … S →
62 ∀G1,G,L1,L,T1,T. ❪G1,L1,T1❫ ≛[S] ❪G,L,T❫ →
63 ∀G2,L2,T2. ❪G2,L2,T2❫ ≛[S] ❪G,L,T❫ → ❪G1,L1,T1❫ ≛[S] ❪G2,L2,T2❫.
64 /3 width=5 by feqg_trans, feqg_sym/ qed-.
66 (* Main inversion lemmas with generic equivalence on terms ******************)
68 theorem feqg_tneqg_repl_dx (S):
69 reflexive … S → symmetric … S → Transitive … S →
70 ∀G1,G2,L1,L2,T1,T2. ❪G1,L1,T1❫ ≛[S] ❪G2,L2,T2❫ →
71 ∀U1,U2. ❪G1,L1,U1❫ ≛[S] ❪G2,L2,U2❫ →
72 (T2 ≛[S] U2 → ⊥) → (T1 ≛[S] U1 → ⊥).
73 #S #H1S #H2S #H3S #G1 #G2 #L1 #L2 #T1 #T2 #HT #U1 #U2 #HU #HnTU2 #HTU1
74 elim (feqg_inv_gen_sn … HT) -HT #_ #_ #HT
75 elim (feqg_inv_gen_sn … HU) -HU #_ #_ #HU
76 /3 width=5 by teqg_repl/