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/grammar/term_simple.ma".
17 (* CONTEXT-FREE REDUCIBLE TERMS *********************************************)
20 inductive trf: predicate term ≝
21 | trf_abst_sn: ∀V,T. trf V → trf (ⓛV. T)
22 | trf_abst_dx: ∀V,T. trf T → trf (ⓛV. T)
23 | trf_appl_sn: ∀V,T. trf V → trf (ⓐV. T)
24 | trf_appl_dx: ∀V,T. trf T → trf (ⓐV. T)
25 | trf_abbr : ∀V,T. trf (ⓓV. T)
26 | trf_cast : ∀V,T. trf (ⓣV. T)
27 | trf_beta : ∀V,W,T. trf (ⓐV. ⓛW. T)
31 "context-free reducibility (term)"
32 'Reducible T = (trf T).
34 (* Basic inversion lemmas ***************************************************)
36 fact trf_inv_atom_aux: ∀I,T. 𝐑[T] → T = ⓪{I} → ⊥.
38 [ #V #T #_ #H destruct
39 | #V #T #_ #H destruct
40 | #V #T #_ #H destruct
41 | #V #T #_ #H destruct
44 | #V #W #T #H destruct
48 lemma trf_inv_atom: ∀I. 𝐑[⓪{I}] → ⊥.
51 fact trf_inv_abst_aux: ∀W,U,T. 𝐑[T] → T = ⓛW. U → 𝐑[W] ∨ 𝐑[U].
53 [ #V #T #HV #H destruct /2 width=1/
54 | #V #T #HT #H destruct /2 width=1/
55 | #V #T #_ #H destruct
56 | #V #T #_ #H destruct
59 | #V #W0 #T #H destruct
63 lemma trf_inv_abst: ∀V,T. 𝐑[ⓛV.T] → 𝐑[V] ∨ 𝐑[T].
66 fact trf_inv_appl_aux: ∀W,U,T. 𝐑[T] → T = ⓐW. U →
67 ∨∨ 𝐑[W] | 𝐑[U] | (𝐒[U] → ⊥).
69 [ #V #T #_ #H destruct
70 | #V #T #_ #H destruct
71 | #V #T #HV #H destruct /2 width=1/
72 | #V #T #HT #H destruct /2 width=1/
75 | #V #W0 #T #H destruct
76 @or3_intro2 #H elim (simple_inv_bind … H)
80 lemma trf_inv_appl: ∀W,U. 𝐑[ⓐW.U] → ∨∨ 𝐑[W] | 𝐑[U] | (𝐒[U] → ⊥).