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 "hints_declaration.ma".
17 nrecord eliminator (P_ : Prop) (T_ : Type[1]) : Type[1] ≝ {
23 notation "\elim term 90 x term 90 P" non associative with precedence 90
24 for @{'elim ?? ? $x … $P … $x}.
25 interpretation "elimP" 'elim = elimP.
26 interpretation "elimT" 'elim = elimT.
28 ninductive nat : Type[0] ≝ O : nat | S : nat → nat.
30 ndefinition eP ≝ mk_eliminator ?? nat (λ_.nat_ind) (λ_.nat_rect_Type0).
32 alias symbol "hint_decl" (instance 1) = "hint_decl_Type1".
35 (*-----------------------------------------*) ⊢
38 ninductive list (A : Type[0]) : nat → Type[0] ≝
40 | cons : ∀n.A → list A n → list A (S n).
42 ndefinition eL ≝ λA,n.
43 mk_eliminator ?? (list A n) (λ_.list_ind A) (λ_.list_rect_Type0 A).
45 alias symbol "hint_decl" (instance 1) = "hint_decl_Type1".
46 unification hint 0 ≔ A,n;
48 (*-----------------------------------------*) ⊢
49 indty ?? X ≡ list A n.
51 naxiom A : ∀n1,n2.∀l1:list nat n1.∀l2:list nat n2.Prop.
53 nlemma xxx : ∀n.∀x:list nat n.A ?? x x.
55 napply (\elim l (λd,y.A ?? y l));
58 ##[ ##| #len e l1 Pl1;
59 napply ((\elim ?? ? x) … x); #;#[ napply eP]
62 nrecord eliminator (indty : Type[0])
64 (t : Type[1]) : Type[2] ≝ {
72 λity,s,t.λR : eliminator ity s t. λG:s.
73 match R with [ mk_eliminator _ ⇒ G].
75 ninductive nat : Type[0] ≝ O : nat | S : nat → nat.
77 ndefinition eP := mk_eliminator nat Prop ? nat_ind.
78 ndefinition eT := mk_eliminator nat Type[0] ? nat_rect_Type0.
80 unification hint 0 ≔ G;
82 (*-----------------------------------------*) ⊢
85 unification hint 0 ≔ G;
87 (*-----------------------------------------*) ⊢
88 P nat Type[0] ? X G ≡ G.
94 ndefinition elim_gen :
95 ∀ity:Type[0].∀s,t.∀x:ity.
96 ∀e:eliminator ity s t.∀G.P ity s t e G
98 λity,s,t,x,e,G.elimp ??? e x.