Theory path

Parents

Contents

Type operators

Constants

Definitions

PL_defSN_defdrop_defel_defevery_defexists_deffilter_deffinite_deffirstP_at_deffirst_deffirst_label_defis_stopped_deflabels_deflast_thmlength_defmem_defnth_label_defokpath_defokpath_f_defparallel_comp_defpath_TY_DEFpath_absrep_bijectionspconcat_defpcons_defpgenerate_defplink_defpmap_defseg_defstopped_at_deftail_deftake_deftrace_machine_defunfold_def

Theorems

EXISTS_pathFORALL_pathIN_PL_dropLTAKE_labelsPL_0PL_downward_closedPL_dropPL_pconsPL_pmapPL_segPL_stopped_atPL_takePL_thmSN_finite_pathsSN_finite_paths_EQalt_length_thmbuild_pcomp_tracedrop_computedrop_eq_pconsdrop_not_stoppeddrop_tail_commuteel_computeel_dropel_pgenerateel_pmapevery_coinductionevery_elevery_thmexists_elexists_inductionexists_thmfilter_everyfinite_dropfinite_labelsfinite_last_elfinite_lengthfinite_okpath_indfinite_path_end_casesfinite_path_indfinite_paths_SNfinite_pconcatfinite_plinkfinite_pmapfinite_segfinite_takefinite_take_allfinite_thmfirstP_at_thmfirstP_at_uniquefirstP_at_zerofirst_dropfirst_label_dropfirst_plinkfirst_pmapfirst_segfirst_takefirst_thmfromPath_11fromPath_ontoinfinite_PLinfinite_path_casesis_stopped_thmlabels_LMAPlabels_plinklabels_unfoldlast_plinklast_pmaplast_seglast_takelength_caseslength_droplength_never_zerolength_pmaplength_takelength_thmmem_thmnot_everynot_existsnth_label_LNTHnth_label_LTAKEnth_label_computenth_label_dropnth_label_pgeneratenth_label_pmapnth_label_takenumeral_dropokpath_casesokpath_co_indokpath_dropokpath_monotoneokpath_parallel_compokpath_plinkokpath_pmapokpath_segokpath_takeokpath_thmokpath_unfoldpath_Axiompath_bisimulationpath_casespath_rep_bijections_thmpconcat_eq_pconspconcat_eq_stoppedpconcat_thmpcons_11pgenerate_11pgenerate_infinitepgenerate_not_stoppedpgenerate_ontopmap_thmrecursive_segsimulation_trace_inclusionsingleton_segstopped_at_11stopped_at_not_pconstail_droptake_computetoPath_11toPath_ontotrace_machine_thmtrace_machine_thm2unfold_thmunfold_thm2

Definitions

⊢ ∀p. PL p = {i | finite p ⇒ i < THE (length p)}
⊢ ∀R. SN R ⇔ WF (λx y. ∃l. R y l x)
⊢ (∀p. drop 0 p = p) ∧ ∀n p. drop (SUC n) p = drop n (tail p)
⊢ (∀p. el 0 p = first p) ∧ ∀n p. el (SUC n) p = el n (tail p)
⊢ ∀P p. every P p ⇔ ¬exists ($¬ ∘ P) p
⊢ ∀P p. exists P p ⇔ ∃i. firstP_at P p i
filter_def
⊢ ∀P. (∀x. P x ⇒ filter P (stopped_at x) = stopped_at x) ∧
      ∀x r p.
        filter P (pcons x r p) =
        if P x then
          if exists P p then pcons x r (filter P p) else stopped_at x
        else filter P p
⊢ ∀sigma. finite sigma ⇔ LFINITE (SND (fromPath sigma))
⊢ ∀P p i. firstP_at P p i ⇔ i ∈ PL p ∧ P (el i p) ∧ ∀j. j < i ⇒ ¬P (el j p)
⊢ ∀p. first p = FST (fromPath p)
first_label_def
⊢ ∀x r p. first_label (pcons x r p) = r
⊢ ∀p. is_stopped p ⇔ ∃x. p = stopped_at x
labels_def
⊢ (∀x. labels (stopped_at x) = [||]) ∧
  ∀x r p. labels (pcons x r p) = r:::labels p
last_thm
⊢ (∀x. last (stopped_at x) = x) ∧ ∀x r p. last (pcons x r p) = last p
⊢ ∀p. length p =
      if finite p then SOME (LENGTH (THE (toList (SND (fromPath p)))) + 1)
      else NONE
⊢ ∀s p. mem s p ⇔ ∃i. i ∈ PL p ∧ s = el i p
⊢ (∀p. nth_label 0 p = first_label p) ∧
  ∀n p. nth_label (SUC n) p = nth_label n (tail p)
⊢ ∀R. okpath R = gfp (okpath_f R)
⊢ ∀R X.
    okpath_f R X =
    {stopped_at x | x ∈ 𝕌(:α)} ∪ {pcons x r p | R x r (first p) ∧ p ∈ X}
⊢ ∀m1 m2 s1 s2 l s1' s2'.
    parallel_comp m1 m2 (s1,s2) l (s1',s2') ⇔ m1 s1 l s1' ∧ m2 s2 l s2'
path_TY_DEF
⊢ ∃rep. TYPE_DEFINITION (λx. T) rep
path_absrep_bijections
⊢ (∀a. toPath (fromPath a) = a) ∧ ∀r. (λx. T) r ⇔ fromPath (toPath r) = r
⊢ ∀p1 lab p2.
    pconcat p1 lab p2 =
    toPath
      (first p1,SND (fromPath p1) ++ₗ (lab,first p2):::SND (fromPath p2))
⊢ ∀x r p. pcons x r p = toPath (x,(r,first p):::SND (fromPath p))
pgenerate_def
⊢ ∀f g. pgenerate f g = pcons (f 0) (g 0) (pgenerate (f ∘ SUC) (g ∘ SUC))
⊢ ∀f g p. pmap f g p = toPath ((f ## LMAP (g ## f)) (fromPath p))
⊢ ∀i j p. seg i j p = take (j − i) (drop i p)
⊢ ∀x. stopped_at x = toPath (x,[||])
tail_def
⊢ ∀x r p. tail (pcons x r p) = p
⊢ (∀p. take 0 p = stopped_at (first p)) ∧
  ∀n p. take (SUC n) p = pcons (first p) (first_label p) (take n (tail p))
⊢ ∀P s l s'. trace_machine P s l s' ⇔ P (s ++ [l]) ∧ s' = s ++ [l]
⊢ ∀proj f s.
    unfold proj f s =
    toPath
      (proj s,
       LUNFOLD
         (λs. OPTION_MAP (λ(next_s,lbl). (next_s,lbl,proj next_s)) (f s)) s)

Theorems

⊢ ∀P. (∃p. P p) ⇔ (∃x. P (stopped_at x)) ∨ ∃x r p. P (pcons x r p)
⊢ ∀P. (∀p. P p) ⇔ (∀x. P (stopped_at x)) ∧ ∀x r p. P (pcons x r p)
⊢ ∀i j p. i ∈ PL p ⇒ (j ∈ PL (drop i p) ⇔ i + j ∈ PL p)
⊢ ∀n p l.
    LTAKE n (labels p) = SOME l ⇔
    n ∈ PL p ∧ toList (labels (take n p)) = SOME l
⊢ ∀p. 0 ∈ PL p
⊢ ∀i p. i ∈ PL p ⇒ ∀j. j < i ⇒ j ∈ PL p
⊢ ∀p i. i ∈ PL p ⇒ PL (drop i p) = IMAGE (λn. n − i) (PL p)
⊢ ∀x r q. PL (pcons x r q) = 0 INSERT IMAGE SUC (PL q)
⊢ PL (pmap f g p) = PL p
⊢ ∀i j p. i ≤ j ∧ j ∈ PL p ⇒ PL (seg i j p) = {n | n ≤ j − i}
⊢ ∀x. PL (stopped_at x) = {0}
⊢ ∀p i. i ∈ PL p ⇒ PL (take i p) = {n | n ≤ i}
⊢ (∀x. PL (stopped_at x) = {0}) ∧
  ∀x r q. PL (pcons x r q) = 0 INSERT IMAGE SUC (PL q)
⊢ ∀R p. SN R ∧ okpath R p ⇒ finite p
⊢ ∀R. SN R ⇔ ∀p. okpath R p ⇒ finite p
⊢ (∀x. length (stopped_at x) = SOME 1) ∧
  ∀x r p. length (pcons x r p) = OPTION_MAP SUC (length p)
⊢ ∀m1 p1 m2 p2.
    okpath m1 p1 ∧ okpath m2 p2 ∧ labels p1 = labels p2 ⇒
    ∃p. okpath (parallel_comp m1 m2) p ∧ labels p = labels p1 ∧
        first p = (first p1,first p2)
drop_compute
⊢ (∀p. drop 0 p = p) ∧
  (∀n p. drop (NUMERAL (BIT1 n)) p = drop (NUMERAL (BIT1 n) − 1) (tail p)) ∧
  ∀n p. drop (NUMERAL (BIT2 n)) p = drop (NUMERAL (BIT1 n)) (tail p)
⊢ ∀n p h l t. n ∈ PL p ∧ drop n p = pcons h l t ⇒ n + 1 ∈ PL p
⊢ ∀i p. SUC i ∈ PL p ⇒ ∃v r q. drop i p = pcons v r q
⊢ ∀i p. SUC i ∈ PL p ⇒ drop i (tail p) = tail (drop i p)
el_compute
⊢ (∀p. el 0 p = first p) ∧
  (∀n p. el (NUMERAL (BIT1 n)) p = el (NUMERAL (BIT1 n) − 1) (tail p)) ∧
  ∀n p. el (NUMERAL (BIT2 n)) p = el (NUMERAL (BIT1 n)) (tail p)
⊢ ∀i j p. i + j ∈ PL p ⇒ el i (drop j p) = el (i + j) p
⊢ ∀n f g. el n (pgenerate f g) = f n
⊢ ∀i p. i ∈ PL p ⇒ el i (pmap f g p) = f (el i p)
⊢ ∀P Q.
    (∀x. P (stopped_at x) ⇒ Q x) ∧ (∀x r p. P (pcons x r p) ⇒ Q x ∧ P p) ⇒
    ∀p. P p ⇒ every Q p
⊢ ∀P p. every P p ⇔ ∀i. i ∈ PL p ⇒ P (el i p)
⊢ ∀P. (∀x. every P (stopped_at x) ⇔ P x) ∧
      ∀x r p. every P (pcons x r p) ⇔ P x ∧ every P p
⊢ ∀P p. exists P p ⇔ ∃i. i ∈ PL p ∧ P (el i p)
⊢ (∀x. Q x ⇒ P (stopped_at x)) ∧ (∀x r p. Q x ⇒ P (pcons x r p)) ∧
  (∀x r p. P p ⇒ P (pcons x r p)) ⇒
  ∀p. exists Q p ⇒ P p
⊢ ∀P. (∀x. exists P (stopped_at x) ⇔ P x) ∧
      ∀x r p. exists P (pcons x r p) ⇔ P x ∨ exists P p
⊢ ∀P p. exists P p ⇒ every P (filter P p)
⊢ ∀p n. n ∈ PL p ⇒ (finite (drop n p) ⇔ finite p)
⊢ ∀p. LFINITE (labels p) ⇔ finite p
⊢ ∀p. finite p ⇒ last p = el (PRE (THE (length p))) p
⊢ ∀p. (finite p ⇔ ∃n. length p = SOME n) ∧ (infinite p ⇔ length p = NONE)
⊢ ∀R. (∀x. P (stopped_at x)) ∧
      (∀x r p.
         okpath R p ∧ finite p ∧ R x r (first p) ∧ P p ⇒ P (pcons x r p)) ⇒
      ∀sigma. okpath R sigma ∧ finite sigma ⇒ P sigma
⊢ ∀p. finite p ⇒
      (∃x. p = stopped_at x) ∨
      ∃p' l s. p = plink p' (pcons (last p') l (stopped_at s))
⊢ ∀P. (∀x. P (stopped_at x)) ∧ (∀x r p. finite p ∧ P p ⇒ P (pcons x r p)) ⇒
      ∀q. finite q ⇒ P q
⊢ ∀R. (∀p. okpath R p ⇒ finite p) ⇒ SN R
⊢ ∀p1 lab p2. finite (pconcat p1 lab p2) ⇔ finite p1 ∧ finite p2
⊢ ∀f g p. finite (pmap f g p) ⇔ finite p
⊢ ∀p i j. i ≤ j ∧ j ∈ PL p ⇒ finite (seg i j p)
⊢ ∀p i. i ∈ PL p ⇒ finite (take i p)
⊢ ∀p. finite p ⇒ take (PRE (THE (length p))) p = p
⊢ (∀x. finite (stopped_at x) ⇔ T) ∧ ∀x r p. finite (pcons x r p) ⇔ finite p
⊢ (∀P x n. firstP_at P (stopped_at x) n ⇔ n = 0 ∧ P x) ∧
  ∀P n x r p.
    firstP_at P (pcons x r p) n ⇔
    n = 0 ∧ P x ∨ 0 < n ∧ ¬P x ∧ firstP_at P p (n − 1)
⊢ ∀P p n. firstP_at P p n ⇒ ∀m. firstP_at P p m ⇔ m = n
⊢ ∀P p. firstP_at P p 0 ⇔ P (first p)
⊢ ∀i p. i ∈ PL p ⇒ first (drop i p) = el i p
⊢ ∀i p. i ∈ PL p ⇒ first_label (drop i p) = nth_label i p
⊢ ∀p. first (pmap f g p) = f (first p)
⊢ ∀i j p. i ≤ j ∧ j ∈ PL p ⇒ first (seg i j p) = el i p
⊢ ∀p i. first (take i p) = first p
⊢ (∀x. first (stopped_at x) = x) ∧ ∀x r p. first (pcons x r p) = x
⊢ ∀a a'. fromPath a = fromPath a' ⇔ a = a'
⊢ ∀r. ∃a. r = fromPath a
⊢ ∀p. infinite p ⇒ ∀i. i ∈ PL p
⊢ ∀p. infinite p ⇒ ∃x r q. p = pcons x r q ∧ infinite q
⊢ (∀x. is_stopped (stopped_at x) ⇔ T) ∧
  ∀x r p. is_stopped (pcons x r p) ⇔ F
⊢ ∀p. labels p = LMAP FST (SND (fromPath p))
⊢ ∀proj f s. labels (unfold proj f s) = LUNFOLD f s
⊢ ∀p. finite p ⇒ last (pmap f g p) = f (last p)
⊢ ∀i j p. i ≤ j ∧ j ∈ PL p ⇒ last (seg i j p) = el j p
⊢ ∀i p. i ∈ PL p ⇒ last (take i p) = el i p
⊢ ∀p. (finite p ⇔ ∃n. length p = SOME (SUC n)) ∧
      (infinite p ⇔ length p = NONE)
⊢ ∀p n.
    n ∈ PL p ⇒
    length (drop n p) =
    case length p of NONE => NONE | SOME m => SOME (m − n)
⊢ ∀p. length p ≠ SOME 0
⊢ ∀f g p. length (pmap f g p) = length p
⊢ ∀p i. i ∈ PL p ⇒ length (take i p) = SOME (i + 1)
⊢ (∀x. length (stopped_at x) = SOME 1) ∧
  ∀x r p.
    length (pcons x r p) =
    if finite p then SOME (THE (length p) + 1) else NONE
⊢ (∀x s. mem s (stopped_at x) ⇔ s = x) ∧
  ∀x r p s. mem s (pcons x r p) ⇔ s = x ∨ mem s p
⊢ ∀P p. ¬every P p ⇔ exists ($¬ ∘ P) p
⊢ ∀P p. ¬exists P p ⇔ every ($¬ ∘ P) p
⊢ ∀n p x. LNTH n (labels p) = SOME x ⇔ n + 1 ∈ PL p ∧ nth_label n p = x
⊢ ∀n p l i v.
    LTAKE n (labels p) = SOME l ∧ i < LENGTH l ⇒ nth_label i p = l❲i❳
nth_label_compute
⊢ (∀p. nth_label 0 p = first_label p) ∧
  (∀n p.
     nth_label (NUMERAL (BIT1 n)) p =
     nth_label (NUMERAL (BIT1 n) − 1) (tail p)) ∧
  ∀n p.
    nth_label (NUMERAL (BIT2 n)) p = nth_label (NUMERAL (BIT1 n)) (tail p)
⊢ ∀i j p. SUC (i + j) ∈ PL p ⇒ nth_label i (drop j p) = nth_label (i + j) p
⊢ ∀n f g. nth_label n (pgenerate f g) = g n
⊢ ∀i p. SUC i ∈ PL p ⇒ nth_label i (pmap f g p) = g (nth_label i p)
⊢ ∀n p i. i < n ∧ n ∈ PL p ⇒ nth_label i (take n p) = nth_label i p
⊢ (∀n p. drop (NUMERAL (BIT1 n)) p = drop (NUMERAL (BIT1 n) − 1) (tail p)) ∧
  ∀n p. drop (NUMERAL (BIT2 n)) p = drop (NUMERAL (BIT1 n)) (tail p)
⊢ ∀R x.
    okpath R x ⇔
    (∃x'. x = stopped_at x') ∨
    ∃x' r p. x = pcons x' r p ∧ R x' r (first p) ∧ okpath R p
⊢ ∀P. (∀x r p. P (pcons x r p) ⇒ R x r (first p) ∧ P p) ⇒
      ∀p. P p ⇒ okpath R p
⊢ ∀R p i. i ∈ PL p ∧ okpath R p ⇒ okpath R (drop i p)
⊢ ∀R. monotone (okpath_f R)
⊢ ∀p m1 m2.
    okpath (parallel_comp m1 m2) p ⇔
    okpath m1 (pmap FST (λx. x) p) ∧ okpath m2 (pmap SND (λx. x) p)
⊢ ∀R f g p.
    okpath R p ∧ (∀x r y. R x r y ⇒ R (f x) (g r) (f y)) ⇒
    okpath R (pmap f g p)
⊢ ∀R p i j. i ≤ j ∧ j ∈ PL p ∧ okpath R p ⇒ okpath R (seg i j p)
⊢ ∀R p i. i ∈ PL p ∧ okpath R p ⇒ okpath R (take i p)
⊢ ∀R. (∀x. okpath R (stopped_at x)) ∧
      ∀x r p. okpath R (pcons x r p) ⇔ R x r (first p) ∧ okpath R p
⊢ ∀P m proj f s.
    P s ∧ (∀s s' l. P s ∧ f s = SOME (s',l) ⇒ P s') ∧
    (∀s s' l. P s ∧ f s = SOME (s',l) ⇒ m (proj s) l (proj s')) ⇒
    okpath m (unfold proj f s)
⊢ ∀f. ∃g. ∀x.
    g x =
    case f x of
      (y,NONE) => stopped_at y
    | (y,SOME (l,v)) => pcons y l (g v)
⊢ ∀p1 p2.
    p1 = p2 ⇔
    ∃R. R p1 p2 ∧
        ∀q1 q2.
          R q1 q2 ⇒
          (∃x. q1 = stopped_at x ∧ q2 = stopped_at x) ∨
          ∃x r q1' q2'. q1 = pcons x r q1' ∧ q2 = pcons x r q2' ∧ R q1' q2'
⊢ ∀p. (∃x. p = stopped_at x) ∨ ∃x r q. p = pcons x r q
⊢ (∀a. toPath (fromPath a) = a) ∧ ∀r. fromPath (toPath r) = r
⊢ ∀x r p p1 lab p2.
    (pconcat p1 lab p2 = pcons x r p ⇔
     lab = r ∧ p1 = stopped_at x ∧ p = p2 ∨
     ∃p1'. p1 = pcons x r p1' ∧ p = pconcat p1' lab p2) ∧
    (pcons x r p = pconcat p1 lab p2 ⇔
     lab = r ∧ p1 = stopped_at x ∧ p = p2 ∨
     ∃p1'. p1 = pcons x r p1' ∧ p = pconcat p1' lab p2)
⊢ ∀p1 lab p2 x.
    pconcat p1 lab p2 ≠ stopped_at x ∧ stopped_at x ≠ pconcat p1 lab p2
⊢ (∀x lab p2. pconcat (stopped_at x) lab p2 = pcons x lab p2) ∧
  ∀x r p lab p2.
    pconcat (pcons x r p) lab p2 = pcons x r (pconcat p lab p2)
⊢ ∀x r p y s q. pcons x r p = pcons y s q ⇔ x = y ∧ r = s ∧ p = q
⊢ ∀f1 g1 f2 g2. pgenerate f1 g1 = pgenerate f2 g2 ⇔ f1 = f2 ∧ g1 = g2
⊢ ∀f g. infinite (pgenerate f g)
⊢ ∀f g x. stopped_at x ≠ pgenerate f g
⊢ ∀p. infinite p ⇒ ∃f g. p = pgenerate f g
⊢ (∀x. pmap f g (stopped_at x) = stopped_at (f x)) ∧
  ∀x r p. pmap f g (pcons x r p) = pcons (f x) (g r) (pmap f g p)
⊢ ∀i j p.
    i < j ∧ j ∈ PL p ⇒
    seg i j p = pcons (el i p) (nth_label i p) (seg (i + 1) j p)
⊢ ∀R M1 M2 p t_init.
    (∀s1 l s2 t1. R s1 t1 ∧ M1 s1 l s2 ⇒ ∃t2. R s2 t2 ∧ M2 t1 l t2) ∧
    okpath M1 p ∧ R (first p) t_init ⇒
    ∃q. okpath M2 q ∧ labels p = labels q ∧ first q = t_init
⊢ ∀i p. i ∈ PL p ⇒ seg i i p = stopped_at (el i p)
⊢ ∀x y. stopped_at x = stopped_at y ⇔ x = y
⊢ ∀x y r p. stopped_at x ≠ pcons y r p ∧ pcons y r p ≠ stopped_at x
⊢ ∀i p. i + 1 ∈ PL p ⇒ tail (drop i p) = drop (i + 1) p
take_compute
⊢ (∀p. take 0 p = stopped_at (first p)) ∧
  (∀n p.
     take (NUMERAL (BIT1 n)) p =
     pcons (first p) (first_label p) (take (NUMERAL (BIT1 n) − 1) (tail p))) ∧
  ∀n p.
    take (NUMERAL (BIT2 n)) p =
    pcons (first p) (first_label p) (take (NUMERAL (BIT1 n)) (tail p))
⊢ ∀r r'. toPath r = toPath r' ⇔ r = r'
⊢ ∀a. ∃r. a = toPath r
⊢ ∀P tr.
    (∀n l. LTAKE n tr = SOME l ⇒ P l) ⇒
    ∃p. tr = labels p ∧ okpath (trace_machine P) p ∧ first p = []
⊢ ∀n l P p init.
    okpath (trace_machine P) p ∧ P (first p) ⇒
    LTAKE n (labels p) = SOME l ⇒
    P (first p ++ l)
⊢ ∀proj f s.
    unfold proj f s =
    case f s of
      NONE => stopped_at (proj s)
    | SOME (s',l) => pcons (proj s) l (unfold proj f s')
⊢ ∀proj f x v1 v2.
    (f x = NONE ⇒ unfold proj f x = stopped_at (proj x)) ∧
    (f x = SOME (v1,v2) ⇒
     unfold proj f x = pcons (proj x) v2 (unfold proj f v1))