]> matita.cs.unibo.it Git - helm.git/blob - matita/matita/contribs/lambdadelta/static_2/syntax/ac.ma
update in ground_2 static_2 basic_2
[helm.git] / matita / matita / contribs / lambdadelta / static_2 / syntax / ac.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 "ground_2/lib/arith.ma".
16
17 (* APPLICABILITY CONDITION  *************************************************)
18
19 (* applicability condition specification *)
20 record ac: Type[0] ≝ {
21 (* degree of the sort *)
22    appl: predicate nat
23 }.
24
25 (* applicability condition postulates *)
26 record ac_props (a): Prop ≝ {
27    ac_dec: ∀m. Decidable (∃∃n. m ≤ n & appl a n)
28 }.
29
30 (* Notable specifications ***************************************************)
31
32 definition apply_top: predicate nat ≝ λn. ⊤.
33
34 definition ac_top: ac ≝ mk_ac apply_top.
35
36 lemma ac_top_props: ac_props ac_top ≝ mk_ac_props ….
37 /3 width=3 by or_introl, ex2_intro/
38 qed.
39
40 definition ac_eq (k): ac ≝ mk_ac (eq … k).
41
42 lemma ac_eq_props (k): ac_props (ac_eq k) ≝ mk_ac_props ….
43 #m elim (le_dec m k) #Hm
44 [ /3 width=3 by or_introl, ex2_intro/
45 | @or_intror * #n #Hmn #H destruct /2 width=1 by/
46 ]
47 qed.