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 "ground/notation/relations/rfun_c_2.ma".
16 include "ground/arith/nat_succ.ma".
17 include "ground/relocation/pr_isi.ma".
19 (* FINITE COLENGTH ASSIGNMENT FOR PARTIAL RELOCATION MAPS *******************)
22 inductive pr_fcla: relation2 pr_map nat ā
24 | pr_fcla_isi (f): šāØfā© ā pr_fcla f (š)
26 | pr_fcla_push (f) (n): pr_fcla f n ā pr_fcla (ā«Æf) n
28 | pr_fcla_next (f) (n): pr_fcla f n ā pr_fcla (āf) (ān)
32 "finite colength assignment (partial relocation maps)"
33 'RFunC f n = (pr_fcla f n).
35 (* Basic inversions *********************************************************)
38 lemma pr_fcla_inv_push (g) (m): šāØgā© ā m ā āf. ā«Æf = g ā šāØfā© ā m.
40 [ /3 width=3 by pr_fcla_isi, pr_isi_inv_push/
41 | #g #m #Hg #f #H >(eq_inv_pr_push_bi ā¦ H) -f //
42 | #g #m #_ #f #H elim (eq_inv_pr_push_next ā¦ H)
47 lemma pr_fcla_inv_next (g) (m): šāØgā© ā m ā āf. āf = g ā āān. šāØfā© ā n & ān = m.
49 [ #g #Hg #f #H destruct
50 elim (pr_isi_inv_next ā¦ Hg) -Hg //
51 | #g #m #_ #f #H elim (eq_inv_pr_next_push ā¦ H)
52 | #g #m #Hg #f #H >(eq_inv_pr_next_bi ā¦ H) -f
53 /2 width=3 by ex2_intro/
57 (* Advanced inversions ******************************************************)
60 lemma pr_cla_inv_next_succ (g) (m): šāØgā© ā m ā āf,n. āf = g ā ān = m ā šāØfā© ā n.
61 #g #m #H #f #n #H1 #H2 elim (pr_fcla_inv_next ā¦ H ā¦ H1) -g
62 #x #Hf #H destruct <(eq_inv_nsucc_bi ā¦ H) -n //
66 lemma pr_cla_inv_next_zero (g) (m): šāØgā© ā m ā āf. āf = g ā š = m ā ā„.
67 #g #m #H #f #H1 elim (pr_fcla_inv_next ā¦ H ā¦ H1) -g
68 #x #_ #H1 #H2 destruct /2 width=2 by eq_inv_zero_nsucc/
72 lemma pr_fcla_inv_zero (g) (m): šāØgā© ā m ā š = m ā šāØgā©.
73 #g #m #H elim H -g -m /3 width=3 by pr_isi_push/
74 #g #m #_ #_ #H destruct elim (eq_inv_zero_nsucc ā¦ H)
78 lemma pr_fcla_inv_isi (g) (m): šāØgā© ā m ā šāØgā© ā š = m.
79 #f #n #H elim H -f -n /3 width=3 by pr_isi_inv_push/
80 #f #n #_ #_ #H elim (pr_isi_inv_next ā¦ H) -H //