# Proofs

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)
   (label "izz" -4)
   (label "isid" -3)
   (label "relz" -2)
   (label "ontoz" -1)
   (name "sigfl" "LAMBDA (i:nat): floor(i/6)")
   (name "leftover" "LAMBDA (i:nat): i-6*sigfl(i)")
   (case "NOT FORALL (i:nat): i = 6*sigfl(i)+leftover(i)")
   (("1" (hide-all-but 1) (skeep) (expand "leftover") (propax))
    ("2"
     (label "intlem" -1)
     (case "FORALL (i:nat): 0<=leftover(i) AND leftover(i)<=5")
     (("1"
       (name "vsel"
             "LAMBDA (i:nat): LAMBDA (j:nat): IF j=1 THEN v(i)`1 ELSIF j=2 THEN v(i)`2 ELSIF j=3 THEN v(i)`3 ELSIF j=4 THEN v(i)`4 ELSIF j=5 THEN v(i)`5 ELSIF j=6 THEN v(i)`6 ELSE 0 ENDIF")
       (name "sigfun" "LAMBDA (i:nat): vsel(sigfl(i))(leftover(i)+1)")
       (("1"
         (lemma "sigma_bij")
         (inst - "g" "6^(k+1)-1" "0" "sigfun")
         (assert)
         (split -)
         (("1"
           (replaces -1 +)
           (case "FORALL (pzk:nat): pzk<=6^k-1 IMPLIES sigma(pzk*6,pzk*6+5,g o sigfun)=0")
           (("1"
             (case "FORALL (pzk:nat): pzk<=6^k-1 IMPLIES sigma(0,pzk*6+5,g o sigfun)=0")
             (("1"
               (inst - "6^k-1")
               (("1"
                 (assert)
                 (expand "o")
                 (rewrite "expt_plus2" 1)
                 (rewrite "expt_x1"))
                ("2"
                 (assert)
                 (case "FORALL (pzn:posnat): pzn-1>=0")
                 (("1" (rewrite -1 1)) ("2" (assert))))))
              ("2"
               (hide 2)
               (induct "pzk")
               (("1" (assert) (flatten) (inst - "0") (assert))
                ("2"
                 (skosimp*)
                 (assert)
                 (expand "sigma" +)
                 (expand "sigma" +)
                 (expand "sigma" +)
                 (expand "sigma" +)
                 (expand "sigma" +)
                 (expand "sigma" +)
                 (replaces -1)
                 (assert)
                 (inst - "1+j!1")
                 (assert)
                 (expand "sigma" -2)
                 (expand "sigma" -2)
                 (expand "sigma" -2)
                 (expand "sigma" -2)
                 (expand "sigma" -2)
                 (expand "sigma" -2)
                 (expand "sigma" -2)
                 (propax))))))
            ("2"
             (skolem 1 "j")
             (flatten)
             (assert)
             (hide 2)
             (expand "sigma" +)
             (expand "sigma" +)
             (expand "sigma" +)
             (expand "sigma" +)
             (expand "sigma" +)
             (expand "sigma" +)
             (expand "sigma" +)
             (expand "o" 1)
             (expand "sigfun" 1)
             (case "FORALL (ii:subrange(6*j,6*j+5)): sigfl(ii) = sigfl(6*j)")
             (("1"
               (inst-cp - "6*j+1")
               (inst-cp - "6*j+2")
               (inst-cp - "6*j+3")
               (inst-cp - "6*j+4")
               (inst-cp - "6*j+5")
               (hide -1)
               (expand "leftover" +)
               (replaces -1)
               (replaces -1)
               (replaces -1)
               (replaces -1)
               (replaces -1)
               (replaces -1)
               (assert)
               (expand "vsel" +)
               (inst "izz" "sigfl(6*j)")
               (assert))
              ("2"
               (hide 2)
               (skosimp*)
               (typepred "ii!1")
               (expand "sigfl" 1)
               (assert))))))
          ("2"
           (skeep)
           (split 1)
           (("1"
             (expand "sigfun" 1)
             (expand "vsel" 1)
             (lift-if)
             (ground))
            ("2"
             (expand "sigfun" 1)
             (expand "vsel" 1)
             (inst "relz" "sigfl(i)")
             (("1"
               (assert)
               (split "relz")
               (("1" (flatten) (lift-if) (ground))
                ("2"
                 (hide 2)
                 (expand "sigfl" 1)
                 (assert)
                 (typepred "i")
                 (rewrite "expt_plus2" -2)
                 (rewrite "expt_x1")
                 (assert)
                 (case "NOT i/6<=6^k-1/6")
                 (("1" (assert))
                  ("2"
                   (lemma "floor_le")
                   (inst?)
                   (assert)
                   (lemma "floor_plus_int")
                   (inst - "6^k" "-1/6")
                   (assert)
                   (replaces -1)
                   (case "floor(-1/6)=-1")
                   (("1" (assert))
                    ("2" (hide-all-but 1) (eval-formula))))))))
              ("2" (hide 2) (expand "sigfl" 1) (assert))))))
          ("3"
           (skeep)
           (typepred "i")
           (inst "ontoz" "i")
           (assert)
           (skolem "ontoz" "jz")
           (flatten)
           (case "NOT EXISTS (o6:subrange(1,6)): i = vsel(jz)(o6)")
           (("1"
             (inst-cp + "1")
             (inst-cp + "2")
             (inst-cp + "3")
             (inst-cp + "4")
             (inst-cp + "5")
             (inst-cp + "6")
             (expand "in6?" "ontoz")
             (expand "vsel" +)
             (ground))
            ("2"
             (skeep -1)
             (name "K" "6*jz+o6-1")
             (case "K<=6^(1+k)-1")
             (("1"
               (case "NOT K>=0")
               (("1" (assert))
                ("2"
                 (assert)
                 (inst + "K")
                 (expand "sigfun" 1)
                 (case "sigfl(K) = jz AND leftover(K) = o6-1")
                 (("1" (flatten) (assert))
                  ("2"
                   (hide 2)
                   (case "NOT sigfl(K)=jz")
                   (("1"
                     (hide 2)
                     (expand "sigfl" 1)
                     (expand "K" 1)
                     (lemma "floor_plus_int")
                     (inst - "jz" "(o6-1)/6")
                     (assert))
                    ("2" (assert) (expand "leftover" 1) (assert))))))))
              ("2"
               (expand "K" 1)
               (copy "ontoz")
               (rewrite "expt_plus2" 1)
               (rewrite "expt_x1")
               (assert))))))
          ("4"
           (skeep)
           (expand "sigfun" -1)
           (inst "isid" "sigfl(i)" "sigfl(j)"
            "vsel(sigfl(j))(1 + leftover(j))")
           (("1"
             (assert)
             (case "(in6?(v(sigfl(i)), vsel(sigfl(j))(1 + leftover(j)))
                                                            AND in6?(v(sigfl(j)), vsel(sigfl(j))(1 + leftover(j))))")
             (("1"
               (flatten)
               (assert)
               (split "isid")
               (("1"
                 (case "leftover(i) = leftover(j)")
                 (("1"
                   (inst-cp "intlem" "i")
                   (inst "intlem" "j")
                   (assert))
                  ("2"
                   (case "FORALL (rd:subrange(0,5)): rd = 0 OR rd=1 OR rd=2 OR rd=3 OR rd=4 OR rd=5")
                   (("1"
                     (inst-cp - "leftover(i)")
                     (("1"
                       (inst - "leftover(j)")
                       (("1"
                         (expand "vsel" -6)
                         (expand "in6?")
                         (assert)
                         (inst-cp - "i")
                         (inst-cp - "j")
                         (flatten)
                         (assert)
                         (inst "relz" "sigfl(j)")
                         (split "relz")
                         (("1"
                           (split -2)
                           (("1"
                             (split -3)
                             (("1" (assert))
                              ("2" (assert) (flatten) (assert))
                              ("3" (assert) (flatten) (assert))
                              ("4" (assert) (flatten) (assert))
                              ("5" (assert) (flatten) (assert))
                              ("6" (assert) (flatten) (assert))))
                            ("2"
                             (flatten)
                             (assert)
                             (split -)
                             (("1" (assert)) ("2" (assert))
                              ("3" (assert)) ("4" (assert))
                              ("5" (assert))))
                            ("3"
                             (flatten)
                             (split -)
                             (("1" (assert)) ("2" (assert))
                              ("3" (assert)) ("4" (assert))
                              ("5" (assert)) ("6" (assert))))
                            ("4"
                             (flatten)
                             (split -)
                             (("1" (assert)) ("2" (assert))
                              ("3" (assert)) ("4" (assert))
                              ("5" (assert)) ("6" (assert))))
                            ("5"
                             (flatten)
                             (split -)
                             (("1" (assert)) ("2" (assert))
                              ("3" (assert)) ("4" (assert))
                              ("5" (assert)) ("6" (assert))))
                            ("6"
                             (flatten)
                             (split -)
                             (("1" (assert)) ("2" (assert))
                              ("3" (assert)) ("4" (assert))
                              ("5" (assert)) ("6" (assert))))))
                          ("2"
                           (hide (-1 -2 -3 -4 -5 -6))
                           (hide-all-but 1)
                           (typepred "j")
                           (expand "sigfl")
                           (rewrite "expt_plus2")
                           (rewrite "expt_x1")
                           (assert)
                           (lemma "floor_plus_int")
                           (inst - "6^k" "-1/6")
                           (assert)
                           (eval-expr "floor(-1/6)")
                           (assert)
                           (replaces -1)
                           (assert)
                           (lemma "floor_le")
                           (inst - "j/6" "6^k-1/6")
                           (assert))))
                        ("2"
                         (hide-all-but 1)
                         (expand "leftover")
                         (propax))))
                      ("2"
                       (hide-all-but 1)
                       (expand "leftover")
                       (propax))))
                    ("2" (eval-formula))))))
                ("2"
                 (hide-all-but 1)
                 (expand "sigfl")
                 (typepred "i")
                 (rewrite "expt_plus2")
                 (rewrite "expt_x1")
                 (lemma "floor_le")
                 (inst - "i/6" "6^k-1/6")
                 (assert)
                 (lemma "floor_plus_int")
                 (inst - "6^k" "-1/6")
                 (eval-expr "floor(-1/6)")
                 (assert))
                ("3"
                 (hide-all-but 1)
                 (expand "sigfl")
                 (typepred "j")
                 (rewrite "expt_plus2")
                 (rewrite "expt_x1")
                 (lemma "floor_le")
                 (inst - "j/6" "6^k-1/6")
                 (assert)
                 (lemma "floor_plus_int")
                 (inst - "6^k" "-1/6")
                 (eval-expr "floor(-1/6)")
                 (assert))
                ("4"
                 (assert)
                 (inst "relz" "sigfl(j)")
                 (split "relz")
                 (("1"
                   (case "FORALL (rd:subrange(0,5)): rd = 0 OR rd=1 OR rd=2 OR rd=3 OR rd=4 OR rd=5")
                   (("1"
                     (inst - "leftover(j)")
                     (("1" (expand "vsel" 1) (lift-if) (ground))
                      ("2" (inst - "j"))))
                    ("2" (hide-all-but 1) (eval-formula))))
                  ("2"
                   (hide-all-but 1)
                   (expand "sigfl")
                   (typepred "j")
                   (rewrite "expt_plus2")
                   (rewrite "expt_x1")
                   (lemma "floor_le")
                   (inst - "j/6" "6^k-1/6")
                   (assert)
                   (lemma "floor_plus_int")
                   (inst - "6^k" "-1/6")
                   (assert)
                   (eval-expr "floor(-1/6)")
                   (assert))))))
              ("2"
               (split 1)
               (("1"
                 (expand "in6?" 1)
                 (expand "vsel" 1)
                 (flatten)
                 (assert)
                 (case "FORALL (rd:subrange(0,5)): rd = 0 OR rd=1 OR rd=2 OR rd=3 OR rd=4 OR rd=5")
                 (("1"
                   (inst-cp - "leftover(j)")
                   (("1"
                     (inst - "leftover(i)")
                     (("1"
                       (copy -3)
                       (expand "vsel" -1)
                       (split -3)
                       (("1" (assert) (lift-if) (ground))
                        ("2" (assert) (lift-if) (ground))
                        ("3" (assert) (lift-if) (ground))
                        ("4" (assert) (lift-if) (ground))
                        ("5" (assert) (lift-if) (ground))
                        ("6" (assert) (lift-if) (ground))))
                      ("2" (hide (2 3 4 5 6 7)) (inst - "i"))))
                    ("2" (inst - "j"))))
                  ("2" (hide-all-but 1) (eval-formula))))
                ("2"
                 (expand "in6?" 1)
                 (flatten)
                 (case "FORALL (rd:subrange(0,5)): rd = 0 OR rd=1 OR rd=2 OR rd=3 OR rd=4 OR rd=5")
                 (("1"
                   (inst - "leftover(j)")
                   (("1" (expand "vsel" +) (ground)) ("2" (inst - "j"))))
                  ("2" (hide-all-but 1) (eval-formula))))))
              ("3" (flatten) (inst - "j") (flatten) (assert))
              ("4" (inst - "j") (assert))))
            ("2" (inst - "j") (assert)) ("3" (expand "sigfl" 1) (assert))
            ("4" (expand "sigfl" 1) (assert))))))
        ("2" (skosimp*) (expand "sigfl" 1) (assert))
        ("3" (skeep) (inst - "i") (assert))))
      ("2"
       (hide -)
       (skeep)
       (expand "leftover")
       (hide 2)
       (expand "sigfl")
       (assert)
       (split)
       (("1" (assert)) ("2" (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)
   (case "k > 0")
   (("1"
     (skolem - "key")
     (lemma "sigma_disjoinction_6")
     (inst -
      "LAMBDA (i: nat):
                                                      sign_coeff6_zero(k, TQRow, i) *
                                                       NSol_all(k, a, n, GF, KF, base_n(6, i))"
      "k" _)
     (("1"
       (name "FFG"
             "LAMBDA (i:nat): LAMBDA (j:nat): LET B6 = base_n(6,i), NS = (LAMBDA (zn:nat): IF zn<key THEN B6(zn) ELSIF zn=key THEN j ELSE B6(zn-1) ENDIF) IN base_n_to_nat(6,NS,k)")
       (("1"
         (case "FORALL (i:nat,j:upto(5)): i<=6^k-1 IMPLIES base_n(6,FFG(i)(j))(key) = j")
         (("1"
           (label "FFGlem2" -1)
           (hide "FFGlem2")
           (name "vv"
                 "LAMBDA (i:nat): (FFG(i)(0),FFG(i)(1),FFG(i)(2),FFG(i)(3),FFG(i)(4),FFG(i)(5))")
           (inst - "vv")
           (assert)
           (hide 3)
           (case "NOT FORALL (i:nat,jj:subrange(0,5)): i<=6^k-1 IMPLIES FFG(i)(jj)<=6^(k+1)-1")
           (("1"
             (hide 2)
             (hide -1)
             (hide -1)
             (hide -2)
             (skeep)
             (expand "FFG")
             (lemma "base_n_to_nat_lt")
             (inst?)
             (("1"
               (split -)
               (("1"
                 (assert)
                 (case "FORALL (iz,jz:int): iz<jz IMPLIES iz<=jz-1")
                 (("1"
                   (inst -
                    "base_n_to_nat(6,
                                                                                                                                                                           LAMBDA (zn: nat):
                                                                                                                                IF zn < key THEN base_n(6, i)(zn)
                                                                                                                                ELSIF zn = key THEN jj
                                                                                                                                ELSE base_n(6, i)(zn - 1)
                                                                                                                                ENDIF,
                                                                                                                                                                            k)"
                    "6^(1+k)")
                   (("1" (assert)) ("2" (skeep) (assert))))
                  ("2" (skeep) (assert))))
                ("2"
                 (hide 2)
                 (skosimp*)
                 (assert)
                 (lift-if)
                 (assert)
                 (ground)
                 (("1" (lemma "base_n_lt_n") (inst?))
                  ("2" (lemma "base_n_lt_n") (inst?))))))
              ("2" (skeep) (assert))))
            ("2"
             (assert)
             (name "FindI"
                   "LAMBDA (j:nat): LET NS = (LAMBDA (zn:nat): IF zn<key THEN  base_n(6,j)(zn) ELSE base_n(6,j)(zn+1) ENDIF) IN base_n_to_nat(6,NS,k-1)")
             (name "FindX" "LAMBDA(j:nat): base_n(6,j)(key)")
             (case "NOT FORALL (j:nat): j<6^(1+k) IMPLIES j = FFG(FindI(j))(FindX(j))")
             (("1"
               (hide 2)
               (skeep)
               (expand "FFG" 1)
               (lemma "base_n_is_n_alt")
               (inst - "6" "j" "k")
               (assert)
               (lemma "base_n_to_nat_eq")
               (inst?)
               (inst - "k"
                "LAMBDA (zn: nat):
                                                                                             IF zn < key THEN base_n(6, FindI(j))(zn)
                                                                                             ELSIF zn = key THEN FindX(j)
                                                                                             ELSE base_n(6, FindI(j))(zn - 1)
                                                                                             ENDIF")
               (("1"
                 (assert)
                 (hide (-1 2))
                 (skosimp*)
                 (lift-if)
                 (split +)
                 (("1"
                   (flatten)
                   (expand "FindI" 1)
                   (lemma "base_n_base_n_to_nat")
                   (inst?)
                   (assert)
                   (split -)
                   (("1" (inst - "i!1") (assert))
                    ("2"
                     (skosimp*)
                     (lift-if)
                     (ground)
                     (("1" (lemma "base_n_lt_n") (inst?))
                      ("2" (lemma "base_n_lt_n") (inst?))))))
                  ("2"
                   (flatten)
                   (assert)
                   (split +)
                   (("1"
                     (flatten)
                     (replace -1)
                     (expand "FindX" 1)
                     (propax))
                    ("2"
                     (flatten)
                     (expand "FindI" 2)
                     (lemma "base_n_base_n_to_nat")
                     (inst?)
                     (split -1)
                     (("1"
                       (inst?)
                       (("1" (replaces -1) (assert)) ("2" (assert))))
                      ("2"
                       (hide 3)
                       (skeep)
                       (lift-if)
                       (ground)
                       (("1" (lemma "base_n_lt_n") (inst?))
                        ("2" (lemma "base_n_lt_n") (inst?))))))))))
                ("2" (skeep) (assert))))
              ("2"
               (case "NOT FORALL (j:nat): j<6^(1+k) IMPLIES FindI(j)<=6^k-1")
               (("1"
                 (hide 2)
                 (skeep)
                 (expand "FindI" 1)
                 (lemma "base_n_to_nat_lt")
                 (inst?)
                 (assert)
                 (split -)
                 (("1"
                   (case "FORALL (iz,jz:int): iz<jz IMPLIES iz<=jz-1")
                   (("1" (inst?) (assert)) ("2" (skeep) (assert))))
                  ("2"
                   (hide-all-but 1)
                   (skeep)
                   (lift-if)
                   (ground)
                   (("1" (lemma "base_n_lt_n") (inst?))
                    ("2" (lemma "base_n_lt_n") (inst?))))))
                ("2"
                 (assert)
                 (case "NOT FORALL (j:nat): FindX(j) = 0 OR FindX(j)=1 OR FindX(j)=2 OR FindX(j)=3 OR FindX(j)=4 OR FindX(j)=5")
                 (("1"
                   (hide 2)
                   (skeep)
                   (expand "FindX" +)
                   (lemma "base_n_lt_n")
                   (inst?)
                   (assert))
                  ("2"
                   (label "fxlem" -1)
                   (invoke (case "NOT %1") (! 1 1))
                   (("1"
                     (hide 2)
                     (skeep)
                     (inst + "FindI(j)")
                     (inst - "j")
                     (inst - "j")
                     (assert)
                     (assert)
                     (expand "in6?" 1)
                     (flatten)
                     (inst - "j")
                     (assert)
                     (expand "vv" +)
                     (ground))
                    ("2"
                     (replace -1)
                     (label "inlem" -1)
                     (label "ireg" -3)
                     (label "bij1" -4)
                     (invoke (case "NOT %1") (! 1 1))
                     (("1"
                       (hide 2)
                       (case "FORALL (i,j1,j2:nat): j1<j2 IMPLIES FFG(i)(j1)<FFG(i)(j2)")
                       (("1"
                         (skosimp*)
                         (inst - "i!1" _ _)
                         (inst-cp - "0" "1")
                         (inst-cp - "1" "2")
                         (inst-cp - "2" "3")
                         (inst-cp - "3" "4")
                         (inst - "4" "5")
                         (assert)
                         (expand "vv" +)
                         (expand "FFG" 1)
                         (lemma "base_n_to_nat_lt")
                         (inst?)
                         (("1"
                           (split -)
                           (("1"
                             (case "FORALL (iz,jz:int): iz<jz IMPLIES iz<=jz-1")
                             (("1"
                               (inst -
                                "base_n_to_nat(6,
                                                                                                                                                                          LAMBDA (zn: nat):
                                                                                                                                                                            IF zn < key THEN base_n(6, i!1)(zn)
                                                                                                                                                                            ELSIF zn = key THEN 5
                                                                                                                                                                            ELSE base_n(6, i!1)(zn - 1)
                                                                                                                                                                            ENDIF,
                                                                                                                                                                          k)"
                                "6^(k+1)")
                               (("1" (assert)) ("2" (skeep) (assert))))
                              ("2" (skeep) (assert))))
                            ("2"
                             (hide-all-but 1)
                             (skeep)
                             (lift-if)
                             (lemma "base_n_lt_n")
                             (ground)
                             (("1" (inst?)) ("2" (inst?))))))
                          ("2" (skeep) (assert))))
                        ("2"
                         (hide 2)
                         (skeep)
                         (expand "FFG" 1)
                         (expand "base_n_to_nat" 1)
                         (name "FF1"
                               "(LAMBDA (s: nat):
                                                                                                                                                               6 ^ s *
                                                                                                                                                                IF s < key THEN base_n(6, i)(s)
                                                                                                                                                                ELSIF s = key THEN j1
                                                                                                                                                                ELSE base_n(6, i)(s - 1)
                                                                                                                                                                ENDIF)")
                         (("1"
                           (name "FF2"
                                 "(LAMBDA (s: nat):
                                                                                                                                                                          6 ^ s *
                                                                                                                                                                           IF s < key THEN base_n(6, i)(s)
                                                                                                                                                                           ELSIF s = key THEN j2
                                                                                                                                                                           ELSE base_n(6, i)(s - 1)
                                                                                                                                                                           ENDIF)")
                           (replace -1)
                           (replace -2)
                           (assert)
                           (lemma "sigma_split")
                           (inst?)
                           (inst - "key")
                           (assert)
                           (replaces -1)
                           (expand "sigma" + 1)
                           (lemma "sigma_split")
                           (inst - "FF2" "k" "0" "key")
                           (assert)
                           (replaces -1)
                           (expand "sigma" + 3)
                           (lemma "sigma_eq")
                           (inst - "FF1" "FF2" _ _)
                           (inst-cp - "key-1" "0")
                           (inst - "k" "1+key")
                           (assert)
                           (split -)
                           (("1"
                             (split -)
                             (("1"
                               (replaces -1)
                               (replaces -1)
                               (assert)
                               (case "FF1(key) < FF2(key)")
                               (("1" (assert))
                                ("2"
                                 (hide 2)
                                 (expand "FF1" 1)
                                 (expand "FF2" 1)
                                 (mult-by -3 "6^key")
                                 (assert))))
                              ("2"
                               (hide 2)
                               (skosimp*)
                               (expand "FF1" 1)
                               (expand "FF2" 1)
                               (propax))))
                            ("2"
                             (hide 2)
                             (skosimp*)
                             (expand "FF1" 1)
                             (expand "FF2" 1)
                             (propax))))
                          ("2" (hide 2) (skosimp*) (assert))))))
                      ("2"
                       (replace -1)
                       (label "vvinj" -1)
                       (invoke (case "NOT %1") (! 1 1))
                       (("1"
                         (hide 2)
                         (skolem 1 ("ii" _ _))
                         (skeep)
                         (expand "in6?" (-1 -2 -3 -4 -5))
                         (case "NOT EXISTS (ni:subrange(0,5)): j = FFG(ii)(ni)")
                         (("1"
                           (expand "vv" -4)
                           (split -)
                           (("1" (inst + "0")) ("2" (inst + "1"))
                            ("3" (inst + "2")) ("4" (inst + "3"))
                            ("5" (inst + "4")) ("6" (inst + "5"))))
                          ("2"
                           (case "NOT EXISTS (nd:subrange(0,5)): j = FFG(d)(nd)")
                           (("1"
                             (expand "vv" -6)
                             (split -6)
                             (("1" (inst + "0")) ("2" (inst + "1"))
                              ("3" (inst + "2")) ("4" (inst + "3"))
                              ("5" (inst + "4")) ("6" (inst + "5"))))
                            ("2"
                             (hide (-6 -7))
                             (skeep)
                             (skeep)
                             (replaces -1 -2)
                             (expand "FFG" -1)
                             (lemma "base_n_to_nat_unique")
                             (hide (-12 -13 -14 -15))
                             (inst?)
                             (("1"
                               (inst - "0")
                               (split -1)
                               (("1"
                                 (lemma "base_n_is_n_alt")
                                 (inst - "6" "d" "k-1")
                                 (assert)
                                 (lemma "base_n_is_n_alt")
                                 (inst - "6" "ii" "k-1")
                                 (assert)
                                 (replaces -1 1)
                                 (replaces -1 1)
                                 (lemma "base_n_to_nat_eq")
                                 (inst
                                  -
                                  "6"
                                  "k"
                                  "k-1"
                                  "base_n(6,ii)"
                                  "base_n(6,d)")
                                 (assert)
                                 (skeep)
                                 (case "i < key")
                                 (("1" (inst - "i") (assert))
                                  ("2" (inst - "i+1") (assert))))
                                ("2"
                                 (hide -)
                                 (skosimp*)
                                 (lemma "base_n_lt_n")
                                 (lift-if)
                                 (assert)
                                 (ground)
                                 (("1" (inst?))
                                  ("2" (inst?))
                                  ("3" (inst?))
                                  ("4" (inst?))))
                                ("3" (propax))))
                              ("2" (skeep) (assert))))))))
                        ("2"
                         (replace -1)
                         (label "allg" -)
                         (case "NOT k > 0")
                         (("1" (propax))
                          ("2"
                           (assert)
                           (case "NOT TQRow(key) > 2")
                           (("1" (propax))
                            ("2"
                             (hide "allg")
                             (skolem 1 "i")
                             (flatten)
                             (assert)
                             (expand "vv" +)
                             (expand "sign_coeff6_zero")
                             (assert)
                             (reveal "allg")
                             (copy -9)
                             (delabel -1)
                             (hide "allg")
                             (inst-cp - "i" "0")
                             (inst-cp - "i" "1")
                             (inst-cp - "i" "2")
                             (inst-cp - "i" "3")
                             (inst-cp - "i" "4")
                             (inst-cp - "i" "5")
                             (hide -1)
                             (assert)
                             (assert)
                             (lemma "product_split[nat]")
                             (inst-cp -
                              "LAMBDA (j): sign_coeff6_zero_entry(k, TQRow, FFG(i)(0), j)"
                              "k" "0" "key")
                             (assert)
                             (expand "product" -2 2)
                             (name "KC"
                                   "product[nat](0, key - 1,
                                                                                                                                                                                    LAMBDA (j): sign_coeff6_zero_entry(k, TQRow, FFG(i)(0), j))
                                                                                                                                                                             *
                                                                                                                                                                             product[nat](1 + key, k,
                                                                                                                                                                                     LAMBDA (j): sign_coeff6_zero_entry(k, TQRow, FFG(i)(0), j))")
                             (replace -1)
                             (case "FORALL (pz:subrange(0,5)): product[nat]
                                                                                                                                                                               (0, key - 1,
                                                                                                                                                                                LAMBDA (j): sign_coeff6_zero_entry(k, TQRow, FFG(i)(pz), j))
                                                                                                                                                                            *
                                                                                                                                                                            product[nat]
                                                                                                                                                                                (1 + key, k,
                                                                                                                                                                                 LAMBDA (j): sign_coeff6_zero_entry(k, TQRow, FFG(i)(pz), j)) = KC")
                             (("1"
                               (replace -4 +)
                               (inst-cp -
                                "LAMBDA (j): sign_coeff6_zero_entry(k, TQRow, FFG(i)(1), j)"
                                "k" "0" "key")
                               (assert)
                               (expand "product" -4 2)
                               (inst-cp - "1")
                               (replaces -2)
                               (replace -4 1)
                               (hide (-4 -5))
                               (hide -2)
                               (inst-cp -
                                "LAMBDA (j): sign_coeff6_zero_entry(k, TQRow, FFG(i)(2), j)"
                                "k" "0" "key")
                               (assert)
                               (expand "product" -3 2)
                               (inst-cp - "2")
                               (replaces -2)
                               (replaces -3)
                               (inst-cp -
                                "LAMBDA (j): sign_coeff6_zero_entry(k, TQRow, FFG(i)(3), j)"
                                "k" "0" "key")
                               (assert)
                               (expand "product" -3 2)
                               (inst-cp - "3")
                               (replaces -2)
                               (replaces -3)
                               (inst-cp -
                                "LAMBDA (j): sign_coeff6_zero_entry(k, TQRow, FFG(i)(4), j)"
                                "k" "0" "key")
                               (assert)
                               (expand "product" -3 2)
                               (inst-cp - "4")
                               (replaces -2)
                               (replaces -3)
                               (inst-cp -
                                "LAMBDA (j): sign_coeff6_zero_entry(k, TQRow, FFG(i)(5), j)"
                                "k" "0" "key")
                               (assert)
                               (expand "product" -3 2)
                               (inst - "5")
                               (replaces -1)
                               (replaces -2)
                               (hide -1)
                               (case " sign_coeff6_zero_entry(k, TQRow, FFG(i)(5), key) *
                                                                                                                                                                                      NSol_all(k, a, n, GF, KF, base_n(6, FFG(i)(5)))
                                                                                                                                                                                      +
                                                                                                                                                                                      sign_coeff6_zero_entry(k, TQRow, FFG(i)(0), key) *
                                                                                                                                                                                       NSol_all(k, a, n, GF, KF, base_n(6, FFG(i)(0)))
                                                                                                                                                                                      +
                                                                                                                                                                                      sign_coeff6_zero_entry(k, TQRow, FFG(i)(1), key) *
                                                                                                                                                                                       NSol_all(k, a, n, GF, KF, base_n(6, FFG(i)(1)))
                                                                                                                                                                                      +
                                                                                                                                                                                      sign_coeff6_zero_entry(k, TQRow, FFG(i)(2), key) *
                                                                                                                                                                                       NSol_all(k, a, n, GF, KF, base_n(6, FFG(i)(2)))
                                                                                                                                                                                      +
                                                                                                                                                                                      sign_coeff6_zero_entry(k, TQRow, FFG(i)(3), key) *
                                                                                                                                                                                       NSol_all(k, a, n, GF, KF, base_n(6, FFG(i)(3)))
                                                                                                                                                                                      +
                                                                                                                                                                                      sign_coeff6_zero_entry(k, TQRow, FFG(i)(4), key) *
                                                                                                                                                                                       NSol_all(k, a, n, GF, KF, base_n(6, FFG(i)(4)))
                                                                                                                                                                                      = 0")
                               (("1" (assert))
                                ("2"
                                 (hide 2)
                                 (case
                                  "NOT (TQRow(key)=3 OR TQRow(key)=4 OR TQRow(key)=5)")
                                 (("1" (flatten) (assert))
                                  ("2"
                                   (split -)
                                   (("1"
                                     (assert)
                                     (expand "sign_coeff6_zero_entry")
                                     (reveal "FFGlem2")
                                     (rewrite -1)
                                     (rewrite -1)
                                     (rewrite -1)
                                     (assert)
                                     (rewrite -1)
                                     (assert)
                                     (rewrite -1)
                                     (assert)
                                     (rewrite -1)
                                     (assert)
                                     (expand "NSol_all")
                                     (lemma "card_disj_union[real]")
                                     (case
                                      "Sol_all(k, a, n, GF, KF, base_n(6, FFG(i)(3)))=
                                                                                                                                                         union(Sol_all(k, a, n, GF, KF, base_n(6, FFG(i)(1))),Sol_all(k, a, n, GF, KF, base_n(6, FFG(i)(2))))")
                                     (("1"
                                       (inst?)
                                       (assert)
                                       (hide 2)
                                       (expand "disjoint?" 1)
                                       (expand "intersection")
                                       (expand "empty?")
                                       (expand "member")
                                       (skolem 1 "r")
                                       (flatten)
                                       (hide -1)
                                       (inst-cp - "i" "1")
                                       (inst-cp - "i" "2")
                                       (assert)
                                       (expand "Sol_all")
                                       (flatten)
                                       (inst - "key")
                                       (inst - "key")
                                       (assert))
                                      ("2"
                                       (hide 2)
                                       (decompose-equality 1)
                                       (expand "union")
                                       (expand "member")
                                       (lemma "FFG")
                                       (iff)
                                       (ground)
                                       (("1"
                                         (hide -2)
                                         (expand "Sol_all" -1)
                                         (flatten)
                                         (inst-cp "FFGlem2" "i" "3")
                                         (inst-cp - "key")
                                         (assert)
                                         (case
                                          "NOT base_n(6, FFG(i)(3))( key) = 3")
                                         (("1" (propax))
                                          ("2"
                                           (assert)
                                           (case
                                            "polynomial(GF(key), KF(key))(x!1) > 0")
                                           (("1"
                                             (hide 2)
                                             (expand "Sol_all")
                                             (skosimp*)
                                             (lemma "FFG")
                                             (case "i!1 = key")
                                             (("1"
                                               (inst - "i!1")
                                               (assert)
                                               (case
                                                "base_n(6, FFG(i)(1))(i!1) = 1")
                                               (("1" (assert))
                                                ("2"
                                                 (hide 3)
                                                 (replaces -1)
                                                 (expand "FFG" 1)
                                                 (lemma
                                                  "base_n_base_n_to_nat")
                                                 (inst?)
                                                 (("1"
                                                   (split -)
                                                   (("1" (rewrite -1 1))
                                                    ("2"
                                                     (hide 2)
                                                     (skosimp*)
                                                     (lift-if)
                                                     (assert)
                                                     (ground)
                                                     (("1"
                                                       (lemma
                                                        "base_n_lt_n")
                                                       (inst?))
                                                      ("2"
                                                       (lemma
                                                        "base_n_lt_n")
                                                       (inst?))))))
                                                  ("2"
                                                   (skosimp*)
                                                   (assert))))))
                                              ("2"
                                               (inst - "i!1")
                                               (assert)
                                               (case
                                                "NOT base_n(6, FFG(i)(3))(i!1) = base_n(6, FFG(i)(1))(i!1)")
                                               (("1"
                                                 (assert)
                                                 (hide (-5 4))
                                                 (expand "FFG" 1)
                                                 (lemma
                                                  "base_n_base_n_to_nat")
                                                 (inst?)
                                                 (("1"
                                                   (split -)
                                                   (("1"
                                                     (rewrite -1 1)
                                                     (hide -1)
                                                     (lemma
                                                      "base_n_base_n_to_nat")
                                                     (inst?)
                                                     (("1"
                                                       (split -)
                                                       (("1"
                                                         (rewrite -1 1))
                                                        ("2"
                                                         (hide 2)
                                                         (skosimp*)
                                                         (lemma
                                                          "base_n_lt_n")
                                                         (lift-if)
                                                         (ground)
                                                         (("1" (inst?))
                                                          ("2"
                                                           (inst?))))))
                                                      ("2"
                                                       (skosimp*)
                                                       (assert))))
                                                    ("2"
                                                     (hide 2)
                                                     (lemma
                                                      "base_n_lt_n")
                                                     (skosimp*)
                                                     (lift-if)
                                                     (ground)
                                                     (("1" (inst?))
                                                      ("2" (inst?))))))
                                                  ("2"
                                                   (skosimp*)
                                                   (assert))))
                                                ("2"
                                                 (replace -1)
                                                 (propax))))))
                                            ("2"
                                             (hide 2)
                                             (expand "Sol_all")
                                             (skosimp*)
                                             (lemma "FFG")
                                             (case "i!1 = key")
                                             (("1"
                                               (inst - "i!1")
                                               (assert)
                                               (case
                                                "base_n(6, FFG(i)(2))(i!1) = 2")
                                               (("1" (assert))
                                                ("2"
                                                 (hide 4)
                                                 (replaces -1)
                                                 (expand "FFG" 1)
                                                 (lemma
                                                  "base_n_base_n_to_nat")
                                                 (inst?)
                                                 (("1"
                                                   (split -)
                                                   (("1" (rewrite -1 1))
                                                    ("2"
                                                     (hide 2)
                                                     (skosimp*)
                                                     (lemma
                                                      "base_n_lt_n")
                                                     (lift-if)
                                                     (ground)
                                                     (("1" (inst?))
                                                      ("2" (inst?))))))
                                                  ("2"
                                                   (skosimp*)
                                                   (assert))))))
                                              ("2"
                                               (inst - "i!1")
                                               (case
                                                "NOT base_n(6, FFG(i)(3))(i!1) = base_n(6, FFG(i)(2))(i!1)")
                                               (("1"
                                                 (assert)
                                                 (hide (-4 5))
                                                 (expand "FFG" 1)
                                                 (lemma
                                                  "base_n_base_n_to_nat")
                                                 (inst?)
                                                 (("1"
                                                   (split -)
                                                   (("1"
                                                     (rewrite -1 1)
                                                     (hide -1)
                                                     (lemma
                                                      "base_n_base_n_to_nat")
                                                     (inst?)
                                                     (("1"
                                                       (split -)
                                                       (("1"
                                                         (rewrite -1 1))
                                                        ("2"
                                                         (hide 2)
                                                         (skosimp*)
                                                         (lemma
                                                          "base_n_lt_n")
                                                         (lift-if)
                                                         (ground)
                                                         (("1" (inst?))
                                                          ("2"
                                                           (inst?))))))
                                                      ("2"
                                                       (skosimp*)
                                                       (assert))))
                                                    ("2"
                                                     (hide 2)
                                                     (lemma
                                                      "base_n_lt_n")
                                                     (skosimp*)
                                                     (lift-if)
                                                     (ground)
                                                     (("1" (inst?))
                                                      ("2" (inst?))))))
                                                  ("2"
                                                   (skosimp*)
                                                   (assert))))
                                                ("2"
                                                 (replace -1)
                                                 (assert))))))))))
                                        ("2"
                                         (expand "Sol_all" (-1 1))
                                         (flatten)
                                         (assert)
                                         (skosimp*)
                                         (inst - "i!1")
                                         (assert)
                                         (expand "FFG" (-2 1))
                                         (lemma "base_n_base_n_to_nat")
                                         (inst?)
                                         (("1"
                                           (split -)
                                           (("1"
                                             (rewrite -1)
                                             (hide -1)
                                             (lemma
                                              "base_n_base_n_to_nat")
                                             (inst?)
                                             (("1"
                                               (split -)
                                               (("1"
                                                 (rewrite -1)
                                                 (lift-if)
                                                 (ground))
                                                ("2"
                                                 (hide (-2 2))
                                                 (lemma "base_n_lt_n")
                                                 (skosimp*)
                                                 (lift-if)
                                                 (ground)
                                                 (("1" (inst?))
                                                  ("2" (inst?))))))
                                              ("2"
                                               (hide (-2 2))
                                               (skosimp*)
                                               (assert))))
                                            ("2"
                                             (hide (-2 2))
                                             (lemma "base_n_lt_n")
                                             (skosimp*)
                                             (lift-if)
                                             (ground)
                                             (("1" (inst?))
                                              ("2" (inst?))))))
                                          ("2"
                                           (hide (-2 2))
                                           (skosimp*)
                                           (assert))))
                                        ("3"
                                         (expand "Sol_all")
                                         (flatten)
                                         (assert)
                                         (skosimp*)
                                         (inst - "i!1")
                                         (assert)
                                         (expand "FFG" (-2 1))
                                         (lemma "base_n_base_n_to_nat")
                                         (inst?)
                                         (("1"
                                           (split -)
                                           (("1"
                                             (rewrite -1)
                                             (hide -1)
                                             (lemma
                                              "base_n_base_n_to_nat")
                                             (inst?)
                                             (("1"
                                               (split -)
                                               (("1"
                                                 (rewrite -1)
                                                 (hide -1)
                                                 (lift-if)
                                                 (assert)
                                                 (ground))
                                                ("2"
                                                 (hide (-2 2))
                                                 (lemma "base_n_lt_n")
                                                 (skosimp*)
                                                 (lift-if)
                                                 (ground)
                                                 (("1" (inst?))
                                                  ("2" (inst?))))))
                                              ("2"
                                               (hide (-2 2))
                                               (skosimp*)
                                               (assert))))
                                            ("2"
                                             (hide (-2 2))
                                             (lemma "base_n_lt_n")
                                             (skosimp*)
                                             (assert)
                                             (lift-if)
                                             (ground)
                                             (("1" (inst?))
                                              ("2" (inst?))))))
                                          ("2"
                                           (hide (-2 2))
                                           (skosimp*)
                                           (assert))))))))
                                    ("2"
                                     (assert)
                                     (expand "sign_coeff6_zero_entry")
                                     (reveal "FFGlem2")
                                     (rewrite -1)
                                     (rewrite -1)
                                     (rewrite -1)
                                     (assert)
                                     (rewrite -1)
                                     (assert)
                                     (rewrite -1)
                                     (assert)
                                     (rewrite -1)
                                     (assert)
                                     (expand "NSol_all")
                                     (lemma "card_disj_union[real]")
                                     (case
                                      "Sol_all(k, a, n, GF, KF, base_n(6, FFG(i)(4))) = union(Sol_all(k, a, n, GF, KF, base_n(6, FFG(i)(0))),Sol_all(k, a, n, GF, KF, base_n(6, FFG(i)(1))))")
                                     (("1"
                                       (inst?)
                                       (assert)
                                       (hide 2)
                                       (expand "disjoint?" 1)
                                       (expand "intersection")
                                       (expand "empty?")
                                       (expand "member")
                                       (skolem 1 "r")
                                       (flatten)
                                       (hide -1)
                                       (inst-cp - "i" "1")
                                       (inst-cp - "i" "0")
                                       (assert)
                                       (expand "Sol_all")
                                       (flatten)
                                       (inst - "key")
                                       (inst - "key")
                                       (assert))
                                      ("2"
                                       (hide 2)
                                       (decompose-equality 1)
                                       (expand "union")
                                       (expand "member")
                                       (lemma "FFG")
                                       (iff)
                                       (ground)
                                       (("1"
                                         (hide -2)
                                         (expand "Sol_all" -1)
                                         (flatten)
                                         (inst-cp "FFGlem2" "i" "4")
                                         (inst-cp - "key")
                                         (assert)
                                         (case
                                          "NOT base_n(6, FFG(i)(4))(key) = 4")
                                         (("1" (propax))
                                          ("2"
                                           (assert)
                                           (case
                                            "polynomial(GF(key), KF(key))(x!1) > 0")
                                           (("1"
                                             (hide 1)
                                             (expand "Sol_all")
                                             (skosimp*)
                                             (lemma "FFG")
                                             (case "i!1 = key")
                                             (("1"
                                               (inst - "i!1")
                                               (assert)
                                               (case
                                                "base_n(6, FFG(i)(1))(i!1) = 1")
                                               (("1" (assert))
                                                ("2"
                                                 (replaces -1)
                                                 (expand "FFG" 1)
                                                 (lemma
                                                  "base_n_base_n_to_nat")
                                                 (inst?)
                                                 (("1"
                                                   (split -)
                                                   (("1" (rewrite -1 1))
                                                    ("2"
                                                     (hide 2)
                                                     (skosimp*)
                                                     (lemma
                                                      "base_n_lt_n")
                                                     (lift-if)
                                                     (split 1)
                                                     (("1"
                                                       (inst?)
                                                       (assert))
                                                      ("2"
                                                       (flatten)
                                                       (split +)
                                                       (("1" (assert))
                                                        ("2"
                                                         (flatten)
                                                         (inst?)
                                                         (assert))))))))
                                                  ("2"
                                                   (skosimp*)
                                                   (assert))))))
                                              ("2"
                                               (inst - "i!1")
                                               (assert)
                                               (case
                                                "NOT base_n(6, FFG(i)(4))(i!1) = base_n(6, FFG(i)(1))(i!1)")
                                               (("1"
                                                 (assert)
                                                 (hide (-5 3))
                                                 (expand "FFG" 1)
                                                 (lemma
                                                  "base_n_base_n_to_nat")
                                                 (inst?)
                                                 (("1"
                                                   (split -)
                                                   (("1"
                                                     (rewrite -1 1)
                                                     (hide -1)
                                                     (lemma
                                                      "base_n_base_n_to_nat")
                                                     (inst?)
                                                     (("1"
                                                       (split -)
                                                       (("1"
                                                         (rewrite -1 1))
                                                        ("2"
                                                         (hide 2)
                                                         (skosimp*)
                                                         (lemma
                                                          "base_n_lt_n")
                                                         (lift-if)
                                                         (ground)
                                                         (("1" (inst?))
                                                          ("2"
                                                           (inst?))))))
                                                      ("2"
                                                       (skosimp*)
                                                       (assert))))
                                                    ("2"
                                                     (hide 2)
                                                     (lemma
                                                      "base_n_lt_n")
                                                     (skosimp*)
                                                     (lift-if)
                                                     (ground)
                                                     (("1" (inst?))
                                                      ("2" (inst?))))))
                                                  ("2"
                                                   (skosimp*)
                                                   (assert))))
                                                ("2"
                                                 (replace -1)
                                                 (propax))))))
                                            ("2"
                                             (hide 3)
                                             (expand "Sol_all")
                                             (skosimp*)
                                             (lemma "FFG")
                                             (case "i!1 = key")
                                             (("1"
                                               (inst - "i!1")
                                               (assert)
                                               (case
                                                "base_n(6, FFG(i)(0))(i!1) = 0")
                                               (("1" (assert))
                                                ("2"
                                                 (hide 4)
                                                 (replaces -1)
                                                 (expand "FFG" 1)
                                                 (lemma
                                                  "base_n_base_n_to_nat")
                                                 (inst?)
                                                 (("1"
                                                   (split -)
                                                   (("1" (rewrite -1 1))
                                                    ("2"
                                                     (hide 2)
                                                     (skosimp*)
                                                     (lemma
                                                      "base_n_lt_n")
                                                     (lift-if)
                                                     (hide 3)
                                                     (ground)
                                                     (("1" (inst?))
                                                      ("2" (inst?))))))
                                                  ("2"
                                                   (skosimp*)
                                                   (assert))))))
                                              ("2"
                                               (inst - "i!1")
                                               (case
                                                "NOT base_n(6, FFG(i)(4))(i!1) = base_n(6, FFG(i)(0))(i!1)")
                                               (("1"
                                                 (assert)
                                                 (hide (-4 4))
                                                 (expand "FFG" 1)
                                                 (lemma
                                                  "base_n_base_n_to_nat")
                                                 (inst?)
                                                 (("1"
                                                   (split -)
                                                   (("1"
                                                     (rewrite -1 1)
                                                     (hide -1)
                                                     (lemma
                                                      "base_n_base_n_to_nat")
                                                     (inst?)
                                                     (("1"
                                                       (split -)
                                                       (("1"
                                                         (rewrite -1 1))
                                                        ("2"
                                                         (hide 2)
                                                         (skosimp*)
                                                         (lemma
                                                          "base_n_lt_n")
                                                         (lift-if)
                                                         (ground)
                                                         (("1" (inst?))
                                                          ("2"
                                                           (inst?))))))
                                                      ("2"
                                                       (skosimp*)
                                                       (assert))))
                                                    ("2"
                                                     (hide 2)
                                                     (lemma
                                                      "base_n_lt_n")
                                                     (skosimp*)
                                                     (lift-if)
                                                     (ground)
                                                     (("1" (inst?))
                                                      ("2" (inst?))))))
                                                  ("2"
                                                   (skosimp*)
                                                   (assert))))
                                                ("2"
                                                 (replace -1)
                                                 (assert))))))))))
                                        ("2"
                                         (expand "Sol_all" (-1 1))
                                         (flatten)
                                         (assert)
                                         (skosimp*)
                                         (inst - "i!1")
                                         (assert)
                                         (expand "FFG" (-2 1))
                                         (lemma "base_n_base_n_to_nat")
                                         (inst?)
                                         (("1"
                                           (split -)
                                           (("1"
                                             (rewrite -1)
                                             (hide -1)
                                             (lemma
                                              "base_n_base_n_to_nat")
                                             (inst?)
                                             (("1"
                                               (split -)
                                               (("1"
                                                 (rewrite -1)
                                                 (lift-if)
                                                 (ground))
                                                ("2"
                                                 (hide (-2 2))
                                                 (lemma "base_n_lt_n")
                                                 (skosimp*)
                                                 (lift-if)
                                                 (ground)
                                                 (("1" (inst?))
                                                  ("2" (inst?))))))
                                              ("2"
                                               (hide (-2 2))
                                               (skosimp*)
                                               (assert))))
                                            ("2"
                                             (hide (-2 2))
                                             (lemma "base_n_lt_n")
                                             (skosimp*)
                                             (lift-if)
                                             (ground)
                                             (("1" (inst?))
                                              ("2" (inst?))))))
                                          ("2"
                                           (hide (-2 2))
                                           (skosimp*)
                                           (assert))))
                                        ("3"
                                         (expand "Sol_all")
                                         (flatten)
                                         (assert)
                                         (skosimp*)
                                         (inst - "i!1")
                                         (assert)
                                         (expand "FFG" (-2 1))
                                         (lemma "base_n_base_n_to_nat")
                                         (inst?)
                                         (("1"
                                           (split -)
                                           (("1"
                                             (rewrite -1)
                                             (hide -1)
                                             (lemma
                                              "base_n_base_n_to_nat")
                                             (inst?)
                                             (("1"
                                               (split -)
                                               (("1"
                                                 (rewrite -1)
                                                 (hide -1)
                                                 (lift-if)
                                                 (assert)
                                                 (ground))
                                                ("2"
                                                 (hide (-2 2))
                                                 (lemma "base_n_lt_n")
                                                 (skosimp*)
                                                 (lift-if)
                                                 (ground)
                                                 (("1" (inst?))
                                                  ("2" (inst?))))))
                                              ("2"
                                               (hide (-2 2))
                                               (skosimp*)
                                               (assert))))
                                            ("2"
                                             (hide (-2 2))
                                             (lemma "base_n_lt_n")
                                             (skosimp*)
                                             (assert)
                                             (lift-if)
                                             (ground)
                                             (("1" (inst?))
                                              ("2" (inst?))))))
                                          ("2"
                                           (hide (-2 2))
                                           (skosimp*)
                                           (assert))))))))
                                    ("3"
                                     (assert)
                                     (expand "sign_coeff6_zero_entry")
                                     (reveal "FFGlem2")
                                     (rewrite -1)
                                     (rewrite -1)
                                     (rewrite -1)
                                     (assert)
                                     (rewrite -1)
                                     (assert)
                                     (rewrite -1)
                                     (assert)
                                     (rewrite -1)
                                     (assert)
                                     (assert)
                                     (expand "NSol_all")
                                     (lemma "card_disj_union[real]")
                                     (case
                                      "Sol_all(k, a, n, GF, KF, base_n(6, FFG(i)(5)))=
                                                                                                                                                         union(Sol_all(k, a, n, GF, KF, base_n(6, FFG(i)(0))),Sol_all(k, a, n, GF, KF, base_n(6, FFG(i)(2))))")
                                     (("1"
                                       (inst?)
                                       (assert)
                                       (hide 2)
                                       (expand "disjoint?" 1)
                                       (expand "intersection")
                                       (expand "empty?")
                                       (expand "member")
                                       (skolem 1 "r")
                                       (flatten)
                                       (hide -1)
                                       (inst-cp - "i" "0")
                                       (inst-cp - "i" "2")
                                       (assert)
                                       (expand "Sol_all")
                                       (flatten)
                                       (inst - "key")
                                       (inst - "key")
                                       (assert))
                                      ("2"
                                       (hide 2)
                                       (decompose-equality 1)
                                       (expand "union")
                                       (expand "member")
                                       (lemma "FFG")
                                       (iff)
                                       (ground)
                                       (("1"
                                         (hide -2)
                                         (expand "Sol_all" -1)
                                         (flatten)
                                         (inst-cp "FFGlem2" "i" "5")
                                         (inst-cp - "key")
                                         (assert)
                                         (case
                                          "NOT base_n(6, FFG(i)(5))(key) = 5")
                                         (("1" (propax))
                                          ("2"
                                           (assert)
                                           (case
                                            "polynomial(GF(key), KF(key))(x!1) < 0")
                                           (("1"
                                             (hide 1)
                                             (expand "Sol_all")
                                             (skosimp*)
                                             (lemma "FFG")
                                             (case "i!1 = key")
                                             (("1"
                                               (inst - "i!1")
                                               (assert)
                                               (case
                                                "base_n(6, FFG(i)(2))(i!1) = 2")
                                               (("1" (assert))
                                                ("2"
                                                 (hide 3)
                                                 (replaces -1)
                                                 (expand "FFG" 1)
                                                 (lemma
                                                  "base_n_base_n_to_nat")
                                                 (inst?)
                                                 (("1"
                                                   (split -)
                                                   (("1" (rewrite -1 1))
                                                    ("2"
                                                     (hide 2)
                                                     (skosimp*)
                                                     (lift-if)
                                                     (assert)
                                                     (hide 2)
                                                     (ground)
                                                     (("1"
                                                       (lemma
                                                        "base_n_lt_n")
                                                       (inst?))
                                                      ("2"
                                                       (lemma
                                                        "base_n_lt_n")
                                                       (inst?))))))
                                                  ("2"
                                                   (skosimp*)
                                                   (assert))))))
                                              ("2"
                                               (inst - "i!1")
                                               (assert)
                                               (case
                                                "NOT base_n(6, FFG(i)(5))(i!1) = base_n(6, FFG(i)(2))(i!1)")
                                               (("1"
                                                 (assert)
                                                 (hide (-5 3))
                                                 (expand "FFG" 1)
                                                 (lemma
                                                  "base_n_base_n_to_nat")
                                                 (inst?)
                                                 (("1"
                                                   (split -)
                                                   (("1"
                                                     (rewrite -1 1)
                                                     (hide -1)
                                                     (lemma
                                                      "base_n_base_n_to_nat")
                                                     (inst?)
                                                     (("1"
                                                       (split -)
                                                       (("1"
                                                         (rewrite -1 1))
                                                        ("2"
                                                         (hide 2)
                                                         (skosimp*)
                                                         (lemma
                                                          "base_n_lt_n")
                                                         (lift-if)
                                                         (ground)
                                                         (("1" (inst?))
                                                          ("2"
                                                           (inst?))))))
                                                      ("2"
                                                       (skosimp*)
                                                       (assert))))
                                                    ("2"
                                                     (hide 2)
                                                     (lemma
                                                      "base_n_lt_n")
                                                     (skosimp*)
                                                     (lift-if)
                                                     (ground)
                                                     (("1" (inst?))
                                                      ("2" (inst?))))))
                                                  ("2"
                                                   (skosimp*)
                                                   (assert))))
                                                ("2"
                                                 (replace -1)
                                                 (propax))))))
                                            ("2"
                                             (hide 3)
                                             (expand "Sol_all")
                                             (skosimp*)
                                             (lemma "FFG")
                                             (case "i!1 = key")
                                             (("1"
                                               (inst - "i!1")
                                               (assert)
                                               (case
                                                "base_n(6, FFG(i)(0))(i!1) = 0")
                                               (("1" (assert))
                                                ("2"
                                                 (hide 3)
                                                 (replaces -1)
                                                 (expand "FFG" 1)
                                                 (lemma
                                                  "base_n_base_n_to_nat")
                                                 (inst?)
                                                 (("1"
                                                   (split -)
                                                   (("1" (rewrite -1 1))
                                                    ("2"
                                                     (hide 2)
                                                     (skosimp*)
                                                     (lemma
                                                      "base_n_lt_n")
                                                     (lift-if)
                                                     (ground)
                                                     (("1" (inst?))
                                                      ("2" (inst?))))))
                                                  ("2"
                                                   (skosimp*)
                                                   (assert))))))
                                              ("2"
                                               (inst - "i!1")
                                               (case
                                                "NOT base_n(6, FFG(i)(5))(i!1) = base_n(6, FFG(i)(0))(i!1)")
                                               (("1"
                                                 (assert)
                                                 (hide (-4 4))
                                                 (expand "FFG" 1)
                                                 (lemma
                                                  "base_n_base_n_to_nat")
                                                 (inst?)
                                                 (("1"
                                                   (split -)
                                                   (("1"
                                                     (rewrite -1 1)
                                                     (hide -1)
                                                     (lemma
                                                      "base_n_base_n_to_nat")
                                                     (inst?)
                                                     (("1"
                                                       (split -)
                                                       (("1"
                                                         (rewrite -1 1))
                                                        ("2"
                                                         (hide 2)
                                                         (skosimp*)
                                                         (lemma
                                                          "base_n_lt_n")
                                                         (lift-if)
                                                         (ground)
                                                         (("1" (inst?))
                                                          ("2"
                                                           (inst?))))))
                                                      ("2"
                                                       (skosimp*)
                                                       (assert))))
                                                    ("2"
                                                     (hide 2)
                                                     (lemma
                                                      "base_n_lt_n")
                                                     (skosimp*)
                                                     (lift-if)
                                                     (ground)
                                                     (("1" (inst?))
                                                      ("2" (inst?))))))
                                                  ("2"
                                                   (skosimp*)
                                                   (assert))))
                                                ("2"
                                                 (replace -1)
                                                 (assert))))))))))
                                        ("2"
                                         (expand "Sol_all" (-1 1))
                                         (flatten)
                                         (assert)
                                         (skosimp*)
                                         (inst - "i!1")
                                         (assert)
                                         (expand "FFG" (-2 1))
                                         (lemma "base_n_base_n_to_nat")
                                         (inst?)
                                         (("1"
                                           (split -)
                                           (("1"
                                             (rewrite -1)
                                             (hide -1)
                                             (lemma
                                              "base_n_base_n_to_nat")
                                             (inst?)
                                             (("1"
                                               (split -)
                                               (("1"
                                                 (rewrite -1)
                                                 (lift-if)
                                                 (ground))
                                                ("2"
                                                 (hide (-2 2))
                                                 (lemma "base_n_lt_n")
                                                 (skosimp*)
                                                 (lift-if)
                                                 (ground)
                                                 (("1" (inst?))
                                                  ("2" (inst?))))))
                                              ("2"
                                               (hide (-2 2))
                                               (skosimp*)
                                               (assert))))
                                            ("2"
                                             (hide (-2 2))
                                             (lemma "base_n_lt_n")
                                             (skosimp*)
                                             (lift-if)
                                             (ground)
                                             (("1" (inst?))
                                              ("2" (inst?))))))
                                          ("2"
                                           (hide (-2 2))
                                           (skosimp*)
                                           (assert))))
                                        ("3"
                                         (expand "Sol_all")
                                         (flatten)
                                         (assert)
                                         (skosimp*)
                                         (inst - "i!1")
                                         (assert)
                                         (expand "FFG" (-2 1))
                                         (lemma "base_n_base_n_to_nat")
                                         (inst?)
                                         (("1"
                                           (split -)
                                           (("1"
                                             (rewrite -1)
                                             (hide -1)
                                             (lemma
                                              "base_n_base_n_to_nat")
                                             (inst?)
                                             (("1"
                                               (split -)
                                               (("1"
                                                 (rewrite -1)
                                                 (hide -1)
                                                 (lift-if)
                                                 (assert)
                                                 (ground))
                                                ("2"
                                                 (hide (-2 2))
                                                 (lemma "base_n_lt_n")
                                                 (skosimp*)
                                                 (lift-if)
                                                 (ground)
                                                 (("1" (inst?))
                                                  ("2" (inst?))))))
                                              ("2"
                                               (hide (-2 2))
                                               (skosimp*)
                                               (assert))))
                                            ("2"
                                             (hide (-2 2))
                                             (lemma "base_n_lt_n")
                                             (skosimp*)
                                             (assert)
                                             (lift-if)
                                             (ground)
                                             (("1" (inst?))
                                              ("2" (inst?))))))
                                          ("2"
                                           (hide (-2 2))
                                           (skosimp*)
                                           (assert))))))))))))))
                              ("2"
                               (hide 2)
                               (skeep)
                               (case "NOT FORALL (a1,a2,b1,b2:real): a1=b1 AND a2=b2 IMPLIEs a1*a2=b1*b2")
                               (("1" (skeep) (assert))
                                ("2"
                                 (replaces -2 1 :dir rl)
                                 (rewrite -1 1)
                                 (("1"
                                   (hide 2)
                                   (rewrite "product_eq")
                                   (hide 2)
                                   (skosimp*)
                                   (rewrite "sign_coeff6_zero_entry_eq")
                                   (hide 2)
                                   (expand "FFG" 1)
                                   (lemma "base_n_base_n_to_nat")
                                   (inst?)
                                   (("1"
                                     (split -)
                                     (("1"
                                       (rewrite -1 1)
                                       (hide -1)
                                       (lemma "base_n_base_n_to_nat")
                                       (inst?)
                                       (("1"
                                         (split -)
                                         (("1" (rewrite -1 1))
                                          ("2"
                                           (hide 2)
                                           (lemma "base_n_lt_n")
                                           (skosimp*)
                                           (lift-if)
                                           (ground)
                                           (("1" (inst?))
                                            ("2" (inst?))))))
                                        ("2"
                                         (hide 2)
                                         (skosimp*)
                                         (assert))))
                                      ("2"
                                       (hide 2)
                                       (lemma "base_n_lt_n")
                                       (skosimp*)
                                       (lift-if)
                                       (ground)
                                       (("1" (inst?)) ("2" (inst?))))))
                                    ("2" (hide 2) (skosimp*) (assert))))
                                  ("2"
                                   (hide 2)
                                   (rewrite "product_eq")
                                   (hide 2)
                                   (skosimp*)
                                   (rewrite "sign_coeff6_zero_entry_eq")
                                   (hide 2)
                                   (expand "FFG" 1)
                                   (lemma "base_n_base_n_to_nat")
                                   (inst?)
                                   (("1"
                                     (split -)
                                     (("1"
                                       (rewrite -1 1)
                                       (hide -1)
                                       (lemma "base_n_base_n_to_nat")
                                       (inst?)
                                       (("1"
                                         (split -)
                                         (("1" (rewrite -1 1))
                                          ("2"
                                           (hide 2)
                                           (lemma "base_n_lt_n")
                                           (skosimp*)
                                           (lift-if)
                                           (ground)
                                           (("1" (inst?))
                                            ("2" (inst?))))))
                                        ("2" (skosimp*) (assert))))
                                      ("2"
                                       (hide 2)
                                       (skosimp*)
                                       (lift-if)
                                       (lemma "base_n_lt_n")
                                       (ground)
                                       (("1" (inst?)) ("2" (inst?))))))
                                    ("2"
                                     (hide 2)
                                     (skosimp*)
                                     (assert))))))))))))))))))))))))))))
          ("2"
           (hide (-1 -2))
           (hide 3)
           (skosimp*)
           (expand "FFG" 1)
           (lemma "base_n_base_n_to_nat")
           (inst?)
           (("1"
             (split -)
             (("1" (rewrite -1))
              ("2"
               (lemma "base_n_lt_n")
               (skosimp*)
               (lift-if)
               (ground)
               (("1" (inst?)) ("2" (inst?))))))
            ("2" (skosimp*) (assert))))))
        ("2" (skosimp*) (assert))))
      ("2"
       (assert)
       (assert)
       (skosimp*)
       (lemma "base_n_lt_n")
       (inst?)
       (assert))
      ("3" (assert))))
    ("2"
     (assert)
     (case "NOT k = 0")
     (("1" (assert))
      ("2"
       (replace -1)
       (assert)
       (rewrite "expt_x1")
       (assert)
       (assert)
       (skolem - "key")
       (case "NOT key = 0")
       (("1" (assert))
        ("2"
         (replace -1)
         (assert)
         (expand "sigma")
         (expand "sigma")
         (expand "sigma")
         (expand "sigma")
         (expand "sigma")
         (expand "sigma")
         (expand "sigma")
         (expand "sign_coeff6_zero")
         (rewrite "expt_x1")
         (assert)
         (expand "product")
         (expand "product")
         (case "NOT (TQRow(0)=3 OR TQRow(0)=4 OR TQRow(0)=5)")
         (("1" (flatten) (assert))
          ("2"
           (ground)
           (("1"
             (expand "sign_coeff6_zero_entry")
             (case "NOT FORALL (ij:upto(5)): base_n(6,ij)(0)=ij")
             (("1" (hide 4) (eval-formula 1))
              ("2"
               (rewrite -1 +)
               (rewrite -1 +)
               (rewrite -1 +)
               (rewrite -1 +)
               (rewrite -1 +)
               (rewrite -1 +)
               (assert)
               (expand "NSol_all")
               (lemma "card_disj_union[real]")
               (case "Sol_all(0, a, n, GF, KF, base_n(6, 3)) = union(Sol_all(0, a, n, GF, KF, base_n(6, 1)),Sol_all(0, a, n, GF, KF, base_n(6, 2)))")
               (("1"
                 (inst?)
                 (assert)
                 (hide 4)
                 (expand "disjoint?" 1)
                 (expand "intersection")
                 (expand "empty?")
                 (expand "member")
                 (skolem 1 "r")
                 (hide -1)
                 (flatten)
                 (expand "Sol_all")
                 (flatten)
                 (assert)
                 (inst - "0")
                 (inst - "0")
                 (assert)
                 (rewrite -5)
                 (rewrite -5)
                 (ground))
                ("2"
                 (hide 4)
                 (expand "union")
                 (expand "member")
                 (decompose-equality 1)
                 (("1"
                   (iff)
                   (expand "Sol_all")
                   (assert)
                   (ground)
                   (("1"
                     (inst - "0")
                     (assert)
                     (rewrite -4 -2)
                     (assert)
                     (skosimp*)
                     (case "i!1 = 0 AND i!2 = 0")
                     (("1"
                       (flatten)
                       (replaces -1)
                       (replaces -1)
                       (assert)
                       (rewrite -5)
                       (rewrite -5)
                       (ground))
                      ("2" (split 1) (("1" (assert)) ("2" (assert))))))
                    ("2"
                     (skosimp*)
                     (inst - "i!1")
                     (inst-cp - "3")
                     (inst - "1")
                     (ground))
                    ("3"
                     (skosimp*)
                     (inst - "0")
                     (assert)
                     (inst-cp - "3")
                     (inst - "2")
                     (ground))))
                  ("2"
                   (case "NOT FORALL (ij:upto(5)): base_n(6,ij)(0)=ij")
                   (("1" (propax))
                    ("2"
                     (skosimp*)
                     (lemma "base_n_lt_n")
                     (inst?)
                     (assert))))
                  ("3"
                   (skosimp*)
                   (lemma "base_n_lt_n")
                   (inst?)
                   (assert))))))))
            ("2"
             (expand "sign_coeff6_zero_entry")
             (case "NOT FORALL (ij:upto(5)): base_n(6,ij)(0)=ij")
             (("1" (hide 4) (eval-formula 1))
              ("2"
               (rewrite -1)
               (rewrite -1)
               (rewrite -1)
               (rewrite -1)
               (rewrite -1)
               (rewrite -1)
               (assert)
               (expand "NSol_all")
               (lemma "card_disj_union[real]")
               (case "Sol_all(0, a, n, GF, KF, base_n(6, 4)) = union(Sol_all(0, a, n, GF, KF, base_n(6, 0)),Sol_all(0, a, n, GF, KF, base_n(6, 1)))")
               (("1"
                 (inst?)
                 (assert)
                 (hide 4)
                 (expand "disjoint?")
                 (expand "intersection")
                 (expand "empty?")
                 (expand "member")
                 (skosimp*)
                 (hide -1)
                 (expand "Sol_all")
                 (flatten)
                 (inst - "0")
                 (inst - "0")
                 (assert)
                 (rewrite -5)
                 (rewrite -5)
                 (ground))
                ("2"
                 (hide 4)
                 (decompose-equality 1)
                 (expand "union")
                 (expand "Sol_all")
                 (expand "member")
                 (iff)
                 (ground)
                 (("1"
                   (skosimp*)
                   (inst - "0")
                   (case "i!1 = 0 AND i!2 = 0")
                   (("1"
                     (flatten)
                     (replaces -1)
                     (replaces -1)
                     (assert)
                     (rewrite -6)
                     (rewrite -6)
                     (rewrite -6)
                     (ground))
                    ("2" (split 1) (("1" (assert)) ("2" (assert))))))
                  ("2"
                   (skeep)
                   (case "NOT i = 0")
                   (("1" (assert))
                    ("2"
                     (replace -1)
                     (assert)
                     (inst - "0")
                     (assert)
                     (rewrite -6)
                     (rewrite -6)
                     (ground))))
                  ("3"
                   (skeep)
                   (case "NOT i = 0")
                   (("1" (assert))
                    ("2"
                     (replace -1)
                     (assert)
                     (inst - "0")
                     (assert)
                     (rewrite -6)
                     (rewrite -6)
                     (ground))))))))))
            ("3"
             (case "NOT FORALL (ij:upto(5)): base_n(6,ij)(0)=ij")
             (("1" (hide 4) (eval-formula 1))
              ("2"
               (expand "sign_coeff6_zero_entry")
               (rewrite -1)
               (rewrite -1)
               (rewrite -1)
               (rewrite -1)
               (rewrite -1)
               (rewrite -1)
               (assert)
               (lemma "card_disj_union[real]")
               (expand "NSol_all")
               (case "Sol_all(0, a, n, GF, KF, base_n(6, 5)) = union(Sol_all(0, a, n, GF, KF, base_n(6, 0)),Sol_all(0, a, n, GF, KF, base_n(6, 2)))")
               (("1"
                 (inst?)
                 (assert)
                 (hide 4)
                 (expand "disjoint?")
                 (expand "intersection")
                 (expand "empty?")
                 (expand "member")
                 (skosimp*)
                 (hide -1)
                 (expand "Sol_all")
                 (flatten)
                 (inst - "0")
                 (inst - "0")
                 (assert)
                 (rewrite -5)
                 (rewrite -5)
                 (ground))
                ("2"
                 (hide 4)
                 (decompose-equality 1)
                 (expand "union")
                 (expand "member")
                 (expand "Sol_all")
                 (iff)
                 (ground)
                 (("1"
                   (skosimp*)
                   (case "i!1 = 0 AND i!2 = 0")
                   (("1"
                     (flatten)
                     (replaces -1)
                     (replaces -1)
                     (assert)
                     (inst - "0")
                     (assert)
                     (rewrite -6)
                     (rewrite -6)
                     (rewrite -6)
                     (assert))
                    ("2" (split 1) (("1" (assert)) ("2" (assert))))))
                  ("2"
                   (skeep)
                   (inst - "0")
                   (case "NOT i = 0")
                   (("1" (assert))
                    ("2"
                     (replace -1)
                     (assert)
                     (rewrite -6)
                     (rewrite -6)
                     (assert))))
                  ("3"
                   (skeep)
                   (case "NOT i = 0")
                   (("1" (assert))
                    ("2"
                     (replaces -1)
                     (inst - "0")
                     (assert)
                     (rewrite -5)
                     (rewrite -5)
                     (assert))))))))))))))))))))


proof_type: t_proof
decl_type: tcc
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 - "GP" "KF")
     (expand "sigma" +)
     (expand "*" + 1)
     (expand "*" + 3)
     (assert)
     (flatten)
     (assert)
     (split)
     (("1" (rewrite "rationals.closed_plus"))
      ("2" (rewrite "integers.closed_plus"))
      ("3" (assert) (expand "*" + 1) (assert))))))


proof_type: t_proof
decl_type: tcc
library: Tarski
theory: poly_families
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (skeep)
   (skeep)
   (skeep)
   (assert)
   (lemma "prod_polynomials_TCC2")
   (inst?)
   (flatten)
   (assert))


proof_type: t_proof
decl_type: tcc
library: Tarski
theory: poly_families
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep*)
   (case "FORALL (dd:nat): rational_pred(sigma(0, dd, KF * GP)) AND
                                                                  integer_pred(sigma(0, dd, KF * GP)) AND
                                                                   sigma(0, dd, KF * GP) >= 0")
   (("1"
     (label "dd65" -1)
     (copy -1)
     (label "dd64" -1)
     (hide "dd64")
     (case "k = 0")
     (("1"
       (replaces -1)
       (expand "sigma" +)
       (expand "sigma" +)
       (expand "product" +)
       (expand "product" +)
       (assert)
       (lift-if)
       (split -)
       (("1"
         (flatten)
         (replace -1)
         (replace -7)
         (replace -2)
         (assert)
         (expand "*")
         (assert)
         (replace -1)
         (assert)
         (ground)
         (("1" (skeep) (hide -) (grind)) ("2" (hide-all-but -2) (grind))
          ("3" (hide -) (grind))))
        ("2"
         (flatten)
         (assert)
         (split -)
         (("1"
           (flatten)
           (replace -1)
           (assert)
           (expand "*")
           (assert)
           (replace -7)
           (replace -2)
           (assert)
           (ground)
           (("1"
             (replace -1)
             (expand "^" +)
             (expand "expt" +)
             (expand "expt" +)
             (skeep)
             (rewrite "poly_eq")
             (("1" (hide 2) (skosimp*) (ground))
              ("2" (hide 2) (skosimp*) (ground))))
            ("2" (inst - "0") (replace -3) (assert))
            ("3" (replace -1) (skosimp*) (lift-if) (ground))))
          ("2"
           (case "GP(0)=1")
           (("1" (assert))
            ("2"
             (assert)
             (case "NOT GP(0)=2")
             (("1" (assert))
              ("2"
               (replace -1)
               (replace -7)
               (replace -2)
               (expand "*")
               (ground)
               (("1" (lemma "polynomial_prod_int") (inst?))
                ("2"
                 (expand "^" +)
                 (expand "expt")
                 (expand "expt")
                 (expand "expt")
                 (skeep)
                 (replace -1)
                 (rewrite "polynomial_prod_def" :dir rl))
                ("3"
                 (inst - "0")
                 (assert)
                 (assert)
                 (flatten)
                 (replace -2)
                 (expand "polynomial_prod" -1)
                 (expand "max" -1)
                 (expand "sigma" -1)
                 (expand "sigma" -1)
                 (assert)
                 (lemma "nzreal_times_nzreal_is_nzreal")
                 (inst?)
                 (assert))
                ("4"
                 (replace -1)
                 (skeep)
                 (expand "polynomial_prod" +)
                 (expand "max" +)
                 (assert)
                 (expand "sigma" +)
                 (propax))))))))))))
      ("2"
       (assert)
       (typepred "v(GF,KF,GP,k-1)")
       (expand "sigma" +)
       (expand "product" +)
       (name "Y" "v(GF,KF,GP,k-1)")
       (replace -1)
       (assert)
       (replace -10 +)
       (replace -7 +)
       (replace -6 +)
       (case "GP(k)=0")
       (("1"
         (assert)
         (expand "*" +)
         (replace -1)
         (assert)
         (split +)
         (("1" (skeep) (typepred "Y(x1)") (assert))
          ("2"
           (assert)
           (skeep)
           (rewrite "expt_x0")
           (assert)
           (inst - "x")
           (assert)
           (expand "*")
           (assert))
          ("3" (expand "*") (ground) (skeep) (inst - "i") (assert))
          ("4" (skeep) (expand "*") (inst -6 "i") (assert))))
        ("2"
         (assert)
         (case "GP(k)=1")
         (("1"
           (replace -1)
           (assert)
           (split +)
           (("1"
             (lemma "polynomial_prod_int")
             (inst?)
             (assert)
             (hide 2)
             (reveal "dd64")
             (inst?)
             (ground))
            ("2"
             (skeep)
             (assert)
             (expand "*" + 1)
             (assert)
             (replace -10 +)
             (replace -1)
             (assert)
             (rewrite "polynomial_prod_def" :dir rl)
             (("1"
               (inst - "x")
               (replace -9)
               (replace -3)
               (case "polynomial(LAMBDA (i: nat):
                                                            IF i <= KF(k) THEN GF(k)(i) ELSE 0 ENDIF,
                                                          KF(k))
                                                         (x)
                                               =
                                               polynomial(GF(k), KF(k))(x) ^ 1")
               (("1" (assert))
                ("2"
                 (hide 2)
                 (expand "^")
                 (expand "expt" +)
                 (expand "expt" +)
                 (rewrite "poly_eq" 1)
                 (("1" (hide 2) (skosimp*) (ground))
                  ("2" (hide 2) (skosimp*) (lift-if) (ground))))))
              ("2" (hide 2) (reveal "dd64") (inst?))))
            ("3"
             (flatten)
             (copy -1)
             (label "igpop" -1)
             (hide "igpop")
             (expand "*" -2)
             (replace -3)
             (assert)
             (replace -12 -2)
             (expand "*")
             (replace -12 :dir rl)
             (expand "polynomial_prod" -2)
             (expand "max" -2)
             (assert)
             (expand "sigma" -2)
             (expand "sigma" -2)
             (assert)
             (inst - "k")
             (assert)
             (split -6)
             (("1"
               (assert)
               (lemma "nzreal_times_nzreal_is_nzreal")
               (inst?)
               (assert))
              ("2"
               (assert)
               (reveal "igpop")
               (skeep)
               (inst - "i")
               (assert))))
            ("4"
             (skeep)
             (expand "*")
             (expand "polynomial_prod" +)
             (assert)
             (expand "sigma" +)
             (propax))))
          ("2"
           (hide 3)
           (case "NOT GP(k)=2")
           (("1" (hide 4) (assert))
            ("2"
             (replace -1)
             (assert)
             (split +)
             (("1"
               (skeep)
               (lemma "polynomial_prod_int")
               (inst?)
               (("1"
                 (hide 2)
                 (skeep)
                 (lemma "polynomial_prod_int")
                 (inst?))
                ("2" (hide 2) (reveal "dd64") (inst?) (ground))))
              ("2"
               (skeep)
               (typepred "Y")
               (replace -13 1)
               (expand "*" +)
               (replace -4)
               (rewrite "polynomial_prod_def" :dir rl)
               (expand "^" 1 1)
               (expand "expt")
               (expand "expt")
               (expand "expt")
               (rewrite "polynomial_prod_def" :dir rl)
               (assert)
               (inst - "x")
               (assert)
               (replace -12)
               (expand "*" -1)
               (assert))
              ("3"
               (flatten)
               (expand "*")
               (replace -3)
               (expand "polynomial_prod" -2)
               (assert)
               (replace -12)
               (expand "sigma" -2 1)
               (expand "sigma" -2 1)
               (assert)
               (replace -11)
               (expand "sigma" -2 2)
               (expand "sigma" -2 2)
               (replace -12 :dir rl)
               (inst-cp - "k")
               (assert)
               (split -7)
               (("1"
                 (lemma "nzreal_times_nzreal_is_nzreal")
                 (inst - "GF(k)(KF(k))*GF(k)(KF(k))" "Y(bdeg)")
                 (("1" (assert))
                  ("2"
                   (assert)
                   (lemma "nzreal_times_nzreal_is_nzreal")
                   (inst?))))
                ("2" (skeep) (inst - "i") (assert))))
              ("4"
               (skeep)
               (expand "*")
               (expand "polynomial_prod" +)
               (assert)
               (expand "sigma" + 1)
               (propax))))))))))))
    ("2"
     (hide 2)
     (hide -)
     (induct "dd")
     (("1" (grind)) ("2" (grind)) ("3" (grind))
      ("4" (skeep) (expand "sigma" +) (expand "*") (assert))))))


proof_type: t_proof
decl_type: tcc
library: Tarski
theory: poly_families
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (skeep)
   (skeep)
   (replaces -1)
   (assert)
   (hide -1)
   (lift-if)
   (assert)
   (lemma "polynomial_prod_int")
   (inst?)
   (ground))


proof_type: t_proof
decl_type: tcc
library: Tarski
theory: poly_families
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (skeep)
   (skeep)
   (skeep)
   (assert)
   (skeep)
   (assert)
   (replace -5)
   (hide -)
   (assert)
   (lift-if)
   (assert)
   (split)
   (("1" (propax))
    ("2"
     (flatten)
     (case "FORALL (dd:nat): rational_pred( sigma(0, dd, KF * GP)) AND
                  integer_pred(sigma(0, dd, KF * GP)) AND
                    sigma(0, dd, KF * GP) >= 0")
     (("1"
       (inst - "k-1")
       (("1"
         (flatten)
         (rewrite "rationals.closed_plus")
         (rewrite "integers.closed_plus")
         (assert))
        ("2" (assert))))
      ("2"
       (hide (2 3))
       (induct "dd")
       (("1" (grind)) ("2" (grind)) ("3" (grind))
        ("4"
         (skeep)
         (expand "sigma" +)
         (assert)
         (expand "*")
         (assert))))))))


proof_type: t_proof
decl_type: tcc
library: Tarski
theory: poly_families
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (assert)
   (skeep*)
   (case "FORALL (dd:nat): rational_pred( sigma(0, dd, KF * GP)) AND
                integer_pred(sigma(0, dd, KF * GP)) AND
                  sigma(0, dd, KF * GP) >= 0")
   (("1" (replace -6) (lift-if +) (assert) (inst - "k-1"))
    ("2"
     (hide-all-but 1)
     (induct "dd")
     (("1" (grind)) ("2" (grind)) ("3" (grind))
      ("4" (skeep) (expand "sigma" +) (expand "*") (assert))))))


proof_type: t_proof
decl_type: tcc
library: Tarski
theory: poly_families
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep*)
   (lemma "polynomial_prod_int")
   (inst?)
   (assert)
   (case "FORALL (dd:nat): rational_pred( sigma(0, dd, KF * GP)) AND
                integer_pred(sigma(0, dd, KF * GP)) AND
                  sigma(0, dd, KF * GP) >= 0")
   (("1" (inst - "k-1") (assert) (ground))
    ("2"
     (hide-all-but 1)
     (induct "dd")
     (("1" (grind)) ("2" (grind)) ("3" (grind))
      ("4" (skeep) (expand "sigma" +) (expand "*") (assert))))))


proof_type: t_proof
decl_type: tcc
library: Tarski
theory: poly_families
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep*)
   (assert)
   (case "FORALL (dd:nat): rational_pred( sigma(0, dd, KF * GP)) AND
                integer_pred(sigma(0, dd, KF * GP)) AND
                  sigma(0, dd, KF * GP) >= 0")
   (("1"
     (inst - "k-1")
     (assert)
     (flatten)
     (assert)
     (lift-if)
     (ground)
     (("1"
       (rewrite "rationals.closed_plus")
       (rewrite "rationals.closed_plus"))
      ("2"
       (rewrite "integers.closed_plus")
       (rewrite "integers.closed_plus")
       (rewrite "rationals.closed_plus"))
      ("3"
       (rewrite "rationals.closed_plus")
       (rewrite "rationals.closed_plus"))
      ("4"
       (rewrite "integers.closed_plus")
       (rewrite "integers.closed_plus")
       (rewrite "rationals.closed_plus"))))
    ("2"
     (hide-all-but 1)
     (induct "dd")
     (("1" (grind)) ("2" (grind)) ("3" (grind))
      ("4" (skeep) (expand "sigma" +) (expand "*") (assert))))))


proof_type: t_proof
decl_type: tcc
library: Tarski
theory: poly_families
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep*)
   (case "FORALL (dd:nat): rational_pred(sigma(0,dd,KF*GP)) AND integer_pred(sigma(0,dd,KF*GP)) AND sigma(0,dd,KF*GP)>=0")
   (("1"
     (label "rg3" -1)
     (hide "rg3")
     (copy -2)
     (label "tdegdef" -1)
     (hide "tdegdef")
     (assert)
     (assert)
     (case "NOT length[int](anspoly) - 1 = sigma[nat](0, k, *[nat](KF, GP))")
     (("1"
       (assert)
       (hide 2)
       (lift-if)
       (case "k = 0")
       (("1"
         (assert)
         (replaces -1)
         (assert)
         (case "GP(0)=2")
         (("1"
           (assert)
           (expand "sigma")
           (expand "sigma")
           (expand "*" +)
           (replace -1)
           (replace -8 1)
           (replace -4 1)
           (assert))
          ("2"
           (case "GP(0)=1")
           (("1"
             (assert)
             (replace -1)
             (expand "sigma" +)
             (expand "sigma" +)
             (expand "*" +)
             (replace -1)
             (replace -8 +)
             (replace -4 +)
             (assert))
            ("2"
             (case "GP(0)=0")
             (("1"
               (replace -1)
               (expand "sigma" +)
               (expand "sigma" +)
               (expand "*" +)
               (replace -1)
               (replace -8 +)
               (replace -4)
               (assert))
              ("2" (assert))))))))
        ("2"
         (assert)
         (ground)
         (("1"
           (replace -1)
           (replace -2 +)
           (assert)
           (expand "sigma" +)
           (expand "*" + 1)
           (replace -1)
           (assert))
          ("2"
           (replace -2)
           (replace -1 +)
           (expand "sigma" +)
           (expand "*" + 1)
           (replace -2)
           (assert))
          ("3"
           (case "NOT GP(k)=2")
           (("1" (assert))
            ("2"
             (replace -1)
             (replace -2 +)
             (expand "sigma" +)
             (expand "*" + 1)
             (replace -1)
             (assert))))))))
      ("2"
       (assert)
       (decompose-equality +)
       (name "p" "x!1")
       (replaces -1)
       (assert)
       (case "p >= length[int](anspoly)")
       (("1"
         (assert)
         (typepred "prod_polynomials(GF,KF,GP,k)")
         (inst -3 "p")
         (assert))
        ("2"
         (assert)
         (case "k = 0")
         (("1"
           (assert)
           (replace -1)
           (assert)
           (replace -9 +)
           (replace -5 2)
           (typepred "array2list[int](1+tdeg)(tpolyinit)")
           (inst? -3)
           (replace -3 :dir rl)
           (replace -6 2)
           (expand "prod_polynomials" +)
           (assert)
           (lift-if)
           (ground)
           (reveal "tdegdef")
           (assert)
           (replace -12 +)
           (case "p<=tdeg OR p>=1+tdeg")
           (("1" (ground))
            ("2"
             (flatten)
             (case "FORALL (aa1,bb2:int): aa1<=bb2 OR aa1>=bb2+1")
             (("1" (inst - "p" "tdeg") (ground))
              ("2" (hide-all-but 1) (grind))))))
          ("2"
           (assert)
           (case "GP(k)=0")
           (("1"
             (assert)
             (replace -9 +)
             (assert)
             (typepred "v(GF,KF,GP,k-1)")
             (expand "prod_polynomials" +)
             (replace -3)
             (assert))
            ("2"
             (assert)
             (replace -8 4)
             (typepred
              "array2list[int]
                                                    (1 + bdeg + tdeg)
                                                    (polynomial_prod(bpolyinit, bdeg, tpolyinit, tdeg))")
             (("1"
               (hide -1)
               (inst?)
               (replace -2 :dir rl)
               (case "GP(k)=1")
               (("1"
                 (assert)
                 (replace -1)
                 (replace -5 +)
                 (replace -6 +)
                 (replace -8 +)
                 (replace -9 +)
                 (assert)
                 (expand "prod_polynomials" + 1)
                 (expand "polynomial_prod" +)
                 (rewrite "sigma_eq")
                 (("1"
                   (hide 5)
                   (reveal "rg3")
                   (inst?)
                   (skosimp*)
                   (assert))
                  ("2" (skosimp*) (assert))
                  ("3"
                   (case "NOT GP(k)=2")
                   (("1"
                     (assert)
                     (replace -1)
                     (expand "prod_polynomials" + 1)
                     (skosimp*)
                     (assert))
                    ("2" (skosimp*) (assert))))))
                ("2"
                 (case "NOT GP(k)=2")
                 (("1" (assert))
                  ("2"
                   (replace -1)
                   (assert)
                   (replace -5 +)
                   (replace -6 +)
                   (replace -8 +)
                   (replace -9 +)
                   (assert)
                   (expand "prod_polynomials" + 1)
                   (propax))))))
              ("2" (replace -6 1) (reveal "rg3") (inst?))))))))))))
    ("2"
     (hide-all-but 1)
     (induct "dd")
     (("1" (grind)) ("2" (grind)) ("3" (grind))
      ("4" (skeep) (expand "sigma" +) (expand "*") (assert))))))


proof_type: t_proof
decl_type: tcc
library: Tarski
theory: poly_families
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (skeep)
   (skeep)
   (assert)
   (typepred "ll")
   (case "NOT d>=0")
   (("1"
     (case "FORALL (kz:nat): sigma(0,kz,KF*GP)>=0")
     (("1" (inst?) (assert))
      ("2"
       (hide-all-but 1)
       (induct "kz")
       (("1" (grind))
        ("2" (skeep) (expand "sigma" +) (expand "*") (assert))))))
    ("2"
     (assert)
     (decompose-equality -4)
     (assert)
     (inst - "d")
     (assert)
     (replace -7 -8)
     (assert)
     (replace -8)
     (typepred "prod_polynomials(GF, KF, GP, k)")
     (hide -1)
     (split -)
     (("1" (assert))
      ("2" (typepred "KF") (skeep) (inst - "i") (assert))))))


proof_type: t_proof
decl_type: tcc
library: Tarski
theory: poly_families
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (induct "k")
   (("1"
     (skeep)
     (assert)
     (expand "*")
     (assert)
     (split)
     (("1" (grind))
      ("2"
       (expand "sigma")
       (expand "sigma")
       (inst-cp - "0")
       (assert)
       (typepred "KF(0)")
       (expand "prod_polynomials")
       (lift-if)
       (ground)
       (("1" (expand "poly1" -2) (assert))
        ("2"
         (case "NOT GP(0)=2")
         (("1" (assert))
          ("2"
           (replace -1)
           (assert)
           (expand "polynomial_prod")
           (expand "max")
           (expand "sigma")
           (expand "sigma")
           (assert)
           (grind-reals))))))))
    ("2"
     (skolem 1 "k")
     (flatten)
     (skeep)
     (insteep -1)
     (assert)
     (split -)
     (("1"
       (assert)
       (expand "*")
       (flatten)
       (expand "sigma" 3 1)
       (assert)
       (assert)
       (expand "sigma" -)
       (expand "prod_polynomials" -)
       (lift-if)
       (ground)
       (("1"
         (expand "polynomial_prod")
         (replace -1)
         (assert)
         (expand "*")
         (assert)
         (expand "sigma" -2 1)
         (expand "sigma" -2 1)
         (inst-cp - "1+k")
         (assert))
        ("2"
         (case "NOT GP(1+k)=2")
         (("1" (assert))
          ("2"
           (replace -1)
           (assert)
           (expand "polynomial_prod")
           (expand "max")
           (expand "*")
           (assert)
           (expand "sigma" - 1)
           (expand "sigma" - 1)
           (assert)
           (expand "sigma" -2 2)
           (expand "sigma" -2 2)
           (inst - "1+k")
           (flatten)
           (assert)
           (lemma "nzreal_times_nzreal_is_nzreal")
           (inst?)
           (assert))))))
      ("2" (skeep) (inst - "i") (assert))))))


proof_type: t_proof
decl_type: tcc
library: Tarski
theory: poly_families
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (invoke (name "AA" "%1") (! 1 1))
   (replaces -1)
   (lemma "finite_subset[real]")
   (inst - "Sol(a,n,poly1,0,>,0,1,false,false)" "AA")
   (assert)
   (hide 2)
   (expand "subset?")
   (expand "member")
   (skeep)
   (assert)
   (expand "AA")
   (expand "Sol")
   (flatten)
   (assert)
   (hide -)
   (grind))


proof_type: t_proof
decl_type: tcc
library: Tarski
theory: poly_families
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (case "NOT FORALL (GP,k): GP(k)=0 OR GP(k)=1 OR GP(k)=2")
   (("1" (hide 2) (grind))
    ("2"
     (case "NOT FORALL (RelF,k): RelF(k)=0 OR RelF(k)=-1 OR RelF(k)=1")
     (("1" (hide 2) (grind))
      ("2"
       (induct "k")
       (("1" (skeep) (inst - "RelF" "0") (inst - "GP" "0") (grind))
        ("2"
         (skeep)
         (skeep)
         (expand "product" +)
         (inst - "GP" "RelF")
         (flatten)
         (assert)
         (rewrite "integers.closed_times")
         (("1"
           (rewrite "rationals.closed_times")
           (("1"
             (inst - "RelF" "1+j")
             (inst - "GP" "1+j")
             (deftactic spritz
              (then (ground) (replaces -1) (replaces -1)
               (grind :exclude "product")))
             (spritz))
            ("2" (skosimp*) (assert))))
          ("2" (skosimp*) (assert))))
        ("3" (skosimp*) (assert)) ("4" (skosimp*) (assert))
        ("5" (skosimp*) (assert)) ("6" (skosimp*) (assert))))))))


proof_type: t_proof
decl_type: tcc
library: Tarski
theory: poly_families
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (case "FORALL (k: nat, i: nat,d5:nat, p: nat):
                 p <= k AND i<=d5 IMPLIES 0 <= base_n(3, i)(k - p) AND base_n(3, i)(k - p) <= 2")
   (("1" (skeep) (inst - "k" "i" "i" "p") (assert))
    ("2"
     (hide 2)
     (induct "d5")
     (("1" (grind))
      ("2"
       (skeep)
       (skeep)
       (case "NOT i = j+1")
       (("1" (inst - "k" "i" "p") (assert))
        ("2"
         (replace -1)
         (hide -4)
         (assert)
         (inst-cp - "k" "j" "p")
         (assert)
         (flatten)
         (expand "base_n" +)
         (lift-if)
         (assert)
         (ground)
         (inst - "k" "(1 - mod(1 + j, 3) + j) / 3" "p+1")
         (("1" (assert)) ("2" (hide 3) (expand "mod" 1) (assert))))))
      ("3" (hide 2) (skosimp*) (assert))
      ("4" (hide 2) (skosimp*) (assert))))
    ("3" (hide 2) (skosimp*) (assert))
    ("4" (hide 2) (skosimp*) (assert))))


proof_type: t_proof
decl_type: tcc
library: Tarski
theory: poly_families
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (skeep)
   (assert)
   (typepred "v(k - 1, setseq)")
   (expand "union")
   (expand "member")
   (inst - "x")
   (ground)
   (("1" (skeep) (inst + "i")) ("2" (skeep) (inst + "i"))
    ("3" (inst + "k")) ("4" (skeep) (inst + "i") (assert))))


proof_type: t_proof
decl_type: tcc
library: Tarski
theory: poly_families
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (split)
   (("1" (grind))
    ("2" (skeep) (expand "split_index_fun_entry") (lift-if) (propax))))


proof_type: t_proof
decl_type: tcc
library: Tarski
theory: poly_families
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (assert)
   (split)
   (("1"
     (typepred "v(split_index_fun_entry(F, n), n - 1)")
     (skeep)
     (case "NOT i = n")
     (("1"
       (inst - "i")
       (("1"
         (assert)
         (replaces -1)
         (expand "split_index_fun_entry")
         (lift-if)
         (propax))
        ("2" (assert))))
      ("2" (inst -3 "i") (("1" (assert)) ("2" (assert))))))
    ("2"
     (skeep)
     (typepred "v(split_index_fun_entry(F, n), n - 1)")
     (inst -2 "i")
     (assert)
     (replace -2)
     (expand "split_index_fun_entry")
     (lift-if)
     (propax))))


proof_type: t_proof
decl_type: tcc
library: Tarski
theory: poly_families
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp*)
   (inst + "x1!1")
   (("1" (ground))
    ("2"
     (assert)
     (lemma "base_n_0")
     (inst?)
     (assert)
     (assert)
     (lemma "both_sides_expt_gt1_le_aux")
     (inst - "6" "k!1" "x1!1-1")
     (expand "^")
     (assert))))


proof_type: t_proof
decl_type: tcc
library: Tarski
theory: poly_families
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp*)
   (inst + "x1!1")
   (("1" (ground))
    ("2"
     (lemma "base_n_0")
     (inst?)
     (assert)
     (assert)
     (assert)
     (lemma "both_sides_expt_gt1_le_aux")
     (inst - "6" "k!1" "x1!1-1")
     (expand "^")
     (assert))))


proof_type: t_proof
decl_type: tcc
library: Tarski
theory: poly_families
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (case "FORALL (d:nat): d<=k IMPLIES LET AA = product[nat]
                                 (0, d,
                                  LAMBDA (j):
                                    sign_coeff6_zero_entry(k, TQRow, i, j)) IN (AA=-1 OR AA=0 OR AA=1)")
   (("1" (inst - "k") (assert) (ground))
    ("2"
     (hide 3)
     (induct "d")
     (("1" (assert)) ("2" (assert)) ("3" (assert))
      ("4"
       (flatten)
       (assert)
       (expand "product")
       (expand "product")
       (expand "sign_coeff6_zero_entry")
       (lift-if)
       (assert)
       (assert)
       (ground))
      ("5"
       (skolem 1 "d")
       (flatten)
       (assert)
       (expand "product" +)
       (expand "sign_coeff6_zero_entry" 1 1)
       (expand "sign_coeff6_zero_entry" 2 1)
       (expand "sign_coeff6_zero_entry" 3 1)
       (lift-if)
       (assert)
       (assert)
       (ground))))))


proof_type: f_proof
decl_type: formula
library: Tarski
theory: tarski_query
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (expand "restrict")
   (expand "NSol")
   (case "Sol(a, n, polynomial_prod(g, k, g, k), 2 * k, >)=Sol(a, n, g, k, LAMBDA (s: [real, real]): /=(s))")
   (("1" (assert))
    ("2"
     (hide 3)
     (decompose-equality)
     (expand "Sol")
     (rewrite "polynomial_prod_def" :dir rl)
     (iff)
     (typepred "sq(polynomial(g,k)(x!1))")
     (lemma "sq_eq_0")
     (inst?)
     (expand "sq")
     (ground))))


proof_type: f_proof
decl_type: formula
library: Tarski
theory: tarski_query
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 "empty?")
   (expand "member")
   (skosimp*)
   (expand "Sol")
   (rewrite "polynomial_prod_def" :dir rl)
   (flatten)
   (typepred "sq(polynomial(g,k)(x!1))")
   (expand "sq")
   (assert))


proof_type: f_proof
decl_type: formula
library: Tarski
theory: tarski_query
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 "empty?")
   (expand "member")
   (skosimp*)
   (expand "Sol")
   (flatten)
   (expand "polynomial" -2)
   (expand "sigma")
   (expand "sigma")
   (expand "poly1")
   (assert))


proof_type: f_proof
decl_type: formula
library: Tarski
theory: tarski_query
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (rewrite "full_matrix_eq")
   (invoke (case "NOT %1") (! 3 1))
   (("1" (hide 4) (rewrite "rows_mult") (assert))
    ("2"
     (assert)
     (invoke (case "NOT %1") (! 3 1))
     (("1"
       (assert)
       (hide 4)
       (rewrite "columns_mult")
       (("1" (assert)) ("2" (hide-all-but -1) (expand "A3") (propax))))
      ("2"
       (assert)
       (skeep)
       (typepred "i")
       (rewrite "rows_mult")
       (typepred "j")
       (rewrite "columns_mult")
       (("1"
         (assert)
         (case "NOT j = 0")
         (("1" (assert))
          ("2"
           (replace -1)
           (assert)
           (case "NOT (i = 0 OR i = 1 OR i = 2)")
           (("1" (flatten) (assert))
            ("2"
             (split)
             (("1"
               (replace -1)
               (assert)
               (rewrite "entry_mult" +)
               (expand "row" + 1)
               (assert)
               (expand "A3" +)
               (assert)
               (expand "length" + 1)
               (assert)
               (expand "length" + 1)
               (expand "length" + 1)
               (expand "length" + 1)
               (expand "nth" + 1)
               (expand "*" +)
               (rewrite "dot_eq_sigma")
               (rewrite "length_col")
               (expand "length" + 1)
               (expand "length" + 1)
               (expand "length" + 1)
               (expand "length" + 1)
               (expand "min")
               (assert)
               (expand "sigma")
               (expand "sigma")
               (expand "sigma")
               (expand "sigma")
               (rewrite "access_col")
               (rewrite "access_col")
               (rewrite "access_col")
               (expand "access" + 1)
               (expand "length" +)
               (expand "length" +)
               (expand "length" +)
               (expand "nth" +)
               (expand "access" + 2)
               (expand "length" +)
               (expand "length" +)
               (expand "length" +)
               (expand "nth" +)
               (expand "nth" +)
               (expand "access" + 2)
               (expand "length" +)
               (expand "length" +)
               (expand "length" +)
               (expand "nth" +)
               (expand "nth" +)
               (expand "nth" +)
               (assert)
               (expand "access")
               (rewrite "length_row")
               (rewrite "length_row")
               (assert)
               (expand "row")
               (assert)
               (typepred "TQ_vect3(a,n,g,k)")
               (expand "rows" -5)
               (assert)
               (expand "TQ_vect3" +)
               (expand "nth" + 2)
               (expand "nth" + 1)
               (expand "nth" + 2)
               (expand "nth" + 2)
               (expand "nth" + 2)
               (expand "nth" + 1)
               (expand "entry" +)
               (expand "access" +)
               (rewrite "length_row" +)
               (assert)
               (expand "NSol_vect3" +)
               (expand "row" +)
               (assert)
               (expand "length" +)
               (expand "length" +)
               (expand "length" +)
               (expand "length" +)
               (expand "nth" + 2)
               (expand "nth" + 1)
               (expand "restrict")
               (lemma "TQ_def")
               (inst - "a" "poly1" "0" "n")
               (assert)
               (split -1)
               (("1"
                 (replaces -1)
                 (lemma "TQ_def")
                 (inst?)
                 (assert)
                 (split -1)
                 (("1"
                   (replace -1)
                   (assert)
                   (rewrite "NSol_squared_gt")
                   (expand "restrict")
                   (rewrite "NSol_squared_lt")
                   (assert)
                   (rewrite "NSol_poly1_lt")
                   (assert)
                   (invoke (both-sides "+" "%1" 3) (! 3 1 2))
                   (assert)
                   (lemma "card_disj_union[real]")
                   (expand "NSol" +)
                   (rewrite -1 + :dir rl)
                   (("1"
                     (hide -1)
                     (case "Sol(a, n, poly1, 0, >) =union(Sol(a, n, g, k, LAMBDA (s: [real, real]): =(s)),
                                                                                               Sol(a, n, g, k, LAMBDA (s: [real, real]): /=(s)))")
                     (("1" (assert))
                      ("2"
                       (hide 4)
                       (decompose-equality 1)
                       (expand "Sol" +)
                       (expand "union")
                       (expand "member" +)
                       (case "polynomial(poly1,0)(x!1)>0")
                       (("1" (assert) (iff) (ground))
                        ("2"
                         (expand "poly1" 1)
                         (hide-all-but 1)
                         (grind))))))
                    ("2"
                     (hide-all-but 1)
                     (expand "disjoint?")
                     (expand "empty?")
                     (skeep)
                     (expand "member")
                     (expand "intersection")
                     (expand "member")
                     (expand "Sol")
                     (ground))))
                  ("2"
                   (expand "polynomial_prod" 1)
                   (expand "max")
                   (expand "sigma")
                   (expand "sigma")
                   (assert)
                   (lemma "nzreal_times_nzreal_is_nzreal")
                   (inst?)
                   (assert))))
                ("2" (expand "poly1") (assert))))
              ("2"
               (replace -1)
               (assert)
               (rewrite "entry_mult" +)
               (expand "row" + 1)
               (assert)
               (expand "A3" +)
               (assert)
               (expand "length" + 1)
               (assert)
               (expand "length" + 1)
               (expand "length" + 1)
               (expand "length" + 1)
               (expand "nth" + 1)
               (expand "nth" + 1)
               (expand "*" +)
               (rewrite "dot_eq_sigma")
               (rewrite "length_col")
               (expand "length" + 1)
               (expand "length" + 1)
               (expand "length" + 1)
               (expand "length" + 1)
               (expand "min")
               (assert)
               (expand "sigma")
               (expand "sigma")
               (expand "sigma")
               (expand "sigma")
               (rewrite "access_col")
               (rewrite "access_col")
               (rewrite "access_col")
               (expand "access" + 1)
               (expand "length" +)
               (expand "length" +)
               (expand "length" +)
               (expand "nth" +)
               (expand "access" + 2)
               (rewrite "length_row")
               (assert)
               (expand "access" + 1)
               (expand "length" +)
               (expand "length" +)
               (expand "length" +)
               (expand "access" + 1)
               (expand "length" +)
               (expand "length" +)
               (expand "length" +)
               (expand "TQ_vect3" +)
               (expand "row")
               (expand "access")
               (expand "length" + 1)
               (expand "length" + 1)
               (expand "length" + 1)
               (expand "length" + 1)
               (expand "length" + 1)
               (expand "length" + 1)
               (expand "length" + 1)
               (expand "length" + 1)
               (assert)
               (expand "nth" + 1)
               (expand "nth" + 1)
               (expand "nth" + 2)
               (expand "nth" + 2)
               (expand "nth" + 2)
               (expand "nth" + 2)
               (expand "nth" + 2)
               (assert)
               (expand "nth" + 1)
               (expand "nth" + 1)
               (expand "nth" + 1)
               (expand "nth" + 1)
               (expand "length" + 1)
               (expand "nth" + 2)
               (expand "nth" + 2)
               (expand "nth" + 2)
               (expand "nth" + 1)
               (expand "NSol_vect3" +)
               (expand "restrict")
               (expand "entry")
               (expand "row")
               (expand "length" + 1)
               (expand "length" + 1)
               (expand "length" + 1)
               (expand "length" + 1)
               (expand "nth" +)
               (expand "nth" +)
               (expand "access")
               (expand "length" + 1)
               (expand "nth")
               (lemma "TQ_def")
               (inst?)
               (assert)
               (split -1)
               (("1"
                 (replaces -1)
                 (lemma "TQ_def")
                 (inst?)
                 (assert)
                 (replaces -1)
                 (assert)
                 (rewrite "NSol_squared_lt")
                 (rewrite "NSol_squared_gt")
                 (expand "restrict")
                 (assert)
                 (expand "NSol")
                 (case "Sol(a, n, g, k, LAMBDA (s: [real, real]): /=(s)) = union(Sol(a, n, g, k, >),Sol(a, n, g, k, <))")
                 (("1"
                   (lemma "card_disj_union[real]")
                   (inst?)
                   (split -1)
                   (("1" (replace -2 :dir rl) (replace -1) (assert))
                    ("2"
                     (hide 4)
                     (expand "disjoint?")
                     (expand "empty?")
                     (expand "intersection")
                     (expand "member")
                     (skosimp*)
                     (expand "Sol")
                     (ground))))
                  ("2"
                   (hide 4)
                   (decompose-equality 1)
                   (expand "union")
                   (expand "member")
                   (expand "Sol")
                   (iff)
                   (ground))))
                ("2"
                 (flatten)
                 (expand "polynomial_prod")
                 (expand "max")
                 (expand "sigma")
                 (expand "sigma")
                 (lemma "nzreal_times_nzreal_is_nzreal")
                 (inst?)
                 (assert))))
              ("3"
               (replace -1)
               (assert)
               (rewrite "entry_mult" +)
               (expand "row" + 1)
               (assert)
               (expand "A3" +)
               (assert)
               (expand "length" + 1)
               (assert)
               (expand "length" + 1)
               (expand "length" + 1)
               (expand "length" + 1)
               (expand "nth" + 1)
               (expand "nth" + 1)
               (expand "*" +)
               (rewrite "dot_eq_sigma")
               (rewrite "length_col")
               (expand "nth" + 1)
               (expand "length" + 1)
               (expand "length" + 1)
               (expand "length" + 1)
               (expand "length" + 1)
               (expand "min")
               (expand "sigma")
               (expand "sigma")
               (expand "sigma")
               (expand "sigma")
               (rewrite "access_col")
               (rewrite "access_col")
               (rewrite "access_col")
               (expand "access" + 1)
               (expand "nth" + 1)
               (expand "length" +)
               (expand "length" +)
               (expand "length" +)
               (expand "nth" + 1)
               (expand "NSol_vect3")
               (hide -)
               (grind :exclude ("TQ" "NSol"))
               (rewrite "TQ_def")
               (("1"
                 (rewrite "TQ_def")
                 (assert)
                 (rewrite "NSol_squared_lt")
                 (rewrite "NSol_squared_gt")
                 (expand "restrict")
                 (expand "NSol")
                 (case "Sol(a, n, g, k, LAMBDA (s: [real, real]): /=(s)) = union(Sol(a, n, g, k,>),Sol(a,n,g,k,<))")
                 (("1"
                   (lemma "card_disj_union[real]")
                   (inst?)
                   (assert)
                   (expand "disjoint?" 1)
                   (expand "empty?")
                   (expand "intersection")
                   (expand "member")
                   (skosimp*)
                   (expand "Sol" (-1 -2))
                   (flatten)
                   (name "ZZP" "polynomial(g,k)(x!1)")
                   (replaces -1)
                   (assert))
                  ("2"
                   (hide 4)
                   (expand "Sol")
                   (expand "union")
                   (expand "member")
                   (name "RD" "polynomial(a,n)")
                   (replaces -1)
                   (name "D65" "polynomial(g,k)")
                   (replaces -1)
                   (decompose-equality 1)
                   (iff)
                   (ground))))
                ("2"
                 (lemma "nzreal_times_nzreal_is_nzreal")
                 (inst?)
                 (assert))))))))))
        ("2"
         (hide-all-but -1)
         (typepred "A3")
         (expand "rows")
         (expand "length")
         (assert))))))
    ("3" (assert)) ("4" (assert))))


proof_type: f_proof
decl_type: formula
library: Tarski
theory: tarski_query
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (rewrite "full_matrix_eq")
   (invoke (case "NOT %1") (! 3 1))
   (("1" (hide 2) (rewrite "rows_mult") (assert))
    ("2"
     (assert)
     (invoke (case "NOT %1") (! 3 1))
     (("1"
       (hide 2)
       (rewrite "columns_mult")
       (("1" (assert)) ("2" (hide-all-but -1) (expand "A6") (propax))))
      ("2"
       (assert)
       (skeep)
       (typepred "i")
       (rewrite "rows_mult")
       (typepred "j")
       (rewrite "columns_mult")
       (("1"
         (assert)
         (case "NOT j = 0")
         (("1" (assert))
          ("2"
           (replace -1)
           (assert)
           (case "NOT (i = 0 OR i = 1 OR i = 2 OR i = 3 OR i = 4 OR i = 5)")
           (("1" (flatten) (assert))
            ("2"
             (split)
             (("1"
               (replace -1)
               (hide -)
               (grind :exclude ("TQ" "NSol"))
               (expand "restrict")
               (rewrite "TQ_def")
               (rewrite "TQ_def")
               (("1"
                 (assert)
                 (rewrite "NSol_squared_lt")
                 (rewrite "NSol_squared_gt")
                 (expand "restrict")
                 (rewrite "NSol_poly1_lt")
                 (assert)
                 (expand "NSol")
                 (case "Sol(a, n, poly1, 0, >) =union(Sol(a, n, g, k, LAMBDA (s: [real, real]): =(s)),
                                                                                                                                                                                               Sol(a, n, g, k, LAMBDA (s: [real, real]): /=(s)))")
                 (("1"
                   (assert)
                   (lemma "card_disj_union[real]")
                   (inst?)
                   (assert)
                   (hide-all-but 1)
                   (expand "disjoint?")
                   (expand "empty?")
                   (skeep)
                   (expand "member")
                   (expand "intersection")
                   (expand "member")
                   (expand "Sol")
                   (ground))
                  ("2"
                   (hide 4)
                   (expand "union")
                   (expand "member")
                   (name "AB" "Sol(a, n, poly1, 0, >)")
                   (replaces -1)
                   (name "ABC"
                         "Sol(a, n, g, k, LAMBDA (s: [real, real]): =(s))")
                   (replaces -1)
                   (name "ABCD"
                         "Sol(a, n, g, k, LAMBDA (s: [real, real]): /=(s))")
                   (replaces -1)
                   (decompose-equality 1)
                   (iff)
                   (expand "ABC")
                   (expand "ABCD")
                   (expand "AB")
                   (expand "Sol")
                   (ground))))
                ("2" (real-props))))
              ("2"
               (replace -1)
               (hide -)
               (grind :exclude ("TQ" "NSol"))
               (rewrite "TQ_def")
               (("1"
                 (rewrite "TQ_def")
                 (assert)
                 (rewrite "NSol_squared_lt")
                 (rewrite "NSol_squared_gt")
                 (expand "restrict")
                 (case "Sol(a, n, g, k, LAMBDA (s: [real, real]): /=(s)) = union(Sol(a, n, g, k, >) ,Sol(a, n, g, k, <))")
                 (("1"
                   (expand "NSol")
                   (assert)
                   (lemma "card_disj_union[real]")
                   (inst?)
                   (assert)
                   (hide-all-but 1)
                   (expand "disjoint?")
                   (expand "empty?")
                   (skeep)
                   (expand "member")
                   (expand "intersection")
                   (expand "member")
                   (expand "Sol")
                   (flatten)
                   (grind :exclude "polynomial"))
                  ("2"
                   (hide 4)
                   (expand "union")
                   (expand "member")
                   (grind :exclude "polynomial")
                   (decompose-equality 1)
                   (iff)
                   (ground))))
                ("2" (real-props))))
              ("3"
               (replace -1)
               (hide -)
               (grind :exclude ("TQ" "NSol"))
               (rewrite "TQ_def")
               (("1"
                 (rewrite "TQ_def")
                 (assert)
                 (rewrite "NSol_squared_lt")
                 (rewrite "NSol_squared_gt")
                 (expand "restrict")
                 (case "Sol(a, n, g, k, LAMBDA (s: [real, real]): /=(s)) = union(Sol(a, n, g, k, >) ,Sol(a, n, g, k, <))")
                 (("1"
                   (lemma "card_disj_union[real]")
                   (expand "NSol")
                   (inst?)
                   (assert)
                   (hide-all-but 1)
                   (expand "disjoint?")
                   (expand "empty?")
                   (skeep)
                   (expand "member")
                   (expand "intersection")
                   (expand "member")
                   (expand "Sol")
                   (flatten)
                   (grind :exclude "polynomial"))
                  ("2"
                   (hide 4)
                   (expand "union")
                   (expand "member")
                   (grind :exclude "polynomial")
                   (decompose-equality 1)
                   (iff)
                   (ground))))
                ("2" (real-props))))
              ("4"
               (replace -1)
               (hide -)
               (grind :exclude ("TQ" "NSol"))
               (expand "restrict")
               (rewrite "TQ_def")
               (("1"
                 (rewrite "NSol_squared_lt")
                 (rewrite "NSol_squared_gt")
                 (expand "restrict")
                 (propax))
                ("2" (real-props))))
              ("5"
               (replace -1)
               (hide -)
               (grind :exclude ("TQ" "NSol"))
               (rewrite "TQ_def")
               (rewrite "TQ_def")
               (rewrite "TQ_def")
               (("1"
                 (assert)
                 (rewrite "NSol_squared_lt")
                 (rewrite "NSol_squared_gt")
                 (expand "restrict")
                 (rewrite "NSol_poly1_lt")
                 (assert)
                 (expand "NSol")
                 (case "Sol(a, n, g, k, LAMBDA (s: [real, real]): /=(s)) = union(Sol(a, n, g, k, >) ,Sol(a, n, g, k, <))")
                 (("1"
                   (lemma "card_disj_union[real]")
                   (inst?)
                   (assert)
                   (split -1)
                   (("1"
                     (replace -2)
                     (replace -1)
                     (assert)
                     (case "card(Sol(a, n, poly1, 0, >)) - card(Sol(a, n, g, k, <))=card(Sol(a, n, g, k, >=))")
                     (("1" (assert))
                      ("2"
                       (hide 4)
                       (hide -)
                       (case "Sol(a, n, poly1, 0, >) = union(Sol(a, n, g, k, <),Sol(a, n, g, k, >=))")
                       (("1"
                         (lemma "card_disj_union[real]")
                         (inst?)
                         (assert)
                         (hide-all-but 1)
                         (expand "disjoint?")
                         (expand "empty?")
                         (skeep)
                         (expand "member")
                         (expand "intersection")
                         (expand "member")
                         (expand "Sol")
                         (grind :exclude "polynomial"))
                        ("2"
                         (hide 2)
                         (grind :exclude "polynomial")
                         (decompose-equality 1)
                         (iff)
                         (case "polynomial(poly1,0)(x!1) > 0")
                         (("1" (ground)) ("2" (hide 2) (grind))))))))
                    ("2"
                     (hide-all-but 1)
                     (expand "disjoint?")
                     (expand "empty?")
                     (skeep)
                     (expand "member")
                     (expand "intersection")
                     (expand "member")
                     (expand "Sol")
                     (grind :exclude "polynomial"))))
                  ("2"
                   (hide 4)
                   (expand "union")
                   (expand "member")
                   (grind :exclude "polynomial")
                   (decompose-equality 1)
                   (iff)
                   (ground))))
                ("2" (real-props))))
              ("6"
               (replace -1)
               (hide -)
               (grind :exclude ("TQ" "NSol"))
               (rewrite "TQ_def")
               (rewrite "TQ_def")
               (("1"
                 (rewrite "TQ_def")
                 (assert)
                 (rewrite "NSol_squared_lt")
                 (rewrite "NSol_squared_gt")
                 (expand "restrict")
                 (assert)
                 (rewrite "NSol_poly1_lt")
                 (assert)
                 (case "Sol(a, n, g, k, LAMBDA (s: [real, real]): /=(s)) = union(Sol(a, n, g, k, >) ,Sol(a, n, g, k, <))")
                 (("1"
                   (lemma "card_disj_union[real]")
                   (inst?)
                   (expand "NSol")
                   (assert)
                   (split -1)
                   (("1"
                     (replaces -2)
                     (replaces -1)
                     (assert)
                     (case "Sol(a, n, poly1, 0, >) = union(Sol(a, n, g, k, >),Sol(a, n, g, k, <=))")
                     (("1"
                       (lemma "card_disj_union[real]")
                       (inst?)
                       (assert)
                       (hide-all-but 1)
                       (expand "disjoint?")
                       (expand "empty?")
                       (skeep)
                       (expand "member")
                       (expand "intersection")
                       (expand "member")
                       (expand "Sol")
                       (grind :exclude "polynomial"))
                      ("2"
                       (hide 4)
                       (expand "union")
                       (expand "member")
                       (grind :exclude "polynomial")
                       (decompose-equality 1)
                       (iff)
                       (ground)
                       (("1" (hide -) (grind)) ("2" (hide -) (grind))))))
                    ("2"
                     (hide-all-but 1)
                     (expand "disjoint?")
                     (expand "empty?")
                     (skeep)
                     (expand "member")
                     (expand "intersection")
                     (expand "member")
                     (expand "Sol")
                     (grind :exclude "polynomial"))))
                  ("2"
                   (hide 4)
                   (expand "union")
                   (expand "member")
                   (grind :exclude "polynomial")
                   (decompose-equality 1)
                   (iff)
                   (ground))))
                ("2" (real-props))))))))))
        ("2" (hide-all-but -1) (grind))))))
    ("3" (assert)) ("4" (assert))))


proof_type: t_proof
decl_type: tcc
library: Tarski
theory: tarski_query
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (deftactic jingle
    (then (replaces -1) (replaces -1) (repeat (expand "nth"))
     (repeat (expand "length"))))
   (split)
   (("1"
     (flatten)
     (skosimp*)
     (case "i!1 = 0 OR i!1 = 1 OR i!1 = 2")
     (("1"
       (case "j!1 = 0 OR j!1 = 1 OR j!1 = 2")
       (("1"
         (ground)
         (("1" (jingle)) ("2" (jingle)) ("3" (jingle)) ("4" (jingle))
          ("5" (jingle)) ("6" (jingle))))
        ("2"
         (hide 2)
         (hide 2)
         (typepred "j!1")
         (hide-all-but (-1 1))
         (grind))))
      ("2" (hide 3) (hide 2) (typepred "i!1") (grind))))
    ("2" (grind)) ("3" (grind)) ("4" (grind)) ("5" (grind))))


proof_type: t_proof
decl_type: tcc
library: Tarski
theory: tarski_query
signature: nil
run_date: Unknown date
run_time: ----
status: proved-incomplete
description: nil
script:
  (""
   (split)
   (("1"
     (flatten)
     (hide 1)
     (skosimp*)
     (case "NOT (i!1 = 0 OR i!1 = 1 OR i!1 = 2)")
     (("1" (ground) (hide 4) (typepred "i!1") (grind))
      ("2"
       (case "NOT (j!1 = 0 OR j!1 = 1 OR j!1 = 2)")
       (("1" (hide -1) (hide 2) (flatten) (typepred "j!1") (grind))
        ("2"
         (deftactic izp (then (ground) (repeat (replaces -1)) (grind)))
         (izp))))))
    ("2" (grind)) ("3" (grind)) ("4" (grind)) ("5" (grind)) ("6" (grind))
    ("7" (eval-formula 1))))


proof_type: t_proof
decl_type: tcc
library: Tarski
theory: tarski_query
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (expand "polynomial_prod")
   (skeep)
   (skeep)
   (case "FORALL (GB:[nat->int],jj,kk:nat):
                 rational_pred(sigma(jj,kk,
                                     GB))
                  AND
                  integer_pred(sigma(jj,kk,
                                     GB))")
   (("1" (inst?) (("1" (assert)) ("2" (skeep) (assert))))
    ("2"
     (hide 2)
     (induct "kk")
     (("1" (skeep) (expand "sigma") (expand "sigma") (propax))
      ("2"
       (skeep)
       (skeep)
       (inst - "GB" "jj")
       (expand "sigma" +)
       (flatten)
       (assert)
       (lift-if)
       (assert)
       (ground)
       (("1"
         (case "FORALL (rd:int): rational_pred(GB(1+j)+rd)")
         (("1" (rewrite -1)) ("2" (skeep) (assert))))
        ("2"
         (case "FORALL (rd:int): integer_pred(GB(1+j)+rd)")
         (("1" (rewrite -1)) ("2" (skeep) (assert))))))))))


proof_type: t_proof
decl_type: tcc
library: Tarski
theory: tarski_query
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (expand "polynomial_prod")
   (expand "max")
   (expand "sigma")
   (expand "sigma")
   (typepred "k")
   (real-props))


proof_type: t_proof
decl_type: tcc
library: Tarski
theory: tarski_query
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (deftactic jiffy
    (then (replaces -1) (replaces -1) (repeat (expand "nth"))
     (repeat (expand "length")) (ground)))
   (split)
   (("1"
     (flatten)
     (skosimp*)
     (case "i!1 = 0 OR i!1 = 1 OR i!1 = 2")
     (("1"
       (case "j!1 = 0 OR j!1 = 1 OR j!1 =2")
       (("1"
         (ground)
         (("1" (jiffy)) ("2" (jiffy)) ("3" (jiffy)) ("4" (jiffy))
          ("5" (jiffy)) ("6" (jiffy))))
        ("2" (hide (2 3)) (typepred "j!1") (jiffy))))
      ("2" (hide (2 3)) (typepred "i!1") (jiffy))))
    ("2" (grind :exclude ("TQ" "polynomial_prod")))
    ("3" (grind :exclude ("TQ" "polynomial_prod")))
    ("4" (grind :exclude ("TQ" "polynomial_prod")))
    ("5" (grind :exclude ("TQ" "polynomial_prod")))))


proof_type: t_proof
decl_type: tcc
library: Tarski
theory: tarski_query
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (deftactic jiffy
    (then (replaces -1) (replaces -1) (repeat (expand "nth"))
     (repeat (expand "length")) (ground)))
   (split)
   (("1"
     (flatten)
     (skosimp*)
     (case "i!1 = 0 OR i!1 = 1 OR i!1 = 2")
     (("1"
       (case "j!1 = 0 OR j!1 = 1 OR j!1 =2")
       (("1"
         (ground)
         (("1" (jiffy)) ("2" (jiffy)) ("3" (jiffy)) ("4" (jiffy))
          ("5" (jiffy)) ("6" (jiffy))))
        ("2" (hide (2 3)) (typepred "j!1") (jiffy))))
      ("2" (hide (2 3)) (typepred "i!1") (jiffy))))
    ("2" (grind)) ("3" (grind)) ("4" (grind)) ("5" (grind))))


proof_type: t_proof
decl_type: tcc
library: Tarski
theory: tarski_query
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (deftactic flipper
    (then (replaces -1) (replaces -1) (repeat (expand "nth"))
     (repeat (expand "length")) (assert)))
   (split)
   (("1"
     (flatten)
     (skeep)
     (case "i = 0 OR i = 1 OR i = 2 OR i = 3 OR i = 4 OR i = 5")
     (("1"
       (case "j = 0 OR j = 1 OR j = 2 OR j = 3 OR j = 4 OR j = 5")
       (("1"
         (hide 1)
         (deftactic skipper (then (split -) (split -) (flipper)))
         (skipper))
        ("2" (hide-all-but 1) (typepred "j") (grind))))
      ("2" (hide-all-but 1) (typepred "i") (grind))))
    ("2" (grind)) ("3" (grind)) ("4" (grind)) ("5" (grind))))


proof_type: t_proof
decl_type: tcc
library: Tarski
theory: tarski_query
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (split)
   (("1"
     (flatten)
     (hide 1)
     (deftactic flipper
      (then (replaces -1) (replaces -1) (repeat (expand "nth"))
       (repeat (expand "length")) (assert)))
     (skeep)
     (case "i = 0 OR i = 1 OR i = 2 OR i = 3 OR i = 4 OR i = 5")
     (("1"
       (case "j = 0 OR j = 1 OR j = 2 OR j = 3 OR j = 4 OR j = 5")
       (("1"
         (deftactic skipper (then (split -) (split -) (flipper)))
         (skipper))
        ("2" (hide-all-but 1) (typepred "j") (grind :exclude "NSol"))))
      ("2" (hide 2) (typepred "i") (grind :exclude "NSol"))))
    ("2" (grind :exclude "NSol")) ("3" (grind :exclude "NSol"))
    ("4" (grind :exclude "NSol")) ("5" (grind :exclude "NSol"))))


proof_type: f_proof
decl_type: formula
library: Tarski
theory: tarski_query_matrix
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (case "2<3^(1+k) AND 3^(1+k)<6^(1+k)")
   (("1"
     (label "2lem" -1)
     (hide "2lem")
     (rewrite "full_matrix_eq" +)
     (invoke (case "NOT %1") (! 2 1))
     (("1"
       (hide 3)
       (rewrite "rows_mult")
       (assert)
       (lemma "tensor_power_rows_alt")
       (inst?)
       (replaces -1 :dir rl)
       (assert))
      ("2"
       (replace -1)
       (invoke (case "NOT %1") (! 2 1))
       (("1"
         (hide (-1 3))
         (rewrite "columns_mult")
         (("1" (assert))
          ("2"
           (lemma "tensor_power_rows_alt")
           (inst?)
           (expand "rows" -1 2)
           (expand "length" -1)
           (assert))))
        ("2"
         (replace -1)
         (skeep)
         (typepred "j")
         (typepred "i")
         (case "NOT i < 6^(k+1)")
         (("1" (assert))
          ("2"
           (case "NOT j = 0")
           (("1" (assert))
            ("2"
             (replace -1)
             (assert)
             (rewrite "entry_mult")
             (assert)
             (lemma "tensor_power_rows_alt")
             (inst?)
             (assert)
             (lemma "dot_eq_sigma")
             (expand "*" + 1)
             (rewrite -1 +)
             (expand "TQ_vect6k" +)
             (rewrite "entry_form_matrix")
             (("1"
               (case "EXISTS (p: upto(k)): base_n(6, i)(p) > 2")
               (("1"
                 (replace -1)
                 (rewrite "length_row" +)
                 (("1"
                   (rewrite "length_col" +)
                   (assert)
                   (lemma "tensor_power_columns_alt")
                   (inst?)
                   (assert)
                   (replace -1 :dir rl)
                   (expand "min" +)
                   (case "NOT columns(A66_inv) = 6")
                   (("1" (assert))
                    ("2"
                     (replace -1)
                     (assert)
                     (lemma "mult_tarski_query_simple_6_above_2")
                     (inst - "GF" "KF" "base_n(6,i)" "a" "k" "n")
                     (("1"
                       (assert)
                       (replace -4)
                       (replace -13)
                       (invoke (case "%1 = %2") (! -1 1) (! 2 2))
                       (("1" (assert))
                        ("2"
                         (hide (-1 3))
                         (rewrite "sigma_eq")
                         (("1"
                           (hide 2)
                           (skosimp*)
                           (case "FORALL (a1,a2,b1,b2:real): a1=b1 AND a2=b2 IMPLIES a1*a2 = b1*b2")
                           (("1"
                             (rewrite -1 1)
                             (("1"
                               (hide 2)
                               (rewrite "access_row")
                               (lemma "tensor_entry")
                               (inst?)
                               (assert)
                               (replaces -1)
                               (expand "sign_coeff6_zero")
                               (rewrite "product_eq")
                               (("1"
                                 (hide 2)
                                 (skosimp*)
                                 (case "NOT rows(A66_inv)=6")
                                 (("1" (assert))
                                  ("2"
                                   (replace -1)
                                   (assert)
                                   (replace -3)
                                   (expand "entry_pick" +)
                                   (case
                                    "NOT FORALL (ii1,jj2:upto(5)): IF ii1 = 0
                                                                              THEN (IF jj2 >= 3 THEN 0 ELSE 1 ENDIF)
                                                                            ELSIF ii1 = 1
                                                                              THEN (IF jj2 = 1 THEN 1
                                                                                    ELSIF jj2 = 2 THEN -1
                                                                                    ELSE 0
                                                                                    ENDIF)
                                                                            ELSIF ii1 = 2
                                                                              THEN (IF 1 <= jj2 AND jj2 <= 2
                                                                                      THEN 1
                                                                                    ELSE 0
                                                                                    ENDIF)
                                                                            ELSIF ii1 = 3
                                                                              THEN (IF 1 <= jj2 AND jj2 <= 2
                                                                                      THEN -1
                                                                                    ELSIF jj2 = 3 THEN 1
                                                                                    ELSE 0
                                                                                    ENDIF)
                                                                            ELSIF ii1 = 4
                                                                              THEN (IF jj2 <= 1 THEN -1
                                                                                    ELSIF jj2 = 4 THEN 1
                                                                                    ELSE 0
                                                                                    ENDIF)
                                                                            ELSIF ii1 = 5
                                                                              THEN (IF jj2 = 0 OR jj2 = 2 THEN -1
                                                                                    ELSIF jj2 = 5 THEN 1
                                                                                    ELSE 0
                                                                                    ENDIF)
                                                                            ELSE 0
                                                                            ENDIF
                                                                             = entry(A66_inv)(ii1, jj2)")
                                   (("1" (hide-all-but 1) (eval-formula))
                                    ("2"
                                     (expand "sign_coeff6_zero_entry" +)
                                     (inst
                                      -
                                      "base_n(6,i)(n!2)"
                                      "base_n(6,n!1)(n!2)")
                                     (("1"
                                       (assert)
                                       (hide-all-but 1)
                                       (lemma "base_n_lt_n")
                                       (inst?)
                                       (assert))
                                      ("2"
                                       (hide-all-but 1)
                                       (lemma "base_n_lt_n")
                                       (inst?)
                                       (assert))))))))
                                ("2"
                                 (hide 2)
                                 (hide-all-but 1)
                                 (lemma "base_n_lt_n")
                                 (inst?)
                                 (skeep)
                                 (inst?)
                                 (assert))))
                              ("2"
                               (hide 2)
                               (rewrite "access_col")
                               (expand "NSol_vect6k" +)
                               (rewrite "entry_form_matrix")
                               (hide 2)
                               (skosimp*)
                               (lemma "base_n_lt_n")
                               (inst?)
                               (assert))))
                            ("2" (hide-all-but 1) (skosimp*) (assert))))
                          ("2"
                           (hide-all-but 1)
                           (skosimp*)
                           (lemma "base_n_lt_n")
                           (inst?)
                           (assert))
                          ("3"
                           (hide 2)
                           (hide-all-but 1)
                           (skosimp*)
                           (lemma "base_n_lt_n")
                           (inst?)
                           (assert))))
                        ("3"
                         (hide-all-but 1)
                         (skosimp*)
                         (lemma "base_n_lt_n")
                         (inst?)
                         (assert))
                        ("4"
                         (hide-all-but 1)
                         (skosimp*)
                         (lemma "base_n_lt_n")
                         (inst?)
                         (assert))))
                      ("2"
                       (hide-all-but 1)
                       (skosimp*)
                       (lemma "base_n_lt_n")
                       (inst?)
                       (assert))))))
                  ("2"
                   (lemma "tensor_power_rows_alt")
                   (inst?)
                   (expand "rows" -1 2)
                   (assert))))
                ("2"
                 (replace 1)
                 (lemma "mult_tarski_query_simple_6_0_to_3")
                 (inst - "GF" "base_n(6,i)" "KF" "a" "k" "n")
                 (assert)
                 (replace -10)
                 (replace -1 +)
                 (rewrite "length_row" +)
                 (("1"
                   (rewrite "length_col" +)
                   (assert)
                   (lemma "tensor_power_columns_alt")
                   (inst?)
                   (assert)
                   (replace -1 :dir rl)
                   (expand "min" +)
                   (case "NOT columns(A66_inv) = 6")
                   (("1" (assert))
                    ("2"
                     (replace -1)
                     (assert)
                     (rewrite "sigma_eq")
                     (hide 4)
                     (skosimp*)
                     (expand "sign_prod_coeff6" +)
                     (case "EXISTS (p: upto(k)): base_n(6, n!1)(p) >= 3")
                     (("1"
                       (replace -1)
                       (case "access(row(tensor_power_alt(A66_inv, 1 + k))(i))(n!1) = 0")
                       (("1" (replace -1) (assert))
                        ("2"
                         (hide 2)
                         (rewrite "access_row")
                         (lemma "tensor_entry")
                         (inst?)
                         (assert)
                         (replaces -1)
                         (expand "sign_prod_coeff6")
                         (case "NOT rows(A66_inv)=6")
                         (("1" (assert))
                          ("2"
                           (replace -1)
                           (replace -3)
                           (assert)
                           (lemma "product_eq_zero[nat]")
                           (inst?)
                           (assert)
                           (hide 2)
                           (skeep -2)
                           (inst + "p")
                           (expand "entry_pick" +)
                           (case "FORALL (ii1,ii2:upto(5)): ii1<=2 AND ii2>=3 IMPLIES entry(A66_inv)(ii1,ii2)=0")
                           (("1"
                             (inst + "p")
                             (inst - "base_n(6,i)(p)" "base_n(6,n!1)(p)")
                             (("1" (assert))
                              ("2"
                               (hide-all-but 1)
                               (lemma "base_n_lt_n")
                               (inst?)
                               (assert))
                              ("3"
                               (hide-all-but 1)
                               (lemma "base_n_lt_n")
                               (inst?)
                               (assert))))
                            ("2" (hide-all-but 1) (eval-formula))))))))
                      ("2"
                       (replace 1)
                       (case "FORALL (a1,a2,b1,b2:real): a1=b1 AND a2=b2 IMPLIES a1*a2 = b1*b2")
                       (("1"
                         (rewrite -1 2)
                         (("1"
                           (hide 3)
                           (rewrite "access_row")
                           (lemma "tensor_entry")
                           (inst?)
                           (assert)
                           (replaces -1)
                           (case "NOT rows(A66_inv)=6")
                           (("1" (assert))
                            ("2"
                             (replace -1)
                             (replace -3)
                             (assert)
                             (expand "sign_prod" +)
                             (rewrite "product_eq")
                             (("1"
                               (hide 2)
                               (skosimp*)
                               (hide -)
                               (expand "entry_pick" +)
                               (inst + "n!2")
                               (inst + "n!2")
                               (assert)
                               (expand "sig_seq")
                               (case "FORALL (ii1,ii2:upto(2)): entry(A66_inv)(ii1,ii2) = sig(ii2)^ii1")
                               (("1"
                                 (inst
                                  -
                                  "base_n(6,i)(n!2)"
                                  "base_n(6,n!1)(n!2)")
                                 (assert))
                                ("2" (eval-formula 1))))
                              ("2" (hide-all-but 1) (skosimp*) (assert))
                              ("3"
                               (skeep)
                               (inst + "x1")
                               (("1" (assert))
                                ("2"
                                 (assert)
                                 (lemma "upper_is_bound")
                                 (inst?)
                                 (assert)
                                 (split -1)
                                 (("1" (assert))
                                  ("2"
                                   (expand "upper_index")
                                   (lift-if)
                                   (ground)
                                   (lemma "log_nat_bounds")
                                   (inst?)
                                   (assert)
                                   (flatten)
                                   (case "log_nat(n!1,6)`1<=k")
                                   (("1" (assert))
                                    ("2"
                                     (lemma "both_sides_expt_gt1_le_aux")
                                     (inst
                                      -
                                      "6"
                                      "k"
                                      "log_nat(n!1,6)`1-1")
                                     (typepred "n!1")
                                     (expand "^")
                                     (flatten)
                                     (assert))))))))))))
                          ("2"
                           (hide 3)
                           (rewrite "access_col")
                           (expand "NSol_vect6k" +)
                           (rewrite "entry_form_matrix")
                           (("1"
                             (expand "NSol_seq6" 1)
                             (replace 2)
                             (expand "NSol_all")
                             (expand "NSol")
                             (case "Sol(k, a, n, GF, KF, sig_seq(base_n(6, n!1))) =
                                        Sol_all(k, a, n, GF, KF, base_n(6, n!1))")
                             (("1" (assert))
                              ("2"
                               (hide 2)
                               (decompose-equality 1)
                               (iff)
                               (expand "Sol" 1)
                               (expand "Sol_all" 1)
                               (ground)
                               (("1"
                                 (skosimp 1)
                                 (inst - "i!1")
                                 (inst + "i!1")
                                 (assert)
                                 (expand "sig_seq")
                                 (expand "sig")
                                 (lift-if)
                                 (assert))
                                ("2"
                                 (skeep)
                                 (inst - "i!1")
                                 (expand "sig_seq")
                                 (expand "sig")
                                 (lift-if)
                                 (assert)
                                 (inst + "i!1")
                                 (assert))))))
                            ("2"
                             (hide 2)
                             (skosimp*)
                             (lemma "base_n_lt_n")
                             (inst?)
                             (assert))))))
                        ("2" (hide-all-but 1) (grind))))))))
                  ("2" (hide 4) (expand "rows" -3 2) (assert))))))
              ("2"
               (hide 3)
               (skosimp*)
               (lemma "base_n_lt_n")
               (inst - "6" "i!1" "x1!1")
               (assert)
               (inst + "x1!1")
               (("1" (assert))
                ("2"
                 (assert)
                 (lemma "upper_is_bound")
                 (inst?)
                 (assert)
                 (expand "upper_index")
                 (lift-if)
                 (ground)
                 (case "log_nat(i!1,6)`1<=k")
                 (("1" (assert))
                  ("2"
                   (case "NOT i!1 <=expt(6,1+k)-1")
                   (("1"
                     (assert)
                     (expand "^" +)
                     (assert)
                     (case "NOT FORALL (i1,i2:int): i1<i2 IMPLIES i1<=i2-1")
                     (("1" (skeep) (assert)) ("2" (inst?) (assert))))
                    ("2"
                     (assert)
                     (lemma "log_nat_bounds")
                     (inst?)
                     (assert)
                     (flatten)
                     (expand "^")
                     (assert)
                     (lemma "both_sides_expt_gt1_le_aux")
                     (inst - "6" "k" "log_nat(i!1,6)`1-1")
                     (typepred "i!1")
                     (flatten)
                     (assert))))))))))))))))
      ("3" (assert))))
    ("2"
     (hide-all-but 1)
     (case "FORALL (dd:nat): 2 < 3 ^ (1 + dd) AND 3 ^ (1 + dd) < 6 ^ (1 + dd)")
     (("1" (inst - "k"))
      ("2"
       (hide 2)
       (induct "dd")
       (("1" (grind)) ("2" (grind))
        ("3" (skeep) (expand "^") (expand "expt" +) (ground))))))))


proof_type: f_proof
decl_type: formula
library: Tarski
theory: tarski_query_matrix
signature: nil
run_date: Unknown date
run_time: ----
status: proved-incomplete
description: nil
script:
  (""
   (skeep)
   (lemma "multi_sturm_tarski_6by6")
   (inst?)
   (assert)
   (replace -2)
   (case "NOT tensor_power_alt(A66, 1 + k)*TQ_vect6k(k, a, n, GF, KF) =
                tensor_power_alt(A66, 1 + k)*(tensor_power_alt(A66_inv, 1 + k) * NSol_vect6k(k, a, n, GF, KF))")
   (("1" (assert))
    ("2"
     (rewrite "matrix_mult_assoc" :dir rl)
     (("1"
       (rewrite "power_assoc" :dir rl)
       (rewrite "power_assoc" :dir rl)
       (lemma "invertible_tensor_power")
       (inst - "A66_inv" "1+k")
       (split -)
       (("1"
         (flatten)
         (typepred "A66")
         (replace -7 :dir rl)
         (replace -9 :dir rl)
         (rewrite "mult_inverse_left")
         (rewrite "mult_Id_left")
         (("1" (assert))
          ("2" (lemma "tensor_power_rows") (inst?) (assert))))
        ("2"
         (expand "invertible?")
         (inst + "A66")
         (hide-all-but 1)
         (eval-formula))))
      ("2"
       (hide-all-but -1)
       (lemma "tensor_power_rows_alt")
       (inst?)
       (assert)
       (expand "rows" -1 2)
       (expand "length")
       (assert))))))


proof_type: f_proof
decl_type: formula
library: Tarski
theory: tarski_query_matrix
signature: nil
run_date: Unknown date
run_time: ----
status: proved-incomplete
description: nil
script:
  (""
   (skeep)
   (lemma "multi_sturm_tarski_NSol")
   (inst?)
   (assert)
   (replace -2)
   (replaces -1)
   (rewrite "full_matrix_eq")
   (invoke (case "NOT %1") (! 2 1))
   (("1"
     (hide 3)
     (rewrite "rows_mult")
     (rewrite "rows_mult")
     (assert)
     (lemma "tensor_power_rows_alt")
     (inst?)
     (replaces -1 :dir rl)
     (lemma "tensor_power_rows_alt")
     (inst - "A63" "1+k")
     (assert))
    ("2"
     (assert)
     (invoke (case "NOT %1") (! 2 1))
     (("1"
       (hide 3)
       (lemma "columns_mult")
       (inst?)
       (assert)
       (split -)
       (("1"
         (replace -1)
         (hide -1)
         (lemma "columns_mult")
         (inst?)
         (split -)
         (("1" (replaces -1) (assert))
          ("2"
           (lemma "tensor_power_rows_alt")
           (inst?)
           (expand "rows" -1 2)
           (expand "length" -1)
           (assert))))
        ("2"
         (lemma "tensor_power_rows_alt")
         (inst?)
         (expand "rows" -1 2)
         (expand "length" -1)
         (assert))))
      ("2"
       (assert)
       (skeep)
       (typepred "i")
       (case "NOT rows(tensor_power_alt(A66, 1 + k) * TQ_vect6k(k, a, n, GF, KF)) = 6^(1+k)")
       (("1"
         (assert)
         (rewrite "rows_mult")
         (lemma "tensor_power_rows_alt")
         (inst?)
         (assert))
        ("2"
         (typepred "j")
         (case "NOT columns(tensor_power_alt(A66, 1 + k) * TQ_vect6k(k, a, n, GF, KF)) = 1")
         (("1"
           (lemma "columns_mult")
           (inst?)
           (assert)
           (lemma "tensor_power_rows_alt")
           (inst?)
           (expand "rows" -1 2)
           (expand "length" -1)
           (assert))
          ("2"
           (case "NOT j = 0")
           (("1" (assert))
            ("2"
             (replace -1)
             (assert)
             (rewrite "entry_mult")
             (rewrite "entry_mult")
             (assert)
             (lemma "tensor_power_rows_alt")
             (inst - "A66" "1+k")
             (lemma "tensor_power_rows_alt")
             (inst - "A63" "1+k")
             (assert)
             (lemma "dot_eq_sigma")
             (expand "*" +)
             (rewrite -1 +)
             (rewrite -1 +)
             (rewrite "length_row")
             (("1"
               (rewrite "length_row")
               (("1"
                 (rewrite "length_col")
                 (rewrite "length_col")
                 (lemma "tensor_power_columns_alt")
                 (inst - "A63" "1+k")
                 (lemma "tensor_power_columns_alt")
                 (inst - "A66" "1+k")
                 (assert)
                 (replace -1 :dir rl)
                 (replace -2 :dir rl)
                 (expand "min" +)
                 (case "NOT columns(A66) = 6")
                 (("1" (assert))
                  ("2"
                   (replace -1)
                   (case "NOT columns(A63) = 3")
                   (("1" (assert))
                    ("2"
                     (replace -1)
                     (assert)
                     (name "siggy"
                           "LAMBDA (i:nat): base_n_to_nat(6,base_n(3,i),k)")
                     (invoke (name "F" "%1") (! 2 2 3))
                     (replaces -1)
                     (invoke (name "G" "%1") (! 2 1 3))
                     (replaces -1)
                     (lemma "sigma_inj")
                     (inst - "F" "G" "3^(1+k)-1" "6^(1+k)-1" "0" "0"
                      "siggy")
                     (assert)
                     (hide 3)
                     (split 1)
                     (("1"
                       (skeep)
                       (expand "siggy" 1)
                       (assert)
                       (split 1)
                       (("1" (assert))
                        ("2"
                         (lemma "base_n_to_nat_lt")
                         (inst?)
                         (assert)
                         (split -)
                         (("1"
                           (assert)
                           (case "FORALL (i1,i2:int): i1<i2 IMPLIES i1<=i2-1")
                           (("1" (inst?) (assert))
                            ("2" (skeep) (assert))))
                          ("2"
                           (hide-all-but 1)
                           (skeep)
                           (lemma "base_n_lt_n")
                           (inst?)
                           (assert))))))
                      ("2"
                       (skeep)
                       (expand "siggy" -1)
                       (lemma "base_n_to_nat_unique")
                       (inst?)
                       (assert)
                       (inst - "k")
                       (split -)
                       (("1"
                         (lemma "base_n_is_n_alt")
                         (inst - "3" "i!1" "k")
                         (lemma "base_n_is_n_alt")
                         (inst - "3" "j!1" "k")
                         (assert)
                         (replaces -1 +)
                         (replaces -1 +)
                         (lemma "base_n_to_nat_eq")
                         (inst?)
                         (assert)
                         (inst - "k"))
                        ("2"
                         (hide-all-but 1)
                         (skosimp*)
                         (lemma "base_n_lt_n")
                         (inst?)
                         (assert)
                         (lemma "base_n_lt_n")
                         (hide -2)
                         (inst?)
                         (assert))))
                      ("3"
                       (skeep)
                       (expand "G" +)
                       (case "access(col(TQ_vect6k(k, a, n, GF, KF))(0))(i!1) = 0")
                       (("1" (assert))
                        ("2"
                         (hide 3)
                         (rewrite "access_col")
                         (expand "TQ_vect6k" 1)
                         (rewrite "entry_form_matrix")
                         (("1"
                           (lift-if)
                           (ground)
                           (name "jj" "base_n_to_nat(3,base_n(6,i!1),k)")
                           (inst 3 "jj")
                           (("1"
                             (expand "siggy" +)
                             (expand "jj" 3)
                             (lemma "base_n_base_n_to_nat")
                             (inst?)
                             (assert)
                             (split -)
                             (("1"
                               (lemma "base_n_to_nat_eq")
                               (inst - "6" "k" "k"
                                "base_n(3, base_n_to_nat(3, base_n(6, i!1), k))"
                                "base_n(6,i!1)")
                               (replace -2)
                               (replaces -1)
                               (lemma "base_n_is_n_alt")
                               (inst?)
                               (assert))
                              ("2" (skeep) (inst + "i!2") (assert))))
                            ("2"
                             (assert)
                             (expand "jj" 1)
                             (lemma "base_n_to_nat_lt")
                             (inst?)
                             (assert)
                             (split -)
                             (("1"
                               (case "FORALL (i1,i2:int): i1<i2 IMPLIES i1<=i2-1")
                               (("1" (inst?) (assert))
                                ("2" (skeep) (assert))))
                              ("2" (skeep) (inst + "i!2") (assert))))))
                          ("2"
                           (hide-all-but 1)
                           (skosimp*)
                           (assert)
                           (assert)
                           (inst + "x1!1")
                           (("1" (assert))
                            ("2"
                             (assert)
                             (lemma "base_n_0")
                             (inst?)
                             (assert)
                             (lemma "both_sides_expt_gt1_le_aux")
                             (inst - "6" "k" "x1!1-1")
                             (assert)
                             (expand "^")
                             (assert))))))))
                      ("4"
                       (skeep)
                       (expand "F" 1)
                       (expand "G" 1)
                       (rewrite "access_row")
                       (rewrite "access_row")
                       (rewrite "access_col")
                       (rewrite "access_col")
                       (case "FORALL (a1,a2,b1,b2:real): a1=b1 AND a2=b2 IMPLIES a1*a2=b1*b2")
                       (("1"
                         (rewrite -1)
                         (("1"
                           (hide 2)
                           (lemma "tensor_entry_alt")
                           (inst?)
                           (assert)
                           (replaces -1)
                           (lemma "tensor_entry_alt")
                           (inst?)
                           (("1"
                             (assert)
                             (replaces -1)
                             (rewrite "product_eq")
                             (hide 2)
                             (skosimp*)
                             (case "NOT rows(A66)=6")
                             (("1" (assert))
                              ("2"
                               (replace -1)
                               (replace -4)
                               (replace -5)
                               (case "NOT rows(A63) = 6")
                               (("1" (assert))
                                ("2"
                                 (replace -1)
                                 (assert)
                                 (expand "entry_pick" +)
                                 (case
                                  "base_n(6, siggy(i!1)) = base_n(3, i!1)")
                                 (("1"
                                   (replaces -1)
                                   (rewrite "A63_def" 1)
                                   (("1"
                                     (lemma "base_n_lt_n")
                                     (inst?)
                                     (assert))
                                    ("2"
                                     (lemma "base_n_lt_n")
                                     (inst?)
                                     (assert))))
                                  ("2"
                                   (hide 2)
                                   (expand "siggy" 1)
                                   (lemma "base_n_base_n_to_nat")
                                   (inst?)
                                   (split -)
                                   (("1"
                                     (decompose-equality 1)
                                     (case "x!1<=k")
                                     (("1" (inst - "x!1"))
                                      ("2"
                                       (assert)
                                       (lemma "base_n_0")
                                       (inst?)
                                       (assert)
                                       (split -)
                                       (("1"
                                         (lemma "base_n_0")
                                         (replace -2)
                                         (inst - "3" "i!1" "x!1")
                                         (assert)
                                         (typepred "i!1")
                                         (lemma
                                          "both_sides_expt_gt1_le_aux")
                                         (inst - "3" "k" "x!1-1")
                                         (expand "^")
                                         (assert))
                                        ("2"
                                         (lemma "base_n_to_nat_lt")
                                         (inst?)
                                         (assert)
                                         (split -)
                                         (("1"
                                           (lemma
                                            "both_sides_expt_gt1_le_aux")
                                           (inst - "6" "k" "x!1-1")
                                           (expand "^")
                                           (assert))
                                          ("2"
                                           (hide-all-but 1)
                                           (skosimp*)
                                           (lemma "base_n_lt_n")
                                           (inst?)
                                           (assert))))))))
                                    ("2"
                                     (hide-all-but 1)
                                     (skosimp*)
                                     (lemma "base_n_lt_n")
                                     (inst?)
                                     (assert))))))))))
                            ("2"
                             (hide 2)
                             (expand "siggy" 1)
                             (lemma "base_n_to_nat_lt")
                             (inst?)
                             (assert)
                             (skosimp*)
                             (lemma "base_n_lt_n")
                             (inst?)
                             (assert))))
                          ("2"
                           (hide 2)
                           (expand "TQ_vect6k" +)
                           (expand "TQ_vect3k" +)
                           (rewrite "entry_form_matrix")
                           (("1"
                             (rewrite "entry_form_matrix")
                             (("1"
                               (assert)
                               (lift-if)
                               (split +)
                               (("1"
                                 (flatten)
                                 (split +)
                                 (("1"
                                   (flatten)
                                   (skeep -1)
                                   (expand "siggy" -1)
                                   (lemma "base_n_base_n_to_nat")
                                   (inst?)
                                   (split -)
                                   (("1"
                                     (rewrite -1 -2)
                                     (lemma "base_n_lt_n")
                                     (inst?)
                                     (assert))
                                    ("2"
                                     (skosimp*)
                                     (lemma "base_n_lt_n")
                                     (inst?)
                                     (assert))))
                                  ("2"
                                   (flatten)
                                   (case
                                    "base_n(3, i!1)=base_n(6, siggy(i!1))")
                                   (("1" (assert))
                                    ("2"
                                     (hide 3)
                                     (hide 2)
                                     (expand "siggy" +)
                                     (lemma "base_n_base_n_to_nat")
                                     (inst?)
                                     (split -)
                                     (("1"
                                       (decompose-equality 1)
                                       (case "x!1<=k")
                                       (("1" (rewrite -2))
                                        ("2"
                                         (lemma "base_n_0")
                                         (inst?)
                                         (assert)
                                         (split -)
                                         (("1"
                                           (replace -1)
                                           (lemma "base_n_0")
                                           (inst - "6" _ _)
                                           (inst?)
                                           (assert)
                                           (lemma "base_n_to_nat_lt")
                                           (inst?)
                                           (assert)
                                           (split -)
                                           (("1"
                                             (lemma
                                              "both_sides_expt_gt1_le_aux")
                                             (inst - "6" "k" "x!1-1")
                                             (expand "^")
                                             (assert))
                                            ("2"
                                             (skosimp*)
                                             (lemma "base_n_lt_n")
                                             (inst?)
                                             (assert))))
                                          ("2"
                                           (lemma
                                            "both_sides_expt_gt1_le_aux")
                                           (inst - "3" "k" "x!1-1")
                                           (expand "^")
                                           (assert))))))
                                      ("2"
                                       (skosimp*)
                                       (lemma "base_n_lt_n")
                                       (inst?)
                                       (assert))))))))
                                ("2"
                                 (flatten)
                                 (expand "siggy" 1)
                                 (lemma "base_n_to_nat_lt")
                                 (inst?)
                                 (assert)
                                 (skosimp*)
                                 (lemma "base_n_lt_n")
                                 (inst?)
                                 (assert))))
                              ("2"
                               (hide 2)
                               (skosimp*)
                               (assert)
                               (assert)
                               (lemma "base_n_lt_n")
                               (inst?)
                               (assert)
                               (inst + "x1!1")
                               (("1" (assert))
                                ("2"
                                 (assert)
                                 (lemma "base_n_0")
                                 (inst?)
                                 (assert)
                                 (lemma "both_sides_expt_gt1_le_aux")
                                 (inst - "6" "k" "x1!1-1")
                                 (expand "^")
                                 (assert))))))
                            ("2"
                             (hide 2)
                             (skosimp*)
                             (assert)
                             (assert)
                             (lemma "base_n_lt_n")
                             (inst?)
                             (assert))))))
                        ("2" (hide 2) (skeep) (assert))))))))))
                ("2"
                 (hide 3)
                 (lemma "tensor_power_rows_alt")
                 (inst?)
                 (expand "rows" -1 2)
                 (assert))))
              ("2"
               (hide 2)
               (hide 2)
               (expand "rows" -3 2)
               (assert))))))))))))))


proof_type: t_proof
decl_type: tcc
library: Tarski
theory: tarski_query_matrix
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (skosimp*)
   (replaces -1)
   (assert)
   (lemma "base_n_lt_n")
   (lemma "columns_form_matrix")
   (inst?)
   (assert)
   (lemma "base_n_lt_n")
   (inst?)
   (assert))


proof_type: t_proof
decl_type: tcc
library: Tarski
theory: tarski_query_matrix
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (skeep)
   (rewrite "rows_form_matrix")
   (lemma "columns_form_matrix")
   (inst?)
   (assert))


proof_type: t_proof
decl_type: tcc
library: Tarski
theory: tarski_query_matrix
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (skeep)
   (skeep)
   (case "x1<=k")
   (("1" (inst + "x1") (replace -2 +) (assert) (assert))
    ("2"
     (assert)
     (case "GPFun(i1,j1)(x1)=0")
     (("1" (assert))
      ("2"
       (replaces -1)
       (assert)
       (assert)
       (lemma "base_n_0")
       (inst?)
       (assert)
       (lemma "both_sides_expt_gt1_le_aux")
       (inst - "6" "k" "x1-1")
       (expand "^")
       (assert))))))


proof_type: t_proof
decl_type: tcc
library: Tarski
theory: tarski_query_matrix
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (skeep)
   (rewrite "rows_form_matrix")
   (assert)
   (lemma "columns_form_matrix")
   (inst?)
   (assert))


proof_type: t_proof
decl_type: tcc
library: Tarski
theory: tarski_query_matrix
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (rewrite "rows_form_matrix")
   (assert)
   (lemma "columns_form_matrix")
   (inst?)
   (assert))


proof_type: f_proof
decl_type: formula
library: Tarski
theory: poly_systems
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (case "FORALL (i): i<=k IMPLIES n(i)=0")
   (("1"
     (case "FORALL (i,x): i<=k IMPLIES polynomial(p(i),n(i))(x)/=0")
     (("1"
       (inst + "0" "LAMBDA (j:below(0)): 0")
       (split)
       (("1" (skosimp*)) ("2" (skosimp*))
        ("3" (skosimp*) (inst - "j!1" "b!1") (assert))))
      ("2"
       (hide 2)
       (skeep)
       (inst - "i")
       (inst - "i")
       (assert)
       (replace -3)
       (expand "polynomial")
       (expand "sigma")
       (expand "sigma")
       (assert))))
    ("2"
     (name "IGGY"
           "LAMBDA (b:real): ((EXISTS (j:nat): j<=k 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)
         (skeep -2)
         (name "newenum" "sort_array[K,real,<=].sort(f)")
         (inst + "K" "newenum")
         (case "NOT (FORALL (i, j: below(K)): i < j IMPLIES newenum(i) < newenum(j))")
         (("1"
           (hide 3)
           (skeep)
           (case "NOT newenum(i!1) = newenum(j)")
           (("1"
             (assert)
             (typepred "newenum")
             (expand "sorted?")
             (inst - "i!1" "j")
             (assert))
            ("2"
             (typepred "newenum")
             (expand "permutation_of?")
             (skosimp*)
             (expand "bijective?" -1)
             (flatten)
             (expand "surjective?")
             (inst-cp - "j")
             (inst - "i!1")
             (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)
           (assert)
           (split)
           (("1"
             (skeep)
             (typepred "newenum")
             (expand "permutation_of?")
             (skosimp*)
             (expand "bijective?")
             (flatten)
             (expand "surjective?" -2)
             (inst - "i!1")
             (skolem - "j!1")
             (inst - "j!1")
             (assert)
             (typepred "f(j!1)")
             (replace -3)
             (replace -4 :dir rl)
             (expand "IGGY" -1)
             (propax))
            ("2"
             (skeep)
             (typepred "newenum")
             (expand "permutation_of?")
             (skosimp*)
             (expand "bijective?")
             (flatten)
             (expand "surjective?" -11)
             (inst -11 "b")
             (("1"
               (skolem - "ii")
               (inst - "ii")
               (inst + "f!1(ii)")
               (assert))
              ("2"
               (expand "IGGY" 1)
               (assert)
               (inst + "j")
               (assert))))))))
        ("2" (propax))))
      ("2"
       (hide 3)
       (name "IGGYk"
             "LAMBDA (kp:nat): (LAMBDA (b: real):(EXISTS (j: nat):
                                                                                                      j <= kp AND polynomial(p(j), n(j))(b) = 0))")
       (case "FORALL (kp:nat): kp<=k IMPLIES is_finite[real](IGGYk(kp))")
       (("1"
         (inst - "k")
         (assert)
         (case "IGGYk(k) = IGGY")
         (("1" (assert))
          ("2"
           (decompose-equality 1)
           (expand "IGGYk" 1)
           (expand "IGGY" 1)
           (propax))))
        ("2"
         (name "IGGYthis"
               "LAMBDA (kp:nat): LAMBDA (b:real): polynomial(p(kp),n(kp))(b)=0")
         (case "FORALL (kp:nat): kp<=k IMPLIES is_finite[real](IGGYthis(kp))")
         (("1"
           (induct "kp")
           (("1"
             (assert)
             (inst - "0")
             (assert)
             (case "IGGYthis(0)=IGGYk(0)")
             (("1" (assert))
              ("2"
               (decompose-equality 1)
               (expand "IGGYthis" 1)
               (expand "IGGYk" 1)
               (iff)
               (ground)
               (("1" (inst + "0") (assert)) ("2" (skosimp*) (assert))))))
            ("2"
             (skeep)
             (assert)
             (case "IGGYk(1+j) = union(IGGYk(j),IGGYthis(1+j))")
             (("1"
               (lemma "finite_union[real]")
               (inst - "IGGYk(j)" "IGGYthis(1+j)")
               (("1" (assert)) ("2" (inst - "1+j") (assert))))
              ("2"
               (decompose-equality 1)
               (expand "union" 1)
               (expand "member")
               (expand "IGGYk" 1)
               (expand "IGGYthis" 1)
               (iff)
               (ground)
               (("1"
                 (skosimp*)
                 (case "j!1 = 1+j")
                 (("1" (assert)) ("2" (inst + "j!1") (assert))))
                ("2" (skosimp*) (inst + "j!1") (assert))
                ("3" (inst + "1+j") (assert))))))))
          ("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"
             (skeep)
             (inst - "n(kp)" "p(kp)")
             (split -)
             (("1" (assert) (expand "IGGYthis" 1) (propax))
              ("2" (inst + "n(kp)") (assert) (inst - "kp") (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)(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")
                   (flatten)
                   (hide -2)
                   (split -1)
                   (("1" (skosimp*) (inst - "i!1") (assert))
                    ("2"
                     (decompose-equality 1)
                     (case "polynomial(LAMBDA (i: nat): 0, 1 + j)(x!1) = 0")
                     (("1"
                       (replaces -1)
                       (assert)
                       (inst - "x!1")
                       (case "polynomial(g!1, j)(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"))))))))))))))))))


proof_type: f_proof
decl_type: formula
library: Tarski
theory: poly_systems
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (lemma "system_roots_enum")
   (skeep)
   (inst - "k" "n" "p")
   (assert)
   (replace -2)
   (skeep)
   (label "fmz" -1)
   (label "skz" -3)
   (name "Q"
         "prod_polynomials
                                               (p, n, (LAMBDA (i: nat): 1), k)")
   (replace -1)
   (name "Qdeg" "sigma(0, k, n)")
   (replace -1)
   (case "NOT FORALL (x): polynomial(Q,Qdeg)(x)=0 IFF (EXISTS (i:below(K)): x = enum(i))")
   (("1"
     (hide 2)
     (skeep)
     (typepred "Q")
     (case "NOT n * (LAMBDA (i: nat): 1) = n")
     (("1" (decompose-equality 1) (expand "*" 1) (propax))
      ("2"
       (replace -1)
       (inst - "x")
       (replace -5)
       (replace -2)
       (ground)
       (("1"
         (lemma "product_eq_0[nat]")
         (inst?)
         (assert)
         (skosimp*)
         (expand "^" -1)
         (expand "expt" -1)
         (expand "expt" -1)
         (inst "skz" "x" "n!1")
         (assert))
        ("2"
         (skosimp*)
         (assert)
         (expand "^")
         (expand "expt")
         (expand "expt")
         (assert)
         (lemma "product_eq_zero[nat]")
         (inst?)
         (assert)
         (inst -8 "i!1")
         (skosimp*)
         (inst + "j!1")
         (assert))))))
    ("2"
     (assert)
     (split 1)
     (("1"
       (flatten)
       (skeep -1)
       (case "K = 0")
       (("1"
         (skeep 1)
         (inst - "i")
         (assert)
         (lemma "poly_sign_near_infinity")
         (inst - "p(i)" "n(i)")
         (assert)
         (inst-cp -11 "i")
         (assert)
         (assert)
         (flatten)
         (skeep -1)
         (expand "sign_ext" -1 2)
         (expand "sign_ext" -1)
         (assert)
         (inst-cp - "x")
         (assert)
         (inst - "M")
         (assert)
         (lift-if)
         (ground)
         (lemma "poly_intermediate_value_dec")
         (inst - "p(i)" "0" "n(i)" "x" "M")
         (assert)
         (skosimp*)
         (inst -14 "cc!1" "i")
         (assert)
         (skosimp*))
        ("2"
         (case "x > enum(K-1)")
         (("1"
           (lemma "poly_sign_near_infinity")
           (case "FORALL (jp:nat): jp<=k IMPLIES (EXISTS (M: posnat):
                                                                                                      FORALL (x: real,j:nat): j<=jp AND
                                                                                                        x >= M IMPLIES sign_ext(polynomial(p(j),n(j))(x)) = sign_ext(p(j)(n(j))))")
           (("1"
             (inst - "k")
             (assert)
             (skeep -1)
             (hide -2)
             (skeep)
             (case "NOT FORALL (x: real):
                                                                                                             x >= M IMPLIES
                                                                                                               polynomial(p(i), n(i))(x)<=0")
             (("1"
               (skeep)
               (inst - "x!1" "i")
               (assert)
               (expand "sign_ext" -2)
               (lift-if)
               (ground))
              ("2"
               (name "MM" "max(M,x+1)")
               (inst - "MM")
               (inst -5 "i")
               (assert)
               (lemma "poly_intermediate_value_dec")
               (inst - "p(i)" "0" "n(i)" "x" "MM")
               (assert)
               (skosimp*)
               (inst -16 "cc!1" "i")
               (assert)
               (skosimp*)
               (inst -14 "i!2" "K-1")
               (assert))))
            ("2"
             (induct "jp")
             (("1"
               (assert)
               (inst - "p(0)" "n(0)")
               (assert)
               (split -)
               (("1"
                 (skeep -1)
                 (inst + "M")
                 (skeep)
                 (inst - "x!1")
                 (assert))
                ("2" (inst -9 "0") (assert))))
              ("2"
               (skosimp*)
               (assert)
               (skeep -)
               (inst -3 "p(1+j!1)" "n(1+j!1)")
               (assert)
               (split -)
               (("1"
                 (skosimp*)
                 (inst + "max(M,M!1)")
                 (skeep)
                 (case "j = 1+j!1")
                 (("1" (inst - "x!1") (assert))
                  ("2" (inst -2 "x!1" "j") (assert))))
                ("2" (assert) (inst -13 "1+j!1") (assert))))))))
          ("2"
           (case "x < enum(0)")
           (("1"
             (hide 3)
             (skeep)
             (lemma "poly_sign_near_negative_infinity")
             (case "FORALL (jp:nat): jp<=k IMPLIES (EXISTS (M: posnat):
                                                                                                                FORALL (x: real,j:nat): j<=jp AND
                                                                                                                  x<=-M IMPLIES sign_ext(polynomial(p(j),n(j))(x)) = sign_ext((IF odd?(n(j)) THEN -1 ELSE 1 ENDIF) *p(j)(n(j))))")
             (("1"
               (inst - "k")
               (assert)
               (skeep -1)
               (hide -2)
               (name "MM" "min(-M,x-1)")
               (case "NOT EXISTS (cc:real): MM<=cc AND cc<=x AND polynomial(p(i),n(i))(cc)=0")
               (("1"
                 (inst -4 "i")
                 (assert)
                 (inst-cp - "MM" "i")
                 (assert)
                 (case "NOT sign_ext((IF odd?(n(i)) THEN -1 ELSE 1 ENDIF) * p(i)(n(i))) = -1")
                 (("1"
                   (inst -13 "i")
                   (assert)
                   (flatten)
                   (expand "sign_ext" 1)
                   (lift-if)
                   (lift-if)
                   (lift-if)
                   (assert)
                   (ground))
                  ("2"
                   (replace -1)
                   (expand "sign_ext" -4)
                   (lift-if -4)
                   (ground)
                   (lemma "poly_intermediate_value_inc")
                   (inst - "p(i)" "0" "n(i)" "MM" "x")
                   (assert))))
                ("2"
                 (skeep -1)
                 (inst -14 "cc" "i")
                 (assert)
                 (skosimp*)
                 (inst -12 "0" "i!1")
                 (assert))))
              ("2"
               (induct "jp")
               (("1"
                 (assert)
                 (inst - "p(0)" "n(0)")
                 (assert)
                 (split -)
                 (("1"
                   (skeep -1)
                   (inst + "M")
                   (skeep)
                   (inst - "x!1")
                   (assert)
                   (lemma "even_or_odd")
                   (inst - "n(0)")
                   (lift-if)
                   (ground))
                  ("2" (inst -10 "0") (assert))))
                ("2"
                 (skosimp*)
                 (assert)
                 (skeep -)
                 (inst -3 "p(1+j!1)" "n(1+j!1)")
                 (assert)
                 (split -)
                 (("1"
                   (skosimp*)
                   (inst + "max(M,M!1)")
                   (skeep)
                   (case "j = 1+j!1")
                   (("1"
                     (inst - "x!1")
                     (assert)
                     (lemma "even_or_odd")
                     (inst?)
                     (lift-if)
                     (ground))
                    ("2" (inst -2 "x!1" "j") (assert))))
                  ("2" (inst -12 "1+j!1") (assert))))))))
            ("2"
             (case "NOT EXISTS (i:nat): i+1<K AND enum(i)<x AND x<enum(i+1)")
             (("1"
               (name "Nset" "{nm:nat | nm+1<K aNd enum(nm)<x}")
               (("1"
                 (lemma "lub_nat")
                 (inst - "Nset" "K+1")
                 (("1"
                   (assert)
                   (split -1)
                   (("1"
                     (skolem -1 "i")
                     (inst + "i")
                     (typepred "i")
                     (expand "Nset" -1)
                     (flatten)
                     (assert)
                     (case "enum(1+i)=x")
                     (("1"
                       (inst -11 "1+i")
                       (skeep -11)
                       (assert)
                       (inst -6 "j")
                       (assert))
                      ("2"
                       (expand "least_upper_bound?")
                       (flatten)
                       (expand "upper_bound?" -3)
                       (inst - "1+i")
                       (("1" (assert))
                        ("2"
                         (expand "extend" 1)
                         (expand "Nset" 1)
                         (assert))))))
                    ("2"
                     (expand "upper_bound?" 1)
                     (skosimp*)
                     (typepred "s!1")
                     (expand "extend" -1)
                     (split -)
                     (("1"
                       (flatten)
                       (expand "Nset" -4)
                       (flatten)
                       (assert))
                      ("2" (propax))))))
                  ("2"
                   (expand "nonempty?" 1)
                   (inst + "0")
                   (assert)
                   (case "NOT K>1")
                   (("1"
                     (case "NOT x = enum(0)")
                     (("1" (assert))
                      ("2"
                       (inst -9 "0")
                       (skeep -9)
                       (inst - "j")
                       (assert))))
                    ("2"
                     (assert)
                     (case "x = enum(0)")
                     (("1"
                       (inst -10 "0")
                       (skeep -10)
                       (inst - "j")
                       (assert))
                      ("2"
                       (assert)
                       (assert)
                       (expand "empty?")
                       (inst - "0")
                       (expand "member")
                       (expand "Nset" 2)
                       (propax))))))))
                ("2" (skosimp*) (assert))))
              ("2"
               (skeep -1)
               (lemma "poly_Rolle")
               (inst - "Q" "Qdeg" "enum(i)" "enum(i+1)")
               (assert)
               (assert)
               (case "NOT Qdeg > 0")
               (("1"
                 (assert)
                 (hide -1)
                 (typepred "Q")
                 (case "FORALL (j): j<=k IMPLIES n(j)=0")
                 (("1"
                   (skosimp)
                   (inst - "i!1")
                   (inst -8 "i!1")
                   (assert)
                   (replace -1)
                   (expand "polynomial" -8)
                   (expand "sigma" -8)
                   (expand "sigma" -8)
                   (propax))
                  ("2"
                   (case "FORALL (pz:nat): pz<=k AND sigma[nat](0, pz, LAMBDA (j): n(j)) = 0 IMPLIES FORALL (j): j <= pz IMPLIES n(j) = 0")
                   (("1"
                     (inst - "k")
                     (assert)
                     (replace 1)
                     (case "NOT n = n*(LAMBDA (i:nat): 1)")
                     (("1"
                       (decompose-equality 1)
                       (("1" (expand "*") (propax))
                        ("2" (hide-all-but 1) (grind))))
                      ("2"
                       (replaces -1 :dir rl)
                       (assert)
                       (lemma "sigma_tolambda")
                       (inst - "n" "k" "0")
                       (assert))))
                    ("2"
                     (induct "pz")
                     (("1"
                       (assert)
                       (flatten)
                       (skeep)
                       (expand "sigma" -1)
                       (expand "sigma" -1)
                       (assert))
                      ("2"
                       (skosimp 1)
                       (label "izp" 1)
                       (assert)
                       (split -1)
                       (("1"
                         (skeep)
                         (case "NOT j = j!1+1")
                         (("1" (inst - "j") (assert))
                          ("2"
                           (replace -1)
                           (assert)
                           (expand "sigma" -4)
                           (assert))))
                        ("2" (expand "sigma" -2) (assert))))))))))
                ("2"
                 (assert)
                 (split -2)
                 (("1"
                   (skosimp*)
                   (inst + "c!1")
                   (assert)
                   (skolem 6 "iii")
                   (flatten)
                   (inst - "iii")
                   (assert)
                   (case "x < c!1")
                   (("1"
                     (lemma "poly_intermediate_value_dec")
                     (inst - "p(iii)" "0" "n(iii)" "x" "c!1")
                     (assert)
                     (skosimp*)
                     (copy "skz")
                     (inst - "cc!1" "iii")
                     (assert)
                     (skosimp*)
                     (copy "fmz")
                     (inst-cp - "i!3" "i")
                     (inst - "1+i" "i!3")
                     (ground))
                    ("2"
                     (lemma "poly_intermediate_value_inc")
                     (inst - "p(iii)" "0" "n(iii)" "c!1" "x")
                     (assert)
                     (skosimp*)
                     (copy "skz")
                     (inst - "cc!1" "iii")
                     (assert)
                     (skosimp -1)
                     (copy "fmz")
                     (inst-cp - "i!3" "i")
                     (inst - "1+i" "i!3")
                     (ground))))
                  ("2"
                   (inst-cp -6 "enum(i)")
                   (inst -6 "enum(1+i)")
                   (assert)
                   (flatten)
                   (hide -6)
                   (hide -7)
                   (split -)
                   (("1" (split -) (("1" (assert)) ("2" (inst + "i"))))
                    ("2" (inst + "1+i"))))))))
              ("3" (skosimp*) (assert))))
            ("3" (assert))))
          ("3" (assert))))))
      ("2"
       (flatten)
       (split -)
       (("1"
         (lemma "poly_sign_near_infinity")
         (case "FORALL (j): j<=k IMPLIES EXISTS (M:posnat): FORALL (i): i<=j IMPLIES FORALL (x:real):x >= M IMPLIES sign_ext(polynomial(p(i), n(i))(x)) = sign_ext(p(i)(n(i)))")
         (("1"
           (inst - "k")
           (assert)
           (skeep)
           (inst + "M")
           (skeep)
           (inst - "i")
           (assert)
           (inst - "M")
           (assert)
           (inst - "i")
           (assert)
           (expand "sign_ext" -1)
           (lift-if)
           (ground))
          ("2"
           (induct "j")
           (("1"
             (assert)
             (inst - "p(0)" "n(0)")
             (assert)
             (split -1)
             (("1"
               (skeep)
               (inst + "M")
               (skeep)
               (skeep)
               (inst - "x")
               (assert))
              ("2" (inst - "0") (assert))))
            ("2"
             (skosimp*)
             (assert)
             (skeep -1)
             (inst - "p(1+j!1)" "n(1+j!1)")
             (split -)
             (("1"
               (skeep -1)
               (inst + "max(M!1,M)")
               (skeep)
               (case "i = 1+j!1")
               (("1" (skeep) (inst - "x") (assert))
                ("2"
                 (inst -2 "i")
                 (assert)
                 (skeep)
                 (inst -2 "x")
                 (assert))))
              ("2" (inst - "1+j!1") (inst - "1+j!1") (assert))))))))
        ("2"
         (case "FORALL (j): j<=k IMPLIES EXISTS (M:posnat): FORALL (i): i<=j IMPLIES FORALL (x:real):x <= -M IMPLIES sign_ext(polynomial(p(i), n(i))(x)) = sign_ext((IF even?(n(i)) THEN 1 ELSE -1 ENDIF)*p(i)(n(i)))")
         (("1"
           (inst - "k")
           (assert)
           (skeep)
           (inst + "-M")
           (skeep)
           (inst - "i")
           (assert)
           (inst - "-M")
           (assert)
           (inst - "i")
           (lemma "even_or_odd")
           (inst - "n(i)")
           (lift-if)
           (expand "sign_ext")
           (lift-if)
           (assert)
           (lift-if)
           (assert)
           (lift-if)
           (assert)
           (lift-if)
           (lift-if)
           (assert)
           (lift-if)
           (assert)
           (ground))
          ("2"
           (induct "j")
           (("1"
             (assert)
             (lemma "poly_sign_near_negative_infinity")
             (inst - "p(0)" "n(0)")
             (assert)
             (split -1)
             (("1"
               (skeep)
               (inst + "M")
               (skeep)
               (skeep)
               (inst - "x")
               (assert)
               (lift-if)
               (ground))
              ("2" (inst - "0") (assert) (lift-if) (ground))))
            ("2"
             (skosimp*)
             (lemma "poly_sign_near_negative_infinity")
             (inst - "p(1+j!1)" "n(1+j!1)")
             (assert)
             (split -)
             (("1"
               (skosimp*)
               (inst + "max(M!1,M!2)")
               (skeep)
               (case " i = 1+j!1")
               (("1" (skeep) (inst - "x") (assert) (lift-if) (ground))
                ("2"
                 (inst -2 "i")
                 (assert)
                 (skeep)
                 (inst -2 "x")
                 (assert))))
              ("2" (inst -3 "1+j!1") (assert) (lift-if) (ground))))))))
        ("3" (skeep) (inst + "x"))))))))


proof_type: f_proof
decl_type: formula
library: Tarski
theory: poly_systems
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (induct "k")
   (("1" (assert))
    ("2"
     (skeep)
     (rewrite "full_matrix_eq")
     (split)
     (("1" (expand "vect2matrix") (rewrite "rows_form_matrix") (assert))
      ("2"
       (expand "vect2matrix")
       (lemma "columns_form_matrix")
       (inst?)
       (assert)
       (replaces -1)
       (rewrite "length_row")
       (lift-if)
       (assert)
       (ground)
       (("1"
         (lemma "tensor_power_rows_alt")
         (inst?)
         (assert)
         (rewrite "expt_x1")
         (lemma "base_n_to_nat_lt")
         (inst?)
         (assert)
         (skosimp*)
         (assert))
        ("2" (lemma "tensor_power_columns_alt") (inst?) (assert))))
      ("3"
       (skosimp*)
       (assert)
       (expand "A63_tensor_power_mat_row")
       (expand "vect2matrix")
       (rewrite "entry_form_matrix")
       (rewrite "entry_form_matrix")
       (assert)
       (lift-if)
       (lift-if)
       (lift-if)
       (ground)
       (("1"
         (rewrite "access_row")
         (rewrite "access_row")
         (expand "tensor_power_alt")
         (expand "base_n_to_nat")
         (expand "sigma")
         (expand "sigma")
         (rewrite "expt_x0")
         (assert))
        ("2"
         (rewrite "length_row")
         (rewrite "length_row")
         (assert)
         (lift-if)
         (ground)
         (("1"
           (expand "base_n_to_nat")
           (expand "sigma")
           (expand "sigma")
           (rewrite "expt_x0")
           (lemma "tensor_power_rows_alt")
           (inst?)
           (assert)
           (rewrite "expt_x1")
           (assert))
          ("2" (lemma "tensor_power_columns_alt") (inst?) (assert))))
        ("3"
         (rewrite "length_row")
         (lift-if)
         (ground)
         (rewrite "length_row")
         (lemma "tensor_power_columns_alt")
         (inst?)
         (assert)
         (rewrite "expt_x1")
         (assert))))))
    ("3"
     (skolem 1 "k")
     (flatten)
     (skeep)
     (assert)
     (rewrite "full_matrix_eq" +)
     (split)
     (("1"
       (expand "vect2matrix" +)
       (lemma "columns_form_matrix")
       (inst?)
       (assert)
       (replaces -1)
       (rewrite "length_row")
       (lift-if)
       (ground)
       (("1"
         (lemma "base_n_to_nat_lt")
         (inst?)
         (assert)
         (split -)
         (("1" (lemma "tensor_power_rows_alt") (inst?) (assert))
          ("2" (skosimp*) (assert))))
        ("2" (lemma "tensor_power_columns_alt") (inst?) (assert))))
      ("2"
       (skeep)
       (case "NOT i = 0")
       (("1" (typepred "i") (assert))
        ("2"
         (replace -1)
         (assert)
         (case "NOT j < 3^(2+k)")
         (("1" (assert))
          ("2"
           (expand "vect2matrix" +)
           (rewrite "entry_form_matrix")
           (lift-if)
           (ground)
           (("1"
             (rewrite "access_row")
             (expand "A63_tensor_power_mat_row" +)
             (expand "tensor_prod")
             (rewrite "entry_form_matrix")
             (lift-if)
             (assert)
             (ground)
             (("1"
               (expand "tensor_fun")
               (inst? -5)
               (replace -5 +)
               (expand "vect2matrix" + 1)
               (rewrite "entry_form_matrix")
               (("1"
                 (lift-if)
                 (ground)
                 (("1"
                   (rewrite "access_row")
                   (("1"
                     (expand "vect2matrix" + 1)
                     (lemma "columns_form_matrix")
                     (inst?)
                     (split -)
                     (("1" (assert))
                      ("2"
                       (replaces -1)
                       (expand "vect2matrix" + 1)
                       (lemma "columns_form_matrix")
                       (inst?)
                       (assert)
                       (replaces -1)
                       (assert)
                       (expand "vect2matrix" + 1)
                       (rewrite "entry_form_matrix")
                       (("1"
                         (lift-if)
                         (ground)
                         (("1"
                           (rewrite "access_row")
                           (("1"
                             (expand "vect2matrix" + 1)
                             (lemma "columns_form_matrix")
                             (inst?)
                             (split -)
                             (("1" (assert))
                              ("2"
                               (replaces -1)
                               (assert)
                               (rewrite "length_row")
                               (case "NOT columns(A63)=3")
                               (("1" (assert))
                                ("2"
                                 (replace -1)
                                 (assert)
                                 (expand "tensor_power_alt" + 2)
                                 (expand "tensor_prod" +)
                                 (rewrite "entry_form_matrix" +)
                                 (lift-if)
                                 (ground)
                                 (("1"
                                   (expand "tensor_fun" +)
                                   (assert)
                                   (case "NOT rows(A63)=6")
                                   (("1" (assert))
                                    ("2"
                                     (replace -1)
                                     (assert)
                                     (case
                                      "base_n_to_nat(6, LAMBDA (d): RelF6(1 + d), k) = (base_n_to_nat(6, RelF6, 1 + k) -
                                                     mod(base_n_to_nat(6, RelF6, 1 + k), 6))
                                                    / 6")
                                     (("1"
                                       (replace -1 :dir rl)
                                       (case
                                        "mod(base_n_to_nat(6, RelF6, 1 + k), 6) = RelF6(0)")
                                       (("1" (assert))
                                        ("2"
                                         (hide 2)
                                         (case
                                          "FORALL (dd:nat): mod(base_n_to_nat(6, RelF6, dd), 6) = RelF6(0)")
                                         (("1" (inst?))
                                          ("2"
                                           (induct "dd")
                                           (("1"
                                             (expand "base_n_to_nat" 1)
                                             (expand "sigma")
                                             (expand "sigma")
                                             (rewrite "expt_x0")
                                             (assert)
                                             (expand "mod" 1)
                                             (assert))
                                            ("2"
                                             (skolem 1 "dd")
                                             (flatten)
                                             (assert)
                                             (expand
                                              "base_n_to_nat"
                                              (-1 1))
                                             (expand "sigma" + 1)
                                             (case "6^(1+dd) = 6*6^dd")
                                             (("1"
                                               (replace -1)
                                               (assert)
                                               (lemma "mod_sum")
                                               (inst
                                                -
                                                "sigma(0, dd, LAMBDA (s: nat): 6 ^ s * RelF6(s))"
                                                "6"
                                                "(RelF6(1 + dd) * 6 ^ dd)")
                                               (assert))
                                              ("2"
                                               (hide-all-but 1)
                                               (expand "^")
                                               (expand "expt" + 1)
                                               (propax))))))))))
                                      ("2"
                                       (hide 2)
                                       (assert)
                                       (case
                                        "FORALL (dd:nat): mod(base_n_to_nat(6, RelF6, dd), 6) = RelF6(0)")
                                       (("1"
                                         (inst - "1+k")
                                         (replace -1)
                                         (assert)
                                         (expand "base_n_to_nat" +)
                                         (lemma "sigma_split")
                                         (inst - _ "1+k" _ _)
                                         (inst - _ _ "0")
                                         (inst?)
                                         (assert)
                                         (replaces -1)
                                         (expand "sigma" + 2)
                                         (expand "sigma" + 2)
                                         (rewrite "expt_x0")
                                         (assert)
                                         (cross-mult 1)
                                         (rewrite "sigma_scal" :dir rl)
                                         (lemma "sigma_shift_to_zero")
                                         (inst - _ "1+k" "1")
                                         (inst?)
                                         (assert)
                                         (replaces -1)
                                         (rewrite "sigma_eq" 1)
                                         (hide 2)
                                         (skosimp*)
                                         (expand "^" +)
                                         (expand "expt" + 2)
                                         (assert))
                                        ("2"
                                         (hide 2)
                                         (induct "dd")
                                         (("1"
                                           (expand "base_n_to_nat")
                                           (expand "sigma")
                                           (expand "sigma")
                                           (rewrite "expt_x0")
                                           (assert)
                                           (expand "mod")
                                           (assert))
                                          ("2"
                                           (skolem 1 "dd")
                                           (flatten)
                                           (expand
                                            "base_n_to_nat"
                                            (-1 1))
                                           (expand "sigma" +)
                                           (case "6^(1+dd) = 6*6^dd")
                                           (("1"
                                             (replaces -1)
                                             (lemma "mod_sum")
                                             (inst
                                              -
                                              "sigma(0, dd, LAMBDA (s: nat): 6 ^ s * RelF6(s))"
                                              "6"
                                              "(RelF6(1 + dd) * 6 ^ dd)")
                                             (assert))
                                            ("2"
                                             (expand "^" 1)
                                             (expand "expt" + 1)
                                             (propax))))))))))))
                                  ("2"
                                   (hide 2)
                                   (lemma "base_n_to_nat_lt")
                                   (inst?)
                                   (split -)
                                   (("1"
                                     (lemma "tensor_power_rows_alt")
                                     (inst?)
                                     (assert)
                                     (replaces -1 :dir rl)
                                     (expand "^")
                                     (expand "expt" -1)
                                     (assert))
                                    ("2" (skosimp*) (assert))))
                                  ("3"
                                   (lemma "tensor_power_columns_alt")
                                   (inst?)
                                   (assert)
                                   (typepred "j")
                                   (replace -2 :dir rl)
                                   (case "3^(2+k) = 3^(1+k)* 3")
                                   (("1" (assert))
                                    ("2"
                                     (expand "^" 1)
                                     (expand "expt" + 1)
                                     (propax))))))))))
                            ("2"
                             (hide 2)
                             (expand "vect2matrix" + 1)
                             (lemma "columns_form_matrix")
                             (inst?)
                             (assert)
                             (lemma "mod_pos")
                             (inst?)
                             (assert))))
                          ("2"
                           (hide 2)
                           (rewrite "length_row")
                           (expand "vect2matrix" 1)
                           (lemma "columns_form_matrix")
                           (inst?)
                           (split -)
                           (("1" (assert))
                            ("2"
                             (replaces -1)
                             (rewrite "length_row")
                             (lemma "mod_pos")
                             (inst?)
                             (assert))))))
                        ("2"
                         (hide 2)
                         (expand "vect2matrix" 1)
                         (lemma "columns_form_matrix")
                         (inst?)
                         (split -)
                         (("1" (assert))
                          ("2"
                           (replaces -1)
                           (rewrite "length_row")
                           (lemma "mod_pos")
                           (inst?)
                           (assert))))))))
                    ("2"
                     (hide 2)
                     (expand "vect2matrix" 1)
                     (lemma "columns_form_matrix")
                     (inst?)
                     (split -)
                     (("1" (assert))
                      ("2"
                       (replaces -1)
                       (rewrite "length_row")
                       (expand "mod" +)
                       (assert)
                       (assert))))))
                  ("2"
                   (hide 2)
                   (expand "vect2matrix" 1)
                   (lemma "columns_form_matrix")
                   (inst?)
                   (assert)
                   (replaces -1)
                   (rewrite "length_row")
                   (rewrite "length_row")
                   (lift-if)
                   (ground)
                   (("1"
                     (lemma "base_n_to_nat_lt")
                     (inst?)
                     (split -)
                     (("1"
                       (assert)
                       (lemma "tensor_power_rows_alt")
                       (inst?)
                       (assert))
                      ("2" (skosimp*) (assert))))
                    ("2"
                     (lemma "tensor_power_columns_alt")
                     (inst?)
                     (replace -1 :dir rl)
                     (cross-mult 2)
                     (expand "mod" 2)
                     (typepred "j")
                     (typepred "A63_tensor_power_mat_row(2 + k)(RelF6)")
                     (hide (-1 -2 -3))
                     (hide (-1 -2))
                     (replaces -1)
                     (case "j/columns(A63) < columns(A63) ^ (1 + k)")
                     (("1" (assert))
                      ("2"
                       (cross-mult 1)
                       (expand "^" (-1 1))
                       (expand "expt" -)
                       (assert))))))))
                ("2"
                 (hide 2)
                 (expand "vect2matrix" 1)
                 (lemma "columns_form_matrix")
                 (inst?)
                 (assert)
                 (replaces -1)
                 (rewrite "length_row")
                 (case "NOT columns(A63)=3")
                 (("1" (assert))
                  ("2"
                   (replaces -1)
                   (assert)
                   (expand "mod" +)
                   (assert)
                   (assert))))))
              ("2"
               (hide 2)
               (typepred
                "A63_tensor_power_mat_row(1 + k)(LAMBDA (d): RelF6(1 + d))")
               (hide (-1 -2 -3 -4 -5))
               (replaces -1)
               (expand "vect2matrix" 1)
               (lemma "columns_form_matrix")
               (inst?)
               (assert)
               (replaces -1)
               (rewrite "length_row")
               (rewrite "length_row")
               (lift-if)
               (ground)
               (lemma "tensor_power_columns_alt")
               (inst?)
               (assert)
               (expand "^")
               (expand "expt" -1)
               (assert))))
            ("2"
             (rewrite "length_row")
             (lift-if)
             (ground)
             (("1"
               (lemma "base_n_to_nat_lt")
               (inst?)
               (split -)
               (("1" (lemma "tensor_power_rows_alt") (inst?) (assert))
                ("2" (skosimp*) (assert))))
              ("2"
               (lemma "tensor_power_columns_alt")
               (inst?)
               (assert))))))))))))
    ("4"
     (hide 2)
     (skosimp*)
     (rewrite "length_row")
     (lift-if)
     (ground)
     (lemma "tensor_power_rows_alt")
     (inst?)
     (assert)
     (lemma "base_n_to_nat_lt")
     (inst?)
     (assert)
     (skosimp*)
     (assert))))


proof_type: t_proof
decl_type: tcc
library: Tarski
theory: poly_systems
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (assert)
   (typepred "vect2matrix(row(A63)(RelF6(0)))")
   (assert)
   (replace -6)
   (rewrite "length_row" 1)
   (assert)
   (replace -7)
   (expand "^" + 1)
   (expand "expt")
   (expand "expt")
   (assert))


proof_type: t_proof
decl_type: tcc
library: Tarski
theory: poly_systems
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (rewrite "tensor_rows")
   (assert)
   (expand "tensor_prod")
   (lemma "columns_form_matrix")
   (inst?)
   (assert)
   (replaces -1)
   (expand "vect2matrix")
   (lemma "columns_form_matrix")
   (inst?)
   (assert)
   (replaces -1)
   (rewrite "length_row")
   (assert)
   (typepred "v(m - 1)(LAMBDA (d): RelF6(1 + d))")
   (replaces -6 +)
   (hide -)
   (expand "^")
   (expand "expt" + 2)
   (assert))


proof_type: t_proof
decl_type: tcc
library: Tarski
theory: poly_systems
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (rewrite "length_row")
   (lift-if)
   (ground)
   (lemma "tensor_power_rows_alt")
   (inst?)
   (assert)
   (lemma "base_n_to_nat_lt")
   (inst?)
   (split -)
   (("1" (assert)) ("2" (skosimp*) (assert))))


proof_type: t_proof
decl_type: tcc
library: Tarski
theory: poly_systems
signature: nil
run_date: Unknown date
run_time: ----
status: proved-incomplete
description: nil
script:
  (""
   (skeep)
   (name "ii" "base_n_to_nat(6,RelF6,k)")
   (case "super_dot(row(A63_tensor_power_mat_row(k + 1)(RelF6))(0),
                                                            col(TQ_vect3k(k, a, m, p, n))(0))
                                                   = NSol_all(k, a, m, p, n, RelF6)")
   (("1" (assert))
    ("2"
     (hide 2)
     (typepred
      "super_dot(row(A63_tensor_power_mat_row(k + 1)(RelF6))(0),
                                          col(TQ_vect3k(k, a, m, p, n))(0))")
     (replaces -1)
     (lemma "multi_sturm_tarski_NSol63")
     (inst - "p" "n" "a" "k" "m")
     (assert)
     (typepred "n")
     (replace -1)
     (assert)
     (both-sides-f -2 "entry")
     (decompose-equality -1)
     (inst - "(ii,0)")
     (case "NOT entry(NSol_vect6k(k, a, m, p, n))(ii, 0) = NSol_all(k, a, m, p, n, RelF6)")
     (("1"
       (hide 2)
       (expand "NSol_vect6k" +)
       (rewrite "entry_form_matrix")
       (("1"
         (lift-if)
         (ground)
         (("1"
           (lemma "base_n_base_n_to_nat")
           (inst?)
           (split -)
           (("1"
             (replace -5 :dir rl)
             (expand "NSol_all")
             (case "Sol_all(k, a, m, p, n, base_n(6, ii)) =
                                                                                                                                                 Sol_all(k, a, m, p, n, RelF6)")
             (("1" (assert))
              ("2"
               (hide 2)
               (decompose-equality 1)
               (expand "Sol_all")
               (iff)
               (assert)
               (ground)
               (("1"
                 (skeep)
                 (inst - "i")
                 (assert)
                 (inst - "i")
                 (assert)
                 (replace -8)
                 (replace -4)
                 (propax))
                ("2"
                 (skeep)
                 (inst - "i")
                 (assert)
                 (inst - "i")
                 (replace -8)
                 (replace -4)
                 (propax))))
              ("3"
               (skeep)
               (assert)
               (lemma "base_n_lt_n")
               (inst?)
               (assert))))
            ("2" (skeep) (assert))))
          ("2"
           (replace -3 1 :dir rl)
           (lemma "base_n_to_nat_lt")
           (inst?)
           (assert)
           (skosimp*)
           (assert))))
        ("2"
         (hide-all-but 1)
         (skosimp*)
         (lemma "base_n_lt_n")
         (inst?)
         (assert))))
      ("2"
       (replaces -1 :dir rl)
       (replaces -1 +)
       (assert)
       (lemma "A63_tensor_power_mat_row_def")
       (inst?)
       (replace -3)
       (assert)
       (replaces -1)
       (rewrite "entry_mult")
       (lift-if)
       (ground)
       (("1"
         (expand "*" +)
         (case "row(vect2matrix(row(tensor_power_alt(A63, 1 + k))(ii)))(0) = row(tensor_power_alt(A63, 1 + k))(ii)")
         (("1" (assert))
          ("2"
           (hide 2)
           (lemma "vect2matrix_eq")
           (inst?)
           (assert)
           (hide 2)
           (split 1)
           (("1"
             (rewrite "length_row")
             (expand "vect2matrix" 1)
             (lemma "columns_form_matrix")
             (inst?)
             (assert))
            ("2"
             (rewrite "full_matrix_eq")
             (split)
             (("1"
               (expand "vect2matrix" 1)
               (lemma "columns_form_matrix")
               (inst?)
               (assert)
               (replaces -1)
               (lemma "columns_form_matrix")
               (inst?)
               (assert)
               (replaces -1)
               (rewrite "length_row" 1)
               (rewrite "length_row" 1)
               (lift-if)
               (ground)
               (("1" (lemma "rows_form_matrix") (inst?) (assert))
                ("2" (lemma "columns_form_matrix") (inst?) (assert))))
              ("2"
               (skosimp*)
               (expand "vect2matrix" + 1)
               (lemma "entry_form_matrix")
               (inst?)
               (assert)
               (replaces -1)
               (expand "vect2matrix" + 2)
               (lemma "entry_form_matrix")
               (inst?)
               (assert)
               (replaces -1)
               (rewrite "length_row" +)
               (assert)
               (lift-if)
               (split +)
               (("1"
                 (flatten)
                 (rewrite "access_row")
                 (rewrite "access_row")
                 (expand "vect2matrix" +)
                 (lemma "entry_form_matrix")
                 (inst?)
                 (assert)
                 (replaces -1)
                 (lift-if)
                 (rewrite "length_row" +)
                 (assert)
                 (rewrite "access_row"))
                ("2"
                 (ground)
                 (typepred "j!1")
                 (expand "vect2matrix" -1 1)
                 (lemma "columns_form_matrix")
                 (inst?)
                 (assert)
                 (replaces -1)
                 (rewrite "length_row")
                 (expand "vect2matrix" -1 1)
                 (lemma "columns_form_matrix")
                 (inst?)
                 (assert)
                 (replaces -1)
                 (rewrite "length_row"))))))))))
        ("2"
         (hide 2)
         (lemma "base_n_to_nat_lt")
         (inst?)
         (split -)
         (("1" (lemma "tensor_power_rows_alt") (inst?) (assert))
          ("2" (skosimp*) (assert))))))))))


proof_type: f_proof
decl_type: formula
library: Tarski
theory: system_solvers
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (expand "entry_fun")
   (lemma "tensor_entry")
   (inst -1 "A63" "1+k" " base_n_to_nat(6, RelF6, k)" "i")
   (("1"
     (ground)
     (case "rows(A63) = 6 AND columns(A63) = 3")
     (("1"
       (flatten)
       (replace -1)
       (replace -2)
       (replace -3)
       (rewrite "product_eq")
       (("1"
         (hide 2)
         (skeep)
         (expand "entry_pick")
         (lemma "base_n_base_n_to_nat")
         (inst -1 "6" "RelF6" "k")
         (ground)
         (("1"
           (inst -1 "n")
           (replace -1)
           (expand "rows_fun")
           (expand "base_list")
           (typepred "array2list[below(3)](1+k)(base_n(3, i))")
           (("1"
             (inst -3 "n")
             (replace -3 :dir rl)
             (ground)
             (expand "entry")
             (expand "access")
             (propax))
            ("2" (inst 1 "0"))))
          ("2" (skeep) (ground))))
        ("2" (skeep) (hide 2) (ground)) ("3" (skeep) (hide 2) (ground))))
      ("2" (eval-formula 1))))
    ("2"
     (case-replace "columns(A63) = 3")
     (("1" (ground)) ("2" (eval-formula 1))))
    ("3"
     (lemma "base_n_to_nat_lt")
     (inst -1 "RelF6" "k" "6")
     (split -1)
     (("1"
       (case-replace "rows(A63) = 6")
       (("1" (ground)) ("2" (eval-formula 1))))
      ("2" (skeep) (ground))))
    ("4" (ground))))


proof_type: f_proof
decl_type: formula
library: Tarski
theory: system_solvers
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (expand "TQlist_fun")
   (skeep)
   (typepred (j))
   (expand "base_list")
   (lemma "array2list_inv[below(3)]")
   (inst -1 "base_n(3, j)" "0" "1+k" "_")
   (case-replace
    "list2array[below(3)]
                     (0)(array2list[below(3)](1 + k)(base_n(3, j)))=base_n(3, j)")
   (hide 2)
   (decompose-equality 1)
   (case "x!1<1+k")
   (("1" (inst?))
    ("2"
     (lemma "list2array_sound[below(3)]")
     (hide -2)
     (expand "length")
     (inst -1 "array2list[below(3)](1 + k)(base_n(3, j))" "0" "x!1")
     (typepred "array2list[below(3)](1 + k)(base_n(3, j))")
     (expand "length" -2)
     (replace -2)
     (lift-if -4)
     (ground)
     (replace -1)
     (lemma "base_n_0")
     (inst?)
     (flip-ineq 1)
     (swap-rel -1)
     (lemma "both_sides_expt_gt1_le")
     (inst -1 "3" "1+k" "x!1")
     (ground))))


proof_type: t_proof
decl_type: tcc
library: Tarski
theory: system_solvers
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (case "RelF6(j) = 0 OR RelF6(j) =  1 OR RelF6(j) =  2 or RelF6(j) = 3 OR RelF6(j) = 4 or RelF6(j) = 5")
   (("1"
     (split)
     (("1" (replace -1) (eval-formula 1))
      ("2" (replace -1) (eval-formula 1))
      ("3" (replace -1) (eval-formula 1))
      ("4" (replace -1) (eval-formula 1))
      ("5" (replace -1) (eval-formula 1))
      ("6" (replace -1) (eval-formula 1))))
    ("2" (ground))))


proof_type: t_proof
decl_type: tcc
library: Tarski
theory: system_solvers
signature: nil
run_date: Unknown date
run_time: ----
status: proved-incomplete
description: nil
script:
  (""
   (skeep)
   (case-replace
    "dot_tail_sum2plus(k + 1, EntFun, TQlist_fun(k, a, m, p, n), 0, 0,
                            base_list(3, 0, k + 1)) = sturm_tarski_solver_slow_basic(k,a,m,p,n,RelF6)")
   (("1" (ground))
    ("2"
     (hide 3)
     (lemma "dot_tail_sum_lem")
     (inst?)
     (replace -1)
     (simplify)
     (expand "sturm_tarski_solver_slow_basic")
     (typepred
      "super_dot(row(A63_tensor_power_mat_row(1 + k)(RelF6))(0),
                       col(TQ_vect3k(k, a, m, p, n))(0))")
     (replace -1)
     (hide (-1 -2))
     (rewrite "dot_eq_sigma")
     (typepred "A63_tensor_power_mat_row(1 + k)(RelF6)")
     (rewrite "length_row")
     (("1"
       (rewrite "length_col")
       (replace -6)
       (typepred "TQ_vect3k(k, a, m, p, n)")
       (replace -5)
       (hide-all-but (-13 1 2))
       (ground)
       (rewrite "sigma_eq")
       (hide 2)
       (skeep)
       (replace -1)
       (rewrite "entry_is")
       (rewrite "TQlist_lem")
       (rewrite "access_col")
       (rewrite "access_row")
       (lemma "A63_tensor_power_mat_row_def")
       (inst -1 "RelF6" "k")
       (ground)
       (replace -1)
       (expand "vect2matrix")
       (lemma "entry_form_matrix")
       (inst?)
       (ground)
       (replace -1)
       (rewrite "access_row")
       (hide -1)
       (expand "TQ_vect3k")
       (lemma "entry_form_matrix")
       (inst -1
        "LAMBDA (i_1: nat, j_1: nat):
                                    IF i_1 >= 3 ^ (1 + k) OR j_1 >= 1 THEN 0
                                    ELSE TQ_fam(k, a, m, p, n, base_n(3, i_1))
                                    ENDIF"
        "_" "_" "_" "_")
       (("1" (inst?) (replace -1) (ground))
        ("2"
         (hide 2)
         (skeep)
         (skeep)
         (lemma "base_n_lt_n")
         (inst?)
         (ground))))
      ("2" (expand "rows") (ground))))
    ("3" (ground)) ("4" (ground))))


proof_type: f_proof
decl_type: formula
library: Tarski
theory: poly_system_strategy
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (expand "solvable?")
   (expand "solvable_at?")
   (expand "rel5")
   (ground)
   (("1"
     (skeep)
     (inst + "x")
     (skeep)
     (inst - "i")
     (assert)
     (typepred "greatify_rel(RelF6)(i)")
     (assert)
     (split -)
     (("1"
       (flatten)
       (expand "greatify_rel" 3 1)
       (assert)
       (expand "greatify_poly_rel" +)
       (expand "greatify_poly")
       (propax))
      ("2"
       (flatten)
       (split -)
       (("1"
         (flatten)
         (assert)
         (expand "greatify_rel" 4)
         (expand "greatify_poly_rel" +)
         (expand "greatify_poly")
         (propax))
        ("2"
         (flatten)
         (split -)
         (("1"
           (flatten)
           (expand "greatify_rel" 5)
           (assert)
           (expand "greatify_poly_rel" +)
           (expand "greatify_poly")
           (rewrite "scal_polynomial2")
           (assert))
          ("2"
           (flatten)
           (split -)
           (("1"
             (assert)
             (flatten)
             (expand "greatify_rel" 7)
             (assert)
             (expand "greatify_poly_rel" +)
             (expand "greatify_poly")
             (propax))
            ("2"
             (flatten)
             (split -)
             (("1"
               (flatten)
               (assert)
               (expand "greatify_rel" 7)
               (assert)
               (expand "greatify_poly_rel" +)
               (expand "greatify_poly")
               (propax))
              ("2"
               (flatten)
               (expand "greatify_rel" 8)
               (assert)
               (expand "greatify_poly_rel" +)
               (expand "greatify_poly")
               (rewrite "scal_polynomial2")
               (assert))))))))))))
    ("2"
     (skeep)
     (inst + "x")
     (skeep)
     (inst - "i")
     (split 1)
     (("1"
       (flatten)
       (expand "greatify_rel" -)
       (assert)
       (expand "greatify_poly_rel")
       (expand "greatify_poly")
       (propax))
      ("2"
       (flatten)
       (expand "greatify_rel" -)
       (assert)
       (split +)
       (("1"
         (flatten)
         (assert)
         (expand "greatify_poly_rel")
         (expand "greatify_poly")
         (propax))
        ("2"
         (flatten)
         (split +)
         (("1"
           (flatten)
           (assert)
           (expand "greatify_poly_rel")
           (expand "greatify_poly")
           (rewrite "scal_polynomial2")
           (assert))
          ("2"
           (flatten)
           (split +)
           (("1"
             (flatten)
             (assert)
             (expand "greatify_poly_rel")
             (expand "greatify_poly")
             (propax))
            ("2"
             (flatten)
             (assert)
             (split +)
             (("1"
               (flatten)
               (assert)
               (expand "greatify_poly_rel")
               (expand "greatify_poly")
               (propax))
              ("2"
               (flatten)
               (assert)
               (expand "greatify_poly_rel")
               (expand "greatify_poly")
               (rewrite "scal_polynomial2")
               (assert))))))))))))))


proof_type: f_proof
decl_type: formula
library: Tarski
theory: poly_system_strategy
signature: nil
run_date: Unknown date
run_time: ----
status: proved-incomplete
description: nil
script:
  (""
   (skeep)
   (skeep)
   (expand "compute_solvable_single")
   (lift-if)
   (split +)
   (("1" (flatten) (replace -1) (assert) (grind))
    ("2"
     (flatten)
     (assert)
     (split +)
     (("1"
       (flatten)
       (assert)
       (replace -1)
       (name "x1" "-a(0)/a(1)-1")
       (name "x2" "-a(0)/a(1)+1")
       (case "(polynomial(a,1)(x1)>0 AND polynomial(a,1)(x2)<0) OR (polynomial(a,1)(x1)<0 AND polynomial(a,1)(x2)>0)")
       (("1"
         (inst-cp + "x1")
         (inst-cp + "x2")
         (inst + "-a(0)/a(1)")
         (grind))
        ("2" (hide 2) (flatten) (grind))))
      ("2"
       (flatten)
       (assert)
       (split +)
       (("1"
         (flatten)
         (lemma "system_roots_enum")
         (inst - "0" "LAMBDA (k): d" "LAMBDa (k): a")
         (assert)
         (skeep -)
         (case "K = 0")
         (("1"
           (inst + "0")
           (inst -4 "0" "0")
           (assert)
           (replace -5 +)
           (expand "rel5")
           (assert)
           (skosimp*))
          ("2"
           (inst + "enum(K-1)+2")
           (("1"
             (replace -4 +)
             (expand "rel5")
             (inst -3 "2+enum(K-1)" "0")
             (("1" (assert) (skosimp*) (inst - "i!1" "K-1") (ground))
              ("2" (assert))))
            ("2" (assert))))))
        ("2"
         (flatten)
         (case "NOT ((sturm_tarski_faster(1,
                                                                                                          a,
                                                                                                          d,
                                                                                                          LAMBDA (k): LAMBDA (j): 1,
                                                                                                          LAMBDA (k): 0,
                                                                                                          LAMBDA (j): 1)
                                                                            /= 0) IFF (EXISTS (x:real): polynomial(a,d)(x)=0))")
         (("1"
           (hide 3)
           (typepred
            "sturm_tarski_faster(1,
                                                   a,
                                                   d,
                                                   LAMBDA (k): LAMBDA (j): 1,
                                                   LAMBDA (k): 0,
                                                   LAMBDA (j): 1)")
           (replaces -1)
           (hide -)
           (expand "NSol_all")
           (lemma "empty_card[real]")
           (inst?)
           (assert)
           (expand "empty?")
           (expand "member")
           (ground)
           (("1"
             (skosimp*)
             (inst - "x!1")
             (expand "Sol_all" +)
             (assert)
             (hide -)
             (grind))
            ("2"
             (skosimp*)
             (inst + "x!1")
             (expand "Sol_all" -)
             (flatten))))
          ("2"
           (replace -1)
           (case "i = 0")
           (("1" (replaces -1) (expand "rel5") (propax))
            ("2"
             (assert)
             (label "izero" 1)
             (hide "izero")
             (split +)
             (("1"
               (flatten)
               (assert)
               (hide -2)
               (skosimp*)
               (inst + "x!1")
               (expand "rel5")
               (ground))
              ("2"
               (flatten +)
               (split 2)
               (("1"
                 (flatten)
                 (case "NOT (i = 0 OR i = 1 OR i=2 OR i=3 OR i=4 OR i=5)")
                 (("1" (flatten) (assert))
                  ("2"
                   (assert)
                   (split -)
                   (("1"
                     (replace -1)
                     (expand "rel5")
                     (assert)
                     (replace -1)
                     (case "NOT greatify_rel(LAMBDA (j): 1) = (LAMBDA (j): 1)")
                     (("1"
                       (hide-all-but 1)
                       (decompose-equality 1)
                       (expand "greatify_rel")
                       (propax))
                      ("2"
                       (replaces -1)
                       (assert)
                       (split 1)
                       (("1"
                         (flatten)
                         (lemma "strict_poly_system_solvable")
                         (inst - "0" "LAMBDA (ii:nat): d"
                          "LAMBDA (ii:nat): a")
                         (assert)
                         (flatten -1)
                         (hide -2)
                         (split -1)
                         (("1" (inst - "0") (assert))
                          ("2" (inst -1 "0") (assert))
                          ("3"
                           (hide 3)
                           (skosimp*)
                           (expand "sigma")
                           (expand "sigma")
                           (assert)
                           (typepred
                            "sturm_tarski_faster(1,
                                                                                                                                     poly_deriv(a),
                                                                                                                                     d - 1,
                                                                                                                                     LAMBDA (j): a,
                                                                                                                                     LAMBDA (j): d,
                                                                                                                                     LAMBDA (j): 1)")
                           (hide (-2 -3))
                           (replaces -1)
                           (assert)
                           (expand "NSol_all" -)
                           (lemma "empty_card[real]")
                           (inst?)
                           (assert)
                           (expand "empty?")
                           (inst - "x!1")
                           (expand "member")
                           (expand "Sol_all" +)
                           (assert)
                           (split)
                           (("1"
                             (replace -2 1 :dir rl)
                             (rewrite "poly_eq_le_degree")
                             (hide 2)
                             (skosimp*)
                             (expand "poly_deriv" +)
                             (expand "prod_polynomials")
                             (lift-if)
                             (ground))
                            ("2" (skosimp*) (inst - "0") (assert))))
                          ("4" (skosimp*) (inst + "x!1") (skosimp*))))
                        ("2"
                         (flatten)
                         (lemma "strict_poly_system_solvable")
                         (inst - "0" "LAMBDA (ii:nat): d"
                          "LAMBDA (ii:nat): a")
                         (assert)
                         (flatten)
                         (hide -1)
                         (split -1)
                         (("1"
                           (skosimp*)
                           (inst - "0")
                           (inst + "x!1")
                           (assert))
                          ("2"
                           (flatten)
                           (split -1)
                           (("1" (skosimp 1))
                            ("2" (flatten) (hide 1) (skosimp 1) (assert))
                            ("3"
                             (typepred
                              "sturm_tarski_faster(1,
                                                                                                                                             poly_deriv(a),
                                                                                                                                             d - 1,
                                                                                                                                             LAMBDA (j): a,
                                                                                                                                             LAMBDA (j): d,
                                                                                                                                             LAMBDA (j): 1)")
                             (hide (-2 -3))
                             (replaces -1)
                             (expand "NSol_all" -1)
                             (lemma "empty_card[real]")
                             (inst?)
                             (assert)
                             (expand "empty?")
                             (expand "member")
                             (skosimp*)
                             (inst 4 "x!1")
                             (expand "Sol_all" -1)
                             (flatten)
                             (split 4)
                             (("1"
                               (expand "sigma" 1)
                               (expand "sigma" 1)
                               (assert))
                              ("2"
                               (expand "sigma" 1)
                               (expand "sigma" 1)
                               (invoke (case "%1 = %2") (! -1 1) (! 1 1))
                               (("1" (assert))
                                ("2"
                                 (hide (-1 2))
                                 (rewrite "poly_eq_le_degree")
                                 (hide 2)
                                 (skosimp*)
                                 (expand "poly_deriv")
                                 (expand "prod_polynomials")
                                 (lift-if)
                                 (ground))))
                              ("3"
                               (skosimp*)
                               (inst - "0")
                               (assert))))))))))))
                    ("2" (replace -1) (expand "rel5") (propax))
                    ("3"
                     (replace -1)
                     (expand "rel5")
                     (case "NOT greatify_rel(LAMBDA (j): 4) = (LAMBDA (j): 4)")
                     (("1"
                       (decompose-equality 1)
                       (expand "greatify_rel")
                       (propax))
                      ("2"
                       (replaces -1)
                       (assert)
                       (hide -2)
                       (split +)
                       (("1"
                         (flatten)
                         (case "NOT EXISTS (x): polynomial(a, d)(x) > 0")
                         (("1"
                           (skeep)
                           (inst + "x")
                           (inst + "x")
                           (assert))
                          ("2"
                           (hide -2)
                           (replace 3)
                           (typepred
                            "sturm_tarski_faster(1,
                                                                                                                                     poly_deriv(a),
                                                                                                                                     d - 1,
                                                                                                                                     LAMBDA (j): a,
                                                                                                                                     LAMBDA (j): d,
                                                                                                                                     LAMBDA (j): 4)")
                           (hide (-2 -3))
                           (replaces -1)
                           (skosimp*)
                           (lemma "strict_poly_system_solvable")
                           (inst - "0" "LAMBDA (ii:nat): d"
                            "LAMBDA (ii:nat): a")
                           (assert)
                           (flatten -1)
                           (hide -2)
                           (split -1)
                           (("1" (inst - "0") (assert))
                            ("2" (inst -1 "0") (assert))
                            ("3"
                             (hide 3)
                             (skosimp*)
                             (expand "sigma")
                             (expand "sigma")
                             (assert)
                             (typepred
                              "sturm_tarski_faster(1,
                                                                                                                                                                   poly_deriv(a),
                                                                                                                                                                   d - 1,
                                                                                                                                                                   LAMBDA (j): a,
                                                                                                                                                                   LAMBDA (j): d,
                                                                                                                                                                   LAMBDA (j): 4)")
                             (hide (-2 -3))
                             (replaces -1)
                             (expand "NSol_all" -)
                             (lemma "empty_card[real]")
                             (inst?)
                             (assert)
                             (expand "empty?")
                             (inst - "x!2")
                             (expand "member")
                             (expand "Sol_all" +)
                             (assert)
                             (split +)
                             (("1"
                               (replace -3 1 :dir rl)
                               (rewrite "poly_eq_le_degree" 1 :dir rl)
                               (hide 2)
                               (skosimp*)
                               (expand "poly_deriv")
                               (expand "prod_polynomials")
                               (lift-if)
                               (ground))
                              ("2" (inst - "0") (skosimp*) (assert))))
                            ("4" (inst + "x!1") (assert))))))
                        ("2"
                         (flatten)
                         (split -1)
                         (("1"
                           (lemma "poly_sign_near_infinity")
                           (inst?)
                           (assert)
                           (skosimp*)
                           (inst - "M!1")
                           (inst + "M!1")
                           (assert)
                           (expand "sign_ext")
                           (assert))
                          ("2"
                           (split -)
                           (("1" (propax))
                            ("2"
                             (assert)
                             (lemma "poly_sign_near_negative_infinity")
                             (inst?)
                             (assert)
                             (skosimp*)
                             (inst - "-M!1")
                             (assert)
                             (lemma "even_or_odd")
                             (inst?)
                             (assert)
                             (inst + "-M!1")
                             (expand "sign_ext")
                             (lift-if)
                             (ground))))
                          ("3"
                           (typepred
                            "sturm_tarski_faster(1,
                                                                                                                                     poly_deriv(a),
                                                                                                                                     d - 1,
                                                                                                                                     LAMBDA (j): a,
                                                                                                                                     LAMBDA (j): d,
                                                                                                                                     LAMBDA (j): 4)")
                           (hide (-2 -3))
                           (flatten)
                           (replaces -1)
                           (expand "NSol_all" +)
                           (lemma "empty_card[real]")
                           (inst?)
                           (assert)
                           (expand "empty?" 1)
                           (skosimp*)
                           (inst + "x!1")
                           (expand "member")
                           (expand "Sol_all")
                           (flatten)
                           (inst - "0")
                           (assert))))))))
                    ("4" (replace -1) (expand "rel5") (propax))))))
                ("2"
                 (flatten)
                 (assert)
                 (case "NOT (i=2 OR i=5 )")
                 (("1"
                   (reveal "izero")
                   (flatten)
                   (expand "rel5" 4)
                   (assert))
                  ("2"
                   (split -1)
                   (("1"
                     (assert)
                     (replace -1)
                     (expand "rel5")
                     (case "NOT greatify_rel(LAMBDA (j): 2) = (LAMBDA (j): 1)")
                     (("1"
                       (decompose-equality 1)
                       (expand "greatify_rel")
                       (propax))
                      ("2"
                       (replaces -1)
                       (assert)
                       (expand "*")
                       (split +)
                       (("1"
                         (flatten)
                         (assert)
                         (lemma "strict_poly_system_solvable")
                         (inst - "0" "LAMBDA (ii:nat): d"
                          "LAMBDA (ii:nat): (-1)*a")
                         (("1"
                           (assert)
                           (expand "*")
                           (flatten -1)
                           (hide -2)
                           (split -1)
                           (("1" (inst - "0") (assert))
                            ("2" (inst -1 "0") (assert))
                            ("3"
                             (hide 3)
                             (skosimp*)
                             (expand "sigma")
                             (expand "sigma")
                             (assert)
                             (typepred
                              "sturm_tarski_faster(1,
                                                                                             poly_deriv(a),
                                                                                             d - 1,
                                                                                             LAMBDA
                                                                                             (j):
                                                                                             LAMBDA (x: nat): (-1) * a(x),
                                                                                             LAMBDA (j): d,
                                                                                             (LAMBDA (j): 1))")
                             (hide (-2 -3))
                             (replaces -1)
                             (assert)
                             (expand "NSol_all" -)
                             (lemma "empty_card[real]")
                             (inst?)
                             (assert)
                             (expand "empty?")
                             (inst - "x!1")
                             (expand "member")
                             (expand "Sol_all" +)
                             (assert)
                             (split)
                             (("1"
                               (case "polynomial(poly_deriv(prod_polynomials(LAMBDA
                                                                                                                   (ii: nat):
                                                                                                                   LAMBDA (x: nat): (-1) * a(x),
                                                                                                                   LAMBDA (ii: nat): d,
                                                                                                                   (LAMBDA (i: nat): 1),
                                                                                                                   0)),
                                                                                       d - 1)
                                                                                      (x!1)=(-1)*polynomial(poly_deriv(a), d - 1)(x!1)")
                               (("1" (assert))
                                ("2"
                                 (rewrite "scal_polynomial2" :dir rl)
                                 (rewrite "poly_eq_le_degree")
                                 (hide 2)
                                 (skosimp*)
                                 (expand "poly_deriv" +)
                                 (expand "prod_polynomials")
                                 (expand "*")
                                 (lift-if)
                                 (ground))))
                              ("2" (skosimp*) (inst - "0") (assert))))
                            ("4"
                             (skosimp*)
                             (inst + "x!1")
                             (skosimp*)
                             (lemma "scal_polynomial2")
                             (expand "*" -)
                             (rewrite -1 +)
                             (assert)
                             (lemma "sigma_tolambda")
                             (expand "polynomial" (-4 1))
                             (assert))))
                          ("2" (skosimp*) (expand "*" 1) (propax))))
                        ("2"
                         (flatten)
                         (lemma "strict_poly_system_solvable")
                         (inst - "0" "LAMBDA (ii:nat): d"
                          "LAMBDA (ii:nat): (-1)*a")
                         (("1"
                           (assert)
                           (expand "*" -1 1)
                           (flatten)
                           (hide -1)
                           (split -1)
                           (("1"
                             (skosimp*)
                             (inst - "0")
                             (assert)
                             (inst + "x!1")
                             (rewrite "scal_polynomial2")
                             (assert))
                            ("2"
                             (flatten)
                             (split -1)
                             (("1" (skosimp 1) (expand "*" 1) (propax))
                              ("2"
                               (assert)
                               (flatten)
                               (hide 1)
                               (skosimp 1)
                               (assert)
                               (expand "*" 1)
                               (assert))
                              ("3"
                               (typepred
                                "sturm_tarski_faster(1,
                                                                                                 poly_deriv(a),
                                                                                                 d - 1,
                                                                                                 LAMBDA
                                                                                                 (j):
                                                                                                 LAMBDA (zz: nat): (-1) * a(zz),
                                                                                                 LAMBDA (j): d,
                                                                                                 (LAMBDA (j): 1))")
                               (hide (-2 -3))
                               (replaces -1)
                               (expand "NSol_all" -1)
                               (lemma "empty_card[real]")
                               (inst?)
                               (assert)
                               (expand "empty?")
                               (expand "member")
                               (skosimp*)
                               (inst 5 "x!1")
                               (expand "Sol_all" -1)
                               (flatten)
                               (inst - "0")
                               (assert)
                               (lemma "scal_polynomial2")
                               (expand "*" -1)
                               (rewrite -1)
                               (assert)
                               (hide-all-but (-3 5))
                               (invoke (case "NOT %1 = %2") (! -1 1 2)
                                (! 1 1))
                               (("1" (rewrite "poly_eq_le_degree"))
                                ("2" (assert))))))))
                          ("2" (skosimp*) (expand "*" 1) (propax))))))))
                    ("2"
                     (replace -1)
                     (expand "rel5")
                     (assert)
                     (hide -2)
                     (split +)
                     (("1"
                       (flatten)
                       (case "NOT EXISTS (x): polynomial(a, d)(x) < 0")
                       (("1" (skeep) (inst + "x") (inst + "x") (assert))
                        ("2"
                         (hide -2)
                         (replace 3)
                         (case "NOT greatify_rel(LAMBDA (j): 5) = (LAMBDA (j): 4)")
                         (("1"
                           (decompose-equality 1)
                           (expand "greatify_rel" 1)
                           (propax))
                          ("2"
                           (replaces -1)
                           (typepred
                            "sturm_tarski_faster(1,
                                                                                         poly_deriv(a),
                                                                                         d - 1,
                                                                                         LAMBDA (j): (-1) * a,
                                                                                         LAMBDA (j): d,
                                                                                         (LAMBDA (j): 4))")
                           (("1"
                             (hide (-2 -3))
                             (replaces -1)
                             (skosimp*)
                             (lemma "strict_poly_system_solvable")
                             (inst - "0" "LAMBDA (ii:nat): d"
                              "LAMBDA (ii:nat): (-1)*a")
                             (("1"
                               (assert)
                               (expand "*" -1 1)
                               (flatten -1)
                               (hide -2)
                               (split -1)
                               (("1" (inst - "0") (assert))
                                ("2"
                                 (inst -1 "0")
                                 (assert)
                                 (expand "*" 1)
                                 (assert)
                                 (expand "*")
                                 (lift-if)
                                 (assert))
                                ("3"
                                 (hide 3)
                                 (expand "*")
                                 (assert)
                                 (skosimp*)
                                 (expand "sigma")
                                 (expand "sigma")
                                 (assert)
                                 (expand "NSol_all" -)
                                 (lemma "empty_card[real]")
                                 (inst?)
                                 (assert)
                                 (expand "empty?")
                                 (inst - "x!2")
                                 (expand "member")
                                 (expand "Sol_all" +)
                                 (assert)
                                 (split +)
                                 (("1"
                                   (case
                                    "polynomial(poly_deriv(prod_polynomials(LAMBDA
                                                                                                                 (ii: nat):
                                                                                                                 LAMBDA (x: nat): (-1) * a(x),
                                                                                                                 LAMBDA (ii: nat): d,
                                                                                                                 (LAMBDA (i: nat): 1),
                                                                                                                 0)),
                                                                                     d - 1)
                                                                                    (x!2)=(-1)*polynomial(poly_deriv(a), d - 1)(x!2)")
                                   (("1" (assert))
                                    ("2"
                                     (rewrite "scal_polynomial2" :dir rl)
                                     (rewrite
                                      "poly_eq_le_degree"
                                      1
                                      :dir
                                      rl)
                                     (hide 2)
                                     (skosimp*)
                                     (expand "poly_deriv")
                                     (expand "prod_polynomials")
                                     (expand "*")
                                     (lift-if)
                                     (ground))))
                                  ("2"
                                   (skosimp*)
                                   (inst - "0")
                                   (assert))))
                                ("4"
                                 (inst + "x!1")
                                 (skosimp*)
                                 (rewrite "scal_polynomial2")
                                 (assert))))
                              ("2" (skosimp*) (expand "*" 1) (propax))))
                            ("2"
                             (skosimp*)
                             (expand "*" 1)
                             (expand "*" -1)
                             (assert))
                            ("3"
                             (skosimp*)
                             (expand "*" 1)
                             (propax))))))))
                      ("2"
                       (flatten)
                       (split -1)
                       (("1"
                         (lemma "poly_sign_near_infinity")
                         (inst - "(-1)*a" "d")
                         (assert)
                         (skosimp*)
                         (inst - "M!1")
                         (inst + "M!1")
                         (assert)
                         (rewrite "scal_polynomial2")
                         (expand "*")
                         (expand "sign_ext")
                         (assert))
                        ("2"
                         (flatten)
                         (assert)
                         (lemma "poly_sign_near_negative_infinity")
                         (inst?)
                         (assert)
                         (skosimp*)
                         (inst - "-M!1")
                         (assert)
                         (lemma "even_or_odd")
                         (inst?)
                         (assert)
                         (expand "*" -3)
                         (inst + "-M!1")
                         (expand "sign_ext")
                         (lift-if)
                         (ground))
                        ("3"
                         (case "NOT greatify_rel(LAMBDA (j): 5) = (LAMBDA (j): 4)")
                         (("1"
                           (decompose-equality 1)
                           (expand "greatify_rel" 1)
                           (propax))
                          ("2"
                           (replaces -1)
                           (typepred
                            "sturm_tarski_faster(1,
                                                                                         poly_deriv(a),
                                                                                         d - 1,
                                                                                         LAMBDA (j): (-1) * a,
                                                                                         LAMBDA (j): d,
                                                                                         (LAMBDA (j): 4))")
                           (("1"
                             (hide (-2 -3))
                             (replaces -1)
                             (assert)
                             (flatten)
                             (expand "NSol_all" +)
                             (lemma "empty_card[real]")
                             (inst?)
                             (("1"
                               (assert)
                               (expand "empty?" 1)
                               (skosimp*)
                               (inst + "x!1")
                               (expand "member")
                               (expand "Sol_all")
                               (flatten)
                               (inst - "0")
                               (assert)
                               (rewrite "scal_polynomial2")
                               (assert))
                              ("2" (skosimp*) (expand "*" 1) (propax))))
                            ("2" (skosimp*) (expand "*" -1) (assert))
                            ("3"
                             (skosimp*)
                             (expand "*" 1)
                             (propax))))))))))))))))))))))))))))


proof_type: f_proof
decl_type: formula
library: Tarski
theory: poly_system_strategy
signature: nil
run_date: Unknown date
run_time: ----
status: proved-incomplete
description: nil
script:
  (""
   (skeep)
   (label "ndef" -1)
   (case "k = 0")
   (("1"
     (replace -1)
     (expand "compute_solvable")
     (lemma "compute_solvable_single_def")
     (inst - "p(0)" "n(0)")
     (assert)
     (split -)
     (("1"
       (inst - "RelF6(0)")
       (replaces -1 :dir rl)
       (ground)
       (("1" (skosimp*) (inst + "x!1") (inst - "0"))
        ("2" (skosimp*) (inst + "x!1") (skosimp*) (assert))))
      ("2" (inst - "0") (assert))))
    ("2"
     (expand "compute_solvable" :assert? none)
     (name "newp" "greatify_poly_rel(p, RelF6)")
     (replace -1)
     (name "newRel" "greatify_rel(RelF6)")
     (replace -1)
     (replace 1)
     (case "(EXISTS (i:upto(k)): newRel(i)=0)")
     (("1"
       (name "fe" "first_eq(newRel, k)")
       (assert)
       (replace -2)
       (replace -1)
       (case "NOT fe<=k")
       (("1" (typepred "fe") (assert) (skosimp*) (inst - "i!1") (assert))
        ("2"
         (assert)
         (typepred "fe")
         (hide -1)
         (assert)
         (flatten)
         (typepred
          "sturm_tarski_faster(k - 1,
                                                                                                     newp(fe),
                                                                                                     n(fe),
                                                                                                     LAMBDA
                                                                                                     (i):
                                                                                                     IF i < fe
                                                                                                     THEN newp(i)
                                                                                                     ELSE newp(1 + i)
                                                                                                     ENDIF,
                                                                                                     LAMBDA
                                                                                                     (i):
                                                                                                     IF i < fe
                                                                                                     THEN n(i)
                                                                                                     ELSE n(1 + i)
                                                                                                     ENDIF,
                                                                                                     LAMBDA
                                                                                                     (i):
                                                                                                     IF i < fe
                                                                                                     THEN newRel(i)
                                                                                                     ELSE newRel(1 + i)
                                                                                                     ENDIF)")
         (("1"
           (hide (-2 -3))
           (replaces -1)
           (expand "NSol_all" +)
           (lemma "empty_card[real]")
           (inst?)
           (replaces -1 :dir rl)
           (expand "empty?")
           (expand "member")
           (ground)
           (("1"
             (skosimp*)
             (inst -2 "x!1")
             (expand "Sol_all")
             (split 1)
             (("1"
               (inst - "fe")
               (expand "newRel" -2)
               (expand "greatify_rel" -2)
               (lift-if)
               (ground)
               (replace -1)
               (expand "rel5" -2)
               (expand "newp" +)
               (expand "greatify_poly_rel" +)
               (expand "greatify_poly")
               (propax))
              ("2"
               (skosimp*)
               (case "i!2 < fe")
               (("1"
                 (assert)
                 (inst - "i!2")
                 (expand "rel5" -3)
                 (expand "newRel" +)
                 (expand "greatify_rel" +)
                 (expand "newp" +)
                 (expand "greatify_poly_rel" +)
                 (expand "greatify_poly")
                 (lift-if)
                 (lift-if)
                 (lift-if)
                 (lift-if)
                 (assert)
                 (ground)
                 (("1" (rewrite "scal_polynomial2") (assert))
                  ("2" (rewrite "scal_polynomial2") (assert))))
                ("2"
                 (assert)
                 (inst - "1+i!2")
                 (assert)
                 (expand "rel5" -2)
                 (expand "newRel" +)
                 (expand "newp" +)
                 (expand "greatify_rel" +)
                 (expand "greatify_poly_rel" +)
                 (expand "greatify_poly")
                 (lift-if)
                 (assert)
                 (rewrite "scal_polynomial2")
                 (ground))))))
            ("2"
             (skosimp*)
             (inst + "x!1")
             (case "NOT RelF6(fe) = 0")
             (("1"
               (expand "newRel" -2)
               (expand "greatify_rel" -2)
               (lift-if)
               (ground))
              ("2"
               (skeep)
               (case "j = fe")
               (("1"
                 (replace -1)
                 (replace -2)
                 (expand "rel5" 1)
                 (expand "Sol_all" -3)
                 (flatten)
                 (expand "newp" -3)
                 (expand "greatify_poly_rel" -3)
                 (expand "greatify_poly")
                 (assert))
                ("2"
                 (case "j < fe")
                 (("1"
                   (expand "Sol_all")
                   (flatten)
                   (inst - "j")
                   (assert)
                   (expand "newp" -4)
                   (expand "newRel" -4)
                   (expand "greatify_poly_rel" -4)
                   (expand "greatify_poly")
                   (expand "greatify_rel" -4)
                   (assert)
                   (lift-if)
                   (lift-if)
                   (lift-if)
                   (assert)
                   (expand "rel5" +)
                   (rewrite "scal_polynomial2")
                   (ground))
                  ("2"
                   (expand "Sol_all")
                   (flatten)
                   (inst - "j-1")
                   (("1"
                     (assert)
                     (expand "newp" -3)
                     (expand "newRel" -3)
                     (expand "greatify_rel" -3)
                     (expand "greatify_poly_rel" -3)
                     (expand "greatify_poly")
                     (assert)
                     (lift-if)
                     (lift-if)
                     (assert)
                     (expand "rel5" +)
                     (rewrite "scal_polynomial2")
                     (ground))
                    ("2" (assert))))))))))))
          ("2"
           (hide 3)
           (skosimp*)
           (inst-cp - "i!1")
           (inst - "1+i!1")
           (lift-if)
           (expand "newp" -1)
           (expand "greatify_poly_rel" -1)
           (expand "greatify_poly")
           (expand "*" -1)
           (lift-if)
           (lift-if)
           (assert)
           (inst-cp - "i!1")
           (flatten)
           (inst - "1+i!1")
           (flatten)
           (ground))))))
      ("2"
       (name "Qprodlist"
             "prod_polynomials_list(newp, n, LAMBDA i: 1, k)")
       (name "Qdeg" "length(Qprodlist) - 1")
       (name "Qprod"
             "LAMBDA (i):
                                                                                                      IF i < length(Qprodlist) THEN nth(Qprodlist, i)
                                                                                                      ELSE 0
                                                                                                      ENDIF")
       (assert)
       (replace -3)
       (replace -2)
       (replace -1)
       (case "NOT length(Qprodlist) - 2 = Qdeg -1")
       (("1" (assert))
        ("2"
         (replace -1)
         (assert)
         (lift-if)
         (replace 1)
         (assert)
         (split +)
         (("1"
           (flatten)
           (case "NOT Qdeg>=2")
           (("1"
             (assert)
             (typepred "Qprodlist")
             (replace -2)
             (replace -7 1 :dir rl)
             (expand "sigma")
             (expand "sigma")
             (expand "*" 1 1)
             (expand "*" 1 1)
             (assert)
             (copy "ndef")
             (inst-cp - "k")
             (inst - "k-1")
             (flatten)
             (assert)
             (lemma "sigma_ge_0")
             (inst?)
             (assert)
             (skosimp*)
             (expand "*")
             (assert))
            ("2"
             (assert)
             (skeep)
             (case "EXISTS (pz:upto(k)): polynomial(p(pz),n(pz))(x) = 0")
             (("1"
               (skeep -)
               (case "NOT newRel(pz)=4")
               (("1"
                 (expand "newRel" 1)
                 (inst - "pz")
                 (inst + "pz")
                 (expand "rel5" -3)
                 (expand "greatify_rel" 1)
                 (lift-if)
                 (ground)
                 (expand "newRel" 6)
                 (expand "greatify_rel" 6)
                 (propax))
                ("2"
                 (typepred
                  "sturm_tarski_faster(k, Qprod, Qdeg, newp, n, newRel)")
                 (hide (-2 -3))
                 (replaces -1)
                 (expand "NSol_all" -)
                 (lemma "empty_card[real]")
                 (inst?)
                 (assert)
                 (expand "empty?" -1)
                 (expand "member")
                 (inst - "x")
                 (expand "Sol_all" +)
                 (split 1)
                 (("1"
                   (typepred "Qprodlist")
                   (replace -11)
                   (typepred "prod_polynomials(newp, n, LAMBDA i: 1, k)")
                   (inst - "x")
                   (replace -6)
                   (replace -5 :dir rl)
                   (lemma "Qdeg")
                   (replaces -1 -2 :dir rl)
                   (replaces -1 +)
                   (lemma "product_eq_zero[nat]")
                   (inst?)
                   (assert)
                   (inst + "pz")
                   (expand "^" 1)
                   (expand "expt")
                   (expand "expt")
                   (expand "newp" +)
                   (expand "greatify_poly_rel" 1)
                   (expand "greatify_poly")
                   (lift-if)
                   (split 1)
                   (("1" (flatten) (rewrite "scal_polynomial2") (assert))
                    ("2" (flatten))))
                  ("2"
                   (skosimp*)
                   (inst - "i!1")
                   (hide (2 3))
                   (expand "rel5")
                   (expand "newp" +)
                   (expand "newRel" +)
                   (expand "greatify_poly_rel" +)
                   (expand "greatify_poly")
                   (expand "greatify_rel" +)
                   (hide 2)
                   (lift-if)
                   (assert)
                   (ground)
                   (("1" (rewrite "scal_polynomial2") (assert))
                    ("2" (rewrite "scal_polynomial2") (assert))))))))
              ("2"
               (name "SS"
                     "LAMBDA (i:nat): IF newRel(i)/=3 OR (newRel(i)=3 AND polynomial(newp(i),n(i))(x)>=0) THEN 1 ELSE (-1) ENDIF")
               (name "NP" "LAMBDA (i:nat): SS(i)*newp(i)")
               (lemma "strict_poly_system_solvable")
               (inst - "k" "n" "NP")
               (("1"
                 (assert)
                 (split -1)
                 (("1"
                   (flatten)
                   (hide -2)
                   (split -1)
                   (("1"
                     (hide (1 3))
                     (skeep)
                     (inst - "j")
                     (assert)
                     (expand "NP" -1)
                     (expand "*" -1)
                     (expand "SS" -1)
                     (lift-if)
                     (split -1)
                     (("1"
                       (flatten)
                       (expand "newRel" 1)
                       (expand "greatify_rel" 1)
                       (expand "rel5" 1)
                       (inst + "j")
                       (copy 2)
                       (expand "newRel" 1)
                       (expand "greatify_rel" 1)
                       (lift-if)
                       (ground))
                      ("2"
                       (flatten)
                       (replace -1 2)
                       (expand "rel5" 2)
                       (assert))))
                    ("2"
                     (hide (1 2))
                     (skeep)
                     (inst - "j")
                     (inst + "j")
                     (lemma "even_or_odd")
                     (inst?)
                     (assert)
                     (assert)
                     (lift-if)
                     (expand "NP" -2)
                     (expand "SS" -2)
                     (lift-if)
                     (lift-if)
                     (expand "*")
                     (split -2)
                     (("1"
                       (flatten)
                       (assert)
                       (hide -3)
                       (split -)
                       (("1"
                         (flatten)
                         (expand "newRel" 2)
                         (expand "greatify_rel" 2)
                         (expand "rel5" +)
                         (ground)
                         (("1"
                           (expand "newRel" +)
                           (expand "greatify_rel" +)
                           (propax))
                          ("2"
                           (expand "newRel" +)
                           (expand "greatify_rel" +)
                           (propax))))
                        ("2"
                         (flatten)
                         (assert)
                         (replace -1 +)
                         (expand "rel5" +)
                         (propax))))
                      ("2"
                       (flatten)
                       (assert)
                       (hide -2)
                       (split -)
                       (("1"
                         (flatten)
                         (expand "newRel" +)
                         (expand "greatify_rel" +)
                         (lift-if)
                         (expand "rel5" +)
                         (assert)
                         (ground))
                        ("2"
                         (flatten)
                         (replace -1)
                         (assert)
                         (expand "rel5" +)
                         (propax))))))
                    ("3"
                     (skosimp -1)
                     (typepred
                      "sturm_tarski_faster(k,
                                                                               poly_deriv(Qprod),
                                                                               Qdeg - 1,
                                                                               newp,
                                                                               n,
                                                                               newRel)")
                     (hide (-2 -3))
                     (replaces -1)
                     (expand "NSol_all" -9)
                     (lemma "empty_card[real]")
                     (inst?)
                     (assert)
                     (expand "empty?" -1)
                     (expand "member")
                     (inst - "x!1")
                     (expand "Sol_all" 1)
                     (assert)
                     (split 1)
                     (("1"
                       (case "EXISTS (nzr: nzreal): nzr*prod_polynomials(NP,
                                                                                                     n,
                                                                                                     (LAMBDA (i: nat): 1),
                                                                                                     k) = Qprod")
                       (("1"
                         (skeep -1)
                         (replace -1 1 :dir rl)
                         (case "Qdeg-1 = sigma(0, k, n) - 1")
                         (("1"
                           (replace -1 :dir rl)
                           (rewrite "poly_deriv_scal")
                           (rewrite "scal_polynomial2")
                           (assert))
                          ("2"
                           (hide 2)
                           (typepred "Qprodlist")
                           (assert)
                           (case "n = n*(LAMBDA (i): 1)")
                           (("1" (assert))
                            ("2"
                             (decompose-equality 1)
                             (("1" (expand "*" 1) (propax))
                              ("2"
                               (skosimp*)
                               (expand "*" 1)
                               (assert))))))))
                        ("2"
                         (typepred "Qprodlist")
                         (replace -14)
                         (replace -3 1 :dir rl)
                         (case "FORALL (dd:nat): dd<=k IMPLIES EXISTS (nzr: nzreal):
                                                                    nzr * prod_polynomials(NP, n, (LAMBDA (i: nat): 1), dd) =
                                                                     prod_polynomials(newp, n, LAMBDA i: 1, dd)")
                         (("1" (inst - "k") (assert))
                          ("2"
                           (hide 2)
                           (induct "dd")
                           (("1"
                             (assert)
                             (inst + "SS(0)")
                             (decompose-equality 1)
                             (expand "*" 1)
                             (expand "prod_polynomials" 1)
                             (expand "NP" 1)
                             (expand "*" 1)
                             (expand "SS" 1)
                             (lift-if)
                             (lift-if)
                             (lift-if)
                             (assert))
                            ("2"
                             (skolem 1 "d")
                             (assert)
                             (flatten)
                             (assert)
                             (skeep -)
                             (inst + "SS(1+d)*nzr")
                             (decompose-equality +)
                             (expand "prod_polynomials" +)
                             (expand "*" 1)
                             (replace -1 + :dir rl)
                             (expand "polynomial_prod" 1)
                             (rewrite "sigma_scal" :dir rl)
                             (("1"
                               (rewrite "sigma_scal_right" :dir rl)
                               (("1"
                                 (rewrite "sigma_eq")
                                 (("1"
                                   (hide 2)
                                   (skosimp*)
                                   (expand "NP" + 2)
                                   (lift-if)
                                   (assert)
                                   (expand "SS" 1)
                                   (lift-if)
                                   (assert)
                                   (expand "*" 1)
                                   (propax))
                                  ("2"
                                   (hide 2)
                                   (hide-all-but 1)
                                   (case
                                    "FORALL (gg:nat): rational_pred(sigma[nat](0, gg, LAMBDA (x: nat): n(x))) AND
                                                                             integer_pred(sigma[nat](0, gg, LAMBDA (x: nat): n(x)))")
                                   (("1" (inst - "d"))
                                    ("2"
                                     (hide 2)
                                     (induct "gg")
                                     (("1" (grind))
                                      ("2" (grind))
                                      ("3" (skosimp*) (assert))))))
                                  ("3" (hide 2) (skosimp*) (assert))))
                                ("2"
                                 (hide 2)
                                 (hide-all-but 1)
                                 (case
                                  "FORALL (gg:nat): rational_pred(sigma[nat](0, gg, LAMBDA (x: nat): n(x))) AND
                                                                         integer_pred(sigma[nat](0, gg, LAMBDA (x: nat): n(x)))")
                                 (("1" (inst - "d"))
                                  ("2"
                                   (hide 2)
                                   (induct "gg")
                                   (("1" (grind))
                                    ("2" (grind))
                                    ("3" (skosimp*) (assert))))))
                                ("3" (hide 2) (skosimp*) (assert))))
                              ("2"
                               (hide-all-but 1)
                               (case "FORALL (gg:nat): rational_pred(sigma[nat](0, gg, LAMBDA (x: nat): n(x))) AND
                                                                               integer_pred(sigma[nat](0, gg, LAMBDA (x: nat): n(x)))")
                               (("1" (inst - "d"))
                                ("2"
                                 (hide 2)
                                 (induct "gg")
                                 (("1" (grind))
                                  ("2" (grind))
                                  ("3" (grind))))))
                              ("3" (hide 2) (skeep) (assert))))))))))
                      ("2"
                       (skeep)
                       (inst - "i")
                       (assert)
                       (inst 5 "i")
                       (assert)
                       (expand "NP" -4)
                       (rewrite "scal_polynomial2")
                       (expand "SS" -4)
                       (lift-if)
                       (split -)
                       (("1" (flatten) (assert))
                        ("2" (flatten) (assert))))))
                    ("4"
                     (inst + "x")
                     (skeep)
                     (expand "NP" 1)
                     (rewrite "scal_polynomial2")
                     (expand "SS" 1)
                     (lift-if)
                     (split 1)
                     (("1"
                       (flatten)
                       (case "newRel(i)/=3")
                       (("1"
                         (assert)
                         (hide -2)
                         (inst 5 "i")
                         (inst + "i")
                         (assert)
                         (expand "newp" 1)
                         (expand "newRel" 5)
                         (expand "greatify_poly_rel" 1)
                         (expand "greatify_poly")
                         (expand "greatify_rel" +)
                         (inst - "i")
                         (expand "rel5" -6)
                         (lift-if)
                         (expand "newRel" -1)
                         (expand "greatify_rel" -1)
                         (lift-if)
                         (rewrite "scal_polynomial2")
                         (ground))
                        ("2"
                         (flatten)
                         (assert)
                         (inst + "i")
                         (assert)
                         (expand "newp" (-2 1))
                         (expand "greatify_poly_rel" (-2 1))
                         (expand "greatify_poly")
                         (lift-if)
                         (rewrite "scal_polynomial2")
                         (ground))))
                      ("2" (flatten) (assert))))))
                  ("2"
                   (hide-all-but ("ndef" 1))
                   (skeep)
                   (inst - "i")
                   (expand "NP")
                   (expand "SS")
                   (expand "newp")
                   (expand "newRel")
                   (expand "greatify_rel")
                   (expand "greatify_poly_rel")
                   (expand "greatify_poly")
                   (expand "*")
                   (lift-if)
                   (lift-if)
                   (lift-if)
                   (assert)
                   (lift-if)
                   (ground))))
                ("2"
                 (hide-all-but 1)
                 (skeep)
                 (expand "NP")
                 (expand "newp")
                 (expand "greatify_poly_rel")
                 (expand "greatify_poly")
                 (expand "*")
                 (propax))))))))
          ("2"
           (flatten)
           (split -1)
           (("1"
             (flatten)
             (typepred
              "sturm_tarski_faster(k, Qprod, Qdeg, newp, n, newRel)")
             (("1"
               (hide (-2 -3))
               (replaces -1)
               (expand "NSol_all" 1)
               (lemma "empty_card[real]")
               (inst?)
               (("1"
                 (assert)
                 (expand "empty?" 1)
                 (skeep)
                 (inst + "x")
                 (expand "member")
                 (expand "Sol_all" -1)
                 (flatten)
                 (skeep)
                 (inst - "j")
                 (assert)
                 (expand "newRel" -2)
                 (expand "newp" -2)
                 (expand "greatify_poly_rel" -2)
                 (expand "greatify_poly")
                 (expand "greatify_rel" -2)
                 (expand "rel5")
                 (lift-if)
                 (assert)
                 (rewrite "scal_polynomial2")
                 (ground))
                ("2" (assert))))
              ("2" (assert))))
            ("2"
             (flatten)
             (split -)
             (("1"
               (lemma "strict_poly_system_solvable")
               (inst - "k" "n" "newp")
               (split -1)
               (("1"
                 (flatten)
                 (hide -1)
                 (split -1)
                 (("1"
                   (skeep)
                   (inst + "x")
                   (skeep)
                   (inst - "j")
                   (assert)
                   (expand "newp" -1)
                   (expand "greatify_poly_rel" -1)
                   (expand "greatify_poly")
                   (lift-if)
                   (rewrite "scal_polynomial2")
                   (expand "rel5")
                   (inst + "j")
                   (expand "newRel" 2)
                   (expand "greatify_rel")
                   (lift-if)
                   (assert)
                   (ground))
                  ("2"
                   (flatten)
                   (lemma "poly_sign_near_infinity")
                   (case "FORALL (d): d<=k IMPLIES EXISTS (M:posnat): FORALL (j,x): j<=d AND x>=M IMPLIES (sign_ext(polynomial(newp(j),n(j))(x)) = sign_ext(newp(j)(n(j))) AND newp(j)(n(j))/=0)")
                   (("1"
                     (inst - "k")
                     (assert)
                     (skeep -)
                     (hide (2 3))
                     (inst 2 "M")
                     (hide 1)
                     (skeep)
                     (inst - "j" "M")
                     (assert)
                     (flatten)
                     (hide -2)
                     (inst - "j")
                     (expand "newp" (-1 -2))
                     (inst + "j")
                     (expand "newRel" +)
                     (expand "newRel" (-1 -2))
                     (expand "greatify_poly_rel" (-1 -2 +))
                     (expand "greatify_poly")
                     (expand "greatify_rel" (-1 -2 +))
                     (expand "sign_ext")
                     (lift-if)
                     (expand "*" -2)
                     (lift-if)
                     (lift-if)
                     (lift-if)
                     (lift-if)
                     (lift-if)
                     (lift-if)
                     (lift-if)
                     (lift-if)
                     (expand "rel5" (-1 -2 +))
                     (assert)
                     (rewrite "scal_polynomial2")
                     (expand "*")
                     (case "p(j)(n(j))/=0")
                     (("1" (flatten) (ground))
                      ("2" (flatten) (inst "ndef" "j") (assert))))
                    ("2"
                     (hide (2 3 4 5))
                     (induct "d")
                     (("1"
                       (assert)
                       (inst - "newp(0)" "n(0)")
                       (assert)
                       (split -)
                       (("1"
                         (skeep)
                         (inst + "M")
                         (skeep)
                         (inst - "x")
                         (assert)
                         (copy "ndef")
                         (inst - "j")
                         (label "fin" 1)
                         (flatten)
                         (expand "newp" "fin")
                         (expand "greatify_poly_rel")
                         (expand "greatify_poly")
                         (lift-if)
                         (expand "*")
                         (ground))
                        ("2"
                         (inst "ndef" "0")
                         (expand "newp" 1)
                         (expand "greatify_poly_rel" 1)
                         (expand "greatify_poly")
                         (expand "*")
                         (lift-if)
                         (ground))))
                      ("2"
                       (skolem 1 "d")
                       (flatten)
                       (assert)
                       (skeep)
                       (inst -3 "newp(1+d)" "n(1+d)")
                       (split -)
                       (("1"
                         (skeep)
                         (inst + "max(M!1,M)")
                         (skeep)
                         (case "newp(j)(n(j))=0")
                         (("1"
                           (expand "newp" -1)
                           (expand "greatify_poly_rel" -1)
                           (expand "greatify_poly")
                           (expand "*")
                           (lift-if)
                           (inst "ndef" "j")
                           (("1" (ground)) ("2" (assert))))
                          ("2"
                           (case "j = 1+d")
                           (("1" (inst - "x") (assert))
                            ("2" (hide -1) (inst - "j" "x") (ground))))))
                        ("2"
                         (assert)
                         (hide 2)
                         (inst "ndef" "1+d")
                         (flatten)
                         (expand "newp")
                         (expand "greatify_poly_rel")
                         (expand "greatify_poly")
                         (lift-if)
                         (expand "*")
                         (ground))))))))))
                ("2"
                 (skeep)
                 (inst "ndef" "i")
                 (flatten)
                 (expand "newp" -2)
                 (expand "greatify_poly_rel")
                 (expand "greatify_poly")
                 (expand "*" -2)
                 (lift-if)
                 (ground))))
              ("2"
               (lemma "poly_sign_near_negative_infinity")
               (case "FORALL (d): d<=k IMPLIES EXISTS (M:posnat): FORALL (j,x): j<=d AND x<=-M IMPLIES (sign_ext(polynomial(newp(j),n(j))(x)) = sign_ext(IF even?(n(j)) THEN newp(j)(n(j)) ELSE -newp(j)(n(j)) ENDIF) AND newp(j)(n(j))/=0)")
               (("1"
                 (inst - "k")
                 (assert)
                 (hide -2)
                 (skeep)
                 (inst + "-M")
                 (skeep)
                 (inst - "j" "-M")
                 (assert)
                 (inst - "j")
                 (lemma "even_or_odd")
                 (inst?)
                 (assert)
                 (replaces -1)
                 (assert)
                 (flatten)
                 (expand "newp" (-1 1))
                 (expand "greatify_poly_rel" (-1 1))
                 (expand "greatify_poly")
                 (expand "sign_ext")
                 (lift-if)
                 (lift-if)
                 (lift-if)
                 (lift-if)
                 (lift-if)
                 (lift-if)
                 (lift-if)
                 (lift-if)
                 (lift-if)
                 (assert)
                 (rewrite "scal_polynomial2")
                 (expand "rel5")
                 (expand "*")
                 (expand "newRel" (-2 -3))
                 (expand "newp" (-2 -3))
                 (expand "greatify_rel" (-2 -3))
                 (expand "greatify_poly_rel" (-2 -3))
                 (expand "greatify_poly")
                 (expand "*")
                 (ground))
                ("2"
                 (induct "d")
                 (("1"
                   (assert)
                   (inst - "newp(0)" "n(0)")
                   (split -)
                   (("1"
                     (skeep)
                     (inst + "M")
                     (skeep)
                     (inst - "x")
                     (assert)
                     (case "j = 0")
                     (("1"
                       (assert)
                       (replaces -1)
                       (replace -1)
                       (expand "newp" 1)
                       (label "igz" 1)
                       (expand "greatify_poly_rel" 1)
                       (expand "greatify_poly")
                       (expand "*")
                       (lift-if)
                       (inst "ndef" "0")
                       (ground))
                      ("2" (assert))))
                    ("2"
                     (expand "newp" 1)
                     (expand "greatify_poly_rel" 1)
                     (expand "greatify_poly")
                     (expand "*" -1)
                     (lift-if)
                     (inst "ndef" "0")
                     (ground))))
                  ("2"
                   (skolem 1 "d")
                   (flatten)
                   (assert)
                   (skeep)
                   (inst -3 "newp(1+d)" "n(1+d)")
                   (split -)
                   (("1"
                     (skeep)
                     (inst + "max(M!1,M)")
                     (skeep)
                     (case "j = 1+d")
                     (("1"
                       (inst - "x")
                       (assert)
                       (replace -1)
                       (assert)
                       (replace -2 1)
                       (expand "newp" 1)
                       (label "igz" 1)
                       (expand "greatify_poly_rel" 1)
                       (expand "greatify_poly")
                       (expand "*")
                       (lift-if)
                       (inst "ndef" "1+d")
                       (ground))
                      ("2" (hide -1) (inst - "j" "x") (assert))))
                    ("2"
                     (label "igz" 1)
                     (expand "newp" 1)
                     (expand "greatify_poly_rel" 1)
                     (expand "greatify_poly")
                     (lift-if)
                     (expand "*")
                     (inst "ndef" "1+d")
                     (ground))))))))
              ("3"
               (typepred
                "sturm_tarski_faster(k,
                                                                   poly_deriv(Qprod),
                                                                   Qdeg - 1,
                                                                   newp,
                                                                   n,
                                                                   newRel)")
               (("1"
                 (hide (-2 -3))
                 (replaces -1)
                 (expand "NSol_all" 1)
                 (lemma "empty_card[real]")
                 (inst?)
                 (("1"
                   (assert)
                   (expand "empty?")
                   (expand "member")
                   (skeep)
                   (expand "Sol_all" -)
                   (flatten)
                   (inst + "x")
                   (skeep)
                   (inst - "j")
                   (assert)
                   (expand "newRel" -2)
                   (expand "newp" -2)
                   (expand "greatify_rel" -2)
                   (expand "greatify_poly_rel" -2)
                   (expand "greatify_poly")
                   (lift-if)
                   (assert)
                   (rewrite "scal_polynomial2")
                   (expand "rel5")
                   (ground))
                  ("2" (assert))))
                ("2" (assert))))))))))))))))


proof_type: f_proof
decl_type: formula
library: Tarski
theory: poly_system_strategy
signature: nil
run_date: Unknown date
run_time: ----
status: proved-incomplete
description: nil
script:
  (""
   (skeep)
   (expand "tarski")
   (name "pz"
         "LAMBDA (i):
                                    LAMBDA (j_1: nat):
                                      IF i <= k AND j_1 <= n(i)
                                        THEN nth[int]
                                             (nth[list[int]]
                                              (poly_system_list
                                               (k,
                                                LAMBDA
                                                (j):
                                                rat_poly_to_int(pq(j), n(j)),
                                                n),
                                               i),
                                              j_1)
                                      ELSE 0
                                      ENDIF")
   (("1"
     (replaces -1)
     (lemma "compute_solvable_def")
     (rewrite -1 :dir rl)
     (("1"
       (hide -1)
       (case "FORALL (aa,bb:[nat->[nat->rat]]): (FORALL (j:upto(k)): EXISTS (cp:posreal): FORALL (i:upto(n(j))): bb(j)(i) = cp*aa(j)(i)) IMPLIES ((EXISTS (x: real):
                       FORALL (j: upto(k)):
                         rel5(RelF6(j))(polynomial(aa(j), n(j))(x), 0))
                     IFF
                     (EXISTS (x: real):
                        FORALL (j_1: upto(k)):
                          rel5(RelF6(j_1))
                              (polynomial(bb(j_1),
                                          n(j_1))
                                         (x),
                               0)))")
       (("1"
         (inst?)
         (replace 1)
         (hide 2)
         (skeep)
         (expand "pz" 1)
         (typepred "rat_poly_to_int(pq(j), n(j))")
         (skeep)
         (inst + "cp")
         (skeep)
         (inst - "i")
         (replaces -1 :dir rl)
         (typepred
          "poly_system_list(k,
                                           LAMBDA (j): rat_poly_to_int(pq(j), n(j)),
                                           n)")
         (rewrite -4))
        ("2"
         (hide 2)
         (skeep)
         (case "FORALL (x:real,j:upto(k)): ((

                           rel5(RelF6(j))(polynomial(aa(j), n(j))(x), 0))
                       IFF
                       (
                            rel5(RelF6(j))(polynomial(bb(j), n(j))(x), 0)))")
         (("1"
           (split)
           (("1"
             (flatten)
             (skeep)
             (inst + "x")
             (skosimp*)
             (inst - "x" "j!1")
             (inst - "j!1")
             (ground))
            ("2"
             (flatten)
             (skeep)
             (inst + "x")
             (skosimp*)
             (inst - "j!1")
             (inst - "x" "j!1")
             (ground))))
          ("2"
           (hide 2)
           (skeep)
           (inst - "j")
           (skeep)
           (case "polynomial(bb(j),n(j))(x) = cp*polynomial(aa(j),n(j))(x)")
           (("1"
             (replaces -1)
             (expand "rel5" +)
             (lift-if)
             (assert)
             (assert)
             (ground)
             (("1" (mult-by 1 "cp") (assert))
              ("2" (mult-by -1 "cp") (assert))
              ("3" (mult-by 1 "cp") (assert))
              ("4" (mult-by -1 "cp") (assert))
              ("5" (mult-by 1 "cp") (assert))
              ("6" (mult-by -1 "cp") (assert))
              ("7" (mult-by 1 "cp") (assert))
              ("8" (mult-by -1 "cp") (assert))
              ("9" (mult-by 1 "cp") (assert))))
            ("2"
             (hide 2)
             (rewrite "scal_polynomial2" :dir rl)
             (rewrite "poly_eq_le_degree")
             (hide 2)
             (skosimp*)
             (inst - "ii!1")
             (expand "*" +)
             (propax))))))))
      ("2"
       (hide (-1 2))
       (skeep)
       (inst - "j")
       (flatten)
       (assert)
       (flatten)
       (expand "pz")
       (typepred
        "poly_system_list(k,
                                         LAMBDA (j): rat_poly_to_int(pq(j), n(j)),
                                         n)")
       (rewrite -4)
       (hide (-1 -2 -3 -4))
       (typepred "rat_poly_to_int(pq(j), n(j))")
       (skosimp*)
       (inst - "n(j)")
       (assert))))
    ("2"
     (hide 2)
     (skosimp*)
     (assert)
     (typepred
      "poly_system_list(k,
                                       LAMBDA (j): rat_poly_to_int(pq(j), n(j)),
                                       n)")
     (inst - "i!1")
     (assert))
    ("3" (hide 2) (skosimp*) (assert))
    ("4"
     (hide 2)
     (assert)
     (skeep)
     (skosimp*)
     (inst - "j!1")
     (flatten)
     (assert)
     (flatten)
     (typepred "rat_poly_to_int(pq(j!1), n(j!1))")
     (skosimp*)
     (inst - "n(j!1)")
     (assert))))


proof_type: t_proof
decl_type: tcc
library: Tarski
theory: poly_system_strategy
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (skeep)
   (expand "greatify_poly_rel")
   (expand "greatify_poly")
   (expand "*")
   (inst - "j")
   (lift-if)
   (ground))


proof_type: t_proof
decl_type: tcc
library: Tarski
theory: poly_system_strategy
signature: nil
run_date: Unknown date
run_time: ----
status: proved-incomplete
description: nil
script:
  (""
   (skosimp*)
   (lift-if)
   (split -)
   (("1" (flatten) (replaces -2) (assert))
    ("2" (flatten) (replaces -1) (expand "*") (propax))))


proof_type: t_proof
decl_type: tcc
library: Tarski
theory: poly_system_strategy
signature: nil
run_date: Unknown date
run_time: ----
status: proved-incomplete
description: nil
script:
  (""
   (skosimp*)
   (lift-if)
   (split -)
   (("1" (flatten) (replaces -2) (assert))
    ("2" (flatten) (replaces -1) (expand "*") (assert))))


proof_type: t_proof
decl_type: tcc
library: Tarski
theory: poly_system_strategy
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (skeep*)
   (split)
   (("1"
     (typepred "n")
     (inst - "fe")
     (("1" (assert))
      ("2" (assert) (typepred "fe") (assert) (inst - "i") (assert))))
    ("2"
     (replaces -1)
     (expand "greatify_poly_rel")
     (expand "greatify_poly")
     (lift-if)
     (expand "*")
     (typepred "n")
     (inst - "fe")
     (("1" (assert) (ground))
      ("2" (typepred "fe") (assert) (hide -2) (inst - "i") (assert))))))


proof_type: t_proof
decl_type: tcc
library: Tarski
theory: poly_system_strategy
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep*)
   (lift-if)
   (assert)
   (replaces -1)
   (expand "greatify_poly_rel" -)
   (expand "greatify_poly")
   (lift-if)
   (lift-if)
   (expand "*")
   (typepred "n")
   (inst-cp - "1+i_1")
   (inst - "i_1")
   (ground))


proof_type: t_proof
decl_type: tcc
library: Tarski
theory: poly_system_strategy
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep*)
   (assert)
   (typepred "Qprodlist")
   (replace -9 :dir rl)
   (replace -3 + :dir rl)
   (typepred "prod_polynomials(newp, n, LAMBDA i: 1, k)")
   (assert)
   (skosimp*)
   (replace -8 -3)
   (expand "greatify_poly_rel" -)
   (expand "greatify_poly")
   (assert)
   (expand "*")
   (lift-if)
   (assert)
   (typepred "n")
   (inst - "i!1")
   (ground))


proof_type: t_proof
decl_type: tcc
library: Tarski
theory: poly_system_strategy
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep*)
   (replaces -1)
   (expand "greatify_poly_rel" -6)
   (expand "greatify_poly")
   (lift-if)
   (expand "*")
   (typepred "n")
   (inst - "i")
   (ground))


proof_type: t_proof
decl_type: tcc
library: Tarski
theory: poly_system_strategy
signature: nil
run_date: Unknown date
run_time: ----
status: proved-incomplete
description: nil
script:
  (""
   (skeep*)
   (assert)
   (label "igz" 6)
   (expand "poly_deriv" +)
   (copy "igz")
   (case "NOT Qprod(Qdeg)=0")
   (("1" (assert) (mult-by 1 "Qdeg") (assert))
    ("2"
     (replace -8 -1)
     (assert)
     (typepred "Qprodlist")
     (decompose-equality -3)
     (inst - "Qdeg")
     (assert)
     (replaces -1 :dir rl)
     (hide -1)
     (typepred "prod_polynomials(newp, n, LAMBDA i: 1, k)")
     (hide -1)
     (split -)
     (("1" (assert))
      ("2"
       (replaces -5 1)
       (hide-all-but 1)
       (expand "greatify_poly_rel")
       (expand "greatify_poly")
       (skosimp*)
       (expand "*")
       (typepred "n")
       (inst - "i!1")
       (lift-if)
       (ground))))))


proof_type: t_proof
decl_type: tcc
library: Tarski
theory: poly_system_strategy
signature: nil
run_date: Unknown date
run_time: ----
status: proved-incomplete
description: nil
script:
  (""
   (skeep*)
   (replaces -1 -7)
   (copy -6)
   (expand "greatify_poly_rel" -1)
   (expand "greatify_poly")
   (lift-if)
   (expand "*" -1)
   (typepred "n")
   (inst - "i")
   (ground))


proof_type: t_proof
decl_type: tcc
library: Tarski
theory: poly_system_strategy
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (split 1)
   (("1" (grind))
    ("2"
     (skeep)
     (typepred
      "array2list[list[int]]
                          (k + 1)
                          (LAMBDA (j: nat): array2list[int](n(j) + 1)(p(j)))")
     (inst -3 "i")
     (typepred "array2list[int](1 + n(i))(p(i))")
     (ground))
    ("3"
     (skeep)
     (typepred
      "array2list[list[int]]
                          (k + 1)
                          (LAMBDA (j: nat): array2list[int](n(j) + 1)(p(j)))")
     (inst -3 "j_1")
     (typepred "array2list[int](1 + n(j_1))(p(j_1))")
     (inst -3 "i")
     (ground))))


proof_type: t_proof
decl_type: tcc
library: Tarski
theory: poly_system_strategy
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (skeep)
   (assert)
   (typepred "n")
   (inst - "j")
   (flatten)
   (assert)
   (replace -2 +)
   (assert)
   (typepred "rat_poly_to_int(pq(j), n(j))")
   (skeep)
   (inst?)
   (assert))


proof_type: t_proof
decl_type: tcc
library: Tarski
theory: poly_system_strategy
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep*)
   (typepred "n")
   (inst - "j")
   (assert)
   (flatten)
   (replace -4 +)
   (assert)
   (typepred "pl")
   (inst? -4)
   (replace -4)
   (replace -6)
   (assert)
   (typepred "rat_poly_to_int(pq(j), n(j))")
   (skeep)
   (inst?)
   (assert))


proof_type: t_proof
decl_type: tcc
library: algebra
theory: groupoid_def
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (expand "finite_groupoid?")
   (expand "groupoid?")
   (expand "star_closed?")
   (expand "member")
   (skosimp*))


proof_type: t_proof
decl_type: tcc
library: algebra
theory: semigroup_def
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (expand "finite_semigroup?")
   (expand "semigroup?")
   (expand "groupoid?")
   (expand "star_closed?")
   (expand "member")
   (skosimp*))


proof_type: f_proof
decl_type: formula
library: algebra
theory: semigroup
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (lemma "fullset_is_semigroup")
   (expand "semigroup?")
   (flatten)
   (expand "associative?")
   (grind))


proof_type: t_proof
decl_type: tcc
library: algebra
theory: monad_def
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (expand "monad?")
   (expand "groupoid?")
   (expand "star_closed?")
   (expand "member")
   (skosimp*))


proof_type: t_proof
decl_type: tcc
library: algebra
theory: monad_def
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (expand "finite_monad?")
   (expand "monad?")
   (expand "groupoid?")
   (expand "star_closed?")
   (expand "member")
   (skosimp*))


proof_type: f_proof
decl_type: formula
library: algebra
theory: monad
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp*)
   (assert)
   (grind)
   (typepred "M!1")
   (expand "monad?")
   (flatten)
   (expand "member")
   (propax))


proof_type: f_proof
decl_type: formula
library: algebra
theory: monad
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (lemma "fullset_is_monad")
   (expand "monad?")
   (flatten)
   (hide -1 -2)
   (expand "identity?")
   (inst - "x!1")
   (("1" (flatten) (expand "restrict") (propax))
    ("2" (expand "fullset") (propax))))


proof_type: f_proof
decl_type: formula
library: algebra
theory: monad
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (lemma "fullset_is_monad")
   (expand "monad?")
   (flatten)
   (expand "identity?")
   (inst - "x!1")
   (("1" (flatten) (expand "restrict") (propax))
    ("2" (expand "fullset") (propax))))


proof_type: f_proof
decl_type: formula
library: algebra
theory: monad
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (prop)
   (("1"
     (lemma "one_member" ("M" "M!1"))
     (expand "member")
     (inst - "one")
     (rewrite "right_identity"))
    ("2" (replace -1) (skosimp) (rewrite "left_identity"))))


proof_type: f_proof
decl_type: formula
library: algebra
theory: monad
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (prop)
   (("1"
     (lemma "one_member" ("M" "M!1"))
     (expand "member")
     (inst - "one")
     (rewrite "left_identity"))
    ("2" (replace -1) (skosimp) (rewrite "right_identity"))))


proof_type: f_proof
decl_type: formula
library: algebra
theory: monad
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (expand "monad?")
   (expand "singleton")
   (grind)
   (("1" (rewrite "left_identity")) ("2" (rewrite "left_identity"))
    ("3" (rewrite "left_identity"))))


proof_type: f_proof
decl_type: formula
library: algebra
theory: monad
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp*)
   (expand "order")
   (typepred "F!1")
   (expand "finite_monad?")
   (flatten)
   (expand "monad?")
   (flatten)
   (hide -1 -3)
   (lemma "same_card_subset[T]")
   (inst?)
   (assert)
   (hide 2)
   (rewrite "card_singleton[T]")
   (assert)
   (expand "subset?")
   (skosimp*)
   (expand "member")
   (expand "singleton")
   (assert)
   (name "S" "add(x!1, singleton[T](one))")
   (case "subset?(S,F!1)")
   (("1"
     (lemma "card_subset[T]")
     (inst?)
     (assert)
     (case-replace "card(S) = 2")
     (("1" (assert))
      ("2"
       (hide-all-but (-3 1 2))
       (lemma "card_add[T]")
       (inst?)
       (assert)
       (lemma "card_singleton[T]")
       (inst?)
       (replace -1)
       (assert)
       (lift-if)
       (ground)
       (expand "singleton")
       (propax))))
    ("2"
     (expand "subset?")
     (skosimp*)
     (expand "member")
     (assert)
     (replace -2 * rl)
     (expand "add")
     (expand "member")
     (expand "singleton")
     (assert))))


proof_type: t_proof
decl_type: tcc
library: algebra
theory: monad
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (expand "monad?")
   (split)
   (("1" (grind) (rewrite "left_identity")) ("2" (grind))
    ("3"
     (expand "identity?")
     (skosimp)
     (expand "restrict")
     (rewrite "left_identity")
     (rewrite "right_identity"))))


proof_type: t_proof
decl_type: tcc
library: algebra
theory: monad
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (inst + "singleton[T](one)")
   (expand "commutative_monad?")
   (prop)
   (("1" (grind)) ("2" (grind))))


proof_type: t_proof
decl_type: tcc
library: algebra
theory: monad
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (typepred "F!1")
   (expand "finite_monad?")
   (expand "monad?")
   (flatten)
   (expand "member")
   (lemma "nonempty_card" ("S" "F!1"))
   (replace -1 1 rl)
   (hide-all-but (-3 1))
   (grind))


proof_type: t_proof
decl_type: tcc
library: algebra
theory: monoid_def
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (expand "monoid?")
   (expand "monad?")
   (expand "groupoid?")
   (expand "star_closed?")
   (expand "member")
   (skosimp*))


proof_type: t_proof
decl_type: tcc
library: algebra
theory: monoid_def
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (expand "finite_monoid?")
   (expand "monoid?")
   (expand "monad?")
   (expand "groupoid?")
   (expand "star_closed?")
   (expand "member")
   (skosimp*))


proof_type: f_proof
decl_type: formula
library: algebra
theory: monoid
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (induct "n")
   (("1" (grind))
    ("2"
     (skosimp*)
     (expand "power" 1)
     (assert)
     (rewrite "left_identity"))))


proof_type: f_proof
decl_type: formula
library: algebra
theory: monoid
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (induct "n")
   (("1" (grind) (rewrite "right_identity") (rewrite "left_identity"))
    ("2"
     (skosimp*)
     (inst - "a!1")
     (expand "power" 1)
     (rewrite "associative")
     (assert))))


proof_type: f_proof
decl_type: formula
library: algebra
theory: monoid
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (induct "m")
   (("1"
     (skolem!)
     (rewrite "power_0")
     (assert)
     (rewrite "right_identity"))
    ("2"
     (skosimp*)
     (inst - "a!1" "n!1+1")
     (rewrite "power_def" -1)
     (expand "power" 1 2)
     (rewrite "associative" -1)
     (assert))))


proof_type: f_proof
decl_type: formula
library: algebra
theory: monoid
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (induct "m")
   (("1" (skolem!) (rewrite "power_0") (rewrite "power_0"))
    ("2"
     (skosimp*)
     (expand "power" 1 1)
     (inst - "a!1" "n!1")
     (replace -1)
     (rewrite "power_mult")
     (assert))))


proof_type: f_proof
decl_type: formula
library: algebra
theory: monoid
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skolem 1 ("M" "a" "_"))
   (induct "n")
   (("1"
     (rewrite "power_0")
     (rewrite "one_member")
     (typepred "M")
     (expand "cyclic_monoid?")
     (expand "monoid?")
     (propax))
    ("2"
     (skosimp*)
     (assert)
     (expand "power" 1)
     (typepred "M")
     (expand "cyclic_monoid?")
     (expand "monoid?")
     (expand "monad?")
     (expand "groupoid?")
     (flatten)
     (expand "star_closed?")
     (expand "member")
     (inst - "a" "power(a,j!1)"))))


proof_type: f_proof
decl_type: formula
library: algebra
theory: monoid
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (expand "submonoid?")
   (split)
   (("1"
     (expand "generated_set")
     (expand "subset?")
     (skosimp)
     (lemma "power_member" ("a" "a!1" "M" "M!1"))
     (expand "member")
     (skosimp)
     (replace -2)
     (inst - "n!1")
     (assert))
    ("2"
     (expand "monoid?")
     (expand "monad?")
     (expand "groupoid?")
     (split)
     (("1"
       (expand "star_closed?")
       (expand "generated_set")
       (expand "member")
       (skosimp)
       (typepred "x!1")
       (typepred "y!1")
       (expand "generated_set")
       (skosimp*)
       (inst + "n!2+n!1")
       (replace -1)
       (replace -2)
       (rewrite "power_mult"))
      ("2"
       (expand "member")
       (expand "generated_set")
       (inst + "0")
       (rewrite "power_0"))
      ("3"
       (expand "identity?")
       (skosimp)
       (expand "restrict")
       (rewrite "left_identity")
       (rewrite "right_identity"))
      ("4"
       (expand "associative?")
       (lemma "associative")
       (expand "restrict")
       (skosimp*)
       (inst - "x!1" "y!1" "z!1"))))))


proof_type: f_proof
decl_type: formula
library: algebra
theory: monoid
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp*)
   (lemma "generated_set_lem")
   (inst - "a!1" "0")
   (assert)
   (lemma "card_one[T]")
   (inst?)
   (assert)
   (skosimp*)
   (replace -1)
   (expand "singleton")
   (assert)
   (replace -2 * rl)
   (lemma "generated_set_lem")
   (inst - "a!1" "1")
   (expand "power")
   (expand "power")
   (assert)
   (lemma "right_identity")
   (inst?)
   (assert)
   (replace -1)
   (hide -1)
   (replace -2)
   (hide -2)
   (assert))


proof_type: f_proof
decl_type: formula
library: algebra
theory: monoid
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp*)
   (typepred "H!1")
   (expand "commutative_monoid?")
   (flatten)
   (expand "commutative?")
   (expand "restrict")
   (assert)
   (expand "submonoid?")
   (flatten)
   (assert)
   (skosimp*)
   (inst?)
   (("1" (assert) (expand "subset?") (expand "member") (inst?) (assert))
    ("2" (expand "subset?") (expand "member") (inst?) (assert))))


proof_type: t_proof
decl_type: tcc
library: algebra
theory: monoid
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (lemma "fullset_is_monoid")
   (expand "monoid?")
   (expand "monad?")
   (expand "semigroup?")
   (flatten)
   (assert))


proof_type: j_proof
decl_type: tcc
library: algebra
theory: monoid
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (typepred "x!1")
   (expand "monoid?")
   (expand "monad?")
   (expand "semigroup?")
   (flatten)
   (assert))


proof_type: t_proof
decl_type: tcc
library: algebra
theory: monoid
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (inst + "singleton[T](one)")
   (expand "finite_monoid?")
   (expand "monoid?")
   (expand "monad?")
   (expand "groupoid?")
   (expand "star_closed?")
   (expand "member")
   (prop)
   (("1"
     (skosimp*)
     (grind)
     (typepred "x!1")
     (typepred "y!1")
     (expand "singleton")
     (assert)
     (replace -1)
     (hide -1)
     (replace -1)
     (hide -1)
     (rewrite "left_identity"))
    ("2" (grind)) ("3" (grind)) ("4" (grind))))


proof_type: t_proof
decl_type: tcc
library: algebra
theory: monoid
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (inst + "singleton[T](one)")
   (expand "commutative_monoid?")
   (prop)
   (("1"
     (expand "monoid?")
     (prop)
     (("1"
       (expand "monad?")
       (prop)
       (("1"
         (expand "groupoid?")
         (expand "singleton")
         (expand "star_closed?")
         (skosimp*)
         (expand "member")
         (assert)
         (typepred "x!1")
         (typepred "y!1")
         (replace -1)
         (hide -1)
         (replace -1)
         (hide -1)
         (rewrite "left_identity"))
        ("2" (expand "member") (expand "singleton") (propax))
        ("3"
         (expand "identity?")
         (skosimp*)
         (expand "restrict")
         (assert))))
      ("2"
       (expand "associative?")
       (skosimp*)
       (grind)
       (rewrite "associative"))))
    ("2" (grind))))


proof_type: j_proof
decl_type: tcc
library: algebra
theory: monoid
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp*)
   (typepred "x!1")
   (expand "commutative_monoid?")
   (flatten)
   (expand "commutative_monad?")
   (assert)
   (expand "monoid?")
   (propax))


proof_type: f_proof
decl_type: formula
library: algebra
theory: group_def
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp*)
   (expand "finite_group?")
   (assert)
   (lemma "is_finite_surj[T]")
   (inst?)
   (flatten)
   (hide -2)
   (assert)
   (inst + "N!1" "f!1"))


proof_type: t_proof
decl_type: tcc
library: algebra
theory: group_def
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (expand "group?")
   (expand "monoid?")
   (expand "monad?")
   (expand "groupoid?")
   (expand "star_closed?")
   (expand "member")
   (skosimp*))


proof_type: t_proof
decl_type: tcc
library: algebra
theory: group_def
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (expand "finite_group?")
   (expand "group?")
   (expand "monoid?")
   (expand "monad?")
   (expand "groupoid?")
   (expand "star_closed?")
   (expand "member")
   (skosimp*))


proof_type: f_proof
decl_type: formula
library: algebra
theory: group
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (typepred "H!1")
   (expand "finite_group?")
   (expand "subgroup?")
   (flatten)
   (assert)
   (lemma "finite_subset" ("s" "S!1" "A" "H!1"))
   (assert))


proof_type: f_proof
decl_type: formula
library: algebra
theory: group
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (assert)
   (expand "group?")
   (assert)
   (expand "singleton")
   (expand "inv_exists?")
   (skosimp*)
   (typepred "x!1")
   (replace -1)
   (inst + "one")
   (assert))


proof_type: f_proof
decl_type: formula
library: algebra
theory: group
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp*)
   (lemma "one_in")
   (inst?)
   (lemma "nonempty_card[T]")
   (inst?)
   (assert)
   (expand "nonempty?")
   (expand "empty?")
   (inst?)
   (assert))


proof_type: f_proof
decl_type: formula
library: algebra
theory: group
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp*)
   (lemma "fullset_is_group")
   (expand "group?")
   (expand "inv_exists?")
   (flatten)
   (inst - "x!1")
   (("1" (skolem!) (inst + "y!1")) ("2" (expand "fullset") (propax))))


proof_type: f_proof
decl_type: formula
library: algebra
theory: group
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (lemma "fullset_is_group")
   (expand "group?")
   (expand "inv_exists?")
   (skosimp*)
   (inst -2 "z!1")
   (("1"
     (skosimp*)
     (expand "monoid?")
     (flatten)
     (expand "associative?")
     (inst-cp - "x!1" "z!1" "y!2")
     (("1"
       (inst - "y!1" "z!1" "y!2")
       (("1"
         (hide -1)
         (grind)
         (rewrite "right_identity")
         (rewrite "right_identity")
         (assert))
        ("2" (expand "fullset") (propax))
        ("3" (expand "fullset") (propax))))
      ("2" (expand "fullset") (propax))
      ("3" (expand "fullset") (propax))))
    ("2" (expand "fullset") (propax))))


proof_type: f_proof
decl_type: formula
library: algebra
theory: group
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (prop)
   (("1"
     (lemma "inv_exists" ("x" "z!1"))
     (skolem -1 ("z1"))
     (flatten)
     (lemma "associative" ("x" "z1" "y" "z!1" "z" "x!1"))
     (lemma "associative" ("x" "z1" "y" "z!1" "z" "y!1"))
     (replace -4)
     (rewrite "left_identity")
     (rewrite "left_identity")
     (assert))
    ("2" (assert))))


proof_type: f_proof
decl_type: formula
library: algebra
theory: group
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (lemma "cancel_right" ("x" "inv(inv(x!1))" "y" "x!1" "z" "inv(x!1)"))
   (rewrite "inv_right")
   (rewrite "inv_left")
   (assert))


proof_type: f_proof
decl_type: formula
library: algebra
theory: group
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (lemma "cancel_right"
    ("x" "x!1*inv(z!1)" "y" "y!1*inv(z!1)" "z" "z!1"))
   (rewrite "associative" -1)
   (rewrite "associative" -1)
   (rewrite "inv_left")
   (rewrite "right_identity")
   (rewrite "right_identity")
   (flatten)
   (prop))


proof_type: f_proof
decl_type: formula
library: algebra
theory: group
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp*)
   (lemma "cancel_left"
    ("z" "inv(z!1)" "x" "z!1 * inv(x!1)" "y" "z!1 * inv(y!1)"))
   (rewrite "associative" -1 :dir rl)
   (rewrite "associative" -1 :dir rl)
   (rewrite "inv_left")
   (replace -1 1 rl)
   (hide -1)
   (prop)
   (("1"
     (lemma "cancel_right_inv"
      ("z" "inv(x!1)" "x" "inv(x!1)" "y" "inv(y!1)"))
     (rewrite "inv_inv" -1)
     (rewrite "inv_left" -1)
     (flatten)
     (assert)
     (lemma "cancel_left" ("z" "y!1" "x" "one" "y" "inv(y!1) * x!1"))
     (rewrite "associative" -1 :dir rl)
     (rewrite "inv_right")
     (rewrite "right_identity")
     (rewrite "left_identity")
     (rewrite "left_identity")
     (rewrite "left_identity")
     (assert))
    ("2" (assert))))


proof_type: f_proof
decl_type: formula
library: algebra
theory: group
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (lemma "cancel_right" ("x" "inv(one)" "y" "one" "z" "one"))
   (rewrite "inv_left")
   (assert)
   (rewrite "left_identity"))


proof_type: f_proof
decl_type: formula
library: algebra
theory: group
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp*)
   (lemma "cancel_right"
    ("x" "inv(x!1 * y!1)" "y" "inv(y!1) * inv(x!1)" "z" "x!1*y!1"))
   (rewrite "inv_left")
   (lemma "associative")
   (inst-cp - "inv(y!1)" "inv(x!1)" "x!1 * y!1")
   (inst - "inv(x!1)" "x!1" "y!1")
   (rewrite "inv_left")
   (assert)
   (rewrite "left_identity")
   (assert))


proof_type: f_proof
decl_type: formula
library: algebra
theory: group
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skolem!)
   (prop)
   (("1"
     (lemma "cancel_right" ("z" "inv(x!1)" "x" "y!1*x!1" "y" "one"))
     (rewrite "associative")
     (assert)
     (rewrite "inv_right")
     (rewrite "left_identity")
     (rewrite "right_identity"))
    ("2" (replace -1) (rewrite "inv_right"))
    ("3" (replace -1) (rewrite "inv_left"))))


proof_type: f_proof
decl_type: formula
library: algebra
theory: group
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp*)
   (typepred "G!1")
   (expand "group?")
   (flatten)
   (expand "inv_exists?")
   (assert)
   (prop)
   (("1"
     (inst - "inv(x!1)")
     (("1"
       (skolem!)
       (typepred "y!1")
       (lemma "unique_inv" ("x" "inv(x!1)" "y" "y!1"))
       (replace -5 -1)
       (simplify -1)
       (rewrite "inv_inv")
       (assert)
       (expand "member")
       (assert))
      ("2" (expand "member") (propax))))
    ("2"
     (inst - "x!1")
     (("1"
       (skolem!)
       (typepred "y!1")
       (lemma "unique_inv" ("x" "x!1" "y" "y!1"))
       (replace -5 -1)
       (simplify -1)
       (assert)
       (expand "member")
       (assert))
      ("2" (expand "member") (propax))))))


proof_type: f_proof
decl_type: formula
library: algebra
theory: group
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp*)
   (lemma "inv_member")
   (inst?)
   (inst?)
   (assert)
   (prop)
   (("1" (assert) (expand "member") (propax))
    ("2" (expand "member") (propax))))


proof_type: f_proof
decl_type: formula
library: algebra
theory: group
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp*)
   (prop)
   (("1"
     (replace -1)
     (rewrite "associative" :dir rl)
     (rewrite "inv_left")
     (rewrite "left_identity"))
    ("2"
     (replace - + rl)
     (hide -1)
     (rewrite "associative" :dir rl)
     (rewrite "inv_right")
     (rewrite "left_identity"))))


proof_type: f_proof
decl_type: formula
library: algebra
theory: group
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (typepred "G")
   (expand "group?")
   (flatten)
   (expand "monoid?")
   (flatten)
   (expand "monad?")
   (flatten)
   (expand "star_closed?")
   (assert)
   (inst?))


proof_type: f_proof
decl_type: formula
library: algebra
theory: group
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (expand "subgroup?")
   (lemma "one_member" ("M" "G!1"))
   (expand "member")
   (grind)
   (("1" (rewrite "left_identity")) ("2" (rewrite "associative"))
    ("3" (rewrite "left_identity")) ("4" (rewrite "left_identity"))
    ("5" (rewrite "left_identity"))))


proof_type: f_proof
decl_type: formula
library: algebra
theory: group
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (typepred "G!1")
   (expand "subgroup?")
   (expand "group?")
   (expand "monoid?")
   (flatten)
   (assert)
   (prop)
   (("1"
     (expand "nonempty?")
     (expand "empty?")
     (inst - "one")
     (expand "monad?")
     (flatten))
    ("2" (expand "monad?") (expand "groupoid?") (flatten))
    ("3"
     (expand "inv_closed?")
     (skosimp)
     (lemma "inv_member" ("x" "x!1" "G" "S!1"))
     (("1" (expand "member") (propax))
      ("2" (expand "group?") (expand "monoid?") (assert))))
    ("4"
     (expand "monad?")
     (expand "groupoid?")
     (flatten)
     (assert)
     (expand "inv_closed?")
     (expand "star_closed?")
     (expand "member")
     (expand "nonempty?")
     (expand "empty?")
     (skosimp)
     (expand "member")
     (inst - "x!1")
     (inst - "x!1" "inv(x!1)")
     (rewrite "inv_right")
     (assert)
     (expand "restrict")
     (expand "identity?")
     (skosimp)
     (inst -7 "x!2")
     (expand "subset?")
     (inst -2 "x!2")
     (expand "member")
     (propax))
    ("5"
     (expand "inv_exists?")
     (expand "inv_closed?")
     (expand "member")
     (expand "associative?")
     (expand "restrict")
     (skosimp*)
     (inst -6 "x!1" "y!1" "z!1")
     (("1" (expand "subset?") (expand "member") (inst -2 "z!1") (assert))
      ("2" (expand "subset?") (expand "member") (inst -2 "y!1") (assert))
      ("3"
       (expand "subset?")
       (inst -2 "x!1")
       (expand "member")
       (propax))))
    ("6"
     (expand "inv_exists?")
     (skosimp*)
     (inst - "x!1")
     (("1"
       (typepred "x!1")
       (expand "subset?")
       (expand "member")
       (inst-cp -3 "x!1")
       (assert)
       (skosimp*)
       (expand "inv_closed?")
       (inst -6 "x!1")
       (expand "member")
       (lemma "unique_inv" ("x" "x!1" "y" "y!1"))
       (assert)
       (replace -1 * rl)
       (inst + "y!1")
       (assert))
      ("2"
       (typepred "x!1")
       (expand "subset?")
       (expand "member")
       (inst - "x!1")
       (assert))))))


proof_type: f_proof
decl_type: formula
library: algebra
theory: group
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (induct "m")
   (("1" (grind) (rewrite "inv_one"))
    ("2"
     (skosimp*)
     (expand "power" 1 1)
     (rewrite "inv_star")
     (rewrite "power_def")
     (inst - "a!1")
     (lemma "cancel_right"
      ("z"
       "inv(a!1)"
       "x"
       "inv(power(a!1, j!1))"
       "y"
       "power(inv(a!1), j!1)"))
     (assert))))


proof_type: f_proof
decl_type: formula
library: algebra
theory: group
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (expand "^")
   (skolem!)
   (case-replace "i!1<0")
   (("1" (assert) (rewrite "inv_one") (rewrite "one_power"))
    ("2" (rewrite "one_power") (assert))))


proof_type: f_proof
decl_type: formula
library: algebra
theory: group
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (expand "^")
   (skolem!)
   (lemma "trichotomy" ("x" "i!1"))
   (split -1)
   (("1" (assert))
    ("2" (rewrite -1) (assert) (rewrite "power_0") (rewrite "power_0"))
    ("3" (assert) (rewrite "inv_inv"))))


proof_type: f_proof
decl_type: formula
library: algebra
theory: group
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skolem!)
   (expand "^")
   (case-replace "i!1<0")
   (("1" (rewrite "inv_power")) ("2" (assert) (rewrite "inv_power"))))


proof_type: f_proof
decl_type: formula
library: algebra
theory: group
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skolem!)
   (expand "^")
   (case "i!1<-1")
   (("1"
     (assert)
     (lemma "power_def" ("a" "inv(a!1)" "n" "-(1 + i!1)"))
     (lemma "cancel_right"
      ("z"
       "a!1"
       "x"
       "power(inv(a!1), -(1 + i!1) + 1)"
       "y"
       "power(inv(a!1), -(1 + i!1)) * inv(a!1)"))
     (rewrite "associative" -1)
     (assert)
     (rewrite "inv_left")
     (rewrite "right_identity")
     (assert))
    ("2"
     (case-replace "i!1=-1")
     (("1" (grind) (rewrite "right_identity") (rewrite "inv_left"))
      ("2"
       (case-replace "i!1=0")
       (("1"
         (grind)
         (rewrite "right_identity")
         (rewrite "left_identity"))
        ("2" (assert) (rewrite "power_def"))))))))


proof_type: f_proof
decl_type: formula
library: algebra
theory: group
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp*)
   (expand "^")
   (case "i!1<-1")
   (("1"
     (assert)
     (expand "power" 1 2)
     (rewrite "associative" :dir rl)
     (assert)
     (rewrite "inv_right")
     (rewrite "left_identity")
     (assert))
    ("2"
     (case-replace "i!1=-1")
     (("1" (grind) (rewrite "right_identity") (rewrite "inv_right"))
      ("2" (assert) (expand "power" 3 1) (propax))))))


proof_type: f_proof
decl_type: formula
library: algebra
theory: group
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skolem!)
   (case "FORALL (a:T,i:int,n:nat): a^i*a^n = a^(i+n) & a^n*a^i=a^(i+n)")
   (("1"
     (case "j!1 < 0")
     (("1"
       (case "i!1 < 0")
       (("1"
         (inst - "inv(a!1)" "-i!1" "-j!1")
         (("1"
           (flatten)
           (lemma "expt_neg" ("a" "inv(a!1)"))
           (inst-cp - "i!1+j!1")
           (inst-cp - "i!1")
           (inst - "j!1")
           (assert)
           (rewrite "inv_inv")
           (assert))
          ("2" (assert))))
        ("2"
         (inst - "a!1" "j!1" "i!1")
         (("1" (flatten) (assert)) ("2" (assert))))))
      ("2" (inst - "a!1" "i!1" "j!1") (("1" (flatten)) ("2" (assert))))))
    ("2"
     (hide 2)
     (skolem 1 ("a" "i" "_"))
     (induct "n")
     (("1"
       (grind)
       (("1" (rewrite "right_identity"))
        ("2" (rewrite "right_identity"))))
      ("2"
       (grind)
       (("1" (rewrite "left_identity")) ("2" (rewrite "left_identity"))))
      ("3"
       (skosimp*)
       (lemma "expt_def1" ("a" "a"))
       (inst-cp - "j!2")
       (inst - "i+j!2")
       (replace -1)
       (replace -2)
       (lemma "cancel_right"
        ("z" "a" "x" "a ^ i * a ^ j!2" "y" "a ^ (i + j!2)"))
       (lemma "expt_def2" ("a" "a" "i" "i"))
       (lemma "cancel_right"
        ("z" "a" "x" "a ^ j!2 * a ^ i" "y" "a ^ (i + j!2)"))
       (lemma "expt_def1" ("a" "a" "i" "i"))
       (rewrite "associative")
       (rewrite "associative")
       (rewrite "associative")
       (assert))))))


