# Proofs

proof_type: f_proof
decl_type: formula
library: TRS
theory: robinsonunificationEF
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (name-replace "fd"
    "first_diff(subtermOF(s!1, p!1), subtermOF(t!1, p!1))" :hide? nil)
   (name-replace "sig1"
    "link_of_frst_diff(subtermOF(s!1, p!1), subtermOF(t!1, p!1))" :hide?
    nil)
   (assert)
   (name-replace "np"
    "next_position(ext(sig1)(s!1), ext(sig1)(t!1), p!1 o fd)" :hide? nil)
   (prop)
   (lemma child_p_o_fd)
   (inst -1 sig1 s!1 t!1 p!1)
   (replace -4)
   (assert)
   (ground)
   (hide -7)
   (lemma lwc_p_o_fd)
   (inst -1 sig1 s!1 t!1 p!1)
   (replace -5)
   (assert)
   (ground)
   (hide -7)
   (lemma next_pos_empty_equal_subterm)
   (inst -1 "ext(sig1)(s!1)" "ext(sig1)(t!1)" "p!1 o fd")
   (("1"
     (assert)
     (ground)
     (case "NOT p!1 o fd = empty_seq")
     (("1"
       (case "subtermOF(ext(sig1)(s!1), p!1 o fd) = subtermOF(ext(sig1)(t!1), p!1 o fd)")
       (("1"
         (lemma equal_term)
         (inst -1 "ext(sig1)(s!1)" "ext(sig1)(t!1)" "p!1 o fd")
         (assert)
         (ground))
        ("2"
         (hide -1 -2 -3 -4 -7 4)
         (typepred p!1)
         (lemma position_s_first_diff)
         (inst -1 "subtermOF(s!1, p!1)" "subtermOF(t!1, p!1)" "fd")
         (lemma position_t_first_diff)
         (inst -1 "subtermOF(s!1, p!1)" "subtermOF(t!1, p!1)" "fd")
         (assert)
         (lemma pos_o_term)
         (inst-cp -1 p!1 fd s!1)
         (inst -1 p!1 fd t!1)
         (assert)
         (lemma pos_subterm)
         (inst-cp -1 p!1 fd s!1)
         (inst -1 p!1 fd t!1)
         (assert)
         (rewrite subterm_ext_commute)
         (rewrite subterm_ext_commute)
         (replace -1)
         (replace -2)
         (name-replace "sp" "subtermOF(s!1, p!1)")
         (name-replace "tp" "subtermOF(t!1, p!1)")
         (copy -10)
         (expand link_of_frst_diff -1)
         (replace -12)
         (expand member)
         (lift-if)
         (ground)
         (("1"
           (decompose-equality -1)
           (inst -1 "subtermOF(sp, fd)")
           (expand ext 3 1)
           (replace -1 3 rl)
           (lemma idemp_sub_term_empty_inter)
           (inst -1 "subtermOF(tp, fd)" "sig1")
           (assert)
           (expand* empty? intersection member)
           (skosimp)
           (lemma dom_link_of_frst_diff_is)
           (inst -1 fd sp tp)
           (replace -14)
           (expand* restrict singleton)
           (decompose-equality -1)
           (inst -1 x!1)
           (assert))
          ("2"
           (decompose-equality -1)
           (inst -1 "subtermOF(tp, fd)")
           (expand ext 4 2)
           (replace -1 4 rl)
           (lemma idemp_sub_term_empty_inter)
           (inst -1 "subtermOF(sp, fd)" "sig1")
           (assert)
           (expand* empty? intersection member)
           (skosimp)
           (lemma dom_link_of_frst_diff_is)
           (inst -1 fd sp tp)
           (expand* restrict singleton)
           (replace -14)
           (decompose-equality -1)
           (inst -1 x!1)
           (assert))))
        ("3"
         (hide -1 -2 -3 -4 -5 -7 2 3 4)
         (typepred p!1)
         (hide -3)
         (lemma position_s_first_diff)
         (inst -1 "subtermOF(s!1, p!1)" "subtermOF(t!1, p!1)" fd)
         (lemma position_t_first_diff)
         (inst -1 "subtermOF(s!1, p!1)" "subtermOF(t!1, p!1)" fd)
         (assert)
         (lemma pos_o_term)
         (inst-cp -1 p!1 fd s!1)
         (inst -1 p!1 fd t!1)
         (assert)
         (rewrite ext_preserv_pos))
        ("4"
         (hide -1 -2 -3 -4 -5 -7 2 3 4)
         (typepred p!1)
         (hide -2 -3)
         (lemma position_s_first_diff)
         (inst -1 "subtermOF(s!1, p!1)" "subtermOF(t!1, p!1)" fd)
         (lemma pos_o_term)
         (inst -1 p!1 fd s!1)
         (assert)
         (assert)
         (rewrite ext_preserv_pos))))
      ("2"
       (hide -2 -3 -4 -5 -8)
       (lemma seq_empty[posnat])
       (inst -1 p!1 fd)
       (assert)
       (flatten)
       (rewrite empty_0 -2)
       (hide -3)
       (rewrite empty_0 -1)
       (replaces -1)
       (rewrite subterm_empty_seq)
       (rewrite subterm_empty_seq)
       (copy -2)
       (expand link_of_frst_diff -1)
       (replace -4)
       (replace -2)
       (rewrite subterm_empty_seq)
       (rewrite subterm_empty_seq)
       (lift-if)
       (ground)
       (("1"
         (decompose-equality -1)
         (inst -1 s!1)
         (expand ext 3 1)
         (replace -1 3 rl)
         (lemma idemp_sub_term_empty_inter)
         (inst -1 t!1 sig1)
         (assert)
         (expand* empty? intersection member)
         (skosimp)
         (lemma dom_link_of_frst_diff_is)
         (inst -1 fd s!1 t!1)
         (expand* restrict singleton)
         (replace -6)
         (rewrite subterm_empty_seq)
         (rewrite subterm_empty_seq)
         (replace -7)
         (assert)
         (decompose-equality -1)
         (inst -1 x!1)
         (assert))
        ("2"
         (decompose-equality -1)
         (inst -1 t!1)
         (expand ext 4 2)
         (replace -1 4 rl)
         (lemma idemp_sub_term_empty_inter)
         (inst -1 s!1 sig1)
         (assert)
         (expand* empty? intersection member)
         (skosimp)
         (lemma dom_link_of_frst_diff_is)
         (inst -1 fd s!1 t!1)
         (expand* restrict singleton)
         (replace -6)
         (rewrite subterm_empty_seq)
         (rewrite subterm_empty_seq)
         (replace -7)
         (assert)
         (decompose-equality -1)
         (inst -1 x!1)
         (assert))))))
    ("2"
     (prop)
     (("1"
       (hide -1 -2 -3 -4 -6 2 3)
       (lemma position_s_first_diff)
       (inst -1 "subtermOF(s!1, p!1)" "subtermOF(t!1, p!1)" "fd")
       (assert)
       (typepred p!1)
       (hide -2 -3)
       (lemma pos_o_term)
       (inst -1 p!1 fd s!1)
       (assert)
       (rewrite ext_preserv_pos))
      ("2"
       (hide -1 -2 -3 -4 -6 2 3)
       (lemma position_t_first_diff)
       (inst -1 "subtermOF(s!1, p!1)" "subtermOF(t!1, p!1)" "fd")
       (assert)
       (typepred p!1)
       (hide -1 -3)
       (lemma pos_o_term)
       (inst -1 p!1 fd t!1)
       (assert)
       (rewrite ext_preserv_pos))
      ("3"
       (hide -2 -3 -4 -7)
       (lemma seq_empty[posnat])
       (inst -1 p!1 fd)
       (assert)
       (flatten)
       (rewrite empty_0 -2)
       (hide -3)
       (rewrite empty_0 -1)
       (replaces -1)
       (rewrite subterm_empty_seq)
       (rewrite subterm_empty_seq)
       (copy -2)
       (expand link_of_frst_diff -1)
       (replace -4)
       (replace -2)
       (rewrite subterm_empty_seq)
       (rewrite subterm_empty_seq)
       (lift-if)
       (ground)
       (("1"
         (decompose-equality -1)
         (inst -1 s!1)
         (expand ext 3 1)
         (replace -1 3 rl)
         (lemma idemp_sub_term_empty_inter)
         (inst -1 t!1 sig1)
         (assert)
         (expand* empty? intersection member)
         (skosimp)
         (lemma dom_link_of_frst_diff_is)
         (inst -1 fd s!1 t!1)
         (expand* restrict singleton)
         (replace -6)
         (rewrite subterm_empty_seq)
         (rewrite subterm_empty_seq)
         (replace -7)
         (assert)
         (decompose-equality -1)
         (inst -1 x!1)
         (assert))
        ("2"
         (decompose-equality -1)
         (inst -1 t!1)
         (expand ext 4 2)
         (replace -1 4 rl)
         (lemma idemp_sub_term_empty_inter)
         (inst -1 s!1 sig1)
         (assert)
         (expand* empty? intersection member)
         (skosimp)
         (lemma dom_link_of_frst_diff_is)
         (inst -1 fd s!1 t!1)
         (expand* restrict singleton)
         (replace -6)
         (rewrite subterm_empty_seq)
         (rewrite subterm_empty_seq)
         (replace -7)
         (assert)
         (decompose-equality -1)
         (inst -1 x!1)
         (assert))))))))


proof_type: f_proof
decl_type: formula
library: TRS
theory: robinsonunificationEF
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (name-replace "fd"
    "first_diff(subtermOF(s!1, p!1), subtermOF(t!1, p!1))" :hide? nil)
   (name-replace "sig1"
    "link_of_frst_diff(subtermOF(s!1, p!1), subtermOF(t!1, p!1))" :hide?
    nil)
   (assert)
   (name-replace "np"
    "next_position(ext(sig1)(s!1), ext(sig1)(t!1), p!1 o fd)" :hide? nil)
   (prop)
   (lemma child_p_o_fd)
   (inst -1 sig1 s!1 t!1 p!1)
   (replace -4)
   (assert)
   (ground)
   (hide -6)
   (lemma lwc_p_o_fd)
   (inst -1 sig1 s!1 t!1 p!1)
   (replace -5)
   (assert)
   (ground)
   (hide -6)
   (case "subtermOF(ext(sig1)(s!1), p!1 o fd) = subtermOF(ext(sig1)(t!1), p!1 o fd)")
   (("1"
     (lemma next_pos_equal_subterm)
     (inst -1 "ext(sig1)(s!1)" "ext(sig1)(t!1)" "p!1 o fd")
     (("1" (assert) (replace -5) (ground))
      ("2"
       (hide -2 -3 -4 3)
       (typepred p!1)
       (lemma position_s_first_diff)
       (inst -1 "subtermOF(s!1, p!1)" "subtermOF(t!1, p!1)" "fd")
       (lemma position_t_first_diff)
       (inst -1 "subtermOF(s!1, p!1)" "subtermOF(t!1, p!1)" "fd")
       (assert)
       (lemma pos_o_term)
       (inst-cp -1 p!1 fd s!1)
       (inst -1 p!1 fd t!1)
       (assert)
       (rewrite ext_preserv_pos)
       (rewrite ext_preserv_pos)
       (skosimp)
       (replace -7)
       (rewrite subterm_empty_seq)
       (rewrite subterm_empty_seq)
       (hide-all-but (-8 3))
       (assert))))
    ("2"
     (hide -1 -2 -3 3 4)
     (lemma position_s_first_diff)
     (inst -1 "subtermOF(s!1, p!1)" "subtermOF(t!1, p!1)" fd)
     (lemma position_t_first_diff)
     (inst -1 "subtermOF(s!1, p!1)" "subtermOF(t!1, p!1)" fd)
     (assert)
     (lemma pos_o_term)
     (inst-cp -1 p!1 fd s!1)
     (inst -1 p!1 fd t!1)
     (assert)
     (rewrite subterm_ext_commute)
     (rewrite subterm_ext_commute)
     (lemma pos_subterm)
     (inst-cp -1 p!1 fd s!1)
     (inst -1 p!1 fd t!1)
     (assert)
     (replace -1)
     (replace -2)
     (name-replace "sp" "subtermOF(s!1, p!1)")
     (name-replace "tp" "subtermOF(t!1, p!1)")
     (copy -7)
     (expand link_of_frst_diff -1)
     (replace -9)
     (expand member)
     (lift-if)
     (ground)
     (("1"
       (decompose-equality -1)
       (inst -1 "subtermOF(sp, fd)")
       (expand ext 2 1)
       (replace -1 2 rl)
       (lemma idemp_sub_term_empty_inter)
       (inst -1 "subtermOF(tp, fd)" "sig1")
       (assert)
       (expand* empty? intersection member)
       (skosimp)
       (lemma dom_link_of_frst_diff_is)
       (inst -1 fd sp tp)
       (expand* restrict singleton)
       (replace -12)
       (decompose-equality -1)
       (inst -1 x!1)
       (assert))
      ("2"
       (decompose-equality -1)
       (inst -1 "subtermOF(tp, fd)")
       (expand ext 3 2)
       (replace -1 3 rl)
       (lemma idemp_sub_term_empty_inter)
       (inst -1 "subtermOF(sp, fd)" "sig1")
       (assert)
       (expand* empty? intersection member)
       (skosimp)
       (lemma dom_link_of_frst_diff_is)
       (inst -1 fd sp tp)
       (expand* restrict singleton)
       (replace -12)
       (decompose-equality -1)
       (inst -1 x!1)
       (assert))))
    ("3"
     (hide -1 -2 -3 -4 2 3 4)
     (lemma position_t_first_diff)
     (inst -1 "subtermOF(s!1, p!1)" "subtermOF(t!1, p!1)" "fd")
     (assert)
     (typepred p!1)
     (hide -1 -3)
     (lemma pos_o_term)
     (inst -1 p!1 fd t!1)
     (assert)
     (rewrite ext_preserv_pos))
    ("4"
     (hide -1 -2 -3 -4 2 3 4)
     (lemma position_s_first_diff)
     (inst -1 "subtermOF(s!1, p!1)" "subtermOF(t!1, p!1)" "fd")
     (assert)
     (typepred p!1)
     (hide -2 -3)
     (lemma pos_o_term)
     (inst -1 p!1 fd s!1)
     (assert)
     (rewrite ext_preserv_pos))))


proof_type: f_proof
decl_type: formula
library: TRS
theory: robinsonunificationEF
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (assert)
   (name "sig!1"
         "link_of_frst_diff(subtermOF(s!1, p!1), subtermOF(t!1, p!1))")
   (prop)
   (expand link_of_frst_diff -3)
   (lift-if)
   (prop)
   (("1"
     (name "p!2" "first_diff(subtermOF(s!1, p!1), subtermOF(t!1, p!1))")
     (replace -1)
     (decompose-equality -2)
     (case "xx = subtermOF(subtermOF(s!1, p!1), p!2)")
     (("1"
       (inst -2 "xx")
       (assert)
       (expand fail -2)
       (replace -1 1 rl)
       (replace -2 1)
       (hide-all-but 1)
       (expand* member Vars)
       (inst 1 "#(1)")
       (("1"
         (expand subtermOF 1)
         (rewrite empty_0)
         (lift-if)
         (prop)
         (("1" (hide-all-but -1) (grind))
          ("2"
           (expand finseq_appl)
           (case "#(xx)`seq(first( #(1)) - 1) = xx")
           (("1"
             (replace -1 2)
             (case "rest( #(1)) = empty_seq")
             (("1"
               (replace -1 2)
               (hide-all-but 2)
               (expand subtermOF)
               (rewrite empty_0))
              ("2"
               (hide-all-but 1)
               (lemma length_rest_0[posnat])
               (inst -1 "#(1)")
               (prop)
               (("1" (hide-all-but (-1 2)) (rewrite empty_0))
                ("2" (expand "#" -1) (assert))
                ("3" (expand "#" 1) (propax))))))
            ("2" (hide-all-but 1) (expand "#") (propax))
            ("3" (assert))))))
        ("2"
         (expand positionsOF)
         (assert)
         (expand* union IUnion member)
         (prop)
         (("1" (expand "#") (assert))
          ("2"
           (hide 1 2)
           (inst 1 1)
           (("1"
             (expand catenate)
             (expand finseq_appl)
             (inst 1 empty_seq)
             (split)
             (("1"
               (expand member)
               (expand positionsOF)
               (lift-if)
               (prop)
               (("1" (expand only_empty_seq) (propax))
                ("2" (expand only_empty_seq) (propax))
                ("3" (expand* union IUnion member only_empty_seq))))
              ("2" (grind))))
            ("2" (grind))))))))
      ("2"
       (inst -1 "subtermOF(subtermOF(s!1, p!1), p!2)")
       (expand fail)
       (assert)
       (expand id)
       (hide 1 2)
       (lemma first_diff_has_diff_argument)
       (inst -1 "subtermOF(s!1, p!1)" "subtermOF(t!1, p!1)" "p!2")
       (assert))))
    ("2"
     (lemma var_term_unifiable_not_var_in_term)
     (name "p!2" "first_diff(subtermOF(s!1, p!1), subtermOF(t!1, p!1))")
     (replace -1)
     (hide -1)
     (inst -1 "subtermOF(subtermOF(s!1, p!1), p!2)"
      "subtermOF(subtermOF(t!1, p!1), p!2)")
     (assert)
     (hide -1 -2)
     (split)
     (("1"
       (reveal -4)
       (lemma "position_s_first_diff")
       (inst -1 "subtermOF(s!1, p!1)" "subtermOF(t!1, p!1)" "p!2")
       (assert)
       (lemma "position_t_first_diff")
       (inst -1 "subtermOF(s!1, p!1)" "subtermOF(t!1, p!1)" "p!2")
       (assert)
       (lemma "pos_o_term")
       (inst -1 "p!1" "p!2" "s!1")
       (lemma "pos_o_term")
       (inst -1 "p!1" "p!2" "t!1")
       (assert)
       (lemma "pos_subterm")
       (inst -1 "p!1" "p!2" "s!1")
       (lemma "pos_subterm")
       (inst -1 "p!1" "p!2" "t!1")
       (assert)
       (replace -1 1 rl)
       (replace -2 1 rl)
       (hide-all-but (-9 1))
       (lemma unifiable_terms_unifiable_args)
       (expand unifiable)
       (skosimp)
       (inst 1 sigma!1)
       (inst -1 "sigma!1" "s!1" "t!1" "p!1 o p!2")
       (expand* member U)
       (assert))
      ("2"
       (hide-all-but 1)
       (reveal -6)
       (lemma first_diff_has_diff_argument)
       (inst?)
       (assert))))
    ("3"
     (decompose-equality -1)
     (name "p!2" "first_diff(subtermOF(s!1, p!1), subtermOF(t!1, p!1))")
     (replace -1)
     (case "xx = subtermOF(subtermOF(t!1, p!1), p!2)")
     (("1"
       (inst -3 "subtermOF(subtermOF(t!1, p!1), p!2)")
       (expand fail)
       (assert)
       (replace -1 1 rl)
       (replace -3 1)
       (hide-all-but 1)
       (expand* member Vars)
       (inst 1 "#(1)")
       (("1"
         (expand subtermOF 1)
         (rewrite empty_0)
         (lift-if)
         (prop)
         (("1" (hide-all-but -1) (grind))
          ("2"
           (expand finseq_appl)
           (case "#(xx)`seq(first( #(1)) - 1) = xx")
           (("1"
             (replace -1 2)
             (case "rest( #(1)) = empty_seq")
             (("1"
               (replace -1 2)
               (hide-all-but 2)
               (expand subtermOF)
               (rewrite empty_0))
              ("2"
               (hide-all-but 1)
               (lemma length_rest_0[posnat])
               (inst -1 "#(1)")
               (prop)
               (("1" (hide-all-but (-1 2)) (rewrite empty_0))
                ("2" (expand "#" -1) (assert))
                ("3" (expand "#" 1) (propax))))))
            ("2" (hide-all-but 1) (expand "#") (propax))
            ("3" (assert))))))
        ("2"
         (expand positionsOF)
         (assert)
         (expand* union IUnion member)
         (prop)
         (("1" (hide 1) (grind))
          ("2"
           (hide 1 2)
           (inst 1 1)
           (("1"
             (expand catenate)
             (expand finseq_appl)
             (inst 1 empty_seq)
             (split)
             (("1"
               (expand member)
               (expand positionsOF)
               (lift-if)
               (prop)
               (("1" (expand only_empty_seq) (propax))
                ("2" (expand only_empty_seq) (propax))
                ("3" (expand* union IUnion member only_empty_seq))))
              ("2" (grind))))
            ("2" (grind))))))))
      ("2"
       (inst -2 "subtermOF(subtermOF(t!1, p!1), p!2)")
       (expand fail)
       (assert)
       (expand id)
       (hide 1 2 3 -3 -4)
       (lemma first_diff_has_diff_argument)
       (inst -1 "subtermOF(s!1, p!1)" "subtermOF(t!1, p!1)" "p!2")
       (assert))))
    ("4"
     (lemma var_term_unifiable_not_var_in_term)
     (name-replace "p!2"
      "first_diff(subtermOF(s!1, p!1), subtermOF(t!1, p!1))" :hide? nil)
     (inst -2 "subtermOF(subtermOF(t!1, p!1), p!2)"
      "subtermOF(subtermOF(s!1, p!1), p!2)")
     (assert)
     (hide (-2 -3 -4 2))
     (lemma "position_s_first_diff")
     (inst -1 "subtermOF(s!1, p!1)" "subtermOF(t!1, p!1)" "p!2")
     (assert)
     (lemma "position_t_first_diff")
     (inst -1 "subtermOF(s!1, p!1)" "subtermOF(t!1, p!1)" "p!2")
     (assert)
     (lemma "pos_o_term")
     (inst -1 "p!1" "p!2" "s!1")
     (lemma "pos_o_term")
     (inst -1 "p!1" "p!2" "t!1")
     (assert)
     (lemma "pos_subterm")
     (inst -1 "p!1" "p!2" "s!1")
     (lemma "pos_subterm")
     (inst -1 "p!1" "p!2" "t!1")
     (assert)
     (replace -1 1 rl)
     (replace -2 1 rl)
     (hide-all-but (-8 1))
     (lemma unifiable_terms_unifiable_args)
     (expand unifiable)
     (skosimp)
     (inst 1 sigma!1)
     (inst -1 "sigma!1" "s!1" "t!1" "p!1 o p!2")
     (expand* member U)
     (assert)
     (hide -2)
     (expand "unifier")
     (assert))
    ("5"
     (name-replace "p!2"
      "first_diff(subtermOF(s!1, p!1), subtermOF(t!1, p!1))" :hide? nil)
     (lemma first_diff_unifiable_vars)
     (inst -1 "subtermOF(s!1, p!1)" "subtermOF(t!1, p!1)" "p!2")
     (assert)
     (hide-all-but (-3 1))
     (lemma unifiable_terms_unifiable_args)
     (expand unifiable)
     (skosimp)
     (inst 1 sigma!1)
     (inst -1 "sigma!1" "s!1" "t!1" "p!1")
     (expand* member U)
     (assert))))


proof_type: f_proof
decl_type: formula
library: TRS
theory: robinsonunificationEF
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (assert)
   (inst 1 rho!1)
   (name-replace "sig!1"
    "link_of_frst_diff(subtermOF(s!1, p!1), subtermOF(t!1, p!1))" :hide?
    nil)
   (decompose-equality 1)
   (copy -1)
   (expand link_of_frst_diff -1)
   (lift-if)
   (prop)
   (("1"
     (name-replace "p!2"
      "first_diff(subtermOF(s!1, p!1), subtermOF(t!1, p!1))" :hide? nil)
     (decompose-equality -2)
     (inst -1 x!1)
     (lift-if)
     (prop)
     (("1"
       (expand comp 2)
       (replace -2 2 rl)
       (replace -1 2)
       (lemma unifiable_terms_unifiable_args)
       (inst -1 rho!1 s!1 t!1 p!1)
       (assert)
       (lemma unifiable_terms_unifiable_args)
       (inst -1 "rho!1" "subtermOF(s!1, p!1)" "subtermOF(t!1, p!1)"
        "p!2")
       (("1"
         (assert)
         (hide-all-but (-1 -5 2))
         (expand* member U unifier)
         (expand ext -1 1)
         (propax))
        ("2"
         (hide-all-but (-4 1))
         (lemma "position_t_first_diff")
         (inst -1 "subtermOF(s!1, p!1)" "subtermOF(t!1, p!1)" "p!2")
         (lemma "position_s_first_diff")
         (inst -1 "subtermOF(s!1, p!1)" "subtermOF(t!1, p!1)" "p!2")
         (assert))))
      ("2"
       (expand comp 3)
       (replace -1 3 rl)
       (hide-all-but 3)
       (typepred x!1)
       (expand V)
       (expand ext)
       (assert))))
    ("2"
     (hide -1 -3 1)
     (lemma "unifiable_implies_not_fail1")
     (inst?)
     (replaces -3)
     (assert)
     (prop)
     (("1" (assert))
      ("2" (expand* "member" "U" "unifiable") (inst 1 "rho!1"))))
    ("3"
     (name-replace "p!2"
      "first_diff(subtermOF(s!1, p!1), subtermOF(t!1, p!1))" :hide? nil)
     (decompose-equality -2)
     (inst -1 x!1)
     (lift-if)
     (prop)
     (("1"
       (expand comp 3)
       (replace -2 3 rl)
       (replace -1 3)
       (lemma unifiable_terms_unifiable_args)
       (inst -1 rho!1 s!1 t!1 p!1)
       (assert)
       (lemma unifiable_terms_unifiable_args)
       (inst -1 "rho!1" "subtermOF(s!1, p!1)" "subtermOF(t!1, p!1)"
        "p!2")
       (("1"
         (assert)
         (hide-all-but (-1 -6 3))
         (expand* member U unifier)
         (expand ext -1 2)
         (assert))
        ("2"
         (hide-all-but (-4 1))
         (lemma "position_t_first_diff")
         (inst -1 "subtermOF(s!1, p!1)" "subtermOF(t!1, p!1)" "p!2")
         (lemma "position_s_first_diff")
         (inst -1 "subtermOF(s!1, p!1)" "subtermOF(t!1, p!1)" "p!2")
         (assert))))
      ("2"
       (expand comp 4)
       (replace -1 4 rl)
       (hide-all-but 4)
       (typepred x!1)
       (expand V)
       (expand ext)
       (assert))))
    ("4"
     (hide -1 -3 1 2)
     (lemma "unifiable_implies_not_fail1")
     (inst?)
     (replaces -3)
     (assert)
     (prop)
     (("1" (assert))
      ("2" (expand* "member" "U" "unifiable") (inst 1 "rho!1"))))
    ("5"
     (hide-all-but (-3 1 2))
     (lemma first_diff_unifiable_vars)
     (name-replace "p!2"
      "first_diff(subtermOF(s!1, p!1), subtermOF(t!1, p!1))" :hide? nil)
     (inst -2 "subtermOF(s!1, p!1)" "subtermOF(t!1, p!1)" "p!2")
     (assert)
     (hide (-1 2 3))
     (lemma "unifiable_terms_unifiable_args")
     (inst -1 "rho!1" "s!1" "t!1" "p!1")
     (assert)
     (expand* "member" "U" "unifiable")
     (inst 1 "rho!1"))))


proof_type: f_proof
decl_type: formula
library: TRS
theory: robinsonunificationEF
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (assert)
   (prop)
   (name-replace "sig!1"
    "link_of_frst_diff(subtermOF(s!1, p!1),
                                            subtermOF(t!1, p!1))")
   (lemma preserving_generality)
   (expand unifiable -2)
   (skosimp)
   (inst -1 "sigma!1" "subtermOF(s!1, p!1)" "subtermOF(t!1, p!1)")
   (lemma "unifiable_terms_unifiable_args")
   (inst?)
   (expand* "member" "U")
   (assert)
   (skosimp)
   (expand unifiable)
   (reveal -3)
   (replaces -1)
   (inst 1 theta!1)
   (hide -1)
   (expand unifier)
   (replaces -1)
   (rewrite ext_o)
   (expand o)
   (propax))


proof_type: f_proof
decl_type: formula
library: TRS
theory: robinsonunificationEF
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (measure-induct+
    "lex2(Card(union(Vars(s), Vars(t))),
                              Card(right_pos(s,p)))"
    ("s" "t" "p"))
   (("1"
     (case "subtermOF(x!1, x!3) = subtermOF(x!2, x!3)")
     (("1"
       (expand robinson_unification_algorithm_aux 1)
       (assert)
       (lift-if)
       (prop)
       (("1"
         (hide -3)
         (expand* subset? union member)
         (skosimp)
         (hide-all-but -2)
         (expand Dom)
         (flatten)
         (expand identity)
         (propax))
        ("2"
         (inst -2 x!1 x!2 "next_position(x!1, x!2, x!3)")
         (lemma robinson_unification_algorithm_aux_TCC8)
         (inst -1 x!1 x!2 x!3)
         (assert)
         (inst -1 "next_position(x!1, x!2, x!3)")
         (assert))))
      ("2"
       (expand robinson_unification_algorithm_aux 2)
       (assert)
       (name-replace "p!1"
        "first_diff(subtermOF(x!1, x!3),subtermOF(x!2, x!3))" :hide? nil)
       (name-replace "sig!1"
        "link_of_frst_diff(subtermOF(x!1, x!3),subtermOF(x!2, x!3))"
        :hide? nil)
       (name-replace "np"
        "next_position(ext(sig!1)(x!1),ext(sig!1)(x!2), x!3 o p!1)"
        :hide? nil)
       (("1"
         (lift-if)
         (prop)
         (("1"
           (hide-all-but (-1 -3 -6 2))
           (lemma unifiable_implies_not_fail1)
           (inst -1 "x!1" "x!2" "x!3")
           (replace -3)
           (assert))
          ("2"
           (hide-all-but (-3 -4 1 2 3))
           (lemma "dom_link_of_frst_diff_is")
           (inst -1 "p!1" "subtermOF(x!1, x!3)" "subtermOF(x!2, x!3)")
           (assert)
           (replace -2)
           (replace -3)
           (assert)
           (prop)
           (("1"
             (replaces -2)
             (expand "subset?")
             (skosimp*)
             (expand "member")
             (expand* "restrict" "union")
             (expand "member")
             (flatten)
             (hide 2)
             (expand "singleton")
             (expand "Vars")
             (lemma "pos_subterm")
             (inst?)
             (lemma "pos_o_term")
             (inst?)
             (lemma "position_s_first_diff")
             (inst -1 "subtermOF(x!1, x!3)" "subtermOF(x!2, x!3)" "p!1")
             (assert)
             (replace -3 -5 rl)
             (hide-all-but (-2 -5 1))
             (inst 1 "x!3 o p!1")
             (assert))
            ("2"
             (replaces -1)
             (expand "subset?")
             (skosimp*)
             (expand "member")
             (expand* "restrict" "union")
             (expand "member")
             (flatten)
             (hide (1 2))
             (expand "singleton")
             (expand "Vars")
             (lemma "pos_subterm")
             (inst?)
             (lemma "pos_o_term")
             (inst?)
             (lemma "position_t_first_diff")
             (inst -1 "subtermOF(x!1, x!3)" "subtermOF(x!2, x!3)" "p!1")
             (assert)
             (replace -3 -4 rl)
             (hide-all-but (-2 -4 1))
             (inst 1 "x!3 o p!1")
             (assert))))
          ("3"
           (inst -5 "ext(sig!1)(x!1)" "ext(sig!1)(x!2)" "np")
           (lemma "robinson_unification_algorithm_aux_TCC12")
           (inst -1 "x!1" "x!2" "x!3")
           (assert)
           (inst -1 "sig!1")
           (assert)
           (replace -5 -1)
           (inst -1 "np")
           (assert)
           (hide -1)
           (replaces -1)
           (lemma "unifiable_preserves_unifiability1")
           (inst?)
           (replace -3)
           (assert)
           (case "subset?(union(Vars(ext(sig!1)(x!1)), Vars(ext(sig!1)(x!2))), union(Vars(x!1), Vars(x!2)))")
           (("1"
             (hide-all-but (-1 -6 1))
             (expand subset?)
             (skosimp)
             (inst -1 "x!4")
             (inst -3 "x!4")
             (assert))
            ("2"
             (lemma "vars_ext_link_s_subset")
             (inst -1 "x!1" "x!2" "x!3")
             (replace -4)
             (assert)
             (lemma "vars_ext_link_t_subset")
             (inst -1 "x!1" "x!2" "x!3")
             (replace -5)
             (assert)
             (hide-all-but (-1 -2 1))
             (expand "subset?")
             (skosimp)
             (inst -1 x!4)
             (inst -2 x!4)
             (assert)
             (hide 3)
             (expand* union member)
             (assert))))
          ("4"
           (inst -4 "ext(sig!1)(x!1)" "ext(sig!1)(x!2)" "np")
           (lemma "robinson_unification_algorithm_aux_TCC12")
           (inst -1 "x!1" "x!2" "x!3")
           (assert)
           (inst -1 "sig!1")
           (assert)
           (replace -4 -1)
           (inst -1 "np")
           (assert)
           (hide -1)
           (lemma "unifiable_preserves_unifiability1")
           (inst?)
           (replace -3)
           (assert)
           (case "subset?(union(Vars(ext(sig!1)(x!1)), Vars(ext(sig!1)(x!2))),union(Vars(x!1), Vars(x!2)))")
           (("1"
             (case "subset?(Dom(sig!1), union(Vars(x!1), Vars(x!2)))")
             (("1"
               (hide-all-but (-1 -2 -7 2))
               (name-replace "RU"
                "robinson_unification_algorithm_aux(ext(sig!1)(x!1),
                                                                                                      ext(sig!1)(x!2),
                                                                                                      np)")
               (case "subset?(union(Dom(RU),Dom(sig!1)), union(Vars(x!1), Vars(x!2)))")
               (("1"
                 (hide (-2 -3 -4))
                 (lemma "dom_o")
                 (inst?)
                 (expand* "subset?" "member")
                 (skosimp*)
                 (inst -1 "x!4")
                 (inst -2 "x!4")
                 (assert))
                ("2"
                 (hide 2)
                 (expand* "subset?" "member")
                 (skosimp*)
                 (inst -2 "x!4")
                 (inst -3 "x!4")
                 (inst -4 "x!4")
                 (assert)
                 (hide (1 3))
                 (expand* "union" "member"))))
              ("2"
               (hide (-1 -2 -6 -7 2 3))
               (lemma "dom_link_of_frst_diff_is")
               (inst -1 "p!1" "subtermOF(x!1, x!3)"
                "subtermOF(x!2, x!3)")
               (replace -3)
               (assert)
               (prop)
               (("1"
                 (decompose-equality -2)
                 (expand* "subset?" "member")
                 (skosimp)
                 (inst -1 "x!4")
                 (iff)
                 (prop)
                 (hide (-1 -4))
                 (expand* "restrict" "singleton")
                 (lemma "position_s_first_diff")
                 (inst?)
                 (inst -1 "p!1")
                 (assert)
                 (lemma "pos_o_term")
                 (inst?)
                 (assert)
                 (lemma "pos_subterm")
                 (inst?)
                 (assert)
                 (replace -1 (-4 -5) rl)
                 (hide-all-but (-4 -5 1))
                 (expand* "union" "member")
                 (flatten)
                 (expand "Vars" 1)
                 (inst 1 "x!3 o p!1")
                 (assert))
                ("2"
                 (decompose-equality -1)
                 (expand* "subset?" "member")
                 (skosimp)
                 (inst -1 "x!4")
                 (iff)
                 (prop)
                 (hide (-1 -3))
                 (expand* "restrict" "singleton")
                 (lemma "position_t_first_diff")
                 (inst?)
                 (inst -1 "p!1")
                 (assert)
                 (lemma "pos_o_term")
                 (inst?)
                 (assert)
                 (lemma "pos_subterm")
                 (inst?)
                 (assert)
                 (replace -1 -4 rl)
                 (hide-all-but (-4 2))
                 (expand* "union" "member")
                 (flatten)
                 (expand "Vars" 2)
                 (inst 2 "x!3 o p!1")
                 (assert))))))
            ("2"
             (hide (-1 -5 -6 2 3))
             (lemma "vars_ext_link_s_subset")
             (inst?)
             (replace -3)
             (assert)
             (lemma "vars_ext_link_t_subset")
             (inst?)
             (replace -4)
             (assert)
             (hide-all-but (-1 -2 1))
             (expand* "subset?" "member")
             (skosimp)
             (inst -1 "x!4")
             (inst -2 "x!4")
             (assert)
             (hide 3)
             (expand* "union" "member"))))))
        ("2"
         (hide (-3 -4 3))
         (lemma "position_s_first_diff")
         (inst -1 "subtermOF(x!1, x!3)" "subtermOF(x!2, x!3)" "p!1")
         (assert)
         (lemma "pos_o_term")
         (inst -1 "x!3" "p!1" "x!1")
         (assert)
         (lemma "position_t_first_diff")
         (inst -1 "subtermOF(x!1, x!3)" "subtermOF(x!2, x!3)" "p!1")
         (assert)
         (lemma "pos_o_term")
         (inst -1 "x!3" "p!1" "x!2")
         (assert)
         (hide-all-but (-1 -3 1))
         (lemma "ext_preserv_pos")
         (inst -1 "x!3 o p!1" "x!1" "sig!1")
         (lemma "ext_preserv_pos")
         (inst -1 "x!3 o p!1" "x!2" "sig!1")
         (assert))))))
    ("2"
     (hide 2)
     (lemma "right_pos_subset")
     (inst?)
     (lemma "positions_of_terms_finite")
     (inst?)
     (lemma "finite_sets[position].finite_subset")
     (inst?)
     (assert))
    ("3"
     (hide 2)
     (rewrite finite_union)
     (("1" (rewrite vars_of_term_finite))
      ("2" (rewrite vars_of_term_finite))))
    ("4"
     (hide 2)
     (lemma "right_pos_subset")
     (inst?)
     (lemma "positions_of_terms_finite")
     (inst?)
     (lemma "finite_sets[position].finite_subset")
     (inst?)
     (assert))
    ("5"
     (hide 2)
     (rewrite finite_union)
     (("1" (rewrite vars_of_term_finite))
      ("2" (rewrite vars_of_term_finite))))
    ("6"
     (hide 2)
     (lemma "right_pos_subset")
     (inst?)
     (lemma "positions_of_terms_finite")
     (inst?)
     (lemma "finite_sets[position].finite_subset")
     (inst?)
     (assert))
    ("7"
     (hide 2)
     (rewrite finite_union)
     (("1" (rewrite vars_of_term_finite))
      ("2" (rewrite vars_of_term_finite))))
    ("8"
     (hide 2)
     (lemma "right_pos_subset")
     (inst?)
     (lemma "positions_of_terms_finite")
     (inst?)
     (lemma "finite_sets[position].finite_subset")
     (inst?)
     (assert))
    ("9"
     (hide 2)
     (rewrite finite_union)
     (("1" (rewrite vars_of_term_finite))
      ("2" (rewrite vars_of_term_finite))))
    ("10"
     (hide 2)
     (lemma "right_pos_subset")
     (inst?)
     (lemma "positions_of_terms_finite")
     (inst?)
     (lemma "finite_sets[position].finite_subset")
     (inst?)
     (assert))
    ("11"
     (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: robinsonunificationEF
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (assert)
   (expand "robinson_unification_algorithm_EF")
   (lemma "dom_ruaEF_subset_union_vars_aux")
   (inst -1 "s!1" "t!1" "empty_seq")
   (assert))


proof_type: f_proof
decl_type: formula
library: TRS
theory: robinsonunificationEF
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (name-replace "sig!1"
    "link_of_frst_diff(subtermOF(s!1, p!1), subtermOF(t!1, p!1))" :hide?
    nil)
   (name-replace "pi!1"
    "first_diff(subtermOF(s!1, p!1), subtermOF(t!1, p!1))" :hide? nil)
   (name-replace "np!1"
    "next_position(ext(sig!1)(s!1), ext(sig!1)(t!1), p!1 o pi!1)" :hide?
    nil)
   (("1"
     (name-replace "sig!2"
      "robinson_unification_algorithm_aux(ext(sig!1)(s!1), ext(sig!1)(t!1), np!1)"
      :hide? nil)
     (("1"
       (assert)
       (replace -2)
       (replace -1)
       (prop)
       (expand* "subset?" "union" "difference" "member")
       (skosimp)
       (split)
       (("1"
         (expand* "VRan" "IUnion")
         (skosimp)
         (expand "comp")
         (lemma "dom_o")
         (inst -1 "sig!2" "sig!1")
         (expand* "subset?" "union" "member")
         (inst -1 "i!1")
         (assert)
         (split)
         (("1"
           (case "Dom(sig!1)(i!1)")
           (("1"
             (lemma "dom_ruaEF_subset_union_vars_aux")
             (inst -1 "ext(sig!1)(s!1)" "ext(sig!1)(t!1)" "np!1")
             (assert)
             (replace -4)
             (lemma "unifiable_preserves_unifiability1")
             (inst -1 s!1 t!1 p!1)
             (replace -8)
             (assert)
             (expand "subset?")
             (inst -2 "i!1")
             (expand* "union" "member")
             (split)
             (("1"
               (lemma "ext_link_remove_x")
               (inst -1 "i!1" "s!1" "t!1" "p!1")
               (replace -9)
               (assert)
               (lemma "unifiable_implies_not_fail1")
               (inst -1 "s!1" "t!1" "p!1")
               (replace -10)
               (assert)
               (expand "member")
               (propax))
              ("2"
               (lemma "ext_link_remove_x")
               (inst -1 "i!1" "s!1" "t!1" "p!1")
               (replace -9)
               (assert)
               (lemma "unifiable_implies_not_fail1")
               (inst -1 "s!1" "t!1" "p!1")
               (replace -10)
               (assert)
               (expand "member")
               (propax))))
            ("2"
             (expand "Dom" 1)
             (flatten)
             (replace -1)
             (typepred "i!1")
             (expand "V")
             (assert)
             (hide-all-but (-4 -10 2))
             (inst 1 "i!1")
             (expand "ext")
             (propax))))
          ("2"
           (case "NOT member(x!1, Vars(sig!1(i!1)))")
           (("1"
             (lemma "var_ext_term_exists_var_term")
             (inst -1 "sig!1(i!1)" "sig!2" "x!1")
             (expand "member")
             (skosimp)
             (typepred "y!1")
             (case "Dom(sig!2)(y!1)")
             (("1" (inst 3 "y!1"))
              ("2"
               (expand "Dom" 1)
               (flatten)
               (replace -1)
               (expand "Vars" -4)
               (skosimp)
               (case "p!2 = empty_seq")
               (("1"
                 (replace -1)
                 (expand " subtermOF" -5)
                 (rewrite "empty_0" -5)
                 (replace -5 -4)
                 (propax))
                ("2"
                 (typepred "p!2")
                 (case "positionsOF(y!1) = only_empty_seq")
                 (("1"
                   (replace -1 -2)
                   (expand "only_empty_seq")
                   (propax))
                  ("2"
                   (hide-all-but (-3 1))
                   (expand* "V" "positionsOF")
                   (assert))))))))
            ("2" (inst 1 "i!1") (expand "member") (propax))))))
        ("2"
         (expand* "VRan" "IUnion")
         (skosimp)
         (lemma "dom_o")
         (inst -1 "sig!2" "sig!1")
         (expand* "subset?" "union" "member")
         (inst -1 "i!1")
         (assert)
         (split)
         (("1"
           (case "NOT Dom(sig!1)(i!1)")
           (("1"
             (expand "Dom" 1)
             (flatten)
             (expand "comp")
             (replace -1)
             (hide-all-but (-2 -9 1))
             (typepred "i!1")
             (hide -2)
             (expand* "V" "ext")
             (assert)
             (inst 1 "i!1"))
            ("2"
             (lemma "dom_ruaEF_subset_union_vars_aux")
             (inst -1 "ext(sig!1)(s!1)" "ext(sig!1)(t!1)" "np!1")
             (assert)
             (replace -5)
             (lemma "unifiable_preserves_unifiability1")
             (inst -1 "s!1" "t!1" "p!1")
             (replace -9)
             (assert)
             (expand* "subset?" "union" "member")
             (inst -2 "i!1")
             (assert)
             (lemma "ext_link_remove_x")
             (inst -1 "i!1" "s!1" "t!1" "p!1")
             (replace -10)
             (assert)
             (lemma "unifiable_implies_not_fail1")
             (inst -1 "s!1" "t!1" "p!1")
             (replace -11)
             (assert)
             (expand "member")
             (prop))))
          ("2"
           (lemma "var_ext_term_exists_var_term")
           (expand "comp" -9)
           (inst -1 "sig!1(i!1)" "sig!2" "x!1")
           (expand "member")
           (assert)
           (skosimp)
           (case "Dom(sig!2)(y!1)")
           (("1" (inst 1 "y!1"))
            ("2"
             (expand "Dom" 1)
             (flatten)
             (replace -1 -3)
             (expand "Vars" -3)
             (skosimp)
             (case "p!2 = empty_seq")
             (("1"
               (replace -1 -4)
               (expand "subtermOF" -4)
               (rewrite "empty_0" -4)
               (expand "Dom" -6)
               (assert))
              ("2"
               (typepred "p!2")
               (case "positionsOF(y!1) = only_empty_seq")
               (("1" (replace -1) (expand "only_empty_seq") (propax))
                ("2"
                 (hide-all-but 1)
                 (typepred "y!1")
                 (expand* "V" "positionsOF")
                 (assert))))))))))))
      ("2"
       (assert)
       (flatten)
       (hide 2)
       (lemma "robinson_unification_algorithm_aux_TCC11")
       (inst?)
       (assert)
       (inst -1 "sig!1")
       (lemma "unifiable_implies_not_fail1")
       (inst?)
       (assert)
       (inst -1 "np!1")
       (assert)
       (prop)
       (("1"
         (replace -1 1)
         (hide-all-but 1)
         (expand "positionsOF")
         (lift-if)
         (prop)
         (("1" (expand "only_empty_seq") (propax))
          ("2" (expand "only_empty_seq") (propax))
          ("3"
           (expand "union")
           (flatten)
           (hide (1 3 4))
           (expand* "member" "only_empty_seq"))))
        ("2"
         (replace -1 1)
         (hide-all-but 1)
         (expand "positionsOF")
         (lift-if)
         (prop)
         (("1" (expand "only_empty_seq") (propax))
          ("2" (expand "only_empty_seq") (propax))
          ("3"
           (expand "union")
           (flatten)
           (hide-all-but 2)
           (expand* "member" "only_empty_seq"))))))))
    ("2"
     (assert)
     (flatten)
     (hide 2)
     (lemma "robinson_unification_algorithm_aux_TCC10")
     (inst?)
     (assert)
     (inst -1 "sig!1")
     (lemma "unifiable_implies_not_fail1")
     (inst?)
     (assert)
     (replaces -2))))


proof_type: f_proof
decl_type: formula
library: TRS
theory: robinsonunificationEF
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (measure-induct+
    "lex2(Card(union(Vars(s), Vars(t))),
                                Card(right_pos(s,p)))"
    ("s" "t" "p"))
   (("1"
     (case "subtermOF(x!1, x!3) = subtermOF(x!2, x!3)")
     (("1"
       (expand "robinson_unification_algorithm_aux" 1)
       (assert)
       (lift-if)
       (prop)
       (("1"
         (hide -3)
         (expand "subset?")
         (skosimp)
         (hide-all-but -2)
         (expand* "member" "VRan" "IUnion")
         (skosimp)
         (typepred "i!1")
         (hide (-1 -3))
         (expand* "Dom" "identity"))
        ("2"
         (inst -2 x!1 x!2 "next_position(x!1, x!2, x!3)")
         (lemma "robinson_unification_algorithm_aux_TCC8")
         (inst -1 "x!1" "x!2" "x!3")
         (assert)
         (inst -1 "next_position(x!1, x!2, x!3)")
         (assert))))
      ("2"
       (expand robinson_unification_algorithm_aux 2)
       (assert)
       (name-replace "p!1"
        "first_diff(subtermOF(x!1, x!3),subtermOF(x!2, x!3))" :hide? nil)
       (name-replace "sig!1"
        "link_of_frst_diff(subtermOF(x!1, x!3),subtermOF(x!2, x!3))"
        :hide? nil)
       (name-replace "np"
        "next_position(ext(sig!1)(x!1),ext(sig!1)(x!2), x!3 o p!1)"
        :hide? nil)
       (("1"
         (lift-if)
         (prop)
         (("1"
           (hide-all-but (-1 -3 -6 2))
           (lemma "unifiable_implies_not_fail1")
           (inst -1 "x!1" "x!2" "x!3")
           (replace -3)
           (assert))
          ("2"
           (hide-all-but (-3 -4 1 2 3))
           (expand "subset?")
           (skosimp*)
           (expand "member")
           (expand* "VRan" "difference")
           (expand "member")
           (expand "IUnion")
           (skosimp*)
           (expand "union")
           (expand "member")
           (prop)
           (("1"
             (expand "Vars")
             (skosimp*)
             (expand "link_of_frst_diff")
             (replace -3)
             (lift-if)
             (prop)
             (("1"
               (decompose-equality -1)
               (inst -1 "i!1")
               (lift-if)
               (prop)
               (("1"
                 (typepred "p!2")
                 (replace -3 - rl)
                 (lemma "position_t_first_diff")
                 (inst -1 "subtermOF(x!1, x!3)" "subtermOF(x!2, x!3)"
                  "p!1")
                 (replace -7)
                 (hide-all-but (-1 -2 -6 3))
                 (lemma "pos_o_term")
                 (inst -1 "p!1" "p!2" "subtermOF(x!2, x!3)")
                 (assert)
                 (lemma "pos_o_term")
                 (inst -1 "x!3" "p!1 o p!2" "x!2")
                 (assert)
                 (lemma "pos_subterm")
                 (inst -1 "p!1" "p!2" "subtermOF(x!2, x!3)")
                 (assert)
                 (lemma "pos_subterm")
                 (inst -1 "x!3" "p!1 o p!2" "x!2")
                 (assert)
                 (replace -1 -2 rl)
                 (replace -2 -7 rl)
                 (hide-all-but (-7 1))
                 (inst 1 "x!3 o (p!1 o p!2)"))
                ("2"
                 (hide-all-but -1)
                 (typepred "i!1")
                 (expand "Dom")
                 (assert))))
              ("2" (assert))
              ("3"
               (decompose-equality -1)
               (inst -1 "i!1")
               (lift-if)
               (prop)
               (("1"
                 (typepred "p!2")
                 (replace -3 - rl)
                 (lemma "position_s_first_diff")
                 (inst -1 "subtermOF(x!1, x!3)" "subtermOF(x!2, x!3)"
                  "p!1")
                 (assert)
                 (hide-all-but (-1 -2 -6 3))
                 (lemma "pos_o_term")
                 (inst -1 "p!1" "p!2" "subtermOF(x!1, x!3)")
                 (assert)
                 (lemma "pos_o_term")
                 (inst -1 "x!3" "p!1 o p!2" "x!1")
                 (assert)
                 (lemma "pos_subterm")
                 (inst -1 "p!1" "p!2" "subtermOF(x!1, x!3)")
                 (assert)
                 (lemma "pos_subterm")
                 (inst -1 "x!3" "p!1 o p!2" "x!1")
                 (assert)
                 (replace -1 -2 rl)
                 (replace -2 -7 rl)
                 (hide-all-but (-7 1))
                 (inst 1 "x!3 o (p!1 o p!2)"))
                ("2"
                 (hide-all-but -1)
                 (typepred "i!1")
                 (expand "Dom")
                 (assert))))
              ("4" (assert)) ("5" (assert))))
            ("2"
             (typepred "x!4")
             (expand "V")
             (copy -4)
             (expand "link_of_frst_diff" -1)
             (replace -6)
             (lift-if)
             (prop)
             (("1"
               (decompose-equality -1)
               (inst -1 "x!4")
               (lift-if)
               (prop)
               (("1"
                 (expand "member")
                 (replace -2 1)
                 (replace -1 1 rl)
                 (typepred "i!1")
                 (lemma "dom_link_of_frst_diff_is")
                 (inst -1 "p!1" "subtermOF(x!1, x!3)"
                  "subtermOF(x!2, x!3)")
                 (replace -10 -1)
                 (assert)
                 (assert)
                 (decompose-equality -1)
                 (inst -1 "i!1")
                 (expand* "restrict" "singleton")
                 (assert))
                ("2" (expand "Dom") (assert))))
              ("2" (assert))
              ("3"
               (decompose-equality -1)
               (inst -1 "x!4")
               (lift-if)
               (prop)
               (("1"
                 (expand "member")
                 (hide -3)
                 (lemma "dom_link_of_frst_diff_is")
                 (inst -1 "p!1" "subtermOF(x!1, x!3)"
                  "subtermOF(x!2, x!3)")
                 (replace -7 -1)
                 (replace -8 -1)
                 (assert)
                 (assert)
                 (decompose-equality -1)
                 (inst -1 "i!1")
                 (expand* "restrict" "singleton")
                 (assert))
                ("2" (expand "Dom") (assert))))
              ("4" (assert)) ("5" (assert))))))
          ("3"
           (inst -5 "ext(sig!1)(x!1)" "ext(sig!1)(x!2)" "np")
           (replace -1)
           (lemma "robinson_unification_algorithm_aux_TCC12")
           (inst -1 "x!1" "x!2" "x!3")
           (assert)
           (inst -1 "sig!1")
           (assert)
           (replace -5 -1)
           (inst -1 "np")
           (assert)
           (hide -1)
           (hide -1)
           (lemma "unifiable_preserves_unifiability1")
           (inst?)
           (replace -3)
           (assert)
           (expand* "subset?" "difference" "union" "member")
           (skosimp)
           (inst -6 "x!4")
           (assert)
           (prop)
           (("1"
             (lemma "vars_ext_link_s_subset")
             (inst?)
             (replace -6)
             (assert)
             (expand* "subset?" "member")
             (inst -1 "x!4")
             (assert)
             (hide-all-but (-1 1 2))
             (expand* "union" "member"))
            ("2"
             (lemma "vars_ext_link_t_subset")
             (inst?)
             (replace -6)
             (assert)
             (expand* "subset?" "member")
             (inst -1 "x!4")
             (assert)
             (hide-all-but (-1 1 2))
             (expand* "union" "member"))))
          ("4"
           (name-replace "sig!2"
            "robinson_unification_algorithm_aux(ext(sig!1)(x!1), ext(sig!1)(x!2), np)"
            :hide? nil)
           (inst -5 "ext(sig!1)(x!1)" "ext(sig!1)(x!2)" np)
           (lemma robinson_unification_algorithm_aux_TCC12)
           (inst -1 x!1 x!2 x!3)
           (assert)
           (inst -1 sig!1)
           (assert)
           (replace -5)
           (inst -1 np)
           (assert)
           (hide -1)
           (replace -1)
           (lemma unifiable_preserves_unifiability1)
           (inst -1 x!1 x!2 x!3)
           (replace -4)
           (assert)
           (expand* subset? difference union member)
           (skosimp)
           (lemma vran_ruaEF_subset_union_aux)
           (inst -1 x!1 x!2 x!3)
           (replace -7)
           (replace -6)
           (assert)
           (replace -5)
           (replace -3)
           (expand subset?)
           (inst -1 x!4)
           (expand* difference union member)
           (prop)
           (("1"
             (inst -8 x!4)
             (assert)
             (prop)
             (("1"
               (hide-all-but (-1 -7 1 5))
               (lemma vars_ext_link_s_subset)
               (inst -1 x!1 x!2 x!3)
               (replace -3)
               (assert)
               (expand subset?)
               (inst -1 x!4)
               (expand* union member))
              ("2"
               (hide-all-but (-1 -7 2 5))
               (lemma vars_ext_link_t_subset)
               (inst -1 x!1 x!2 x!3)
               (replace -3)
               (assert)
               (expand subset?)
               (inst -1 x!4)
               (expand* union member))))
            ("2"
             (inst -9 "x!4")
             (assert)
             (prop)
             (("1"
               (lemma "dom_o")
               (inst -1 "sig!2" "sig!1")
               (expand "subset?")
               (inst -1 "x!4")
               (expand* "union" "member")
               (assert)
               (lemma "ext_link_remove_x")
               (inst -1 "x!4" "x!1" "x!2" "x!3")
               (replace -10)
               (assert)
               (expand member)
               (propax))
              ("2"
               (lemma "dom_o")
               (inst -1 "sig!2" "sig!1")
               (expand "subset?")
               (inst -1 "x!4")
               (expand* "union" "member")
               (assert)
               (lemma "ext_link_remove_x")
               (inst -1 "x!4" "x!1" "x!2" "x!3")
               (replace -10)
               (assert)
               (expand "member")
               (propax))))
            ("3"
             (lemma "dom_link_of_frst_diff_is")
             (inst -1 "p!1" "subtermOF(x!1, x!3)" "subtermOF(x!2, x!3)")
             (assert)
             (replace -7)
             (expand* "restrict" "singleton")
             (expand "VRan" -2)
             (expand "IUnion")
             (skosimp)
             (prop)
             (("1"
               (decompose-equality -2)
               (inst -1 "i!1")
               (assert)
               (replace -8 -3 rl)
               (expand "link_of_frst_diff" -3)
               (replace -9)
               (prop)
               (("1"
                 (expand "Vars" (-1 3))
                 (skosimp)
                 (typepred "p!2")
                 (lemma "position_t_first_diff")
                 (inst -1 "subtermOF(x!1, x!3)" "subtermOF(x!2, x!3)"
                  "p!1")
                 (replace -11)
                 (hide-all-but (-1 -2 -3 3))
                 (lemma "pos_o_term")
                 (inst -1 "p!1" "p!2" "subtermOF(x!2, x!3)")
                 (assert)
                 (lemma "pos_o_term")
                 (inst -1 "x!3" "p!1 o p!2" "x!2")
                 (assert)
                 (lemma "pos_subterm")
                 (inst -1 "p!1" "p!2" "subtermOF(x!2, x!3)")
                 (assert)
                 (lemma "pos_subterm")
                 (inst -1 "x!3" "p!1 o p!2" "x!2")
                 (assert)
                 (replace -1 -2 rl)
                 (replace -2 -7 rl)
                 (hide-all-but (-7 1))
                 (inst 1 "x!3 o (p!1 o p!2)"))
                ("2" (expand "link_of_frst_diff" -9) (assert))))
              ("2"
               (decompose-equality -1)
               (("1"
                 (inst -1 "i!1")
                 (assert)
                 (replace -7 -2 rl)
                 (expand "link_of_frst_diff" -2)
                 (replace -8)
                 (case "vars?(subtermOF(subtermOF(x!2, x!3), p!1))")
                 (("1"
                   (assert)
                   (prop)
                   (("1"
                     (expand "Vars" (-1 3))
                     (skosimp)
                     (typepred "p!2")
                     (lemma "position_s_first_diff")
                     (inst -1 "subtermOF(x!1, x!3)" "subtermOF(x!2, x!3)"
                      "p!1")
                     (assert)
                     (hide-all-but (-1 -2 -3 3))
                     (lemma "pos_o_term")
                     (inst -1 "p!1" "p!2" "subtermOF(x!1, x!3)")
                     (assert)
                     (lemma "pos_o_term")
                     (inst -1 "x!3" "p!1 o p!2" "x!1")
                     (assert)
                     (lemma "pos_subterm")
                     (inst -1 "p!1" "p!2" "subtermOF(x!1, x!3)")
                     (assert)
                     (lemma "pos_subterm")
                     (inst -1 "x!3" "p!1 o p!2" "x!1")
                     (assert)
                     (replace -1 -2 rl)
                     (replace -2 -7 rl)
                     (hide-all-but (-7 1))
                     (inst 1 "x!3 o (p!1 o p!2)"))
                    ("2" (expand "link_of_frst_diff" -9) (assert))))
                  ("2"
                   (hide-all-but (-8 -10 1 2))
                   (lemma "first_diff_unifiable_vars")
                   (inst -1 "subtermOF(x!1, x!3)" "subtermOF(x!2, x!3)"
                    "p!1")
                   (assert)
                   (hide-all-but (-2 1))
                   (expand "unifiable")
                   (skosimp*)
                   (inst 1 "sigma!1")
                   (lemma "unifiable_terms_unifiable_args")
                   (inst -1 "sigma!1" "x!1" "x!2" "x!3")
                   (expand* "member" "U")
                   (assert))))
                ("2"
                 (hide-all-but (-10 1))
                 (lemma "position_t_first_diff")
                 (inst -1 "subtermOF(x!1, x!3)" "subtermOF(x!2, x!3)"
                  "p!1")
                 (assert))))))
            ("4"
             (lemma "dom_o")
             (inst -1 "sig!2" "sig!1")
             (expand "subset?")
             (inst -1 "x!4")
             (expand "member")
             (assert)
             (expand* "union" "member")
             (hide-all-but (-1 -3 -8 3 4))
             (lemma "dom_ran_link_disjoint")
             (inst -1 "subtermOF(x!1, x!3)" "subtermOF(x!2, x!3)")
             (replace -4)
             (assert)
             (expand* "VRan" "IUnion")
             (skosimp)
             (inst -1 "x!4" "sig!1(i!1)")
             (("1" (hide-all-but (-2 1)) (expand "member") (propax))
              ("2"
               (expand* "member" "Ran")
               (inst 1 "i!1")
               (typepred "i!1")
               (expand "member")
               (propax))
              ("3" (expand "member") (propax))))))))
        ("2"
         (hide (-3 3))
         (lemma "position_s_first_diff")
         (inst -1 "subtermOF(x!1, x!3)" "subtermOF(x!2, x!3)" "p!1")
         (assert)
         (lemma "pos_o_term")
         (inst -1 "x!3" "p!1" "x!1")
         (assert)
         (rewrite "ext_preserv_pos")
         (lemma "position_t_first_diff")
         (inst -1 "subtermOF(x!1, x!3)" "subtermOF(x!2, x!3)" "p!1")
         (assert)
         (lemma "pos_o_term")
         (inst -1 "x!3" "p!1" "x!2")
         (assert)
         (rewrite "ext_preserv_pos"))))))
    ("2"
     (hide 2)
     (lemma "right_pos_subset")
     (inst?)
     (lemma "positions_of_terms_finite")
     (inst?)
     (lemma "finite_sets[position].finite_subset")
     (inst?)
     (assert))
    ("3"
     (hide 2)
     (rewrite finite_union)
     (("1" (rewrite vars_of_term_finite))
      ("2" (rewrite vars_of_term_finite))))
    ("4"
     (hide 2)
     (lemma "right_pos_subset")
     (inst?)
     (lemma "positions_of_terms_finite")
     (inst?)
     (lemma "finite_sets[position].finite_subset")
     (inst?)
     (assert))
    ("5"
     (hide 2)
     (rewrite finite_union)
     (("1" (rewrite vars_of_term_finite))
      ("2" (rewrite vars_of_term_finite))))
    ("6"
     (hide 2)
     (lemma "right_pos_subset")
     (inst?)
     (lemma "positions_of_terms_finite")
     (inst?)
     (lemma "finite_sets[position].finite_subset")
     (inst?)
     (assert))
    ("7"
     (hide 2)
     (rewrite finite_union)
     (("1" (rewrite vars_of_term_finite))
      ("2" (rewrite vars_of_term_finite))))
    ("8"
     (hide 2)
     (lemma "right_pos_subset")
     (inst?)
     (lemma "positions_of_terms_finite")
     (inst?)
     (lemma "finite_sets[position].finite_subset")
     (inst?)
     (assert))
    ("9"
     (hide 2)
     (rewrite finite_union)
     (("1" (rewrite vars_of_term_finite))
      ("2" (rewrite vars_of_term_finite))))
    ("10"
     (hide 2)
     (lemma "right_pos_subset")
     (inst?)
     (lemma "positions_of_terms_finite")
     (inst?)
     (lemma "finite_sets[position].finite_subset")
     (inst?)
     (assert))
    ("11"
     (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: robinsonunificationEF
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (measure-induct+
    "lex2(Card(union(Vars(s), Vars(t))),
                                                   Card(right_pos(s,p)))"
    ("s" "t" "p"))
   (("1"
     (split)
     (("1"
       (prop)
       (expand robinson_unification_algorithm_aux 2)
       (case "subtermOF(x!1, x!3) = subtermOF(x!2, x!3)")
       (("1"
         (assert)
         (lift-if)
         (prop)
         (("1"
           (case "x!3 = empty_seq")
           (("1"
             (hide -2 -4 -5 -6 1)
             (replaces -1)
             (expand subtermOF)
             (rewrite empty_0)
             (expand* unifiable unifier)
             (inst 1 identity)
             (("1" (assert)) ("2" (rewrite iden_subs))))
            ("2"
             (hide -3)
             (lemma next_pos_empty_equal_subterm)
             (inst -1 x!1 x!2 x!3)
             (("1"
               (assert)
               (split)
               (("1"
                 (lemma equal_term)
                 (inst -1 x!1 x!2 x!3)
                 (ground)
                 (hide-all-but (-1 3))
                 (expand* unifiable unifier)
                 (inst 1 identity)
                 (rewrite iden_subs))
                ("2" (propax))))
              ("2" (assert))))))
          ("2"
           (name-replace "np" "next_position(x!1, x!2, x!3)" :hide? nil)
           (inst -3 x!1 x!2 np)
           (lemma robinson_unification_algorithm_aux_TCC8)
           (inst -1 x!1 x!2 x!3)
           (assert)
           (inst -1 np)
           (assert)
           (hide -1)
           (split)
           (("1"
             (skosimp)
             (lemma next_pos_equal_subterm)
             (inst -1 x!1 x!2 x!3)
             (("1" (assert) (replace -3) (prop) (inst -1 q!1) (assert))
              ("2"
               (hide-all-but (-2 1 3))
               (flatten)
               (replaces -1)
               (expand next_position)
               (assert))))
            ("2"
             (skosimp)
             (lemma child_np_child_p)
             (inst -1 x!1 x!2 x!3 p1!1)
             (replace -3)
             (inst -6 p1!1)
             (assert))))))
        ("2"
         (assert)
         (name-replace "sig!1"
          "link_of_frst_diff(subtermOF(x!1, x!3), subtermOF(x!2, x!3))"
          :hide? nil)
         (name-replace "fd"
          "first_diff(subtermOF(x!1, x!3), subtermOF(x!2, x!3))" :hide?
          nil)
         (name-replace "np"
          "next_position(ext(sig!1)(x!1), ext(sig!1)(x!2), x!3 o fd)"
          :hide? nil)
         (("1"
           (name-replace "sig!2"
            "robinson_unification_algorithm_aux(ext(sig!1)(x!1), ext(sig!1)(x!2), np)"
            :hide? nil)
           (("1"
             (lift-if)
             (prop)
             (("1"
               (hide -6)
               (lemma np_p_o_fd_empty_unifiable_term)
               (inst -1 x!1 x!2 x!3)
               (replace -5)
               (replace -6)
               (assert)
               (assert)
               (split)
               (("1"
                 (hide-all-but (-1 3))
                 (expand* unifiable unifier)
                 (inst 1 sig!1))
                ("2" (propax)) ("3" (propax))))
              ("2"
               (inst -5 "ext(sig!1)(x!1)" "ext(sig!1)(x!2)" "np")
               (lemma robinson_unification_algorithm_aux_TCC12)
               (inst -1 x!1 x!2 x!3)
               (replace -2)
               (assert)
               (replace -5)
               (replace -4)
               (inst -1 sig!1)
               (assert)
               (replace -3)
               (inst -1 np)
               (assert)
               (hide -1)
               (prop)
               (("1"
                 (hide-all-but (-1 6))
                 (expand* unifiable unifier)
                 (skosimp)
                 (inst 1 "comp(sigma!1, sig!1)")
                 (("1" (rewrite ext_o) (expand o) (propax))
                  ("2" (rewrite subs_o))))
                ("2"
                 (lemma np_p_o_fd_equal_subterm)
                 (inst -1 x!1 x!2 x!3)
                 (replace -5)
                 (replace -4)
                 (assert)
                 (ground)
                 (replace -3)
                 (propax))
                ("3"
                 (hide -1 -5 2 3)
                 (skosimp)
                 (lemma child_np_child_p)
                 (inst -1 "ext(sig!1)(x!1)" "ext(sig!1)(x!2)" "x!3 o fd"
                  "p1!1")
                 (replace -3)
                 (assert)
                 (case "x!3 <= p1!1")
                 (("1"
                   (lemma "fd_equal_symbol")
                   (inst -1 "subtermOF(x!1, x!3)" "subtermOF(x!2, x!3)")
                   (replace -6)
                   (assert)
                   (expand <=)
                   (skosimp)
                   (inst -1 p1!2)
                   (("1"
                     (split)
                     (("1"
                       (lemma pos_subterm)
                       (inst -1 x!3 p1!2 x!1)
                       (lemma pos_o_term)
                       (inst -1 x!3 p1!2 x!1)
                       (assert)
                       (split -1)
                       (("1"
                         (assert)
                         (replace -2 -3 rl)
                         (replace -4 -3 rl)
                         (lemma pos_subterm)
                         (inst -1 x!3 p1!2 x!2)
                         (lemma pos_o_term)
                         (inst -1 x!3 p1!2 x!2)
                         (assert)
                         (split -1)
                         (("1"
                           (assert)
                           (replace -2 -5 rl)
                           (replace -6 -5 rl)
                           (lemma ext_preserve_symbol)
                           (inst-cp -1 "x!1" "sig!1" "p1!1")
                           (inst -1 "x!2" "sig!1" "p1!1")
                           (split -1)
                           (("1"
                             (split -2)
                             (("1" (assert))
                              ("2"
                               (hide-all-but (-8 -11 1 5))
                               (expand child)
                               (skosimp)
                               (typepred x!3)
                               (hide -2)
                               (lemma position_s_first_diff)
                               (inst -1 "subtermOF(x!1, x!3)"
                                "subtermOF(x!2, x!3)" "fd")
                               (assert)
                               (lemma pos_o_term)
                               (inst -1 x!3 fd x!1)
                               (assert)
                               (name-replace "p!1" "x!3 o fd")
                               (hide -5)
                               (lemma not_var)
                               (lemma seq_first_rest[posnat])
                               (lemma pos_subterm_ax)
                               (inst -1 p1!1 p1!3 x!1)
                               (inst -2 p1!3)
                               (inst -3 "first(p1!3)" "p1!3" "rest(p1!3)"
                                "subtermOF(x!1, p1!1)")
                               (("1"
                                 (lemma empty_0[posnat])
                                 (inst -1 p1!3)
                                 (assert))
                                ("2"
                                 (hide-all-but (1 3))
                                 (flatten)
                                 (rewrite empty_0))))))
                            ("2"
                             (hide-all-but (-8 -11 1 5))
                             (expand child)
                             (skosimp)
                             (typepred x!3)
                             (hide -1)
                             (lemma position_t_first_diff)
                             (inst -1 "subtermOF(x!1, x!3)"
                              "subtermOF(x!2, x!3)" "fd")
                             (assert)
                             (lemma pos_o_term)
                             (inst -1 x!3 fd x!2)
                             (assert)
                             (name-replace "p!1" "x!3 o fd")
                             (hide -5)
                             (lemma pos_subterm_ax)
                             (inst -1 p1!1 p1!3 x!2)
                             (assert)
                             (lemma not_var)
                             (lemma seq_first_rest[posnat])
                             (inst -1 p1!3)
                             (lemma empty_0[posnat])
                             (inst -1 p1!3)
                             (assert)
                             (inst -2 "first(p1!3)" "p1!3" "rest(p1!3)"
                              "subtermOF(x!2, p1!1)")
                             (assert))))
                          ("2"
                           (hide-all-but (-5 -6 -9 1 5))
                           (lemma position_t_first_diff)
                           (inst -1 "subtermOF(x!1, x!3)"
                            "subtermOF(x!2, x!3)" fd)
                           (assert)
                           (typepred x!3)
                           (hide -1)
                           (lemma pos_o_term)
                           (inst -1 x!3 fd x!2)
                           (assert)
                           (name-replace "p!1" "x!3 o fd")
                           (expand child)
                           (skosimp)
                           (replace -4 -5)
                           (lemma pos_subterm_ax)
                           (inst -1 x!3 "p1!2 o p1!3" x!2)
                           (rewrite o_assoc)
                           (assert)
                           (hide-all-but (-1 1 2))
                           (lemma pos_ax)
                           (inst?)
                           (assert))))
                        ("2"
                         (hide-all-but (-3 -4 -7 1 5))
                         (lemma position_s_first_diff)
                         (inst -1 "subtermOF(x!1, x!3)"
                          "subtermOF(x!2, x!3)" fd)
                         (assert)
                         (typepred x!3)
                         (hide -2)
                         (lemma pos_o_term)
                         (inst -1 x!3 fd x!1)
                         (assert)
                         (name-replace "p!1" "x!3 o fd")
                         (hide -2 -3 -6 2)
                         (expand child)
                         (skosimp)
                         (replaces -2)
                         (lemma pos_subterm_ax)
                         (inst -1 x!3 "p1!2 o p1!3" x!1)
                         (rewrite o_assoc)
                         (assert)
                         (lemma pos_ax)
                         (inst?)
                         (assert))))
                      ("2"
                       (hide-all-but (-1 -2 1))
                       (expand child)
                       (skosimp)
                       (replace -1 -2)
                       (lemma equal_prefix[posnat])
                       (inst -1 x!3 fd "p1!2 o p1!3")
                       (rewrite o_assoc)
                       (assert)
                       (hide -2 -3)
                       (inst 1 p1!3)
                       (assert))))
                    ("2"
                     (hide-all-but (-1 -2 -5 1 5))
                     (lemma position_s_first_diff)
                     (lemma position_t_first_diff)
                     (inst -1 "subtermOF(x!1, x!3)" "subtermOF(x!2, x!3)"
                      fd)
                     (inst -2 "subtermOF(x!1, x!3)" "subtermOF(x!2, x!3)"
                      fd)
                     (typepred x!3)
                     (lemma pos_o_term)
                     (inst-cp -1 x!3 fd x!1)
                     (inst -1 x!3 fd x!2)
                     (assert)
                     (assert)
                     (name-replace "p!1" "x!3 o fd")
                     (hide-all-but (-1 -2 -7 -8 1))
                     (expand child)
                     (skosimp)
                     (replaces -3)
                     (lemma pos_subterm_ax)
                     (inst-cp -1 x!3 "p1!2 o p1!3" x!1)
                     (inst -1 x!3 "p1!2 o p1!3" x!2)
                     (rewrite o_assoc)
                     (assert)
                     (lemma pos_ax)
                     (inst?)
                     (assert)
                     (hide -1 -2 -4 -5 -6 2)
                     (lemma pos_ax)
                     (inst?)
                     (assert))))
                  ("2"
                   (inst -6 p1!1)
                   (("1"
                     (split)
                     (("1"
                       (lemma ext_preserve_symbol)
                       (inst-cp -1 x!1 sig!1 p1!1)
                       (inst -1 x!2 sig!1 p1!1)
                       (split)
                       (("1"
                         (split)
                         (("1" (assert))
                          ("2"
                           (hide-all-but (-3 -6 1 6))
                           (typepred x!3)
                           (hide -2)
                           (lemma position_s_first_diff)
                           (inst -1 "subtermOF(x!1, x!3)"
                            "subtermOF(x!2, x!3)" fd)
                           (assert)
                           (lemma pos_o_term)
                           (inst -1 x!3 fd x!1)
                           (assert)
                           (name-replace "p!1" "x!3 o fd")
                           (hide-all-but (-1 -4 1))
                           (expand child)
                           (skosimp)
                           (lemma pos_subterm_ax)
                           (inst -1 p1!1 p1!2 x!1)
                           (assert)
                           (lemma not_var)
                           (lemma seq_first_rest[posnat])
                           (inst -1 p1!2)
                           (lemma empty_0[posnat])
                           (inst -1 p1!2)
                           (assert)
                           (inst -2 "first(p1!2)" "p1!2" "rest(p1!2)"
                            "subtermOF(x!1, p1!1)")
                           (assert))))
                        ("2"
                         (hide-all-but (-3 -6 1 6))
                         (typepred x!3)
                         (hide -1)
                         (lemma position_t_first_diff)
                         (inst -1 "subtermOF(x!1, x!3)"
                          "subtermOF(x!2, x!3)" fd)
                         (assert)
                         (lemma pos_o_term)
                         (inst -1 x!3 fd x!2)
                         (assert)
                         (name-replace "p!1" "x!3 o fd")
                         (hide-all-but (-1 -4 1))
                         (expand child)
                         (skosimp)
                         (lemma pos_subterm_ax)
                         (inst -1 p1!1 p1!2 x!2)
                         (assert)
                         (lemma not_var)
                         (lemma seq_first_rest[posnat])
                         (inst -1 p1!2)
                         (lemma empty_0[posnat])
                         (inst -1 p1!2)
                         (assert)
                         (inst -2 "first(p1!2)" "p1!2" "rest(p1!2)"
                          "subtermOF(x!2, p1!1)")
                         (assert))))
                      ("2"
                       (hide-all-but (-1 1 2))
                       (expand child -1)
                       (skosimp)
                       (case "x!3 = p1!1")
                       (("1"
                         (hide-all-but (-1 2))
                         (expand <=)
                         (inst 1 empty_seq)
                         (rewrite seq_o_empty)
                         (assert))
                        ("2"
                         (case "length(x!3) < length(p1!1)")
                         (("1"
                           (lemma o_length_o[posnat])
                           (inst?)
                           (assert)
                           (skosimp)
                           (expand <=)
                           (inst 3 seq!1))
                          ("2"
                           (lemma o_length_o[posnat])
                           (inst -1 p1!1 p1!2 x!3 fd)
                           (assert)
                           (lemma o_equals_o[posnat])
                           (inst?)
                           (assert)
                           (skosimp)
                           (expand child)
                           (inst 4 seq!1)
                           (assert)
                           (flatten)
                           (replace -2 -1)
                           (rewrite seq_o_empty))))))))
                    ("2"
                     (hide-all-but (-1 -4 1 2 6))
                     (typepred x!3)
                     (lemma position_s_first_diff)
                     (lemma position_t_first_diff)
                     (inst -2 "subtermOF(x!1, x!3)" "subtermOF(x!2, x!3)"
                      fd)
                     (inst -1 "subtermOF(x!1, x!3)" "subtermOF(x!2, x!3)"
                      fd)
                     (assert)
                     (lemma pos_o_term)
                     (inst-cp -1 "x!3" "fd" "x!1")
                     (inst -1 "x!3" "fd" "x!2")
                     (assert)
                     (name-replace "p!1" "x!3 o fd")
                     (hide -3 -4 -5 -6 -8 3)
                     (expand child)
                     (skosimp)
                     (hide 2 3)
                     (lemma pos_ax)
                     (inst-cp -1 p1!1 p1!2 x!1)
                     (inst -1 p1!1 p1!2 x!2)
                     (assert))))))))))
            ("2"
             (hide -4 -5 -6 4)
             (lemma next_position_is_position)
             (inst-cp -1 "ext(sig!1)(x!1)" "ext(sig!1)(x!2)" "x!3 o fd")
             (inst -1 "ext(sig!1)(x!2)" "ext(sig!1)(x!1)" "x!3 o fd")
             (("1"
               (lemma next_position_commute)
               (inst -1 "ext(sig!1)(x!2)" "ext(sig!1)(x!1)" "x!3 o fd")
               (replace -1 -2)
               (hide -1)
               (replace -3)
               (assert))
              ("2"
               (hide -1 2)
               (lemma position_s_first_diff)
               (lemma position_t_first_diff)
               (inst -2 "subtermOF(x!1, x!3)" "subtermOF(x!2, x!3)" fd)
               (inst -1 "subtermOF(x!1, x!3)" "subtermOF(x!2, x!3)" fd)
               (typepred x!3)
               (lemma pos_o_term)
               (inst-cp -1 x!3 fd x!1)
               (inst -1 x!3 fd x!2)
               (assert)
               (assert)
               (rewrite ext_preserv_pos)
               (rewrite ext_preserv_pos))))))
          ("2"
           (hide -3 -4 -5 4)
           (lemma position_s_first_diff)
           (lemma position_t_first_diff)
           (inst -2 "subtermOF(x!1, x!3)" "subtermOF(x!2, x!3)" fd)
           (inst -1 "subtermOF(x!1, x!3)" "subtermOF(x!2, x!3)" fd)
           (typepred x!3)
           (lemma pos_o_term)
           (inst-cp -1 x!3 fd x!1)
           (inst -1 x!3 fd x!2)
           (assert)
           (assert)
           (rewrite ext_preserv_pos)
           (rewrite ext_preserv_pos))))))
      ("2"
       (hide -)
       (prop)
       (lemma dom_ran_ruaEF_disjoint)
       (inst -1 x!1 x!2 x!3)
       (assert)
       (name-replace "sig!1"
        "robinson_unification_algorithm_aux(x!1, x!2, x!3)")
       (expand* subset? difference union member)
       (decompose-equality -2)
       (inst -2 xx)
       (inst -1 xx)
       (prop)
       (("1"
         (expand fail)
         (expand Dom)
         (flatten)
         (hide -1 -4)
         (replaces -1)
         (typepred xx)
         (expand V)
         (assert))
        ("2"
         (expand fail)
         (expand Dom)
         (flatten)
         (hide -1 -4)
         (replaces -1)
         (typepred xx)
         (expand V)
         (assert))
        ("3"
         (expand VRan)
         (expand IUnion)
         (inst 1 xx)
         (("1"
           (expand fail)
           (hide -2)
           (expand Vars)
           (inst 1 "#(1)")
           (("1"
             (expand subtermOF)
             (lift-if)
             (prop)
             (("1" (hide -2 1) (expand "#") (assert))
              ("2"
               (expand finseq_appl)
               (replaces -1)
               (hide 1)
               (case "args(app(ff,  #(xx)))`seq(first( #(1)) - 1) = xx")
               (("1"
                 (replaces -1)
                 (case "rest( #(1)) = empty_seq")
                 (("1"
                   (replaces -1)
                   (expand subtermOF)
                   (rewrite empty_0))
                  ("2"
                   (hide 2)
                   (expand rest)
                   (expand "#")
                   (expand "^")
                   (propax))))
                ("2" (hide 2) (expand "#") (propax))
                ("3"
                 (hide 2)
                 (expand first)
                 (expand finseq_appl)
                 (prop)
                 (("1" (assert)) ("2" (expand "#") (assert))))))))
            ("2"
             (expand positionsOF)
             (lift-if)
             (prop)
             (("1" (assert))
              ("2"
               (decompose-equality -2)
               (hide -1 -2 +)
               (expand "#")
               (assert))
              ("3"
               (hide -1 1)
               (expand* union IUnion member only_empty_seq)
               (flatten)
               (hide 1)
               (inst 1 1)
               (("1"
                 (expand catenate)
                 (inst 1 empty_seq)
                 (expand member)
                 (prop)
                 (("1"
                   (expand finseq_appl)
                   (expand positionsOF)
                   (lift-if)
                   (expand* union IUnion member only_empty_seq))
                  ("2"
                   (hide 2)
                   (expand* "#" add_first insert?)
                   (lemma empty_0[posnat])
                   (inst -1 empty_seq)
                   (assert))))
                ("2"
                 (reveal -1)
                 (decompose-equality -1)
                 (hide -1 -2)
                 (expand "#")
                 (decompose-equality -1)
                 (assert))))))))
          ("2"
           (hide -2)
           (expand Dom)
           (expand fail)
           (flatten)
           (replaces -1)
           (typepred xx)
           (expand V)
           (assert))))))))
    ("2"
     (hide - 2)
     (skosimp)
     (expand child)
     (skosimp)
     (lemma pos_subterm_ax)
     (inst -1 p1!1 p1!2 y!2)
     (assert)
     (lemma not_var)
     (lemma seq_first_rest[posnat])
     (inst -1 p1!2)
     (lemma empty_0[posnat])
     (inst -1 p1!2)
     (assert)
     (inst -2 "first(p1!2)" "p1!2" "rest(p1!2)" "subtermOF(y!2, p1!1)")
     (assert))
    ("3"
     (hide - 2)
     (skosimp)
     (expand child)
     (skosimp)
     (lemma pos_subterm_ax)
     (inst -1 p1!1 p1!2 y!1)
     (assert)
     (lemma not_var)
     (lemma seq_first_rest[posnat])
     (inst -1 p1!2)
     (lemma empty_0[posnat])
     (inst -1 p1!2)
     (assert)
     (inst -2 "first(p1!2)" "p1!2" "rest(p1!2)" "subtermOF(y!1, p1!1)")
     (assert))
    ("4"
     (hide 2)
     (lemma right_pos_subset)
     (inst?)
     (lemma positions_of_terms_finite)
     (inst?)
     (lemma finite_subset[position])
     (inst?)
     (assert))
    ("5"
     (hide 2)
     (rewrite finite_union)
     (("1" (hide 2) (rewrite vars_of_term_finite))
      ("2" (hide 2) (rewrite vars_of_term_finite))))
    ("6"
     (hide 2)
     (lemma right_pos_subset)
     (inst?)
     (lemma positions_of_terms_finite)
     (inst?)
     (lemma finite_subset[position])
     (inst?)
     (assert))
    ("7"
     (hide 2)
     (rewrite finite_union)
     (("1" (hide 2) (rewrite vars_of_term_finite))
      ("2" (hide 2) (rewrite vars_of_term_finite))))
    ("8"
     (hide - 2)
     (skosimp)
     (expand child)
     (skosimp)
     (lemma pos_subterm_ax)
     (inst -1 "p11!1" "p1!1" "x!1`2")
     (assert)
     (lemma not_var)
     (lemma seq_first_rest[posnat])
     (inst -1 p1!1)
     (lemma empty_0[posnat])
     (inst -1 p1!1)
     (assert)
     (inst -2 "first(p1!1)" "p1!1" "rest(p1!1)"
      "subtermOF(x!1`2, p11!1)")
     (assert))
    ("9"
     (hide - 2)
     (skosimp)
     (expand child)
     (skosimp)
     (lemma pos_subterm_ax)
     (inst -1 "p11!1" "p1!1" "x!1`1")
     (assert)
     (lemma not_var)
     (lemma seq_first_rest[posnat])
     (inst -1 p1!1)
     (lemma empty_0[posnat])
     (inst -1 p1!1)
     (assert)
     (inst -2 "first(p1!1)" "p1!1" "rest(p1!1)"
      "subtermOF(x!1`1, p11!1)")
     (assert))
    ("10"
     (hide - 2)
     (skosimp)
     (expand child)
     (skosimp)
     (lemma pos_subterm_ax)
     (inst -1 "p1!1" "p1!2" "y!1`2")
     (assert)
     (lemma not_var)
     (lemma seq_first_rest[posnat])
     (inst -1 p1!2)
     (lemma empty_0[posnat])
     (inst -1 p1!2)
     (assert)
     (inst -2 "first(p1!2)" "p1!2" "rest(p1!2)" "subtermOF(y!1`2, p1!1)")
     (assert))
    ("11"
     (hide - 2)
     (skosimp)
     (expand child)
     (skosimp)
     (lemma pos_subterm_ax)
     (inst -1 "p1!1" "p1!2" "y!1`1")
     (assert)
     (lemma not_var)
     (lemma seq_first_rest[posnat])
     (inst -1 p1!2)
     (lemma empty_0[posnat])
     (inst -1 p1!2)
     (assert)
     (inst -2 "first(p1!2)" "p1!2" "rest(p1!2)" "subtermOF(y!1`1, p1!1)")
     (assert))
    ("12"
     (hide 2)
     (lemma right_pos_subset)
     (inst?)
     (lemma positions_of_terms_finite)
     (inst?)
     (lemma finite_subset[position])
     (inst?)
     (assert))
    ("13"
     (hide 2)
     (rewrite finite_union)
     (("1" (hide 2) (rewrite vars_of_term_finite))
      ("2" (hide 2) (rewrite vars_of_term_finite))))
    ("14"
     (hide 2)
     (lemma right_pos_subset)
     (inst?)
     (lemma positions_of_terms_finite)
     (inst?)
     (lemma finite_subset[position])
     (inst?)
     (assert))
    ("15"
     (hide 2)
     (rewrite finite_union)
     (("1" (hide 2) (rewrite vars_of_term_finite))
      ("2" (hide 2) (rewrite vars_of_term_finite))))
    ("16"
     (hide - 2)
     (skosimp)
     (expand child)
     (skosimp)
     (lemma pos_subterm_ax)
     (inst -1 "p1!1" "p1!2" "t!1")
     (assert)
     (lemma not_var)
     (lemma seq_first_rest[posnat])
     (inst -1 p1!2)
     (lemma empty_0[posnat])
     (inst -1 p1!2)
     (assert)
     (inst -2 "first(p1!2)" "p1!2" "rest(p1!2)" "subtermOF(t!1, p1!1)")
     (assert))
    ("17"
     (hide - 2)
     (skosimp)
     (expand child)
     (skosimp)
     (lemma pos_subterm_ax)
     (inst -1 "p1!1" "p1!2" "s!1")
     (assert)
     (lemma not_var)
     (lemma seq_first_rest[posnat])
     (inst -1 p1!2)
     (lemma empty_0[posnat])
     (inst -1 p1!2)
     (assert)
     (inst -2 "first(p1!2)" "p1!2" "rest(p1!2)" "subtermOF(s!1, p1!1)")
     (assert))
    ("18"
     (hide 2)
     (lemma right_pos_subset)
     (inst?)
     (lemma positions_of_terms_finite)
     (inst?)
     (lemma finite_subset[position])
     (inst?)
     (assert))
    ("19"
     (hide 2)
     (rewrite finite_union)
     (("1" (hide 2) (rewrite vars_of_term_finite))
      ("2" (hide 2) (rewrite vars_of_term_finite))))))


proof_type: f_proof
decl_type: formula
library: TRS
theory: robinsonunificationEF
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (measure-induct+
    "lex2(Card(union(Vars(s), Vars(t))),
                                                     Card(right_pos(s,p)))"
    ("s" "t" "p"))
   (("1"
     (prop)
     (("1"
       (case "subtermOF(x!1, x!3) = subtermOF(x!2, x!3)")
       (("1"
         (case "x!3 = empty_seq")
         (("1"
           (hide -4 -5 -6)
           (expand "robinson_unification_algorithm_aux")
           (assert)
           (replaces -1)
           (expand next_position 1 1)
           (hide -2)
           (rewrite subterm_empty_seq)
           (rewrite subterm_empty_seq)
           (expand* member U unifier)
           (assert))
          ("2"
           (expand robinson_unification_algorithm_aux 2)
           (assert)
           (lift-if)
           (prop)
           (("1"
             (hide -4)
             (lemma next_pos_empty_equal_subterm)
             (inst -1 x!1 x!2 x!3)
             (assert)
             (ground)
             (lemma equal_term)
             (inst -1 x!1 x!2 x!3)
             (ground)
             (hide-all-but (-1 1))
             (expand* member U unifier)
             (assert))
            ("2"
             (inst -3 x!1 x!2 "next_position(x!1, x!2, x!3)")
             (lemma robinson_unification_algorithm_aux_TCC8)
             (inst -1 x!1 x!2 x!3)
             (assert)
             (inst -1 "next_position(x!1, x!2, x!3)")
             (assert)
             (hide -1 2)
             (prop)
             (("1"
               (skosimp)
               (lemma next_pos_equal_subterm)
               (inst -1 x!1 x!2 x!3)
               (assert)
               (ground)
               (inst -1 q!1)
               (assert))
              ("2"
               (skosimp)
               (lemma child_np_child_p)
               (inst -1 x!1 x!2 x!3 p1!1)
               (assert)
               (inst -6 p1!1)
               (assert))))))))
        ("2"
         (expand robinson_unification_algorithm_aux 2)
         (assert)
         (name-replace "sig!1"
          "link_of_frst_diff(subtermOF(x!1, x!3), subtermOF(x!2, x!3))"
          :hide? nil)
         (name-replace "fd"
          "first_diff(subtermOF(x!1, x!3), subtermOF(x!2, x!3))" :hide?
          nil)
         (name-replace "np"
          "next_position(ext(sig!1)(x!1), ext(sig!1)(x!2), x!3 o fd)"
          :hide? nil)
         (("1"
           (name-replace "sig!2"
            "robinson_unification_algorithm_aux(ext(sig!1)(x!1), ext(sig!1)(x!2), np)"
            :hide? nil)
           (("1"
             (lift-if)
             (prop)
             (("1"
               (hide-all-but (-1 -5 -6 2))
               (lemma unifiable_implies_not_fail1)
               (inst -1 x!1 x!2 x!3)
               (replace -3)
               (assert))
              ("2"
               (hide -7)
               (lemma np_p_o_fd_empty_unifiable_term)
               (inst -1 x!1 x!2 x!3)
               (replace -6)
               (replace -5)
               (assert)
               (assert)
               (ground)
               (hide-all-but (-1 1))
               (expand* member U unifier))
              ("3"
               (hide -7)
               (lemma ruaEF_fails_iff_non_unifiable_aux)
               (inst -1 x!1 x!2 x!3)
               (assert)
               (ground)
               (expand robinson_unification_algorithm_aux 1)
               (propax))
              ("4"
               (inst -6 "ext(sig!1)(x!1)" "ext(sig!1)(x!2)" "np")
               (replace -1)
               (lemma robinson_unification_algorithm_aux_TCC12)
               (inst -1 x!1 x!2 x!3)
               (replace -5)
               (assert)
               (replace -4)
               (inst -1 sig!1)
               (assert)
               (replace -3)
               (inst -1 np)
               (assert)
               (hide -1)
               (split)
               (("1"
                 (prop)
                 (("1"
                   (hide-all-but (-2 2))
                   (lemma unifier_o)
                   (inst -1 x!1 sig!2 x!2 sig!1)
                   (assert))
                  ("2"
                   (hide-all-but (-4 -5 2 7))
                   (lemma unifiable_preserves_unifiability1)
                   (inst -1 x!1 x!2 x!3)
                   (replace -2)
                   (assert))))
                ("2"
                 (skosimp)
                 (lemma np_p_o_fd_equal_subterm)
                 (inst -1 x!1 x!2 x!3)
                 (replace -5)
                 (replace -6)
                 (assert)
                 (ground)
                 (replace -4)
                 (inst -1 q!1)
                 (assert))
                ("3"
                 (skosimp)
                 (lemma child_np_child_p)
                 (inst -1 "ext(sig!1)(x!1)" "ext(sig!1)(x!2)" "x!3 o fd"
                  "p1!1")
                 (assert)
                 (case "x!3 <= p1!1")
                 (("1"
                   (lemma fd_equal_symbol)
                   (inst -1 "subtermOF(x!1, x!3)" "subtermOF(x!2, x!3)")
                   (replace -7)
                   (assert)
                   (expand <=)
                   (skosimp)
                   (inst -1 p1!2)
                   (("1"
                     (split)
                     (("1"
                       (lemma pos_subterm)
                       (inst-cp -1 x!3 p1!2 x!1)
                       (inst -1 x!3 p1!2 x!2)
                       (split)
                       (("1"
                         (split)
                         (("1"
                           (replace -1 -3 rl)
                           (replace -2 -3 rl)
                           (hide -1 -2)
                           (replace -2 -1 rl)
                           (lemma ext_preserve_symbol)
                           (inst-cp -1 x!1 sig!1 p1!1)
                           (inst -1 x!2 sig!1 p1!1)
                           (split)
                           (("1"
                             (split)
                             (("1" (assert))
                              ("2"
                               (hide-all-but (-3 -4 -8 1 7))
                               (lemma position_s_first_diff)
                               (inst -1 "subtermOF(x!1, x!3)"
                                "subtermOF(x!2, x!3)" fd)
                               (assert)
                               (typepred x!3)
                               (hide -2)
                               (lemma pos_o_term)
                               (inst -1 x!3 fd x!1)
                               (assert)
                               (name-replace "q!1" "x!3 o fd")
                               (hide-all-but (-1 -5 1))
                               (expand child)
                               (skosimp)
                               (lemma not_var)
                               (lemma seq_first_rest[posnat])
                               (inst -1 p1!3)
                               (lemma empty_0[posnat])
                               (inst -1 p1!3)
                               (assert)
                               (inst -2 "first(p1!3)" "p1!3" "rest(p1!3)"
                                "subtermOF(x!1, p1!1)")
                               (lemma pos_subterm_ax)
                               (inst -1 p1!1 p1!3 x!1)
                               (assert))))
                            ("2"
                             (hide-all-but (-3 -4 -8 1 7))
                             (lemma position_t_first_diff)
                             (inst -1 "subtermOF(x!1, x!3)"
                              "subtermOF(x!2, x!3)" fd)
                             (assert)
                             (typepred x!3)
                             (hide -1)
                             (lemma pos_o_term)
                             (inst -1 x!3 fd x!2)
                             (assert)
                             (name-replace "q!1" "x!3 o fd")
                             (hide-all-but (-1 -5 1))
                             (expand child)
                             (skosimp)
                             (lemma not_var)
                             (lemma seq_first_rest[posnat])
                             (inst -1 p1!3)
                             (lemma empty_0[posnat])
                             (inst -1 p1!3)
                             (assert)
                             (inst -2 "first(p1!3)" "p1!3" "rest(p1!3)"
                              "subtermOF(x!2, p1!1)")
                             (assert)
                             (lemma pos_subterm_ax)
                             (inst -1 p1!1 p1!3 x!2)
                             (assert))))
                          ("2"
                           (hide-all-but (-3 -4 -8 1 7))
                           (lemma position_s_first_diff)
                           (inst -1 "subtermOF(x!1, x!3)"
                            "subtermOF(x!2, x!3)" "fd")
                           (assert)
                           (typepred x!3)
                           (hide -2)
                           (lemma pos_o_term)
                           (inst -1 x!3 fd x!1)
                           (assert)
                           (name-replace "q!1" "x!3 o fd")
                           (hide -2 -3 -6 2)
                           (expand child)
                           (skosimp)
                           (replace -2 1 rl)
                           (hide -2)
                           (lemma pos_ax)
                           (inst -1 p1!1 p1!3 x!1)
                           (assert))))
                        ("2"
                         (hide-all-but (-3 -4 -8 1 7))
                         (replace -1 1 rl)
                         (hide -1)
                         (lemma position_t_first_diff)
                         (inst -1 "subtermOF(x!1, x!3)"
                          "subtermOF(x!2, x!3)" fd)
                         (assert)
                         (typepred x!3)
                         (hide -1)
                         (lemma pos_o_term)
                         (inst -1 x!3 fd x!2)
                         (assert)
                         (name-replace "q!1" "x!3 o fd")
                         (hide -2 -3 -5 2)
                         (expand child)
                         (skosimp)
                         (lemma pos_ax)
                         (inst -1 p1!1 p1!3 x!2)
                         (assert))))
                      ("2"
                       (hide-all-but (-1 -2 1))
                       (replaces -1)
                       (expand child)
                       (skosimp)
                       (lemma equal_prefix[posnat])
                       (inst -1 x!3 fd "p1!2 o p1!3")
                       (rewrite o_assoc)
                       (assert)
                       (hide -2)
                       (inst 1 p1!3)
                       (assert))))
                    ("2"
                     (hide-all-but (-1 -2 -6 1 7))
                     (lemma position_s_first_diff)
                     (lemma position_t_first_diff)
                     (inst -2 "subtermOF(x!1, x!3)" "subtermOF(x!2, x!3)"
                      "fd")
                     (inst -1 "subtermOF(x!1, x!3)" "subtermOF(x!2, x!3)"
                      "fd")
                     (assert)
                     (typepred x!3)
                     (lemma pos_o_term)
                     (inst-cp -1 x!3 fd x!2)
                     (inst -1 x!3 fd x!1)
                     (assert)
                     (name-replace "q!1" "x!3 o fd")
                     (hide-all-but (-1 -2 -7 -8 1))
                     (replaces -3)
                     (expand child)
                     (skosimp)
                     (lemma pos_subterm_ax)
                     (inst-cp -1 x!3 "p1!2 o p1!3" x!2)
                     (inst -1 x!3 "p1!2 o p1!3" x!1)
                     (rewrite o_assoc)
                     (assert)
                     (hide -3 -4 -5 2)
                     (lemma pos_ax)
                     (inst-cp -1 p1!2 p1!3 "subtermOF(x!2, x!3)")
                     (inst -1 p1!2 p1!3 "subtermOF(x!1, x!3)")
                     (assert))))
                  ("2"
                   (inst -9 p1!1)
                   (("1"
                     (lemma ext_preserve_symbol)
                     (inst-cp -1 x!1 sig!1 p1!1)
                     (("1"
                       (inst -1 x!2 sig!1 p1!1)
                       (("1"
                         (split -11)
                         (("1"
                           (split -2)
                           (("1"
                             (split -3)
                             (("1" (assert))
                              ("2"
                               (hide-all-but (-3 -7 1 8))
                               (lemma position_s_first_diff)
                               (inst -1 "subtermOF(x!1, x!3)"
                                "subtermOF(x!2, x!3)" fd)
                               (assert)
                               (typepred x!3)
                               (hide -2)
                               (lemma pos_o_term)
                               (inst -1 x!3 fd x!1)
                               (assert)
                               (name-replace "q!1" "x!3 o fd")
                               (hide -2 -3 -5 2)
                               (expand child)
                               (skosimp)
                               (lemma not_var)
                               (lemma seq_first_rest[posnat])
                               (inst -1 p1!2)
                               (lemma empty_0[posnat])
                               (inst -1 p1!2)
                               (assert)
                               (inst -2 "first(p1!2)" "p1!2" "rest(p1!2)"
                                "subtermOF(x!1, p1!1)")
                               (assert)
                               (lemma pos_subterm_ax)
                               (inst -1 p1!1 p1!2 x!1)
                               (assert))))
                            ("2"
                             (hide-all-but (-3 -7 1 8))
                             (lemma position_t_first_diff)
                             (inst -1 "subtermOF(x!1, x!3)"
                              "subtermOF(x!2, x!3)" fd)
                             (assert)
                             (typepred x!3)
                             (hide -1)
                             (lemma pos_o_term)
                             (inst -1 x!3 fd x!2)
                             (assert)
                             (name-replace "q!1" "x!3 o fd")
                             (hide -2 -3 -5 2)
                             (expand child)
                             (skosimp)
                             (lemma not_var)
                             (lemma seq_first_rest[posnat])
                             (inst -1 p1!2)
                             (lemma empty_0[posnat])
                             (inst -1 p1!2)
                             (assert)
                             (inst -2 "first(p1!2)" "p1!2" "rest(p1!2)"
                              "subtermOF(x!2, p1!1)")
                             (assert)
                             (lemma pos_subterm_ax)
                             (inst -1 p1!1 p1!2 x!2)
                             (assert))))
                          ("2"
                           (hide-all-but (-3 1 2))
                           (expand child)
                           (skosimp)
                           (expand <=)
                           (case "length(x!3) < length(p1!1)")
                           (("1"
                             (lemma o_length_o[posnat])
                             (inst?)
                             (assert))
                            ("2"
                             (case "length(p1!1) < length(x!3)")
                             (("1"
                               (lemma o_length_o[posnat])
                               (inst -1 p1!1 p1!2 x!3 fd)
                               (assert)
                               (skosimp)
                               (inst 2 seq!1)
                               (assert)
                               (flatten)
                               (inst 2 seq!1)
                               (replaces -3)
                               (rewrite seq_o_empty)
                               (rewrite seq_o_empty)
                               (assert))
                              ("2"
                               (lemma o_equals_o[posnat])
                               (inst -1 x!3 fd p1!1 p1!2)
                               (assert)
                               (inst 4 empty_seq)
                               (rewrite seq_o_empty)
                               (assert))))))))
                        ("2"
                         (hide-all-but (-2 -6 1 8))
                         (lemma position_t_first_diff)
                         (inst -1 "subtermOF(x!1, x!3)"
                          "subtermOF(x!2, x!3)" fd)
                         (assert)
                         (typepred x!3)
                         (hide -1)
                         (lemma pos_o_term)
                         (inst -1 x!3 fd x!2)
                         (assert)
                         (name-replace "q!1" "x!3 o fd")
                         (hide -2 -3 -5 2)
                         (expand child)
                         (skosimp)
                         (lemma pos_ax)
                         (inst -1 p1!1 p1!2 x!2)
                         (assert))))
                      ("2"
                       (hide-all-but (-1 -5 1 8))
                       (lemma position_s_first_diff)
                       (inst -1 "subtermOF(x!1, x!3)"
                        "subtermOF(x!2, x!3)" fd)
                       (assert)
                       (typepred x!3)
                       (hide -2)
                       (lemma pos_o_term)
                       (inst -1 x!3 fd x!1)
                       (assert)
                       (name-replace "q!1" "x!3 o fd")
                       (hide -2 -3 -5 2)
                       (expand child)
                       (skosimp)
                       (lemma pos_ax)
                       (inst -1 p1!1 p1!2 x!1)
                       (assert))))
                    ("2"
                     (hide-all-but (-1 -5 1 8))
                     (lemma position_t_first_diff)
                     (lemma position_s_first_diff)
                     (inst -2 "subtermOF(x!1, x!3)" "subtermOF(x!2, x!3)"
                      fd)
                     (inst -1 "subtermOF(x!1, x!3)" "subtermOF(x!2, x!3)"
                      fd)
                     (assert)
                     (typepred x!3)
                     (lemma pos_o_term)
                     (inst-cp -1 x!3 fd x!2)
                     (inst -1 x!3 fd x!1)
                     (assert)
                     (name-replace "q!1" "x!3 o fd")
                     (hide -3 -4 -5 -6 -8 2)
                     (expand child)
                     (skosimp)
                     (lemma pos_ax)
                     (inst-cp -1 p1!1 p1!2 x!2)
                     (inst -1 p1!1 p1!2 x!1)
                     (assert))))))))))
            ("2"
             (hide-all-but (-1 -2 1))
             (lemma next_position_is_position)
             (inst-cp -1 "ext(sig!1)(x!1)" "ext(sig!1)(x!2)" "x!3 o fd")
             (inst -1 "ext(sig!1)(x!2)" "ext(sig!1)(x!1)" "x!3 o fd")
             (("1"
               (lemma next_position_commute)
               (inst -1 "ext(sig!1)(x!2)" "ext(sig!1)(x!1)" "x!3 o fd")
               (replace -4)
               (replace -1)
               (assert))
              ("2"
               (hide -1 -2 2)
               (lemma position_t_first_diff)
               (lemma position_s_first_diff)
               (inst -1 "subtermOF(x!1, x!3)" "subtermOF(x!2, x!3)" fd)
               (inst -2 "subtermOF(x!1, x!3)" "subtermOF(x!2, x!3)" fd)
               (assert)
               (typepred x!3)
               (lemma pos_o_term)
               (inst-cp -1 x!3 fd x!2)
               (inst -1 x!3 fd x!1)
               (assert)
               (hide-all-but (-1 -2 1))
               (rewrite ext_preserv_pos)
               (rewrite ext_preserv_pos))))))
          ("2"
           (hide-all-but (-1 1))
           (lemma position_t_first_diff)
           (lemma position_s_first_diff)
           (inst -2 "subtermOF(x!1, x!3)" "subtermOF(x!2, x!3)" fd)
           (inst -1 "subtermOF(x!1, x!3)" "subtermOF(x!2, x!3)" fd)
           (assert)
           (typepred x!3)
           (lemma pos_o_term)
           (inst-cp -1 x!3 fd x!2)
           (inst -1 x!3 fd x!1)
           (assert)
           (hide-all-but (-1 -2 1))
           (rewrite ext_preserv_pos)
           (rewrite ext_preserv_pos))))))
      ("2"
       (hide -2 -3 -4)
       (name-replace "sig1"
        "robinson_unification_algorithm_aux(x!1, x!2, x!3)")
       (expand* member U unifiable unifier)
       (inst 1 sig1))))
    ("2"
     (hide - 2)
     (skosimp)
     (expand child)
     (skosimp)
     (lemma pos_subterm_ax)
     (inst -1 p1!1 p1!2 y!2)
     (assert)
     (lemma not_var)
     (lemma seq_first_rest[posnat])
     (inst -1 p1!2)
     (lemma empty_0[posnat])
     (inst -1 p1!2)
     (assert)
     (inst -2 "first(p1!2)" "p1!2" "rest(p1!2)" "subtermOF(y!2, p1!1)")
     (assert))
    ("3"
     (hide - 2)
     (skosimp)
     (expand child)
     (skosimp)
     (lemma pos_subterm_ax)
     (inst -1 p1!1 p1!2 y!1)
     (assert)
     (lemma not_var)
     (lemma seq_first_rest[posnat])
     (inst -1 p1!2)
     (lemma empty_0[posnat])
     (inst -1 p1!2)
     (assert)
     (inst -2 "first(p1!2)" "p1!2" "rest(p1!2)" "subtermOF(y!1, p1!1)")
     (assert))
    ("4"
     (hide 2)
     (lemma right_pos_subset)
     (inst?)
     (lemma positions_of_terms_finite)
     (inst?)
     (lemma finite_subset[position])
     (inst?)
     (assert))
    ("5"
     (hide 2)
     (rewrite finite_union)
     (("1" (hide 2) (rewrite vars_of_term_finite))
      ("2" (hide 2) (rewrite vars_of_term_finite))))
    ("6"
     (hide 2)
     (lemma right_pos_subset)
     (inst?)
     (lemma positions_of_terms_finite)
     (inst?)
     (lemma finite_subset[position])
     (inst?)
     (assert))
    ("7"
     (hide 2)
     (rewrite finite_union)
     (("1" (hide 2) (rewrite vars_of_term_finite))
      ("2" (hide 2) (rewrite vars_of_term_finite))))
    ("8"
     (hide - 2)
     (skosimp)
     (expand child)
     (skosimp)
     (lemma pos_subterm_ax)
     (inst -1 "p11!1" "p1!1" "x!1`2")
     (assert)
     (lemma not_var)
     (lemma seq_first_rest[posnat])
     (inst -1 p1!1)
     (lemma empty_0[posnat])
     (inst -1 p1!1)
     (assert)
     (inst -2 "first(p1!1)" "p1!1" "rest(p1!1)"
      "subtermOF(x!1`2, p11!1)")
     (assert))
    ("9"
     (hide - 2)
     (skosimp)
     (expand child)
     (skosimp)
     (lemma pos_subterm_ax)
     (inst -1 "p11!1" "p1!1" "x!1`1")
     (assert)
     (lemma not_var)
     (lemma seq_first_rest[posnat])
     (inst -1 p1!1)
     (lemma empty_0[posnat])
     (inst -1 p1!1)
     (assert)
     (inst -2 "first(p1!1)" "p1!1" "rest(p1!1)"
      "subtermOF(x!1`1, p11!1)")
     (assert))
    ("10"
     (hide - 2)
     (skosimp)
     (expand child)
     (skosimp)
     (lemma pos_subterm_ax)
     (inst -1 "p1!1" "p1!2" "y!1`2")
     (assert)
     (lemma not_var)
     (lemma seq_first_rest[posnat])
     (inst -1 p1!2)
     (lemma empty_0[posnat])
     (inst -1 p1!2)
     (assert)
     (inst -2 "first(p1!2)" "p1!2" "rest(p1!2)" "subtermOF(y!1`2, p1!1)")
     (assert))
    ("11"
     (hide - 2)
     (skosimp)
     (expand child)
     (skosimp)
     (lemma pos_subterm_ax)
     (inst -1 "p1!1" "p1!2" "y!1`1")
     (assert)
     (lemma not_var)
     (lemma seq_first_rest[posnat])
     (inst -1 p1!2)
     (lemma empty_0[posnat])
     (inst -1 p1!2)
     (assert)
     (inst -2 "first(p1!2)" "p1!2" "rest(p1!2)" "subtermOF(y!1`1, p1!1)")
     (assert))
    ("12"
     (hide 2)
     (lemma right_pos_subset)
     (inst?)
     (lemma positions_of_terms_finite)
     (inst?)
     (lemma finite_subset[position])
     (inst?)
     (assert))
    ("13"
     (hide 2)
     (rewrite finite_union)
     (("1" (hide 2) (rewrite vars_of_term_finite))
      ("2" (hide 2) (rewrite vars_of_term_finite))))
    ("14"
     (hide 2)
     (lemma right_pos_subset)
     (inst?)
     (lemma finite_subset[position])
     (inst?)
     (("1" (assert))
      ("2"
       (hide 2)
       (hide - 2)
       (lemma pos_subterm_ax)
       (assert)
       (lemma not_var)
       (lemma seq_first_rest[posnat])
       (lemma empty_0[posnat])
       (assert)
       (hide - 2)
       (lemma pos_subterm_ax)
       (lemma not_var)
       (lemma seq_first_rest[posnat])
       (lemma empty_0[posnat])
       (lemma right_pos_subset)
       (inst?)
       (lemma positions_of_terms_finite)
       (inst?))))
    ("15"
     (lemma finite_subset[position])
     (assert)
     (hide 2)
     (rewrite finite_union)
     (("1" (hide 2) (rewrite vars_of_term_finite))
      ("2" (hide 2) (rewrite vars_of_term_finite))))
    ("16"
     (hide - 2)
     (skosimp)
     (expand child)
     (skosimp)
     (lemma pos_subterm_ax)
     (inst -1 "p1!1" "p1!2" "t!1")
     (assert)
     (lemma not_var)
     (lemma seq_first_rest[posnat])
     (inst -1 p1!2)
     (lemma empty_0[posnat])
     (inst -1 p1!2)
     (assert)
     (inst -2 "first(p1!2)" "p1!2" "rest(p1!2)" "subtermOF(t!1, p1!1)")
     (assert))
    ("17"
     (hide - 2)
     (skosimp)
     (expand child)
     (skosimp)
     (lemma pos_subterm_ax)
     (inst -1 "p1!1" "p1!2" "s!1")
     (assert)
     (lemma not_var)
     (lemma seq_first_rest[posnat])
     (inst -1 p1!2)
     (lemma empty_0[posnat])
     (inst -1 p1!2)
     (assert)
     (inst -2 "first(p1!2)" "p1!2" "rest(p1!2)" "subtermOF(s!1, p1!1)")
     (assert))
    ("18"
     (hide 2)
     (lemma right_pos_subset)
     (inst?)
     (lemma positions_of_terms_finite)
     (inst?)
     (lemma finite_subset[position])
     (inst?)
     (assert))
    ("19"
     (hide 2)
     (rewrite finite_union)
     (("1" (hide 2) (rewrite vars_of_term_finite))
      ("2" (hide 2) (rewrite vars_of_term_finite))))))


proof_type: f_proof
decl_type: formula
library: TRS
theory: robinsonunificationEF
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (measure-induct+
    "lex2(Card(union(Vars(s), Vars(t))),
                                                       Card(right_pos(s,p)))"
    ("s" "t" "p"))
   (("1"
     (skosimp)
     (case "subtermOF(x!1, x!3) = subtermOF(x!2, x!3)")
     (("1"
       (case "x!3 = empty_seq")
       (("1"
         (hide -3 -4 -5)
         (expand "robinson_unification_algorithm_aux")
         (assert)
         (replaces -1)
         (expand next_position 1 1)
         (hide -)
         (expand <=)
         (inst 1 rho!1)
         (decompose-equality)
         (expand comp)
         (expand identity)
         (typepred x!4)
         (expand* V ext)
         (assert))
        ("2"
         (expand "robinson_unification_algorithm_aux" 2)
         (assert)
         (lift-if)
         (prop)
         (("1"
           (hide-all-but 1)
           (expand <=)
           (inst 1 rho!1)
           (decompose-equality)
           (typepred x!4)
           (expand* V comp ext identity)
           (assert))
          ("2"
           (name-replace "np" "next_position(x!1, x!2, x!3)" :hide? nil)
           (name-replace "sig!1"
            "robinson_unification_algorithm_aux(x!1, x!2, np)" :hide?
            nil)
           (inst -4 x!1 x!2 np)
           (inst -4 rho!1)
           (assert)
           (lemma robinson_unification_algorithm_aux_TCC8)
           (inst -1 x!1 x!2 x!3)
           (assert)
           (inst -1 np)
           (assert)
           (hide -1)
           (prop)
           (("1"
             (skosimp)
             (lemma next_pos_equal_subterm)
             (inst -1 x!1 x!2 x!3)
             (ground)
             (replace -4)
             (inst -1 q!1)
             (assert))
            ("2"
             (skosimp)
             (lemma child_np_child_p)
             (inst -1 x!1 x!2 x!3 p1!1)
             (replace -4)
             (assert)
             (inst -7 p1!1)
             (assert))))))))
      ("2"
       (expand robinson_unification_algorithm_aux 2)
       (assert)
       (name-replace "sig!1"
        "link_of_frst_diff(subtermOF(x!1, x!3), subtermOF(x!2, x!3))"
        :hide? nil)
       (name-replace "fd"
        "first_diff(subtermOF(x!1, x!3), subtermOF(x!2, x!3))" :hide?
        nil)
       (name-replace "np"
        "next_position(ext(sig!1)(x!1), ext(sig!1)(x!2), x!3 o fd)"
        :hide? nil)
       (("1"
         (name-replace "sig!2"
          "robinson_unification_algorithm_aux(ext(sig!1)(x!1), ext(sig!1)(x!2), np)"
          :hide? nil)
         (("1"
           (lift-if)
           (prop)
           (("1"
             (hide-all-but (-1 -5 -9))
             (lemma unifiable_implies_not_fail1)
             (inst -1 x!1 x!2 x!3)
             (replace -3)
             (assert)
             (assert)
             (hide -1 -2)
             (expand* member U unifiable unifier)
             (inst 1 rho!1))
            ("2"
             (hide-all-but (-5 -9 1 3))
             (lemma preserving_generality1)
             (inst -1 rho!1 x!1 x!2 x!3)
             (replace -2)
             (assert)
             (skosimp)
             (expand <=)
             (inst 1 theta!1))
            ("3"
             (hide -6)
             (lemma ruaEF_fails_iff_non_unifiable_aux)
             (inst -1 x!1 x!2 x!3)
             (ground)
             (("1"
               (hide-all-but (-9 1))
               (expand* member U unifiable unifier)
               (inst 1 rho!1))
              ("2"
               (expand robinson_unification_algorithm_aux 1)
               (propax))))
            ("4"
             (inst -5 "ext(sig!1)(x!1)" "ext(sig!1)(x!2)" "np")
             (lemma preserving_generality1)
             (inst -1 rho!1 x!1 x!2 x!3)
             (assert)
             (replace -5)
             (skosimp)
             (inst -6 theta!1)
             (lemma robinson_unification_algorithm_aux_TCC12)
             (inst -1 x!1 x!2 x!3)
             (assert)
             (inst -1 sig!1)
             (assert)
             (replace -5)
             (replace -4)
             (inst -1 np)
             (assert)
             (hide -1)
             (replace -2)
             (ground)
             (("1"
               (hide-all-but (-1 -2 2))
               (expand <=)
               (skosimp)
               (replaces -1)
               (inst 1 tau!1)
               (rewrite o_ass))
              ("2"
               (hide-all-but (-1 -8 1))
               (expand* member U unifier)
               (replaces -1)
               (rewrite ext_o)
               (expand o)
               (propax))
              ("3"
               (skosimp)
               (lemma np_p_o_fd_equal_subterm)
               (inst -1 x!1 x!2 x!3)
               (replace -6)
               (replace -7)
               (assert)
               (replace -5)
               (ground))
              ("4"
               (skosimp)
               (lemma child_np_child_p)
               (inst -1 "ext(sig!1)(x!1)" "ext(sig!1)(x!2)" "x!3 o fd"
                "p1!1")
               (replace -5)
               (assert)
               (case "x!3 <= p1!1")
               (("1"
                 (hide -3 -4 -5 -6 -9 -10 -11 2 3 4)
                 (lemma fd_equal_symbol)
                 (inst -1 "subtermOF(x!1, x!3)" "subtermOF(x!2, x!3)")
                 (replace -4)
                 (assert)
                 (expand <=)
                 (skosimp)
                 (inst -1 p1!2)
                 (("1"
                   (split)
                   (("1"
                     (lemma pos_subterm)
                     (inst-cp -1 x!3 p1!2 x!1)
                     (inst -1 x!3 p1!2 x!2)
                     (split)
                     (("1"
                       (split)
                       (("1"
                         (replace -1 -3 rl)
                         (replace -2 -3 rl)
                         (hide -1 -2)
                         (replace -2 -1 rl)
                         (lemma ext_preserve_symbol)
                         (inst-cp -1 x!1 sig!1 p1!1)
                         (inst -1 x!2 sig!1 p1!1)
                         (split)
                         (("1"
                           (split)
                           (("1" (assert))
                            ("2"
                             (hide-all-but (-3 -4 -5 1 4))
                             (lemma position_s_first_diff)
                             (inst -1 "subtermOF(x!1, x!3)"
                              "subtermOF(x!2, x!3)" fd)
                             (assert)
                             (typepred x!3)
                             (hide -2)
                             (lemma pos_o_term)
                             (inst -1 x!3 fd x!1)
                             (assert)
                             (name-replace "q!1" "x!3 o fd")
                             (hide-all-but (-1 -5 1))
                             (expand child)
                             (skosimp)
                             (lemma not_var)
                             (lemma seq_first_rest[posnat])
                             (inst -1 p1!3)
                             (lemma empty_0[posnat])
                             (inst -1 p1!3)
                             (assert)
                             (inst -2 "first(p1!3)" "p1!3" "rest(p1!3)"
                              "subtermOF(x!1, p1!1)")
                             (lemma pos_subterm_ax)
                             (inst -1 p1!1 p1!3 x!1)
                             (assert))))
                          ("2"
                           (hide-all-but (-3 -4 -5 1 4))
                           (lemma position_t_first_diff)
                           (inst -1 "subtermOF(x!1, x!3)"
                            "subtermOF(x!2, x!3)" fd)
                           (assert)
                           (typepred x!3)
                           (hide -1)
                           (lemma pos_o_term)
                           (inst -1 x!3 fd x!2)
                           (assert)
                           (name-replace "q!1" "x!3 o fd")
                           (hide-all-but (-1 -5 1))
                           (expand child)
                           (skosimp)
                           (lemma not_var)
                           (lemma seq_first_rest[posnat])
                           (inst -1 p1!3)
                           (lemma empty_0[posnat])
                           (inst -1 p1!3)
                           (assert)
                           (inst -2 "first(p1!3)" "p1!3" "rest(p1!3)"
                            "subtermOF(x!2, p1!1)")
                           (assert)
                           (lemma pos_subterm_ax)
                           (inst -1 p1!1 p1!3 x!2)
                           (assert))))
                        ("2"
                         (hide-all-but (-3 -4 -5 1 4))
                         (lemma position_s_first_diff)
                         (inst -1 "subtermOF(x!1, x!3)"
                          "subtermOF(x!2, x!3)" "fd")
                         (assert)
                         (typepred x!3)
                         (hide -2)
                         (lemma pos_o_term)
                         (inst -1 x!3 fd x!1)
                         (assert)
                         (name-replace "q!1" "x!3 o fd")
                         (hide -2 -3 -6 2)
                         (expand child)
                         (skosimp)
                         (replace -2 1 rl)
                         (hide -2)
                         (lemma pos_ax)
                         (inst -1 p1!1 p1!3 x!1)
                         (assert))))
                      ("2"
                       (hide-all-but (-3 -4 -5 1 4))
                       (replace -1 1 rl)
                       (hide -1)
                       (lemma position_t_first_diff)
                       (inst -1 "subtermOF(x!1, x!3)"
                        "subtermOF(x!2, x!3)" fd)
                       (assert)
                       (typepred x!3)
                       (hide -1)
                       (lemma pos_o_term)
                       (inst -1 x!3 fd x!2)
                       (assert)
                       (name-replace "q!1" "x!3 o fd")
                       (hide -2 -3 -5 2)
                       (expand child)
                       (skosimp)
                       (lemma pos_ax)
                       (inst -1 p1!1 p1!3 x!2)
                       (assert))))
                    ("2"
                     (hide-all-but (-1 -2 1))
                     (replaces -1)
                     (expand child)
                     (skosimp)
                     (lemma equal_prefix[posnat])
                     (inst -1 x!3 fd "p1!2 o p1!3")
                     (rewrite o_assoc)
                     (assert)
                     (hide -2)
                     (inst 1 p1!3)
                     (assert))))
                  ("2"
                   (hide-all-but (-1 -2 -3 1 4))
                   (lemma position_s_first_diff)
                   (lemma position_t_first_diff)
                   (inst -2 "subtermOF(x!1, x!3)" "subtermOF(x!2, x!3)"
                    "fd")
                   (inst -1 "subtermOF(x!1, x!3)" "subtermOF(x!2, x!3)"
                    "fd")
                   (assert)
                   (typepred x!3)
                   (lemma pos_o_term)
                   (inst-cp -1 x!3 fd x!2)
                   (inst -1 x!3 fd x!1)
                   (assert)
                   (name-replace "q!1" "x!3 o fd")
                   (hide-all-but (-1 -2 -7 -8 1))
                   (replaces -3)
                   (expand child)
                   (skosimp)
                   (lemma pos_subterm_ax)
                   (inst-cp -1 x!3 "p1!2 o p1!3" x!2)
                   (inst -1 x!3 "p1!2 o p1!3" x!1)
                   (rewrite o_assoc)
                   (assert)
                   (hide -3 -4 -5 2)
                   (lemma pos_ax)
                   (inst-cp -1 p1!2 p1!3 "subtermOF(x!2, x!3)")
                   (inst -1 p1!2 p1!3 "subtermOF(x!1, x!3)")
                   (assert))))
                ("2"
                 (inst -9 p1!1)
                 (("1"
                   (lemma ext_preserve_symbol)
                   (inst-cp -1 x!1 sig!1 p1!1)
                   (("1"
                     (inst -1 x!2 sig!1 p1!1)
                     (("1"
                       (split -11)
                       (("1"
                         (split -2)
                         (("1"
                           (split -3)
                           (("1" (assert))
                            ("2"
                             (hide-all-but (-3 -8 1 8))
                             (lemma position_s_first_diff)
                             (inst -1 "subtermOF(x!1, x!3)"
                              "subtermOF(x!2, x!3)" fd)
                             (assert)
                             (typepred x!3)
                             (hide -2)
                             (lemma pos_o_term)
                             (inst -1 x!3 fd x!1)
                             (assert)
                             (name-replace "q!1" "x!3 o fd")
                             (hide -2 -3 -5 2)
                             (expand child)
                             (skosimp)
                             (lemma not_var)
                             (lemma seq_first_rest[posnat])
                             (inst -1 p1!2)
                             (lemma empty_0[posnat])
                             (inst -1 p1!2)
                             (assert)
                             (inst -2 "first(p1!2)" "p1!2" "rest(p1!2)"
                              "subtermOF(x!1, p1!1)")
                             (assert)
                             (lemma pos_subterm_ax)
                             (inst -1 p1!1 p1!2 x!1)
                             (assert))))
                          ("2"
                           (hide-all-but (-3 -8 1 8))
                           (lemma position_t_first_diff)
                           (inst -1 "subtermOF(x!1, x!3)"
                            "subtermOF(x!2, x!3)" fd)
                           (assert)
                           (typepred x!3)
                           (hide -1)
                           (lemma pos_o_term)
                           (inst -1 x!3 fd x!2)
                           (assert)
                           (name-replace "q!1" "x!3 o fd")
                           (hide -2 -3 -5 2)
                           (expand child)
                           (skosimp)
                           (lemma not_var)
                           (lemma seq_first_rest[posnat])
                           (inst -1 p1!2)
                           (lemma empty_0[posnat])
                           (inst -1 p1!2)
                           (assert)
                           (inst -2 "first(p1!2)" "p1!2" "rest(p1!2)"
                            "subtermOF(x!2, p1!1)")
                           (assert)
                           (lemma pos_subterm_ax)
                           (inst -1 p1!1 p1!2 x!2)
                           (assert))))
                        ("2"
                         (hide-all-but (-3 1 2))
                         (expand child)
                         (skosimp)
                         (expand <=)
                         (case "length(x!3) < length(p1!1)")
                         (("1"
                           (lemma o_length_o[posnat])
                           (inst?)
                           (assert))
                          ("2"
                           (case "length(p1!1) < length(x!3)")
                           (("1"
                             (lemma o_length_o[posnat])
                             (inst -1 p1!1 p1!2 x!3 fd)
                             (assert)
                             (skosimp)
                             (inst 2 seq!1)
                             (assert)
                             (flatten)
                             (inst 2 seq!1)
                             (replaces -3)
                             (rewrite seq_o_empty)
                             (rewrite seq_o_empty)
                             (assert))
                            ("2"
                             (lemma o_equals_o[posnat])
                             (inst -1 x!3 fd p1!1 p1!2)
                             (assert)
                             (inst 4 empty_seq)
                             (rewrite seq_o_empty)
                             (assert))))))))
                      ("2"
                       (hide-all-but (-2 -7 1 8))
                       (lemma position_t_first_diff)
                       (inst -1 "subtermOF(x!1, x!3)"
                        "subtermOF(x!2, x!3)" fd)
                       (assert)
                       (typepred x!3)
                       (hide -1)
                       (lemma pos_o_term)
                       (inst -1 x!3 fd x!2)
                       (assert)
                       (name-replace "q!1" "x!3 o fd")
                       (hide -2 -3 -5 2)
                       (expand child)
                       (skosimp)
                       (lemma pos_ax)
                       (inst -1 p1!1 p1!2 x!2)
                       (assert))))
                    ("2"
                     (hide-all-but (-1 -6 1 8))
                     (lemma position_s_first_diff)
                     (inst -1 "subtermOF(x!1, x!3)" "subtermOF(x!2, x!3)"
                      fd)
                     (assert)
                     (typepred x!3)
                     (hide -2)
                     (lemma pos_o_term)
                     (inst -1 x!3 fd x!1)
                     (assert)
                     (name-replace "q!1" "x!3 o fd")
                     (hide -2 -3 -5 2)
                     (expand child)
                     (skosimp)
                     (lemma pos_ax)
                     (inst -1 p1!1 p1!2 x!1)
                     (assert))))
                  ("2"
                   (hide-all-but (-1 -6 1 8))
                   (lemma position_t_first_diff)
                   (lemma position_s_first_diff)
                   (inst -2 "subtermOF(x!1, x!3)" "subtermOF(x!2, x!3)"
                    fd)
                   (inst -1 "subtermOF(x!1, x!3)" "subtermOF(x!2, x!3)"
                    fd)
                   (assert)
                   (typepred x!3)
                   (lemma pos_o_term)
                   (inst-cp -1 x!3 fd x!2)
                   (inst -1 x!3 fd x!1)
                   (assert)
                   (name-replace "q!1" "x!3 o fd")
                   (hide -3 -4 -5 -6 -8 2)
                   (expand child)
                   (skosimp)
                   (lemma pos_ax)
                   (inst-cp -1 p1!1 p1!2 x!2)
                   (inst -1 p1!1 p1!2 x!1)
                   (assert))))))))))
          ("2"
           (hide-all-but (-1 -2 1))
           (lemma next_position_is_position)
           (inst-cp -1 "ext(sig!1)(x!1)" "ext(sig!1)(x!2)" "x!3 o fd")
           (inst -1 "ext(sig!1)(x!2)" "ext(sig!1)(x!1)" "x!3 o fd")
           (("1"
             (lemma next_position_commute)
             (inst -1 "ext(sig!1)(x!2)" "ext(sig!1)(x!1)" "x!3 o fd")
             (replace -4)
             (replace -1)
             (assert))
            ("2"
             (hide -1 -2 2)
             (lemma position_t_first_diff)
             (lemma position_s_first_diff)
             (inst -1 "subtermOF(x!1, x!3)" "subtermOF(x!2, x!3)" fd)
             (inst -2 "subtermOF(x!1, x!3)" "subtermOF(x!2, x!3)" fd)
             (assert)
             (typepred x!3)
             (lemma pos_o_term)
             (inst-cp -1 x!3 fd x!2)
             (inst -1 x!3 fd x!1)
             (assert)
             (hide-all-but (-1 -2 1))
             (rewrite ext_preserv_pos)
             (rewrite ext_preserv_pos))))))
        ("2"
         (hide-all-but (-1 1))
         (lemma position_t_first_diff)
         (lemma position_s_first_diff)
         (inst -2 "subtermOF(x!1, x!3)" "subtermOF(x!2, x!3)" fd)
         (inst -1 "subtermOF(x!1, x!3)" "subtermOF(x!2, x!3)" fd)
         (assert)
         (typepred x!3)
         (lemma pos_o_term)
         (inst-cp -1 x!3 fd x!2)
         (inst -1 x!3 fd x!1)
         (assert)
         (hide-all-but (-1 -2 1))
         (rewrite ext_preserv_pos)
         (rewrite ext_preserv_pos))))))
    ("2"
     (hide - 2)
     (skosimp)
     (expand child)
     (skosimp)
     (lemma pos_subterm_ax)
     (inst -1 p1!1 p1!2 y!2)
     (assert)
     (lemma not_var)
     (lemma seq_first_rest[posnat])
     (inst -1 p1!2)
     (lemma empty_0[posnat])
     (inst -1 p1!2)
     (assert)
     (inst -2 "first(p1!2)" "p1!2" "rest(p1!2)" "subtermOF(y!2, p1!1)")
     (assert))
    ("3"
     (hide - 2)
     (skosimp)
     (expand child)
     (skosimp)
     (lemma pos_subterm_ax)
     (inst -1 p1!1 p1!2 y!1)
     (assert)
     (lemma not_var)
     (lemma seq_first_rest[posnat])
     (inst -1 p1!2)
     (lemma empty_0[posnat])
     (inst -1 p1!2)
     (assert)
     (inst -2 "first(p1!2)" "p1!2" "rest(p1!2)" "subtermOF(y!1, p1!1)")
     (assert))
    ("4"
     (hide - 2)
     (lemma right_pos_subset)
     (inst?)
     (lemma positions_of_terms_finite)
     (inst?)
     (lemma finite_subset[position])
     (inst?)
     (assert))
    ("5"
     (hide 1 3)
     (lemma right_pos_subset)
     (inst?)
     (lemma positions_of_terms_finite)
     (inst?)
     (lemma finite_subset[position])
     (inst?)
     (assert))
    ("6"
     (hide -1 2)
     (rewrite finite_union)
     (("1" (hide 2) (rewrite vars_of_term_finite))
      ("2" (hide 2) (rewrite vars_of_term_finite))))
    ("7"
     (hide 1 3)
     (rewrite finite_union)
     (("1" (hide 2) (rewrite vars_of_term_finite))
      ("2" (hide 2) (rewrite vars_of_term_finite))))
    ("8"
     (hide-all-but 1)
     (skosimp)
     (lemma app_term)
     (inst -1 y!3 p1!1 y!2)
     (assert))
    ("9"
     (hide-all-but 1)
     (skosimp)
     (lemma app_term)
     (inst -1 y!3 p1!1 y!1)
     (assert))
    ("10"
     (hide 2)
     (lemma right_pos_subset)
     (inst?)
     (lemma positions_of_terms_finite)
     (inst?)
     (lemma finite_subset[position])
     (inst?)
     (assert))
    ("11"
     (hide 2)
     (rewrite finite_union)
     (("1" (hide 2) (rewrite vars_of_term_finite))
      ("2" (hide 2) (rewrite vars_of_term_finite))))
    ("12"
     (hide 2)
     (lemma right_pos_subset)
     (inst?)
     (lemma positions_of_terms_finite)
     (inst?)
     (lemma finite_subset[position])
     (inst?)
     (assert))
    ("13"
     (hide 2)
     (rewrite finite_union)
     (("1" (hide 2) (rewrite vars_of_term_finite))
      ("2" (hide 2) (rewrite vars_of_term_finite))))
    ("14"
     (hide-all-but 1)
     (lemma app_term)
     (skosimp)
     (inst -1 "x!1`3" "p11!1" "x!1`2")
     (assert))
    ("15"
     (hide-all-but 1)
     (skosimp)
     (lemma app_term)
     (inst -1 "x!1`3" "p11!1" "x!1`1")
     (assert))
    ("16"
     (hide-all-but 1)
     (skosimp)
     (lemma app_term)
     (inst -1 "y!1`3" "p1!1" "y!1`2")
     (assert))
    ("17"
     (hide-all-but 1)
     (skosimp)
     (lemma app_term)
     (inst -1 "y!1`3" "p1!1" "y!1`1")
     (assert))
    ("18"
     (hide 2)
     (lemma right_pos_subset)
     (inst?)
     (lemma positions_of_terms_finite)
     (inst?)
     (lemma finite_subset[position])
     (inst?)
     (assert))
    ("19"
     (hide 2)
     (rewrite finite_union)
     (("1" (hide 2) (rewrite vars_of_term_finite))
      ("2" (hide 2) (rewrite vars_of_term_finite))))
    ("20"
     (hide 2)
     (lemma right_pos_subset)
     (inst?)
     (lemma positions_of_terms_finite)
     (inst?)
     (lemma finite_subset[position])
     (inst?)
     (assert))
    ("21"
     (hide 2)
     (rewrite finite_union)
     (("1" (hide 2) (rewrite vars_of_term_finite))
      ("2" (hide 2) (rewrite vars_of_term_finite))))
    ("22"
     (hide -1 2)
     (skosimp)
     (lemma app_term)
     (inst -1 p!1 p1!1 t!1)
     (assert))
    ("23"
     (hide -1 2)
     (skosimp)
     (lemma app_term)
     (inst -1 p!1 p1!1 s!1)
     (assert))
    ("24"
     (hide - 2 3)
     (lemma right_pos_subset)
     (inst?)
     (lemma positions_of_terms_finite)
     (inst?)
     (lemma finite_subset[position])
     (inst?)
     (assert))
    ("25"
     (hide - 2 3)
     (rewrite finite_union)
     (("1" (hide 2) (rewrite vars_of_term_finite))
      ("2" (hide 2) (rewrite vars_of_term_finite))))))


proof_type: f_proof
decl_type: formula
library: TRS
theory: robinsonunificationEF
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (prop)
   (("1"
     (lemma "ruaEF_fails_iff_non_unifiable_aux")
     (inst -1 "s!1" "t!1" "empty_seq")
     (("1"
       (split)
       (("1" (expand "robinson_unification_algorithm_EF") (assert))
        ("2"
         (skosimp*)
         (hide +)
         (expand "left_without_children")
         (skosimp*)
         (lemma "seq_empty[posnat]")
         (inst?)
         (rewrite "empty_0")
         (rewrite "empty_0")
         (assert))
        ("3"
         (skosimp*)
         (hide +)
         (expand "child")
         (skosimp)
         (lemma "seq_empty[posnat]")
         (inst?)
         (rewrite "empty_0")
         (rewrite "empty_0")
         (assert))))
      ("2"
       (hide (2 3))
       (prop)
       (("1"
         (expand "positionsOF")
         (lift-if)
         (expand* "only_empty_seq" "union" "member"))
        ("2"
         (expand "positionsOF")
         (lift-if)
         (expand* "only_empty_seq" "union" "member"))))))
    ("2"
     (expand "robinson_unification_algorithm_EF")
     (lemma "ruaEF_fails_iff_non_unifiable_aux")
     (inst?)
     (split)
     (("1" (assert))
      ("2"
       (skosimp*)
       (hide-all-but -1)
       (expand "left_without_children")
       (skosimp)
       (lemma "seq_empty[posnat]")
       (inst?)
       (rewrite "empty_0")
       (rewrite "empty_0")
       (assert))
      ("3"
       (skosimp*)
       (hide-all-but -1)
       (expand "child")
       (skosimp)
       (lemma "seq_empty[posnat]")
       (inst?)
       (rewrite "empty_0")
       (rewrite "empty_0")
       (assert))))))


proof_type: f_proof
decl_type: formula
library: TRS
theory: robinsonunificationEF
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (lemma ruaEF_gives_unifier_aux)
   (prop)
   (("1"
     (inst -2 s!1 t!1 empty_seq)
     (("1"
       (prop)
       (("1" (expand robinson_unification_algorithm_EF) (propax))
        ("2"
         (skosimp)
         (hide-all-but -1)
         (expand left_without_children)
         (skosimp)
         (lemma seq_empty[posnat])
         (inst?)
         (assert)
         (flatten)
         (rewrite empty_0 -2))
        ("3"
         (skosimp)
         (hide-all-but -1)
         (expand child)
         (skosimp)
         (lemma seq_empty[posnat])
         (inst?)
         (assert)
         (flatten)
         (rewrite empty_0 -2))))
      ("2"
       (hide-all-but 1)
       (split)
       (("1"
         (expand positionsOF)
         (lift-if)
         (expand* only_empty_seq union member))
        ("2"
         (expand positionsOF)
         (lift-if)
         (expand* only_empty_seq union member))))))
    ("2"
     (inst -2 s!1 t!1 empty_seq)
     (("1"
       (prop)
       (("1" (expand robinson_unification_algorithm_EF) (propax))
        ("2"
         (skosimp)
         (hide-all-but -1)
         (expand left_without_children)
         (skosimp)
         (lemma seq_empty[posnat])
         (inst?)
         (assert)
         (flatten)
         (rewrite empty_0 -2))
        ("3"
         (skosimp)
         (hide-all-but -1)
         (expand child)
         (skosimp)
         (lemma seq_empty[posnat])
         (inst?)
         (assert)
         (flatten)
         (rewrite empty_0 -2))))
      ("2"
       (hide-all-but 1)
       (split)
       (("1"
         (expand positionsOF)
         (lift-if)
         (expand* only_empty_seq union member))
        ("2"
         (expand positionsOF)
         (lift-if)
         (expand* only_empty_seq union member))))))))


proof_type: f_proof
decl_type: formula
library: TRS
theory: robinsonunificationEF
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (lemma ruaEF_gives_mg_subs_aux)
   (inst -1 rho!1 s!1 t!1 empty_seq)
   (("1"
     (prop)
     (("1" (expand robinson_unification_algorithm_EF) (propax))
      ("2"
       (skosimp)
       (hide-all-but -1)
       (expand left_without_children)
       (skosimp)
       (lemma seq_empty[posnat])
       (inst?)
       (assert)
       (flatten)
       (rewrite empty_0 -2))
      ("3"
       (skosimp)
       (hide-all-but -1)
       (expand child)
       (skosimp)
       (lemma seq_empty[posnat])
       (inst?)
       (assert)
       (flatten)
       (rewrite empty_0 -2))))
    ("2"
     (hide-all-but 1)
     (split)
     (("1"
       (expand positionsOF)
       (lift-if)
       (expand* only_empty_seq union member))
      ("2"
       (expand positionsOF)
       (lift-if)
       (expand* only_empty_seq union member))))))


proof_type: f_proof
decl_type: formula
library: TRS
theory: robinsonunificationEF
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (prop)
   (("1"
     (expand mgu)
     (prop)
     (("1" (rewrite ruaEF_gives_unifier))
      ("2" (skosimp) (rewrite ruaEF_gives_mg_subs))))
    ("2"
     (lemma ruaEF_fails_iff_non_unifiable)
     (inst -1 s!1 t!1)
     (assert))))


proof_type: t_proof
decl_type: tcc
library: TRS
theory: robinsonunificationEF
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp*)
   (lemma delete_is_position)
   (inst -1 p!1 s!1)
   (assert)
   (flatten)
   (rewrite empty_0))


proof_type: t_proof
decl_type: tcc
library: TRS
theory: robinsonunificationEF
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp*)
   (lemma subterm_is_app)
   (inst -1 p!1 s!1)
   (assert)
   (flatten)
   (rewrite empty_0))


proof_type: t_proof
decl_type: tcc
library: TRS
theory: robinsonunificationEF
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp*)
   (hide -1 -3 -4)
   (replaces -1)
   (expand delete 2)
   (lemma empty_0[posnat])
   (inst -1 p!1)
   (assert))


proof_type: t_proof
decl_type: tcc
library: TRS
theory: robinsonunificationEF
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp*)
   (lemma positions_of_arg)
   (inst -1 "subtermOF(s!1, p1!1)" "j!1 + i!1")
   (("1"
     (lemma pos_o_term)
     (inst -1 "p1!1" "#(j!1 + i!1 + 1)" "s!1")
     (lemma delete_is_position)
     (inst -1 p!1 s!1)
     (lemma empty_0[posnat])
     (inst -1 p!1)
     (assert)
     (hide-all-but (-2 3))
     (case "p1!1 o  #(1 + i!1 + j!1) = add_last(p1!1, 1 + i!1 + j!1)")
     (("1" (assert)) ("2" (hide-all-but 1) (grind))))
    ("2"
     (typepred j!1)
     (typepred "args(subtermOF(s!1, p1!1))")
     (replace -1 1)
     (replace -6 1 rl)
     (hide-all-but (-2 1))
     (assert))))


proof_type: t_proof
decl_type: tcc
library: TRS
theory: robinsonunificationEF
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp*)
   (lemma "subterm_is_app")
   (inst -1 p!1 s!1)
   (assert)
   (hide 3)
   (flatten)
   (rewrite "empty_0"))


proof_type: t_proof
decl_type: tcc
library: TRS
theory: robinsonunificationEF
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (name-replace "q!1" "delete(p!1, length(p!1) - 1)" :hide? nil)
   (("1"
     (lemma empty_0[posnat])
     (inst -1 p!1)
     (assert)
     (typepred "args(subtermOF(s!1, q!1))")
     (replace -1 3 rl)
     (hide -1)
     (lemma add_last_delete[posnat])
     (inst -1 p!1)
     (assert)
     (replace -2 -1)
     (lemma add_last_delete_is_o[posnat])
     (inst -1 p!1)
     (assert)
     (expand finseq_appl)
     (replace -3 -1)
     (replace -2 -1 rl)
     (lemma pos_subterm_ax)
     (inst -1 "q!1" "#(p!1`seq(p!1`length - 1))" "s!1")
     (assert)
     (expand positionsOF -1)
     (lift-if)
     (ground)
     (("1" (hide-all-but -2) (grind)) ("2" (hide-all-but -2) (grind))
      ("3"
       (expand* union IUnion member)
       (split)
       (("1" (hide-all-but -1) (grind))
        ("2"
         (skosimp)
         (expand finseq_appl)
         (expand catenate)
         (skosimp)
         (expand member)
         (typepred i!1)
         (expand add_first)
         (expand insert?)
         (decompose-equality -4)
         (expand finseq_appl)
         (expand "#" -1)
         (expand "#" -2)
         (decompose-equality -2)
         (inst?)
         (case "p!1`seq(p!1`length - 1) = last(p!1)")
         (("1" (assert)) ("2" (hide-all-but 1) (grind))))))))
    ("2" (hide 3) (lemma empty_0[posnat]) (inst -1 p!1) (assert))))


proof_type: t_proof
decl_type: tcc
library: TRS
theory: robinsonunificationEF
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp*)
   (typepred "length(z!1`3)")
   (case "length(z!1`3)=0")
   (("1" (rewrite "empty_0")) ("2" (assert))))


proof_type: t_proof
decl_type: tcc
library: TRS
theory: robinsonunificationEF
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (name-replace "q!1" "delete(z!1`3, length(z!1`3) - 1)" :hide? nil)
   (("1"
     (lemma empty_0[posnat])
     (inst -1 "z!1`3")
     (assert)
     (typepred "args(subtermOF(z!1`1, q!1))")
     (replace -1 3 rl)
     (hide -1)
     (lemma add_last_delete[posnat])
     (inst -1 "z!1`3")
     (assert)
     (replace -2 -1)
     (lemma add_last_delete_is_o[posnat])
     (inst -1 "z!1`3")
     (assert)
     (expand finseq_appl)
     (replace -3 -1)
     (replace -2 -1 rl)
     (lemma pos_subterm_ax)
     (inst -1 "q!1" "#(z!1`3`seq(z!1`3`length - 1))" "z!1`1")
     (assert)
     (expand positionsOF -1)
     (lift-if)
     (ground)
     (("1" (hide-all-but -2) (grind)) ("2" (hide-all-but -2) (grind))
      ("3"
       (expand* union IUnion member)
       (split)
       (("1" (hide-all-but -1) (grind))
        ("2"
         (skosimp)
         (expand finseq_appl)
         (expand catenate)
         (skosimp)
         (expand member)
         (typepred i!1)
         (expand add_first)
         (expand insert?)
         (decompose-equality -4)
         (expand finseq_appl)
         (expand "#" -1)
         (expand "#" -2)
         (decompose-equality -2)
         (inst?)
         (case "z!1`3`seq(z!1`3`length - 1) = last(z!1`3)")
         (("1" (assert)) ("2" (hide-all-but 1) (grind))))))))
    ("2" (hide 3) (lemma empty_0[posnat]) (inst -1 "z!1`3") (assert))))


proof_type: t_proof
decl_type: tcc
library: TRS
theory: robinsonunificationEF
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp*)
   (lemma "subterm_is_app")
   (inst?)
   (inst -1 "s!1")
   (assert)
   (prop)
   (rewrite "empty_0"))


proof_type: t_proof
decl_type: tcc
library: TRS
theory: robinsonunificationEF
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp*)
   (replaces -1)
   (rewrite delete_is_position)
   (hide 3)
   (flatten)
   (rewrite empty_0))


proof_type: t_proof
decl_type: tcc
library: TRS
theory: robinsonunificationEF
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp*)
   (lemma "subterm_is_app")
   (inst?)
   (assert)
   (inst -1 "t!1")
   (assert)
   (prop)
   (rewrite "empty_0"))


proof_type: t_proof
decl_type: tcc
library: TRS
theory: robinsonunificationEF
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp*)
   (replace -2 -4 rl)
   (case "pi!1 = pi0!1 o #(last(p!1) + 1)")
   (("1"
     (lemma pos_o_term)
     (inst -1 "pi0!1" "#(last(p!1) + 1)" "t!1")
     (assert)
     (hide 3)
     (split)
     (("1"
       (lemma delete_is_position)
       (inst -1 "p!1" "t!1")
       (assert)
       (hide-all-but (1 3))
       (lemma empty_0[posnat])
       (inst -1 p!1)
       (assert))
      ("2"
       (lemma pos_subterm_ax)
       (inst -1 "pi0!1" "#(last(p!1) + 1)" "s!1")
       (assert)
       (expand positionsOF 1)
       (lift-if)
       (ground)
       (("1"
         (lemma subterm_is_app)
         (inst -1 p!1 t!1)
         (assert)
         (hide-all-but (1 3))
         (lemma empty_0[posnat])
         (inst -1 p!1)
         (assert))
        ("2"
         (typepred "args(subtermOF(t!1, pi0!1))"
          "args(subtermOF(s!1, pi0!1))")
         (replace -6 -2)
         (replace -1 -2 rl)
         (hide -1)
         (replace -1 -2 rl)
         (hide -1)
         (case "positionsOF(subtermOF(s!1, pi0!1)) = only_empty_seq")
         (("1"
           (lemma pos_subterm_ax)
           (inst -1 "pi0!1" "#(1 + last(p!1))" "s!1")
           (assert))
          ("2"
           (hide-all-but (-1 1))
           (expand positionsOF)
           (assert)
           (lift-if)
           (assert))))
        ("3"
         (expand union)
         (expand member)
         (flatten)
         (expand IUnion)
         (expand finseq_appl)
         (inst 3 "last(p!1) + 1")
         (("1"
           (expand catenate)
           (inst 3 empty_seq)
           (split)
           (("1"
             (hide-all-but 1)
             (expand positionsOF)
             (lift-if)
             (ground)
             (("1" (expand* member only_empty_seq))
              ("2" (expand* member only_empty_seq))
              ("3" (expand* union member only_empty_seq))))
            ("2" (hide-all-but 1) (grind))))
          ("2"
           (lemma next_position_TCC5)
           (inst -1 s!1 s!1 pi!1)
           (split)
           (("1"
             (case "delete(pi!1, length(pi!1) - 1) = pi0!1")
             (("1"
               (replace -1 -2)
               (typepred "args(subtermOF(t!1, pi0!1))"
                "args(subtermOF(s!1, pi0!1))")
               (replace -7 -1 rl)
               (replace -1 -2 rl)
               (replace -2 1 rl)
               (replace -2 -1 rl)
               (replace -1 -4 rl)
               (case "1 + last(p!1) = last(pi!1)")
               (("1" (assert)) ("2" (hide-all-but (-6 -10 1)) (grind))))
              ("2"
               (hide-all-but (-7 1))
               (expand* add_last insert? delete)
               (decompose-equality -1)
               (("1"
                 (decompose-equality 1)
                 (expand finseq_appl)
                 (decompose-equality 1)
                 (("1"
                   (decompose-equality -2)
                   (hide -2)
                   (typepred x!1)
                   (inst -2 x!1)
                   (lift-if)
                   (ground))
                  ("2" (skosimp) (hide -2) (replaces -1) (assert))))
                ("2"
                 (expand finseq_appl)
                 (decompose-equality 2)
                 (("1" (decompose-equality 1))
                  ("2"
                   (skosimp)
                   (decompose-equality -3)
                   (typepred x!1)
                   (grind))))
                ("3"
                 (expand finseq_appl)
                 (decompose-equality 2)
                 (("1" (decompose-equality 1))
                  ("2" (skosimp) (grind))))))
              ("3" (hide-all-but (-3 -7 1)) (grind))))
            ("2" (hide-all-but (-1 -3 -5 -7 5)) (grind))))))))))
    ("2"
     (hide-all-but (-4 1))
     (expand* add_last o insert?)
     (case "1 + pi0!1`length = #(1 + last(p!1))`length + pi0!1`length")
     (("1"
       (replace -1 1 rl)
       (decompose-equality 1)
       (("1"
         (decompose-equality 1)
         (("1" (expand finseq_appl) (decompose-equality -2) (grind))
          ("2" (grind)) ("3" (grind))))
        ("2" (grind)) ("3" (grind))))
      ("2" (hide -1 2) (grind))))))


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


proof_type: t_proof
decl_type: tcc
library: TRS
theory: robinsonunificationEF
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp*)
   (lift-if)
   (lift-if)
   (prop)
   (("1" (hide-all-but (-1 -6 3)) (grind))
    ("2"
     (lift-if)
     (prop)
     (rewrite lex2_lt)
     (("1"
       (flatten)
       (split)
       (("1"
         (hide-all-but (-5 1))
         (expand* add_last delete insert?)
         (expand finseq_appl)
         (decompose-equality -1)
         (("1"
           (hide -2)
           (lift-if)
           (prop)
           (("1"
             (reveal 3)
             (lemma empty_0[posnat])
             (inst -1 p!1)
             (assert))
            ("2" (assert))))
          ("2"
           (reveal 3)
           (hide-all-but (-3 1))
           (lemma empty_0[posnat])
           (inst -1 p!1)
           (assert))
          ("3"
           (reveal 3)
           (hide-all-but (-3 1))
           (lemma empty_0[posnat])
           (inst -1 p!1)
           (assert))))
        ("2"
         (case "delete(pi!1, length(pi!1) - 1) = delete(p!1, length(p!1) - 1)")
         (("1"
           (replace -1 1)
           (replace -3 1 rl)
           (rewrite both_sides_minus_lt2)
           (case "last(pi!1) = last(p!1) + 1")
           (("1" (assert)) ("2" (hide-all-but (-6 1)) (grind))))
          ("2"
           (replace -2 1 rl)
           (replace -2 -5 rl)
           (hide-all-but (-2 -5 1 5 6))
           (expand delete 1)
           (expand finseq_appl)
           (decompose-equality 1)
           (("1"
             (lift-if)
             (prop)
             (("1"
               (hide-all-but (-1 2))
               (lemma empty_0[posnat])
               (inst -1 pi!1)
               (assert))
              ("2"
               (expand* add_last insert?)
               (decompose-equality -2)
               (hide-all-but (-1 2))
               (replaces -1)
               (assert))))
            ("2"
             (lift-if)
             (prop)
             (("1"
               (hide-all-but (-1 2))
               (lemma empty_0[posnat])
               (inst -1 pi!1)
               (assert))
              ("2"
               (decompose-equality 2)
               (("1"
                 (expand* add_last insert?)
                 (expand finseq_appl)
                 (decompose-equality -2)
                 (decompose-equality -2)
                 (inst -1 x!1)
                 (lift-if)
                 (prop)
                 (typepred x!1)
                 (assert))
                ("2"
                 (skosimp)
                 (expand* add_last insert? finseq_appl)
                 (decompose-equality -2)
                 (hide-all-but (-1 1))
                 (replaces -1)
                 (assert))))))
            ("3" (lemma empty_0[posnat]) (inst -1 pi!1) (assert))))
          ("3"
           (hide-all-but (1 6))
           (lemma empty_0[posnat])
           (inst -1 p!1)
           (assert))
          ("4"
           (hide-all-but (1 5))
           (lemma empty_0[posnat])
           (inst -1 pi!1)
           (assert))))))
      ("2" (rewrite next_position_TCC5))
      ("3"
       (hide-all-but (1 5))
       (lemma empty_0[posnat])
       (inst -1 p!1)
       (assert))
      ("4" (lemma next_position_TCC5) (inst -1 s!1 s!1 pi!1) (assert))
      ("5"
       (hide-all-but (1 4))
       (lemma empty_0[posnat])
       (inst -1 pi!1)
       (assert))))))


proof_type: t_proof
decl_type: tcc
library: TRS
theory: robinsonunificationEF
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp*)
   (typepred p!1)
   (lemma delete_is_position)
   (inst-cp -1 p!1 s!1)
   (inst -1 p!1 t!1)
   (lemma empty_0[posnat])
   (inst -1 p!1)
   (assert))


proof_type: t_proof
decl_type: tcc
library: TRS
theory: robinsonunificationEF
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp*)
   (assert)
   (rewrite lex2_lt)
   (("1"
     (flatten)
     (hide-all-but (-2 1 4))
     (expand* delete finseq_appl)
     (decompose-equality -1)
     (hide -2)
     (lemma empty_0[posnat])
     (inst -1 p!1)
     (assert))
    ("2"
     (hide -1 -3 4 5)
     (lemma next_position_TCC5)
     (inst -1 s!1 t!1 p!1)
     (assert))
    ("3"
     (hide-all-but (1 2))
     (lemma empty_0[posnat])
     (inst -1 p!1)
     (assert))
    ("4"
     (hide -1 -3 4 5)
     (lemma next_position_TCC5)
     (inst -1 s!1 t!1 pi0!1)
     (("1" (assert))
      ("2"
       (hide 2)
       (lemma delete_is_position)
       (inst-cp -1 p!1 s!1)
       (inst -1 p!1 t!1)
       (lemma empty_0[posnat])
       (inst -1 p!1)
       (assert))))
    ("5"
     (hide-all-but (1 3))
     (lemma empty_0[posnat])
     (inst -1 pi0!1)
     (assert))))


proof_type: t_proof
decl_type: tcc
library: TRS
theory: robinsonunificationEF
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (lemma right_pos_subset)
   (inst -1 s!1 "next_position(s!1, t!1, p!1)")
   (("1"
     (lemma positions_of_terms_finite)
     (inst -1 s!1)
     (lemma finite_subset[position])
     (inst -1 "positionsOF(s!1)"
      "right_pos(s!1, next_position(s!1, t!1, p!1))")
     (assert))
    ("2" (rewrite next_position_is_position))))


proof_type: t_proof
decl_type: tcc
library: TRS
theory: robinsonunificationEF
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (lemma right_pos_subset)
   (inst -1 s!1 p!1)
   (lemma positions_of_terms_finite)
   (inst -1 s!1)
   (lemma finite_subset[position])
   (inst -1 "positionsOF(s!1)" "right_pos(s!1, p!1)")
   (assert))


proof_type: t_proof
decl_type: tcc
library: TRS
theory: robinsonunificationEF
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (hide -1 1)
   (rewrite finite_union)
   (("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: robinsonunificationEF
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp*)
   (lemma "next_position_is_position")
   (inst -1 "t!1" "s!1" "p!1")
   (lemma "next_position_commute")
   (inst?)
   (assert))


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


proof_type: t_proof
decl_type: tcc
library: TRS
theory: robinsonunificationEF
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp*)
   (hide -1)
   (expand child)
   (skosimp)
   (lemma pos_subterm_ax)
   (inst -1 p1!1 p1!2 t!1)
   (assert)
   (lemma not_var)
   (lemma seq_first_rest[posnat])
   (inst -1 p1!2)
   (lemma empty_0[posnat])
   (inst -1 p1!2)
   (assert)
   (inst -2 "first(p1!2)" "p1!2" "rest(p1!2)" "subtermOF(t!1, p1!1)")
   (assert))


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


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


proof_type: t_proof
decl_type: tcc
library: TRS
theory: robinsonunificationEF
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp*)
   (lemma app_term)
   (inst -1 "p!1 o fd!1" q1!1 "ext(sig!1)(s!1)")
   (assert)
   (hide -1 -3 2)
   (typepred p!1)
   (hide -2 -3)
   (lemma position_s_first_diff)
   (inst -1 "subtermOF(s!1, p!1)" "subtermOF(t!1, p!1)" "fd!1")
   (assert)
   (lemma pos_o_term)
   (inst -1 p!1 fd!1 s!1)
   (assert)
   (rewrite ext_preserv_pos))


proof_type: t_proof
decl_type: tcc
library: TRS
theory: robinsonunificationEF
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp*)
   (lemma app_term)
   (inst -1 "p!1 o fd!1" q1!1 "ext(sig!1)(t!1)")
   (assert)
   (hide -1 -3 2)
   (typepred p!1)
   (hide -1 -3)
   (lemma position_t_first_diff)
   (inst -1 "subtermOF(s!1, p!1)" "subtermOF(t!1, p!1)" "fd!1")
   (assert)
   (lemma pos_o_term)
   (inst -1 p!1 fd!1 t!1)
   (assert)
   (rewrite ext_preserv_pos))


proof_type: t_proof
decl_type: tcc
library: TRS
theory: robinsonunificationEF
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp*)
   (lemma position_s_first_diff)
   (lemma position_t_first_diff)
   (inst?)
   (inst?)
   (assert)
   (typepred p!1)
   (hide -3)
   (lemma pos_o_term)
   (inst-cp -1 p!1 fd!1 t!1)
   (inst -1 p!1 fd!1 s!1)
   (assert)
   (rewrite ext_preserv_pos)
   (rewrite ext_preserv_pos))


proof_type: t_proof
decl_type: tcc
library: TRS
theory: robinsonunificationEF
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (lemma right_pos_subset)
   (inst -1 "s!1" "p!1")
   (lemma finite_subset[position])
   (inst -1 "positionsOF(s!1)" "right_pos(s!1, p!1)")
   (("1" (assert)) ("2" (hide -1 2) (rewrite positions_of_terms_finite))))


proof_type: t_proof
decl_type: tcc
library: TRS
theory: robinsonunificationEF
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (lemma right_pos_subset)
   (inst -1 "z!1`1" "z!1`3")
   (lemma finite_subset[position])
   (inst -1 "positionsOF(z!1`1)" "right_pos(z!1`1, z!1`3)")
   (("1" (assert)) ("2" (hide -1 2) (rewrite positions_of_terms_finite))))


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


proof_type: t_proof
decl_type: tcc
library: TRS
theory: robinsonunificationEF
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp*)
   (rewrite lex2_lt)
   (lemma next_pos_to_the_right)
   (inst -1 s!1 t!1 p!1)
   (("1" (assert)) ("2" (expand next_position -2) (assert))))


proof_type: t_proof
decl_type: tcc
library: TRS
theory: robinsonunificationEF
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp*)
   (name-replace "p!2"
    "first_diff(subtermOF(s!1, p!1), subtermOF(t!1, p!1))" :hide? nil)
   (lemma position_s_first_diff)
   (lemma position_t_first_diff)
   (inst -2 "subtermOF(s!1, p!1)" "subtermOF(t!1, p!1)" "p!2")
   (inst -1 "subtermOF(s!1, p!1)" "subtermOF(t!1, p!1)" "p!2")
   (assert)
   (typepred p!1)
   (lemma pos_o_term)
   (inst-cp -1 p!1 p!2 s!1)
   (inst -1 p!1 p!2 t!1)
   (assert)
   (rewrite ext_preserv_pos)
   (rewrite ext_preserv_pos))


proof_type: t_proof
decl_type: tcc
library: TRS
theory: robinsonunificationEF
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp*)
   (name-replace "q!1"
    "p!1 o first_diff(subtermOF(s!1, p!1), subtermOF(t!1, p!1))" :hide?
    nil)
   (lemma next_position_is_position)
   (inst-cp -1 "ext(sig!1)(s!1)" "ext(sig!1)(t!1)" "q!1")
   (inst -1 "ext(sig!1)(t!1)" "ext(sig!1)(s!1)" "q!1")
   (("1"
     (lemma next_position_commute)
     (inst -1 "ext(sig!1)(s!1)" "ext(sig!1)(t!1)" "q!1")
     (assert))
    ("2"
     (lemma robinson_unification_algorithm_aux_TCC10)
     (inst -1 s!1 t!1 p!1)
     (replace -3 -1)
     (assert)
     (inst -1 sig!1)
     (assert)
     (flatten)
     (assert))))


proof_type: t_proof
decl_type: tcc
library: TRS
theory: robinsonunificationEF
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp*)
   (rewrite lex2_lt)
   (flatten)
   (hide 5)
   (lemma termination_lemma_subterm)
   (inst -1 s!1 t!1 p!1)
   (("1" (assert) (assert)) ("2" (hide-all-but (1 2)) (flatten))))


proof_type: t_proof
decl_type: tcc
library: TRS
theory: robinsonunificationEF
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp*)
   (split)
   (("1"
     (expand positionsOF)
     (lift-if)
     (expand* union IUnion member only_empty_seq))
    ("2"
     (expand positionsOF)
     (lift-if)
     (expand* union IUnion member only_empty_seq))))


proof_type: t_proof
decl_type: tcc
library: TRS
theory: robinsonunificationEF
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp*)
   (typepred "p!1")
   (lemma "position_s_first_diff")
   (inst?)
   (assert)
   (lemma "position_t_first_diff")
   (inst?)
   (assert)
   (lemma "pos_o_term")
   (inst -1 "p!1" "pi!1" "s!1")
   (lemma "pos_o_term")
   (inst -1 "p!1" "pi!1" "t!1")
   (assert)
   (hide-all-but (-1 -2 1))
   (lemma "ext_preserv_pos")
   (inst -1 "p!1 o pi!1" "s!1" "sig1!1")
   (lemma "ext_preserv_pos")
   (inst -1 "p!1 o pi!1" "t!1" "sig1!1")
   (assert))


proof_type: t_proof
decl_type: tcc
library: TRS
theory: robinsonunificationEF
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp*)
   (lemma "next_position_is_position")
   (inst -1 "ext(sig1!1)(s!1)" "ext(sig1!1)(t!1)" "p!1 o pi!1")
   (replace -4 -1 rl)
   (assert)
   (lemma "next_position_is_position")
   (inst -1 "ext(sig1!1)(t!1)" "ext(sig1!1)(s!1)" "p!1 o pi!1")
   (("1" (lemma "next_position_commute") (inst?) (assert))
    ("2"
     (hide 2)
     (lemma "vran_ruaEF_subset_union_aux_TCC1")
     (inst?)
     (assert)
     (inst -1 "sig1!1")
     (assert)
     (prop))))


proof_type: f_proof
decl_type: formula
library: TU_Games
theory: coalition_fun
signature: nil
run_date: Unknown date
run_time: ----
status: proved-incomplete
description: nil
script:
  (""
   (skosimp)
   (rewrite-lemma "tot_distrib"
    ("S" "S!1" "x" "x!1" "y" "LAMBDA i: -y!1(i)"))
   (rewrite-lemma "tot_mult_const" ("S" "S!1" "c" "-1" "x" "y!1"))
   (assert))


proof_type: j_proof
decl_type: tcc
library: TU_Games
theory: coalition_fun
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (rewrite-lemma "finite_subset" ("s" "x!1" "A" "fullN"))
   (("1" (hide 2) (grind))
    ("2" (hide 2) (typepred "N") (hide 1) (grind))))


proof_type: f_proof
decl_type: formula
library: TU_Games
theory: imputations
signature: nil
run_date: Unknown date
run_time: ----
status: proved-incomplete
description: nil
script:
  (""
   (expand "subset?")
   (skosimp)
   (expand "member")
   (expand "setI")
   (expand "core")
   (split)
   (("1" (flatten))
    ("2"
     (flatten)
     (skosimp)
     (inst - "singleton(i!1)")
     (expand "tot")
     (rewrite "sum_singleton"))))


proof_type: f_proof
decl_type: formula
library: TU_Games
theory: tu_game
signature: nil
run_date: Unknown date
run_time: ----
status: proved-incomplete
script:
  (""
   (skosimp)
   (expand "ETP")
   (skosimp)
   (expand "DES")
   (inst-cp - "g!1" "x!1" "i!1" "j!1")
   (inst - "g!1" "x!1" "j!1" "i!1")
   (lemma "interch_impl_desir" ("g" "g!1" "i" "i!1" "j" "j!1"))
   (lemma "interch_impl_desir" ("g" "g!1" "i" "j!1" "j" "i!1"))
   (lemma "interch_is_sym" ("g" "g!1" "i" "i!1" "j" "j!1"))
   (assert))


proof_type: f_proof
decl_type: formula
library: TU_Games
theory: tu_game
signature: nil
run_date: Unknown date
run_time: ----
status: proved-incomplete
description: nil
script:
  (""
   (skosimp)
   (expand "NE")
   (expand "SIVA")
   (skosimp)
   (inst - "g!1")
   (rewrite "nonempty_card")
   (assert))


proof_type: f_proof
decl_type: formula
library: TU_Games
theory: tu_game
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (expand "affineinv")
   (expand "affine")
   (expand "lin")
   (expand "dif")
   (apply-extensionality))


proof_type: f_proof
decl_type: formula
library: TU_Games
theory: tu_game
signature: nil
run_date: Unknown date
run_time: ----
status: proved-incomplete
description: nil
script:
  (""
   (expand "COV")
   (skosimp)
   (expand "core")
   (apply-extensionality :hide? T)
   (expand "core")
   (expand "image")
   (iff)
   (split)
   (("1"
     (skosimp)
     (name "y" "affineinv(N!1,a!1,b!1)(x!1)")
     (inst + "y")
     (("1" (replace -1 :dir RL) (hide -) (rewrite "affine_bij"))
      ("2"
       (split)
       (("1"
         (hide -3)
         (expand "member")
         (expand "setPI")
         (replace -1 :dir RL)
         (expand "affineinv")
         (expand "affinestar")
         (rewrite-lemma "tot_div_const"
          ("S" "fullN[U,N!1]" "a" "a!1" "x" "dif(N!1, x!1, b!1)"))
         (hide -1)
         (expand "dif")
         (rewrite-lemma "tot_distrib_sub"
          ("S" "fullN[U,N!1]" "x" "x!1" "y" "b!1"))
         (grind))
        ("2"
         (hide -2)
         (skosimp)
         (inst - "S!1")
         (replace -1 :dir RL)
         (expand "affineinv")
         (rewrite-lemma "tot_div_const"
          ("S" "S!1" "a" "a!1" "x" "dif(N!1, x!1, b!1)"))
         (expand "dif")
         (rewrite-lemma "tot_distrib_sub"
          ("S" "S!1" "x" "x!1" "y" "b!1"))
         (expand "affinestar")
         (expand "bstar")
         (expand ">=")
         (rewrite "div_mult_pos_le2" + ("py" "a!1"))
         (grind))))))
    ("2"
     (skosimp)
     (skosimp)
     (split)
     (("1"
       (typepred "x!2")
       (hide -2)
       (expand "member")
       (expand "setPI")
       (replace -2)
       (hide -2)
       (expand "affinestar")
       (expand "affine")
       (expand "bstar")
       (expand "fullN")
       (rewrite-lemma "tot_distrib"
        ("S" "fullset[(N!1)]" "x" "lin(N!1,a!1,x!2)" "y" "b!1"))
       (expand "lin")
       (expand "tot")
       (rewrite "sum_mult")
       (assert))
      ("2"
       (skosimp)
       (typepred "x!2")
       (inst - "S!1")
       (expand "affinestar")
       (expand "bstar")
       (expand "affine")
       (replace -3)
       (rewrite-lemma "tot_distrib"
        ("S" "S!1" "x" "lin(N!1,a!1,x!2)" "y" "b!1"))
       (expand "lin")
       (rewrite "both_sides_plus_ge2")
       (hide-all-but (-2) -)
       (rewrite-lemma "tot_mult_const" ("S" "S!1" "c" "a!1" "x" "x!2"))
       (rewrite "both_sides_times_pos_ge2"))))))


proof_type: t_proof
decl_type: tcc
library: TU_Games
theory: tu_game
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: OK
script:
  (""
   (skosimp)
   (expand "coalition_fun?")
   (expand "o")
   (expand "inverse_image")
   (expand "inverse_image")
   (expand "member")
   (expand "emptyset")
   (typepred "g!1`2")
   (expand "coalition_fun?")
   (expand "emptyset")
   (propax))


proof_type: f_proof
decl_type: formula
library: Tarski
theory: sturmtarski
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (case "FORALL (i:nat): i-1>=0 AND i+1<=m AND polynomial(p(i),n(i))(x)=0 IMPLIES (polynomial(p(i-1),n(i-1))(x)=0 IFF polynomial(p(i+1),n(i+1))(x)=0)")
   (("1"
     (skeep)
     (case "FORALL (j:nat): i-j>=0 IMPLIES FORALL (k:nat): k<=j IMPLIES polynomial(p(i-k), n(i-k))(x) = 0")
     (("1"
       (case "FORALL (j:nat): i+j<=m IMPLIES FORALL (k:nat): k<=j IMPLIES  polynomial(p(i+k), n(i+k))(x) = 0")
       (("1"
         (skeep)
         (case "j>=i")
         (("1"
           (inst - "j-i")
           (("1" (assert) (inst - "j-i") (assert)) ("2" (assert))))
          ("2"
           (inst -2 "i-j")
           (("1" (assert) (inst -2 "i-j") (assert)) ("2" (assert))))))
        ("2"
         (hide (-1 2))
         (induct "j")
         (("1" (assert) (skeep) (assert))
          ("2"
           (assert)
           (skosimp*)
           (assert)
           (case "k!1=0 OR k!1=1")
           (("1" (ground))
            ("2"
             (flatten)
             (inst-cp - "k!1-1")
             (inst - "k!1-2")
             (("1" (assert) (assert) (inst - "i-1+k!1") (assert))
              ("2" (assert))))))))))
      ("2"
       (hide 2)
       (induct "j")
       (("1" (assert) (skosimp*) (assert))
        ("2"
         (skosimp*)
         (assert)
         (case "k!1=0")
         (("1" (assert))
          ("2"
           (assert)
           (inst-cp - "k!1-1")
           (case "k!1=1")
           (("1" (hide -2) (assert) (inst - "i") (assert))
            ("2"
             (inst - "k!1-2")
             (("1" (assert) (inst - "i-k!1+1") (assert))
              ("2" (assert))))))))
        ("3" (skosimp*) (assert)) ("4" (assert) (skosimp*) (assert))
        ("5" (skosimp*) (assert)) ("6" (skosimp*) (assert))
        ("7" (skosimp*) (assert))))
      ("3" (skosimp*) (assert))))
    ("2"
     (hide 2)
     (skeep)
     (assert)
     (expand "constructed_sturm_sequence?")
     (flatten)
     (inst -11 "1+i")
     (assert)
     (skeep)
     (name "pd" "poly_divide(p(i - 1), n(i - 1))(p(i), n(i))(0)")
     (lemma "poly_divide_def")
     (inst?)
     (assert)
     (replace -2)
     (assert)
     (inst - "i")
     (assert)
     (inst - "i-1" "i")
     (("1"
       (assert)
       (inst - "x")
       (assert)
       (replace -1)
       (replace -5)
       (assert)
       (case "polynomial(pd`rem, pd`rdeg)(x) = 0 IFF polynomial(-c*pd`rem, pd`rdeg)(x) = 0")
       (("1" (replace -1 +) (replace -14 + :dir rl) (ground))
        ("2"
         (hide-all-but 1)
         (rewrite "scal_polynomial2")
         (ground)
         (mult-by 1 "c")
         (assert))))
      ("2"
       (assert)
       (case "NOT i = 1")
       (("1" (assert))
        ("2"
         (replace -1)
         (assert)
         (replace -13)
         (case "polynomial(pd`rem, pd`rdeg)(x) = 0 IFF polynomial(-c*pd`rem, pd`rdeg)(x) = 0")
         (("1" (replace -1 :dir rl) (inst - "x") (ground))
          ("2"
           (hide-all-but 1)
           (rewrite "scal_polynomial2")
           (ground)
           (mult-by 1 "c")
           (assert))))))))))


proof_type: f_proof
decl_type: formula
library: Tarski
theory: sturmtarski
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (label "css" -1)
   (case "g(k)=0")
   (("1" (expand "constructed_sturm_sequence?") (ground))
    ("2"
     (name "dd"
           "IF polynomial(g,k)(y)=0 THEN root_degree(p(0),n(0))(y) ELSE max(root_degree(p(0), n(0))(y) - 1, 0) ENDIF")
     (case "FORALL (k,i:nat): i<=k AND k+1<m IMPLIES ((root_degree(p(i),n(i))(y)=dd OR root_degree(p(i+1),n(i+1))(y)=dd) AND (root_degree(p(i),n(i))(y)>=dd AND root_degree(p(i+1),n(i+1))(y)>=dd))")
     (("1"
       (case "root_degree(p(m-1),n(m-1))(y)=dd")
       (("1"
         (label "igz" -1)
         (hide "igz")
         (assert)
         (inst - "m-2" _)
         (("1"
           (assert)
           (lift-if)
           (split -)
           (("1"
             (flatten)
             (lemma "root_degree_pos")
             (inst?)
             (assert)
             (hide 3)
             (expand "default_root_degree?")
             (assert)
             (invoke (case "NOT (%1)") (! 2 1))
             (("1"
               (hide 3)
               (copy -5)
               (expand "constructed_sturm_sequence?" -1)
               (flatten)
               (assert)
               (replace -4 +)
               (lemma "root_degree_mult")
               (inst?)
               (assert)
               (inst - "y")
               (assert)
               (split -1)
               (("1"
                 (replace -6)
                 (replaces -1)
                 (rewrite "root_degree_deriv")
                 (("1" (ground)) ("2" (inst - "0"))
                  ("3"
                   (lemma "root_degree_pos")
                   (inst?)
                   (assert)
                   (inst - "0"))))
                ("2"
                 (inst - "1")
                 (assert)
                 (replace -5)
                 (replace -4 -1)
                 (flatten)
                 (expand "polynomial_prod" 1)
                 (expand "max" 1)
                 (expand "sigma" 1)
                 (expand "sigma" 1)
                 (assert))))
              ("2"
               (replace -1)
               (split +)
               (("1"
                 (skeep)
                 (replace -5)
                 (assert)
                 (inst-cp - "i-1")
                 (assert)
                 (flatten)
                 (inst-cp - "i")
                 (assert)
                 (ground))
                ("2" (reveal "igz") (assert))))))
            ("2"
             (flatten)
             (assert)
             (hide 3)
             (replace -1)
             (expand "default_root_degree?")
             (invoke (case "NOT (%1)") (! 3 1))
             (("1"
               (hide 4)
               (assert)
               (flatten)
               (assert)
               (case "polynomial(p(0),n(0))(y)/=0")
               (("1"
                 (flatten)
                 (assert)
                 (lemma "root_degree_pos")
                 (inst?)
                 (assert)
                 (copy -4)
                 (split -)
                 (("1" (assert))
                  ("2"
                   (expand "constructed_sturm_sequence?")
                   (flatten)
                   (inst - "0")
                   (assert))))
                ("2"
                 (assert)
                 (hide 2)
                 (lemma "root_degree_pos")
                 (inst?)
                 (assert)
                 (lemma "root_degree_pos")
                 (inst - "p(0)" "n(0)" "y")
                 (assert)
                 (split -1)
                 (("1"
                   (expand "max" -2)
                   (assert)
                   (assert)
                   (copy -4)
                   (expand "constructed_sturm_sequence?" -1)
                   (flatten)
                   (assert)
                   (replace -4)
                   (replace -3)
                   (rewrite "root_degree_mult")
                   (("1"
                     (rewrite "root_degree_deriv")
                     (("1" (assert)) ("2" (inst - "0"))))
                    ("2"
                     (inst - "0")
                     (expand "poly_deriv" 1)
                     (assert)
                     (ground)
                     (mult-by 1 "n(0)")
                     (assert))))
                  ("2"
                   (expand "constructed_sturm_sequence?")
                   (flatten)
                   (inst -5 "0")
                   (assert))))))
              ("2"
               (replace -1)
               (assert)
               (split +)
               (("1"
                 (hide -1)
                 (skeep)
                 (assert)
                 (split +)
                 (("1"
                   (flatten)
                   (inst - "i-1")
                   (("1" (assert)) ("2" (assert))))
                  ("2" (flatten) (inst - "i") (assert))))
                ("2" (reveal "igz") (propax))))))))
          ("2" (expand "constructed_sturm_sequence?") (assert))))
        ("2"
         (hide (3 4))
         (inst - "m-2" "m-2")
         (("1"
           (assert)
           (flatten)
           (hide -2)
           (hide -3)
           (expand "constructed_sturm_sequence?")
           (flatten)
           (inst -10 "m")
           (assert)
           (skeep)
           (name "pd"
                 "poly_divide(p(m - 2), n(m - 2))(p(m - 1), n(m - 1))
                                               (0)")
           (assert)
           (lemma "poly_divide_def")
           (inst?)
           (inst-cp - "m-1")
           (assert)
           (replace -2)
           (name "pr" "polynomial_prod(pd`quot,pd`qdeg,p(m-1),n(m-1))")
           (case "NOT polynomial(pd`rem, pd`rdeg) = (LAMBDA (xyz:real): 0)")
           (("1"
             (decompose-equality 1)
             (mult-by 1 "-c")
             (lemma "scal_polynomial2")
             (inst?)
             (inst - "x!1")
             (replaces -1 :dir rl)
             (replace -14 :dir rl)
             (expand "polynomial" + 1)
             (expand "sigma" + 1)
             (expand "sigma" + 1)
             (assert))
            ("2"
             (replace -1)
             (assert)
             (name "rd" "root_degree(p(m - 1), n(m - 1))(y)")
             (typepred "rd")
             (assert)
             (flatten)
             (hide -3)
             (skeep)
             (case "EXISTS (kk:nat): kk<=pd`qdeg AND pd`quot(kk)/=0 AND polynomial(pd`quot, pd`qdeg) = polynomial(pd`quot,kk)")
             (("1"
               (skeep)
               (replace -2)
               (assert)
               (name "newprod" "polynomial_prod(b,n(m-1)-rd,pd`quot,kk)")
               (lemma "root_degree_lower_bound")
               (inst - "p(m-2)" "rd" "n(m-2)" "y" "n(m-1)-rd+kk")
               (split -1)
               (("1" (flatten) (assert))
                ("2" (inst - "m-2") (inst - "m-2") (inst - "m-2"))
                ("3"
                 (inst + "newprod")
                 (assert)
                 (split +)
                 (("1"
                   (expand "newprod" 1)
                   (expand "polynomial_prod" 1)
                   (expand "max" -1)
                   (expand "sigma" -1)
                   (expand "sigma" -1)
                   (assert))
                  ("2"
                   (skeep)
                   (inst -9 "x")
                   (replace -9)
                   (inst -5 "x")
                   (replace -5)
                   (expand "newprod" +)
                   (rewrite "polynomial_prod")
                   (rewrite "polynomial_prod_def" :dir rl)
                   (assert))))))
              ("2"
               (case "EXISTS (kk:nat): kk<=pd`qdeg AND pd`quot(kk)/=0")
               (("1"
                 (hide-all-but (-1 1))
                 (case "EXISTS (kk:nat): kk<=pd`qdeg AND pd`quot(kk)/=0 AND FORALL (ii:nat): ii>kk AND ii<=pd`qdeg IMPLIES pd`quot(ii)=0")
                 (("1"
                   (hide -2)
                   (skeep)
                   (inst + "kk")
                   (assert)
                   (case "FORALL (jj:nat): kk+jj<=pd`qdeg IMPLIES  polynomial(pd`quot, kk+jj) = polynomial(pd`quot, kk)")
                   (("1" (inst - "pd`qdeg-kk") (assert))
                    ("2"
                     (induct "jj")
                     (("1" (assert))
                      ("2"
                       (skeep)
                       (assert)
                       (decompose-equality 1)
                       (rewrite "polynomial_rec" 1)
                       (inst - "1+j+kk")
                       (assert))))))
                  ("2"
                   (hide 2)
                   (skeep -1)
                   (assert)
                   (name "IZ"
                         "{kk:posnat | kk<=pd`qdeg AND pd`quot(kk)/=0}")
                   (name "M" "max(IZ)")
                   (("1"
                     (typepred "M")
                     (inst + "M")
                     (assert)
                     (copy -2)
                     (expand "IZ" -1)
                     (flatten)
                     (assert)
                     (skosimp*)
                     (inst - "ii!1")
                     (("1" (assert) (expand "IZ" +) (propax))
                      ("2" (assert))))
                    ("2"
                     (case "NOT nonempty?[posnat](IZ)")
                     (("1"
                       (hide 2)
                       (expand "nonempty?")
                       (expand "empty?")
                       (inst-cp + "0")
                       (assert)
                       (label "IG5" -1)
                       (copy "IG5")
                       (hide "IG5")
                       (inst-cp - "kk")
                       (("1"
                         (expand "member" 1)
                         (expand "IZ" 1)
                         (propax))
                        ("2"
                         (reveal "IG5")
                         (delabel "IG5")
                         (assert)
                         (skosimp*)
                         (inst - "ii!1")
                         (expand "member" 1)
                         (expand "IZ" 1)
                         (assert))))
                      ("2"
                       (replace -1)
                       (inst + "pd`qdeg+1")
                       (skosimp*)
                       (typepred "y!1")
                       (expand "IZ" -2)
                       (ground))))))))
                ("2"
                 (hide 2)
                 (lemma "poly_eq_0_le_degree")
                 (inst-cp - "pd`quot" "pd`qdeg")
                 (flatten)
                 (hide -3)
                 (split -)
                 (("1"
                   (inst - "p(m-2)" "n(m-2)")
                   (flatten)
                   (hide -2)
                   (split -)
                   (("1"
                     (inst - "n(m-2)")
                     (assert)
                     (inst - "m-2")
                     (inst - "m-2")
                     (inst - "m-2")
                     (inst - "m-2")
                     (assert))
                    ("2" (skeep) (inst -7 "x") (inst - "x") (assert))))
                  ("2" (skosimp*) (inst + "ii!1") (assert))))))))))
          ("2"
           (assert)
           (expand "constructed_sturm_sequence?")
           (propax))))))
      ("2"
       (hide (3 4))
       (induct "k")
       (("1"
         (assert)
         (skeep)
         (assert)
         (case "NOT i = 0")
         (("1" (assert))
          ("2"
           (replaces -1)
           (assert)
           (lift-if)
           (split -3)
           (("1"
             (ground)
             (lemma "root_degree_pos")
             (inst?)
             (assert)
             (copy -6)
             (expand "constructed_sturm_sequence?" -1)
             (flatten)
             (replace -3)
             (replace -4)
             (assert)
             (rewrite "root_degree_mult")
             (("1"
               (rewrite "root_degree_deriv")
               (("1" (assert)) ("2" (inst - "0"))
                ("3"
                 (lemma "root_degree_pos")
                 (inst - "p(0)" "n(0)" "y")
                 (assert)
                 (inst - "0"))))
              ("2"
               (inst - "0")
               (expand "poly_deriv" 1)
               (assert)
               (ground)
               (mult-by 1 "n(0)")
               (assert))))
            ("2"
             (assert)
             (flatten)
             (assert)
             (expand "max")
             (lift-if)
             (split -1)
             (("1" (flatten) (assert))
              ("2"
               (flatten)
               (assert)
               (lemma "root_degree_pos")
               (inst - "g" "k" "y")
               (assert)
               (expand "constructed_sturm_sequence?")
               (flatten)
               (replace -7)
               (replace -6)
               (rewrite "root_degree_mult" +)
               (("1"
                 (rewrite "root_degree_deriv")
                 (("1" (assert)) ("2" (inst - "0"))
                  ("3"
                   (lemma "root_degree_pos")
                   (inst?)
                   (assert)
                   (inst - "0"))))
                ("2"
                 (inst - "0")
                 (assert)
                 (expand "poly_deriv" 1)
                 (assert))))))))))
        ("2"
         (skolem 1 "K")
         (flatten)
         (assert)
         (skeep)
         (case "NOT i =1+K")
         (("1" (inst - "i") (assert))
          ("2"
           (case "NOT K = i-1")
           (("1" (assert))
            ("2"
             (replace -1)
             (assert)
             (hide -2)
             (inst-cp - "i-1")
             (assert)
             (flatten)
             (copy -9)
             (expand "constructed_sturm_sequence?" -1)
             (flatten)
             (hide (-1 -2 -3 -4 -5 -6 -7))
             (inst - "i+1")
             (assert)
             (skeep)
             (name "pd" "poly_divide(p(i - 1), n(i - 1))(p(i), n(i))(0)")
             (replace -1)
             (assert)
             (lemma "root_degree_eq")
             (lemma "poly_divide_def")
             (inst?)
             (assert)
             (replace -3)
             (split -1)
             (("1"
               (lemma "root_degree_division")
               (inst - "y" "p(i-1)" "p(i)" "pd`quot" "(1/(-c))*p(1+i)"
                "n(i-1)" "n(i)" "pd`qdeg" "n(1+i)")
               (assert)
               (split -1)
               (("1"
                 (flatten)
                 (assert)
                 (split -9)
                 (("1"
                   (assert)
                   (case "root_degree(p(i), n(i))(y) = dd")
                   (("1"
                     (assert)
                     (expand "min")
                     (assert)
                     (rewrite "root_degree_scal")
                     (("1" (assert))
                      ("2"
                       (copy "css")
                       (expand "constructed_sturm_sequence?" -1)
                       (flatten)
                       (inst - "i+1")
                       (assert))))
                    ("2"
                     (assert)
                     (assert)
                     (rewrite "root_degree_scal")
                     (("1" (assert))
                      ("2"
                       (copy "css")
                       (expand "constructed_sturm_sequence?" -1)
                       (flatten)
                       (inst - "1+i")
                       (assert))))))
                  ("2"
                   (assert)
                   (rewrite "root_degree_scal")
                   (("1" (expand "min") (assert) (lift-if) (ground))
                    ("2"
                     (copy "css")
                     (expand "constructed_sturm_sequence?" -1)
                     (flatten)
                     (inst - "1+i")
                     (assert))))))
                ("2"
                 (hide 2)
                 (skeep)
                 (inst - "x")
                 (replace -1)
                 (assert)
                 (decompose-equality -4)
                 (assert)
                 (inst - "x")
                 (assert)
                 (rewrite "scal_polynomial2")
                 (rewrite "scal_polynomial2")
                 (assert))
                ("3"
                 (copy "css")
                 (expand "constructed_sturm_sequence?" -1)
                 (expand "*" 1)
                 (flatten)
                 (inst - "1+i")
                 (assert))
                ("4"
                 (copy "css")
                 (expand "constructed_sturm_sequence?" -1)
                 (flatten)
                 (inst - "i-1")
                 (assert))
                ("5"
                 (copy "css")
                 (expand "constructed_sturm_sequence?" -1)
                 (flatten)
                 (inst - "i")
                 (assert))))
              ("2"
               (copy "css")
               (expand "constructed_sturm_sequence?" -1)
               (flatten)
               (inst - "i")
               (assert))))))))))))))


proof_type: f_proof
decl_type: formula
library: Tarski
theory: sturmtarski
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (lemma "constructed_sturm_seq_root_degrees")
   (inst?)
   (assert)
   (expand "default_root_deg")
   (ground))


proof_type: f_proof
decl_type: formula
library: Tarski
theory: sturmtarski
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (case "FORALL (g: [nat -> real], k: nat, m: posnat, n: [nat -> nat],
                       p: [nat -> [nat -> real]], y: real,dd:nat):
                 constructed_sturm_sequence?(p, n, g, k, m) AND dd<m IMPLIES
                  (FORALL (i):
                     i <= dd IMPLIES
                      root_degree(p(i), n(i))(y) >=
                       default_root_deg(p, n, g, k, m)(y))")
   (("1"
     (skeep)
     (inst?)
     (inst - "m-1")
     (assert)
     (skeep)
     (inst - "i")
     (assert))
    ("2"
     (hide 2)
     (induct "dd")
     (("1"
       (skeep)
       (skeep)
       (case "NOT i = 0")
       (("1" (assert))
        ("2"
         (replace -1)
         (assert)
         (expand "default_root_deg" 1)
         (expand "max")
         (lift-if)
         (ground))))
      ("2"
       (skeep)
       (skeep)
       (skeep)
       (case "NOT i = j+1")
       (("1"
         (inst - "g" "k" "m" "n" "p" "y")
         (assert)
         (inst - "i")
         (assert))
        ("2"
         (hide -5)
         (replace -1)
         (assert)
         (case "j = 0")
         (("1"
           (replace -1)
           (assert)
           (expand "default_root_deg" 1)
           (copy -4)
           (expand "max")
           (lift-if)
           (ground)
           (("1"
             (expand "constructed_sturm_sequence?" -2)
             (flatten)
             (replace -4)
             (replace -5)
             (rewrite "root_degree_mult")
             (("1"
               (rewrite "root_degree_deriv")
               (("1" (lemma "root_degree_pos") (inst?) (assert))
                ("2" (inst - "0"))
                ("3"
                 (lemma "root_degree_pos")
                 (inst - "p(0)" "n(0)" "y")
                 (assert)
                 (inst - "0"))))
              ("2"
               (expand "poly_deriv" 1)
               (inst - "0")
               (assert)
               (ground)
               (mult-by 2 "n(0)")
               (assert))))
            ("2"
             (expand "constructed_sturm_sequence?" -1)
             (flatten)
             (inst-cp - "0")
             (inst - "1")
             (assert)
             (flatten)
             (replace -2 2)
             (replace -3 2)
             (rewrite "root_degree_mult")
             (("1"
               (rewrite "root_degree_deriv")
               (("1" (assert))
                ("2"
                 (lemma "root_degree_pos")
                 (inst - "p(0)" "n(0)" "y")
                 (assert))))
              ("2" (expand "poly_deriv" 1) (assert))))))
          ("2"
           (copy -3)
           (label "igz" -1)
           (case "NOT (p(1+j)(n(1+j))/=0 AND p(j)(n(j))/=0 AND p(j-1)(n(j-1))/=0)")
           (("1"
             (expand "constructed_sturm_sequence?" -1)
             (flatten)
             (inst-cp - "1+j")
             (inst-cp - "j")
             (inst - "j-1")
             (("1" (assert)) ("2" (assert))))
            ("2"
             (flatten)
             (assert)
             (expand "constructed_sturm_sequence?" -1)
             (flatten)
             (copy -8)
             (hide "igz")
             (inst - "j+1")
             (assert)
             (skeep)
             (name "pd" "poly_divide(p(j - 1), n(j - 1))(p(j), n(j))(0)")
             (replace -1)
             (case "NOT polynomial((-1/c)*p(1 + j), n(1 + j)) = polynomial(pd`rem, pd`rdeg)")
             (("1"
               (decompose-equality 1)
               (rewrite "scal_polynomial2")
               (decompose-equality -2)
               (inst - "x!1")
               (rewrite "scal_polynomial2")
               (assert))
              ("2"
               (lemma "poly_divide_def")
               (inst?)
               (assert)
               (replace -3)
               (replace -2 :dir rl)
               (lemma "root_degree_division")
               (inst - "y" "p(j - 1)" "p(j)" "pd`quot" "(-1/c)*p(1+j)"
                "n(j-1)" "n(j)" "pd`qdeg" "n(1+j)")
               (assert)
               (replace -2)
               (split -1)
               (("1"
                 (flatten)
                 (inst? -8)
                 (assert)
                 (copy -8)
                 (inst-cp - "j-1")
                 (inst - "j")
                 (assert)
                 (expand "min")
                 (lift-if)
                 (hide -3)
                 (split -)
                 (("1" (flatten) (rewrite "root_degree_scal") (assert))
                  ("2" (flatten) (rewrite "root_degree_scal") (assert))))
                ("2" (expand "*" 1) (assert))))))
            ("3" (ground))))))))))))


proof_type: f_proof
decl_type: formula
library: Tarski
theory: sturmtarski
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (label "css" -1)
   (label "igz" -2)
   (case "FORALL (xy,xr:real): x<=xy AND xy<=xr AND xr<=y IMPLIES sign_ext(polynomial(g,k)(xy)) = sign_ext(polynomial(g,k)(xr))")
   (("1"
     (inst-cp - "x" "z")
     (inst - "z" "y")
     (assert)
     (case "x<=z AND z<=y")
     (("1"
       (flatten)
       (assert)
       (hide (-1 -2))
       (case "m>=2")
       (("1"
         (inst-cp - "0")
         (inst - "1")
         (("1"
           (assert)
           (expand "only_root_between?")
           (flatten)
           (hide (-5 -6))
           (assert)
           (inst-cp - "x")
           (inst - "y")
           (assert)
           (inst-cp - "x")
           (inst - "y")
           (assert)
           (flatten)
           (expand "number_sign_changes")
           (expand "number_sign_changes")
           (assert)
           (lift-if)
           (assert)
           (lift-if)
           (assert)
           (lift-if)
           (assert)
           (case "sign_ext(polynomial(poly_deriv(p(0)), n(0)-1)(x)) =
                                                                                                                        -sign_ext(polynomial(p(0), n(0))(x))")
           (("1"
             (case "sign_ext(polynomial(p(0),n(0))(x)) = -sign_ext(polynomial(g,k)(x))*sign_ext(polynomial(p(1),n(1))(x))")
             (("1"
               (hide -2)
               (assert)
               (lemma "root_degree_pos")
               (lemma "root_degree_pos")
               (inst-cp - "p(0)" "n(0)" "z")
               (assert)
               (inst - "g" "k" "z")
               (assert)
               (case "NOT (p(0)(n(0))/=0 AND g(k)/=0)")
               (("1"
                 (expand "constructed_sturm_sequence?")
                 (flatten)
                 (inst - "0")
                 (assert))
                ("2"
                 (flatten)
                 (assert)
                 (name "dd" "root_degree(p(0),n(0))(z)")
                 (replace -1)
                 (case "root_degree(p(1),n(1))(z) = dd-1")
                 (("1"
                   (assert)
                   (lemma "even_or_odd")
                   (inst-cp - "dd")
                   (inst - "dd-1")
                   (lemma "odd_iff_even_succ")
                   (inst - "dd-1")
                   (assert)
                   (lemma "root_degree_even")
                   (inst-cp - "p(0)" "n(0)" "x" "y" "z")
                   (assert)
                   (inst - "p(1)" "n(1)" "x" "y" "z")
                   (assert)
                   (case "p(1)(n(1))=0")
                   (("1"
                     (expand "constructed_sturm_sequence?")
                     (flatten)
                     (inst - "1")
                     (assert))
                    ("2"
                     (assert)
                     (ground)
                     (("1"
                       (expand "sign_ext")
                       (lift-if)
                       (assert)
                       (lift-if)
                       (assert)
                       (lift-if)
                       (assert)
                       (ground))
                      ("2"
                       (expand "sign_ext")
                       (lift-if)
                       (assert)
                       (lift-if)
                       (assert)
                       (lift-if)
                       (assert)
                       (ground))
                      ("3"
                       (expand "sign_ext")
                       (lift-if)
                       (assert)
                       (lift-if)
                       (assert)
                       (lift-if)
                       (assert)
                       (ground))
                      ("4"
                       (expand "sign_ext")
                       (lift-if)
                       (assert)
                       (lift-if)
                       (assert)
                       (lift-if)
                       (assert)
                       (ground))
                      ("5"
                       (expand "sign_ext")
                       (lift-if)
                       (assert)
                       (lift-if)
                       (assert)
                       (lift-if)
                       (assert)
                       (ground))
                      ("6"
                       (expand "sign_ext")
                       (lift-if)
                       (assert)
                       (lift-if)
                       (assert)
                       (lift-if)
                       (assert)
                       (ground))))))
                  ("2"
                   (copy -8)
                   (expand "constructed_sturm_sequence?" -1)
                   (flatten)
                   (replace -4 1)
                   (replace -5 1)
                   (assert)
                   (rewrite "root_degree_mult")
                   (("1" (rewrite "root_degree_deriv") (assert))
                    ("2" (expand "poly_deriv" 1) (assert))))))))
              ("2"
               (hide 7)
               (copy -5)
               (expand "constructed_sturm_sequence?" -1)
               (flatten)
               (replace -4 2)
               (replace -5 2)
               (assert)
               (rewrite "polynomial_prod_def" :dir rl)
               (rewrite "sign_ext_mult")
               (expand "sign_ext" + 2)
               (expand "sign_ext" + 2)
               (lift-if)
               (assert)
               (ground)
               (replace -4 6)
               (replace -5)
               (rewrite "polynomial_prod_def" :dir rl)
               (assert))))
            ("2"
             (assert)
             (hide 7)
             (case "polynomial(poly_deriv(p(0)), n(0) - 1)(x)=0")
             (("1"
               (copy -5)
               (expand "constructed_sturm_sequence?" -1)
               (flatten)
               (assert)
               (replace -4)
               (replace -5)
               (rewrite "polynomial_prod_def" :dir rl)
               (rewrite "polynomial_prod_def" :dir rl)
               (assert))
              ("2"
               (expand "sign_ext" +)
               (lift-if)
               (assert)
               (lift-if)
               (assert)
               (lift-if)
               (assert)
               (ground)
               (("1"
                 (lemma "poly_decreasing")
                 (inst - "p(0)" "n(0)" "x" "z")
                 (assert)
                 (case "n(0)>0")
                 (("1"
                   (assert)
                   (skosimp*)
                   (lemma "poly_intermediate_value_inc")
                   (inst - "poly_deriv(p(0))" "0" "n(0)-1" "x" "c!1")
                   (assert)
                   (skosimp*)
                   (reveal "igz")
                   (copy -2)
                   (hide "igz")
                   (inst - "cc!1")
                   (assert)
                   (flatten)
                   (copy "css")
                   (expand "constructed_sturm_sequence?" -1)
                   (flatten)
                   (replace -3 2)
                   (replace -4 2)
                   (rewrite "polynomial_prod_def" :dir rl)
                   (assert))
                  ("2"
                   (assert)
                   (copy "css")
                   (expand "constructed_sturm_sequence?" -1)
                   (propax))))
                ("2"
                 (lemma "poly_increasing")
                 (inst - "p(0)" "n(0)" "x" "z")
                 (assert)
                 (case "n(0)>0")
                 (("1"
                   (assert)
                   (skeep)
                   (lemma "poly_intermediate_value_dec")
                   (inst - "poly_deriv(p(0))" "0" "n(0)-1" "x" "c")
                   (assert)
                   (skeep -1)
                   (reveal "igz")
                   (copy -2)
                   (hide "igz")
                   (inst - "cc")
                   (assert)
                   (flatten)
                   (copy "css")
                   (expand "constructed_sturm_sequence?" -1)
                   (flatten)
                   (replace -3 2)
                   (replace -4 2)
                   (rewrite "polynomial_prod_def" :dir rl)
                   (assert))
                  ("2"
                   (expand "constructed_sturm_sequence?")
                   (flatten))))))))
            ("3"
             (expand "constructed_sturm_sequence?")
             (flatten)
             (assert))))
          ("2" (assert))))
        ("2" (expand "constructed_sturm_sequence?") (assert))))
      ("2" (inst - "0") (expand "only_root_between?") (ground))))
    ("2"
     (skeep)
     (case "FORALL (rr:real): x<=rr AND rr<=y IMPLIES polynomial(g,k)(rr)/=0")
     (("1"
       (inst-cp - "xy")
       (inst-cp - "xr")
       (assert)
       (flatten)
       (expand "sign_ext" 3)
       (lift-if)
       (assert)
       (lift-if)
       (assert)
       (lift-if)
       (assert)
       (ground)
       (("1"
         (lemma "poly_intermediate_value_inc")
         (inst - "g" "0" "k" "xy" "xr")
         (assert)
         (skosimp*)
         (inst - "cc!1")
         (assert))
        ("2"
         (lemma "poly_intermediate_value_dec")
         (inst - "g" "0" "k" "xy" "xr")
         (assert)
         (skeep -)
         (inst - "cc")
         (assert))))
      ("2"
       (skeep)
       (inst - "1")
       (("1"
         (expand "only_root_between?")
         (flatten)
         (assert)
         (inst - "rr")
         (assert)
         (flatten)
         (copy "css")
         (expand "constructed_sturm_sequence?" -1)
         (flatten)
         (replace -4 3)
         (replace -5 3)
         (rewrite "polynomial_prod_def" :dir rl)
         (assert))
        ("2" (expand "constructed_sturm_sequence?") (assert))))))))


proof_type: f_proof
decl_type: formula
library: Tarski
theory: sturmtarski
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (assert)
   (flatten)
   (case "NOT (p(0)(n(0))/=0 AND p(1)(n(1))/=0)")
   (("1"
     (expand "constructed_sturm_sequence?" -2)
     (flatten)
     (inst-cp - "0")
     (inst - "1")
     (("1" (assert)) ("2" (assert))))
    ("2"
     (flatten)
     (lemma "even_or_odd")
     (name "dd" "root_degree(p(0),n(0))(z)")
     (replace -1)
     (assert)
     (inst - "dd")
     (case "even?(dd)")
     (("1"
       (assert)
       (lemma "root_degree_even")
       (inst-cp - "p(0)" "n(0)" "x" "y" "z")
       (inst - "p(1)" "n(1)" "x" "y" "z")
       (assert)
       (inst-cp - "0")
       (inst - "1")
       (("1"
         (assert)
         (copy -2)
         (copy -2)
         (expand "sign_ext" (-1 -2))
         (expand "number_sign_changes")
         (expand "number_sign_changes")
         (assert)
         (expand "sign_ext")
         (lift-if)
         (ground)
         (("1" (lift-if) (ground)) ("2" (lift-if) (ground))
          ("3" (lift-if) (ground)) ("4" (lift-if) (ground))
          ("5" (lift-if) (ground)) ("6" (lift-if) (ground))
          ("7" (lift-if) (ground)) ("8" (lift-if) (ground))
          ("9" (lift-if) (ground)) ("10" (lift-if) (ground))
          ("11" (lift-if) (ground))))
        ("2" (expand "constructed_sturm_sequence?") (assert))))
      ("2"
       (lemma "root_degree_odd")
       (inst-cp - "p(0)" "n(0)" "x" "y" "z")
       (inst - "p(1)" "n(1)" "x" "y" "z")
       (assert)
       (inst-cp - "0")
       (inst - "1")
       (("1"
         (assert)
         (expand "sign_ext" (-1 -2))
         (expand "number_sign_changes")
         (expand "number_sign_changes")
         (assert)
         (expand "sign_ext")
         (lift-if)
         (ground)
         (("1" (lift-if) (ground)) ("2" (lift-if) (ground))
          ("3" (lift-if) (ground)) ("4" (lift-if) (ground))
          ("5" (lift-if) (ground)) ("6" (lift-if) (ground))
          ("7" (lift-if) (ground)) ("8" (lift-if) (ground))
          ("9" (lift-if) (ground)) ("10" (lift-if) (ground))
          ("11" (lift-if) (ground))))
        ("2" (expand "constructed_sturm_sequence?") (assert))))))))


proof_type: f_proof
decl_type: formula
library: Tarski
theory: sturmtarski
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (case "NOT (p(0)(n(0))/=0 AND p(1)(n(1))/=0 AND p(2)(n(2))/=0)")
   (("1"
     (expand "constructed_sturm_sequence?" -2)
     (flatten)
     (inst-cp - "0")
     (inst-cp - "1")
     (("1" (inst - "2") (("1" (assert)) ("2" (assert)))) ("2" (assert))))
    ("2"
     (flatten)
     (label "css" -2)
     (label "hyp" -3)
     (skoletin 4)
     (flatten)
     (copy "hyp")
     (inst-cp - "0")
     (inst-cp - "1")
     (("1"
       (inst - "2")
       (("1"
         (assert)
         (expand "only_root_between?" (-1 -2 -3))
         (flatten)
         (assert)
         (inst-cp - "x")
         (inst - "y")
         (inst-cp - "x")
         (inst - "y")
         (inst-cp - "x")
         (inst - "y")
         (assert)
         (flatten)
         (hide (-1 -2 -3 -4))
         (copy "css")
         (label "igz" -1)
         (expand "constructed_sturm_sequence?" -1)
         (flatten)
         (assert)
         (copy -8)
         (hide "igz")
         (inst - "2")
         (assert)
         (skeep)
         (name "pd" "poly_divide(p(0), n(0))(p(1), n(1))(0)")
         (replace -1)
         (lemma "poly_divide_def")
         (inst?)
         (assert)
         (replace -2)
         (case "NOT (-1/c)*polynomial(p(2), n(2)) = polynomial(pd`rem, pd`rdeg)")
         (("1"
           (decompose-equality 1)
           (decompose-equality -3)
           (inst - "x!1")
           (expand "*" 1)
           (replace -1 +)
           (rewrite "scal_polynomial2")
           (assert))
          ("2"
           (replace -1 -2 :dir rl)
           (lemma "signs_swap_division")
           (inst - "x" "y" "z" "p(0)" "p(1)" "pd`quot" "(-1/c)*p(2)"
            "n(0)" "n(1)" "pd`qdeg" "n(2)")
           (assert)
           (split -)
           (("1"
             (flatten)
             (rewrite "scal_polynomial2")
             (rewrite "scal_polynomial2")
             (rewrite "sign_ext_mult" -1)
             (rewrite "sign_ext_mult" -2)
             (case "NOT sign_ext(-1/c)=-1")
             (("1"
               (expand "sign_ext" 1)
               (assert)
               (lift-if)
               (split 1)
               (("1" (propax)) ("2" (flatten) (cross-mult 1))))
              ("2"
               (replace -1)
               (assert)
               (expand "nsc" +)
               (expand "number_sign_changes" +)
               (expand "number_sign_changes" +)
               (expand "number_sign_changes" +)
               (assert)
               (lift-if)
               (assert)
               (ground)
               (("1"
                 (lift-if)
                 (assert)
                 (expand "sign_ext")
                 (lift-if)
                 (assert)
                 (lift-if)
                 (assert)
                 (lift-if)
                 (assert)
                 (ground))
                ("2"
                 (expand "sign_ext")
                 (lift-if)
                 (assert)
                 (lift-if)
                 (assert)
                 (lift-if)
                 (assert)
                 (lift-if)
                 (assert)
                 (lift-if)
                 (assert)
                 (lift-if)
                 (assert)
                 (ground))
                ("3"
                 (lift-if)
                 (expand "sign_ext")
                 (assert)
                 (lift-if)
                 (assert)
                 (lift-if)
                 (assert)
                 (lift-if)
                 (assert)
                 (lift-if)
                 (assert)
                 (lift-if)
                 (assert)
                 (lift-if)
                 (assert)
                 (lift-if)
                 (assert)
                 (ground))
                ("4"
                 (lift-if)
                 (assert)
                 (expand "sign_ext")
                 (lift-if)
                 (assert)
                 (lift-if)
                 (assert)
                 (lift-if)
                 (assert)
                 (lift-if)
                 (assert)
                 (lift-if)
                 (assert)
                 (ground))
                ("5"
                 (lift-if)
                 (expand "sign_ext")
                 (lift-if)
                 (assert)
                 (lift-if)
                 (assert)
                 (lift-if)
                 (assert)
                 (lift-if)
                 (assert)
                 (lift-if)
                 (assert)
                 (lift-if)
                 (assert)
                 (ground))
                ("6"
                 (lift-if)
                 (expand "sign_ext")
                 (lift-if)
                 (assert)
                 (lift-if)
                 (assert)
                 (lift-if)
                 (assert)
                 (lift-if)
                 (assert)
                 (lift-if)
                 (assert)
                 (lift-if)
                 (assert)
                 (lift-if)
                 (assert)
                 (ground))
                ("7"
                 (lift-if)
                 (expand "sign_ext")
                 (lift-if)
                 (assert)
                 (lift-if)
                 (assert)
                 (lift-if)
                 (assert)
                 (lift-if)
                 (assert)
                 (lift-if)
                 (assert)
                 (ground))
                ("8"
                 (lift-if)
                 (assert)
                 (expand "sign_ext")
                 (lift-if)
                 (assert)
                 (lift-if)
                 (assert)
                 (lift-if)
                 (assert)
                 (lift-if)
                 (assert)
                 (lift-if)
                 (assert)
                 (ground))))))
            ("2"
             (skeep -1)
             (inst-cp - "p(0)" "n(0)")
             (inst-cp - "p(1)" "n(1)")
             (inst - "(-1/c)*p(2)" "n(2)")
             (assert)
             (typepred "sig")
             (expand "nsc" +)
             (hide -1)
             (assert)
             (rewrite "scal_polynomial2")
             (rewrite "scal_polynomial2")
             (rewrite "sign_ext_mult")
             (rewrite "sign_ext_mult")
             (case "NOT sign_ext(-1/c)=-1")
             (("1"
               (expand "sign_ext" 1)
               (lift-if)
               (split 1)
               (("1" (propax)) ("2" (flatten) (cross-mult 1))))
              ("2"
               (replaces -1)
               (assert)
               (expand "number_sign_changes" +)
               (expand "number_sign_changes" +)
               (expand "number_sign_changes" +)
               (expand "sign_ext")
               (lift-if)
               (assert)
               (lift-if)
               (assert)
               (lift-if)
               (assert)
               (ground))))
            ("3"
             (copy "hyp")
             (inst - "2")
             (expand "only_root_between?")
             (skeep)
             (inst - "r")
             (assert)
             (rewrite "scal_polynomial2")
             (assert))
            ("4"
             (skeep)
             (inst - "r")
             (assert)
             (replace -2)
             (rewrite "scal_polynomial2" 1)
             (assert)
             (expand "*" 1)
             (propax))
            ("5"
             (expand "*" 1)
             (copy "css")
             (expand "constructed_sturm_sequence?" -1)
             (flatten)
             (inst - "2")
             (assert))
            ("6" (rewrite "root_degree_scal") (assert))
            ("7"
             (rewrite "root_degree_scal")
             (copy "css")
             (lemma "constructed_sturm_sequence?")
             (replaces -1 -2)
             (case "NOT (p(1) = polynomial_prod(g, k1, poly_deriv(p(0)), n(0) - 1)
                                              AND n(1) = k1 + n(0) - 1)")
             (("1" (assert))
              ("2"
               (hide -2)
               (flatten)
               (case "polynomial(g,k1)(z)=0")
               (("1"
                 (lemma "root_degree_pos")
                 (inst?)
                 (assert)
                 (replace -3 1)
                 (replace -4 1)
                 (rewrite "root_degree_mult")
                 (("1"
                   (assert)
                   (rewrite "root_degree_deriv")
                   (("1" (assert))
                    ("2" (lemma "root_degree_pos") (inst?) (assert))))
                  ("2" (expand "poly_deriv" 1) (assert))))
                ("2"
                 (assert)
                 (flatten)
                 (lemma "root_degree_pos")
                 (inst - "p(0)" "n(0)" "z")
                 (assert))))))))))
        ("2" (assert))))
      ("2" (assert))))))


proof_type: f_proof
decl_type: formula
library: Tarski
theory: sturmtarski
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (case "FORALL (g: [nat -> real], k: nat, m: posnat, n: [nat -> nat],
                                                          p: [nat -> [nat -> real]], x, y, z: real,kp,dd:nat):
                                                    (constructed_sturm_sequence?(p, n, g, k, m) AND
                                                      (FORALL (j: below(m)): only_root_between?(p(j), n(j), x, y)(z)) AND dd+1<=kp+1 AND root_degree(p(dd+1),n(dd+1))(z) = default_root_deg(p,n,g,k,m)(z) AND kp+1<m)
                                                     IMPLIES
                                                     number_sign_changes(LAMBDA (i): polynomial(p(i), n(i))(x),
                                                                         dd+1)`num
                                                      -
                                                      number_sign_changes(LAMBDA (i): polynomial(p(i), n(i))(y),
                                                                          dd+1)`num
                                                      =
                                                      (IF polynomial(p(0), n(0))(z) /= 0 OR polynomial(g, k)(z) = 0
                                                         THEN 0
                                                       ELSIF polynomial(g, k)(z) > 0 THEN 1
                                                       ELSE -1
                                                       ENDIF)")
   (("1"
     (skeep)
     (inst - "g" "k" "m" "n" "p" "x" "y" "z" "m-2" "m-2")
     (("1"
       (assert)
       (ground)
       (hide 2)
       (name "dd" "default_root_deg(p, n, g, k, m)(z)")
       (replace -1)
       (lemma "default_root_deg_def")
       (inst?)
       (replace -2)
       (assert)
       (expand "default_root_degree?")
       (propax))
      ("2" (expand "constructed_sturm_sequence?") (assert))))
    ("2"
     (hide 2)
     (induct "kp")
     (("1"
       (assert)
       (skeep)
       (label "css" -1)
       (label "hyp" -2)
       (case "NOT dd = 0")
       (("1" (assert))
        ("2"
         (replace -1)
         (assert)
         (name "DF" "default_root_deg(p, n, g, k, m)(z)")
         (lemma "default_root_deg_def")
         (inst?)
         (assert)
         (replace -2)
         (expand "default_root_degree?")
         (flatten)
         (split -)
         (("1"
           (flatten)
           (assert)
           (lemma "sturm_tarski_basic_2")
           (insteep -1 :but (("k1" "k")))
           (assert))
          ("2"
           (flatten)
           (lemma "root_degree_pos")
           (inst - "p(0)" "n(0)" "z")
           (assert)
           (case "p(0)(n(0))/=0")
           (("1"
             (assert)
             (flatten)
             (lemma "sturm_tarski_basic_1")
             (insteep -1 :but (("k1" "k")))
             (assert)
             (replace -9)
             (replace -1 +)
             (expand "sign_ext" +)
             (lift-if)
             (lift-if)
             (lift-if)
             (ground))
            ("2"
             (copy "css")
             (expand "constructed_sturm_sequence?" -1)
             (flatten)
             (inst - "0")
             (assert))))
          ("3"
           (flatten)
           (assert)
           (lemma "sturm_tarski_basic_2")
           (insteep -1 :but (("k1" "k")))
           (assert))))))
      ("2"
       (skolem 1 "dd")
       (flatten)
       (skeep)
       (case "NOT (p(0)(n(0))/=0 AND p(1)(n(1))/=0 AND p(2)(n(2))/=0)")
       (("1"
         (hide -1)
         (expand "constructed_sturm_sequence?")
         (flatten)
         (inst-cp - "0")
         (inst-cp - "1")
         (("1" (inst - "2") (("1" (assert)) ("2" (assert))))
          ("2" (assert))))
        ("2"
         (flatten)
         (label "css" -2)
         (label "hyp" -3)
         (case "NOT dd_1=dd+1")
         (("1" (insteep -1) (assert) (replace "hyp") (propax))
          ("2"
           (replace -1)
           (assert)
           (case "NOT (p(dd)(n(dd))/=0 AND p(1+dd)(n(1+dd))/=0 AND p(2+dd)(n(2+dd))/=0)")
           (("1"
             (hide -1)
             (expand "constructed_sturm_sequence?")
             (flatten)
             (inst-cp - "dd")
             (inst-cp - "1+dd")
             (inst - "2+dd")
             (assert))
            ("2"
             (assert)
             (flatten)
             (assert)
             (name "DF" "default_root_deg(p, n, g, k, m)(z)")
             (replace -1)
             (assert)
             (invoke (name "xyz" "%1") (! 7 2))
             (replace -1)
             (assert)
             (copy "hyp")
             (inst-cp - "2+dd")
             (inst - "1+dd")
             (expand "only_root_between?" (-1 -2))
             (flatten)
             (hide (-1 -2))
             (inst-cp - "x")
             (inst - "y")
             (assert)
             (flatten)
             (inst-cp - "x")
             (inst - "y")
             (assert)
             (flatten)
             (case "root_degree(p(1+dd),n(1+dd))(z)=DF")
             (("1"
               (inst - "g" "k" "m" "n" "p" "x" "y" "z" "dd")
               (assert)
               (replace "hyp")
               (replace -4)
               (expand "number_sign_changes" +)
               (rewrite "number_sign_changes_lastnz")
               (rewrite "number_sign_changes_lastnz")
               (assert)
               (lemma "even_or_odd")
               (inst - "DF")
               (case "even?(DF)")
               (("1"
                 (assert)
                 (lemma "root_degree_even")
                 (inst-cp - "p(1+dd)" "n(1+dd)" "x" "y" "z")
                 (inst - "p(2+dd)" "n(2+dd)" "x" "y" "z")
                 (assert)
                 (inst-cp "hyp" "1+dd")
                 (inst-cp "hyp" "2+dd")
                 (assert)
                 (expand "sign_ext")
                 (lift-if)
                 (lift-if)
                 (assert)
                 (lift-if)
                 (assert)
                 (lift-if)
                 (assert)
                 (lift-if)
                 (assert)
                 (ground))
                ("2"
                 (assert)
                 (lemma "root_degree_odd")
                 (inst-cp - "p(1+dd)" "n(1+dd)" "x" "y" "z")
                 (inst - "p(2+dd)" "n(2+dd)" "x" "y" "z")
                 (assert)
                 (inst-cp "hyp" "1+dd")
                 (inst-cp "hyp" "2+dd")
                 (assert)
                 (assert)
                 (expand "sign_ext")
                 (lift-if)
                 (lift-if)
                 (assert)
                 (lift-if)
                 (assert)
                 (lift-if)
                 (assert)
                 (lift-if)
                 (assert)
                 (ground))))
              ("2"
               (case "root_degree(p(dd),n(dd))(z)=DF")
               (("1"
                 (case "dd = 0")
                 (("1"
                   (replace -1)
                   (assert)
                   (lift-if)
                   (split -5)
                   (("1"
                     (flatten)
                     (replace -2 :dir rl)
                     (assert)
                     (lemma "sturm_tarski_basic_3")
                     (insteep -1 :but (("k1" "k")))
                     (assert)
                     (ground))
                    ("2"
                     (flatten)
                     (split -)
                     (("1"
                       (lemma "DF")
                       (expand "default_root_deg" -1)
                       (assert)
                       (lemma "root_degree_pos")
                       (inst?)
                       (assert)
                       (expand "max")
                       (assert)
                       (lift-if)
                       (assert))
                      ("2"
                       (flatten)
                       (replace -1 :dir rl)
                       (lemma "DF")
                       (expand "default_root_deg" -1)
                       (assert)
                       (lemma "root_degree_pos")
                       (inst?)
                       (assert)
                       (expand "max" -2)
                       (assert)
                       (lift-if)
                       (assert))))))
                  ("2"
                   (label "hyp2" -7)
                   (insteep - :but (("dd_1" "dd-1")))
                   (("1"
                     (assert)
                     (replace "hyp")
                     (replace -4)
                     (copy "css")
                     (label "igz" -1)
                     (expand "constructed_sturm_sequence?" -1)
                     (flatten)
                     (copy -8)
                     (hide "igz")
                     (inst - "dd+2")
                     (assert)
                     (skeep -1)
                     (name "pd"
                           "poly_divide(p(dd), n(dd))(p(1 + dd), n(1 + dd))(0)")
                     (replace -1)
                     (case "NOT polynomial((-1/c)*p(2 + dd), n(2 + dd)) = polynomial(pd`rem, pd`rdeg)")
                     (("1"
                       (decompose-equality 1)
                       (decompose-equality -2)
                       (inst - "x!1")
                       (rewrite "scal_polynomial2")
                       (rewrite "scal_polynomial2")
                       (assert))
                      ("2"
                       (lemma "poly_divide_def")
                       (inst?)
                       (assert)
                       (replace -3)
                       (lemma "signs_swap_division")
                       (replace -3 :dir rl)
                       (inst - "x" "y" "z" "p(dd)" "p(1+dd)" "pd`quot"
                        "(-1/c)*p(2+dd)" "n(dd)" "n(1+dd)" "pd`qdeg"
                        "n(2+dd)")
                       (assert)
                       (copy "hyp")
                       (inst - "dd")
                       (assert)
                       (expand "only_root_between?" -1)
                       (inst-cp - "x")
                       (inst - "y")
                       (assert)
                       (flatten)
                       (split -1)
                       (("1"
                         (flatten)
                         (rewrite "scal_polynomial2")
                         (rewrite "scal_polynomial2")
                         (rewrite "sign_ext_mult")
                         (rewrite "sign_ext_mult")
                         (case "NOT sign_ext(-1/c)=-1")
                         (("1"
                           (hide-all-but 1)
                           (expand "sign_ext")
                           (lift-if)
                           (assert)
                           (ground)
                           (cross-mult 1))
                          ("2"
                           (replaces -1)
                           (assert)
                           (expand "number_sign_changes" +)
                           (expand "number_sign_changes" +)
                           (rewrite "number_sign_changes_lastnz")
                           (rewrite "number_sign_changes_lastnz")
                           (expand "sign_ext" (-1 +))
                           (lift-if)
                           (lift-if)
                           (assert)
                           (lift-if)
                           (assert)
                           (lift-if)
                           (expand "sign_ext" -2)
                           (lift-if)
                           (assert)
                           (ground)
                           (("1"
                             (lift-if)
                             (assert)
                             (lift-if)
                             (lift-if)
                             (assert)
                             (ground)
                             (lift-if)
                             (assert))
                            ("2"
                             (lift-if)
                             (assert)
                             (lift-if)
                             (ground)
                             (lift-if)
                             (assert))
                            ("3"
                             (lift-if)
                             (assert)
                             (lift-if)
                             (lift-if)
                             (assert)
                             (ground)
                             (lift-if)
                             (assert))
                            ("4"
                             (lift-if)
                             (assert)
                             (lift-if)
                             (lift-if)
                             (assert)
                             (lift-if)
                             (assert))
                            ("5"
                             (ground)
                             (lift-if)
                             (assert)
                             (ground)
                             (lift-if)
                             (assert))
                            ("6"
                             (ground)
                             (lift-if)
                             (assert)
                             (ground)
                             (lift-if)
                             (assert))
                            ("7"
                             (ground)
                             (lift-if)
                             (assert)
                             (ground)
                             (lift-if)
                             (assert))
                            ("8"
                             (ground)
                             (lift-if)
                             (assert)
                             (ground)
                             (lift-if)
                             (assert))
                            ("9"
                             (ground)
                             (lift-if)
                             (assert)
                             (ground)
                             (lift-if)
                             (assert))
                            ("10"
                             (ground)
                             (lift-if)
                             (assert)
                             (ground)
                             (lift-if)
                             (assert))
                            ("11"
                             (ground)
                             (lift-if)
                             (assert)
                             (ground)
                             (lift-if)
                             (assert))
                            ("12"
                             (ground)
                             (lift-if)
                             (assert)
                             (ground)
                             (lift-if)
                             (assert))
                            ("13"
                             (ground)
                             (lift-if)
                             (assert)
                             (ground)
                             (lift-if)
                             (assert))
                            ("14"
                             (ground)
                             (lift-if)
                             (assert)
                             (ground)
                             (lift-if)
                             (assert))
                            ("15"
                             (ground)
                             (lift-if)
                             (assert)
                             (ground)
                             (lift-if)
                             (assert))
                            ("16"
                             (ground)
                             (lift-if)
                             (assert)
                             (ground)
                             (lift-if)
                             (assert))
                            ("17"
                             (ground)
                             (lift-if)
                             (assert)
                             (ground)
                             (lift-if)
                             (assert))
                            ("18"
                             (ground)
                             (lift-if)
                             (assert)
                             (ground)
                             (lift-if)
                             (assert))
                            ("19"
                             (ground)
                             (lift-if)
                             (assert)
                             (ground)
                             (lift-if)
                             (assert))
                            ("20"
                             (ground)
                             (lift-if)
                             (assert)
                             (ground)
                             (lift-if)
                             (assert))
                            ("21"
                             (ground)
                             (lift-if)
                             (assert)
                             (ground)
                             (lift-if)
                             (assert))
                            ("22"
                             (ground)
                             (lift-if)
                             (assert)
                             (ground)
                             (lift-if)
                             (assert))
                            ("23"
                             (ground)
                             (lift-if)
                             (assert)
                             (ground)
                             (lift-if)
                             (assert))
                            ("24"
                             (ground)
                             (lift-if)
                             (assert)
                             (ground)
                             (lift-if)
                             (assert))))))
                        ("2"
                         (ground)
                         (skeep)
                         (inst-cp - "p(dd)" "n(dd)")
                         (inst-cp - "p(1+dd)" "n(1+dd)")
                         (inst - "(-1/c)*p(2+dd)" "n(2+dd)")
                         (typepred "sig")
                         (rewrite "scal_polynomial2")
                         (rewrite "scal_polynomial2")
                         (rewrite "sign_ext_mult")
                         (rewrite "sign_ext_mult")
                         (case "NOT sign_ext(-1/c)=-1")
                         (("1"
                           (hide-all-but 1)
                           (expand "sign_ext")
                           (lift-if)
                           (ground)
                           (cross-mult 1))
                          ("2"
                           (replaces -1)
                           (assert)
                           (expand "number_sign_changes" +)
                           (expand "number_sign_changes" +)
                           (rewrite "number_sign_changes_lastnz")
                           (rewrite "number_sign_changes_lastnz")
                           (expand "sign_ext")
                           (lift-if)
                           (lift-if)
                           (assert)
                           (lift-if)
                           (lift-if)
                           (assert)
                           (ground))))
                        ("3" (inst "hyp" "1+dd"))
                        ("4"
                         (copy "hyp")
                         (inst - "2+dd")
                         (expand "only_root_between?" (-1 1))
                         (skeep)
                         (inst - "r")
                         (assert)
                         (rewrite "scal_polynomial2")
                         (assert))
                        ("5" (propax)) ("6" (expand "*") (assert))
                        ("7" (rewrite "root_degree_scal") (assert))
                        ("8"
                         (rewrite "root_degree_scal")
                         (assert)
                         (lemma
                          "constructed_sturm_seq_root_degree_lower_bound")
                         (inst?)
                         (assert)
                         (inst - "1+dd")
                         (assert))))))
                    ("2" (assert))))))
                ("2"
                 (assert)
                 (lemma "default_root_deg_def")
                 (inst?)
                 (assert)
                 (replace -5 -1)
                 (expand "default_root_degree?")
                 (flatten)
                 (inst - "dd")
                 (assert))))))))))))))))


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


proof_type: f_proof
decl_type: formula
library: Tarski
theory: sturmtarski
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (decompose-equality 2)
   (expand "union")
   (expand "member")
   (expand "Sol")
   (iff)
   (ground))


proof_type: f_proof
decl_type: formula
library: Tarski
theory: sturmtarski
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (expand "NSol")
   (lemma "Sol_union_top")
   (inst - "a" "true" "babove" "bbelow" "true" "g" "k" "m" "rel" "x" "y"
    "z")
   (assert)
   (both-sides-f -1 "card")
   (rewrite "card_union")
   (replace -1 :dir rl)
   (assert)
   (lemma "empty_card[real]")
   (inst -
    "intersection(Sol(a, m, g, k, rel, x, y, bbelow, TRUE),
                              Sol(a, m, g, k, rel, y, z, TRUE, babove))")
   (assert)
   (expand "empty?" 1)
   (expand "member")
   (skosimp*)
   (expand "intersection")
   (expand "member")
   (expand "Sol" -1)
   (flatten)
   (assert))


proof_type: f_proof
decl_type: formula
library: Tarski
theory: sturmtarski
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (case "NOT FORALL (g: [nat -> real], k: nat, m: posnat, n: [nat -> nat],
                                                          p: [nat -> [nat -> real]], x, y, z: real):
                                                    (x < y AND
                                                      constructed_sturm_sequence?(p, n, g, k, m) AND
                                                       (FORALL (j:below(m)): only_root_between?(p(j),n(j),x,y)(z)))
                                                     IMPLIES
                                                     LET nsc =
                                                           LAMBDA (xyz: real):
                                                             number_sign_changes(LAMBDA
                                                                                 (i):
                                                                                 polynomial(p(i), n(i))(xyz),
                                                                                 m - 1),
                                                         Nroots = nsc(x)`num - nsc(y)`num
                                                       IN
                                                       Nroots =
                                                        NSol(p(0), n(0), g, k, >, x, y, TRUE, TRUE) -
                                                         NSol(p(0), n(0), g, k, <, x, y, TRUE, TRUE)")
   (("1"
     (hide 2)
     (lemma "sturm_tarski_basic")
     (skeep)
     (insteep -)
     (assert)
     (replace -4)
     (invoke (name "abc" "%1") (! -1 2))
     (replace -1)
     (assert)
     (replaces -2)
     (lift-if)
     (split -1)
     (("1"
       (flatten)
       (case "NSol(p(0), n(0), g, k, >, x, y, TRUE, TRUE)= 0 AND
                                                                            NSol(p(0), n(0), g, k, <, x, y, TRUE, TRUE)=0")
       (("1" (flatten) (assert))
        ("2"
         (hide 2)
         (lemma "empty_card[real]")
         (expand "NSol" 1)
         (expand "empty?")
         (expand "member")
         (inst-cp -6 "0")
         (copy -7)
         (expand "only_root_between?" -1)
         (flatten)
         (split +)
         (("1"
           (inst? -4)
           (assert)
           (skosimp*)
           (inst - "x!1")
           (assert)
           (expand "Sol" -4)
           (flatten)
           (assert))
          ("2"
           (inst? -4)
           (assert)
           (skosimp*)
           (expand "Sol" -4)
           (inst - "x!1")
           (ground))))))
      ("2"
       (flatten)
       (assert)
       (split -)
       (("1"
         (flatten)
         (case "NSol(p(0), n(0), g, k, >, x, y, TRUE, TRUE)= 1 AND
                                                                                        NSol(p(0), n(0), g, k, <, x, y, TRUE, TRUE)=0")
         (("1" (assert) (flatten) (assert))
          ("2"
           (hide 3)
           (split 1)
           (("1"
             (expand "NSol" 1)
             (lemma "card_one[real]")
             (inst?)
             (assert)
             (inst + "z")
             (decompose-equality 1)
             (expand "singleton")
             (iff)
             (expand "Sol" 1)
             (inst - "0")
             (expand "only_root_between?")
             (flatten)
             (inst - "x!1")
             (ground))
            ("2"
             (expand "NSol" 1)
             (lemma "empty_card[real]")
             (inst?)
             (assert)
             (expand "empty?")
             (expand "member")
             (skosimp*)
             (expand "Sol" -1)
             (inst - "0")
             (expand "only_root_between?")
             (flatten)
             (inst - "x!1")
             (ground))))))
        ("2"
         (flatten)
         (case "NSol(p(0), n(0), g, k, >, x, y, TRUE, TRUE)= 0 AND
                                                                                        NSol(p(0), n(0), g, k, <, x, y, TRUE, TRUE)=1")
         (("1" (flatten) (assert))
          ("2"
           (hide 4)
           (split 1)
           (("1"
             (expand "NSol" 1)
             (lemma "empty_card[real]")
             (inst?)
             (assert)
             (expand "empty?")
             (expand "member")
             (skosimp*)
             (expand "Sol" -1)
             (inst - "0")
             (expand "only_root_between?")
             (flatten)
             (inst - "x!1")
             (ground))
            ("2"
             (expand "NSol" 1)
             (lemma "card_one[real]")
             (inst?)
             (assert)
             (inst + "z")
             (expand "singleton")
             (decompose-equality 1)
             (iff)
             (expand "Sol" 1)
             (inst - "0")
             (expand "only_root_between?")
             (flatten)
             (inst - "x!1")
             (ground))))))))))
    ("2"
     (label "hyp1" -1)
     (lemma "constructed_sturm_roots_between_enum")
     (skeep)
     (label "css" -4)
     (label "igz" -5)
     (insteep -1)
     (assert)
     (skeep -1)
     (label "rd5" -4)
     (name "R"
           "LAMBDA (ii:below(K+1)): (IF ii=0 THEN x ELSIF ii=K THEN y ELSE (enum(ii-1)+enum(ii))/2 ENDIF)")
     (("1"
       (case "FORALL (ij:nat): ij+1<=K IMPLIES number_sign_changes(LAMBDA (i): polynomial(p(i), n(i))(x), m - 1)`num
                                                                           -
                                                                           number_sign_changes(LAMBDA (i): polynomial(p(i), n(i))(R(ij+1)),
                                                                                               m - 1)`num
                                                                           =
                                                                           NSol(p(0), n(0), g, k, >, x, R(ij+1), TRUE, TRUE) -
                                                                            NSol(p(0), n(0), g, k, <, x, R(ij+1), TRUE, TRUE)")
       (("1"
         (case "R(K)=y")
         (("1" (inst - "K-1") (assert)) ("2" (expand "R" 1) (propax))))
        ("2"
         (hide 2)
         (label "em" -2)
         (case "NOT FORALL (i, j: below(K+1)): i < j IMPLIES R(i) < R(j)")
         (("1"
           (hide 2)
           (skeep)
           (expand "R" 1)
           (lift-if)
           (assert)
           (lift-if)
           (assert)
           (lift-if)
           (ground)
           (("1" (inst-cp - "0" "j-1") (inst - "0" "j") (ground))
            ("2" (inst-cp - "i-1" "K-1") (inst-cp - "i" "K-1") (ground))
            ("3" (inst-cp - "i-1" "j-1") (inst - "i" "j") (ground))))
          ("2"
           (label "Rm" -1)
           (case "NOT FORALL (i:below(K+1),j:nat): j<m IMPLIES polynomial(p(j),n(j))(R(i))/=0")
           (("1"
             (hide 2)
             (skeep)
             (inst "rd5" "R(i)" "j")
             (case "i = 0")
             (("1"
               (replace -1)
               (expand "R" -3)
               (inst "igz" "j")
               (assert))
              ("2"
               (case "i = K")
               (("1"
                 (replace -1)
                 (expand "R" -3)
                 (inst "igz" "j")
                 (assert))
                ("2"
                 (assert)
                 (split "rd5")
                 (("1"
                   (skosimp*)
                   (expand "R" -1)
                   (case "i-1 = i!1")
                   (("1" (inst -7 "i!1" "i") (assert))
                    ("2"
                     (case "i = i!1")
                     (("1" (inst -7 "i-1" "i!1") (assert))
                      ("2"
                       (case "i!1 < i-1")
                       (("1"
                         (inst-cp -7 "i!1" "i-1")
                         (inst -7 "i!1" "i")
                         (assert))
                        ("2"
                         (inst-cp -6 "i-1" "i!1")
                         (inst -6 "i" "i!1")
                         (ground))))))))
                  ("2"
                   (expand "R" 1)
                   (inst-cp -5 "0" "i-1")
                   (inst -5 "0" "i")
                   (ground))
                  ("3"
                   (expand "R" 1)
                   (inst-cp -5 "i-1" "K-1")
                   (inst -5 "i" "K-1")
                   (ground))))))))
            ("2"
             (induct "ij")
             (("1"
               (assert)
               (inst - "g" "k" "m" "n" "p" "x" "R(1)" "(x+R(1))/2")
               (name "zz" "(x+R(1))/2")
               (replace -1)
               (assert)
               (case "NOT x < R(1)")
               (("1" (expand "R" 1) (inst -5 "0" "1") (ground))
                ("2"
                 (assert)
                 (skeep "hyp1")
                 (expand "only_root_between?")
                 (skeep "hyp1")
                 (inst "rd5" "r" "j")
                 (assert)
                 (split "rd5")
                 (("1"
                   (skosimp*)
                   (inst "igz" "j")
                   (assert)
                   (flatten)
                   (assert)
                   (inst-cp -7 "0" "i!1")
                   (inst-cp -7 "1" "i!1")
                   (case "R(1)< enum(i!1)")
                   (("1" (assert)) ("2" (expand "R" 1) (ground))))
                  ("2" (inst "igz" "j") (assert))
                  ("3"
                   (inst "igz" "j")
                   (assert)
                   (ground)
                   (inst-cp -6 "0" "K-1")
                   (inst -6 "1" "K-1")
                   (case "R(1) <=y")
                   (("1" (assert)) ("2" (expand "R" 1) (assert))))))))
              ("2"
               (skeep)
               (assert)
               (inst-cp -4 "1+j" "2+j")
               (assert)
               (inst-cp -4 "0" "1+j")
               (assert)
               (case "NOT (number_sign_changes(LAMBDA (i): polynomial(p(i), n(i))(x), m - 1)`num
                                               -
                                               number_sign_changes(LAMBDA (i): polynomial(p(i), n(i))(R(2 + j)),
                                                                   m - 1)`num) = ( number_sign_changes(LAMBDA (i): polynomial(p(i), n(i))(x), m - 1)`num
                                               -
                                               number_sign_changes(LAMBDA (i): polynomial(p(i), n(i))(R(1 + j)),
                                                                   m - 1)`num) + (number_sign_changes(LAMBDA (i): polynomial(p(i), n(i))(R(1 + j)),
                                                                   m - 1)`num-number_sign_changes(LAMBDA (i): polynomial(p(i), n(i))(R(2 + j)),
                                                                   m - 1)`num)")
               (("1" (assert))
                ("2"
                 (replaces -1)
                 (invoke (name "AA" "%1-%2") (! 1 1 3) (! 1 1 4))
                 (replace -1)
                 (replace -2 +)
                 (lemma "NSol_union_top")
                 (inst - "p(0)" "TRUE" "TRUE" "g" "k" "n(0)" _ "x"
                  "R(1+j)" "R(2+j)")
                 (("1"
                   (inst-cp - ">")
                   (inst - "<")
                   (assert)
                   (split -)
                   (("1"
                     (split -)
                     (("1"
                       (ground)
                       (replaces -1 :dir rl)
                       (replaces -1 :dir rl)
                       (assert)
                       (expand "AA" 1)
                       (inst "hyp1" "g" "k" "m" "n" "p" "R(1+j)" "R(2+j)"
                        _)
                       (case "EXISTS (z:real): (FORALL (j_1: below(m)):
                                                                      only_root_between?(p(j_1), n(j_1), R(1 + j), R(2 + j))(z))")
                       (("1" (skeep -1) (inst "hyp1" "z") (assert))
                        ("2"
                         (hide 2)
                         (case "2+j = K")
                         (("1"
                           (inst + "(R(1+j)+y)/2")
                           (skosimp*)
                           (expand "only_root_between?" +)
                           (case "NOT (R(1 + j) < (R(1 + j) + y) / 2 AND
                                        (R(1 + j) + y) / 2 < R(2 + j))")
                           (("1"
                             (hide 2)
                             (split 1)
                             (("1"
                               (copy "Rm")
                               (inst - "1+j" "K")
                               (case "R(K)=y")
                               (("1" (assert))
                                ("2" (expand "R" 1) (propax))))
                              ("2"
                               (copy "Rm")
                               (replace -2)
                               (inst - "1+j" "K")
                               (case "R(K)=y")
                               (("1" (assert))
                                ("2" (expand "R" 1) (propax))))))
                            ("2"
                             (flatten)
                             (assert)
                             (skeep)
                             (copy -4)
                             (copy -6)
                             (expand "R" -1)
                             (expand "R" -2)
                             (copy "rd5")
                             (inst - "r" "j!1")
                             (assert)
                             (case "x<r")
                             (("1"
                               (assert)
                               (skosimp*)
                               (case "NOT (i!1 = K)")
                               (("1"
                                 (case "NOT i!1 < K")
                                 (("1" (assert))
                                  ("2"
                                   (case "NOT i!1 = K-1")
                                   (("1"
                                     (copy "em")
                                     (inst-cp - "i!1" "1+j")
                                     (inst - "i!1" "j")
                                     (ground))
                                    ("2"
                                     (assert)
                                     (replace -1)
                                     (copy "igz")
                                     (inst - "j!1")
                                     (assert))))))
                                ("2" (assert))))
                              ("2"
                               (hide -1)
                               (copy "Rm")
                               (inst - "0" "1+j")
                               (split -1)
                               (("1" (expand "R" -1 1) (assert))
                                ("2" (assert))))))))
                          ("2"
                           (assert)
                           (inst + "enum(1+j)")
                           (skosimp*)
                           (expand "only_root_between?" +)
                           (case "NOT (R(1 + j) < enum(1 + j) AND
                                        enum(1 + j) < R(2 + j))")
                           (("1"
                             (hide 3)
                             (expand "R" 1)
                             (copy "em")
                             (inst-cp - "j" "1+j")
                             (inst - "1+j" "2+j")
                             (assert))
                            ("2"
                             (flatten)
                             (assert)
                             (skeep)
                             (copy -4)
                             (copy -4)
                             (expand "R" (-1 -2))
                             (copy "rd5")
                             (inst - "r" "j!1")
                             (assert)
                             (case "NOT (x < r AND r <= y)")
                             (("1"
                               (hide -1)
                               (split 1)
                               (("1"
                                 (copy "Rm")
                                 (inst - "0" "1+j")
                                 (split -1)
                                 (("1" (expand "R" -1 1) (assert))
                                  ("2" (assert))))
                                ("2"
                                 (copy "Rm")
                                 (inst - "2+j" "K")
                                 (assert)
                                 (expand "R" -1 2)
                                 (assert))))
                              ("2"
                               (flatten)
                               (assert)
                               (skosimp*)
                               (case "i!1 < 1+j")
                               (("1"
                                 (copy "em")
                                 (inst - "i!1" "1+j")
                                 (assert)
                                 (copy "em")
                                 (inst - "i!1" "j")
                                 (assert))
                                ("2"
                                 (assert)
                                 (copy "em")
                                 (inst-cp - "1+j" "i!1")
                                 (assert)
                                 (inst - "2+j" "i!1")
                                 (assert))))))))))))
                      ("2"
                       (copy "Rm")
                       (inst - "0" "1+j")
                       (expand "R" -1 1)
                       (assert))
                      ("3"
                       (copy "css")
                       (expand "constructed_sturm_sequence?" -1)
                       (flatten)
                       (inst - "0")
                       (assert))
                      ("4"
                       (flatten)
                       (copy "rd5")
                       (inst - "R(1+j)" "0")
                       (assert)
                       (case "NOT (x < R(1 + j) AND R(1 + j) <= y)")
                       (("1"
                         (copy "Rm")
                         (split 1)
                         (("1"
                           (inst - "0" "1+j")
                           (expand "R" -1 1)
                           (propax))
                          ("2"
                           (inst - "1+j" "K")
                           (expand "R" -1 2)
                           (assert))))
                        ("2"
                         (flatten)
                         (assert)
                         (skosimp*)
                         (copy "em")
                         (expand "R" -4)
                         (inst-cp - "j" "1+j")
                         (assert)
                         (case "i!1 < j")
                         (("1" (inst - "i!1" "j") (assert))
                          ("2" (inst - "1+j" "i!1") (ground))))))))
                    ("2"
                     (hide -1)
                     (copy "Rm")
                     (inst - "0" "1+j")
                     (expand "R" -1 1)
                     (assert))
                    ("3"
                     (copy "css")
                     (expand "constructed_sturm_sequence?" -1)
                     (hide -2)
                     (flatten)
                     (inst - "0")
                     (assert))
                    ("4"
                     (copy "rd5")
                     (hide -2)
                     (inst - "R(1+j)" "0")
                     (assert)
                     (case "NOT (x<R(1+j) AND R(1+j)<=y)")
                     (("1"
                       (copy "Rm")
                       (split 1)
                       (("1"
                         (inst - "0" "1+j")
                         (expand "R" -1 1)
                         (propax))
                        ("2"
                         (inst - "1+j" "K")
                         (expand "R" -1 2)
                         (assert))))
                      ("2"
                       (flatten)
                       (assert)
                       (skosimp*)
                       (copy "Rm")
                       (copy -4)
                       (hide -2)
                       (expand "R" -1)
                       (copy "em")
                       (inst-cp - "j" "j+1")
                       (inst-cp - "i!1" "j")
                       (inst-cp - "1+j" "i!1")
                       (ground))))))
                  ("2"
                   (assert)
                   (copy "css")
                   (hide "hyp1")
                   (expand "constructed_sturm_sequence?" -1)
                   (propax))))))
              ("3"
               (skosimp*)
               (copy "css")
               (expand "constructed_sturm_sequence?" -1)
               (flatten)
               (inst - "0")
               (assert))
              ("4"
               (skosimp*)
               (copy "css")
               (expand "constructed_sturm_sequence?" -1)
               (flatten)
               (inst - "0")
               (assert))
              ("5" (skosimp*) (assert)) ("6" (skosimp*) (assert))))))))
        ("3" (skosimp*) (assert))))
      ("2" (skosimp*) (assert)) ("3" (skosimp*) (assert))))
    ("3"
     (hide 2)
     (skosimp*)
     (expand "constructed_sturm_sequence?")
     (flatten)
     (inst - "0")
     (assert))))


proof_type: f_proof
decl_type: formula
library: Tarski
theory: sturmtarski
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (case "NOT FORALL (nn:nat): (-1)^nn = IF even?(nn) THEN 1 ELSE -1 ENDIF")
   (("1"
     (hide-all-but 1)
     (induct "nn")
     (("1" (grind))
      ("2"
       (skeep)
       (expand "^")
       (expand "expt" +)
       (lemma "odd_iff_even_succ")
       (inst - "j")
       (assert)
       (replaces -1 :dir rl)
       (lemma "even_or_odd")
       (inst - "j")
       (ground))))
    ("2"
     (label "ftz" -1)
     (label "css" -2)
     (skoletin 1)
     (skoletin 1)
     (skoletin 1)
     (lemma "poly_sign_near_infinity")
     (lemma "poly_sign_near_negative_infinity")
     (case "EXISTS (My:posreal): FORALL (j:below(m)): FORALL (x:real): x>=My
                                           IMPLIES sign_ext(polynomial(p(j),n(j))(x)) = sign_ext(p(j)(n(j)))")
     (("1"
       (case "EXISTS (Mx:negreal): FORALL (j:below(m)): FORALL (x:real): x<=Mx
                                                   IMPLIES sign_ext(polynomial(p(j),n(j))(x)) = sign_ext((-1)^n(j) * p(j)(n(j)))")
       (("1"
         (skeep)
         (skeep)
         (hide (-3 -4))
         (lemma "sturm_tarski")
         (inst - "g" "k" "m" "n" "p" "Mx" "My")
         (assert)
         (split -1)
         (("1"
           (case "NOT FORALL (rel): NSol(p(0), n(0), g, k, rel, Mx, My, TRUE, TRUE) = NSol(p(0), n(0), g, k, rel)")
           (("1"
             (skeep)
             (expand "NSol" 1)
             (case "Sol(p(0), n(0), g, k, rel, Mx, My, TRUE, TRUE) =Sol(p(0), n(0), g, k, rel)")
             (("1" (assert))
              ("2"
               (hide 2)
               (decompose-equality 1)
               (expand "Sol" 1)
               (iff)
               (hide -1)
               (ground)
               (("1"
                 (inst - "0")
                 (inst - "x!1")
                 (assert)
                 (replace -1)
                 (expand "sign_ext" -3)
                 (lift-if)
                 (ground)
                 (copy "css")
                 (expand "constructed_sturm_sequence?" -1)
                 (flatten)
                 (inst - "0")
                 (assert))
                ("2"
                 (inst -4 "0")
                 (inst -4 "x!1")
                 (assert)
                 (replace -1)
                 (expand "sign_ext" -4)
                 (lift-if)
                 (ground)
                 (copy "css")
                 (expand "constructed_sturm_sequence?" -1)
                 (flatten)
                 (inst - "0")
                 (assert))))))
            ("2"
             (inst-cp - ">")
             (inst - "<")
             (replaces -1)
             (replaces -1)
             (case "number_sign_changes(LAMBDA (i): polynomial(p(i), n(i))(Mx),
                                                                                 m - 1)`num = nsclow`num AND number_sign_changes(LAMBDA (i): polynomial(p(i), n(i))(My),
                                                                                 m - 1)`num = nschigh`num")
             (("1" (flatten) (assert))
              ("2"
               (hide (-1 2))
               (split 1)
               (("1"
                 (lemma "number_sign_changes_eq")
                 (expand "nsclow" +)
                 (inst - "LAMBDA (i): polynomial(p(i), n(i))(Mx)"
                  "LAMBDA (i):
                                                                 (IF even?(n(i)) THEN 1 ELSE -1 ENDIF) *
                                                                  p(i)(n(i))"
                  "m-1")
                 (assert)
                 (hide 2)
                 (skeep)
                 (inst - "j")
                 (inst - "Mx")
                 (assert)
                 (rewrite "ftz" -1))
                ("2"
                 (expand "nschigh" +)
                 (lemma "number_sign_changes_eq")
                 (inst - "LAMBDA (i): polynomial(p(i), n(i))(My)"
                  "LAMBDA (i): p(i)(n(i))" "m-1")
                 (assert)
                 (skeep)
                 (inst -2 "j")
                 (inst -2 "My")
                 (assert))))))))
          ("2"
           (skeep)
           (inst - "j")
           (inst -3 "j")
           (inst - "Mx")
           (inst - "My")
           (assert)
           (case "p(j)(n(j))/=0")
           (("1"
             (flatten)
             (expand "sign_ext")
             (lift-if)
             (assert)
             (lift-if)
             (assert)
             (lift-if)
             (assert)
             (lift-if)
             (assert)
             (ground))
            ("2"
             (copy "css")
             (expand "constructed_sturm_sequence?" -1)
             (flatten)
             (inst - "j")
             (assert))))))
        ("2"
         (hide 2)
         (case "FORALL (pz:nat): pz<m IMPLIES EXISTS (Mx:negreal): FORALL (j:nat): j<=pz IMPLIES FORALL (x:real): x<=Mx IMPLIES sign_ext(polynomial(p(j), n(j))(x)) =
                                                         sign_ext((-1) ^ n(j) * p(j)(n(j)))")
         (("1"
           (inst - "m-1")
           (assert)
           (skeep)
           (inst + "Mx")
           (skeep)
           (inst - "j")
           (skeep)
           (assert)
           (inst - "x")
           (assert))
          ("2"
           (hide 2)
           (induct "pz")
           (("1"
             (hide -1)
             (inst - "p(0)" "n(0)")
             (case "p(0)(n(0))/=0")
             (("1"
               (flatten)
               (assert)
               (skeep)
               (inst + "-M")
               (skeep)
               (skeep)
               (inst - "x")
               (assert)
               (rewrite "ftz" +)
               (assert)
               (lift-if)
               (ground))
              ("2"
               (copy "css")
               (expand "constructed_sturm_sequence?" -1)
               (flatten)
               (inst - "0")
               (assert))))
            ("2"
             (skolem 1 "pz")
             (assert)
             (flatten)
             (assert)
             (hide -3)
             (inst - "p(1+pz)" "n(1+pz)")
             (assert)
             (split -3)
             (("1"
               (skolem -1 "Mpz")
               (skeep -2)
               (inst + "min(Mx,-Mpz)")
               (("1"
                 (skeep)
                 (case "j = 1+pz")
                 (("1"
                   (skeep)
                   (inst - "x")
                   (assert)
                   (rewrite "ftz" +)
                   (lift-if)
                   (ground))
                  ("2"
                   (inst -2 "j")
                   (assert)
                   (skeep)
                   (inst -2 "x")
                   (assert))))
                ("2" (assert) (expand "min" 1) (lift-if) (ground))))
              ("2"
               (copy "css")
               (expand "constructed_sturm_sequence?" -1)
               (flatten)
               (inst - "1+pz")
               (assert))))))))))
      ("2"
       (hide 2)
       (case "FORALL (pz:nat): pz<m IMPLIES EXISTS (My:posreal): FORALL (j:nat): j<=pz IMPLIES FORALL (x:real): x>=My IMPLIES sign_ext(polynomial(p(j), n(j))(x)) =
                                                     sign_ext(p(j)(n(j)))")
       (("1"
         (inst - "m-1")
         (assert)
         (skeep)
         (inst + "My")
         (skeep)
         (inst - "j")
         (assert))
        ("2"
         (hide 2)
         (induct "pz")
         (("1"
           (assert)
           (hide -1)
           (inst - "p(0)" "n(0)")
           (assert)
           (split)
           (("1"
             (skeep)
             (inst + "M")
             (skeep)
             (skeep)
             (inst - "x")
             (assert))
            ("2"
             (copy "css")
             (expand "constructed_sturm_sequence?" -1)
             (flatten)
             (inst - "0")
             (assert))))
          ("2"
           (skolem 1 "pz")
           (flatten)
           (assert)
           (skeep)
           (hide -3)
           (inst - "p(1+pz)" "n(1+pz)")
           (split -)
           (("1"
             (skolem - "Mpz")
             (inst + "max(Mpz,My)")
             (skeep)
             (case "j = 1+pz")
             (("1" (skeep) (inst - "x") (assert))
              ("2"
               (skeep)
               (inst -2 "j")
               (assert)
               (inst -2 "x")
               (assert))))
            ("2"
             (copy "css")
             (expand "constructed_sturm_sequence?" -1)
             (flatten)
             (inst - "1+pz")
             (assert))))))))))))


proof_type: f_proof
decl_type: formula
library: Tarski
theory: sturmtarski
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (lemma "card_disj_union[real]")
   (expand "NSol")
   (inst?)
   (assert)
   (split -1)
   (("1"
     (replaces -1 :dir rl)
     (case "Sol(a, m, polynomial_prod(g, k, g, k), 2 * k, >) =
                  union(Sol(a, m, g, k, <), Sol(a, m, g, k, >))")
     (("1" (assert))
      ("2"
       (hide 3)
       (decompose-equality 1)
       (expand "union")
       (expand "member")
       (expand "Sol")
       (rewrite "polynomial_prod_def" :dir rl)
       (lemma "sq_gt_0")
       (expand "sq")
       (inst?)
       (iff)
       (ground))))
    ("2"
     (hide 3)
     (expand "disjoint?")
     (expand "intersection")
     (expand "member")
     (expand "empty?")
     (expand "member")
     (skeep)
     (expand "Sol")
     (flatten)
     (assert))))


proof_type: f_proof
decl_type: formula
library: Tarski
theory: sturmtarski
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (expand "NSol")
   (lemma "empty_card[real]")
   (inst?)
   (assert)
   (hide 3)
   (expand "Sol")
   (expand "empty?")
   (expand "member")
   (skeep)
   (rewrite "polynomial_prod_def" :dir rl)
   (typepred "sq(polynomial(g,k)(x))")
   (expand "sq")
   (assert))


proof_type: t_proof
decl_type: tcc
library: Tarski
theory: sturmtarski
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (lemma "finite_subset[real]")
   (name "B"
         "{r: real |
                              polynomial(a, m)(r) = 0}")
   (case "is_finite[real](B)")
   (("1"
     (invoke (name "AA" "%1") (! 1 1))
     (replace -1)
     (inst - "B" "AA")
     (assert)
     (expand "subset?" 1)
     (skosimp*)
     (expand "member")
     (expand "AA" -4)
     (expand "B" 1)
     (assert))
    ("2"
     (hide (-2 2))
     (lemma "poly_roots_enumerated")
     (inst - "a" "m")
     (split -1)
     (("1"
       (assert)
       (skeep -1)
       (lemma "is_finite_surj[real]")
       (inst?)
       (assert)
       (hide 2)
       (inst + "M" "rootseq")
       (("1"
         (expand "surjective?")
         (skosimp*)
         (inst -2 "y!1")
         (assert)
         (split -2)
         (("1" (skosimp*) (inst + "i!1") (assert))
          ("2" (typepred "y!1") (expand "B" -1) (propax))))
        ("2" (skosimp*) (expand "B" 1) (inst - "x1!1"))))
      ("2" (inst + "m") (assert))))))


proof_type: t_proof
decl_type: tcc
library: Tarski
theory: sturmtarski
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (lemma "card_bij_inv[real]")
   (inst - "card(Sol(a, m, g, k, rel, x, y, bbelow, babove))"
    "Sol(a, m, g, k, rel, x, y, bbelow, babove)")
   (assert))


proof_type: t_proof
decl_type: tcc
library: Tarski
theory: sturmtarski
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (invoke (name "AA" "%1") (! 1 1))
   (typepred "Sol(a,m,g,k,rel,0,1,false,false)")
   (case "AA = Sol(a, m, g, k, rel, 0, 1, false,false)")
   (("1" (assert))
    ("2" (decompose-equality 1) (expand "AA" 1) (expand "Sol") (propax))))


proof_type: t_proof
decl_type: tcc
library: Tarski
theory: sturmtarski
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (name "AA" "Sol(a, m, g, k, rel)")
   (case "AA = Sol(a, m, g, k, rel, 0, 1, false,false)")
   (("1"
     (name "NN" "NSol(a, m, g, k, rel, 0, 1, false,false)")
     (typepred "NN")
     (skeep)
     (inst + "enumsol")
     (("1"
       (expand "bijective?")
       (flatten)
       (expand "injective?")
       (expand "surjective?")
       (split)
       (("1" (skosimp*) (inst - "x1!1" "x2!1") (assert))
        ("2"
         (skeep)
         (inst -2 "y")
         (("1"
           (skosimp*)
           (inst + "x!1")
           (assert)
           (typepred "x!1")
           (expand "NN" -1)
           (expand "NSol" -1)
           (assert))
          ("2" (assert))))))
      ("2"
       (split)
       (("1" (skeep) (expand "NN" +) (expand "NSol" 1) (ground))
        ("2" (skosimp*) (assert))))))
    ("2"
     (hide 2)
     (decompose-equality 1)
     (expand "AA" 1)
     (iff)
     (expand "Sol")
     (propax))))


proof_type: f_proof
decl_type: formula
library: Tarski
theory: compute_sturm_tarski
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (name "sl"
         "remainder_seq(a,
                                                n,
                                                der_prod(a, n, g, k),
                                                n - 1 + k)")
   (replace -1)
   (name "P"
         "LAMBDA (j: nat):
                                                                                      IF j < length(sl)
                                                                                        THEN list2array[int](0)(nth(sl, length(sl) - 1 - j))
                                                                                      ELSE (LAMBDA (i: nat): 0)
                                                                                      ENDIF")
   (("1"
     (replaces -1)
     (name "N"
           " LAMBDA (j: nat):
                                                                                                          IF j < length(sl)
                                                                                                            THEN max(length(nth(sl, length(sl) - 1 - j)) - 1, 0)
                                                                                                          ELSE 0
                                                                                                          ENDIF")
     (("1"
       (name "M" "length(sl)-1")
       (replace -1)
       (assert)
       (replace -1)
       (replace -2)
       (replace -3)
       (split +)
       (("1"
         (copy 2)
         (hide 3)
         (expand "constructed_sturm_sequence?")
         (invoke (case "NOT %1") (! 2 1))
         (("1"
           (hide 3)
           (skeep)
           (expand "P" -1)
           (expand "N" -1)
           (assert)
           (expand "max" -1)
           (lift-if)
           (assert)
           (split -)
           (("1"
             (flatten)
             (case "NOT length(sl)-1-i = 0")
             (("1"
               (assert)
               (typepred "sl")
               (hide -1)
               (expand "is_neg_remainder_list?")
               (flatten)
               (inst - "0" "length(sl)-1-i")
               (assert))
              ("2" (replace -1) (assert))))
            ("2"
             (flatten)
             (assert)
             (typepred "sl")
             (hide -1)
             (expand "is_neg_remainder_list?")
             (flatten)
             (inst - "length(sl)-1-i")
             (assert)
             (lemma "list2array_sound[int]")
             (inst - "nth(sl,length(sl)-1-i)" "0"
              "length(nth(sl, length(sl) - 1 - i)) - 1")
             (assert))))
          ("2"
           (label "frizzy1" -1)
           (assert)
           (replace -1)
           (hide "frizzy1")
           (invoke (case "NOT %1") (! 2 1))
           (("1"
             (hide 3)
             (skeep)
             (expand "N" 1)
             (expand "max" 1)
             (lift-if)
             (lift-if)
             (lift-if)
             (assert)
             (ground)
             (("1"
               (typepred "sl")
               (hide -1)
               (expand "is_neg_remainder_list?" -1)
               (flatten)
               (inst - "length(sl)-1-j" "length(sl)-1-i")
               (assert)
               (assert))
              ("2"
               (typepred "sl")
               (hide -1)
               (expand "is_neg_remainder_list?" -1)
               (flatten)
               (inst - "0" "length(sl)-1-j")
               (assert))
              ("3"
               (typepred "sl")
               (hide -1)
               (expand "is_neg_remainder_list?" -1)
               (flatten)
               (inst - "length(sl)-1-j" "length(sl)-1-i")
               (assert))))
            ("2"
             (replace -1)
             (label "frizzy2" -1)
             (hide "frizzy2")
             (invoke (case "NOT %1") (! 2 1))
             (("1"
               (hide 3)
               (typepred "sl")
               (hide -1)
               (expand "is_neg_remainder_list?" -1)
               (flatten)
               (assert)
               (expand "N" 1)
               (expand "max" 1)
               (replace -3)
               (assert))
              ("2"
               (assert)
               (label "frizzy2" -1)
               (hide "frizzy2")
               (invoke (case "NOT %1") (! 2 1))
               (("1"
                 (hide 3)
                 (typepred "sl")
                 (hide -1)
                 (expand "is_neg_remainder_list?" -1)
                 (flatten)
                 (expand "P" 1)
                 (replace -4)
                 (replace -3)
                 (decompose-equality 1)
                 (("1"
                   (lemma "list2array_sound[int]")
                   (inst?)
                   (replace -1)
                   (assert)
                   (lift-if)
                   (split +)
                   (("1"
                     (flatten)
                     (expand "der_prod")
                     (typepred
                      "array2list[int]
                                    (k + n)
                                    (LAMBDA (i: nat):
                                       polynomial_prod(g, k, poly_deriv(a), n - 1)(i))")
                     (("1"
                       (replace -2)
                       (inst - "x!1")
                       (replace -3 :dir rl)
                       (assert)
                       (expand "poly_deriv" 1)
                       (expand "polynomial_prod" 1)
                       (case "NOT N(0)=n")
                       (("1"
                         (hide 2)
                         (expand "N" 1)
                         (expand "max" 1)
                         (replace -8)
                         (assert))
                        ("2"
                         (replace -1)
                         (assert)
                         (rewrite "sigma_eq")
                         (("1"
                           (hide 2)
                           (skosimp*)
                           (lemma "list2array_sound[int]")
                           (case "NOT 1 - n!1 + x!1 >= 0")
                           (("1" (assert))
                            ("2"
                             (inst?)
                             (assert)
                             (replace -2 +)
                             (typepred "array2list[int](1+n)(a)")
                             (inst - "1-n!1+x!1")
                             (replaces -2)
                             (replaces -3))))
                          ("2" (skeep) (assert))))))
                      ("2"
                       (hide 2)
                       (hide (-1 -2 -3 -4 -5))
                       (skeep)
                       (typepred "der_prod(a,n,g,k)(i)")
                       (expand "der_prod" -1)
                       (assert)
                       (case "FORALL (jj:int): rational_pred(jj)")
                       (("1"
                         (inst - "der_prod(a,n,g,k)(i)")
                         (expand "der_prod")
                         (propax))
                        ("2" (hide-all-but 1) (grind))))))
                    ("2"
                     (flatten)
                     (assert)
                     (case "x!1 < k+n")
                     (("1" (assert))
                      ("2"
                       (case "NOT N(0)=n")
                       (("1"
                         (expand "N" 1)
                         (expand "max" 1)
                         (replace -4 1)
                         (assert))
                        ("2"
                         (replace -1)
                         (assert)
                         (expand "polynomial_prod" +)
                         (rewrite "sigma_restrict_eq_0" +)
                         (("1" (hide 4) (skeep))
                          ("2" (skosimp*) (assert))))))))))
                  ("2"
                   (hide (-1 -2 -5))
                   (skeep)
                   (assert)
                   (typepred
                    "der_prod((list2array[int]
                                                         (0)(array2list[int](1 + n)(a))),n,g,k)(x1)")
                   (typepred
                    "der_prod((list2array[int]
                                                         (0)(array2list[int](1 + n)(a))),n,g,k)(x1)")
                   (expand "der_prod" -1)
                   (assert)
                   (case "NOT N(0)=n")
                   (("1"
                     (expand "N" 1)
                     (expand "max")
                     (replace -3)
                     (assert))
                    ("2"
                     (assert)
                     (case "FORALL (jj:int): rational_pred(jj)")
                     (("1"
                       (inst -
                        "der_prod((list2array[int]
                                                             (0)(array2list[int](1 + n)(a))),n,g,k)(x1)")
                       (expand "der_prod" -1)
                       (assert))
                      ("2" (hide-all-but 1) (grind))))))
                  ("3"
                   (expand "N" 1)
                   (expand "max" 1)
                   (replace -3)
                   (assert))))
                ("2"
                 (replace -1)
                 (label "frizzy3" -1)
                 (hide "frizzy3")
                 (invoke (case "NOT %1") (! 2 1))
                 (("1"
                   (hide 3)
                   (assert)
                   (expand "N" 1)
                   (assert)
                   (expand "max" 1)
                   (typepred "sl")
                   (hide -1)
                   (expand "is_neg_remainder_list?")
                   (flatten)
                   (assert))
                  ("2"
                   (assert)
                   (label "frizzy4" -1)
                   (hide "frizzy4")
                   (invoke (case "NOT %1") (! 2 1))
                   (("1" (hide 3) (expand "N" 1) (expand "M" 1) (assert))
                    ("2"
                     (replace -1)
                     (label "frizzy5" -1)
                     (hide "frizzy5")
                     (invoke (case "NOT %1") (! 2 1))
                     (("1"
                       (hide 3)
                       (expand "P" 1)
                       (expand "M" 1)
                       (assert)
                       (typepred "sl")
                       (hide -1)
                       (expand "is_neg_remainder_list?")
                       (flatten)
                       (assert)
                       (case "nth(sl,0) = null")
                       (("1" (replaces -1) (hide -) (grind))
                        ("2"
                         (hide-all-but (-7 1))
                         (grind :exclude "nth"))))
                      ("2"
                       (label "frizzy6" -1)
                       (replace "frizzy6")
                       (hide "frizzy6")
                       (invoke (case "NOT %1") (! 2 1))
                       (("1"
                         (hide 3)
                         (skeep)
                         (typepred "sl")
                         (hide -1)
                         (expand "is_neg_remainder_list?")
                         (flatten)
                         (inst -5 "length(sl)-1-j")
                         (("1"
                           (assert)
                           (case "NOT P(j-2) = list2array[int](0)(nth(sl, 1 + length(sl) - j))")
                           (("1"
                             (hide 2)
                             (decompose-equality 1)
                             (name "ii" "x!1")
                             (replaces -1)
                             (expand "P" 1)
                             (propax))
                            ("2"
                             (case "NOT N(j-2) = length(nth(sl, 1 + length(sl) - j)) - 1")
                             (("1"
                               (expand "N" 1)
                               (assert)
                               (expand "max")
                               (lift-if)
                               (ground)
                               (typepred "sl")
                               (hide -1)
                               (expand "is_neg_remainder_list?")
                               (flatten)
                               (inst - "0" "1+length(sl)-j")
                               (assert))
                              ("2"
                               (case "NOT P(j-1) = list2array[int](0)(nth(sl, length(sl) - j))")
                               (("1" (expand "P" 1) (propax))
                                ("2"
                                 (case
                                  "NOT N(j-1) = length(nth(sl, length(sl) - j)) - 1")
                                 (("1"
                                   (expand "N" 1)
                                   (expand "max" 1)
                                   (lift-if)
                                   (ground)
                                   (typepred "sl")
                                   (hide -1)
                                   (expand "is_neg_remainder_list?")
                                   (flatten)
                                   (inst - "0" "length(sl)-j")
                                   (assert))
                                  ("2"
                                   (replace -1 :dir rl)
                                   (replace -2 :dir rl)
                                   (replace -3 :dir rl)
                                   (replace -4 :dir rl)
                                   (assert)
                                   (case
                                    "NOT P(j) = list2array[int](0)(nth(sl, length(sl) - j-1))")
                                   (("1" (expand "P" 1) (propax))
                                    ("2"
                                     (case
                                      "NOT N(j) = length(nth(sl, length(sl) - j - 1)) - 1")
                                     (("1"
                                       (expand "N" 1)
                                       (expand "max" 1)
                                       (lift-if)
                                       (assert)
                                       (ground)
                                       (case "NOT j = M")
                                       (("1"
                                         (typepred "sl")
                                         (hide -1)
                                         (expand
                                          "is_neg_remainder_list?")
                                         (flatten)
                                         (inst - "0" "M-j")
                                         (assert))
                                        ("2"
                                         (expand "M" -1)
                                         (assert)
                                         (replace -1 -3)
                                         (assert)
                                         (case
                                          "NOT length(adjusted_remainder(P(j - 2), N(j - 2))(P(j - 1), N(j - 1))) = 0")
                                         (("1" (assert))
                                          ("2"
                                           (lemma
                                            "adjusted_remainder_empty")
                                           (inst?)
                                           (("1"
                                             (assert)
                                             (split -)
                                             (("1"
                                               (assert)
                                               (inst + "1")
                                               (assert)
                                               (decompose-equality 1)
                                               (("1"
                                                 (invoke
                                                  (case "NOT %1 = 0")
                                                  (! 1 1))
                                                 (("1"
                                                   (hide 2)
                                                   (case "NOT N(j)=0")
                                                   (("1"
                                                     (assert)
                                                     (expand "N" 1)
                                                     (expand "max" 1)
                                                     (propax))
                                                    ("2"
                                                     (case "P(j)(0)=0")
                                                     (("1"
                                                       (assert)
                                                       (replace -2)
                                                       (rewrite
                                                        "polynomial_n0")
                                                       (assert))
                                                      ("2"
                                                       (assert)
                                                       (lemma
                                                        "list2array_sound[int]")
                                                       (inst
                                                        -
                                                        "nth(sl,0)"
                                                        "0"
                                                        "0")
                                                       (assert))))))
                                                  ("2"
                                                   (replace -1)
                                                   (assert)
                                                   (hide (-11 -12))
                                                   (hide (-21 -22))
                                                   (expand
                                                    "polynomial"
                                                    1)
                                                   (rewrite
                                                    "sigma_restrict_eq_0")
                                                   (hide 2)
                                                   (skosimp*)
                                                   (inst - "i!1")
                                                   (assert)
                                                   (expand "*")
                                                   (lift-if)
                                                   (ground))
                                                  ("3"
                                                   (hide-all-but 1)
                                                   (expand "N")
                                                   (expand "max")
                                                   (assert))))
                                                ("2"
                                                 (hide-all-but 1)
                                                 (expand "N")
                                                 (ground))
                                                ("3"
                                                 (hide-all-but 1)
                                                 (expand "N")
                                                 (ground))
                                                ("4"
                                                 (hide-all-but 1)
                                                 (expand "N")
                                                 (ground))))
                                              ("2"
                                               (hide 2)
                                               (hide -)
                                               (hide 2)
                                               (skeep)
                                               (expand "P")
                                               (expand "N")
                                               (assert)
                                               (lemma
                                                "list2array_sound[int]")
                                               (inst?)
                                               (assert)
                                               (lift-if)
                                               (ground)
                                               (expand "max")
                                               (lift-if)
                                               (ground)
                                               (("1"
                                                 (typepred "sl")
                                                 (hide -1)
                                                 (expand
                                                  "is_neg_remainder_list?")
                                                 (flatten)
                                                 (inst-cp
                                                  -
                                                  "length(sl) - j + 1 -1"
                                                  "length(sl)-j+1")
                                                 (inst-cp
                                                  -
                                                  "length(sl)-j+1-2"
                                                  "length(sl) - j + 1 -1")
                                                 (assert)
                                                 (case
                                                  "NOT FORALL (ab1,ab2,ab3:nat): ab1 < ab2 AND ab2 < ab3 IMPLIES (NOT ab3-1<0)")
                                                 (("1"
                                                   (hide-all-but 1)
                                                   (grind))
                                                  ("2"
                                                   (inst
                                                    -
                                                    "length(nth(sl, length(sl) - 1 - j))"
                                                    "length(nth(sl, length(sl) - j))"
                                                    "length(nth(sl, 1 + length(sl) - j))")
                                                   (assert))))
                                                ("2"
                                                 (case
                                                  "FORALL (ab3:nat): NOT (i>ab3-1 AND i<ab3)")
                                                 (("1" (inst?) (assert))
                                                  ("2"
                                                   (hide-all-but 1)
                                                   (grind))))))
                                              ("3"
                                               (hide 2)
                                               (hide -)
                                               (skeep)
                                               (expand "P")
                                               (expand "N")
                                               (assert)
                                               (lemma
                                                "list2array_sound[int]")
                                               (inst?)
                                               (assert)
                                               (lift-if)
                                               (ground)
                                               (expand "max")
                                               (lift-if)
                                               (ground)
                                               (("1"
                                                 (replace -4 +)
                                                 (case "i < 0")
                                                 (("1" (assert))
                                                  ("2"
                                                   (case
                                                    "FORALL (pjk:nat): pjk-1<0 IMPLIES pjk = 0")
                                                   (("1"
                                                     (inst
                                                      -
                                                      "length(nth(sl,length(sl)-j))")
                                                     (assert))
                                                    ("2"
                                                     (hide-all-but 1)
                                                     (grind))))))
                                                ("2"
                                                 (case
                                                  "FORALL (aa:int): NOT (i>aa-1 AND i<aa)")
                                                 (("1" (inst?) (assert))
                                                  ("2"
                                                   (hide-all-but 1)
                                                   (grind))))))
                                              ("4"
                                               (assert)
                                               (reveal "frizzy1")
                                               (inst?))))
                                            ("2"
                                             (hide 2)
                                             (reveal "frizzy2")
                                             (inst - "j-2" "j-1")
                                             (("1"
                                               (assert)
                                               (hide 2)
                                               (expand "N" 1)
                                               (assert))
                                              ("2"
                                               (hide 2)
                                               (assert)
                                               (replace -3 1)
                                               (assert)
                                               (replace -3)
                                               (assert)
                                               (assert)
                                               (case "NOT length(sl)=3")
                                               (("1" (assert))
                                                ("2"
                                                 (replace -1)
                                                 (assert)
                                                 (reveal 1)
                                                 (hide 2)
                                                 (expand "N" 1)
                                                 (assert))))))
                                            ("3"
                                             (expand "N" 1)
                                             (assert))))
                                          ("3"
                                           (hide 2)
                                           (expand "N" 1)
                                           (assert))
                                          ("4"
                                           (hide 2)
                                           (expand "N" 1)
                                           (assert))))))
                                      ("2"
                                       (label "mini" -)
                                       (label "mini" -)
                                       (lemma "adjusted_remainder_def")
                                       (inst?)
                                       (("1"
                                         (hide "mini")
                                         (split -)
                                         (("1"
                                           (skoletin -)
                                           (skoletin -)
                                           (skoletin -)
                                           (skoletin -)
                                           (case
                                            "thispoly = P(j) AND thisdeg = N(j)")
                                           (("1"
                                             (flatten)
                                             (case "NOT N(j)>=0")
                                             (("1"
                                               (expand "N" 1)
                                               (assert))
                                              ("2"
                                               (assert)
                                               (flatten)
                                               (replace -7 :dir rl)
                                               (replace -2)
                                               (replace -3)
                                               (propax))))
                                            ("2"
                                             (hide (- 2))
                                             (reveal "mini")
                                             (split +)
                                             (("1"
                                               (replace -2 1)
                                               (expand "thispoly" +)
                                               (expand "thisrem" +)
                                               (replace -11 :dir rl)
                                               (expand "thisdeg" 1)
                                               (expand "thisrem" 1)
                                               (replace -11 :dir rl)
                                               (hide -)
                                               (decompose-equality)
                                               (("1"
                                                 (lemma
                                                  "list2array_sound[int]")
                                                 (inst?)
                                                 (replaces -1)
                                                 (lift-if)
                                                 (lift-if)
                                                 (lift-if)
                                                 (ground))
                                                ("2" (skeep) (assert))))
                                              ("2"
                                               (expand "thisdeg" 1)
                                               (expand "thisrem" 1)
                                               (replace -11 :dir rl)
                                               (assert))))))
                                          ("2"
                                           (hide 2)
                                           (reveal "frizzy1")
                                           (inst?))
                                          ("3"
                                           (hide 2)
                                           (skeep)
                                           (expand "P")
                                           (expand "N")
                                           (expand "max")
                                           (lift-if)
                                           (ground)
                                           (("1"
                                             (expand "list2array")
                                             (lift-if)
                                             (ground)
                                             (expand "length" -1 1)
                                             (assert))
                                            ("2"
                                             (lemma
                                              "list2array_sound[int]")
                                             (inst?)
                                             (assert)
                                             (lift-if)
                                             (ground)
                                             (case
                                              "FORALL (ab3:nat): NOT (ii>ab3-1 AND ii<ab3)")
                                             (("1" (inst?) (assert))
                                              ("2"
                                               (hide-all-but 1)
                                               (grind))))))
                                          ("4"
                                           (hide 2)
                                           (hide 2)
                                           (skeep)
                                           (expand "P")
                                           (expand "N")
                                           (assert)
                                           (lemma
                                            "list2array_sound[int]")
                                           (inst?)
                                           (assert)
                                           (lift-if)
                                           (ground)
                                           (expand "max")
                                           (lift-if)
                                           (ground)
                                           (("1"
                                             (replace -4 +)
                                             (case "ii < 0")
                                             (("1" (assert))
                                              ("2"
                                               (case
                                                "FORALL (pjk:nat): pjk-1<0 IMPLIES pjk = 0")
                                               (("1"
                                                 (inst
                                                  -
                                                  "length(nth(sl,length(sl)-j))")
                                                 (assert))
                                                ("2"
                                                 (hide-all-but 1)
                                                 (grind))))))
                                            ("2"
                                             (case
                                              "FORALL (aa:int): NOT (ii>aa-1 AND ii<aa)")
                                             (("1" (inst?) (assert))
                                              ("2"
                                               (hide-all-but 1)
                                               (grind))))))))
                                        ("2"
                                         (hide-all-but 1)
                                         (expand "N")
                                         (assert))
                                        ("3"
                                         (hide-all-but 1)
                                         (expand "N")
                                         (assert))))))))))))))))
                          ("2" (assert))))
                        ("2"
                         (replace -1)
                         (label "frizzydizzy" -1)
                         (hide "frizzydizzy")
                         (case "NOT (M=-1 OR M=0 OR M=1)")
                         (("1" (assert))
                          ("2"
                           (split -)
                           (("1" (assert)) ("2" (assert))
                            ("3"
                             (assert)
                             (reveal "frizzy1")
                             (reveal "frizzy2")
                             (reveal "frizzy3")
                             (reveal "frizzy4")
                             (reveal "frizzy5")
                             (replace -7 -1)
                             (reveal "frizzy6")
                             (replace -8 -1)
                             (assert)
                             (inst - "0")
                             (assert)
                             (replace -4 -1)
                             (expand "polynomial_prod" -1)
                             (case "NOT N(0) = n")
                             (("1"
                               (expand "N" 1)
                               (hide -1)
                               (expand "max" 1)
                               (assert)
                               (lift-if)
                               (typepred "sl")
                               (hide -1)
                               (expand "is_neg_remainder_list?")
                               (flatten)
                               (replace -3)
                               (assert))
                              ("2"
                               (replace -1)
                               (assert)
                               (expand "sigma")
                               (expand "sigma")
                               (expand "poly_deriv")
                               (assert))))))))
                        ("3" (skeep) (expand "N" 1) (lift-if) (assert))
                        ("4" (assert) (skeep) (assert))
                        ("5"
                         (skeep)
                         (assert)
                         (split 1)
                         (("1" (expand "N" 1) (assert))
                          ("2" (reveal "frizzy1") (inst?))))
                        ("6" (skeep) (assert))
                        ("7" (skeep) (expand "N" 1) (assert))))))))))
                ("3"
                 (expand "N" 1)
                 (assert)
                 (expand "max" 1)
                 (assert)
                 (typepred "sl")
                 (assert)
                 (expand "is_neg_remainder_list?")
                 (hide -1)
                 (flatten)
                 (replace -3)
                 (assert))))))))
          ("3" (hide 3) (assert) (skeep) (expand "N" 1) (assert))))
        ("2"
         (assert)
         (typepred "sl")
         (hide -1)
         (expand "is_neg_remainder_list?")
         (flatten)
         (assert)
         (expand "M" 1)
         (replace -3)
         (decompose-equality +)
         (name "ii" "x!1")
         (replace -1)
         (lemma "list2array_sound[int]")
         (inst?)
         (replaces -1)
         (assert)
         (lift-if)
         (ground)
         (("1"
           (typepred "array2list[int](1+n)(a)")
           (inst - "ii")
           (assert))
          ("2" (inst - "ii") (inst - "ii") (inst - "ii") (assert))))
        ("3"
         (typepred "sl")
         (hide -1)
         (expand "is_neg_remainder_list?")
         (flatten)
         (expand "max")
         (lift-if)
         (ground))))
      ("2" (hide 3) (skeep) (assert))))
    ("2" (hide 3) (skeep) (assert))))


proof_type: f_proof
decl_type: formula
library: Tarski
theory: compute_sturm_tarski
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (expand "TQ")
   (name "sl"
         "remainder_seq(LAMBDA
                                                           (i: nat):
                                                           IF i <= n
                                                           THEN a(i)
                                                           ELSE 0
                                                           ENDIF,
                                                           n,
                                                           der_prod
                                                           (LAMBDA
                                                            (i: nat):
                                                            IF i <= n
                                                            THEN a(i)
                                                            ELSE 0
                                                            ENDIF,
                                                            n,
                                                            g,
                                                            k),
                                                           k - 1 + n)")
   (replace -1)
   (expand "compute_TQ_param" :assert? none)
   (skoletin 3)
   (skoletin 1)
   (skoletin 1)
   (skoletin 1)
   (skoletin 1)
   (replace -2 -1)
   (assert)
   (hide -2)
   (lemma "sturm_tarski_unbounded")
   (inst - "g" "k" "M" "N" "P")
   (("1"
     (split -1)
     (("1"
       (assert)
       (replace -1)
       (replace -2)
       (case "FORALL (relo:[[real,real]->bool]): NSol(P(0),N(0),g,k,relo) = NSol(a,n,g,k,relo)")
       (("1" (inst-cp - ">") (inst - "<") (assert))
        ("2"
         (hide 2)
         (skeep)
         (expand "NSol" 1)
         (case "Sol(P(0), N(0), g, k, relo) = Sol(a, n, g, k, relo)")
         (("1" (assert))
          ("2"
           (hide 2)
           (decompose-equality 1)
           (("1"
             (expand "Sol" 1)
             (case "polynomial(P(0), N(0))(x!1) =polynomial(a, n)(x!1)")
             (("1" (assert) (replaces -1))
              ("2"
               (hide 2)
               (expand "P" 1)
               (expand "N" 1)
               (lemma "computed_sturm_spec")
               (inst?)
               (assert)
               (replace -7)
               (split -)
               (("1"
                 (flatten)
                 (replace -2)
                 (assert)
                 (replace -3)
                 (hide -)
                 (lemma "polynomial_eq_coeff")
                 (inst -
                  "LAMBDA (i: nat): IF i <= n THEN a(i) ELSE 0 ENDIF" "a"
                  "n")
                 (assert))
                ("2" (hide 2) (skosimp*) (lift-if) (assert))))))
            ("2" (expand "N" 1) (assert))))))
        ("3" (expand "N" 1) (assert))))
      ("2"
       (lemma "computed_sturm_spec")
       (inst?)
       (assert)
       (replace -6)
       (assert)
       (skosimp*)
       (lift-if)
       (assert))))
    ("2" (skosimp*) (assert) (expand "N" 1) (assert) (lift-if) (ground))))


proof_type: f_proof
decl_type: formula
library: Tarski
theory: compute_sturm_tarski
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (case "polynomial(g1,k)=polynomial(g2,k)")
   (("1"
     (rewrite "TQ_def")
     (rewrite "TQ_def")
     (expand "NSol")
     (expand "Sol")
     (assert)
     (replace -1)
     (propax))
    ("2" (lemma "polynomial_eq_coeff") (inst?) (assert))))


proof_type: t_proof
decl_type: tcc
library: Tarski
theory: compute_sturm_tarski
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (expand "polynomial_prod")
   (assert)
   (case "FORALL (abc:[nat->int],i1,i2:nat): rational_pred(sigma(i1,i2,abc)) AND integer_pred(sigma(i1,i2,abc))")
   (("1"
     (inst?)
     (("1" (hide 2) (skosimp*) (expand "poly_deriv") (propax))
      ("2" (skosimp*) (assert))))
    ("2"
     (hide 2)
     (assert)
     (induct "i2")
     (("1"
       (skeep)
       (expand "sigma")
       (lift-if)
       (assert)
       (expand "sigma")
       (propax))
      ("2"
       (skeep)
       (skeep)
       (inst - "abc" "i1")
       (flatten)
       (expand "sigma" +)
       (assert)
       (lift-if)
       (assert)
       (lemma "integers.closed_plus")
       (inst?)
       (assert)
       (lemma "rationals.closed_plus")
       (inst?)
       (assert))))))


proof_type: t_proof
decl_type: tcc
library: Tarski
theory: compute_sturm_tarski
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (assert)
   (expand "der_prod")
   (expand "polynomial_prod")
   (expand "max")
   (expand "sigma")
   (expand "sigma")
   (expand "poly_deriv")
   (assert))


proof_type: t_proof
decl_type: tcc
library: Tarski
theory: compute_sturm_tarski
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (assert)
   (expand "der_prod")
   (expand "polynomial_prod")
   (replaces -1)
   (expand "max")
   (expand "sigma")
   (expand "sigma")
   (expand "poly_deriv")
   (assert))


proof_type: f_proof
decl_type: formula
library: Tarski
theory: poly_families
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (expand "polynomial_prod")
   (case "FORALL (jj:nat): rational_pred(sigma(max(i - k, 0), jj,
                                   LAMBDA (k_1: nat):
                                     IF k_1 <= i THEN a(k_1) * g(i - k_1)
                                     ELSE 0
                                     ENDIF))
                AND
                integer_pred(sigma(max(i - k, 0), jj,
                                   LAMBDA (k_1: nat):
                                     IF k_1 <= i THEN a(k_1) * g(i - k_1)
                                     ELSE 0
                                     ENDIF))")
   (("1" (inst?))
    ("2"
     (hide 2)
     (induct "jj")
     (("1" (grind) (grind) (expand "sigma") (expand "sigma") (propax))
      ("2" (grind) (expand "sigma") (ground))
      ("3"
       (skeep)
       (assert)
       (expand "sigma" +)
       (lift-if)
       (ground)
       (("1" (assert) (rewrite "rationals.closed_plus" +))
        ("2" (rewrite "integers.closed_plus" +))))
      ("4" (skosimp*) (assert)) ("5" (skosimp*) (assert))
      ("6" (skosimp*) (assert)) ("7" (skosimp*) (assert))
      ("8" (skosimp*) (assert)) ("9" (skosimp*) (assert))
      ("10" (assert))))
    ("3" (skosimp*) (assert)) ("4" (skosimp*) (assert))
    ("5" (skosimp*) (assert)) ("6" (skosimp*) (assert))))


proof_type: f_proof
decl_type: formula
library: Tarski
theory: poly_families
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (expand "TQ_fam")
   (assert)
   (typepred "prod_polynomials_list(GF, KF, GP, k)")
   (case "NOT (LAMBDA (i):
                    IF i <= length[int](prod_polynomials_list(GF, KF, GP, k)) - 1
                      THEN nth(prod_polynomials_list(GF, KF, GP, k), i)
                    ELSE 0
                    ENDIF) = (LAMBDA (i):
                   IF i < length(prod_polynomials_list(GF, KF, GP, k))
                     THEN nth(prod_polynomials_list(GF, KF, GP, k), i)
                   ELSE 0
                   ENDIF)")
   (("1"
     (hide 3)
     (decompose-equality 1)
     (("1"
       (lift-if)
       (lift-if)
       (lift-if)
       (ground)
       (case "FORALL (aa,bb:int): aa<bb IMPLIES aa<=bb-1")
       (("1" (inst?) (assert)) ("2" (hide-all-but 1) (grind))))
      ("2" (skosimp*) (assert))))
    ("2" (replaces -1) (replaces -3 :dir rl) (assert))
    ("3" (hide 3) (skeep) (assert))))


proof_type: f_proof
decl_type: formula
library: Tarski
theory: poly_families
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (induct "k")
   (("1"
     (skeep)
     (inst - "0")
     (assert)
     (expand "sign_prod")
     (expand "product")
     (expand "product")
     (assert))
    ("2"
     (skolem 1 "k")
     (flatten)
     (skeep)
     (inst - "GP" "RelF1" "RelF2")
     (split -1)
     (("1"
       (expand "sign_prod")
       (expand "product" +)
       (inst - "1+k")
       (assert))
      ("2" (skeep) (inst - "i") (assert))))))


proof_type: f_proof
decl_type: formula
library: Tarski
theory: poly_families
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (induct "k")
   (("1" (grind))
    ("2"
     (skeep)
     (skeep)
     (inst - "x")
     (expand "^")
     (expand "expt" +)
     (rewrite "sign_ext_mult")
     (assert))))


proof_type: f_proof
decl_type: formula
library: Tarski
theory: poly_families
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (induct "k")
   (("1" (assert))
    ("2"
     (skeep)
     (assert)
     (typepred "prod_polynomials(GF,KF,GP,0)")
     (inst - "x")
     (replaces -1)
     (hide -)
     (expand "product")
     (expand "product")
     (expand "sign_prod")
     (expand "product")
     (expand "product")
     (rewrite "sign_ext_pow"))
    ("3"
     (skeep)
     (assert)
     (skeep)
     (assert)
     (inst - "GF" "GP" "KF" "x")
     (typepred "prod_polynomials(GF, KF, GP, j)")
     (inst - "x")
     (replaces -1)
     (hide -1)
     (hide -1)
     (typepred "prod_polynomials(GF, KF, GP, 1 + j)")
     (inst - "x")
     (replaces -1)
     (hide -1)
     (hide -1)
     (expand "sign_prod")
     (expand "product" +)
     (rewrite "sign_ext_mult")
     (("1" (assert) (replace -1 :dir rl) (rewrite "sign_ext_pow"))
      ("2" (skosimp*) (assert))))
    ("4"
     (hide 2)
     (skeep)
     (replaces -1)
     (assert)
     (expand "sign_ext")
     (grind :exclude "polynomial"))
    ("5"
     (hide 2)
     (induct "k")
     (("1" (skeep) (grind))
      ("2" (skeep) (skeep) (expand "sigma" +) (expand "*") (assert))))))


proof_type: f_proof
decl_type: formula
library: Tarski
theory: poly_families
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (case "FORALL (FG2:[nat->nat],kz:nat): rational_pred(sigma(0,kz,FG2)) AND integer_pred(sigma(0,kz,FG2)) AND sigma(0,kz,FG2) >= 0")
   (("1"
     (label "hydrolem" -1)
     (hide "hydrolem")
     (case "FORALL (GP,k): EXISTS (i: below(3 ^ (k+1))):
                                          base_3_seq(k, i) =
                                           (LAMBDA (i: nat): IF i <= k THEN GP(i) ELSE 0 ENDIF)")
     (("1"
       (case "FORALL (RelF,k): EXISTS (GP): sig_seq(GP) = RelF")
       (("1"
         (skeep)
         (inst - "RelF" "k")
         (skeep)
         (inst - "GP" "k")
         (skeep)
         (inst + "i")
         (replaces -2)
         (decompose-equality 1)
         (decompose-equality -1)
         (inst - "x!1")
         (expand "sig_seq")
         (lift-if)
         (ground)
         (expand "sig")
         (propax))
        ("2"
         (hide-all-but 1)
         (skeep)
         (inst + "LAMBDA (i): IF RelF(i)>=0 THEN RelF(i) ELSE 2 ENDIF")
         (("1"
           (decompose-equality 1)
           (("1"
             (case "NOT (RelF(x!1) = 0 OR RelF(x!1)=1 OR RelF(x!1)=-1)")
             (("1" (flatten) (assert)) ("2" (grind))))
            ("2" (skosimp*) (assert))))
          ("2" (skosimp*) (assert))))))
      ("2"
       (hide 2)
       (skeep)
       (name "Dizzy"
             "(LAMBDA (i_1: nat): IF i_1 <= k THEN GP(k-i_1) ELSE 0 ENDIF)")
       (("1"
         (name "zizzy" "LAMBDA (ij:nat): 3^ij")
         (name "FG" "Dizzy*zizzy")
         (name "ii" "sigma(0,k,FG)")
         (case "ii < 3^(k+1)")
         (("1"
           (inst + "ii")
           (("1"
             (expand "base_3_seq")
             (decompose-equality 1)
             (("1"
               (lift-if)
               (ground)
               (lemma "base_n_unique")
               (inst - "k" "3" "Dizzy")
               (("1"
                 (assert)
                 (case "(LAMBDA (s: nat): 3 ^ s * Dizzy(s)) = FG")
                 (("1"
                   (replace -1)
                   (inst - "k-x!1")
                   (assert)
                   (expand "Dizzy" -2)
                   (assert))
                  ("2"
                   (decompose-equality 1)
                   (expand "FG" 1)
                   (expand "*" 1)
                   (expand "zizzy" 1)
                   (assert))))
                ("2"
                 (assert)
                 (hide-all-but 1)
                 (expand "Dizzy")
                 (grind))))
              ("2"
               (replace -2 + :dir rl)
               (reveal "hydrolem")
               (skeep)
               (inst?)
               (assert)
               (hide 2)
               (skosimp*)
               (expand "FG" 1)
               (expand "*" 1)
               (expand "Dizzy" 1)
               (expand "zizzy" 1)
               (lift-if)
               (ground))
              ("3" (skosimp*) (assert))))
            ("2"
             (assert)
             (reveal "hydrolem")
             (inst?)
             (("1" (assert) (flatten) (assert))
              ("2"
               (hide 2)
               (skosimp*)
               (expand "FG" 1)
               (expand "*" 1)
               (expand "Dizzy" 1)
               (expand "zizzy" 1)
               (lift-if)
               (ground))))))
          ("2"
           (hide 2)
           (lemma "sigma_le")
           (inst - "FG" "LAMBDA (s:nat): 3^s*2" "k" "0")
           (assert)
           (split -1)
           (("1"
             (case "sigma(0, k, LAMBDA (s: nat): 2 * 3 ^ s) < 3^(1+k)")
             (("1" (assert))
              ("2"
               (hide-all-but 1)
               (rewrite "sigma_scal")
               (rewrite "sigma_geometric")
               (rewrite "expt_x0")
               (assert))))
            ("2"
             (skeep)
             (expand "FG" 1)
             (expand "*" 1)
             (expand "zizzy" 1)
             (expand "Dizzy" 1)
             (typepred "GP(k-n)")
             (mult-by -2 "3^n"))))))
        ("2" (hide 2) (skosimp*) (assert))))))
    ("2" (hide 2) (grind))))


proof_type: f_proof
decl_type: formula
library: Tarski
theory: poly_families
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (lemma "sig_seq_base_3_onto")
   (inst - "LAMBDA (jj:nat): IF jj<=k THEN RelF(k-jj) ELSE 0 ENDIF" "k")
   (("1"
     (skeep)
     (inst + "i")
     (assert)
     (decompose-equality +)
     (decompose-equality -)
     (inst - "k-x!1")
     (("1"
       (assert)
       (lift-if)
       (assert)
       (ground)
       (("1" (expand "sig_seq") (expand "base_3_seq") (propax))
        ("2"
         (expand "sig_seq")
         (lemma "base_n_0")
         (inst?)
         (assert)
         (typepred "i")
         (case "3^(1+k)<=3^x!1")
         (("1" (assert) (replace -3) (expand "sig") (propax))
          ("2"
           (lemma "both_sides_expt_gt1_le_aux")
           (expand "^" 1)
           (inst - "3" "k" "x!1-1")
           (assert))))))
      ("2"
       (assert)
       (typepred "i")
       (lemma "base_n_0")
       (inst - "3" "i" "x!1")
       (assert)
       (split -)
       (("1" (expand "sig_seq") (replaces -1) (expand "sig") (propax))
        ("2"
         (assert)
         (case "3^(1+k)<=3^x!1")
         (("1" (assert))
          ("2"
           (lemma "both_sides_expt_gt1_le_aux")
           (inst - "3" "k" "x!1-1")
           (assert)
           (expand "^")
           (propax))))))))
    ("2" (hide 2) (skosimp*) (assert))))


proof_type: f_proof
decl_type: formula
library: Tarski
theory: poly_families
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (case "FORALL (FG2:[nat->nat],kz:nat): rational_pred(sigma(0,kz,FG2)) AND integer_pred(sigma(0,kz,FG2)) AND sigma(0,kz,FG2) >= 0")
   (("1"
     (label "hydrolem" -1)
     (hide "hydrolem")
     (case "FORALL (GP,k): EXISTS (i: below(6 ^ (k+1))):
                     (FORALL (j: nat): base_6_seq(k, i)(j) <= 2) AND
                                                            base_6_seq(k, i) =
                                                             (LAMBDA (i: nat): IF i <= k THEN GP(i) ELSE 0 ENDIF)")
     (("1"
       (case "FORALL (RelF,k): EXISTS (GP): sig_seq(GP) = RelF")
       (("1"
         (skeep)
         (inst - "RelF" "k")
         (skeep)
         (inst - "GP" "k")
         (skeep)
         (inst + "i")
         (replaces -2)
         (replaces -2)
         (decompose-equality 1)
         (decompose-equality -1)
         (inst - "x!1")
         (expand "sig_seq")
         (lift-if)
         (ground)
         (expand "sig")
         (propax))
        ("2"
         (hide-all-but 1)
         (skeep)
         (inst + "LAMBDA (i): IF RelF(i)>=0 THEN RelF(i) ELSE 2 ENDIF")
         (("1"
           (decompose-equality 1)
           (("1"
             (case "NOT (RelF(x!1) = 0 OR RelF(x!1)=1 OR RelF(x!1)=-1)")
             (("1" (flatten) (assert)) ("2" (grind))))
            ("2" (skosimp*) (assert))))
          ("2" (skosimp*) (assert))))))
      ("2"
       (hide 2)
       (skeep)
       (name "Dizzy"
             "(LAMBDA (i_1: nat): IF i_1 <= k THEN GP(k-i_1) ELSE 0 ENDIF)")
       (("1"
         (name "zizzy" "LAMBDA (ij:nat): 6^ij")
         (name "FG" "Dizzy*zizzy")
         (name "ii" "sigma(0,k,FG)")
         (case "ii < 6^(k+1)")
         (("1"
           (inst + "ii")
           (("1"
             (invoke (case "NOT %1") (! 1 1))
             (("1"
               (hide 2)
               (skeep)
               (expand "base_6_seq")
               (lemma "base_n_unique")
               (inst - "k" "6" "Dizzy")
               (("1"
                 (assert)
                 (inst - "k-j")
                 (("1"
                   (assert)
                   (expand "FG" -3)
                   (expand "zizzy" -3)
                   (assert)
                   (expand "*")
                   (replace -3)
                   (lift-if)
                   (ground)
                   (replaces -2 :dir rl)
                   (expand "Dizzy" 1)
                   (assert))
                  ("2" (assert))))
                ("2" (hide-all-but 1) (expand "Dizzy") (grind))))
              ("2"
               (replace -1)
               (expand "base_6_seq" 1)
               (decompose-equality 1)
               (("1"
                 (lift-if)
                 (ground)
                 (lemma "base_n_unique")
                 (inst - "k" "6" "Dizzy")
                 (("1"
                   (assert)
                   (inst - "k-x!1")
                   (assert)
                   (expand "FG" -5)
                   (expand "zizzy" -5)
                   (expand "*")
                   (replace -5)
                   (replaces -1 :dir rl)
                   (expand "Dizzy" 1)
                   (propax))
                  ("2" (skosimp*) (expand "Dizzy" 1) (grind))))
                ("2"
                 (reveal "hydrolem")
                 (inst?)
                 (("1" (flatten) (assert))
                  ("2"
                   (hide 2)
                   (skosimp*)
                   (expand "FG" 1)
                   (expand "*" 1)
                   (expand "Dizzy" 1)
                   (expand "zizzy" 1)
                   (lift-if)
                   (ground))))
                ("3" (skosimp*) (assert))))
              ("3"
               (hide 2)
               (reveal "hydrolem")
               (inst?)
               (("1" (assert) (flatten) (assert))
                ("2"
                 (hide 2)
                 (skosimp*)
                 (expand "FG" 1)
                 (expand "*" 1)
                 (expand "Dizzy" 1)
                 (expand "zizzy" 1)
                 (lift-if)
                 (ground))))))
            ("2"
             (assert)
             (reveal "hydrolem")
             (inst?)
             (("1" (assert) (flatten) (assert))
              ("2"
               (hide 2)
               (skosimp*)
               (expand "FG" 1)
               (expand "*" 1)
               (expand "Dizzy" 1)
               (expand "zizzy" 1)
               (lift-if)
               (ground))))))
          ("2"
           (hide 2)
           (lemma "sigma_le")
           (inst - "FG" "LAMBDA (s:nat): 6^s*5" "k" "0")
           (assert)
           (split -1)
           (("1"
             (case "sigma(0, k, LAMBDA (s: nat): 5 * 6 ^ s) < 6^(1+k)")
             (("1" (assert))
              ("2"
               (hide-all-but 1)
               (rewrite "sigma_scal")
               (rewrite "sigma_geometric")
               (rewrite "expt_x0")
               (assert))))
            ("2"
             (skeep)
             (expand "FG" 1)
             (expand "*" 1)
             (expand "zizzy" 1)
             (expand "Dizzy" 1)
             (typepred "GP(k-n)")
             (mult-by -2 "6^n")
             (assert))))))
        ("2" (skosimp*) (assert))))))
    ("2" (hide 2) (skosimp*) (grind))))


proof_type: f_proof
decl_type: formula
library: Tarski
theory: poly_families
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (lemma "sig_seq_base_6_onto")
   (inst - "LAMBDA (jj:nat): IF jj<=k THEN RelF(k-jj) ELSE 0 ENDIF" "k")
   (("1"
     (skeep)
     (inst + "i")
     (assert)
     (split 1)
     (("1"
       (skeep)
       (case "j<=k")
       (("1"
         (inst - "k-j")
         (("1" (expand "base_6_seq") (propax)) ("2" (assert))))
        ("2"
         (assert)
         (lemma "base_n_0")
         (inst?)
         (assert)
         (lemma "both_sides_expt_gt1_le_aux")
         (inst - "6" "k" "j-1")
         (assert)
         (expand "^")
         (assert)
         (typepred "i")
         (expand "^")
         (assert))))
      ("2"
       (decompose-equality +)
       (decompose-equality -)
       (inst - "k-x!1")
       (("1"
         (assert)
         (lift-if)
         (assert)
         (ground)
         (("1" (expand "sig_seq") (expand "base_6_seq") (propax))
          ("2"
           (expand "sig_seq")
           (lemma "base_n_0")
           (inst?)
           (assert)
           (typepred "i")
           (case "6^(1+k)<=6^x!1")
           (("1" (assert) (replace -3) (expand "sig") (propax))
            ("2"
             (lemma "both_sides_expt_gt1_le_aux")
             (expand "^" 1)
             (inst - "6" "k" "x!1-1")
             (assert))))))
        ("2"
         (assert)
         (typepred "i")
         (lemma "base_n_0")
         (inst - "6" "i" "x!1")
         (assert)
         (split -)
         (("1" (expand "sig_seq") (replaces -1) (expand "sig") (propax))
          ("2"
           (assert)
           (case "6^(1+k)<=6^x!1")
           (("1" (assert))
            ("2"
             (lemma "both_sides_expt_gt1_le_aux")
             (inst - "6" "k" "x!1-1")
             (assert)
             (expand "^")
             (propax))))))))))
    ("2" (hide 2) (skosimp*) (assert))))


proof_type: f_proof
decl_type: formula
library: Tarski
theory: poly_families
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (expand "base_3_seq")
   (lemma "base_n_is_n")
   (inst - "3" "i")
   (lemma "base_n_is_n")
   (inst - "3" "j")
   (case "NOT FORALL (d:nat): d<3^(k+1) IMPLIES upper_index(3,d)<=k")
   (("1"
     (hide-all-but 1)
     (skeep)
     (expand "upper_index")
     (lift-if)
     (ground)
     (lemma "log_nat_bounds")
     (inst?)
     (assert)
     (flatten)
     (name "rp" "log_nat(d,3)`1")
     (replace -1)
     (case "NOT 3^rp<3^(1+k)")
     (("1" (assert))
      ("2"
       (lemma "both_sides_expt_gt1_lt_aux")
       (inst - "3" "rp-1" "k")
       (("1" (expand "^" -2) (assert)) ("2" (assert))))))
    ("2"
     (inst-cp - "i")
     (inst - "j")
     (assert)
     (case "NOT j=sigma(0, k, LAMBDA (s: nat): 3 ^ s * base_n(3, j)(s))")
     (("1"
       (lemma "sigma_split")
       (inst?)
       (inst - "upper_index(3,j)")
       (assert)
       (replaces -1)
       (replace -3 + :dir rl)
       (assert)
       (rewrite "sigma_restrict_eq_0" 1)
       (skosimp*)
       (lemma "upper_is_bound")
       (inst - "3" "j" "i!1")
       (assert))
      ("2"
       (case "NOT i=sigma(0, k, LAMBDA (s: nat): 3 ^ s * base_n(3, i)(s))")
       (("1"
         (lemma "sigma_split")
         (inst?)
         (inst - "upper_index(3,i)")
         (assert)
         (replace -1)
         (replace -6 :dir rl)
         (assert)
         (rewrite "sigma_restrict_eq_0" 1)
         (skosimp*)
         (lemma "upper_is_bound")
         (inst - "3" "i" "i!1")
         (assert))
        ("2"
         (replaces -1 +)
         (replaces -1 +)
         (rewrite "sigma_eq" 1)
         (hide 2)
         (skosimp*)
         (decompose-equality -)
         (inst - "k-n!1")
         (assert))))))))


proof_type: f_proof
decl_type: formula
library: Tarski
theory: poly_families
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (lemma "base_3_seq_unique")
   (inst - "k" "i" "j")
   (assert)
   (flatten)
   (decompose-equality +)
   (expand "base_3_seq")
   (lift-if)
   (ground))


proof_type: f_proof
decl_type: formula
library: Tarski
theory: poly_families
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (induct "k")
   (("1" (skeep) (inst - "0") (expand "union_upto") (propax))
    ("2"
     (skolem 1 "k")
     (flatten)
     (skeep)
     (inst - "setseq")
     (split -)
     (("1"
       (expand "union_upto" +)
       (lemma "finite_union[real]")
       (inst?)
       (inst - "1+k"))
      ("2" (skeep) (inst - "i"))))))


proof_type: f_proof
decl_type: formula
library: Tarski
theory: poly_families
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (induct "k")
   (("1" (grind))
    ("2"
     (skolem 1 "k")
     (flatten)
     (skeep)
     (inst - "setseq")
     (assert)
     (replace -2)
     (split -)
     (("1"
       (expand "union_upto" +)
       (rewrite "card_disj_union")
       (("1" (expand "sigma" +) (propax))
        ("2"
         (hide 2)
         (expand "disjoint?")
         (expand "empty?")
         (expand "member")
         (expand "intersection")
         (expand "member")
         (skeep)
         (typepred "union_upto(k,setseq)")
         (inst - "x")
         (assert)
         (skeep)
         (inst - "1+k" "i")
         (assert)
         (inst -7 "x")
         (assert))
        ("3" (inst - "1+k"))))
      ("2"
       (lemma "finite_subset[real]")
       (inst - "union_upto(1+k,setseq)" "union_upto(k,setseq)")
       (assert)
       (expand "subset?" 1)
       (expand "member")
       (skeep)
       (typepred "union_upto(k,setseq)")
       (inst - "x")
       (assert)
       (skeep)
       (typepred "union_upto(1+k,setseq)")
       (inst - "x")
       (assert)
       (inst + "i"))
      ("3" (propax))))
    ("3" (hide 2) (skeep))))


proof_type: f_proof
decl_type: formula
library: Tarski
theory: poly_families
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (name "SS1"
         "LAMBDA (j:nat): IF j<=3^(k+1)-1 AND sign_prod(k, GP, sig_seq(base_n(3, j))) = 1 THEN Sol(k, a, n, GF, KF, sig_seq(base_n(3, j))) ELSE emptyset[real] ENDIF")
   (("1"
     (name "SS2"
           "LAMBDA (j:nat): IF j<=3^(k+1)-1 AND sign_prod(k, GP, sig_seq(base_n(3, j))) = -1 THEN Sol(k, a, n, GF, KF, sig_seq(base_n(3, j))) ELSE emptyset[real] ENDIF")
     (("1"
       (case "FORALL (j:nat): is_finite[real](SS1(j))")
       (("1"
         (case "FORALL (j:nat): is_finite[real](SS2(j))")
         (("1"
           (name "FF1" "LAMBDA (i:nat): card[real](SS1(i))")
           (name "FF2" "LAMBDA (i:nat): card[real](SS2(i))")
           (case "NOT (sigma(0,3^(k+1)-1,LAMBDA (i: nat):
                                                                                                   sign_prod(k, GP, sig_seq(base_n(3, i))) *
                                                                                                    NSol(k, a, n, GF, KF, sig_seq(base_n(3, i)))) = (sigma(0,3^(k+1)-1,FF1-FF2)))
                                                              				      ")
           (("1"
             (hide 3)
             (rewrite "sigma_eq")
             (hide 2)
             (skolem 1 "x!1")
             (typepred "x!1")
             (name "SP" "sign_prod(k, GP, sig_seq(base_n(3, x!1)))")
             (case "NOT (SP = -1 OR SP = 0 OR SP = 1)")
             (("1" (flatten) (assert))
              ("2"
               (replaces -2 :dir rl)
               (split -)
               (("1"
                 (replace -1)
                 (expand "FF1" 1)
                 (expand "FF2" +)
                 (expand "SS1" 1)
                 (assert)
                 (rewrite "card_emptyset")
                 (expand "SS2" 1)
                 (expand "NSol" 1)
                 (rewrite "card_emptyset")
                 (assert)
                 (expand "-")
                 (assert))
                ("2"
                 (expand "-")
                 (replace -1)
                 (assert)
                 (expand "FF1" +)
                 (expand "FF2" +)
                 (expand "SS1" +)
                 (expand "SS2" +)
                 (assert))
                ("3"
                 (expand "-")
                 (replace -1)
                 (expand "FF1" +)
                 (expand "FF2" +)
                 (expand "SS1" +)
                 (expand "SS2" +)
                 (assert)
                 (rewrite "card_emptyset")
                 (assert)
                 (expand "NSol" 1)
                 (assert))))))
            ("2"
             (replace -1)
             (assert)
             (expand "TQ_fam")
             (typepred "prod_polynomials_list(GF, KF, GP, k)")
             (hide -1)
             (replace -1)
             (case "NOT (LAMBDA (i):
                                                                                                            IF i <= sigma(0, k, KF * GP)
                                                                                                              THEN nth(prod_polynomials_list(GF, KF, GP, k), i)
                                                                                                            ELSE 0
                                                                                                            ENDIF) = prod_polynomials(GF, KF, GP, k)")
             (("1"
               (decompose-equality 1)
               (("1"
                 (decompose-equality -2)
                 (inst - "x!1")
                 (assert)
                 (lift-if)
                 (ground)
                 (replace -3 :dir rl)
                 (case "FORALL (ab1,ab2:int): ab1<ab2 IMPLIES ab1<=ab2-1")
                 (("1" (inst?) (assert)) ("2" (hide-all-but 1) (grind))))
                ("2" (skosimp*) (assert))))
              ("2"
               (replace -1)
               (hide -1)
               (hide -1)
               (hide -1)
               (rewrite "TQ_def" +)
               (("1"
                 (expand "-" +)
                 (rewrite "sigma_minus" :dir rl)
                 (assert)
                 (case "NOT FORALL (aa1,aa2,aa3,aa4:real): aa1=aa3 AND aa2=aa4 IMPLIES aa1-aa2=aa3-aa4")
                 (("1" (skeep) (assert))
                  ("2"
                   (rewrite -1)
                   (("1"
                     (hide (-1 -2 3))
                     (lemma "real_set_disj_union_cards")
                     (expand "FF1" +)
                     (inst?)
                     (("1"
                       (assert)
                       (split -)
                       (("1"
                         (replaces -1 :dir rl)
                         (expand "NSol" +)
                         (case "Sol(a, n, prod_polynomials(GF, KF, GP, k), sigma(0, k, KF * GP),
                                                                                                                                                                                                    >)
                                                                                                                                                                                            = union_upto(3^(k+1) - 1, SS1)")
                         (("1" (assert))
                          ("2"
                           (hide 2)
                           (hide (-1 -2 -3 -4 -5 -6))
                           (decompose-equality +)
                           (("1"
                             (iff)
                             (typepred "union_upto(3^(k+1)-1,SS1)")
                             (("1"
                               (inst?)
                               (replaces -1)
                               (expand "Sol")
                               (expand "SS1")
                               (expand "emptyset")
                               (assert)
                               (ground)
                               (("1"
                                 (lemma "sign_ext_prod_polynomials")
                                 (inst?)
                                 (assert)
                                 (lemma "sig_seq_base_3_onto_2")
                                 (name
                                  "RelFF"
                                  "LAMBDA (i:nat): sign_ext(polynomial(GF(i),KF(i))(x!1))")
                                 (inst - "RelFF" "k")
                                 (("1"
                                   (assert)
                                   (skeep -2)
                                   (inst + "i")
                                   (("1"
                                     (split 1)
                                     (("1"
                                       (flatten)
                                       (replace -3)
                                       (expand "Sol" +)
                                       (skosimp*)
                                       (expand "RelFF" +)
                                       (assert)
                                       (expand "sign_ext")
                                       (lift-if)
                                       (assert))
                                      ("2"
                                       (lemma
                                        "sign_ext_prod_polynomials")
                                       (inst?)
                                       (assert)
                                       (skoletin -1)
                                       (replaces -2 :dir rl)
                                       (replaces -2)
                                       (replace -2)
                                       (expand "sign_ext" -1 1)
                                       (assert)
                                       (replace -1 +)
                                       (rewrite "sign_prod_eq")
                                       (("1"
                                         (skosimp*)
                                         (lift-if)
                                         (ground))
                                        ("2"
                                         (hide-all-but 1)
                                         (expand "RelFF")
                                         (grind
                                          :exclude
                                          "polynomial"))))))
                                    ("2"
                                     (typepred "i")
                                     (case
                                      "FORALL (ig1,ig2:int): ig1<ig2 IMPLIES ig1<=ig2-1")
                                     (("1" (inst?) (assert))
                                      ("2" (hide-all-but 1) (grind))))))
                                  ("2"
                                   (hide-all-but 1)
                                   (expand "RelFF")
                                   (grind :exclude "polynomial"))))
                                ("2"
                                 (skosimp*)
                                 (ground)
                                 (expand "Sol")
                                 (propax))
                                ("3"
                                 (skosimp*)
                                 (ground)
                                 (lemma "sign_ext_prod_polynomials")
                                 (inst?)
                                 (assert)
                                 (copy -3)
                                 (expand "Sol" -1)
                                 (flatten)
                                 (assert)
                                 (lemma "sign_prod_eq")
                                 (inst
                                  -
                                  "GP"
                                  "LAMBDA (i: nat): sign_ext(polynomial(GF(i), KF(i))(x!1))"
                                  "sig_seq(base_n(3, i!1))"
                                  "k")
                                 (("1"
                                   (split -1)
                                   (("1"
                                     (replaces -1)
                                     (expand "sign_ext" -3)
                                     (lift-if)
                                     (ground))
                                    ("2"
                                     (hide 2)
                                     (skosimp*)
                                     (inst - "i!2")
                                     (assert)
                                     (assert)
                                     (expand "sign_ext")
                                     (lift-if)
                                     (ground))))
                                  ("2"
                                   (hide -2)
                                   (hide-all-but 1)
                                   (skeep)
                                   (grind :exclude "polynomial"))))))
                              ("2"
                               (lemma "posreal_expt")
                               (inst - "k" "3")
                               (case "FORALL (m:posnat): m-1>=0")
                               (("1" (inst?)) ("2" (assert))))))
                            ("2"
                             (case "FORALL (m:posnat): m-1>=0")
                             (("1" (inst?)) ("2" (assert))))
                            ("3"
                             (expand "sigma" +)
                             (expand "*" +)
                             (assert))))
                          ("3"
                           (case "FORALL (m:posnat): m-1>=0")
                           (("1" (inst?)) ("2" (assert))))
                          ("4"
                           (hide-all-but 1)
                           (expand "sigma")
                           (expand "*")
                           (assert))))
                        ("2"
                         (rewrite "union_upto_finite")
                         (case "FORALL (m:posnat): m-1>=0")
                         (("1" (inst?)) ("2" (assert))))
                        ("3"
                         (hide 2)
                         (hide -)
                         (skeep)
                         (expand "disjoint?")
                         (expand "intersection")
                         (expand "empty?")
                         (expand "member")
                         (skosimp*)
                         (expand "SS1")
                         (expand "emptyset")
                         (assert)
                         (ground)
                         (lemma "base_n_3_seq_unique")
                         (inst - "k" "i" "j")
                         (assert)
                         (flatten)
                         (decompose-equality 1)
                         (name "kp" "x!2")
                         (replaces -1)
                         (assert)
                         (case "NOT sig_seq(base_n(3, j))/=sig_seq(base_n(3, i))")
                         (("1"
                           (assert)
                           (flatten)
                           (decompose-equality -1)
                           (expand "sig_seq" -1)
                           (inst - "kp")
                           (lemma "base_n_lt_n")
                           (inst-cp - "3" "i" "kp")
                           (inst-cp - "3" "j" "kp")
                           (expand "sig")
                           (lift-if)
                           (lift-if)
                           (lift-if)
                           (lift-if)
                           (ground))
                          ("2"
                           (flatten)
                           (hide 2)
                           (decompose-equality 1)
                           (name "RV" "x!3")
                           (replaces -1)
                           (case "RV >k")
                           (("1"
                             (expand "sig_seq" +)
                             (lemma "base_n_0")
                             (inst - "3" "j" "RV")
                             (assert)
                             (case "FORALL (dd:nat): dd<=3^(1+k)-1 IMPLIES dd<3^RV")
                             (("1"
                               (inst-cp - "i")
                               (inst - "j")
                               (lemma "base_n_0")
                               (inst - "3" "i" "RV")
                               (assert)
                               (assert))
                              ("2"
                               (hide-all-but (-2 1))
                               (skeep)
                               (case "3^(1+k)<=3^RV")
                               (("1" (assert))
                                ("2"
                                 (lemma "both_sides_expt_gt1_le_aux")
                                 (inst - "3" "k" "RV-1")
                                 (assert)
                                 (expand "^")
                                 (propax))))))
                            ("2"
                             (expand "Sol")
                             (flatten)
                             (inst - "RV")
                             (inst - "RV")
                             (assert)
                             (ground))))))))
                      ("2"
                       (assert)
                       (case "FORALL (m:posnat): m-1>=0")
                       (("1" (inst?)) ("2" (assert))))))
                    ("2"
                     (hide (-1 -2 3))
                     (lemma "real_set_disj_union_cards")
                     (expand "FF2" +)
                     (inst?)
                     (("1"
                       (assert)
                       (split -)
                       (("1"
                         (replaces -1 :dir rl)
                         (expand "NSol" +)
                         (case "Sol(a, n, prod_polynomials(GF, KF, GP, k), sigma(0, k, KF * GP),
                                                                                                                         <)
                                                                                                                 = union_upto(3^(k+1) - 1, SS2)")
                         (("1" (assert))
                          ("2"
                           (hide 2)
                           (hide (-1 -2 -3 -4 -5 -6))
                           (decompose-equality +)
                           (("1"
                             (iff)
                             (typepred "union_upto(3^(k+1)-1,SS2)")
                             (("1"
                               (inst?)
                               (replaces -1)
                               (expand "Sol")
                               (expand "SS2")
                               (expand "emptyset")
                               (assert)
                               (ground)
                               (("1"
                                 (lemma "sign_ext_prod_polynomials")
                                 (inst?)
                                 (assert)
                                 (lemma "sig_seq_base_3_onto_2")
                                 (name
                                  "RelFF"
                                  "LAMBDA (i:nat): sign_ext(polynomial(GF(i),KF(i))(x!1))")
                                 (inst - "RelFF" "k")
                                 (("1"
                                   (assert)
                                   (skeep -2)
                                   (inst + "i")
                                   (("1"
                                     (split 1)
                                     (("1"
                                       (flatten)
                                       (replace -3)
                                       (expand "Sol" +)
                                       (skosimp*)
                                       (expand "RelFF" +)
                                       (assert)
                                       (expand "sign_ext")
                                       (lift-if)
                                       (assert))
                                      ("2"
                                       (lemma
                                        "sign_ext_prod_polynomials")
                                       (inst?)
                                       (assert)
                                       (skoletin -1)
                                       (replaces -2 :dir rl)
                                       (replaces -2)
                                       (replace -2)
                                       (expand "sign_ext" -1 1)
                                       (assert)
                                       (replace -1 +)
                                       (rewrite "sign_prod_eq")
                                       (("1"
                                         (skosimp*)
                                         (lift-if)
                                         (ground))
                                        ("2"
                                         (hide-all-but 1)
                                         (expand "RelFF")
                                         (grind
                                          :exclude
                                          "polynomial"))))))
                                    ("2"
                                     (assert)
                                     (typepred "i")
                                     (case
                                      "FORALL (ig1,ig2:int): ig1<ig2 IMPLIES ig1<=ig2-1")
                                     (("1" (inst?) (assert))
                                      ("2" (hide-all-but 1) (grind))))))
                                  ("2"
                                   (hide-all-but 1)
                                   (expand "RelFF")
                                   (grind :exclude "polynomial"))))
                                ("2"
                                 (skosimp*)
                                 (ground)
                                 (expand "Sol")
                                 (propax))
                                ("3"
                                 (skosimp*)
                                 (ground)
                                 (lemma "sign_ext_prod_polynomials")
                                 (inst?)
                                 (assert)
                                 (copy -3)
                                 (expand "Sol" -1)
                                 (flatten)
                                 (assert)
                                 (lemma "sign_prod_eq")
                                 (inst
                                  -
                                  "GP"
                                  "LAMBDA (i: nat): sign_ext(polynomial(GF(i), KF(i))(x!1))"
                                  "sig_seq(base_n(3, i!1))"
                                  "k")
                                 (("1"
                                   (split -1)
                                   (("1"
                                     (replaces -1)
                                     (expand "sign_ext" -3)
                                     (lift-if)
                                     (ground))
                                    ("2"
                                     (hide 2)
                                     (skosimp*)
                                     (inst - "i!2")
                                     (assert)
                                     (expand "sign_ext")
                                     (lift-if)
                                     (ground))))
                                  ("2"
                                   (hide -2)
                                   (hide-all-but 1)
                                   (skeep)
                                   (grind :exclude "polynomial"))))))
                              ("2"
                               (lemma "posreal_expt")
                               (inst - "k" "3")
                               (case "FORALL (m:posnat): m-1>=0")
                               (("1" (inst?)) ("2" (assert))))))
                            ("2"
                             (expand "sigma" +)
                             (expand "*" +)
                             (assert)
                             (case "FORALL (m:posnat): m-1>=0")
                             (("1" (inst?)) ("2" (assert))))
                            ("3"
                             (hide-all-but 1)
                             (expand "sigma")
                             (expand "*")
                             (assert))))
                          ("3"
                           (case "FORALL (m:posnat): m-1>=0")
                           (("1" (inst?)) ("2" (assert))))
                          ("4"
                           (hide-all-but 1)
                           (expand "sigma")
                           (expand "*")
                           (assert))))
                        ("2"
                         (rewrite "union_upto_finite")
                         (case "FORALL (m:posnat): m-1>=0")
                         (("1" (inst?)) ("2" (assert))))
                        ("3"
                         (hide 2)
                         (hide -)
                         (skeep)
                         (expand "disjoint?")
                         (expand "intersection")
                         (expand "empty?")
                         (expand "member")
                         (skosimp*)
                         (expand "SS2")
                         (expand "emptyset")
                         (assert)
                         (ground)
                         (lemma "base_n_3_seq_unique")
                         (inst - "k" "i" "j")
                         (assert)
                         (flatten)
                         (decompose-equality 1)
                         (name "kp" "x!2")
                         (replaces -1)
                         (case "kp>k")
                         (("1"
                           (lemma "base_n_0")
                           (inst-cp - "3" "i" "kp")
                           (inst - "3" "j" "kp")
                           (assert)
                           (case "3^(1+k)<=3^kp")
                           (("1" (assert))
                            ("2"
                             (hide-all-but (-3 1))
                             (lemma "both_sides_expt_gt1_le_aux")
                             (inst - "3" "k" "kp-1")
                             (assert)
                             (expand "^")
                             (propax))))
                          ("2"
                           (assert)
                           (case "NOT sig_seq(base_n(3, j))/=sig_seq(base_n(3, i))")
                           (("1"
                             (assert)
                             (flatten)
                             (decompose-equality -1)
                             (expand "sig_seq" -1)
                             (expand "sig" -1)
                             (inst - "kp")
                             (lemma "base_n_lt_n")
                             (inst - "3" "j" "kp")
                             (lemma "base_n_lt_n")
                             (inst - "3" "i" "kp")
                             (lift-if)
                             (lift-if)
                             (lift-if)
                             (lift-if)
                             (ground))
                            ("2"
                             (hide 2)
                             (flatten)
                             (decompose-equality 1)
                             (name "RV" "x!3")
                             (replaces -1)
                             (case "RV >k")
                             (("1"
                               (expand "sig_seq" +)
                               (assert)
                               (case "FORALL (ij:nat): ij<=3^(1+k)-1 IMPLIES base_n(3,ij)(RV)=0")
                               (("1"
                                 (inst-cp - "i")
                                 (inst - "j")
                                 (assert))
                                ("2"
                                 (hide-all-but (-1 1))
                                 (skeep)
                                 (lemma "base_n_0")
                                 (inst?)
                                 (assert)
                                 (lemma "both_sides_expt_gt1_le_aux")
                                 (inst - "3" "k" "RV-1")
                                 (expand "^")
                                 (assert))))
                              ("2"
                               (expand "Sol")
                               (flatten)
                               (inst - "RV")
                               (inst - "RV")
                               (assert)
                               (ground))))))))))
                      ("2"
                       (assert)
                       (case "FORALL (m:posnat): m-1>=0")
                       (("1" (inst?)) ("2" (assert))))))
                    ("3" (expand "sigma" 1) (expand "*") (assert))))))
                ("2"
                 (typepred "prod_polynomials(GF,KF,GP,k)")
                 (split -)
                 (("1" (propax)) ("2" (skeep) (inst -13 "i") (assert))))
                ("3" (hide-all-but 1) (expand "*") (assert))))
              ("3" (skeep) (assert))))
            ("3"
             (skeep)
             (skeep)
             (lemma "base_n_lt_n")
             (inst?)
             (assert))))
          ("2" (skeep) (expand "SS2" 1) (propax))))
        ("2" (skeep) (expand "SS1" 1) (propax))))
      ("2" (skosimp*) (lemma "base_n_lt_n") (inst?) (assert))
      ("3" (skosimp*) (lemma "base_n_lt_n") (inst?) (assert))))
    ("2" (skosimp*) (lemma "base_n_lt_n") (inst?) (assert))
    ("3" (skosimp*) (lemma "base_n_lt_n") (inst?) (assert))))


proof_type: f_proof
decl_type: formula
library: Tarski
theory: poly_families
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (expand "split_base6")
   (typepred "split_index_fun(base6_pairs(k), n - 1)")
   (inst - "i")
   (replaces -1)
   (expand "split_index_fun_entry" +)
   (expand "base6_pairs")
   (expand "fun_to_pairsfun")
   (propax))


proof_type: f_proof
decl_type: formula
library: Tarski
theory: poly_families
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (name "SS1"
         "LAMBDA (j:nat): IF j<=6^(k+1)-1 AND sign_prod_coeff6(k,GP,j) = 1 THEN Sol(k, a, n, GF, KF, sig_seq(base_n(6, j))) ELSE emptyset[real] ENDIF")
   (("1"
     (name "SS2"
           "LAMBDA (j:nat): IF j<=6^(k+1)-1 AND sign_prod_coeff6(k,GP,j) = -1 THEN Sol(k, a, n, GF, KF, sig_seq(base_n(6, j))) ELSE emptyset[real] ENDIF")
     (("1"
       (case "FORALL (j:nat): is_finite[real](SS1(j))")
       (("1"
         (case "FORALL (j:nat): is_finite[real](SS2(j))")
         (("1"
           (name "FF1" "LAMBDA (i:nat): card[real](SS1(i))")
           (name "FF2" "LAMBDA (i:nat): card[real](SS2(i))")
           (case "NOT (sigma(0, 6 ^ (k + 1) - 1,
                                                                                          LAMBDA (i: nat):
                                                                                            sign_prod_coeff6(k, GP, i) * NSol_seq6(k, a, n, GF, KF)(i)) = sigma(0,6^(k+1)-1,FF1-FF2))")
           (("1"
             (hide 3)
             (rewrite "sigma_eq")
             (hide 2)
             (skolem 1 "x!1")
             (typepred "x!1")
             (name "SP" "sign_prod_coeff6(k, GP, x!1)")
             (case "NOT (SP = -1 OR SP = 0 OR SP = 1)")
             (("1" (flatten) (assert))
              ("2"
               (replaces -2 :dir rl)
               (split -)
               (("1"
                 (replace -1)
                 (expand "FF1" 1)
                 (expand "FF2" +)
                 (expand "-")
                 (expand "SS1" 1)
                 (lift-if)
                 (ground)
                 (rewrite "card_emptyset")
                 (expand "SS2" +)
                 (expand "NSol_seq6")
                 (lift-if)
                 (assert)
                 (ground)
                 (("1"
                   (expand "sign_prod_coeff6" -2)
                   (replace -1)
                   (assert))
                  ("2" (expand "NSol") (assert))))
                ("2"
                 (expand "-")
                 (replace -1)
                 (assert)
                 (expand "FF1" +)
                 (expand "FF2" +)
                 (expand "SS1" +)
                 (expand "SS2" +)
                 (assert))
                ("3"
                 (expand "-")
                 (replace -1)
                 (expand "FF1" +)
                 (expand "FF2" +)
                 (expand "SS1" +)
                 (expand "SS2" +)
                 (assert)
                 (rewrite "card_emptyset")
                 (assert)
                 (expand "NSol_seq6")
                 (copy -1)
                 (expand "sign_prod_coeff6" -1)
                 (lift-if)
                 (ground)
                 (expand "NSol")
                 (assert))))))
            ("2"
             (replace -1)
             (assert)
             (expand "TQ_fam")
             (typepred "prod_polynomials_list(GF, KF, GP, k)")
             (hide -1)
             (replace -1)
             (case "NOT (LAMBDA (i):
                                                                                                                                                                                             IF i <= sigma(0, k, KF * GP)
                                                                                                                                                                                               THEN nth(prod_polynomials_list(GF, KF, GP, k), i)
                                                                                                                                                                                             ELSE 0
                                                                                                                                                                                             ENDIF) = prod_polynomials(GF, KF, GP, k)")
             (("1"
               (decompose-equality 1)
               (("1"
                 (decompose-equality -2)
                 (inst - "x!1")
                 (assert)
                 (lift-if)
                 (ground)
                 (replace -3 :dir rl)
                 (case "FORALL (ab1,ab2:int): ab1<ab2 IMPLIES ab1<=ab2-1")
                 (("1" (inst?) (assert)) ("2" (hide-all-but 1) (grind))))
                ("2" (skosimp*) (assert))))
              ("2"
               (replace -1)
               (hide -1)
               (hide -1)
               (hide -1)
               (rewrite "TQ_def" +)
               (("1"
                 (expand "-" +)
                 (rewrite "sigma_minus" :dir rl)
                 (assert)
                 (case "NOT FORALL (aa1,aa2,aa3,aa4:real): aa1=aa3 AND aa2=aa4 IMPLIES aa1-aa2=aa3-aa4")
                 (("1" (skeep) (assert))
                  ("2"
                   (rewrite -1)
                   (("1"
                     (hide (-1 -2 3))
                     (lemma "real_set_disj_union_cards")
                     (expand "FF1" +)
                     (inst?)
                     (("1"
                       (assert)
                       (split -)
                       (("1"
                         (replaces -1 :dir rl)
                         (expand "NSol" +)
                         (case "Sol(a, n, prod_polynomials(GF, KF, GP, k), sigma(0, k, KF * GP),
                                                                                                                                                                  >)
                                                                                                                                                          = union_upto(6 ^ (1 + k) - 1, SS1)")
                         (("1" (assert))
                          ("2"
                           (hide 2)
                           (hide (-1 -2 -3 -4 -5 -6))
                           (decompose-equality +)
                           (("1"
                             (iff)
                             (typepred "union_upto(6^(k+1)-1,SS1)")
                             (("1"
                               (inst?)
                               (replaces -1)
                               (expand "Sol")
                               (expand "SS1")
                               (expand "emptyset")
                               (assert)
                               (ground)
                               (("1"
                                 (lemma "sign_ext_prod_polynomials")
                                 (inst?)
                                 (assert)
                                 (expand "sign_ext" -1 1)
                                 (expand "sign_prod_coeff6")
                                 (lemma "sig_seq_base_6_onto_2")
                                 (name
                                  "RelFF"
                                  "LAMBDA (i:nat): sign_ext(polynomial(GF(i),KF(i))(x!1))")
                                 (inst - "RelFF" "k")
                                 (("1"
                                   (assert)
                                   (skeep -2)
                                   (inst + "i")
                                   (("1"
                                     (lift-if)
                                     (assert)
                                     (split 1)
                                     (("1" (skeep) (inst - "p") (assert))
                                      ("2"
                                       (flatten)
                                       (split +)
                                       (("1"
                                         (flatten)
                                         (replace -4)
                                         (expand "Sol" +)
                                         (skosimp*)
                                         (expand "RelFF" +)
                                         (assert)
                                         (expand "sign_ext")
                                         (lift-if)
                                         (assert))
                                        ("2"
                                         (lemma
                                          "sign_ext_prod_polynomials")
                                         (inst?)
                                         (assert)
                                         (skoletin -1)
                                         (replaces -2 :dir rl)
                                         (replaces -2)
                                         (replace -3)
                                         (expand "sign_ext" -1 1)
                                         (assert)
                                         (replace -1 +)
                                         (rewrite "sign_prod_eq")
                                         (("1"
                                           (skosimp*)
                                           (lift-if)
                                           (ground))
                                          ("2"
                                           (hide-all-but 1)
                                           (expand "RelFF")
                                           (grind
                                            :exclude
                                            "polynomial"))))))))
                                    ("2"
                                     (typepred "i")
                                     (case
                                      "FORALL (ig1,ig2:int): ig1<ig2 IMPLIES ig1<=ig2-1")
                                     (("1" (inst?) (assert))
                                      ("2" (hide-all-but 1) (grind))))))
                                  ("2"
                                   (hide-all-but 1)
                                   (expand "RelFF")
                                   (grind :exclude "polynomial"))))
                                ("2"
                                 (skosimp*)
                                 (ground)
                                 (expand "Sol")
                                 (propax))
                                ("3"
                                 (skosimp*)
                                 (ground)
                                 (lemma "sign_ext_prod_polynomials")
                                 (inst?)
                                 (assert)
                                 (copy -3)
                                 (expand "Sol" -1)
                                 (flatten)
                                 (assert)
                                 (expand "sign_prod_coeff6")
                                 (lift-if)
                                 (ground)
                                 (lemma "sign_prod_eq")
                                 (inst
                                  -
                                  "GP"
                                  "LAMBDA (i: nat): sign_ext(polynomial(GF(i), KF(i))(x!1))"
                                  "sig_seq(base_n(6, i!1))"
                                  "k")
                                 (("1"
                                   (split -1)
                                   (("1"
                                     (replaces -1)
                                     (expand "sign_ext" -4)
                                     (lift-if)
                                     (ground))
                                    ("2"
                                     (hide 2)
                                     (skosimp*)
                                     (inst - "i!2")
                                     (assert)
                                     (assert)
                                     (expand "sign_ext")
                                     (lift-if)
                                     (ground))))
                                  ("2"
                                   (hide-all-but 1)
                                   (skeep)
                                   (grind :exclude "polynomial"))))))
                              ("2"
                               (lemma "posreal_expt")
                               (inst - "k" "6")
                               (case "FORALL (m:posnat): m-1>=0")
                               (("1" (inst?)) ("2" (assert))))))
                            ("2"
                             (case "FORALL (m:posnat): m-1>=0")
                             (("1" (inst?)) ("2" (assert))))
                            ("3"
                             (expand "sigma" +)
                             (expand "*" +)
                             (assert))))
                          ("3"
                           (case "FORALL (m:posnat): m-1>=0")
                           (("1" (inst?)) ("2" (assert))))
                          ("4"
                           (hide-all-but 1)
                           (expand "sigma")
                           (expand "*")
                           (assert))))
                        ("2"
                         (rewrite "union_upto_finite")
                         (case "FORALL (m:posnat): m-1>=0")
                         (("1" (inst?)) ("2" (assert))))
                        ("3"
                         (hide 2)
                         (hide -)
                         (skeep)
                         (expand "disjoint?")
                         (expand "intersection")
                         (expand "empty?")
                         (expand "member")
                         (skosimp*)
                         (expand "SS1")
                         (expand "emptyset")
                         (assert)
                         (ground)
                         (case "EXISTS (pz:nat): pz<=k AND sig_seq(base_n(6, j))(pz) /= sig_seq(base_n(6, i))(pz)")
                         (("1"
                           (skeep)
                           (expand "Sol")
                           (flatten)
                           (inst - "pz")
                           (inst - "pz")
                           (ground))
                          ("2"
                           (expand "sign_prod_coeff6")
                           (lift-if)
                           (ground)
                           (lemma "base_n_is_n_alt")
                           (inst - "6" "i" "k")
                           (lemma "base_n_is_n_alt")
                           (inst - "6" "j" "k")
                           (assert)
                           (expand "base_n_to_nat")
                           (replace -1 4)
                           (replace -2 4)
                           (rewrite "sigma_eq" 4)
                           (skosimp*)
                           (inst 4 "n!1")
                           (assert)
                           (expand "sig_seq")
                           (expand "sig" +)
                           (assert)
                           (lift-if)
                           (lift-if)
                           (lift-if)
                           (lift-if)
                           (ground)
                           (inst + "n!1")
                           (inst + "n!1")
                           (assert))))))
                      ("2"
                       (case "FORALL (m:posnat): m-1>=0")
                       (("1" (inst?)) ("2" (assert))))))
                    ("2"
                     (hide (-1 -2 3))
                     (lemma "real_set_disj_union_cards")
                     (expand "FF2" +)
                     (inst?)
                     (("1"
                       (assert)
                       (split -)
                       (("1"
                         (replaces -1 :dir rl)
                         (expand "NSol" +)
                         (case "Sol(a, n, prod_polynomials(GF, KF, GP, k), sigma(0, k, KF * GP),
                                                                           <)
                                                                   = union_upto(6 ^ (1 + k) - 1, SS2)")
                         (("1" (assert))
                          ("2"
                           (hide 2)
                           (hide (-1 -2 -3 -4 -5 -6))
                           (decompose-equality +)
                           (("1"
                             (iff)
                             (typepred "union_upto(6^(k+1)-1,SS2)")
                             (("1"
                               (inst?)
                               (replaces -1)
                               (expand "Sol")
                               (expand "SS2")
                               (expand "emptyset")
                               (assert)
                               (ground)
                               (("1"
                                 (lemma "sign_ext_prod_polynomials")
                                 (inst?)
                                 (assert)
                                 (expand "sign_ext" -1 1)
                                 (expand "sign_prod_coeff6")
                                 (lemma "sig_seq_base_6_onto_2")
                                 (name
                                  "RelFF"
                                  "LAMBDA (i:nat): sign_ext(polynomial(GF(i),KF(i))(x!1))")
                                 (inst - "RelFF" "k")
                                 (("1"
                                   (assert)
                                   (skeep -2)
                                   (inst + "i")
                                   (("1"
                                     (lift-if)
                                     (assert)
                                     (split 1)
                                     (("1" (skeep) (inst - "p") (assert))
                                      ("2"
                                       (flatten)
                                       (split +)
                                       (("1"
                                         (flatten)
                                         (replace -4)
                                         (expand "Sol" +)
                                         (skosimp*)
                                         (expand "RelFF" +)
                                         (assert)
                                         (expand "sign_ext")
                                         (lift-if)
                                         (assert))
                                        ("2"
                                         (lemma
                                          "sign_ext_prod_polynomials")
                                         (inst?)
                                         (assert)
                                         (skoletin -1)
                                         (replaces -2 :dir rl)
                                         (replaces -2)
                                         (replace -3)
                                         (expand "sign_ext" -1 1)
                                         (assert)
                                         (replace -1 +)
                                         (rewrite "sign_prod_eq")
                                         (("1"
                                           (skosimp*)
                                           (lift-if)
                                           (ground))
                                          ("2"
                                           (hide-all-but 1)
                                           (expand "RelFF")
                                           (grind
                                            :exclude
                                            "polynomial"))))))))
                                    ("2"
                                     (typepred "i")
                                     (case
                                      "FORALL (ig1,ig2:int): ig1<ig2 IMPLIES ig1<=ig2-1")
                                     (("1" (inst?) (assert))
                                      ("2" (hide-all-but 1) (grind))))))
                                  ("2"
                                   (hide-all-but 1)
                                   (expand "RelFF")
                                   (grind :exclude "polynomial"))))
                                ("2"
                                 (skosimp*)
                                 (ground)
                                 (expand "Sol")
                                 (propax))
                                ("3"
                                 (skosimp*)
                                 (ground)
                                 (lemma "sign_ext_prod_polynomials")
                                 (inst?)
                                 (assert)
                                 (copy -3)
                                 (expand "Sol" -1)
                                 (flatten)
                                 (assert)
                                 (expand "sign_prod_coeff6")
                                 (lift-if)
                                 (ground)
                                 (lemma "sign_prod_eq")
                                 (inst
                                  -
                                  "GP"
                                  "LAMBDA (i: nat): sign_ext(polynomial(GF(i), KF(i))(x!1))"
                                  "sig_seq(base_n(6, i!1))"
                                  "k")
                                 (("1"
                                   (split -1)
                                   (("1"
                                     (replaces -1)
                                     (expand "sign_ext" -4)
                                     (lift-if)
                                     (ground))
                                    ("2"
                                     (hide 2)
                                     (skosimp*)
                                     (inst - "i!2")
                                     (assert)
                                     (expand "sign_ext")
                                     (lift-if)
                                     (ground))))
                                  ("2"
                                   (hide-all-but 1)
                                   (skeep)
                                   (grind :exclude "polynomial"))))))
                              ("2"
                               (lemma "posreal_expt")
                               (inst - "k" "6")
                               (case "FORALL (m:posnat): m-1>=0")
                               (("1" (inst?)) ("2" (assert))))))
                            ("2"
                             (case "FORALL (m:posnat): m-1>=0")
                             (("1" (inst?)) ("2" (assert))))
                            ("3"
                             (expand "sigma" +)
                             (expand "*" +)
                             (assert))))
                          ("3"
                           (case "FORALL (m:posnat): m-1>=0")
                           (("1" (inst?)) ("2" (assert))))
                          ("4"
                           (hide-all-but 1)
                           (expand "sigma")
                           (expand "*")
                           (assert))))
                        ("2"
                         (rewrite "union_upto_finite")
                         (case "FORALL (m:posnat): m-1>=0")
                         (("1" (inst?)) ("2" (assert))))
                        ("3"
                         (hide 2)
                         (hide -)
                         (skeep)
                         (expand "disjoint?")
                         (expand "intersection")
                         (expand "empty?")
                         (expand "member")
                         (skosimp*)
                         (expand "SS2")
                         (expand "emptyset")
                         (assert)
                         (ground)
                         (case "EXISTS (pz:nat): pz<=k AND sig_seq(base_n(6, j))(pz) /= sig_seq(base_n(6, i))(pz)")
                         (("1"
                           (skeep)
                           (expand "Sol")
                           (flatten)
                           (inst - "pz")
                           (inst - "pz")
                           (ground))
                          ("2"
                           (expand "sign_prod_coeff6")
                           (lift-if)
                           (ground)
                           (lemma "base_n_is_n_alt")
                           (inst - "6" "i" "k")
                           (lemma "base_n_is_n_alt")
                           (inst - "6" "j" "k")
                           (assert)
                           (expand "base_n_to_nat")
                           (replace -1 4)
                           (replace -2 4)
                           (rewrite "sigma_eq" 4)
                           (skosimp*)
                           (inst 4 "n!1")
                           (assert)
                           (expand "sig_seq")
                           (expand "sig" +)
                           (assert)
                           (lift-if)
                           (lift-if)
                           (lift-if)
                           (lift-if)
                           (ground)
                           (inst + "n!1")
                           (inst + "n!1")
                           (assert))))))
                      ("2"
                       (case "FORALL (m:posnat): m-1>=0")
                       (("1" (inst?)) ("2" (assert))))))
                    ("3" (hide-all-but 1) (expand "*") (assert))))))
                ("2"
                 (typepred "prod_polynomials(GF,KF,GP,k)")
                 (split -)
                 (("1" (propax)) ("2" (skeep) (inst -13 "i") (assert))))
                ("3" (hide-all-but 1) (expand "*") (assert))))
              ("3" (skeep) (assert))))))
          ("2" (skeep) (expand "SS2" 1) (propax))))
        ("2" (skeep) (expand "SS1" 1) (propax))))
      ("2"
       (hide-all-but 1)
       (skeep)
       (skosimp*)
       (expand "sign_prod_coeff6")
       (lift-if)
       (ground)
       (inst + "x1!1")
       (("1" (assert))
        ("2"
         (assert)
         (typepred "x1!1")
         (lemma "base_n_0")
         (inst?)
         (assert)
         (lemma "both_sides_expt_gt1_le_aux")
         (inst - "6" "k" "x1!1-1")
         (assert)
         (expand "^")
         (assert))))))
    ("2"
     (hide-all-but 1)
     (skeep)
     (skosimp*)
     (expand "sign_prod_coeff6")
     (lift-if)
     (ground)
     (inst + "x1!1")
     (("1" (ground))
      ("2"
       (lemma "base_n_0")
       (inst?)
       (assert)
       (lemma "both_sides_expt_gt1_le_aux")
       (inst - "6" "k" "x1!1-1")
       (expand "^")
       (assert))))))


