]> matita.cs.unibo.it Git - helm.git/blob - matita/contribs/LOGIC/Insert/inv.ma
b612858a316477650866ec4a88c087de5629868e
[helm.git] / matita / contribs / LOGIC / Insert / inv.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 set "baseuri" "cic:/matita/LOGIC/Insert/inv".
16
17 (*
18 *)
19
20 include "Insert/defs.ma".
21 (*
22 theorem insert_inv_zero: \forall S,P,Q. Insert S zero P Q \to Q = abst P S.
23  intros; inversion H; clear H; intros; subst; autobatch.
24 qed.
25
26 theorem insert_inv_succ: \forall S,Q1,Q2,i. Insert S (succ i) Q1 Q2 \to
27                          \exists P1,P2,R. Insert S i P1 P2 \land
28                                           Q1 = abst P1 R \land Q2 = abst P2 R.
29  intros; inversion H; clear H; intros; subst; autobatch depth = 6 size = 8.
30 qed.
31
32 theorem insert_inv_leaf_1: \forall Q,S,i. Insert S i leaf Q \to
33                            i = zero \land Q = S.
34  intros. inversion H; clear H; intros; subst. autobatch.
35 qed.
36
37 theorem insert_inv_abst_1: \forall P,Q,R,S,i. Insert S i (abst P R) Q \to
38                            (i = zero \land Q = (abst (abst P R) S)) \lor
39                            \exists n, c1. 
40                            i = succ n \land Q = abst c1 R \land 
41                            Insert S n P c1.
42  intros. inversion H; clear H; intros; subst; autobatch depth = 6 size =  8.
43 qed.
44
45 theorem insert_inv_leaf_2: \forall P,S,i. Insert S i P leaf \to False.
46  intros. inversion H; clear H; intros; subst.
47 qed.
48
49 theorem insert_inv_abst_2: \forall P,i. \forall R,S:Sequent.
50                            Insert S i P R \to 
51                            i = zero \land P = leaf \land R = S.
52  intros. inversion H; clear H; intros; subst; 
53  [ autobatch
54  | clear H1. lapply linear insert_inv_leaf_2 to H. decompose
55  ].
56 qed.
57 *)