# Proofs

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"
     (skosimp*)
     (expand "ext")
     (rewrite "Vars_is_var")
     (expand* "subset?" "member")
     (inst -1 "vars(vars1_var!1)")
     (inst -2 "vars(vars1_var!1)")
     (assert))
    ("2"
     (skosimp*)
     (expand "ext" 1)
     (lift-if)
     (prop)
     (decompose-equality 2)
     (("1"
       (decompose-equality 1)
       (("1"
         (decompose-equality 1)
         (("1"
           (expand "finseq_appl")
           (inst -1 "x!1")
           (inst?)
           (prop)
           (hide (-2 2))
           (expand* "subset?" "member")
           (skosimp*)
           (inst -2 "x!2")
           (assert)
           (hide 1)
           (lemma "vars_term_is_union")
           (inst -1 "app(app1_var!1, app2_var!1)")
           (assert)
           (replaces -1)
           (expand "IUnion")
           (expand "finseq_appl")
           (inst 2 "x!1"))
          ("2" (hide-all-but 1) (skosimp*) (rewrite "subs_o"))))
        ("2" (hide-all-but 1) (skosimp*) (rewrite "subs_o"))))
      ("2" (hide-all-but 1) (skosimp*) (rewrite "subs_o"))))
    ("3" (hide 2) (skosimp*) (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:
  (""
   (induct "t")
   (("1"
     (skosimp*)
     (prop)
     (("1"
       (expand "empty?")
       (skosimp*)
       (expand "intersection")
       (expand "member")
       (flatten)
       (expand "Dom")
       (grind))
      ("2"
       (expand "empty?")
       (inst -1 "vars(vars1_var!1)")
       (("1"
         (expand "intersection")
         (expand "member")
         (prop)
         (("1" (expand "Dom") (prop) (grind))
          ("2"
           (expand "Vars")
           (inst 1 "empty_seq")
           (("1" (grind)) ("2" (grind))))))
        ("2" (expand "V") (propax))))))
    ("2"
     (skosimp*)
     (prop)
     (("1"
       (expand "empty?" 1)
       (expand "intersection" 1)
       (expand "member" 1)
       (skosimp)
       (expand "Vars" -3)
       (skosimp*)
       (typepred "p!1")
       (expand "positionsOF")
       (prop)
       (("1"
         (expand "only_empty_seq")
         (lemma "seq_extras[posnat].empty_0")
         (inst -1 "p!1")
         (assert)
         (expand "subtermOF")
         (typepred "x!1")
         (expand "V")
         (assert))
        ("2"
         (expand "union")
         (expand "member")
         (prop)
         (("1"
           (expand "only_empty_seq")
           (lemma "seq_extras[posnat].empty_0")
           (inst -1 "p!1")
           (expand "subtermOF")
           (assert)
           (typepred "x!1")
           (expand "V")
           (propax))
          ("2"
           (expand "IUnion")
           (skosimp*)
           (expand "catenate")
           (skosimp*)
           (expand "member")
           (expand "finseq_appl")
           (inst -6 "i!1 -1")
           (inst -6 "sigma!1")
           (prop)
           (("1"
             (expand* "empty?" "intersection")
             (inst -2 "x!1")
             (expand "member")
             (prop)
             (expand "Vars")
             (inst 1 "x!2")
             (expand "subtermOF" -6)
             (lift-if)
             (prop)
             (("1"
               (hide-all-but (-1 -2))
               (typepred "x!1")
               (expand "V")
               (grind))
              ("2"
               (expand "finseq_appl")
               (replaces -4)
               (rewrite "first_add")
               (rewrite "rest_add_first"))))
            ("2"
             (expand "ext" -3)
             (expand "finseq_appl")
             (decompose-equality -3)
             (decompose-equality -1)
             (decompose-equality -1)
             (inst -1 "i!1 -1"))))))))
      ("2"
       (expand "ext" 1)
       (lift-if)
       (prop)
       (decompose-equality 2)
       (decompose-equality 1)
       (decompose-equality 1)
       (expand "finseq_appl")
       (inst -2 "x!1")
       (inst -2 "sigma!1")
       (assert)
       (expand* "empty?" "intersection")
       (skosimp*)
       (inst -1 "x!2")
       (expand "member")
       (prop)
       (expand "Vars")
       (skosimp*)
       (typepred "p!1")
       (inst 1 "add_first(x!1 + 1, p!1)")
       (("1"
         (expand "subtermOF" 1)
         (lift-if)
         (prop)
         (("1" (hide-all-but -1) (grind))
          ("2"
           (expand "finseq_appl")
           (rewrite "first_add")
           (rewrite "rest_add_first")
           (assert))))
        ("2"
         (expand "positionsOF" 1)
         (expand "union")
         (prop)
         (expand* "member" "finseq_appl")
         (expand "IUnion")
         (inst 2 "x!1 + 1")
         (expand "catenate")
         (inst 2 "p!1")
         (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:
  (""
   (skosimp*)
   (prop)
   (("1"
     (lemma "idemp_sub_term_empty_inter")
     (expand "idempotent_sub?" -2)
     (decompose-equality -2)
     (expand "empty?" 1)
     (skosimp*)
     (expand "intersection" -3)
     (expand "member")
     (prop)
     (expand "VRan")
     (expand "IUnion")
     (skosimp*)
     (inst -1 "i!1")
     (expand "comp")
     (inst -2 "sigma!1(i!1)" "sigma!1")
     (assert)
     (expand* "empty?" "intersection" "member")
     (inst -2 "x!1")
     (assert))
    ("2"
     (lemma "idemp_sub_term_empty_inter")
     (expand "idempotent_sub?")
     (decompose-equality 1)
     (expand "comp")
     (inst -1 "sigma!1(x!1)" "sigma!1")
     (assert)
     (expand* "empty?" "intersection" "member")
     (skosimp*)
     (inst -3 "x!2")
     (assert)
     (expand "VRan")
     (expand "IUnion")
     (inst 2 "x!1")
     (expand "Dom")
     (prop)
     (hide 1)
     (replace -1 -2)
     (lemma "Vars_is_var")
     (inst -1 "x!1")
     (typepred "x!1")
     (expand "V")
     (assert)
     (decompose-equality -2)
     (inst -1 "x!2")
     (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:
  (""
   (skosimp*)
   (expand* "subset?" "union" "singleton" "member" "restrict")
   (skosimp*)
   (expand "Dom")
   (prop)
   (expand "DSigma")
   (lift-if)
   (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:
  (""
   (skosimp*)
   (lemma "Dom_DSigma")
   (inst?)
   (lemma "finite_singleton[term]")
   (copy -1)
   (inst -1 "s!1")
   (inst -2 "x!1")
   (lemma "finite_union[term]")
   (inst?)
   (lemma "finite_subset[(V)]")
   (inst -1
    "restrict
                            [term[variable, symbol, arity],
                             (V[variable, symbol, arity]), boolean]
                            (union(singleton(s!1), singleton(x!1)))"
    "Dom(DSigma(s!1, x!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:
  (""
   (induct "s")
   (("1"
     (skosimp*)
     (expand "ext")
     (expand "DSigma")
     (lift-if)
     (prop)
     (expand "empty?")
     (inst -2 "empty_seq")
     (expand "member")
     (expand "Pos_var")
     (expand "extend")
     (prop)
     (("1"
       (expand "subtermOF")
       (lift-if)
       (prop)
       (hide-all-but 1)
       (grind))
      ("2"
       (hide 2)
       (expand "positionsOF")
       (expand "only_empty_seq")
       (propax))))
    ("2"
     (skosimp*)
     (expand "ext" 1)
     (lift-if)
     (prop)
     (decompose-equality 2)
     (("1"
       (decompose-equality 1)
       (("1"
         (decompose-equality 1)
         (("1"
           (expand "finseq_appl")
           (inst -1 "x!2")
           (inst -1 "t!1" "x!1")
           (assert)
           (hide 1)
           (expand "empty?")
           (skosimp*)
           (expand "member")
           (expand "Pos_var" -1)
           (expand "extend")
           (prop)
           (inst -3 "add_first(x!2 + 1, x!3)")
           (expand "Pos_var")
           (expand "extend")
           (prop)
           (("1"
             (expand "subtermOF" 1)
             (lift-if)
             (prop)
             (("1" (hide-all-but -1) (grind))
              ("2"
               (expand "finseq_appl")
               (rewrite "first_add")
               (rewrite "rest_add_first")
               (assert))))
            ("2"
             (hide -2)
             (expand "positionsOF" 1)
             (expand* "union" "member")
             (prop)
             (expand "IUnion")
             (inst 2 "x!2 + 1")
             (expand "catenate")
             (inst 2 "x!3")
             (expand* "member" "finseq_appl"))))
          ("2" (hide-all-but 1) (skosimp*) (rewrite "DSigma_is_Sub"))))
        ("2" (hide-all-but 1) (skosimp*) (rewrite "DSigma_is_Sub"))))
      ("2" (hide-all-but 1) (skosimp*) (rewrite "DSigma_is_Sub"))))
    ("3" (hide 2) (skosimp*) (rewrite "DSigma_is_Sub"))))


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")
   (skolem * "x2")
   (flatten)
   (expand* "union" "member")
   (expand "Dom")
   (prop)
   (expand* "SigmaP" "singleton")
   (lift-if)
   (prop))


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 "SigmaP_Dom")
   (inst?)
   (assert)
   (typepred "sigma")
   (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)
   (expand "RSigma")
   (skeep)
   (prop)
   (("1" (expand "SigmaP") (assert))
    ("2"
     (expand "SigmaP")
     (lemma "replace_subterm_of_term")
     (inst?)
     (assert)
     (replace -1 1 rl)
     (expand "comp_cont?")
     (inst?)
     (assert)
     (inst -4 "subtermOF(sigma(x), p)" "t")
     (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)
   (skoletin* 1)
   (expand* "subset?" "member")
   (skolem * "z")
   (flatten)
   (expand* "union" "member")
   (expand "Dom")
   (prop)
   (expand* "gamma" "singleton")
   (lift-if)
   (prop)
   (("1" (grind)) ("2" (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:
  (""
   (skeep)
   (lemma "gamma_Dom")
   (inst?)
   (assert)
   (typepred "sg1" "sg2")
   (expand "Sub?")
   (lemma "fsetvar.finite_union")
   (inst?)
   (lemma "fsetvar.finite_union")
   (inst -1 "union(Dom(sg1), Dom(sg2))" "singleton(y)")
   (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 "RSigma")
   (skosimp*)
   (prop)
   (("1" (inst -1 "y!1") (assert) (expand "gamma") (lift-if) (assert))
    ("2" (inst -2 "z") (assert) (expand "gamma") (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:
  (""
   (induct "t")
   (("1"
     (skeep)
     (skeep)
     (split)
     (("1"
       (expand "ext")
       (expand "gamma")
       (lift-if)
       (prop)
       (typepred "y")
       (expand "V")
       (expand* "Vars" "member")
       (expand "restrict")
       (inst 2 "empty_seq")
       (("1"
         (expand "subtermOF")
         (lift-if)
         (assert)
         (prop)
         (hide (-1 -2 2 3))
         (grind))
        ("2"
         (hide (-2 2))
         (expand "positionsOF")
         (expand "only_empty_seq")
         (propax))))
      ("2"
       (expand "ext")
       (expand "gamma")
       (lift-if)
       (prop)
       (typepred "y")
       (expand "V")
       (expand* "Vars" "member")
       (expand "restrict")
       (inst 2 "empty_seq")
       (("1"
         (expand "subtermOF")
         (lift-if)
         (assert)
         (prop)
         (hide (-1 -2 2 3))
         (grind))
        ("2"
         (hide (-2 2))
         (expand "positionsOF")
         (expand "only_empty_seq")
         (propax))))))
    ("2"
     (skeep)
     (skeep)
     (split)
     (("1"
       (expand "ext" 1)
       (lift-if)
       (prop)
       (decompose-equality 2)
       (("1"
         (decompose-equality 1)
         (("1"
           (expand "finseq_appl")
           (inst?)
           (assert)
           (hide 1)
           (expand* "Vars" "member")
           (expand "restrict")
           (skosimp*)
           (inst 2 "add_first(x!1 + 1, p!1)")
           (("1"
             (expand "subtermOF" 2)
             (lift-if)
             (prop)
             (("1" (hide-all-but -1) (grind))
              ("2"
               (expand "finseq_appl")
               (rewrite "rest_add_first")
               (rewrite "first_add")
               (assert))))
            ("2"
             (expand "positionsOF")
             (expand* "union" "member")
             (prop)
             (expand "IUnion")
             (typepred "x!1" "p!1")
             (inst 2 "x!1 + 1")
             (expand* "catenate" "finseq_appl")
             (inst 2 "p!1")
             (expand "member")
             (propax))))
          ("2" (hide-all-but 1) (skeep) (rewrite "gamma_Subs"))))
        ("2" (hide-all-but 1) (skeep) (rewrite "gamma_Subs"))))
      ("2"
       (expand "ext" 1)
       (lift-if)
       (prop)
       (decompose-equality 2)
       (("1"
         (decompose-equality 1)
         (("1"
           (expand "finseq_appl")
           (inst?)
           (assert)
           (hide 1)
           (expand* "Vars" "member")
           (expand "restrict")
           (skosimp*)
           (inst 2 "add_first(x!1 + 1, p!1)")
           (("1"
             (expand "subtermOF" 2)
             (lift-if)
             (prop)
             (("1" (hide-all-but -1) (grind))
              ("2"
               (expand "finseq_appl")
               (rewrite "rest_add_first")
               (rewrite "first_add")
               (assert))))
            ("2"
             (expand "positionsOF")
             (expand* "union" "member")
             (prop)
             (expand "IUnion")
             (typepred "x!1" "p!1")
             (inst 2 "x!1 + 1")
             (expand* "catenate" "finseq_appl")
             (inst 2 "p!1")
             (expand "member")
             (propax))))
          ("2" (hide-all-but 1) (skeep) (rewrite "gamma_Subs"))))
        ("2" (hide-all-but 1) (skeep) (rewrite "gamma_Subs"))))))
    ("3" (skeep) (hide-all-but 2) (rewrite "gamma_Subs"))
    ("4" (skeep) (hide-all-but 2) (rewrite "gamma_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:
  (""
   (skosimp*)
   (decompose-equality 3)
   (iff)
   (prop)
   (("1"
     (expand* "union" "member")
     (flatten)
     (expand* "Dom" "singleton")
     (prop)
     (expand "Rhop")
     (lift-if)
     (prop)
     (assert))
    ("2"
     (expand* "union" "member")
     (prop)
     (("1"
       (expand* "Dom")
       (prop)
       (expand "Rhop")
       (lift-if)
       (prop)
       (assert))
      ("2"
       (expand* "singleton" "Dom")
       (prop)
       (expand "Rhop")
       (lift-if)
       (prop)
       (("1" (assert)) ("2" (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:
  (""
   (skosimp*)
   (decompose-equality 4)
   (iff)
   (prop)
   (("1"
     (expand* "union" "member")
     (prop)
     (expand* "Ran" "singleton")
     (skosimp*)
     (expand "member")
     (expand "Dom" -1)
     (prop)
     (expand "Rhop")
     (lift-if)
     (prop)
     (inst 4 "x!3")
     (assert)
     (expand "Dom" 4)
     (assert))
    ("2"
     (expand* "union" "member")
     (prop)
     (("1"
       (expand "Ran")
       (skosimp*)
       (expand "member")
       (inst 1 "x!3")
       (split)
       (("1"
         (lemma "Rhop_Dom")
         (inst?)
         (assert)
         (replaces -1)
         (expand* "union" "mmeber")
         (expand "member")
         (propax))
        ("2" (expand "Rhop") (lift-if) (prop) (assert))))
      ("2"
       (expand* "singleton" "Ran")
       (inst 1 "x!1")
       (expand "member")
       (split)
       (("1"
         (lemma "Rhop_Dom")
         (inst?)
         (assert)
         (replaces -1)
         (expand* "union" "member" "singleton"))
        ("2" (expand "Rhop") (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:
  (""
   (skosimp*)
   (lemma "Rhop_Dom")
   (inst?)
   (assert)
   (typepred "rho!1")
   (hide -2)
   (expand "Sub?")
   (replaces -2)
   (rewrite "finite_union"))


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 "Ren?")
   (split)
   (("1"
     (expand* "subset?" "member")
     (skolem 1 "z1")
     (flatten)
     (expand* "Ran" "member")
     (skolem -1 "z2")
     (flatten)
     (typepred "Rhop(rho, x, y)(z2)")
     (expand "V")
     (assert))
    ("2"
     (typepred "rho")
     (expand* "Ren?" "bijective?" "injective?" "surjective?")
     (flatten)
     (expand "restrict")
     (split)
     (("1"
       (skosimp*)
       (lemma "Rhop_Dom")
       (inst?)
       (assert)
       (decompose-equality -1)
       (expand "Rhop" -2)
       (lift-if)
       (lift-if)
       (prop)
       (("1"
         (inst -5 "x1!1" "x2!1")
         (("1" (assert))
          ("2"
           (inst -2 "x2!1")
           (iff)
           (typepred "x2!1")
           (prop)
           (expand* "union" "member")
           (prop)
           (expand "singleton")
           (assert))
          ("3"
           (inst -2 "x1!1")
           (iff)
           (typepred "x1!1")
           (prop)
           (expand* "union" "member")
           (prop)
           (expand "singleton")
           (assert))))
        ("2"
         (expand "Ran" 5)
         (inst 5 "x1!1")
         (expand "member")
         (assert)
         (inst -3 "x1!1")
         (iff)
         (typepred "x1!1")
         (prop)
         (expand* "union" "member")
         (expand "singleton")
         (assert))
        ("3"
         (expand "Ran" 4)
         (inst 4 "x2!1")
         (assert)
         (expand "member")
         (inst -3 "x2!1")
         (iff)
         (typepred "x2!1")
         (prop)
         (expand* "union" "member")
         (expand "singleton")
         (assert))))
      ("2"
       (skosimp*)
       (case-replace "y!1 = y")
       (("1"
         (inst 1 "x")
         (("1" (expand "Rhop" 1) (propax))
          ("2"
           (lemma "Rhop_Dom")
           (inst?)
           (assert)
           (decompose-equality -1)
           (inst -1 "x")
           (expand* "union" "member")
           (expand "singleton")
           (propax))))
        ("2"
         (inst -4 "y!1")
         (("1"
           (skosimp*)
           (inst 2 "x!1")
           (("1" (expand "Rhop" 2) (lift-if) (assert))
            ("2"
             (typepred "x!1")
             (lemma "Rhop_Dom")
             (inst?)
             (assert)
             (decompose-equality -1)
             (inst -1 "x!1")
             (expand* "union" "member"))))
          ("2"
           (lemma "Rhop_Ran")
           (inst?)
           (assert)
           (decompose-equality -1)
           (typepred "y!1")
           (inst -2 "y!1")
           (iff)
           (prop)
           (expand* "union" "member")
           (expand "singleton")
           (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:
  (""
   (measure-induct+ "length(p)" "p")
   (skeep)
   (expand "positionsOF" 1)
   (lift-if)
   (prop)
   (("1"
     (hide -2)
     (expand "positionsOF")
     (lift-if)
     (prop)
     (expand "only_empty_seq")
     (grind))
    ("2"
     (hide -2)
     (expand "positionsOF")
     (lift-if)
     (prop)
     (expand "only_empty_seq")
     (grind))
    ("3"
     (expand* "union" "member" "only_empty_seq")
     (flatten)
     (expand "positionsOF" -2)
     (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 * "i1")
       (expand "catenate" -1)
       (skolem * "q1")
       (flatten)
       (expand "member")
       (lemma "seq_extras[posnat].seq_first_rest")
       (inst -1 "x!1")
       (prop)
       (("1"
         (lemma "seq_extras[posnat].first_equal")
         (inst -1 "rest(x!1)" "q1" "first(x!1)" "i1")
         (assert)
         (flatten)
         (replace -2 * rl)
         (hide -3)
         (inst -5 "rest(x!1)")
         (inst 5 "i1")
         (("1"
           (expand "catenate")
           (inst 5 "rest(x!1)")
           (expand "member")
           (assert)
           (inst -5 "args(s)(i1 - 1)" "sigma")
           (prop)
           (("1"
             (case-replace
              "ext(sigma)(args(s)(i1 - 1)) = args(ext(sigma)(s))(i1 - 1)")
             (hide-all-but 1)
             (expand "finseq_appl")
             (grind))
            ("2" (rewrite "length_rest") (prop) (rewrite "empty_0"))))
          ("2" (typepred "i1") (expand "ext" 1) (propax))))
        ("2" (rewrite "empty_0"))))))))


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:
  (""
   (measure-induct+ "length(p)" "p")
   (("1"
     (skeep)
     (expand "positionsOF" -2)
     (lift-if)
     (prop)
     (("1"
       (expand "only_empty_seq")
       (lemma "fsepn.empty_0")
       (inst?)
       (assert)
       (expand "subtermOF" (-5 1))
       (propax))
      ("2"
       (expand "only_empty_seq")
       (lemma "fsepn.empty_0")
       (inst?)
       (assert)
       (expand "subtermOF" (-5 2))
       (propax))
      ("3"
       (expand* "union" "member" "only_empty_seq")
       (prop)
       (("1"
         (lemma "fsepn.empty_0")
         (inst?)
         (assert)
         (expand "subtermOF" (-4 3))
         (propax))
        ("2"
         (expand "IUnion")
         (skolem * "i1")
         (expand "catenate")
         (skolem * "y1")
         (expand "member")
         (flatten)
         (expand "subtermOF" 3)
         (lift-if)
         (prop)
         (lemma "fsepn.seq_first_rest")
         (inst?)
         (assert)
         (replace -1 -3)
         (lemma "fsepn.first_equal")
         (inst -1 "rest(x!1)" "y1" "first(x!1)" "i1")
         (assert)
         (flatten)
         (inst -6 "rest(x!1)")
         (inst -6 "args(s)(i1 - 1)" "sigma")
         (replace -1 * rl)
         (replace -2 * rl)
         (prop)
         (("1"
           (case-replace
            "ext(sigma)(args(s)(first(x!1) - 1)) = args(ext(sigma)(s))(first(x!1) - 1)")
           (hide-all-but 1)
           (expand "finseq_appl")
           (grind))
          ("2" (rewrite "length_rest"))))))))
    ("2" (hide-all-but (-1 1)) (rewrite "ext_preserv_pos"))
    ("3" (rewrite "ext_preserv_pos"))))


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:
  (""
   (measure-induct+ "length(p)" "p")
   (("1"
     (skeep)
     (expand "replaceTerm" 1)
     (lift-if)
     (prop)
     (expand "ext" 2 1)
     (lift-if)
     (prop)
     (("1"
       (decompose-equality 1)
       (("1"
         (expand "ext" 1)
         (lift-if)
         (assert)
         (prop)
         (hide-all-but (-1 -4 2))
         (expand "positionsOF")
         (lift-if)
         (prop)
         (expand "only_empty_seq")
         (rewrite "empty_0"))
        ("2"
         (hide -2)
         (grind)
         (("1"
           (hide (-1 1))
           (expand "positionsOF")
           (lift-if)
           (prop)
           (("1"
             (expand "only_empty_seq")
             (lemma "fsepn.empty_0")
             (inst?)
             (assert))
            ("2"
             (expand "only_empty_seq")
             (lemma "fsepn.empty_0")
             (inst?)
             (assert))))
          ("2"
           (hide 2)
           (expand "positionsOF")
           (lift-if)
           (prop)
           (("1"
             (expand "only_empty_seq")
             (lemma "fsepn.empty_0")
             (inst?)
             (assert))
            ("2"
             (expand "only_empty_seq")
             (lemma "fsepn.empty_0")
             (inst?)
             (assert))))))))
      ("2"
       (decompose-equality 2)
       (("1"
         (hide -1)
         (expand "ext")
         (lift-if)
         (prop)
         (("1"
           (hide (1 2))
           (expand "positionsOF")
           (lift-if)
           (prop)
           (expand "only_empty_seq")
           (lemma "fsepn.empty_0")
           (inst?)
           (assert))
          ("2" (assert))))
        ("2"
         (expand "replace" 1 3)
         (lift-if)
         (prop)
         (("1"
           (hide (-2 1 2))
           (lemma "ext_preserv_pos")
           (inst?)
           (inst?)
           (assert)
           (hide -3)
           (expand "positionsOF")
           (lift-if)
           (prop)
           (("1"
             (expand "only_empty_seq")
             (lemma "fsepn.empty_0")
             (inst?)
             (assert))
            ("2"
             (expand "only_empty_seq")
             (lemma "fsepn.empty_0")
             (inst?)
             (assert))))
          ("2"
           (decompose-equality 2)
           (("1"
             (expand "replace" 1 1)
             (lift-if)
             (expand "ext" 1)
             (lift-if)
             (prop)
             (("1"
               (hide-all-but (-1 -3 4))
               (expand "positionsOF")
               (lift-if)
               (prop)
               (expand "only_empty_seq")
               (lemma "fsepn.empty_0")
               (inst?)
               (assert))
              ("2" (assert))))
            ("2"
             (decompose-equality 1)
             (("1"
               (lift-if)
               (prop)
               (("1"
                 (expand "finseq_appl")
                 (grind)
                 (expand "ext" 1)
                 (lift-if)
                 (lift-if)
                 (prop)
                 (("1" (grind)) ("2" (grind)) ("3" (grind)) ("4" (grind))
                  ("5" (grind)) ("6" (grind))))
                ("2"
                 (replaces -1)
                 (lemma "fset.nth_x")
                 (inst -1 "args(s)"
                  "replaceTerm(args(s)(first(x!1) - 1), t, rest(x!1))"
                  "first(x!1) - 1")
                 (replaces -1)
                 (inst -1 "rest(x!1)")
                 (inst -1 "args(s)(first(x!1) - 1)" "sigma" "t")
                 (rewrite "length_rest")
                 (prop)
                 (("1"
                   (case-replace
                    "ext(sigma)(args(s)(first(x!1) - 1)) = args(ext(sigma)(s))(first(x!1) - 1)")
                   (hide-all-but (-2 1 4 6))
                   (expand "ext" 1 2)
                   (lift-if)
                   (prop)
                   (("1"
                     (expand "positionsOF")
                     (lift-if)
                     (prop)
                     (expand "only_empty_seq")
                     (lemma "fsepn.empty_0")
                     (inst?)
                     (assert))
                    ("2"
                     (expand "positionsOF")
                     (lift-if)
                     (prop)
                     (expand "only_empty_seq")
                     (lemma "fsepn.empty_0")
                     (inst?)
                     (assert))
                    ("3" (expand "finseq_appl") (propax))))
                  ("2" (lemma "rest_of_positions") (inst?) (assert))))
                ("3"
                 (expand "finseq_appl")
                 (grind)
                 (expand "ext" 2)
                 (lift-if)
                 (lift-if)
                 (prop)
                 (("1" (grind)) ("2" (grind)) ("3" (grind)) ("4" (grind))
                  ("5" (grind)) ("6" (grind))))))
              ("2"
               (skosimp*)
               (prop)
               (("1"
                 (grind)
                 (case-replace
                  "length(args(ext(sigma)(s))) = args(s)`length")
                 (expand "ext" 1)
                 (lift-if)
                 (grind))
                ("2"
                 (grind)
                 (case-replace
                  "length(args(ext(sigma)(s))) = args(s)`length")
                 (expand "ext" 1)
                 (lift-if)
                 (grind))))
              ("3"
               (skosimp*)
               (lemma "ext_preserv_pos")
               (inst?)
               (inst?)
               (assert)
               (lemma "rest_of_positions")
               (inst?)
               (assert))
              ("4" (skosimp*) (assert))))
            ("3"
             (hide 3)
             (skosimp*)
             (prop)
             (("1"
               (grind)
               (case-replace
                "length(args(ext(sigma)(s))) = args(s)`length")
               (expand "ext" 1)
               (lift-if)
               (grind))
              ("2"
               (grind)
               (case-replace
                "length(args(ext(sigma)(s))) = args(s)`length")
               (expand "ext" 1)
               (grind))))
            ("4"
             (hide (-1 3))
             (skosimp*)
             (lemma "ext_preserv_pos")
             (inst?)
             (inst?)
             (assert)
             (lemma "rest_of_positions")
             (inst?)
             (assert))
            ("5" (hide (-1 3)) (skosimp*) (assert))))))))))
    ("2" (hide (-2 -3 2)) (rewrite "ext_preserv_pos"))
    ("3" (hide 2) (rewrite "ext_preserv_pos"))))


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)
     (decompose-equality)
     (iff)
     (prop)
     (("1"
       (expand "union")
       (prop)
       (expand "member")
       (hide 1)
       (inst 1 "empty_seq" "x!1")
       (rewrite "empty_o_seq")
       (expand "subtermOF")
       (assert)
       (rewrite "empty_0")
       (assert)
       (hide -1)
       (expand "positionsOF")
       (expand "only_empty_seq")
       (propax))
      ("2"
       (expand* "union" "member")
       (prop)
       (("1" (rewrite "ext_preserv_pos"))
        ("2"
         (skosimp*)
         (expand "ext")
         (assert)
         (expand "positionsOF" -2)
         (expand "only_empty_seq")
         (expand "subtermOF")
         (rewrite "empty_0")
         (assert)
         (replaces -2)
         (rewrite "empty_o_seq")
         (assert))))))
    ("2"
     (skeep)
     (skeep)
     (decompose-equality 1)
     (iff)
     (split)
     (("1"
       (flatten)
       (expand* "union" "member")
       (prop)
       (("1"
         (expand "positionsOF" -1)
         (lift-if)
         (prop)
         (("1" (hide-all-but (-2 1)) (expand "positionsOF") (grind))
          ("2" (hide-all-but (-2 2)) (grind))
          ("3"
           (expand* "union" "member")
           (expand "IUnion")
           (prop)
           (("1" (hide-all-but (-1 3)) (grind))
            ("2"
             (skosimp*)
             (expand "catenate")
             (skosimp*)
             (expand "member")
             (inst -3 "i!1 - 1")
             (("1"
               (inst -3 "sigma")
               (decompose-equality -3)
               (expand "finseq_appl")
               (expand "ext" -2)
               (prop)
               (("1" (grind))
                ("2"
                 (expand "finseq_appl")
                 (inst -2 "x!2")
                 (iff)
                 (prop)
                 (("1"
                   (hide (-3 6))
                   (expand "positionsOF" 5)
                   (assert)
                   (expand* "union" "member")
                   (prop)
                   (expand "IUnion")
                   (inst 6 "i!1")
                   (("1"
                     (expand "catenate")
                     (inst 6 "x!2")
                     (expand* "member" "finseq_appl"))
                    ("2" (typepred "i!1") (grind))))
                  ("2"
                   (skosimp*)
                   (inst 5 "add_first(i!1, p1!1)" "p2!1")
                   (prop)
                   (("1"
                     (lemma "fsepn.add_first_compo")
                     (inst -1 "p1!1" "p2!1" "i!1")
                     (assert))
                    ("2"
                     (expand "positionsOF" 1)
                     (assert)
                     (expand* "union" "member")
                     (prop)
                     (expand "IUnion")
                     (inst 2 "i!1")
                     (("1"
                       (expand "catenate")
                       (inst 2 "p1!1")
                       (expand* "member" "finseq_appl"))
                      ("2" (typepred "i!1") (grind))))
                    ("3"
                     (expand "subtermOF" 1)
                     (lift-if)
                     (prop)
                     (("1" (hide-all-but -1) (grind))
                      ("2"
                       (lemma "fsepn.rest_add_first")
                       (inst -1 "p1!1" "i!1")
                       (rewrite "fsepn.first_add")
                       (replaces -1)
                       (expand "finseq_appl")
                       (propax))))
                    ("4"
                     (expand "subtermOF" 1)
                     (prop)
                     (("1" (hide-all-but -1) (grind))
                      ("2"
                       (expand "finseq_appl")
                       (lemma "fsepn.rest_add_first")
                       (inst -1 "p1!1" "i!1")
                       (rewrite "fsepn.first_add")
                       (replaces -1))))))))))
              ("2" (hide-all-but 1) (typepred "i!1") (grind))))))))
        ("2"
         (expand "positionsOF" -2)
         (lift-if)
         (prop)
         (("1"
           (expand "only_empty_seq")
           (hide -4)
           (inst 1 "x!1" "x!1")
           (prop)
           (("1" (hide-all-but (-2 1)) (grind))
            ("2"
             (expand "positionsOF")
             (prop)
             (("1" (expand "only_empty_seq") (propax))
              ("2"
               (expand* "union" "member")
               (prop)
               (expand "only_empty_seq")
               (propax))))
            ("3"
             (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))))))
          ("2" (expand "only_empty_seq") (hide -4) (grind))
          ("3"
           (expand* "union" "member")
           (prop)
           (("1" (expand "only_empty_seq") (hide -3) (grind))
            ("2"
             (expand "IUnion")
             (skosimp*)
             (expand "catenate")
             (skosimp*)
             (expand "member")
             (inst -4 "i!1 - 1")
             (("1"
               (inst -4 "sigma")
               (decompose-equality -4)
               (expand "finseq_appl")
               (expand "ext" -2)
               (prop)
               (("1" (grind))
                ("2"
                 (expand "finseq_appl")
                 (inst -2 "x!2")
                 (iff)
                 (prop)
                 (("1"
                   (hide -3)
                   (inst 5 "x!1" "empty_seq")
                   (prop)
                   (("1" (rewrite "seq_o_empty"))
                    ("2"
                     (expand "positionsOF" 1)
                     (assert)
                     (expand* "union" "member")
                     (prop)
                     (expand "IUnion")
                     (inst 2 "i!1")
                     (("1"
                       (expand "catenate")
                       (inst 2 "x!2")
                       (expand* "member" "finseq_appl"))
                      ("2" (typepred "i!1") (grind))))
                    ("3"
                     (hide-all-but 1)
                     (expand "positionsOF")
                     (lift-if)
                     (expand "only_empty_seq")
                     (prop)
                     (expand* "union" "member"))))
                  ("2"
                   (skosimp*)
                   (inst 4 "add_first(i!1, p1!1)" "p2!1")
                   (prop)
                   (("1"
                     (lemma "fsepn.add_first_compo")
                     (inst -1 "p1!1" "p2!1" "i!1")
                     (assert))
                    ("2"
                     (expand "positionsOF" 1)
                     (assert)
                     (expand* "union" "member")
                     (prop)
                     (expand "IUnion")
                     (inst 2 "i!1")
                     (("1"
                       (expand "catenate")
                       (inst 2 "p1!1")
                       (expand* "member" "finseq_appl"))
                      ("2" (typepred "i!1") (grind))))
                    ("3"
                     (expand "subtermOF" 1)
                     (lift-if)
                     (prop)
                     (("1" (hide-all-but -1) (grind))
                      ("2"
                       (lemma "fsepn.rest_add_first")
                       (inst -1 "p1!1" "i!1")
                       (rewrite "fsepn.first_add")
                       (replaces -1)
                       (expand "finseq_appl")
                       (propax))))
                    ("4"
                     (expand "subtermOF" 1)
                     (prop)
                     (("1" (hide-all-but -1) (grind))
                      ("2"
                       (expand "finseq_appl")
                       (lemma "fsepn.rest_add_first")
                       (inst -1 "p1!1" "i!1")
                       (rewrite "fsepn.first_add")
                       (replaces -1))))))))))
              ("2" (hide-all-but 1) (typepred "i!1") (grind))))))))))
      ("2"
       (flatten)
       (expand* "union" "member")
       (prop)
       (("1" (rewrite "ext_preserv_pos"))
        ("2"
         (skosimp*)
         (replaces -1)
         (lemma "ext_preserv_pos")
         (inst -1 "p1!1" "app(app1_var, app2_var)" "sigma")
         (assert)
         (hide -5)
         (lemma "subterm_ext_commute")
         (inst -1 "p1!1" "app(app1_var, app2_var)" "sigma")
         (assert)
         (replace -1 -5 rl)
         (hide (-1 -4))
         (rewrite "pos_o_term"))))))))


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")
     (typepred "rho")
     (expand* "Ren?" "bijective?" "injective?" "surjective?")
     (flatten)
     (case "member(vars(vars1_var), Dom(rho))")
     (("1"
       (hide (-4 -5))
       (expand* "subset?" "Ran" "member")
       (inst -3 "rho(vars(vars1_var))")
       (prop)
       (("1" (expand "V") (expand "positionsOF") (assert))
        ("2" (inst 1 "vars(vars1_var)"))))
      ("2" (grind))))
    ("2"
     (skeep)
     (skeep)
     (expand "positionsOF" 1)
     (lift-if)
     (lift-if)
     (prop)
     (("1" (grind)) ("2" (grind))
      ("3"
       (decompose-equality 2)
       (lift-if)
       (expand "union")
       (prop)
       (("1" (grind)) ("2" (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:
  (""
   (skeep)
   (prop)
   (("1"
     (lemma "ext_preserv_pos")
     (inst -1 "p" "t" "sigma")
     (assert)
     (lemma "subterm_ext_commute")
     (inst -1 "p" "t" "sigma")
     (assert)
     (replace -1 -4 rl)
     (lemma "pos_o_term")
     (inst?)
     (assert)
     (lemma "pos_subterm")
     (inst?)
     (assert))
    ("2"
     (lemma "subterm_ext_commute")
     (inst -1 "p" "t" "sigma")
     (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:
  (""
   (induct "t")
   (("1"
     (skosimp*)
     (rewrite "Vars_is_var")
     (expand* "subset?" "member" "Vars")
     (skosimp*)
     (inst -1 "vars(vars1_var!1)")
     (("1"
       (skolem-typepred)
       (typepred "p!1")
       (expand "ext" -1)
       (typepred "rho!1")
       (expand "Ren?")
       (flatten)
       (hide -3)
       (expand* "subset?" "member")
       (inst -2 "rho!1(vars(vars1_var!1))")
       (prop)
       (("1"
         (expand "V")
         (expand "positionsOF" -3)
         (assert)
         (expand "only_empty_seq")
         (replaces -3)
         (expand "subtermOF" -5)
         (rewrite "empty_0")
         (inst 1 "p!2")
         (("1"
           (lemma "subterm_ext_commute")
           (inst -1 "p!2" "s!1" "rho!1")
           (assert))
          ("2" (hide-all-but (-3 1)) (rewrite "ext_preserv_pos"))))
        ("2"
         (expand* "Ran" "member")
         (inst 1 "vars(vars1_var!1)")
         (expand "Dom")
         (prop)
         (inst 1 "p!2")
         (("1"
           (lemma "subterm_ext_commute")
           (inst -1 "p!2" "s!1" "rho!1")
           (assert)
           (replaces -6)
           (expand "ext" -1 2)
           (replaces -1)
           (hide-all-but (-3 -5 1))
           (expand "positionsOF")
           (expand "only_empty_seq")
           (replaces -1)
           (expand* "subtermOF" "ext")
           (rewrite "empty_0"))
          ("2" (hide-all-but (-4 1)) (rewrite "ext_preserv_pos"))))))
      ("2" (expand "V") (propax))))
    ("2"
     (skosimp*)
     (lemma "vars_term_is_union")
     (inst?)
     (assert)
     (replaces -1)
     (lemma "vars_term_is_union")
     (inst -1 "ext(rho!1)(app(app1_var!1, app2_var!1))")
     (lift-if)
     (prop)
     (("1"
       (expand "ext" -1)
       (lift-if)
       (prop)
       (("1" (hide-all-but (-1 -2)) (grind))
        ("2" (hide-all-but -1) (grind))))
      ("2"
       (expand "finseq_appl")
       (replaces -1)
       (expand* "subset?" "member")
       (skosimp*)
       (expand "IUnion" -3)
       (skosimp*)
       (inst -1 "i!1")
       (("1"
         (inst?)
         (prop)
         (("1"
           (inst -1 "x!1")
           (assert)
           (hide-all-but (-2 1))
           (case-replace
            "args(ext(rho!1)(app(app1_var!1, app2_var!1)))`seq(i!1) = ext(rho!1)(app2_var!1`seq(i!1))")
           (hide (-1 2))
           (expand "ext")
           (lift-if)
           (lift-if)
           (prop)
           (("1" (typepred "i!1") (grind)) ("2" (typepred "i!1") (grind))
            ("3"
             (expand "finseq_appl")
             (lift-if)
             (prop)
             (("1" (typepred "i!1") (grind))
              ("2" (typepred "i!1") (grind))
              ("3"
               (decompose-equality 2)
               (("1" (grind))
                ("2"
                 (decompose-equality 1)
                 (("1" (grind))
                  ("2"
                   (decompose-equality 1)
                   (("1" (grind)) ("2" (skosimp*) (grind))))))
                ("3" (grind)) ("4" (grind))))))))
          ("2"
           (skosimp*)
           (inst -2 "x!2")
           (prop)
           (expand "IUnion")
           (inst 1 "i!1"))))
        ("2" (hide (-1 -2)) (typepred "i!1") (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"
     (skosimp*)
     (expand "ext")
     (rewrite "Vars_is_var")
     (expand "member")
     (assert))
    ("2"
     (skosimp*)
     (expand "ext" -2)
     (lift-if)
     (prop)
     (("1"
       (hide -2)
       (expand "member")
       (typepred "x!1")
       (expand "V")
       (grind))
      ("2"
       (decompose-equality -1)
       (decompose-equality -1)
       (expand "finseq_appl")
       (expand "member")
       (expand "Vars" -3)
       (skosimp*)
       (expand "subtermOF")
       (lift-if)
       (prop)
       (("1" (hide-all-but -2) (typepred "x!1") (expand "V") (grind))
        ("2"
         (expand "finseq_appl")
         (inst -2 "first(p!1) - 1")
         (("1"
           (inst -3 "first(p!1) - 1")
           (("1"
             (inst?)
             (assert)
             (inst?)
             (prop)
             (expand "Vars")
             (inst 1 "rest(p!1)"))
            ("2" (assert))))
          ("2" (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:
  (""
   (induct "t")
   (("1"
     (skosimp*)
     (expand "ext")
     (inst?)
     (assert)
     (expand "member")
     (rewrite "Vars_is_var")
     (assert))
    ("2"
     (skosimp*)
     (expand "ext" 1)
     (lift-if)
     (prop)
     (decompose-equality 2)
     (decompose-equality 1)
     (expand "finseq_appl")
     (inst?)
     (assert)
     (hide 1)
     (skosimp*)
     (inst?)
     (assert)
     (expand "member")
     (expand "Vars")
     (hide 2)
     (skosimp*)
     (inst 2 "add_first(x!1 + 1, p!1)")
     (("1"
       (expand "subtermOF" 2)
       (lift-if)
       (prop)
       (("1" (hide -2) (grind))
        ("2"
         (expand "finseq_appl")
         (lemma "fsepn.rest_add_first")
         (inst -1 "p!1" "1 + x!1")
         (rewrite "first_add")
         (assert))))
      ("2"
       (expand "positionsOF")
       (expand "union")
       (prop)
       (hide 1)
       (expand "member")
       (expand "IUnion")
       (inst 1 "1 + x!1")
       (expand "catenate")
       (inst 1 "p!1")
       (expand "finseq_appl")
       (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:
  (""
   (skosimp*)
   (typepred "rho!1")
   (hide -1)
   (expand "Ren?")
   (flatten)
   (hide -2)
   (expand* "subset?" "member" "V")
   (inst -1 "t!1")
   (assert)
   (typepred "x!1")
   (expand "V")
   (expand "ext")
   (lift-if)
   (prop)
   (("1" (assert)) ("2" (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:
  (""
   (skosimp*)
   (expand "restrict")
   (expand* "subset?" "member")
   (skosimp*)
   (expand "Vars" -2)
   (skosimp*)
   (lemma "rename_preserv_pos")
   (inst?)
   (typepred "p!1")
   (decompose-equality -2)
   (inst -1 "p!1")
   (assert)
   (hide -2)
   (lemma "subterm_ext_commute")
   (inst -1 "p!1" "t!1" "rho!1")
   (assert)
   (replaces -1)
   (expand "positionsOF")
   (lift-if)
   (prop)
   (("1"
     (expand* "only_empty_seq" "subtermOF")
     (rewrite "empty_0")
     (assert)
     (expand "ext")
     (lemma "Vars_is_var")
     (inst?)
     (assert)
     (replaces -1)
     (expand "Ran")
     (inst 1 "t!1")
     (expand "member")
     (decompose-equality -3)
     (inst -1 "t!1"))
    ("2"
     (expand* "only_empty_seq" "subtermOF")
     (rewrite "empty_0")
     (assert)
     (lemma "term_is_a_var")
     (inst?)
     (assert))
    ("3"
     (expand* "union" "member")
     (prop)
     (("1"
       (expand* "only_empty_seq" "subtermOF")
       (rewrite "empty_0")
       (assert)
       (lemma "term_is_a_var")
       (inst?)
       (assert))
      ("2"
       (expand "IUnion")
       (skosimp*)
       (expand "catenate")
       (skosimp*)
       (expand "member")
       (expand "finseq_appl")
       (expand "subtermOF")
       (lift-if)
       (prop)
       (("1" (replaces -4) (hide-all-but -1) (grind))
        ("2"
         (expand "finseq_appl")
         (replace -3 -1)
         (rewrite "rest_add_first")
         (rewrite "first_add")
         (lemma "term_is_a_var")
         (inst?)
         (assert)
         (expand "Ran")
         (expand "ext" -2)
         (inst 4 "subtermOF(args(t!1)`seq(i!1 - 1), x!2)")
         (assert)
         (expand "member")
         (case "Vars(t!1)(subtermOF(args(t!1)`seq(i!1 - 1), x!2))")
         (("1" (decompose-equality -6) (inst?) (assert))
          ("2"
           (hide (-2 -5 5))
           (expand* "Vars" "V")
           (inst 1 "p!1")
           (expand "subtermOF" 1 1)
           (expand "finseq_appl")
           (replace -3 1)
           (rewrite "rest_add_first")
           (rewrite "first_add"))))))))))


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:
  (""
   (measure-induct+ "card(V1)" "V1")
   (skolem-typepred)
   (typepred "x!1")
   (case "card(x!1) = 0")
   (("1"
     (lemma "finite_sets[(V)].empty_card")
     (inst?)
     (assert)
     (hide (-3 -4 -5))
     (inst 1 "identity")
     (("1"
       (splash 1)
       (("1"
         (case-replace
          " restrict[term[variable, symbol, arity], ((V[variable, symbol, arity])),
                                               boolean]
                                              (Ran(identity)) = emptyset")
         (("1"
           (lemma "intersection_empty")
           (inst -1 "V2!1")
           (expand "disjoint?")
           (grind))
          ("2"
           (replace -1 -2 rl)
           (hide (-1 -3 2))
           (decompose-equality 1)
           (expand "Ran")
           (expand "restrict")
           (grind))))
        ("2" (decompose-equality 1) (expand "Dom") (grind))))
      ("2" (rewrite "iden_subs") (rewrite "iden_rename"))))
    ("2"
     (lemma "finite_sets[(V)].empty_card")
     (inst?)
     (assert)
     (lemma "sets_lemmas[(V)].choose_rest")
     (inst?)
     (assert)
     (inst -4 "rest(x!1)")
     (inst -4 "V2!1")
     (lemma "finite_sets[(V)].card_rest")
     (inst?)
     (assert)
     (skosimp*)
     (lemma "exists_var")
     (inst -1 "x!1" "union(Ran(rho!1), V2!1)")
     (("1"
       (skosimp*)
       (expand "member")
       (expand* "union" "member")
       (flatten)
       (expand "restrict" 2)
       (flatten)
       (expand "extend")
       (name-replace "y!1" "choose(x!1)")
       (case "y!1 /= z!1")
       (("1"
         (prop)
         (inst 7 "Rhop(rho!1, y!1, z!1)")
         (("1"
           (split)
           (("1"
             (hide -6)
             (lemma "Rhop_Dom")
             (inst?)
             (prop)
             (("1" (replace -6 -1) (rewrite "add_as_union") (assert))
              ("2"
               (replace -6 -1)
               (hide-all-but (-1 6))
               (expand* "rest" "y!1")
               (expand "remove")
               (propax))))
            ("2"
             (lemma "Rhop_Ran")
             (inst?)
             (prop)
             (("1"
               (replaces -1)
               (expand "disjoint?")
               (expand "empty?")
               (skosimp*)
               (expand "member")
               (expand "intersection")
               (expand "member")
               (flatten)
               (expand "restrict")
               (inst -9 "x!2")
               (assert)
               (case "x!2 = z!1")
               (("1" (assert))
                ("2" (expand* "union" "member" "singleton"))))
              ("2"
               (replace -6 -1)
               (hide-all-but (-1 6))
               (expand* "rest" "y!1" "remove"))))))
          ("2"
           (rewrite "Rhop_Subs")
           (("1"
             (rewrite "Rhop_Ren")
             (replace -6 -1)
             (hide-all-but (-1 6))
             (expand "y!1")
             (expand "rest")
             (expand "remove")
             (propax))
            ("2"
             (replace -6 -1)
             (hide-all-but (-1 6))
             (expand* "rest" "y!1")
             (expand "remove")
             (propax))))))
        ("2" (prop) (typepred "y!1") (assert))))
      ("2"
       (hide (-6 4))
       (lemma "range_finite")
       (inst?)
       (lemma
        "restrict_set_props[term[variable, symbol, arity], ((V[variable, symbol, arity]))].restrict_finite")
       (inst?)
       (assert)
       (hide 2)
       (rewrite "finite_union"))))))


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*)
   (typepred "fst!1")
   (expand "SPP?")
   (flatten)
   (rewrite "add_first_parallel_pos_to_PP_is_PP")
   (hide -1)
   (hide -2)
   (expand "SP?")
   (skosimp*)
   (lemma "fspos.nth_add_first")
   (inst?)
   (inst?)
   (("1"
     (prop)
     (("1" (replaces -2) (typepred "p!1") (rewrite "ext_preserv_pos"))
      ("2"
       (replaces -1)
       (inst -1 "i!1 - 1")
       (("1" (rewrite "ext_preserv_pos"))
        ("2" (hide 3) (typepred "i!1") (grind))))))
    ("2" (hide (-1 2)) (typepred "i!1") (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:
  (""
   (skosimp*)
   (typepred "fst!1")
   (expand "SPP?")
   (flatten)
   (assert)
   (hide -1)
   (expand "SP?")
   (skosimp*)
   (inst -1 "i!1")
   (rewrite "ext_preserv_pos"))


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 1 ("t" "fst"))
   (flatten)
   (case "length(rest(fst)) = 0")
   (("1" (grind))
    ("2"
     (skosimp*)
     (lemma "fspos.rest_pos")
     (inst -1 "fst")
     (assert)
     (inst -1 "i!1")
     (("1"
       (expand "finseq_appl")
       (typepred "fst")
       (expand* "SPP?" "PP?")
       (flatten)
       (hide -2)
       (prop)
       (("1" (grind))
        ("2"
         (inst -1 "i!1 + 1" "0")
         (("1" (assert) (expand "finseq_appl") (assert))
          ("2" (hide (-1 4)) (typepred "i!1") (grind))))))
      ("2" (hide 4) (typepred "i!1") (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:
  (""
   (skolem 1 ("t" "fst" "p"))
   (flatten)
   (case "length(rest(fst)) = 0")
   (("1" (hide -2) (grind))
    ("2"
     (skosimp*)
     (lemma "fspos.rest_pos")
     (inst?)
     (assert)
     (inst -1 "i!1")
     (("1"
       (expand "finseq_appl")
       (inst -2 "i!1 + 1")
       (("1" (assert)) ("2" (hide (-1 3)) (typepred "i!1") (grind))))
      ("2" (hide 3) (typepred "i!1") (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"
     (skosimp*)
     (expand* "Dom" "member")
     (expand "Vars" -3)
     (skosimp*)
     (case "Dom(sigma!1)(vars(vars1_var!1))")
     (("1"
       (expand "Dom")
       (prop)
       (inst -1 "sigma!1(vars(vars1_var!1))")
       (prop)
       (("1"
         (expand "Vars")
         (inst 1 "p!1")
         (("1" (expand "ext") (propax))
          ("2" (typepred "p!1") (expand "ext") (propax))))
        ("2"
         (expand "Ran")
         (expand "ext")
         (inst 1 "vars(vars1_var!1)")
         (expand "member")
         (expand "Dom")
         (assert))))
      ("2"
       (expand "Dom")
       (assert)
       (prop)
       (typepred "p!1")
       (expand "ext")
       (expand "positionsOF")
       (expand "only_empty_seq")
       (replaces -1)
       (expand "subtermOF")
       (lift-if)
       (prop)
       (("1"
         (inst -4 "sigma!1(vars(vars1_var!1))")
         (prop)
         (("1"
           (expand "Vars")
           (inst 1 "empty_seq")
           (("1" (expand "subtermOF") (lift-if) (prop))
            ("2"
             (expand "positionsOF")
             (expand "only_empty_seq")
             (propax))))
          ("2"
           (expand "Ran")
           (inst 1 "x!1")
           (prop)
           (("1" (assert)) ("2" (assert))))))
        ("2"
         (expand "finseq_appl")
         (hide-all-but 1)
         (rewrite "empty_0"))))
      ("3" (expand "V") (propax))))
    ("2"
     (skosimp*)
     (expand "member")
     (lemma "vars_term_is_union")
     (inst?)
     (lift-if)
     (prop)
     (("1"
       (expand "Vars" -6)
       (skosimp*)
       (hide -2)
       (expand "subtermOF" -5)
       (lift-if)
       (prop)
       (("1"
         (expand "ext" -2)
         (lift-if)
         (prop)
         (("1"
           (hide-all-but (-1 -2))
           (typepred "x!1")
           (expand "V")
           (assert))
          ("2"
           (hide-all-but -1)
           (typepred "x!1")
           (expand "V")
           (assert))))
        ("2"
         (hide-all-but (-2 1))
         (typepred "p!1")
         (expand "positionsOF")
         (lift-if)
         (prop)
         (expand "only_empty_seq")
         (rewrite "empty_0"))))
      ("2"
       (decompose-equality -1)
       (inst -1 "x!1")
       (iff)
       (prop)
       (expand "IUnion")
       (skosimp*)
       (expand "finseq_appl")
       (inst -3 "i!1")
       (("1"
         (inst?)
         (assert)
         (prop)
         (case-replace
          "args(ext(sigma!1)(app(app1_var!1, app2_var!1)))`seq(i!1) = ext(sigma!1)(app2_var!1`seq(i!1))")
         (hide-all-but 1)
         (expand "ext" 1 1)
         (lift-if)
         (prop)
         (("1"
           (expand "ext")
           (lift-if)
           (prop)
           (("1" (typepred "i!1") (grind))
            ("2" (hide 2) (typepred "i!1") (grind))))
          ("2" (expand "finseq_appl") (propax))))
        ("2" (typepred "i!1") (hide-all-but (-1 1)) (grind))))))))


proof_type: t_proof
decl_type: tcc
library: TRS
theory: substitution
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skolem-typepred)
   (flatten)
   (skolem-typepred)
   (hide -4)
   (expand* "Ran" "member")
   (inst 1 "x1!1"))


proof_type: t_proof
decl_type: tcc
library: TRS
theory: substitution
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp*)
   (typepred "rho!1")
   (expand "Ren?")
   (flatten)
   (hide (-1 -3))
   (expand* "subset?" "member")
   (inst -1 "rho!1(z!1)")
   (assert)
   (expand* "Ran" "member")
   (inst 1 "z!1")
   (expand "Dom")
   (prop)
   (typepred "z!1")
   (expand "V")
   (assert))


proof_type: t_proof
decl_type: tcc
library: TRS
theory: substitution
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp*)
   (lemma "ext_preserv_pos")
   (inst -1 "p!1" "t!1" "sigma!1")
   (assert)
   (lemma "subterm_ext_commute")
   (inst -1 "p!1" "t!1" "sigma!1")
   (assert)
   (lemma "pos_o_term")
   (inst?)
   (assert))


proof_type: f_proof
decl_type: formula
library: TRS
theory: unification
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (expand "preorder?")
   (split)
   (("1"
     (expand "reflexive?")
     (skeep)
     (expand "<=")
     (inst 1 "identity")
     (("1" (decompose-equality) (expand "comp") (rewrite "ext_iden"))
      ("2" (rewrite "iden_subs"))))
    ("2"
     (expand "transitive?")
     (skeep)
     (expand "<=")
     (skosimp*)
     (inst 1 "comp(tau!2,tau!1)")
     (("1" (replaces -1) (replaces -1) (rewrite "o_ass"))
      ("2" (rewrite "subs_o"))))))


proof_type: f_proof
decl_type: formula
library: TRS
theory: unification
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp*)
   (typepred t!1)
   (expand unifiable)
   (skeep -1)
   (expand unifier)
   (replace -2 -1)
   (replace -3 -1)
   (expand ext)
   (lift-if)
   (assert)
   (decompose-equality -1)
   (grind))


proof_type: f_proof
decl_type: formula
library: TRS
theory: unification
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (assert)
   (flatten)
   (expand "resolving_diff" 1)
   (lift-if)
   (prop)
   (assert)
   (name-replace "k1"
    "min({kk: below[length(args(t!1))] |
                                NOT subtermOF(s!1,  #(1 + kk)) = subtermOF(t!1,  #(1 + kk))})")
   (("1"
     (name-replace "k" "1+k1")
     (case "resolving_diff(s!1, t!1) = add_first(k,
                                                         resolving_diff(subtermOF(s!1, #(k)), subtermOF(t!1, #(k))))")
     (("1"
       (hide 2)
       (replace -1 4)
       (rewrite "first_add[posnat]")
       (rewrite "rest_add_first[posnat]"))
      ("2"
       (hide-all-but (1 3))
       (reveal -2)
       (expand "resolving_diff" 1 1)
       (replace -1 1)
       (reveal -1)
       (assert))))
    ("2"
     (hide 3 6)
     (lemma "resolving_diff_TCC7")
     (inst -1 "s!1" "t!1" "f(s!1)" "args(s!1)")
     (case "s!1 = app(f(s!1), args(s!1))")
     (("1"
       (assert)
       (inst -2 "f(t!1)" "args(t!1)")
       (case "t!1 = app(f(t!1), args(t!1))")
       (("1" (assert)) ("2" (hide-all-but (1 3)) (decompose-equality))))
      ("2" (hide-all-but (1 5)) (decompose-equality))))
    ("3"
     (hide 3 6)
     (skosimp*)
     (lemma "positions_of_arg")
     (inst -1 "t!1" "kk!1")
     (assert))
    ("4"
     (hide 3 6)
     (skosimp*)
     (lemma "positions_of_arg")
     (inst -1 "s!1" "kk!1")
     (("1"
       (typepred "kk!1")
       (lemma "uni_diff_equal_length_arg")
       (inst -1 "s!1" "t!1" "f(s!1)" "args(s!1)")
       (case "s!1 = app(f(s!1), args(s!1))")
       (("1" (assert)) ("2" (hide-all-but (1 5)) (decompose-equality))))
      ("2"
       (typepred "kk!1")
       (lemma "uni_diff_equal_length_arg")
       (inst -1 "s!1" "t!1" "f(s!1)" "args(s!1)")
       (case "s!1 = app(f(s!1), args(s!1))")
       (("1"
         (assert)
         (inst -2 "f(t!1)" "args(t!1)")
         (case "t!1 = app(f(t!1), args(t!1))")
         (("1" (assert))
          ("2" (hide-all-but (1 4)) (decompose-equality))))
        ("2" (hide-all-but (1 6)) (decompose-equality))))))))


proof_type: f_proof
decl_type: formula
library: TRS
theory: unification
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (measure-induct+ "length(p)" "p")
   (skosimp)
   (expand "resolving_diff" -2)
   (lift-if)
   (prop)
   (("1"
     (hide -3)
     (replaces -2)
     (expand "positionsOF")
     (assert)
     (expand "only_empty_seq")
     (propax))
    ("2"
     (hide -3)
     (replaces -2)
     (expand "positionsOF")
     (assert)
     (expand "only_empty_seq")
     (propax))
    ("3"
     (hide -3)
     (replaces -2)
     (expand "positionsOF")
     (assert)
     (expand* "union" "only_empty_seq" "IUnion" "member"))
    ("4"
     (assert)
     (name-replace "k!11"
      "min({kk: below[length(args(t!1))] |
                           NOT subtermOF(s!1,  #(1 + kk)) = subtermOF(t!1,  #(1 + kk))})")
     (("1"
       (name-replace "k!1" "1+k!11")
       (inst -2
        "resolving_diff(subtermOF(s!1, #(k!1)), subtermOF(t!1, #(k!1)))"
        "subtermOF(s!1, #(k!1))" "subtermOF(t!1, #(k!1))")
       (replace -1 -2)
       (expand "add_first" -2)
       (expand "insert?" -2)
       (case "positionsOF(s!1)( #[posnat](k!1))")
       (("1"
         (rewrite "add_first_is_o")
         (lemma "pos_o_term")
         (inst?)
         (assert))
        ("2"
         (hide (-1 -2 5))
         (reveal -5)
         (replace -1 1 rl)
         (hide -1)
         (lemma "positions_of_arg")
         (inst -1 "s!1" "k!11")
         (("1" (assert))
          ("2"
           (typepred "k!11")
           (hide (-2 1 3))
           (lemma "uni_diff_equal_length_arg")
           (inst -1 "s!1" "t!1" "f(s!1)" "args(s!1)")
           (case "s!1 = app(f(s!1), args(s!1))")
           (("1"
             (assert)
             (hide -1)
             (inst -1 "f(t!1)" "args(t!1)")
             (case "t!1 = app(f(t!1), args(t!1))")
             (("1" (assert))
              ("2" (hide-all-but (1 3)) (decompose-equality))))
            ("2" (hide-all-but (1 5)) (decompose-equality))))))))
      ("2"
       (hide - 5)
       (lemma "resolving_diff_TCC7")
       (inst -1 "s!1" "t!1" "f(s!1)" "args(s!1)")
       (case "s!1 = app(f(s!1), args(s!1))")
       (("1"
         (assert)
         (hide -1)
         (inst -1 "f(t!1)" "args(t!1)")
         (case "t!1 = app(f(t!1), args(t!1))")
         (("1" (assert))
          ("2" (hide-all-but (1 3)) (decompose-equality))))
        ("2" (hide-all-but (1 5)) (decompose-equality))))
      ("3"
       (hide - 5)
       (skosimp*)
       (lemma "positions_of_arg")
       (inst -1 "t!1" "kk!1")
       (assert))
      ("4"
       (hide - 5)
       (skosimp*)
       (lemma "positions_of_arg")
       (inst -1 "s!1" "kk!1")
       (("1" (assert))
        ("2"
         (typepred "kk!1")
         (lemma "uni_diff_equal_length_arg")
         (inst -1 "s!1" "t!1" "f(s!1)" "args(s!1)")
         (case "s!1 = app(f(s!1), args(s!1))")
         (("1"
           (assert)
           (hide -1)
           (inst -1 "f(t!1)" "args(t!1)")
           (case "t!1 = app(f(t!1), args(t!1))")
           (("1" (assert))
            ("2" (hide-all-but (1 4)) (decompose-equality))))
          ("2" (hide-all-but (1 6)) (decompose-equality))))))))))


proof_type: f_proof
decl_type: formula
library: TRS
theory: unification
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (measure-induct+ "length(p)" "p")
   (skosimp)
   (expand "resolving_diff" -2)
   (lift-if)
   (prop)
   (("1"
     (hide -3)
     (replaces -2)
     (expand "positionsOF")
     (lift-if)
     (prop)
     (("1" (expand "only_empty_seq") (propax))
      ("2" (expand "only_empty_seq") (propax))
      ("3"
       (hide-all-but 2)
       (expand* "union" "only_empty_seq" "IUnion" "member"))))
    ("2"
     (hide-all-but (-2 2))
     (replaces -2)
     (replaces -1)
     (expand "positionsOF")
     (lift-if)
     (prop)
     (("1" (expand "only_empty_seq") (propax))
      ("2" (expand "only_empty_seq") (propax))
      ("3" (expand* "union" "only_empty_seq" "IUnion" "member"))))
    ("3"
     (hide-all-but (-1 -2 3))
     (replaces -2)
     (expand "positionsOF")
     (assert)
     (expand "only_empty_seq")
     (propax))
    ("4"
     (assert)
     (name-replace "k!11"
      "min({kk: below[length(args(t!1))] |
                               NOT subtermOF(s!1,  #(1 + kk)) = subtermOF(t!1,  #(1 + kk))})")
     (("1"
       (name-replace "k!1" "1+k!11")
       (inst -2
        "resolving_diff(subtermOF(s!1, #(k!1)), subtermOF(t!1, #(k!1)))"
        "subtermOF(s!1, #(k!1))" "subtermOF(t!1, #(k!1))")
       (replace -1 -2)
       (expand "add_first" -2)
       (expand "insert?" -2)
       (case "positionsOF(t!1)( #[posnat](k!1))")
       (("1"
         (rewrite "add_first_is_o")
         (lemma "pos_o_term")
         (inst?)
         (assert))
        ("2"
         (hide - 5)
         (reveal -5)
         (replace -1 1 rl)
         (hide -1)
         (lemma "positions_of_arg")
         (inst -1 "t!1" "k!11")
         (assert))))
      ("2"
       (hide - 5)
       (lemma "resolving_diff_TCC7")
       (inst -1 "s!1" "t!1" "f(s!1)" "args(s!1)")
       (case "s!1 = app(f(s!1), args(s!1))")
       (("1"
         (assert)
         (hide -1)
         (inst -1 "f(t!1)" "args(t!1)")
         (case "t!1 = app(f(t!1), args(t!1))")
         (("1" (assert))
          ("2" (hide-all-but (1 3)) (decompose-equality))))
        ("2" (hide-all-but (1 5)) (decompose-equality))))
      ("3"
       (hide - 5)
       (skosimp*)
       (lemma "positions_of_arg")
       (inst -1 "t!1" "kk!1")
       (assert))
      ("4"
       (hide - 5)
       (skosimp*)
       (lemma "positions_of_arg")
       (inst -1 "s!1" "kk!1")
       (("1" (assert))
        ("2"
         (typepred "kk!1")
         (lemma "uni_diff_equal_length_arg")
         (inst -1 "s!1" "t!1" "f(s!1)" "args(s!1)")
         (case "s!1 = app(f(s!1), args(s!1))")
         (("1"
           (assert)
           (hide -1)
           (inst -1 "f(t!1)" "args(t!1)")
           (case "t!1 = app(f(t!1), args(t!1))")
           (("1" (assert))
            ("2" (hide-all-but (1 4)) (decompose-equality))))
          ("2" (hide-all-but (1 6)) (decompose-equality))))))))))


proof_type: f_proof
decl_type: formula
library: TRS
theory: unification
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (induct "s")
   (("1"
     (skosimp*)
     (typepred "t!1")
     (hide -1)
     (expand "resolving_diff")
     (replaces -2)
     (expand "subtermOF")
     (rewrite "empty_0")
     (assert))
    ("2"
     (skosimp*)
     (expand "resolving_diff" -2)
     (lift-if)
     (prop)
     (("1"
       (hide -1 -3)
       (replaces -1)
       (typepred "t!1")
       (hide -1)
       (expand "subtermOF")
       (rewrite "empty_0")
       (assert))
      ("2"
       (hide -1 -3 1)
       (replaces -1)
       (typepred "t!1")
       (hide -1)
       (expand "subtermOF")
       (rewrite "empty_0")
       (assert))
      ("3"
       (assert)
       (name-replace "k!11"
        "min({kk: below[length(args(t!1))] |
                                            NOT subtermOF(app(app1_var!1, app2_var!1), #(1 + kk))
                                              = subtermOF(t!1,  #(1 + kk))})")
       (("1"
         (name-replace "k!1" "1 + k!11")
         (inst -2 "k!1 - 1")
         (("1"
           (inst -2 "subtermOF(t!1, #(k!1))"
            "resolving_diff(subtermOF(app(app1_var!1, app2_var!1), #(k!1)),
                                                               subtermOF(t!1,  #(k!1)))")
           (("1"
             (case "subtermOF(app(app1_var!1, app2_var!1), #(k!1))
                                                                   = app2_var!1`seq(k!1 - 1)")
             (("1"
               (replace -1 -3 rl)
               (hide -1)
               (lemma "subt_of_subt_is_subt_of_term")
               (inst -1 "app(app1_var!1, app2_var!1)" "k!1"
                "resolving_diff(subtermOF(app(app1_var!1, app2_var!1), #(k!1)),
                                                                   subtermOF(t!1, #(k!1)))"
                "p!1")
               (("1"
                 (assert)
                 (lemma "subt_of_subt_is_subt_of_term")
                 (inst -1 "t!1" "k!1"
                  "resolving_diff(subtermOF(app(app1_var!1, app2_var!1), #(k!1)),
                                                                         subtermOF(t!1, #(k!1)))"
                  "p!1")
                 (("1" (assert))
                  ("2"
                   (hide -)
                   (lemma "resolving_diff_TCC2")
                   (inst -1 "app(app1_var!1, app2_var!1)" "t!1"
                    "app1_var!1" "app2_var!1")
                   (assert)
                   (inst -1 "f(t!1)" "args(t!1)")
                   (case "t!1 = app(f(t!1), args(t!1))")
                   (("1"
                     (assert)
                     (hide -1)
                     (inst -1 "k!11")
                     (reveal -14)
                     (reveal -13)
                     (assert))
                    ("2" (hide-all-but (1 3)) (decompose-equality))))))
                ("2"
                 (hide -)
                 (lemma "resolving_diff_TCC1")
                 (inst -1 "app(app1_var!1, app2_var!1)" "t!1"
                  "app1_var!1" "app2_var!1")
                 (assert)
                 (inst -1 "f(t!1)" "args(t!1)")
                 (case "t!1 = app(f(t!1), args(t!1))")
                 (("1"
                   (assert)
                   (hide -1)
                   (inst -1 "k!11")
                   (reveal -13)
                   (reveal -12)
                   (assert))
                  ("2" (hide-all-but (1 3)) (decompose-equality))))))
              ("2"
               (hide-all-but 1)
               (expand "#")
               (expand "subtermOF")
               (expand "finseq_appl")
               (grind))
              ("3"
               (hide-all-but (1 3))
               (reveal -6)
               (reveal -7)
               (assert)
               (hide -)
               (lemma "uni_diff_equal_length_arg")
               (inst -1 "app(app1_var!1, app2_var!1)" "t!1" "app1_var!1"
                " app2_var!1")
               (assert)
               (inst -1 "f(t!1)" "args(t!1)")
               (case "t!1 = app(f(t!1), args(t!1))")
               (("1" (assert))
                ("2"
                 (hide-all-but 1)
                 (reveal 3)
                 (decompose-equality))))))
            ("2"
             (split)
             (("1"
               (hide -)
               (lemma "position_s_resolving_diff")
               (inst -1 "app2_var!1`seq(k!1 - 1)"
                "subtermOF(t!1, #(k!1))"
                "resolving_diff(subtermOF(app(app1_var!1, app2_var!1), #(k!1)),
                                                                           subtermOF(t!1,  #[posnat](k!1)))")
               (("1"
                 (case "subtermOF(app(app1_var!1, app2_var!1), #(k!1))
                                                                              = app2_var!1`seq(k!1 - 1)")
                 (("1" (assert)) ("2" (hide-all-but 1) (grind))
                  ("3" (hide-all-but 1) (reveal -7) (assert))))
                ("2"
                 (hide 2)
                 (lemma "resolving_diff_TCC3")
                 (inst -1 "app(app1_var!1, app2_var!1)" "t!1"
                  "app1_var!1" "app2_var!1")
                 (assert)
                 (inst -1 "f(t!1)" "args(t!1)")
                 (case "t!1 = app(f(t!1), args(t!1))")
                 (("1"
                   (assert)
                   (hide -1)
                   (inst -1 "k!11")
                   (reveal -10)
                   (reveal -11)
                   (assert)
                   (case "subtermOF(app(app1_var!1, app2_var!1), #(k!1))
                                                                                      = app2_var!1`seq(k!1 - 1)")
                   (("1" (assert)) ("2" (hide-all-but 1) (grind))
                    ("3"
                     (hide (-3 2))
                     (lemma "uni_diff_equal_length_arg")
                     (inst -1 "app(app1_var!1, app2_var!1)" "t!1"
                      "app1_var!1" "app2_var!1")
                     (assert)
                     (inst -1 "f(t!1)" "args(t!1)")
                     (case "t!1 = app(f(t!1), args(t!1))")
                     (("1" (assert))
                      ("2" (hide-all-but (1 3)) (decompose-equality))))
                    ("4"
                     (hide (-3 2))
                     (replace -2 1 rl)
                     (hide -2)
                     (lemma "resolving_diff_TCC1")
                     (inst -1 "app(app1_var!1, app2_var!1)" "t!1"
                      "app1_var!1" "app2_var!1")
                     (assert)
                     (inst -1 "f(t!1)" "args(t!1)")
                     (case "t!1 = app(f(t!1), args(t!1))")
                     (("1" (assert) (hide -1) (inst -1 "k!11") (assert))
                      ("2" (hide-all-but (1 3)) (decompose-equality))))))
                  ("2" (hide-all-but (1 3)) (decompose-equality))))
                ("3" (hide-all-but 1) (reveal -6) (assert))))
              ("2"
               (hide -)
               (lemma "position_t_resolving_diff")
               (inst -1 "subtermOF(app(app1_var!1, app2_var!1), #(k!1))"
                "subtermOF(t!1, #(k!1))"
                "resolving_diff(subtermOF(app(app1_var!1, app2_var!1), #(k!1)),
                                                                           subtermOF(t!1, #(k!1)))"))))
            ("3"
             (hide -)
             (lemma "resolving_diff_TCC3")
             (inst -1 "app(app1_var!1, app2_var!1)" "t!1" "app1_var!1"
              "app2_var!1")
             (assert)
             (inst -1 "f(t!1)" "args(t!1)")
             (case "t!1 = app(f(t!1), args(t!1))")
             (("1"
               (assert)
               (hide -1)
               (reveal -8)
               (reveal -9)
               (inst -3 "k!11")
               (assert)
               (case "subtermOF(app(app1_var!1, app2_var!1), #(k!1))
                                                                          = app2_var!1`seq(k!1 - 1)")
               (("1" (assert)) ("2" (hide-all-but 1) (grind))
                ("3"
                 (hide -3 2)
                 (lemma "uni_diff_equal_length_arg")
                 (inst -1 "app(app1_var!1, app2_var!1)" "t!1"
                  "app1_var!1" "app2_var!1")
                 (assert)
                 (inst -1 "f(t!1)" "args(t!1)")
                 (case "t!1 = app(f(t!1), args(t!1))")
                 (("1" (assert))
                  ("2" (hide-all-but (1 3)) (decompose-equality))))
                ("4"
                 (replace -2 1 rl)
                 (hide (-3 2))
                 (lemma "resolving_diff_TCC1")
                 (inst -1 "app(app1_var!1, app2_var!1)" "t!1"
                  "app1_var!1" "app2_var!1")
                 (assert)
                 (inst -1 "f(t!1)" "args(t!1)")
                 (case "t!1 = app(f(t!1), args(t!1))")
                 (("1" (assert) (hide -1) (inst -1 "k!11") (assert))
                  ("2" (hide-all-but (1 3)) (decompose-equality))))))
              ("2" (hide-all-but (1 3)) (decompose-equality))))))
          ("2"
           (hide-all-but 1)
           (reveal -4)
           (replace -1 1 rl)
           (assert)
           (hide -1)
           (lemma "uni_diff_equal_length_arg")
           (inst -1 "app(app1_var!1, app2_var!1)" "t!1" "app1_var!1"
            "app2_var!1")
           (assert)
           (inst -1 "f(t!1)" "args(t!1)")
           (case "t!1 = app(f(t!1), args(t!1))")
           (("1" (assert))
            ("2" (hide-all-but 1) (reveal 2) (decompose-equality))))))
        ("2"
         (hide -)
         (lemma "resolving_diff_TCC7")
         (inst -1 "app(app1_var!1, app2_var!1)" "t!1" "app1_var!1"
          "app2_var!1")
         (assert)
         (inst -1 "f(t!1)" "args(t!1)")
         (case "t!1 = app(f(t!1), args(t!1))")
         (("1" (assert))
          ("2" (hide-all-but (1 3)) (decompose-equality))))
        ("3"
         (hide -)
         (skosimp*)
         (lemma "positions_of_arg")
         (inst -1 "t!1" "kk!1")
         (typepred "kk!1")
         (assert))
        ("4"
         (hide -)
         (skosimp*)
         (lemma "positions_of_arg")
         (inst -1 "app(app1_var!1, app2_var!1)" "kk!1")
         (("1" (assert))
          ("2"
           (hide 2)
           (typepred "kk!1")
           (lemma "uni_diff_equal_length_arg")
           (inst -1 "app(app1_var!1, app2_var!1)" "t!1" "app1_var!1"
            "app2_var!1")
           (assert)
           (inst -1 "f(t!1)" "args(t!1)")
           (case "t!1 = app(f(t!1), args(t!1))")
           (("1" (assert))
            ("2" (hide-all-but (1 3)) (decompose-equality))))))))))))


proof_type: f_proof
decl_type: formula
library: TRS
theory: unification
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (induct "s")
   (("1"
     (skosimp*)
     (expand "resolving_diff")
     (replaces -1)
     (expand "subtermOF")
     (rewrite "empty_0")
     (typepred "t!1")
     (propax))
    ("2"
     (skosimp*)
     (expand "resolving_diff" -2)
     (lift-if)
     (prop)
     (("1"
       (hide -3)
       (replaces -2)
       (expand "subtermOF")
       (rewrite "empty_0")
       (typepred "t!1")
       (propax))
      ("2"
       (hide -1 -3 1)
       (replaces -1)
       (expand "subtermOF")
       (rewrite "empty_0")
       (typepred "t!1")
       (propax))
      ("3"
       (assert)
       (name-replace "k!11"
        "min({kk: below[length(args(t!1))] |
                      NOT subtermOF(app(app1_var!1, app2_var!1), #(1 + kk)) = subtermOF(t!1,  #(1 + kk))})")
       (("1"
         (name-replace "k!1" "1 + k!11")
         (inst -2 "k!1 - 1" "subtermOF(t!1, #(k!1))"
          "resolving_diff(app2_var!1`seq(k!1 - 1), subtermOF(t!1, #(k!1)))")
         (("1"
           (case "subtermOF(app(app1_var!1, app2_var!1), #(k!1))
                                                            = app2_var!1`seq(k!1 - 1)")
           (("1"
             (replace -1 -3 rl)
             (hide -1)
             (lemma "subt_of_subt_is_subt_of_term")
             (inst -1 "app(app1_var!1, app2_var!1)" "k!1"
              "resolving_diff(subtermOF(app(app1_var!1, app2_var!1), #(k!1)),
                                                                     subtermOF(t!1, #(k!1)))"
              "p!1")
             (("1"
               (assert)
               (lemma "subt_of_subt_is_subt_of_term")
               (inst -1 "t!1" "k!1"
                "resolving_diff(subtermOF(app(app1_var!1, app2_var!1), #(k!1)),
                                                                           subtermOF(t!1, #(k!1)))"
                "p!1")
               (("1" (assert))
                ("2"
                 (hide - 4)
                 (lemma "resolving_diff_TCC2")
                 (inst -1 "app(app1_var!1, app2_var!1)" "t!1"
                  "app1_var!1" "app2_var!1")
                 (assert)
                 (inst -1 "f(t!1)" "args(t!1)")
                 (case "t!1 = app(f(t!1), args(t!1))")
                 (("1"
                   (assert)
                   (hide -1)
                   (inst -1 "k!11")
                   (reveal -12)
                   (reveal -13)
                   (replace -2 1 rl)
                   (assert))
                  ("2" (hide-all-but (1 3)) (decompose-equality))))))
              ("2"
               (hide - 4)
               (lemma "resolving_diff_TCC1")
               (inst -1 "app(app1_var!1, app2_var!1)" "t!1" "app1_var!1"
                "app2_var!1")
               (assert)
               (inst -1 "f(t!1)" "args(t!1)")
               (case "t!1 = app(f(t!1), args(t!1))")
               (("1"
                 (assert)
                 (hide -1)
                 (inst -1 "k!11")
                 (reveal -12)
                 (reveal -11)
                 (replace -1 1 rl)
                 (assert))
                ("2" (hide-all-but (1 3)) (decompose-equality))))))
            ("2" (hide-all-but 1) (grind))
            ("3" (hide-all-but 1) (reveal -5) (assert))))
          ("2"
           (split)
           (("1"
             (hide - 4)
             (lemma "position_s_resolving_diff")
             (inst -1 "app2_var!1`seq(k!1 - 1)" "subtermOF(t!1, #(k!1))"
              "resolving_diff(app2_var!1`seq(k!1 - 1), subtermOF(t!1, #(k!1)))")
             (hide-all-but 1)
             (reveal -5)
             (assert))
            ("2"
             (hide - 4)
             (lemma "position_t_resolving_diff")
             (inst -1 "app2_var!1`seq(k!1 - 1)" "subtermOF(t!1, #(k!1))"
              "resolving_diff(app2_var!1`seq(k!1 - 1), subtermOF(t!1, #(k!1)))")
             (hide-all-but 1)
             (reveal -5)
             (assert))))
          ("3"
           (hide - 4)
           (reveal -4)
           (reveal -5)
           (assert)
           (lemma "uni_diff_equal_length_arg")
           (inst -1 "app(app1_var!1, app2_var!1)" "t!1" "app1_var!1"
            "app2_var!1")
           (assert)
           (inst -1 "f(t!1)" "args(t!1)")
           (case "t!1 = app(f(t!1), args(t!1))")
           (("1" (assert))
            ("2" (hide-all-but (1 3)) (decompose-equality))))
          ("4"
           (hide - 4)
           (lemma "resolving_diff_TCC3")
           (inst -1 "app(app1_var!1, app2_var!1)" "t!1" "app1_var!1"
            "app2_var!1")
           (assert)
           (inst -1 "f(t!1)" "args(t!1)")
           (case "t!1 = app(f(t!1), args(t!1))")
           (("1"
             (assert)
             (hide -1)
             (inst -1 "k!11")
             (reveal -8)
             (reveal -9)
             (assert)
             (case "subtermOF(app(app1_var!1, app2_var!1), #(k!1))
                                                                    = app2_var!1`seq(k!1 - 1)")
             (("1" (assert)) ("2" (hide-all-but 1) (grind))
              ("3"
               (hide -3 2)
               (lemma "uni_diff_equal_length_arg")
               (inst -1 "app(app1_var!1, app2_var!1)" "t!1" "app1_var!1"
                "app2_var!1")
               (assert)
               (inst -1 "f(t!1)" "args(t!1)")
               (case "t!1 = app(f(t!1), args(t!1))")
               (("1" (assert))
                ("2" (hide-all-but (1 3)) (decompose-equality))))
              ("4"
               (hide (-3 2))
               (lemma "resolving_diff_TCC1")
               (inst -1 "app(app1_var!1, app2_var!1)" "t!1" "app1_var!1"
                "app2_var!1")
               (assert)
               (inst -1 "f(t!1)" "args(t!1)")
               (case "t!1 = app(f(t!1), args(t!1))")
               (("1" (assert) (hide -1) (inst -1 "k!11") (assert))
                ("2" (hide-all-but (1 3)) (decompose-equality))))))
            ("2" (hide-all-but (1 3)) (decompose-equality))))
          ("5"
           (hide - 4)
           (reveal -4)
           (reveal -3)
           (assert)
           (hide -)
           (lemma "uni_diff_equal_length_arg")
           (inst -1 "app(app1_var!1, app2_var!1)" "t!1" "app1_var!1"
            "app2_var!1")
           (assert)
           (inst -1 "f(t!1)" "args(t!1)")
           (case "t!1 = app(f(t!1), args(t!1))")
           (("1" (assert))
            ("2" (hide-all-but (1 3)) (decompose-equality))))))
        ("2"
         (hide - 4)
         (lemma "resolving_diff_TCC7")
         (inst -1 "app(app1_var!1, app2_var!1)" "t!1" "app1_var!1"
          "app2_var!1")
         (assert)
         (inst -1 "f(t!1)" "args(t!1)")
         (case "t!1 = app(f(t!1), args(t!1))")
         (("1" (assert))
          ("2" (hide-all-but (1 3)) (decompose-equality))))
        ("3"
         (hide - 4)
         (skosimp*)
         (lemma "positions_of_arg")
         (inst -1 "t!1" "kk!1")
         (assert))
        ("4"
         (hide - 4)
         (skosimp*)
         (lemma "positions_of_arg")
         (inst -1 "app(app1_var!1, app2_var!1)" "kk!1")
         (("1" (assert))
          ("2"
           (hide 2)
           (typepred "kk!1")
           (lemma "uni_diff_equal_length_arg")
           (inst -1 "app(app1_var!1, app2_var!1)" "t!1" "app1_var!1"
            "app2_var!1")
           (assert)
           (inst -1 "f(t!1)" "args(t!1)")
           (case "t!1 = app(f(t!1), args(t!1))")
           (("1" (assert))
            ("2" (hide-all-but (1 3)) (decompose-equality))))))))))))


proof_type: f_proof
decl_type: formula
library: TRS
theory: unification
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (induct "s")
   (("1"
     (skosimp*)
     (expand "resolving_diff")
     (replaces -1)
     (hide 2)
     (expand "subtermOF")
     (rewrite "empty_0")
     (assert))
    ("2"
     (skosimp*)
     (expand "resolving_diff" -2)
     (lift-if)
     (prop)
     (("1"
       (hide -3)
       (lemma "resolving_diff_has_unifiable_argument")
       (inst -1 "app(app1_var!1, app2_var!1)" "t!1" "p!1")
       (expand "resolving_diff")
       (assert)
       (expand "unifiable")
       (skeep -1)
       (expand "unifier")
       (expand "ext")
       (replace -3 -1)
       (expand "subtermOF" -1 1)
       (rewrite "empty_0")
       (assert)
       (expand "subtermOF" -1 1)
       (rewrite "empty_0")
       (lift-if)
       (prop)
       (("1"
         (expand "subtermOF" -2)
         (rewrite "empty_0")
         (hide-all-but -2)
         (typepred "t!1")
         (hide -1)
         (assert))
        ("2"
         (decompose-equality -1)
         (decompose-equality -2)
         (hide -2 -3 -5 2 3)
         (replaces -2)
         (assert))))
      ("2"
       (hide -3 1 2)
       (replaces -2)
       (expand "subtermOF")
       (rewrite "empty_0"))
      ("3"
       (assert)
       (name-replace "k!11"
        "min({kk: below[length(args(t!1))] |
                                     NOT subtermOF(app(app1_var!1, app2_var!1), #(1 + kk))
                                         = subtermOF(t!1, #(1 + kk))})")
       (("1"
         (name-replace "k!1" "1 + k!11")
         (inst -2 "k!1 - 1")
         (("1"
           (inst -2 "subtermOF(t!1, #(k!1))"
            "resolving_diff(app2_var!1`seq(k!1 - 1),
                                                      subtermOF(t!1, #(k!1)) )")
           (("1"
             (prop)
             (("1"
               (case "subtermOF(app(app1_var!1, app2_var!1), #(k!1))
                                                                        = app2_var!1`seq(k!1 - 1)")
               (("1"
                 (replace -1 -2 rl)
                 (lemma "subt_of_subt_is_subt_of_term")
                 (inst -1 "app(app1_var!1, app2_var!1)" "k!1"
                  "resolving_diff(
                                                                     subtermOF(app(app1_var!1, app2_var!1), #(k!1)),
                                                                     subtermOF(t!1,  #(k!1)))"
                  "p!1")
                 (("1" (assert))
                  ("2"
                   (hide - 4 5)
                   (lemma "resolving_diff_TCC1")
                   (inst -1 "app(app1_var!1, app2_var!1)" "t!1"
                    "app1_var!1" " app2_var!1")
                   (assert)
                   (inst -1 "f(t!1)" "args(t!1)")
                   (case "t!1 = app(f(t!1), args(t!1))")
                   (("1"
                     (assert)
                     (hide -1)
                     (inst -1 "k!11")
                     (reveal -11)
                     (reveal -12)
                     (assert))
                    ("2" (hide-all-but (1 3)) (decompose-equality))))))
                ("2" (hide-all-but 1) (grind))
                ("3" (reveal -3) (hide-all-but (-1 1)) (assert))))
              ("2"
               (case "subtermOF(app(app1_var!1, app2_var!1), #(k!1))
                                                                        = app2_var!1`seq(k!1 - 1)")
               (("1"
                 (replace -1 -2 rl)
                 (hide -1)
                 (lemma "subt_of_subt_is_subt_of_term")
                 (inst -1 "t!1" "k!1"
                  "resolving_diff(
                                                                     subtermOF(app(app1_var!1, app2_var!1), #(k!1)),
                                                                     subtermOF(t!1,  #(k!1)))"
                  "p!1")
                 (("1" (assert))
                  ("2"
                   (hide - 4 5)
                   (lemma "resolving_diff_TCC2")
                   (inst -1 "app(app1_var!1, app2_var!1)" "t!1"
                    "app1_var!1" " app2_var!1")
                   (assert)
                   (inst -1 "f(t!1)" "args(t!1)")
                   (case "t!1 = app(f(t!1), args(t!1))")
                   (("1"
                     (assert)
                     (hide -1)
                     (inst -1 "k!11")
                     (reveal -11)
                     (reveal -12)
                     (assert))
                    ("2" (hide-all-but (1 3)) (decompose-equality))))))
                ("2" (hide-all-but 1) (grind))
                ("3" (reveal -3) (hide-all-but (-1 1)) (assert))))))
            ("2"
             (split)
             (("1"
               (case "subtermOF(app(app1_var!1, app2_var!1), #(k!1))
                                                                        = app2_var!1`seq(k!1 - 1)")
               (("1"
                 (replace -1 1 rl)
                 (hide -1)
                 (lemma "position_s_resolving_diff")
                 (inst -1
                  "subtermOF(app(app1_var!1, app2_var!1),  #(k!1))"
                  "subtermOF(t!1, #(k!1))"
                  "resolving_diff(
                                                              subtermOF(app(app1_var!1, app2_var!1), #(k!1)),
                                                              subtermOF(t!1, #(k!1)))"))
                ("2" (hide-all-but 1) (grind))
                ("3" (reveal -3) (hide-all-but (-1 1)) (assert))))
              ("2"
               (case "subtermOF(app(app1_var!1, app2_var!1), #(k!1))
                                                                        = app2_var!1`seq(k!1 - 1)")
               (("1"
                 (replace -1 1 rl)
                 (hide -1)
                 (lemma "position_t_resolving_diff")
                 (inst -1
                  "subtermOF(app(app1_var!1, app2_var!1),  #(k!1))"
                  "subtermOF(t!1, #(k!1))"
                  "resolving_diff(
                                                              subtermOF(app(app1_var!1, app2_var!1), #(k!1)),
                                                              subtermOF(t!1, #(k!1)))"))
                ("2" (hide-all-but 1) (grind))
                ("3" (reveal -3) (hide-all-but (-1 1)) (assert))))))
            ("3"
             (reveal -3)
             (assert)
             (hide - 4 5)
             (lemma "uni_diff_equal_length_arg")
             (inst -1 "app(app1_var!1, app2_var!1)" "t!1" "app1_var!1"
              " app2_var!1")
             (assert)
             (inst -1 "f(t!1)" "args(t!1)")
             (case "t!1 = app(f(t!1), args(t!1))")
             (("1" (assert))
              ("2" (hide-all-but (1 3)) (decompose-equality))))
            ("4"
             (case "subtermOF(app(app1_var!1, app2_var!1), #(k!1))
                                                                  = app2_var!1`seq(k!1 - 1)")
             (("1"
               (replace -1 1 rl)
               (lemma "resolving_diff_TCC3")
               (inst -1 "app(app1_var!1, app2_var!1)" "t!1" "app1_var!1"
                "app2_var!1")
               (assert)
               (inst -1 "f(t!1)" "args(t!1)")
               (case "t!1 = app(f(t!1), args(t!1))")
               (("1"
                 (assert)
                 (hide -1)
                 (inst -1 "k!11")
                 (reveal -8)
                 (reveal -7)
                 (assert))
                ("2" (hide-all-but (1 3)) (decompose-equality))))
              ("2" (hide-all-but 1) (grind))
              ("3"
               (hide - 2)
               (reveal -4)
               (reveal -5)
               (assert)
               (hide -)
               (lemma "uni_diff_equal_length_arg")
               (inst -1 "app(app1_var!1, app2_var!1)" "t!1" "app1_var!1"
                "app2_var!1")
               (assert)
               (inst -1 "f(t!1)" "args(t!1)")
               (case "t!1 = app(f(t!1), args(t!1))")
               (("1" (assert))
                ("2" (hide-all-but (1 3)) (decompose-equality))))))))
          ("2"
           (hide - 4)
           (reveal -3)
           (assert)
           (hide -)
           (lemma "uni_diff_equal_length_arg")
           (inst -1 "app(app1_var!1, app2_var!1)" "t!1" "app1_var!1"
            "app2_var!1")
           (assert)
           (inst -1 "f(t!1)" "args(t!1)")
           (case "t!1 = app(f(t!1), args(t!1))")
           (("1" (assert))
            ("2" (hide-all-but (1 3)) (decompose-equality))))))
        ("2"
         (hide - 4)
         (lemma "resolving_diff_TCC7")
         (inst -1 "app(app1_var!1, app2_var!1)" "t!1" "app1_var!1"
          "app2_var!1")
         (assert)
         (inst -1 "f(t!1)" "args(t!1)")
         (case "t!1 = app(f(t!1), args(t!1))")
         (("1" (assert))
          ("2" (hide-all-but (1 3)) (decompose-equality))))
        ("3"
         (hide - 4)
         (skosimp*)
         (lemma "positions_of_arg")
         (inst -1 "t!1" "kk!1")
         (assert))
        ("4"
         (hide - 4)
         (skosimp*)
         (lemma "positions_of_arg")
         (inst -1 "app(app1_var!1, app2_var!1)" "kk!1")
         (("1" (assert))
          ("2"
           (hide 2)
           (typepred "kk!1")
           (lemma "uni_diff_equal_length_arg")
           (inst -1 "app(app1_var!1, app2_var!1)" "t!1" "app1_var!1"
            "app2_var!1")
           (assert)
           (inst -1 "f(t!1)" "args(t!1)")
           (case "t!1 = app(f(t!1), args(t!1))")
           (("1" (assert))
            ("2" (hide-all-but (1 3)) (decompose-equality))))))))))))


proof_type: f_proof
decl_type: formula
library: TRS
theory: unification
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (expand "member")
   (expand "U")
   (expand "unifier")
   (lemma "ext_o")
   (inst -1 "sig" "theta")
   (replace -1 1)
   (expand "o" 1)
   (propax))


proof_type: f_proof
decl_type: formula
library: TRS
theory: unification
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (expand "<=")
   (skeep -1)
   (inst 1 "tau")
   (replaces -1)
   (lemma "o_ass")
   (inst -1 "sig" "tau" "theta"))


proof_type: f_proof
decl_type: formula
library: TRS
theory: unification
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp*)
   (expand "member")
   (expand "U")
   (expand "unifier")
   (rewrite "ext_o")
   (expand "o")
   (replaces -1))


proof_type: f_proof
decl_type: formula
library: TRS
theory: unification
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp*)
   (prop)
   (("1"
     (skosimp*)
     (expand "mgu")
     (inst -1 "sig!1")
     (expand "<=")
     (skosimp*)
     (expand "idempotent_sub?")
     (copy -1)
     (replace -3 -2 rl)
     (lemma "o_ass")
     (inst -1 "theta!1" "tau!1" "theta!1")
     (replace -1 -3 rl)
     (replace -2 -3 rl)
     (propax))
    ("2"
     (expand "mgu")
     (skosimp*)
     (expand "<=")
     (inst -2 "sigma!1")
     (inst 1 "sigma!1"))
    ("3"
     (expand "idempotent_sub?")
     (typepred "theta!1")
     (hide -1)
     (inst -2 "theta!1")
     (assert))))


proof_type: f_proof
decl_type: formula
library: TRS
theory: unification
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (expand* "member" "U" "unifier")
   (lemma "subterm_ext_commute")
   (inst -1 "p!1" "s!1" "sig!1")
   (assert)
   (lemma "subterm_ext_commute")
   (inst -1 "p!1" "t!1" "sig!1")
   (assert))


proof_type: f_proof
decl_type: formula
library: TRS
theory: unification
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (case "positionsOF(t!1) = only_empty_seq")
   (("1"
     (copy -1)
     (expand "positionsOF" -2)
     (lift-if)
     (prop)
     (("1"
       (hide -2 -3 -4)
       (lemma "Vars_is_var")
       (inst -1 "t!1")
       (assert)
       (hide -2)
       (replaces -1)
       (expand "member")
       (propax))
      ("2"
       (expand* "member" "Vars")
       (skosimp)
       (case "p!1 = empty_seq")
       (("1"
         (replaces -1)
         (hide-all-but (-5 2))
         (expand "subtermOF")
         (rewrite "empty_0")
         (assert))
        ("2"
         (typepred "p!1")
         (hide-all-but (-1 -3 1))
         (replaces -2)
         (expand "only_empty_seq")
         (propax))))
      ("3"
       (expand "finseq_appl")
       (expand "member" -5)
       (expand "Vars")
       (skosimp)
       (hide -1)
       (case-replace "p!1 = empty_seq")
       (("1" (expand "subtermOF") (rewrite "empty_0") (assert))
        ("2"
         (hide-all-but (-1 1))
         (decompose-equality -1)
         (inst -1 "p!1")
         (assert)
         (expand "only_empty_seq")
         (propax))))))
    ("2"
     (expand* "member" "Vars")
     (skosimp)
     (expand "unifiable")
     (skosimp)
     (expand "unifier")
     (copy -2)
     (replace -4 -1 rl)
     (lemma "subterm_ext_commute")
     (inst?)
     (assert)
     (replace -1 -2 rl)
     (hide -1)
     (lemma "term_eq_subterm")
     (inst -1 "p!1" "ext(sigma!1)(t!1)")
     (assert)
     (rewrite "ext_preserv_pos")
     (hide-all-but (-1 -5 2))
     (replaces -1)
     (expand "subtermOF")
     (rewrite "empty_0")
     (assert))))


proof_type: f_proof
decl_type: formula
library: TRS
theory: unification
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (expand* "restrict" "singleton")
   (prop)
   (("1"
     (decompose-equality 1)
     (iff)
     (prop)
     (("1"
       (expand* "Dom" "sub_of_frst_diff")
       (decompose-equality -3)
       (inst -1 "x!1")
       (assert))
      ("2"
       (decompose-equality -3)
       (inst -1 "x!1")
       (expand* "Dom" "sub_of_frst_diff")
       (assert)
       (replaces -2)
       (prop)
       (replaces -2)
       (hide -2)
       (replaces -2)
       (lemma "resolving_diff_has_diff_argument")
       (inst -1 "s!1" "t!1" "resolving_diff(s!1, t!1)")
       (("1" (assert))
        ("2"
         (hide -)
         (rewrite "position_t_resolving_diff")
         (lemma "position_s_resolving_diff")
         (inst -1 "s!1" "t!1" "resolving_diff(s!1, t!1)"))))))
    ("2"
     (decompose-equality 2)
     (("1"
       (iff)
       (prop)
       (("1"
         (decompose-equality -2)
         (inst -1 "x!1")
         (expand* "Dom" "sub_of_frst_diff")
         (assert))
        ("2"
         (decompose-equality -2)
         (inst -1 "x!1")
         (expand* "Dom" "sub_of_frst_diff")
         (assert)
         (replaces -2)
         (prop)
         (replaces -2)
         (hide 1)
         (lemma "resolving_diff_has_diff_argument")
         (inst -1 "s!1" "t!1" "p!1")
         (("1" (assert))
          ("2"
           (hide -)
           (rewrite "position_t_resolving_diff")
           (lemma "position_s_resolving_diff")
           (inst -1 "s!1" "t!1" "p!1")
           (assert))))))
      ("2"
       (skosimp)
       (hide-all-but 1)
       (rewrite "position_t_resolving_diff"))))))


proof_type: f_proof
decl_type: formula
library: TRS
theory: unification
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (assert)
   (skosimp*)
   (typepred "r!1")
   (typepred "x!1")
   (hide -1)
   (name-replace "sig!1" "sub_of_frst_diff(s!1, t!1)" :hide? nil)
   (expand* "member" "Dom" "Ran" "Vars")
   (skosimp*)
   (expand "member")
   (lemma "dom_sub_of_frst_diff_is")
   (inst -1 "resolving_diff(s!1, t!1)" "s!1" "t!1" "sig!1")
   (assert)
   (prop)
   (("1"
     (expand* "restrict" "singleton")
     (decompose-equality -2)
     (copy -1)
     (inst -2 "x!2")
     (inst -1 "x!1")
     (assert)
     (expand "Dom" -1)
     (replaces -1)
     (replaces -1)
     (hide -2 -3 1)
     (lemma "var_term_unifiable_not_var_in_term")
     (inst -1 "subtermOF(s!1, resolving_diff(s!1, t!1))" "r!1")
     (assert)
     (prop)
     (("1" (expand* "member" "Vars") (inst 1 "p!1"))
      ("2"
       (reveal -2)
       (replace -1 -3 rl)
       (expand "sub_of_frst_diff" -3)
       (hide -1 -2 -4)
       (replaces -1)
       (rewrite "resolving_diff_has_unifiable_argument")
       (hide 2)
       (rewrite "position_t_resolving_diff")
       (lemma "position_s_resolving_diff")
       (inst -1 "s!1" "t!1" "resolving_diff(s!1, t!1)"))))
    ("2"
     (expand* "restrict" "singleton")
     (decompose-equality -1)
     (("1"
       (copy -1)
       (inst -2 "x!1")
       (inst -1 "x!2")
       (expand "Dom" -2)
       (assert)
       (replaces -1)
       (replaces -1)
       (lemma "resolving_diff_vars")
       (inst -1 "s!1" "t!1" "resolving_diff(s!1, t!1)")
       (("1"
         (assert)
         (lemma "var_term_unifiable_not_var_in_term")
         (inst -1 "subtermOF(t!1, resolving_diff(s!1, t!1))" "r!1")
         (assert)
         (prop)
         (("1"
           (hide-all-but (-5 1))
           (expand* "member" "Vars")
           (inst 1 "p!1"))
          ("2"
           (hide -3 -5 3)
           (replace -2 -3 rl)
           (expand "sub_of_frst_diff" -3)
           (replaces -3)
           (hide - 2)
           (lemma "resolving_diff_has_unifiable_argument")
           (inst -1 "s!1" "t!1" "resolving_diff(s!1, t!1)")
           (("1"
             (expand* "unifiable" "unifier")
             (skosimp)
             (inst 1 "sigma!1")
             (assert))
            ("2"
             (hide 2)
             (rewrite "position_t_resolving_diff")
             (lemma "position_s_resolving_diff")
             (inst -1 "s!1" "t!1" "resolving_diff(s!1, t!1)"))))))
        ("2"
         (hide-all-but 1)
         (rewrite "position_t_resolving_diff")
         (lemma "position_s_resolving_diff")
         (inst -1 "s!1" "t!1" "resolving_diff(s!1, t!1)"))))
      ("2" (hide-all-but 1) (rewrite "position_t_resolving_diff"))))))


proof_type: f_proof
decl_type: formula
library: TRS
theory: unification
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (assert)
   (name-replace "sig!1" "sub_of_frst_diff(s!1, t!1)" :hide? nil)
   (name "p!1" "resolving_diff(s!1, t!1)")
   (inst 1 "rho!1")
   (lemma "unifiable_terms_unifiable_args")
   (inst -1 "rho!1" "s!1" "t!1" "p!1")
   (("1"
     (assert)
     (expand* "member" "U" "unifier")
     (decompose-equality 1)
     (expand "comp")
     (case "vars?(subtermOF(s!1, p!1))")
     (("1"
       (case "x!1 = subtermOF(s!1, p!1)")
       (("1"
         (replace -5 1 rl)
         (expand "sub_of_frst_diff" 1)
         (assert)
         (replace -4 1)
         (replace -1 -3 rl)
         (hide-all-but (-3 1))
         (expand "ext" -1 1)
         (propax))
        ("2"
         (replace -4 2 rl)
         (expand "sub_of_frst_diff" 2)
         (assert)
         (hide-all-but 2)
         (typepred "x!1")
         (expand* "V" "ext")
         (assert))))
      ("2"
       (case "vars?(subtermOF(t!1, p!1))")
       (("1"
         (case "x!1 = subtermOF(t!1, p!1)")
         (("1"
           (replace -5 2 rl)
           (expand "sub_of_frst_diff" 2)
           (assert)
           (replace -4 2)
           (replace -1 -3 rl)
           (hide-all-but (-3 2))
           (expand "ext" -1 2)
           (assert))
          ("2"
           (replace -4 3 rl)
           (expand "sub_of_frst_diff" 3)
           (assert)
           (hide-all-but 3)
           (typepred "x!1")
           (expand* "V" "ext")
           (assert))))
        ("2"
         (hide-all-but (-2 1 2))
         (lemma "resolving_diff_vars")
         (inst -1 "s!1" "t!1" "p!1")
         (("1" (assert))
          ("2"
           (hide 2 3)
           (rewrite "position_t_resolving_diff")
           (lemma "position_s_resolving_diff")
           (inst -1 "s!1" "t!1" "p!1")
           (assert))))))))
    ("2"
     (hide-all-but (-1 1))
     (rewrite "position_t_resolving_diff")
     (lemma "position_s_resolving_diff")
     (inst -1 "s!1" "t!1" "p!1")
     (assert))))


proof_type: f_proof
decl_type: formula
library: TRS
theory: unification
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (lemma "sub_of_frst_diff_unifier_o")
   (typepred "t!1")
   (expand* "unifiable" "member" "U")
   (skeep -1)
   (inst -2 "sigma" "s!1" "t!1")
   (assert)
   (skeep -2)
   (inst 2 "theta")
   (replace -2 -1)
   (expand "unifier")
   (rewrite "ext_o")
   (expand "o")
   (propax))


proof_type: f_proof
decl_type: formula
library: TRS
theory: unification
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (assert)
   (name-replace "sig!1" "sub_of_frst_diff(s!1, t!1)" :hide? nil)
   (prop)
   (("1"
     (lemma "vars_subst_not_in")
     (inst -1 "s!1" "sig!1" "x!1")
     (assert)
     (skosimp)
     (hide -3)
     (lemma "var_sub_1stdiff_not_member_term")
     (inst -1 "s!1" "t!1")
     (replaces -4)
     (assert)
     (inst -1 "x!1" "r!1")
     (("1" (hide -2 -3) (expand "member") (propax))
      ("2" (hide -1 -2) (expand "member") (propax))))
    ("2"
     (lemma "vars_subst_not_in")
     (inst -1 "t!1" "sig!1" "x!1")
     (assert)
     (skosimp)
     (hide -3)
     (lemma "var_sub_1stdiff_not_member_term")
     (inst -1 "s!1" "t!1")
     (replaces -4)
     (assert)
     (inst -1 "x!1" "r!1")
     (("1" (hide -2 -3) (expand "member") (propax))
      ("2" (hide -1 -2) (expand "member") (propax))))))


proof_type: f_proof
decl_type: formula
library: TRS
theory: unification
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (assert)
   (name-replace "sig!1" "sub_of_frst_diff(s!1, t!1)" :hide? nil)
   (expand* "subset?")
   (skosimp)
   (expand* "union" "member")
   (flatten)
   (case "member(x!1, VRan(sig!1))")
   (("1"
     (expand* "member" "VRan")
     (expand "IUnion")
     (skosimp)
     (lemma "dom_sub_of_frst_diff_is")
     (inst -1 "resolving_diff(s!1, t!1)" "s!1" "t!1" "sig!1")
     (assert)
     (prop)
     (("1"
       (expand* "restrict" "singleton")
       (decompose-equality -2)
       (typepred "i!1")
       (inst -3 "i!1")
       (assert)
       (replaces -3)
       (hide -1)
       (replace -4 -3 rl)
       (expand "sub_of_frst_diff" -3)
       (hide-all-but (-3 2))
       (expand "Vars")
       (skosimp)
       (typepred "p!1")
       (lemma "pos_o_term")
       (inst -1 "resolving_diff(s!1, t!1)" "p!1" "t!1")
       (assert)
       (prop)
       (("1"
         (inst 1 "resolving_diff(s!1, t!1) o p!1")
         (rewrite "pos_subterm"))
        ("2" (hide-all-but 1) (rewrite "position_t_resolving_diff"))))
      ("2"
       (expand* "restrict" "singleton")
       (decompose-equality -1)
       (("1"
         (typepred "i!1")
         (inst -3 "i!1")
         (assert)
         (replaces -3)
         (expand "V")
         (replace -4 -3 rl)
         (expand "sub_of_frst_diff" -3)
         (hide-all-but (-3 2))
         (expand "Vars")
         (skosimp)
         (typepred "p!1")
         (lemma "pos_o_term")
         (inst -1 "resolving_diff(s!1, t!1)" "p!1" "s!1")
         (assert)
         (prop)
         (("1"
           (inst 1 "resolving_diff(s!1, t!1) o p!1")
           (rewrite "pos_subterm"))
          ("2"
           (hide-all-but 1)
           (lemma "position_s_resolving_diff")
           (inst -1 "s!1" "t!1" "resolving_diff(s!1, t!1)"))))
        ("2" (hide-all-but 1) (rewrite "position_t_resolving_diff"))))))
    ("2"
     (expand "member")
     (lemma "resolving_diff_vars")
     (inst -1 "s!1" "t!1" "resolving_diff(s!1, t!1)")
     (("1"
       (split)
       (("1"
         (case "VRan(sig!1) = Vars(subtermOF(t!1, resolving_diff(s!1, t!1)))")
         (("1"
           (replaces -1)
           (lemma "sub_of_frst_diff_remove_x")
           (inst -1 "x!1" "s!1" "t!1")
           (assert)
           (replace -3 -1)
           (expand "member")
           (lemma "positions_of_ext")
           (inst -1 "sig!1" "s!1")
           (decompose-equality -1)
           (expand "Vars" -4)
           (skosimp)
           (inst -1 "p!1")
           (assert)
           (expand "union")
           (prop)
           (("1"
             (expand "member")
             (flatten)
             (rewrite "subterm_ext_commute")
             (decompose-equality -4)
             (prop)
             (("1"
               (hide-all-but (-1 1))
               (expand "ext")
               (assert)
               (lift-if)
               (prop)
               (assert))
              ("2"
               (hide-all-but -2)
               (typepred "x!1")
               (expand "V")
               (assert))))
            ("2"
             (expand "member")
             (skosimp)
             (replace -1 -7)
             (rewrite "pos_subterm")
             (rewrite "subterm_ext_commute")
             (expand "ext" -7)
             (assert)
             (case "subtermOF(s!1, p1!1) = subtermOF(s!1, resolving_diff(s!1, t!1))")
             (("1"
               (replace -7 -8 rl)
               (expand "sub_of_frst_diff" -8)
               (assert)
               (expand "Vars" 2)
               (inst 2 "p2!1"))
              ("2"
               (replace -6 -7 rl)
               (expand "sub_of_frst_diff" -7)
               (assert)
               (replace -6 -4 rl)
               (expand "ext" -4)
               (expand "sub_of_frst_diff" -4)
               (lemma "pos_o_term")
               (inst -1 "p1!1" "p2!1" "s!1")
               (assert)
               (lemma "pos_subterm")
               (inst -1 "p1!1" "p2!1" "s!1")
               (assert)
               (replace -1 -9 rl)
               (hide-all-but (-9 4))
               (expand "Vars")
               (inst 1 "p1!1 o p2!1"))))))
          ("2"
           (decompose-equality 1)
           (iff)
           (prop)
           (("1"
             (expand "VRan" -1)
             (expand "IUnion")
             (skosimp)
             (lemma "dom_sub_of_frst_diff_is")
             (inst -1 "resolving_diff(s!1, t!1)" "s!1" "t!1" "sig!1")
             (assert)
             (expand* "restrict" "singleton")
             (decompose-equality -1)
             (inst -1 "i!1")
             (assert)
             (replaces -1)
             (replace -3 -1 rl)
             (expand "sub_of_frst_diff" -1)
             (propax))
            ("2"
             (expand "VRan" 1)
             (expand "IUnion")
             (inst 1 "subtermOF(s!1, resolving_diff(s!1, t!1))")
             (("1"
               (replace -3 1 rl)
               (expand "sub_of_frst_diff" 1)
               (propax))
              ("2"
               (expand "V")
               (hide -1 -4 2 3 4)
               (expand "Dom")
               (replace -2 1 rl)
               (expand "sub_of_frst_diff" 1)
               (lemma "resolving_diff_has_diff_argument")
               (inst -1 "s!1" "t!1" "resolving_diff(s!1, t!1)")
               (("1" (assert))
                ("2"
                 (hide-all-but 1)
                 (rewrite "position_t_resolving_diff")
                 (lemma "position_s_resolving_diff")
                 (inst -1 "s!1" "t!1" "resolving_diff(s!1, t!1)"))))))))
          ("3" (hide-all-but 1) (rewrite "position_t_resolving_diff"))))
        ("2"
         (case "vars?(subtermOF(s!1, resolving_diff(s!1, t!1)))")
         (("1"
           (case "VRan(sig!1) = Vars(subtermOF(t!1, resolving_diff(s!1, t!1)))")
           (("1"
             (replaces -1)
             (expand "Vars" 1)
             (inst 1 "empty_seq")
             (("1"
               (expand "subtermOF" 1 1)
               (rewrite "empty_0" 1)
               (lemma "positions_of_ext")
               (inst -1 "sig!1" "s!1")
               (decompose-equality -1)
               (expand "Vars" -5)
               (skosimp)
               (inst -1 "p!1")
               (assert)
               (expand "union")
               (prop)
               (("1"
                 (expand "member")
                 (flatten)
                 (rewrite "subterm_ext_commute")
                 (decompose-equality -5)
                 (prop)
                 (("1"
                   (hide-all-but (-1 1))
                   (expand "ext")
                   (assert)
                   (lift-if)
                   (prop)
                   (assert))
                  ("2"
                   (hide-all-but -2)
                   (typepred "x!1")
                   (expand "V")
                   (assert))))
                ("2"
                 (expand "member")
                 (skosimp)
                 (replace -1 -8)
                 (rewrite "pos_subterm")
                 (rewrite "subterm_ext_commute")
                 (expand "ext" -8)
                 (assert)
                 (replace -7 -8 rl)
                 (expand "sub_of_frst_diff" -8)
                 (lift-if)
                 (prop)
                 (("1"
                   (expand "ext" -6)
                   (replace -9 -6 rl)
                   (expand "sub_of_frst_diff" -6)
                   (assert)
                   (expand "positionsOF" -6)
                   (expand "only_empty_seq")
                   (hide-all-but (-2 -6 1))
                   (replaces -2)
                   (expand "subtermOF" -1 1)
                   (rewrite "empty_0"))
                  ("2"
                   (hide-all-but (-1 -4 -5 -8 1 3))
                   (expand "ext")
                   (replace -4 -3 rl)
                   (expand "sub_of_frst_diff" -3)
                   (assert)
                   (expand "positionsOF" -3)
                   (expand "only_empty_seq")
                   (replaces -3)
                   (hide -3 1)
                   (expand "subtermOF" -1 1)
                   (rewrite "empty_0")
                   (hide -2)
                   (expand "Vars")
                   (inst 1 "p1!1"))))))
              ("2"
               (hide-all-but (-2 1))
               (expand "positionsOF")
               (assert)
               (expand "only_empty_seq")
               (propax))))
            ("2"
             (decompose-equality 1)
             (iff)
             (prop)
             (("1"
               (expand "VRan" -1)
               (expand "IUnion")
               (skosimp)
               (lemma "dom_sub_of_frst_diff_is")
               (inst -1 "resolving_diff(s!1, t!1)" "s!1" "t!1" "sig!1")
               (assert)
               (expand* "restrict" "singleton")
               (decompose-equality -1)
               (inst -1 "i!1")
               (assert)
               (replaces -1)
               (replace -4 -1 rl)
               (expand "sub_of_frst_diff" -1)
               (propax))
              ("2"
               (expand "VRan" 1)
               (expand "IUnion")
               (inst 1 "subtermOF(s!1, resolving_diff(s!1, t!1))")
               (("1"
                 (replace -4 1 rl)
                 (expand "sub_of_frst_diff" 1)
                 (propax))
                ("2"
                 (expand "V")
                 (expand "Dom")
                 (replace -4 1 rl)
                 (expand "sub_of_frst_diff" 1)
                 (hide-all-but -1)
                 (lemma "resolving_diff_has_diff_argument")
                 (inst -1 "s!1" "t!1" "resolving_diff(s!1, t!1)")
                 (("1" (assert))
                  ("2"
                   (hide -)
                   (rewrite "position_t_resolving_diff")
                   (lemma "position_s_resolving_diff")
                   (inst -1 "s!1" "t!1"
                    "resolving_diff(s!1, t!1)"))))))))))
          ("2"
           (case "VRan(sig!1) = Vars(subtermOF(s!1, resolving_diff(s!1, t!1)))")
           (("1"
             (replaces -1)
             (lemma "sub_of_frst_diff_remove_x")
             (inst -1 "x!1" "s!1" "t!1")
             (assert)
             (expand "member")
             (replace -2 1)
             (lemma "positions_of_ext")
             (inst -1 "sig!1" "s!1")
             (decompose-equality -1)
             (expand "Vars" -4)
             (skosimp)
             (inst -1 "p!1")
             (assert)
             (expand "union")
             (prop)
             (("1"
               (expand "member")
               (flatten)
               (rewrite "subterm_ext_commute")
               (decompose-equality -4)
               (prop)
               (("1" (hide-all-but (-1 1)) (grind))
                ("2" (hide-all-but -2) (typepred "x!1") (grind))))
              ("2"
               (expand "member")
               (skosimp)
               (replace -1 -7)
               (rewrite "pos_subterm")
               (rewrite "subterm_ext_commute")
               (expand "ext" -7)
               (assert)
               (case "subtermOF(s!1, p1!1) = subtermOF(t!1, resolving_diff(s!1, t!1))")
               (("1"
                 (replace -7 -8 rl)
                 (expand "sub_of_frst_diff" -8)
                 (assert)
                 (replace -1 -5)
                 (replace -7 -5 rl)
                 (expand "ext" -5)
                 (expand "sub_of_frst_diff" -5)
                 (hide-all-but (-5 -8 4))
                 (lemma "pos_o_term")
                 (inst -1 "resolving_diff(s!1, t!1)" "p2!1" "s!1")
                 (assert)
                 (prop)
                 (("1"
                   (expand "Vars")
                   (inst 1 "resolving_diff(s!1, t!1) o p2!1")
                   (rewrite "pos_subterm"))
                  ("2"
                   (hide-all-but 1)
                   (lemma "position_s_resolving_diff")
                   (inst -1 "s!1" "t!1" "resolving_diff(s!1, t!1)"))))
                ("2"
                 (replace -6 -7 rl)
                 (expand "sub_of_frst_diff" -7)
                 (assert)
                 (expand "ext" -4)
                 (replace -6 -4 rl)
                 (expand "sub_of_frst_diff" -4)
                 (hide-all-but (-2 -4 -7 5))
                 (lemma "pos_o_term")
                 (inst -1 "p1!1" "p2!1" "s!1")
                 (assert)
                 (expand "Vars")
                 (inst 1 "p1!1 o p2!1")
                 (rewrite "pos_subterm"))))))
            ("2"
             (decompose-equality 1)
             (iff)
             (prop)
             (("1"
               (expand "VRan" -1)
               (expand "IUnion")
               (skosimp)
               (lemma "dom_sub_of_frst_diff_is")
               (inst -1 "resolving_diff(s!1, t!1)" "s!1" "t!1" "sig!1")
               (assert)
               (expand* "restrict" "singleton")
               (decompose-equality -1)
               (inst -1 "i!1")
               (assert)
               (replaces -1)
               (replace -3 -1 rl)
               (expand "sub_of_frst_diff" -1)
               (propax))
              ("2"
               (expand "VRan" 1)
               (expand "IUnion")
               (inst 1 "subtermOF(t!1, resolving_diff(s!1, t!1))")
               (("1"
                 (replace -3 1 rl)
                 (expand "sub_of_frst_diff" 1)
                 (propax))
                ("2"
                 (expand "V")
                 (expand "Dom")
                 (decompose-equality -3)
                 (inst -1 "subtermOF(t!1, resolving_diff(s!1, t!1))")
                 (expand "sub_of_frst_diff" -1)
                 (assert))))))))
          ("3"
           (hide-all-but 1)
           (lemma "position_s_resolving_diff")
           (inst -1 "s!1" "t!1" "resolving_diff(s!1, t!1)"))))))
      ("2"
       (hide-all-but 1)
       (rewrite "position_t_resolving_diff")
       (lemma "position_s_resolving_diff")
       (inst -1 "s!1" "t!1" "resolving_diff(s!1, t!1)"))))))


proof_type: f_proof
decl_type: formula
library: TRS
theory: unification
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (assert)
   (name-replace "sig!1" "sub_of_frst_diff(s!1, t!1)" :hide? nil)
   (expand* "subset?")
   (skosimp)
   (expand* "union" "member")
   (flatten)
   (case "member(x!1, VRan(sig!1))")
   (("1"
     (expand* "member" "VRan")
     (expand "IUnion")
     (skosimp)
     (lemma "dom_sub_of_frst_diff_is")
     (inst -1 "resolving_diff(s!1, t!1)" "s!1" "t!1" "sig!1")
     (assert)
     (prop)
     (("1"
       (expand* "restrict" "singleton")
       (decompose-equality -2)
       (inst -1 "i!1")
       (assert)
       (replaces -1)
       (replace -3 -2 rl)
       (expand "sub_of_frst_diff" -2)
       (hide-all-but (-2 2))
       (expand "Vars")
       (skosimp)
       (typepred "p!1")
       (lemma "pos_o_term")
       (inst -1 "resolving_diff(s!1, t!1)" "p!1" "t!1")
       (assert)
       (prop)
       (("1"
         (inst 1 "resolving_diff(s!1, t!1) o p!1")
         (rewrite "pos_subterm"))
        ("2" (hide-all-but 1) (rewrite "position_t_resolving_diff"))))
      ("2"
       (expand* "restrict" "singleton")
       (decompose-equality -1)
       (("1"
         (inst -1 "i!1")
         (assert)
         (replaces -1)
         (replace -2 -1 rl)
         (expand "sub_of_frst_diff" -1)
         (hide-all-but (-1 2))
         (expand "Vars")
         (skosimp)
         (lemma "pos_o_term")
         (inst -1 "resolving_diff(s!1, t!1)" "p!1" "s!1")
         (assert)
         (prop)
         (("1"
           (inst 1 "resolving_diff(s!1, t!1) o p!1")
           (rewrite "pos_subterm"))
          ("2"
           (hide-all-but 1)
           (lemma "position_s_resolving_diff")
           (inst -1 "s!1" "t!1" "resolving_diff(s!1, t!1)"))))
        ("2" (hide-all-but 1) (rewrite "position_t_resolving_diff"))))))
    ("2"
     (expand "member")
     (lemma "resolving_diff_vars")
     (inst -1 "s!1" "t!1" "resolving_diff(s!1, t!1)")
     (("1"
       (split)
       (("1"
         (case "VRan(sig!1) = Vars(subtermOF(t!1, resolving_diff(s!1, t!1)))")
         (("1"
           (replaces -1)
           (lemma "sub_of_frst_diff_remove_x")
           (inst -1 "x!1" "s!1" "t!1")
           (assert)
           (replace -3 -1)
           (expand "member")
           (lemma "positions_of_ext")
           (inst -1 "sig!1" "t!1")
           (decompose-equality -1)
           (expand "Vars" -4)
           (skosimp)
           (inst -1 "p!1")
           (assert)
           (expand "union")
           (prop)
           (("1"
             (expand "member")
             (flatten)
             (rewrite "subterm_ext_commute")
             (decompose-equality -4)
             (prop)
             (("1" (hide-all-but (-1 1)) (grind))
              ("2" (hide-all-but -2) (typepred "x!1") (grind))))
            ("2"
             (expand "member")
             (skosimp)
             (replace -1 -7)
             (rewrite "pos_subterm")
             (rewrite "subterm_ext_commute")
             (expand "ext" -7)
             (assert)
             (case "subtermOF(t!1, p1!1) = subtermOF(s!1, resolving_diff(s!1, t!1))")
             (("1"
               (replace -7 -8 rl)
               (expand "sub_of_frst_diff" -8)
               (assert)
               (expand "Vars" 2)
               (inst 2 "p2!1"))
              ("2"
               (replace -6 -7 rl)
               (expand "sub_of_frst_diff" -7)
               (assert)
               (replace -6 -4 rl)
               (expand "ext" -4)
               (expand "sub_of_frst_diff" -4)
               (lemma "pos_o_term")
               (inst -1 "p1!1" "p2!1" "t!1")
               (assert)
               (lemma "pos_subterm")
               (inst -1 "p1!1" "p2!1" "t!1")
               (assert)
               (replace -1 -9 rl)
               (hide-all-but (-9 5))
               (expand "Vars")
               (inst 1 "p1!1 o p2!1"))))))
          ("2"
           (decompose-equality 1)
           (iff)
           (prop)
           (("1"
             (expand "VRan" -1)
             (expand "IUnion")
             (skosimp)
             (lemma "dom_sub_of_frst_diff_is")
             (inst -1 "resolving_diff(s!1, t!1)" "s!1" "t!1" "sig!1")
             (assert)
             (expand* "restrict" "singleton")
             (decompose-equality -1)
             (inst -1 "i!1")
             (assert)
             (replaces -1)
             (replace -3 -1 rl)
             (expand "sub_of_frst_diff" -1)
             (propax))
            ("2"
             (expand "VRan" 1)
             (expand "IUnion")
             (inst 1 "subtermOF(s!1, resolving_diff(s!1, t!1))")
             (("1"
               (replace -3 1 rl)
               (expand "sub_of_frst_diff" 1)
               (propax))
              ("2"
               (expand "V")
               (hide -1 -4 2 3 4)
               (expand "Dom")
               (replace -2 1 rl)
               (expand "sub_of_frst_diff" 1)
               (lemma "resolving_diff_has_diff_argument")
               (inst -1 "s!1" "t!1" "resolving_diff(s!1, t!1)")
               (("1" (assert))
                ("2"
                 (hide-all-but 1)
                 (rewrite "position_t_resolving_diff")
                 (lemma "position_s_resolving_diff")
                 (inst -1 "s!1" "t!1" "resolving_diff(s!1, t!1)"))))))))
          ("3" (hide-all-but 1) (rewrite "position_t_resolving_diff"))))
        ("2"
         (case "vars?(subtermOF(s!1, resolving_diff(s!1, t!1)))")
         (("1"
           (case "VRan(sig!1) = Vars(subtermOF(t!1, resolving_diff(s!1, t!1)))")
           (("1"
             (replaces -1)
             (expand "Vars" 1)
             (inst 1 "empty_seq")
             (("1"
               (expand "subtermOF" 1 1)
               (rewrite "empty_0" 1)
               (lemma "positions_of_ext")
               (inst -1 "sig!1" "t!1")
               (decompose-equality -1)
               (expand "Vars" -5)
               (skosimp)
               (inst -1 "p!1")
               (assert)
               (expand "union")
               (prop)
               (("1"
                 (expand "member")
                 (flatten)
                 (rewrite "subterm_ext_commute")
                 (decompose-equality -5)
                 (prop)
                 (("1" (hide-all-but (-1 1)) (grind))
                  ("2" (hide-all-but -2) (typepred "x!1") (grind))))
                ("2"
                 (expand "member")
                 (skosimp)
                 (replace -1 -8)
                 (rewrite "pos_subterm")
                 (rewrite "subterm_ext_commute")
                 (expand "ext" -8)
                 (assert)
                 (replace -7 -8 rl)
                 (expand "sub_of_frst_diff" -8)
                 (lift-if)
                 (prop)
                 (("1"
                   (expand "ext" -6)
                   (replace -9 -6 rl)
                   (expand "sub_of_frst_diff" -6)
                   (assert)
                   (expand "positionsOF" -6)
                   (expand "only_empty_seq")
                   (hide-all-but (-2 -6 1))
                   (replaces -2)
                   (expand "subtermOF" -1 1)
                   (rewrite "empty_0"))
                  ("2"
                   (hide-all-but (-1 -4 -5 -8 1 4))
                   (expand "ext")
                   (replace -4 -3 rl)
                   (expand "sub_of_frst_diff" -3)
                   (assert)
                   (expand "positionsOF" -3)
                   (expand "only_empty_seq")
                   (replaces -3)
                   (hide -3 1)
                   (expand "subtermOF" -1 1)
                   (rewrite "empty_0")
                   (hide -2)
                   (expand "Vars")
                   (inst 1 "p1!1"))))))
              ("2"
               (hide-all-but (-2 1))
               (expand "positionsOF")
               (assert)
               (expand "only_empty_seq")
               (propax))))
            ("2"
             (decompose-equality 1)
             (iff)
             (prop)
             (("1"
               (expand "VRan" -1)
               (expand "IUnion")
               (skosimp)
               (lemma "dom_sub_of_frst_diff_is")
               (inst -1 "resolving_diff(s!1, t!1)" "s!1" "t!1" "sig!1")
               (assert)
               (expand* "restrict" "singleton")
               (decompose-equality -1)
               (inst -1 "i!1")
               (assert)
               (replaces -1)
               (replace -4 -1 rl)
               (expand "sub_of_frst_diff" -1)
               (propax))
              ("2"
               (expand "VRan" 1)
               (expand "IUnion")
               (inst 1 "subtermOF(s!1, resolving_diff(s!1, t!1))")
               (("1"
                 (replace -4 1 rl)
                 (expand "sub_of_frst_diff" 1)
                 (propax))
                ("2"
                 (expand "V")
                 (expand "Dom")
                 (replace -4 1 rl)
                 (expand "sub_of_frst_diff" 1)
                 (hide-all-but -1)
                 (lemma "resolving_diff_has_diff_argument")
                 (inst -1 "s!1" "t!1" "resolving_diff(s!1, t!1)")
                 (("1" (assert))
                  ("2"
                   (hide -)
                   (rewrite "position_t_resolving_diff")
                   (lemma "position_s_resolving_diff")
                   (inst -1 "s!1" "t!1"
                    "resolving_diff(s!1, t!1)"))))))))))
          ("2"
           (case "VRan(sig!1) = Vars(subtermOF(s!1, resolving_diff(s!1, t!1)))")
           (("1"
             (replaces -1)
             (lemma "sub_of_frst_diff_remove_x")
             (inst -1 "x!1" "s!1" "t!1")
             (assert)
             (expand "member")
             (replace -2 1)
             (lemma "positions_of_ext")
             (inst -1 "sig!1" "t!1")
             (decompose-equality -1)
             (expand "Vars" -4)
             (skosimp)
             (inst -1 "p!1")
             (assert)
             (expand "union")
             (prop)
             (("1"
               (expand "member")
               (flatten)
               (rewrite "subterm_ext_commute")
               (decompose-equality -4)
               (prop)
               (("1" (hide-all-but (-1 1)) (grind))
                ("2" (hide-all-but -2) (typepred "x!1") (grind))))
              ("2"
               (expand "member")
               (skosimp)
               (replace -1 -7)
               (rewrite "pos_subterm")
               (rewrite "subterm_ext_commute")
               (expand "ext" -7)
               (assert)
               (case "subtermOF(t!1, p1!1) = subtermOF(t!1, resolving_diff(s!1, t!1))")
               (("1"
                 (replace -7 -8 rl)
                 (expand "sub_of_frst_diff" -8)
                 (assert)
                 (replace -1 -5)
                 (replace -7 -5 rl)
                 (expand "ext" -5)
                 (expand "sub_of_frst_diff" -5)
                 (hide-all-but (-5 -8 4))
                 (lemma "pos_o_term")
                 (inst -1 "resolving_diff(s!1, t!1)" "p2!1" "s!1")
                 (assert)
                 (prop)
                 (("1"
                   (expand "Vars")
                   (inst 1 "resolving_diff(s!1, t!1) o p2!1")
                   (rewrite "pos_subterm"))
                  ("2"
                   (hide-all-but 1)
                   (lemma "position_s_resolving_diff")
                   (inst -1 "s!1" "t!1" "resolving_diff(s!1, t!1)"))))
                ("2"
                 (replace -6 -7 rl)
                 (expand "sub_of_frst_diff" -7)
                 (assert)
                 (expand "ext" -4)
                 (replace -6 -4 rl)
                 (expand "sub_of_frst_diff" -4)
                 (hide-all-but (-2 -4 -7 6))
                 (lemma "pos_o_term")
                 (inst -1 "p1!1" "p2!1" "t!1")
                 (assert)
                 (expand "Vars")
                 (inst 1 "p1!1 o p2!1")
                 (rewrite "pos_subterm"))))))
            ("2"
             (decompose-equality 1)
             (iff)
             (prop)
             (("1"
               (expand "VRan" -1)
               (expand "IUnion")
               (skosimp)
               (lemma "dom_sub_of_frst_diff_is")
               (inst -1 "resolving_diff(s!1, t!1)" "s!1" "t!1" "sig!1")
               (assert)
               (expand* "restrict" "singleton")
               (decompose-equality -1)
               (inst -1 "i!1")
               (assert)
               (replaces -1)
               (replace -3 -1 rl)
               (expand "sub_of_frst_diff" -1)
               (propax))
              ("2"
               (expand "VRan" 1)
               (expand "IUnion")
               (inst 1 "subtermOF(t!1, resolving_diff(s!1, t!1))")
               (("1"
                 (replace -3 1 rl)
                 (expand "sub_of_frst_diff" 1)
                 (propax))
                ("2"
                 (expand "V")
                 (expand "Dom")
                 (decompose-equality -3)
                 (inst -1 "subtermOF(t!1, resolving_diff(s!1, t!1))")
                 (expand "sub_of_frst_diff" -1)
                 (assert))))))))
          ("3"
           (hide-all-but 1)
           (lemma "position_s_resolving_diff")
           (inst -1 "s!1" "t!1" "resolving_diff(s!1, t!1)"))))))
      ("2"
       (hide-all-but 1)
       (rewrite "position_t_resolving_diff")
       (lemma "position_s_resolving_diff")
       (inst -1 "s!1" "t!1" "resolving_diff(s!1, t!1)"))))))


proof_type: f_proof
decl_type: formula
library: TRS
theory: unification
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp*)
   (assert)
   (decompose-equality 1)
   (iff)
   (prop)
   (("1"
     (expand "difference")
     (expand "union")
     (expand "member")
     (prop)
     (("1"
       (lemma "vars_sub_of_frst_diff_s_is_subset_union")
       (inst -1 "s!1" "t!1")
       (assert)
       (expand "subset?")
       (inst -1 "x!1")
       (expand* "union" "member"))
      ("2"
       (lemma "sub_of_frst_diff_remove_x")
       (inst?)
       (inst -1 "x!1")
       (assert)
       (assert)
       (prop)
       (expand "member")
       (propax))
      ("3"
       (lemma "vars_sub_of_frst_diff_t_is_subset_union")
       (inst -1 "s!1" "t!1")
       (assert)
       (expand "subset?")
       (inst -1 "x!1")
       (expand* "union" "member"))
      ("4"
       (lemma "sub_of_frst_diff_remove_x")
       (inst?)
       (inst -1 "x!1")
       (assert)
       (prop)
       (expand "member")
       (propax))))
    ("2"
     (expand* "difference" "union" "member")
     (prop)
     (("1"
       (hide 3)
       (expand "Vars")
       (skosimp)
       (inst 2 "p!1")
       (("1"
         (rewrite "subterm_ext_commute")
         (replaces -1)
         (typepred "x!1")
         (expand* "V" "Dom" "ext")
         (assert))
        ("2" (hide -1 2) (rewrite "ext_preserv_pos"))))
      ("2"
       (hide 2)
       (expand "Vars")
       (skosimp)
       (inst 2 "p!1")
       (("1"
         (rewrite "subterm_ext_commute")
         (replaces -1)
         (typepred "x!1")
         (expand* "V" "Dom" "ext")
         (assert))
        ("2" (hide -1 2) (rewrite "ext_preserv_pos"))))))))


proof_type: f_proof
decl_type: formula
library: TRS
theory: unification
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp*)
   (assert)
   (name-replace "sig1" "sub_of_frst_diff(s!1, t!1)" :hide? nil)
   (lemma "card_diff_subset[(V)]")
   (lemma "union_vars_ext_sub_of_frst_diff")
   (inst -1 "s!1" "t!1")
   (assert)
   (replace -3 -1)
   (replaces -1)
   (inst -1 "Dom(sig1)" "union(Vars(s!1), Vars(t!1))")
   (("1"
     (prop)
     (("1"
       (case-replace "card(Dom(sig1)) = 1")
       (("1" (assert))
        ("2"
         (hide-all-but 1)
         (rewrite "card_one")
         (lemma "dom_sub_of_frst_diff_is")
         (inst -1 "resolving_diff(s!1, t!1)" "s!1" "t!1" "sig1")
         (assert)
         (prop)
         (("1"
           (inst 1 "subtermOF(s!1, resolving_diff(s!1, t!1))")
           (("1" (expand* "restrict" "singleton"))
            ("2" (expand "V") (propax))))
          ("2"
           (lemma "resolving_diff_vars")
           (inst -1 "s!1" "t!1" "resolving_diff(s!1, t!1)")
           (("1"
             (assert)
             (inst 2 "subtermOF(t!1, resolving_diff(s!1, t!1))")
             (("1" (expand* "restrict" "singleton"))
              ("2" (expand "V") (propax))))
            ("2"
             (hide-all-but 1)
             (rewrite "position_t_resolving_diff")
             (lemma "position_s_resolving_diff")
             (inst -1 "s!1" "t!1" "resolving_diff(s!1, t!1)"))))))))
      ("2"
       (hide 2)
       (expand "subset?")
       (skosimp*)
       (expand* "union" "member")
       (flatten)
       (expand "Vars")
       (lemma "dom_sub_of_frst_diff_is")
       (inst -1 "resolving_diff(s!1, t!1)" "s!1" "t!1" "sig1")
       (assert)
       (expand* "restrict" "singleton")
       (prop)
       (("1"
         (decompose-equality -2)
         (inst -1 "x!1")
         (assert)
         (hide-all-but (-1 1))
         (inst 1 "resolving_diff(s!1, t!1)")
         (assert))
        ("2"
         (decompose-equality -1)
         (("1"
           (inst -1 "x!1")
           (assert)
           (hide-all-but (-1 3))
           (inst 1 "resolving_diff(s!1, t!1)")
           (assert))
          ("2"
           (hide-all-but 1)
           (rewrite "position_t_resolving_diff"))))))))
    ("2" (hide -1 2) (typepred "sig1") (expand "Sub?") (propax))))


proof_type: f_proof
decl_type: formula
library: TRS
theory: unification
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (measure-induct+ "Card(union(Vars(s), Vars(t)))" ("s" "t"))
   (("1"
     (case "x!1 = x!2")
     (("1"
       (hide -2 -3)
       (expand "unification_algorithm")
       (assert)
       (expand* "member" "U" "unifier")
       (assert))
      ("2"
       (inst -1 "ext(sub_of_frst_diff(x!1, x!2))(x!1)"
        "ext(sub_of_frst_diff(x!1, x!2))(x!2)")
       (("1"
         (lemma "vars_ext_sub_of_frst_diff_decrease")
         (inst -1 "x!1" "x!2")
         (("1"
           (assert)
           (hide -1)
           (lemma "ext_sub_of_frst_diff_unifiable")
           (inst -1 "x!1" "x!2")
           (assert)
           (hide -1)
           (lemma "unifier_o")
           (inst -1 "x!1"
            "unification_algorithm(ext(sub_of_frst_diff(x!1, x!2))(x!1),
                                                                                    ext(sub_of_frst_diff(x!1, x!2))(x!2))"
            "x!2" "sub_of_frst_diff(x!1, x!2)")
           (assert)
           (hide -2)
           (expand "unification_algorithm" 2)
           (propax))
          ("2" (hide -1 3) (assert))))
        ("2" (hide 3) (assert))))))
    ("2"
     (hide-all-but 1)
     (rewrite "finite_union[(V)]")
     (("1" (rewrite "vars_of_term_finite"))
      ("2" (rewrite "vars_of_term_finite"))))
    ("3"
     (hide-all-but 1)
     (rewrite "finite_union[(V)]")
     (("1" (rewrite "vars_of_term_finite"))
      ("2" (rewrite "vars_of_term_finite"))))))


proof_type: f_proof
decl_type: formula
library: TRS
theory: unification
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (measure-induct+ "Card( union( Vars(s), Vars(t)))" ("s" "t"))
   (("1"
     (skeep)
     (case "x!1 = x!2")
     (("1"
       (hide (-2 -3))
       (expand* "unification_algorithm" "<=")
       (assert)
       (inst 1 "rho")
       (hide -)
       (rewrite "subs_o_identity"))
      ("2"
       (inst -1 "ext(sub_of_frst_diff(x!1, x!2))(x!1)"
        "ext(sub_of_frst_diff(x!1, x!2))(x!2)")
       (("1"
         (lemma "sub_of_frst_diff_unifier_o")
         (inst -1 "rho" "x!1" "x!2")
         (("1"
           (assert)
           (skeep -1)
           (inst -2 "theta")
           (lemma "vars_ext_sub_of_frst_diff_decrease")
           (inst -1 "x!1" "x!2")
           (assert)
           (hide -1)
           (prop)
           (("1"
             (name-replace "sig1" "sub_of_frst_diff(x!1, x!2)" :hide?
              nil)
             (name-replace "sig2"
              "unification_algorithm(ext(sig1)(x!1), ext(sig1)(x!2))"
              :hide? nil)
             (expand "unification_algorithm" 2)
             (replace -2 2)
             (replace -1 2)
             (expand "<=")
             (skeep -3)
             (inst 2 "tau")
             (hide -1 -2 -5 1)
             (replaces -1)
             (rewrite "o_ass"))
            ("2"
             (hide 2 3)
             (name-replace "sig1" "sub_of_frst_diff(x!1, x!2)" :hide?
              nil)
             (replaces -2)
             (expand* "member" "U" "unifier")
             (rewrite "ext_o")
             (expand "o")
             (propax))))
          ("2"
           (assert)
           (hide -1 2 3)
           (expand* "member" "U" "unifiable")
           (inst 1 "rho"))))
        ("2"
         (assert)
         (hide 2 3)
         (expand* "member" "U" "unifiable")
         (inst 1 "rho"))))))
    ("2"
     (hide-all-but (-1 1))
     (expand* "member" "U" "unifiable")
     (inst 1 "rho!1"))
    ("3"
     (hide -1 2)
     (rewrite "finite_union")
     (("1" (rewrite "vars_of_term_finite"))
      ("2" (rewrite "vars_of_term_finite"))))
    ("4"
     (hide -1 2)
     (rewrite "finite_union")
     (("1" (rewrite "vars_of_term_finite"))
      ("2" (rewrite "vars_of_term_finite"))))
    ("5"
     (hide -1 2)
     (skeep)
     (expand* "member" "U" "unifiable")
     (inst 1 "rho"))
    ("6"
     (hide -1 2)
     (skeep)
     (expand* "member" "U" "unifiable")
     (inst 1 "rho1"))
    ("7"
     (hide-all-but (-1 1))
     (expand* "member" "U" "unifiable")
     (inst 1 "rho!1"))
    ("8"
     (hide-all-but 1)
     (rewrite "finite_union")
     (("1" (rewrite "vars_of_term_finite"))
      ("2" (rewrite "vars_of_term_finite"))))
    ("9"
     (hide-all-but 1)
     (rewrite "finite_union")
     (("1" (rewrite "vars_of_term_finite"))
      ("2" (rewrite "vars_of_term_finite"))))
    ("10"
     (hide-all-but 1)
     (skeep)
     (expand* "member" "U" "unifiable")
     (inst 1 "rho"))
    ("11"
     (hide-all-but 1)
     (rewrite "finite_union")
     (("1" (rewrite "vars_of_term_finite"))
      ("2" (rewrite "vars_of_term_finite"))))
    ("12" (hide 2) (expand* "member" "U" "unifiable") (inst 1 "rho!1"))
    ("13"
     (hide 2)
     (rewrite "finite_union")
     (("1" (rewrite "vars_of_term_finite"))
      ("2" (rewrite "vars_of_term_finite"))))))


proof_type: f_proof
decl_type: formula
library: TRS
theory: unification
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (inst 1 "unification_algorithm(s, t)")
   (expand "mgu")
   (prop)
   (("1" (rewrite "unification_algorithm_gives_unifier"))
    ("2" (skeep) (rewrite "unification_algorithm_gives_mg_subs"))))


proof_type: t_proof
decl_type: tcc
library: TRS
theory: unification
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp*)
   (lemma "positions_of_arg")
   (inst -1 "s!1" "k!1")
   (("1"
     (typepred "k!1")
     (lemma "uni_diff_equal_length_arg")
     (inst -1 "s!1" "t!1" "f!1" "st!1")
     (assert)
     (inst -1 "fp!1" "stp!1")
     (assert)
     (flatten)
     (replace -4 1)
     (assert))
    ("2" (assert))))


proof_type: t_proof
decl_type: tcc
library: TRS
theory: unification
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp*)
   (lemma "positions_of_arg")
   (inst -1 "t!1" "k!1")
   (("1" (typepred "k!1") (replace -3 1) (assert)) ("2" (assert))))


proof_type: t_proof
decl_type: tcc
library: TRS
theory: unification
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp*)
   (assert)
   (typepred "t!1")
   (expand "unifiable" -1)
   (skeep -1)
   (replace -2 -1)
   (replace -3 -1)
   (expand "unifier" -1)
   (decompose-equality -1)
   (assert)
   (prop)
   (("1" (hide-all-but (-1 -2 -4 -5)) (expand "ext") (propax))
    ("2"
     (expand "ext" -3)
     (replace -3 (-2 -4 -6) rl)
     (expand "ext" -4)
     (flatten)
     (decompose-equality -5)
     (inst -1 "k!1")
     (("1" (expand "unifiable") (inst 3 "sigma") (grind))
      ("2" (expand "unifiable") (inst 4 "sigma") (grind))))))


proof_type: t_proof
decl_type: tcc
library: TRS
theory: unification
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp*)
   (expand "<<")
   (lift-if)
   (prop)
   (("1" (hide-all-but (-1 -2)) (assert))
    ("2"
     (inst 2 k!1)
     (("1" (assert) (grind))
      ("2"
       (lemma "uni_diff_equal_length_arg")
       (inst -1 "s!1" "t!1" "f!1" "st!1")
       (assert)
       (inst -1 "fp!1" "stp!1")
       (assert)
       (flatten)
       (replace -3 1)
       (assert))))))


proof_type: t_proof
decl_type: tcc
library: TRS
theory: unification
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp*)
   (lemma "positions_of_arg")
   (inst -1 "s!1" "kk!1")
   (("1"
     (typepred "kk!1")
     (lemma "uni_diff_equal_length_arg")
     (inst -1 "s!1" "t!1" "f!1" "st!1")
     (assert)
     (inst -1 "fp!1" "stp!1")
     (assert)
     (flatten)
     (replace -4 1)
     (assert))
    ("2" (assert))))


proof_type: t_proof
decl_type: tcc
library: TRS
theory: unification
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp*)
   (lemma "positions_of_arg")
   (inst -1 "t!1" "kk!1")
   (("1" (typepred "kk!1") (replace -3 1) (assert)) ("2" (assert))))


proof_type: t_proof
decl_type: tcc
library: TRS
theory: unification
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp*)
   (lemma "uni_diff_equal_length_arg")
   (inst -1 "s!1" "t!1" "f!1" "st!1")
   (assert)
   (inst -1 "fp!1" "stp!1")
   (assert)
   (flatten)
   (replace -1 -4 rl)
   (hide -1)
   (typepred t!1)
   (hide -1)
   (case "st!1 = stp!1")
   (("1" (hide +) (grind))
    ("2"
     (decompose-equality 1)
     (decompose-equality 1)
     (typepred x!1)
     (expand* "nonempty?" "empty?")
     (inst -6 "x!1")
     (expand "member")
     (replace -5 -6)
     (replace -4 -6)
     (assert)
     (expand subtermOF)
     (lift-if)
     (assert)
     (grind))))


proof_type: t_proof
decl_type: tcc
library: TRS
theory: unification
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (expand "resolving_diff" -1)
   (lift-if)
   (prop)
   (assert)
   (replace -1 5)
   (rewrite "first_add")
   (("1"
     (hide -1 4)
     (lemma "resolving_diff_TCC1")
     (inst -1 "s!1" "t!1" "f(s!1)" "args(s!1)")
     (assert)
     (case "s!1 = app( f(s!1), args(s!1))")
     (("1"
       (assert)
       (inst -2 "f(t!1)" "args(t!1)")
       (case "t!1 = app( f(t!1), args(t!1))")
       (("1"
         (assert)
         (inst -3
          "min({kk: below[length(args(t!1))] |
                                                   NOT subtermOF(s!1, #(1 + kk)) = subtermOF(t!1, #(1 + kk))})")
         (("1"
           (hide 5 2 3 4 5)
           (lemma "resolving_diff_TCC7")
           (inst -1 "s!1" "t!1" "f(s!1)" "args(s!1)")
           (assert)
           (inst -1 "f(t!1)" "args(t!1)")
           (assert))
          ("2"
           (hide 2 3 4 5)
           (skosimp*)
           (lemma "positions_of_arg")
           (inst -1 "t!1" "kk!1")
           (assert))
          ("3"
           (hide 2 3 4 5)
           (skosimp*)
           (lemma "positions_of_arg")
           (inst -1 "s!1" "kk!1")
           (("1" (assert))
            ("2"
             (typepred "kk!1")
             (lemma "uni_diff_equal_length_arg")
             (inst -1 "s!1" "t!1" "f(s!1)" "args(s!1)")
             (assert)
             (inst -1 "f(t!1)" "args(t!1)")
             (assert))))))
        ("2" (hide-all-but (1 2)) (decompose-equality))))
      ("2" (hide-all-but (1 4)) (decompose-equality))))
    ("2"
     (hide -1 5 6)
     (lemma "resolving_diff_TCC7")
     (inst -1 "s!1" "t!1" "f(s!1)" "args(s!1)")
     (assert)
     (case "s!1 = app( f(s!1), args(s!1))")
     (("1"
       (assert)
       (inst -2 "f(t!1)" "args(t!1)")
       (case "t!1 = app( f(t!1), args(t!1))")
       (("1" (assert)) ("2" (hide-all-but (1 3)) (decompose-equality))))
      ("2" (hide-all-but (1 5)) (decompose-equality))))
    ("3"
     (hide -1 5 6)
     (skosimp*)
     (lemma "positions_of_arg")
     (inst -1 "t!1" "kk!1")
     (assert))
    ("4"
     (hide -1 5 6)
     (skosimp*)
     (lemma "positions_of_arg")
     (inst -1 "s!1" "kk!1")
     (("1" (assert))
      ("2"
       (typepred "kk!1")
       (lemma "uni_diff_equal_length_arg")
       (inst -1 "s!1" "t!1" "f(s!1)" "args(s!1)")
       (assert)
       (case "s!1 = app( f(s!1), args(s!1))")
       (("1"
         (assert)
         (inst -2 "f(t!1)" "args(t!1)")
         (assert)
         (hide-all-but (1 4))
         (decompose-equality))
        ("2" (hide-all-but (1 6)) (decompose-equality))))))))


proof_type: t_proof
decl_type: tcc
library: TRS
theory: unification
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (expand "resolving_diff")
   (lift-if)
   (prop)
   (assert)
   (replace -1 5)
   (rewrite "first_add")
   (("1"
     (hide -1 4)
     (lemma "resolving_diff_TCC2")
     (inst -1 "s!1" "t!1" "f(s!1)" "args(s!1)")
     (assert)
     (case "s!1 = app( f(s!1), args(s!1))")
     (("1"
       (assert)
       (inst -2 "f(t!1)" "args(t!1)")
       (case "t!1 = app( f(t!1), args(t!1))")
       (("1"
         (assert)
         (inst -3
          "min({kk: below[length(args(t!1))] |
                                                  NOT subtermOF(s!1, #(1 + kk)) = subtermOF(t!1, #(1 + kk))})")
         (("1"
           (hide 2 3 4 5)
           (lemma "resolving_diff_TCC7")
           (inst -1 "s!1" "t!1" "f(s!1)" "args(s!1)")
           (assert)
           (inst -1 "f(t!1)" "args(t!1)")
           (assert))
          ("2"
           (hide 2 3 4 5)
           (skosimp*)
           (lemma "positions_of_arg")
           (inst -1 "t!1" "kk!1")
           (assert))
          ("3"
           (hide 2 3 4 5)
           (skosimp*)
           (lemma "positions_of_arg")
           (inst -1 "s!1" "kk!1")
           (("1" (assert))
            ("2"
             (typepred "kk!1")
             (lemma "uni_diff_equal_length_arg")
             (inst -1 "s!1" "t!1" "f(s!1)" "args(s!1)")
             (assert)
             (inst -1 "f(t!1)" "args(t!1)")
             (assert))))))
        ("2" (hide-all-but (1 2)) (decompose-equality))))
      ("2" (hide-all-but (1 4)) (decompose-equality))))
    ("2"
     (hide -1 5 6)
     (lemma "resolving_diff_TCC7")
     (inst -1 "s!1" "t!1" "f(s!1)" "args(s!1)")
     (case "s!1 = app( f(s!1), args(s!1))")
     (("1"
       (assert)
       (inst -2 "f(t!1)" "args(t!1)")
       (case "t!1 = app( f(t!1), args(t!1))")
       (("1" (assert)) ("2" (hide-all-but (1 3)) (decompose-equality))))
      ("2" (hide-all-but (1 5)) (decompose-equality))))
    ("3"
     (hide -1 5 6)
     (skosimp*)
     (lemma "positions_of_arg")
     (inst -1 "t!1" "kk!1")
     (assert))
    ("4"
     (hide -1 5 6)
     (skosimp*)
     (lemma "positions_of_arg")
     (inst -1 "s!1" "kk!1")
     (("1" (assert))
      ("2"
       (typepred "kk!1")
       (lemma "uni_diff_equal_length_arg")
       (inst -1 "s!1" "t!1" "f(s!1)" "args(s!1)")
       (assert)
       (case "s!1 = app( f(s!1), args(s!1))")
       (("1"
         (assert)
         (inst -2 "f(t!1)" "args(t!1)")
         (assert)
         (hide-all-but (1 5))
         (decompose-equality))
        ("2" (hide-all-but (1 6)) (decompose-equality))))))))


proof_type: t_proof
decl_type: tcc
library: TRS
theory: unification
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (expand "resolving_diff")
   (lift-if)
   (hide 2)
   (prop)
   (reveal 1)
   (assert)
   (hide 5)
   (name-replace "k1"
    "min({kk: below[length(args(t!1))]
                                  | NOT subtermOF(s!1, #(1 + kk)) = subtermOF(t!1, #(1 + kk))})")
   (("1"
     (name-replace "k" "1+k1")
     (replace -1 1)
     (hide -1)
     (rewrite "first_add[posnat]")
     (("1"
       (lemma "resolving_diff_TCC3")
       (inst -1 "s!1" "t!1" "f(s!1)" "args(s!1)")
       (case "s!1 = app(f(s!1), args(s!1))")
       (("1"
         (assert)
         (inst -2 "f(t!1)" "args(t!1)")
         (case "t!1 = app(f(t!1), args(t!1))")
         (("1"
           (assert)
           (inst -3 "k - 1")
           (("1" (reveal -6) (reveal -5) (assert))
            ("2" (reveal -6) (reveal -5) (assert))))
          ("2" (hide-all-but (1 3)) (decompose-equality))))
        ("2" (hide-all-but (1 5)) (decompose-equality))))
      ("2"
       (hide 2)
       (lemma "resolving_diff_TCC3")
       (inst -1 "s!1" "t!1" "f(s!1)" "args(s!1)")
       (case "s!1 = app(f(s!1), args(s!1))")
       (("1"
         (assert)
         (inst -2 "f(t!1)" "args(t!1)")
         (case "t!1 = app(f(t!1), args(t!1))")
         (("1"
           (assert)
           (inst -3 "k - 1")
           (("1" (reveal -6) (reveal -5) (assert))
            ("2" (reveal -6) (reveal -5) (assert))))
          ("2" (hide-all-but (1 3)) (decompose-equality))))
        ("2" (hide-all-but (1 5)) (decompose-equality))))
      ("3"
       (hide 2)
       (lemma "resolving_diff_TCC2")
       (inst -1 "s!1" "t!1" "f(s!1)" "args(s!1)")
       (case "s!1 = app(f(s!1), args(s!1))")
       (("1"
         (assert)
         (inst -2 "f(t!1)" "args(t!1)")
         (case "t!1 = app(f(t!1), args(t!1))")
         (("1"
           (assert)
           (hide-all-but (-3 1))
           (inst -1 "k - 1")
           (("1" (reveal -7) (reveal -8) (assert))
            ("2" (hide 2) (reveal -7) (reveal -8) (assert))))
          ("2" (hide-all-but (1 3)) (decompose-equality))))
        ("2" (hide-all-but (1 5)) (decompose-equality))))
      ("4"
       (hide 2)
       (lemma "resolving_diff_TCC1")
       (inst -1 "s!1" "t!1" "f(s!1)" "args(s!1)")
       (case "s!1 = app(f(s!1), args(s!1))")
       (("1"
         (assert)
         (inst -2 "f(t!1)" "args(t!1)")
         (case "t!1 = app(f(t!1), args(t!1))")
         (("1"
           (assert)
           (hide-all-but (-3 1))
           (inst -1 "k - 1")
           (("1" (reveal -7) (reveal -8) (assert))
            ("2" (hide 2) (reveal -7) (reveal -8) (assert))))
          ("2" (hide-all-but (1 3)) (decompose-equality))))
        ("2" (hide-all-but (1 5)) (decompose-equality))))))
    ("2"
     (hide -1 2)
     (lemma "resolving_diff_TCC7")
     (inst -1 "s!1" "t!1" "f(s!1)" "args(s!1)")
     (case "s!1 = app(f(s!1), args(s!1))")
     (("1"
       (assert)
       (inst -2 "f(t!1)" "args(t!1)")
       (case "t!1 = app(f(t!1), args(t!1))")
       (("1" (assert)) ("2" (hide-all-but (1 3)) (decompose-equality))))
      ("2" (hide-all-but (1 5)) (decompose-equality))))
    ("3"
     (hide -1 2)
     (skosimp*)
     (typepred "kk!1")
     (lemma "positions_of_arg")
     (inst -1 "t!1" "kk!1")
     (assert))
    ("4"
     (hide -1 2)
     (skosimp*)
     (lemma "positions_of_arg")
     (inst -1 "s!1" "kk!1")
     (("1" (assert))
      ("2"
       (typepred "kk!1")
       (lemma "uni_diff_equal_length_arg")
       (inst -1 "s!1" "t!1" "f(s!1)" "args(s!1)")
       (case "s!1 = app(f(s!1), args(s!1))")
       (("1"
         (assert)
         (inst -2 "f(t!1)" "args(t!1)")
         (case "t!1 = app(f(t!1), args(t!1))")
         (("1" (assert))
          ("2" (hide-all-but (1 4)) (decompose-equality))))
        ("2" (hide-all-but (1 6)) (decompose-equality))))))))


proof_type: t_proof
decl_type: tcc
library: TRS
theory: unification
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp*)
   (lemma "Vars_is_var")
   (lemma "vars_of_term_finite")
   (inst -1 "sp!1")
   (inst -2 "sp!1")
   (assert)
   (expand* "Sub?" "Dom")
   (replaces -2)
   (expand "is_finite")
   (skosimp)
   (inst 1 "N!1" "f!1")
   (("1"
     (hide-all-but (-1 1))
     (expand "injective?")
     (skeep)
     (inst -1 "x1" "x2")
     (assert))
    ("2"
     (skeep)
     (prop)
     (("1"
       (assert)
       (hide -3 -4 -7)
       (lemma "resolving_diff_has_diff_argument")
       (inst -1 "s!1" "t!1" "k!1")
       (("1" (assert))
        ("2"
         (hide-all-but (-3 1))
         (lemma "position_s_resolving_diff")
         (lemma "position_t_resolving_diff")
         (inst -1 "s!1" "t!1" "k!1")
         (inst -2 "s!1" "t!1" "k!1")
         (assert))))
      ("2" (assert))))))


proof_type: t_proof
decl_type: tcc
library: TRS
theory: unification
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp*)
   (lemma "resolving_diff_vars")
   (inst -1 "s!1" "t!1" "k!1")
   (("1"
     (assert)
     (hide 1)
     (lemma "Vars_is_var")
     (inst -1 "tp!1")
     (assert)
     (lemma "vars_of_term_finite")
     (inst -1 "tp!1")
     (replaces -2)
     (expand* "Sub?" "Dom" "is_finite")
     (skosimp)
     (inst 1 "N!1" "f!1")
     (("1"
       (hide-all-but (-1 1))
       (expand "injective?")
       (skeep)
       (inst -1 "x1" "x2")
       (assert))
      ("2" (skeep) (prop) (("1" (assert)) ("2" (assert))))))
    ("2"
     (hide-all-but (-1 1))
     (lemma "position_s_resolving_diff")
     (lemma "position_t_resolving_diff")
     (inst -1 "s!1" "t!1" "k!1")
     (inst -2 "s!1" "t!1" "k!1")
     (assert))))


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


proof_type: t_proof
decl_type: tcc
library: TRS
theory: unification
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (rewrite "finite_union[(V)]")
   (("1" (rewrite "vars_of_term_finite"))
    ("2" (rewrite "vars_of_term_finite"))))


proof_type: t_proof
decl_type: tcc
library: TRS
theory: unification
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (rewrite "finite_union")
   (("1" (rewrite "vars_of_term_finite"))
    ("2" (rewrite "vars_of_term_finite"))))


proof_type: t_proof
decl_type: tcc
library: TRS
theory: unification
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (lemma "finite_union[(V)]")
   (inst -1 "Vars(s!1)" "Vars(t!1)")
   (("1" (hide 2) (rewrite "vars_of_term_finite"))
    ("2" (hide 2) (rewrite "vars_of_term_finite"))))


proof_type: t_proof
decl_type: tcc
library: TRS
theory: unification
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (lemma "finite_union[(V)]")
   (inst -1 "Vars(z!1`1)" "Vars(z!1`2)")
   (("1" (hide 2) (rewrite "vars_of_term_finite"))
    ("2" (hide 2) (rewrite "vars_of_term_finite"))))


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


proof_type: f_proof
decl_type: formula
library: TRS
theory: rewrite_rules
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (expand "rewrite_rule?")
   (prop)
   (("1" (expand "ext") (lift-if) (prop) (assert))
    ("2" (rewrite "rename_preserv_inclusion"))))


proof_type: f_proof
decl_type: formula
library: TRS
theory: reduction
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (expand "close_subs?")
   (split)
   (("1"
     (skeep)
     (expand "TC")
     (expand "IUnion")
     (skolem * "j")
     (generalize "s" "s" :fnums (-1 1))
     (generalize "t" "t" :fnums 1)
     (generalize "j" "n" :fnums 1)
     (induct "n")
     (("1" (assert)) ("2" (assert))
      ("3"
       (skosimp*)
       (prop)
       (("1"
         (rewrite "iterate_add_one")
         (expand "o")
         (skosimp*)
         (inst -1 "t!1" "y!1")
         (assert)
         (skosimp*)
         (inst -5 "s!1" "y!1" "sigma")
         (assert)
         (inst 1 "i!1 + 1")
         (rewrite "iterate_add_one" 1)
         (expand "o")
         (inst 1 "ext(sigma)(y!1)")
         (assert))
        ("2"
         (typepred "j!1")
         (case "j!1 = 0")
         (("1"
           (hide-all-but (-1 -4 -5 2))
           (replaces -1)
           (assert)
           (rewrite "iterate_1")
           (inst -2 "s!1" "t!1" "sigma")
           (inst 1 "1")
           (rewrite "iterate_1")
           (assert))
          ("2" (assert))))))))
    ("2"
     (skeep)
     (expand "RTC")
     (expand "IUnion")
     (skolem * "j")
     (generalize "s" "s" :fnums (-1 1))
     (generalize "t" "t" :fnums 1)
     (generalize "j" "n" :fnums 1)
     (induct "n")
     (("1"
       (skolem * ("s1" "t1"))
       (flatten)
       (inst 1 "0")
       (hide -2)
       (expand "iterate")
       (assert))
      ("2"
       (skosimp*)
       (rewrite "iterate_add_one")
       (expand "o")
       (skosimp*)
       (inst -1 "t!1" "y!1")
       (assert)
       (skosimp*)
       (inst -4 "s!1" "y!1" "sigma")
       (assert)
       (inst 1 "i!1 + 1")
       (rewrite "iterate_add_one" 1)
       (expand "o")
       (inst 1 "ext(sigma)(y!1)")
       (assert))))
    ("3"
     (skeep)
     (expand "EC")
     (expand "RTC")
     (expand "IUnion")
     (skolem * "j")
     (generalize "s" "s" :fnums (-1 1))
     (generalize "t" "t" :fnums 1)
     (generalize "j" "n" :fnums 1)
     (induct "n")
     (("1"
       (skolem * ("s1" "t1"))
       (flatten)
       (hide -2)
       (inst 1 "0")
       (expand "iterate")
       (assert))
      ("2"
       (skosimp*)
       (rewrite "iterate_add_one")
       (expand "o")
       (skosimp*)
       (inst -1 "t!1" "y!1")
       (assert)
       (skosimp*)
       (expand "SC" -2)
       (expand* "union" "member")
       (prop)
       (("1"
         (inst -4 "s!1" "y!1" "sigma")
         (assert)
         (lemma "R_subset_SC")
         (inst?)
         (expand "subset?")
         (inst -1 "(ext(sigma)(s!1), ext(sigma)(y!1))")
         (expand "member")
         (assert)
         (inst 1 "i!1 + 1")
         (rewrite "iterate_add_one")
         (expand "o")
         (inst 1 "ext(sigma)(y!1)")
         (assert))
        ("2"
         (expand "converse")
         (inst 1 "i!1 + 1")
         (rewrite "iterate_add_one")
         (expand "o")
         (inst 1 "ext(sigma)(y!1)")
         (assert)
         (expand "SC" 1)
         (expand* "union" "member" "converse")
         (prop)
         (inst -4 "y!1" "s!1" "sigma")
         (assert))))))))


proof_type: f_proof
decl_type: formula
library: TRS
theory: reduction
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (split)
   (("1"
     (expand "close_subs?")
     (skosimp*)
     (expand "reduction?")
     (skosimp*)
     (inst 1 "e!1" "comp(sigma!1, sigma!2)" "p!1")
     (("1"
       (split)
       (("1"
         (rewrite "ext_o")
         (expand "o")
         (rewrite "subterm_ext_commute")
         (assert))
        ("2"
         (rewrite "ext_o")
         (expand "o")
         (replace -2)
         (lemma "ext_replace_ext")
         (inst -1 "p!1" "s!1" "sigma!1" "ext(sigma!2)(rhs(e!1))")
         (typepred "p!1")
         (assert))))
      ("2" (rewrite "ext_preserv_pos")) ("3" (rewrite "subs_o"))))
    ("2"
     (expand "comp_op?")
     (skosimp*)
     (expand "reduction?")
     (skosimp*)
     (inst 1 "e!1" "sigma!1" "add_first(i!1 + 1, p!1)")
     (("1"
       (split)
       (("1"
         (expand "subtermOF" 1)
         (lift-if)
         (prop)
         (("1" (grind))
          ("2"
           (expand "finseq_appl")
           (case-replace "first(add_first(1 + i!1, p!1)) - 1 = i!1"
            :hide? t)
           (("1"
             (case-replace "rest(add_first(1 + i!1, p!1)) = p!1" :hide?
              t)
             (hide-all-but 1)
             (rewrite "rest_add_first"))
            ("2" (hide-all-but 1) (rewrite "first_add") (assert))))))
        ("2"
         (expand "finseq_appl")
         (decompose-equality)
         (("1" (grind))
          ("2"
           (expand "replace")
           (expand "finseq_appl")
           (decompose-equality)
           (("1" (grind))
            ("2"
             (decompose-equality)
             (lift-if)
             (prop)
             (("1" (grind)) ("2" (grind)) ("3" (grind))))
            ("3" (grind))))
          ("3" (grind))))))
      ("2"
       (hide (-1 -2))
       (typepred "p!1")
       (expand "finseq_appl")
       (grind))))))


proof_type: f_proof
decl_type: formula
library: TRS
theory: reduction
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (expand "reduction?")
   (inst 1 "e" "identity" "empty_seq")
   (("1"
     (expand* "subtermOF" "replaceTerm")
     (lift-if)
     (rewrite "ext_iden")
     (rewrite "ext_iden")
     (rewrite "empty_0"))
    ("2" (expand "positionsOF") (lift-if) (grind))
    ("3" (rewrite "iden_subs"))))


proof_type: f_proof
decl_type: formula
library: TRS
theory: replace_positions
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (measure-induct+ "length(fss)" ("s" "fss"))
   (("1"
     (skosimp*)
     (case "length(x!2) = 0")
     (("1" (hide -2) (expand "replace_pos") (assert))
      ("2"
       (expand "replace_pos" 2 1)
       (assert)
       (inst -1 "replaceTerm(x!1, t!1, x!2(0))" "rest(x!2)")
       (inst -1 "t!1" "sig!1")
       (rewrite "length_rest")
       (replaces -1)
       (rewrite "ext_replace_ext")
       (("1" (expand "replace_pos" 2 2) (propax))
        ("2"
         (hide (2 3))
         (typepred "x!2")
         (expand "SPP?")
         (flatten)
         (hide -1)
         (expand "SP?")
         (inst?))))))
    ("2"
     (hide-all-but 1)
     (typepred "y!2")
     (expand "SPP?")
     (flatten)
     (assert)
     (hide -1)
     (expand "SP?")
     (skosimp*)
     (inst?)
     (rewrite "ext_preserv_pos"))
    ("3" (hide (-1 2)) (skosimp*) (rewrite "replace_pos_is_stable_TCC1"))
    ("4" (hide (-1 2)) (skosimp*) (rewrite "replace_pos_is_stable_TCC1"))
    ("5" (hide-all-but 1) (rewrite "replace_pos_is_stable_TCC1"))
    ("6" (hide (-1 2)) (skosimp*) (rewrite "replace_pos_is_stable_TCC1"))
    ("7" (hide 2) (rewrite "replace_pos_is_stable_TCC1"))))


proof_type: f_proof
decl_type: formula
library: TRS
theory: replace_positions
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (measure-induct+ "length(fss)" ("s" "fss"))
   (("1"
     (skosimp*)
     (expand "replace_pos" 1)
     (prop)
     (("1" (hide-all-but -1) (expand* "add_first" "insert?") (assert))
      ("2"
       (lemma "fspos.rest_add_first")
       (inst -1 "x!2" "q!1")
       (replaces -1)
       (lemma "fspos.nth_add_first")
       (inst -1 "x!2" "q!1" "0")
       (("1"
         (replace -1)
         (case "length(x!2) = 0")
         (("1"
           (hide -3)
           (expand "replace_pos")
           (prop)
           (hide-all-but 1)
           (lemma "replace_preserv_pos")
           (inst -1 "q!1" "x!1" "t!1")
           (assert))
          ("2"
           (expand "replace_pos" 3)
           (prop)
           (lemma "replace_commutativity")
           (inst -1 "q!1" "x!2(0)" "t!1" "x!1" "t!1")
           (typepred "q!1" "x!2")
           (expand "SPP?")
           (flatten)
           (copy -3)
           (expand "SP?" -4)
           (inst -4 "0")
           (copy -8)
           (inst -9 "0")
           (assert)
           (rewrite "parallel_comm")
           (replace -6 2)
           (case "length(rest(x!2)) = 0")
           (("1"
             (hide-all-but (-1 -3 -4 -10 2 3))
             (expand "replace_pos")
             (prop)
             (lemma "replace_preserv_parallel_pos")
             (inst -1 "x!2(0)" "q!1" "x!1" "t!1")
             (expand "SP?")
             (inst -4 "0")
             (assert)
             (lemma "replace_preserv_pos")
             (inst -1 "q!1" "replaceTerm(x!1, t!1, x!2(0))" "t!1")
             (assert))
            ("2"
             (inst -8 "replaceTerm(x!1, t!1, x!2(0))" "rest(x!2)")
             (("1"
               (inst -8 "t!1" "q!1")
               (prop)
               (("1"
                 (expand "finseq_appl")
                 (expand "replace_pos" -1)
                 (prop)
                 (("1" (hide-all-but -1) (grind))
                  ("2"
                   (lemma "fspos.nth_add_first")
                   (inst -1 "rest(x!2)" "q!1" "0")
                   (("1" (replaces -1) (rewrite "rest_add_first"))
                    ("2" (hide-all-but 1) (grind))))))
                ("2"
                 (hide-all-but (-1 1 2 3))
                 (skosimp*)
                 (inst -1 "i!1 + 1")
                 (("1"
                   (lemma "fspos.rest_pos")
                   (expand "finseq_appl")
                   (inst -1 "x!2")
                   (assert)
                   (inst -1 "i!1")
                   (("1" (assert))
                    ("2" (typepred "i!1") (hide 2) (grind))))
                  ("2" (typepred "i!1") (hide 2) (grind))))
                ("3" (hide-all-but (1 3)) (rewrite "length_rest"))))
              ("2"
               (hide-all-but (-2 -4 1 2 3))
               (expand "SPP?")
               (split)
               (("1" (rewrite "rest_of_PP_is_PP"))
                ("2"
                 (copy -1)
                 (expand "SP?")
                 (skosimp*)
                 (expand "finseq_appl")
                 (inst -2 "i!1 + 1")
                 (("1"
                   (lemma "fspos.rest_pos")
                   (inst?)
                   (assert)
                   (inst -1 "i!1")
                   (("1"
                     (expand "PP?")
                     (prop)
                     (("1" (hide (-2 -3 -4 1)) (grind))
                      ("2"
                       (expand "finseq_appl")
                       (replace -2 2 rl)
                       (inst -1 "0" "1 + i!1")
                       (assert)
                       (lemma "replace_preserv_parallel_pos")
                       (inst -1 "x!2`seq(0)" "x!2`seq(1 + i!1)" "x!1"
                        "t!1")
                       (inst -4 "0")
                       (assert))))
                    ("2" (hide (-1 -2 2)) (typepred "i!1") (grind))))
                  ("2"
                   (hide-all-but 1)
                   (typepred "i!1")
                   (grind))))))))))))
        ("2" (assert))))))
    ("2"
     (hide-all-but (-1 1))
     (typepred "y!2")
     (expand "SPP?")
     (flatten)
     (split)
     (("1" (rewrite "add_first_parallel_pos_to_PP_is_PP"))
      ("2" (rewrite "add_first_parallel_pos_to_SP_is_SP"))))
    ("3"
     (hide -1 2)
     (skosimp*)
     (typepred "y!2")
     (expand "SPP?")
     (flatten)
     (split)
     (("1" (rewrite "add_first_parallel_pos_to_PP_is_PP"))
      ("2" (rewrite "add_first_parallel_pos_to_SP_is_SP"))))
    ("4"
     (hide -1 2)
     (skosimp*)
     (typepred "x!1`2")
     (expand "SPP?")
     (flatten)
     (split)
     (("1" (rewrite "add_first_parallel_pos_to_PP_is_PP"))
      ("2" (rewrite "add_first_parallel_pos_to_SP_is_SP"))))
    ("5"
     (hide-all-but (-1 1))
     (typepred "y!1`2")
     (expand "SPP?")
     (flatten)
     (split)
     (("1" (rewrite "add_first_parallel_pos_to_PP_is_PP"))
      ("2" (rewrite "add_first_parallel_pos_to_SP_is_SP"))))
    ("6"
     (hide -1 2)
     (skosimp*)
     (typepred "y!1`2")
     (expand "SPP?")
     (flatten)
     (split)
     (("1" (rewrite "add_first_parallel_pos_to_PP_is_PP"))
      ("2" (rewrite "add_first_parallel_pos_to_SP_is_SP"))))
    ("7"
     (hide 2)
     (typepred "fss!1")
     (expand "SPP?")
     (flatten)
     (split)
     (("1" (rewrite "add_first_parallel_pos_to_PP_is_PP"))
      ("2" (rewrite "add_first_parallel_pos_to_SP_is_SP"))))))


proof_type: f_proof
decl_type: formula
library: TRS
theory: replace_positions
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (measure-induct+ "length(fss)" ("s" "fss"))
   (skosimp*)
   (case "length(x!2) = 0")
   (("1" (hide (-2 -3)) (typepred "q!1") (expand "replace_pos") (assert))
    ("2"
     (expand "replace_pos" 2)
     (assert)
     (inst -1 "replaceTerm(x!1, t!1, x!2(0))" "rest(x!2)")
     (inst -1 "t!1" "q!1")
     (("1"
       (rewrite "length_rest")
       (assert)
       (hide 3)
       (case "length(rest(x!2)) = 0")
       (("1" (hide -2) (grind))
        ("2"
         (skosimp*)
         (lemma "fspos.rest_pos")
         (expand "finseq_appl")
         (inst?)
         (assert)
         (inst -1 "i!1")
         (("1"
           (inst -2 "i!1 + 1")
           (("1" (assert))
            ("2" (hide-all-but 1) (typepred "i!1") (grind))))
          ("2" (hide-all-but 1) (typepred "i!1") (grind))))))
      ("2"
       (hide 3)
       (inst -1 "0")
       (typepred "q!1")
       (lemma "replace_preserv_parallel_pos")
       (inst -1 "x!2(0)" "q!1" "x!1" "t!1")
       (assert)
       (hide-all-but 1)
       (typepred "x!2")
       (expand "SPP?")
       (flatten)
       (expand "SP?")
       (inst -2 "0"))))))


proof_type: f_proof
decl_type: formula
library: TRS
theory: replace_positions
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (measure-induct+ "length(fssp)" ("s" "fssp"))
   (skolem 1 ("t" "_"))
   (case "length(x!2) = 0")
   (("1" (hide -2) (grind))
    ("2"
     (skosimp*)
     (case-replace "i!1 = 0")
     (("1"
       (hide -2)
       (lemma "preserv_first_position")
       (inst -1 "t" "x!1" "rest(x!2)" "first(x!2)")
       (("1"
         (prop)
         (("1"
           (lemma "fspos.seq_first_rest")
           (inst?)
           (assert)
           (replace -1 -2 rl)
           (expand "first")
           (propax))
          ("2"
           (typepred "x!2")
           (expand "SPP?")
           (flatten)
           (hide (-2 -3 3))
           (expand "PP?")
           (prop)
           (("1" (grind))
            ("2"
             (skosimp*)
             (inst -1 "i!2 + 1" "0")
             (("1"
               (assert)
               (lemma "fspos.rest_pos")
               (inst?)
               (assert)
               (inst -1 "i!2")
               (("1" (assert) (expand* "first" "finseq_appl") (assert))
                ("2" (hide-all-but 1) (typepred "i!2") (grind))))
              ("2" (hide-all-but 1) (typepred "i!2") (grind))))))))
        ("2"
         (typepred "x!2")
         (expand "SPP?")
         (flatten)
         (hide (-1 -3 3))
         (expand "SP?")
         (inst -1 "0")
         (expand "first")
         (propax))
        ("3"
         (hide (-1 3))
         (typepred "x!2")
         (expand "SPP?")
         (flatten)
         (split)
         (("1" (rewrite "rest_of_PP_is_PP"))
          ("2" (rewrite "rest_of_SP_is_SP"))))))
      ("2"
       (inst -1 "replaceTerm(x!1, t, x!2(0))" "rest(x!2)")
       (("1"
         (inst -1 "t" "i!1 - 1")
         (("1"
           (rewrite "length_rest")
           (case "rest(x!2)`length /= 0")
           (("1"
             (assert)
             (expand "replace_pos" 3)
             (lemma "fspos.rest_pos")
             (inst?)
             (assert)
             (inst -1 "i!1 - 1")
             (expand "finseq_appl")
             (assert))
            ("2"
             (hide -1)
             (prop)
             (expand "replace_pos")
             (expand "replace_pos")
             (prop)
             (typepred "x!2")
             (expand "SPP?")
             (flatten)
             (expand "PP?")
             (prop)
             (("1" (hide (-2 1)) (grind))
              ("2"
               (inst -1 "0" "i!1")
               (assert)
               (lemma "replace_preserv_parallel_pos")
               (inst -1 "x!2(0)" "x!2(i!1)" "x!1" "t")
               (assert)
               (hide (-1 3))
               (expand "SP?")
               (copy -1)
               (inst -1 "0")
               (inst -2 "i!1")
               (assert))))))
          ("2" (typepred "i!1") (grind))))
        ("2"
         (hide 4)
         (typepred "x!2")
         (expand "SPP?")
         (flatten)
         (split)
         (("1" (rewrite "rest_of_PP_is_PP"))
          ("2"
           (expand "SP?")
           (skosimp*)
           (lemma "fspos.rest_pos")
           (inst?)
           (assert)
           (inst -1 "i!2")
           (("1"
             (expand "finseq_appl")
             (replace -1 1 rl)
             (hide -1)
             (copy -2)
             (inst -1 "i!2 + 1")
             (("1"
               (inst -3 "0")
               (lemma "replace_preserv_parallel_pos")
               (inst -1 "x!2`seq(0)" "x!2`seq(i!2 + 1)" "x!1" "t")
               (assert)
               (hide (-1 -3 2))
               (expand "PP?")
               (inst -1 "0" "i!2 + 1")
               (("1" (expand "finseq_appl") (propax))
                ("2" (hide 2) (typepred "i!2") (grind))))
              ("2" (hide (-1 -2 2)) (typepred "i!2") (grind))))
            ("2" (hide 2) (typepred "i!2") (grind))))))
        ("3"
         (typepred "x!2")
         (expand* "SPP?" "SP?")
         (flatten)
         (inst -2 "0"))))))))


proof_type: f_proof
decl_type: formula
library: TRS
theory: replace_positions
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (measure-induct+ "length(fss)" ("s" "fss"))
   (("1"
     (skosimp*)
     (case "length(x!2) = 0")
     (("1" (hide (-2 -3)) (expand "replace_pos") (assert))
      ("2"
       (expand "replace_pos" 2)
       (assert)
       (inst -1 "replaceTerm(x!1, t!1, x!2(0))" "rest(x!2)")
       (inst -1 "t!1" "q!1")
       (("1"
         (rewrite "length_rest")
         (prop)
         (("1"
           (replaces -1)
           (lemma "replace_persistence")
           (inst -1 "x!2(0)" "q!1" "x!1" "t!1")
           (assert)
           (hide 3)
           (typepred "x!2")
           (expand "SPP?")
           (flatten)
           (expand "SP?")
           (inst -2 "0")
           (inst -3 "0")
           (assert))
          ("2"
           (hide 3)
           (case "length(rest(x!2)) = 0")
           (("1" (hide -2) (grind))
            ("2"
             (skosimp*)
             (lemma "fspos.rest_pos")
             (expand "finseq_appl")
             (inst?)
             (assert)
             (inst -1 "i!1")
             (("1"
               (inst -2 "i!1 + 1")
               (("1" (assert))
                ("2" (hide-all-but 1) (typepred "i!1") (grind))))
              ("2" (hide-all-but 1) (typepred "i!1") (grind))))))))
        ("2"
         (hide 3)
         (typepred "x!2")
         (expand "SPP?")
         (flatten)
         (hide -1)
         (expand "SP?")
         (inst -1 "0")
         (inst -2 "0")
         (typepred "q!1")
         (lemma "replace_preserv_parallel_pos")
         (inst -1 "x!2(0)" "q!1" "x!1" "t!1")
         (assert))))))
    ("2" (hide (-2 -3 2)) (rewrite "preserv_all_parallel_positions"))
    ("3"
     (hide (-1 2))
     (skosimp*)
     (rewrite "preserv_all_parallel_positions"))
    ("4"
     (hide (-1 2))
     (skosimp*)
     (rewrite "preserv_all_parallel_positions"))
    ("5"
     (hide-all-but (-1 1))
     (rewrite "preserv_all_parallel_positions"))
    ("6"
     (hide (-1 2))
     (skosimp*)
     (rewrite "preserv_all_parallel_positions"))
    ("7" (hide 2) (rewrite "preserv_all_parallel_positions"))))


proof_type: f_proof
decl_type: formula
library: TRS
theory: replace_positions
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (measure-induct+ "length(fss)" ("s" "fss"))
   (("1"
     (skosimp*)
     (case "length(x!2) = 0")
     (("1" (hide (-2 -3)) (expand "replace_pos") (lift-if) (assert))
      ("2"
       (expand "replace_pos" 2)
       (lift-if)
       (assert)
       (expand "finseq_appl")
       (inst -1 "replaceTerm(x!1, t!1, x!2`seq(0))" "rest(x!2)")
       (inst -1 "t!1")
       (prop)
       (("1"
         (inst -2 "0")
         (case "replaceTerm(x!1, t!1, x!2`seq(0)) = x!1")
         (("1" (replaces -1))
          ("2"
           (hide (-1 3))
           (replace -1 1 rl)
           (rewrite "replace_subterm_of_term")
           (hide (-1 2))
           (typepred "x!2")
           (expand "SPP?")
           (flatten)
           (expand "SP?")
           (inst -2 "0")
           (expand "finseq_appl")
           (propax))))
        ("2"
         (hide 3)
         (skosimp*)
         (copy -1)
         (inst -1 "0")
         (case "replaceTerm(x!1, t!1, x!2`seq(0)) = x!1")
         (("1"
           (replaces -1)
           (hide -1)
           (lemma "rest_pos[position]")
           (inst?)
           (prop)
           (("1"
             (inst?)
             (("1"
               (expand "finseq_appl")
               (replace -1 1 rl)
               (inst -2 "i!1 + 1")
               (("1" (assert))
                ("2" (hide (-1 2)) (typepred "i!1") (grind))))
              ("2" (hide (-1 2)) (typepred "i!1") (grind))))
            ("2" (hide -2) (expand "subtermOF") (lift-if) (assert))))
          ("2"
           (hide (-2 2))
           (replace -1 1 rl)
           (rewrite "replace_subterm_of_term")
           (hide (-1 2))
           (typepred "x!2")
           (expand "SPP?")
           (flatten)
           (expand "SP?")
           (inst -2 "0")
           (expand "finseq_appl")
           (propax))))
        ("3" (hide (-1 3)) (rewrite "length_rest"))))))
    ("2"
     (hide (-1 2))
     (skosimp*)
     (expand "finseq_appl")
     (typepred "y!2")
     (expand "SPP?")
     (flatten)
     (expand "SP?")
     (inst -2 "i!1")
     (expand "finseq_appl")
     (propax))
    ("3"
     (hide 2)
     (skosimp*)
     (typepred "y!2")
     (expand "SPP?")
     (flatten)
     (expand "SP?")
     (inst -2 "i!1"))
    ("4"
     (hide (-1 2))
     (skosimp*)
     (typepred "x!1`2")
     (expand "SPP?")
     (flatten)
     (expand "SP?")
     (inst -2 "i1!1"))
    ("5"
     (hide (-1 2 3))
     (skosimp*)
     (typepred "y!1`2")
     (expand "SPP?")
     (flatten)
     (expand "SP?")
     (inst -2 "i!1"))
    ("6"
     (hide 2)
     (skosimp*)
     (typepred "y!1`2")
     (expand "SPP?")
     (flatten)
     (expand "SP?")
     (inst -2 "i!1"))
    ("7"
     (hide 2)
     (typepred "fss!1")
     (expand "SPP?")
     (flatten)
     (expand "SP?")
     (inst -2 "i!1"))))


proof_type: f_proof
decl_type: formula
library: TRS
theory: replace_positions
signature: nil
run_date: Unknown date
run_time: ----
status: proved-incomplete
description: nil
script:
  (""
   (skosimp*)
   (name-replace "fss" "set2seq(Pos_var(s!1, x!1))" :hide? nil)
   (lemma "replace_pos_subterm_to_term")
   (inst -1 "x!1" "s!1" "fss")
   (assert)
   (hide 2)
   (skosimp*)
   (expand "finseq_appl")
   (lemma "set2seq_lem[position]")
   (inst?)
   (assert)
   (inst -1 "i!1")
   (("1"
     (expand "finseq_appl")
     (replaces -2)
     (expand "Pos_var")
     (expand "extend")
     (propax))
    ("2"
     (typepred "i!1")
     (replaces -2 :dir rl)
     (rewrite "set2seq_length"))))


proof_type: f_proof
decl_type: formula
library: TRS
theory: replace_positions
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (measure-induct+ "length(fss)" ("s" "fss"))
   (("1"
     (skosimp*)
     (case "length(x!2) = 0")
     (("1"
       (hide (-2 -3))
       (expand "replace_pos")
       (lift-if)
       (lift-if)
       (prop)
       (("1" (hide 1) (grind)) ("2" (grind))))
      ("2"
       (expand "replace_pos" 2 1)
       (lift-if)
       (prop)
       (("1" (hide-all-but (-1 2)) (grind))
        ("2"
         (lemma "fspos.rest_add_last")
         (inst?)
         (assert)
         (replaces -1)
         (inst -1 "replaceTerm(x!1, t!1, add_last(x!2, q!1)(0))"
          "rest(x!2)")
         (("1"
           (inst -1 "t!1" "q!1")
           (("1"
             (rewrite "length_rest")
             (prop)
             (("1"
               (name-replace "RTq"
                "replaceTerm(x!1, t!1, add_last(x!2, q!1)(0))")
               (replaces -1)
               (expand "RTq")
               (lemma "fspos.nth_add_last")
               (inst -1 "x!2" "q!1" "0")
               (assert)
               (replaces -1)
               (expand "replace_pos" 2 2)
               (propax))
              ("2"
               (hide-all-but (-1 1 3))
               (case "length(rest(x!2)) = 0")
               (("1" (hide -2) (grind))
                ("2"
                 (skosimp*)
                 (expand "finseq_appl")
                 (lemma "fspos.rest_pos")
                 (inst?)
                 (assert)
                 (inst -1 "i!1")
                 (("1"
                   (expand "finseq_appl")
                   (inst -2 "i!1 + 1")
                   (("1" (assert))
                    ("2" (hide-all-but 1) (typepred "i!1") (grind))))
                  ("2" (hide-all-but 1) (typepred "i!1") (grind))))))))
            ("2"
             (expand "finseq_appl")
             (hide-all-but (-1 1 4))
             (lemma "fspos.nth_add_last")
             (inst -1 "x!2" "q!1" "0")
             (assert)
             (expand "finseq_appl")
             (replaces -1)
             (inst -1 "0")
             (typepred "x!2")
             (expand "SPP?")
             (flatten)
             (hide -1)
             (expand "SP?")
             (inst -1 "0")
             (typepred "q!1")
             (lemma "replace_preserv_parallel_pos")
             (inst -1 "x!2(0)" "q!1" "x!1" "t!1")
             (expand "finseq_appl")
             (assert))))
          ("2"
           (hide (-1 2 3))
           (lemma "fspos.nth_add_last")
           (inst -1 "x!2" "q!1" "0")
           (assert)
           (replaces -1)
           (typepred "x!2")
           (expand "SPP?")
           (flatten)
           (split)
           (("1" (rewrite "rest_of_PP_is_PP"))
            ("2"
             (expand* "PP?" "SP?")
             (assert)
             (prop)
             (("1" (grind))
              ("2"
               (lemma "fspos.rest_pos")
               (inst?)
               (prop)
               (("1"
                 (skosimp*)
                 (inst -1 "i!1")
                 (("1"
                   (inst -2 "0" "i!1 + 1")
                   (assert)
                   (copy -3)
                   (inst -1 "0")
                   (inst -4 "i!1 + 1")
                   (("1"
                     (expand "finseq_appl")
                     (replace -2 2 rl)
                     (hide -2)
                     (lemma "replace_preserv_parallel_pos")
                     (inst -1 "x!2`seq(0)" "x!2`seq(1 + i!1)" "x!1"
                      "t!1")
                     (assert))
                    ("2" (hide-all-but 1) (typepred "i!1") (grind))))
                  ("2" (hide-all-but 1) (typepred "i!1") (grind))))
                ("2" (hide-all-but (-1 2 3)) (grind))))))))))))))
    ("2"
     (hide-all-but (-1 1))
     (rewrite "preserv_all_parallel_positions"))
    ("3"
     (hide-all-but (-1 1))
     (typepred "y!2")
     (expand "SPP?")
     (flatten)
     (rewrite "add_last_parallel_pos_to_PP_is_PP")
     (rewrite "add_last_parallel_pos_to_SP_is_SP"))
    ("4"
     (hide-all-but 1)
     (skosimp*)
     (rewrite "preserv_all_parallel_positions"))
    ("5"
     (hide-all-but 1)
     (skosimp*)
     (typepred "y!2")
     (expand "SPP?")
     (flatten)
     (rewrite "add_last_parallel_pos_to_PP_is_PP")
     (rewrite "add_last_parallel_pos_to_SP_is_SP"))
    ("6"
     (hide-all-but 1)
     (skosimp*)
     (rewrite "preserv_all_parallel_positions"))
    ("7"
     (hide-all-but (-1 1))
     (rewrite "preserv_all_parallel_positions"))
    ("8"
     (hide-all-but (-1 1))
     (typepred "y!1`2")
     (expand "SPP?")
     (flatten)
     (rewrite "add_last_parallel_pos_to_PP_is_PP")
     (rewrite "add_last_parallel_pos_to_SP_is_SP"))
    ("9"
     (hide-all-but 1)
     (skosimp*)
     (typepred "x!1`2")
     (expand "SPP?")
     (flatten)
     (rewrite "add_last_parallel_pos_to_PP_is_PP")
     (rewrite "add_last_parallel_pos_to_SP_is_SP"))
    ("10"
     (hide-all-but (-1 1))
     (rewrite "preserv_all_parallel_positions"))
    ("11"
     (hide-all-but (-1 1))
     (typepred "y!1`2")
     (expand "SPP?")
     (flatten)
     (rewrite "add_last_parallel_pos_to_PP_is_PP")
     (rewrite "add_last_parallel_pos_to_SP_is_SP"))
    ("12"
     (hide-all-but 1)
     (skosimp*)
     (rewrite "preserv_all_parallel_positions"))
    ("13"
     (hide-all-but 1)
     (skosimp*)
     (typepred "y!1`2")
     (expand "SPP?")
     (flatten)
     (rewrite "add_last_parallel_pos_to_PP_is_PP")
     (rewrite "add_last_parallel_pos_to_SP_is_SP"))
    ("14"
     (hide-all-but (-1 1))
     (rewrite "preserv_all_parallel_positions"))
    ("15"
     (hide 2)
     (typepred "fss!1")
     (expand "SPP?")
     (flatten)
     (rewrite "add_last_parallel_pos_to_PP_is_PP")
     (rewrite "add_last_parallel_pos_to_SP_is_SP"))))


proof_type: f_proof
decl_type: formula
library: TRS
theory: replace_positions
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (measure-induct+ "length(fss)" ("s" "fss"))
   (("1"
     (skosimp*)
     (case "length(x!2) = 0")
     (("1"
       (hide (-2 -3))
       (expand "replace_pos")
       (lift-if)
       (lift-if)
       (prop)
       (("1" (hide 1) (grind))
        ("2"
         (lemma "fspos.nth_add_first")
         (inst?)
         (("1"
           (replaces -1)
           (rewrite "rest_add_first")
           (expand "replace_pos")
           (assert))
          ("2" (hide 3) (assert))))))
      ("2"
       (expand "replace_pos" 2 1)
       (lift-if)
       (prop)
       (("1" (hide-all-but (-1 2)) (grind))
        ("2"
         (rewrite "rest_add_first")
         (lemma "fspos.nth_add_first")
         (inst?)
         (("1"
           (replaces -1)
           (expand "replace_pos" 2 1)
           (lift-if)
           (assert)
           (expand "finseq_appl")
           (lemma "replace_commutativity")
           (inst -1 "q!1" "x!2`seq(0)" "t!1" "x!1" "t!1")
           (prop)
           (("1"
             (replaces -1)
             (inst -1 "replaceTerm(x!1, t!1, x!2`seq(0))" "rest(x!2)")
             (("1"
               (inst -1 "t!1" "q!1")
               (rewrite "length_rest")
               (prop)
               (("1"
                 (expand "replace_pos" -1 1)
                 (lift-if)
                 (prop)
                 (("1" (hide-all-but (-1 3)) (grind))
                  ("2"
                   (rewrite "rest_add_first")
                   (lemma "fspos.nth_add_first")
                   (inst?)
                   (("1"
                     (replaces -1)
                     (replaces -1)
                     (expand "replace_pos" 3 2)
                     (expand "finseq_appl")
                     (propax))
                    ("2" (assert))))))
                ("2"
                 (hide-all-but (-1 1 4))
                 (case "length(rest(x!2)) = 0")
                 (("1" (hide -2) (grind))
                  ("2"
                   (skosimp*)
                   (lemma "fspos.rest_pos")
                   (inst?)
                   (assert)
                   (inst -1 "i!1")
                   (("1"
                     (expand "finseq_appl")
                     (inst -2 "i!1 + 1")
                     (("1" (assert))
                      ("2" (hide-all-but 1) (typepred "i!1") (grind))))
                    ("2" (hide-all-but 1) (typepred "i!1") (grind))))))))
              ("2"
               (hide-all-but (-1 1 4))
               (typepred "x!2")
               (expand "SPP?")
               (flatten)
               (rewrite "rest_of_PP_is_PP")
               (expand* "PP?" "SP?")
               (prop)
               (("1" (grind))
                ("2"
                 (lemma "fspos.rest_pos")
                 (inst?)
                 (prop)
                 (("1"
                   (skosimp*)
                   (inst -1 "i!1")
                   (("1"
                     (inst -2 "0" "i!1 + 1")
                     (assert)
                     (copy -3)
                     (inst -1 "0")
                     (inst -4 "i!1 + 1")
                     (("1"
                       (expand "finseq_appl")
                       (replace -2 2 rl)
                       (hide -2)
                       (lemma "replace_preserv_parallel_pos")
                       (inst -1 "x!2`seq(0)" "x!2`seq(1 + i!1)" "x!1"
                        "t!1")
                       (assert))
                      ("2" (hide-all-but 1) (typepred "i!1") (grind))))
                    ("2" (hide-all-but 1) (typepred "i!1") (grind))))
                  ("2" (hide-all-but (-1 2 3)) (grind))))))))
            ("2" (typepred "q!1") (propax))
            ("3"
             (hide-all-but (-2 1 4))
             (typepred "x!2")
             (expand "SPP?")
             (flatten)
             (hide -1)
             (expand "SP?")
             (inst -1 "0")
             (expand "finseq_appl")
             (propax))
            ("4"
             (hide-all-but (-2 1))
             (inst -1 "0")
             (rewrite "parallel_comm"))))
          ("2" (assert))))))))
    ("2"
     (hide-all-but (-1 1))
     (rewrite "preserv_all_parallel_positions"))
    ("3"
     (hide-all-but (-1 1))
     (typepred "y!2")
     (expand "SPP?")
     (flatten)
     (rewrite "add_first_parallel_pos_to_PP_is_PP")
     (rewrite "add_first_parallel_pos_to_SP_is_SP"))
    ("4"
     (hide-all-but 1)
     (skosimp*)
     (rewrite "preserv_all_parallel_positions"))
    ("5"
     (hide-all-but 1)
     (skosimp*)
     (typepred "y!2")
     (expand "SPP?")
     (flatten)
     (rewrite "add_first_parallel_pos_to_PP_is_PP")
     (rewrite "add_first_parallel_pos_to_SP_is_SP"))
    ("6"
     (hide-all-but 1)
     (skosimp*)
     (rewrite "preserv_all_parallel_positions"))
    ("7"
     (hide-all-but (-1 1))
     (rewrite "preserv_all_parallel_positions"))
    ("8"
     (hide-all-but (-1 1))
     (typepred "y!1`2")
     (expand "SPP?")
     (flatten)
     (rewrite "add_first_parallel_pos_to_PP_is_PP")
     (rewrite "add_first_parallel_pos_to_SP_is_SP"))
    ("9"
     (hide-all-but 1)
     (skosimp*)
     (typepred "x!1`2")
     (expand "SPP?")
     (flatten)
     (rewrite "add_first_parallel_pos_to_PP_is_PP")
     (rewrite "add_first_parallel_pos_to_SP_is_SP"))
    ("10"
     (hide-all-but (-1 1))
     (rewrite "preserv_all_parallel_positions"))
    ("11"
     (hide-all-but (-1 1))
     (typepred "y!1`2")
     (expand "SPP?")
     (flatten)
     (rewrite "add_first_parallel_pos_to_PP_is_PP")
     (rewrite "add_first_parallel_pos_to_SP_is_SP"))
    ("12"
     (hide-all-but 1)
     (skosimp*)
     (rewrite "preserv_all_parallel_positions"))
    ("13"
     (hide-all-but 1)
     (skosimp*)
     (typepred "y!1`2")
     (expand "SPP?")
     (flatten)
     (rewrite "add_first_parallel_pos_to_PP_is_PP")
     (rewrite "add_first_parallel_pos_to_SP_is_SP"))
    ("14"
     (hide-all-but (-1 1))
     (rewrite "preserv_all_parallel_positions"))
    ("15"
     (hide 2)
     (typepred "fss!1")
     (expand "SPP?")
     (flatten)
     (rewrite "add_first_parallel_pos_to_PP_is_PP")
     (rewrite "add_first_parallel_pos_to_SP_is_SP"))))


proof_type: f_proof
decl_type: formula
library: TRS
theory: replace_positions
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (measure-induct+ "length(fss)" ("s" "fss"))
   (("1"
     (case "length(x!2) = 0")
     (("1" (hide -2) (skolem 1 ("t" "_")) (grind))
      ("2"
       (skosimp*)
       (expand* "finseq_appl")
       (case-replace "i!1 = 0")
       (("1"
         (hide -2)
         (lemma "fspos.delete_rest")
         (inst?)
         (assert)
         (replaces -1)
         (lemma "CP_lemma_aux2a1")
         (inst?)
         (("1"
           (prop)
           (("1"
             (lemma "fspos.seq_first_rest")
             (inst?)
             (assert)
             (expand* "first" "finseq_appl")
             (replace -1 -2 rl)
             (propax))
            ("2"
             (hide 3)
             (expand "finseq_appl")
             (typepred "x!2")
             (expand "SPP?")
             (flatten)
             (hide -2)
             (expand "PP?")
             (prop)
             (("1" (grind))
              ("2"
               (skosimp*)
               (inst -1 "i!2 + 1" "0")
               (("1"
                 (assert)
                 (expand "finseq_appl")
                 (lemma "fspos.rest_pos")
                 (inst?)
                 (prop)
                 (("1"
                   (inst -1 "i!2")
                   (("1" (expand "finseq_appl") (assert))
                    ("2" (hide-all-but (1 4)) (typepred "i!2") (grind))))
                  ("2" (hide 2) (grind))))
                ("2" (hide-all-but (1 4)) (typepred "i!2") (grind))))))))
          ("2"
           (hide 3)
           (typepred "x!2")
           (expand "SPP?")
           (flatten)
           (hide -1)
           (expand "SP?")
           (inst -1 "0")
           (expand "finseq_appl")
           (propax))))
        ("2"
         (expand "replace_pos" 3 1)
         (expand "finseq_appl")
         (inst -1 "replaceTerm(x!1, t!1, x!2`seq(0))" "rest(x!2)")
         (inst -1 "t!1" "i!1 - 1")
         (("1"
           (rewrite "length_rest")
           (lemma "fspos.rest_pos")
           (inst?)
           (prop)
           (("1"
             (inst -1 "i!1 - 1")
             (("1"
               (expand "finseq_appl")
               (replace -1 -2 rl)
               (hide -1)
               (lemma "fspos.delete_rest")
               (inst?)
               (assert)
               (replaces -1)
               (expand "replace_pos" 3 2)
               (lift-if)
               (prop)
               (("1" (hide (-2 1)) (grind))
                ("2"
                 (expand "finseq_appl")
                 (expand "delete" 2 1)
                 (expand "finseq_appl")
                 (propax))))
              ("2" (assert))))
            ("2" (hide (-2 3)) (grind))))
          ("2" (hide 4) (typepred "i!1") (grind))))))))
    ("2"
     (hide-all-but 1)
     (rewrite "preserv_all_parallel_positions")
     (("1"
       (hide 2)
       (case "length(delete(y!2, i!1)) = 0")
       (("1" (grind))
        ("2"
         (skosimp*)
         (expand "finseq_appl")
         (typepred "y!2")
         (expand "SPP?")
         (flatten)
         (hide -2)
         (expand "PP?")
         (prop)
         (("1" (grind))
          ("2"
           (case "i!2 < i!1")
           (("1"
             (expand* "delete" "finseq_appl")
             (assert)
             (inst -2 "i!2" "i!1")
             (assert))
            ("2"
             (expand* "delete" "finseq_appl")
             (assert)
             (inst -1 "i!2 + 1" "i!1")
             (("1" (assert))
              ("2" (typepred "i!2") (hide 5) (grind))))))))))
      ("2"
       (typepred "y!2")
       (expand "SPP?")
       (flatten)
       (hide (-1 2))
       (expand "SP?")
       (inst -1 "i!1"))))
    ("3"
     (hide-all-but 1)
     (typepred "y!2")
     (expand "SPP?")
     (flatten)
     (rewrite "delete_of_PP_is_PP")
     (rewrite "delete_of_SP_is_SP"))
    ("4"
     (hide-all-but 1)
     (skosimp*)
     (rewrite "preserv_all_parallel_positions")
     (("1"
       (hide 2)
       (case "length(delete(y!2, i!1)) = 0")
       (("1" (grind))
        ("2"
         (skosimp*)
         (expand "finseq_appl")
         (typepred "y!2")
         (expand "SPP?")
         (flatten)
         (hide -2)
         (expand "PP?")
         (prop)
         (("1" (grind))
          ("2"
           (case "i!2 < i!1")
           (("1"
             (expand* "delete" "finseq_appl")
             (assert)
             (inst -2 "i!2" "i!1")
             (assert))
            ("2"
             (expand* "delete" "finseq_appl")
             (assert)
             (inst -1 "i!2 + 1" "i!1")
             (("1" (assert))
              ("2" (typepred "i!2") (hide 5) (grind))))))))))
      ("2"
       (typepred "y!2")
       (expand "SPP?")
       (flatten)
       (hide (-1 2))
       (expand "SP?")
       (inst -1 "i!1"))))
    ("5"
     (expand "finseq_appl")
     (hide-all-but 1)
     (skosimp*)
     (typepred "y!2")
     (expand "SPP?")
     (flatten)
     (rewrite "delete_of_PP_is_PP")
     (rewrite "delete_of_SP_is_SP"))
    ("6"
     (hide-all-but 1)
     (skosimp*)
     (rewrite "preserv_all_parallel_positions")
     (("1"
       (hide 2)
       (case "length(delete(x!1`2, i1!1)) = 0")
       (("1" (grind))
        ("2"
         (skosimp*)
         (expand "finseq_appl")
         (typepred "x!1`2")
         (expand "SPP?")
         (flatten)
         (hide -2)
         (expand "PP?")
         (prop)
         (("1" (grind))
          ("2"
           (expand* "delete" "finseq_appl")
           (lift-if)
           (prop)
           (("1" (inst -2 "i!1" "i1!1") (assert))
            ("2"
             (inst -1 "i!1 + 1" "i1!1")
             (("1" (assert))
              ("2" (typepred "i!1") (hide 3) (grind))))))))))
      ("2"
       (hide 2)
       (typepred "x!1`2")
       (expand "SPP?")
       (flatten)
       (hide -1)
       (expand "SP?")
       (inst -1 "i1!1"))))
    ("7"
     (expand "finseq_appl")
     (hide-all-but 1)
     (typepred "y!1`2")
     (expand "SPP?")
     (flatten)
     (expand* "PP?" "SP?")
     (rewrite "preserv_all_parallel_positions")
     (("1"
       (hide (-2 2))
       (prop)
       (("1" (grind))
        ("2"
         (skosimp*)
         (expand* "delete" "finseq_appl")
         (lift-if)
         (prop)
         (("1" (inst -2 "i!2" "i!1") (assert))
          ("2"
           (inst -1 "i!2 + 1" "i!1")
           (("1" (assert)) ("2" (typepred "i!2") (hide 3) (grind))))))))
      ("2"
       (hide (-1 2))
       (inst -1 "i!1")
       (expand "finseq_appl")
       (propax))))
    ("8"
     (hide-all-but 1)
     (typepred "y!1`2")
     (expand "SPP?")
     (flatten)
     (rewrite "delete_of_PP_is_PP")
     (rewrite "delete_of_SP_is_SP"))
    ("9"
     (hide-all-but 1)
     (skosimp*)
     (typepred "x!1`2")
     (expand "SPP?")
     (flatten)
     (rewrite "delete_of_PP_is_PP")
     (rewrite "delete_of_SP_is_SP"))
    ("10"
     (hide-all-but 1)
     (typepred "y!1`2")
     (expand "SPP?")
     (flatten)
     (expand* "PP?" "SP?")
     (rewrite "preserv_all_parallel_positions")
     (("1"
       (hide (-2 2))
       (prop)
       (("1" (grind))
        ("2"
         (skosimp*)
         (expand* "delete" "finseq_appl")
         (lift-if)
         (prop)
         (("1" (inst -2 "i!2" "i!1") (assert))
          ("2"
           (inst -1 "i!2 + 1" "i!1")
           (("1" (assert)) ("2" (typepred "i!2") (hide 3) (grind))))))))
      ("2" (hide (-1 2)) (inst -1 "i!1"))))
    ("11"
     (expand "finseq_appl")
     (hide-all-but 1)
     (typepred "y!1`2")
     (expand "SPP?")
     (flatten)
     (rewrite "delete_of_PP_is_PP")
     (rewrite "delete_of_SP_is_SP"))
    ("12"
     (hide-all-but 1)
     (skosimp*)
     (typepred "y!1`2")
     (expand "SPP?")
     (flatten)
     (expand* "PP?" "SP?")
     (rewrite "preserv_all_parallel_positions")
     (("1"
       (hide (-2 2))
       (prop)
       (("1" (grind))
        ("2"
         (skosimp*)
         (expand* "delete" "finseq_appl")
         (lift-if)
         (prop)
         (("1" (inst -2 "i!2" "i!1") (assert))
          ("2"
           (inst -1 "i!2 + 1" "i!1")
           (("1" (assert)) ("2" (typepred "i!2") (hide 3) (grind))))))))
      ("2" (hide (-1 2)) (inst -1 "i!1"))))
    ("13"
     (expand "finseq_appl")
     (hide-all-but 1)
     (skosimp*)
     (typepred "y!1`2")
     (expand "SPP?")
     (flatten)
     (rewrite "delete_of_PP_is_PP")
     (rewrite "delete_of_SP_is_SP"))
    ("14"
     (hide-all-but 1)
     (typepred "fss!1")
     (expand "SPP?")
     (flatten)
     (expand* "PP?" "SP?")
     (rewrite "preserv_all_parallel_positions")
     (("1"
       (hide (-2 2))
       (prop)
       (("1" (grind))
        ("2"
         (skosimp*)
         (expand* "delete" "finseq_appl")
         (lift-if)
         (prop)
         (("1" (inst -2 "i!2" "i!1") (assert))
          ("2"
           (inst -1 "i!2 + 1" "i!1")
           (("1" (assert)) ("2" (typepred "i!2") (hide 3) (grind))))))))
      ("2" (hide (-1 2)) (inst -1 "i!1"))))
    ("15"
     (expand "finseq_appl")
     (hide-all-but 1)
     (typepred "fss!1")
     (expand "SPP?")
     (flatten)
     (rewrite "delete_of_PP_is_PP")
     (rewrite "delete_of_SP_is_SP"))))


proof_type: f_proof
decl_type: formula
library: TRS
theory: replace_positions
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (measure-induct+ "fss1`length" ("s" "fss1"))
   (skosimp*)
   (copy -2)
   (expand "equivalent" -3)
   (flatten)
   (case-replace "length(x!2) = 0")
   (("1" (hide-all-but (-1 -2 -4 1)) (expand "replace_pos") (assert))
    ("2"
     (lemma "CP_lemma_aux2a2")
     (copy -1)
     (inst -1 "t!1" "x!1" "x!2" "0")
     (("1"
       (replaces -1)
       (inst -7 "0")
       (skosimp*)
       (expand "finseq_appl")
       (inst -1 "t!1" "x!1" "fss2!1" "j!1")
       (replaces -1)
       (replace -6 2)
       (inst -2 "x!1" "delete(x!2, 0)")
       (inst -2 "t!1" "delete(fss2!1, j!1)")
       (prop)
       (("1" (assert))
        ("2"
         (hide 3)
         (expand "equivalent")
         (prop)
         (("1" (hide (-2 -3 -4)) (expand "delete") (assert))
          ("2"
           (hide-all-but (-2 1 2))
           (expand "different_elements")
           (skosimp*)
           (expand "delete")
           (assert)
           (expand "finseq_appl")
           (inst -2 "1 + i!1" "1 + j!2")
           (assert))
          ("3"
           (hide-all-but (-3 -5 1 2))
           (replaces -2)
           (expand "different_elements")
           (skosimp*)
           (expand "delete")
           (expand "finseq_appl")
           (lift-if)
           (lift-if)
           (prop)
           (("1" (inst -4 "i!1" "j!2") (assert))
            ("2" (inst -3 "i!1" "1 + j!2") (assert))
            ("3"
             (lift-if)
             (prop)
             (("1" (inst -3 "1 + i!1" "j!2") (assert))
              ("2" (inst -2 "1 + i!1" "1 + j!2") (assert))))))
          ("4"
           (skosimp*)
           (expand "finseq_appl")
           (hide (-5 -6 -7))
           (lemma "fspos.delete_equivalent")
           (inst -1 "x!2" "fss2!1" "0" "j!1")
           (expand "finseq_appl")
           (prop)
           (("1"
             (expand "equivalent")
             (expand "finseq_appl")
             (flatten)
             (inst -4 "i!1"))
            ("2"
             (expand "equivalent")
             (assert)
             (skosimp*)
             (expand "finseq_appl")
             (inst -4 "i!2"))))))
        ("3" (hide (-1 -3 -4 3)) (grind))))
      ("2" (assert))))))


proof_type: t_proof
decl_type: tcc
library: TRS
theory: replace_positions
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp*)
   (typepred "fssp!1")
   (expand "SPP?")
   (flatten)
   (split)
   (("1" (rewrite "rest_of_PP_is_PP"))
    ("2"
     (expand "SP?")
     (expand "PP?")
     (prop)
     (("1" (grind))
      ("2"
       (skosimp*)
       (lemma "fspos.rest_pos")
       (inst?)
       (assert)
       (expand "finseq_appl")
       (inst -1 "i!1")
       (("1"
         (replace -1 2 rl)
         (hide -1)
         (copy -2)
         (inst -1 "0")
         (inst -3 "1 + i!1")
         (inst -2 "0" "1 + i!1")
         (assert)
         (lemma "replace_preserv_parallel_pos")
         (inst -1 "fssp!1`seq(0)" "fssp!1`seq(1 + i!1)" "s!1" "t!1")
         (assert))
        ("2" (hide-all-but 1) (typepred "i!1") (grind))))))))


proof_type: t_proof
decl_type: tcc
library: TRS
theory: replace_positions
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp*)
   (typepred "fss!1")
   (expand "SPP?")
   (flatten)
   (assert)
   (hide -1)
   (expand "SP?")
   (skosimp*)
   (inst?)
   (rewrite "ext_preserv_pos"))


proof_type: t_proof
decl_type: tcc
library: TRS
theory: replace_positions
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skolem-typepred)
   (skosimp*)
   (expand "SPP?")
   (flatten)
   (split)
   (("1" (rewrite "add_first_parallel_pos_to_PP_is_PP"))
    ("2" (rewrite "add_first_parallel_pos_to_SP_is_SP"))))


proof_type: t_proof
decl_type: tcc
library: TRS
theory: replace_positions
signature: nil
run_date: Unknown date
run_time: ----
status: proved-incomplete
description: nil
script:
  (""
   (skosimp*)
   (expand "SPP?")
   (split)
   (("1" (lemma "pos_occ_var_HAStypePP") (inst?) (assert))
    ("2" (lemma "pos_occ_var_HAStypeSP") (inst?) (assert))))


proof_type: t_proof
decl_type: tcc
library: TRS
theory: replace_positions
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp*)
   (typepred "fss!1")
   (expand "SPP?")
   (flatten)
   (split)
   (("1" (rewrite "add_last_parallel_pos_to_PP_is_PP"))
    ("2" (rewrite "add_last_parallel_pos_to_SP_is_SP"))))


proof_type: t_proof
decl_type: tcc
library: TRS
theory: replace_positions
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skolem-typepred)
   (expand "SPP?")
   (flatten)
   (rewrite "delete_of_PP_is_PP")
   (rewrite "delete_of_SP_is_SP"))


proof_type: t_proof
decl_type: tcc
library: TRS
theory: replace_positions
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skolem-typepred)
   (expand "finseq_appl")
   (expand "SPP?")
   (flatten)
   (expand* "PP?" "SP?")
   (rewrite "preserv_all_parallel_positions")
   (("1"
     (hide (-2 2))
     (prop)
     (("1" (grind))
      ("2"
       (skosimp*)
       (expand* "delete" "finseq_appl")
       (lift-if)
       (prop)
       (("1" (inst -2 "i!2" "i!1") (assert))
        ("2"
         (inst -1 "i!2 + 1" "i!1")
         (("1" (assert)) ("2" (typepred "i!2") (hide 3) (grind))))))))
    ("2" (hide (-1 2)) (inst -1 "i!1") (expand "finseq_appl") (propax))))


proof_type: f_proof
decl_type: formula
library: TRS
theory: critical_pairs_aux
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (measure-induct+ "length(fstp)" ("t" "fstp"))
   (("1"
     (skosimp*)
     (expand "finseq_appl")
     (case-replace "length(x!2) = 0")
     (("1"
       (hide-all-but (-1 1))
       (expand "replace_pos")
       (lift-if)
       (assert)
       (expand "iterate")
       (propax))
      ("2"
       (expand "iterate" 2)
       (prop)
       (hide 3)
       (expand "o")
       (inst 2
        "replace_pos(ext(sg1!1)(x!1), ext(sg2!1)(x!3), delete(x!2,length(x!2) - 1))")
       (("1"
         (prop)
         (("1"
           (inst -1 "x!1" "delete(x!2, length(x!2) - 1)")
           (("1"
             (inst -1 "R!1" "x!3" "sg1!1" "sg2!1")
             (prop)
             (("1"
               (case "length(delete(x!2, length(x!2) - 1)) = length(x!2) - 1")
               (("1" (replaces -1)) ("2" (hide-all-but (1 3)) (grind))
                ("3" (hide-all-but (1 3)) (grind))))
              ("2"
               (hide-all-but (-1 1 3))
               (skosimp*)
               (lemma "fspos.delete_pos")
               (inst?)
               (assert)
               (inst -1 "i!1")
               (("1" (inst -2 "i!1") (expand "finseq_appl") (assert))
                ("2" (hide-all-but 1) (typepred "i!1") (grind))))
              ("3" (hide-all-but (1 3)) (rewrite "length_delete"))))
            ("2"
             (hide-all-but (1 3))
             (typepred "x!2")
             (expand "SPP?")
             (flatten)
             (rewrite "delete_of_PP_is_PP")
             (rewrite "delete_of_SP_is_SP"))
            ("3" (hide-all-but (1 3)) (grind))))
          ("2"
           (hide -1)
           (lemma "preserv_unchanged_subterms")
           (inst -1 "ext(sg2!1)(x!3)" "ext(sg1!1)(x!1)"
            "delete(x!2, length(x!2) - 1)" "last(x!2)")
           (("1"
             (prop)
             (("1"
               (lemma "replace_subterm_of_term")
               (inst -1 "last(x!2)"
                "replace_pos(ext(sg1!1)(x!1), ext(sg2!1)(x!3), delete(x!2, length(x!2) - 1))")
               (("1"
                 (prop)
                 (("1"
                   (replaces -2 -1)
                   (expand "last")
                   (expand "finseq_appl")
                   (inst -2 "x!2`length - 1")
                   (("1"
                     (lemma "subterm_ext_commute")
                     (inst -1 "x!2`seq(x!2`length - 1)" "x!1" "sg1!1")
                     (("1"
                       (prop)
                       (("1"
                         (replaces -1 -2)
                         (replaces -2 -1)
                         (expand* "comp_cont?" "RSigma")
                         (inst -3 "x!3")
                         (assert)
                         (inst -2 "x!2`seq(x!2`length - 1)"
                          "replace_pos(ext(sg1!1)(x!1), ext(sg2!1)(x!3), delete(x!2, length(x!2) - 1))")
                         (prop)
                         (("1"
                           (inst -1 "sg1!1(x!3)" "sg2!1(x!3)")
                           (assert)
                           (replace -2 1 rl)
                           (hide (-2 -3))
                           (typepred "x!3")
                           (expand "V")
                           (expand "ext" 1 (3 5))
                           (assert)
                           (case-replace
                            "replace_pos(ext(sg1!1)(x!1), sg2!1(x!3), x!2) = replaceTerm(replace_pos(ext(sg1!1)(x!1), ext(sg2!1)(x!3), delete(x!2, length(x!2) - 1)), sg2!1(x!3), x!2`seq(x!2`length - 1))")
                           (hide-all-but (1 3))
                           (lemma "fspos.add_last_delete")
                           (inst?)
                           (assert)
                           (name-replace "RTermTemp"
                            "replaceTerm(replace_pos(ext(sg1!1)(x!1), ext(sg2!1)(x!3), delete(x!2, length(x!2) - 1)), sg2!1(x!3), x!2`seq(x!2`length - 1))")
                           (hide 2)
                           (replaces -1)
                           (expand "RTermTemp")
                           (lemma "CP_lemma_aux2a")
                           (inst -1 "sg2!1(x!3)" "ext(sg1!1)(x!1)"
                            "delete(x!2, length(x!2) - 1)" "last(x!2)")
                           (("1"
                             (prop)
                             (("1"
                               (expand "ext" 1 3)
                               (expand* "last" "finseq_appl"))
                              ("2"
                               (hide 2)
                               (case "length(x!2) = 1")
                               (("1" (grind))
                                ("2"
                                 (skosimp*)
                                 (typepred "x!2")
                                 (reveal 4)
                                 (lemma "fspos.delete_pos")
                                 (expand "finseq_appl")
                                 (inst?)
                                 (assert)
                                 (inst -1 "i!1")
                                 (("1"
                                   (expand "SPP?")
                                   (flatten)
                                   (hide -3)
                                   (expand* "last" "finseq_appl")
                                   (replace -1 3 rl)
                                   (expand "PP?")
                                   (inst -2 "i!1" "x!2`length - 1")
                                   (expand "finseq_appl")
                                   (assert)
                                   (hide (-1 4))
                                   (typepred "i!1")
                                   (grind))
                                  ("2"
                                   (hide-all-but 1)
                                   (typepred "i!1")
                                   (grind))))))))
                            ("2"
                             (hide 2)
                             (typepred "x!2")
                             (expand "SPP?")
                             (flatten)
                             (hide -1)
                             (expand "SP?")
                             (expand* "last" "finseq_appl")
                             (inst -1 "x!2`length - 1")
                             (rewrite "ext_preserv_pos"))))
                          ("2"
                           (hide-all-but (1 3))
                           (lemma "preserv_all_parallel_positions")
                           (inst -1 "ext(sg2!1)(x!3)" "ext(sg1!1)(x!1)"
                            "delete(x!2, length(x!2) - 1)"
                            "x!2`seq(x!2`length - 1)")
                           (("1"
                             (assert)
                             (case "length(delete(x!2, length(x!2) - 1)) = 0")
                             (("1" (hide 2) (grind))
                              ("2"
                               (hide 3)
                               (skosimp*)
                               (typepred "x!2")
                               (expand "SPP?")
                               (flatten)
                               (expand "PP?")
                               (prop)
                               (("1" (hide 2) (grind))
                                ("2"
                                 (lemma "fspos.delete_pos")
                                 (inst?)
                                 (assert)
                                 (inst -1 "i!1")
                                 (("1"
                                   (expand "finseq_appl")
                                   (inst -2 "i!1" "x!2`length - 1")
                                   (prop)
                                   (("1" (assert))
                                    ("2"
                                     (hide-all-but (-1 4))
                                     (typepred "i!1")
                                     (grind))))
                                  ("2"
                                   (hide-all-but 1)
                                   (typepred "i!1")
                                   (grind))))))))
                            ("2"
                             (hide 2)
                             (typepred "x!2")
                             (expand "SPP?")
                             (flatten)
                             (hide -1)
                             (expand "SP?")
                             (inst -1 "x!2`length - 1")
                             (expand "finseq_appl")
                             (rewrite "ext_preserv_pos"))))))
                        ("2"
                         (hide-all-but 1)
                         (typepred "x!2")
                         (expand "SPP?")
                         (flatten)
                         (hide -1)
                         (expand "SP?")
                         (inst -1 "x!2`length - 1")
                         (("1" (expand "finseq_appl") (propax))
                          ("2" (hide 2) (reveal 4) (grind))))))
                      ("2" (hide-all-but (1 3)) (assert))))
                    ("2" (hide-all-but (1 3)) (assert))))
                  ("2"
                   (hide-all-but (1 3))
                   (expand* "last" "finseq_appl")
                   (lemma "preserv_all_parallel_positions")
                   (inst -1 "ext(sg2!1)(x!3)" "ext(sg1!1)(x!1)"
                    "delete(x!2, length(x!2) - 1)"
                    "x!2`seq(x!2`length - 1)")
                   (("1"
                     (assert)
                     (case "length(delete(x!2, length(x!2) - 1)) = 0")
                     (("1" (hide 2) (grind))
                      ("2"
                       (hide 3)
                       (skosimp*)
                       (typepred "x!2")
                       (expand "SPP?")
                       (flatten)
                       (expand "PP?")
                       (prop)
                       (("1" (hide 2) (grind))
                        ("2"
                         (lemma "fspos.delete_pos")
                         (inst?)
                         (assert)
                         (inst -1 "i!1")
                         (("1"
                           (inst -2 "i!1" "x!2`length - 1")
                           (prop)
                           (("1" (expand "finseq_appl") (assert))
                            ("2"
                             (hide-all-but (-1 4))
                             (typepred "i!1")
                             (grind))))
                          ("2"
                           (hide-all-but 1)
                           (typepred "i!1")
                           (grind))))))))
                    ("2"
                     (hide 2)
                     (typepred "x!2")
                     (expand "SPP?")
                     (flatten)
                     (hide -1)
                     (expand "SP?")
                     (inst -1 "x!2`length - 1")
                     (("1"
                       (expand "finseq_appl")
                       (rewrite "ext_preserv_pos"))
                      ("2" (assert))))
                    ("3" (assert))))))
                ("2" (hide-all-but (1 3)) (assert))))
              ("2"
               (hide-all-but (1 3))
               (expand* "last" "finseq_appl")
               (case "length(delete(x!2, length(x!2) - 1)) = 0")
               (("1" (hide 2) (grind))
                ("2"
                 (skosimp*)
                 (typepred "x!2")
                 (expand "SPP?")
                 (flatten)
                 (expand "PP?")
                 (prop)
                 (("1" (hide 2) (grind))
                  ("2"
                   (lemma "fspos.delete_pos")
                   (inst?)
                   (assert)
                   (inst -1 "i!1")
                   (("1"
                     (inst -2 "i!1" "x!2`length - 1")
                     (prop)
                     (("1" (expand "finseq_appl") (assert))
                      ("2"
                       (hide-all-but (-1 4))
                       (typepred "i!1")
                       (grind))))
                    ("2" (hide-all-but 1) (typepred "i!1") (grind))))))
                ("3" (assert))))))
            ("2"
             (hide-all-but (1 3))
             (typepred "x!2")
             (expand "SPP?")
             (flatten)
             (hide -1)
             (expand "SP?")
             (expand* "last" "finseq_appl")
             (inst -1 "x!2`length - 1")
             (("1" (rewrite "ext_preserv_pos"))
              ("2" (hide-all-but (1 3)) (assert))))
            ("3" (assert)) ("4" (assert))))))
        ("2"
         (hide-all-but (1 2))
         (typepred "x!2")
         (expand "SPP?")
         (flatten)
         (rewrite "delete_of_PP_is_PP")
         (hide -1)
         (expand "SP?")
         (case "length(delete(x!2, length(x!2) - 1)) = 0")
         (("1" (grind))
          ("2"
           (skosimp*)
           (lemma "fspos.delete_pos")
           (inst?)
           (assert)
           (inst -1 "i!1")
           (("1"
             (expand "finseq_appl")
             (inst -2 "i!1")
             (replace -1 2 rl)
             (hide -1)
             (rewrite "ext_preserv_pos"))
            ("2" (hide-all-but (1 4)) (typepred "i!1") (grind))))
          ("3" (assert))))
        ("3" (assert))))))
    ("2"
     (hide-all-but 1)
     (typepred "y!2")
     (expand "SPP?")
     (flatten)
     (assert)
     (hide -1)
     (expand "SP?")
     (skosimp*)
     (inst -1 "i!1")
     (rewrite "ext_preserv_pos"))
    ("3"
     (hide-all-but 1)
     (skosimp*)
     (typepred "y!2")
     (expand "SPP?")
     (flatten)
     (hide -1)
     (expand "SP?")
     (inst?))
    ("4"
     (hide 2)
     (skosimp*)
     (hide-all-but 1)
     (typepred "y!2")
     (expand "SPP?")
     (flatten)
     (assert)
     (hide -1)
     (expand "SP?")
     (skosimp*)
     (inst -1 "i!1")
     (rewrite "ext_preserv_pos"))
    ("5"
     (hide-all-but 1)
     (skosimp*)
     (typepred "y!2")
     (expand "SPP?")
     (flatten)
     (hide -1)
     (expand "SP?")
     (inst?))
    ("6"
     (hide-all-but 1)
     (skosimp*)
     (typepred "x!1`2")
     (hide-all-but (-1 1))
     (expand "SPP?")
     (flatten)
     (assert)
     (hide -1)
     (expand "SP?")
     (skosimp*)
     (inst -1 "i!1")
     (rewrite "ext_preserv_pos"))
    ("7"
     (hide-all-but 1)
     (typepred "y!1`2")
     (expand "SPP?")
     (flatten)
     (assert)
     (hide -1)
     (expand "SP?")
     (skosimp*)
     (inst -1 "i!1")
     (rewrite "ext_preserv_pos"))
    ("8"
     (hide-all-but 1)
     (skosimp*)
     (typepred "y!1`2")
     (expand "SPP?")
     (flatten)
     (hide -1)
     (expand "SP?")
     (inst?))
    ("9"
     (hide-all-but 1)
     (skosimp*)
     (typepred "x!1`2")
     (expand "SPP?")
     (flatten)
     (hide -1)
     (expand "SP?")
     (inst?))
    ("10"
     (hide-all-but 1)
     (typepred "y!1`2")
     (expand "SPP?")
     (flatten)
     (assert)
     (hide -1)
     (expand "SP?")
     (skosimp*)
     (inst -1 "i!1")
     (rewrite "ext_preserv_pos"))
    ("11"
     (hide-all-but 1)
     (skosimp*)
     (typepred "y!1`2")
     (expand "SPP?")
     (flatten)
     (hide -1)
     (expand "SP?")
     (inst?))
    ("12"
     (hide-all-but 1)
     (skosimp*)
     (hide-all-but 1)
     (typepred "y!1`2")
     (expand "SPP?")
     (flatten)
     (assert)
     (hide -1)
     (expand "SP?")
     (skosimp*)
     (inst -1 "i!1")
     (rewrite "ext_preserv_pos"))
    ("13"
     (hide-all-but 1)
     (skosimp*)
     (typepred "y!1`2")
     (expand "SPP?")
     (flatten)
     (hide -1)
     (expand "SP?")
     (inst?))
    ("14"
     (hide-all-but 1)
     (skosimp*)
     (typepred "fstp!1")
     (expand "SPP?")
     (flatten)
     (hide -1)
     (expand "SP?")
     (inst?))
    ("15"
     (hide 2)
     (typepred "fstp!1")
     (expand "SPP?")
     (flatten)
     (assert)
     (hide -1)
     (expand "SP?")
     (skosimp*)
     (inst -1 "i!1")
     (rewrite "ext_preserv_pos"))))


proof_type: f_proof
decl_type: formula
library: TRS
theory: critical_pairs_aux
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (measure-induct+ "length(fst)" ("t" "fst"))
   (("1"
     (skosimp*)
     (case "length(x!2) = 0")
     (("1"
       (hide-all-but (-1 1))
       (replace -1 1)
       (rewrite "empty_0")
       (replaces -1)
       (rewrite "add_first_empty_seq")
       (expand "iterate")
       (propax))
      ("2"
       (expand "finseq_appl")
       (inst -1 "x!1" "rest(x!2)")
       (("1"
         (inst -1 "R!1" "x!3" "sg1!1" "sg2!1" "q!1")
         (rewrite "length_rest")
         (prop)
         (("1"
           (case-replace "length(rest(x!2)) = length(x!2) -1" :hide? T)
           (("1"
             (expand "iterate" 2)
             (assert)
             (expand "o")
             (inst 2
              "replace_pos(ext(sg1!1)(x!1), ext(sg2!1)(x!3), add_first(q!1, rest(x!2)))")
             (assert)
             (hide -1)
             (lemma "CP_lemma_aux2a1")
             (copy -1)
             (inst -1 "ext(sg2!1)(x!3)" "ext(sg1!1)(x!1)" "x!2" "q!1")
             (("1"
               (inst -2 "ext(sg2!1)(x!3)" "ext(sg1!1)(x!1)" "rest(x!2)"
                "q!1")
               (("1"
                 (expand "finseq_appl")
                 (prop)
                 (("1"
                   (replaces -1)
                   (replaces -1)
                   (lemma "preserv_unchanged_subterms")
                   (inst -1 "ext(sg2!1)(x!3)" "ext(sg1!1)(x!1)"
                    "rest(x!2)" "x!2(0)")
                   (("1"
                     (expand "finseq_appl")
                     (prop)
                     (("1"
                       (lemma "replace_subterm_of_term")
                       (inst -1 "x!2(0)"
                        "replace_pos(ext(sg1!1)(x!1), ext(sg2!1)(x!3), rest(x!2))")
                       (expand "finseq_appl")
                       (prop)
                       (("1"
                         (replaces -2)
                         (lemma "subterm_ext_commute")
                         (inst -1 "x!2(0)" "x!1" "sg1!1")
                         (expand "finseq_appl")
                         (copy -3)
                         (inst -1 "0")
                         (flatten)
                         (prop)
                         (("1"
                           (replaces -3)
                           (replaces -1)
                           (replace -2 2 rl)
                           (hide -2)
                           (lemma "fspos.seq_first_rest")
                           (inst?)
                           (assert)
                           (expand* "first" "finseq_appl")
                           (name-replace "RTTemp"
                            "replaceTerm(replaceTerm(replace_pos(ext(sg1!1)(x!1), ext(sg2!1)(x!3), rest(x!2)), ext(sg1!1)(x!3), x!2`seq(0)), ext(sg2!1)(x!3), q!1)")
                           (replace -1 2)
                           (hide -1)
                           (lemma "CP_lemma_aux2a1")
                           (inst -1 "ext(sg2!1)(x!3)" "ext(sg1!1)(x!1)"
                            "rest(x!2)" "x!2`seq(0)")
                           (("1"
                             (prop)
                             (("1"
                               (replaces -1)
                               (expand "RTTemp")
                               (assert)
                               (lemma "replace_commutativity")
                               (copy -1)
                               (name-replace "repTemp"
                                "replace_pos(ext(sg1!1)(x!1), ext(sg2!1)(x!3), rest(x!2))")
                               (inst -2 "x!2`seq(0)" "q!1"
                                "ext(sg2!1)(x!3)" "repTemp"
                                "ext(sg1!1)(x!3)")
                               (inst -1 "x!2`seq(0)" "q!1"
                                "ext(sg2!1)(x!3)" "repTemp"
                                "ext(sg2!1)(x!3)")
                               (prop)
                               (("1"
                                 (replaces -1)
                                 (replaces -1)
                                 (name-replace
                                  "REPLACEtemp"
                                  "replaceTerm(repTemp, ext(sg2!1)(x!3), q!1)")
                                 (typepred "x!3")
                                 (expand* "V" "ext")
                                 (assert)
                                 (expand* "comp_cont?" "RSigma")
                                 (inst -5 "x!2`seq(0)" "REPLACEtemp")
                                 (inst -6 "x!3")
                                 (prop)
                                 (("1"
                                   (inst -3 "sg1!1(x!3)" "sg2!1(x!3)")
                                   (assert))
                                  ("2"
                                   (hide 3)
                                   (expand "REPLACEtemp")
                                   (expand "repTemp")
                                   (typepred "q!1")
                                   (lemma
                                    "preserv_all_parallel_positions")
                                   (inst
                                    -1
                                    "ext(sg2!1)(x!3)"
                                    "ext(sg1!1)(x!1)"
                                    "rest(x!2)"
                                    "q!1")
                                   (("1"
                                     (prop)
                                     (("1"
                                       (lemma
                                        "preserv_all_parallel_positions")
                                       (inst
                                        -1
                                        "ext(sg2!1)(x!3)"
                                        "ext(sg1!1)(x!1)"
                                        "rest(x!2)"
                                        "x!2`seq(0)")
                                       (("1"
                                         (prop)
                                         (("1"
                                           (lemma
                                            "replace_preserv_parallel_pos")
                                           (inst
                                            -1
                                            "q!1"
                                            "x!2`seq(0)"
                                            "replace_pos(ext(sg1!1)(x!1), ext(sg2!1)(x!3), rest(x!2))"
                                            "ext(sg2!1)(x!3)")
                                           (assert)
                                           (hide-all-but (-7 1))
                                           (rewrite "parallel_comm"))
                                          ("2"
                                           (hide-all-but (1 3))
                                           (rewrite
                                            "rest_parallel_first"))))
                                        ("2"
                                         (hide-all-but 1)
                                         (typepred "x!2")
                                         (expand* "SPP?" "SP?")
                                         (flatten)
                                         (hide -1)
                                         (inst -1 "0")
                                         (expand "finseq_appl")
                                         (rewrite "ext_preserv_pos"))))
                                      ("2"
                                       (hide-all-but (-6 1 3))
                                       (skosimp*)
                                       (lemma
                                        "rest_parallel_pos_parallel")
                                       (inst?)
                                       (inst -1 "q!1")
                                       (prop)
                                       (("1" (inst?))
                                        ("2"
                                         (skosimp*)
                                         (inst?)
                                         (expand "finseq_appl")
                                         (assert))))))
                                    ("2"
                                     (hide-all-but 1)
                                     (typepred "q!1")
                                     (rewrite "ext_preserv_pos"))))))
                                ("2"
                                 (hide (-1 3))
                                 (expand "repTemp")
                                 (rewrite
                                  "preserv_all_parallel_positions")
                                 (("1"
                                   (hide-all-but (-2 1))
                                   (case "length(rest(x!2)) = 0")
                                   (("1" (hide -2) (grind))
                                    ("2"
                                     (typepred "x!2")
                                     (expand* "SPP?" "PP?")
                                     (flatten)
                                     (hide (-2 -3))
                                     (prop)
                                     (("1" (grind))
                                      ("2"
                                       (skosimp*)
                                       (inst -1 "i!1 + 1" "0")
                                       (("1"
                                         (assert)
                                         (lemma "fspos.rest_pos")
                                         (inst?)
                                         (assert)
                                         (inst -1 "i!1")
                                         (("1"
                                           (expand "finseq_appl")
                                           (assert))
                                          ("2"
                                           (hide (-1 4))
                                           (typepred "i!1")
                                           (grind))))
                                        ("2"
                                         (hide 4)
                                         (typepred "i!1")
                                         (grind))))))))
                                  ("2"
                                   (hide-all-but 1)
                                   (typepred "x!2")
                                   (expand* "SPP?" "SP?")
                                   (flatten)
                                   (inst -2 "0")
                                   (expand "finseq_appl")
                                   (rewrite "ext_preserv_pos"))))
                                ("3"
                                 (expand "repTemp")
                                 (hide-all-but (-3 1))
                                 (rewrite
                                  "preserv_all_parallel_positions")
                                 (("1"
                                   (hide 2)
                                   (case "length(rest(x!2)) = 0")
                                   (("1" (hide -2) (grind))
                                    ("2"
                                     (skosimp*)
                                     (inst -1 "i!1 + 1")
                                     (("1"
                                       (lemma "fspos.rest_pos")
                                       (expand "finseq_appl")
                                       (inst?)
                                       (assert)
                                       (inst -1 "i!1")
                                       (("1" (assert))
                                        ("2"
                                         (hide (-1 3))
                                         (typepred "i!1")
                                         (grind))))
                                      ("2"
                                       (hide 3)
                                       (typepred "i!1")
                                       (grind))))))
                                  ("2"
                                   (hide (-1 2))
                                   (typepred "q!1")
                                   (rewrite "ext_preserv_pos"))))
                                ("4"
                                 (hide (-1 3))
                                 (expand "repTemp")
                                 (rewrite
                                  "preserv_all_parallel_positions")
                                 (("1"
                                   (hide-all-but (1 3))
                                   (skosimp*)
                                   (typepred "x!2")
                                   (expand "SPP?")
                                   (flatten)
                                   (lemma "rest_parallel_first")
                                   (inst?)
                                   (assert))
                                  ("2"
                                   (hide-all-but 1)
                                   (typepred "x!2")
                                   (expand* "SPP?" "SP?")
                                   (flatten)
                                   (inst -2 "0")
                                   (expand "finseq_appl")
                                   (rewrite "ext_preserv_pos"))))
                                ("5"
                                 (hide-all-but (1 3))
                                 (expand "repTemp")
                                 (rewrite
                                  "preserv_all_parallel_positions")
                                 (("1"
                                   (hide 2)
                                   (skosimp*)
                                   (lemma "rest_parallel_first")
                                   (inst?)
                                   (assert))
                                  ("2"
                                   (hide-all-but 1)
                                   (typepred "x!2")
                                   (expand* "SPP?" "SP?")
                                   (flatten)
                                   (inst -2 "0")
                                   (expand "finseq_appl")
                                   (rewrite "ext_preserv_pos"))))
                                ("6"
                                 (hide-all-but (-2 1 3))
                                 (expand "repTemp")
                                 (rewrite
                                  "preserv_all_parallel_positions")
                                 (("1"
                                   (hide 2)
                                   (skosimp*)
                                   (lemma "rest_parallel_pos_parallel")
                                   (inst?)
                                   (inst -1 "q!1")
                                   (prop)
                                   (("1" (inst?))
                                    ("2"
                                     (skosimp*)
                                     (inst?)
                                     (expand "finseq_appl")
                                     (assert))))
                                  ("2"
                                   (hide (-1 2))
                                   (typepred "q!1")
                                   (rewrite "ext_preserv_pos"))))
                                ("7"
                                 (hide-all-but (-3 1 2))
                                 (expand "repTemp")
                                 (rewrite
                                  "preserv_all_parallel_positions")
                                 (("1"
                                   (hide 2)
                                   (typepred "x!2")
                                   (skosimp*)
                                   (lemma "rest_parallel_pos_parallel")
                                   (inst?)
                                   (inst -1 "q!1")
                                   (prop)
                                   (("1" (inst?))
                                    ("2"
                                     (skosimp*)
                                     (inst?)
                                     (expand "finseq_appl")
                                     (assert))))
                                  ("2"
                                   (hide (-1 2))
                                   (typepred "q!1")
                                   (rewrite "ext_preserv_pos"))))
                                ("8"
                                 (hide-all-but (-2 1 3))
                                 (expand "repTemp")
                                 (rewrite
                                  "preserv_all_parallel_positions")
                                 (("1"
                                   (hide 2)
                                   (typepred "x!2")
                                   (hide -2)
                                   (skosimp*)
                                   (lemma "rest_parallel_first")
                                   (inst?)
                                   (assert))
                                  ("2"
                                   (hide-all-but 1)
                                   (typepred "x!2")
                                   (expand* "SPP?" "SP?")
                                   (flatten)
                                   (inst -2 "0")
                                   (expand "finseq_appl")
                                   (rewrite "ext_preserv_pos"))))
                                ("9"
                                 (hide-all-but (-2 1 3))
                                 (expand "repTemp")
                                 (rewrite
                                  "preserv_all_parallel_positions")
                                 (("1"
                                   (hide 2)
                                   (skosimp*)
                                   (lemma "rest_parallel_pos_parallel")
                                   (inst?)
                                   (inst -1 "q!1")
                                   (prop)
                                   (("1" (inst?))
                                    ("2"
                                     (skosimp*)
                                     (inst?)
                                     (expand "finseq_appl")
                                     (assert))))
                                  ("2"
                                   (hide-all-but 1)
                                   (typepred "q!1")
                                   (rewrite "ext_preserv_pos"))))))
                              ("2"
                               (hide-all-but (1 2))
                               (skosimp*)
                               (lemma "rest_parallel_first")
                               (inst?)
                               (assert)
                               (inst?))))
                            ("2"
                             (hide-all-but 1)
                             (typepred "x!2")
                             (expand* "SPP?" "SP?")
                             (flatten)
                             (inst -2 "0")
                             (expand "finseq_appl")
                             (rewrite "ext_preserv_pos"))
                            ("3"
                             (hide-all-but 1)
                             (rewrite "ext_parallel_pos")
                             (hide 2)
                             (typepred "x!2")
                             (expand "SPP?")
                             (flatten)
                             (rewrite "rest_of_PP_is_PP")
                             (rewrite "rest_of_SP_is_SP"))))
                          ("2"
                           (hide-all-but 1)
                           (typepred "x!2")
                           (expand* "SPP?" "SP?")
                           (flatten)
                           (inst -2 "0")
                           (expand "finseq_appl")
                           (propax))))
                        ("2"
                         (hide-all-but (1 2))
                         (rewrite "preserv_all_parallel_positions")
                         (("1"
                           (hide 2)
                           (lemma "rest_parallel_first")
                           (inst?)
                           (assert))
                          ("2"
                           (hide-all-but 1)
                           (typepred "x!2")
                           (expand* "SPP?" "SP?")
                           (flatten)
                           (inst -2 "0")
                           (expand "finseq_appl")
                           (rewrite "ext_preserv_pos"))))))
                      ("2"
                       (hide-all-but (1 2))
                       (lemma "rest_parallel_first")
                       (inst?)
                       (expand "finseq_appl")
                       (propax))))
                    ("2"
                     (hide-all-but 1)
                     (typepred "x!2")
                     (expand* "SPP?" "SP?")
                     (flatten)
                     (inst -2 "0")
                     (expand "finseq_appl")
                     (rewrite "ext_preserv_pos"))))
                  ("2"
                   (hide-all-but (-2 1 2))
                   (lemma "rest_parallel_pos_parallel")
                   (inst?)
                   (inst -1 "q!1")
                   (expand "finseq_appl")
                   (prop)
                   (hide 2)
                   (skosimp*)
                   (inst?)
                   (assert))
                  ("3"
                   (hide-all-but (-2 1 2))
                   (skosimp*)
                   (inst -1 "i!1")
                   (assert))
                  ("4"
                   (hide-all-but (-1 1 3))
                   (lemma "rest_parallel_pos_parallel")
                   (inst?)
                   (inst -1 "q!1")
                   (expand "finseq_appl")
                   (prop)
                   (hide 2)
                   (skosimp*)
                   (inst?)
                   (assert))))
                ("2"
                 (hide-all-but 1)
                 (typepred "q!1")
                 (rewrite "ext_preserv_pos"))
                ("3"
                 (hide-all-but (1 2))
                 (rewrite "ext_parallel_pos")
                 (hide 2)
                 (typepred "x!2")
                 (expand "SPP?")
                 (flatten)
                 (rewrite "rest_of_PP_is_PP")
                 (rewrite "rest_of_SP_is_SP"))))
              ("2"
               (hide-all-but 1)
               (typepred "q!1")
               (rewrite "ext_preserv_pos"))
              ("3" (hide-all-but 1) (rewrite "ext_parallel_pos"))))
            ("2" (hide-all-but (1 2)) (grind))))
          ("2"
           (hide-all-but (-1 1 2))
           (case "length(rest(x!2)) = 0")
           (("1" (hide -2) (grind))
            ("2"
             (skosimp*)
             (lemma "fspos.rest_pos")
             (inst?)
             (assert)
             (inst -1 "i!1")
             (("1"
               (expand "finseq_appl")
               (inst -2 "i!1 + 1")
               (("1" (replace -1 2 rl) (hide -1) (assert))
                ("2" (hide (-1 3)) (typepred "i!1") (grind))))
              ("2" (hide (-1 3)) (typepred "i!1") (grind))))))))
        ("2"
         (hide-all-but 1)
         (typepred "x!2")
         (expand "SPP?")
         (flatten)
         (rewrite "rest_of_PP_is_PP")
         (rewrite "rest_of_SP_is_SP"))))))
    ("2"
     (hide-all-but (-1 1))
     (expand "finseq_appl")
     (lemma "add_parallel_pos")
     (inst?)
     (prop)
     (hide 2)
     (skosimp*)
     (inst?)
     (expand "finseq_appl")
     (assert))
    ("3"
     (hide-all-but 1)
     (expand "SPP?")
     (split)
     (("1" (expand "PP?") (prop) (hide 2) (grind))
      ("2"
       (typepred "q!1")
       (expand "SP?")
       (skosimp*)
       (expand "finseq_appl")
       (lemma "ext_preserv_pos")
       (inst?)
       (grind))))
    ("4"
     (hide-all-but 1)
     (skosimp*)
     (expand "finseq_appl")
     (typepred "y!2")
     (expand* "SPP?" "SP?")
     (flatten)
     (inst?)
     (expand "finseq_appl")
     (propax))
    ("5"
     (hide-all-but 1)
     (skosimp*)
     (hide (-2 -3 -4))
     (lemma "add_parallel_pos")
     (inst?)
     (prop)
     (hide 2)
     (skosimp*)
     (expand "finseq_appl")
     (inst?)
     (assert))
    ("6"
     (hide (-1 2))
     (skosimp*)
     (hide-all-but 1)
     (expand "SPP?")
     (split)
     (("1" (expand "PP?") (prop) (hide 2) (grind))
      ("2"
       (expand "SP?")
       (skosimp*)
       (expand "finseq_appl")
       (typepred "q!1")
       (lemma "ext_preserv_pos")
       (inst?)
       (grind))))
    ("7"
     (hide (-1 2))
     (skosimp*)
     (hide -1)
     (expand "finseq_appl")
     (typepred "y!2")
     (expand* "SPP?" "SP?")
     (flatten)
     (inst?)
     (expand "finseq_appl")
     (propax))
    ("8"
     (hide-all-but 1)
     (skosimp*)
     (hide (-2 -3 -4))
     (lemma "add_parallel_pos")
     (inst?)
     (prop)
     (hide 2)
     (skosimp*)
     (expand "finseq_appl")
     (inst?)
     (assert))
    ("9"
     (hide-all-but (-1 1))
     (lemma "add_parallel_pos")
     (inst?)
     (prop)
     (hide 2)
     (skosimp*)
     (expand "finseq_appl")
     (inst?)
     (assert))
    ("10"
     (hide-all-but 1)
     (expand "SPP?")
     (split)
     (("1" (expand "PP?") (prop) (hide 2) (grind))
      ("2"
       (expand "SP?")
       (skosimp*)
       (expand "finseq_appl")
       (typepred "q!1")
       (lemma "ext_preserv_pos")
       (inst?)
       (grind))))
    ("11"
     (hide-all-but 1)
     (skosimp*)
     (hide -1)
     (typepred "y!1`2")
     (expand* "SPP?" "SP?")
     (flatten)
     (inst?))
    ("12"
     (hide-all-but 1)
     (skosimp*)
     (hide-all-but 1)
     (expand "SPP?")
     (split)
     (("1" (expand "PP?") (prop) (hide 2) (grind))
      ("2"
       (expand "SP?")
       (skosimp*)
       (expand "finseq_appl")
       (lemma "ext_preserv_pos")
       (inst?)
       (grind))))
    ("13"
     (hide-all-but (-1 1))
     (lemma "add_parallel_pos")
     (inst?)
     (prop)
     (hide 2)
     (skosimp*)
     (expand "finseq_appl")
     (inst?)
     (assert))
    ("14"
     (hide-all-but 1)
     (expand "SPP?")
     (split)
     (("1" (expand "PP?") (prop) (hide 2) (grind))
      ("2"
       (expand "SP?")
       (skosimp*)
       (expand "finseq_appl")
       (typepred "q!1")
       (lemma "ext_preserv_pos")
       (inst?)
       (grind))))
    ("15"
     (hide-all-but 1)
     (skosimp*)
     (hide -1)
     (typepred "y!1`2")
     (expand* "SPP?" "SP?")
     (flatten)
     (inst?))
    ("16"
     (expand "finseq_appl")
     (hide-all-but 1)
     (skosimp*)
     (hide -1)
     (typepred "x!1`2")
     (expand* "SPP?" "SP?")
     (flatten)
     (inst?)
     (expand "finseq_appl")
     (propax))
    ("17"
     (hide-all-but (-1 1))
     (lemma "add_parallel_pos")
     (inst?)
     (prop)
     (hide 2)
     (skosimp*)
     (expand "finseq_appl")
     (inst?)
     (assert))
    ("18"
     (hide-all-but 1)
     (expand "SPP?")
     (split)
     (("1" (expand "PP?") (prop) (hide 2) (grind))
      ("2"
       (expand "SP?")
       (skosimp*)
       (expand "finseq_appl")
       (typepred "q!1")
       (lemma "ext_preserv_pos")
       (inst?)
       (grind))))
    ("19"
     (hide-all-but 1)
     (skosimp*)
     (hide -1)
     (expand "finseq_appl")
     (typepred "y!1`2")
     (expand* "SPP?" "SP?")
     (flatten)
     (inst?)
     (expand "finseq_appl")
     (propax))
    ("20"
     (hide-all-but 1)
     (skosimp*)
     (hide (-2 -3 -4))
     (lemma "add_parallel_pos")
     (inst?)
     (prop)
     (hide 2)
     (skosimp*)
     (expand "finseq_appl")
     (inst?)
     (assert))
    ("21"
     (hide-all-but 1)
     (skosimp*)
     (hide (-1 -2 -3 -4))
     (expand "SPP?")
     (split)
     (("1" (expand "PP?") (prop) (hide 2) (grind))
      ("2"
       (expand "SP?")
       (skosimp*)
       (expand "finseq_appl")
       (typepred "q!1")
       (lemma "ext_preserv_pos")
       (inst?)
       (grind))))
    ("22"
     (hide-all-but 1)
     (skosimp*)
     (expand "finseq_appl")
     (typepred "y!1`2")
     (expand* "SPP?" "SP?")
     (flatten)
     (inst?)
     (expand "finseq_appl")
     (propax))
    ("23"
     (hide-all-but (-1 1))
     (lemma "add_parallel_pos")
     (inst?)
     (prop)
     (hide 2)
     (skosimp*)
     (expand "finseq_appl")
     (inst?)
     (assert))
    ("24"
     (hide-all-but 1)
     (expand "SPP?")
     (split)
     (("1" (expand "PP?") (prop) (hide 2) (grind))
      ("2"
       (expand "SP?")
       (skosimp*)
       (expand "finseq_appl")
       (typepred "q!1")
       (lemma "ext_preserv_pos")
       (inst?)
       (grind))))
    ("25"
     (hide-all-but 1)
     (typepred "fst!1")
     (expand* "SPP?" "SP?")
     (flatten)
     (inst?))))


proof_type: f_proof
decl_type: formula
library: TRS
theory: critical_pairs_aux
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (measure-induct+ "length(fstp)" ("t" "fstp"))
   (("1"
     (skolem 1 ("R" "x" "sg1" "sg2"))
     (flatten)
     (skosimp*)
     (case "length(rest(x!2)) = 0")
     (("1"
       (hide-all-but (-1 1 2))
       (lemma "fspos.length_rest_0")
       (inst?)
       (assert)
       (replace -1 2)
       (typepred "i!1")
       (replaces -2 (-1 2))
       (expand "finseq_appl")
       (expand "replace_pos")
       (lift-if)
       (prop)
       (("1" (hide-all-but -1) (grind))
        ("2"
         (case "length(rest( #(x!2`seq(i!1)))) = 0")
         (("1"
           (expand "replace_pos")
           (assert)
           (hide -1)
           (expand* "iterate" "#" "finseq_appl")
           (grind))
          ("2" (hide-all-but 1) (grind))))))
      ("2"
       (expand "finseq_appl")
       (case-replace "i!1 = 0")
       (("1"
         (hide -2)
         (lemma "CP_lemma_aux2c1")
         (inst -1 "R" "x!1" "x" "sg1" "sg2" "rest(x!2)" "x!2`seq(0)")
         (("1"
           (prop)
           (("1"
             (lemma "fspos.seq_first_rest")
             (inst?)
             (assert)
             (expand* "first" "finseq_appl")
             (replace -1 -2 rl)
             (case-replace "length(rest(x!2)) = length(x!2) - 1")
             (hide-all-but (1 2 3))
             (grind))
            ("2"
             (skosimp*)
             (split)
             (("1"
               (hide-all-but (1 2 3))
               (expand "finseq_appl")
               (lemma "rest_parallel_first")
               (inst?)
               (assert)
               (inst?)
               (expand "finseq_appl")
               (propax))
              ("2"
               (hide-all-but (-2 1 2 3))
               (lemma "fspos.rest_pos")
               (inst -1 "x!2")
               (assert)
               (inst -1 "i!2")
               (("1"
                 (expand "finseq_appl")
                 (replace -1 1 rl)
                 (inst -2 "i!2 + 1")
                 (("1" (assert))
                  ("2" (hide (-1 2)) (typepred "i!2") (grind))))
                ("2" (hide (-1 2)) (typepred "i!2") (grind))))))
            ("3" (hide-all-but (-2 1)) (inst -1 "0"))))
          ("2"
           (hide-all-but 1)
           (typepred "x!2")
           (expand* "SPP?" "SP?")
           (flatten)
           (inst?)
           (expand "finseq_appl")
           (propax))
          ("3"
           (hide-all-but 1)
           (typepred "x!2")
           (expand "SPP?")
           (flatten)
           (rewrite "rest_of_PP_is_PP")
           (rewrite "rest_of_SP_is_SP"))))
        ("2"
         (expand "iterate" 4)
         (prop)
         (("1" (hide-all-but (-1 3 4)) (grind))
          ("2"
           (expand "o")
           (inst 2 "replace_pos(ext(sg1)(x!1), ext(sg2)(x), rest(x!2))")
           (("1"
             (split)
             (("1"
               (inst -1 "x!1" "rest(x!2)")
               (("1"
                 (inst -1 "R" "x" "sg1" "sg2")
                 (rewrite "length_rest")
                 (assert)
                 (prop)
                 (("1"
                   (inst -1 "i!1 - 1")
                   (("1"
                     (case-replace "length(rest(x!2)) = length(x!2) - 1"
                      :hide? T)
                     (("1"
                       (assert)
                       (lemma "fspos.rest_pos")
                       (inst?)
                       (assert)
                       (inst -1 "i!1 - 1")
                       (expand "finseq_appl")
                       (replace -1 -2 rl)
                       (propax))
                      ("2" (hide-all-but (1 5 6)) (grind))))
                    ("2" (hide-all-but 1) (typepred "i!1") (grind))))
                  ("2"
                   (hide-all-but (-1 1 5))
                   (skosimp*)
                   (lemma "fspos.rest_pos")
                   (inst?)
                   (assert)
                   (inst -1 "i!2")
                   (("1"
                     (expand "finseq_appl")
                     (replace -1 1 rl)
                     (inst -2 "1 + i!2"))
                    ("2" (hide (-1 2)) (typepred "i!2") (grind))))))
                ("2"
                 (hide-all-but 1)
                 (typepred "x!2")
                 (expand "SPP?")
                 (flatten)
                 (rewrite "rest_of_PP_is_PP")
                 (rewrite "rest_of_SP_is_SP"))))
              ("2"
               (hide -1)
               (lemma "fspos.seq_first_rest")
               (inst?)
               (assert)
               (name-replace "RErestTemp"
                "replace_pos(ext(sg1)(x!1), ext(sg2)(x), rest(x!2))")
               (replace -1 1)
               (expand* "first" "finseq_appl")
               (hide -1)
               (lemma "CP_lemma_aux2a1")
               (inst?)
               (("1"
                 (prop)
                 (("1"
                   (replaces -1)
                   (expand "RErestTemp")
                   (lemma "preserv_unchanged_subterms")
                   (inst -1 "ext(sg2)(x)" "ext(sg1)(x!1)" "rest(x!2)"
                    "x!2`seq(0)")
                   (("1"
                     (prop)
                     (("1"
                       (inst -2 "0")
                       (lemma "subterm_ext_commute")
                       (inst -1 "x!2`seq(0)" "x!1" "sg1")
                       (prop)
                       (("1"
                         (replaces -3 -1)
                         (replaces -1)
                         (lemma "replace_subterm_of_term")
                         (inst -1 "x!2`seq(0)"
                          "replace_pos(ext(sg1)(x!1), ext(sg2)(x), rest(x!2))")
                         (prop)
                         (("1"
                           (replaces -2)
                           (name-replace "REPtemp"
                            "replaceTerm(replace_pos(ext(sg1)(x!1), ext(sg2)(x), rest(x!2)), ext(sg2)(x), x!2`seq(0))")
                           (replace -1 1 rl)
                           (expand "REPtemp")
                           (hide -1)
                           (expand* "comp_cont?" "RSigma")
                           (typepred "x")
                           (expand "V")
                           (expand "ext" 1 (3 6))
                           (assert)
                           (inst -2 "x!2`seq(0)"
                            "replace_pos(ext(sg1)(x!1), ext(sg2)(x), rest(x!2))")
                           (inst -3 "x")
                           (prop)
                           (("1"
                             (hide -1)
                             (inst -2 "sg1(x)" "sg2(x)")
                             (assert))
                            ("2"
                             (hide (-1 -2 -3 2))
                             (lemma "preserv_all_parallel_positions")
                             (inst -1 "ext(sg2)(x)" "ext(sg1)(x!1)"
                              "rest(x!2)" "x!2`seq(0)")
                             (("1"
                               (prop)
                               (hide-all-but (1 5 6))
                               (rewrite "rest_parallel_first"))
                              ("2"
                               (hide-all-but 1)
                               (typepred "x!2")
                               (expand* "SPP?" "SP?")
                               (flatten)
                               (hide -1)
                               (inst -1 "0")
                               (expand "finseq_appl")
                               (rewrite "ext_preserv_pos"))))))
                          ("2"
                           (hide-all-but (1 5 6))
                           (lemma "preserv_all_parallel_positions")
                           (inst -1 "ext(sg2)(x)" "ext(sg1)(x!1)"
                            "rest(x!2)" "x!2`seq(0)")
                           (("1"
                             (prop)
                             (hide-all-but 1)
                             (rewrite "rest_parallel_first"))
                            ("2"
                             (hide-all-but 1)
                             (typepred "x!2")
                             (expand* "SPP?" "SP?")
                             (flatten)
                             (hide -1)
                             (inst -1 "0")
                             (expand "finseq_appl")
                             (rewrite "ext_preserv_pos"))))))
                        ("2"
                         (hide-all-but 1)
                         (typepred "x!2")
                         (expand* "SPP?" "SP?")
                         (flatten)
                         (hide -1)
                         (inst -1 "0")
                         (expand "finseq_appl")
                         (propax))))
                      ("2"
                       (hide-all-but 1)
                       (rewrite "rest_parallel_first"))))
                    ("2"
                     (hide-all-but 1)
                     (typepred "x!2")
                     (expand* "SPP?" "SP?")
                     (flatten)
                     (hide -1)
                     (inst -1 "0")
                     (expand "finseq_appl")
                     (rewrite "ext_preserv_pos"))))
                  ("2"
                   (hide-all-but 1)
                   (rewrite "rest_parallel_first"))))
                ("2"
                 (hide-all-but 1)
                 (typepred "x!2")
                 (expand* "SPP?" "SP?")
                 (flatten)
                 (hide -1)
                 (inst -1 "0")
                 (expand "finseq_appl")
                 (rewrite "ext_preserv_pos"))
                ("3"
                 (hide-all-but (1 5 6))
                 (typepred "x!2")
                 (expand "SPP?")
                 (flatten)
                 (rewrite "rest_of_PP_is_PP")
                 (hide -1)
                 (expand "SP?")
                 (skosimp*)
                 (lemma "fspos.rest_pos")
                 (inst?)
                 (assert)
                 (inst -1 "i!2")
                 (("1"
                   (expand "finseq_appl")
                   (replace -1 1 rl)
                   (hide -1)
                   (inst -1 "1 + i!2")
                   (rewrite "ext_preserv_pos"))
                  ("2" (hide (-1 2)) (typepred "i!2") (grind))))))))
            ("2"
             (hide-all-but (1 4 5))
             (rewrite "ext_parallel_pos")
             (hide 2)
             (typepred "x!2")
             (expand "SPP?")
             (flatten)
             (rewrite "rest_of_PP_is_PP")
             (rewrite "rest_of_SP_is_SP"))))))))))
    ("2"
     (hide-all-but 2)
     (skosimp*)
     (typepred "y!2")
     (expand* "SPP?" "SP?")
     (flatten)
     (assert)
     (skosimp*)
     (expand "finseq_appl")
     (inst?)
     (hide -1)
     (rewrite "ext_preserv_pos"))
    ("3"
     (hide-all-but 2)
     (skosimp*)
     (typepred "y!2")
     (expand "SPP?")
     (flatten)
     (split)
     (("1" (hide (-1 -2)) (expand "PP?") (prop) (hide 2) (grind))
      ("2"
       (hide -1)
       (expand "SP?")
       (skosimp*)
       (expand "finseq_appl")
       (inst?)
       (lemma "ext_preserv_pos")
       (inst?)
       (grind))))
    ("4"
     (hide-all-but 2)
     (skosimp*)
     (typepred "y!2")
     (expand* "SPP?" "SP?")
     (flatten)
     (inst?))
    ("5"
     (hide-all-but 1)
     (skosimp*)
     (hide (-2 -3))
     (lemma "ext_parallel_pos")
     (inst?))
    ("6"
     (hide-all-but 1)
     (skosimp*)
     (hide-all-but 2)
     (typepred "y!2")
     (expand "SPP?")
     (flatten)
     (split)
     (("1"
       (expand "PP?")
       (prop)
       (("1" (hide 2) (grind)) ("2" (hide 3) (grind))))
      ("2"
       (hide -1)
       (expand "SP?")
       (skosimp*)
       (expand "finseq_appl")
       (inst?)
       (lemma "ext_preserv_pos")
       (inst?)
       (grind))))
    ("7"
     (hide-all-but 1)
     (skosimp*)
     (typepred "y!2")
     (expand* "SPP?" "SP?")
     (flatten)
     (inst?))
    ("8"
     (hide-all-but 1)
     (skosimp*)
     (hide-all-but 2)
     (typepred "x!1`2")
     (lemma "ext_parallel_pos")
     (inst?))
    ("9"
     (hide-all-but 2)
     (skosimp*)
     (typepred "y!1`2")
     (lemma "ext_parallel_pos")
     (inst?))
    ("10"
     (hide-all-but 2)
     (skosimp*)
     (typepred "y!1`2")
     (expand "SPP?")
     (flatten)
     (split)
     (("1"
       (expand "PP?")
       (prop)
       (("1" (hide 2) (grind)) ("2" (hide 3) (grind))))
      ("2"
       (hide -1)
       (expand "SP?")
       (skosimp*)
       (expand "finseq_appl")
       (inst?)
       (lemma "ext_preserv_pos")
       (inst?)
       (grind))))
    ("11"
     (hide-all-but 2)
     (skosimp*)
     (typepred "y!1`2")
     (expand* "SPP?" "SP?")
     (flatten)
     (inst?))
    ("12"
     (hide-all-but 1)
     (skosimp*)
     (hide (-2 -3))
     (typepred "x!1`2")
     (expand "SPP?")
     (flatten)
     (split)
     (("1"
       (expand "PP?")
       (prop)
       (("1" (hide 2) (grind)) ("2" (hide 3) (grind))))
      ("2"
       (hide -1)
       (expand "SP?")
       (skosimp*)
       (expand "finseq_appl")
       (inst?)
       (lemma "ext_preserv_pos")
       (inst?)
       (grind))))
    ("13" (hide-all-but 2) (skosimp*) (lemma "ext_parallel_pos") (inst?))
    ("14"
     (hide-all-but 2)
     (skosimp*)
     (typepred "y!1`2")
     (expand "SPP?")
     (flatten)
     (split)
     (("1"
       (expand "PP?")
       (prop)
       (("1" (hide 2) (grind)) ("2" (hide 3) (grind))))
      ("2"
       (hide -1)
       (expand "SP?")
       (skosimp*)
       (expand "finseq_appl")
       (inst?)
       (lemma "ext_preserv_pos")
       (inst?)
       (grind))))
    ("15"
     (hide-all-but 2)
     (skosimp*)
     (typepred "y!1`2")
     (expand* "SPP?" "SP?")
     (flatten)
     (inst?))
    ("16"
     (hide-all-but 1)
     (skosimp*)
     (typepred "x!1`2")
     (expand* "SPP?" "SP?")
     (flatten)
     (inst?))
    ("17" (hide-all-but 2) (skosimp*) (lemma "ext_parallel_pos") (inst?))
    ("18"
     (hide-all-but 2)
     (skosimp*)
     (typepred "y!1`2")
     (expand "SPP?")
     (flatten)
     (split)
     (("1"
       (expand "PP?")
       (prop)
       (("1" (hide 2) (grind)) ("2" (hide 3) (grind))))
      ("2"
       (hide -1)
       (expand "SP?")
       (skosimp*)
       (expand "finseq_appl")
       (inst?)
       (lemma "ext_preserv_pos")
       (inst?)
       (grind))))
    ("19"
     (hide-all-but 2)
     (skosimp*)
     (typepred "y!1`2")
     (expand* "SPP?" "SP?")
     (flatten)
     (inst?))
    ("20"
     (hide-all-but 1)
     (skosimp*)
     (hide-all-but 2)
     (lemma "ext_parallel_pos")
     (inst?))
    ("21"
     (hide-all-but 1)
     (skosimp*)
     (hide-all-but 2)
     (typepred "y!1`2")
     (expand "SPP?")
     (flatten)
     (split)
     (("1"
       (expand "PP?")
       (prop)
       (("1" (hide 2) (grind)) ("2" (hide 3) (grind))))
      ("2"
       (hide -1)
       (expand "SP?")
       (skosimp*)
       (expand "finseq_appl")
       (inst?)
       (lemma "ext_preserv_pos")
       (inst?)
       (grind))))
    ("22"
     (hide-all-but 1)
     (skosimp*)
     (typepred "y!1`2")
     (expand* "SPP?" "SP?")
     (flatten)
     (inst?))
    ("23" (hide-all-but 2) (skosimp*) (lemma "ext_parallel_pos") (inst?))
    ("24"
     (hide-all-but 2)
     (skosimp*)
     (typepred "fstp!1")
     (expand "SPP?")
     (flatten)
     (split)
     (("1"
       (expand "PP?")
       (prop)
       (("1" (hide 2) (grind)) ("2" (hide 3) (grind))))
      ("2"
       (hide -1)
       (expand "SP?")
       (skosimp*)
       (expand "finseq_appl")
       (inst?)
       (lemma "ext_preserv_pos")
       (inst?)
       (grind))))
    ("25"
     (hide-all-but 2)
     (skosimp*)
     (typepred "fstp!1")
     (expand* "SPP?" "SP?")
     (flatten)
     (inst?))))


proof_type: f_proof
decl_type: formula
library: TRS
theory: critical_pairs_aux
signature: nil
run_date: Unknown date
run_time: ----
status: proved-incomplete
description: nil
script:
  (""
   (measure-induct+ "card(Pos_var(t,x))" ("t" "x"))
   (("1"
     (skeep)
     (name-replace "seqvarsx!2" "set2seq(Pos_var(x!1, x!2))")
     (expand "replace_pos" 1)
     (expand "finseq_appl")
     (lift-if)
     (prop)
     (("1"
       (hide -2)
       (lemma "same_term")
       (inst?)
       (assert)
       (skeep)
       (hide (-3 2))
       (expand "RSigma")
       (inst -3 "x")
       (prop)
       (hide (-2 1))
       (expand "seqvarsx!2")
       (expand "set2seq")
       (lift-if)
       (prop)
       (("1" (grind)) ("2" (grind))))
      ("2"
       (case "positionsOF(x!1)(seqvarsx!2`seq(0))")
       (("1"
         (lemma "exists_var")
         (inst -1 "Vars(x!1)" "Vars(x!1)")
         (("1"
           (skosimp*)
           (rewrite "union_idempotent")
           (inst -2 "replaceTerm(x!1, z!1, seqvarsx!2`seq(0))" "x!2")
           (inst -2 "R" "gamma(sg1, sg2, x!2, z!1)"
            "gamma(sg2, sg2, x!2, z!1)")
           (("1"
             (prop)
             (("1"
               (name-replace "seqvarx2Term"
                "set2seq(Pos_var(replaceTerm(x!1, z!1, seqvarsx!2`seq(0)), x!2))")
               (typepred "x!2" "z!1")
               (expand "V")
               (expand "ext" -3 2)
               (assert)
               (expand "gamma" -3 2)
               (expand "ext" 3 (2 3))
               (lemma "ext_replace_ext")
               (copy -1)
               (inst?)
               (inst -2 "seqvarsx!2`seq(0)" "x!1"
                "gamma(sg2, sg2, x!2, z!1)" "z!1")
               (prop)
               (replaces -1)
               (replaces -1)
               (expand "ext" -3 (2 4))
               (expand "gamma" -3 (2 4))
               (lemma "gamma_term")
               (inst?)
               (assert)
               (flatten)
               (replace -2 -5)
               (lemma "replace_subterm_of_term")
               (inst -1 "seqvarsx!2`seq(0)" "ext(sg2)(x!1)")
               (prop)
               (("1"
                 (lemma "subterm_ext_commute")
                 (inst -1 "seqvarsx!2`seq(0)" "x!1" "sg2")
                 (assert)
                 (case-replace "subtermOF(x!1, seqvarsx!2`seq(0)) = x!2"
                  :hide? T)
                 (("1"
                   (replaces -1)
                   (expand "ext" -1 2)
                   (replaces -1)
                   (replace -1 -5)
                   (lemma "CP_lemma_aux2a3")
                   (inst -1 "sg2(x!2)"
                    "replaceTerm(ext(sg1)(x!1), sg2(x!2), seqvarsx!2`seq(0))"
                    "rest(seqvarsx!2)" "seqvarx2Term")
                   (prop)
                   (("1" (assert))
                    ("2"
                     (hide (-1 -2 -5 -7 -8 4))
                     (expand "equivalent")
                     (expand "finseq_appl")
                     (prop)
                     (("1"
                       (expand "seqvarx2Term")
                       (case-replace
                        "rest(seqvarsx!2)`length = seqvarsx!2`length -1"
                        :hide? T)
                       (("1"
                         (lemma "set2seq_length[position]")
                         (inst?)
                         (replaces -1)
                         (lemma "set2seq_length[position]")
                         (expand "seqvarsx!2" 1 1)
                         (inst?)
                         (replaces -1)
                         (lemma "pos_occ_var_replace_as_diff")
                         (inst?)
                         (prop)
                         (("1"
                           (replaces -1)
                           (lemma
                            "finite_sets[position].card_diff_subset")
                           (inst -1 "singleton(seqvarsx!2`seq(0))"
                            "Pos_var(x!1, x!2)")
                           (prop)
                           (("1"
                             (rewrite "card_singleton")
                             (expand "difference")
                             (replace -1 1 rl)
                             (hide -1)
                             (grind))
                            ("2"
                             (hide 2)
                             (expand* "subset?" "member")
                             (skosimp*)
                             (expand "singleton")
                             (replaces -1)
                             (lemma "set2seq_lem[position]")
                             (expand "seqvarsx!2" (1 3))
                             (inst?)
                             (assert)
                             (inst -1 "0")
                             (expand "finseq_appl")
                             (propax))))
                          ("2"
                           (hide 2)
                           (lemma "set2seq_lem[position]")
                           (expand "seqvarsx!2" (1 3))
                           (inst?)
                           (assert)
                           (inst -1 "0")
                           (expand "finseq_appl")
                           (propax))
                          ("3"
                           (hide 1)
                           (expand* "member" "Vars" "restrict")
                           (inst 1 "seqvarsx!2`seq(0)")
                           (replaces -1)
                           (lemma "set2seq_lem[position]")
                           (expand "seqvarsx!2")
                           (inst?)
                           (assert)
                           (inst -1 "0")
                           (expand "finseq_appl")
                           (expand "Pos_var" -1 1)
                           (expand "extend" -1 1)
                           (propax))))
                        ("2" (hide-all-but (1 4)) (grind))))
                      ("2"
                       (expand "different_elements")
                       (skosimp*)
                       (expand "finseq_appl")
                       (lemma "rest_pos[position]")
                       (inst -1 "seqvarsx!2")
                       (assert)
                       (lemma "rest_pos[position]")
                       (inst -1 "seqvarsx!2")
                       (assert)
                       (inst -1 "i!1")
                       (("1"
                         (inst -2 "j!1")
                         (("1"
                           (expand "finseq_appl")
                           (replace -1 -3 rl)
                           (replace -2 -3 rl)
                           (hide (-1 -2))
                           (lemma "set2seq_neq[position]")
                           (expand "seqvarsx!2")
                           (inst?)
                           (assert)
                           (inst -1 "1 + i!1" "1 + j!1")
                           (("1"
                             (assert)
                             (expand "finseq_appl")
                             (assert))
                            ("2"
                             (hide (-1 -4))
                             (typepred "j!1")
                             (expand "seqvarsx!2" -1)
                             (grind))
                            ("3"
                             (hide (-1 -4))
                             (typepred "i!1")
                             (expand "seqvarsx!2" -1)
                             (grind))))
                          ("2" (hide (-1 -2)) (typepred "j!1") (grind))))
                        ("2" (hide (-1 -2)) (typepred "i!1") (grind))))
                      ("3"
                       (expand "different_elements")
                       (skosimp*)
                       (expand "finseq_appl")
                       (lemma "set2seq_neq[position]")
                       (expand "seqvarx2Term")
                       (inst?)
                       (assert)
                       (inst -1 "i!1" "j!1")
                       (("1" (assert) (expand "finseq_appl") (assert))
                        ("2"
                         (hide (-1 -4))
                         (typepred "j!1")
                         (expand "seqvarx2Term")
                         (rewrite "set2seq_length"))
                        ("3"
                         (hide (-1 -4))
                         (typepred "i!1")
                         (expand "seqvarx2Term")
                         (rewrite "set2seq_length"))))
                      ("4"
                       (skosimp*)
                       (lemma "rest_pos[position]")
                       (inst?)
                       (assert)
                       (inst -1 "i!1")
                       (("1"
                         (expand "finseq_appl")
                         (replace -1 1 rl)
                         (expand "seqvarsx!2" (1 3))
                         (lemma "set2seq_lem[position]")
                         (inst?)
                         (assert)
                         (inst -1 "1 + i!1")
                         (("1"
                           (expand "finseq_appl")
                           (expand "seqvarx2Term")
                           (case "Pos_var(replaceTerm(x!1, z!1, seqvarsx!2`seq(0)), x!2)(set2seq(Pos_var(x!1, x!2))`seq(1 + i!1))")
                           (("1"
                             (lemma "set2seq_exists[position]")
                             (inst?)
                             (("1"
                               (assert)
                               (assert)
                               (skosimp*)
                               (expand "finseq_appl")
                               (assert)
                               (inst?)
                               (("1" (assert))
                                ("2"
                                 (typepred "ii!1")
                                 (expand "seqvarx2Term")
                                 (propax))))
                              ("2"
                               (hide-all-but 1)
                               (lemma "Pos_var_is_finite")
                               (inst?)
                               (assert))))
                            ("2"
                             (hide 2)
                             (lemma "pos_occ_var_replace_as_diff")
                             (inst?)
                             (prop)
                             (("1"
                               (replaces -1)
                               (expand "difference")
                               (expand "member")
                               (assert)
                               (expand "singleton")
                               (hide-all-but (-1 2))
                               (lemma "set2seq_neq[position]")
                               (expand "seqvarsx!2")
                               (inst?)
                               (assert)
                               (inst -1 "1 + i!1" "0")
                               (expand "finseq_appl")
                               (propax))
                              ("2"
                               (hide-all-but (-5 1 4))
                               (expand "seqvarsx!2")
                               (lemma "set2seq_lem[position]")
                               (inst?)
                               (assert)
                               (inst -1 "0")
                               (expand "finseq_appl")
                               (propax))
                              ("3"
                               (hide (-2 -3 1))
                               (expand* "member" "Vars" "restrict")
                               (inst 1 "seqvarsx!2`seq(0)")
                               (replaces -1)
                               (lemma "set2seq_lem[position]")
                               (expand "seqvarsx!2")
                               (inst?)
                               (assert)
                               (inst -1 "0")
                               (expand "finseq_appl")
                               (expand "Pos_var" -1 1)
                               (expand "extend" -1 1)
                               (propax))))))
                          ("2"
                           (hide (-1 2))
                           (typepred "i!1")
                           (expand "seqvarsx!2")
                           (grind))))
                        ("2" (hide 2) (typepred "i!1") (grind))))))))
                  ("2"
                   (hide-all-but (-8 1 3))
                   (lemma "set2seq_lem[position]")
                   (expand "seqvarsx!2")
                   (inst?)
                   (assert)
                   (inst -1 "0")
                   (expand "finseq_appl")
                   (expand "Pos_var" -1 1)
                   (expand "extend" -1 1)
                   (propax))))
                ("2" (hide-all-but (-6 1)) (rewrite "ext_preserv_pos"))))
              ("2"
               (hide 4)
               (lemma "gamma_is_RSigma")
               (inst?)
               (assert)
               (prop)
               (hide (-4 1))
               (expand "member")
               (expand "Vars")
               (lemma "set2seq_lem[position]")
               (expand "seqvarsx!2")
               (inst?)
               (assert)
               (inst -1 "0")
               (expand "finseq_appl")
               (expand "Pos_var" -1 1)
               (expand "extend" -1 1)
               (inst 1 "seqvarsx!2`seq(0)")
               (expand "seqvarsx!2")
               (replaces -2))
              ("3"
               (hide (-2 -3 2 4))
               (lemma "pos_occ_var_replace_as_diff")
               (inst?)
               (prop)
               (("1"
                 (replaces -1)
                 (lemma "sets_lemmas[position].difference_subset")
                 (inst -1 "Pos_var(x!1, x!2)"
                  "singleton(seqvarsx!2`seq(0))")
                 (lemma "finite_sets[position].card_diff_subset")
                 (inst -1 "singleton(seqvarsx!2`seq(0))"
                  "Pos_var(x!1, x!2)")
                 (prop)
                 (("1"
                   (rewrite "card_singleton")
                   (lemma "finite_sets[position].finite_difference")
                   (inst -1 "Pos_var(x!1, x!2)"
                    "singleton(seqvarsx!2`seq(0))")
                   (expand "difference")
                   (lemma "finite_sets[position].card_subset")
                   (grind))
                  ("2"
                   (hide (-1 2))
                   (expand* "subset?" "member")
                   (skosimp*)
                   (expand "singleton")
                   (replaces -1)
                   (lemma "set2seq_lem[position]")
                   (expand "seqvarsx!2")
                   (inst?)
                   (assert)
                   (inst -1 "0")
                   (expand "finseq_appl")
                   (propax))))
                ("2"
                 (hide 2)
                 (lemma "set2seq_lem[position]")
                 (expand "seqvarsx!2")
                 (inst?)
                 (assert)
                 (inst -1 "0")
                 (expand "finseq_appl")
                 (propax))
                ("3"
                 (reveal 1)
                 (hide 2)
                 (expand* "member" "Vars" "restrict")
                 (inst 1 "seqvarsx!2`seq(0)")
                 (replaces -1)
                 (lemma "set2seq_lem[position]")
                 (expand "seqvarsx!2")
                 (inst?)
                 (assert)
                 (inst -1 "0")
                 (expand "finseq_appl")
                 (expand "Pos_var" -1 1)
                 (expand "extend" -1 1)
                 (propax))))))
            ("2" (rewrite "gamma_Subs")) ("3" (rewrite "gamma_Subs"))))
          ("2" (rewrite "vars_of_term_finite"))))
        ("2"
         (hide-all-but (1 2))
         (lemma "set2seq_lem[position]")
         (expand "seqvarsx!2")
         (inst?)
         (assert)
         (inst -1 "0")
         (expand "finseq_appl")
         (expand "Pos_var")
         (expand "extend" -1 1)
         (assert))))))
    ("2"
     (hide-all-but 1)
     (rewrite "ext_parallel_pos")
     (hide 2)
     (expand "SPP?")
     (split)
     (("1" (lemma "pos_occ_var_HAStypePP") (inst?) (assert))
      ("2" (lemma "pos_occ_var_HAStypeSP") (inst?) (assert))))
    ("3"
     (hide-all-but 1)
     (lemma "pos_occ_var_HAStypePP_TCC1")
     (inst?)
     (inst?))
    ("4"
     (hide-all-but 1)
     (lemma "pos_occ_var_HAStypePP_TCC1")
     (inst?)
     (inst?))
    ("5"
     (hide-all-but 1)
     (lemma "pos_occ_var_HAStypePP_TCC1")
     (inst?)
     (inst?))
    ("6"
     (skeep)
     (hide-all-but 1)
     (rewrite "ext_parallel_pos")
     (hide 2)
     (expand "SPP?")
     (split)
     (("1" (lemma "pos_occ_var_HAStypePP") (inst?) (assert))
      ("2" (lemma "pos_occ_var_HAStypeSP") (inst?) (assert))))
    ("7"
     (skeep)
     (hide-all-but 1)
     (lemma "pos_occ_var_HAStypePP_TCC1")
     (inst?)
     (inst?))
    ("8"
     (hide-all-but 1)
     (lemma "pos_occ_var_HAStypePP_TCC1")
     (inst?)
     (inst?))
    ("9"
     (hide-all-but 1)
     (lemma "pos_occ_var_HAStypePP_TCC1")
     (inst?)
     (inst?))
    ("10"
     (skeep)
     (hide-all-but 1)
     (rewrite "ext_parallel_pos")
     (hide 2)
     (expand "SPP?")
     (split)
     (("1" (lemma "pos_occ_var_HAStypePP") (inst?) (assert))
      ("2" (lemma "pos_occ_var_HAStypeSP") (inst?) (assert))))
    ("11"
     (hide-all-but 1)
     (rewrite "ext_parallel_pos")
     (hide 2)
     (expand "SPP?")
     (split)
     (("1" (lemma "pos_occ_var_HAStypePP") (inst?) (assert))
      ("2" (lemma "pos_occ_var_HAStypeSP") (inst?) (assert))))
    ("12"
     (hide-all-but 1)
     (lemma "pos_occ_var_HAStypePP_TCC1")
     (inst?)
     (inst?))
    ("13"
     (hide-all-but 1)
     (lemma "pos_occ_var_HAStypePP_TCC1")
     (inst?)
     (inst?))
    ("14"
     (hide-all-but 1)
     (lemma "pos_occ_var_HAStypePP_TCC1")
     (inst?)
     (inst?))
    ("15"
     (skeep)
     (hide-all-but 1)
     (lemma "pos_occ_var_HAStypePP_TCC1")
     (inst?)
     (inst?))
    ("16"
     (hide-all-but 1)
     (rewrite "ext_parallel_pos")
     (hide 2)
     (expand "SPP?")
     (split)
     (("1" (lemma "pos_occ_var_HAStypePP") (inst?) (assert))
      ("2" (lemma "pos_occ_var_HAStypeSP") (inst?) (assert))))
    ("17"
     (hide-all-but 1)
     (lemma "pos_occ_var_HAStypePP_TCC1")
     (inst?)
     (inst?))
    ("18"
     (hide-all-but 1)
     (lemma "pos_occ_var_HAStypePP_TCC1")
     (inst?)
     (inst?))
    ("19"
     (hide-all-but 1)
     (lemma "pos_occ_var_HAStypePP_TCC1")
     (inst?)
     (inst?))
    ("20"
     (skeep)
     (hide-all-but 1)
     (rewrite "ext_parallel_pos")
     (hide 2)
     (expand "SPP?")
     (split)
     (("1" (lemma "pos_occ_var_HAStypePP") (inst?) (assert))
      ("2" (lemma "pos_occ_var_HAStypeSP") (inst?) (assert))))
    ("21"
     (skeep)
     (hide-all-but 1)
     (lemma "pos_occ_var_HAStypePP_TCC1")
     (inst?)
     (inst?))
    ("22"
     (hide-all-but 1)
     (lemma "pos_occ_var_HAStypePP_TCC1")
     (inst?)
     (inst?))
    ("23"
     (hide-all-but 1)
     (lemma "pos_occ_var_HAStypePP_TCC1")
     (inst?)
     (inst?))
    ("24"
     (skeep)
     (hide-all-but (-1 -4 1))
     (rewrite "ext_parallel_pos")
     (hide 2)
     (expand "SPP?")
     (split)
     (("1" (lemma "pos_occ_var_HAStypePP") (inst?) (assert))
      ("2" (lemma "pos_occ_var_HAStypeSP") (inst?) (assert))))
    ("25" (hide 2) (lemma "pos_occ_var_HAStypePP_TCC1") (inst?) (assert))
    ("26"
     (hide-all-but 1)
     (lemma "pos_occ_var_HAStypePP_TCC1")
     (inst?)
     (inst?))))


proof_type: t_proof
decl_type: tcc
library: TRS
theory: critical_pairs_aux
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp*)
   (typepred "fstp!1")
   (expand "SPP?")
   (flatten)
   (assert)
   (hide -1)
   (expand "SP?")
   (skosimp*)
   (inst -1 "i!1")
   (expand "finseq_appl")
   (rewrite "ext_preserv_pos"))


proof_type: t_proof
decl_type: tcc
library: TRS
theory: critical_pairs_aux
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skolem-typepred)
   (flatten)
   (hide-all-but 1)
   (expand "SPP?")
   (split)
   (("1" (grind))
    ("2"
     (expand* "SP?" "nth_seq" "#" "finseq_appl")
     (skosimp*)
     (typepred "q!1")
     (rewrite "ext_preserv_pos"))))


proof_type: t_proof
decl_type: tcc
library: TRS
theory: critical_pairs_aux
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skolem-typepred)
   (skosimp*)
   (expand "SPP?")
   (flatten)
   (split)
   (("1"
     (rewrite "add_first_parallel_pos_to_PP_is_PP")
     (hide-all-but (-7 1))
     (skosimp*)
     (inst?)
     (expand "finseq_appl")
     (assert))
    ("2"
     (rewrite "add_first_parallel_pos_to_SP_is_SP")
     (("1" (hide-all-but (1 -6)) (rewrite "ext_preserv_pos"))
      ("2"
       (hide-all-but (-5 1))
       (expand "SP?")
       (skosimp*)
       (inst?)
       (rewrite "ext_preserv_pos"))))))


proof_type: t_proof
decl_type: tcc
library: TRS
theory: critical_pairs_aux
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skolem-typepred)
   (flatten)
   (skosimp*)
   (hide (-1 -2 -3))
   (expand "SPP?")
   (flatten)
   (hide -1)
   (expand "SP?")
   (inst?))


proof_type: t_proof
decl_type: tcc
library: TRS
theory: critical_pairs_aux
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skolem-typepred)
   (flatten)
   (skosimp*)
   (hide-all-but (-4 2))
   (expand "SPP?")
   (flatten)
   (split)
   (("1" (hide (-1 -2)) (grind))
    ("2"
     (hide -1)
     (expand* "SP?" "finseq_appl")
     (skosimp*)
     (expand* "#" "finseq_appl")
     (inst?)
     (rewrite "ext_preserv_pos"))))


proof_type: t_proof
decl_type: tcc
library: TRS
theory: critical_pairs_aux
signature: nil
run_date: Unknown date
run_time: ----
status: proved-incomplete
description: nil
script:
  (""
   (skosimp*)
   (rewrite "ext_parallel_pos")
   (hide (-2 -3 2))
   (expand "SPP?")
   (lemma "pos_occ_var_HAStypePP")
   (inst?)
   (assert)
   (lemma "pos_occ_var_HAStypeSP")
   (inst?)
   (assert))


proof_type: f_proof
decl_type: formula
library: TRS
theory: critical_pairs
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp*)
   (lemma "exists_renaming")
   (inst -1 "Vars(lhs(e2!1))" "Vars(lhs(e1!1))")
   (("1"
     (skosimp*)
     (lemma "inverse_renaming")
     (inst?)
     (skosimp*)
     (lemma "inverse_rename_identity")
     (inst -1 "rho!1" "rho1!1" "lhs(e2!1)")
     (prop)
     (("1"
       (inst 2 "comp(sg2!1, rho1!1)" "rho!1")
       (("1"
         (split)
         (("1"
           (lemma "vars_term_rename")
           (inst?)
           (assert)
           (lemma "IUnion_extra[(V)].disjoint_subset")
           (inst -1 "Vars(lhs(e1!1))" "Vars(lhs(e1!1))"
            "Vars(ext(rho!1)(lhs(e2!1)))"
            "restrict[term[variable, symbol, arity], ((V)), boolean](Ran(rho!1))")
           (assert)
           (hide-all-but 1)
           (expand* "subset?" "member")
           (skeep))
          ("2"
           (hide (-4 2))
           (rewrite "o_ass")
           (rewrite "ext_o")
           (expand "o")
           (replaces -1))))
        ("2" (rewrite "subs_o"))))
      ("2"
       (hide-all-but (-2 1))
       (expand* "subset?" "member")
       (skosimp*)
       (decompose-equality -2)
       (inst -1 "x!1")
       (iff)
       (assert))))
    ("2" (hide-all-but 1) (rewrite "vars_of_term_finite"))
    ("3" (hide-all-but 1) (rewrite "vars_of_term_finite"))))


proof_type: f_proof
decl_type: formula
library: TRS
theory: critical_pairs
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp*)
   (lemma "CP_lemma_aux1a")
   (inst?)
   (assert)
   (skosimp*)
   (case "ext(union_subs((restriction(sg1!1)(Vars(lhs(e1!1))), restriction(alpha!1)(Vars(ext(rho!1)(lhs(e2!1)))))))(subtermOF(lhs(e1!1), p!1)) = ext(union_subs((restriction(sg1!1)(Vars(lhs(e1!1))), restriction(alpha!1)(Vars(ext(rho!1)(lhs(e2!1)))))))(ext(rho!1)(lhs(e2!1)))")
   (("1"
     (lemma "unification")
     (inst -1 "subtermOF(lhs(e1!1), p!1)" "ext(rho!1)(lhs(e2!1))")
     (prop)
     (("1"
       (skosimp*)
       (copy -1)
       (expand "mgu" -1)
       (flatten)
       (hide -1)
       (inst -1
        "union_subs(restriction(sg1!1)(Vars(lhs(e1!1))), restriction(alpha!1)(Vars(ext(rho!1)(lhs(e2!1)))))")
       (("1"
         (expand "member" -1)
         (expand "U" -1)
         (expand "unifier" -1)
         (assert)
         (expand "<=")
         (skosimp*)
         (inst 2 "ext(theta!1)(rhs(e1!1))"
          "replaceTerm(ext(theta!1)(lhs(e1!1)), ext(theta!1)(ext(rho!1)(rhs(e2!1))),p!1)"
          "tau!1")
         (("1"
           (lemma "ext_o")
           (inst -1 "tau!1" "theta!1")
           (decompose-equality -1)
           (split)
           (("1"
             (hide -1)
             (expand "CP?")
             (inst 1 "theta!1" "rho!1" "e1!1" "e2!1" "p!1")
             (assert))
            ("2"
             (inst -1 "rhs(e1!1)")
             (expand "o")
             (replace -1 1 rl)
             (hide -1)
             (replace -1 1 rl)
             (hide -1)
             (lemma "restriction_union")
             (inst -1 "restriction(sg1!1)(Vars(lhs(e1!1)))"
              "restriction(alpha!1)(Vars(ext(rho!1)(lhs(e2!1))))"
              "rhs(e1!1)")
             (("1"
               (lemma "dom_restriction")
               (copy -1)
               (inst -1 "Vars(lhs(e1!1))" "sg1!1")
               (inst -2 "Vars(ext(rho!1)(lhs(e2!1)))" "alpha!1")
               (lemma "IUnion_extra[(V)].disjoint_subset")
               (inst -1 "Dom(restriction(sg1!1)(Vars(lhs(e1!1))))"
                "Vars(lhs(e1!1))"
                "Dom(restriction(alpha!1)(Vars(ext(rho!1)(lhs(e2!1)))))"
                "Vars(ext(rho!1)(lhs(e2!1)))")
               (assert)
               (prop)
               (("1"
                 (replace -1 1)
                 (lemma "restriction_term")
                 (inst?)
                 (prop)
                 (("1" (assert))
                  ("2"
                   (hide-all-but 1)
                   (typepred "e1!1")
                   (expand "rewrite_rule?")
                   (expand* "lhs" "rhs")
                   (prop))))
                ("2"
                 (hide-all-but (-2 -3 -6 1))
                 (lemma "IUnion_extra[(V)].disjoint_subset")
                 (inst -1 "Vars(rhs(e1!1))" "Vars(rhs(e1!1))"
                  "Dom(restriction(alpha!1)(Vars(ext(rho!1)(lhs(e2!1)))))"
                  "Vars(ext(rho!1)(lhs(e2!1)))")
                 (prop)
                 (("1"
                   (hide-all-but 1)
                   (expand* "subset?" "member")
                   (skeep))
                  ("2"
                   (hide-all-but (-3 1))
                   (lemma "IUnion_extra[(V)].disjoint_subset")
                   (inst -1 "Vars(rhs(e1!1))" "Vars(lhs(e1!1))"
                    "Vars(ext(rho!1)(lhs(e2!1)))"
                    "Vars(ext(rho!1)(lhs(e2!1)))")
                   (prop)
                   (("1"
                     (hide (-1 2))
                     (typepred "e1!1")
                     (expand* "rewrite_rule?" "lhs" "rhs")
                     (assert))
                    ("2"
                     (hide (-1 2))
                     (expand* "subset?" "member")
                     (skeep))))))))
              ("2" (rewrite "restriction_Subs"))
              ("3" (rewrite "restriction_Subs"))))
            ("3"
             (lemma "ext_replace_ext")
             (inst?)
             (prop)
             (("1"
               (replaces -1)
               (copy -1)
               (inst -1 "ext(rho!1)(rhs(e2!1))")
               (inst -2 "lhs(e1!1)")
               (expand "o")
               (replace -1 1 rl)
               (replace -2 1 rl)
               (replace -3 1 rl)
               (hide (-1 -2 -3))
               (lemma "restriction_union")
               (copy -1)
               (inst -1 "restriction(sg1!1)(Vars(lhs(e1!1)))"
                "restriction(alpha!1)(Vars(ext(rho!1)(lhs(e2!1))))"
                "lhs(e1!1)")
               (("1"
                 (inst -2
                  "restriction(alpha!1)(Vars(ext(rho!1)(lhs(e2!1))))"
                  "restriction(sg1!1)(Vars(lhs(e1!1)))"
                  "ext(rho!1)(rhs(e2!1))")
                 (("1"
                   (lemma "dom_restriction")
                   (copy -1)
                   (inst -1 "Vars(lhs(e1!1))" "sg1!1")
                   (inst -2 "Vars(ext(rho!1)(lhs(e2!1)))" "alpha!1")
                   (lemma "IUnion_extra[(V)].disjoint_subset")
                   (inst -1 "Dom(restriction(sg1!1)(Vars(lhs(e1!1))))"
                    "Vars(lhs(e1!1))"
                    "Dom(restriction(alpha!1)(Vars(ext(rho!1)(lhs(e2!1)))))"
                    "Vars(ext(rho!1)(lhs(e2!1)))")
                   (assert)
                   (lemma "IUnion_extra[(V)].disjoint_commute")
                   (inst -1 "Dom(restriction(sg1!1)(Vars(lhs(e1!1))))"
                    "Dom(restriction(alpha!1)(Vars(ext(rho!1)(lhs(e2!1)))))")
                   (assert)
                   (prop)
                   (("1"
                     (rewrite "union_commute")
                     (replaces -1)
                     (replaces -1)
                     (lemma "restriction_term")
                     (copy -1)
                     (inst -1 "Vars(ext(rho!1)(lhs(e2!1)))" "alpha!1"
                      "ext(rho!1)(rhs(e2!1))")
                     (inst -2 "Vars(lhs(e1!1))" "sg1!1" "lhs(e1!1)")
                     (prop)
                     (("1"
                       (replace -1 1 rl)
                       (replace -2 1 rl)
                       (rewrite "ext_o")
                       (expand "o")
                       (case-replace
                        "ext(alpha!1)(ext(rho!1)(rhs(e2!1))) = ext(sg2!1)(rhs(e2!1))")
                       (hide-all-but (-10 -12 1))
                       (replaces -1)
                       (lemma "ext_o")
                       (inst -1 "alpha!1" "rho!1")
                       (copy -1)
                       (decompose-equality -1)
                       (decompose-equality -2)
                       (inst -1 "lhs(e2!1)")
                       (inst -2 "rhs(e2!1)")
                       (expand "o")
                       (replace -1 * rl)
                       (replace -2 * rl)
                       (hide (-1 -2))
                       (lemma "same_substitution")
                       (inst -1 "comp(alpha!1, rho!1)" "sg2!1"
                        "lhs(e2!1)")
                       (assert)
                       (lemma "same_term")
                       (inst -1 "comp(alpha!1, rho!1)" "sg2!1"
                        "rhs(e2!1)")
                       (prop)
                       (skosimp*)
                       (hide (-3 2))
                       (inst -2 "x!1")
                       (assert)
                       (hide 1)
                       (typepred "e2!1")
                       (hide -2)
                       (expand "rewrite_rule?")
                       (flatten)
                       (expand* "subset?" "rhs" "lhs")
                       (inst?)
                       (assert))
                      ("2"
                       (hide-all-but 1)
                       (expand* "subset?" "member")
                       (skeep))
                      ("3"
                       (hide-all-but 1)
                       (typepred "e2!1")
                       (expand "rewrite_rule?")
                       (flatten)
                       (lemma "rename_preserv_inclusion")
                       (expand* "rhs" "lhs")
                       (inst?)
                       (assert))
                      ("4"
                       (hide-all-but 1)
                       (expand* "subset?" "member")
                       (skeep))))
                    ("2"
                     (hide-all-but (-4 -8 1))
                     (lemma "IUnion_extra[(V)].disjoint_subset")
                     (case "disjoint?(Vars(lhs(e1!1)), Vars(ext(rho!1)(rhs(e2!1))))")
                     (("1"
                       (inst -2
                        "Dom(restriction(sg1!1)(Vars(lhs(e1!1))))"
                        "Vars(lhs(e1!1))" "Vars(ext(rho!1)(rhs(e2!1)))"
                        "Vars(ext(rho!1)(rhs(e2!1)))")
                       (prop)
                       (("1"
                         (lemma "IUnion_extra[(V)].disjoint_commute")
                         (inst -1
                          "Dom(restriction(sg1!1)(Vars(lhs(e1!1))))"
                          "Vars(ext(rho!1)(rhs(e2!1)))")
                         (assert))
                        ("2"
                         (hide-all-but 1)
                         (expand* "subset?" "member")
                         (skeep))))
                      ("2"
                       (hide-all-but (-1 -3 1))
                       (typepred "e2!1")
                       (expand "rewrite_rule?")
                       (flatten)
                       (expand* "lhs" "rhs")
                       (lemma "rename_preserv_inclusion")
                       (inst -1 "rho!1" "e2!1`1" "e2!1`2")
                       (assert)
                       (inst -4 "Vars(e1!1`1)" "Vars(e1!1`1)"
                        "Vars(ext(rho!1)(e2!1`2))"
                        "Vars(ext(rho!1)(e2!1`1))")
                       (prop)
                       (hide-all-but 1)
                       (expand* "subset?" "member")
                       (skeep))))
                    ("3"
                     (hide-all-but (-5 -8 1))
                     (lemma "IUnion_extra[(V)].disjoint_subset")
                     (inst -1 "Vars(lhs(e1!1))" "Vars(lhs(e1!1))"
                      "Dom(restriction(alpha!1)(Vars(ext(rho!1)(lhs(e2!1)))))"
                      "Vars(ext(rho!1)(lhs(e2!1)))")
                     (prop)
                     (hide-all-but 1)
                     (expand* "subset?" "member")
                     (skeep))
                    ("4"
                     (hide-all-but (-3 -7 1))
                     (lemma "IUnion_extra[(V)].disjoint_subset")
                     (case "disjoint?(Vars(ext(rho!1)(rhs(e2!1))), Vars(lhs(e1!1)))")
                     (("1"
                       (inst -2 "Vars(ext(rho!1)(rhs(e2!1)))"
                        "Vars(ext(rho!1)(rhs(e2!1)))"
                        "Dom(restriction(sg1!1)(Vars(lhs(e1!1))))"
                        "Vars(lhs(e1!1))")
                       (prop)
                       (hide-all-but 1)
                       (expand* "subset?" "member")
                       (skeep))
                      ("2"
                       (hide (-2 2))
                       (typepred "e2!1")
                       (expand "rewrite_rule?")
                       (flatten)
                       (lemma "rename_preserv_inclusion")
                       (inst -1 "rho!1" "e2!1`1" "e2!1`2")
                       (assert)
                       (inst -4 "Vars(e1!1`1)" "Vars(e1!1`1)"
                        "Vars(ext(rho!1)(e2!1`2))"
                        "Vars(ext(rho!1)(e2!1`1))")
                       (prop)
                       (("1"
                         (expand* "rhs" "lhs")
                         (hide-all-but (-1 2))
                         (lemma "IUnion_extra[(V)].disjoint_commute")
                         (inst -1 "Vars(e1!1`1)"
                          "Vars(ext(rho!1)(e2!1`2))")
                         (assert))
                        ("2"
                         (hide-all-but 1)
                         (expand* "subset?" "member")
                         (skeep))
                        ("3" (expand* "rhs" "lhs"))))))))
                  ("2" (hide-all-but 1) (rewrite "restriction_Subs"))
                  ("3" (hide-all-but 1) (rewrite "restriction_Subs"))))
                ("2" (hide-all-but 1) (rewrite "restriction_Subs"))
                ("3" (hide-all-but 1) (rewrite "restriction_Subs"))))
              ("2" (hide-all-but (-7 1)) (rewrite "ext_preserv_pos"))))))
          ("2" (hide-all-but (-6 1)) (rewrite "ext_preserv_pos"))))
        ("2" (hide-all-but 1) (rewrite "restriction_Subs"))
        ("3" (hide-all-but 1) (rewrite "restriction_Subs"))))
      ("2"
       (hide-all-but (-1 1))
       (expand "unifiable")
       (inst 1
        "union_subs((restriction(sg1!1)(Vars(lhs(e1!1))), restriction(alpha!1)(Vars(ext(rho!1)(lhs(e2!1))))))")
       (("1" (expand "unifier") (propax))
        ("2" (hide-all-but 1) (rewrite "restriction_Subs"))
        ("3" (hide-all-but 1) (rewrite "restriction_Subs"))))))
    ("2"
     (hide 3)
     (lemma "restriction_union")
     (inst -1 "restriction(sg1!1)(Vars(lhs(e1!1)))"
      "restriction(alpha!1)(Vars(ext(rho!1)(lhs(e2!1))))"
      "subtermOF(lhs(e1!1), p!1)")
     (("1"
       (lemma "dom_restriction")
       (inst -1 "Vars(lhs(e1!1))" "sg1!1")
       (lemma "IUnion_extra[(V)].disjoint_subset")
       (inst -1 "Dom(restriction(sg1!1)(Vars(lhs(e1!1))))"
        "Vars(lhs(e1!1))"
        "Dom(restriction(alpha!1)(Vars(ext(rho!1)(lhs(e2!1)))))"
        "Vars(ext(rho!1)(lhs(e2!1)))")
       (lemma "dom_restriction")
       (inst -1 "Vars(ext(rho!1)(lhs(e2!1)))" "alpha!1")
       (assert)
       (lemma "IUnion_extra[(V)].disjoint_subset")
       (inst -1 "Vars(lhs(e1!1))" "Vars(lhs(e1!1))"
        "Dom(restriction(alpha!1)(Vars(ext(rho!1)(lhs(e2!1)))))"
        "Vars(ext(rho!1)(lhs(e2!1)))")
       (prop)
       (("1"
         (replaces -1)
         (lemma "restriction_union")
         (inst -1 "restriction(alpha!1)(Vars(ext(rho!1)(lhs(e2!1))))"
          "restriction(sg1!1)(Vars(lhs(e1!1)))" "ext(rho!1)(lhs(e2!1))")
         (("1"
           (lemma "IUnion_extra[(V)].disjoint_commute")
           (inst -1 "Dom(restriction(sg1!1)(Vars(lhs(e1!1))))"
            "Dom(restriction(alpha!1)(Vars(ext(rho!1)(lhs(e2!1)))))")
           (assert)
           (lemma "IUnion_extra[(V)].disjoint_subset")
           (inst -1 "Dom(restriction(sg1!1)(Vars(lhs(e1!1))))"
            "Vars(lhs(e1!1))" "Vars(ext(rho!1)(lhs(e2!1)))"
            "Vars(ext(rho!1)(lhs(e2!1)))")
           (assert)
           (prop)
           (("1"
             (rewrite "union_commute")
             (replaces -1)
             (lemma "restriction_term")
             (inst?)
             (prop)
             (("1"
               (replace -1 1 rl)
               (lemma "restriction_term")
               (inst -1 "Vars(ext(rho!1)(lhs(e2!1)))" "alpha!1"
                "ext(rho!1)(lhs(e2!1))")
               (prop)
               (("1"
                 (replace -1 1 rl)
                 (rewrite "ext_o")
                 (expand "o")
                 (propax))
                ("2"
                 (hide-all-but 1)
                 (expand* "subset?" "member")
                 (skeep))))
              ("2" (hide-all-but 1) (rewrite "vars_subterm"))))
            ("2"
             (hide-all-but (-1 1))
             (rewrite "IUnion_extra[(V)].disjoint_commute"))
            ("3" (hide-all-but 1) (expand* "subset?" "member") (skeep))
            ("4"
             (hide-all-but (-5 -6 1))
             (lemma "IUnion_extra[(V)].disjoint_subset")
             (inst -1 "Dom(restriction(sg1!1)(Vars(lhs(e1!1))))"
              "Vars(lhs(e1!1))" "Vars(ext(rho!1)(lhs(e2!1)))"
              "Vars(ext(rho!1)(lhs(e2!1)))")
             (assert)
             (prop)
             (("1"
               (hide (-2 -3))
               (lemma "IUnion_extra[(V)].disjoint_commute")
               (inst -1 "Dom(restriction(sg1!1)(Vars(lhs(e1!1))))"
                "Vars(ext(rho!1)(lhs(e2!1)))")
               (assert))
              ("2"
               (hide (-1 -2 2))
               (expand* "subset?" "member")
               (skeep))))))
          ("2" (hide-all-but 1) (rewrite "restriction_Subs"))))
        ("2"
         (hide-all-but (-1 1))
         (lemma "vars_subterm")
         (inst?)
         (assert)
         (lemma "IUnion_extra[(V)].disjoint_subset")
         (inst -1 "Vars(subtermOF(lhs(e1!1), p!1))" "Vars(lhs(e1!1))"
          "Dom(restriction(alpha!1)(Vars(ext(rho!1)(lhs(e2!1)))))"
          "Dom(restriction(alpha!1)(Vars(ext(rho!1)(lhs(e2!1)))))")
         (prop)
         (hide-all-but 1)
         (expand* "subset?" "member")
         (skeep))
        ("3" (hide-all-but 1) (expand* "subset?" "member") (skeep))
        ("4"
         (hide-all-but (-1 -4 1))
         (lemma "IUnion_extra[(V)].disjoint_subset")
         (inst -1
          "Dom(restriction(alpha!1)(Vars(ext(rho!1)(lhs(e2!1)))))"
          "Vars(ext(rho!1)(lhs(e2!1)))" "Vars(lhs(e1!1))"
          "Vars(lhs(e1!1))")
         (lemma "IUnion_extra[(V)].disjoint_commute")
         (inst?)
         (assert)
         (prop)
         (("1"
           (hide (-2 -3 -4))
           (lemma "vars_subterm")
           (inst?)
           (assert)
           (lemma "IUnion_extra[(V)].disjoint_subset")
           (inst -1 "Vars(subtermOF(lhs(e1!1), p!1))" "Vars(lhs(e1!1))"
            "Dom(restriction(alpha!1)(Vars(ext(rho!1)(lhs(e2!1)))))"
            "Dom(restriction(alpha!1)(Vars(ext(rho!1)(lhs(e2!1)))))")
           (prop)
           (("1" (hide-all-but 1) (expand* "subset?" "member") (skeep))
            ("2"
             (hide (-1 2))
             (lemma "IUnion_extra[(V)].disjoint_commute")
             (inst?)
             (assert))))
          ("2" (hide-all-but 1) (expand* "subset?" "member") (skeep))))))
      ("2" (hide-all-but 1) (rewrite "restriction_Subs"))
      ("3" (hide-all-but 1) (rewrite "restriction_Subs"))))
    ("3"
     (hide-all-but 1)
     (rewrite "union_is_sub")
     (("1" (hide 2) (rewrite "restriction_Subs"))
      ("2" (hide 2) (rewrite "restriction_Subs"))))
    ("4"
     (hide-all-but (-1 1))
     (expand "disjoint_D?")
     (lemma "dom_restriction")
     (copy -1)
     (inst -1 "Vars(lhs(e1!1))" "sg1!1")
     (inst -2 "Vars(ext(rho!1)(lhs(e2!1)))" "alpha!1")
     (lemma "IUnion_extra[(V)].disjoint_subset")
     (inst -1 "Dom(restriction(sg1!1)(Vars(lhs(e1!1))))"
      "Vars(lhs(e1!1))"
      "Dom(restriction(alpha!1)(Vars(ext(rho!1)(lhs(e2!1)))))"
      "Vars(ext(rho!1)(lhs(e2!1)))")
     (assert))
    ("5" (hide-all-but 1) (rewrite "restriction_Subs"))
    ("6" (hide-all-but 1) (rewrite "restriction_Subs"))))


proof_type: f_proof
decl_type: formula
library: TRS
theory: critical_pairs
signature: nil
run_date: Unknown date
run_time: ----
status: proved-incomplete
description: nil
script:
  (""
   (skolem 1 ("R" "t" "x" "sg1" "sg2"))
   (skoletin* 1)
   (flatten)
   (split)
   (("1"
     (case "length(seqv) = 0")
     (("1" (hide-all-but (-1 1)) (grind))
      ("2"
       (skosimp*)
       (lemma "CP_lemma_aux2c")
       (inst -1 "R" "t" "x" "sg1" "sg2" "seqv")
       (("1"
         (assert)
         (lemma "CP_lemma_aux2d")
         (inst -1 "R" "t" "x" "sg1" "sg2")
         (assert)
         (replace -6 -1 rl)
         (replace -5 -1 rl)
         (replaces -1)
         (prop)
         (("1"
           (inst?)
           (expand "finseq_appl")
           (expand* "RTC" "IUnion")
           (inst 2 "length(seqv) - 1"))
          ("2"
           (skosimp*)
           (expand "finseq_appl")
           (lemma "set2seq_lem[position]")
           (inst -1 "Posv")
           (assert)
           (inst?)
           (("1"
             (expand "finseq_appl")
             (replaces -5 -1)
             (expand "Pos_var" -1 1)
             (expand "extend")
             (propax))
            ("2"
             (typepred "i!2")
             (replaces -4)
             (rewrite "set2seq_length"))))))
        ("2"
         (hide 3)
         (expand "SPP?")
         (split)
         (("1" (lemma "pos_occ_var_HAStypePP") (inst?) (assert))
          ("2" (lemma "pos_occ_var_HAStypeSP") (inst?) (assert))))))))
    ("2"
     (lemma "CP_lemma_aux2b")
     (expand "finseq_appl")
     (inst?)
     (inst?)
     (inst?)
     (("1"
       (assert)
       (prop)
       (("1"
         (lemma "CP_lemma_aux2d")
         (inst?)
         (inst?)
         (assert)
         (expand* "RTC" "IUnion")
         (inst 1 "length(seqv)")
         (assert))
        ("2"
         (hide 2)
         (skosimp*)
         (lemma "set2seq_lem[position]")
         (inst?)
         (assert)
         (inst?)
         (("1"
           (expand "finseq_appl")
           (replaces -5)
           (expand "Pos_var" -1 1)
           (expand "extend")
           (propax))
          ("2"
           (typepred "i!1")
           (replaces -4)
           (rewrite "set2seq_length"))))))
      ("2"
       (hide 2)
       (expand "SPP?")
       (split)
       (("1" (lemma "pos_occ_var_HAStypePP") (inst?) (assert))
        ("2" (lemma "pos_occ_var_HAStypeSP") (inst?) (assert))))))))


proof_type: f_proof
decl_type: formula
library: TRS
theory: critical_pairs
signature: nil
run_date: Unknown date
run_time: ----
status: proved-incomplete
description: nil
script:
  (""
   (skeep)
   (skoletin* 1)
   (hide -1)
   (split)
   (("1"
     (flatten)
     (skeep)
     (expand "CP?")
     (skosimp*)
     (expand "locally_confluent?")
     (inst -1 "ext(sigma!1)(lhs(e1!1))" "t1" "t2")
     (assert)
     (hide-all-but (-2 -3 -4 1))
     (expand "RRE")
     (expand "reduction?")
     (split)
     (("1"
       (inst 1 "e1!1" "sigma!1" "empty_seq")
       (("1"
         (split)
         (("1"
           (expand "subtermOF" 1)
           (lift-if)
           (prop)
           (rewrite "empty_0"))
          ("2"
           (expand "replaceTerm" 1)
           (lift-if)
           (prop)
           (rewrite "empty_0"))))
        ("2" (expand "positionsOF") (lift-if) (grind))))
      ("2"
       (inst 1 "e2p!1" "comp(sigma!1, rho!1)" "p!1")
       (("1"
         (rewrite "ext_o")
         (expand "o")
         (expand* "mgu" "member" "U" "unifier")
         (flatten)
         (lemma "subterm_ext_commute")
         (inst -1 "p!1" "lhs(e1!1)" "sigma!1")
         (typepred "p!1")
         (assert))
        ("2" (rewrite "subs_o"))))))
    ("2"
     (flatten)
     (expand "locally_confluent?")
     (skeep)
     (expand "RRE")
     (expand "reduction?" (-2 -3))
     (skosimp*)
     (case "parallel(p!1, p!2)")
     (("1"
       (hide -2)
       (expand "joinable?")
       (inst 1 "replaceTerm(y, ext(sigma!2)(rhs(e!2)), p!2)")
       (("1"
         (expand* "RTC" "IUnion")
         (split)
         (("1"
           (inst 1 "1")
           (rewrite "iterate_1")
           (expand "reduction?")
           (inst 1 "e!2" "sigma!2" "p!2")
           (("1"
             (lemma "replace_persistence")
             (inst -1 "p!1" "p!2" "x" "ext(sigma!1)(rhs(e!1))")
             (assert))
            ("2"
             (lemma "replace_preserv_parallel_pos")
             (inst?)
             (inst -1 "p!2")
             (assert))))
          ("2"
           (inst 1 "1")
           (rewrite "iterate_1")
           (expand "reduction?")
           (inst 1 "e!1" "sigma!1" "p!1")
           (("1"
             (split)
             (("1"
               (lemma "replace_persistence")
               (inst -1 "p!2" "p!1" "x" "ext(sigma!2)(rhs(e!2))")
               (assert)
               (rewrite "parallel_comm"))
              ("2"
               (lemma "replace_commutativity")
               (inst -1 "p!1" "p!2" "ext(sigma!2)(rhs(e!2))" "x"
                "ext(sigma!1)(rhs(e!1))")
               (assert))))
            ("2"
             (lemma "replace_preserv_parallel_pos")
             (inst -1 "p!2" "p!1" "x" "ext(sigma!2)(rhs(e!2))")
             (assert)
             (rewrite "parallel_comm"))))))
        ("2"
         (lemma "replace_preserv_parallel_pos")
         (inst?)
         (inst -1 "p!2")
         (assert))))
      ("2"
       (expand "parallel")
       (expand "<=")
       (prop)
       (("1"
         (skosimp*)
         (lemma "replace_distributivity")
         (inst?)
         (inst -1 "x" "ext(sigma!2)(rhs(e!2))")
         (replace -2 -1 rl)
         (typepred "p!2")
         (assert)
         (replace -8 -2 rl)
         (replace -5 -2)
         (lemma "pos_subterm")
         (inst?)
         (inst -1 "x")
         (replace -4 -1 rl)
         (assert)
         (replace -6 -1)
         (replace -1 -8)
         (lemma "pos_subterm_ax")
         (inst -1 "p!1" "p1!1" "x")
         (replace -5 -3)
         (assert)
         (replace -7 -1)
         (lemma "positions_of_ext")
         (inst -1 "sigma!1" "lhs(e!1)")
         (decompose-equality -1)
         (inst -1 "p1!1")
         (iff)
         (flatten)
         (hide -2)
         (assert)
         (expand* "union" "member")
         (prop)
         (("1"
           (lemma "subterm_ext_commute")
           (inst -1 "p1!1" "lhs(e!1)" "sigma!1")
           (assert)
           (replaces -1)
           (lemma "CP_lemma_aux1")
           (inst -1 "sigma!1" "sigma!2" "E" "p1!1" "(lhs(e!1), rhs(e!1))"
            "(lhs(e!2), rhs(e!2))")
           (("1"
             (expand* "lhs" "rhs")
             (assert)
             (skosimp*)
             (inst -10 "t1!1" "t2!1")
             (assert)
             (replace -8 -3 rl)
             (expand "joinable?")
             (skolem -10 "M")
             (lemma "reduction_is_subs_op")
             (inst?)
             (flatten)
             (lemma "closure_close_subs")
             (inst?)
             (assert)
             (flatten)
             (hide (-1 -3 -4))
             (expand "close_subs?")
             (copy -1)
             (inst -1 "t1!1" "M" "delta!1")
             (inst -2 "t2!1" "M" "delta!1")
             (assert)
             (replaces -5)
             (replaces -5)
             (lemma "comp_op_iff_comp_cont")
             (inst?)
             (assert)
             (lemma "closure_comp_cont")
             (inst?)
             (assert)
             (flatten)
             (hide (-1 -3 -4 -7))
             (copy -1)
             (expand "comp_cont?")
             (inst -1 "p!1" "x")
             (assert)
             (inst -2 "p!1" "x")
             (assert)
             (inst -1 "ext(sigma!1)(e!1`2)" "ext(delta!1)(M)")
             (inst -2 "subtermOF(z, p!1)" "ext(delta!1)(M)")
             (assert)
             (lemma "replace_associativity")
             (inst -1 "p!1" "p1!1" "ext(sigma!2)(e!2`2)" "x"
              "ext(sigma!1)(e!1`1)")
             (assert)
             (replace -12 -1 rl)
             (replace -11 -1 rl)
             (replace -15 -1 rl)
             (rewrite "replace_subterm_of_term")
             (replace -18 -1 rl)
             (replace -1 -3 rl)
             (replace -16 -2 rl)
             (hide-all-but (-2 -3 2))
             (inst 1 "replaceTerm(x, ext(delta!1)(M), p!1)")
             (assert))
            ("2"
             (typepred "e!2")
             (hide-all-but (-1 -2 1))
             (expand* "lhs" "rhs" "member" "rewrite_rule?")
             (prop)
             (hide-all-but (-2 1))
             (case-replace "(e!2) = (e!2`1, e!2`2)" :hide? t)
             (("1" (assert)) ("2" (decompose-equality 1))))
            ("3"
             (typepred "e!1")
             (hide-all-but (-1 -2 1))
             (expand* "lhs" "rhs" "member" "rewrite_rule?")
             (case-replace "(e!1) = (e!1`1, e!1`2)" :hide? t)
             (("1" (assert)) ("2" (decompose-equality 1))))))
          ("2"
           (skosimp*)
           (name-replace "w" "subtermOF(lhs(e!1), p1!2)" :hide? nil)
           (lemma "CP_lemma_aux2")
           (inst -1 "reduction?(E)" "lhs(e!1)" "w" "sigma!1"
            "SigmaP(sigma!1, ext(sigma!2)(rhs(e!2)), w, p2!1)")
           (("1"
             (skoletin* -1 :old? t)
             (prop)
             (("1"
               (hide -2)
               (lemma "set2seq_exists[position]")
               (inst -1 "Posv" "p1!2")
               (replace -3 -1 rl)
               (assert)
               (prop)
               (("1"
                 (skosimp*)
                 (expand "finseq_appl")
                 (inst -2 "ii!1")
                 (replace -1 -2)
                 (hide (-1 -3 -4))
                 (lemma "CP_lemma_aux2")
                 (inst -1 "reduction?(E)" "rhs(e!1)" "w" "sigma!1"
                  "SigmaP(sigma!1, ext(sigma!2)(rhs(e!2)), w, p2!1)")
                 (lemma "set2seq_exists[position]")
                 (inst -1 "Posv" "p1!2")
                 (("1"
                   (assert)
                   (hide -1)
                   (prop)
                   (("1"
                     (hide -1)
                     (name-replace "SIGMAp"
                      "SigmaP(sigma!1, ext(sigma!2)(rhs(e!2)), w, p2!1)")
                     (case "length( #(p1!2)) = 0")
                     (("1" (hide-all-but -1) (grind))
                      ("2"
                       (expand "replace_pos" -2)
                       (assert)
                       (expand "replace_pos" -2)
                       (case "length(rest( #(p1!2))) = 0")
                       (("1"
                         (assert)
                         (hide -1)
                         (expand "SIGMAp" -2 1)
                         (expand "ext" -2 2)
                         (expand "SigmaP" -2 1)
                         (lemma "gen_seq_lem[position]")
                         (inst?)
                         (expand "finseq_appl")
                         (replaces -1)
                         (expand "ext" -7)
                         (lemma "ext_preserv_pos")
                         (inst -1 "p1!2" "lhs(e!1)" "sigma!1")
                         (assert)
                         (lemma "subterm_ext_commute")
                         (inst -1 "p1!2" "lhs(e!1)" "sigma!1")
                         (assert)
                         (replaces -5 -1)
                         (expand "ext" -1 2)
                         (lemma "replace_subterm_of_term")
                         (inst -1 "p1!2" "ext(sigma!1)(lhs(e!1))")
                         (assert)
                         (replaces -2 -1)
                         (lemma "replace_associativity")
                         (inst -1 "p1!2" "p2!1" "ext(sigma!2)(rhs(e!2))"
                          "ext(sigma!1)(lhs(e!1))" "sigma!1(w)")
                         (assert)
                         (replaces -2 -1)
                         (replace -5 -1 rl)
                         (replace -1 -4 rl)
                         (hide -1)
                         (replace -11 -3 rl)
                         (case "RTC(reduction?(E))(subtermOF(z, p!1), ext(SIGMAp)(rhs(e!1)))")
                         (("1"
                           (hide -4)
                           (lemma "reduction_is_subs_op")
                           (inst?)
                           (flatten)
                           (lemma "comp_op_iff_comp_cont")
                           (inst?)
                           (assert)
                           (lemma "closure_comp_cont")
                           (inst?)
                           (assert)
                           (flatten)
                           (hide (-1 -3 -4 -5 -6))
                           (copy -1)
                           (expand "comp_cont?")
                           (inst -1 "p!1" "x")
                           (assert)
                           (inst -2 "p!1" "x")
                           (assert)
                           (inst -1 "ext(sigma!1)(e!1`2)"
                            "ext(SIGMAp)(rhs(e!1))")
                           (inst -2 "subtermOF(z, p!1)"
                            "ext(SIGMAp)(rhs(e!1))")
                           (expand* "rhs" "lhs")
                           (assert)
                           (lemma "replace_associativity")
                           (inst -1 "p!1" "p1!1" "ext(sigma!2)(e!2`2)"
                            "x" "ext(sigma!1)(e!1`1)")
                           (assert)
                           (replace -14 -1 rl)
                           (replace -15 -1 rl)
                           (replace -17 -1 rl)
                           (rewrite "replace_subterm_of_term")
                           (replace -1 -3 rl)
                           (replace -20 -3 rl)
                           (replace -18 -2 rl)
                           (hide-all-but (-2 -3 2))
                           (expand "joinable?")
                           (inst 1
                            "replaceTerm(x, ext(SIGMAp)(e!1`2), p!1)")
                           (assert))
                          ("2"
                           (hide-all-but (-3 1))
                           (lemma "reduction_is_subs_op")
                           (inst?)
                           (flatten)
                           (hide -2)
                           (lemma "lhs_reduces_to_rhs")
                           (inst?)
                           (expand "close_subs?")
                           (inst -2 "lhs(e!1)" "rhs(e!1)" "SIGMAp")
                           (assert)
                           (expand "RTC")
                           (expand "IUnion")
                           (skosimp*)
                           (inst 1 "i!1 + 1")
                           (expand "iterate" 1)
                           (expand "o")
                           (inst 1 "ext(SIGMAp)(lhs(e!1))")
                           (assert))))
                        ("2" (hide-all-but 1) (grind))))))
                    ("2"
                     (hide-all-but 1)
                     (lemma "reduction_is_subs_op")
                     (inst?)
                     (flatten)
                     (lemma "comp_op_iff_comp_cont")
                     (inst?)
                     (assert))
                    ("3"
                     (hide-all-but (-2 -3 -4 -5 -6 -7 -8 -9 -11 -15 1))
                     (lemma "subterm_of_ext")
                     (inst -1 "p1!2" "p2!1" "sigma!1" "lhs(e!1)")
                     (replace -2 -1)
                     (expand "ext" -1 (1 3))
                     (expand "ext" -6)
                     (assert)
                     (replace -3 -1 rl)
                     (replace -11 -1)
                     (lemma "lhs_reduces_to_rhs")
                     (inst?)
                     (lemma "reduction_is_subs_op")
                     (inst?)
                     (flatten)
                     (lemma "comp_op_iff_comp_cont")
                     (inst?)
                     (assert)
                     (expand "close_subs?")
                     (inst -2 "lhs(e!2)" "rhs(e!2)" "sigma!2")
                     (assert)
                     (replaces -5)
                     (hide (-1 -3 -4))
                     (lemma "SigmaP_is_RSigma")
                     (inst?)
                     (assert))))
                  ("2"
                   (hide-all-but 1)
                   (expand "Posv")
                   (lemma "Pos_var_is_finite")
                   (inst?)
                   (assert))))
                ("2"
                 (hide-all-but (-4 -6 -7 1))
                 (expand "Posv")
                 (lemma "no_empty_set_positions")
                 (inst?)
                 (grind))))
              ("2"
               (hide-all-but 1)
               (lemma "reduction_is_subs_op")
               (inst?)
               (flatten)
               (lemma "comp_op_iff_comp_cont")
               (inst?)
               (assert))
              ("3"
               (hide-all-but (-3 -4 -5 -6 -7 -8 -9 -10 -12 -16 1))
               (lemma "subterm_of_ext")
               (inst -1 "p1!2" "p2!1" "sigma!1" "lhs(e!1)")
               (replace -2 -1)
               (expand "ext" -1 (1 3))
               (expand "ext" -6)
               (assert)
               (assert)
               (replace -3 -1 rl)
               (replace -11 -1)
               (lemma "lhs_reduces_to_rhs")
               (inst?)
               (lemma "reduction_is_subs_op")
               (inst?)
               (flatten)
               (lemma "comp_op_iff_comp_cont")
               (inst?)
               (assert)
               (expand "close_subs?")
               (inst -2 "lhs(e!2)" "rhs(e!2)" "sigma!2")
               (assert)
               (replaces -5)
               (hide (-1 -3 -4))
               (lemma "SigmaP_is_RSigma")
               (inst?)
               (assert))))
            ("2"
             (hide-all-but (-5 -4 1))
             (expand "ext" -2)
             (assert)
             (rewrite "SigmaP_Subs"))
            ("3" (hide-all-but (-5 -4 1)) (expand "ext" -2) (assert))
            ("4" (expand "V") (propax))))))
        ("2"
         (skosimp*)
         (lemma "replace_distributivity")
         (inst?)
         (inst -1 "x" "ext(sigma!1)(rhs(e!1))")
         (replace -2 -1 rl)
         (typepred "p!1")
         (assert)
         (replace -6 -2 rl)
         (replace -7 -2)
         (lemma "pos_subterm")
         (inst?)
         (inst -1 "x")
         (replace -4 -1 rl)
         (assert)
         (replace -8 -1)
         (replace -1 -6)
         (lemma "pos_subterm_ax")
         (inst -1 "p!2" "p1!1" "x")
         (replace -5 -3)
         (assert)
         (replace -9 -1)
         (lemma "positions_of_ext")
         (inst -1 "sigma!2" "lhs(e!2)")
         (decompose-equality -1)
         (inst -1 "p1!1")
         (iff)
         (flatten)
         (hide -2)
         (assert)
         (expand* "union" "member")
         (prop)
         (("1"
           (lemma "subterm_ext_commute")
           (inst -1 "p1!1" "lhs(e!2)" "sigma!2")
           (assert)
           (replaces -1)
           (lemma "CP_lemma_aux1")
           (inst -1 "sigma!2" "sigma!1" "E" "p1!1" "(lhs(e!2), rhs(e!2))"
            "(lhs(e!1), rhs(e!1))")
           (("1"
             (expand* "lhs" "rhs")
             (assert)
             (skosimp*)
             (inst -10 "t1!1" "t2!1")
             (assert)
             (replace -8 -3 rl)
             (expand "joinable?")
             (skolem -10 "M")
             (lemma "reduction_is_subs_op")
             (inst?)
             (flatten)
             (lemma "closure_close_subs")
             (inst?)
             (assert)
             (flatten)
             (hide (-1 -3 -4))
             (expand "close_subs?")
             (copy -1)
             (inst -1 "t1!1" "M" "delta!1")
             (inst -2 "t2!1" "M" "delta!1")
             (assert)
             (replaces -5)
             (replaces -5)
             (lemma "comp_op_iff_comp_cont")
             (inst?)
             (assert)
             (lemma "closure_comp_cont")
             (inst?)
             (assert)
             (flatten)
             (hide (-1 -3 -4 -7))
             (copy -1)
             (expand "comp_cont?")
             (inst -1 "p!2" "x")
             (assert)
             (inst -2 "p!2" "x")
             (assert)
             (inst -1 "ext(sigma!2)(e!2`2)" "ext(delta!1)(M)")
             (inst -2 "subtermOF(y, p!2)" "ext(delta!1)(M)")
             (assert)
             (lemma "replace_associativity")
             (inst -1 "p!2" "p1!1" "ext(sigma!1)(e!1`2)" "x"
              "ext(sigma!2)(e!2`1)")
             (assert)
             (replace -12 -1 rl)
             (replace -11 -1 rl)
             (replace -17 -1 rl)
             (rewrite "replace_subterm_of_term")
             (replace -16 -1 rl)
             (replace -1 -3 rl)
             (replace -18 -2 rl)
             (hide-all-but (-2 -3 2))
             (inst 1 "replaceTerm(x, ext(delta!1)(M), p!2)")
             (assert))
            ("2"
             (typepred "e!1")
             (hide-all-but (-1 -2 1))
             (expand* "lhs" "rhs" "member" "rewrite_rule?")
             (prop)
             (hide-all-but (-2 1))
             (case-replace "e!1 = (e!1`1, e!1`2)" :hide? t)
             (("1" (assert)) ("2" (decompose-equality 1))))
            ("3"
             (typepred "e!2")
             (hide-all-but (-1 -2 1))
             (expand* "lhs" "rhs" "member" "rewrite_rule?")
             (case-replace "e!2 = (e!2`1, e!2`2)" :hide? t)
             (("1" (assert)) ("2" (decompose-equality 1))))))
          ("2"
           (skosimp*)
           (name-replace "w" "subtermOF(lhs(e!2), p1!2)" :hide? nil)
           (lemma "CP_lemma_aux2")
           (inst -1 "reduction?(E)" "lhs(e!2)" "w" "sigma!2"
            "SigmaP(sigma!2, ext(sigma!1)(rhs(e!1)), w, p2!1)")
           (("1"
             (skoletin* -1 :old? t)
             (prop)
             (("1"
               (hide -2)
               (lemma "set2seq_exists[position]")
               (inst -1 "Posv" "p1!2")
               (replace -3 -1 rl)
               (assert)
               (prop)
               (("1"
                 (skosimp*)
                 (expand "finseq_appl")
                 (inst -2 "ii!1")
                 (replace -1 -2)
                 (hide (-1 -3 -4))
                 (lemma "CP_lemma_aux2")
                 (inst -1 "reduction?(E)" "rhs(e!2)" "w" "sigma!2"
                  "SigmaP(sigma!2, ext(sigma!1)(rhs(e!1)), w, p2!1)")
                 (lemma "set2seq_exists[position]")
                 (inst -1 "Posv" "p1!2")
                 (("1"
                   (assert)
                   (hide -1)
                   (prop)
                   (("1"
                     (hide -1)
                     (name-replace "SIGMAp"
                      "SigmaP(sigma!2, ext(sigma!1)(rhs(e!1)), w, p2!1)")
                     (case "length( #(p1!2)) = 0")
                     (("1" (hide-all-but -1) (grind))
                      ("2"
                       (expand "replace_pos" -2)
                       (assert)
                       (expand "replace_pos" -2)
                       (case "length(rest( #(p1!2))) = 0")
                       (("1"
                         (assert)
                         (hide -1)
                         (expand "SIGMAp" -2 1)
                         (expand "ext" -2 2)
                         (expand "SigmaP" -2 1)
                         (lemma "gen_seq_lem[position]")
                         (inst?)
                         (expand "finseq_appl")
                         (replaces -1)
                         (expand "ext" -7)
                         (lemma "ext_preserv_pos")
                         (inst -1 "p1!2" "lhs(e!2)" "sigma!2")
                         (assert)
                         (lemma "subterm_ext_commute")
                         (inst -1 "p1!2" "lhs(e!2)" "sigma!2")
                         (assert)
                         (replaces -5 -1)
                         (expand "ext" -1 2)
                         (lemma "replace_subterm_of_term")
                         (inst -1 "p1!2" "ext(sigma!2)(lhs(e!2))")
                         (assert)
                         (replaces -2 -1)
                         (lemma "replace_associativity")
                         (inst -1 "p1!2" "p2!1" "ext(sigma!1)(rhs(e!1))"
                          "ext(sigma!2)(lhs(e!2))" "sigma!2(w)")
                         (assert)
                         (replaces -2 -1)
                         (replace -5 -1 rl)
                         (replace -1 -4 rl)
                         (hide -1)
                         (replace -11 -3 rl)
                         (case "RTC(reduction?(E))(subtermOF(y, p!2), ext(SIGMAp)(rhs(e!2)))")
                         (("1"
                           (hide -4)
                           (lemma "reduction_is_subs_op")
                           (inst?)
                           (flatten)
                           (lemma "comp_op_iff_comp_cont")
                           (inst?)
                           (assert)
                           (lemma "closure_comp_cont")
                           (inst?)
                           (assert)
                           (flatten)
                           (hide (-1 -3 -4 -5 -6))
                           (copy -1)
                           (expand "comp_cont?")
                           (inst -1 "p!2" "x")
                           (assert)
                           (inst -2 "p!2" "x")
                           (assert)
                           (inst -1 "ext(sigma!2)(e!2`2)"
                            "ext(SIGMAp)(rhs(e!2))")
                           (inst -2 "subtermOF(y, p!2)"
                            "ext(SIGMAp)(rhs(e!2))")
                           (expand* "rhs" "lhs")
                           (assert)
                           (lemma "replace_associativity")
                           (inst -1 "p!2" "p1!1" "ext(sigma!1)(e!1`2)"
                            "x" "ext(sigma!2)(e!2`1)")
                           (assert)
                           (replace -14 -1 rl)
                           (replace -15 -1 rl)
                           (replace -19 -1 rl)
                           (rewrite "replace_subterm_of_term")
                           (replace -1 -3 rl)
                           (replace -20 -2 rl)
                           (replace -18 -3 rl)
                           (hide-all-but (-2 -3 2))
                           (expand "joinable?")
                           (inst 1
                            "replaceTerm(x, ext(SIGMAp)(e!2`2), p!2)")
                           (assert))
                          ("2"
                           (hide-all-but (-3 1))
                           (lemma "reduction_is_subs_op")
                           (inst?)
                           (flatten)
                           (hide -2)
                           (lemma "lhs_reduces_to_rhs")
                           (inst?)
                           (expand "close_subs?")
                           (inst -2 "lhs(e!2)" "rhs(e!2)" "SIGMAp")
                           (assert)
                           (expand "RTC")
                           (expand "IUnion")
                           (skosimp*)
                           (inst 1 "i!1 + 1")
                           (expand "iterate" 1)
                           (expand "o")
                           (inst 1 "ext(SIGMAp)(lhs(e!2))")
                           (assert))))
                        ("2" (hide-all-but 1) (grind))))))
                    ("2"
                     (hide-all-but 1)
                     (lemma "reduction_is_subs_op")
                     (inst?)
                     (flatten)
                     (lemma "comp_op_iff_comp_cont")
                     (inst?)
                     (assert))
                    ("3"
                     (hide-all-but
                      (-2 -3 -4 -5 -6 -7 -8 -9 -3 -11 -13 -15 1))
                     (lemma "subterm_of_ext")
                     (inst -1 "p1!2" "p2!1" "sigma!2" "lhs(e!2)")
                     (replace -2 -1)
                     (expand "ext" -1 (1 3))
                     (expand "ext" -6)
                     (assert)
                     (replace -3 -1 rl)
                     (replace -11 -1)
                     (lemma "lhs_reduces_to_rhs")
                     (inst?)
                     (lemma "reduction_is_subs_op")
                     (inst?)
                     (flatten)
                     (lemma "comp_op_iff_comp_cont")
                     (inst?)
                     (assert)
                     (expand "close_subs?")
                     (inst -2 "lhs(e!1)" "rhs(e!1)" "sigma!1")
                     (assert)
                     (replaces -5)
                     (hide (-1 -3 -4))
                     (lemma "SigmaP_is_RSigma")
                     (inst?)
                     (assert))))
                  ("2"
                   (hide-all-but 1)
                   (expand "Posv")
                   (lemma "Pos_var_is_finite")
                   (inst?)
                   (assert))))
                ("2"
                 (hide-all-but (-4 -6 -7 1))
                 (expand "Posv")
                 (lemma "no_empty_set_positions")
                 (inst?)
                 (grind))))
              ("2"
               (hide-all-but 1)
               (lemma "reduction_is_subs_op")
               (inst?)
               (flatten)
               (lemma "comp_op_iff_comp_cont")
               (inst?)
               (assert))
              ("3"
               (hide (-1 -2 -11 -13 -15 -17))
               (lemma "subterm_of_ext")
               (inst -1 "p1!2" "p2!1" "sigma!2" "lhs(e!2)")
               (replace -2 -1)
               (expand "ext" -1 (1 3))
               (expand "ext" -6)
               (assert)
               (assert)
               (replace -3 -1 rl)
               (replace -11 -1)
               (lemma "lhs_reduces_to_rhs")
               (inst?)
               (lemma "reduction_is_subs_op")
               (inst?)
               (flatten)
               (lemma "comp_op_iff_comp_cont")
               (inst?)
               (assert)
               (expand "close_subs?")
               (inst -2 "lhs(e!1)" "rhs(e!1)" "sigma!1")
               (assert)
               (replaces -5)
               (hide (-1 -3 -4))
               (lemma "SigmaP_is_RSigma")
               (inst?)
               (assert))))
            ("2"
             (hide-all-but (-5 -4 1))
             (expand "ext" -2)
             (assert)
             (rewrite "SigmaP_Subs"))
            ("3" (hide-all-but (-5 -4 1)) (expand "ext" -2) (assert))
            ("4" (expand "V") (propax))))))))))))


proof_type: t_proof
decl_type: tcc
library: TRS
theory: critical_pairs
signature: nil
run_date: Unknown date
run_time: ----
status: proved-incomplete
description: nil
script:
  (""
   (skosimp*)
   (hide (-2 -3))
   (expand "SPP?")
   (split)
   (("1" (grind))
    ("2"
     (expand "SP?")
     (skosimp*)
     (expand* "#" "finseq_appl")
     (rewrite "ext_preserv_pos")
     (hide 2)
     (lemma "set2seq_lem[position]")
     (inst?)
     (assert)
     (replaces -2)
     (inst?)
     (expand "finseq_appl")
     (expand "Pos_var" -1 1)
     (expand "extend")
     (propax))))


proof_type: f_proof
decl_type: formula
library: TRS
theory: orthogonality
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp*)
   (lemma "CP_lemma_aux1a")
   (inst?)
   (assert)
   (skosimp*)
   (case "ext(union_subs((restriction(sg1!1)(Vars(lhs(e1!1))), restriction(alpha!1)(Vars(ext(rho!1)(lhs(e2!1)))))))(subtermOF(lhs(e1!1), p!1)) = ext(union_subs((restriction(sg1!1)(Vars(lhs(e1!1))), restriction(alpha!1)(Vars(ext(rho!1)(lhs(e2!1)))))))(ext(rho!1)(lhs(e2!1)))")
   (("1"
     (lemma "unification")
     (inst -1 "subtermOF(lhs(e1!1), p!1)" "ext(rho!1)(lhs(e2!1))")
     (hide 2)
     (prop)
     (("1"
       (skosimp*)
       (copy -1)
       (expand "mgu" -1)
       (flatten)
       (hide -1)
       (inst -1
        "union_subs(restriction(sg1!1)(Vars(lhs(e1!1))), restriction(alpha!1)(Vars(ext(rho!1)(lhs(e2!1)))))")
       (("1"
         (expand "member" -1)
         (expand "U" -1)
         (expand "unifier" -1)
         (assert)
         (expand "<=")
         (skosimp*)
         (inst 2 "ext(theta!1)(rhs(e1!1))"
          "replaceTerm(ext(theta!1)(lhs(e1!1)), ext(theta!1)(ext(rho!1)(rhs(e2!1))),p!1)"
          "tau!1")
         (("1"
           (lemma "ext_o")
           (inst -1 "tau!1" "theta!1")
           (decompose-equality -1)
           (split)
           (("1"
             (hide -1)
             (expand "ntCP?")
             (inst 1 "theta!1" "rho!1" "e1!1" "e2!1" "p!1")
             (assert)
             (reveal 3)
             (propax))
            ("2"
             (inst -1 "rhs(e1!1)")
             (expand "o")
             (replace -1 1 rl)
             (hide -1)
             (replace -1 1 rl)
             (hide -1)
             (lemma "restriction_union")
             (inst -1 "restriction(sg1!1)(Vars(lhs(e1!1)))"
              "restriction(alpha!1)(Vars(ext(rho!1)(lhs(e2!1))))"
              "rhs(e1!1)")
             (("1"
               (lemma "dom_restriction")
               (copy -1)
               (inst -1 "Vars(lhs(e1!1))" "sg1!1")
               (inst -2 "Vars(ext(rho!1)(lhs(e2!1)))" "alpha!1")
               (lemma "IUnion_extra[(V)].disjoint_subset")
               (inst -1 "Dom(restriction(sg1!1)(Vars(lhs(e1!1))))"
                "Vars(lhs(e1!1))"
                "Dom(restriction(alpha!1)(Vars(ext(rho!1)(lhs(e2!1)))))"
                "Vars(ext(rho!1)(lhs(e2!1)))")
               (assert)
               (prop)
               (("1"
                 (replace -1 1)
                 (lemma "restriction_term")
                 (inst?)
                 (prop)
                 (("1" (assert))
                  ("2"
                   (hide-all-but 1)
                   (typepred "e1!1")
                   (expand "rewrite_rule?")
                   (expand* "lhs" "rhs")
                   (prop))))
                ("2"
                 (hide-all-but (-2 -3 -6 1))
                 (lemma "IUnion_extra[(V)].disjoint_subset")
                 (inst -1 "Vars(rhs(e1!1))" "Vars(rhs(e1!1))"
                  "Dom(restriction(alpha!1)(Vars(ext(rho!1)(lhs(e2!1)))))"
                  "Vars(ext(rho!1)(lhs(e2!1)))")
                 (prop)
                 (("1"
                   (hide-all-but 1)
                   (expand* "subset?" "member")
                   (skeep))
                  ("2"
                   (hide-all-but (-3 1))
                   (lemma "IUnion_extra[(V)].disjoint_subset")
                   (inst -1 "Vars(rhs(e1!1))" "Vars(lhs(e1!1))"
                    "Vars(ext(rho!1)(lhs(e2!1)))"
                    "Vars(ext(rho!1)(lhs(e2!1)))")
                   (prop)
                   (("1"
                     (hide (-1 2))
                     (typepred "e1!1")
                     (expand* "rewrite_rule?" "lhs" "rhs")
                     (assert))
                    ("2"
                     (hide (-1 2))
                     (expand* "subset?" "member")
                     (skeep))))))))
              ("2" (rewrite "restriction_Subs"))
              ("3" (rewrite "restriction_Subs"))))
            ("3"
             (lemma "ext_replace_ext")
             (inst?)
             (prop)
             (("1"
               (replaces -1)
               (copy -1)
               (inst -1 "ext(rho!1)(rhs(e2!1))")
               (inst -2 "lhs(e1!1)")
               (expand "o")
               (replace -1 1 rl)
               (replace -2 1 rl)
               (replace -3 1 rl)
               (hide (-1 -2 -3))
               (lemma "restriction_union")
               (copy -1)
               (inst -1 "restriction(sg1!1)(Vars(lhs(e1!1)))"
                "restriction(alpha!1)(Vars(ext(rho!1)(lhs(e2!1))))"
                "lhs(e1!1)")
               (("1"
                 (inst -2
                  "restriction(alpha!1)(Vars(ext(rho!1)(lhs(e2!1))))"
                  "restriction(sg1!1)(Vars(lhs(e1!1)))"
                  "ext(rho!1)(rhs(e2!1))")
                 (("1"
                   (lemma "dom_restriction")
                   (copy -1)
                   (inst -1 "Vars(lhs(e1!1))" "sg1!1")
                   (inst -2 "Vars(ext(rho!1)(lhs(e2!1)))" "alpha!1")
                   (lemma "IUnion_extra[(V)].disjoint_subset")
                   (inst -1 "Dom(restriction(sg1!1)(Vars(lhs(e1!1))))"
                    "Vars(lhs(e1!1))"
                    "Dom(restriction(alpha!1)(Vars(ext(rho!1)(lhs(e2!1)))))"
                    "Vars(ext(rho!1)(lhs(e2!1)))")
                   (assert)
                   (lemma "IUnion_extra[(V)].disjoint_commute")
                   (inst -1 "Dom(restriction(sg1!1)(Vars(lhs(e1!1))))"
                    "Dom(restriction(alpha!1)(Vars(ext(rho!1)(lhs(e2!1)))))")
                   (assert)
                   (prop)
                   (("1"
                     (rewrite "union_commute")
                     (replaces -1)
                     (replaces -1)
                     (lemma "restriction_term")
                     (copy -1)
                     (inst -1 "Vars(ext(rho!1)(lhs(e2!1)))" "alpha!1"
                      "ext(rho!1)(rhs(e2!1))")
                     (inst -2 "Vars(lhs(e1!1))" "sg1!1" "lhs(e1!1)")
                     (prop)
                     (("1"
                       (replace -1 1 rl)
                       (replace -2 1 rl)
                       (rewrite "ext_o")
                       (expand "o")
                       (case-replace
                        "ext(alpha!1)(ext(rho!1)(rhs(e2!1))) = ext(sg2!1)(rhs(e2!1))")
                       (hide-all-but (-10 -12 1))
                       (replaces -1)
                       (lemma "ext_o")
                       (inst -1 "alpha!1" "rho!1")
                       (copy -1)
                       (decompose-equality -1)
                       (decompose-equality -2)
                       (inst -1 "lhs(e2!1)")
                       (inst -2 "rhs(e2!1)")
                       (expand "o")
                       (replace -1 * rl)
                       (replace -2 * rl)
                       (hide (-1 -2))
                       (lemma "same_substitution")
                       (inst -1 "comp(alpha!1, rho!1)" "sg2!1"
                        "lhs(e2!1)")
                       (assert)
                       (lemma "same_term")
                       (inst -1 "comp(alpha!1, rho!1)" "sg2!1"
                        "rhs(e2!1)")
                       (prop)
                       (skosimp*)
                       (hide (-3 2))
                       (inst -2 "x!1")
                       (assert)
                       (hide 1)
                       (typepred "e2!1")
                       (hide -2)
                       (expand "rewrite_rule?")
                       (flatten)
                       (expand* "subset?" "rhs" "lhs")
                       (inst?)
                       (assert))
                      ("2"
                       (hide-all-but 1)
                       (expand* "subset?" "member")
                       (skeep))
                      ("3"
                       (hide-all-but 1)
                       (typepred "e2!1")
                       (expand "rewrite_rule?")
                       (flatten)
                       (lemma "rename_preserv_inclusion")
                       (expand* "rhs" "lhs")
                       (inst?)
                       (assert))
                      ("4"
                       (hide-all-but 1)
                       (expand* "subset?" "member")
                       (skeep))))
                    ("2"
                     (hide-all-but (-4 -8 1))
                     (lemma "IUnion_extra[(V)].disjoint_subset")
                     (case "disjoint?(Vars(lhs(e1!1)), Vars(ext(rho!1)(rhs(e2!1))))")
                     (("1"
                       (inst -2
                        "Dom(restriction(sg1!1)(Vars(lhs(e1!1))))"
                        "Vars(lhs(e1!1))" "Vars(ext(rho!1)(rhs(e2!1)))"
                        "Vars(ext(rho!1)(rhs(e2!1)))")
                       (prop)
                       (("1"
                         (lemma "IUnion_extra[(V)].disjoint_commute")
                         (inst -1
                          "Dom(restriction(sg1!1)(Vars(lhs(e1!1))))"
                          "Vars(ext(rho!1)(rhs(e2!1)))")
                         (assert))
                        ("2"
                         (hide-all-but 1)
                         (expand* "subset?" "member")
                         (skeep))))
                      ("2"
                       (hide-all-but (-1 -3 1))
                       (typepred "e2!1")
                       (expand "rewrite_rule?")
                       (flatten)
                       (expand* "lhs" "rhs")
                       (lemma "rename_preserv_inclusion")
                       (inst -1 "rho!1" "e2!1`1" "e2!1`2")
                       (assert)
                       (inst -4 "Vars(e1!1`1)" "Vars(e1!1`1)"
                        "Vars(ext(rho!1)(e2!1`2))"
                        "Vars(ext(rho!1)(e2!1`1))")
                       (prop)
                       (hide-all-but 1)
                       (expand* "subset?" "member")
                       (skeep))))
                    ("3"
                     (hide-all-but (-5 -8 1))
                     (lemma "IUnion_extra[(V)].disjoint_subset")
                     (inst -1 "Vars(lhs(e1!1))" "Vars(lhs(e1!1))"
                      "Dom(restriction(alpha!1)(Vars(ext(rho!1)(lhs(e2!1)))))"
                      "Vars(ext(rho!1)(lhs(e2!1)))")
                     (prop)
                     (hide-all-but 1)
                     (expand* "subset?" "member")
                     (skeep))
                    ("4"
                     (hide-all-but (-3 -7 1))
                     (lemma "IUnion_extra[(V)].disjoint_subset")
                     (case "disjoint?(Vars(ext(rho!1)(rhs(e2!1))), Vars(lhs(e1!1)))")
                     (("1"
                       (inst -2 "Vars(ext(rho!1)(rhs(e2!1)))"
                        "Vars(ext(rho!1)(rhs(e2!1)))"
                        "Dom(restriction(sg1!1)(Vars(lhs(e1!1))))"
                        "Vars(lhs(e1!1))")
                       (prop)
                       (hide-all-but 1)
                       (expand* "subset?" "member")
                       (skeep))
                      ("2"
                       (hide (-2 2))
                       (typepred "e2!1")
                       (expand "rewrite_rule?")
                       (flatten)
                       (lemma "rename_preserv_inclusion")
                       (inst -1 "rho!1" "e2!1`1" "e2!1`2")
                       (assert)
                       (inst -4 "Vars(e1!1`1)" "Vars(e1!1`1)"
                        "Vars(ext(rho!1)(e2!1`2))"
                        "Vars(ext(rho!1)(e2!1`1))")
                       (prop)
                       (("1"
                         (expand* "rhs" "lhs")
                         (hide-all-but (-1 2))
                         (lemma "IUnion_extra[(V)].disjoint_commute")
                         (inst -1 "Vars(e1!1`1)"
                          "Vars(ext(rho!1)(e2!1`2))")
                         (assert))
                        ("2"
                         (hide-all-but 1)
                         (expand* "subset?" "member")
                         (skeep))
                        ("3" (expand* "rhs" "lhs"))))))))
                  ("2" (hide-all-but 1) (rewrite "restriction_Subs"))
                  ("3" (hide-all-but 1) (rewrite "restriction_Subs"))))
                ("2" (hide-all-but 1) (rewrite "restriction_Subs"))
                ("3" (hide-all-but 1) (rewrite "restriction_Subs"))))
              ("2" (hide-all-but (-7 1)) (rewrite "ext_preserv_pos"))))))
          ("2" (hide-all-but (-6 1)) (rewrite "ext_preserv_pos"))))
        ("2" (hide-all-but 1) (rewrite "restriction_Subs"))
        ("3" (hide-all-but 1) (rewrite "restriction_Subs"))))
      ("2"
       (hide-all-but (-1 1))
       (expand "unifiable")
       (inst 1
        "union_subs((restriction(sg1!1)(Vars(lhs(e1!1))), restriction(alpha!1)(Vars(ext(rho!1)(lhs(e2!1))))))")
       (("1" (expand "unifier") (propax))
        ("2" (hide-all-but 1) (rewrite "restriction_Subs"))
        ("3" (hide-all-but 1) (rewrite "restriction_Subs"))))))
    ("2"
     (hide 3 4)
     (lemma "restriction_union")
     (inst -1 "restriction(sg1!1)(Vars(lhs(e1!1)))"
      "restriction(alpha!1)(Vars(ext(rho!1)(lhs(e2!1))))"
      "subtermOF(lhs(e1!1), p!1)")
     (("1"
       (lemma "dom_restriction")
       (inst -1 "Vars(lhs(e1!1))" "sg1!1")
       (lemma "IUnion_extra[(V)].disjoint_subset")
       (inst -1 "Dom(restriction(sg1!1)(Vars(lhs(e1!1))))"
        "Vars(lhs(e1!1))"
        "Dom(restriction(alpha!1)(Vars(ext(rho!1)(lhs(e2!1)))))"
        "Vars(ext(rho!1)(lhs(e2!1)))")
       (lemma "dom_restriction")
       (inst -1 "Vars(ext(rho!1)(lhs(e2!1)))" "alpha!1")
       (assert)
       (lemma "IUnion_extra[(V)].disjoint_subset")
       (inst -1 "Vars(lhs(e1!1))" "Vars(lhs(e1!1))"
        "Dom(restriction(alpha!1)(Vars(ext(rho!1)(lhs(e2!1)))))"
        "Vars(ext(rho!1)(lhs(e2!1)))")
       (prop)
       (("1"
         (replaces -1)
         (lemma "restriction_union")
         (inst -1 "restriction(alpha!1)(Vars(ext(rho!1)(lhs(e2!1))))"
          "restriction(sg1!1)(Vars(lhs(e1!1)))" "ext(rho!1)(lhs(e2!1))")
         (("1"
           (lemma "IUnion_extra[(V)].disjoint_commute")
           (inst -1 "Dom(restriction(sg1!1)(Vars(lhs(e1!1))))"
            "Dom(restriction(alpha!1)(Vars(ext(rho!1)(lhs(e2!1)))))")
           (assert)
           (lemma "IUnion_extra[(V)].disjoint_subset")
           (inst -1 "Dom(restriction(sg1!1)(Vars(lhs(e1!1))))"
            "Vars(lhs(e1!1))" "Vars(ext(rho!1)(lhs(e2!1)))"
            "Vars(ext(rho!1)(lhs(e2!1)))")
           (assert)
           (prop)
           (("1"
             (rewrite "union_commute")
             (replaces -1)
             (lemma "restriction_term")
             (inst?)
             (prop)
             (("1"
               (replace -1 1 rl)
               (lemma "restriction_term")
               (inst -1 "Vars(ext(rho!1)(lhs(e2!1)))" "alpha!1"
                "ext(rho!1)(lhs(e2!1))")
               (prop)
               (("1"
                 (replace -1 1 rl)
                 (rewrite "ext_o")
                 (expand "o")
                 (propax))
                ("2"
                 (hide-all-but 1)
                 (expand* "subset?" "member")
                 (skeep))))
              ("2" (hide-all-but 1) (rewrite "vars_subterm"))))
            ("2"
             (hide-all-but (-1 1))
             (rewrite "IUnion_extra[(V)].disjoint_commute"))
            ("3" (hide-all-but 1) (expand* "subset?" "member") (skeep))
            ("4"
             (hide-all-but (-5 -6 1))
             (lemma "IUnion_extra[(V)].disjoint_subset")
             (inst -1 "Dom(restriction(sg1!1)(Vars(lhs(e1!1))))"
              "Vars(lhs(e1!1))" "Vars(ext(rho!1)(lhs(e2!1)))"
              "Vars(ext(rho!1)(lhs(e2!1)))")
             (assert)
             (prop)
             (("1"
               (hide (-2 -3))
               (lemma "IUnion_extra[(V)].disjoint_commute")
               (inst -1 "Dom(restriction(sg1!1)(Vars(lhs(e1!1))))"
                "Vars(ext(rho!1)(lhs(e2!1)))")
               (assert))
              ("2"
               (hide (-1 -2 2))
               (expand* "subset?" "member")
               (skeep))))))
          ("2" (hide-all-but 1) (rewrite "restriction_Subs"))))
        ("2"
         (hide-all-but (-1 1))
         (lemma "vars_subterm")
         (inst?)
         (assert)
         (lemma "IUnion_extra[(V)].disjoint_subset")
         (inst -1 "Vars(subtermOF(lhs(e1!1), p!1))" "Vars(lhs(e1!1))"
          "Dom(restriction(alpha!1)(Vars(ext(rho!1)(lhs(e2!1)))))"
          "Dom(restriction(alpha!1)(Vars(ext(rho!1)(lhs(e2!1)))))")
         (prop)
         (hide-all-but 1)
         (expand* "subset?" "member")
         (skeep))
        ("3" (hide-all-but 1) (expand* "subset?" "member") (skeep))
        ("4"
         (hide-all-but (-1 -4 1))
         (lemma "IUnion_extra[(V)].disjoint_subset")
         (inst -1
          "Dom(restriction(alpha!1)(Vars(ext(rho!1)(lhs(e2!1)))))"
          "Vars(ext(rho!1)(lhs(e2!1)))" "Vars(lhs(e1!1))"
          "Vars(lhs(e1!1))")
         (lemma "IUnion_extra[(V)].disjoint_commute")
         (inst?)
         (assert)
         (prop)
         (("1"
           (hide (-2 -3 -4))
           (lemma "vars_subterm")
           (inst?)
           (assert)
           (lemma "IUnion_extra[(V)].disjoint_subset")
           (inst -1 "Vars(subtermOF(lhs(e1!1), p!1))" "Vars(lhs(e1!1))"
            "Dom(restriction(alpha!1)(Vars(ext(rho!1)(lhs(e2!1)))))"
            "Dom(restriction(alpha!1)(Vars(ext(rho!1)(lhs(e2!1)))))")
           (prop)
           (("1" (hide-all-but 1) (expand* "subset?" "member") (skeep))
            ("2"
             (hide (-1 2))
             (lemma "IUnion_extra[(V)].disjoint_commute")
             (inst?)
             (assert))))
          ("2" (hide-all-but 1) (expand* "subset?" "member") (skeep))))))
      ("2" (hide-all-but 1) (rewrite "restriction_Subs"))
      ("3" (hide-all-but 1) (rewrite "restriction_Subs"))))
    ("3"
     (hide-all-but 1)
     (rewrite "union_is_sub")
     (("1" (hide 2) (rewrite "restriction_Subs"))
      ("2" (hide 2) (rewrite "restriction_Subs"))))
    ("4"
     (hide-all-but (-1 1))
     (expand "disjoint_D?")
     (lemma "dom_restriction")
     (copy -1)
     (inst -1 "Vars(lhs(e1!1))" "sg1!1")
     (inst -2 "Vars(ext(rho!1)(lhs(e2!1)))" "alpha!1")
     (lemma "IUnion_extra[(V)].disjoint_subset")
     (inst -1 "Dom(restriction(sg1!1)(Vars(lhs(e1!1))))"
      "Vars(lhs(e1!1))"
      "Dom(restriction(alpha!1)(Vars(ext(rho!1)(lhs(e2!1)))))"
      "Vars(ext(rho!1)(lhs(e2!1)))")
     (assert))
    ("5" (hide-all-but 1) (rewrite "restriction_Subs"))
    ("6" (hide-all-but 1) (rewrite "restriction_Subs"))))


proof_type: f_proof
decl_type: formula
library: TRS
theory: orthogonality
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (lemma finite_sets[position].card_one)
   (inst -1 "Pos_var(t, x)")
   (lemma finite_sets[position].card_def)
   (inst -1 "Pos_var(t, x)")
   (replace -1 -3 rl)
   (assert)
   (skosimp)
   (inst 1 x!1)
   (expand singleton)
   (decompose-equality)
   (inst -1 x!1)
   (expand Pos_var -1)
   (expand extend)
   (prop))


proof_type: f_proof
decl_type: formula
library: TRS
theory: orthogonality
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (prop)
   (("1" (replace -1 1) (propax))
    ("2"
     (lemma subterm_of_replace)
     (copy -1)
     (inst -1 p s t1)
     (inst -2 p s t2)
     (assert))))


proof_type: f_proof
decl_type: formula
library: TRS
theory: orthogonality
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (case "card(Pos_var(subtermOF(s,  #(first(p))), x)) >= 2")
   (("1"
     (lemma finite_sets[position].card_2_has_2)
     (inst -1 "Pos_var(subtermOF(s,  #(first(p))), x)")
     (assert)
     (skosimp)
     (case "member( #(first(p)) o x!1 , Pos_var(s,x))")
     (("1"
       (case "member( #(first(p)) o y!1 , Pos_var(s,x))")
       (("1"
         (expand member)
         (hide -3 -4 -5 3)
         (expand Pos_var (-1 -2))
         (expand extend)
         (prop)
         (rewrite card_one)
         (skosimp)
         (expand* Pos_var extend)
         (decompose-equality -8)
         (copy -1)
         (inst -1 "add_first(first(p), x!1)")
         (inst -2 "add_first(first(p), y!1)")
         (lift-if)
         (case "add_first(first(p), x!1) = #(first(p)) o x!1 & add_first(first(p), y!1) = #(first(p)) o y!1")
         (("1"
           (flatten)
           (replace -1 -3)
           (replace -2 -4)
           (assert)
           (replace -1 -3 rl)
           (replace -2 -4 rl)
           (expand singleton)
           (replace -4 -3 rl)
           (hide-all-but (-3 1))
           (lemma first_equal[posnat])
           (inst -1 x!1 y!1 "first(p)" "first(p)")
           (assert))
          ("2"
           (split)
           (("1"
             (expand add_first 1)
             (expand insert?)
             (hide-all-but 1)
             (expand finseq_appl)
             (expand o)
             (split)
             (("1" (grind))
              ("2"
               (case "#(first(p))`length = 1")
               (("1"
                 (replace -1)
                 (assert)
                 (decompose-equality)
                 (("1" (lift-if) (lift-if) (assert) (grind))
                  ("2" (skosimp) (grind)) ("3" (skeep) (grind))
                  ("4" (skeep) (grind)) ("5" (skeep) (grind))))
                ("2" (hide 2) (grind))))))
            ("2"
             (hide-all-but 1)
             (case "#(first(p))`length = 1")
             (("1"
               (expand* add_first insert?)
               (expand finseq_appl)
               (expand o)
               (split)
               (("1" (assert))
                ("2"
                 (decompose-equality 1)
                 (("1" (lift-if) (lift-if) (replace -1) (assert) (grind))
                  ("2" (skosimp) (grind)) ("3" (skeep) (grind))
                  ("4" (skeep) (grind))))))
              ("2" (hide 2) (grind))))))))
        ("2"
         (expand member)
         (hide -1 -2)
         (expand Pos_var (-1 1))
         (expand extend)
         (prop)
         (("1"
           (lemma pos_subterm)
           (inst -1 "#(first(p))" y!1 s)
           (lemma pos_o_term)
           (inst -1 "#(first(p))" y!1 s)
           (assert))
          ("2"
           (lemma pos_o_term)
           (inst -1 "#(first(p))" y!1 s)
           (assert)
           (expand positionsOF (-5 1))
           (lift-if)
           (prop)
           (("1" (expand only_empty_seq -2) (rewrite empty_0))
            ("2" (hide -3) (expand only_empty_seq) (rewrite empty_0))
            ("3"
             (expand* union only_empty_seq IUnion catenate member
              finseq_appl)
             (prop)
             (("1" (rewrite empty_0))
              ("2"
               (skosimp)
               (skosimp)
               (inst 5 i!1 empty_seq)
               (split)
               (("1"
                 (hide-all-but 1)
                 (expand positionsOF)
                 (lift-if)
                 (prop)
                 (("1" (hide -1) (expand only_empty_seq) (propax))
                  ("2" (hide -1 2) (expand only_empty_seq) (propax))
                  ("3"
                   (expand* union only_empty_seq IUnion catenate member
                    finseq_appl))))
                ("2"
                 (lemma first_add[posnat])
                 (inst -1 x!2 i!1)
                 (replace -3 1)
                 (replace -1 1)
                 (hide-all-but 1)
                 (lemma add_first_empty_seq[posnat])
                 (inst -1 i!1)
                 (assert))))))))))))
      ("2"
       (hide -2 -3 -7 2 4)
       (expand Pos_var (-1 1))
       (expand* extend member)
       (prop)
       (("1" (lemma pos_subterm) (inst -1 "#(first(p))" x!1 s) (assert))
        ("2"
         (lemma pos_o_term)
         (inst -1 "#(first(p))" x!1 s)
         (assert)
         (hide 2)
         (expand positionsOF (-4 1))
         (lift-if)
         (prop)
         (("1"
           (hide-all-but (-2 2))
           (expand only_empty_seq)
           (rewrite empty_0))
          ("2"
           (hide-all-but (-2 4))
           (expand only_empty_seq)
           (rewrite empty_0))
          ("3"
           (expand* union IUnion catenate finseq_appl only_empty_seq
            member)
           (prop)
           (("1" (rewrite empty_0))
            ("2"
             (skosimp)
             (skosimp)
             (inst 5 i!1 empty_seq)
             (split)
             (("1"
               (hide-all-but 1)
               (expand positionsOF)
               (lift-if)
               (prop)
               (("1" (hide-all-but 1) (grind))
                ("2" (hide-all-but 1) (grind))
                ("3"
                 (expand* union IUnion catenate finseq_appl
                  only_empty_seq member))))
              ("2"
               (lemma first_add[posnat])
               (inst -1 x!2 i!1)
               (replace -3 1)
               (replace -1 1)
               (lemma add_first_empty_seq[posnat])
               (inst -1 i!1)
               (assert))))))))))))
    ("2"
     (case "card(Pos_var(subtermOF(s,  #(first(p))), x)) = 0")
     (("1"
       (rewrite card_empty?)
       (expand empty?)
       (inst -1 "rest(p)")
       (expand member)
       (hide -4 2 4)
       (expand* Pos_var extend)
       (prop)
       (("1"
         (lemma pos_subterm)
         (inst -1 "#(first(p))" "rest(p)" s)
         (prop)
         (("1" (lemma seq_first_rest_1[posnat]) (inst -1 p) (assert))
          ("2" (lemma seq_first_rest_1[posnat]) (inst -1 p) (assert))))
        ("2"
         (lemma pos_subterm_ax)
         (inst -1 "#(first(p))" "rest(p)" s)
         (assert)
         (lemma seq_first_rest_1[posnat])
         (inst -1 p)
         (assert))))
      ("2" (assert))))))


proof_type: f_proof
decl_type: formula
library: TRS
theory: orthogonality
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (induct s)
   (("1"
     (skeep)
     (skeep)
     (expand SigmaP)
     (case "x = vars(vars1_var)")
     (("1"
       (name-replace "z" "vars(vars1_var)")
       (hide 2)
       (replace -1 1)
       (expand member)
       (expand Vars)
       (inst 1 empty_seq)
       (("1" (grind)) ("2" (hide -) (grind))))
      ("2"
       (name-replace "z" "vars(vars1_var)")
       (expand ext 3 2)
       (assert)
       (expand ext 3)
       (propax))))
    ("2"
     (skeep)
     (skeep)
     (expand ext 2)
     (assert)
     (lift-if)
     (case "length(app2_var) = 0")
     (("1" (assert))
      ("2"
       (split)
       (("1" (propax))
        ("2"
         (assert)
         (decompose-equality)
         (("1"
           (decompose-equality)
           (("1"
             (decompose-equality)
             (("1"
               (inst -1 "x!1")
               (inst -1 "p2" "sigma" "t" "x")
               (assert)
               (expand finseq_appl)
               (prop)
               (hide-all-but (-1 3))
               (expand* member Vars)
               (skosimp*)
               (inst 1 " add_first(x!1 + 1, p!1)")
               (("1"
                 (expand subtermOF 1)
                 (lift-if)
                 (prop)
                 (("1"
                   (hide -2 1)
                   (expand add_first)
                   (expand insert?)
                   (assert))
                  ("2"
                   (expand finseq_appl)
                   (rewrite rest_add_first)
                   (rewrite first_add)
                   (assert))))
                ("2"
                 (expand positionsOF)
                 (expand union)
                 (flatten)
                 (hide 1)
                 (expand member)
                 (expand IUnion)
                 (inst 1 "x!1 + 1")
                 (expand finseq_appl)
                 (expand catenate)
                 (inst 1 p!1)
                 (typepred p!1)
                 (expand member)
                 (propax))))
              ("2"
               (skeep)
               (lemma SigmaP_Subs)
               (inst -1 p2 sigma t x)
               (assert)
               (typepred x)
               (expand V)
               (expand ext -3)
               (assert))
              ("3"
               (skeep)
               (hide-all-but (-2 1))
               (typepred x)
               (expand V)
               (expand ext -2)
               (assert))))
            ("2"
             (skeep)
             (lemma SigmaP_Subs)
             (inst -1 p2 sigma t x)
             (assert)
             (hide-all-but (-2 1))
             (typepred x)
             (expand V)
             (expand ext -2)
             (assert))
            ("3"
             (skeep)
             (lemma SigmaP_Subs)
             (inst -1 p2 sigma t x)
             (assert)
             (hide-all-but (-3 1))
             (typepred x)
             (expand V)
             (expand ext -2)
             (assert))))
          ("2"
           (skeep)
           (lemma SigmaP_Subs)
           (inst -1 p2 sigma t x)
           (assert)
           (hide-all-but (-2 1))
           (typepred x)
           (expand V)
           (expand ext -2)
           (assert))
          ("3"
           (skeep)
           (hide-all-but (-2 1))
           (typepred x)
           (expand V)
           (expand ext -2)
           (assert))))))))
    ("3"
     (hide 2)
     (skeep)
     (lemma SigmaP_Subs)
     (inst -1 p2 sigma t x)
     (assert)
     (hide-all-but (-1 1))
     (typepred x)
     (expand V)
     (expand ext -2)
     (assert))
    ("4"
     (hide 2)
     (skeep)
     (hide 1)
     (typepred x)
     (expand V)
     (expand ext -2)
     (assert))))


proof_type: f_proof
decl_type: formula
library: TRS
theory: orthogonality
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (lemma finite_sets[position].card_def)
   (lemma finite_sets[position].card_one)
   (expand singleton)
   (induct s)
   (("1"
     (skeep)
     (skeep)
     (case "vars(vars1_var) = x")
     (("1"
       (name-replace "z" "vars(vars1_var)")
       (replace -1)
       (expand ext 1 1)
       (lift-if)
       (assert)
       (expand SigmaP)
       (expand positionsOF -3)
       (expand only_empty_seq)
       (replace -3 1)
       (rewrite empty_o_seq)
       (expand ext 1)
       (propax))
      ("2"
       (name-replace "z" "vars(vars1_var)")
       (hide 2)
       (expand positionsOF -2)
       (assert)
       (expand only_empty_seq)
       (replace -2 -4)
       (expand subtermOF -4)
       (rewrite empty_0)
       (assert))))
    ("2"
     (skeep)
     (skeep)
     (name-replace "sym" "app1_var")
     (expand ext 1 1)
     (lift-if)
     (assert)
     (case "length(app2_var) = 0")
     (("1"
       (hide-all-but (-1 -3 -4 -6 1))
       (expand positionsOF)
       (assert)
       (expand only_empty_seq)
       (replace -3 -4)
       (expand subtermOF)
       (rewrite empty_0)
       (assert))
      ("2"
       (assert)
       (expand finseq_appl 2)
       (expand replaceTerm 2)
       (lift-if)
       (case "length(p1 o p2) = 0")
       (("1"
         (hide 2)
         (rewrite empty_0)
         (lemma seq_empty[posnat])
         (inst -1 p1 p2)
         (assert)
         (flatten)
         (hide-all-but (-1 -5 -6 -8))
         (rewrite empty_0)
         (replace -1 -4)
         (hide -1 -3)
         (expand subtermOF)
         (assert)
         (lift-if)
         (assert)
         (rewrite empty_0))
        ("2"
         (assert)
         (decompose-equality 3)
         (("1" (hide-all-but 1) (grind))
          ("2"
           (expand finseq_appl)
           (expand ext 1 2)
           (expand finseq_appl)
           (expand ext 1 3)
           (expand finseq_appl)
           (expand replace 1)
           (decompose-equality 1)
           (("1"
             (lift-if)
             (expand finseq_appl)
             (case "x!1 = first(p1 o p2) - 1")
             (("1"
               (assert)
               (inst -2 x!1)
               (inst -2 "rest(p1)" p2 sigma t x)
               (assert)
               (prop)
               (("1"
                 (replace -2 1 rl)
                 (assert)
                 (rewrite rest_compo)
                 (hide-all-but (-3 -4 -6 1))
                 (prop)
                 (rewrite empty_0)
                 (expand subtermOF)
                 (propax))
                ("2"
                 (lemma rest_of_positions)
                 (inst -1 p1 "app(sym, app2_var)")
                 (assert)
                 (prop)
                 (("1"
                   (replace -2 1)
                   (expand finseq_appl)
                   (rewrite first_compo)
                   (hide-all-but (-3 -4 -6 1))
                   (prop)
                   (rewrite empty_0)
                   (expand subtermOF)
                   (propax))
                  ("2"
                   (hide-all-but (-1 -3 -4 -6))
                   (expand subtermOF)
                   (assert))))
                ("3"
                 (hide-all-but (-1 -2 -3 -5 1))
                 (replaces -4)
                 (expand subtermOF 1 1)
                 (lift-if)
                 (prop)
                 (("1" (hide 1) (expand subtermOF) (assert))
                  ("2"
                   (expand finseq_appl)
                   (replace -1 2)
                   (rewrite first_compo))))
                ("4"
                 (hide 2 3 4)
                 (case "length(p1) /= 0")
                 (("1"
                   (prop)
                   (lemma Var_occurs_only_once_also_in_subterms)
                   (inst -1 p1 "app(sym, app2_var)" x)
                   (assert)
                   (copy -9)
                   (inst -1 "Pos_var(app(sym, app2_var), x)")
                   (inst -10 "Pos_var(app2_var`seq(x!1), x)")
                   (replace -1 -8 rl)
                   (replace -10 2 rl)
                   (hide -1 -9 -10)
                   (assert)
                   (rewrite first_compo)
                   (expand subtermOF -1)
                   (assert)
                   (lift-if -1)
                   (assert)
                   (case "length( #(first(p1))) /= 0")
                   (("1"
                     (assert)
                     (expand* finseq_appl)
                     (expand first -2 1)
                     (expand* finseq_appl)
                     (assert)
                     (case " length( #(first(p1))) = 1")
                     (("1"
                       (expand subtermOF -3)
                       (lift-if)
                       (expand rest -3 1)
                       (expand* ^ min empty_seq)
                       (assert)
                       (expand "#" -3)
                       (assert))
                      ("2" (prop) (hide-all-but 1) (grind))))
                    ("2" (hide-all-but (1 2)) (grind))))
                  ("2"
                   (prop)
                   (hide-all-but (-1 -3 -6))
                   (expand subtermOF)
                   (assert))))))
              ("2"
               (hide -1 -7)
               (assert)
               (case "member(x, Vars(app2_var`seq(x!1)))")
               (("1"
                 (expand member)
                 (inst -7 "Pos_var(app(sym, app2_var), x)")
                 (replace -7 -6 rl)
                 (hide -4 -7 2 3 4)
                 (rewrite card_one)
                 (skosimp)
                 (case "length(p1) = 0")
                 (("1" (expand subtermOF) (assert))
                  ("2"
                   (expand singleton)
                   (decompose-equality -5)
                   (copy -1)
                   (case "EXISTS p: positionsOF(app(sym, app2_var))(p) & p /= p1 & subtermOF(app(sym, app2_var), p) = x")
                   (("1"
                     (skeep -1)
                     (inst -3 p1)
                     (inst -4 p)
                     (case "Pos_var(app(sym, app2_var), x)(p1) & Pos_var(app(sym, app2_var), x)(p)")
                     (("1" (flatten) (assert))
                      ("2"
                       (split)
                       (("1" (expand Pos_var 1) (expand extend) (propax))
                        ("2"
                         (expand Pos_var 1)
                         (expand extend)
                         (assert))))))
                    ("2"
                     (hide -1 -2)
                     (expand Vars -1)
                     (skosimp)
                     (expand subtermOF -4)
                     (assert)
                     (expand finseq_appl)
                     (inst 1 "add_first(x!1 + 1, p!1)")
                     (split)
                     (("1"
                       (expand positionsOF 1)
                       (expand* union IUnion only_empty_seq catenate
                        finseq_appl member)
                       (prop)
                       (inst 2 "1 + x!1" p!1)
                       (hide 1)
                       (assert))
                      ("2"
                       (prop)
                       (rewrite first_compo)
                       (lemma seq_first_rest[posnat])
                       (inst -1 p1)
                       (assert)
                       (replace -1 -2)
                       (hide -1)
                       (lemma first_equal[posnat])
                       (inst -1 p!1 "rest(p1)" "1 + x!1" "first(p1)")
                       (assert))
                      ("3"
                       (expand subtermOF 1)
                       (lift-if)
                       (prop)
                       (("1"
                         (hide-all-but -1)
                         (expand* add_first insert?)
                         (assert))
                        ("2"
                         (expand finseq_appl)
                         (lemma rest_add_first[posnat])
                         (inst -1 p!1 "1 + x!1")
                         (replaces -1)
                         (lemma first_add[posnat])
                         (inst -1 p!1 "1 + x!1")
                         (replaces -1)
                         (assert))))))))))
                ("2"
                 (expand member)
                 (hide -2 -4 -5 -6 2 4 5)
                 (lemma SigmaP_equivalence)
                 (inst -1 p2 "app2_var`seq(x!1)" sigma t x)
                 (assert)
                 (expand member)
                 (propax))))))
            ("2"
             (skeep)
             (hide-all-but (-4 -5 -6 2 3))
             (lemma ext_preserv_pos)
             (inst -1 p1 "app(sym, app2_var)" sigma)
             (assert)
             (replaces -4)
             (lemma subterm_ext_commute)
             (inst -1 p1 "app(sym, app2_var)" sigma)
             (assert)
             (replace -1 -4 rl)
             (lemma rest_of_positions)
             (inst -1 "p1 o p2" "ext(sigma)(app(sym, app2_var))")
             (prop)
             (("1"
               (hide-all-but (-1 1))
               (expand finseq_appl)
               (case "args(ext(sigma)(app(sym, app2_var)))`seq(first(p1 o p2) - 1) = ext(sigma)(app2_var`seq(first(o(p1, p2)) - 1))")
               (("1" (replace -1) (propax))
                ("2" (hide-all-but 1) (grind))))
              ("2"
               (lemma pos_o_term)
               (inst -1 p1 p2 "ext(sigma)(app(sym, app2_var))")
               (assert))))
            ("3"
             (skeep)
             (hide-all-but (-3 -4 -6 2))
             (case "length(p1) = 0")
             (("1" (expand subtermOF -4) (assert))
              ("2"
               (rewrite first_compo)
               (expand* positionsOF union IUnion member only_empty_seq)
               (rewrite empty_0)
               (assert)
               (skosimp)
               (expand catenate)
               (skosimp)
               (expand add_first)
               (expand insert?)
               (decompose-equality -3)
               (decompose-equality -2)
               (inst -1 0)
               (("1"
                 (expand first 2)
                 (expand finseq_appl)
                 (expand member)
                 (assert))
                ("2" (assert))))))
            ("4" (skeep) (rewrite SigmaP_Subs) (expand ext -4) (propax))
            ("5" (skeep) (expand ext -4) (propax))))
          ("3" (skeep) (expand ext -4) (rewrite SigmaP_Subs))
          ("4" (skeep) (expand ext -4) (propax))))))))
    ("3"
     (skeep)
     (lemma ext_preserv_pos)
     (inst -1 p1 s sigma)
     (assert)
     (hide 2)
     (replace -5 -4)
     (lemma subterm_ext_commute)
     (inst -1 p1 s sigma)
     (assert)
     (replace -1 -5 rl)
     (lemma pos_o_term)
     (inst -1 p1 p2 "ext(sigma)(s)")
     (assert))
    ("4" (skeep) (expand ext -3) (assert) (rewrite SigmaP_Subs))
    ("5" (skeep) (expand ext -3) (assert))
    ("6"
     (skeep)
     (hide-all-but 1)
     (lemma Pos_var_is_finite)
     (inst -1 s x)
     (assert))))


proof_type: f_proof
decl_type: formula
library: TRS
theory: orthogonality
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (assert)
   (flatten)
   (lemma "replace_distributivity")
   (inst -1 p1 p2 t "ext(sg2)(ext(rho2)(rhs(e2p)))")
   (assert)
   (lemma "pos_subterm")
   (inst -1 p1 p2 t)
   (assert)
   (lemma "positions_of_ext")
   (inst -1 "comp(sg1, rho1)" "lhs(e1p)")
   (("1"
     (decompose-equality -1)
     (inst -1 "p2")
     (iff)
     (flatten)
     (hide -2)
     (expand* "union" "member")
     (prop)
     (("1"
       (lemma "ntCP_lemma_aux1")
       (inst -1 "comp(sg1, rho1)" "comp(sg2, rho2)" "E" "p2" "e1p" "e2p")
       (("1"
         (expand Ambiguous?)
         (prop)
         (("1" (skosimp) (inst 2 "t1!1" "t2!1"))
          ("2"
           (lemma "subterm_ext_commute")
           (inst -1 "p2" "lhs(e1p)" "comp(sg1, rho1)")
           (assert)
           (hide-all-but (-1 -3 -9 -11 -13 1))
           (rewrite ext_o)
           (rewrite ext_o)
           (expand o (-1 1))
           (replaces -3)
           (replace -1 1 rl)
           (replace -4 1 rl)
           (replace -3 1 rl)
           (replace -2 1)
           (propax))
          ("3"
           (replace -1)
           (replace -2)
           (expand lhs)
           (expand rhs)
           (decompose-equality -1)
           (rewrite seq_o_empty)
           (replace -11)
           (hide 1 2)
           (inst 1 t1)
           (replace -14 1)
           (replace -16 1)
           (replace -13 -15)
           (hide-all-but (-15 1))
           (lemma ext_o)
           (inst-cp -1 sg1 rho1)
           (inst -1 sg2 rho2)
           (expand o)
           (decompose-equality -1)
           (decompose-equality -2)
           (inst-cp -2 "e2p`2")
           (inst -2 "e2p`1")
           (inst-cp -1 "e2p`2")
           (inst - "e2p`1")
           (replace -1 -5 rl)
           (replace -3 -5 rl)
           (replace -2 1 rl)
           (replace -4 1 rl)
           (hide -1 -2 -3 -4)
           (lemma same_substitution)
           (inst -1 "comp(sg1, rho1)" "comp(sg2, rho2)" "e2p`1")
           (typepred "e2p")
           (expand rewrite_rule?)
           (flatten)
           (expand subset?)
           (lemma same_term)
           (inst -1 "comp(sg1, rho1)" "comp(sg2, rho2)" "e2p`2")
           (expand RC)
           (expand* union member)
           (flatten)
           (hide 2)
           (assert)
           (skeep)
           (inst -2 x)
           (inst -3 x)
           (assert))))
        ("2" (hide-all-but 1) (rewrite subs_o))
        ("3" (hide-all-but 1) (rewrite subs_o))))
      ("2"
       (hide 1)
       (skolem -1 ("p1p" "p2p"))
       (expand Linear?)
       (flatten)
       (expand Left_Linear?)
       (expand Right_Linear?)
       (inst -12 e1p)
       (inst -13 e1p)
       (expand linear?)
       (inst -12 "subtermOF(lhs(e1p), p1p)")
       (("1"
         (inst -13 "subtermOF(lhs(e1p), p1p)")
         (("1"
           (lemma Orth_lemma_aux0)
           (inst -1 "rhs(e1p)" "subtermOF(lhs(e1p), p1p)")
           (assert)
           (skolem -1 pr)
           (flatten)
           (inst 1
            "replaceTerm( t1, ext(SigmaP(comp(sg1, rho1), ext(sg2)(ext(rho2)(rhs(e2p))),
                                                                                                                                         	    subtermOF(lhs(e1p), p1p), p2p))(rhs(e1p)), p1)")
           (("1"
             (prop)
             (("1"
               (expand RC)
               (expand* union member)
               (flatten)
               (hide 2)
               (expand reduction? 1)
               (inst 1 e2p "comp(sg2, rho2)" "p1 o (pr o p2p)")
               (("1"
                 (split)
                 (("1"
                   (lemma ext_preserv_pos)
                   (inst -1 pr "rhs(e1p)" "comp(sg1, rho1)")
                   (assert)
                   (rewrite ext_o)
                   (expand o -1)
                   (rewrite ext_o)
                   (expand o 1 3)
                   (replace -19 1 rl)
                   (replace -14 1)
                   (replaces -8)
                   (expand o -7)
                   (replace -3 -7 rl)
                   (lemma replace_preserv_pos)
                   (inst -1 p1 t "ext(sg1)(ext(rho1)(rhs(e1p)))")
                   (assert)
                   (lemma subterm_of_replace)
                   (inst -1 p1 t "ext(sg1)(ext(rho1)(rhs(e1p)))")
                   (assert)
                   (replace -19 -1 rl)
                   (replace -19 -2 rl)
                   (lemma pos_subterm)
                   (inst -1 "p1 o pr" p2p t1)
                   (prop)
                   (("1"
                     (case "p1 o pr o p2p = p1 o (pr o p2p)")
                     (("1"
                       (replace -1 1 rl)
                       (replace -2 1)
                       (lemma pos_o_term)
                       (inst -1 p1 pr t1)
                       (prop)
                       (("1"
                         (lemma pos_subterm)
                         (inst -1 p1 pr t1)
                         (assert)
                         (replaces -1)
                         (replace -4 1)
                         (replace -9 1)
                         (lemma subterm_ext_commute)
                         (inst -1 pr "rhs(e1p)" "comp(sg1, rho1)")
                         (("1"
                           (assert)
                           (rewrite ext_o)
                           (expand o -1)
                           (replace -1 1)
                           (replace -9 1)
                           (replace -22 1)
                           (lemma pos_subterm)
                           (inst -1 p1p p2p
                            "ext(sg1)(ext(rho1)(lhs(e1p)))")
                           (prop)
                           (("1"
                             (replace -1 1)
                             (lemma subterm_ext_commute)
                             (inst -1 p1p "lhs(e1p)" "comp(sg1, rho1)")
                             (("1"
                               (assert)
                               (rewrite ext_o)
                               (expand o -1)
                               (replace -1 1)
                               (propax))
                              ("2" (hide-all-but 1) (rewrite subs_o))))
                            ("2"
                             (hide 2)
                             (lemma pos_o_term)
                             (inst -1 p1p p2p
                              "ext(sg1)(ext(rho1)(lhs(e1p)))")
                             (prop)
                             (("1"
                               (lemma ext_preserv_pos)
                               (inst -1 p1p "lhs(e1p)" "comp(sg1, rho1)")
                               (("1"
                                 (assert)
                                 (rewrite ext_o)
                                 (expand o -1)
                                 (propax))
                                ("2" (hide-all-but 1) (rewrite subs_o))))
                              ("2"
                               (replace -9 -13)
                               (lemma subterm_ext_commute)
                               (inst -1 p1p "lhs(e1p)" "comp(sg1, rho1)")
                               (("1"
                                 (assert)
                                 (rewrite ext_o)
                                 (expand o -1)
                                 (replace -1 1)
                                 (propax))
                                ("2"
                                 (hide-all-but 1)
                                 (rewrite subs_o))))))))
                          ("2" (hide-all-but 1) (rewrite subs_o))))
                        ("2" (replace -3 1) (propax))))
                      ("2"
                       (hide-all-but 1)
                       (lemma o_assoc[posnat])
                       (inst -1 p1 pr p2p)
                       (assert))))
                    ("2"
                     (replace -1 -3 rl)
                     (lemma pos_o_term)
                     (inst -1 "p1 o pr" p2p t1)
                     (prop)
                     (("1"
                       (lemma pos_o_term)
                       (inst -1 p1 pr t1)
                       (assert))
                      ("2"
                       (lemma pos_o_term)
                       (inst -1 p1 pr t1)
                       (assert)
                       (lemma pos_subterm)
                       (inst -1 p1 pr t1)
                       (assert)
                       (replace -1 1)
                       (replace -3 1)
                       (lemma subterm_ext_commute)
                       (inst -1 pr "rhs(e1p)" "comp(sg1, rho1)")
                       (("1"
                         (assert)
                         (rewrite ext_o)
                         (expand o -1)
                         (replace -1 1)
                         (propax))
                        ("2" (hide-all-but 1) (rewrite subs_o))))))))
                  ("2"
                   (lemma SigmaP_vs_replaceTerm_linearR)
                   (inst -1 pr p2p "rhs(e1p)" "comp(sg1, rho1)"
                    "ext(sg2)(ext(rho2)(rhs(e2p)))"
                    "subtermOF(rhs(e1p), pr)")
                   (("1"
                     (assert)
                     (replace -3 1 rl)
                     (replace -1 1)
                     (rewrite ext_o)
                     (expand o -7)
                     (rewrite ext_o)
                     (expand o 1 (1 3))
                     (hide -1)
                     (lemma replace_preserv_pos)
                     (inst -1 p1 t "ext(sg1)(ext(rho1)(rhs(e1p)))")
                     (assert)
                     (lemma subterm_of_replace)
                     (inst -1 p1 t "ext(sg1)(ext(rho1)(rhs(e1p)))")
                     (assert)
                     (replace -19 (-1 -2) rl)
                     (replace -1 1 rl)
                     (lemma replace_associativity)
                     (inst -1 p1 "pr o p2p"
                      "ext(sg2)(ext(rho2)(rhs(e2p)))" t1
                      "subtermOF(t1, p1)")
                     (prop)
                     (("1"
                       (replace -1 1 rl)
                       (hide -1)
                       (lemma replace_subterm_of_term)
                       (inst -1 p1 t1)
                       (assert))
                      ("2"
                       (hide 2)
                       (lemma ext_preserv_pos)
                       (inst -1 pr "rhs(e1p)" "comp(sg1, rho1)")
                       (("1"
                         (assert)
                         (rewrite ext_o)
                         (expand o -1)
                         (replace -5 -9 rl)
                         (lemma subterm_ext_commute)
                         (inst -1 pr "rhs(e1p)" "comp(sg1, rho1)")
                         (("1"
                           (assert)
                           (rewrite ext_o)
                           (expand o -1)
                           (replace -1 -10 rl)
                           (hide -1)
                           (replace -2 (-1 -9) rl)
                           (lemma pos_o_term)
                           (inst -1 pr p2p "subtermOF(t1, p1)")
                           (assert))
                          ("2" (hide-all-but 1) (rewrite subs_o))))
                        ("2" (hide-all-but 1) (rewrite subs_o))))))
                    ("2"
                     (hide-all-but (-2 -5 1))
                     (replaces -1)
                     (expand V)
                     (propax))))))
                ("2"
                 (rewrite ext_o)
                 (expand o -6)
                 (lemma replace_preserv_pos)
                 (inst -1 p1 t "ext(sg1)(ext(rho1)(rhs(e1p)))")
                 (assert)
                 (replace -18 -1 rl)
                 (lemma subterm_of_replace)
                 (inst -1 p1 t "ext(sg1)(ext(rho1)(rhs(e1p)))")
                 (assert)
                 (replace -19 -1 rl)
                 (lemma ext_preserv_pos)
                 (inst -1 pr "rhs(e1p)" "comp(sg1, rho1)")
                 (("1"
                   (assert)
                   (rewrite ext_o)
                   (expand o -1)
                   (replace -5 -9 rl)
                   (replace -2 -1 rl)
                   (lemma subterm_ext_commute)
                   (inst -1 pr "rhs(e1p)" "comp(sg1, rho1)")
                   (("1"
                     (assert)
                     (rewrite ext_o)
                     (expand o -1)
                     (replace -1 -10 rl)
                     (replace -3 -10 rl)
                     (lemma pos_o_term)
                     (inst -1 pr p2p "subtermOF(t1, p1)")
                     (assert)
                     (lemma pos_o_term)
                     (inst -1 p1 "pr o p2p" t1)
                     (assert))
                    ("2" (hide-all-but 1) (rewrite subs_o))))
                  ("2" (hide-all-but 1) (rewrite subs_o))))
                ("3" (hide-all-but 1) (rewrite subs_o))))
              ("2"
               (expand* RC union member)
               (flatten)
               (hide 2)
               (expand reduction?)
               (inst 1 e1p
                "SigmaP(comp(sg1, rho1),
                                                                                                                                    ext(sg2)(ext(rho2)(rhs(e2p))),
                                                                                                                                    subtermOF(lhs(e1p), p1p), p2p)"
                p1)
               (("1"
                 (split)
                 (("1"
                   (lemma replace_preserv_pos)
                   (inst -1 p3 t "ext(sg2)(ext(rho2)(rhs(e2p)))")
                   (assert)
                   (replace -20 -1 rl)
                   (replace -14 -1)
                   (lemma pos_ax)
                   (inst -1 p1 p2 t2)
                   (assert)
                   (replace -15 (-14 -20))
                   (replace -21 1)
                   (replace -15 1)
                   (replace -10 1)
                   (lemma SigmaP_vs_replaceTerm_linearR)
                   (replace -6 1)
                   (inst -1 p1p p2p "lhs(e1p)" "comp(sg1, rho1)"
                    "ext(sg2)(ext(rho2)(rhs(e2p)))"
                    "subtermOF(lhs(e1p), p1p)")
                   (assert)
                   (rewrite ext_o -1)
                   (expand o -1 1)
                   (assert))
                  ("2"
                   (lemma replace_dominance)
                   (copy -1)
                   (inst -1 p1 empty_seq
                    "ext(SigmaP(comp(sg1, rho1),
                                                                                                                                                             ext(sg2)(ext(rho2)(rhs(e2p))),
                                                                                                                                                             subtermOF(lhs(e1p), p1p), p2p))
                                                                                                                                                             (rhs(e1p))"
                    t "ext(sg1)(ext(rho1)(rhs(e1p)))")
                   (rewrite seq_o_empty -1)
                   (assert)
                   (replace -19 -1 rl)
                   (inst -2 p1 p2
                    "ext(SigmaP(comp(sg1, rho1),
                                                                                                                                                             ext(sg2)(ext(rho2)(rhs(e2p))),
                                                                                                                                                             subtermOF(lhs(e1p), p1p), p2p))
                                                                                                                                                             (rhs(e1p))"
                    t "ext(sg2)(ext(rho2)(rhs(e2p)))")
                   (assert))))
                ("2"
                 (lemma replace_preserv_pos)
                 (inst -1 p3 t "ext(sg2)(ext(rho2)(rhs(e2p)))")
                 (assert)
                 (replace -20 -1 rl)
                 (lemma pos_ax)
                 (inst -1 p1 p2 t2)
                 (assert))
                ("3"
                 (rewrite SigmaP_Subs)
                 (expand comp 1)
                 (rewrite ext_o)
                 (expand o -6)
                 (expand ext -6 2)
                 (propax))
                ("4" (expand ext -6) (propax))))))
            ("2"
             (lemma replace_preserv_pos)
             (inst -1 p1 t "ext(sg1)(ext(rho1)(rhs(e1p)))")
             (assert))
            ("3" (rewrite SigmaP_Subs) (expand ext -6) (propax))
            ("4" (expand ext -6) (propax))))
          ("2"
           (expand member)
           (inst 2 t1)
           (prop)
           (("1" (expand* RC union member))
            ("2"
             (expand* RC union member)
             (flatten)
             (hide 2)
             (expand reduction?)
             (inst 1 e1p
              "SigmaP(comp(sg1, rho1), ext(sg2)(ext(rho2)(rhs(e2p))),
                                                                                                         subtermOF(lhs(e1p), p1p), p2p)"
              p1)
             (("1"
               (split)
               (("1"
                 (replace -11 -6 rl)
                 (replace -16 -6 rl)
                 (replace -6 1)
                 (lemma SigmaP_vs_replaceTerm_linearR)
                 (inst -1 p1p p2p "lhs(e1p)" "comp(sg1, rho1)"
                  "ext(sg2)(ext(rho2)(rhs(e2p)))"
                  "subtermOF(lhs(e1p), p1p)")
                 (assert)
                 (replace -2 -1 rl)
                 (rewrite ext_o -1)
                 (expand o -1 1)
                 (assert))
                ("2"
                 (lemma replace_dominance)
                 (inst -1 p1 p2
                  "ext(SigmaP(comp(sg1, rho1),
                                                                                                                                                ext(sg2)(ext(rho2)(rhs(e2p))),
                                                                                                                                                subtermOF(lhs(e1p), p1p), p2p))
                                                                                                                                                (rhs(e1p))"
                  t "ext(sg2)(ext(rho2)(rhs(e2p)))")
                 (assert)
                 (replace -12 -1 rl)
                 (replace -17 1)
                 (replace -1 1)
                 (hide -1)
                 (replace -14 1)
                 (lemma equality_replaceTerm)
                 (inst -1 p1 t "ext(sg1)(ext(rho1)(rhs(e1p)))"
                  "ext(SigmaP(comp(sg1, rho1),
                                                                                                                                                                           ext(sg2)(ext(rho2)(rhs(e2p))),
                                                                                                                                                                           subtermOF(lhs(e1p), p1p), p2p))
                                                                                                                                                                           (rhs(e1p))")
                 (prop)
                 (hide 1 3)
                 (lemma SigmaP_equivalence)
                 (inst -1 p2p "rhs(e1p)" "comp(sg1, rho1)"
                  "ext(sg2)(ext(rho2)(rhs(e2p)))"
                  "subtermOF(lhs(e1p), p1p)")
                 (prop)
                 (("1" (rewrite ext_o -1) (expand o -1) (assert))
                  ("2" (expand member) (propax))))))
              ("2"
               (lemma replace_preserv_pos)
               (inst -1 p3 t "ext(sg2)(ext(rho2)(rhs(e2p)))")
               (assert)
               (replace -17 -1 rl)
               (replace -12 -1)
               (lemma pos_ax)
               (inst -1 p1 p2 t2)
               (assert))
              ("3" (rewrite SigmaP_Subs) (expand ext -4) (propax))
              ("4" (expand ext -4) (assert))))))))
        ("2"
         (expand* V member)
         (split)
         (("1" (propax)) ("2" (expand Vars 1) (inst 1 p1p))))))
      ("3"
       (rewrite ext_o 1)
       (expand o 1)
       (lemma pos_subterm_ax)
       (inst -1 p1 p2 t)
       (assert))))
    ("2" (hide-all-but 1) (rewrite subs_o))))


