]> matita.cs.unibo.it Git - helm.git/blob - sn.ma
339aa424ab1dc145d5eba7bb028f8b0f39277d15
[helm.git] / sn.ma
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 "lambda/types.ma".
16
17 (* all(P,l) holds when P holds for all members of l *)
18 let rec all (P:T→Prop) l on l ≝ match l with 
19    [ nil ⇒ True
20    | cons A D ⇒ P A ∧ all P D
21    ].
22
23 (* Appl F l generalizes App applying F to a list of arguments
24  * The head of l is applied first
25  *)
26 let rec Appl F l on l ≝ match l with 
27    [ nil ⇒ F
28    | cons A D ⇒ Appl (App F A) D  
29    ].
30
31 (* STRONGLY NORMALIZING TERMS *************************************************)
32
33 (* SN(t) holds when t is strongly normalizing *)
34 (* FG: we axiomatize it for now because we dont have reduction yet *)
35 axiom SN: T → Prop.
36
37 (* axiomatization of SN *******************************************************)
38
39 axiom sn_sort: ∀l,n. all SN l → SN (Appl (Sort n) l).
40
41 axiom sn_rel: ∀l,i. all SN l → SN (Appl (Rel i) l).
42
43 axiom sn_lambda: ∀B,F. SN B → SN F → SN (Lambda B F).
44
45 axiom sn_beta: ∀F,A,B,l. SN B → SN A →
46                SN (Appl F[0:=A] l) → SN (Appl (Lambda B F) (A::l)).