]> matita.cs.unibo.it Git - helm.git/blobdiff - matita/matita/contribs/lambdadelta/ground/relocation/pr_ist_ist.ma
update in ground
[helm.git] / matita / matita / contribs / lambdadelta / ground / relocation / pr_ist_ist.ma
index 1d76991d1dc3d5af74e15cb6f6894977304e98a9..cfb786adcdc7e9880381f69e224489ed2ef8633e 100644 (file)
@@ -15,6 +15,7 @@
 include "ground/relocation/pr_eq.ma".
 include "ground/relocation/pr_pat_lt.ma".
 include "ground/relocation/pr_pat_pat.ma".
+include "ground/relocation/pr_nat.ma".
 include "ground/relocation/pr_ist.ma".
 
 (* TOTALITY CONDITION FOR PARTIAL RELOCATION MAPS ***************************)
@@ -22,7 +23,7 @@ include "ground/relocation/pr_ist.ma".
 (* Advanced constructions with pr_pat ***************************************)
 
 (*** at_dec *)
-lemma pr_pat_dec (f) (i1) (i2): ð\9d\90\93â\9dªfâ\9d« â\86\92 Decidable (@â\9dªi1,fâ\9d« ≘ i2).
+lemma pr_pat_dec (f) (i1) (i2): ð\9d\90\93â\9d¨fâ\9d© â\86\92 Decidable (@â\9d¨i1,fâ\9d© ≘ i2).
 #f #i1 #i2 #Hf lapply (Hf i1) -Hf *
 #j2 #Hf elim (eq_pnat_dec i2 j2)
 [ #H destruct /2 width=1 by or_introl/
@@ -31,9 +32,9 @@ lemma pr_pat_dec (f) (i1) (i2): 𝐓❪f❫ → Decidable (@❪i1,f❫ ≘ i2).
 qed-.
 
 (*** is_at_dec *)
-lemma is_pr_pat_dec (f) (i2): ð\9d\90\93â\9dªfâ\9d« â\86\92 Decidable (â\88\83i1. @â\9dªi1,fâ\9d« ≘ i2).
+lemma is_pr_pat_dec (f) (i2): ð\9d\90\93â\9d¨fâ\9d© â\86\92 Decidable (â\88\83i1. @â\9d¨i1,fâ\9d© ≘ i2).
 #f #i2 #Hf
-lapply (dec_plt (λi1.@â\9dªi1,fâ\9d« ≘ i2) … (↑i2)) [| * ]
+lapply (dec_plt (λi1.@â\9d¨i1,fâ\9d© ≘ i2) … (↑i2)) [| * ]
 [ /2 width=1 by pr_pat_dec/
 | * /3 width=2 by ex_intro, or_introl/
 | #H @or_intror * #i1 #Hi12
@@ -44,8 +45,8 @@ qed-.
 (* Main destructions with pr_pat ********************************************)
 
 (*** at_ext *)
-corec theorem pr_eq_ext_pat (f1) (f2): ð\9d\90\93â\9dªf1â\9d« â\86\92 ð\9d\90\93â\9dªf2â\9d« →
-              (â\88\80i,i1,i2. @â\9dªi,f1â\9d« â\89\98 i1 â\86\92 @â\9dªi,f2â\9d« ≘ i2 → i1 = i2) →
+corec theorem pr_eq_ext_pat (f1) (f2): ð\9d\90\93â\9d¨f1â\9d© â\86\92 ð\9d\90\93â\9d¨f2â\9d© →
+              (â\88\80i,i1,i2. @â\9d¨i,f1â\9d© â\89\98 i1 â\86\92 @â\9d¨i,f2â\9d© ≘ i2 → i1 = i2) →
               f1 ≡ f2.
 cases (pr_map_split_tl f1) #H1
 cases (pr_map_split_tl f2) #H2
@@ -66,3 +67,12 @@ cases (pr_map_split_tl f2) #H2
   lapply (Hi i (↑i1) (↑i2) ??) /2 width=5 by pr_pat_next/
 ]
 qed-.
+
+(* Advanced constructions with pr_nat ***************************************)
+
+lemma is_pr_nat_dec (f) (l2): 𝐓❨f❩ → Decidable (∃l1. @↑❨l1,f❩ ≘ l2).
+#f #l2 #Hf elim (is_pr_pat_dec … (↑l2) Hf)
+[ * /3 width=2 by ex_intro, or_introl/
+| #H @or_intror * /3 width=2 by ex_intro/
+]
+qed-.