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 set "baseuri" "cic:/matita/test/russell/".
17 include "nat/orders.ma".
18 include "list/list.ma".
20 inductive sigma (A:Type) (P:A → Prop) : Type ≝
21 sig_intro: ∀a:A. P a → sigma A P.
23 interpretation "sigma" 'exists \eta.x =
24 (cic:/matita/test/russell/sigma.ind#xpointer(1/1) _ x).
26 definition inject ≝ λP.λa:list nat.λp:P a. sig_intro ? P ? p.
28 coercion cic:/matita/test/russell/inject.con 0 1.
30 definition eject ≝ λP.λc: ∃n:list nat.P n. match c with [ sig_intro w _ ⇒ w].
32 coercion cic:/matita/test/russell/eject.con.
34 alias symbol "exists" (instance 2) = "exists".
35 lemma tl : ∀l:list nat. l ≠ [] → ∃l1.∃a.a :: l1 = l.
37 (λl:list nat. λH:l ≠ [].match l with [ nil ⇒ λH.[] | cons x l1 ⇒ λH.l1] H);
38 letin program_spec ≝ (program : ∀l:list nat. l ≠ [] → ∃l1.∃a.a :: l1 = l);
39 [ generalize in match H; cases l; [intros (h1); cases (h1 ?); reflexivity]
40 intros; apply (ex_intro ? ? n); apply eq_f; reflexivity; ]
44 alias symbol "exists" (instance 3) = "exists".
45 lemma tl2 : ∀l:∃l:list nat. l ≠ []. ∃l1.∃a.a :: l1 = l.
47 (λl:list nat. match l with [ nil ⇒ [] | cons x l1 ⇒ l1]);
49 (program : ∀l:∃l:list nat. l ≠ []. ∃l1.∃a.a :: l1 = l);
50 [ autobatch; | generalize in match H; clear H; cases s; simplify;
51 intros; cases (H H1); ]