]> matita.cs.unibo.it Git - helm.git/blob - matita/matita/contribs/lambdadelta/ground/lib/list_rcons.ma
update in delayed_updating
[helm.git] / matita / matita / contribs / lambdadelta / ground / lib / list_rcons.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/notation/functions/oplusleft_3.ma".
16 include "ground/lib/list_append.ma".
17
18 (* RIGHT CONS FOR LISTS *****************************************************)
19
20 interpretation
21   "right cons (lists)"
22   'OPlusLeft A hd tl = (list_append A hd (list_lcons A tl (list_empty A))).
23
24 (* Basic constructions ******************************************************)
25
26 lemma list_cons_comm (A):
27       ∀a. a ⨮ ⓔ = ⓔ ⨭{A} a.
28 // qed.
29
30 lemma list_cons_shift (A):
31       ∀a1,l,a2. a1 ⨮{A} l ⨭ a2 = (a1 ⨮ l) ⨭ a2.
32 // qed.
33
34 (* Advanced constructions ***************************************************)
35
36 (* Note: this is list_append_lcons_dx *)
37 lemma list_append_rcons_sn (A):
38       ∀l1,l2,a. l1 ⨁ (a ⨮ l2) = (l1 ⨭ a) ⨁{A} l2.
39 // qed.
40
41 lemma list_append_rcons_dx (A):
42       ∀l1,l2,a. l1 ⨁ l2 ⨭ a = l1 ⨁{A} (l2 ⨭ a).
43 // qed.
44
45 (* Basic inversions *********************************************************)
46
47 lemma eq_inv_list_empty_rcons (A):
48       ∀l,a. ⓔ = l⨭{A}a → ⊥.
49 #A #l #a #H
50 elim (eq_inv_list_empty_append … H) -H #_ #H destruct
51 qed-.