# Proofs

proof_type: t_proof
decl_type: tcc
library: Sturm
theory: polylist
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (split)
   (("1"
     (expand "length" + 1)
     (assert)
     (typepred "v(c,cdr[rat](pl))")
     (replace -3)
     (expand "length" + 2)
     (propax))
    ("2"
     (skeep)
     (expand "polylist" +)
     (expand "length" + 1)
     (typepred "v(c,cdr[rat](pl))")
     (("1"
       (expand "polylist")
       (expand "eval_polylist" +)
       (lift-if)
       (split)
       (("1" (flatten) (grind))
        ("2"
         (flatten)
         (assert)
         (expand "length" + 3)
         (case "x^0=1")
         (("1"
           (replaces -1)
           (assert)
           (rewrite "eval_polylist_remove_acc" +)
           (invoke (name "AA" "%1") (! 2 1))
           (replace -1)
           (rewrite "eval_polylist_remove_acc" +)
           (hide -1)
           (expand "AA")
           (assert)
           (inst - "x")
           (mult-by -4 "x")
           (rewrite "eval_polylist_times_x")
           (name "BBC"
                 "eval_polylist(cdr[rat](pl), length(cdr[rat](pl)) - 1, 0)(x) * x")
           (rewrite "eval_polylist_times_x" -1)
           (expand "BBC" -1)
           (mult-by -1 "c")
           (replace -1 :dir rl)
           (assert)
           (expand "length" 2 2)
           (assert))
          ("2" (hide-all-but 1) (grind))))))
      ("2" (grind))))))


proof_type: t_proof
decl_type: tcc
library: Sturm
theory: polylist
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (skolem 1 "ii")
   (case "FORALL (a,b:[nat->rat],n,m:nat): rational_pred(polynomial_prod(a,
                                                                  n,
                                                                  b,
                                                                  m)
                                                                 (ii))")
   (("1"
     (case "FORALL (pzl:Polylist): FORALL (x1: nat): rational_pred(list2array[rat](0)(pzl)(x1))")
     (("1" (inst? -2) (("1" (grind)) ("2" (grind))))
      ("2" (hide-all-but 1) (grind))))
    ("2"
     (hide 2)
     (skeep)
     (expand "polynomial_prod")
     (case "FORALL (FF:[nat->rat],mm,nn:nat): rational_pred(sigma(mm,nn,FF))")
     (("1" (rewrite -1) (("1" (assert)) ("2" (skosimp*) (assert))))
      ("2"
       (hide 2)
       (induct "nn")
       (("1" (grind) (expand "sigma") (expand "sigma") (propax))
        ("2"
         (skeep)
         (skeep)
         (inst - "FF" "mm")
         (expand "sigma" +)
         (ground)
         (case "FORALL (r1,r2:rat): rational_pred(r1+r2)")
         (("1" (rewrite -1)) ("2" (hide-all-but 1) (grind))))))))))


proof_type: t_proof
decl_type: tcc
library: Sturm
theory: polylist
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (assert)
   (ground)
   (("1" (inst - "0") (("1" (grind)) ("2" (grind))))
    ("2"
     (skeep)
     (typepred "j")
     (case "NOT j = 1")
     (("1" (grind)) ("2" (replaces -1) (grind))))
    ("3" (grind))))


proof_type: t_proof
decl_type: tcc
library: Sturm
theory: polylist
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (skeep)
   (skeep)
   (assert)
   (hide 2)
   (typepred "v(cdr(pl))")
   (replace -5 :dir rl)
   (assert)
   (typepred "v(cdr(pl))`maxnon")
   (expand "length" 4)
   (assert))


proof_type: t_proof
decl_type: tcc
library: Sturm
theory: polylist
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (skeep)
   (skeep)
   (assert)
   (hide 2)
   (split)
   (("1"
     (typepred "v(cdr(pl))")
     (replace -6 :dir rl)
     (assert)
     (hide -1)
     (inst -3 "upans`maxnon+1")
     (("1" (expand "nth" -3) (lift-if) (ground))
      ("2" (typepred "v(cdr(pl))`maxnon") (expand "length" 1) (assert))))
    ("2"
     (skeep)
     (typepred "v(cdr(pl))")
     (assert)
     (hide -1)
     (inst - "j-1")
     (("1" (assert) (expand "nth" 2) (propax))
      ("2" (typepred "j") (expand "length" -1) (assert))))
    ("3"
     (flatten)
     (typepred "v(cdr(pl))")
     (assert)
     (hide (-1 -2))
     (expand "nth" -2)
     (assert))))


proof_type: t_proof
decl_type: tcc
library: Sturm
theory: polylist
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (skeep)
   (skeep)
   (assert)
   (hide 2)
   (skeep)
   (case "j = 0")
   (("1" (expand "nth" 3) (assert))
    ("2"
     (expand "nth" +)
     (assert)
     (typepred "v(cdr(pl))")
     (replace -5 :dir rl)
     (assert)
     (hide -3)
     (hide -2)
     (inst - "j-1"))))


proof_type: t_proof
decl_type: tcc
library: Sturm
theory: polylist
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (skeep)
   (skeep)
   (assert)
   (hide 2)
   (split)
   (("1" (inst - "0") (("1" (grind)) ("2" (grind))))
    ("2"
     (skeep)
     (typepred "v(cdr(pl))")
     (replace -6 :dir rl)
     (assert)
     (inst -1 "j-1")
     (("1" (expand "nth" 1) (propax))
      ("2" (assert) (typepred "j") (expand "length" -1) (assert))))
    ("3" (flatten) (grind))))


proof_type: t_proof
decl_type: tcc
library: Sturm
theory: polylist
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (assert)
   (typepred "drec")
   (assert)
   (split +)
   (("1" (skeep) (inst - "j")) ("2" (hide -) (grind))))


proof_type: t_proof
decl_type: tcc
library: Sturm
theory: polylist
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (assert)
   (typepred "drec")
   (assert)
   (hide -1)
   (split)
   (("1" (flatten) (assert) (inst + "drec`maxnon") (assert))
    ("2" (flatten) (assert) (skeep -1) (inst - "j") (assert))
    ("3" (flatten))))


proof_type: f_proof
decl_type: formula
library: Sturm
theory: poly_strategy
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (case "NOT deg(pl)>0")
   (("1" (hide 2) (assert) (typepred "deg(pl)") (assert))
    ("2"
     (hide -3)
     (assert)
     (expand "sturm")
     (lemma "compute_poly_sat_rational_def")
     (inst?)
     (assert)
     (split -1)
     (("1"
       (replaces -1)
       (ground)
       (("1"
         (skeep)
         (inst - "x")
         (rewrite "polylist_eval" 1)
         (assert)
         (rewrite "polylist_eval_deg" -1 :dir rl))
        ("2"
         (skeep)
         (inst - "x")
         (assert)
         (rewrite "polylist_eval" -1)
         (rewrite "polylist_eval_deg" 1 :dir rl))))
      ("2"
       (hide 2)
       (flatten)
       (rewrite "list2array_sound")
       (typepred "deg(pl)")
       (assert))))))


proof_type: f_proof
decl_type: formula
library: Sturm
theory: sturmsquarefree
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (expand "sturm_sequence?")
   (assert)
   (split +)
   (("1" (skeep) (assert))
    ("2"
     (skeep)
     (case "i = 1")
     (("1" (replaces -1) (replace -5) (expand "poly_deriv" -2) (assert))
      ("2" (assert))))
    ("3" (skeep) (assert))
    ("4" (skeep) (assert) (replaces -1) (replace -2) (grind))))


proof_type: f_proof
decl_type: formula
library: Sturm
theory: sturmsquarefree
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (case "FORALL (i:nat): i-1>=0 AND i+1<=m AND polynomial(p(i),n(i))(x)=0 IMPLIES (polynomial(p(i-1),n(i-1))(x)=0 IFF polynomial(p(i+1),n(i+1))(x)=0)")
   (("1"
     (skeep)
     (case "FORALL (j:nat): i-j>=0 IMPLIES FORALL (k:nat): k<=j IMPLIES polynomial(p(i-k), n(i-k))(x) = 0")
     (("1"
       (case "FORALL (j:nat): i+j<=m IMPLIES FORALL (k:nat): k<=j IMPLIES  polynomial(p(i+k), n(i+k))(x) = 0")
       (("1"
         (skeep)
         (case "j>=i")
         (("1"
           (inst - "j-i")
           (("1" (assert) (inst - "j-i") (assert)) ("2" (assert))))
          ("2"
           (inst -2 "i-j")
           (("1" (assert) (inst -2 "i-j") (assert)) ("2" (assert))))))
        ("2"
         (hide (-1 2))
         (induct "j")
         (("1" (assert) (skeep) (assert))
          ("2"
           (assert)
           (skosimp*)
           (assert)
           (case "k!1=0 OR k!1=1")
           (("1" (ground))
            ("2"
             (flatten)
             (inst-cp - "k!1-1")
             (inst - "k!1-2")
             (("1" (assert) (assert) (inst - "i-1+k!1") (assert))
              ("2" (assert))))))))))
      ("2"
       (hide 2)
       (induct "j")
       (("1" (assert) (skosimp*) (assert))
        ("2"
         (skosimp*)
         (assert)
         (case "k!1=0")
         (("1" (assert))
          ("2"
           (assert)
           (inst-cp - "k!1-1")
           (case "k!1=1")
           (("1" (hide -2) (assert) (inst - "i") (assert))
            ("2"
             (inst - "k!1-2")
             (("1" (assert) (inst - "i-k!1+1") (assert))
              ("2" (assert))))))))
        ("3" (skosimp*) (assert)) ("4" (assert) (skosimp*) (assert))
        ("5" (skosimp*) (assert)) ("6" (skosimp*) (assert))
        ("7" (skosimp*) (assert))))
      ("3" (skosimp*) (assert))))
    ("2"
     (hide 2)
     (skeep)
     (assert)
     (expand "sturm_sequence?")
     (flatten)
     (inst - "x" "i")
     (assert)
     (expand "sign_ext" -7)
     (lift-if)
     (lift-if)
     (lift-if)
     (lift-if)
     (assert)
     (ground))))


proof_type: f_proof
decl_type: formula
library: Sturm
theory: sturmsquarefree
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (skeep)
   (case "NOT FORALL (xyzp:real): polynomial(p(m),n(m))(xyzp) = 0")
   (("1"
     (skeep)
     (expand "sturm_sequence?")
     (flatten)
     (inst -6 "xyz" "xyzp")
     (expand "sign_ext" -6)
     (assert)
     (assert)
     (lift-if)
     (assert))
    ("2"
     (lemma "polynomial_eq_coeff")
     (inst - "p(m)" "LAMBDA (i:nat): 0" "n(m)")
     (assert)
     (flatten)
     (hide -2)
     (split -)
     (("1"
       (inst - "n(m)")
       (expand "sturm_sequence?")
       (flatten)
       (inst -5 "m")
       (assert))
      ("2"
       (decompose-equality 1)
       (inst - "x!1")
       (assert)
       (replaces -1)
       (expand "polynomial" +)
       (rewrite "sigma_restrict_eq_0")
       (skosimp*)
       (assert)
       (lift-if)
       (assert))))))


proof_type: f_proof
decl_type: formula
library: Sturm
theory: sturmsquarefree
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (case "NOT (polynomial(p(0), n(0))(x) /= 0 AND
                                             polynomial(p(0), n(0))(y) /= 0)")
   (("1" (hide 2) (inst-cp - "x") (inst - "y") (ground))
    ("2"
     (flatten)
     (assert)
     (inst-cp - "b")
     (assert)
     (flatten)
     (case "polynomial(poly_deriv(p(0)),max(n(0)-1,0))(b) = 0")
     (("1"
       (expand "sturm_sequence?")
       (flatten)
       (inst -8 "b")
       (assert)
       (expand "sign_ext" -8)
       (assert)
       (lift-if)
       (assert))
      ("2"
       (lemma "poly_continuous")
       (inst - "poly_deriv(p(0))" "max(n(0)-1,0)" "b"
        "abs(polynomial(poly_deriv(p(0)),n(0)-1)(b))")
       (("1"
         (skeep -)
         (case "EXISTS (deltiv:posreal): FORALL (x1:real): abs(b-x1)<deltiv IMPLIES (abs(b-x1)<delta AND x < x1 AND x1 < y)")
         (("1"
           (case "sign_ext(polynomial(p(0), n(0))(x)) =
                                                      -sign_ext(polynomial(poly_deriv(p(0)), max(n(0)-1,0))(b))
                                                      AND
                                                      sign_ext(polynomial(p(0), n(0))(y)) =
                                                       sign_ext(polynomial(poly_deriv(p(0)), max(n(0)-1,0))(b))")
           (("1"
             (hide (-2 -3))
             (flatten)
             (expand "sturm_sequence?")
             (flatten)
             (inst -9 "b")
             (assert))
            ("2"
             (hide 6)
             (case "polynomial(poly_deriv(p(0)), max(n(0)-1,0))(b)>0")
             (("1"
               (skeep -2)
               (case "FORALL (x1,x2:real): abs(x1-b)<deltiv AND abs(x2-b)<deltiv AND x1<x2 IMPLIES polynomial(p(0),n(0))(x1) < polynomial(p(0),n(0))(x2)")
               (("1"
                 (inst-cp - "b-deltiv/2" "b")
                 (inst-cp - "b" "b+deltiv/2")
                 (label "hyplem" -1)
                 (hide "hyplem")
                 (assert)
                 (split +)
                 (("1"
                   (expand "sign_ext")
                   (lift-if)
                   (assert)
                   (split 1)
                   (("1" (propax))
                    ("2"
                     (assert)
                     (hide -1)
                     (split -)
                     (("1"
                       (replace -7)
                       (assert)
                       (lemma "poly_intermediate_value_dec")
                       (inst - "p(0)" "0" "n(0)" "x" "b-deltiv/2")
                       (assert)
                       (split -)
                       (("1"
                         (skeep -1)
                         (inst - "cc")
                         (inst - "cc")
                         (inst - "cc")
                         (assert))
                        ("2"
                         (inst - "b-deltiv/2")
                         (split -)
                         (("1" (flatten) (assert))
                          ("2" (hide-all-but 1) (grind))))))
                      ("2" (hide-all-but 1) (grind))))))
                  ("2"
                   (expand "sign_ext")
                   (lift-if)
                   (assert)
                   (split 1)
                   (("1"
                     (assert)
                     (hide -3)
                     (split -)
                     (("1"
                       (replace -8)
                       (assert)
                       (lemma "poly_intermediate_value_dec")
                       (inst - "p(0)" "0" "n(0)" "b+deltiv/2" "y")
                       (assert)
                       (split -)
                       (("1"
                         (skeep -1)
                         (inst - "cc")
                         (inst - "cc")
                         (inst - "cc")
                         (assert))
                        ("2"
                         (inst - "b+deltiv/2")
                         (split -)
                         (("1" (flatten) (assert))
                          ("2" (hide-all-but 1) (grind))))))
                      ("2" (hide-all-but 1) (grind))))
                    ("2" (propax))))))
                ("2"
                 (skeep)
                 (lemma "poly_strictly_increasing")
                 (inst - "p(0)" "n(0)" "x1" "x2")
                 (assert)
                 (case "n(0)=0")
                 (("1"
                   (replaces -1)
                   (expand "polynomial")
                   (expand "sigma")
                   (expand "sigma")
                   (propax))
                  ("2"
                   (assert)
                   (skeep)
                   (expand "max")
                   (assert)
                   (inst - "c")
                   (assert)
                   (split -)
                   (("1"
                     (inst - "c")
                     (flatten)
                     (assert)
                     (expand "abs")
                     (lift-if)
                     (ground))
                    ("2"
                     (expand "abs" (-1 -2 -3 -4 -5 1))
                     (lift-if)
                     (assert))))))))
              ("2"
               (case "polynomial(poly_deriv(p(0)), max(n(0)-1,0))(b)<0")
               (("1"
                 (hide 1)
                 (skeep -2)
                 (case "FORALL (x1,x2:real): abs(x1-b)<deltiv AND abs(x2-b)<deltiv AND x1<x2 IMPLIES polynomial(p(0),n(0))(x1) > polynomial(p(0),n(0))(x2)")
                 (("1"
                   (inst-cp - "b-deltiv/2" "b")
                   (inst-cp - "b" "b+deltiv/2")
                   (label "hyplem" -1)
                   (hide "hyplem")
                   (assert)
                   (split +)
                   (("1"
                     (expand "sign_ext")
                     (lift-if)
                     (assert)
                     (split 1)
                     (("1"
                       (replace -9)
                       (assert)
                       (lemma "poly_intermediate_value_inc")
                       (inst - "p(0)" "0" "n(0)" "x" "b-deltiv/2")
                       (assert)
                       (split -)
                       (("1"
                         (skeep -1)
                         (inst - "cc")
                         (inst - "cc")
                         (inst - "cc")
                         (assert))
                        ("2"
                         (inst - "b-deltiv/2")
                         (split -3)
                         (("1" (assert) (hide-all-but 2) (grind))
                          ("2" (hide-all-but 1) (grind))))
                        ("3" (assert) (hide-all-but 2) (grind))))
                      ("2" (propax))))
                    ("2"
                     (expand "sign_ext")
                     (lift-if)
                     (assert)
                     (split 1)
                     (("1" (propax))
                      ("2"
                       (assert)
                       (hide -2)
                       (split -)
                       (("1"
                         (replace -7)
                         (assert)
                         (lemma "poly_intermediate_value_inc")
                         (inst - "p(0)" "0" "n(0)" "b+deltiv/2" "y")
                         (assert)
                         (split -)
                         (("1"
                           (skeep -1)
                           (inst - "cc")
                           (inst - "cc")
                           (inst - "cc")
                           (assert))
                          ("2"
                           (inst - "b+deltiv/2")
                           (split -)
                           (("1" (flatten) (assert))
                            ("2" (hide-all-but 1) (grind))))))
                        ("2" (hide-all-but 1) (grind))))))))
                  ("2"
                   (skeep)
                   (lemma "poly_strictly_decreasing")
                   (inst - "p(0)" "n(0)" "x1" "x2")
                   (assert)
                   (case "n(0)=0")
                   (("1"
                     (replaces -1)
                     (expand "polynomial")
                     (expand "sigma")
                     (expand "sigma")
                     (propax))
                    ("2"
                     (assert)
                     (skeep)
                     (expand "max")
                     (assert)
                     (inst - "c")
                     (assert)
                     (split -)
                     (("1"
                       (inst - "c")
                       (flatten)
                       (assert)
                       (expand "abs")
                       (assert))
                      ("2"
                       (expand "abs" (-1 -2 -3 -4 -5 1))
                       (lift-if)
                       (assert))))))))
                ("2" (assert))))))
            ("3" (assert))))
          ("2"
           (inst + "min(delta,min(b-x,y-b))")
           (("1" (hide-all-but (-2 -3 1)) (grind))
            ("2" (hide-all-but (-2 -3 1)) (grind))))))
        ("2"
         (expand "abs" 1)
         (lift-if)
         (assert)
         (split 1)
         (("1" (propax))
          ("2"
           (flatten)
           (expand "sturm_sequence?")
           (flatten)
           (inst -7 "b")
           (assert)
           (case "n(0) = 0")
           (("1"
             (replaces -1)
             (expand "polynomial" (-3 4))
             (expand "sigma")
             (expand "sigma")
             (propax))
            ("2"
             (expand "max")
             (expand "sign_ext" -7)
             (lift-if)
             (lift-if)
             (lift-if)
             (lift-if)
             (lift-if)
             (lift-if)
             (lift-if)
             (assert))))))
        ("3"
         (assert)
         (case "n(0) = 0")
         (("1"
           (replace -1)
           (assert)
           (expand "polynomial" (-4 3))
           (expand "sigma")
           (expand "sigma")
           (propax))
          ("2" (assert))))
        ("4" (assert))))
      ("3" (assert))))))


proof_type: f_proof
decl_type: formula
library: Sturm
theory: sturmsquarefree
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (case " FORALL (b: real, dd,j, m: nat, n: [nat -> nat],
                                                                                                                                p: [nat -> [nat -> real]], x, y: real): j<=dd AND
                                                                                                                                x < y AND x < b AND b < y
                                                                                                             AND (FORALL (c: real, i: nat):
                                                                                                                   i <= m AND
                                                                                                                    x <= c AND c <= y AND polynomial(p(i), n(i))(c) = 0
                                                                                                                    IMPLIES c = b) AND (FORALL (c:real): x<=c AND c<=y AND polynomial(p(0),n(0))(c)=0 IMPLIES
                                                                                                   (polynomial(p(1),n(1))(c)/=0))
                                                                                                             AND j <= m AND polynomial(p(j), n(j))(b) /= 0 AND sturm_sequence?(p, n, m)
                                                                                                             IMPLIES
                                                                                                             LET nsc =
                                                                                                                   LAMBDA (xyz: real, pj: nat):
                                                                                                                     number_sign_changes(LAMBDA
                                                                                                                                         (i):
                                                                                                                                         polynomial(p(i), n(i))(xyz),
                                                                                                                                         pj)
                                                                                                               IN
                                                                                                               sign_ext(nsc(x, j)`lastnz) = sign_ext(nsc(y, j)`lastnz)
                                                                                                                AND
                                                                                                                 nsc(x, j)`num =
                                    nsc(y, j)`num +
                                     (IF polynomial(p(0), n(0))(b) = 0 THEN 1 ELSE 0 ENDIF)")
   (("1"
     (skeep)
     (inst - "b" "j" "j" "m" "n" "p" "x" "y")
     (assert)
     (replace -5)
     (replace -6)
     (propax))
    ("2"
     (hide 2)
     (induct "dd")
     (("1" (assert))
      ("2"
       (skeep)
       (assert)
       (case "NOT j = 0")
       (("1" (assert))
        ("2"
         (hide -2)
         (replaces -1)
         (expand "number_sign_changes")
         (expand "sign_ext" 2)
         (lift-if)
         (lift-if)
         (lift-if)
         (lift-if)
         (assert)
         (ground)
         (("1"
           (lemma "poly_intermediate_value_inc")
           (inst - "p(0)" "0" "n(0)" "x" "y")
           (assert)
           (skeep -)
           (inst - "cc" "0")
           (assert))
          ("2"
           (lemma "poly_intermediate_value_dec")
           (inst - "p(0)" "0" "n(0)" "x" "y")
           (assert)
           (skeep -)
           (inst - "cc" "0")
           (assert))
          ("3"
           (lemma "poly_intermediate_value_dec")
           (inst - "p(0)" "0" "n(0)" "x" "y")
           (assert)
           (skeep -)
           (inst - "cc" "0")
           (assert))
          ("4" (inst - "x" "0") (assert))
          ("5" (inst - "x" "0") (assert))))))
      ("3"
       (skolem 1 "jj")
       (flatten)
       (skeep)
       (assert)
       (case "NOT j = 1+jj")
       (("1"
         (inst - "b" "j" "m" "n" "p" "x" "y")
         (assert)
         (replace -6)
         (replace -7)
         (propax))
        ("2"
         (replaces -1)
         (assert)
         (inst-cp - "x" "jj")
         (assert)
         (inst-cp - "y" "jj")
         (assert)
         (inst-cp - "x" "1+jj")
         (assert)
         (inst-cp - "y" "1+jj")
         (assert)
         (case "polynomial(p(jj),n(jj))(b)/=0")
         (("1"
           (flatten)
           (inst - "b" "jj" "m" "n" "p" "x" "y")
           (assert)
           (replace -6)
           (replace -7)
           (flatten)
           (split +)
           (("1"
             (assert)
             (expand "number_sign_changes" +)
             (assert)
             (hide -2)
             (expand "sign_ext" 1)
             (lift-if)
             (lift-if)
             (lift-if)
             (assert)
             (ground)
             (("1"
               (lemma "poly_intermediate_value_inc")
               (inst - "p(1+jj)" "0" "n(1+jj)" "x" "y")
               (assert)
               (skeep -1)
               (inst - "cc" "1+jj")
               (assert))
              ("2"
               (lemma "poly_intermediate_value_dec")
               (inst - "p(1+jj)" "0" "n(1+jj)" "x" "y")
               (assert)
               (skeep -1)
               (inst - "cc" "1+jj")
               (assert))))
            ("2"
             (invoke (name "SQUAB" "%1") (! 1 2 2))
             (replace -1)
             (label "SQUABname" -1)
             (hide "SQUABname")
             (expand "number_sign_changes" +)
             (expand "sign_ext" -1)
             (assert)
             (lift-if)
             (lift-if)
             (lift-if)
             (assert)
             (ground)
             (("1"
               (expand "sign_ext")
               (lift-if)
               (ground)
               (lemma "poly_intermediate_value_dec")
               (inst - "p(1+jj)" "0" "n(1+jj)" "x" "y")
               (assert)
               (skeep -1)
               (inst - "cc" "1+jj")
               (assert))
              ("2"
               (expand "sign_ext")
               (lift-if)
               (assert)
               (ground)
               (lemma "poly_intermediate_value_inc")
               (inst - "p(1+jj)" "0" "n(1+jj)" "x" "y")
               (assert)
               (skeep -1)
               (inst - "cc" "1+jj")
               (assert))
              ("3" (assert) (lift-if) (assert))
              ("4"
               (expand "sign_ext")
               (lift-if)
               (assert)
               (ground)
               (lemma "poly_intermediate_value_inc")
               (inst - "p(1+jj)" "0" "n(1+jj)" "x" "y")
               (assert)
               (skeep -1)
               (inst - "cc" "1+jj")
               (assert))
              ("5"
               (expand "sign_ext")
               (lift-if)
               (assert)
               (ground)
               (lemma "poly_intermediate_value_dec")
               (inst - "p(1+jj)" "0" "n(1+jj)" "x" "y")
               (assert)
               (skeep -1)
               (inst - "cc" "1+jj")
               (assert))
              ("6" (lift-if) (assert))))))
          ("2"
           (flatten)
           (label "hyplem" -2)
           (hide "hyplem")
           (copy -9)
           (expand "sturm_sequence?" -1)
           (flatten)
           (hide (-1 -2 -3 -5))
           (inst - "b" "jj")
           (assert)
           (case "jj = 0")
           (("1"
             (hide -2)
             (replaces -1)
             (assert)
             (split +)
             (("1"
               (expand "number_sign_changes" +)
               (lift-if)
               (expand "sign_ext" +)
               (lift-if)
               (lift-if)
               (lift-if)
               (assert)
               (ground)
               (("1"
                 (lemma "poly_intermediate_value_inc")
                 (inst - "p(1)" "0" "n(1)" "x" "y")
                 (assert)
                 (skeep -1)
                 (inst - "cc" "1")
                 (assert))
                ("2"
                 (lemma "poly_intermediate_value_dec")
                 (inst - "p(1)" "0" "n(1)" "x" "y")
                 (assert)
                 (skeep -1)
                 (inst - "cc" "1")
                 (assert))))
              ("2"
               (case "sign_ext(polynomial(p(0),n(0))(x))/=sign_ext(polynomial(p(0),n(0))(y))")
               (("1"
                 (flatten)
                 (expand "number_sign_changes" 2)
                 (expand "number_sign_changes" 2)
                 (lift-if)
                 (lift-if)
                 (lift-if)
                 (assert)
                 (ground)
                 (("1"
                   (expand "sign_ext")
                   (lift-if)
                   (lift-if)
                   (lift-if)
                   (assert)
                   (ground)
                   (("1"
                     (lemma "poly_intermediate_value_dec")
                     (inst - "p(1)" "0" "n(1)" "x" "y")
                     (assert)
                     (skeep -1)
                     (inst - "cc" "1")
                     (assert))
                    ("2"
                     (lemma "poly_intermediate_value_inc")
                     (inst - "p(1)" "0" "n(1)" "x" "y")
                     (assert)
                     (skeep -1)
                     (inst - "cc" "1")
                     (assert))))
                  ("2"
                   (lemma "sturm_seq_first_signs_eq")
                   (inst - "b" "m" "n" "p" "x" "y")
                   (assert)
                   (split -)
                   (("1"
                     (flatten)
                     (expand "sign_ext")
                     (lift-if)
                     (lift-if)
                     (lift-if)
                     (assert)
                     (ground)
                     (("1"
                       (lemma "poly_intermediate_value_inc")
                       (inst - "p(1)" "0" "n(1)" "x" "b")
                       (assert)
                       (skeep -1)
                       (inst - "cc" "1")
                       (assert))
                      ("2"
                       (lemma "poly_intermediate_value_dec")
                       (inst - "p(1)" "0" "n(1)" "x" "b")
                       (assert)
                       (skeep -1)
                       (inst - "cc" "1")
                       (assert))))
                    ("2" (skeep) (inst - "c" "0") (assert) (assert))))))
                ("2"
                 (flatten)
                 (expand "sign_ext" -1)
                 (lift-if)
                 (lift-if)
                 (lift-if)
                 (assert)
                 (ground)
                 (("1"
                   (lemma "square_free_max")
                   (case "n(0) = 0")
                   (("1"
                     (replaces -1)
                     (expand "polynomial")
                     (expand "sigma")
                     (expand "sigma")
                     (propax))
                    ("2"
                     (inst - "p(0)" "min(y-b,b-x)" "b" "0" "n(0)")
                     (("1"
                       (assert)
                       (split -)
                       (("1"
                         (copy -12)
                         (expand "sturm_sequence?" -1)
                         (flatten)
                         (hide -2)
                         (inst -2 "b")
                         (assert)
                         (expand "max" -2)
                         (expand "sign_ext" -2)
                         (lift-if)
                         (assert))
                        ("2"
                         (skosimp*)
                         (case "x!1 = b")
                         (("1" (assert))
                          ("2"
                           (case "x!1 < b")
                           (("1"
                             (lemma "poly_intermediate_value_inc")
                             (inst - "p(0)" "0" "n(0)" "x" "x!1")
                             (assert)
                             (skeep -1)
                             (inst - "cc" "0")
                             (assert))
                            ("2"
                             (lemma "poly_intermediate_value_dec")
                             (inst - "p(0)" "0" "n(0)" "x!1" "y")
                             (assert)
                             (skeep -1)
                             (inst - "cc" "0")
                             (assert))))))))
                      ("2" (assert))
                      ("3"
                       (assert)
                       (expand "min" 1)
                       (lift-if)
                       (ground))))))
                  ("2"
                   (lemma "square_free_min")
                   (inst - "p(0)" "min(y-b,b-x)" "b" "0" "n(0)")
                   (("1"
                     (assert)
                     (split -)
                     (("1"
                       (copy -10)
                       (expand "sturm_sequence?" -1)
                       (flatten)
                       (hide -2)
                       (inst -2 "b")
                       (assert)
                       (case "n(0) = 0")
                       (("1"
                         (replaces -1)
                         (expand "polynomial")
                         (expand "sigma")
                         (expand "sigma")
                         (propax))
                        ("2"
                         (expand "max" -2)
                         (assert)
                         (expand "sign_ext" -2)
                         (lift-if)
                         (assert))))
                      ("2"
                       (skosimp*)
                       (case "x!1 = b")
                       (("1" (assert))
                        ("2"
                         (case "x!1 < b")
                         (("1"
                           (lemma "poly_intermediate_value_dec")
                           (inst - "p(0)" "0" "n(0)" "x" "x!1")
                           (assert)
                           (skeep -1)
                           (inst - "cc" "0")
                           (assert))
                          ("2"
                           (lemma "poly_intermediate_value_inc")
                           (inst - "p(0)" "0" "n(0)" "x!1" "y")
                           (assert)
                           (skeep -1)
                           (inst - "cc" "0")
                           (assert))))))))
                    ("2"
                     (case "n(0) = 0")
                     (("1"
                       (replaces -1)
                       (expand "polynomial" (-1 +))
                       (expand "sigma")
                       (expand "sigma")
                       (propax))
                      ("2" (assert))))
                    ("3" (expand "min" 1) (lift-if) (assert))))))))))
            ("2"
             (assert)
             (case "polynomial(p(jj - 1), n(jj - 1))(b) /= 0")
             (("1"
               (case "sign_ext(polynomial(p(jj - 1), n(jj - 1))(b))=sign_ext(polynomial(p(jj - 1), n(jj - 1))(x)) AND sign_ext(polynomial(p(jj - 1), n(jj - 1))(b))=sign_ext(polynomial(p(jj - 1), n(jj - 1))(y))")
               (("1"
                 (flatten)
                 (case "sign_ext(polynomial(p(1 + jj), n(1 + jj))(b))=sign_ext(polynomial(p(1 + jj), n(1 + jj))(x)) AND sign_ext(polynomial(p(1 + jj), n(1 + jj))(b))=sign_ext(polynomial(p(1 + jj), n(1 + jj))(y))")
                 (("1"
                   (flatten)
                   (assert)
                   (split +)
                   (("1"
                     (expand "number_sign_changes" 1)
                     (lift-if)
                     (assert))
                    ("2"
                     (assert)
                     (invoke (name "SQUAB" "%1") (! 1 2 2))
                     (replaces -1)
                     (case "sign_ext(polynomial(p(jj), n(jj))(x)) =
                                                                                   - sign_ext(polynomial(p(jj), n(jj))(y))")
                     (("1"
                       (case "number_sign_changes(LAMBDA (i): polynomial(p(i), n(i))(x),
                                                                                                             jj-1)`num
                                                                                          =
                                                                                          number_sign_changes(LAMBDA (i): polynomial(p(i), n(i))(y),
                                                                                                              jj-1)`num
                                                                                           + SQUAB")
                       (("1"
                         (expand "sign_ext")
                         (lift-if)
                         (lift-if)
                         (lift-if)
                         (assert)
                         (ground)
                         (("1"
                           (expand "number_sign_changes" +)
                           (expand "number_sign_changes" +)
                           (expand "sign_ext")
                           (lift-if)
                           (lift-if)
                           (lift-if)
                           (assert)
                           (ground)
                           (("1"
                             (lift-if)
                             (assert)
                             (ground)
                             (expand "number_sign_changes" (-1 +))
                             (assert)
                             (lift-if)
                             (assert))
                            ("2"
                             (expand "number_sign_changes" -1)
                             (assert)
                             (lift-if)
                             (assert))
                            ("3"
                             (lift-if)
                             (assert)
                             (ground)
                             (expand "number_sign_changes" -1)
                             (assert)
                             (lift-if)
                             (assert))))
                          ("2"
                           (expand "number_sign_changes" +)
                           (expand "number_sign_changes" +)
                           (expand "sign_ext")
                           (lift-if)
                           (lift-if)
                           (lift-if)
                           (assert)
                           (ground)
                           (("1"
                             (lift-if)
                             (assert)
                             (ground)
                             (expand "number_sign_changes" 1)
                             (assert)
                             (lift-if)
                             (assert))
                            ("2"
                             (expand "number_sign_changes" -1)
                             (assert)
                             (lift-if)
                             (assert))
                            ("3"
                             (lift-if)
                             (assert)
                             (ground)
                             (expand "number_sign_changes" -1)
                             (assert)
                             (lift-if)
                             (assert))
                            ("4"
                             (expand "number_sign_changes" -1)
                             (assert)
                             (lift-if)
                             (assert))
                            ("5"
                             (lift-if)
                             (assert)
                             (split -2)
                             (("1"
                               (expand "number_sign_changes" -1)
                               (assert)
                               (lift-if)
                               (split -2)
                               (("1" (propax))
                                ("2"
                                 (flatten)
                                 (expand "number_sign_changes" 1)
                                 (assert)
                                 (lift-if)
                                 (assert))))
                              ("2" (propax))))))
                          ("3"
                           (expand "number_sign_changes" +)
                           (expand "number_sign_changes" +)
                           (expand "sign_ext")
                           (lift-if)
                           (lift-if)
                           (lift-if)
                           (assert)
                           (ground)
                           (("1"
                             (lift-if)
                             (split 2)
                             (("1"
                               (flatten)
                               (expand "number_sign_changes" -1)
                               (assert)
                               (lift-if)
                               (assert))
                              ("2" (propax))))
                            ("2"
                             (expand "number_sign_changes" -1)
                             (assert)
                             (lift-if)
                             (assert))
                            ("3"
                             (expand "number_sign_changes" -2)
                             (assert)
                             (lift-if)
                             (assert))
                            ("4"
                             (expand "number_sign_changes" -1)
                             (assert)
                             (lift-if)
                             (assert))
                            ("5"
                             (lift-if)
                             (split -1)
                             (("1"
                               (expand "number_sign_changes" -1)
                               (assert)
                               (lift-if)
                               (assert))
                              ("2"
                               (split -2)
                               (("1"
                                 (flatten)
                                 (expand "number_sign_changes" -1)
                                 (assert))
                                ("2" (assert))))))))
                          ("4"
                           (expand "number_sign_changes" +)
                           (expand "number_sign_changes" +)
                           (expand "sign_ext")
                           (lift-if)
                           (lift-if)
                           (lift-if)
                           (assert)
                           (ground)
                           (("1"
                             (lift-if)
                             (split 2)
                             (("1" (propax))
                              ("2"
                               (flatten)
                               (expand "number_sign_changes" 1)
                               (assert)
                               (lift-if)
                               (assert))))
                            ("2"
                             (expand "number_sign_changes" -1)
                             (assert)
                             (lift-if)
                             (assert))
                            ("3"
                             (lift-if)
                             (split -)
                             (("1"
                               (flatten)
                               (expand "number_sign_changes" -1)
                               (assert))
                              ("2"
                               (assert)
                               (flatten)
                               (split -)
                               (("1"
                                 (expand "number_sign_changes" -1)
                                 (assert)
                                 (lift-if)
                                 (assert))
                                ("2" (propax))))))))))
                        ("2"
                         (hide 2)
                         (reveal "hyplem")
                         (inst?)
                         (inst - "jj-1")
                         (assert)
                         (replace -13)
                         (replace -14)
                         (flatten)
                         (expand "SQUAB")
                         (propax))))
                      ("2"
                       (case "NOT sign_ext(polynomial(p(jj), n(jj))(x)) =
                                                               sign_ext(polynomial(p(jj), n(jj))(y))")
                       (("1"
                         (expand "sign_ext" (1 2))
                         (lift-if)
                         (lift-if)
                         (lift-if)
                         (ground))
                        ("2"
                         (hide 1)
                         (case "number_sign_changes(LAMBDA (i): polynomial(p(i), n(i))(x),
                                                                                                                 jj-1)`num
                                                                                              =
                                                                                              number_sign_changes(LAMBDA (i): polynomial(p(i), n(i))(y),
                                                                                                                  jj-1)`num
                                                                                               + SQUAB")
                         (("1"
                           (expand "sign_ext")
                           (lift-if)
                           (lift-if)
                           (lift-if)
                           (assert)
                           (ground)
                           (("1"
                             (expand "number_sign_changes" +)
                             (expand "number_sign_changes" +)
                             (expand "sign_ext")
                             (lift-if)
                             (lift-if)
                             (lift-if)
                             (assert)
                             (ground)
                             (("1"
                               (lift-if)
                               (assert)
                               (ground)
                               (expand "number_sign_changes" -1)
                               (assert)
                               (lift-if)
                               (assert))
                              ("2"
                               (lift-if)
                               (assert)
                               (split -)
                               (("1"
                                 (expand "number_sign_changes" -1)
                                 (assert)
                                 (lift-if)
                                 (assert))
                                ("2" (propax))))
                              ("3"
                               (expand "number_sign_changes" -1)
                               (assert)
                               (lift-if)
                               (assert))
                              ("4"
                               (lift-if)
                               (split -)
                               (("1"
                                 (expand "number_sign_changes" -1)
                                 (assert)
                                 (lift-if)
                                 (assert))
                                ("2"
                                 (flatten)
                                 (expand "number_sign_changes" 1)
                                 (assert))))))
                            ("2"
                             (expand "number_sign_changes" +)
                             (expand "number_sign_changes" +)
                             (expand "sign_ext")
                             (lift-if)
                             (lift-if)
                             (lift-if)
                             (assert)
                             (ground)
                             (("1"
                               (expand "number_sign_changes" -1)
                               (assert)
                               (lift-if)
                               (assert))
                              ("2"
                               (lift-if)
                               (assert)
                               (split -)
                               (("1"
                                 (split 2)
                                 (("1" (propax))
                                  ("2"
                                   (expand "number_sign_changes" -1)
                                   (assert)
                                   (lift-if)
                                   (expand "number_sign_changes" 1)
                                   (assert)
                                   (lift-if)
                                   (assert))))
                                ("2" (propax))))
                              ("3"
                               (expand "number_sign_changes" -1)
                               (assert)
                               (lift-if)
                               (assert))
                              ("4"
                               (lift-if)
                               (split -)
                               (("1"
                                 (split 2)
                                 (("1" (propax))
                                  ("2"
                                   (flatten)
                                   (expand "number_sign_changes" 1)
                                   (assert)
                                   (lift-if)
                                   (assert))))
                                ("2"
                                 (flatten)
                                 (split +)
                                 (("1" (propax))
                                  ("2"
                                   (flatten)
                                   (expand "number_sign_changes" 1)
                                   (assert))))))))
                            ("3"
                             (expand "number_sign_changes" +)
                             (expand "number_sign_changes" +)
                             (expand "sign_ext")
                             (lift-if)
                             (lift-if)
                             (lift-if)
                             (assert)
                             (ground)
                             (("1"
                               (expand "number_sign_changes" -1)
                               (assert)
                               (lift-if)
                               (assert))
                              ("2"
                               (lift-if)
                               (split 2)
                               (("1"
                                 (flatten)
                                 (expand "number_sign_changes" -1)
                                 (assert)
                                 (lift-if)
                                 (assert))
                                ("2" (propax))))
                              ("3"
                               (expand "number_sign_changes" -1)
                               (assert)
                               (lift-if)
                               (assert))
                              ("4"
                               (lift-if)
                               (split +)
                               (("1"
                                 (flatten)
                                 (expand "number_sign_changes" -1)
                                 (assert)
                                 (lift-if)
                                 (assert))
                                ("2" (propax))))))
                            ("4"
                             (expand "number_sign_changes" +)
                             (expand "number_sign_changes" +)
                             (expand "sign_ext")
                             (lift-if)
                             (lift-if)
                             (lift-if)
                             (assert)
                             (ground)
                             (("1"
                               (expand "number_sign_changes" -1)
                               (assert)
                               (lift-if)
                               (assert))
                              ("2"
                               (lift-if)
                               (split -)
                               (("1"
                                 (flatten)
                                 (expand "number_sign_changes" -1)
                                 (assert))
                                ("2"
                                 (assert)
                                 (flatten)
                                 (split -)
                                 (("1"
                                   (expand "number_sign_changes" -1)
                                   (assert)
                                   (lift-if)
                                   (assert))
                                  ("2" (propax))))))
                              ("3"
                               (expand "number_sign_changes" -1)
                               (assert)
                               (lift-if)
                               (assert))
                              ("4"
                               (lift-if)
                               (split -)
                               (("1"
                                 (flatten)
                                 (expand "number_sign_changes" -1)
                                 (assert))
                                ("2"
                                 (flatten)
                                 (split -)
                                 (("1"
                                   (expand "number_sign_changes" -1)
                                   (assert)
                                   (lift-if)
                                   (assert))
                                  ("2"
                                   (flatten)
                                   (expand "number_sign_changes" 1)
                                   (assert))))))))))
                          ("2"
                           (assert)
                           (hide 2)
                           (reveal "hyplem")
                           (inst?)
                           (inst - "jj-1")
                           (assert)
                           (replace -13)
                           (replace -14)
                           (flatten)
                           (expand "SQUAB")
                           (propax))))))))))
                  ("2"
                   (case "FORALL (x1,x2:real): x<=x1 AND x1<x2 AND x2<=y IMPLIES sign_ext(polynomial(p(1 + jj), n(1 + jj))(x1)) =
                                                       sign_ext(polynomial(p(1 + jj), n(1 + jj))(x2))")
                   (("1" (inst-cp - "x" "b") (inst - "b" "y") (assert))
                    ("2"
                     (hide 2)
                     (skeep)
                     (label "squiggy" 9)
                     (hide "squiggy")
                     (expand "sign_ext" 1)
                     (lift-if)
                     (lift-if)
                     (lift-if)
                     (lift-if)
                     (assert)
                     (ground)
                     (("1"
                       (lemma "poly_intermediate_value_inc")
                       (inst - "p(1+jj)" "0" "n(1+jj)" "x1" "x2")
                       (assert)
                       (skeep -)
                       (inst - "cc" "1+jj")
                       (assert))
                      ("2"
                       (lemma "poly_intermediate_value_dec")
                       (inst - "p(1+jj)" "0" "n(1+jj)" "x1" "x2")
                       (assert)
                       (skeep -)
                       (inst - "cc" "1+jj")
                       (assert))
                      ("3" (inst - "x2") (inst - "x2" "1+jj") (assert))
                      ("4" (inst - "x1" "1+jj") (assert))
                      ("5" (inst - "x1" "1+jj") (assert))))))))
                ("2"
                 (label "squiggy" 8)
                 (hide "squiggy")
                 (case "FORALL (x1,x2:real): x<=x1 AND x1<x2 AND x2<=y IMPLIES sign_ext(polynomial(p(jj - 1), n(jj - 1))(x1)) =
                                                   sign_ext(polynomial(p(jj - 1), n(jj - 1))(x2))")
                 (("1" (inst-cp - "x" "b") (inst - "b" "y") (assert))
                  ("2"
                   (hide 2)
                   (skeep)
                   (expand "sign_ext" 1)
                   (lift-if)
                   (lift-if)
                   (lift-if)
                   (lift-if)
                   (assert)
                   (ground)
                   (("1"
                     (lemma "poly_intermediate_value_inc")
                     (inst - "p(jj-1)" "0" "n(jj-1)" "x1" "x2")
                     (assert)
                     (skeep -1)
                     (inst - "cc" "jj-1")
                     (assert))
                    ("2"
                     (lemma "poly_intermediate_value_dec")
                     (inst - "p(jj-1)" "0" "n(jj-1)" "x1" "x2")
                     (assert)
                     (skeep -)
                     (inst - "cc" "jj-1")
                     (assert))
                    ("3" (inst - "x2" "jj-1") (assert))
                    ("4" (inst - "x1" "jj-1") (assert))
                    ("5" (inst - "x1" "jj-1") (assert))))))))
              ("2"
               (flatten)
               (assert)
               (hide 7)
               (lemma "sturm_seq_repeated_root")
               (inst - "m" "n" "p" "b")
               (assert)
               (inst - "jj-1")
               (assert)
               (inst - "jj+1")
               (assert))))))))))))))


proof_type: f_proof
decl_type: formula
library: Sturm
theory: sturmsquarefree
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (case "FORALL (dd,j, m: nat, n: [nat -> nat], p: [nat -> [nat -> real]],
                                                   x, y: real): j<=dd AND
                                                  x < y
                                              AND (FORALL (c: real, i: nat):
                                                    i <= m AND
                                                     x <= c AND c <= y AND polynomial(p(i), n(i))(c) = 0
                                                     IMPLIES c = y)
                                              AND (FORALL (c: real):
                                                    x <= c AND c <= y AND polynomial(p(0), n(0))(c) = 0 IMPLIES
                                                     (polynomial(p(1), n(1))(c) /= 0))
                                              AND j<= m AND polynomial(p(j), n(j))(y) /= 0
                                              AND sturm_sequence?(p, n, m) AND p(1) = poly_deriv(p(0))
                                       AND n(1) = n(0) - 1
                                              IMPLIES
                                              LET nsc =
                                                    LAMBDA (xyz: real, pj: nat):
                                                      number_sign_changes(LAMBDA
                                                                          (i):
                                                                          polynomial(p(i), n(i))(xyz),
                                                                          pj)
                                                IN
                                                sign_ext(nsc(x, j)`lastnz) = sign_ext(nsc(y, j)`lastnz) AND
                                                 nsc(x, j)`num =
                                                  nsc(y, j)`num +
                                                   (IF polynomial(p(0), n(0))(y) = 0 THEN 1 ELSE 0 ENDIF)")
   (("1"
     (skeep)
     (inst - "j" "j" "m" "n" "p" "x" "y")
     (assert)
     (replace -3)
     (replace -4)
     (propax))
    ("2"
     (hide 2)
     (induct "dd")
     (("1" (assert))
      ("2"
       (skeep)
       (assert)
       (case "NOT j = 0")
       (("1" (assert))
        ("2"
         (hide -2)
         (replaces -1)
         (expand "number_sign_changes")
         (expand "sign_ext" 2)
         (lift-if)
         (lift-if)
         (lift-if)
         (lift-if)
         (assert)
         (ground)
         (("1"
           (lemma "poly_intermediate_value_inc")
           (inst - "p(0)" "0" "n(0)" "x" "y")
           (assert)
           (skeep -)
           (inst - "cc" "0")
           (assert))
          ("2"
           (lemma "poly_intermediate_value_dec")
           (inst - "p(0)" "0" "n(0)" "x" "y")
           (assert)
           (skeep -)
           (inst - "cc" "0")
           (assert))
          ("3" (inst - "x" "0") (assert))))))
      ("3"
       (skolem 1 "jj")
       (flatten)
       (skeep)
       (assert)
       (case "NOT j = 1+jj")
       (("1"
         (inst - "j" "m" "n" "p" "x" "y")
         (assert)
         (replace -4)
         (replace -5)
         (propax))
        ("2"
         (replaces -1)
         (assert)
         (inst-cp - "x" "jj")
         (assert)
         (inst-cp - "x" "1+jj")
         (assert)
         (case "polynomial(p(jj),n(jj))(y)/=0")
         (("1"
           (flatten)
           (inst - "jj" "m" "n" "p" "x" "y")
           (assert)
           (replace -4)
           (replace -5)
           (flatten)
           (split +)
           (("1"
             (assert)
             (expand "number_sign_changes" +)
             (assert)
             (hide -2)
             (expand "sign_ext" 1)
             (lift-if)
             (lift-if)
             (lift-if)
             (assert)
             (ground)
             (("1"
               (lemma "poly_intermediate_value_inc")
               (inst - "p(1+jj)" "0" "n(1+jj)" "x" "y")
               (assert)
               (skeep -1)
               (inst - "cc" "1+jj")
               (assert))
              ("2"
               (lemma "poly_intermediate_value_dec")
               (inst - "p(1+jj)" "0" "n(1+jj)" "x" "y")
               (assert)
               (skeep -1)
               (inst - "cc" "1+jj")
               (assert))))
            ("2"
             (invoke (name "SQUAB" "%1") (! 1 2 2))
             (replace -1)
             (label "SQUABname" -1)
             (hide "SQUABname")
             (expand "number_sign_changes" +)
             (expand "sign_ext" -1)
             (assert)
             (lift-if)
             (lift-if)
             (lift-if)
             (assert)
             (ground)
             (("1"
               (expand "sign_ext")
               (lift-if)
               (ground)
               (lemma "poly_intermediate_value_dec")
               (inst - "p(1+jj)" "0" "n(1+jj)" "x" "y")
               (assert)
               (skeep -1)
               (inst - "cc" "1+jj")
               (assert))
              ("2"
               (expand "sign_ext")
               (lift-if)
               (assert)
               (ground)
               (lemma "poly_intermediate_value_inc")
               (inst - "p(1+jj)" "0" "n(1+jj)" "x" "y")
               (assert)
               (skeep -1)
               (inst - "cc" "1+jj")
               (assert))
              ("3" (assert) (lift-if) (assert))
              ("4"
               (expand "sign_ext")
               (lift-if)
               (assert)
               (ground)
               (lemma "poly_intermediate_value_inc")
               (inst - "p(1+jj)" "0" "n(1+jj)" "x" "y")
               (assert)
               (skeep -1)
               (inst - "cc" "1+jj")
               (assert))
              ("5"
               (expand "sign_ext")
               (lift-if)
               (assert)
               (ground)
               (lemma "poly_intermediate_value_dec")
               (inst - "p(1+jj)" "0" "n(1+jj)" "x" "y")
               (assert)
               (skeep -1)
               (inst - "cc" "1+jj")
               (assert))
              ("6" (lift-if) (assert))))))
          ("2"
           (flatten)
           (label "hyplem" -2)
           (hide "hyplem")
           (split +)
           (("1"
             (expand "number_sign_changes" +)
             (lift-if)
             (assert)
             (expand "sign_ext" +)
             (lift-if)
             (lift-if)
             (lift-if)
             (assert)
             (ground)
             (("1"
               (lemma "poly_intermediate_value_inc")
               (assert)
               (inst - "p(1+jj)" "0" "n(1+jj)" "x" "y")
               (assert)
               (skeep -)
               (inst - "cc" "1+jj")
               (assert))
              ("2"
               (lemma "poly_intermediate_value_dec")
               (inst - "p(1+jj)" "0" "n(1+jj)" "x" "y")
               (assert)
               (skeep -)
               (inst - "cc" "1+jj")
               (assert))))
            ("2"
             (invoke (name "SQUAB" "%1") (! 1 2 2))
             (replaces -1)
             (case "jj = 0")
             (("1"
               (replaces -1)
               (assert)
               (case "NOT SQUAB = 1")
               (("1" (expand "SQUAB" 1) (propax))
                ("2"
                 (replaces -1)
                 (assert)
                 (expand "number_sign_changes" 1)
                 (expand "number_sign_changes" 1)
                 (expand "sign_ext")
                 (lift-if)
                 (lift-if)
                 (lift-if)
                 (lift-if)
                 (lift-if)
                 (lift-if)
                 (lift-if)
                 (assert)
                 (ground)
                 (("1"
                   (copy -9)
                   (expand "sturm_sequence?" -1)
                   (flatten)
                   (hide (-1 -2 -4 -5))
                   (inst - "y")
                   (replace -4)
                   (assert)
                   (case "n(0) = 0")
                   (("1"
                     (replaces -1)
                     (expand "polynomial" (-4 2))
                     (expand "sigma")
                     (expand "sigma")
                     (propax))
                    ("2"
                     (assert)
                     (expand "sign_ext" -1 1)
                     (lift-if)
                     (ground)
                     (("1"
                       (expand "sign_ext" -2)
                       (lemma "poly_strictly_decreasing")
                       (inst - "p(0)" "n(0)" "x" "y")
                       (assert)
                       (skeep)
                       (lemma "poly_intermediate_value_dec")
                       (inst - "poly_deriv(p(0))" "0" "n(0)-1" "c" "y")
                       (assert)
                       (skeep -1)
                       (inst - "cc" "1")
                       (assert))
                      ("2"
                       (lemma "poly_intermediate_value_inc")
                       (inst - "p(1)" "0" "n(1)" "x" "y")
                       (assert)
                       (skeep -1)
                       (inst - "cc" "1")
                       (assert))))))
                  ("2"
                   (lemma "poly_strictly_increasing")
                   (inst - "p(0)" "n(0)" "x" "y")
                   (assert)
                   (skeep)
                   (inst-cp - "c" "1")
                   (assert)
                   (lemma "poly_intermediate_value_dec")
                   (inst - "p(1)" "0" "n(1)" "x" "c")
                   (assert)
                   (skeep -)
                   (inst - "cc" "1")
                   (assert))))))
              ("2"
               (assert)
               (case "polynomial(p(jj-1),n(jj-1))(y) = 0")
               (("1"
                 (lemma "sturm_seq_repeated_root")
                 (inst - "m" "n" "p" "y")
                 (assert)
                 (inst - "jj-1")
                 (assert)
                 (inst - "1+jj"))
                ("2"
                 (assert)
                 (case "sign_ext(polynomial(p(jj - 1), n(jj - 1))(y)) = sign_ext(polynomial(p(jj - 1), n(jj - 1))(x))")
                 (("1"
                   (case "sign_ext(polynomial(p(jj + 1), n(jj + 1))(y)) = sign_ext(polynomial(p(jj + 1), n(jj + 1))(x))")
                   (("1"
                     (case "sign_ext(polynomial(p(jj + 1), n(jj + 1))(y)) = -sign_ext(polynomial(p(jj - 1), n(jj - 1))(y))")
                     (("1"
                       (case "number_sign_changes(LAMBDA (i): polynomial(p(i), n(i))(x),
                                                                                                                                        jj-1)`num
                                                                                                                     =
                                                                                                                     number_sign_changes(LAMBDA (i): polynomial(p(i), n(i))(y),
                                                                                                                                         jj-1)`num
                                                                                                                      + SQUAB")
                       (("1"
                         (expand "sign_ext")
                         (lift-if)
                         (lift-if)
                         (lift-if)
                         (assert)
                         (ground)
                         (("1"
                           (expand "number_sign_changes" +)
                           (expand "number_sign_changes" +)
                           (expand "sign_ext")
                           (lift-if)
                           (lift-if)
                           (lift-if)
                           (lift-if)
                           (lift-if)
                           (lift-if)
                           (assert)
                           (lift-if)
                           (lift-if)
                           (lift-if)
                           (assert)
                           (ground)
                           (("1"
                             (expand "number_sign_changes" -1)
                             (lift-if)
                             (assert))
                            ("2"
                             (lift-if)
                             (split -1)
                             (("1"
                               (expand "number_sign_changes" -1)
                               (lift-if)
                               (assert))
                              ("2" (flatten) (assert))))
                            ("3"
                             (expand "number_sign_changes" -1)
                             (lift-if)
                             (assert))
                            ("4"
                             (lift-if)
                             (assert)
                             (split -)
                             (("1"
                               (expand "number_sign_changes" -1)
                               (lift-if)
                               (assert))
                              ("2" (propax))))
                            ("5"
                             (lift-if)
                             (split +)
                             (("1"
                               (flatten)
                               (expand "number_sign_changes" -1)
                               (lift-if)
                               (assert))
                              ("2" (propax))))
                            ("6"
                             (expand "number_sign_changes" -1)
                             (lift-if)
                             (assert))
                            ("7"
                             (expand "number_sign_changes" -2)
                             (lift-if)
                             (assert))
                            ("8"
                             (expand "number_sign_changes" -1)
                             (lift-if)
                             (assert))
                            ("9"
                             (hide -2)
                             (lift-if)
                             (split -)
                             (("1"
                               (expand "number_sign_changes" -1)
                               (lift-if)
                               (assert))
                              ("2" (flatten) (assert))))))
                          ("2"
                           (expand "number_sign_changes" +)
                           (expand "number_sign_changes" +)
                           (expand "sign_ext")
                           (assert)
                           (lift-if)
                           (lift-if)
                           (lift-if)
                           (lift-if)
                           (lift-if)
                           (lift-if)
                           (lift-if)
                           (lift-if)
                           (lift-if)
                           (assert)
                           (lift-if)
                           (assert)
                           (lift-if)
                           (assert)
                           (ground)
                           (("1"
                             (lift-if)
                             (ground)
                             (expand "number_sign_changes" 1)
                             (lift-if)
                             (assert))
                            ("2"
                             (expand "number_sign_changes" -1)
                             (lift-if)
                             (assert))
                            ("3"
                             (lift-if)
                             (assert)
                             (split -)
                             (("1" (propax))
                              ("2"
                               (flatten)
                               (expand "number_sign_changes" 1)
                               (lift-if)
                               (assert))))
                            ("4"
                             (expand "number_sign_changes" -1)
                             (lift-if)
                             (assert))
                            ("5"
                             (hide -2)
                             (lift-if)
                             (assert)
                             (split -)
                             (("1" (propax))
                              ("2"
                               (flatten)
                               (expand "number_sign_changes" 1)
                               (lift-if)
                               (assert))))
                            ("6"
                             (expand "number_sign_changes" -1)
                             (lift-if)
                             (assert))
                            ("7"
                             (lift-if)
                             (split -)
                             (("1"
                               (flatten)
                               (expand "number_sign_changes" -1)
                               (lift-if)
                               (assert))
                              ("2"
                               (flatten)
                               (split -)
                               (("1"
                                 (expand "number_sign_changes" -1)
                                 (lift-if)
                                 (assert))
                                ("2"
                                 (flatten)
                                 (expand "number_sign_changes" 1)
                                 (lift-if)
                                 (assert))))))
                            ("8"
                             (expand "number_sign_changes" -1)
                             (lift-if)
                             (assert))
                            ("9"
                             (lift-if)
                             (split -)
                             (("1"
                               (flatten)
                               (expand "number_sign_changes" -1)
                               (lift-if)
                               (assert))
                              ("2"
                               (flatten)
                               (split -)
                               (("1"
                                 (expand "number_sign_changes" -1)
                                 (lift-if)
                                 (assert))
                                ("2"
                                 (flatten)
                                 (expand "number_sign_changes" 2)
                                 (lift-if)
                                 (assert))))))))))
                        ("2"
                         (hide 4)
                         (reveal "hyplem")
                         (inst - "jj-1" "m" "n" "p" "x" "y")
                         (assert)
                         (replace -8)
                         (replace -9)
                         (flatten)
                         (expand "SQUAB")
                         (propax))))
                      ("2"
                       (hide 4)
                       (copy -9)
                       (expand "sturm_sequence?" -1)
                       (flatten)
                       (inst - "y" "jj")
                       (assert))))
                    ("2"
                     (expand "sign_ext" 1)
                     (lift-if)
                     (lift-if)
                     (lift-if)
                     (assert)
                     (ground)
                     (("1"
                       (lemma "poly_intermediate_value_dec")
                       (inst - "p(1+jj)" "0" "n(1+jj)" "x" "y")
                       (assert)
                       (skeep -1)
                       (inst - "cc" "1+jj")
                       (assert))
                      ("2"
                       (lemma "poly_intermediate_value_inc")
                       (inst - "p(1+jj)" "0" "n(1+jj)" "x" "y")
                       (assert)
                       (skeep -1)
                       (inst - "cc" "1+jj")
                       (assert))))))
                  ("2"
                   (expand "sign_ext" 1)
                   (lift-if)
                   (lift-if)
                   (lift-if)
                   (assert)
                   (ground)
                   (("1"
                     (lemma "poly_intermediate_value_dec")
                     (inst - "p(jj-1)" "0" "n(jj-1)" "x" "y")
                     (assert)
                     (skeep -)
                     (inst - "cc" "jj-1")
                     (assert))
                    ("2"
                     (lemma "poly_intermediate_value_inc")
                     (inst - "p(jj-1)" "0" "n(jj-1)" "x" "y")
                     (assert)
                     (skeep -)
                     (inst - "cc" "jj-1")
                     (assert))
                    ("3" (inst - "x" "jj-1") (assert))))))))))))))))))))


proof_type: f_proof
decl_type: formula
library: Sturm
theory: sturmsquarefree
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (name "IGGY"
         "LAMBDA (b:real): ((x<=b AND b<=y) AND (b=x OR b=y OR (EXISTS (j:nat): j<=m AND polynomial(p(j), n(j))(b) = 0)))")
   (case "is_finite[real](IGGY)")
   (("1"
     (copy -1)
     (lemma "card_bij_inv[real]")
     (name "K" "card(IGGY)")
     (("1"
       (inst - "K" "IGGY")
       (assert)
       (label "fbij" -2)
       (skeep)
       (name "newenum" "sort_array[K,real,<=].sort(f)")
       (case "K>=2")
       (("1"
         (inst + "K" "newenum")
         (case "NOT (FORALL (i, j: below(K)): i < j IMPLIES newenum(i) < newenum(j))")
         (("1"
           (hide 2)
           (skeep)
           (case "NOT newenum(i) = newenum(j)")
           (("1"
             (assert)
             (typepred "newenum")
             (expand "sorted?")
             (inst - "i" "j")
             (assert))
            ("2"
             (typepred "newenum")
             (expand "permutation_of?")
             (skosimp*)
             (expand "bijective?" -1)
             (flatten)
             (expand "surjective?")
             (inst-cp - "j")
             (inst - "i")
             (skosimp*)
             (inst-cp - "x!1")
             (inst - "x!2")
             (replace -2)
             (replace -3)
             (copy "fbij")
             (expand "bijective?" -1)
             (flatten)
             (expand "injective?" -1)
             (inst-cp - "x!1" "x!2")
             (assert))))
          ("2"
           (replace -1)
           (case "NOT newenum(0)=x")
           (("1"
             (hide 2)
             (copy "fbij")
             (expand "bijective?" -1)
             (flatten)
             (expand "surjective?" -2)
             (inst - "x")
             (("1"
               (skosimp*)
               (typepred "newenum")
               (expand "permutation_of?")
               (skeep -1)
               (copy -2)
               (inst - "x!1")
               (replace -6)
               (inst - "0" "f_1(x!1)")
               (assert)
               (replace -1 :dir rl)
               (expand "bijective?" -2)
               (flatten)
               (expand "surjective?" -3)
               (inst - "0")
               (skosimp*)
               (inst - "x!2")
               (replace -3)
               (replace -4 :dir rl)
               (assert)
               (typepred "f(x!2)")
               (expand "IGGY" -1)
               (propax))
              ("2" (expand "IGGY" 1) (propax))))
            ("2"
             (assert)
             (case "NOT newenum(K-1) = y")
             (("1"
               (hide 2)
               (copy "fbij")
               (expand "bijective?" -1)
               (flatten)
               (expand "surjective?" -2)
               (inst - "y")
               (("1"
                 (skosimp*)
                 (typepred "newenum")
                 (expand "permutation_of?")
                 (skeep -1)
                 (copy -2)
                 (inst - "x!1")
                 (replace -6)
                 (inst - "f_1(x!1)" "K-1")
                 (assert)
                 (replace -1 :dir rl)
                 (expand "bijective?" -2)
                 (flatten)
                 (expand "surjective?" -3)
                 (inst - "K-1")
                 (skosimp*)
                 (inst - "x!2")
                 (replace -3)
                 (typepred "f(x!2)")
                 (expand "IGGY" -1)
                 (flatten)
                 (assert))
                ("2" (expand "IGGY" 1) (propax))))
              ("2"
               (assert)
               (skeep)
               (copy "fbij")
               (expand "bijective?" -1)
               (flatten)
               (expand "surjective?" -2)
               (case "NOT IGGY(b)")
               (("1"
                 (expand "IGGY" 1)
                 (assert)
                 (flatten)
                 (assert)
                 (inst + "j")
                 (assert))
                ("2"
                 (inst - "b")
                 (assert)
                 (skosimp*)
                 (typepred "newenum")
                 (expand "permutation_of?")
                 (skeep -1)
                 (inst - "x!1")
                 (inst + "f_1(x!1)")
                 (assert))))))
            ("3" (assert))))))
        ("2"
         (hide 2)
         (expand "bijective?")
         (flatten)
         (expand "surjective?")
         (inst-cp - "x")
         (("1"
           (inst - "y")
           (("1" (skosimp*) (assert)) ("2" (expand "IGGY" 1) (propax))))
          ("2" (expand "IGGY" 1) (propax))))))
      ("2" (propax))))
    ("2"
     (hide 2)
     (name "IGGYk"
           "LAMBDA (k:nat): (LAMBDA (b: real):
                                      ((x <= b AND b <= y) AND
                                        (b = x OR
                                          b = y OR
                                           (EXISTS (j: nat):
                                              j <= k-1 AND polynomial(p(j), n(j))(b) = 0))))")
     (case "FORALL (k:nat): k<=m+1 IMPLIES is_finite[real](IGGYk(k))")
     (("1"
       (inst - "m+1")
       (case "IGGYk(m+1) = IGGY")
       (("1" (assert))
        ("2"
         (decompose-equality 1)
         (expand "IGGYk" 1)
         (expand "IGGY" 1)
         (propax))))
      ("2"
       (induct "k")
       (("1"
         (assert)
         (case "NOT (IGGYk(0) = (LAMBDA (b:real): b = x OR b = y))")
         (("1"
           (decompose-equality 1)
           (expand "IGGYk" 1)
           (hide (-1 -2 -4))
           (iff)
           (grind))
          ("2"
           (replace -1)
           (hide-all-but (-4 1))
           (rewrite "is_finite_surj" :dir rl)
           (inst + "2"
            "LAMBDA (i:below(2)): IF i = 0 THEN x ELSE y ENDIF")
           (expand "surjective?")
           (skosimp*)
           (typepred "y!1")
           (ground)
           (("1" (inst + "0") (assert)) ("2" (inst + "1") (assert))))))
        ("2"
         (hide 2)
         (skeep)
         (name "Sjp"
               "(LAMBDA (b: real):
                                                  ((x <= b AND b <= y) AND
                                                    ((j <= m AND polynomial(p(j), n(j))(b) = 0))))")
         (case "IGGYk(1+j) = union(IGGYk(j),Sjp)")
         (("1"
           (lemma "finite_union[real]")
           (inst - "IGGYk(j)" "Sjp")
           (("1" (assert))
            ("2"
             (assert)
             (name "Sj"
                   "(LAMBDA (b: real):
                                                                      polynomial(p(j), n(j))(b) = 0)")
             (case "is_finite[real](Sj)")
             (("1"
               (lemma "finite_subset[real]")
               (inst - "Sj" "Sjp")
               (assert)
               (hide-all-but 1)
               (expand "subset?")
               (expand "Sjp")
               (expand "Sj")
               (grind :exclude "polynomial"))
              ("2"
               (case "FORALL (kk:nat,a:[nat->real]): (EXISTS (i:nat):i<=kk AND a(i)/=0) IMPLIES is_finite[real](LAMBDA (b:real): polynomial(a,kk)(b)=0)")
               (("1"
                 (inst - "n(j)" "p(j)")
                 (split -)
                 (("1" (assert))
                  ("2"
                   (inst + "n(j)")
                   (expand "sturm_sequence?")
                   (assert)
                   (flatten)
                   (inst - "j")
                   (assert)
                   (inst - "j")
                   (assert))))
                ("2"
                 (hide-all-but 1)
                 (induct "kk")
                 (("1"
                   (skeep)
                   (skeep -1)
                   (case "i = 0")
                   (("1"
                     (replaces -1)
                     (hide -)
                     (assert)
                     (lemma "finite_emptyset[real]")
                     (invoke (case "%1 = %2") (! -1 1) (! 2 1))
                     (("1" (assert))
                      ("2"
                       (hide (-1 3))
                       (decompose-equality 1)
                       (expand "polynomial")
                       (expand "sigma")
                       (expand "sigma")
                       (expand "emptyset")
                       (propax))))
                    ("2" (assert))))
                  ("2"
                   (skeep)
                   (skeep)
                   (case "EXISTS (z:real): polynomial(a,j!1+1)(z)=0")
                   (("1"
                     (skeep -1)
                     (lemma "polynomial_zero_factor")
                     (inst?)
                     (replace -2)
                     (skeep -1)
                     (invoke (name "IP" "%1") (! 1 1))
                     (replace -1)
                     (inst -4 "g")
                     (split -4)
                     (("1"
                       (invoke (name "IG" "%1") (! -1 1))
                       (replace -1)
                       (case "IP = union(IG,singleton(z))")
                       (("1"
                         (lemma "finite_union[real]")
                         (inst?)
                         (assert))
                        ("2"
                         (hide 2)
                         (decompose-equality 1)
                         (iff)
                         (expand "IP" +)
                         (expand "IG" +)
                         (expand "union" +)
                         (expand "singleton" +)
                         (expand "member" +)
                         (ground)
                         (("1" (inst-cp - "x!1") (replace -1) (assert))
                          ("2" (inst - "x!1") (replaces -1) (assert))))))
                      ("2"
                       (lemma "polynomial_eq_coeff")
                       (inst - "a" "LAMBDA (i:nat): 0" "j!1+1")
                       (flatten)
                       (hide -2)
                       (split -1)
                       (("1" (skosimp*) (inst - "i!1") (assert))
                        ("2"
                         (decompose-equality 1)
                         (case "polynomial(LAMBDA (i: nat): 0, 1 + j!1)(x!1) = 0")
                         (("1"
                           (replaces -1)
                           (assert)
                           (inst - "x!1")
                           (case "polynomial(g, j!1)(x!1) = 0")
                           (("1" (assert))
                            ("2"
                             (expand "polynomial" 1)
                             (rewrite "sigma_restrict_eq_0")
                             (hide 2)
                             (skosimp*)
                             (inst + "i!1")
                             (lift-if)
                             (ground))))
                          ("2"
                           (expand "polynomial" 1)
                           (rewrite "sigma_restrict_eq_0")
                           (skosimp*)
                           (lift-if)
                           (ground))))))))
                    ("2"
                     (lemma "finite_emptyset[real]")
                     (invoke (case "%1 = %2") (! -1 1) (! 2 1))
                     (("1" (assert))
                      ("2"
                       (decompose-equality 1)
                       (iff)
                       (expand "emptyset" 1)
                       (inst + "x!1"))))))))))))
            ("3" (assert))))
          ("2"
           (assert)
           (decompose-equality 1)
           (iff)
           (expand "union" +)
           (expand "member" +)
           (split +)
           (("1"
             (flatten)
             (expand "IGGYk" -1)
             (flatten)
             (expand "IGGYk" 1)
             (assert)
             (flatten)
             (assert)
             (skosimp*)
             (case "NOT j!1 = j")
             (("1" (inst + "j!1") (assert))
              ("2" (expand "Sjp" +) (assert))))
            ("2"
             (flatten)
             (split -)
             (("1"
               (expand "IGGYk" (-1 1))
               (flatten)
               (assert)
               (flatten)
               (assert)
               (skosimp*)
               (inst + "j!1")
               (assert))
              ("2"
               (expand "Sjp" -1)
               (expand "IGGYk" 1)
               (flatten)
               (assert)
               (flatten)
               (assert)
               (inst + "j")
               (assert))))))))))))))


proof_type: f_proof
decl_type: formula
library: Sturm
theory: sturmsquarefree
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (case "NOT EXISTS (j:nat): j<=m AND polynomial(p(j),n(j))(x)=0")
   (("1"
     (lemma "sturm_lem_no_roots")
     (inst?)
     (assert)
     (skeep)
     (case "NOT c = x")
     (("1" (inst - "c" "i") (assert)) ("2" (inst + "i") (assert))))
    ("2"
     (label "BL" -1)
     (hide "BL")
     (label "mp" -1)
     (hide "mp")
     (label "sf" -4)
     (case "EXISTS (epsil:posreal): FORALL (delt:posreal,i:nat): delt<epsil AND i<=m IMPLIES polynomial(p(i), n(i))(x-delt) /= 0")
     (("1"
       (skeep -1)
       (label "hyplem" -1)
       (copy "hyplem")
       (hide "hyplem")
       (inst - "epsil/2" _)
       (lemma "sturm_lem_one_root")
       (inst - "x" "m" "m" "n" "p" "x-epsil/2" "y")
       (assert)
       (split -)
       (("1"
         (flatten)
         (hide -1)
         (invoke (name "SQUAB" "%1") (! -1 2 2))
         (replace -1)
         (lemma "sturm_lem_edge_root")
         (inst - "m" "m" "n" "p" "x-epsil/2" "x")
         (assert)
         (split -)
         (("1"
           (flatten)
           (hide -1)
           (replace -2)
           (expand "sturm_sig")
           (assert))
          ("2"
           (hide 2)
           (skeep)
           (reveal "hyplem")
           (inst - "x-c" "i")
           (("1" (assert)) ("2" (assert))))
          ("3" (hide 2) (skeep) (inst "sf" "c") (assert))
          ("4"
           (lemma "sturm_seq_last_nonzero")
           (inst?)
           (assert)
           (replace "sf")
           (reveal "mp")
           (assert)
           (inst - "x"))))
        ("2"
         (skeep)
         (case "c < x")
         (("1"
           (reveal "hyplem")
           (inst - "x-c" "i")
           (("1" (assert)) ("2" (assert))))
          ("2" (inst - "c" "i") (assert))))
        ("3" (skeep) (inst "sf" "c") (assert))
        ("4"
         (lemma "sturm_seq_last_nonzero")
         (inst?)
         (assert)
         (reveal "mp")
         (assert)
         (replace "sf")
         (inst - "x"))))
      ("2"
       (lemma "roots_between_enum")
       (inst - "m" "n" "p" "x-1" "y")
       (assert)
       (skosimp*)
       (reveal "BL")
       (skosimp*)
       (copy -6)
       (inst -1 "x" "j!1")
       (assert)
       (skosimp*)
       (copy -4)
       (inst - "i!1-1" "i!1")
       (("1"
         (assert)
         (inst + "min(enum!1(i!1)-enum!1(i!1-1),1/2)")
         (("1"
           (skeep)
           (assert)
           (copy -8)
           (inst - "x-delt" "i")
           (assert)
           (skosimp*)
           (assert)
           (case "i!2 < i!1")
           (("1" (assert) (inst - "i!2" "i!1-1") (assert))
            ("2" (inst - "i!1" "i!2") (assert))))
          ("2" (expand "min" 1) (lift-if) (assert))))
        ("2" (assert))))))))


proof_type: f_proof
decl_type: formula
library: Sturm
theory: sturmsquarefree
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (label "mylem" -4)
   (label "mp" -1)
   (hide "mp")
   (name "FFF"
         "LAMBDA (xx,yy:real): (LET nsc =
                                                               LAMBDA (xyz: real):
                                                                 number_sign_changes(LAMBDA (i): polynomial(p(i), n(i))(xyz),
                                                                                     m),
                                                             Nroots = nsc(xx)`num - nsc(yy)`num
                                                           IN
                                                           Nroots >= 0 AND
                                                            (EXISTS (bij:
                                                                       [below(Nroots) ->
                                                                          {xr: real |
                                                                                   xx < xr AND
                                                                                    xr <= yy AND
                                                                                     polynomial(p(0), n(0))(xr) = 0}]):
                                                               bijective?(bij)))")
   (label "FFFname" -1)
   (hide "FFFname")
   (case "FFF(x,y)")
   (("1" (expand "FFF") (assert))
    ("2"
     (hide 2)
     (lemma "roots_between_enum")
     (inst?)
     (inst - "x" "y")
     (assert)
     (skeep -1)
     (label "rij" -1)
     (label "rbj" -4)
     (name "Gseq"
           "LAMBDA (j:upto(K)): IF j = 0 THEN x ELSIF j = K THEN y ELSE (enum(j-1)+enum(j))/2 ENDIF")
     (("1"
       (case "FORALL (j:below(K)): x <= enum(j) AND enum(j)<=y")
       (("1"
         (case "FORALL (x1,x2,x3:real): x1<x2 AND x2<x3 AND FFF(x1,x2) AND FFF(x2,x3) IMPLIES FFF(x1,x3)")
         (("1"
           (case "FORALL (j:nat):j<K IMPLIES FFF(Gseq(j),Gseq(j+1))")
           (("1"
             (case "FORALL (j:nat):j<K IMPLIES FFF(x,Gseq(j+1))")
             (("1" (inst - "K-1") (assert) (expand "Gseq" -1) (propax))
              ("2"
               (induct "j")
               (("1"
                 (assert)
                 (inst - "0")
                 (assert)
                 (expand "Gseq" -1 1)
                 (propax))
                ("2"
                 (skosimp*)
                 (assert)
                 (inst - "1+j!1")
                 (assert)
                 (inst - "x" "Gseq(1+j!1)" "Gseq(2+j!1)")
                 (assert)
                 (split 2)
                 (("1"
                   (expand "Gseq" 1)
                   (inst-cp - "0" "1+j!1")
                   (inst - "0" "j!1")
                   (assert)
                   (ground))
                  ("2"
                   (expand "Gseq" 1)
                   (lift-if)
                   (ground)
                   (("1"
                     (inst-cp - "j!1" "K-1")
                     (inst-cp - "1+j!1" "K-1")
                     (ground))
                    ("2"
                     (inst-cp - "j!1" "1+j!1")
                     (inst - "1+j!1" "2+j!1")
                     (ground))))))
                ("3" (skosimp*) (assert))))
              ("3" (skosimp*) (assert))))
            ("2"
             (hide -1)
             (skeep)
             (case "j = 0")
             (("1"
               (hide 2)
               (replace -1)
               (assert)
               (expand "Gseq" 1 1)
               (expand "FFF" 1 :assert? none)
               (skoletin 1)
               (skoletin 1)
               (case "Nroots = 0")
               (("1"
                 (case "NOT EXISTS (bb:real): x < bb AND bb <= Gseq(1) AND polynomial(p(0),n(0))(bb) = 0")
                 (("1"
                   (assert)
                   (inst 2 "LAMBDA (ii:below(Nroots)): 0")
                   (("1"
                     (expand "bijective?")
                     (split +)
                     (("1" (expand "injective?") (skosimp*))
                      ("2"
                       (expand "surjective?")
                       (skosimp*)
                       (inst 2 "y!1")
                       (assert))))
                    ("2" (hide 2) (skosimp*))))
                  ("2"
                   (skeep -1)
                   (hide +)
                   (expand "Gseq" -2)
                   (inst-cp "rbj" "bb" "0")
                   (assert)
                   (copy "rij")
                   (case "bb<=y")
                   (("1"
                     (assert)
                     (skosimp*)
                     (inst-cp - "0" "i!1")
                     (inst-cp - "1" "i!1")
                     (assert))
                    ("2"
                     (assert)
                     (inst-cp - "0" "K-1")
                     (split -)
                     (("1" (inst - "1" "K-1") (assert))
                      ("2" (assert))))))))
                ("2"
                 (hide 2)
                 (lemma "sturm_lem_no_roots_full")
                 (inst - "m" "n" "p" "x" "Gseq(1)")
                 (assert)
                 (reveal "mp")
                 (assert)
                 (copy "rij")
                 (inst - "0" "1")
                 (case "NOT x<Gseq(1)")
                 (("1" (expand "Gseq" 1) (assert))
                  ("2"
                   (hide -2)
                   (assert)
                   (split -3)
                   (("1" (expand "sturm_sig" -1) (replace -5) (assert))
                    ("2"
                     (skeep)
                     (copy "rbj")
                     (inst - "c" "i")
                     (assert)
                     (inst - "1")
                     (assert)
                     (flatten)
                     (assert)
                     (case "NOT c<=y")
                     (("1" (expand "Gseq" -4) (assert))
                      ("2"
                       (assert)
                       (skosimp*)
                       (copy "rij")
                       (inst - "1" "i!1")
                       (assert)
                       (case "NOT 1 = i!1")
                       (("1" (assert) (expand "Gseq" -6) (assert))
                        ("2" (assert) (expand "Gseq" -7) (assert))))))
                    ("3" (propax))))))))
              ("2"
               (assert)
               (case "j < K-1")
               (("1"
                 (case "NOT FORALL (yy:real): Gseq(j) < yy AND yy <= Gseq(1 + j) AND polynomial(p(0), n(0))(yy) = 0 IMPLIES yy = enum(j)")
                 (("1"
                   (skeep)
                   (copy "rbj")
                   (inst - "yy" "0")
                   (assert)
                   (case "NOT (x<Gseq(j) AND Gseq(1+j)<=y)")
                   (("1"
                     (hide -1)
                     (inst-cp - "j")
                     (inst-cp - "j-1")
                     (inst - "j+1")
                     (assert)
                     (flatten)
                     (expand "Gseq" 1)
                     (assert)
                     (copy "rij")
                     (inst - "0" "j")
                     (assert))
                    ("2"
                     (flatten)
                     (assert)
                     (skosimp*)
                     (case "i!1 < j")
                     (("1"
                       (copy "rij")
                       (inst-cp - "i!1" "j-1")
                       (inst - "i!1" "j")
                       (expand "Gseq")
                       (ground))
                      ("2"
                       (copy "rij")
                       (inst-cp - "j" "i!1")
                       (inst - "j+1" "i!1")
                       (assert)
                       (expand "Gseq")
                       (ground))))))
                  ("2"
                   (label "allzeros" -1)
                   (hide "allzeros")
                   (hide -2)
                   (label "rrj" -2)
                   (lemma "sturm_lem_one_root")
                   (inst - "enum(j)" "m" "m" "n" "p" "Gseq(j)"
                    "Gseq(1+j)")
                   (assert)
                   (split -)
                   (("1"
                     (flatten)
                     (hide -1)
                     (expand "FFF" 2)
                     (assert)
                     (invoke (name "Nsteps" "%1") (! 2 1 1))
                     (replace -1)
                     (case "NOT Nsteps>=0")
                     (("1" (hide 3) (lift-if) (ground))
                      ("2"
                       (assert)
                       (reveal "allzeros")
                       (copy "allzeros")
                       (hide "allzeros")
                       (label "eppypen" -1)
                       (hide "eppypen")
                       (case "NOT polynomial(p(0),n(0))(enum(j)) = 0")
                       (("1"
                         (inst + "LAMBDA (ii:below(0)): 0")
                         (("1"
                           (expand "bijective?")
                           (split +)
                           (("1"
                             (expand "injective?")
                             (skosimp*)
                             (assert))
                            ("2"
                             (expand "surjective?")
                             (skosimp*)
                             (hide 1)
                             (typepred "y!1")
                             (reveal "eppypen")
                             (inst - "y!1")
                             (assert))))
                          ("2" (skosimp*) (assert)) ("3" (skosimp*))))
                        ("2"
                         (label "enumjzero" -1)
                         (inst + "LAMBDA (ii:below(1)): enum(j)")
                         (("1"
                           (expand "bijective?")
                           (split +)
                           (("1"
                             (expand "injective?")
                             (skosimp*)
                             (assert))
                            ("2"
                             (expand "surjective?")
                             (skosimp*)
                             (typepred "y!1")
                             (case "y!1 = enum(j)")
                             (("1"
                               (inst + "0")
                               (("1" (assert)) ("2" (assert))))
                              ("2"
                               (hide 2)
                               (hide (-6 -7))
                               (copy "rbj")
                               (inst - "y!1" "0")
                               (assert)
                               (case "NOT (x<Gseq(j) AND Gseq(1+j)<=y)")
                               (("1"
                                 (split 1)
                                 (("1"
                                   (copy "rij")
                                   (hide -2)
                                   (inst-cp - "0" "j")
                                   (expand "Gseq" 1)
                                   (inst - "0" "j-1")
                                   (assert)
                                   (ground))
                                  ("2"
                                   (expand "Gseq" 1)
                                   (copy "rij")
                                   (inst-cp - "j" "K-1")
                                   (inst - "1+j" "K-1")
                                   (ground))))
                                ("2"
                                 (flatten)
                                 (assert)
                                 (skosimp*)
                                 (case "i!2 <= j")
                                 (("1"
                                   (copy "rij")
                                   (inst - "i!2" "j")
                                   (assert)
                                   (copy "rij")
                                   (inst-cp - "i!2" "j-1")
                                   (assert)
                                   (expand "Gseq")
                                   (assert))
                                  ("2"
                                   (assert)
                                   (expand "Gseq" -5)
                                   (copy "rij")
                                   (inst-cp - "j" "i!2")
                                   (inst - "j+1" "i!2")
                                   (ground))))))))))
                          ("2" (assert) (skosimp*) (assert) (ground))
                          ("3"
                           (assert)
                           (assert)
                           (skosimp*)
                           (copy "rij")
                           (inst-cp - "j-1" "j")
                           (inst - "j" "j+1")
                           (assert)
                           (expand "Gseq" 1)
                           (propax))))))))
                    ("2"
                     (copy "rij")
                     (inst-cp - "j-1" "j")
                     (inst - "j" "j+1")
                     (expand "Gseq" 1)
                     (ground))
                    ("3"
                     (copy "rij")
                     (inst - "j-1" "j")
                     (expand "Gseq" 1)
                     (ground))
                    ("4"
                     (copy "rij")
                     (inst - "j" "j+1")
                     (expand "Gseq" 1)
                     (ground))
                    ("5"
                     (skeep)
                     (case "NOT (x<Gseq(j) AND Gseq(1+j)<=y)")
                     (("1"
                       (copy "rrj")
                       (inst-cp - "j-1")
                       (inst-cp - "j")
                       (inst - "j+1")
                       (expand "Gseq" 1)
                       (assert)
                       (flatten)
                       (assert)
                       (copy "rij")
                       (inst - "0" "j")
                       (assert))
                      ("2"
                       (flatten)
                       (assert)
                       (copy "rbj")
                       (inst - "c" "i")
                       (assert)
                       (skosimp*)
                       (case "i!1 < j")
                       (("1"
                         (copy "rij")
                         (inst-cp - "i!1" "j-1")
                         (inst - "i!1" "j")
                         (expand "Gseq")
                         (ground))
                        ("2"
                         (copy "rij")
                         (inst-cp - "j" "i!1")
                         (inst - "j+1" "i!1")
                         (expand "Gseq")
                         (ground))))))
                    ("6"
                     (skosimp*)
                     (copy "mylem")
                     (inst - "c!1")
                     (assert))
                    ("7"
                     (lemma "sturm_seq_last_nonzero")
                     (inst - "m" "n" "p")
                     (assert)
                     (reveal "mp")
                     (assert)
                     (replace "mylem")
                     (inst - "enum(j)"))))))
                ("2"
                 (expand "FFF" 3)
                 (invoke (name "Nsteps" "%1") (! 3 1 1))
                 (replace -1)
                 (lemma "sturm_lem_edge_root")
                 (inst - "m" "m" "n" "p" "Gseq(j)" "y")
                 (case "NOT Gseq(1+j) = y")
                 (("1" (assert) (expand "Gseq" 1) (propax))
                  ("2"
                   (assert)
                   (case "Gseq(j) < Gseq(1+j)")
                   (("1"
                     (assert)
                     (replace -2)
                     (assert)
                     (case "(FORALL (c: real, i: nat):
                                                             i <= m AND
                                                              Gseq(j) <= c AND c <= y AND polynomial(p(i), n(i))(c) = 0
                                                              IMPLIES c = y)")
                     (("1"
                       (label "DB" -1)
                       (replace "DB")
                       (hide "DB")
                       (split -)
                       (("1"
                         (flatten)
                         (hide -1)
                         (case "NOT Nsteps >= 0")
                         (("1" (hide 4) (lift-if) (ground))
                          ("2"
                           (assert)
                           (case "polynomial(p(0),n(0))(y) /= 0")
                           (("1"
                             (flatten)
                             (inst + "LAMBDA (ii:below(0)): 0")
                             (("1"
                               (expand "bijective?")
                               (split +)
                               (("1"
                                 (expand "injective?")
                                 (skosimp*)
                                 (assert))
                                ("2"
                                 (expand "surjective?")
                                 (skosimp*)
                                 (hide 1)
                                 (typepred "y!1")
                                 (reveal "DB")
                                 (copy -1)
                                 (hide "DB")
                                 (inst - "y!1" "0")
                                 (assert))))
                              ("2" (skosimp*) (assert))
                              ("3" (skosimp*))))
                            ("2"
                             (assert)
                             (flatten)
                             (inst + "LAMBDA (ii:below(1)): y")
                             (("1"
                               (expand "bijective?")
                               (split +)
                               (("1" (expand "injective?") (propax))
                                ("2"
                                 (expand "surjective?")
                                 (skosimp*)
                                 (inst + "0")
                                 (assert)
                                 (typepred "y!1")
                                 (reveal "DB")
                                 (copy "DB")
                                 (hide "DB")
                                 (inst - "y!1" "0")
                                 (assert))))
                              ("2" (skosimp*) (ground))))))))
                        ("2"
                         (hide 4)
                         (skosimp*)
                         (inst "mylem" "c!1")
                         (assert))
                        ("3"
                         (hide 4)
                         (lemma "sturm_seq_last_nonzero")
                         (inst?)
                         (assert)
                         (reveal "mp")
                         (assert)
                         (replace "mylem")
                         (inst - "y"))))
                      ("2"
                       (hide 4)
                       (hide -3)
                       (case "NOT x<Gseq(j)")
                       (("1"
                         (copy "rij")
                         (inst-cp - "0" "j")
                         (expand "Gseq" 1)
                         (inst - "0" "j-1")
                         (ground))
                        ("2"
                         (skeep)
                         (copy "rbj")
                         (inst - "c" "i")
                         (assert)
                         (skosimp*)
                         (replace -1 +)
                         (case "i!1 < j")
                         (("1"
                           (copy "rij")
                           (expand "Gseq" -6)
                           (inst-cp - "i!1" "j")
                           (inst - "i!1" "j-1")
                           (ground))
                          ("2" (assert))))))))
                    ("2"
                     (hide 4)
                     (hide (-2 -3))
                     (expand "Gseq" 1)
                     (copy "rij")
                     (inst-cp - "j-1" "K-1")
                     (inst - "j" "K-1")
                     (ground))))))))))
            ("3" (skosimp*) (assert)) ("4" (skosimp*) (assert))))
          ("2"
           (hide -)
           (hide 2)
           (skeep)
           (expand "FFF")
           (flatten)
           (assert)
           (invoke (name "Nsteps1" "%1") (! -3 1))
           (replace -1)
           (invoke (name "Nsteps2" "%1") (! -6 1))
           (replace -1)
           (skosimp*)
           (name "cable"
                 "LAMBDA (ii:below(Nsteps1+Nsteps2)): IF ii<Nsteps1 THEN bij!1(ii) ELSE bij!2(ii-Nsteps1) ENDIF")
           (("1"
             (inst + "cable")
             (("1"
               (expand "bijective?")
               (flatten)
               (split)
               (("1"
                 (expand "injective?")
                 (skeep)
                 (expand "cable" -1)
                 (lift-if)
                 (lift-if)
                 (lift-if)
                 (assert)
                 (ground)
                 (("1" (inst - "x1!1" "x2!1") (assert))
                  ("2"
                   (hide -8)
                   (inst - "x1!1-Nsteps1" "x2!1-Nsteps1")
                   (assert))))
                ("2"
                 (expand "surjective?" +)
                 (skosimp*)
                 (case "y!1 <=x2")
                 (("1"
                   (expand "surjective?" -9)
                   (inst - "y!1")
                   (skosimp*)
                   (inst + "x!1")
                   (expand "cable" +)
                   (assert))
                  ("2"
                   (expand "surjective?" -11)
                   (inst - "y!1")
                   (("1"
                     (skosimp*)
                     (inst + "Nsteps1+x!1")
                     (("1" (expand "cable" +) (propax)) ("2" (assert))))
                    ("2" (assert))))))))
              ("2"
               (assert)
               (split)
               (("1" (skosimp*) (ground))
                ("2"
                 (expand "cable" +)
                 (skosimp*)
                 (lift-if)
                 (ground))))))
            ("2" (hide 2) (skosimp*) (ground))
            ("3" (hide 2) (skosimp*) (ground))))))
        ("2" (skeep) (inst-cp - "0" "j") (inst - "j" "K-1") (ground))))
      ("2" (skosimp*) (ground)) ("3" (skosimp*) (ground))))))


proof_type: f_proof
decl_type: formula
library: Sturm
theory: sturmsquarefree
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (case "p(m)(0)/=0")
   (("1"
     (flatten)
     (hide 3)
     (assert)
     (expand "sturm_sequence?")
     (split +)
     (("1"
       (skeep)
       (inst - "i" "i+1")
       (("1" (assert)) ("2" (assert)) ("3" (assert))))
      ("2" (skeep) (inst - "i") (("1" (assert)) ("2" (assert))))
      ("3" (skeep) (assert) (expand "max" +) (assert))
      ("4"
       (skeep)
       (inst -11 "1+i")
       (assert)
       (skeep)
       (replace -11)
       (name "pd" "poly_divide(p(i - 1), n(i - 1))(p(i), n(i))(0)")
       (replace -1)
       (rewrite "scal_polynomial2")
       (case "NOT FORALL (cp:posreal,yyz:real): sign_ext(cp*yyz) = sign_ext(yyz)")
       (("1"
         (hide-all-but 1)
         (grind)
         (("1" (mult-by 1 "cp!1") (assert))
          ("2" (mult-by -5 "cp!1") (assert))
          ("3" (mult-by -4 "cp!1") (assert))
          ("4" (mult-by -4 "cp!1") (assert))))
        ("2"
         (case "FORALL (dd5:real): -c*dd5 = c*(-dd5)")
         (("1"
           (rewrite -1 +)
           (rewrite -2 +)
           (hide (-1 -2))
           (lemma "poly_divide_def")
           (inst?)
           (assert)
           (replace -2)
           (split -)
           (("1"
             (inst - "x")
             (assert)
             (replaces -1 +)
             (replace -4)
             (assert)
             (hide-all-but 1)
             (grind :exclude "polynomial"))
            ("2" (inst - "i")) ("3" (inst - "i-1" "i") (assert))))
          ("2" (assert))))))
      ("5" (replaces -2) (hide -) (grind))))
    ("2"
     (hide 2)
     (flatten)
     (assert)
     (expand "sturm_sequence?")
     (split +)
     (("1"
       (skeep)
       (inst - "i" "i+1")
       (("1" (assert)) ("2" (assert)) ("3" (assert))))
      ("2" (skeep) (inst - "i") (("1" (assert)) ("2" (assert))))
      ("3" (skeep) (assert) (expand "max" +) (assert))
      ("4"
       (skeep)
       (inst -12 "1+i")
       (assert)
       (skeep)
       (replace -12)
       (name "pd" "poly_divide(p(i - 1), n(i - 1))(p(i), n(i))(0)")
       (replace -1)
       (rewrite "scal_polynomial2")
       (case "NOT FORALL (cp:posreal,yyz:real): sign_ext(cp*yyz) = sign_ext(yyz)")
       (("1"
         (hide-all-but 1)
         (grind)
         (("1" (mult-by 1 "cp!1") (assert))
          ("2" (mult-by -5 "cp!1") (assert))
          ("3" (mult-by -4 "cp!1") (assert))
          ("4" (mult-by -4 "cp!1") (assert))))
        ("2"
         (case "FORALL (dd5:real): -c*dd5 = c*(-dd5)")
         (("1"
           (rewrite -1 +)
           (rewrite -2 +)
           (hide (-1 -2))
           (lemma "poly_divide_def")
           (inst?)
           (assert)
           (replace -2)
           (split -)
           (("1"
             (inst - "x")
             (assert)
             (replaces -1 +)
             (replace -4)
             (assert)
             (hide-all-but 1)
             (grind :exclude "polynomial"))
            ("2" (inst - "i")) ("3" (inst - "i-1" "i") (assert))))
          ("2" (assert))))))
      ("5"
       (case "EXISTS (t:real): polynomial(p(m - 1), n(m - 1))(t) = 0")
       (("1"
         (hide +)
         (skeep)
         (case "FORALL (k:nat): m-k-1 >=0 IMPLIES polynomial(p(m-k-1),n(m-k-1))(t)=0")
         (("1"
           (copy -8)
           (inst - "t")
           (inst-cp - "m-1")
           (assert)
           (assert)
           (flatten)
           (inst - "m-2")
           (("1" (assert))
            ("2"
             (assert)
             (case "NOT m = 1")
             (("1" (assert))
              ("2"
               (replace -1)
               (replace -6)
               (expand "polynomial" +)
               (expand "sigma")
               (expand "sigma")
               (propax))))))
          ("2"
           (case "FORALL (k:nat,ii:nat): k<=ii AND m-k-1>=0 IMPLIES polynomial(p(m - k - 1), n(m - k - 1))(t) = 0")
           (("1" (skeep) (inst - "k" "k") (assert))
            ("2"
             (hide 2)
             (induct "ii")
             (("1" (skeep) (assert))
              ("2"
               (skeep)
               (assert)
               (skeep)
               (case "NOT k = 1+j")
               (("1" (inst - "k") (assert))
                ("2"
                 (replace -1)
                 (assert)
                 (copy -14)
                 (inst - "m-j")
                 (assert)
                 (skeep -1)
                 (assert)
                 (name "pd"
                       " poly_divide(p(-2 - j + m), n(-2 - j + m))
                                                    (p(-1 - j + m), n(-1 - j + m))(0)")
                 (("1"
                   (assert)
                   (replace -1)
                   (assert)
                   (lemma "poly_divide_def")
                   (inst?)
                   (replace -2)
                   (assert)
                   (split -)
                   (("1"
                     (inst?)
                     (assert)
                     (inst-cp - "j")
                     (assert)
                     (replace -6)
                     (assert)
                     (inst-cp - "j-1")
                     (("1"
                       (assert)
                       (replace -1 +)
                       (decompose-equality -3)
                       (inst - "t")
                       (rewrite "scal_polynomial2")
                       (assert)
                       (mult-by 1 "-c")
                       (assert))
                      ("2"
                       (assert)
                       (case "NOT j = 0")
                       (("1" (assert))
                        ("2"
                         (replaces -1)
                         (assert)
                         (lemma "poly_divide_def")
                         (inst?)
                         (replace -3)
                         (assert)
                         (split -)
                         (("1"
                           (inst - "t")
                           (replace -6)
                           (assert)
                           (replace -1 +)
                           (decompose-equality -4)
                           (inst - "t")
                           (rewrite "scal_polynomial2")
                           (mult-by 2 "-c")
                           (assert)
                           (case "polynomial(p(m),n(m))(t)=0")
                           (("1" (assert))
                            ("2"
                             (expand "polynomial" 1)
                             (expand "sigma" 1)
                             (expand "sigma" 1)
                             (assert))))
                          ("2" (assert) (inst - "m-1"))
                          ("3" (inst - "m-2" "m-1") (assert))))))))
                    ("2" (inst?) (assert) (inst?))
                    ("3" (inst - "m-j-2" "m-j-1") (assert))))
                  ("2" (inst -11 "m-j-1") (assert))))))))))))
        ("2"
         (case "FORALL (x, y):x<y IMPLIES
                       sign_ext(polynomial(p(m - 1), n(m - 1))(x)) =
                        sign_ext(polynomial(p(m - 1), n(m - 1))(y))")
         (("1" (skeep) (inst-cp - "x" "y") (inst - "y" "x") (ground))
          ("2"
           (hide 3)
           (skeep)
           (inst-cp + "x")
           (inst-cp + "y")
           (expand "sign_ext" +)
           (lift-if)
           (lift-if)
           (lift-if)
           (lift-if)
           (assert)
           (ground)
           (("1"
             (lemma "poly_intermediate_value_inc")
             (inst - "p(m-1)" "0" "n(m-1)" "x" "y")
             (assert)
             (skeep -)
             (inst + "cc"))
            ("2"
             (lemma "poly_intermediate_value_dec")
             (inst - "p(m-1)" "0" "n(m-1)" "x" "y")
             (assert)
             (skeep)
             (inst + "cc"))))))))))))


proof_type: f_proof
decl_type: formula
library: TRS
theory: mem_test
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (expand subseq)
   (skeep)
   (inst -1 i)
   (expand member_seq)
   (expand finseq_appl)
   (skosimp)
   (typepred i!1)
   (expand rest (-1 -2))
   (expand* ^ min)
   (expand empty_seq -1)
   (lift-if)
   (assert)
   (prop)
   (inst 7 "1+i!1"))


proof_type: f_proof
decl_type: formula
library: TRS
theory: mem_test
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (split)
   (("1"
     (flatten)
     (expand o)
     (expand seq2set)
     (expand finseq_appl)
     (skosimp)
     (lift-if)
     (prop)
     (("1" (inst 1 kk!1)) ("2" (inst 3 "kk!1 - seq1`length") (assert))))
    ("2"
     (flatten)
     (expand o)
     (expand seq2set)
     (expand finseq_appl)
     (split)
     (("1"
       (skosimp)
       (inst 1 kk!1)
       (("1" (lift-if) (assert)) ("2" (assert))))
      ("2" (skosimp) (inst 1 "kk!1+seq1`length") (assert))))))


proof_type: f_proof
decl_type: formula
library: TRS
theory: mem_test
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (induct n)
   (("1" (skeep) (inst 1 empty_seq) (expand empty_seq 1 1) (skeep))
    ("2"
     (skeep)
     (skeep)
     (inst -1 P "rest(seq1)" "rest(seq2)")
     (prop)
     (("1"
       (inst -4 0)
       (skosimp*)
       (inst 1 "add_first(x!1, seq!1)")
       (expand* add_first insert? finseq_appl)
       (assert)
       (skeep)
       (lift-if)
       (case "i=0")
       (("1" (assert))
        ("2"
         (assert)
         (inst -2 i-1)
         (expand rest -2)
         (expand* ^ min empty_seq))))
      ("2" (hide-all-but (-1 1)) (grind))
      ("3" (hide-all-but (-2 1)) (grind))
      ("4"
       (hide 2)
       (skeep)
       (typepred i)
       (expand* rest ^ min empty_seq)
       (assert)
       (inst -4 1+i))))
    ("3" (hide 2) (skeep) (skeep) (skeep) (assert))
    ("4" (hide 2) (skeep) (skeep) (skeep) (assert))
    ("5" (hide 2) (skeep) (skeep) (assert))
    ("6" (hide 2) (skeep) (skeep) (assert))
    ("7" (hide 2) (skeep) (assert)) ("8" (hide 2) (skeep) (assert))))


proof_type: f_proof
decl_type: formula
library: TRS
theory: mem_test
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (induct n)
   (("1" (skeep) (inst 1 empty_seq) (expand empty_seq 1 1) (skeep))
    ("2"
     (skeep)
     (skeep)
     (inst -1 P1)
     (prop)
     (("1"
       (skosimp)
       (inst -3 j)
       (skosimp)
       (inst 1 "add_last(seq!1, x!1)")
       (expand* add_last insert? finseq_appl)
       (assert)
       (skeep)
       (lift-if)
       (prop)
       (("1" (inst -3 i) (assert)) ("2" (typepred i) (assert))))
      ("2" (hide 2) (skeep) (inst -1 i))))
    ("3" (hide 2) (skeep) (skeep) (assert))))


proof_type: f_proof
decl_type: formula
library: TRS
theory: relations_closure
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (lemma "reflexive_closure_identity")
   (inst -1 "RC(R)")
   (rewrite-lemma "change_to_RC" ("R" "RC(R)")))


proof_type: f_proof
decl_type: formula
library: TRS
theory: relations_closure
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (prop)
   (("1"
     (lemma "reflexive_closure_identity")
     (inst?)
     (rewrite-lemma "change_to_RC" ("R" "S"))
     (assert))
    ("2" (assert))))


proof_type: f_proof
decl_type: formula
library: TRS
theory: relations_closure
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (lemma "symmetric_closure_identity")
   (inst -1 "SC(R)")
   (rewrite-lemma "change_to_SC" ("R" "SC(R)")))


proof_type: f_proof
decl_type: formula
library: TRS
theory: relations_closure
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (prop)
   (("1"
     (lemma "symmetric_closure_identity")
     (inst?)
     (rewrite-lemma "change_to_SC" ("R" "S"))
     (assert))
    ("2" (assert))))


proof_type: f_proof
decl_type: formula
library: TRS
theory: relations_closure
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (expand* "subset?" "member")
   (skeep)
   (expand* "TC" "IUnion")
   (inst 1 "1")
   (rewrite "iterate_1"))


proof_type: f_proof
decl_type: formula
library: TRS
theory: relations_closure
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (decompose-equality)
   (expand* "TC" "IUnion")
   (iff)
   (prop)
   (("1"
     (skolem * "i")
     (rewrite "iterate_converse")
     (expand "converse")
     (inst?))
    ("2"
     (expand "converse" -1)
     (skolem * "i")
     (inst?)
     (rewrite "iterate_converse")
     (expand "converse")
     (propax))))


proof_type: f_proof
decl_type: formula
library: TRS
theory: relations_closure
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (lemma "transitive_closure_identity")
   (inst -1 "TC(R)")
   (rewrite-lemma "change_to_TC" ("R" "TC(R)")))


proof_type: f_proof
decl_type: formula
library: TRS
theory: relations_closure
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (prop)
   (("1"
     (lemma "transitive_closure_identity")
     (inst?)
     (rewrite-lemma "change_to_TC" ("R" "S"))
     (assert))
    ("2" (assert))))


proof_type: f_proof
decl_type: formula
library: TRS
theory: relations_closure
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (expand* "subset?" "member")
   (skeep)
   (expand* "RTC" "IUnion")
   (inst 1 "1")
   (rewrite "iterate_1"))


proof_type: f_proof
decl_type: formula
library: TRS
theory: relations_closure
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (lemma " preorder_closure_identity")
   (inst -1 "RTC(R)")
   (("1" (rewrite-lemma "change_to_RTC" ("R" "RTC(R)")))
    ("2"
     (assert)
     (expand "preorder?")
     (hide 2)
     (typepred "RTC(R)")
     (expand "reflexive_transitive?")
     (propax))))


proof_type: f_proof
decl_type: formula
library: TRS
theory: relations_closure
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (prop)
   (("1"
     (lemma " preorder_closure_identity")
     (inst?)
     (("1" (rewrite-lemma "change_to_RTC" ("R" "S")) (assert))
      ("2" (expand* "reflexive_transitive?" "preorder?"))))
    ("2" (assert))))


proof_type: f_proof
decl_type: formula
library: TRS
theory: relations_closure
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (expand* "equivalence_closure" "EC")
   (rewrite-lemma "change_to_SC" ("R" "R"))
   (rewrite-lemma "change_to_RTC" ("R" "SC(R)")))


proof_type: f_proof
decl_type: formula
library: TRS
theory: relations_closure
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (lemma "R_subset_SC")
   (inst?)
   (expand* "subset?" "member")
   (skeep)
   (inst?)
   (expand "EC")
   (expand* "RTC" "IUnion")
   (inst 1 "1")
   (rewrite "iterate_1")
   (assert))


proof_type: f_proof
decl_type: formula
library: TRS
theory: relations_closure
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (expand "EC")
   (lemma "R_subset_SC")
   (inst?)
   (lemma "preorder_closure_is_monotone")
   (inst -1 "R" "SC(R)")
   (rewrite-lemma "change_to_RTC" ("R" "R"))
   (rewrite-lemma "change_to_RTC" ("R" "SC(R)"))
   (assert))


proof_type: f_proof
decl_type: formula
library: TRS
theory: relations_closure
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (lemma "equivalence_closure_identity")
   (inst -1 "EC(R)")
   (rewrite-lemma "change_to_EC" ("R" "EC(R)")))


proof_type: f_proof
decl_type: formula
library: TRS
theory: relations_closure
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (prop)
   (("1"
     (lemma "equivalence_closure_identity")
     (inst?)
     (rewrite-lemma "change_to_EC" ("R" "S"))
     (assert))
    ("2" (assert))))


proof_type: t_proof
decl_type: tcc
library: TRS
theory: relations_closure
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (expand "reflexive_transitive?")
   (skolem!)
   (split)
   (("1"
     (expand* "reflexive?" "IUnion")
     (skolem!)
     (inst + "0")
     (expand "iterate")
     (propax))
    ("2"
     (expand* "transitive?" "IUnion")
     (skosimp*)
     (forward-chain "iterate_add_applied")
     (inst?))))


proof_type: t_proof
decl_type: tcc
library: TRS
theory: relations_closure
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (lemma "preorder_closure_preserves_symmetry")
   (inst -1 "SC(R)")
   (rewrite-lemma "change_to_RTC" ("R" "SC(R)")))


proof_type: f_proof
decl_type: formula
library: TRS
theory: noetherian
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (split)
   (("1"
     (flatten)
     (expand "noetherian?")
     (lemma "transitive_closure_preserves_well_foundedness")
     (inst -1 "converse(R)")
     (hide -2)
     (case-replace "transitive_closure[T] = TC" :hide? t)
     (("1"
       (rewrite "TC_converse")
       (lemma "well_founded_order_is_well_founded")
       (inst -1 "converse(TC(R))"))
      ("2" (hide-all-but 1) (expand* "transitive_closure" "TC"))))
    ("2"
     (flatten)
     (expand "noetherian?")
     (expand "well_founded?")
     (skeep)
     (inst?)
     (assert)
     (prop)
     (hide -2)
     (skolem * "y")
     (inst 1 "y")
     (skeep)
     (inst -1 "x")
     (expand "converse")
     (expand* "TC" "IUnion")
     (inst 1 "1")
     (rewrite "iterate_1"))))


proof_type: f_proof
decl_type: formula
library: TRS
theory: noetherian
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skolem * ("S1" "P"))
   (flatten)
   (typepred "S1")
   (lemma "R_is_Noet_iff_TC_is")
   (inst?)
   (assert)
   (hide -2)
   (rewrite "wf_induction[T, converse(TC(S1))]" :subst ("p" "P"))
   (("1"
     (hide (-1 2))
     (skeep)
     (inst -2 "x")
     (expand "converse")
     (assert))
    ("2" (hide (-2 2)) (expand "noetherian?") (propax))))


proof_type: f_proof
decl_type: formula
library: TRS
theory: results_confluence
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (expand "joinable?")
   (skolem * "z")
   (flatten)
   (lemma "RTC_subset_EC")
   (inst?)
   (expand* "subset?" "member")
   (copy -1)
   (inst -1 "(x, z)")
   (inst -2 "(y, z)")
   (assert)
   (hide (-3 -4))
   (typepred "EC(R)")
   (expand "equivalence?")
   (flatten)
   (hide -1)
   (expand "symmetric?")
   (expand "transitive?")
   (inst -1 "y" "z")
   (inst -2 "x" "z" "y")
   (assert))


proof_type: f_proof
decl_type: formula
library: TRS
theory: results_confluence
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (expand "joinable?" -2)
   (skolem * "r")
   (flatten)
   (expand "joinable?")
   (inst?)
   (prop)
   (typepred "RTC(R)")
   (expand "reflexive_transitive?")
   (flatten)
   (lemma "R_subset_RTC")
   (inst?)
   (expand* "subset?" "member")
   (inst -1 "(x, y)")
   (assert)
   (expand "transitive?")
   (inst -3 "x" "y" "r")
   (assert))


proof_type: f_proof
decl_type: formula
library: TRS
theory: results_confluence
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (expand "joinable?")
   (induct "n")
   (("1"
     (skeep)
     (typepred "RTC(R)")
     (inst 1 "x")
     (expand "reflexive_transitive?")
     (flatten)
     (split)
     (("1" (hide-all-but (-1 1)) (expand "reflexive?") (inst?))
      ("2"
       (hide-all-but (-4 1))
       (expand "iterate")
       (assert)
       (expand* "RTC" "IUnion")
       (inst? 1 ("i" "0"))
       (expand "iterate")
       (assert))))
    ("2"
     (skeep)
     (skeep)
     (rewrite "iterate_add_one")
     (expand "o")
     (skolem * "r")
     (flatten)
     (inst -1 "R" "r" "y")
     (assert)
     (hide -4)
     (expand* "SC" "union" "member")
     (prop)
     (("1"
       (hide -3)
       (skolem * "z")
       (inst?)
       (prop)
       (lemma "R_subset_RTC")
       (inst?)
       (expand* "subset?" "member")
       (inst -1 "(x, r)")
       (assert)
       (typepred "RTC(R)")
       (expand "reflexive_transitive?")
       (flatten)
       (expand "transitive?")
       (inst -2 "x" "r" "z")
       (assert))
      ("2"
       (expand "converse")
       (expand "semi_confluent?")
       (expand "joinable?")
       (skolem * "z1")
       (flatten)
       (inst -4 "r" "x" "z1")
       (assert)
       (skolem * "z2")
       (inst 1 "z2")
       (prop)
       (hide-all-but (-3 -5 1))
       (typepred "RTC(R)")
       (expand "reflexive_transitive?")
       (flatten)
       (expand "transitive?")
       (inst -2 "y" "z1" "z2")
       (assert))))))


proof_type: f_proof
decl_type: formula
library: TRS
theory: results_confluence
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (expand "semi_confluent?")
   (skeep)
   (expand "confluent?")
   (inst? -1 ("x" "x" "y" "y" "z" "z"))
   (prop)
   (hide (-2 2))
   (lemma "R_subset_RTC")
   (inst?)
   (expand* "subset?" "member")
   (inst -1 "(x,y)")
   (assert))


proof_type: f_proof
decl_type: formula
library: TRS
theory: results_confluence
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (expand "church_rosser?")
   (skeep)
   (expand "EC")
   (expand "RTC")
   (expand "IUnion")
   (skolem * "i")
   (lemma "semi_and_iterate")
   (inst -1 "R" "x" "y" "i")
   (assert))


proof_type: f_proof
decl_type: formula
library: TRS
theory: results_confluence
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (prop)
   (("1"
     (expand "confluent?")
     (skeep)
     (expand "church_rosser?")
     (inst? -1 ("x" "y" "y" "z"))
     (prop)
     (hide 2)
     (lemma "preorder_closure_is_monotone")
     (inst -1 "R" "SC(R)")
     (rewrite-lemma "change_to_RTC" ("R" "R"))
     (rewrite-lemma "change_to_RTC" ("R" "SC(R)"))
     (lemma "R_subset_SC")
     (inst?)
     (assert)
     (hide -1)
     (expand* "subset?" "member")
     (copy -1)
     (inst? -1 ("x" "(x, y)"))
     (inst? -2 ("x" "(x, z)"))
     (assert)
     (typepred "EC(R)")
     (expand "EC")
     (expand "equivalence?")
     (flatten)
     (hide (-1 -6 -7))
     (expand* "symmetric?" "transitive?")
     (inst? -1 ("x" "x" "y" "y"))
     (inst? -2 ("x" "y" "y" "x" "z" "z"))
     (assert))
    ("2"
     (lemma "Confl_implies_Semi")
     (inst?)
     (lemma "Semi_implies_CR")
     (inst?)
     (assert))))


proof_type: f_proof
decl_type: formula
library: TRS
theory: results_confluence
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (induct "n")
   (("1"
     (skeep)
     (inst 1 "y")
     (prop)
     (("1"
       (assert)
       (expand "RTC")
       (expand "IUnion")
       (inst 1 "0")
       (expand "iterate")
       (propax))
      ("2"
       (expand "iterate")
       (expand "RC")
       (expand "union")
       (flatten)
       (expand "member")
       (assert))))
    ("2"
     (skeep)
     (skeep)
     (rewrite "iterate_add")
     (rewrite "iterate_1")
     (expand "o")
     (skolem * "xj")
     (inst -1 "R" "x" "y" "xj")
     (prop)
     (skolem * "yj")
     (flatten)
     (expand "RC" -2)
     (expand* "union" "member")
     (split)
     (("1"
       (hide (-4 -5))
       (expand "strong_confluent?")
       (inst -3 "xj" "yj" "z")
       (assert)
       (skolem * "r")
       (inst 1 "r")
       (prop)
       (typepred "RTC(R)")
       (expand "reflexive_transitive?")
       (flatten)
       (expand "transitive?")
       (inst -2 "y" "yj" "r")
       (assert))
      ("2"
       (replace -1 -2 rl)
       (hide-all-but (-2 -6 1))
       (inst 1 "z")
       (prop)
       (("1"
         (lemma "R_subset_RTC")
         (inst?)
         (expand* "subset?" "member")
         (inst -1 "(xj, z)")
         (assert)
         (typepred "RTC(R)")
         (expand "reflexive_transitive?")
         (flatten)
         (expand "transitive?")
         (inst -2 "y" "xj" "z")
         (assert))
        ("2" (expand* "RC" "union" "member"))))))))


proof_type: f_proof
decl_type: formula
library: TRS
theory: results_confluence
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (expand "semi_confluent?")
   (skeep)
   (expand* "RTC" "IUnion")
   (skolem * "i")
   (lemma "strong_and_iterate")
   (inst -1 "R" "x" "y" "z" "i")
   (assert)
   (hide-all-but (-1 1))
   (expand "joinable?")
   (skolem * "r")
   (flatten)
   (inst 1 "r")
   (prop)
   (hide -1)
   (expand* "RTC" "IUnion")
   (expand* "RC" "union" "member")
   (prop)
   (("1" (inst 1 "1") (rewrite "iterate_1"))
    ("2" (inst 1 "0") (expand "iterate") (propax))))


proof_type: f_proof
decl_type: formula
library: TRS
theory: results_confluence
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (lemma "Str_Confl_implies_Semi_Confl")
   (inst?)
   (lemma "Semi_implies_CR")
   (inst?)
   (lemma "CR_iff_Confluent")
   (inst?)
   (assert))


proof_type: f_proof
decl_type: formula
library: TRS
theory: results_confluence
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (expand "strong_confluent?")
   (skeep)
   (expand "diamond_property?")
   (inst -1 "x" "y" "z")
   (assert)
   (skolem * "r")
   (flatten)
   (hide (-3 -4))
   (inst 1 "r")
   (lemma "R_subset_RTC")
   (inst?)
   (expand* "subset?" "member")
   (inst -1 "(y, r)")
   (lemma "R_subset_RC")
   (inst?)
   (expand* "subset?" "member")
   (inst -1 "(z, r)")
   (assert))


proof_type: f_proof
decl_type: formula
library: TRS
theory: results_confluence
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (decompose-equality -1)
   (copy -1)
   (copy -1)
   (copy -1)
   (expand "confluent?")
   (prop)
   (("1"
     (skeep)
     (inst -1 "x" "y" "z")
     (inst? -4 ("x" "(x, y)"))
     (inst? -5 ("x" "(x, z)"))
     (replace -4 -1)
     (replace -5 -1)
     (assert)
     (hide-all-but (-1 -6 -7 1))
     (expand "joinable?")
     (skolem * "r")
     (flatten)
     (inst? -3 ("x" "(y, r)"))
     (inst? -4 ("x" "(z, r)"))
     (inst 1 "r")
     (assert))
    ("2"
     (skeep)
     (inst -1 "x" "y" "z")
     (inst? -4 ("x" "(x, y)"))
     (inst? -5 ("x" "(x, z)"))
     (replace -4 -1 rl)
     (replace -5 -1 rl)
     (assert)
     (hide-all-but (-1 -6 -7 1))
     (expand "joinable?")
     (skolem * "r")
     (flatten)
     (inst? -3 ("x" "(y, r)"))
     (inst? -4 ("x" "(z, r)"))
     (inst 1 "r")
     (assert))))


proof_type: f_proof
decl_type: formula
library: TRS
theory: results_confluence
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (lemma "preorder_closure_is_monotone")
   (copy -1)
   (inst -1 "R1" "R2")
   (inst -2 "R2" "RTC(R1)")
   (rewrite-lemma "change_to_RTC" ("R" "R1"))
   (rewrite-lemma "change_to_RTC" ("R" "R2"))
   (rewrite-lemma "change_to_RTC" ("R" "RTC(R1)"))
   (assert)
   (rewrite "RTC_idempotent")
   (hide (-3 -4))
   (apply-extensionality :hide? t)
   (iff)
   (expand* "subset?" "member")
   (inst -1 "(x!1, x!2)")
   (inst -2 "(x!1, x!2)")
   (prop))


proof_type: f_proof
decl_type: formula
library: TRS
theory: results_confluence
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (lemma "R1_equal_R2")
   (inst -1 "R1" "R2")
   (assert)
   (hide (-2 -3))
   (lemma "Strong_Confl_implies_Confl")
   (inst -1 "R2")
   (assert)
   (hide -3)
   (lemma "R1_Confl_iff_R2_Confl")
   (inst -1 "R1" "R2")
   (assert))


proof_type: f_proof
decl_type: formula
library: TRS
theory: results_confluence
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (expand "diamond_property?")
   (skeep)
   (expand "o" (-4 -5))
   (skolem * "y1")
   (skolem * "z1")
   (expand "confluent?")
   (inst -1 "x" "y1" "z1")
   (assert)
   (prop)
   (expand "joinable?" -1)
   (skolem * "r1")
   (flatten)
   (copy -4)
   (expand "commute?")
   (inst -5 "y1" "r1" "y")
   (assert)
   (skolem * "r2")
   (flatten)
   (inst -1 "z1" "r1" "z")
   (assert)
   (skolem * "r3")
   (flatten)
   (inst -5 "r1" "r2" "r3")
   (assert)
   (expand "joinable?")
   (skolem * "r4")
   (flatten)
   (inst 1 "r4")
   (expand "o")
   (split)
   (("1" (inst 1 "r2") (assert)) ("2" (inst 1 "r3") (assert))))


proof_type: f_proof
decl_type: formula
library: TRS
theory: results_confluence
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (split)
   (("1"
     (expand* "subset?" "member")
     (skeep)
     (expand* "union" "member")
     (prop)
     (("1"
       (expand "o")
       (inst 1 "x`2")
       (lemma "R_subset_RTC")
       (inst?)
       (expand* "subset?" "member")
       (inst?)
       (assert)
       (hide-all-but 1)
       (expand* "RTC" "IUnion")
       (inst 1 "0")
       (expand "iterate")
       (propax))
      ("2"
       (expand "o")
       (inst 1 "x`1")
       (lemma "R_subset_RTC")
       (inst -1 "R2")
       (expand* "subset?" "member")
       (inst?)
       (assert)
       (hide-all-but 1)
       (expand* "RTC" "IUnion")
       (inst 1 "0")
       (expand "iterate")
       (propax))))
    ("2"
     (expand* "subset?" "member")
     (skeep)
     (expand "o")
     (skolem * "y")
     (flatten)
     (expand* "RTC" "IUnion")
     (skolem * "i1")
     (skolem * "i2")
     (inst 1 "i1 + i2")
     (rewrite "iterate_add")
     (expand "o")
     (inst 1 "y")
     (split)
     (("1"
       (hide -2)
       (case "subset?(R1, union(R1, R2))")
       (("1"
         (lemma "iterate_is_monotone")
         (inst? -1 ("R1" "R1" "R2" "union(R1, R2)"))
         (assert)
         (hide -2)
         (expand* "subset?" "member")
         (inst -1 "(x`1, y)")
         (assert))
        ("2"
         (expand* "subset?" "member")
         (skosimp*)
         (expand* "union" "member")
         (assert))))
      ("2"
       (hide -1)
       (case "subset?(R2, union(R1, R2))")
       (("1"
         (lemma "iterate_is_monotone")
         (inst? -1 ("R1" "R2" "R2" "union(R1, R2)"))
         (assert)
         (hide -2)
         (expand* "subset?" "member")
         (inst -1 "(y,x`2)")
         (assert))
        ("2"
         (expand* "subset?" "member")
         (skosimp*)
         (expand* "union" "member")
         (assert))))))))


proof_type: f_proof
decl_type: formula
library: TRS
theory: results_confluence
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (lemma "Confluence_Commute")
   (inst -1 "R1" "R2")
   (assert)
   (lemma "DP_implies_StC")
   (inst -1 "RTC(R1) o RTC(R2)")
   (assert)
   (lemma "R1_R2_RTC_R1_R2")
   (inst -1 "R1" "R2")
   (flatten)
   (lemma "R2_Str_Confl_implies_R1_Confl")
   (inst -1 "union(R1, R2)" "RTC(R1) o RTC(R2)")
   (assert))


proof_type: f_proof
decl_type: formula
library: TRS
theory: newman_yokouchi
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (split)
   (("1"
     (flatten)
     (hide -2)
     (expand* "confluent?" "locally_confluent?")
     (skeep)
     (inst -1 "x" "y" "z")
     (lemma "R_subset_RTC")
     (inst?)
     (expand* "subset?" "member")
     (inst -1 "(x, y)")
     (lemma "R_subset_RTC")
     (inst?)
     (expand* "subset?" "member")
     (inst -1 "(x, z)")
     (assert))
    ("2"
     (flatten)
     (lemma "noetherian_induction")
     (inst?)
     (inst -1
      "(LAMBDA (a: T): (FORALL (b, c: T): RTC(R)(a, b) AND RTC(R)(a, c) IMPLIES joinable?(R)(b,c)))")
     (split)
     (("1"
       (hide (-2 -3))
       (expand "confluent?")
       (skeep)
       (inst -1 "x" "y" "z")
       (assert))
      ("2"
       (hide 2)
       (skeep)
       (skeep)
       (expand "RTC" -2)
       (expand "IUnion")
       (expand "RTC" -3)
       (expand "IUnion")
       (skolem * "i")
       (skolem * "j")
       (case-replace "i = 0" :hide? t)
       (("1"
         (hide-all-but (-2 -3 1))
         (expand "joinable?")
         (inst 1 "c")
         (expand "RTC")
         (expand "IUnion")
         (split)
         (("1" (expand "iterate" -1) (replaces -1) (inst 1 "j"))
          ("2" (inst 1 "0") (expand "iterate" 1) (propax))))
        ("2"
         (case-replace "j = 0" :hide? t)
         (("1"
           (hide-all-but (-2 -3 2))
           (expand "joinable?")
           (inst 1 "b")
           (expand "RTC")
           (expand "IUnion")
           (split)
           (("1" (inst 1 "0") (expand "iterate" 1) (propax))
            ("2" (expand "iterate" -2) (replaces -2) (inst 1 "i"))))
          ("2"
           (lemma iterate_add_one)
           (copy -1)
           (inst? -1 ("R" "R" "n" "i - 1"))
           (("1"
             (inst? -2 ("R" "R" "n" "j - 1"))
             (("1"
               (assert)
               (decompose-equality)
               (decompose-equality)
               (inst -2 "(x, b)")
               (inst -1 "(x, c)")
               (replaces -1)
               (replaces -1)
               (expand "o")
               (skolem * "x1")
               (skolem * "x2")
               (flatten)
               (lemma "iterate_RTC")
               (copy -1)
               (inst -1 "R" "i - 1")
               (inst -2 "R" "j - 1")
               (expand* "subset?" "member")
               (inst -1 "(x1, b)")
               (inst -2 "(x2, c)")
               (expand "locally_confluent?")
               (inst -8 "x" "x1" "x2")
               (assert)
               (expand "joinable?" -8)
               (skolem * "u")
               (flatten)
               (hide (-5 -7))
               (copy -3)
               (inst -4 "x1")
               (split)
               (("1"
                 (inst -1 "b" "u")
                 (assert)
                 (expand "joinable?" -1)
                 (skolem * "v")
                 (flatten)
                 (typepred "RTC(R)")
                 (expand "reflexive_transitive?")
                 (flatten)
                 (hide -1)
                 (expand "transitive?")
                 (copy -1)
                 (inst -2 "x2" "u" "v")
                 (assert)
                 (hide (-11 -4))
                 (inst -4 "x2")
                 (split)
                 (("1"
                   (inst -1 "v" "c")
                   (assert)
                   (hide-all-but (-1 -2 -4 3))
                   (expand "joinable?" -1)
                   (skolem * "w")
                   (flatten)
                   (expand "joinable?")
                   (inst -3 "b" "v" "w")
                   (inst 1 "w")
                   (assert))
                  ("2"
                   (hide-all-but (-7 1))
                   (lemma "R_subset_TC")
                   (inst?)
                   (expand* "subset?" "member")
                   (inst -1 "(x, x2)")
                   (prop))))
                ("2"
                 (hide-all-but (-4 1))
                 (lemma "R_subset_TC")
                 (inst?)
                 (expand* "subset?" "member")
                 (inst -1 "(x, x1)")
                 (assert))))
              ("2" (hide-all-but (1 2)) (typepred "j") (assert))
              ("3" (hide-all-but (1 2)) (typepred "j") (assert))))
            ("2" (hide-all-but (1 3)) (typepred "i") (assert))
            ("3" (hide-all-but (1 3)) (typepred "i") (assert))))))))))))


proof_type: f_proof
decl_type: formula
library: TRS
theory: newman_yokouchi
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (skeep)
   (lemma "noetherian_induction")
   (inst?)
   (inst -1
    "LAMBDA (a:T): (FORALL (b,c:T): RTC(R)(a,c) & S(a,b) => (EXISTS (d:T): RTC(R)(b,d) & (RTC(R) o S o RTC(R))(c,d)))")
   (split)
   (("1" (inst -1 "x") (inst -1 "y" "z") (assert))
    ("2"
     (skosimp*)
     (hide 2)
     (expand "RTC" -2)
     (expand "IUnion")
     (skolem * "i")
     (case-replace "i = 0")
     (("1"
       (expand "iterate")
       (hide-all-but (-3 -4 1))
       (inst 1 "b!1")
       (split)
       (("1"
         (expand* "RTC" "IUnion")
         (inst 1 "0")
         (expand "iterate")
         (propax))
        ("2"
         (expand "o")
         (replaces -1)
         (inst 1 "b!1")
         (split)
         (("1"
           (inst 1 "c!1")
           (split)
           (("1"
             (expand* "RTC" "IUnion")
             (inst 1 "0")
             (expand "iterate")
             (propax))
            ("2" (propax))))
          ("2"
           (expand* "RTC" "IUnion")
           (inst 1 "0")
           (expand "iterate")
           (propax))))))
      ("2"
       (lemma "iterate_add_one")
       (inst -1 "R" "i - 1")
       (("1"
         (assert)
         (replaces -1)
         (expand "o" -2)
         (skolem * "z1")
         (flatten)
         (inst -7 "x!1" "b!1" "z1")
         (assert)
         (skolem * "y1")
         (flatten)
         (expand "o" -8)
         (skolem * "w2")
         (flatten)
         (skolem * "w1")
         (flatten)
         (lemma "iterate_RTC")
         (inst -1 "R" "i - 1")
         (expand* "subset?" "member")
         (inst -1 "(z1, c!1)")
         (hide -4)
         (copy -6)
         (expand "confluent?" -7)
         (inst -7 "z1" "w1" "c!1")
         (assert)
         (expand "joinable?")
         (skolem * "d1")
         (flatten)
         (inst -3 "w1")
         (case "(R o RTC(R))(x!1, w1)")
         (("1"
           (case-replace "TC(R)(x!1, w1) = (R o RTC(R))(x!1, w1)" :hide?
            t)
           (("1"
             (assert)
             (inst -4 "w2" "d1")
             (assert)
             (skolem * "d2")
             (flatten)
             (expand "confluent?")
             (inst -2 "w2" "d2" "y1")
             (assert)
             (expand "joinable?")
             (skolem * "d")
             (flatten)
             (hide -1)
             (expand "o" -5)
             (skolem * "u2")
             (flatten)
             (skolem * "u1")
             (flatten)
             (typepred "RTC(R)")
             (expand "reflexive_transitive?")
             (flatten)
             (hide -1)
             (expand "transitive?")
             (copy -1)
             (copy -1)
             (inst -1 "c!1" "d1" "u1")
             (inst -2 "u2" "d2" "d")
             (inst -3 "b!1" "y1" "d")
             (assert)
             (hide-all-but (-1 -2 -9 -3 2))
             (inst 1 "d")
             (assert)
             (expand "o")
             (inst 1 "u2")
             (assert)
             (inst 1 "u1")
             (assert))
            ("2"
             (hide-all-but 1)
             (lemma "transitive_closure_step_l")
             (inst?)
             (rewrite-lemma "change_to_TC" ("R" "R"))
             (rewrite-lemma "change_to_RTC" ("R" "R"))
             (decompose-equality)
             (inst -1 "(x!1, w1)"))))
          ("2"
           (hide-all-but (-4 -10 1))
           (expand "o")
           (inst 1 "z1")
           (assert))))
        ("2" (hide-all-but (1 2)) (typepred "i") (assert))))))))


proof_type: f_proof
decl_type: formula
library: TRS
theory: newman_yokouchi
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (lemma "Yokouchi_lemma_ax1")
   (inst?)
   (assert)
   (prop)
   (expand "diamond_property?")
   (skeep)
   (lemma "noetherian_induction")
   (inst -1 "R"
    "LAMBDA (a:T): (FORALL (b,c:T): (RTC(R) o S o RTC(R))(a,c) & (RTC(R) o S o RTC(R))(a,b) => (EXISTS (d:T): (RTC(R) o S o RTC(R))(b,d) & (RTC(R) o S o RTC(R))(c,d)))")
   (split)
   (("1" (inst -1 "x") (inst -1 "y" "z") (assert))
    ("2"
     (skosimp*)
     (hide 2)
     (expand "o" (-2 -3))
     (skolem * "z2")
     (skolem * "y2")
     (flatten)
     (skolem * "z1")
     (skolem * "y1")
     (flatten)
     (expand "RTC" -2)
     (expand "RTC" -5)
     (expand "IUnion")
     (skolem * "j")
     (skolem * "i")
     (hide (-14 -13))
     (case-replace "i = 0")
     (("1"
       (case-replace "j = 0")
       (("1"
         (expand "iterate")
         (replaces -4)
         (replaces -6)
         (inst -11 "y1" "y2" "z2")
         (assert)
         (hide (-1 -2))
         (skolem * "r1")
         (flatten)
         (copy -6)
         (copy -1)
         (inst -1 "z2" "r1" "c!1")
         (inst -2 "y2" "r1" "b!1")
         (assert)
         (skolem * "u1")
         (skolem * "d1")
         (flatten)
         (expand "confluent?")
         (inst -12 "r1" "u1" "d1")
         (assert)
         (expand "joinable?" -12)
         (skolem * "d")
         (hide-all-but (-2 -4 -12 -13 1))
         (inst 1 "d")
         (expand "o")
         (skolem * "c3")
         (skolem * "b3")
         (flatten)
         (skolem * "c2")
         (skolem * "b2")
         (typepred "RTC(R)")
         (expand "reflexive_transitive?")
         (flatten)
         (hide -1)
         (expand "transitive?")
         (copy -1)
         (inst -1 "c3" "u1" "d")
         (inst -2 "b3" "d1" "d")
         (assert)
         (split)
         (("1" (inst 1 "b3") (assert) (inst 1 "b2") (assert))
          ("2" (inst 1 "c3") (assert) (inst 1 "c2") (assert))))
        ("2"
         (hide -1)
         (lemma "iterate_add_one")
         (inst -1 "R" "j - 1")
         (("1"
           (assert)
           (replaces -1)
           (expand "o" -2)
           (skolem * "w1")
           (flatten)
           (lemma "iterate_RTC")
           (inst -1 "R" "j - 1")
           (expand* "subset?" "member")
           (inst -1 "(w1, z1)")
           (assert)
           (hide -4)
           (expand "iterate")
           (replaces -6)
           (inst -12 "y1" "y2" "w1")
           (assert)
           (skolem * "u1")
           (flatten)
           (inst -2 "w1")
           (lemma "R_subset_TC")
           (inst?)
           (expand* "subset?" "member")
           (inst -1 "(y1, w1)")
           (assert)
           (inst -3 "u1" "c!1")
           (prop)
           (("1"
             (skolem * "t1")
             (flatten)
             (hide-all-but (-1 -2 -9 -10 -12 -14 2))
             (expand "o" (-1 -2))
             (skolem * "u3")
             (skolem * "c3")
             (flatten)
             (skolem * "u2")
             (skolem * "c2")
             (flatten)
             (expand "confluent?")
             (copy -9)
             (copy -1)
             (inst -11 "y2" "u1" "b!1")
             (assert)
             (expand "joinable?" -11)
             (skolem * "d1")
             (flatten)
             (inst -1 "u1" "u2" "d1")
             (assert)
             (expand "joinable?" -1)
             (skolem * "d2")
             (flatten)
             (inst -11 "u2" "u3" "d2")
             (assert)
             (skolem * "d3")
             (flatten)
             (inst -3 "u3" "t1" "d3")
             (assert)
             (expand "joinable?" -3)
             (skolem * "d")
             (flatten)
             (typepred "RTC(R)")
             (expand "reflexive_transitive?")
             (flatten)
             (hide -1)
             (expand "transitive?")
             (copy -1)
             (copy -1)
             (copy -1)
             (expand "o")
             (skolem * "r2")
             (flatten)
             (skolem * "r1")
             (flatten)
             (inst -1 "b!1" "d1" "d2")
             (inst -2 "b!1" "d2" "r1")
             (inst -3 "r2" "d3" "d")
             (inst -4 "c3" "t1" "d")
             (assert)
             (inst 1 "d")
             (split)
             (("1" (inst 1 "r2") (assert) (inst 1 "r1") (assert))
              ("2" (inst 1 "c3") (assert) (inst 1 "c2") (assert))))
            ("2"
             (hide-all-but (-2 -4 -5 1))
             (expand "o")
             (inst 1 "z2")
             (assert)
             (inst 1 "z1")
             (assert))))
          ("2" (hide-all-but (1 2)) (typepred "j") (assert))))))
      ("2"
       (lemma "iterate_add_one")
       (inst -1 "R" "i - 1")
       (("1"
         (assert)
         (replaces -1)
         (expand "o" -5)
         (skolem * "w1")
         (flatten)
         (lemma "iterate_RTC")
         (copy -1)
         (inst -1 "R" "j")
         (inst -2 "R" "i - 1")
         (expand* "subset?" "member")
         (inst -1 "(x!1, z1)")
         (inst -2 "(w1, y1)")
         (expand "confluent?")
         (copy -13)
         (inst -14 "x!1" "z1" "w1")
         (assert)
         (lemma "R_subset_RTC")
         (inst?)
         (expand* "subset?" "member")
         (inst -1 "(x!1, w1)")
         (expand "joinable?")
         (assert)
         (skolem * "w2")
         (flatten)
         (inst -13 "z1" "z2" "w2")
         (assert)
         (skolem * "w3")
         (flatten)
         (inst -2 "z2" "w3" "c!1")
         (assert)
         (skolem * "w4")
         (flatten)
         (case "(RTC(R) o S o RTC(R))(w1, b!1) & (RTC(R) o S o RTC(R))(w1, w4)")
         (("1"
           (inst -7 "w1")
           (lemma "R_subset_TC")
           (inst?)
           (expand* "subset?" "member")
           (inst -1 "(x!1, w1)")
           (assert)
           (inst -8 "b!1" "w4")
           (prop)
           (skolem * "d")
           (flatten)
           (case "(RTC(R) o S o RTC(R))(c!1, d)")
           (("1" (inst 2 "d") (assert))
            ("2"
             (hide-all-but (-2 -8 1))
             (expand "o")
             (skolem * "r2")
             (flatten)
             (skolem * "r1")
             (flatten)
             (typepred "RTC(R)")
             (expand "reflexive_transitive?")
             (flatten)
             (hide -1)
             (expand "transitive?")
             (inst -1 "c!1" "w4" "r1")
             (assert)
             (inst 1 "r2")
             (assert)
             (inst 1 "r1")
             (assert))))
          ("2"
           (hide-all-but (-2 -5 -12 -13 -15 -18 1))
           (expand "o")
           (skolem * "u2")
           (flatten)
           (skolem * "u1")
           (flatten)
           (typepred "RTC(R)")
           (expand "reflexive_transitive?")
           (flatten)
           (hide -1)
           (expand "transitive?")
           (copy -1)
           (inst -1 "w1" "w2" "u1")
           (inst -2 "u2" "w3" "w4")
           (assert)
           (split)
           (("1" (inst 1 "y2") (assert) (inst 1 "y1") (assert))
            ("2" (inst 1 "u2") (assert) (inst 1 "u1") (assert))))))
        ("2" (hide-all-but (1 2)) (typepred "i") (assert))))))))


proof_type: f_proof
decl_type: formula
library: TRS
theory: results_normal_form
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (expand "is_normal_form?")
   (expand* "RTC" "IUnion")
   (skolem * "i")
   (expand "reducible?")
   (case "i = 0")
   (("1" (replace -1) (expand "iterate") (propax))
    ("2"
     (lemma "iterate_add_one")
     (inst? -1 ("R" "R" "n" "i -1"))
     (("1"
       (assert)
       (decompose-equality)
       (inst? -1 ("x" "(x,y)"))
       (iff)
       (prop)
       (expand "o")
       (skolem * "z")
       (flatten)
       (inst 2 "z"))
      ("2" (assert)) ("3" (assert))))))


proof_type: f_proof
decl_type: formula
library: TRS
theory: results_normal_form
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (lemma "CR_iff_Confluent")
   (inst?)
   (prop)
   (hide (-2 -3))
   (expand "church_rosser?")
   (inst -1 "x" "y")
   (prop)
   (expand "joinable?")
   (skolem * "z")
   (flatten)
   (lemma "NF_doesnot_rewrite")
   (inst -1 "R" "y" "z")
   (prop)
   (replace -1)
   (propax))


proof_type: f_proof
decl_type: formula
library: TRS
theory: results_normal_form
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (lemma "CR_iff_Confluent")
   (inst?)
   (prop)
   (hide (-2 -3))
   (expand "church_rosser?")
   (inst -1 "x" "y")
   (prop)
   (hide -2)
   (expand "joinable?")
   (skolem * "z")
   (flatten)
   (lemma "NF_doesnot_rewrite")
   (copy -1)
   (inst -1 "R" "y" "z")
   (inst -2 "R" "x" "z")
   (prop)
   (assert))


proof_type: f_proof
decl_type: formula
library: TRS
theory: results_normal_form
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (skeep)
   (expand "has_unique_nf?")
   (expand "normalizing?")
   (inst -1 "x")
   (skolem * "y")
   (inst 1 "y")
   (assert)
   (skeep)
   (expand "normal_form?")
   (flatten)
   (expand "confluent?")
   (inst -3 "x" "y" "z")
   (assert)
   (hide (-1 -4))
   (expand "joinable?")
   (skolem * "r")
   (lemma "NF_doesnot_rewrite")
   (copy -1)
   (inst -1 "R" "y" "r")
   (inst -2 "R" "z" "r")
   (prop)
   (assert))


proof_type: f_proof
decl_type: formula
library: TRS
theory: results_normal_form
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (lemma "Norm_and_Confl_implies_UNF")
   (copy -1)
   (inst?)
   (inst?)
   (assert)
   (inst -1 "x")
   (inst -2 "y")
   (expand "has_unique_nf?")
   (skolem * "u")
   (skolem * "v")
   (inst 1 "u" "v")
   (prop)
   (("1"
     (expand "normal_form?")
     (flatten)
     (hide (-1 -2 -6 -9 -10))
     (lemma "CR_iff_Confluent")
     (inst?)
     (assert)
     (expand "church_rosser?")
     (inst -1 "x" "y")
     (assert)
     (expand "joinable?")
     (skolem * "z")
     (flatten)
     (copy -8)
     (expand "confluent?" -9)
     (copy -9)
     (inst -1 "x" "z" "u")
     (inst -10 "y" "z" "v")
     (assert)
     (hide-all-but (-1 -2 -7 -9 -10 1))
     (lemma "Joinable_implies_Equiv")
     (copy -1)
     (inst -1 "R" "z" "u")
     (inst -2 "R" "z" "v")
     (assert)
     (hide (-3 -7))
     (typepred "EC(R)")
     (expand "equivalence?")
     (flatten)
     (hide -1)
     (expand* "symmetric?" "transitive?")
     (copy -1)
     (inst -1 "z" "u")
     (inst -2 "z" "v")
     (assert)
     (hide (-4 -5))
     (inst -3 "u" "z" "v")
     (assert)
     (hide (-1 -2))
     (lemma "NFs_implies_Equal")
     (inst -1 "R" "u" "v")
     (assert))
    ("2" (hide-all-but (-2 -3 1)) (expand "unique_nf?") (assert))
    ("3" (hide-all-but (-4 -5 1)) (expand "unique_nf?") (assert))
    ("4"
     (replace -1)
     (expand "normal_form?")
     (flatten)
     (hide-all-but (-2 -5 1))
     (case "joinable?(R)(x,y)")
     (("1"
       (lemma "Joinable_implies_Equiv")
       (inst -1 "R" "x" "y")
       (assert))
      ("2" (hide 2) (expand "joinable?") (inst 1 "v") (assert))))))


proof_type: f_proof
decl_type: formula
library: TRS
theory: results_normal_form
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (prop)
   (("1" (rewrite "Norm_and_Confl_implies_UNF"))
    ("2"
     (expand "normalizing?")
     (skeep)
     (inst -1 "x")
     (expand "has_unique_nf?")
     (skolem * "u")
     (inst 1 "u")
     (assert))
    ("3"
     (copy -1)
     (copy -1)
     (expand "confluent?")
     (skeep)
     (inst -1 "y")
     (inst -2 "z")
     (inst -5 "x")
     (expand "has_unique_nf?")
     (skolem * "y1")
     (skolem * "z1")
     (skolem * "x1")
     (flatten)
     (hide (-2 -4))
     (expand "normal_form?")
     (flatten)
     (typepred "RTC(R)")
     (expand "reflexive_transitive?")
     (flatten)
     (hide -1)
     (expand "transitive?")
     (copy -1)
     (inst -1 "x" "y" "y1")
     (inst -2 "x" "z" "z1")
     (assert)
     (copy -11)
     (inst -1 "y1")
     (inst -12 "z1")
     (assert)
     (replace -1)
     (replace -12 -6 rl)
     (hide-all-but (-4 -6 1))
     (expand "joinable?")
     (inst 1 "y1")
     (assert))))


proof_type: f_proof
decl_type: formula
library: TRS
theory: results_normal_form
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (expand "normalizing?")
   (skeep)
   (expand "noetherian?")
   (expand "well_founded?")
   (inst -1 "reduct?(R)(x)")
   (split)
   (("1"
     (skolem * "a")
     (inst 1 "a")
     (typepred "a")
     (expand "reduct?")
     (expand "normal_form?")
     (split)
     (("1" (propax))
      ("2"
       (expand "is_normal_form?")
       (expand "reducible?")
       (skolem * "b")
       (inst -3 "b")
       (("1" (expand "converse") (propax))
        ("2"
         (lemma "R_subset_RTC")
         (inst?)
         (expand* "subset?" "member")
         (inst -1 "(a, b)")
         (assert)
         (typepred "RTC(R)")
         (expand "reflexive_transitive?")
         (flatten)
         (hide -1)
         (expand "transitive?")
         (inst -1 "x" "a" "b")
         (assert)
         (expand "reduct?")
         (propax))))))
    ("2"
     (hide 2)
     (inst 1 "x")
     (expand "reduct?")
     (expand* "RTC" "IUnion")
     (inst 1 "0")
     (expand "iterate")
     (propax))))


proof_type: f_proof
decl_type: formula
library: TRS
theory: results_normal_form
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (expand "convergent?")
   (flatten)
   (lemma "Noetherian_implies_normalizing")
   (inst?)
   (assert)
   (lemma "Norm_and_Confl_implies_UNF")
   (inst?)
   (assert))


proof_type: f_proof
decl_type: formula
library: TRS
theory: results_normal_form
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (lemma "Noetherian_implies_normalizing")
   (inst?)
   (assert)
   (hide -2)
   (lemma "Normal_Confl_iff_UNF")
   (inst?)
   (assert))


proof_type: f_proof
decl_type: formula
library: TRS
theory: results_normal_form
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (split)
   (("1"
     (flatten)
     (skeep)
     (expand "normal_form?")
     (flatten)
     (lemma "RTC_subset_EC")
     (inst?)
     (copy -1)
     (expand* "subset?" "member")
     (inst -1 "(x, u)")
     (inst -2 "(y, v)")
     (assert)
     (hide (-4 -6))
     (typepred "EC(R)")
     (expand "equivalence?")
     (flatten)
     (hide -1)
     (expand* "symmetric?" "transitive?")
     (inst -1 "x" "u")
     (assert)
     (copy -2)
     (inst -1 "u" "x" "y")
     (assert)
     (inst -3 "u" "y" "v")
     (assert)
     (expand "convergent?")
     (flatten)
     (hide-all-but (-3 -7 -8 -9 1))
     (lemma "NFs_implies_Equal")
     (inst?)
     (assert))
    ("2"
     (flatten)
     (expand "convergent?")
     (flatten)
     (lemma "Noetherian_implies_normalizing")
     (inst?)
     (assert)
     (expand "normalizing?")
     (copy -1)
     (inst -1 "x")
     (inst -2 "y")
     (skolem * "u")
     (skolem * "v")
     (inst -3 "u" "v")
     (assert)
     (expand "normal_form?")
     (flatten)
     (replaces -5)
     (hide-all-but (-1 -3 1))
     (case "joinable?(R)(x, y)")
     (("1" (rewrite "Joinable_implies_Equiv"))
      ("2" (hide 2) (expand "joinable?") (inst 1 "v") (assert))))))


proof_type: f_proof
decl_type: formula
library: TRS
theory: confluence_commute
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (lemma "RTC_characterization")
   (skeep)
   (inst -1 "RTC(R)")
   (lemma "RTC_idempotent")
   (inst -1 "R")
   (prop)
   (("1"
     (expand reflexive_transitive?)
     (flatten)
     (lemma "RC_characterization")
     (inst -1 "RTC(R)")
     (assert))
    ("2" (assert))))


proof_type: f_proof
decl_type: formula
library: TRS
theory: confluence_commute
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (expand "RTC")
   (expand "IUnion")
   (skosimp*)
   (inst 1 "i!1 + i!2")
   (lemma iterate_add)
   (inst -1 "R" "i!1" "i!2")
   (assert)
   (grind))


proof_type: f_proof
decl_type: formula
library: TRS
theory: confluence_commute
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (expand "RTC")
   (expand "RC")
   (expand "IUnion")
   (expand "union")
   (prop)
   (("1"
     (expand member)
     (skosimp*)
     (inst 1 "i!1 + 1")
     (lemma iterate_add)
     (inst -1 "R" "1" "i!1")
     (assert)
     (replace -1)
     (hide -1)
     (expand o)
     (assert)
     (inst 1 y)
     (assert)
     (hide -2)
     (grind))
    ("2"
     (skosimp*)
     (inst 1 "0+i!1")
     (lemma iterate_add)
     (inst -1 "R" "0" "i!1")
     (replace -1)
     (hide -1)
     (expand member)
     (replace -1)
     (propax))))


proof_type: f_proof
decl_type: formula
library: TRS
theory: confluence_commute
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skolem 1 ("R" "_" "_"))
   (case "FORALL (i: nat, x,y : T) : (iterate(R,i)(x,y) <=> iterate(converse(R), i)(y, x))")
   (("1"
     (skeep)
     (inst -1 "_" x y)
     (expand RTC)
     (expand IUnion)
     (prop)
     (("1" (skosimp) (inst 1 i!1) (inst -2 i!1) (assert))
      ("2" (skosimp) (inst -2 i!1) (inst 1 i!1) (assert))))
    ("2"
     (hide 2)
     (induct i)
     (("1" (skeep) (expand iterate) (grind))
      ("2"
       (skeep)
       (skeep)
       (lemma iterate_add)
       (inst -1 R j 1)
       (replace -1 1)
       (expand o)
       (prop)
       (("1"
         (skosimp -1)
         (inst -4 "x" "y!1")
         (hide -3)
         (prop)
         (lemma iterate_add)
         (inst -1 "converse(R)" "1" "j")
         (decompose-equality -1)
         (inst -1 "(y,x)")
         (expand o -1)
         (replace -1 1)
         (hide -1)
         (inst 1 y!1)
         (assert)
         (hide -1 -2 -3)
         (expand iterate)
         (expand o -1)
         (skosimp)
         (expand iterate -1)
         (replace -1 -2 rl)
         (hide -1)
         (expand o)
         (inst 1 y)
         (assert)
         (expand iterate)
         (expand converse)
         (propax))
        ("2"
         (hide -2)
         (lemma iterate_add)
         (inst -1 "converse(R)" 1 j)
         (decompose-equality)
         (inst -1 "(y,x)")
         (expand o -1)
         (replace -1 -2)
         (hide -1)
         (skosimp -1)
         (inst -3 x y!1)
         (assert)
         (inst 1 y!1)
         (assert)
         (hide -2 -3)
         (expand iterate)
         (expand o -1)
         (skosimp)
         (expand iterate -1)
         (replace -1 -2 rl)
         (hide -1)
         (expand iterate)
         (expand o)
         (inst 1 y!1)
         (expand converse)
         (propax))))))))


proof_type: f_proof
decl_type: formula
library: TRS
theory: confluence_commute
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (expand commute?)
   (skeep)
   (expand "RTC" -2)
   (expand "IUnion" -2)
   (skolem * "i")
   (case "FORALL (j: nat, a, b, c: T) : (iterate(R1,j)(a,b) AND RTC(R2)(a,c)) => EXISTS (d: T): RTC(R2)(b, d) & RTC(R1)(c, d)")
   (("1" (inst -1 "i" "x" "y" "z") (assert))
    ("2"
     (induct j)
     (("1"
       (hide 2 -2 -3)
       (assert)
       (skeep)
       (expand iterate)
       (replace -1 -2)
       (inst 1 "c")
       (assert)
       (expand "RTC" 1)
       (expand "IUnion")
       (inst 1 "0")
       (assert)
       (expand iterate)
       (propax))
      ("2"
       (hide -2 -3 2)
       (skeep)
       (skeep)
       (rewrite "iterate_add_one")
       (expand o)
       (skolem * "a1")
       (expand semi_commute?)
       (inst -4 "a" "a1" "c")
       (flatten)
       (assert)
       (skolem * "c1")
       (flatten)
       (inst -1 "a1" "b" "c1")
       (assert)
       (skolem * "d1")
       (flatten)
       (assert)
       (hide -3 -4 -5 -6)
       (inst 1 "d1")
       (assert)
       (hide -1)
       (expand "RTC")
       (expand "IUnion")
       (skolem * "n")
       (skolem * "m")
       (inst 1 "m + n")
       (lemma iterate_add)
       (inst -1 "R1" "m" "n")
       (assert)
       (grind))))))


proof_type: f_proof
decl_type: formula
library: TRS
theory: confluence_commute
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (expand confluent?)
   (expand sub_commutative?)
   (rewrite "RC_RTC_is_RTC")
   (expand joinable?)
   (propax))


proof_type: f_proof
decl_type: formula
library: TRS
theory: confluence_commute
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: : y
script:
  (""
   (skeep)
   (expand request?)
   (expand "RTC" 1 2)
   (expand "IUnion")
   (skeep)
   (case "FORALL (n : nat, x,y,z : T) : confluent?(R2) & RTC(R1)(x, y) & iterate(R2, n)(x, z) =>
                                                            EXISTS r, s: RTC(R2)(y, r) & RTC(R1)(z, s) & RTC(R2)(s, r)")
   (("1" (assert) (skosimp* -5) (inst -2 "i!1" "x" "y" "z") (assert))
    ("2"
     (hide 2)
     (induct n)
     (("1"
       (skosimp*)
       (hide -4 -6)
       (hide -5)
       (expand iterate)
       (replace -3)
       (inst 1 "y!1" "y!1")
       (assert)
       (expand "RTC")
       (hide -4)
       (expand "IUnion")
       (hide-all-but 1)
       (prop)
       (("1" (inst 1 0) (grind)) ("2" (inst 1 0) (grind))))
      ("2"
       (skeep)
       (skosimp*)
       (hide -5 -6 -7 -8)
       (assert)
       (expand iterate -4)
       (expand o -4)
       (skosimp* -4)
       (inst -1 "x!1" "y!1" "y!2")
       (assert)
       (skosimp* -1)
       (reveal -3)
       (inst -1 "y!2" "s!1" "z!1")
       (assert)
       (skosimp* -1)
       (expand confluent?)
       (inst -7 "s!1" "r!1" "r!2")
       (assert)
       (expand joinable?)
       (skosimp* -7)
       (inst 1 "z!2" "s!2")
       (hide-all-but (-4 -7 -2 -8 -3 1))
       (assert)
       (hide -1)
       (lemma "RTC_o_RTC_is_RTC")
       (copy -1)
       (inst -1 "R2" "y!1" "r!1" "z!2")
       (assert)
       (inst -2 "R2" "s!2" "r!2" "z!2")
       (assert))))))


proof_type: f_proof
decl_type: formula
library: TRS
theory: confluence_commute
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
script:
  (""
   (assert)
   (skeep)
   (expand diamond_property?)
   (skeep)
   (expand o -4)
   (expand o -5)
   (skosimp*)
   (inst -3 "x" "y!1" "y!2")
   (assert)
   (skosimp*)
   (expand o -3)
   (expand o -4)
   (skosimp*)
   (hide -7 -9)
   (copy -1)
   (expand request? -1)
   (inst -1 "y!1" "y!3" "y")
   (assert)
   (skosimp*)
   (hide -6 -10)
   (expand request?)
   (inst -4 "y!2" "y!4" "z")
   (assert)
   (skosimp*)
   (hide -9 -11)
   (copy -7)
   (copy -1)
   (expand confluent? -1)
   (inst -1 "y!4" "r!1" "r!3")
   (assert)
   (expand joinable?)
   (skosimp*)
   (hide -7 -12)
   (expand confluent? -3)
   (inst -3 "y!3" "r!2" "r!1")
   (assert)
   (expand joinable?)
   (skosimp*)
   (hide -5 -11)
   (expand confluent?)
   (inst -9 "r!1" "z!2" "z!1")
   (assert)
   (expand joinable?)
   (skosimp*)
   (hide -1 -4)
   (inst 1 "z!3")
   (expand o)
   (split)
   (("1"
     (inst 1 "s!1")
     (lemma "RTC_o_RTC_is_RTC")
     (copy -1)
     (inst -1 "R2" "s!1" "r!2" "z!2")
     (inst -2 "R2" "s!1" "z!2" "z!3")
     (assert))
    ("2"
     (inst 1 "s!2")
     (lemma "RTC_o_RTC_is_RTC")
     (copy -1)
     (inst -1 "R2" "s!2" "r!3" "z!1")
     (inst -2 "R2" "s!2" "z!1" "z!3")
     (assert))))


proof_type: f_proof
decl_type: formula
library: TRS
theory: confluence_commute
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (assert)
   (lemma "comp_rtc_req_conf_impl_diamond")
   (inst -1 "R1" "R2")
   (assert)
   (prop)
   (hide-all-but (-1) -)
   (lemma "DP_implies_StC")
   (inst -1 "RTC(R1) o RTC(R2)")
   (assert)
   (hide -2)
   (lemma "R1_R2_RTC_R1_R2")
   (inst -1 "R1" "R2")
   (lemma "R2_Str_Confl_implies_R1_Confl")
   (inst -1 "union(R1,R2)" "RTC(R1) o RTC(R2)")
   (assert))


proof_type: f_proof
decl_type: formula
library: TRS
theory: confluence_commute
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (assert)
   (skeep)
   (expand diamond_property?)
   (skeep)
   (expand o -4)
   (expand o -5)
   (skosimp*)
   (expand confluent? -1)
   (inst -1 "x" "y!1" "y!2")
   (assert)
   (expand joinable?)
   (skosimp*)
   (hide -5 -7)
   (copy -4)
   (expand request? -1)
   (inst -1 "y!1" "z!1" "y")
   (assert)
   (skosimp*)
   (hide -4 -8)
   (expand request?)
   (inst -6 "y!2" "z!1" "z")
   (assert)
   (skosimp*)
   (hide -4 -9)
   (expand confluent?)
   (inst -4 "z!1" "r!1" "r!2")
   (assert)
   (expand joinable?)
   (skosimp*)
   (hide -1 -6)
   (inst 1 "z!2")
   (expand o)
   (split)
   (("1"
     (lemma "RTC_o_RTC_is_RTC")
     (inst -1 "R2" "s!1" "r!1" "z!2")
     (inst 1 "s!1")
     (assert))
    ("2"
     (lemma "RTC_o_RTC_is_RTC")
     (inst -1 "R2" "s!2" "r!2" "z!2")
     (inst 1 "s!2")
     (assert))))


proof_type: f_proof
decl_type: formula
library: TRS
theory: confluence_commute
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (assert)
   (skeep)
   (lemma "comp_rtc_confs_req_impl_diamond")
   (inst -1 "R1" "R2")
   (assert)
   (hide -2 -3 -4)
   (lemma "DP_implies_StC")
   (inst -1 "RTC(R1) o RTC(R2)")
   (assert)
   (hide -2)
   (lemma "R1_R2_RTC_R1_R2")
   (lemma "R2_Str_Confl_implies_R1_Confl")
   (inst -2 "R1" "R2")
   (inst -1 "union(R1,R2)" "RTC(R1) o RTC(R2)")
   (assert))


proof_type: f_proof
decl_type: formula
library: TRS
theory: confluence_commute
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (prop)
   (("1"
     (expand church_rosser?)
     (expand postponement?)
     (skeep)
     (inst -1 "x" "y")
     (expand "EC")
     (expand "SC")
     (assert)
     (expand joinable?)
     (skosimp)
     (inst 1 "z!1")
     (assert)
     (lemma "RTC_converse_RTC_R")
     (inst -1 "R" "y" "z!1")
     (assert))
    ("2"
     (expand postponement?)
     (expand church_rosser?)
     (skosimp)
     (inst -1 "x!1" "y!1")
     (expand "EC")
     (expand "SC")
     (assert)
     (lemma "RTC_converse_RTC_R")
     (skosimp)
     (inst -1 "R" "y!1" "z!1")
     (assert)
     (expand joinable?)
     (inst 1 "z!1")
     (assert))))


proof_type: f_proof
decl_type: formula
library: TRS
theory: confluence_commute
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (prop)
   (("1"
     (lemma "CR_iff_Confluent")
     (inst -1 "R")
     (assert)
     (lemma "CR_iff_PP")
     (inst -1 "R")
     (assert))
    ("2"
     (lemma "CR_iff_PP")
     (lemma "CR_iff_Confluent")
     (inst -1 "R")
     (inst -2 "R")
     (assert))))


proof_type: f_proof
decl_type: formula
library: TRS
theory: confluence_commute
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (case "FORALL (i : nat, x, y, z : T) : (RC(R1)(x, y) & iterate(R2, i)(x, z) => EXISTS (r : T) : (RTC(R2)(y, r) & RTC(R1)(z, r)))")
   (("1"
     (expand semi_commute?)
     (skosimp*)
     (expand RTC -4)
     (expand IUnion)
     (skolem -4 i)
     (inst -1 i x!1 y!1 z!1)
     (expand RC -1)
     (expand union)
     (expand member)
     (assert))
    ("2"
     (hide 2)
     (induct i)
     (("1"
       (skosimp*)
       (expand iterate)
       (replaces -2)
       (inst 1 y!1)
       (assert)
       (hide -2 2)
       (expand RC)
       (expand union)
       (expand member)
       (prop)
       (("1" (hide -1) (grind) (inst 1 0) (expand iterate) (propax))
        ("2"
         (expand RTC)
         (expand IUnion)
         (inst 1 1)
         (expand iterate)
         (expand o)
         (inst 1 z!1)
         (expand iterate)
         (propax))
        ("3" (grind) (inst 1 0) (grind))
        ("4" (replaces -1) (grind) (inst 1 0) (grind))))
      ("2"
       (skeep)
       (skeep)
       (lemma iterate_add_one)
       (inst -1 R2 j)
       (replaces -1)
       (expand o)
       (skolem -3 v)
       (flatten)
       (expand RC)
       (expand union)
       (expand member)
       (split)
       (("1"
         (inst -5 x y v)
         (assert)
         (skolem -5 w)
         (flatten)
         (inst -2 v w z)
         (assert)
         (prop)
         (("1"
           (skolem -2 r)
           (inst 1 r)
           (flatten)
           (lemma RC_o_RTC_is_RTC)
           (inst -1 R2 y w r)
           (expand RC -1)
           (expand union)
           (expand member)
           (assert))
          ("2"
           (inst 1 z)
           (replaces -1)
           (split)
           (("1"
             (hide-all-but (-5 -4 1))
             (lemma RC_o_RTC_is_RTC)
             (inst -1 R2 y w z)
             (expand RC -1)
             (expand union)
             (expand member)
             (expand RTC -1 1)
             (expand IUnion)
             (split)
             (("1" (propax)) ("2" (inst 1 j))))
            ("2"
             (hide-all-but (1))
             (expand RTC)
             (expand IUnion)
             (inst 1 0)
             (grind))))))
        ("2"
         (inst 1 z)
         (replaces -1)
         (hide-all-but (-2 -3 1))
         (lemma RC_o_RTC_is_RTC)
         (inst -1 R2 y v z)
         (expand RC -1)
         (expand union)
         (expand member)
         (assert)
         (expand RTC -1 1)
         (expand IUnion)
         (prop)
         (("1"
           (hide-all-but (1))
           (expand RTC)
           (expand IUnion)
           (inst 1 0)
           (grind))
          ("2" (hide -1 1) (inst 1 j))
          ("3"
           (hide-all-but (1))
           (expand RTC)
           (expand IUnion)
           (inst 1 0)
           (grind))))))))))


proof_type: f_proof
decl_type: formula
library: TRS
theory: confluence_commute
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (lemma hip_Hindley_implies_semi_comm)
   (assert)
   (inst -1 R1 R2)
   (prop)
   (hide -2)
   (rewrite semi_comm_implies_comm))


proof_type: f_proof
decl_type: formula
library: TRS
theory: confluence_commute
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (split)
   (("1"
     (flatten)
     (skeep)
     (expand ref_compatible?)
     (assert)
     (expand refinement?)
     (expand o)
     (skolem -2 v)
     (flatten)
     (expand RTC -3)
     (expand IUnion)
     (skolem -3 i)
     (case "FORALL (i : nat, x, y : T) : iterate(R1,i)(x, y) => RTC(R2)(x, y)")
     (("1"
       (inst -1 i v y)
       (assert)
       (lemma RC_o_RTC_is_RTC)
       (inst -1 R2 x v y)
       (expand RC)
       (expand union)
       (expand member)
       (inst -3 x y)
       (assert))
      ("2"
       (induct i)
       (("1"
         (skosimp*)
         (expand iterate -1)
         (replaces -1)
         (expand RTC 1)
         (expand IUnion)
         (inst 1 0)
         (expand iterate 1)
         (propax))
        ("2"
         (skeep)
         (skosimp*)
         (lemma iterate_add_one)
         (inst -1 R1 j)
         (replaces -1)
         (expand o)
         (hide -4 -3 -5 2)
         (skolem -2 w)
         (flatten)
         (inst -1 w y!1)
         (inst -4 x!1 w)
         (assert)
         (lemma RTC_o_RTC_is_RTC)
         (inst -1 R2 x!1 w y!1)
         (assert))))))
    ("2"
     (flatten)
     (expand ref_compatible?)
     (split)
     (("1" (propax))
      ("2"
       (skeep)
       (expand RTC -1)
       (expand IUnion)
       (skolem -1 i)
       (case "FORALL (i : nat, x, y : T) : iterate(R2, i)(x, y) => joinable?(R1)(x, y)")
       (("1" (inst -1 i x y) (assert))
        ("2"
         (hide 2 -1 -3)
         (induct i)
         (("1"
           (skosimp*)
           (hide -2)
           (expand iterate)
           (replaces -1)
           (expand joinable?)
           (inst 1 y!1)
           (expand RTC)
           (expand IUnion)
           (split)
           (("1" (inst 1 0) (grind)) ("2" (inst 1 0) (grind))))
          ("2"
           (skeep)
           (skosimp*)
           (lemma iterate_add_one)
           (inst -1 R2 j)
           (replaces -1)
           (expand o)
           (skolem -2 v)
           (flatten)
           (inst -1 v y!1)
           (assert)
           (expand joinable? -1)
           (skolem -1 w)
           (flatten)
           (inst -5 x!1 w)
           (split)
           (("1"
             (expand joinable?)
             (skolem -1 r)
             (inst 1 r)
             (flatten)
             (assert)
             (hide-all-but (-2 -4 1))
             (lemma RTC_o_RTC_is_RTC)
             (inst -1 R1 y!1 w r)
             (assert))
            ("2" (inst 1 v) (assert))))))))))))


proof_type: f_proof
decl_type: formula
library: TRS
theory: confluence_commute
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (lemma CR_iff_Confluent)
   (inst -1 R)
   (assert)
   (hide 2)
   (expand confluent?)
   (skeep)
   (case "FORALL (i : nat, x, y, z : T) : iterate(R, i)(x, y) & RTC(R)(x, z) => joinable?(R)(y, z)")
   (("1"
     (expand RTC -2)
     (expand IUnion)
     (skolem -2 i)
     (inst -1 i x y z)
     (assert))
    ("2"
     (hide -1 -2 2)
     (induct i)
     (("1"
       (skosimp*)
       (expand iterate)
       (replaces -1)
       (expand joinable?)
       (inst 1 z!1)
       (expand RTC 1 2)
       (expand IUnion)
       (split)
       (("1" (propax)) ("2" (inst 1 0) (grind))))
      ("2"
       (skeep)
       (skosimp*)
       (lemma iterate_add_one)
       (inst -1 R j)
       (replaces -1)
       (expand o)
       (skolem -2 v)
       (flatten)
       (expand semi_confluent?)
       (inst -5 x!1 v z!1)
       (assert)
       (expand joinable?)
       (skolem -5 w)
       (flatten)
       (inst -1 v y!1 w)
       (assert)
       (skolem -1 r)
       (flatten)
       (inst 1 r)
       (split)
       (("1" (propax))
        ("2"
         (hide-all-but (-2 -7 1))
         (lemma RTC_o_RTC_is_RTC)
         (inst -1 R z!1 w r)
         (assert))))))))


proof_type: f_proof
decl_type: formula
library: TRS
theory: confluence_commute
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (expand confluent?)
   (skeep)
   (expand RTC -2)
   (expand IUnion)
   (skolem -2 i)
   (case "FORALL (i: nat, x, y, z: T) : iterate(R, i)(x, y) & RTC(R)(x, z) => joinable?(R)(y, z)")
   (("1" (inst -1 i x y z) (assert))
    ("2"
     (hide 2 -2 -3)
     (induct i)
     (("1"
       (skosimp*)
       (expand iterate)
       (replaces -1)
       (expand joinable?)
       (inst 1 z!1)
       (split)
       (("1" (propax))
        ("2"
         (hide -1 -2)
         (expand RTC)
         (expand IUnion)
         (inst 1 0)
         (expand iterate)
         (propax))))
      ("2"
       (skeep)
       (skosimp*)
       (lemma iterate_add_one)
       (inst -1 R j)
       (replaces -1)
       (expand o)
       (skolem -2 v)
       (flatten)
       (expand semi_confluent?)
       (inst -5 x!1 v z!1)
       (assert)
       (expand joinable? -5)
       (skolem -5 w)
       (flatten)
       (inst -1 v y!1 w)
       (assert)
       (expand joinable?)
       (skolem -1 r)
       (inst 1 r)
       (flatten)
       (split)
       (("1" (propax))
        ("2"
         (hide-all-but (-2 -7 1))
         (lemma RTC_o_RTC_is_RTC)
         (inst -1 R z!1 w r)
         (assert))))))))


proof_type: f_proof
decl_type: formula
library: TRS
theory: confluence_commute
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (expand semi_confluent?)
   (skeep)
   (expand RTC)
   (expand IUnion)
   (case "FORALL (i : nat, x, y, z : T) : RC(R)(x, y) & iterate(R, i)(x, z) => joinable?(R)(y, z)")
   (("1"
     (skolem -4 i)
     (inst -1 i x y z)
     (expand RC)
     (expand union)
     (expand member)
     (assert))
    ("2"
     (hide -2 -3 2)
     (induct i)
     (("1"
       (skosimp*)
       (expand iterate)
       (replaces -2)
       (expand joinable?)
       (expand RC)
       (expand union)
       (expand member)
       (split)
       (("1"
         (inst 1 y!1)
         (split)
         (("1"
           (expand RTC)
           (expand IUnion)
           (inst 1 0)
           (expand iterate)
           (propax))
          ("2"
           (expand RTC)
           (expand IUnion)
           (inst 1 1)
           (expand iterate)
           (expand o)
           (inst 1 z!1)
           (expand iterate)
           (propax))))
        ("2"
         (inst 1 y!1)
         (split)
         (("1"
           (expand RTC)
           (expand IUnion)
           (inst 1 0)
           (expand iterate)
           (propax))
          ("2"
           (expand RTC)
           (expand IUnion)
           (inst 1 0)
           (replaces -1)
           (expand iterate)
           (propax))))))
      ("2"
       (skeep)
       (skosimp*)
       (lemma iterate_add_one)
       (inst -1 R j)
       (replaces -1)
       (expand o)
       (skolem -3 v)
       (flatten)
       (expand sub_commutative?)
       (inst -5 x!1 y!1 v)
       (assert)
       (expand RC)
       (expand union)
       (expand member)
       (split)
       (("1"
         (assert)
         (expand joinable?)
         (skolem -5 w)
         (flatten)
         (inst -2 v w z!1)
         (assert)
         (split)
         (("1"
           (skolem -1 r)
           (flatten)
           (split)
           (("1"
             (split)
             (("1"
               (inst 1 r)
               (split)
               (("1"
                 (hide-all-but (-2 -3 1))
                 (lemma RC_o_RTC_is_RTC)
                 (inst -1 R y!1 w r)
                 (expand RC)
                 (expand union)
                 (expand member)
                 (assert))
                ("2" (propax))))
              ("2"
               (inst 1 r)
               (split)
               (("1"
                 (hide-all-but (-2 -3 1))
                 (lemma RC_o_RTC_is_RTC)
                 (inst -1 R y!1 w r)
                 (expand RC)
                 (expand union)
                 (expand member)
                 (assert))
                ("2" (propax))))))
            ("2"
             (inst 1 r)
             (split)
             (("1" (hide-all-but (-2 -1 1)) (replaces -1))
              ("2" (propax))))))
          ("2" (propax))))
        ("2"
         (expand joinable?)
         (inst 1 z!1)
         (split)
         (("1"
           (hide-all-but (-1 -3 -4 1))
           (replaces -1)
           (lemma RC_o_RTC_is_RTC)
           (inst -1 R y!1 v z!1)
           (expand RC)
           (expand union)
           (expand member)
           (expand RTC -1 1)
           (expand IUnion)
           (assert)
           (inst 1 j))
          ("2"
           (hide-all-but 1)
           (expand RTC)
           (expand IUnion)
           (inst 1 0)
           (expand iterate)
           (propax))))))))))


proof_type: f_proof
decl_type: formula
library: TRS
theory: confluence_commute
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (lemma sub_comm_implies_semi_conf)
   (inst -1 R)
   (assert)
   (lemma semi_implies_conf)
   (inst -1 R)
   (assert))


proof_type: f_proof
decl_type: formula
library: TRS
theory: confluence_commute
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (lemma sub_comm_implies_conf)
   (inst -1 R1)
   (assert)
   (expand confluent?)
   (skeep)
   (inst -1 x y z)
   (replace -2 -1)
   (assert)
   (expand joinable?)
   (skolem -1 r)
   (inst 1 r)
   (replace -2 -1)
   (propax))


proof_type: f_proof
decl_type: formula
library: TRS
theory: confluence_commute
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (lemma noetherian_induction)
   (inst -1 "union(R1, R2)" "_")
   (inst -1
    "(LAMBDA (x : T): (FORALL (y, z: T): RTC(R1)(x, y) AND RTC(R2)(x, z) IMPLIES EXISTS (r : T) : (RTC(R2)(y, r) & RTC(R1)(z, r))))")
   (split)
   (("1"
     (hide -2 -3)
     (expand commute?)
     (skeep)
     (inst -1 x)
     (inst -1 y z)
     (assert))
    ("2"
     (hide 2)
     (skeep)
     (skeep)
     (hide -5)
     (expand RTC (-2 -3))
     (expand IUnion)
     (skolem -2 i)
     (skolem -3 j)
     (case "i = 0")
     (("1"
       (replaces -1)
       (hide-all-but (-2 -3 1))
       (expand iterate -1)
       (replaces -1)
       (inst 1 z)
       (split)
       (("1" (expand RTC) (expand IUnion) (inst 1 j))
        ("2"
         (expand RTC)
         (expand IUnion)
         (inst 1 0)
         (expand iterate)
         (propax))))
      ("2"
       (case "j = 0")
       (("1"
         (replaces -1)
         (hide-all-but (-2 -3 2))
         (inst 1 y)
         (split)
         (("1"
           (expand RTC)
           (expand IUnion)
           (inst 1 0)
           (expand iterate 1)
           (propax))
          ("2"
           (expand iterate -2)
           (replaces -2)
           (expand RTC)
           (expand IUnion)
           (inst 1 i))))
        ("2"
         (lemma iterate_add_one)
         (lemma iterate_add_one)
         (inst -1 R1 "i - 1")
         (("1"
           (inst -2 R2 "j - 1")
           (("1"
             (assert)
             (replaces -1)
             (replaces -1)
             (expand o)
             (skolem -2 a)
             (skolem -3 b)
             (flatten)
             (lemma iterate_RTC)
             (lemma iterate_RTC)
             (inst -1 R1 "i - 1")
             (inst -2 R2 "j - 1")
             (expand subset?)
             (inst -1 "(a, y)")
             (inst -2 "(b, z)")
             (expand member)
             (assert)
             (expand locally_commute?)
             (inst -8 x_1 a b)
             (assert)
             (skolem -8 c)
             (flatten)
             (hide -5 -7)
             (copy -3)
             (inst -1 a)
             (split)
             (("1"
               (inst -1 y c)
               (assert)
               (skolem -1 d)
               (flatten)
               (lemma "RTC_o_RTC_is_RTC")
               (inst -1 R1 b c d)
               (assert)
               (inst -6 b)
               (split)
               (("1"
                 (inst -1 d z)
                 (assert)
                 (skolem -1 r)
                 (flatten)
                 (inst 3 r)
                 (split)
                 (("1"
                   (hide-all-but (-4 -1 1))
                   (lemma "RTC_o_RTC_is_RTC")
                   (inst -1 R2 y d r)
                   (assert))
                  ("2" (propax))))
                ("2"
                 (hide-all-but (-7 1))
                 (expand TC)
                 (expand IUnion)
                 (inst 1 1)
                 (expand union)
                 (expand member)
                 (grind))))
              ("2"
               (hide-all-but (-4 1))
               (expand TC)
               (expand IUnion)
               (expand union)
               (inst 1 1)
               (grind))))
            ("2" (assert))))
          ("2" (assert))))))))))


proof_type: f_proof
decl_type: formula
library: TRS
theory: confluence_commute
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (expand UNseta_terese?)
   (skeep)
   (expand UN_terese?)
   (skolem -4 z)
   (inst -1 x y)
   (assert)
   (hide -1 -2 2)
   (flatten)
   (lemma RTC_subset_EC)
   (inst -1 R)
   (expand* "subset?" "member")
   (copy -1)
   (inst -1 "(z, x)")
   (inst -2 "(z, y)")
   (assert)
   (hide -3 -4)
   (lemma EC_characterization)
   (inst -1 "EC(R)")
   (lemma EC_idempotent)
   (inst -1 R)
   (prop)
   (("1"
     (hide -2 -3)
     (expand equivalence?)
     (flatten)
     (expand symmetric?)
     (inst -2 z x)
     (hide -1)
     (assert)
     (hide -3)
     (expand transitive?)
     (inst -2 x z y)
     (assert))
    ("2" (hide -2 -3 2 3) (replaces -1))))


proof_type: f_proof
decl_type: formula
library: TRS
theory: modulo_equivalence
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (expand* "diamond_property?" "confluent_m?")
   (skeep)
   (copy -1)
   (inst -1 "x" "y" "z")
   (typepred "Eq")
   (expand "equivalence?")
   (flatten)
   (prop)
   (("1"
     (skolem * "u1")
     (flatten)
     (expand "o" (-1 -2))
     (skolem * "u2")
     (skolem * "u")
     (flatten)
     (copy -7)
     (expand "transitive?" -1)
     (copy -7)
     (expand "symmetric?" -1)
     (inst -1 "u" "u1")
     (inst -2 "u2" "u1" "u")
     (assert)
     (hide (-1 -4 -6))
     (inst -7 "y" "u" "w")
     (prop)
     (("1"
       (skolem * "v2")
       (flatten)
       (expand "o")
       (skolem * "v1")
       (skolem * "v")
       (flatten)
       (copy -10)
       (expand "transitive?" -1)
       (copy -10)
       (expand "symmetric?" -1)
       (inst -1 "v" "v2")
       (inst -2 "v1" "v2" "v")
       (assert)
       (typepred "RTC(R)")
       (expand "reflexive_transitive?")
       (flatten)
       (expand "transitive?" -2)
       (inst -2 "z" "u" "v1")
       (assert)
       (hide-all-but (-2 -4 -7 1))
       (expand "joinable_m?")
       (inst 1 "v1" "v")
       (assert))
      ("2" (expand "o") (inst 1 "u2") (assert))
      ("3"
       (expand "o")
       (inst 1 "w")
       (expand "reflexive?")
       (inst -4 "w")
       (assert))))
    ("2"
     (hide-all-but (-6 1))
     (expand "o" 1)
     (inst 1 "x")
     (typepred "RTC(R)")
     (expand "reflexive_transitive?")
     (flatten)
     (expand "reflexive?")
     (inst -1 "x")
     (assert))
    ("3"
     (hide-all-but (-1 -5 1))
     (expand "o" 1)
     (inst 1 "z")
     (expand "reflexive?")
     (inst -1 "z")
     (assert))))


proof_type: f_proof
decl_type: formula
library: TRS
theory: modulo_equivalence
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (split)
   (("1"
     (flatten)
     (lemma "van_oostrom94")
     (inst?)
     (assert)
     (hide 2)
     (lemma "noetherian_induction")
     (inst?)
     (expand "diamond_property?")
     (skeep)
     (inst -1
      "(LAMBDA (a: T): (FORALL (b, c: T):(RTC(R) o Eq)(a, b) AND (RTC(R) o Eq)(a, c) IMPLIES joinable_m?(R, Eq)(c, b)))")
     (split)
     (("1"
       (inst -1 "x" "y" "z")
       (assert)
       (expand "joinable_m?")
       (skolem -1 ("u" "v"))
       (flatten)
       (inst 1 "u")
       (split)
       (("1"
         (expand "o" 1)
         (inst 1 "v")
         (typepred "Eq")
         (expand* "equivalence?" "symmetric?")
         (flatten)
         (inst -2 "u" "v")
         (assert))
        ("2"
         (expand "o" 1)
         (inst 1 "u")
         (typepred "Eq")
         (expand* "equivalence?" "reflexive?")
         (flatten)
         (inst -1 "u")
         (assert))))
      ("2"
       (hide 2)
       (skolem 1 "a")
       (flatten)
       (skeep)
       (hide (-4 -5))
       (expand "o" (-2 -3))
       (skolem * "b2")
       (skolem * "c2")
       (flatten)
       (expand "RTC" (-2 -4))
       (expand "IUnion" (-2 -4))
       (skolem * "i")
       (skolem * "j")
       (case-replace "i = 0" :hide? t)
       (("1"
         (case-replace "j = 0" :hide? t)
         (("1"
           (expand "iterate")
           (replace -2 -3 rl)
           (replace -4 -5 rl)
           (hide-all-but (-3 -5 1))
           (expand "joinable_m?")
           (inst 1 "c" "b")
           (typepred "RTC(R)")
           (typepred "Eq")
           (expand "reflexive_transitive?")
           (flatten)
           (hide -3)
           (expand* "equivalence?" "transitive?" "reflexive?"
            "symmetric?")
           (flatten)
           (inst -2 "a" "c")
           (inst -3 "c" "a" "b")
           (copy -4)
           (inst -1 "c")
           (inst -5 "b")
           (assert))
          ("2"
           (expand "iterate" -2)
           (replace -2 -3 rl)
           (hide -2)
           (lemma iterate_add_one)
           (inst? -1 ("R" "R" "n" "j - 1"))
           (("1"
             (assert)
             (decompose-equality)
             (inst -1 "(a, c2)")
             (replaces -1)
             (expand "o" -3)
             (skolem -3 "c1")
             (flatten)
             (lemma "iterate_RTC")
             (inst -1 "R" "j - 1")
             (expand* "subset?" "member")
             (inst -1 "(c1, c2)")
             (expand "locally_coherent?")
             (typepred "Eq")
             (expand "equivalence?")
             (flatten)
             (inst -12 "a" "c1" "b")
             (assert)
             (hide (-8 -11))
             (expand "joinable_m?")
             (skolem -10 ("d1" "d2"))
             (flatten)
             (inst -5 "c1")
             (lemma "R_subset_TC")
             (inst?)
             (expand* "subset?" "member")
             (inst -1 "(a, c1)")
             (assert)
             (inst -6 "d2" "c")
             (prop)
             (("1"
               (skolem * ("r1" "r2"))
               (flatten)
               (typepred "RTC(R)")
               (expand "reflexive_transitive?")
               (flatten)
               (expand "transitive?" -2)
               (inst -2 "b" "d2" "r2")
               (inst 2 "r1" "r2")
               (assert))
              ("2" (expand "o" 1) (inst 1 "d1") (assert))
              ("3" (expand "o" 1) (inst 1 "c2") (assert))))
            ("2" (assert)) ("3" (assert))))))
        ("2"
         (lemma iterate_add_one)
         (inst? -1 ("R" "R" "n" "i - 1"))
         (("1"
           (decompose-equality)
           (inst -1 "(a, b2)")
           (replaces -1)
           (expand "o" -2)
           (skolem -2 "b3")
           (flatten)
           (lemma "iterate_RTC")
           (inst -1 "R" "i - 1")
           (("1"
             (expand* "subset?" "member")
             (inst -1 "(b3, b2)")
             (assert)
             (hide -4)
             (case-replace "j = 0" :hide? t)
             (("1"
               (expand "iterate")
               (replace -5 -6 rl)
               (expand "locally_coherent?")
               (typepred "Eq")
               (expand "equivalence?")
               (flatten)
               (inst -12 "a" "b3" "c")
               (assert)
               (hide (-8 -11))
               (expand "joinable_m?")
               (skolem -10 ("d1" "d2"))
               (flatten)
               (inst -5 "b3")
               (lemma "R_subset_TC")
               (inst?)
               (expand* "subset?" "member")
               (inst -1 "(a, b3)")
               (assert)
               (inst -6 "d2" "b")
               (prop)
               (("1"
                 (skolem * ("r1" "r2"))
                 (flatten)
                 (typepred "RTC(R)")
                 (expand "reflexive_transitive?")
                 (flatten)
                 (expand "transitive?" -2)
                 (inst -2 "c" "d2" "r2")
                 (expand "symmetric?" -8)
                 (inst -8 "r1" "r2")
                 (inst 2 "r2" "r1")
                 (assert))
                ("2" (expand "o" 1) (inst 1 "d1") (assert))
                ("3" (expand "o" 1) (inst 1 "b2") (assert))))
              ("2"
               (lemma iterate_add_one)
               (inst? -1 ("R" "R" "n" "j - 1"))
               (("1"
                 (assert)
                 (decompose-equality)
                 (inst -1 "(a, c2)")
                 (replaces -1)
                 (expand "o" -5)
                 (skolem -5 "c1")
                 (flatten)
                 (lemma "iterate_RTC")
                 (inst -1 "R" "j - 1")
                 (expand* "subset?" "member")
                 (inst -1 "(c1, c2)")
                 (assert)
                 (hide -7)
                 (expand "local_confluent_m?")
                 (inst -8 "a" "c1" "b3")
                 (assert)
                 (expand "joinable_m?")
                 (skolem * ("d1" "d2"))
                 (flatten)
                 (copy -3)
                 (inst -4 "b3")
                 (lemma "R_subset_TC")
                 (inst?)
                 (expand* "subset?" "member")
                 (inst -1 "(a, b3)")
                 (assert)
                 (inst -5 "b" "d1")
                 (prop)
                 (("1"
                   (skolem * ("d3" "d4"))
                   (flatten)
                   (inst -5 "c1")
                   (lemma "R_subset_TC")
                   (inst?)
                   (expand* "subset?" "member")
                   (inst -1 "(a, c1)")
                   (assert)
                   (inst -6 "d4" "c")
                   (prop)
                   (("1"
                     (skolem * ("u1" "u2"))
                     (flatten)
                     (typepred "RTC(R)")
                     (expand "reflexive_transitive?")
                     (flatten)
                     (expand "transitive?" -2)
                     (inst -2 "b" "d4" "u2")
                     (inst 3 "u1" "u2")
                     (assert))
                    ("2"
                     (expand "o" 1)
                     (inst 1 "d3")
                     (typepred "RTC(R)")
                     (expand "reflexive_transitive?")
                     (flatten)
                     (expand "transitive?" -2)
                     (inst -2 "c1" "d1" "d3")
                     (assert))
                    ("3" (expand "o" 1) (inst 1 "c2") (assert))))
                  ("2" (expand "o" 1) (inst 1 "b2") (assert))
                  ("3"
                   (expand "o" 1)
                   (inst 1 "d2")
                   (typepred "Eq")
                   (expand* "equivalence?" "symmetric?")
                   (flatten)
                   (inst -2 "d1" "d2")
                   (assert))))
                ("2" (assert)) ("3" (assert))))))
            ("2" (assert))))
          ("2" (assert))
          ("3"
           (hide -2)
           (expand* "confluent_m?" "local_confluent_m?")
           (lemma "R_subset_RTC")
           (inst?)
           (lemma "R_subset_RTC")
           (inst?)
           (expand* "subset?" "member")
           (inst -1 "(x, y)")
           (inst -2 "(x, z)")
           (assert))))))))
    ("2"
     (flatten)
     (split)
     (("1"
       (hide -2)
       (expand* "confluent_m?" "local_confluent_m?")
       (skeep)
       (inst -3 "x" "x" "y" "z")
       (typepred "Eq")
       (expand "equivalence?")
       (flatten)
       (expand "reflexive?")
       (inst?)
       (lemma "R_subset_RTC")
       (lemma "R_subset_RTC")
       (inst?)
       (inst?)
       (expand* "subset?" "member")
       (inst -1 "(x, y)")
       (inst -2 "(x, z)")
       (assert))
      ("2"
       (hide -2)
       (expand* "confluent_m?" "locally_coherent?")
       (typepred "Eq")
       (expand "equivalence?")
       (prop)
       (skeep)
       (inst -6 "x" "z" "y" "z")
       (lemma "R_subset_RTC")
       (inst?)
       (expand* "subset?" "member")
       (inst -1 "(x, y)")
       (assert)
       (hide-all-but 2)
       (expand* "RTC" "IUnion")
       (inst 1 "0")
       (expand "iterate" 1)
       (propax))))))


proof_type: f_proof
decl_type: formula
library: TRS
theory: results_commutation
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (lemma "noetherian_induction")
   (inst? -1 ("R" "union(R1, R2)"))
   (("1"
     (inst -1
      "(LAMBDA (a: T): (FORALL (b, c: T): RTC(R1)(a, b) AND RTC(R2)(a, c) IMPLIES (EXISTS (d: T): RTC(R2)(b, d) AND RTC(R1)(c, d))))")
     (split)
     (("1"
       (expand "commute?")
       (skeep)
       (inst -1 "x")
       (inst -1 "y" "z")
       (assert))
      ("2"
       (hide 2)
       (skeep)
       (skeep)
       (expand "RTC" (-2 -3))
       (expand "IUnion" (-2 -3))
       (skolem * "i")
       (skolem * "j")
       (case-replace "i = 0" :hide? t)
       (("1"
         (hide-all-but (-2 -3 1))
         (inst 1 "c")
         (expand* "RTC" "IUnion")
         (split)
         (("1" (expand "iterate" -1) (replaces -1) (inst 1 "j"))
          ("2" (inst 1 "0") (expand "iterate" 1) (propax))))
        ("2"
         (case-replace "j = 0" :hide? t)
         (("1"
           (hide-all-but (-2 -3 2))
           (inst 1 "b")
           (expand* "RTC" "IUnion")
           (split)
           (("1" (inst 1 "0") (expand "iterate" 1) (propax))
            ("2" (expand "iterate" -2) (replaces -2) (inst 1 "i"))))
          ("2"
           (lemma iterate_add_one)
           (copy -1)
           (inst? -1 ("R" "R1" "n" "i - 1"))
           (("1"
             (inst? -2 ("R" "R2" "n" "j - 1"))
             (("1"
               (decompose-equality)
               (decompose-equality)
               (inst -2 "(x, b)")
               (inst -1 "(x, c)")
               (replaces -1)
               (replaces -1)
               (expand "o")
               (skolem * "x1")
               (skolem * "x2")
               (flatten)
               (lemma "iterate_RTC")
               (copy -1)
               (inst -1 "R1" "i - 1")
               (("1"
                 (inst -2 "R2" "j - 1")
                 (("1"
                   (expand* "subset?" "member")
                   (inst -1 "(x1, b)")
                   (inst -2 "(x2, c)")
                   (assert)
                   (expand "locally_commute?")
                   (inst -8 "x" "x1" "x2")
                   (assert)
                   (skolem * "u")
                   (flatten)
                   (hide (-5 -7))
                   (copy -3)
                   (inst -4 "x1")
                   (split)
                   (("1"
                     (inst -1 "b" "u")
                     (assert)
                     (skolem * "v")
                     (flatten)
                     (typepred "RTC(R1)")
                     (expand "reflexive_transitive?")
                     (flatten)
                     (hide -1)
                     (expand "transitive?")
                     (inst -1 "x2" "u" "v")
                     (assert)
                     (hide (-10 -3))
                     (inst -3 "x2")
                     (split)
                     (("1"
                       (inst -1 "v" "c")
                       (assert)
                       (hide-all-but (-1 -3 3))
                       (skolem * "w")
                       (flatten)
                       (inst 1 "w")
                       (typepred "RTC(R2)")
                       (expand "reflexive_transitive?")
                       (flatten)
                       (hide -1)
                       (expand "transitive?")
                       (inst -1 "b" "v" "w")
                       (assert))
                      ("2"
                       (hide-all-but (-6 1))
                       (case "subset?(R2, union(R1, R2))")
                       (("1"
                         (lemma "R_subset_TC")
                         (inst -1 "union(R1, R2)")
                         (expand* "subset?" "member")
                         (inst -1 "(x, x2)")
                         (assert)
                         (inst -1 "(x, x2)")
                         (assert))
                        ("2"
                         (hide-all-but 1)
                         (expand* "subset?" "member")
                         (skolem * "a")
                         (flatten)
                         (expand* "union" "member")
                         (assert))))))
                    ("2"
                     (hide-all-but (-4 1))
                     (case "subset?(R1, union(R1, R2))")
                     (("1"
                       (lemma "R_subset_TC")
                       (inst -1 "union(R1, R2)")
                       (expand* "subset?" "member")
                       (inst -1 "(x, x1)")
                       (assert)
                       (inst -1 "(x, x1)")
                       (assert))
                      ("2"
                       (hide-all-but 1)
                       (expand* "subset?" "member")
                       (skolem * "a")
                       (flatten)
                       (expand* "union" "member")
                       (assert))))))
                  ("2" (hide-all-but (1 2)) (typepred "j") (assert))))
                ("2" (hide-all-but (1 3)) (typepred "i") (assert))))
              ("2" (hide-all-but (1 2)) (typepred "j") (assert))
              ("3" (hide-all-but (1 2)) (typepred "j") (assert))))
            ("2" (hide-all-but (1 3)) (typepred "i") (assert))
            ("3" (hide-all-but (1 3)) (typepred "i") (assert))))))))))
    ("2" (propax))))


proof_type: f_proof
decl_type: formula
library: TRS
theory: results_commutation
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (induct "n")
   (("1"
     (skeep)
     (inst 1 "z")
     (split)
     (("1"
       (expand* "RTC" "IUnion")
       (inst 1 "0")
       (expand "iterate")
       (propax))
      ("2" (expand "iterate") (expand* "RC" "union" "member") (assert))))
    ("2"
     (skeep)
     (skeep)
     (rewrite "iterate_add")
     (expand "o")
     (skolem * "y1")
     (flatten)
     (rewrite "iterate_1")
     (inst -1 "R1" "R2" "x" "y1" "z")
     (assert)
     (skolem * "z1")
     (flatten)
     (hide -4)
     (expand "RC" -2)
     (expand* "union" "member")
     (split)
     (("1"
       (expand "strong_commute?")
       (inst -3 "y1" "y" "z1")
       (assert)
       (skolem * "z2")
       (flatten)
       (inst 1 "z2")
       (split)
       (("1"
         (hide-all-but (-2 -4 1))
         (typepred "RTC(R1)")
         (expand "reflexive_transitive?")
         (flatten)
         (hide -1)
         (expand "transitive?")
         (inst -1 "z" "z1" "z2")
         (assert))
        ("2" (propax))))
      ("2"
       (inst 1 "y")
       (split)
       (("1"
         (replaces -1)
         (hide (-2 -4))
         (lemma "R_subset_RTC")
         (inst?)
         (expand* "subset?" "member")
         (inst -1 "(z1, y)")
         (assert)
         (hide -3)
         (typepred "RTC(R1)")
         (expand "reflexive_transitive?")
         (flatten)
         (hide -1)
         (expand "transitive?")
         (inst -1 "z" "z1" "y")
         (assert))
        ("2" (hide-all-but 1) (expand* "RC" "union" "member"))))))))


proof_type: f_proof
decl_type: formula
library: TRS
theory: results_commutation
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (induct "m")
   (("1"
     (skeep)
     (inst 1 "y")
     (split)
     (("1"
       (expand* "RTC" "IUnion")
       (inst 1 "0")
       (expand "iterate")
       (propax))
      ("2"
       (expand "iterate" -3)
       (expand* "RTC" "IUnion")
       (inst 1 "n")
       (assert))))
    ("2"
     (skeep)
     (skeep)
     (rewrite "iterate_add")
     (expand "o")
     (skolem * "z1")
     (flatten)
     (inst -1 "R1" "R2" "x" "y" "z1" "n")
     (assert)
     (skolem * "r1")
     (flatten)
     (rewrite "iterate_1")
     (expand "RTC" -2)
     (expand "IUnion" -2)
     (skolem * "i")
     (lemma "commute_and_iterate_one")
     (inst -1 "R1" "R2" "z1" "r1" "z" "i")
     (assert)
     (skolem * "r2")
     (flatten)
     (inst 1 "r2")
     (assert)
     (hide-all-but (-2 -3 1))
     (case "subset?(RC(R2), RTC(R2))")
     (("1"
       (expand* "subset?" "member")
       (inst -1 "(r1, r2)")
       (assert)
       (typepred "RTC(R2)")
       (expand "reflexive_transitive?")
       (flatten)
       (hide (-1 -3))
       (expand "transitive?")
       (inst -1 "y" "r1" "r2")
       (assert))
      ("2"
       (hide-all-but 1)
       (expand* "subset?" "member")
       (skosimp*)
       (expand* "RC" "union" "member")
       (expand* "RTC" "IUnion")
       (split)
       (("1" (inst 1 "1") (rewrite "iterate_1"))
        ("2" (inst 1 "0") (expand "iterate") (propax))))))))


proof_type: f_proof
decl_type: formula
library: TRS
theory: results_commutation
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (expand "commute?")
   (skeep)
   (expand "RTC" (-2 -3))
   (expand "IUnion" (-2 -3))
   (skolem * "i")
   (skolem * "j")
   (lemma "commute_and_iterate_two")
   (inst -1 "R1" "R2" "x" "y" "z" "i" "j")
   (assert))


proof_type: f_proof
decl_type: formula
library: TRS
theory: IUnion_extra
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp*)
   (expand* "disjoint?" "empty?" "intersection")
   (skeep)
   (inst?)
   (expand* "subset?" "member")
   (inst?)
   (inst?)
   (prop))


proof_type: f_proof
decl_type: formula
library: TRS
theory: IUnion_extra
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (expand* "disjoint?" "empty?" "intersection")
   (skosimp*)
   (inst?)
   (expand "member")
   (prop))


proof_type: f_proof
decl_type: formula
library: TRS
theory: IUnion_extra
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (induct "n")
   (("1" (typepred "n!1") (propax)) ("2" (assert))
    ("3"
     (skosimp*)
     (case "j!1 = 0")
     (("1"
       (hide -2)
       (expand "IUnion")
       (inst -3 "1")
       (case-replace
        "{x: T | EXISTS (i_1: upto?(1 + j!1)): f!1(i_1)(x)} = f!1(1)"
        :hide? T)
       (hide 2)
       (decompose-equality 1)
       (iff)
       (prop)
       (("1" (skosimp*) (typepred "i!1") (replaces -4) (assert))
        ("2" (inst 1 "1"))))
      ("2"
       (assert)
       (inst -1 "restrict[upto?(1 + j!1), upto?(j!1), set[T]](f!1)")
       (prop)
       (("1"
         (expand "restrict")
         (case-replace
          "IUnion(LAMBDA (i: upto?(1 + j!1)): f!1(i)) = union(f!1(j!1 + 1),IUnion(LAMBDA (i: upto?(j!1)): f!1(i)))"
          :hide? T)
         (("1" (inst -3 "j!1 + 1") (rewrite "finite_union" 2))
          ("2"
           (hide (-1 -3 3))
           (decompose-equality 1)
           (iff)
           (prop)
           (("1"
             (expand "IUnion" -1)
             (skosimp*)
             (expand* "union" "member")
             (flatten)
             (case-replace "i!1 = 1 + j!1")
             (expand "IUnion")
             (inst 3 "i!1")
             (typepred "i!1")
             (assert))
            ("2"
             (expand* "union" "member")
             (prop)
             (("1" (expand "IUnion") (inst 1 "1 + j!1"))
              ("2" (expand "IUnion") (skosimp*) (inst 1 "i!1"))))))))
        ("2" (skosimp*) (expand "restrict") (inst -2 "i!1"))))))))


proof_type: f_proof
decl_type: formula
library: TRS
theory: IUnion_extra
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (induct "n")
   (("1" (typepred "n!1") (propax)) ("2" (assert))
    ("3"
     (skosimp*)
     (case "j!1 = 0")
     (("1"
       (hide -2)
       (expand "IUnion")
       (inst -3 "0")
       (case-replace
        "{x: T | EXISTS (i_1: below[1 + j!1]): f!1(i_1)(x)} = f!1(0)"
        :hide? T)
       (hide 2)
       (decompose-equality 1)
       (iff)
       (prop)
       (("1" (skosimp*) (typepred "i!1") (replaces -3) (assert))
        ("2" (inst 1 "0"))))
      ("2"
       (assert)
       (inst -1 "restrict[below[1 + j!1], below[j!1], set[T]](f!1)")
       (prop)
       (("1"
         (expand "restrict")
         (case-replace
          "IUnion(LAMBDA (i: below[1 + j!1]): f!1(i)) = union(f!1(j!1),IUnion(LAMBDA (i: below[j!1]): f!1(i)))"
          :hide? T)
         (("1" (inst -3 "j!1") (rewrite "finite_union" 2))
          ("2"
           (hide (-1 -3 3))
           (decompose-equality 1)
           (iff)
           (prop)
           (("1"
             (expand "IUnion" -1)
             (skosimp*)
             (expand* "union" "member")
             (flatten)
             (case-replace "i!1 = j!1")
             (expand "IUnion")
             (inst 3 "i!1")
             (typepred "i!1")
             (assert))
            ("2"
             (expand* "union" "member")
             (prop)
             (("1" (expand "IUnion") (inst 1 "j!1"))
              ("2" (expand "IUnion") (skosimp*) (inst 1 "i!1"))))))))
        ("2" (skosimp*) (expand "restrict") (inst -2 "i!1"))))))))


proof_type: f_proof
decl_type: formula
library: TRS
theory: positions
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (induct "t")
   (("1"
     (skosimp*)
     (expand* "positionsOF" "only_empty_seq")
     (case-replace "{x: position | x = empty_seq} = singleton(empty_seq)"
      :hide? T)
     (("1" (rewrite "finite_singleton"))
      ("2" (hide 2) (expand "singleton") (propax))))
    ("2"
     (skosimp*)
     (expand "positionsOF" 1)
     (prop)
     (("1"
       (expand "only_empty_seq")
       (case-replace
        "{x: position | x = empty_seq} = singleton(empty_seq)" :hide? T)
       (("1" (rewrite "finite_singleton"))
        ("2" (hide (-1 -2 2)) (expand "singleton") (propax))))
      ("2"
       (lemma "finite_sets[position].finite_union")
       (inst?)
       (("1"
         (hide 3)
         (expand "finseq_appl")
         (lemma "IUnion_of_finite_is_finite")
         (inst?)
         (("1"
           (assert)
           (hide 2)
           (skosimp*)
           (inst -1 "i!1 - 1")
           (expand "is_finite")
           (skolem-typepred)
           (inst?)
           (inst 1
            "LAMBDA (x: (catenate(i!1, positionsOF(app2_var!1`seq(i!1 - 1))))): f!1(rest(x))")
           (("1"
             (expand "injective?")
             (skolem-typepred)
             (expand "catenate")
             (skosimp*)
             (expand "member")
             (replaces -2)
             (replaces -3)
             (rewrite "rest_add_first")
             (rewrite "rest_add_first")
             (inst -5 "x!1" "x!2")
             (assert))
            ("2"
             (skolem-typepred)
             (expand "catenate")
             (skosimp*)
             (expand "member")
             (replaces -2)
             (rewrite "rest_add_first"))))
          ("2" (assert))))
        ("2"
         (hide (-1 2 3))
         (expand "only_empty_seq")
         (case-replace
          "{x: position | x = empty_seq} = singleton(empty_seq)" :hide?
          T)
         (("1" (rewrite "finite_singleton"))
          ("2" (hide 2) (expand "singleton") (propax))))))))))


proof_type: f_proof
decl_type: formula
library: TRS
theory: positions
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (expand "<=")
   (skolem * "p1")
   (replaces -1)
   (expand* "o" "empty_seq")
   (flatten)
   (apply-extensionality)
   (hide 2)
   (decompose-equality))


proof_type: f_proof
decl_type: formula
library: TRS
theory: positions
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (measure-induct+ "length(q)" "q")
   (skeep)
   (expand "positionsOF" (-2 1))
   (lift-if)
   (prop)
   (("1"
     (hide (-1 -2 -4))
     (expand "only_empty_seq")
     (lemma "empty_pos")
     (inst?)
     (assert))
    ("2"
     (hide (-1 -2 -4 2 3))
     (expand "only_empty_seq")
     (lemma "empty_pos")
     (inst?)
     (assert))
    ("3"
     (expand* "union" "member" "only_empty_seq")
     (prop)
     (("1" (hide-all-but (-1 -3 2)) (lemma "empty_pos") (inst?) (assert))
      ("2"
       (expand "IUnion")
       (skolem * "i1")
       (expand "catenate" -1)
       (skolem * "q1")
       (flatten)
       (expand "member")
       (inst -3 "q1")
       (expand "<=" -4)
       (skolem * "p1")
       (inst -3 "rest(p)" "args(t)(i1 - 1)")
       (prop)
       (("1"
         (inst 3 "i1")
         (expand "catenate")
         (inst 3 "rest(p)")
         (expand "member")
         (assert)
         (hide-all-but (-3 -4 2 3))
         (lemma "fsepn.seq_first_rest")
         (inst -1 "p")
         (prop)
         (("1"
           (replaces -1 -3)
           (lemma "fsepn.add_first_compo")
           (inst -1 "rest(p)" "p1" "first(p)")
           (replaces -1 -3)
           (replaces -1)
           (lemma "fsepn.first_equal")
           (inst?)
           (assert)
           (flatten)
           (replaces -1)
           (lemma "fsepn.seq_first_rest")
           (inst -1 "p")
           (assert)
           (prop)
           (rewrite "empty_0"))
          ("2" (rewrite "empty_0"))))
        ("2"
         (rewrite "empty_0")
         (hide-all-but (-2 -3 1 3))
         (expand "<=")
         (inst 1 "p1")
         (lemma "fsepn.seq_first_rest")
         (inst -1 "p")
         (prop)
         (("1"
           (replaces -1 -3)
           (rewrite "fsepn.add_first_compo")
           (replaces -1 -2)
           (lemma "fsepn.first_equal")
           (inst?)
           (assert))
          ("2" (rewrite "empty_0"))))
        ("3" (hide-all-but (-2 -3 1 3)) (grind))))))))


proof_type: f_proof
decl_type: formula
library: TRS
theory: positions
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (lemma "closed_positions")
   (assert)
   (expand "<=")
   (skosimp)
   (inst -1 p!1 "p!1 o q!1" t!1)
   (assert)
   (inst 1 q!1))


proof_type: f_proof
decl_type: formula
library: TRS
theory: positions
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (expand "positionsOF" -1)
   (lift-if)
   (prop)
   (("1" (expand "only_empty_seq") (rewrite "empty_0"))
    ("2" (expand "only_empty_seq") (rewrite "empty_0"))
    ("3"
     (expand "only_empty_seq")
     (expand* "union" "member")
     (prop)
     (("1" (rewrite "empty_0"))
      ("2"
       (expand "IUnion")
       (skolem * "i1")
       (expand "catenate")
       (skolem * "y1")
       (expand "member")
       (flatten)
       (lemma "fsepn.seq_first_rest")
       (inst?)
       (assert)
       (replaces -1 -3)
       (lemma "fsepn.first_equal")
       (inst?)
       (assert)
       (flatten)
       (assert))))))


proof_type: f_proof
decl_type: formula
library: TRS
theory: positions
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp*)
   (lemma "fsepn.add_last_delete")
   (inst?)
   (assert)
   (lemma "fsepn.add_last_delete_is_o")
   (inst?)
   (assert)
   (expand "finseq_appl")
   (replaces -1 -2)
   (replaces -1 -2)
   (lemma "pos_ax")
   (inst?)
   (assert))


proof_type: f_proof
decl_type: formula
library: TRS
theory: positions
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (lemma "fsepn.seq_first_rest")
   (copy -1)
   (inst -1 "p")
   (inst -2 "q")
   (assert)
   (expand "parallel")
   (expand "<=")
   (skosimp*)
   (assert)
   (prop)
   (("1"
     (skosimp*)
     (replace -2 3)
     (replace -3 3)
     (inst 3 "p1!1")
     (replaces -1)
     (replaces -4)
     (replaces -3)
     (rewrite "add_first_compo"))
    ("2"
     (skosimp*)
     (replace -2 4)
     (replace -3 4)
     (inst 3 "p1!1")
     (inst 4 "p1!1")
     (replaces -4)
     (replaces -1)
     (rewrite "add_first_compo"))))


proof_type: f_proof
decl_type: formula
library: TRS
theory: positions
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skolem-typepred)
   (expand "PP?")
   (prop)
   (("1" (hide 2) (grind))
    ("2"
     (skosimp*)
     (inst -1 "i!1 + 1" "j!1 + 1")
     (("1"
       (assert)
       (expand "finseq_appl")
       (lemma "fspos.rest_pos")
       (inst?)
       (lemma "fspos.rest_pos")
       (inst?)
       (assert)
       (inst -1 "i!1")
       (("1"
         (inst -2 "j!1")
         (("1" (expand "finseq_appl") (assert))
          ("2" (hide-all-but 1) (typepred "j!1") (grind))))
        ("2" (hide-all-but 1) (typepred "i!1") (grind))))
      ("2" (hide-all-but 1) (typepred "j!1") (grind))
      ("3" (hide-all-but 1) (typepred "i!1") (grind))))))


proof_type: f_proof
decl_type: formula
library: TRS
theory: positions
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skolem-typepred)
   (expand "SP?")
   (case "length(rest(fss!1)) = 0")
   (("1" (hide -2) (grind))
    ("2"
     (skosimp*)
     (inst -1 "i!1 + 1")
     (("1"
       (lemma "fspos.rest_pos")
       (inst?)
       (prop)
       (inst -1 "i!1")
       (("1" (expand "finseq_appl") (assert))
        ("2" (typepred "i!1") (grind))))
      ("2" (grind) (typepred "i!1") (grind))))))


proof_type: f_proof
decl_type: formula
library: TRS
theory: positions
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skolem 1 ("fss" "_"))
   (case "length(fss) = 0")
   (("1" (grind))
    ("2"
     (skolem-typepred)
     (typepred "fss")
     (expand "PP?")
     (prop)
     (("1" (hide 2) (grind))
      ("2"
       (skosimp*)
       (expand "finseq_appl")
       (case "i!2 < i!1")
       (("1"
         (case "j!1 < i!1")
         (("1"
           (expand "delete" 3)
           (assert)
           (expand "finseq_appl")
           (inst -3 "i!2" "j!1")
           (assert))
          ("2"
           (expand "delete" 4)
           (assert)
           (expand "finseq_appl")
           (inst -2 "i!2" "j!1 + 1")
           (("1" (assert))
            ("2" (typepred "j!1") (hide (3 5)) (grind))))))
        ("2"
         (case "j!1 < i!1")
         (("1"
           (expand "delete" 4)
           (assert)
           (expand "finseq_appl")
           (inst -2 "i!2 + 1" "j!1")
           (("1" (assert)) ("2" (hide (3 5)) (typepred "i!2") (grind))))
          ("2"
           (expand "delete" 5)
           (assert)
           (expand "finseq_appl")
           (inst -1 "i!2 + 1" "j!1 + 1")
           (("1" (assert)) ("2" (hide (4 6)) (typepred "j!1") (grind))
            ("3" (hide (4 6)) (typepred "i!2") (grind))))))))))))


proof_type: f_proof
decl_type: formula
library: TRS
theory: positions
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skolem 1 ("s" "fss" "_"))
   (case "length(fss) = 0")
   (("1" (grind))
    ("2"
     (skolem-typepred)
     (typepred "fss")
     (expand "SP?")
     (case "length(delete(fss, i!1)) = 0")
     (("1" (hide -2) (grind))
      ("2"
       (skosimp*)
       (case "i!2 < i!1")
       (("1" (expand* "delete" "finseq_appl") (assert) (inst -2 "i!2"))
        ("2"
         (expand* "delete" "finseq_appl")
         (assert)
         (inst -1 "i!2 + 1")
         (("1" (assert)) ("2" (hide 5) (typepred "i!2") (grind))))))))))


proof_type: f_proof
decl_type: formula
library: TRS
theory: positions
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skolem-typepred)
   (case "length(fss!1) = 0")
   (("1" (grind))
    ("2"
     (skosimp*)
     (expand "PP?" 2)
     (prop)
     (skosimp*)
     (case-replace "i!1 = 0")
     (("1"
       (inst -3 "j!1 - 1")
       (("1"
         (lemma "fspos.nth_add_first")
         (inst -1 "fss!1" "q!1" "0")
         (("1"
           (replaces -1)
           (lemma "fspos.nth_add_first")
           (inst -1 "fss!1" "q!1" "j!1")
           (("1" (assert) (replaces -1) (rewrite "parallel_comm"))
            ("2" (hide-all-but 1) (typepred "j!1") (grind))))
          ("2" (hide-all-but 1) (grind))))
        ("2" (hide (-2 4)) (typepred "j!1") (grind))))
      ("2"
       (case-replace "j!1 = 0")
       (("1"
         (inst -3 "i!1 - 1")
         (("1"
           (lemma "fspos.nth_add_first")
           (inst -1 "fss!1" "q!1" "0")
           (("1"
             (replaces -1)
             (lemma "fspos.nth_add_first")
             (inst -1 "fss!1" "q!1" "i!1")
             (("1" (assert))
              ("2" (hide-all-but 1) (typepred "i!1") (grind))))
            ("2" (hide-all-but 1) (grind))))
          ("2" (hide (-2 5)) (typepred "i!1") (grind))))
        ("2"
         (hide -2)
         (expand "PP?")
         (prop)
         (("1" (typepred "i!1" "j!1") (hide 5) (grind))
          ("2"
           (inst -1 "i!1 - 1" "j!1 - 1")
           (("1"
             (assert)
             (lemma "fspos.nth_add_first")
             (inst -1 "fss!1" "q!1" "i!1")
             (("1"
               (lemma "fspos.nth_add_first")
               (inst -1 "fss!1" "q!1" "j!1")
               (("1" (assert))
                ("2" (hide-all-but 1) (typepred "j!1") (grind))))
              ("2" (hide-all-but 1) (typepred "i!1") (grind))))
            ("2" (hide-all-but (1 3)) (typepred "j!1") (grind))
            ("3" (hide-all-but (1 4)) (typepred "i!1") (grind))))))))))))


proof_type: f_proof
decl_type: formula
library: TRS
theory: positions
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skolem-typepred)
   (case "length(fss!1) = 0")
   (("1" (hide -2) (grind))
    ("2"
     (expand "SP?" 2)
     (skosimp*)
     (case-replace "i!1 = 0")
     (("1"
       (hide -2)
       (lemma "fspos.nth_add_first")
       (inst?)
       (("1" (assert)) ("2" (assert))))
      ("2"
       (expand "SP?")
       (inst -1 "i!1 - 1")
       (("1"
         (lemma "fspos.nth_add_first")
         (inst -1 "fss!1" "q!1" "i!1")
         (("1" (assert))
          ("2" (hide-all-but (1 2)) (typepred "i!1") (grind))))
        ("2" (hide-all-but (1 2)) (typepred "i!1") (grind))))))))


proof_type: f_proof
decl_type: formula
library: TRS
theory: positions
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skolem-typepred)
   (case "length(fss!1) = 0")
   (("1" (grind))
    ("2"
     (skosimp*)
     (expand "PP?" 2)
     (prop)
     (skosimp*)
     (case-replace "i!1 = length(fss!1)")
     (("1"
       (inst -3 "j!1")
       (("1"
         (lemma "fspos.nth_add_last")
         (inst -1 "fss!1" "q!1" "length(fss!1)")
         (replaces -1)
         (lemma "fspos.nth_add_last")
         (inst -1 "fss!1" "q!1" "j!1")
         (("1" (assert) (replaces -1) (rewrite "parallel_comm"))
          ("2" (hide-all-but 1) (typepred "j!1") (grind))))
        ("2" (hide-all-but (1 3 5)) (typepred "j!1") (grind))))
      ("2"
       (case-replace "j!1 = length(fss!1)")
       (("1"
         (inst -3 "i!1")
         (("1"
           (lemma "fspos.nth_add_last")
           (inst -1 "fss!1" "q!1" "length(fss!1)")
           (replaces -1)
           (lemma "fspos.nth_add_last")
           (inst -1 "fss!1" "q!1" "i!1")
           (("1" (assert))
            ("2" (hide-all-but 1) (typepred "i!1") (grind))))
          ("2" (hide-all-but (2 1 6)) (typepred "i!1") (grind))))
        ("2"
         (hide -2)
         (expand "PP?")
         (prop)
         (("1" (typepred "i!1" "j!1") (hide 5) (grind))
          ("2"
           (inst -1 "i!1" "j!1")
           (("1"
             (assert)
             (lemma "fspos.nth_add_last")
             (inst -1 "fss!1" "q!1" "i!1")
             (("1"
               (assert)
               (lemma "fspos.nth_add_last")
               (inst -1 "fss!1" "q!1" "j!1")
               (("1" (assert))
                ("2" (hide-all-but 1) (typepred "j!1") (grind))))
              ("2" (hide-all-but 1) (typepred "i!1") (grind))))
            ("2" (hide-all-but (1 3)) (typepred "j!1") (grind))
            ("3" (hide-all-but (1 4)) (typepred "i!1") (grind))))))))))))


proof_type: f_proof
decl_type: formula
library: TRS
theory: positions
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skolem-typepred)
   (case "length(fss!1) = 0")
   (("1" (hide -2) (grind))
    ("2"
     (expand "SP?" 2)
     (skosimp*)
     (case-replace "i!1 = length(fss!1)")
     (("1" (hide -2) (lemma "fspos.nth_add_last") (inst?) (replaces -1))
      ("2"
       (expand "SP?")
       (inst -1 "i!1")
       (("1"
         (lemma "fspos.nth_add_last")
         (inst -1 "fss!1" "q!1" "i!1")
         (("1" (assert))
          ("2" (hide-all-but (1 2)) (typepred "i!1") (grind))))
        ("2" (hide-all-but (1 2)) (typepred "i!1") (grind))))))))


proof_type: f_proof
decl_type: formula
library: TRS
theory: positions
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (typepred "k")
   (expand* "#" "positionsOF")
   (expand* "union" "IUnion" "member")
   (flatten)
   (hide 1)
   (inst 1 "k + 1")
   (assert)
   (expand "catenate")
   (inst 1 "empty_seq")
   (split)
   (("1" (expand* "member" "finseq_appl" "positionsOF") (grind))
    ("2" (grind))))


proof_type: f_proof
decl_type: formula
library: TRS
theory: positions
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (expand "left_pos")
   (skosimp*)
   (prop)
   (("1"
     (replace -3 -4 rl)
     (replace -2 -4)
     (hide -2 -3)
     (inst 3 r!2 "p1!2 o p1!1" empty_seq)
     (assert)
     (prop)
     (("1"
       (hide -2 -3)
       (lemma seq_empty[posnat])
       (inst?)
       (assert)
       (rewrite empty_0))
      ("2" (assert) (hide -1 2 3) (rewrite o_assoc))))
    ("2"
     (replace -4 -5 rl)
     (replace -2 -5)
     (hide -2 -4)
     (inst 4 r!2 "p1!2 o p1!1" q1!3)
     (flatten)
     (hide 4)
     (prop)
     (("1" (rewrite o_assoc))
      ("2" (lemma seq_empty[posnat]) (inst?) (assert) (rewrite empty_0))
      ("3" (rewrite first_compo) (flatten) (rewrite empty_0))))
    ("3"
     (case "r!2 <= r!1")
     (("1"
       (expand <=)
       (skosimp)
       (replace -1 -5)
       (hide -1 -3 -4 -6)
       (inst 4 r!2 "p1!3 o p1!1" empty_seq)
       (assert)
       (prop)
       (("1"
         (lemma seq_empty[posnat])
         (inst?)
         (assert)
         (rewrite empty_0)
         (rewrite empty_0))
        ("2" (rewrite o_assoc))))
      ("2"
       (case "r!1 <= r!2")
       (("1"
         (expand <= -1)
         (skosimp)
         (replace -1 -2)
         (inst 5 r!1 p1!1 p1!3)
         (flatten)
         (hide 5)
         (prop)
         (("1"
           (expand <=)
           (inst 1 empty_seq)
           (replace -1 -2)
           (rewrite seq_o_empty)
           (rewrite seq_o_empty)
           (assert))
          ("2"
           (replace -1 -3)
           (replace -3 -4)
           (hide -1 -2 -3 -5)
           (lemma equal_prefix[posnat])
           (inst -1 r!1 "p1!3 o p1!2" q1!2)
           (rewrite o_assoc)
           (assert)
           (replace -1 -3 rl)
           (rewrite first_compo)
           (expand <=)
           (inst 3 empty_seq)
           (reveal -2)
           (flatten)
           (rewrite empty_0)
           (replaces -2)
           (rewrite seq_o_empty)
           (rewrite seq_o_empty)
           (assert))))
        ("2"
         (hide-all-but (-2 -3 1 2))
         (expand <=)
         (replaces -1)
         (case "length(r!2) = length(r!1)")
         (("1"
           (lemma o_equals_o[posnat])
           (inst?)
           (assert)
           (inst 1 empty_seq)
           (rewrite seq_o_empty))
          ("2"
           (case " length(r!2) < length(r!1)")
           (("1" (lemma o_length_o[posnat]) (inst?) (assert))
            ("2"
             (lemma o_length_o[posnat])
             (inst -1 r!1 q1!2 r!2 p1!2)
             (assert))))))))))
    ("4"
     (case "r!1 <= r!2")
     (("1"
       (expand <=)
       (skosimp)
       (replace -1 -2)
       (inst 5 r!1 p1!1 "p1!3 o q1!3")
       (flatten)
       (hide 5)
       (prop)
       (("1" (rewrite o_assoc))
        ("2"
         (lemma seq_empty[posnat])
         (inst?)
         (assert)
         (flatten)
         (rewrite empty_0 -2))
        ("3"
         (replace -1 -3)
         (replace -3 -5)
         (lemma equal_prefix[posnat])
         (inst -1 r!1 "p1!3 o p1!2" q1!2)
         (rewrite o_assoc)
         (assert)
         (replace -1 -8 rl)
         (case "p1!3 = empty_seq")
         (("1"
           (replace -1)
           (rewrite empty_o_seq)
           (rewrite empty_o_seq)
           (assert))
          ("2"
           (rewrite first_compo)
           (("1" (rewrite first_compo) (flatten) (rewrite empty_0))
            ("2" (flatten) (rewrite empty_0))))))))
      ("2"
       (case "r!2 <= r!1")
       (("1"
         (hide 1)
         (expand <=)
         (skosimp)
         (replace -1 -6)
         (inst 5 r!2 "p1!3 o p1!1" q1!3)
         (flatten)
         (hide 5)
         (prop)
         (("1" (rewrite o_assoc))
          ("2"
           (lemma seq_empty[posnat])
           (inst?)
           (assert)
           (flatten)
           (rewrite empty_0 -2))
          ("3"
           (replace -1 -5)
           (replace -3 -5)
           (lemma equal_prefix[posnat])
           (inst -1 r!2 p1!2 "p1!3 o q1!2")
           (rewrite o_assoc)
           (assert)
           (replace -1 -5)
           (case "p1!3 = empty_seq")
           (("1"
             (replace -1)
             (rewrite empty_o_seq)
             (rewrite empty_o_seq)
             (assert))
            ("2"
             (rewrite first_compo)
             (("1" (rewrite first_compo) (flatten) (rewrite empty_0))
              ("2" (flatten) (rewrite empty_0))))))))
        ("2"
         (hide-all-but (-2 -4 1 2))
         (replaces -1)
         (expand <=)
         (case "length(r!2) = length(r!1)")
         (("1"
           (lemma o_equals_o[posnat])
           (inst?)
           (assert)
           (inst 1 empty_seq)
           (rewrite seq_o_empty)
           (assert))
          ("2"
           (case " length(r!2) < length(r!1)")
           (("1" (lemma o_length_o[posnat]) (inst?) (assert))
            ("2"
             (lemma o_length_o[posnat])
             (inst -1 r!1 q1!2 r!2 p1!2)
             (assert))))))))))))


proof_type: f_proof
decl_type: formula
library: TRS
theory: positions
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp*)
   (expand* "left_without_children" "left_pos")
   (skosimp*)
   (inst?)
   (inst?)
   (assert))


proof_type: f_proof
decl_type: formula
library: TRS
theory: positions
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (expand left_without_children)
   (skosimp*)
   (case "r!1 = r!2")
   (("1"
     (replaces -1)
     (inst 5 r!2 p1!1 q1!3)
     (assert)
     (lemma equal_prefix[posnat])
     (inst -1 r!2 q1!2 p1!2)
     (assert))
    ("2"
     (case "child(r!2, r!1)")
     (("1"
       (expand child)
       (skosimp)
       (inst 7 r!1 p1!1 "p1!3 o q1!3")
       (rewrite o_assoc)
       (assert)
       (lemma equal_prefix[posnat])
       (inst -1 r!1 q1!2 "p1!3 o p1!2")
       (rewrite o_assoc)
       (assert)
       (replace -1 -5)
       (rewrite first_compo)
       (("1"
         (rewrite first_compo)
         (("1"
           (assert)
           (flatten)
           (lemma seq_empty[posnat])
           (inst -1 p1!3 q1!3)
           (assert)
           (rewrite empty_0))
          ("2" (hide-all-but (1 2)) (flatten) (rewrite empty_0))))
        ("2" (hide-all-but (1 2)) (flatten) (rewrite empty_0))))
      ("2"
       (case "child(r!1, r!2)")
       (("1"
         (expand child -1)
         (skosimp)
         (inst 8 r!2 "p1!3 o p1!1" q1!3)
         (rewrite o_assoc)
         (assert)
         (lemma equal_prefix[posnat])
         (inst -1 r!2 "p1!3 o q1!2" p1!2)
         (rewrite o_assoc)
         (assert)
         (replace -1 -8 rl)
         (rewrite first_compo)
         (("1"
           (rewrite first_compo)
           (("1"
             (assert)
             (lemma seq_empty[posnat])
             (inst -1 p1!3 p1!1)
             (assert)
             (rewrite empty_0))
            ("2" (hide-all-but (1 2)) (flatten) (rewrite empty_0))))
          ("2" (hide-all-but (1 2)) (flatten) (rewrite empty_0))))
        ("2"
         (hide-all-but (-1 -5 1 2 3 4 7))
         (replaces -1)
         (case "length(r!1) < length(r!2)")
         (("1"
           (lemma o_length_o[posnat])
           (inst -1 r!1 q1!2 r!2 p1!2)
           (assert)
           (skosimp)
           (expand child 2)
           (inst 2 seq!1)
           (assert)
           (flatten)
           (replaces -3)
           (rewrite seq_o_empty)
           (assert))
          ("2"
           (case "length(r!1) > length(r!2)")
           (("1"
             (lemma o_length_o[posnat])
             (inst -1 r!2 p1!2 r!1 q1!2)
             (assert)
             (skosimp)
             (expand child 2)
             (inst 2 seq!1)
             (assert)
             (flatten)
             (replaces -3)
             (rewrite seq_o_empty))
            ("2"
             (lemma o_equals_o[posnat])
             (inst -1 r!1 q1!2 r!2 p1!2)
             (assert))))))))))))


proof_type: f_proof
decl_type: formula
library: TRS
theory: positions
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (expand positionsOF)
   (lift-if)
   (assert)
   (prop)
   (("1" (assert))
    ("2"
     (expand* union IUnion member only_empty_seq finseq_appl)
     (flatten)
     (expand* catenate member)
     (inst 3 i!1)
     (inst 3 empty_seq)
     (prop)
     (("1"
       (hide-all-but 1)
       (expand positionsOF)
       (lift-if)
       (expand* union member only_empty_seq))
      ("2" (hide-all-but 1) (rewrite add_first_empty_seq))))))


proof_type: f_proof
decl_type: formula
library: TRS
theory: positions
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (expand positionsOF -1)
   (lift-if)
   (prop)
   (("1" (hide-all-but -2) (expand* only_empty_seq "#" empty_seq))
    ("2" (hide-all-but -2) (expand* only_empty_seq "#" empty_seq))
    ("3"
     (expand* union IUnion catenate member only_empty_seq finseq_appl)
     (prop)
     (("1" (hide-all-but -1) (expand* "#" empty_seq))
      ("2"
       (skosimp*)
       (lemma subterm_if_le_arity)
       (inst -1 j!1 s!1)
       (assert)
       (hide -1 4)
       (typepred i!2)
       (case "i!1 = i!2")
       (("1" (assert))
        ("2"
         (hide-all-but (-3 1))
         (expand* add_first insert? finseq_appl)
         (decompose-equality)
         (expand "#")
         (decompose-equality -2)
         (inst -1 0))))))))


proof_type: f_proof
decl_type: formula
library: TRS
theory: positions
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (assert)
   (flatten)
   (name-replace "pi"
    "add_last(delete(p!1, length(p!1) - 1), 1 + last(p!1))" :hide? nil)
   (("1"
     (expand left_without_children -2)
     (skosimp)
     (case "r!1 = delete(p!1, length(p!1) - 1)")
     (("1"
       (case "q1!2 = #(1 + last(p!1))")
       (("1"
         (case "add_last(delete(p!1, length(p!1) - 1), 1 + last(p!1)) = r!1 o q1!2")
         (("1" (assert))
          ("2"
           (hide-all-but (-1 -2 1))
           (replace -1)
           (replace -2)
           (hide -)
           (name-replace "q!1" "delete(p!1, length(p!1) - 1)")
           (expand o)
           (decompose-equality 1)
           (("1" (expand* add_last insert? "#"))
            ("2"
             (decompose-equality 1)
             (("1"
               (lemma nth_add_last[posnat])
               (inst -1 "q!1" "1 + last(p!1)" "x!1")
               (("1"
                 (expand finseq_appl)
                 (lift-if 1)
                 (split 1)
                 (("1" (prop) (assert))
                  ("2"
                   (prop)
                   (("1" (expand "#") (propax))
                    ("2"
                     (typepred x!1)
                     (hide -2 3)
                     (expand* add_last insert?)
                     (assert))))))
                ("2"
                 (hide 2)
                 (typepred x!1)
                 (expand* add_last insert?))))
              ("2" (skosimp) (expand* add_last insert? "#"))
              ("3" (skosimp) (assert))))
            ("3" (skosimp) (assert))))))
        ("2"
         (case "first(q1!2) = 1 + last(p!1) AND length(q1!2) > 1")
         (("1"
           (flatten)
           (expand child)
           (lemma seq_first_rest_1[posnat])
           (inst -1 q1!2)
           (assert)
           (replace -1 -6)
           (replace -4 -5 rl)
           (case "add_last(r!1, 1 + last(p!1)) = r!1 o #(1 + last(p!1))")
           (("1"
             (replace -1)
             (hide -1)
             (rewrite o_assoc)
             (replace -2 -6)
             (replace -5 -6)
             (inst 6 "rest(q1!2)")
             (assert)
             (flatten)
             (hide-all-but (-1 -3 -9 3))
             (lemma empty_0[posnat])
             (inst -1 "rest(q1!2)")
             (assert)
             (expand* o "#")
             (decompose-equality -2))
            ("2"
             (hide-all-but (1 3))
             (expand o)
             (decompose-equality 1)
             (("1" (expand* add_last insert? "#"))
              ("2"
               (decompose-equality 1)
               (("1"
                 (lemma nth_add_last[posnat])
                 (expand finseq_appl)
                 (lift-if)
                 (prop)
                 (("1"
                   (inst -2 r!1 "1 + last(p!1)" x!1)
                   (("1" (assert)) ("2" (assert))))
                  ("2"
                   (typepred x!1)
                   (expand add_last -1)
                   (expand insert? -1)
                   (inst -2 r!1 "1 + last(p!1)" x!1)
                   (assert)
                   (expand "#")
                   (propax))))
                ("2" (skosimp) (expand* add_last insert? "#"))
                ("3" (skosimp) (assert))))
              ("3" (skosimp) (assert))))))
          ("2"
           (split)
           (("1"
             (case "last(p!1) = first(p1!1)")
             (("1"
               (replace -1 1)
               (expand left_without_children 6)
               (rewrite add_last_is_o)
               (replace -2 -3 rl)
               (inst 6 r!1 "#(1 + last(p!1))" q1!2)
               (assert)
               (prop)
               (("1" (hide-all-but -1) (expand* "#" empty_seq))
                ("2"
                 (replace -1)
                 (expand first 1 1)
                 (expand finseq_appl)
                 (expand "#" 1)
                 (assert))))
              ("2"
               (hide-all-but (-1 -4 1 4 6))
               (replace -1)
               (hide -1)
               (lemma add_last_delete[posnat])
               (inst -1 p!1)
               (lemma empty_0[posnat])
               (inst -1 p!1)
               (assert)
               (rewrite add_last_is_o)
               (lemma equal_prefix[posnat])
               (inst -1 "delete(p!1, p!1`length - 1)" "#(last(p!1))"
                "p1!1")
               (assert)
               (hide -2 -3)
               (expand* last first "#" finseq_appl)
               (decompose-equality -1)
               (decompose-equality -2)
               (inst -1 0))))
            ("2"
             (rewrite add_last_is_o)
             (case "q1!2 = #(1 + last(p!1))")
             (("1" (propax))
              ("2"
               (replace -1 -2 rl)
               (case "first(p1!1) = last(p!1)")
               (("1"
                 (expand left_without_children)
                 (inst 7 r!1 "#(1 + last(p!1))" q1!2)
                 (assert)
                 (prop)
                 (("1" (hide-all-but -1) (expand* "#" empty_seq))
                  ("2"
                   (case "first(q1!2) = 1 + last(p!1)")
                   (("1"
                     (case "q1!2 = #(1 + last(p!1))")
                     (("1" (propax))
                      ("2"
                       (hide-all-but (-1 1 4 6 7))
                       (expand* first last "#" finseq_appl)
                       (decompose-equality 1)
                       (("1"
                         (lemma empty_0[posnat])
                         (inst -1 q1!2)
                         (assert))
                        ("2"
                         (decompose-equality 1)
                         (("1"
                           (skosimp)
                           (lemma empty_0[posnat])
                           (inst -1 q1!2)
                           (assert)
                           (prop)
                           (("1" (assert)) ("2" (assert))))
                          ("2"
                           (skosimp)
                           (lemma empty_0[posnat])
                           (inst -1 p!1)
                           (assert))))
                        ("3"
                         (skosimp)
                         (lemma empty_0[posnat])
                         (inst -1 p!1)
                         (assert))))))
                    ("2"
                     (replace -1 1 rl)
                     (replace -1 2 rl)
                     (expand first 2 1)
                     (expand finseq_appl)
                     (expand "#" 2)
                     (assert))))))
                ("2"
                 (hide-all-but (-1 -4 1 5 7))
                 (replace -1)
                 (hide -1)
                 (lemma add_last_delete[posnat])
                 (inst -1 p!1)
                 (lemma empty_0[posnat])
                 (inst -1 p!1)
                 (assert)
                 (rewrite add_last_is_o)
                 (lemma equal_prefix[posnat])
                 (inst -1 "delete(p!1, p!1`length - 1)" "#(last(p!1))"
                  "p1!1")
                 (assert)
                 (hide -2 -3)
                 (expand* last first "#" finseq_appl)
                 (decompose-equality -1)
                 (decompose-equality -2)
                 (inst -1 0)
                 (assert))))))))))))
      ("2"
       (name-replace "dp" "delete(p!1, length(p!1) - 1)" :hide? nil)
       (rewrite add_last_is_o)
       (case "child(dp, r!1)")
       (("1"
         (expand child -1)
         (skosimp)
         (replace -1 -3)
         (case "first(p1!1) = first(p1!2)")
         (("1"
           (expand left_without_children)
           (inst 6 r!1 "p1!2 o  #(1 + last(p!1))" q1!2)
           (rewrite o_assoc)
           (assert)
           (rewrite first_compo)
           (("1"
             (assert)
             (hide-all-but (1 6))
             (flatten)
             (lemma seq_empty[posnat])
             (inst -1 p1!2 "#(1 + last(p!1))")
             (assert)
             (flatten)
             (rewrite empty_0 -1))
            ("2" (hide-all-but (1 2)) (flatten) (rewrite empty_0))))
          ("2"
           (hide-all-but (-1 -2 -3 -5 1 2 4 6))
           (lemma add_last_delete[posnat])
           (inst -1 p!1)
           (lemma empty_0[posnat])
           (inst -1 p!1)
           (assert)
           (rewrite add_last_is_o)
           (replace -3)
           (replace -2 -1)
           (replace -1 -5)
           (hide-all-but (-5 2 3 5))
           (lemma equal_prefix[posnat])
           (inst -1 r!1 "p1!2 o  #(last(p!1))" p1!1)
           (rewrite o_assoc)
           (assert)
           (hide -2)
           (replace -1 1 rl)
           (rewrite first_compo)
           (hide -1 2 4)
           (flatten)
           (rewrite empty_0))
          ("3" (hide-all-but (1 2)) (flatten) (rewrite empty_0))))
        ("2"
         (lemma add_last_delete[posnat])
         (inst -1 p!1)
         (lemma empty_0[posnat])
         (inst -1 p!1)
         (assert)
         (replace -2)
         (rewrite add_last_is_o)
         (replace -1 -5)
         (lemma o_length_o[posnat])
         (inst -1 "r!1" "p1!1" "dp" "#(last(p!1))")
         (assert)
         (split)
         (("1"
           (skosimp)
           (expand child 2)
           (inst 2 seq!1)
           (assert)
           (hide-all-but (-1 2 3))
           (flatten)
           (replace -2)
           (hide -2)
           (rewrite seq_o_empty)
           (assert))
          ("2"
           (lemma o_equals_o[posnat])
           (inst -1 "r!1" "p1!1" "dp" "#(last(p!1))")
           (assert)
           (lemma o_length_o[posnat])
           (inst -1 "dp" "#(last(p!1))" "r!1" "p1!1")
           (assert)
           (skosimp)
           (replace -1 -6)
           (lemma equal_prefix[posnat])
           (inst -1 dp "#(last(p!1))" "seq!1 o p1!1")
           (rewrite o_assoc)
           (assert)
           (case "seq!1 = empty_seq")
           (("1"
             (hide-all-but (-1 -3 5))
             (replace -1)
             (hide -1)
             (rewrite seq_o_empty))
            ("2"
             (hide-all-but (-1 1 4 7 9))
             (expand* "#" o)
             (flatten)
             (hide -2)
             (lemma empty_0[posnat])
             (inst-cp -1 seq!1)
             (inst -1 p1!1)
             (assert))))))))
      ("3"
       (hide-all-but (1 2))
       (lemma empty_0[posnat])
       (inst -1 p!1)
       (assert))))
    ("2"
     (hide-all-but (1 2))
     (lemma empty_0[posnat])
     (inst -1 p!1)
     (assert))))


proof_type: f_proof
decl_type: formula
library: TRS
theory: positions
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (assert)
   (flatten)
   (name-replace "pi"
    "add_last(delete(p!1, length(p!1) - 1),
                                           1 + last(p!1))"
    :hide? nil)
   (("1"
     (expand left_without_children -2)
     (skosimp)
     (name-replace "dp" "delete(p!1, length(p!1) - 1)" :hide? nil)
     (("1"
       (rewrite add_last_is_o)
       (lemma add_last_delete[posnat])
       (inst -1 p!1)
       (lemma empty_0[posnat])
       (inst -1 p!1)
       (assert)
       (replace -2)
       (rewrite add_last_is_o)
       (case "r!1 = dp")
       (("1"
         (case "first(p1!1) = last(p!1)")
         (("1"
           (hide 4)
           (expand child 4)
           (inst 4 "rest(p1!1)")
           (prop)
           (("1"
             (lemma seq_first_rest_1[posnat])
             (inst -1 p1!1)
             (lemma empty_0[posnat])
             (inst -1 p1!1)
             (assert)
             (replace -2)
             (rewrite seq_o_empty)
             (hide-all-but (-1 -3 -4 -5 -9 5))
             (replaces -2)
             (replace -1 -3 rl)
             (hide -1)
             (replaces -1)
             (replaces -1))
            ("2"
             (replace -3 1)
             (replace -1 1 rl)
             (replace -7 1)
             (replace -2 1)
             (hide-all-but (1 4))
             (lemma seq_first_rest_1[posnat])
             (inst -1 p1!1)
             (lemma empty_0[posnat])
             (inst -1 p1!1)
             (assert)
             (hide 1 3)
             (lemma o_assoc[posnat])
             (inst -1 "dp" "#(first(p1!1))" "rest(p1!1)")
             (replace -1 1 rl)
             (hide -1)
             (replace -1 1 rl)
             (propax))))
          ("2"
           (expand left_without_children)
           (inst 5 dp p1!1 "#(last(p!1))")
           (assert)
           (prop)
           (("1" (hide-all-but -1) (expand* "#" empty_seq))
            ("2"
             (case "first(q1!2) = 1 + last(p!1)")
             (("1"
               (expand first 1 2)
               (expand finseq_appl)
               (expand "#" 1)
               (assert))
              ("2"
               (hide-all-but (-1 -4 -5 1 5))
               (replaces -1)
               (replaces -2)
               (lemma equal_prefix[posnat])
               (inst -1 dp "#(1 + last(p!1))" q1!2)
               (assert)
               (hide -2)
               (expand "#")
               (decompose-equality -1)
               (decompose-equality -2)
               (expand* first finseq_appl)
               (inst -1 0)
               (assert))))))))
        ("2"
         (case "length(r!1) < length(dp)")
         (("1"
           (replace -5 -4)
           (lemma o_length_o[posnat])
           (inst -1 r!1 q1!2 dp "#(1 + last(p!1))")
           (assert)
           (skosimp)
           (replace -1 -3)
           (expand left_without_children)
           (inst 5 r!1 p1!1 "seq!1 o  #(last(p!1))")
           (rewrite o_assoc)
           (assert)
           (prop)
           (("1"
             (hide-all-but -1)
             (expand* "#" o empty_seq)
             (flatten)
             (hide -2)
             (assert))
            ("2"
             (rewrite first_compo)
             (("1"
               (replace -1 -5)
               (lemma equal_prefix[posnat])
               (inst -1 r!1 "seq!1 o  #(1 + last(p!1))" q1!2)
               (rewrite o_assoc)
               (assert)
               (replace -1 -9 rl)
               (rewrite first_compo)
               (hide-all-but (-2 1 3))
               (flatten)
               (rewrite empty_0)
               (replaces -1)
               (rewrite seq_o_empty)
               (assert))
              ("2"
               (hide-all-but (-1 1 3))
               (flatten)
               (rewrite empty_0)
               (replaces -1)
               (rewrite seq_o_empty)
               (assert))))))
          ("2"
           (lemma o_equals_o[posnat])
           (inst -1 dp "#(1 + last(p!1))" r!1 q1!2)
           (assert)
           (hide-all-but (-3 -4 1 2 5))
           (replaces -2)
           (expand* "#" o)
           (flatten)
           (hide -2)
           (lemma empty_0[posnat])
           (inst -1 q1!2)
           (assert))))))
      ("2"
       (hide-all-but 1)
       (typepred p!1)
       (lemma empty_0[posnat])
       (inst -1 p!1)
       (assert))))
    ("2"
     (typepred p!1)
     (hide-all-but (-1 1))
     (lemma empty_0[posnat])
     (inst -1 p!1)
     (assert))))


proof_type: f_proof
decl_type: formula
library: TRS
theory: positions
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (expand positionsOF -2)
   (lift-if)
   (ground)
   (("1" (hide-all-but (-2 2)) (expand only_empty_seq) (propax))
    ("2" (hide-all-but (-2 3)) (expand only_empty_seq) (propax))
    ("3"
     (expand* union IUnion catenate only_empty_seq member finseq_appl)
     (skosimp*)
     (typepred i!2)
     (rewrite add_first_is_o)
     (case "i!2 = i!1")
     (("1"
       (case "x!1 = empty_seq")
       (("1"
         (hide-all-but (-1 -2 -6 6))
         (replaces -1)
         (replaces -1)
         (rewrite seq_o_empty))
        ("2"
         (replaces -1)
         (hide-all-but (-4 1 6))
         (expand left_pos)
         (inst 2 "#(i!1)" x!1 empty_seq)
         (assert))))
      ("2"
       (expand left_pos)
       (inst 6 empty_seq "#(i!2) o x!1" "#(i!1)")
       (flatten)
       (hide 6)
       (rewrite empty_o_seq)
       (rewrite empty_o_seq)
       (assert)
       (prop)
       (("1" (hide-all-but -1) (expand* "#" empty_seq))
        ("2"
         (rewrite first_compo)
         (("1"
           (hide-all-but (-1 -2 1 2 5))
           (expand "#" 1)
           (expand* first finseq_appl)
           (lemma positions_of_arg)
           (inst -1 "s!1" "i!1")
           (("1" (assert)) ("2" (assert))))
          ("2" (hide-all-but 1) (expand "#") (assert))))))))))


proof_type: t_proof
decl_type: tcc
library: TRS
theory: positions
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp*)
   (lemma "not_var")
   (inst -1 "first(p!1)" "p!1" "rest(p!1)" "s!1")
   (("1"
     (assert)
     (lemma "fsepn.seq_first_rest")
     (inst?)
     (assert)
     (expand "positionsOF")
     (prop)
     (("1" (expand "only_empty_seq") (rewrite "empty_0"))
      ("2"
       (expand* "union" "member")
       (prop)
       (("1" (expand "only_empty_seq") (rewrite "empty_0"))
        ("2"
         (expand "IUnion")
         (skosimp*)
         (expand "catenate")
         (skosimp*)
         (expand "member")
         (expand "finseq_appl")
         (replace -3 -2)
         (lemma "fsepn.first_equal")
         (inst?)
         (assert))))))
    ("2" (assert))))


proof_type: f_proof
decl_type: formula
library: TRS
theory: subterm
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp*)
   (skoletin* 1)
   (replaces -1)
   (lemma "pos_vars_subset_pos")
   (inst?)
   (assert)
   (lemma "positions_of_terms_finite")
   (inst?)
   (lemma "finite_sets[position].finite_subset")
   (inst?)
   (assert))


proof_type: f_proof
decl_type: formula
library: TRS
theory: subterm
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (decompose-equality)
   (expand "Vars")
   (expand "restrict")
   (iff)
   (prop)
   (("1"
     (skosimp*)
     (typepred "p!1")
     (expand "positionsOF")
     (expand* "only_empty_seq" "subtermOF")
     (lift-if)
     (rewrite "empty_0")
     (assert))
    ("2"
     (inst 1 "empty_seq")
     (("1" (expand "subtermOF") (rewrite "empty_0") (assert))
      ("2" (expand "positionsOF") (expand "only_empty_seq") (propax))))))


proof_type: f_proof
decl_type: formula
library: TRS
theory: subterm
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp*)
   (lift-if)
   (prop)
   (("1"
     (decompose-equality 1)
     (expand "restrict")
     (lemma "Vars_is_var")
     (inst?)
     (assert)
     (replaces -1)
     (expand "singleton")
     (propax))
    ("2"
     (decompose-equality 2)
     (iff)
     (prop)
     (("1"
       (expand "finseq_appl")
       (expand "IUnion")
       (expand "Vars")
       (skosimp*)
       (expand "subtermOF" -1)
       (lift-if)
       (prop)
       (("1" (typepred "x!1") (expand "V") (assert))
        ("2"
         (expand "finseq_appl")
         (inst 2 "first(p!1) - 1")
         (("1" (inst 2 "rest(p!1)"))
          ("2" (typepred "first[posnat](p!1)") (assert))))))
      ("2"
       (expand "finseq_appl")
       (expand "IUnion")
       (skosimp*)
       (expand "Vars")
       (skosimp*)
       (inst 1 "add_first(i!1 + 1, p!1)")
       (("1"
         (expand "subtermOF" 1)
         (lift-if)
         (prop)
         (("1" (hide (-2 1 2)) (grind))
          ("2"
           (expand "finseq_appl")
           (rewrite "rest_add_first")
           (rewrite "first_add")
           (assert))))
        ("2"
         (hide -1)
         (typepred "p!1")
         (expand "positionsOF" 1)
         (expand* "union" "member")
         (prop)
         (hide 1)
         (expand "IUnion")
         (expand "finseq_appl")
         (inst 1 "i!1 + 1")
         (expand "catenate")
         (expand "member")
         (inst 1 "p!1"))))))))


proof_type: f_proof
decl_type: formula
library: TRS
theory: subterm
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (induct "t")
   (("1" (skosimp*) (lemma "vars_term_is_union") (inst?) (assert))
    ("2"
     (skosimp*)
     (case "length(app2_var!1) = 0")
     (("1"
       (hide -2)
       (case-replace "Vars(app(app1_var!1, app2_var!1)) = emptyset"
        :hide? T)
       (("1" (rewrite "finite_emptyset"))
        ("2"
         (hide 2)
         (decompose-equality 1)
         (iff)
         (prop)
         (("1"
           (expand "Vars")
           (skosimp*)
           (typepred "p!1")
           (expand "positionsOF")
           (expand "only_empty_seq")
           (replaces -1)
           (expand "subtermOF")
           (rewrite "empty_0")
           (typepred "x!1")
           (expand "V")
           (assert))
          ("2" (grind))))))
      ("2"
       (lemma "vars_term_is_union")
       (inst?)
       (assert)
       (replaces -1 2)
       (expand "finseq_appl")
       (lemma "IUnion_extra[(V)].IUnion_of_finite_is_finite1")
       (inst?)
       (assert))))))


proof_type: f_proof
decl_type: formula
library: TRS
theory: subterm
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (measure-induct+ "length(p)" "p")
   (("1"
     (skeep)
     (expand "subtermOF" 1)
     (prop)
     (("1"
       (hide -2)
       (rewrite "empty_0")
       (replaces -1)
       (rewrite "empty_o_seq"))
      ("2"
       (inst -1 "rest(x!1)" "q" "args(t)(first(x!1) - 1)")
       (("1"
         (rewrite "length_rest")
         (prop)
         (hide 3)
         (expand "positionsOF" -1)
         (lift-if)
         (prop)
         (("1"
           (expand "only_empty_seq")
           (lemma "fsepn.seq_empty")
           (inst -1 "x!1" "q")
           (assert))
          ("2"
           (expand "only_empty_seq")
           (lemma "fsepn.seq_empty")
           (inst -1 "x!1" "q")
           (assert))
          ("3"
           (expand* "union" "member")
           (prop)
           (("1"
             (expand "only_empty_seq")
             (lemma "fsepn.seq_empty")
             (inst -1 "x!1" "q")
             (assert))
            ("2"
             (expand "IUnion")
             (skolem * "i1")
             (expand "catenate")
             (skolem * "y1")
             (expand "member")
             (flatten)
             (lemma "fsepn.seq_first_rest")
             (inst -1 "x!1")
             (assert)
             (replaces -1 -3)
             (lemma "fsepn.add_first_compo")
             (inst -1 "rest(x!1)" "q" "first(x!1)")
             (replaces -1 -3)
             (lemma "fsepn.first_equal")
             (inst -1 "rest(x!1) o q" "y1" "first(x!1)" "i1")
             (assert)
             (flatten)
             (assert))))))
        ("2" (assert))))))
    ("2"
     (hide (-2 -3 2))
     (lemma "pos_ax")
     (inst -1 "y!1" "q!1" "t!1")
     (assert))
    ("3" (hide 2) (lemma "pos_ax") (inst -1 "p!1" "q!1" "t!1") (assert))))


proof_type: f_proof
decl_type: formula
library: TRS
theory: subterm
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (measure-induct+ "length(p)" ("p"))
   (("1"
     (skeep)
     (lemma "fsepn.seq_first_rest")
     (inst -1 "x!1")
     (case "x!1`length /= 0")
     (("1"
       (assert)
       (name-replace "subtemp" "subtermOF(t, x!1)")
       (replace -2 1)
       (rewrite "add_first_compo")
       (expand "subtermOF" 1 1)
       (lift-if)
       (prop)
       (("1"
         (lemma "fsepn.empty_0")
         (inst -1 "add_first(first(x!1), rest(x!1) o q)")
         (assert)
         (hide-all-but (-1 -3 2))
         (lemma "fsepn.add_first_compo")
         (inst -1 "rest(x!1)" "q" "first(x!1)")
         (replace -1 -2 rl)
         (hide -1)
         (replace -2 -1 rl)
         (hide -2)
         (lemma "fsepn.seq_empty")
         (inst?)
         (assert))
        ("2"
         (case-replace
          "first(add_first(first(x!1), rest(x!1) o q)) = first(x!1)"
          :hide? t)
         (("1"
           (rewrite "fsepn.rest_add_first")
           (expand "subtemp")
           (inst -2 "rest(x!1)" "q" "args(t)(first(x!1) - 1)")
           (rewrite "length_rest")
           (prop)
           (("1"
             (replaces -1)
             (case-replace
              "subtermOF(t, x!1) = subtermOF(args(t)(first(x!1) - 1), rest(x!1))")
             (hide-all-but 1)
             (expand "subtermOF" 1 1)
             (propax))
            ("2"
             (hide (2 3))
             (expand "positionsOF" -2)
             (lift-if)
             (prop)
             (("1"
               (expand "only_empty_seq")
               (hide (-1 -3 1))
               (lemma "fsepn.seq_empty")
               (inst?)
               (assert))
              ("2"
               (hide (-1 -3 1 2))
               (expand "only_empty_seq")
               (lemma "fsepn.seq_empty")
               (inst?)
               (assert))
              ("3"
               (expand* "union" "member")
               (prop)
               (("1"
                 (hide (-2 1 2 3))
                 (expand "only_empty_seq")
                 (lemma "fsepn.seq_empty")
                 (inst?)
                 (assert))
                ("2"
                 (expand "IUnion")
                 (skolem * "i1")
                 (expand "catenate")
                 (skolem * "y1")
                 (expand "member")
                 (flatten)
                 (replace -3 -2)
                 (rewrite "fsepn.add_first_compo")
                 (hide (-3 1 2))
                 (lemma "fsepn.first_equal")
                 (inst -1 "rest(x!1) o q" "y1" "first(x!1)" "i1")
                 (assert)
                 (flatten)
                 (assert))))))))
          ("2" (hide-all-but (1 4)) (rewrite "first_add"))))))
      ("2"
       (prop)
       (("1"
         (hide-all-but (-2 1))
         (expand "subtermOF" 1 3)
         (lift-if)
         (prop)
         (hide -2)
         (rewrite "empty_0")
         (replaces -1)
         (rewrite "empty_o_seq"))
        ("2"
         (hide-all-but (-1 1))
         (expand "subtermOF" 1 3)
         (lift-if)
         (prop)
         (hide -2)
         (rewrite "empty_0")
         (replaces -1)
         (rewrite "empty_o_seq"))))))
    ("2" (hide-all-but (-1 1)) (lemma "pos_subterm_ax") (inst?) (assert))
    ("3" (hide-all-but (-1 1)) (lemma "pos_ax") (inst?) (assert))
    ("4" (hide 2) (lemma "pos_subterm_ax") (inst?) (assert))
    ("5" (hide 2) (lemma "pos_ax") (inst?) (assert))))


proof_type: f_proof
decl_type: formula
library: TRS
theory: subterm
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (measure-induct+ "length(p)" "p")
   (skeep)
   (expand "positionsOF" -2)
   (lift-if)
   (prop)
   (("1"
     (expand "only_empty_seq")
     (hide -3)
     (replaces -2)
     (expand "subtermOF")
     (rewrite "empty_0")
     (rewrite "empty_o_seq"))
    ("2"
     (hide -3)
     (expand "only_empty_seq")
     (replaces -2)
     (expand "subtermOF")
     (rewrite "fsepn.empty_0")
     (rewrite "empty_o_seq"))
    ("3"
     (expand* "union" "member")
     (prop)
     (("1"
       (expand "only_empty_seq")
       (hide -2)
       (replaces -1)
       (expand "subtermOF")
       (rewrite "empty_0")
       (rewrite "empty_o_seq"))
      ("2"
       (expand "IUnion")
       (skosimp*)
       (expand "catenate")
       (skosimp*)
       (expand "member")
       (expand "positionsOF" 3)
       (lift-if)
       (prop)
       (expand* "union" "member")
       (prop)
       (expand "IUnion")
       (inst 3 "i!1")
       (expand "catenate")
       (case "x!1`length /= 0")
       (("1"
         (inst 3 "rest(x!1) o q")
         (expand "member")
         (inst -4 "rest(x!1)")
         (inst -4 "q" "args(t)(i!1 - 1)")
         (lemma "fsepn.rest_add_first")
         (inst -1 "x!2" "first(x!1)")
         (rewrite "length_rest")
         (replace -4 -1)
         (rewrite "first_add")
         (replace -4 -1 rl)
         (replace -1 * rl)
         (lemma "fsepn.add_first_compo")
         (inst -1 "rest(x!1)" "q" "first(x!1)")
         (case-replace "first(x!1) = i!1")
         (("1"
           (replace -6 * rl)
           (replace -2 * rl)
           (expand "subtermOF" -8)
           (replace -1)
           (assert))
          ("2"
           (hide-all-but (-3 -5 1))
           (replaces -2)
           (rewrite "first_add"))))
        ("2" (hide-all-but (-2 1)) (grind))))))))


proof_type: f_proof
decl_type: formula
library: TRS
theory: subterm
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp*)
   (lemma "pos_subterm_ax")
   (inst -1 "delete(p!1, length(p!1) - 1)" "#(last(p!1))" "s!1")
   (("1"
     (prop)
     (("1"
       (lemma "fsepn.add_first_empty_seq")
       (inst -1 "last(p!1)")
       (lemma "not_var")
       (inst -1 "last(p!1)" "#(last(p!1))" "empty_seq"
        "subtermOF(s!1, delete(p!1, length(p!1) - 1))")
       (("1" (assert))
        ("2" (hide (-1 -2 -3 3)) (typepred "length(p!1)") (assert))))
      ("2"
       (lemma "fsepn.add_last_delete_is_o")
       (inst?)
       (assert)
       (lemma "fsepn.add_last_delete")
       (inst?)
       (assert)
       (replace -1 -2 rl)
       (expand "finseq_appl")
       (expand "last" 1)
       (assert))))
    ("2" (assert)) ("3" (hide (-1 3)) (typepred "length(p!1)") (assert))))


proof_type: f_proof
decl_type: formula
library: TRS
theory: subterm
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (expand* "subset?" "member")
   (skeep)
   (expand "Vars")
   (expand "restrict")
   (skosimp*)
   (typepred "p!1")
   (inst 1 "p o p!1")
   (("1" (rewrite "pos_subterm") (rewrite "pos_o_term"))
    ("2" (rewrite "pos_o_term"))))


proof_type: f_proof
decl_type: formula
library: TRS
theory: subterm
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (lemma "vars_subterm")
   (inst?)
   (assert)
   (lemma "IUnion_extra[(V)].disjoint_subset")
   (hide -3)
   (inst -1 "Vars(subtermOF(t, p))" "Vars(t)" "Vars(s)" "Vars(s)")
   (assert)
   (hide-all-but 1)
   (expand* "subset?" "member")
   (skeep))


proof_type: f_proof
decl_type: formula
library: TRS
theory: subterm
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (induct "t")
   (("1"
     (skeep)
     (skolem-typepred)
     (flatten)
     (expand "V")
     (expand "positionsOF")
     (expand "only_empty_seq")
     (replaces -3)
     (replaces -3)
     (expand "subtermOF")
     (rewrite "empty_0")
     (assert))
    ("2"
     (skeep)
     (skolem-typepred)
     (flatten)
     (expand "V")
     (expand "positionsOF")
     (prop)
     (("1"
       (expand "only_empty_seq")
       (replaces -2)
       (replaces -3)
       (hide-all-but (-6 -7 1))
       (expand "subtermOF")
       (rewrite "empty_0")
       (assert))
      ("2"
       (expand* "union" "member")
       (prop)
       (("1"
         (expand "only_empty_seq")
         (replaces -1)
         (replaces -1)
         (hide-all-but (-4 -5 3))
         (expand "subtermOF")
         (rewrite "empty_0")
         (assert))
        ("2"
         (hide (-1 -5))
         (expand "only_empty_seq")
         (expand* "parallel" "<=")
         (prop)
         (("1"
           (skosimp*)
           (replaces -1)
           (lemma "fsepn.seq_empty")
           (inst?)
           (assert)
           (flatten)
           (rewrite "empty_0"))
          ("2"
           (hide -1)
           (replaces -1)
           (expand "subtermOF" -4)
           (rewrite "empty_0")
           (assert))))
        ("3"
         (hide (-2 -5))
         (expand "only_empty_seq")
         (replaces -1)
         (expand "subtermOF" -3)
         (rewrite "empty_0")
         (assert))
        ("4"
         (expand "IUnion")
         (skosimp*)
         (expand "catenate")
         (skosimp*)
         (expand "member")
         (expand "finseq_appl")
         (expand "subtermOF" (-8 -9))
         (lift-if)
         (prop)
         (("1" (hide-all-but (-1 -8)) (grind))
          ("2" (hide-all-but (-2 -5)) (grind))
          ("3" (hide-all-but (-1 -7)) (grind))
          ("4"
           (expand "finseq_appl")
           (lemma "fsepn.first_add")
           (copy -1)
           (inst -1 "x!2" "i!1")
           (inst -2 "x!3" "i!2")
           (lemma "fsepn.rest_add_first")
           (copy -1)
           (inst -1 "x!2" "i!1")
           (inst -2 "x!3" "i!2")
           (replace -8 (-1 -3) rl)
           (replace -10 (-2 -4) rl)
           (replaces -1)
           (replaces -1)
           (replaces -1)
           (replaces -1)
           (case-replace "i!2 = i!1")
           (("1"
             (inst -10 "i!1 - 1")
             (inst -10 "x!1" "y!1" "x!2" "x!3")
             (assert)
             (hide-all-but (-1 -5 -7 -10 6))
             (expand* "parallel" "<=")
             (prop)
             (("1"
               (skosimp*)
               (replaces -3)
               (replaces -3)
               (rewrite "add_first_compo")
               (lemma "fsepn.first_equal")
               (inst?)
               (assert)
               (inst 1 "p1!1"))
              ("2"
               (skosimp*)
               (replaces -3)
               (replaces -3)
               (rewrite "add_first_compo")
               (lemma "fsepn.first_equal")
               (inst?)
               (assert)
               (inst 2 "p1!1"))))
            ("2"
             (hide-all-but (-4 -6 1 7))
             (expand* "parallel" "<=")
             (prop)
             (("1"
               (skosimp*)
               (replaces -1)
               (replaces -1)
               (rewrite "add_first_compo")
               (lemma "fsepn.first_equal")
               (inst?)
               (assert))
              ("2"
               (skosimp*)
               (replaces -1)
               (replaces -2)
               (rewrite "add_first_compo")
               (lemma "fsepn.first_equal")
               (inst?)
               (assert))))))))))))))


proof_type: f_proof
decl_type: formula
library: TRS
theory: subterm
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp*)
   (skoletin 1)
   (flatten)
   (replaces -3)
   (expand* "member" "Pos_var" "parallel" "<=")
   (expand "extend")
   (prop)
   (("1"
     (skosimp*)
     (replace -1 -3)
     (rewrite "pos_subterm")
     (replace -2 -3)
     (typepred "q!1")
     (replace -2 -1)
     (lemma "pos_subterm_ax")
     (inst?)
     (assert)
     (replace -4 -1)
     (hide-all-but (-1 -3 1))
     (typepred "x!1")
     (expand "V")
     (expand "positionsOF")
     (assert)
     (expand "only_empty_seq")
     (replaces -2)
     (rewrite "seq_o_empty")
     (assert))
    ("2"
     (skosimp*)
     (replace -1 -2)
     (rewrite "pos_subterm")
     (replace -3 -2)
     (typepred "p!1")
     (replace -2 -1)
     (lemma "pos_subterm_ax")
     (inst?)
     (assert)
     (replace -5 -1)
     (hide-all-but (-1 -3 1))
     (typepred "x!1")
     (expand "V")
     (expand "positionsOF")
     (assert)
     (expand "only_empty_seq")
     (replaces -2)
     (rewrite "seq_o_empty"))))


proof_type: f_proof
decl_type: formula
library: TRS
theory: subterm
signature: nil
run_date: Unknown date
run_time: ----
status: proved-incomplete
description: nil
script:
  (""
   (skosimp*)
   (skoletin* 1)
   (expand "PP?")
   (prop)
   (skosimp*)
   (lemma "variable_positions")
   (expand "finseq_appl")
   (inst -1 "t!1" "x!1" "seqv`seq(i!1)" "seqv`seq(j!1)")
   (("1"
     (assert)
     (prop)
     (("1"
       (lemma "set2seq_neq[position]")
       (inst -1 "Posv")
       (assert)
       (inst -1 "i!1" "j!1")
       (("1" (grind))
        ("2"
         (typepred "j!1")
         (replace -3)
         (rewrite "set2seq_length[position]"))
        ("3"
         (typepred "i!1")
         (replaces -3)
         (rewrite "set2seq_length[position]"))))
      ("2"
       (lemma "set2seq_lem[position]")
       (inst -1 "Posv")
       (assert)
       (inst -1 "i!1")
       (("1" (expand "finseq_appl") (expand "member") (hide 4) (assert))
        ("2"
         (typepred "i!1")
         (replaces -2)
         (rewrite "set2seq_length[position]"))))
      ("3"
       (lemma "set2seq_lem[position]")
       (inst -1 "Posv")
       (assert)
       (inst -1 "j!1")
       (("1" (expand "finseq_appl") (expand "member") (hide 4) (assert))
        ("2"
         (typepred "j!1")
         (replaces -2)
         (rewrite "set2seq_length[position]"))))))
    ("2"
     (lemma "set2seq_lem[position]")
     (inst -1 "Posv")
     (assert)
     (inst -1 "j!1")
     (("1"
       (replaces -3)
       (expand "finseq_appl")
       (expand "Pos_var" -1 1)
       (expand "extend" -1 1)
       (propax))
      ("2"
       (typepred "j!1")
       (replaces -2)
       (rewrite "set2seq_length[position]"))))
    ("3"
     (lemma "set2seq_lem[position]")
     (inst -1 "Posv")
     (assert)
     (inst -1 "i!1")
     (("1"
       (expand "finseq_appl")
       (replaces -3)
       (expand "Pos_var" -1 1)
       (expand "extend" -1 1)
       (propax))
      ("2"
       (typepred "i!1")
       (replaces -2)
       (rewrite "set2seq_length[position]"))))))


proof_type: f_proof
decl_type: formula
library: TRS
theory: subterm
signature: nil
run_date: Unknown date
run_time: ----
status: proved-incomplete
description: nil
script:
  (""
   (skosimp*)
   (skoletin* 1)
   (expand "SP?")
   (skosimp*)
   (expand "finseq_appl")
   (lemma "set2seq_lem[position]")
   (inst -1 "Posv")
   (assert)
   (inst -1 "i!1")
   (("1"
     (expand "finseq_appl")
     (replaces -3)
     (expand "Pos_var" -1 1)
     (expand "extend" -1 1)
     (propax))
    ("2"
     (typepred "i!1")
     (replaces -2)
     (rewrite "set2seq_length[position]"))))


proof_type: f_proof
decl_type: formula
library: TRS
theory: subterm
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp*)
   (skoletin* 1)
   (flatten)
   (replaces -)
   (expand "Pos_var")
   (expand "extend")
   (propax))


proof_type: f_proof
decl_type: formula
library: TRS
theory: subterm
signature: nil
run_date: Unknown date
run_time: ----
status: proved-incomplete
description: nil
script:
  (""
   (skosimp*)
   (skoletin* 1)
   (("1"
     (lemma "no_empty_set_positions")
     (inst?)
     (assert)
     (case "card(Posv) > 0")
     (("1" (lemma "fspos.set2seq_length") (inst?) (grind))
      ("2"
       (lemma "finite_sets[position].nonempty_card")
       (inst?)
       (prop)
       (hide (1 3))
       (expand "nonempty?")
       (grind))))
    ("2"
     (skosimp*)
     (replaces -1)
     (replaces -1)
     (lemma "Pos_var_is_finite")
     (inst?)
     (assert))))


proof_type: f_proof
decl_type: formula
library: TRS
theory: subterm
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (prop)
   (("1"
     (inst -1 empty_seq)
     (("1" (expand subtermOF) (rewrite empty_0))
      ("2"
       (hide 2)
       (split)
       (("1"
         (expand positionsOF)
         (lift-if)
         (expand* only_empty_seq union member))
        ("2"
         (expand positionsOF)
         (lift-if)
         (expand* only_empty_seq union member))))))
    ("2" (skosimp) (assert))))


proof_type: f_proof
decl_type: formula
library: TRS
theory: subterm
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (replace -1 1)
   (expand "subtermOF")
   (lift-if)
   (lift-if)
   (prop)
   (("1"
     (expand "finseq_appl")
     (rewrite "first_add")
     (rewrite "rest_add_first")
     (rewrite "empty_0" -2)
     (replace -2 2)
     (grind))
    ("2" (expand "finseq_appl") (expand "#") (grind))
    ("3"
     (expand "finseq_appl")
     (rewrite "first_add")
     (rewrite "rest_add_first")
     (rewrite "empty_0" -1)
     (replace -1 2)
     (grind))
    ("4"
     (expand "finseq_appl")
     (expand "rest")
     (assert)
     (expand "first")
     (expand "finseq_appl")
     (assert)
     (grind))
    ("5"
     (expand "finseq_appl")
     (rewrite "first_add")
     (rewrite "rest_add_first")
     (assert)
     (grind))
    ("6" (expand "finseq_appl") (grind))
    ("7"
     (expand "finseq_appl")
     (rewrite "first_add")
     (rewrite "rest_add_first")
     (grind))))


proof_type: f_proof
decl_type: formula
library: TRS
theory: subterm
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (induct "t")
   (("1"
     (skeep)
     (skeep)
     (inst 1 "empty_seq")
     (("1"
       (expand "subtermOF")
       (rewrite "empty_0")
       (expand "subterm")
       (assert))
      ("2"
       (hide -1)
       (expand "positionsOF")
       (expand "only_empty_seq")
       (propax))))
    ("2"
     (skosimp*)
     (expand "subterm" -2)
     (split)
     (("1"
       (inst 1 "empty_seq")
       (("1" (expand "subtermOF" 1) (rewrite "empty_0") (assert))
        ("2" (hide -) (grind))))
      ("2"
       (skosimp)
       (inst -2 "z!1")
       (inst -2 "s!1")
       (assert)
       (skosimp)
       (case "seq(app2_var!1)(z!1) =
                                                subtermOF(app(app1_var!1, app2_var!1), #(z!1 + 1))")
       (("1"
         (replace -1 -3)
         (name-replace "t!1" "app(app1_var!1, app2_var!1)")
         (lemma "subt_of_subt_is_subt_of_term")
         (inst 1 "add_first( z!1 + 1, p!1)")
         (("1"
           (inst?)
           (("1"
             (name-replace "x!1" "add_first(z!1 + 1, p!1)")
             (inst -1 "x!1")
             (assert))
            ("2"
             (hide-all-but 1)
             (typepred "z!1")
             (typepred "t!1")
             (reveal -5)
             (lemma "positions_of_arg")
             (inst -1 "t!1" "z!1")
             (("1" (assert)) ("2" (replace -1 1 rl) (assert))))))
          ("2"
           (hide -1)
           (expand "positionsOF")
           (expand "union")
           (flatten)
           (hide 1)
           (expand "IUnion")
           (expand "member")
           (inst?)
           (assert)
           (expand "catenate")
           (inst?)
           (typepred "p!1")
           (expand "member")
           (expand "finseq_appl")
           (propax))))
        ("2"
         (hide-all-but 1)
         (expand "subtermOF")
         (lift-if)
         (prop)
         (("1" (hide 1) (grind))
          ("2"
           (hide 1)
           (expand "finseq_appl")
           (expand "first")
           (expand "rest")
           (grind))))
        ("3"
         (hide-all-but 1)
         (typepred "z!1")
         (lemma "positions_of_arg")
         (inst -1 "app(app1_var!1, app2_var!1)" "z!1")
         (assert))))))))


proof_type: f_proof
decl_type: formula
library: TRS
theory: subterm
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (induct "t")
   (("1"
     (skosimp*)
     (expand "subtermOF")
     (expand "subterm")
     (lift-if)
     (prop)
     (("1" (assert))
      ("2"
       (hide -1 2)
       (typepred "p!1")
       (expand "positionsOF")
       (expand "only_empty_seq")
       (rewrite "empty_0"))))
    ("2"
     (skosimp)
     (skosimp)
     (expand "subtermOF" -2)
     (lift-if)
     (prop)
     (("1" (replace -2 1) (expand "subterm") (propax))
      ("2"
       (expand "finseq_appl")
       (inst -2 "first(p!1) -1" "s!1" "rest(p!1)")
       (("1"
         (assert)
         (expand "subterm" 2)
         (flatten)
         (inst 3 "first(p!1) - 1"))
        ("2"
         (hide -1 3)
         (typepred "p!1")
         (expand* "first" "finseq_appl")
         (expand "positionsOF")
         (prop)
         (("1" (hide -1 1) (expand "only_empty_seq") (rewrite "empty_0"))
          ("2"
           (expand "union")
           (prop)
           (("1"
             (hide 1 2)
             (rewrite "empty_0")
             (expand* "member" "only_empty_seq"))
            ("2"
             (hide 1 3)
             (expand "member")
             (expand "IUnion")
             (skeep -1)
             (expand "catenate")
             (skeep -1)
             (hide -1)
             (replace -1 1)
             (assert))))))))))))


proof_type: f_proof
decl_type: formula
library: TRS
theory: subterm
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (induct "t")
   (("1"
     (skosimp*)
     (expand "subterm")
     (prop)
     (("1" (assert)) ("2" (skosimp) (assert))))
    ("2"
     (skosimp*)
     (expand "subterm" -3)
     (prop)
     (("1"
       (inst -2 "empty_seq" "s!1" "r!1")
       (("1" (assert)) ("2" (assert)) ("3" (assert))))
      ("2"
       (skosimp)
       (inst -2 "z!1" "s!1" "r!1")
       (assert)
       (expand "subterm" 1)
       (flatten)
       (inst 2 "z!1"))))))


proof_type: f_proof
decl_type: formula
library: TRS
theory: subterm
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp*)
   (typepred "q!1")
   (expand "set_of_seq_pos" -1)
   (expand "IUnion")
   (skosimp*)
   (expand "singleton")
   (inst 2 "i!1"))


proof_type: f_proof
decl_type: formula
library: TRS
theory: subterm
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (induct n)
   (("1" (skeep) (expand comp_of_pos) (assert) (rewrite empty_0))
    ("2"
     (skeep)
     (skeep)
     (inst -1 p)
     (expand comp_of_pos 1)
     (expand o 1)
     (assert))))


proof_type: f_proof
decl_type: formula
library: TRS
theory: subterm
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (lemma length_comp_p)
   (copy -1)
   (inst?)
   (inst -2 m p)
   (assert)
   (replace -3 -1)
   (replace -1 -2)
   (lemma empty_0[posnat])
   (inst -1 p)
   (hide -2 -4)
   (assert)
   (rewrite both_sides_times1))


proof_type: f_proof
decl_type: formula
library: TRS
theory: subterm
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (expand "injective?")
   (skeep 2)
   (expand "function_inj")
   (lemma "length_comp_p")
   (copy -1)
   (inst -1 "x1" "p")
   (inst -2 "x2" "p")
   (replace -3 -1)
   (replaces -1 -2)
   (rewrite "both_sides_times1")
   (hide-all-but (1 2))
   (prop)
   (rewrite "empty_0"))


proof_type: f_proof
decl_type: formula
library: TRS
theory: subterm
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (lemma "infinite_def[position]")
   (inst?)
   (assert)
   (inst 1 "function_inj(p)")
   (prop)
   (("1"
     (hide -1)
     (skeep)
     (expand "set_of_seq_pos")
     (expand "IUnion")
     (expand "function_inj")
     (inst 1 "x1")
     (expand "singleton")
     (propax))
    ("2" (hide -1) (lemma "is_injective_function_inj") (inst?) (assert))))


proof_type: f_proof
decl_type: formula
library: TRS
theory: subterm
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (induct "n")
   (("1"
     (skosimp*)
     (expand "comp_of_pos")
     (hide (-1 -2))
     (expand "positionsOF")
     (lift-if)
     (prop)
     (("1" (expand "only_empty_seq") (propax))
      ("2" (expand "only_empty_seq") (propax))
      ("3" (expand* "union" "member" "only_empty_seq"))))
    ("2"
     (skosimp*)
     (expand "comp_of_pos" 1)
     (inst -1 "p!1" "s!1")
     (assert)
     (replace -3 -1 rl)
     (rewrite "pos_o_term"))))


proof_type: f_proof
decl_type: formula
library: TRS
theory: subterm
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp*)
   (expand "subset?")
   (skosimp*)
   (expand "member")
   (expand "set_of_seq_pos")
   (expand "IUnion")
   (skosimp*)
   (expand "singleton")
   (lemma "comp_of_pos_is_pos")
   (inst -1 "p!1" "s!1" "i!1")
   (assert))


proof_type: f_proof
decl_type: formula
library: TRS
theory: subterm
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (case "p /= empty_seq")
   (("1"
     (hide 1)
     (case "subset?(set_of_seq_pos(p), positionsOF(s))")
     (("1"
       (lemma infinite_set_of_seq_pos)
       (inst?)
       (assert)
       (lemma finite_subset[position])
       (inst?)
       (("1" (assert))
        ("2" (hide-all-but 1) (rewrite positions_of_terms_finite))))
      ("2" (rewrite subset_of_seq_pos))))
    ("2" (assert))))


proof_type: f_proof
decl_type: formula
library: TRS
theory: subterm
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (expand child)
   (skosimp*)
   (lemma seq_first_rest[posnat])
   (inst -1 p1!1)
   (lemma empty_0[posnat])
   (inst -1 p1!1)
   (assert)
   (lemma pos_subterm_ax)
   (inst -1 q!1 p1!1 s!1)
   (assert)
   (lemma not_var)
   (inst -1 "first(p1!1)" "p1!1" "rest(p1!1)" "subtermOF(s!1, q!1)")
   (assert))


proof_type: f_proof
decl_type: formula
library: TRS
theory: subterm
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (measure-induct+ "length(q)" ("q"))
   (skosimp)
   (case "x!1 = empty_seq")
   (("1"
     (hide-all-but (-1 3 4))
     (replaces -1)
     (expand child)
     (inst 1 p!1)
     (rewrite empty_o_seq)
     (flatten)
     (replaces -1)
     (inst 1 empty_seq)
     (rewrite empty_o_seq)
     (rewrite subterm_empty_seq)
     (expand positionsOF)
     (lift-if)
     (expand* only_empty_seq union member))
    ("2"
     (inst -1 "delete(x!1, length(x!1) - 1)")
     (("1"
       (inst -1 t!1 p!1)
       (case "length(delete(x!1, length(x!1) - 1)) < length(x!1)")
       (("1"
         (assert)
         (hide -1)
         (rewrite delete_is_position)
         (prop)
         (("1"
           (hide-all-but (-1 -2 1 2))
           (name-replace "dp" "delete(x!1, length(x!1) - 1)" :hide? nil)
           (lemma add_last_delete[posnat])
           (inst -1 x!1)
           (assert)
           (replace -2)
           (rewrite add_last_is_o)
           (expand "left_without_children")
           (skosimp)
           (replace -3 -1)
           (inst 4 r!1 p1!1 "q1!1 o  #(last(x!1))")
           (rewrite o_assoc)
           (rewrite first_compo)
           (("1"
             (assert)
             (hide-all-but 4)
             (expand* "#" o empty_seq)
             (flatten)
             (hide -2)
             (assert))
            ("2" (hide-all-but (1 2)) (flatten) (rewrite empty_0))))
          ("2"
           (hide-all-but (-1 1 3))
           (name-replace "dp" "delete(x!1, length(x!1) - 1)" :hide? nil)
           (lemma add_last_delete[posnat])
           (inst -1 x!1)
           (assert)
           (replace -2)
           (rewrite add_last_is_o)
           (expand "left_without_children")
           (skosimp)
           (replace -4 -1)
           (inst 4 r!1 "p1!1 o  #(last(x!1))" q1!1)
           (rewrite o_assoc)
           (rewrite first_compo)
           (("1"
             (assert)
             (hide-all-but 4)
             (expand* "#" o empty_seq)
             (flatten)
             (hide -2)
             (assert))
            ("2" (hide-all-but (1 3)) (flatten) (rewrite empty_0))))
          ("3"
           (name-replace "dp" "delete(x!1, length(x!1) - 1)" :hide? nil)
           (expand child -2)
           (skosimp)
           (lemma add_last_delete[posnat])
           (inst -1 x!1)
           (assert)
           (replace -2)
           (rewrite add_last_is_o)
           (case "last(x!1) < first(p1!1)")
           (("1"
             (hide 3 5 6)
             (expand "left_without_children")
             (inst 3 dp "#(last(x!1))" p1!1)
             (assert)
             (split)
             (("1" (hide-all-but 1) (expand* "#" empty_seq))
              ("2"
               (expand first 1 1)
               (expand finseq_appl)
               (expand "#" 1)
               (propax))))
            ("2"
             (case "last(x!1) > first(p1!1)")
             (("1"
               (hide 5 6 7)
               (expand "left_without_children")
               (inst 4 dp p1!1 "#(last(x!1))")
               (assert)
               (split)
               (("1" (hide-all-but 1) (expand* "#" empty_seq))
                ("2"
                 (expand first 1 2)
                 (expand finseq_appl)
                 (expand "#" 1)
                 (assert))))
              ("2"
               (case "p1!1 = #(last(x!1))")
               (("1"
                 (hide 5 6 7)
                 (inst 5 empty_seq)
                 (rewrite seq_o_empty)
                 (assert)
                 (hide-all-but 5)
                 (expand positionsOF)
                 (lift-if)
                 (expand* only_empty_seq union member))
                ("2"
                 (hide 6 7 9)
                 (case "last(x!1) = first(p1!1)")
                 (("1"
                   (lemma seq_first_rest_1[posnat])
                   (inst -1 p1!1)
                   (lemma empty_0[posnat])
                   (inst -1 p1!1)
                   (assert)
                   (replace -1 -5)
                   (rewrite o_assoc)
                   (replace -2 -5 rl)
                   (replace -3 -5 rl)
                   (expand child)
                   (inst 7 "rest(p1!1)")
                   (assert)
                   (hide-all-but (-1 -2 2 7))
                   (flatten)
                   (replaces -3)
                   (rewrite seq_o_empty)
                   (assert))
                  ("2" (hide-all-but (1 3 4)) (assert))))))))
            ("3" (hide-all-but (1 2)) (flatten) (rewrite empty_0))))
          ("4"
           (hide 2 3 4)
           (skosimp)
           (lemma add_last_delete[posnat])
           (inst -1 x!1)
           (assert)
           (replace -3)
           (rewrite add_last_is_o)
           (inst 2 "q1!1 o  #(last(x!1))")
           (rewrite o_assoc)
           (assert)
           (lemma pos_subterm_ax)
           (inst -1 "p!1" "q1!1 o  #(last(x!1))" "t!1")
           (assert)
           (rewrite o_assoc)
           (assert))))
        ("2"
         (hide-all-but (1 2))
         (expand delete)
         (rewrite empty_0)
         (assert))
        ("3"
         (hide-all-but (1 2))
         (lemma empty_0[posnat])
         (inst -1 x!1)
         (assert))))
      ("2"
       (hide-all-but (1 2))
       (lemma empty_0[posnat])
       (inst -1 x!1)
       (assert))))))


proof_type: f_proof
decl_type: formula
library: TRS
theory: subterm
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (case "s!1 = app(f(s!1), args(s!1))")
   (("1"
     (case "t!1 = app(f(t!1), args(t!1))")
     (("1" (replace -1 1) (replace -2 1) (decompose-equality 1))
      ("2" (decompose-equality 1))))
    ("2" (decompose-equality 1))))


proof_type: f_proof
decl_type: formula
library: TRS
theory: subterm
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (induct s)
   (("1"
     (skosimp*)
     (typepred p!1)
     (hide-all-but (-1 1))
     (expand positionsOF)
     (expand only_empty_seq)
     (propax))
    ("2"
     (skosimp*)
     (name-replace "s!1" "app(app1_var!1, app2_var!1)" :hide? nil)
     (case "app?(t!1)")
     (("1"
       (lemma equal_app_term)
       (inst -1 s!1 t!1)
       (assert)
       (prop)
       (("1"
         (hide-all-but (-6 1 2))
         (inst -1 empty_seq)
         (("1"
           (rewrite subterm_empty_seq)
           (rewrite subterm_empty_seq)
           (assert)
           (hide 1)
           (expand child)
           (inst 1 p!1)
           (rewrite empty_o_seq)
           (assert))
          ("2"
           (hide 2 3)
           (split)
           (("1"
             (expand positionsOF)
             (expand* only_empty_seq union member))
            ("2"
             (expand positionsOF)
             (expand* only_empty_seq union member))))))
        ("2"
         (decompose-equality 1)
         (("1"
           (hide-all-but (-2 -6 1 2))
           (inst -2 empty_seq)
           (("1"
             (rewrite subterm_empty_seq)
             (rewrite subterm_empty_seq)
             (assert)
             (hide 1)
             (expand child)
             (inst 1 p!1)
             (assert)
             (rewrite empty_o_seq))
            ("2"
             (hide 2 3)
             (replaces -1)
             (split)
             (("1" (expand* positionsOF only_empty_seq union member))
              ("2" (expand* positionsOF only_empty_seq union member))))))
          ("2"
           (decompose-equality 1)
           (lemma positions_of_arg)
           (inst-cp -1 s!1 x!1)
           (inst -1 t!1 x!1)
           (case "subtermOF(s!1, #(x!1 + 1)) = args(s!1)`seq(x!1)")
           (("1"
             (case "subtermOF(t!1, #(x!1 + 1)) = args(t!1)`seq(x!1)")
             (("1"
               (replace -1 1 rl)
               (replace -2 1 rl)
               (case "left_without_children(p!1, #(x!1 + 1))")
               (("1"
                 (hide-all-but (-1 -4 -5 -6 -7 -9 1))
                 (inst -6 "#(x!1 + 1)")
                 (("1" (assert)) ("2" (replace -5) (assert))))
                ("2"
                 (case "left_without_children( #(x!1 + 1), p!1)")
                 (("1"
                   (hide-all-but (-1 -4 -5 -6 -7 -10 2))
                   (inst -6 "#(x!1 + 1)")
                   (("1" (assert)) ("2" (replace -5) (assert))))
                  ("2"
                   (case "EXISTS(q1 : position) : positionsOF(subtermOF(s!1, p!1))(q1)
                                                                                                             AND #(x!1 + 1) = p!1 o q1")
                   (("1"
                     (hide -8 -9 -10 -11)
                     (skosimp)
                     (case "q1!1 = empty_seq")
                     (("1" (replaces -1) (rewrite seq_o_empty) (assert))
                      ("2"
                       (hide-all-but (-2 1 5))
                       (expand* "#" o)
                       (flatten)
                       (hide -2)
                       (lemma empty_0[posnat])
                       (inst-cp -1 q1!1)
                       (inst -1 p!1)
                       (assert))))
                    ("2"
                     (case "child(p!1, #(x!1 + 1))")
                     (("1"
                       (inst -8 x!1)
                       (("1"
                         (expand child -1)
                         (skosimp)
                         (inst -8 "subtermOF(t!1,  #(x!1 + 1))" p1!1)
                         (("1"
                           (assert)
                           (split)
                           (("1"
                             (hide-all-but (-1 -3 -4 -7 -8 5))
                             (case "subtermOF(s!1,  #(1 + x!1)) = app2_var!1`seq(x!1)")
                             (("1" (assert))
                              ("2"
                               (hide-all-but (-3 -5 1))
                               (replaces -1)
                               (decompose-equality -1)
                               (assert))))
                            ("2"
                             (skosimp)
                             (case "subtermOF(s!1,  #(1 + x!1)) = app2_var!1`seq(x!1)")
                             (("1"
                               (replace -1 1 rl)
                               (inst -10 "#(1 + x!1) o q!1")
                               (("1"
                                 (split)
                                 (("1"
                                   (hide-all-but (-1 -2 1))
                                   (typepred q!1)
                                   (replace -4 -1 rl)
                                   (hide -4)
                                   (rewrite pos_subterm)
                                   (("1"
                                     (rewrite pos_subterm)
                                     (hide -1 -3 2)
                                     (rewrite pos_o_term))
                                    ("2"
                                     (hide -2 -3 2)
                                     (rewrite pos_o_term))))
                                  ("2"
                                   (hide-all-but (-2 -3 1 3 8))
                                   (expand left_without_children)
                                   (skosimp)
                                   (inst
                                    1
                                    "#(1 + x!1) o r!1"
                                    "p1!2"
                                    "q1!1")
                                   (assert)
                                   (replace -2 -4)
                                   (rewrite o_assoc)
                                   (assert)
                                   (hide-all-but (-1 1))
                                   (lemma o_assoc[posnat])
                                   (inst -1 "#(1 + x!1)" "r!1" "q1!1")
                                   (assert))))
                                ("2"
                                 (replace -9)
                                 (hide-all-but (-5 -6 -7 -9 1))
                                 (typepred q!1)
                                 (case
                                  "app2_var!1`seq(x!1) = subtermOF(s!1,  #(1 + x!1))")
                                 (("1"
                                   (replaces -1)
                                   (hide -3 -6)
                                   (rewrite pos_o_term)
                                   (rewrite pos_o_term))
                                  ("2"
                                   (hide-all-but (-3 -6 1))
                                   (replaces -1)
                                   (decompose-equality -1)
                                   (assert))))))
                              ("2"
                               (hide-all-but (-4 -8 1))
                               (replaces -1)
                               (decompose-equality -1)
                               (assert))))
                            ("3"
                             (skosimp)
                             (case "app2_var!1`seq(x!1) = subtermOF(s!1,  #(1 + x!1))")
                             (("1"
                               (replace -1 1)
                               (inst -11 "#(1 + x!1) o q!1")
                               (("1"
                                 (split)
                                 (("1"
                                   (typepred q!1)
                                   (hide-all-but (-1 -2 -3 -4 -9 -10 1))
                                   (replaces -4)
                                   (rewrite pos_subterm)
                                   (("1"
                                     (rewrite pos_subterm)
                                     (hide -3 2)
                                     (rewrite pos_o_term))
                                    ("2"
                                     (hide -3 2)
                                     (rewrite pos_o_term))))
                                  ("2"
                                   (hide-all-but (-2 -3 1 3 8))
                                   (expand left_without_children)
                                   (skosimp)
                                   (replace -1 -4)
                                   (rewrite o_assoc)
                                   (inst
                                    1
                                    "#(1 + x!1) o r!1"
                                    "p1!2"
                                    "q1!1")
                                   (assert)
                                   (hide-all-but (-2 1))
                                   (lemma o_assoc[posnat])
                                   (inst -1 "#(1 + x!1)" "r!1" "p1!2")
                                   (assert))))
                                ("2"
                                 (replace -9)
                                 (typepred q!1)
                                 (replace -3)
                                 (hide-all-but (-1 -2 -8 -9 1))
                                 (rewrite pos_o_term)
                                 (rewrite pos_o_term))))
                              ("2"
                               (hide-all-but (-4 -8 1))
                               (replaces -1)
                               (decompose-equality -1)
                               (assert))))
                            ("4"
                             (skosimp)
                             (case "app2_var!1`seq(x!1) = subtermOF(s!1,  #(1 + x!1))")
                             (("1"
                               (replace -1)
                               (inst -12 "#(1 + x!1) o p1!2")
                               (("1"
                                 (split)
                                 (("1"
                                   (typepred p1!2)
                                   (hide-all-but (-1 -2 -3 -4 -9 -10 1))
                                   (replaces -4)
                                   (rewrite pos_subterm)
                                   (("1"
                                     (rewrite pos_subterm)
                                     (hide -3 2)
                                     (rewrite pos_o_term))
                                    ("2"
                                     (hide -3 2)
                                     (rewrite pos_o_term))))
                                  ("2"
                                   (hide-all-but (-2 -3 1 3 8))
                                   (expand child)
                                   (skosimp)
                                   (inst 1 p1!3)
                                   (replace -1 -2)
                                   (rewrite o_assoc)
                                   (assert))))
                                ("2"
                                 (replace -9)
                                 (typepred p1!2)
                                 (hide-all-but (-1 -2 -3 -8 -9 1))
                                 (replaces -3)
                                 (rewrite pos_o_term)
                                 (rewrite pos_o_term))))
                              ("2"
                               (hide-all-but (-4 -8 1))
                               (replaces -1)
                               (decompose-equality -1)
                               (assert))))
                            ("5"
                             (case "app2_var!1`seq(x!1) = subtermOF(s!1,  #(1 + x!1))")
                             (("1"
                               (replace -1)
                               (hide-all-but (-2 -12 1))
                               (replace -1)
                               (rewrite pos_subterm)
                               (rewrite pos_subterm))
                              ("2"
                               (hide-all-but (-3 -7 1))
                               (replaces -1)
                               (decompose-equality -1)
                               (assert))))))
                          ("2"
                           (case "app2_var!1`seq(x!1) = subtermOF(s!1,  #(x!1 + 1))")
                           (("1"
                             (replace -1)
                             (hide-all-but (-2 1))
                             (rewrite pos_subterm_ax)
                             (rewrite pos_subterm_ax))
                            ("2"
                             (hide-all-but (-3 -7 1))
                             (replaces -1)
                             (decompose-equality -1)
                             (assert))
                            ("3"
                             (typepred x!1)
                             (hide-all-but (-1 -8 1))
                             (decompose-equality -2)
                             (hide -1)
                             (assert))))))
                        ("2"
                         (typepred x!1)
                         (hide-all-but (-1 -8 1))
                         (decompose-equality -2)
                         (hide -1)
                         (assert))))
                      ("2"
                       (hide-all-but (-4 1 2 3 4))
                       (lemma positions_of_a_term)
                       (inst -1 "#(x!1 + 1)" s!1 p!1)
                       (assert))))))))))
              ("2"
               (hide-all-but 1)
               (expand subtermOF)
               (lift-if)
               (prop)
               (("1" (expand "#") (assert))
                ("2"
                 (expand finseq_appl)
                 (case "rest( #(1 + x!1)) = empty_seq")
                 (("1"
                   (replaces -1)
                   (rewrite subterm_empty_seq)
                   (expand* first finseq_appl)
                   (expand "#" 2)
                   (propax))
                  ("2"
                   (hide 2 3)
                   (lemma length_rest_0[posnat])
                   (inst -1 "#(1 + x!1)")
                   (expand "#" -1 3)
                   (flatten)
                   (rewrite empty_0 -1))))))
              ("3" (hide-all-but (-2 1)) (assert))))
            ("2"
             (hide-all-but 1)
             (expand subtermOF)
             (lift-if)
             (prop)
             (("1" (expand "#") (assert))
              ("2"
               (expand finseq_appl)
               (case "rest( #(1 + x!1)) = empty_seq")
               (("1"
                 (replaces -1)
                 (rewrite subterm_empty_seq)
                 (expand* first finseq_appl)
                 (expand "#" 2)
                 (propax))
                ("2"
                 (hide 2 3)
                 (lemma length_rest_0[posnat])
                 (inst -1 "#(1 + x!1)")
                 (expand "#" -1 3)
                 (flatten)
                 (rewrite empty_0 -1))))))
            ("3" (hide-all-but (-2 1)) (assert))))))))
      ("2"
       (typepred p!1)
       (hide-all-but (-2 1 2))
       (expand positionsOF)
       (assert)
       (expand only_empty_seq)
       (propax))))
    ("3"
     (hide 2)
     (skosimp*)
     (hide -1 -2)
     (lemma app_term)
     (inst -1 p!1 p1!1 t!1)
     (assert))
    ("4"
     (hide 2)
     (skosimp*)
     (hide -1 -2)
     (lemma app_term)
     (inst -1 p!1 p1!1 s!2)
     (assert))))


proof_type: t_proof
decl_type: tcc
library: TRS
theory: subterm
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp*)
   (typepred "p!1")
   (expand "positionsOF")
   (assert)
   (expand "only_empty_seq")
   (rewrite "empty_0"))


proof_type: t_proof
decl_type: tcc
library: TRS
theory: subterm
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp*)
   (typepred "p!1")
   (expand "positionsOF" -1)
   (lift-if)
   (prop)
   (("1" (expand "only_empty_seq") (rewrite "empty_0"))
    ("2" (expand "only_empty_seq") (rewrite "empty_0"))
    ("3"
     (expand* "union" "member")
     (prop)
     (("1" (expand "only_empty_seq") (rewrite "empty_0"))
      ("2"
       (expand "IUnion")
       (skolem * "i1")
       (expand "catenate")
       (skolem * "y1")
       (expand "member")
       (flatten)
       (replace -3 -1 rl)
       (typepred "i1")
       (lemma "fsepn.first_equal")
       (inst -1 "q!1" "y1" "i!1" "i1")
       (prop)
       (("1" (assert))
        ("2"
         (lemma "fsepn.seq_first_rest")
         (inst -1 "p!1")
         (assert))))))))


proof_type: t_proof
decl_type: tcc
library: TRS
theory: subterm
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp*)
   (lemma "closed_positions")
   (inst -1 "p!1" "p!1 o q!1" "t!1")
   (assert)
   (expand "<=")
   (inst 1 "q!1"))


proof_type: f_proof
decl_type: formula
library: TRS
theory: replacement
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (measure-induct+ "length(p)" "p")
   (skeep)
   (name-replace "rp" "replaceTerm(s, t, x!1)" :hide? nil)
   (expand "replaceTerm" -1)
   (lift-if)
   (prop)
   (("1"
     (hide -3)
     (expand "positionsOF" 1)
     (lift-if)
     (prop)
     (("1" (expand "only_empty_seq") (rewrite "empty_0"))
      ("2" (expand "only_empty_seq") (rewrite "empty_0"))
      ("3"
       (expand* "union" "member")
       (prop)
       (expand "only_empty_seq")
       (rewrite "empty_0"))))
    ("2"
     (copy -1)
     (decompose-equality -1)
     (hide (-1 -2))
     (expand "positionsOF" 2)
     (lift-if)
     (prop)
     (("1" (assert))
      ("2"
       (expand "replace" -2)
       (lift-if)
       (prop)
       (("1"
         (hide-all-but (-1 -6 1 2))
         (expand "positionsOF")
         (lift-if)
         (prop))
        ("2"
         (decompose-equality -1)
         (hide (-2 -4))
         (expand "positionsOF" -4)
         (lift-if)
         (prop)
         (assert))))
      ("3"
       (expand* "union" "member")
       (prop)
       (expand "only_empty_seq")
       (expand "finseq_appl")
       (inst -3 "rest(x!1)")
       (inst -3 "args(s)(first(x!1) - 1)" "t")
       (("1"
         (prop)
         (("1"
           (hide -3)
           (expand "IUnion")
           (inst 3 "first(x!1)")
           (("1"
             (expand "catenate")
             (inst 3 "rest(x!1)")
             (prop)
             (("1"
               (expand "member")
               (replace -2 1 rl)
               (hide -2)
               (lemma "fset.nth_x")
               (inst -1 "args(s)"
                "replaceTerm(args(s)(first(x!1) - 1), t, rest(x!1))"
                "first(x!1) - 1")
               (("1" (expand "finseq_appl") (assert)) ("2" (assert))))
              ("2"
               (hide-all-but (1 5))
               (lemma "fsepn.seq_first_rest")
               (inst?)
               (assert))))
            ("2"
             (hide -1)
             (expand "replace")
             (lift-if)
             (prop)
             (("1"
               (expand "positionsOF")
               (lift-if)
               (prop)
               (("1" (expand "only_empty_seq") (propax))
                ("2" (expand "only_empty_seq") (propax))))
              ("2"
               (decompose-equality)
               (hide -2)
               (replace -1 2 rl)
               (hide -1)
               (expand "positionsOF")
               (lift-if)
               (prop)
               (("1" (expand "only_empty_seq") (propax))
                ("2"
                 (expand "only_empty_seq")
                 (expand* "union" "member")
                 (prop)
                 (expand "IUnion")
                 (skolem * "i1")
                 (expand "catenate")
                 (skolem * "y1")
                 (expand "member")
                 (flatten)
                 (hide -1)
                 (typepred "i1")
                 (lemma "fsepn.first_equal")
                 (inst -1 "rest(x!1)" "y1" "first(x!1)" "i1")
                 (assert)
                 (hide-all-but (-3 1 7))
                 (lemma "fsepn.seq_first_rest")
                 (inst -1 "x!1")
                 (assert))))))))
          ("2"
           (hide-all-but (-3 1 3))
           (expand "positionsOF" -1)
           (lift-if)
           (prop)
           (("1" (expand "only_empty_seq") (propax))
            ("2" (expand "only_empty_seq") (propax))
            ("3"
             (expand* "union" "member")
             (prop)
             (("1" (expand "only_empty_seq") (propax))
              ("2"
               (expand "IUnion")
               (skolem * "i1")
               (expand "catenate")
               (skolem * "y1")
               (expand "member")
               (flatten)
               (lemma "fsepn.first_equal")
               (inst -1 "rest(x!1)" "y1" "first(x!1)" "i1")
               (prop)
               (("1" (assert))
                ("2"
                 (hide-all-but (-2 1 5))
                 (lemma "fsepn.seq_first_rest")
                 (inst -1 "x!1")
                 (assert)
                 (prop)
                 (rewrite "empty_0"))))))))
          ("3" (hide-all-but (1 6)) (rewrite "length_rest"))))
        ("2" (assert))))))))


proof_type: f_proof
decl_type: formula
library: TRS
theory: replacement
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (measure-induct+ "length(p)" "p")
   (skeep)
   (expand "positionsOF" -3)
   (lift-if)
   (prop)
   (("1"
     (hide -3)
     (expand "only_empty_seq")
     (lemma "fsepn.empty_0")
     (inst -1 "x!1")
     (assert)
     (expand "replaceTerm")
     (replaces -5)
     (replaces -3)
     (rewrite "empty_o_seq"))
    ("2"
     (hide -3)
     (expand "only_empty_seq")
     (lemma "fsepn.empty_0")
     (inst -1 "x!1")
     (assert)
     (expand "replaceTerm")
     (replaces -5)
     (replaces -3)
     (rewrite "empty_o_seq"))
    ("3"
     (expand* "union" "member")
     (prop)
     (("1"
       (hide -2)
       (expand "only_empty_seq")
       (lemma "fsepn.empty_0")
       (inst -1 "x!1")
       (assert)
       (expand "replaceTerm")
       (replaces -5)
       (replaces -4)
       (replaces -2)
       (rewrite "empty_o_seq"))
      ("2"
       (name-replace "rp" "replaceTerm(s, t, x!1)" :hide? nil)
       (expand "replaceTerm" -1)
       (lift-if)
       (prop)
       (("1"
         (hide (-3 -4))
         (rewrite "empty_0")
         (replaces -1)
         (replaces -1)
         (rewrite "empty_o_seq"))
        ("2"
         (expand "IUnion")
         (skolem * "i1")
         (expand "catenate")
         (skolem * "y1")
         (expand "member")
         (flatten)
         (inst -4 "rest(x!1)")
         (inst -4 "q" "args(s)(first(x!1) - 1)" "t")
         (("1"
           (rewrite "length_rest")
           (assert)
           (lemma "fsepn.seq_first_rest")
           (inst?)
           (assert)
           (replace -1 -4)
           (lemma "fsepn.first_equal")
           (inst -1 "rest(x!1)" "y1" "first(x!1)" "i1")
           (assert)
           (flatten)
           (hide -6)
           (replace -1 * rl)
           (replace -2 * rl)
           (hide (-1 -2))
           (decompose-equality -2)
           (hide -1)
           (copy -1)
           (expand "replace" -1)
           (decompose-equality -1)
           (hide -2)
           (expand "positionsOF" 4)
           (prop)
           (("1" (assert))
            ("2"
             (hide -2)
             (expand* "union" "member")
             (prop)
             (expand "IUnion")
             (inst 3 "first(x!1)")
             (("1"
               (expand "catenate")
               (inst 3 "rest(x!1) o q")
               (prop)
               (("1"
                 (expand "member")
                 (replace -2 * rl)
                 (lemma "fset.nth_x")
                 (inst -1 "args(s)"
                  "replaceTerm(args(s)(first(x!1) - 1), t, rest(x!1))"
                  "first(x!1) - 1")
                 (assert))
                ("2"
                 (hide-all-but (1 4))
                 (lemma "fsepn.add_first_compo")
                 (inst?)
                 (assert))))
              ("2"
               (reveal -1)
               (replace -1 1 rl)
               (hide -1)
               (reveal -4)
               (typepred "i1")
               (assert))))))
          ("2" (assert))))))))))


proof_type: f_proof
decl_type: formula
library: TRS
theory: replacement
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (measure-induct+ "length(q)" "q")
   (skeep)
   (name-replace "rp" "replaceTerm(s, t, p)" :hide? nil)
   (case "first(x!1)=first(p)")
   (("1"
     (expand "positionsOF" 1)
     (lift-if)
     (prop)
     (("1"
       (lemma "replace_preserv_pos")
       (inst?)
       (assert)
       (replaces -4)
       (hide-all-but (-1 -2 -7))
       (expand "positionsOF")
       (expand "only_empty_seq")
       (expand "parallel")
       (expand "<=")
       (prop)
       (replaces -1)
       (inst 1 "x!1")
       (rewrite "empty_o_seq"))
      ("2"
       (lemma "replace_preserv_pos")
       (inst?)
       (assert)
       (replaces -4)
       (hide-all-but (-1 -2 -7))
       (expand "positionsOF")
       (expand "only_empty_seq")
       (expand "parallel")
       (expand "<=")
       (prop)
       (replaces -1)
       (inst 1 "x!1")
       (rewrite "empty_o_seq"))
      ("3"
       (expand* "union" "member" "only_empty_seq")
       (prop)
       (expand "IUnion")
       (inst 3 "first(p)")
       (("1"
         (expand "catenate")
         (inst 3 "rest(x!1)")
         (expand "member")
         (prop)
         (("1"
           (expand "finseq_appl")
           (expand "replaceTerm" -2)
           (lift-if)
           (prop)
           (("1"
             (hide-all-but (-1 -7))
             (expand* "parallel" "<=")
             (prop)
             (rewrite "empty_0")
             (replaces -1)
             (inst 1 "x!1")
             (rewrite "empty_o_seq"))
            ("2"
             (decompose-equality -1)
             (replace -3 2 rl)
             (lemma "fset.nth_x")
             (name-replace "RT"
              "replaceTerm(args(s)(first(p) - 1), t, rest(p))")
             (("1"
               (inst -1 "args(s)" "RT" "first(p) - 1")
               (("1"
                 (expand "finseq_appl")
                 (replaces -1)
                 (expand "RT")
                 (inst -5 "rest(x!1)")
                 (inst -5 "rest(p)" "args(s)(first(p) - 1)" "t")
                 (("1"
                   (rewrite "length_rest")
                   (("1"
                     (lemma "rest_of_positions")
                     (inst -1 "x!1" "s")
                     (lemma "rest_of_positions")
                     (inst -1 "p" "s")
                     (prop)
                     (("1" (expand "finseq_appl") (replaces -6))
                      ("2"
                       (rewrite "rest_parallel")
                       (hide-all-but (1 6))
                       (prop)
                       (rewrite "empty_0"))
                      ("3" (hide-all-but (-1 5)) (rewrite "empty_0"))
                      ("4" (hide-all-but (-1 5)) (rewrite "empty_0"))))
                    ("2"
                     (hide-all-but (1 5))
                     (prop)
                     (rewrite "empty_0"))))
                  ("2" (assert))))
                ("2" (assert))))
              ("2" (assert))))))
          ("2"
           (replace -1 1 rl)
           (hide-all-but (1 3))
           (rewrite "seq_first_rest")
           (prop)
           (rewrite "empty_0"))))
        ("2"
         (replace -1 1 rl)
         (typepred "args(rp)")
         (decompose-equality -3)
         (prop)
         (expand "replaceTerm" -3)
         (lift-if)
         (prop)
         (("1"
           (hide-all-but (-1 -11))
           (expand* "parallel" "<=")
           (prop)
           (rewrite "empty_0")
           (replaces -1)
           (inst 1 "x!1")
           (rewrite "empty_o_seq"))
          ("2"
           (hide-all-but (-1 -6 -8 2 4))
           (expand "positionsOF")
           (lift-if)
           (prop)
           (("1" (expand "only_empty_seq") (propax))
            ("2" (expand "only_empty_seq") (propax))
            ("3"
             (expand* "union" "member" "only_empty_seq")
             (prop)
             (expand "IUnion")
             (skolem * "j")
             (expand "catenate")
             (skolem * "y")
             (expand "member")
             (flatten)
             (typepred "j")
             (hide -3)
             (lemma "fsepn.seq_first_rest")
             (inst -1 "x!1")
             (prop)
             (("1"
               (replaces -1 -4)
               (lemma "fsepn.first_equal")
               (inst -1 "rest(x!1)" "y" "first(x!1)" "j")
               (assert))
              ("2" (rewrite "empty_0"))))))))))))
    ("2"
     (expand "parallel")
     (expand "<=")
     (prop)
     (expand "positionsOF" (-3 4))
     (lift-if)
     (prop)
     (("1"
       (hide-all-but (-2 6))
       (expand "only_empty_seq")
       (replaces -1)
       (inst 1 "p")
       (rewrite "empty_o_seq"))
      ("2"
       (hide-all-but (-2 7))
       (expand "only_empty_seq")
       (replaces -1)
       (inst 1 "p")
       (rewrite "empty_o_seq"))
      ("3"
       (lemma "replace_preserv_pos")
       (inst?)
       (assert)
       (replaces -4)
       (hide-all-but (-1 -2 5))
       (expand "positionsOF")
       (expand "only_empty_seq")
       (replaces -1)
       (inst 1 "x!1")
       (rewrite "empty_o_seq"))
      ("4"
       (lemma "replace_preserv_pos")
       (inst?)
       (assert)
       (hide-all-but (-1 -2 6))
       (expand "positionsOF")
       (expand "only_empty_seq")
       (replaces -1)
       (inst 1 "x!1")
       (rewrite "empty_o_seq"))
      ("5"
       (expand* "union" "member" "only_empty_seq")
       (prop)
       (expand "IUnion")
       (skolem * "i1")
       (inst 3 "i1")
       (("1"
         (expand "catenate")
         (skolem * "y")
         (inst 3 "y")
         (expand "member")
         (prop)
         (case-replace "args(rp)(i1 - 1) = args(s)(i1 - 1)")
         (hide (-4 2))
         (expand "replaceTerm")
         (lift-if)
         (prop)
         (("1"
           (hide-all-but (-1 8))
           (rewrite "empty_0")
           (replaces -1)
           (inst 1 "x!1")
           (rewrite "empty_o_seq"))
          ("2"
           (decompose-equality -1)
           (expand "finseq_appl")
           (replace -3 2 rl)
           (expand "replace")
           (lift-if)
           (prop)
           (("1" (expand "finseq_appl") (propax))
            ("2"
             (hide-all-but (-1 -6 5 9))
             (lemma "fsepn.seq_first_rest")
             (inst -1 "x!1")
             (prop)
             (("1"
               (replaces -1 -3)
               (lemma "fsepn.first_equal")
               (inst -1 "rest(x!1)" "y" "first(x!1)" "i1")
               (assert))
              ("2" (rewrite "empty_0"))))
            ("3" (expand "finseq_appl") (propax))))))
        ("2"
         (typepred "args(rp)")
         (decompose-equality -3)
         (prop)
         (expand "replaceTerm" -3)
         (lift-if)
         (prop)
         (("1"
           (hide-all-but (-1 8))
           (rewrite "empty_0")
           (replaces -1)
           (inst 1 "x!1")
           (rewrite "empty_o_seq"))
          ("2" (assert))))))))
    ("3"
     (hide-all-but (-5 1))
     (expand "parallel")
     (expand "<=")
     (prop)
     (rewrite "empty_0")
     (replaces -1)
     (inst 1 "x!1")
     (rewrite "empty_o_seq"))
    ("4"
     (hide-all-but (-5 1))
     (expand "parallel")
     (expand "<=")
     (prop)
     (rewrite "empty_0")
     (replaces -1)
     (inst 2 "p")
     (rewrite "empty_o_seq"))))


proof_type: f_proof
decl_type: formula
library: TRS
theory: replacement
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (induct "s")
   (("1"
     (skeep)
     (skeep)
     (expand "positionsOF" (-1 1))
     (expand "only_empty_seq")
     (expand "replaceTerm")
     (rewrite "empty_0")
     (assert)
     (expand "positionsOF")
     (lift-if)
     (prop)
     (("1" (expand "only_empty_seq") (propax))
      ("2" (expand "only_empty_seq") (propax))
      ("3"
       (expand* "union" "member")
       (prop)
       (("1" (expand "only_empty_seq") (propax))
        ("2"
         (expand "IUnion")
         (skosimp*)
         (expand "catenate")
         (skosimp*)
         (expand "member")
         (expand "finseq_appl")
         (expand* "parallel" "<=")
         (flatten)
         (inst 3 "add_first(i!1, x!1)")
         (replaces -3)
         (hide-all-but (-2 3))
         (rewrite "empty_o_seq"))))))
    ("2"
     (skeep)
     (skeep)
     (expand "positionsOF" 1)
     (prop)
     (("1"
       (hide -2)
       (expand "positionsOF" -2)
       (assert)
       (expand "only_empty_seq")
       (expand "replaceTerm")
       (rewrite "empty_0")
       (assert)
       (expand "positionsOF")
       (lift-if)
       (prop)
       (("1" (expand "only_empty_seq") (propax))
        ("2" (expand "only_empty_seq") (propax))
        ("3"
         (expand* "union" "member")
         (expand "IUnion")
         (skosimp*)
         (expand "catenate")
         (skosimp*)
         (expand "member")
         (expand "finseq_appl")
         (expand* "parallel" "<=")
         (flatten)
         (inst 4 "add_first(i!1, x!1)")
         (replaces -4)
         (hide-all-but (-2 4))
         (rewrite "empty_o_seq"))))
      ("2"
       (expand* "union" "member")
       (flatten)
       (expand "IUnion")
       (expand "finseq_appl")
       (expand "positionsOF" -3)
       (lift-if)
       (prop)
       (expand* "union" "member")
       (assert)
       (expand "IUnion")
       (skosimp*)
       (expand "catenate")
       (skosimp*)
       (expand "member")
       (expand "finseq_appl")
       (expand "positionsOF" -4)
       (expand* "union" "member")
       (prop)
       (("1"
         (expand* "parallel" "<=")
         (flatten)
         (hide-all-but (-1 -3 6))
         (expand "only_empty_seq")
         (inst 1 "add_first(i!1, x!1)")
         (replaces -1)
         (rewrite "empty_o_seq"))
        ("2"
         (expand "IUnion")
         (skosimp*)
         (expand "catenate")
         (skosimp*)
         (expand "member")
         (expand "finseq_appl")
         (case-replace "i!1 = i!2")
         (("1"
           (inst -6 "i!2 - 1")
           (inst -6 "x!2" "x!1" "t")
           (assert)
           (prop)
           (("1" (inst 5 "i!2") (inst 5 "x!1") (assert))
            ("2"
             (hide 6)
             (expand "replaceTerm" -4)
             (expand "finseq_appl")
             (prop)
             (("1" (hide-all-but (-1 -5)) (grind))
              ("2"
               (expand "replace")
               (lemma "fsepn.first_add")
               (inst -1 "x!2" "i!2")
               (replace -5 -1 rl)
               (assert)
               (lemma "fsepn.rest_add_first")
               (inst -1 "x!2" "i!2")
               (replace -6 -1 rl)
               (replaces -1)
               (replaces -1))))
            ("3"
             (lemma "rest_parallel")
             (inst -1 "p" "q")
             (hide-all-but (-1 -4 -6 -7 1 5))
             (lemma "fsepn.first_add")
             (copy -1)
             (inst -1 "x!2" "i!2")
             (inst -2 "x!1" "i!2")
             (lemma "fsepn.rest_add_first")
             (copy -1)
             (inst -1 "x!2" "i!2")
             (inst -2 "x!1" "i!2")
             (replace -6 (-1 -3) rl)
             (replace -7 (-2 -4) rl)
             (assert)
             (prop)
             (("1"
               (hide-all-but (-1 -7 -8))
               (expand* "parallel" "<=")
               (flatten)
               (rewrite "empty_0")
               (inst 1 "add_first(i!2, x!1)")
               (replaces -1)
               (rewrite "empty_o_seq"))
              ("2"
               (rewrite "empty_0")
               (expand "only_empty_seq")
               (propax))))))
          ("2"
           (hide -5)
           (inst 6 "i!1")
           (("1"
             (inst 6 "x!1")
             (assert)
             (case-replace
              "args(replaceTerm(app(app1_var, app2_var), t, p))`seq(i!1 - 1) = app2_var`seq(i!1 - 1)")
             (hide (-3 7))
             (expand "replaceTerm" 1)
             (lift-if)
             (prop)
             (("1"
               (hide-all-but (-1 -4 -5))
               (expand* "parallel" "<=")
               (flatten)
               (rewrite "empty_0")
               (inst 1 "add_first(i!1, x!1)")
               (replaces -1)
               (rewrite "empty_o_seq"))
              ("2"
               (lemma "fsepn.first_add")
               (inst -1 "x!2" "i!2")
               (lemma "fsepn.rest_add_first")
               (inst -1 "x!2" "i!2")
               (replace -4 (-1 -2) rl)
               (replaces -1)
               (replaces -1)
               (expand "replace")
               (expand "finseq_appl")
               (propax))))
            ("2"
             (typepred "i!1")
             (hide (-3 -5))
             (expand "replaceTerm" -2)
             (lift-if)
             (rewrite "empty_0")
             (prop)
             (("1"
               (hide-all-but (-1 -5 -6))
               (expand* "parallel" "<=")
               (flatten)
               (inst 1 "add_first(i!1, x!1)")
               (replaces -1)
               (rewrite "empty_o_seq"))
              ("2" (expand "replace") (propax))))))))))))))


proof_type: f_proof
decl_type: formula
library: TRS
theory: replacement
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (measure-induct+ "length(p)" "p")
   (("1"
     (skeep)
     (expand "subtermOF" 1)
     (lift-if)
     (prop)
     (("1" (expand "replaceTerm" 1) (assert))
      ("2"
       (expand "replaceTerm" 2)
       (lift-if)
       (prop)
       (lemma "fset.nth_x")
       (inst -1 "args(s)"
        "replaceTerm(args(s)(first(x!1) - 1), t, rest(x!1))"
        "first(x!1) - 1")
       (("1"
         (replaces -1)
         (inst -1 "rest(x!1)")
         (inst -1 "args(s)(first(x!1) - 1)" "t")
         (("1"
           (prop)
           (("1"
             (hide (2 3))
             (expand "positionsOF" -1)
             (lift-if)
             (prop)
             (("1" (expand "only_empty_seq") (rewrite "empty_0"))
              ("2" (expand "only_empty_seq") (rewrite "empty_0"))
              ("3"
               (expand* "union" "member")
               (prop)
               (("1" (expand "only_empty_seq") (rewrite "empty_0"))
                ("2"
                 (expand "IUnion")
                 (skolem * "i1")
                 (expand "catenate")
                 (skolem * "y1")
                 (flatten)
                 (expand "member")
                 (lemma "fsepn.seq_first_rest")
                 (inst -1 "x!1")
                 (assert)
                 (replaces -1 -3)
                 (lemma "fsepn.first_equal")
                 (inst -1 "rest(x!1)" "y1" "first(x!1)" "i1")
                 (assert)
                 (flatten)
                 (assert))))))
            ("2" (rewrite "length_rest"))))
          ("2" (assert))))
        ("2" (assert))))))
    ("2"
     (hide (-2 -3 2))
     (lemma "replace_preserv_pos")
     (inst -1 "y!1" "s!1" "t!1")
     (assert))
    ("3"
     (hide 2)
     (lemma "replace_preserv_pos")
     (inst -1 "p!1" "s!1" "t!1")
     (assert))))


proof_type: f_proof
decl_type: formula
library: TRS
theory: replacement
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (measure-induct+ "length(p)" "p")
   (skeep)
   (expand "replaceTerm" 1)
   (lift-if)
   (prop)
   (("1" (expand "subtermOF" 1) (assert))
    ("2"
     (decompose-equality 2)
     (expand "subtermOF" 1)
     (inst -1 "rest(x!1)")
     (inst -1 "args(s)(first(x!1) - 1)")
     (lemma "fsepn.length_rest")
     (inst?)
     (lemma "rest_of_positions")
     (inst?)
     (assert)
     (replace -3 1)
     (lemma "fset.replace_nth")
     (inst?))))


proof_type: f_proof
decl_type: formula
library: TRS
theory: replacement
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (lemma "pos_subterm")
   (inst -1 "p" "q" "replaceTerm(s, t, p)")
   (prop)
   (("1" (lemma "subterm_of_replace") (inst -1 "p" "s" "t") (assert))
    ("2"
     (hide 2)
     (lemma "replace_compose_pos")
     (inst -1 "p" "q" "s" "t")
     (assert))))


proof_type: f_proof
decl_type: formula
library: TRS
theory: replacement
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (measure-induct+ "length(p)" "p")
   (("1"
     (skeep)
     (case "length(x!1) = 0")
     (("1"
       (hide (-2 -3 -4))
       (lemma "fsepn.empty_0")
       (inst?)
       (assert)
       (expand "replaceTerm" 1 (2 3))
       (replaces -1)
       (rewrite "empty_o_seq"))
      ("2"
       (expand "replaceTerm" 2 1)
       (lift-if)
       (prop)
       (("1"
         (hide-all-but (-1 2))
         (rewrite "empty_0" -1)
         (lemma "fsepn.seq_empty")
         (inst?)
         (assert))
        ("2"
         (rewrite "first_compo")
         (rewrite "rest_compo")
         (expand "replaceTerm" 2 5)
         (lift-if)
         (prop)
         (decompose-equality 2)
         (("1" (expand "replaceTerm" 1) (propax))
          ("2"
           (expand "replaceTerm" 1 2)
           (lemma "fset.nth_x")
           (name-replace "Rtns"
            "replaceTerm(args(s)(first(x!1) - 1), t, rest(x!1))")
           (inst -1 "args(s)" "Rtns" "first(x!1) - 1")
           (replaces -1)
           (inst -1 "rest(x!1)")
           (inst -1 "q" "r" "args(s)(first(x!1) - 1)" "t")
           (rewrite "length_rest")
           (prop)
           (("1"
             (expand "Rtns")
             (replaces -1)
             (name-replace "RTR"
              "replaceTerm(args(s)(first(x!1) - 1), replaceTerm(t, r, q), rest(x!1))")
             (expand "replaceTerm" 1)
             (lemma "fset.replace_n2")
             (inst -1 "args(s)" "RTR"
              "replaceTerm(args(s)(first(x!1) - 1), t, rest(x!1))")
             (prop)
             (("1" (inst -1 "first(x!1) - 1"))
              ("2"
               (hide-all-but (-1 -2 2))
               (expand "positionsOF")
               (lift-if)
               (assert)
               (expand "only_empty_seq")
               (rewrite "empty_0"))))
            ("2" (rewrite "rest_of_positions"))))))))))
    ("2" (hide (-3 -4 2)) (lemma "replace_compose_pos") (inst?) (assert))
    ("3" (lemma "replace_compose_pos") (inst?) (assert))))


proof_type: f_proof
decl_type: formula
library: TRS
theory: replacement
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (measure-induct+ "length(p)" "p")
   (("1"
     (skeep)
     (expand "subtermOF" 1)
     (lift-if)
     (prop)
     (("1" (rewrite "empty_0") (replace -1 1) (rewrite "empty_o_seq"))
      ("2"
       (expand "replaceTerm" 2 1)
       (lift-if)
       (prop)
       (("1"
         (hide-all-but (-1 2))
         (rewrite "empty_0")
         (lemma "fsepn.seq_empty")
         (inst?)
         (assert))
        ("2"
         (lemma "fsepn.first_compo")
         (inst?)
         (assert)
         (replaces -1)
         (lemma "fsepn.rest_compo")
         (inst?)
         (assert)
         (replaces -1)
         (name-replace "RT"
          "replaceTerm(args(s)(first(x!1) - 1), t, rest(x!1) o q)")
         (lemma "fset.nth_x")
         (inst -1 "args(s)" "RT" "first(x!1) - 1")
         (replaces -1)
         (expand "RT")
         (inst -1 "rest(x!1)")
         (inst -1 "q" "args(s)(first(x!1) - 1)" "t")
         (prop)
         (("1"
           (lemma "fsepn.rest_compo")
           (inst -1 "x!1" "q")
           (prop)
           (replace -1 1 rl)
           (hide (-1 3 4))
           (lemma "rest_of_positions")
           (inst -1 "x!1 o q" "s")
           (assert))
          ("2" (hide-all-but (1 4)) (rewrite "length_rest"))))))))
    ("2" (hide-all-but (-1 1)) (rewrite "pos_subterm_ax"))
    ("3" (hide-all-but (-1 1)) (lemma "pos_ax") (inst?) (assert))
    ("4"
     (hide-all-but (-1 1))
     (lemma "replace_preserv_pos")
     (inst -1 "y!1 o q!1" "s!1" "t!1")
     (assert)
     (lemma "pos_ax")
     (inst -1 "y!1" "q!1" "replaceTerm(s!1, t!1, y!1 o q!1)")
     (assert))
    ("5" (lemma "pos_subterm_ax") (inst -1 "p!1" "q!1" "s!1") (assert))
    ("6" (lemma "pos_ax") (inst -1 "p!1" "q!1" "s!1") (assert))
    ("7"
     (hide 2)
     (lemma "replace_preserv_pos")
     (inst -1 "p!1 o q!1" "s!1" "t!1")
     (assert)
     (lemma "pos_ax")
     (inst -1 "p!1" "q!1" "replaceTerm(s!1, t!1, p!1 o q!1)")
     (assert))))


proof_type: f_proof
decl_type: formula
library: TRS
theory: replacement
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (measure-induct+ "length(p)" "p")
   (("1"
     (skeep)
     (expand "replaceTerm" 1)
     (lift-if)
     (prop)
     (("1"
       (hide-all-but (-1 2))
       (rewrite "empty_0")
       (lemma "fsepn.seq_empty")
       (inst?)
       (assert))
      ("2"
       (decompose-equality 2)
       (lemma "fsepn.first_compo")
       (inst?)
       (assert)
       (replace -1 1)
       (lemma "fsepn.rest_compo")
       (inst?)
       (assert)
       (replace -1 1)
       (name-replace "z" "args(s)(first(x!1) - 1)")
       (name-replace "w" "replaceTerm(z, t, rest(x!1) o q)")
       (lemma "fset.nth_x")
       (inst -1 "args(s)" "w" "first(x!1) - 1")
       (replaces -1 1)
       (lemma "fset.replace_n2")
       (inst -1 "args(s)" "replaceTerm(w, r, rest(x!1))" "w")
       (prop)
       (("1"
         (inst -1 "first(x!1) - 1")
         (replaces -1)
         (inst -3 "rest(x!1)")
         (expand* "w" "z")
         (inst -3 "q" "r" "args(s)(first(x!1) - 1)" "t")
         (prop)
         (("1" (assert))
          ("2"
           (replace -1 1 rl)
           (hide-all-but (-3 1 3))
           (lemma "rest_of_positions")
           (inst -1 "x!1 o q" "s")
           (assert))
          ("3"
           (hide-all-but (1 4))
           (lemma "fsepn.length_rest")
           (inst?)
           (prop))))
        ("2"
         (hide-all-but (-1 -5 3))
         (expand "positionsOF")
         (lift-if)
         (prop)
         (("1"
           (expand "only_empty_seq")
           (lemma "fsepn.seq_empty")
           (inst?)
           (assert))
          ("2"
           (expand "only_empty_seq")
           (lemma "fsepn.seq_empty")
           (inst?)
           (assert))))))))
    ("2" (hide-all-but (-1 1)) (lemma "pos_ax") (inst?) (assert))
    ("3"
     (hide (-2 -3 2))
     (lemma "replace_preserv_pos")
     (inst -1 "y!1 o q!1" "s!1" "t!1")
     (assert)
     (lemma "pos_ax")
     (inst?)
     (assert))
    ("4" (lemma "pos_ax") (inst?) (assert))
    ("5"
     (lemma "replace_preserv_pos")
     (inst -1 "p!1 o q!1" "s!1" "t!1")
     (assert)
     (lemma "pos_ax")
     (inst?)
     (assert))))


proof_type: f_proof
decl_type: formula
library: TRS
theory: replacement
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (measure-induct+ "length(q)" "q")
   (("1"
     (skeep)
     (case "first(p)=first(x!1)")
     (("1"
       (expand "subtermOF" 1)
       (lift-if)
       (prop)
       (("1"
         (hide-all-but (-1 -6))
         (expand* "parallel" "<=")
         (prop)
         (rewrite "empty_0")
         (replaces -1)
         (inst 2 "p")
         (rewrite "empty_o_seq"))
        ("2"
         (expand "replaceTerm" 2)
         (lift-if)
         (prop)
         (("1"
           (hide-all-but (-1 -6))
           (expand* "parallel" "<=")
           (prop)
           (rewrite "empty_0")
           (replaces -1)
           (inst 1 "x!1")
           (rewrite "empty_o_seq"))
          ("2"
           (replace -1 2)
           (name-replace "RT"
            "replaceTerm(args(s)(first(x!1) - 1), t, rest(p))")
           (("1"
             (lemma "fset.nth_x")
             (inst -1 "args(s)" "RT" "first(x!1) - 1")
             (("1"
               (replaces -1)
               (expand "RT")
               (inst -2 "rest(x!1)")
               (inst -2 "rest(p)" "args(s)(first(x!1) - 1)" "t")
               (("1"
                 (rewrite "length_rest")
                 (prop)
                 (("1"
                   (replace -1 1 rl)
                   (lemma "rest_of_positions")
                   (inst?)
                   (assert))
                  ("2" (lemma "rest_of_positions") (inst?) (assert))
                  ("3" (lemma "rest_parallel") (inst?) (assert))))
                ("2" (assert))))
              ("2" (assert))))
            ("2" (assert))))))))
      ("2"
       (hide -1)
       (expand* "parallel" "<=")
       (prop)
       (expand "subtermOF")
       (lift-if)
       (prop)
       (("1"
         (rewrite "empty_0")
         (replaces -1)
         (inst 4 "p")
         (rewrite "empty_o_seq"))
        ("2"
         (case-replace
          "args(replaceTerm(s, t, p))(first(x!1) - 1) = args(s)(first(x!1) - 1)")
         (("1"
           (hide 3)
           (expand "replaceTerm")
           (lift-if)
           (prop)
           (("1"
             (rewrite "empty_0")
             (replaces -1)
             (inst 4 "x!1")
             (rewrite "empty_o_seq"))
            ("2"
             (expand "finseq_appl")
             (expand "replace")
             (lift-if)
             (prop)
             (("1" (expand "finseq_appl") (propax)) ("2" (assert))
              ("3" (expand "finseq_appl") (propax))))))
          ("2" (assert))))))
      ("3"
       (hide-all-but (-4 1))
       (expand* "parallel" "<=")
       (prop)
       (rewrite "empty_0")
       (replaces -1)
       (inst 2 "p")
       (rewrite "empty_o_seq"))
      ("4"
       (hide-all-but (-4 1))
       (expand* "parallel" "<=")
       (prop)
       (rewrite "empty_0")
       (replaces -1)
       (inst 1 "x!1")
       (rewrite "empty_o_seq"))))
    ("2"
     (hide (-4 -5 2))
     (lemma "replace_preserv_parallel_pos")
     (inst -1 "p!1" "y!1" "s!1" "t!1")
     (assert))
    ("3"
     (hide 2)
     (lemma "replace_preserv_parallel_pos")
     (inst -1 "p!1" "q!1" "s!1" "t!1")
     (assert))))


proof_type: f_proof
decl_type: formula
library: TRS
theory: replacement
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (measure-induct+ "length(q)" "q")
   (("1"
     (skeep)
     (case "first(p)=first(x!1)")
     (("1"
       (expand "replaceTerm" 1)
       (lift-if)
       (lift-if)
       (prop)
       (("1"
         (hide-all-but (-2 -7))
         (expand* "parallel" "<=")
         (prop)
         (rewrite "empty_0")
         (replaces -1)
         (inst 2 "p")
         (rewrite "empty_o_seq"))
        ("2"
         (hide-all-but (-1 -6))
         (expand* "parallel" "<=")
         (prop)
         (rewrite "empty_0")
         (replaces -1)
         (inst 2 "p")
         (rewrite "empty_o_seq"))
        ("3"
         (hide-all-but (-1 -6))
         (expand* "parallel" "<=")
         (prop)
         (rewrite "empty_0")
         (replaces -1)
         (inst 1 "x!1")
         (rewrite "empty_o_seq"))
        ("4"
         (decompose-equality 2)
         (replace -1 1)
         (name-replace "w"
          "replaceTerm(args(s)(first(x!1) - 1), t, rest(p))")
         (name-replace "w1"
          "replaceTerm(args(s)(first(x!1) - 1), r, rest(x!1))")
         (lemma "fset.nth_x")
         (inst -1 "args(s)" "w" "first(x!1) - 1")
         (lemma "fset.nth_x")
         (inst -1 "args(s)" "w1" "first(x!1) - 1")
         (case "length(args(s)) /= 0")
         (("1"
           (assert)
           (replaces -2)
           (replaces -2)
           (lemma "fset.replace_n2")
           (inst -1 "args(s)" "replaceTerm(w, r, rest(x!1))" "w")
           (lemma "fset.replace_n2")
           (inst -1 "args(s)" "replaceTerm(w1, t, rest(p))" "w1")
           (assert)
           (inst -2 "first(x!1) - 1")
           (inst -1 "first(x!1) - 1")
           (replaces -1)
           (replaces -1)
           (case-replace
            "replaceTerm(w, r, rest(x!1)) = replaceTerm(w1, t, rest(p))")
           (hide 2)
           (inst -3 "rest(x!1)")
           (expand* "w" "w1")
           (inst -3 "rest(p)" "r" "args(s)(first(x!1) - 1)" "t")
           (prop)
           (("1"
             (hide 2)
             (replace -1 1 rl)
             (lemma "rest_of_positions")
             (inst?)
             (assert))
            ("2" (hide 2) (lemma "rest_of_positions") (inst?) (assert))
            ("3" (hide 2) (lemma "rest_parallel") (inst?) (assert))
            ("4" (hide 2) (lemma "fsepn.length_rest") (inst?) (assert))))
          ("2"
           (hide-all-but (-6 1 4))
           (expand "positionsOF")
           (lift-if)
           (prop)
           (("1" (expand "only_empty_seq") (rewrite "empty_0"))
            ("2" (expand "only_empty_seq") (rewrite "empty_0"))))))))
      ("2"
       (hide -1)
       (expand* "parallel" "<=")
       (prop)
       (expand "replaceTerm")
       (lift-if)
       (lift-if)
       (prop)
       (("1"
         (rewrite "empty_0" -2)
         (replaces -2)
         (inst 4 "p")
         (rewrite "empty_o_seq"))
        ("2"
         (hide (1 2 3))
         (rewrite "empty_0")
         (replaces -1)
         (inst 2 "p")
         (rewrite "empty_o_seq"))
        ("3"
         (hide (1 2 3))
         (rewrite "empty_0")
         (replaces -1)
         (inst 1 "x!1")
         (rewrite "empty_o_seq"))
        ("4"
         (decompose-equality 2)
         (decompose-equality 1)
         (("1" (expand "replace") (propax))
          ("2"
           (decompose-equality 1)
           (expand "replace")
           (lift-if)
           (lift-if)
           (lift-if)
           (prop)
           (("1" (expand "finseq_appl") (lift-if) (lift-if) (prop))
            ("2" (expand "finseq_appl") (lift-if) (assert))
            ("3" (expand "finseq_appl") (lift-if) (lift-if) (assert))
            ("4" (expand "finseq_appl") (lift-if) (assert))
            ("5" (expand "finseq_appl") (lift-if) (assert))))))))
      ("3"
       (hide-all-but (-4 1))
       (expand* "parallel" "<=")
       (prop)
       (rewrite "empty_0")
       (replaces -1)
       (inst 2 "p")
       (rewrite "empty_o_seq"))
      ("4"
       (hide-all-but (-4 1))
       (expand* "parallel" "<=")
       (prop)
       (rewrite "empty_0")
       (replaces -1)
       (inst 1 "x!1")
       (rewrite "empty_o_seq"))))
    ("2"
     (hide (-4 -5 2))
     (lemma "replace_preserv_parallel_pos")
     (inst -1 "y!1" "p!1" "s!1" "r!1")
     (assert)
     (rewrite "parallel_comm"))
    ("3"
     (hide (-4 -5 2))
     (lemma "replace_preserv_parallel_pos")
     (inst -1 "p!1" "y!1" "s!1" "t!1")
     (assert))
    ("4"
     (hide 2)
     (lemma "replace_preserv_parallel_pos")
     (inst -1 "q!1" "p!1" "s!1" "r!1")
     (assert)
     (rewrite "parallel_comm"))
    ("5"
     (hide 2)
     (lemma "replace_preserv_parallel_pos")
     (inst -1 "p!1" "q!1" "s!1" "t!1")
     (assert))))


proof_type: f_proof
decl_type: formula
library: TRS
theory: replacement
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (induct "t")
   (("1"
     (skosimp*)
     (expand* "subset?" "member")
     (skosimp*)
     (typepred "p!1")
     (expand "positionsOF" -1)
     (expand* "only_empty_seq" "replaceTerm")
     (rewrite "empty_0")
     (assert)
     (typepred "x!1")
     (expand "V")
     (expand "positionsOF")
     (assert))
    ("2"
     (skosimp*)
     (expand* "subset?" "member")
     (skosimp*)
     (expand "positionsOF" (-2 1))
     (lift-if)
     (prop)
     (("1" (expand* "union" "member") (prop))
      ("2" (expand* "union" "member") (prop))
      ("3"
       (hide (-2 -3))
       (expand "replaceTerm" 2)
       (lift-if)
       (prop)
       (("1"
         (expand "replaceTerm" 3)
         (lift-if)
         (assert)
         (typepred "x!1")
         (expand "V")
         (propax))
        ("2" (expand "replace") (assert))))
      ("4"
       (expand* "union" "member")
       (prop)
       (expand "IUnion")
       (skosimp*)
       (expand "catenate")
       (skosimp*)
       (expand "member")
       (expand "finseq_appl")
       (inst 3 "i!1")
       (("1"
         (inst 3 "x!3")
         (prop)
         (expand "replaceTerm" -1)
         (prop)
         (("1"
           (hide-all-but (-1 5))
           (expand "replaceTerm")
           (lift-if)
           (prop)
           (typepred "x!1")
           (expand "V")
           (propax))
          ("2"
           (expand "finseq_appl")
           (expand "replace")
           (prop)
           (("1" (expand "finseq_appl") (propax))
            ("2"
             (inst -4 "i!1 - 1")
             (inst -4 "x!1" "rest(p!1)")
             (("1" (inst -4 "x!3") (replaces -1) (assert))
              ("2"
               (hide (-2 2 5 8 9))
               (typepred "p!1")
               (expand "positionsOF" -1)
               (assert)
               (expand* "union" "member")
               (prop)
               (("1" (expand "only_empty_seq") (rewrite "empty_0"))
                ("2"
                 (expand "IUnion")
                 (skosimp*)
                 (expand "catenate")
                 (skosimp*)
                 (expand "member")
                 (expand "finseq_appl")
                 (replace -2 1)
                 (rewrite "rest_add_first")
                 (replace -2 -3)
                 (rewrite "first_add")
                 (assert))))))
            ("3" (expand "finseq_appl") (propax))))))
        ("2"
         (typepred "i!1")
         (hide (-3 -5 4))
         (expand "replaceTerm")
         (lift-if)
         (prop)
         (("1" (typepred "x!1") (expand "V") (propax))
          ("2" (hide 2) (expand "replace") (assert))))))))))


proof_type: f_proof
decl_type: formula
library: TRS
theory: replacement
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skolem-typepred)
   (expand "V")
   (flatten)
   (decompose-equality 2)
   (iff)
   (prop)
   (("1"
     (expand* "remove" "Pos_var" "extend")
     (prop)
     (("1" (lemma "subterm_of_replace") (inst?) (assert))
      ("2"
       (expand "member")
       (prop)
       (("1"
         (lemma "subterm_of_replace")
         (inst -1 "p!1" "t!1" "y!1")
         (assert)
         (lemma "variable_positions_parallel")
         (inst -1 "replaceTerm(t!1, y!1, p!1)" "y!1" "x!1" "p!1" "x!2")
         (assert)
         (lemma "replace_persistence")
         (inst -1 "p!1" "x!2" "t!1" "y!1")
         (assert))
        ("2"
         (lemma "pos_replaces_is_subset")
         (inst?)
         (expand* "subset?" "member")
         (inst?)
         (assert))))))
    ("2"
     (expand* "remove" "Pos_var")
     (expand "extend")
     (prop)
     (("1"
       (expand "member")
       (prop)
       (lemma "variable_positions")
       (inst?)
       (inst -1 "x!1")
       (assert)
       (expand* "member" "Pos_var")
       (expand "extend")
       (lemma "replace_persistence")
       (inst?)
       (assert))
      ("2"
       (expand "member")
       (prop)
       (lemma "variable_positions")
       (inst?)
       (inst -1 "x!1")
       (assert)
       (expand* "member" "Pos_var")
       (expand "extend")
       (lemma "replace_preserv_parallel_pos")
       (inst -1 "p!1" "x!2" "t!1" "y!1")
       (assert))))))


proof_type: f_proof
decl_type: formula
library: TRS
theory: replacement
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp*)
   (lemma "sets_lemmas[position].remove_as_difference")
   (inst -1 "Pos_var(t!1, x!1)" "p!1")
   (lemma "pos_occ_var_replace")
   (inst?)
   (assert)
   (replaces -2)
   (expand "difference")
   (grind))


proof_type: t_proof
decl_type: tcc
library: TRS
theory: replacement
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp*)
   (lemma "not_var")
   (inst -1 "first(p!1)" "p!1" "rest(p!1)" "s!1")
   (("1"
     (typepred "p!1")
     (assert)
     (lemma "finite_sequences_extras[posnat].seq_first_rest")
     (inst?)
     (assert))
    ("2" (assert))))


proof_type: t_proof
decl_type: tcc
library: TRS
theory: replacement
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp*)
   (typepred "p!1")
   (expand "positionsOF")
   (lift-if)
   (prop)
   (("1" (expand "only_empty_seq") (rewrite "empty_0"))
    ("2" (expand "only_empty_seq") (rewrite "empty_0"))
    ("3" (expand "only_empty_seq") (hide -1) (rewrite "empty_0"))
    ("4" (expand "only_empty_seq") (hide -1) (rewrite "empty_0"))
    ("5" (assert))
    ("6"
     (replaces -2)
     (expand* "union" "member")
     (prop)
     (("1" (expand "only_empty_seq") (rewrite "empty_0"))
      ("2"
       (expand "IUnion")
       (skolem * "j")
       (expand "catenate")
       (skolem * "p1")
       (flatten)
       (hide -1)
       (lemma "fsepn.seq_first_rest")
       (inst?)
       (assert)
       (replace -1 -2)
       (hide -1)
       (lemma "fsepn.first_equal")
       (inst?)
       (assert))))))


proof_type: t_proof
decl_type: tcc
library: TRS
theory: replacement
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp*)
   (typepred "p!1")
   (expand "positionsOF" -1)
   (lift-if)
   (prop)
   (("1" (expand "only_empty_seq") (rewrite "empty_0"))
    ("2" (expand "only_empty_seq") (rewrite "empty_0"))
    ("3"
     (expand* "union" "member")
     (prop)
     (("1" (expand "only_empty_seq") (rewrite "empty_0"))
      ("2"
       (expand "IUnion")
       (skolem * "i1")
       (expand "catenate")
       (skolem * "y1")
       (expand "member")
       (flatten)
       (lemma "fsepn.first_equal")
       (inst -1 "q!1" "y1" "i!1" "i1")
       (prop)
       (("1" (replaces -1) (replaces -1) (replaces -3))
        ("2" (lemma "fsepn.seq_first_rest") (inst?) (assert))))))))


proof_type: t_proof
decl_type: tcc
library: TRS
theory: replacement
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp*)
   (lemma "not_var")
   (inst -1 "first(p!1)" "p!1" "rest(p!1)" "s!1")
   (("1"
     (typepred "p!1")
     (assert)
     (lemma "seq_extras[posnat].seq_first_rest")
     (inst?)
     (assert))
    ("2" (assert))))


proof_type: t_proof
decl_type: tcc
library: TRS
theory: replacement
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp*)
   (lemma "replace_preserv_pos")
   (inst -1 "p!1 o q!1" "s!1" "t!1")
   (assert)
   (lemma "closed_positions")
   (inst -1 "p!1" "p!1 o q!1"
    "replaceTerm(s!1, t!1, o[posnat](p!1, q!1))")
   (assert)
   (expand "<=")
   (inst 1 "q!1"))


proof_type: t_proof
decl_type: tcc
library: TRS
theory: replacement
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp*)
   (lemma "replace_preserv_parallel_pos")
   (inst -1 "p!1" "q!1" "s!1" "t!1")
   (assert))


proof_type: t_proof
decl_type: tcc
library: TRS
theory: replacement
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp*)
   (lemma "replace_preserv_parallel_pos")
   (inst -1 "q!1" "p!1" "s!1" "r!1")
   (assert)
   (rewrite "parallel_comm"))


proof_type: f_proof
decl_type: formula
library: TRS
theory: compatibility
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (expand* "comp_cont?" "comp_op?")
   (split)
   (("1"
     (flatten)
     (measure-induct+ "length(p)" "p")
     (skeep)
     (skeep)
     (expand "replaceTerm" 1)
     (lift-if)
     (prop)
     (inst -1 "rest(x!1)")
     (inst -1 "args(s)(first(x!1) - 1)")
     (("1"
       (lemma "fsepn.length_rest")
       (inst?)
       (lemma "rest_of_positions")
       (inst -1 "x!1" "s")
       (assert)
       (inst -3 "r" "t")
       (assert)
       (hide (-1 -2))
       (inst -4 "arity(f(s))" "first(x!1) - 1" "f(s)"
        "replace(replaceTerm(args(s)(first(x!1) - 1), r, rest(x!1)), args(s), first(x!1) - 1)"
        "replaceTerm(args(s)(first(x!1) - 1), t, rest(x!1))")
       (("1"
         (prop)
         (("1"
           (lemma "fset.replace_n2")
           (inst -1 "args(s)"
            "replaceTerm(args(s)(first(x!1) - 1), t, rest(x!1))"
            "replaceTerm(args(s)(first(x!1) - 1), r, rest(x!1))")
           (prop)
           (("1" (inst -1 "first(x!1) - 1") (replaces -1))
            ("2"
             (hide-all-but (-1 -4 1))
             (expand "positionsOF")
             (lift-if)
             (prop)
             (("1" (expand "only_empty_seq") (rewrite "empty_0"))
              ("2" (expand "only_empty_seq") (rewrite "empty_0"))))))
          ("2"
           (lemma "fset.nth_x")
           (inst -1 "args(s)"
            "replaceTerm(args(s)(first(x!1) - 1), r, rest(x!1))"
            "first(x!1) - 1")
           (assert))))
        ("2"
         (hide-all-but (-2 1 2))
         (expand "positionsOF")
         (lift-if)
         (prop)
         (("1" (expand "only_empty_seq") (rewrite "empty_0"))
          ("2" (expand "only_empty_seq") (rewrite "empty_0"))
          ("3"
           (expand* "union" "member" "only_empty_seq")
           (prop)
           (("1" (rewrite "empty_0"))
            ("2"
             (expand "IUnion")
             (skolem * "i1")
             (expand "catenate")
             (skolem * "y")
             (expand "member")
             (flatten)
             (hide -1)
             (lemma "fsepn.seq_first_rest")
             (inst?)
             (prop)
             (replaces -1 -2)
             (lemma "fsepn.first_equal")
             (inst?)
             (assert))))))))
      ("2" (assert))))
    ("2"
     (flatten)
     (skosimp*)
     (inst -1 "add_first(i!1 + 1, empty_seq)" "app(f!1, st1!1)")
     (prop)
     (("1"
       (inst -1 "st1!1(i!1)" "t!1")
       (assert)
       (expand "replaceTerm")
       (lift-if)
       (prop)
       (("1" (assert) (expand "add_first") (expand "insert?") (assert))
        ("2"
         (lemma "fsepn.rest_add_first")
         (inst -1 "empty_seq" "1 + i!1")
         (lemma "fsepn.first_add")
         (inst -1 "empty_seq" "1 + i!1")
         (replaces -1)
         (replaces -1)
         (assert)
         (expand "replaceTerm")
         (lift-if)
         (prop)
         (("1"
           (lemma "fset.replace_nth")
           (inst -1 "st1!1" "i!1")
           (assert))
          ("2" (hide -1) (rewrite "empty_0"))))))
      ("2"
       (hide (-1 2))
       (expand "positionsOF")
       (expand* "union" "member" "only_empty_seq")
       (prop)
       (hide 1)
       (expand "IUnion")
       (inst 1 "1 + i!1")
       (expand "catenate")
       (inst 1 "empty_seq")
       (expand "member")
       (expand "positionsOF")
       (lift-if)
       (prop)
       (("1" (expand "only_empty_seq") (propax))
        ("2" (expand "only_empty_seq") (propax))
        ("3"
         (expand* "union" "member")
         (prop)
         (expand "only_empty_seq")
         (propax))))))))


proof_type: f_proof
decl_type: formula
library: TRS
theory: compatibility
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (expand "comp_op?")
   (split)
   (("1"
     (skosimp*)
     (expand "TC")
     (expand "IUnion")
     (skolem * "j")
     (generalize "st1!1" "st" :fnums (-1 1))
     (("1"
       (generalize "t!1" "t" :fnums 1)
       (("1"
         (generalize "f!1" "f" :fnums 1)
         (("1"
           (generalize "j" "n" :fnums 1)
           (("1"
             (induct "n")
             (("1" (assert)) ("2" (assert))
              ("3"
               (skosimp*)
               (prop)
               (("1"
                 (expand "iterate" -3)
                 (expand "o")
                 (skosimp*)
                 (inst -1 "f!2" "y!1" "st!1")
                 (assert)
                 (skosimp*)
                 (inst -5 "arity(f!2)" "i!1" "f!2"
                  "replace(y!1, st!1, i!1)" "t!2")
                 (lemma "fset.nth_x")
                 (prop)
                 (("1"
                   (lemma "fset.replace_n2")
                   (inst -1 "st1!1" "t!2" "y!1")
                   (assert)
                   (inst -1 "i!1")
                   (inst 1 "i!2 + 1")
                   (expand "iterate" 1)
                   (expand "o")
                   (inst 1 "app(f!2, replace(y!1, st!1, i!1))")
                   (assert)
                   (hide (-3 -4 -6))
                   (grind))
                  ("2" (inst?) (hide-all-but (-1 -5 1)) (grind))))
                ("2"
                 (typepred "j!1")
                 (case "j!1 = 0")
                 (("1"
                   (replaces -1 -4)
                   (assert)
                   (inst 2 "1")
                   (inst -4 "n!1" "i!1" "f!2" "st!1" "t!2")
                   (rewrite "iterate_1")
                   (assert))
                  ("2" (assert))))))
              ("4" (grind))))
            ("2" (grind))))
          ("2" (grind))))
        ("2" (grind))))
      ("2" (grind)) ("3" (grind))))
    ("2"
     (skosimp*)
     (expand "RTC")
     (expand "IUnion")
     (skolem * "j")
     (generalize "st1!1" "st" :fnums (-1 1))
     (("1"
       (generalize "t!1" "t" :fnums 1)
       (("1"
         (generalize "f!1" "f" :fnums 1)
         (("1"
           (generalize "j" "n" :fnums 1)
           (("1"
             (induct "n")
             (("1"
               (skosimp*)
               (expand "iterate" -1)
               (replace -1 1 rl)
               (inst 1 "0")
               (lemma "fset.replace_nth")
               (inst?)
               (inst?)
               (expand "iterate")
               (assert))
              ("2"
               (skosimp*)
               (expand "iterate" -2)
               (expand "o")
               (skosimp*)
               (inst -1 "f!2" "y!1" "st!1")
               (assert)
               (skosimp*)
               (inst -4 "arity(f!2)" "i!1" "f!2"
                "replace(y!1, st!1, i!1)" "t!2")
               (lemma "fset.nth_x")
               (prop)
               (("1"
                 (lemma "fset.replace_n2")
                 (inst -1 "st1!1" "t!2" "y!1")
                 (assert)
                 (inst -1 "i!1")
                 (inst 1 "i!2 + 1")
                 (expand "iterate" 1)
                 (expand "o")
                 (inst 1 "app(f!2, replace(y!1, st!1, i!1))")
                 (assert)
                 (hide-all-but (-1 -2 1))
                 (grind))
                ("2" (inst?) (hide-all-but (-1 -4 1)) (grind))))
              ("3" (grind))))
            ("2" (grind))))
          ("2" (grind))))
        ("2" (grind))))
      ("2" (grind)) ("3" (grind))))
    ("3"
     (skosimp*)
     (expand "EC")
     (expand "RTC")
     (expand "IUnion")
     (skolem * "j")
     (generalize "st1!1" "st" :fnums (-1 1))
     (("1"
       (generalize "t!1" "t" :fnums 1)
       (("1"
         (generalize "f!1" "f" :fnums 1)
         (("1"
           (generalize "j" "n" :fnums 1)
           (("1"
             (induct "n")
             (("1"
               (skosimp*)
               (inst 1 "0")
               (hide -2)
               (expand "iterate")
               (replace -1 1 rl)
               (lemma "fset.replace_nth")
               (inst?)
               (inst?)
               (assert))
              ("2"
               (skosimp*)
               (expand "iterate" -2)
               (expand "o")
               (skosimp*)
               (inst -1 "f!2" "y!1" "st!1")
               (assert)
               (skosimp*)
               (expand "SC" -3)
               (expand* "union" "member")
               (lemma "R_subset_SC")
               (lemma "fset.nth_x")
               (lemma "fset.replace_n2")
               (prop)
               (("1"
                 (inst -4 "R")
                 (expand* "subset?" "member")
                 (inst -7 "arity(f!2)" "i!1" "f!2"
                  "replace(y!1, st!1, i!1)" "t!2")
                 (assert)
                 (inst -2 "st1!1" "t!2" "y!1")
                 (assert)
                 (inst -2 "i!1")
                 (inst -4
                  "(app(f!2, replace(y!1, st!1, i!1)), app(f!2, replace(t!2, replace(y!1, st!1, i!1), i!1)))")
                 (("1"
                   (inst 1 "i!2 + 1")
                   (expand "iterate" 1)
                   (expand "o")
                   (inst 1 "app(f!2, replace(y!1, st!1, i!1))")
                   (grind))
                  ("2" (grind)) ("3" (grind))))
                ("2"
                 (expand "converse")
                 (inst -7 "arity(f!2)" "i!1" "f!2"
                  "replace(t!2, st!1, i!1)" "y!1")
                 (("1"
                   (assert)
                   (inst -2 "st1!1" "y!1" "t!2")
                   (assert)
                   (inst -2 "i!1")
                   (inst 1 "i!2 + 1")
                   (expand "iterate" 1)
                   (expand "o")
                   (inst 1 "app(f!2, replace(y!1, st!1, i!1))")
                   (assert)
                   (expand "SC" 1)
                   (expand* "union" "member")
                   (expand "converse")
                   (grind))
                  ("2" (grind))))))
              ("3" (grind))))
            ("2" (grind))))
          ("2" (grind))))
        ("2" (grind))))
      ("2" (grind)) ("3" (grind))))))


proof_type: f_proof
decl_type: formula
library: TRS
theory: compatibility
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (lemma "comp_op_iff_comp_cont")
   (lemma "closure_comp_op")
   (copy -2)
   (inst -1 "R")
   (inst -2 "R")
   (assert)
   (copy -3)
   (copy -1)
   (flatten)
   (inst -7 "EC(R)")
   (inst -1 "TC(R)")
   (inst -2 "RTC(R)")
   (assert))


proof_type: f_proof
decl_type: formula
library: TRS
theory: substitution
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skolem-typepred)
   (expand* "Sub?" "Ren?" "subset?" "member")
   (flatten)
   (lemma
    "function_inverse_def[(Dom(rho!1)), (Ran(rho!1))].bijective_inverse_exists")
   (inst -1 "rho!1")
   (expand "exists1")
   (flatten)
   (hide -2)
   (skosimp*)
   (lemma
    "function_inverse_def[(Dom(rho!1)), (Ran(rho!1))].bij_inv_is_bij_alt")
   (inst -1 "rho!1" "x!1")
   (expand "bijective?" -1)
   (flatten)
   (expand "is_finite")
   (skolem-typepred)
   (inst 1 "N!1" "f!1 o x!1")
   (lemma
    "function_props[(Ran(rho!1)), (Dom(rho!1)), below[N!1]].composition_injective")
   (inst?))


proof_type: f_proof
decl_type: formula
library: TRS
theory: substitution
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skolem-typepred)
   (case "NOT empty?(complement(union(V1!1, V2!1)))")
   (("1"
     (lemma "choose_member")
     (inst -1 "complement(union(V1!1, V2!1))")
     (prop)
     (("1"
       (expand "member")
       (expand "extend" -1 1)
       (prop)
       (expand "complement" -2 1)
       (expand "member")
       (inst?))
      ("2"
       (expand "empty?")
       (skosimp*)
       (inst?)
       (expand "member")
       (expand "extend")
       (propax))))
    ("2"
     (hide 1)
     (lemma "var_countable")
     (case-replace
      "complement(union(V1!1, V2!1)) = difference(V, union(V1!1, V2!1))"
      :hide? T)
     (("1"
       (lemma "countable_props[term].countably_infinite_difference")
       (inst -1 "V" "union(V1!1, V2!1)")
       (grind))
      ("2"
       (hide-all-but 1)
       (decompose-equality 1)
       (iff)
       (prop)
       (("1"
         (expand "restrict")
         (expand* "complement" "difference" "union" "member")
         (expand "extend")
         (propax))
        ("2"
         (expand* "restrict" "complement" "difference" "union" "member"
          "extend"))))))))


proof_type: f_proof
decl_type: formula
library: TRS
theory: substitution
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (lemma "restriction_Dom")
   (inst?)
   (lemma "fsetvar.finite_subset")
   (typepred "sigma")
   (expand "Sub?")
   (inst?)
   (lemma "fsetvar.finite_subset")
   (inst?)
   (assert))


proof_type: f_proof
decl_type: formula
library: TRS
theory: substitution
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (expand* "subset?" "member")
   (skeep)
   (expand "Dom")
   (expand "restriction")
   (lift-if)
   (prop)
   (expand "member")
   (propax))


proof_type: f_proof
decl_type: formula
library: TRS
theory: substitution
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (decompose-equality)
   (expand* "Dom" "union_subs" "union" "member")
   (lift-if)
   (expand "Dom")
   (propax))


proof_type: f_proof
decl_type: formula
library: TRS
theory: substitution
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (typepred "sgi`1" "sgi`2")
   (expand "Sub?")
   (lemma "fsetvar.finite_union")
   (inst -1 "Dom(sgi`1)" "Dom(sgi`2)")
   (lemma "Dom_union")
   (inst?)
   (assert))


proof_type: f_proof
decl_type: formula
library: TRS
theory: substitution
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (decompose-equality)
   (expand "union_subs")
   (lift-if)
   (lift-if)
   (prop)
   (expand* "disjoint?" "empty?" "intersection")
   (inst?)
   (expand "member" 2 1)
   (assert))


proof_type: f_proof
decl_type: formula
library: TRS
theory: substitution
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (expand "Sub?")
   (case-replace "Dom(identity) = emptyset")
   (("1" (assert)) ("2" (hide 2) (expand* "Dom" "identity" "emptyset"))))


proof_type: f_proof
decl_type: formula
library: TRS
theory: substitution
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (expand "Ren?")
   (expand "subset?")
   (skosimp*)
   (expand "member")
   (expand "Ran")
   (skosimp*)
   (typepred "identity")
   (grind))


proof_type: f_proof
decl_type: formula
library: TRS
theory: substitution
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (induct "t")
   (("1" (skeep) (grind))
    ("2"
     (skeep)
     (decompose-equality 1)
     (("1" (grind))
      ("2"
       (decompose-equality 1)
       (("1" (inst?) (("1" (grind)) ("2" (grind))))
        ("2" (decompose-equality 1) (inst?) (grind))))
      ("3" (grind))))
    ("3" (rewrite "iden_subs"))))


proof_type: f_proof
decl_type: formula
library: TRS
theory: substitution
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (induct "t")
   (("1"
     (skeep)
     (skeep)
     (expand "ext")
     (expand "subset?")
     (inst?)
     (expand "restriction")
     (lift-if)
     (prop)
     (hide 2)
     (expand* "member" "Vars")
     (inst 2 "empty_seq")
     (("1" (expand "subtermOF") (lift-if) (rewrite "empty_0"))
      ("2" (expand "positionsOF") (expand "only_empty_seq") (propax))))
    ("2"
     (skeep)
     (skeep)
     (expand "ext" 1)
     (lift-if)
     (prop)
     (decompose-equality 2)
     (("1"
       (decompose-equality 1)
       (("1"
         (expand "finseq_appl")
         (inst -1 "x!1")
         (inst -1 "Vs" "sigma")
         (assert)
         (hide 1)
         (expand "subset?")
         (skosimp*)
         (inst?)
         (assert)
         (hide 2)
         (expand "member")
         (expand "Vars")
         (skosimp*)
         (inst 2 "add_first(x!1 + 1, p!1)")
         (("1"
           (expand "subtermOF" 2)
           (lift-if)
           (prop)
           (("1" (hide-all-but -1) (grind))
            ("2"
             (lemma "fsepn.rest_add_first")
             (expand "finseq_appl")
             (inst -1 "p!1" "1 + x!1")
             (replaces -1)
             (rewrite "first_add")
             (assert))))
          ("2"
           (expand "positionsOF")
           (expand "union")
           (prop)
           (hide 1)
           (expand "member")
           (expand "IUnion")
           (typepred "x!1")
           (inst 1 "x!1 + 1")
           (expand "catenate")
           (inst 1 "p!1")
           (typepred "p!1")
           (expand* "finseq_appl" "member"))))
        ("2" (skosimp*) (rewrite "restriction_Subs"))))
      ("2" (skosimp*) (rewrite "restriction_Subs"))))
    ("3" (skosimp*) (rewrite "restriction_Subs"))))


proof_type: f_proof
decl_type: formula
library: TRS
theory: substitution
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (induct "t")
   (("1"
     (skeep)
     (skeep)
     (expand "ext" 1 1)
     (expand "disjoint?" -2)
     (expand "empty?" -2)
     (expand "union_subs")
     (lift-if)
     (expand "member")
     (prop)
     (("1" (expand "ext") (propax))
      ("2"
       (inst -3 "vars(vars1_var)")
       (expand* "intersection" "member")
       (expand "Vars" 3)
       (prop)
       (inst 1 "empty_seq")
       (("1" (expand "subtermOF") (lift-if) (rewrite "empty_0"))
        ("2" (expand "positionsOF") (expand "only_empty_seq") (propax))))
      ("3" (expand "Dom" 3) (prop) (expand "ext") (assert))))
    ("2"
     (skeep)
     (skeep)
     (expand "ext" 1)
     (lift-if)
     (prop)
     (decompose-equality 2)
     (("1"
       (decompose-equality 1)
       (("1"
         (expand "finseq_appl")
         (inst?)
         (assert)
         (hide 1)
         (expand "disjoint?" (-2 2))
         (expand "empty?" (-2 2))
         (skosimp*)
         (inst?)
         (expand* "intersection" "member")
         (prop)
         (expand "Vars")
         (skosimp*)
         (inst 1 "add_first(x!1 + 1, p!1)")
         (("1"
           (expand "subtermOF" 1)
           (lift-if)
           (prop)
           (("1" (hide-all-but -1) (grind))
            ("2"
             (lemma "fsepn.rest_add_first")
             (inst -1 "p!1" "x!1 + 1")
             (rewrite "first_add")
             (replaces -1)
             (expand "finseq_appl")
             (propax))))
          ("2"
           (expand "positionsOF")
           (expand "union")
           (prop)
           (hide 1)
           (expand "member")
           (expand "IUnion")
           (typepred "x!1")
           (inst 1 "x!1 + 1")
           (expand "catenate")
           (inst 1 "p!1")
           (typepred "p!1")
           (expand* "finseq_appl" "member"))))
        ("2" (skosimp*) (rewrite "union_is_sub"))
        ("3" (skeep) (expand "disjoint_D?") (propax))))
      ("2" (skeep) (rewrite "union_is_sub"))
      ("3" (skeep) (expand "disjoint_D?") (propax))))
    ("3" (hide 2) (skeep) (rewrite "union_is_sub"))
    ("4" (hide 2) (skeep) (expand "disjoint_D?") (propax))))


proof_type: f_proof
decl_type: formula
library: TRS
theory: substitution
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (lemma "dom_o")
   (inst?)
   (typepred "sigma" "tau")
   (expand "Sub?")
   (lemma "fsetvar.finite_union")
   (inst?)
   (lemma "fsetvar.finite_subset")
   (inst?)
   (assert))


proof_type: f_proof
decl_type: formula
library: TRS
theory: substitution
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (decompose-equality)
   (generalize "x!1" "t")
   (induct "t")
   (("1"
     (skeep)
     (expand "o")
     (expand "ext" 1 (1 3))
     (expand "comp")
     (propax))
    ("2"
     (skeep)
     (expand "o")
     (grind)
     (decompose-equality 2)
     (("1"
       (decompose-equality)
       (("1"
         (decompose-equality)
         (lemma "dom_o_fin")
         (expand "is_finite")
         (expand "injective?")
         (inst?)
         (grind))
        ("2"
         (lemma "dom_o_fin")
         (expand* "is_finite" "injective?")
         (inst?)
         (grind))))
      ("2"
       (lemma "dom_o_fin")
       (expand* "is_finite" "injective?")
       (inst?)
       (grind))))
    ("3" (skeep) (rewrite "subs_o"))))


proof_type: f_proof
decl_type: formula
library: TRS
theory: substitution
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp*)
   (decompose-equality 1)
   (expand "comp")
   (lemma "ext_iden")
   (inst?)
   (typepred "x!1")
   (expand "V")
   (expand "ext" -2)
   (assert)
   (replaces -2)
   (expand "ext" 1)
   (propax))


proof_type: f_proof
decl_type: formula
library: TRS
theory: substitution
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (decompose-equality)
   (expand "comp" 1 (1 3 4))
   (rewrite "ext_o")
   (expand "o")
   (propax))


proof_type: f_proof
decl_type: formula
library: TRS
theory: substitution
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skolem-typepred)
   (expand "Ren?")
   (flatten)
   (lemma
    "function_inverse_def[(Dom(rho!1)), (Ran(rho!1))].bijective_inverse_exists")
   (inst -1 "rho!1")
   (expand "exists1")
   (flatten)
   (hide -2)
   (skosimp*)
   (inst 1 "extend_to_identity((Ran(rho!1)),(Dom(rho!1)),x!1)")
   (("1"
     (skosimp*)
     (expand "comp")
     (case "vars?(rho!1(x!2))")
     (("1"
       (expand "ext")
       (assert)
       (expand "extend_to_identity")
       (lift-if)
       (expand "bijective?")
       (flatten)
       (prop)
       (("1"
         (lemma
          "function_inverse_def[(Dom(rho!1)), (Ran(rho!1))].comp_inverse_left_inj_alt")
         (inst -1 "x!2" "rho!1" "x!1")
         (expand "restrict")
         (propax))
        ("2"
         (expand "restrict" 1)
         (expand "Ran" 1)
         (expand "member" 1)
         (inst 1 "x!2"))))
      ("2"
       (hide-all-but (-3 -5 -6 1))
       (expand* "subset?" "member")
       (inst -1 "rho!1(x!2)")
       (expand "V")
       (assert)
       (expand* "Ran" "member")
       (inst 2 "x!2"))))
    ("2"
     (case "Dom(extend_to_identity[(V)]((restrict[term[variable, symbol, arity],((V[variable, symbol, arity])), boolean]((Ran(rho!1)))), (Dom(rho!1)), x!1))= Ran(rho!1)")
     (("1"
       (case "Ran(extend_to_identity[(V)]((restrict[term[variable, symbol, arity],((V[variable, symbol, arity])), boolean]((Ran(rho!1)))), (Dom(rho!1)), x!1)) = Dom(rho!1)")
       (("1"
         (split)
         (("1"
           (expand "Sub?")
           (replaces -2)
           (hide-all-but (-3 1))
           (lemma "range_finite")
           (inst?)
           (lemma "restrict_set_props[term, (V)].restrict_finite")
           (inst?)
           (assert))
          ("2"
           (lemma
            "function_inverse_def[(Dom(rho!1)), (Ran(rho!1))].bij_inv_is_bij_alt")
           (inst -1 "rho!1" "x!1")
           (expand "Ren?" 1)
           (split)
           (("1"
             (expand* "subset?" "member" "V")
             (skosimp*)
             (decompose-equality -3)
             (inst -1 "x!2")
             (iff)
             (assert)
             (expand "extend" -1)
             (expand "V")
             (propax))
            ("2"
             (expand "bijective?" 1)
             (split)
             (("1"
               (expand "injective?" 1)
               (skosimp*)
               (expand "restrict" -1 (1 3))
               (expand "extend_to_identity" -1)
               (lift-if)
               (lift-if)
               (prop)
               (("1"
                 (expand "bijective?" -4)
                 (flatten)
                 (expand "injective?" -4)
                 (inst -4 "x1!1" "x2!1")
                 (assert))
                ("2"
                 (expand "bijective?" -3)
                 (flatten)
                 (expand "surjective?")
                 (decompose-equality -5)
                 (inst -1 "x2!1")
                 (iff)
                 (assert))
                ("3"
                 (expand "bijective?" -3)
                 (flatten)
                 (expand "surjective?")
                 (decompose-equality -5)
                 (inst -1 "x1!1")
                 (iff)
                 (assert))))
              ("2"
               (expand "surjective?" 1)
               (skolem-typepred)
               (expand "bijective?" -2)
               (flatten)
               (expand "surjective?" -3)
               (decompose-equality -4)
               (inst -1 "y!1")
               (iff)
               (assert)
               (expand "extend" -1)
               (prop)
               (inst -5 "y!1")
               (skolem-typepred)
               (decompose-equality -7)
               (inst -1 "x!2")
               (("1"
                 (iff)
                 (expand "restrict" -1 2)
                 (inst 1 "x!2")
                 (expand "restrict" 1 1)
                 (expand "extend_to_identity" 1)
                 (expand "restrict" 1)
                 (propax))
                ("2"
                 (hide-all-but (-1 -9 1))
                 (expand* "subset?" "member" "V")
                 (inst -2 "x!2")
                 (assert))))))))))
        ("2"
         (hide 2)
         (decompose-equality 1)
         (iff)
         (prop)
         (("1"
           (expand "extend" 1)
           (prop)
           (("1"
             (expand "V")
             (expand "Ran" -2 1)
             (expand "member")
             (skolem-typepred)
             (flatten)
             (expand "extend_to_identity" -4)
             (lift-if)
             (decompose-equality -5)
             (inst -1 "x!3")
             (iff)
             (assert))
            ("2"
             (expand "Ran" -1 1)
             (expand "member")
             (skolem-typepred)
             (flatten)
             (expand "extend_to_identity" -3)
             (lift-if)
             (decompose-equality -4)
             (inst -1 "x!3")
             (iff)
             (assert))))
          ("2"
           (expand "Ran" 1 1)
           (expand "member")
           (lemma
            "function_inverse_def[(Dom(rho!1)), (Ran(rho!1))].bij_inv_is_bij_alt")
           (inst -1 "rho!1" "x!1")
           (expand "bijective?" -1)
           (flatten)
           (expand "surjective?")
           (expand "extend" -3)
           (prop)
           (inst -4 "x!2")
           (skolem-typepred)
           (decompose-equality -6)
           (case "V(x!3)")
           (("1"
             (inst -2 "x!3")
             (iff)
             (expand "restrict" -2 2)
             (inst 1 "x!3")
             (assert)
             (expand "extend_to_identity" 1)
             (assert))
            ("2"
             (hide-all-but (-2 -9 1))
             (expand* "subset?" "member" "V")
             (inst -2 "x!3")
             (assert))))))))
      ("2"
       (hide 2)
       (decompose-equality 1)
       (iff)
       (prop)
       (("1"
         (expand "Dom" -1 1)
         (prop)
         (expand "extend_to_identity")
         (lift-if)
         (prop))
        ("2"
         (expand "Dom" 1 1)
         (expand "extend_to_identity")
         (lift-if)
         (prop)
         (hide -3)
         (expand "restrict" -1)
         (expand "Ran" -1)
         (expand "member" -1)
         (skosimp*)
         (replaces -2 -3)
         (expand "bijective?")
         (flatten)
         (lemma
          "function_inverse_def[(Dom(rho!1)), (Ran(rho!1))].comp_inverse_left_inj_alt")
         (inst -1 "x!3" "rho!1" "x!1")
         (expand "restrict" -1)
         (expand "Dom" -2)
         (assert))))
      ("3"
       (hide 2)
       (split)
       (("1"
         (skosimp*)
         (prop)
         (("1"
           (hide-all-but (-1 -4 1))
           (expand* "Ran" "subset?" "member" "V")
           (skosimp*)
           (grind))
          ("2" (expand "restrict") (propax))
          ("3" (expand "restrict") (propax))))
        ("2"
         (lemma
          "function_inverse_def[(Dom(rho!1)), (Ran(rho!1))].bij_inv_is_bij_alt")
         (inst -1 "rho!1" "x!1")
         (hide-all-but (-1 1))
         (expand "bijective?")
         (expand* "injective?" "surjective?")
         (flatten)
         (split)
         (("1" (skosimp*) (inst -2 "x1!1" "x2!1") (assert))
          ("2"
           (skosimp*)
           (inst -2 "y!1")
           (skosimp*)
           (inst 1 "x!2")
           (expand "restrict")
           (typepred "rho!1")
           (hide -1)
           (expand "Ren?")
           (flatten)
           (hide -2)
           (typepred "x!2")
           (hide -3)
           (expand* "Ran" "subset?" "member" "V")
           (skosimp*)
           (grind))))))))
    ("3"
     (split)
     (("1"
       (skosimp*)
       (prop)
       (("1"
         (hide-all-but (-1 -4 1))
         (expand* "Ran" "subset?" "member" "V")
         (skosimp*)
         (grind))
        ("2" (expand "restrict") (propax))
        ("3" (expand "restrict") (propax))))
      ("2"
       (lemma
        "function_inverse_def[(Dom(rho!1)), (Ran(rho!1))].bij_inv_is_bij_alt")
       (inst -1 "rho!1" "x!1")
       (hide-all-but (-1 1))
       (expand "bijective?")
       (expand* "injective?" "surjective?")
       (flatten)
       (split)
       (("1" (skosimp*) (inst -2 "x1!1" "x2!1") (assert))
        ("2"
         (skosimp*)
         (inst -2 "y!1")
         (skosimp*)
         (inst 1 "x!2")
         (expand "restrict")
         (typepred "rho!1")
         (hide -1)
         (expand "Ren?")
         (flatten)
         (hide -2)
         (typepred "x!2")
         (hide -3)
         (expand* "Ran" "subset?" "member" "V")
         (skosimp*)
         (grind))))))))


