# Proofs

proof_type: f_proof
decl_type: formula
library: reals
theory: more_polynomial_props
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (lemma "root_degree_unique")
   (inst - "x*a" "root_degree(a,n)(y)" "n" "y")
   (assert)
   (split 1)
   (("1" (expand "*") (assert))
    ("2"
     (typepred "root_degree(a,n)(y)")
     (assert)
     (flatten)
     (skeep -)
     (inst + "x*b")
     (assert)
     (split +)
     (("1"
       (skosimp*)
       (inst - "x!1")
       (rewrite "scal_polynomial2")
       (rewrite "scal_polynomial2")
       (assert))
      ("2" (rewrite "scal_polynomial2") (assert))))))


proof_type: f_proof
decl_type: formula
library: reals
theory: more_polynomial_props
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (lemma "root_degree_unique")
   (inst - "power_linear(-y,1,m)" "m" "m" "y")
   (assert)
   (split 1)
   (("1"
     (expand "power_linear")
     (lemma "expt_1n_aux")
     (inst - "m")
     (expand "^" -2)
     (replaces -1)
     (expand "expt")
     (expand "C" -1)
     (assert))
    ("2"
     (inst + "LAMBDA (i:nat): 1")
     (expand "polynomial" + 2)
     (expand "polynomial" + 2)
     (expand "sigma")
     (expand "sigma")
     (lemma "power_linear_polynomial")
     (inst?)
     (assert)
     (skeep)
     (inst - "x")
     (assert))))


proof_type: f_proof
decl_type: formula
library: reals
theory: more_polynomial_props
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (lemma "root_degree_unique")
   (inst - "a" "root_degree(b,n)(y)" "n" "y")
   (assert)
   (lemma "polynomial_eq_coeff")
   (inst - "a" "b" "n")
   (replace -2)
   (assert)
   (typepred "root_degree(b,n)(y)")
   (assert)
   (split -2)
   (("1" (flatten) (skosimp*) (inst + "b!1") (assert))
    ("2" (inst - "n") (assert))))


proof_type: f_proof
decl_type: formula
library: reals
theory: more_polynomial_props
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (skeep)
   (lemma "power_linear_polynomial")
   (inst - "-y" "m" "1" _ "m")
   (assert)
   (name "ppl" "polynomial_prod(power_linear(-y,1,m),m,b,k)")
   (case "NOT polynomial(a,n)=polynomial(ppl,m+k)")
   (("1"
     (decompose-equality 1)
     (lemma "polynomial_prod_def")
     (inst?)
     (inst - "x!1")
     (replace -2)
     (inst - "x!1")
     (replace -3 :dir rl)
     (assert)
     (inst - "x!1")
     (assert))
    ("2"
     (case "NOT m+k = n")
     (("1"
       (case "FORALL (ab,ba:[nat->real],ak,bk:nat): ak>=bk AND ab(ak)/=0 AND ba(bk)/=0 AND polynomial(ab,ak)=polynomial(ba,bk) IMPLIES ak=bk")
       (("1"
         (inst-cp - "a" "ppl" "n" "m+k")
         (inst - "ppl" "a" "m+k" "n")
         (case "ppl(m+k)/=0")
         (("1" (ground))
          ("2"
           (hide (-1 -2))
           (expand "ppl" 1)
           (expand "polynomial_prod" -1)
           (expand "max")
           (expand "sigma")
           (expand "sigma")
           (expand "power_linear" -1)
           (expand "^" -1)
           (rewrite "expt_1n_aux")
           (expand "expt")
           (expand "C" -1)
           (assert))))
        ("2"
         (hide-all-but 1)
         (skeep)
         (name "newb" "LAMBDA (i:nat): IF i>bk THEN 0 ELSE ba(i) ENDIF")
         (case "NOT polynomial(ba,bk)=polynomial(newb,ak)")
         (("1"
           (decompose-equality 1)
           (expand "polynomial" 1 2)
           (lemma "sigma_split")
           (inst?)
           (inst - "bk")
           (assert)
           (replaces -1)
           (invoke (case "%1 = 0") (! 1 2 2))
           (("1"
             (replaces -1)
             (expand "polynomial" 1)
             (rewrite "sigma_eq")
             (skosimp*)
             (expand "newb" 1)
             (propax))
            ("2"
             (hide 2)
             (rewrite "sigma_restrict_eq_0")
             (skosimp*)
             (expand "newb" 1)
             (assert))))
          ("2"
           (replace -1)
           (lemma "polynomial_eq_coeff")
           (inst?)
           (assert)
           (inst - "ak")
           (expand "newb" -1)
           (propax))))))
      ("2"
       (assert)
       (replace -1)
       (lemma "root_degree_eq")
       (inst - "a" "ppl" "n" "y")
       (assert)
       (split -1)
       (("1"
         (replace -1 +)
         (expand "ppl" +)
         (lemma "root_degree_mult")
         (inst?)
         (inst - "y")
         (assert)
         (split -1)
         (("1"
           (replace -3)
           (replace -1)
           (assert)
           (rewrite "root_degree_power_linear")
           (assert))
          ("2"
           (expand "power_linear" 1)
           (expand "^" -1)
           (rewrite "expt_1n_aux" -1)
           (expand "expt" -1)
           (expand "C")
           (assert))))
        ("2" (lemma "polynomial_eq_coeff") (inst?) (assert))))))))


proof_type: f_proof
decl_type: formula
library: reals
theory: more_polynomial_props
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (label "hp" 1)
   (copy "hp")
   (hide "hp")
   (assert)
   (name "ar" "root_degree(a,n)(y)")
   (replaces -1)
   (name "br" "root_degree(b,m)(y)")
   (replaces -1)
   (name "hr" "root_degree(h,p)(y)")
   (replaces -1)
   (lemma "root_degree_lower_bound")
   (inst - "h" "min(ar,br)" "p" "y" _)
   (case "(EXISTS (bb: [nat -> real],kz:nat):
                                                                                                                    bb(kz) /= 0 AND
                                                                                                                     (FORALL (x):
                                                                                                                        polynomial(h, p)(x) =
                                                                                                                         (x - y) ^ min(ar,br) * polynomial(bb, kz)(x)))")
   (("1"
     (case "NOT hr>=min(ar,br)")
     (("1"
       (hide 4)
       (skeep -)
       (inst -2 "kz")
       (assert)
       (split -2)
       (("1" (lemma "hr") (ground)) ("2" (inst + "bb") (assert))))
      ("2"
       (assert)
       (flatten)
       (expand "min")
       (assert)
       (case "NOT hr > ar")
       (("1" (assert))
        ("2"
         (hide -2)
         (hide 3)
         (lemma "root_degree_lower_bound")
         (case "EXISTS (bb: [nat -> real],kzz:nat):
                                                                                                                     bb(kzz) /= 0 AND
                                                                                                                      (FORALL (x):
                                                                                                                         polynomial(a, n)(x) =
                                                                                                                          (x - y) ^ min(hr, br) * polynomial(bb, kzz)(x))")
         (("1"
           (skeep -)
           (inst - "a" "min(hr,br)" "n" "y" "kzz")
           (assert)
           (split -)
           (("1"
             (flatten)
             (lemma "ar")
             (expand "min")
             (lift-if)
             (ground))
            ("2" (inst + "bb") (assert))))
          ("2"
           (hide -1)
           (case "EXISTS (bbr: [nat -> real],kzzr:nat):
                                                                                           (FORALL (x):
                                                                                               polynomial(a, n)(x) =
                                                                                                (x - y) ^ min(hr, br) * polynomial(bbr, kzzr)(x))")
           (("1"
             (hide-all-but (-1 1 3))
             (skolem - ("bbb" "kzzz"))
             (case "EXISTS (kp: nat): kp<=kzzz AND bbb(kp)/=0 AND (FORALL (i:nat): i>kp AND i<=kzzz IMPLIES bbb(i)=0)")
             (("1"
               (skeep -)
               (case "polynomial(bbb,kp) = polynomial(bbb,kzzz)")
               (("1" (replace -1 :dir rl) (inst + "bbb" "kp") (assert))
                ("2"
                 (hide-all-but (-1 -2 1))
                 (assert)
                 (case "FORALL (zp:nat): kp+zp<=kzzz IMPLIES polynomial(bbb,kp+zp)=polynomial(bbb,kp)")
                 (("1" (inst - "kzzz-kp") (assert))
                  ("2"
                   (assert)
                   (induct "zp")
                   (("1" (assert))
                    ("2"
                     (skeep)
                     (assert)
                     (decompose-equality +)
                     (rewrite "polynomial_rec")
                     (inst - "1+j+kp")
                     (assert))))))))
              ("2"
               (hide 2)
               (case "FORALL (kp:nat): kp<=kzzz IMPLIES bbb(kp)=0")
               (("1"
                 (lemma "poly_eq_0_le_degree")
                 (inst - "a" "n")
                 (assert)
                 (flatten)
                 (hide -1)
                 (split -1)
                 (("1" (inst - "n") (assert))
                  ("2"
                   (skosimp*)
                   (inst -2 "x!1")
                   (lemma "poly_eq_0_le_degree")
                   (inst - "bbb" "kzzz")
                   (flatten)
                   (hide -2)
                   (split -)
                   (("1" (inst - "x!1") (assert)) ("2" (propax))))))
                ("2"
                 (hide (-1 3))
                 (case " FORALL (kp: nat): kp <= kzzz IMPLIES FORALL (i:nat): i>kzzz-kp AND i<=kzzz IMPLIES bbb(i) = 0")
                 (("1"
                   (skeep)
                   (inst - "kzzz")
                   (assert)
                   (case "kp = 0")
                   (("1" (inst + "0") (assert))
                    ("2" (inst - "kp") (assert))))
                  ("2"
                   (induct "kp")
                   (("1" (assert) (skosimp*) (assert))
                    ("2"
                     (skeep)
                     (assert)
                     (skosimp*)
                     (inst + "i!1")
                     (assert)
                     (skeep)
                     (inst - "i")
                     (assert))))))))))
            ("2"
             (hide 2)
             (hide -2)
             (hide -2)
             (typepred "hr")
             (assert)
             (flatten)
             (hide -3)
             (skolem - "bh")
             (flatten)
             (assert)
             (typepred "br")
             (assert)
             (flatten)
             (hide -3)
             (skolem - "bb")
             (flatten)
             (name "mn" "min(hr,br)")
             (name "pz5"
                   "polynomial_prod(power_linear(-y,1,hr-mn),hr-mn,bh,p-hr)")
             (("1"
               (name "pz9"
                     "polynomial_prod(power_linear(-y,1,br-mn),br-mn,bb,m-br)")
               (("1"
                 (name "D10" "polynomial_prod(g,k,pz9,m-mn)")
                 (("1"
                   (name "F8" "pz5 + D10")
                   (inst + "F8" "max(p-mn,m-mn+k)")
                   (("1"
                     (skeep)
                     (assert)
                     (expand "F8" +)
                     (lemma "sum_polynomial")
                     (inst - "pz5" "D10" "m-mn+k" "p-mn")
                     (split -1)
                     (("1"
                       (replaces -1 :dir rl)
                       (expand "+")
                       (expand "D10" +)
                       (lemma "polynomial_prod_def")
                       (inst?)
                       (assert)
                       (replaces -1 :dir rl)
                       (expand "pz9" +)
                       (lemma "polynomial_prod_def")
                       (inst - "power_linear(-y, 1, br - mn)" "bb" "m-br"
                        "br-mn" "x")
                       (replaces -1 :dir rl)
                       (expand "pz5" +)
                       (lemma "polynomial_prod_def")
                       (inst - "power_linear(-y, 1, hr - mn)" "bh" "p-hr"
                        "hr-mn" "x")
                       (assert)
                       (replaces -1 :dir rl)
                       (rewrite "power_linear_polynomial" :dir rl)
                       (rewrite "power_linear_polynomial" :dir rl)
                       (assert)
                       (case "NOT -y + 1*x = x-y")
                       (("1" (assert))
                        ("2"
                         (replaces -1)
                         (assert)
                         (replace -5)
                         (lemma "expt_plus")
                         (case "FORALL (i, j: nat, nx: real): nx ^ (i + j) = nx ^ i * nx ^ j")
                         (("1"
                           (hide -2)
                           (inst-cp - "hr-mn" "mn" "x-y")
                           (inst - "br-mn" "mn" "x-y")
                           (assert)
                           (inst - "x")
                           (inst - "x")
                           (inst - "x")
                           (assert))
                          ("2"
                           (hide-all-but (-1 1))
                           (induct "i")
                           (("1" (hide -) (grind))
                            ("2"
                             (skosimp*)
                             (inst - "1+j!2" "nx!1")
                             (assert)
                             (replaces -1)
                             (expand "^" +)
                             (expand "expt" + 2)
                             (expand "expt" + 3)
                             (assert))))))))
                      ("2"
                       (skosimp*)
                       (expand "pz5" 1)
                       (expand "polynomial_prod" 1)
                       (expand "max" 1)
                       (assert)
                       (expand "sigma" 1)
                       (propax))
                      ("3"
                       (skosimp*)
                       (expand "D10" 1)
                       (expand "polynomial_prod" 1)
                       (expand "max" 1)
                       (expand "sigma" 1)
                       (propax))))
                    ("2" (assert))))
                  ("2" (assert))))
                ("2" (assert))))
              ("2" (assert))))
            ("3" (skosimp*) (assert))))
          ("3" (skosimp*) (assert))))))))
    ("2"
     (name "mn" "min(ar,br)")
     (replace -1)
     (assert)
     (hide -2)
     (hide 5)
     (case "(EXISTS (bb: [nat -> real], kz: nat):
                     (FORALL (x):
                        polynomial(h, p)(x) = (x - y) ^ mn * polynomial(bb, kz)(x)))")
     (("1"
       (skeep)
       (case "EXISTS (kp:nat): bb(kp)/=0 AND kp<=kz AND FORALL (i:nat): i>kp AND i<=kz IMPLIES bb(i)=0")
       (("1"
         (skeep -)
         (case "polynomial(bb,kz) = polynomial(bb,kp)")
         (("1" (inst + "bb" "kp") (assert))
          ("2"
           (hide-all-but (-1 -2 1))
           (case "FORALL (i:nat): kp+i<=kz IMPLIES polynomial(bb,kp)=polynomial(bb,kp+i)")
           (("1" (inst - "kz-kp") (("1" (assert)) ("2" (assert))))
            ("2"
             (induct "i")
             (("1" (assert))
              ("2"
               (skeep)
               (assert)
               (decompose-equality +)
               (decompose-equality -)
               (inst - "x!1")
               (lemma "polynomial_rec")
               (inst - "bb" "1+j+kp" "x!1")
               (assert)
               (inst - "1+j+kp")
               (assert))))))))
        ("2"
         (case "FORALL (kp:nat): kp<=kz IMPLIES FORALL (i:nat): i>=kz-kp AND i<=kz IMPLIES bb(i)=0")
         (("1"
           (inst - "kz")
           (assert)
           (lemma "poly_eq_0_le_degree")
           (inst - "h" "p")
           (flatten)
           (hide -1)
           (split -)
           (("1" (inst - "p") (assert))
            ("2"
             (skosimp*)
             (inst -2 "x!1")
             (lemma "poly_eq_0_le_degree")
             (inst - "bb" "kz")
             (assert)
             (flatten)
             (hide -2)
             (split -)
             (("1" (inst - "x!1") (assert)) ("2" (propax))))))
          ("2"
           (induct "kp")
           (("1"
             (assert)
             (skosimp*)
             (inst + "kz")
             (assert)
             (skosimp*)
             (assert))
            ("2"
             (skeep)
             (assert)
             (skeep)
             (inst + "i")
             (assert)
             (skosimp*)
             (assert)
             (inst - "i!1")
             (assert))))))))
      ("2"
       (hide 2)
       (typepred "ar")
       (assert)
       (flatten)
       (hide -4)
       (typepred "br")
       (assert)
       (hide -5)
       (flatten)
       (hide -4)
       (skolem - "bb")
       (assert)
       (flatten)
       (skolem - "ba")
       (assert)
       (flatten)
       (assert)
       (name "pz5"
             "polynomial_prod(power_linear(-y,1,ar-mn),ar-mn,ba,n-ar)")
       (name "pz9"
             "polynomial_prod(power_linear(-y,1,br-mn),br-mn,bb,m-br)")
       (name "D10" "polynomial_prod(g,k,pz9,m-mn)")
       (name "F8" "pz5 + (-D10)")
       (inst + "F8" "max(n-mn,m-mn+k)")
       (("1"
         (assert)
         (skeep)
         (expand "F8" +)
         (rewrite "sum_polynomial" :dir rl)
         (("1"
           (expand "+")
           (lemma "neg_polynomial")
           (inst - "D10" "k-mn+m")
           (replaces -1 :dir rl)
           (expand "-" +)
           (expand "pz5" +)
           (lemma "polynomial_prod_def")
           (inst - "power_linear(-y, 1, ar - mn)" "ba" "n-ar" "ar-mn"
            "x")
           (replaces -1 :dir rl)
           (assert)
           (rewrite "power_linear_polynomial" :dir rl)
           (expand "D10" +)
           (lemma "polynomial_prod_def")
           (inst - "g" "pz9" "m-mn" "k" "x")
           (assert)
           (replaces -1 :dir rl)
           (expand "pz9" +)
           (expand "-")
           (lemma "polynomial_prod_def")
           (inst - "power_linear(-y, 1, br - mn)" "bb" "m-br" "br-mn"
            "x")
           (replaces -1 :dir rl)
           (rewrite "power_linear_polynomial" :dir rl)
           (assert)
           (lemma "expt_plus")
           (case "FORALL (i, j: nat, nx: real): nx ^ (i + j) = nx ^ i * nx ^ j")
           (("1"
             (hide -2)
             (inst-cp - "mn" "ar-mn" "x-y")
             (inst - "mn" "br-mn" "x-y")
             (assert)
             (inst - "x")
             (inst - "x")
             (inst - "x")
             (assert))
            ("2"
             (hide-all-but (-1 1))
             (hide -1)
             (induct "i")
             (("1" (grind))
              ("2"
               (skosimp*)
               (inst - "1+j!2" "nx!1")
               (replaces -1)
               (expand "^")
               (expand "expt" + 2)
               (expand "expt" + 3)
               (assert))))))
          ("2"
           (skeep)
           (expand "pz5" 1)
           (expand "polynomial_prod" 1)
           (expand "max" 1)
           (expand "sigma" 1)
           (propax))
          ("3"
           (skosimp*)
           (expand "-" 1)
           (expand "D10" 1)
           (expand "polynomial_prod" 1)
           (expand "max" 1)
           (expand "sigma" 1)
           (propax))))
        ("2" (assert))))))
    ("3" (skosimp*) (assert))))


proof_type: f_proof
decl_type: formula
library: reals
theory: more_polynomial_props
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (label "aor" -1)
   (label "bor" -2)
   (label "hor" -3)
   (name "d" "root_degree(a,n)(z)")
   (replace -1)
   (name "bd" " root_degree(b, m)(z)")
   (name "hd" "root_degree(h,p)(z)")
   (typepred "d")
   (assert)
   (flatten)
   (hide (-3 -4))
   (skolem - "Ba")
   (flatten)
   (typepred "bd")
   (assert)
   (flatten)
   (hide (-3 -4))
   (skolem - "Bb")
   (flatten)
   (typepred "hd")
   (assert)
   (flatten)
   (hide (-3 -4))
   (skolem - "Bh")
   (flatten)
   (assert)
   (case "bd = d")
   (("1"
     (lemma "even_or_odd")
     (inst - "d")
     (assert)
     (case "even?(d)")
     (("1"
       (assert)
       (inst + "1")
       (lemma "root_degree_even")
       (skeep)
       (split -)
       (("1"
         (flatten)
         (replace -1)
         (replace -2)
         (inst - "a" "n" "x" "y" "z")
         (assert))
        ("2"
         (flatten)
         (inst - "b" "m" "x" "y" "z")
         (replace -1)
         (replace -2)
         (assert))
        ("3" (flatten) (inst - "h" "p" "x" "y" "z") (assert))))
      ("2"
       (assert)
       (inst + "-1")
       (lemma "root_degree_odd")
       (skeep)
       (split -)
       (("1" (flatten) (inst - "a" "n" "x" "y" "z") (assert))
        ("2" (assert) (flatten) (inst - "b" "m" "x" "y" "z") (assert))
        ("3" (flatten) (inst - "h" "p" "x" "y" "z") (assert))))))
    ("2"
     (case "FORALL (x:real): polynomial(Ba, n - d)(x) = polynomial(Bh, p - hd)(x) + polynomial(g,k)(x)*(x-z)^(bd-d)*polynomial(Bb,m-bd)(x)")
     (("1"
       (hide 12)
       (case "sign_ext(polynomial(Ba,n-d)(z))*sign_ext(polynomial(Bh,p-hd)(z))=1")
       (("1"
         (case "FORALL (r:real): x<=r AND r<=y IMPLIES sign_ext(polynomial(Ba, n - d)(r))*sign_ext(polynomial(Ba, n - d)(z))=1")
         (("1"
           (case "FORALL (r:real): x<=r AND r<=y IMPLIES sign_ext(polynomial(Bh, p-hd)(r)) * sign_ext(polynomial(Bh, p-hd)(z))=1")
           (("1"
             (split +)
             (("1"
               (inst - "x")
               (inst - "x")
               (assert)
               (case "x<=y")
               (("1"
                 (assert)
                 (inst - "x")
                 (inst - "x")
                 (inst - "x")
                 (inst - "x")
                 (assert)
                 (replace -11 1)
                 (replace -7 1)
                 (rewrite "sign_ext_mult")
                 (rewrite "sign_ext_mult")
                 (expand "sign_ext" (-1 -2 -3 -4))
                 (case "sign_ext((x - z) ^ d) * sign_ext((x - z) ^ hd)=1")
                 (("1"
                   (expand "sign_ext" + 4)
                   (expand "sign_ext" + 1)
                   (lift-if)
                   (assert)
                   (lift-if)
                   (assert)
                   (lift-if)
                   (assert)
                   (lift-if)
                   (assert)
                   (ground))
                  ("2"
                   (hide (-1 -2 -3 -4 2))
                   (lemma "nzreal_expt")
                   (inst - "d" "x-z")
                   (("1"
                     (flatten)
                     (expand "^" 2)
                     (expand "sign_ext" 2)
                     (lift-if)
                     (assert))
                    ("2"
                     (assert)
                     (expand "only_root_between?")
                     (propax))))))
                ("2" (expand "only_root_between?") (flatten) (assert))))
              ("2"
               (inst - "y")
               (inst - "y")
               (inst - "y")
               (inst - "y")
               (inst - "y")
               (inst - "y")
               (assert)
               (case "x<y")
               (("1"
                 (assert)
                 (replace -11 1)
                 (replace -7 +)
                 (rewrite "sign_ext_mult")
                 (rewrite "sign_ext_mult")
                 (case "sign_ext((y - z) ^ d) * sign_ext((y - z) ^ d) = 1")
                 (("1"
                   (assert)
                   (expand "sign_ext" (-1 -2 -3 -4 -5 1))
                   (lift-if)
                   (assert)
                   (lift-if)
                   (assert)
                   (lift-if)
                   (assert)
                   (lift-if)
                   (assert)
                   (lift-if)
                   (assert)
                   (lift-if)
                   (assert)
                   (lift-if)
                   (assert)
                   (lift-if)
                   (assert)
                   (ground))
                  ("2"
                   (hide 2)
                   (lemma "nzreal_expt")
                   (case "expt(y-z,d)/=0")
                   (("1"
                     (expand "^" 1)
                     (expand "sign_ext" 1)
                     (lift-if)
                     (assert))
                    ("2"
                     (case "z < y")
                     (("1"
                       (hide-all-but (-1 -2 1))
                       (lemma "posreal_expt")
                       (inst? -1)
                       (("1" (assert)) ("2" (assert))))
                      ("2" (expand "only_root_between?") (assert))))))))
                ("2"
                 (expand "only_root_between?")
                 (assert)
                 (flatten)
                 (assert))))))
            ("2"
             (hide 12)
             (skeep)
             (case "polynomial(Bh, p - hd)(r) = 0 OR r = z")
             (("1"
               (case "r = z")
               (("1"
                 (hide -2)
                 (replace -1)
                 (expand "sign_ext" 1)
                 (lift-if)
                 (assert))
                ("2"
                 (assert)
                 (inst -8 "r")
                 (assert)
                 (replace -1)
                 (assert)
                 (copy "hor")
                 (expand "only_root_between?" -1)
                 (flatten)
                 (inst - "r")
                 (assert))))
              ("2"
               (flatten)
               (assert)
               (expand "sign_ext" 3)
               (lift-if)
               (assert)
               (lift-if)
               (assert)
               (lift-if)
               (assert)
               (ground)
               (("1"
                 (case "z < r")
                 (("1"
                   (lemma "poly_intermediate_value_dec")
                   (inst - "Bh" "0" "p-hd" "z" "r")
                   (assert)
                   (skosimp*)
                   (copy "hor")
                   (expand "only_root_between?" -1)
                   (inst - "cc!1")
                   (assert)
                   (flatten)
                   (inst - "cc!1")
                   (inst -14 "cc!1")
                   (assert))
                  ("2"
                   (lemma "poly_intermediate_value_inc")
                   (inst - "Bh" "0" "p-hd" "r" "z")
                   (assert)
                   (skosimp*)
                   (copy "hor")
                   (expand "only_root_between?" -1)
                   (flatten)
                   (inst -13 "cc!1")
                   (assert)
                   (inst - "cc!1")
                   (assert))))
                ("2"
                 (case "z < r")
                 (("1"
                   (lemma "poly_intermediate_value_inc")
                   (inst - "Bh" "0" "p-hd" "z" "r")
                   (assert)
                   (skosimp*)
                   (copy "hor")
                   (expand "only_root_between?" -1)
                   (flatten)
                   (inst - "cc!1")
                   (assert)
                   (inst -14 "cc!1")
                   (assert))
                  ("2"
                   (lemma "poly_intermediate_value_dec")
                   (inst - "Bh" "0" "p-hd" "r" "z")
                   (assert)
                   (skosimp*)
                   (copy "hor")
                   (expand "only_root_between?" -1)
                   (flatten)
                   (inst - "cc!1")
                   (inst -13 "cc!1")
                   (assert))))))))))
          ("2"
           (hide 12)
           (hide -15)
           (skeep)
           (case "r = z")
           (("1" (replace -1) (expand "sign_ext" 1) (lift-if) (assert))
            ("2"
             (copy "aor")
             (expand "only_root_between?" -1)
             (flatten)
             (inst-cp - "r")
             (assert)
             (flatten)
             (assert)
             (expand "sign_ext" 3)
             (lift-if)
             (lift-if)
             (assert)
             (lift-if)
             (assert)
             (lift-if)
             (assert)
             (ground)
             (("1"
               (case "z < r")
               (("1"
                 (lemma "poly_intermediate_value_dec")
                 (inst - "Ba" "0" "n-d" "z" "r")
                 (assert)
                 (skosimp*)
                 (inst -18 "cc!1")
                 (assert)
                 (copy "aor")
                 (inst - "cc!1")
                 (assert))
                ("2"
                 (lemma "poly_intermediate_value_inc")
                 (inst - "Ba" "0" "n-d" "r" "z")
                 (assert)
                 (skosimp*)
                 (inst - "cc!1")
                 (inst - "cc!1")
                 (inst - "cc!1")
                 (inst - "cc!1")
                 (inst - "cc!1")
                 (assert))))
              ("2"
               (case "z < r")
               (("1"
                 (lemma "poly_intermediate_value_inc")
                 (inst - "Ba" "0" "n-d" "z" "r")
                 (assert)
                 (skosimp*)
                 (inst - "cc!1")
                 (inst - "cc!1")
                 (inst - "cc!1")
                 (inst - "cc!1")
                 (inst - "cc!1")
                 (assert))
                ("2"
                 (assert)
                 (lemma "poly_intermediate_value_dec")
                 (inst - "Ba" "0" "n-d" "r" "z")
                 (assert)
                 (skosimp*)
                 (inst - "cc!1")
                 (inst - "cc!1")
                 (inst - "cc!1")
                 (inst - "cc!1")
                 (inst - "cc!1")
                 (assert))))
              ("3"
               (inst - "r")
               (inst - "r")
               (inst - "r")
               (inst - "r")
               (inst - "r")
               (assert))))))))
        ("2"
         (inst - "z")
         (assert)
         (expand "^" -1)
         (expand "expt" -1)
         (expand "sign_ext" 1)
         (lift-if)
         (assert))))
      ("2"
       (hide (12 13))
       (name "PL" "power_linear(-z,1,bd-d)")
       (skeep)
       (lemma "power_linear_polynomial")
       (inst - "-z" "bd-d" "1" "x!1" "bd-d")
       (assert)
       (replace -2)
       (replace -1)
       (rewrite "polynomial_prod_def" 1)
       (rewrite "polynomial_prod_def" 1)
       (name "P"
             "polynomial_prod(polynomial_prod(Bb, m - bd, g, k),
                                                k - bd + m, PL, bd - d)")
       (replace -1)
       (name "Bhnew" "LAMBDA (i:nat): IF i>p-hd THEN 0 ELSE Bh(i) ENDIF")
       (name "Pnew" "LAMBDA (i:nat): IF i>k-d+m THEN 0 ELSE P(i) ENDIF")
       (case "polynomial(Bh,p-hd) = polynomial(Bhnew,p-hd)")
       (("1"
         (case "polynomial(P,k-d+m) = polynomial(Pnew,k-d+m)")
         (("1"
           (replace -2)
           (replace -1)
           (lemma "sum_polynomial")
           (inst - "Bhnew" "Pnew" _ _)
           (inst - "k-d+m" "p-hd")
           (assert)
           (split -1)
           (("1"
             (decompose-equality -1)
             (inst - "x!1")
             (expand "+")
             (assert)
             (replaces -1)
             (lemma "poly_cancel")
             (inst - "Ba" "LAMBDA (i: nat): Bhnew(i) + Pnew(i)"
              "power_linear(-z,1,d)" "max(p - hd, k - d + m)" "n-d" "d")
             (assert)
             (hide 2)
             (split 1)
             (("1"
               (inst + "d")
               (assert)
               (expand "power_linear" 1)
               (assert)
               (lemma "expt_1n_aux")
               (inst - "d")
               (expand "^" -2)
               (replace -1)
               (expand "expt" -2)
               (assert))
              ("2"
               (lemma "power_linear_polynomial")
               (skosimp*)
               (rewrite "power_linear_polynomial" :dir rl)
               (inst - "x!2")
               (inst - "x!2")
               (inst - "x!2")
               (replace -14 :dir rl)
               (assert)
               (lemma "sum_polynomial")
               (expand "+")
               (inst - "Bhnew" "Pnew" "k-d+m" "p-hd")
               (assert)
               (split -)
               (("1"
                 (decompose-equality -1)
                 (inst - "x!2")
                 (replaces -1 :dir rl)
                 (replace -2 :dir rl)
                 (replace -3 :dir rl)
                 (assert)
                 (expand "P" +)
                 (rewrite "polynomial_prod_def" 1 :dir rl)
                 (rewrite "polynomial_prod_def" 1 :dir rl)
                 (assert)
                 (case "NOT hd = d")
                 (("1" (assert))
                  ("2"
                   (replace -1)
                   (assert)
                   (replace -11 :dir rl)
                   (assert)
                   (expand "PL" 1)
                   (rewrite "power_linear_polynomial" :dir rl)
                   (assert)
                   (lemma "expt_plus")
                   (inst - "d" "bd-d" "x!2-z")
                   (("1" (assert) (inst - "x!2") (assert))
                    ("2"
                     (flatten)
                     (replace -1)
                     (assert)
                     (case "FORALL (kp:posnat): 0^kp=0")
                     (("1"
                       (inst-cp - "bd")
                       (inst - "bd-d")
                       (assert)
                       (inst - "x!2")
                       (assert))
                      ("2" (hide-all-but 1) (grind))))))))
                ("2" (skosimp*) (expand "Bhnew" 1) (propax))
                ("3" (skosimp*) (expand "Pnew" 1) (propax))))))
            ("2" (skosimp*) (expand "Bhnew" 1) (propax))
            ("3" (skosimp*) (expand "Pnew" 1) (propax))))
          ("2"
           (lemma "poly_eq_le_degree")
           (decompose-equality 1)
           (inst? -1)
           (assert)
           (skosimp*)
           (expand "Pnew" 2)
           (assert))))
        ("2"
         (lemma "poly_eq_le_degree")
         (decompose-equality 1)
         (inst?)
         (assert)
         (skosimp*)
         (expand "Bhnew" 2)
         (assert))))))))


proof_type: t_proof
decl_type: tcc
library: reals
theory: more_polynomial_props
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (skeep)
   (case "i = n")
   (("1" (grind))
    ("2"
     (typepred "v(a,n-1)")
     (("1" (inst - "i") (assert)) ("2" (assert))))))


proof_type: t_proof
decl_type: tcc
library: reals
theory: more_polynomial_props
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (lemma "nzreal_times_nzreal_is_nzreal")
   (inst - "polynomial(LAMBDA (i: nat): n - i, n - 1)(abs(x))+1"
    "poly_coeff_bound(a,n)")
   (("1" (assert))
    ("2"
     (expand "polynomial" -1)
     (lemma "sigma_ge_0")
     (inst?)
     (assert)
     (hide -)
     (skeep)
     (lift-if)
     (ground)
     (typepred "n_1")
     (mult-by -2 "abs(x)^n_1")
     (assert))
    ("3" (assert))))


proof_type: t_proof
decl_type: tcc
library: reals
theory: more_polynomial_props
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (case "FORALL (rr:real): rr>0 IMPLIES (rr>=0 AND rr>0)")
   (("1"
     (inst?)
     (("1"
       (assert)
       (replace 2)
       (hide 3)
       (lemma "posreal_div_posreal_is_posreal")
       (inst?)
       (hide 2)
       (case "FORALL (rr:real): rr>0 IMPLIES (rr>=0 AND rr>0)")
       (("1"
         (inst?)
         (assert)
         (replace 1)
         (hide 2)
         (lemma "posreal_times_posreal_is_posreal")
         (inst - "polynomial(LAMBDA (i: nat): n - i, n - 1)(abs(x))+1"
          "poly_coeff_bound(a,n)")
         (("1" (assert))
          ("2"
           (hide 2)
           (case "FORALL (rr:real): rr>0 IMPLIES (rr>=0 AND rr>0)")
           (("1"
             (inst?)
             (replace 1)
             (hide 2)
             (expand "polynomial" 1)
             (lemma "sigma_ge_0")
             (inst?)
             (assert)
             (hide 2)
             (skeep)
             (lift-if)
             (ground)
             (typepred "n_1")
             (mult-by -2 "abs(x)^n_1")
             (assert))
            ("2" (hide 2) (grind))))))
        ("2" (hide 2) (grind))))
      ("2"
       (hide 2)
       (lemma "nzreal_times_nzreal_is_nzreal")
       (inst - "polynomial(LAMBDA (i: nat): n - i, n - 1)(abs(x))+1"
        "poly_coeff_bound(a,n)")
       (("1" (assert))
        ("2"
         (hide -2)
         (expand "polynomial" -1)
         (lemma "sigma_ge_0")
         (inst?)
         (assert)
         (skeep)
         (lift-if)
         (ground)
         (typepred "n_1")
         (mult-by -2 "abs(x)^n_1")
         (assert))
        ("3" (assert))))
      ("3" (assert))))
    ("2" (skeep) (assert))))


proof_type: t_proof
decl_type: tcc
library: reals
theory: more_polynomial_props
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (lemma "posreal_times_posreal_is_posreal")
   (inst?)
   (("1" (assert))
    ("2"
     (hide -)
     (case "FORALL (rr:real): rr>0 IMPLIES (rr>=0 AND rr>0)")
     (("1"
       (inst?)
       (("1"
         (replace 1)
         (hide 2)
         (lemma "sigma_nonneg")
         (inst?)
         (("1"
           (assert)
           (hide 2)
           (skeep)
           (lemma "sigma_nonneg")
           (inst?)
           (("1" (assert) (hide 2) (skosimp*) (lift-if) (ground))
            ("2" (hide 2) (skosimp*) (assert))
            ("3" (hide 2) (skosimp*) (assert))))
          ("2" (hide 2) (skosimp*) (assert))
          ("3" (hide 2) (skosimp*) (assert))))
        ("2" (hide 2) (skosimp*) (assert))
        ("3" (hide 2) (skosimp*) (assert))))
      ("2" (hide 2) (skosimp*) (assert))))
    ("3" (hide 2) (skosimp*) (assert))
    ("4" (hide 2) (skosimp*) (assert))))


proof_type: t_proof
decl_type: tcc
library: reals
theory: more_polynomial_props
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (skeep)
   (case "FORALL (rr:real): rr>0 IMPLIES (min(rr,1/2)>=0 AND min(rr,1/2)>0)")
   (("1"
     (inst?)
     (assert)
     (replace 2)
     (hide 3)
     (replaces -1)
     (case "FORALL (dd:real): dd>=0 IMPLIES (epsil/(poly_coeff_bound(a,n)*(1+dd)))>0")
     (("1"
       (invoke (inst - "%1") (! 1 1 2 2 2))
       (("1"
         (assert)
         (hide 2)
         (lemma "sigma_nonneg")
         (inst?)
         (("1"
           (assert)
           (hide 2)
           (skosimp*)
           (lemma "sigma_nonneg")
           (inst?)
           (("1" (assert) (hide 2) (skosimp*) (lift-if) (ground))
            ("2" (hide 2) (skosimp*) (ground))
            ("3" (hide 2) (skosimp*) (ground))))
          ("2" (hide 2) (skosimp*) (ground))
          ("3" (hide 2) (skosimp*) (ground))))
        ("2" (hide 2) (skosimp*) (ground))
        ("3" (hide 2) (skosimp*) (ground))))
      ("2"
       (hide 2)
       (skosimp*)
       (ground)
       (cross-mult 1)
       (ground)
       (mult-by -1 "poly_coeff_bound(a,n)")
       (assert))
      ("3"
       (hide 2)
       (skeep)
       (mult-by -1 "poly_coeff_bound(a,n)")
       (assert))))
    ("2" (hide-all-but 1) (grind))))


proof_type: t_proof
decl_type: tcc
library: reals
theory: more_polynomial_props
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (assert)
   (flatten)
   (ground)
   (("1"
     (skosimp*)
     (case "NOT ii!1 = 0")
     (("1" (assert))
      ("2"
       (replaces -1)
       (assert)
       (replaces -2)
       (expand "poly_n_deriv")
       (expand "factorial")
       (expand "C")
       (assert)
       (expand "polynomial")
       (expand "sigma")
       (expand "sigma")
       (assert))))
    ("2" (replaces -1) (skosimp*) (assert))
    ("3" (lemma "poly_n_deriv_def") (inst?) (assert))
    ("4" (skosimp*) (assert))))


proof_type: t_proof
decl_type: tcc
library: reals
theory: more_polynomial_props
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (assert)
   (typepred "v(poly_deriv(a),n-1,x)")
   (assert)
   (flatten)
   (invoke (name "A" "%1") (! -1 1))
   (replace -1)
   (case "poly_n_deriv(poly_deriv(a), -1 - A + n) = poly_n_deriv(a, n - A)")
   (("1"
     (replace -1)
     (split -)
     (("1"
       (flatten)
       (assert)
       (skeep)
       (case "i = n")
       (("1"
         (replaces -1)
         (assert)
         (lemma "poly_n_deriv_def")
         (inst?)
         (assert))
        ("2"
         (inst - "i")
         (assert)
         (case "poly_n_deriv(poly_deriv(a), -1 - i + n) = poly_n_deriv(a, n - i)")
         (("1" (assert))
          ("2"
           (lemma "poly_n_deriv_def")
           (inst - "a")
           (flatten)
           (inst - "-1-i+n")
           (assert)
           (replace -3 1 :dir rl)
           (expand "poly_n_deriv" 1)
           (expand "poly_deriv" 1)
           (decompose-equality 1)
           (name "K4" "factorial(-1 - i + n)")
           (replace -1)
           (expand "C" 1)
           (field)
           (case "factorial(1+x!1) = (1+x!1)*factorial(x!1)")
           (("1"
             (replaces -1)
             (assert)
             (assert)
             (case "factorial(n-i+x!1) = (n-i+x!1)*factorial(-1-i+n+x!1)")
             (("1" (assert))
              ("2" (hide 2) (expand "factorial" 1 1) (propax))))
            ("2" (hide 2) (expand "factorial" 1 1) (propax))))))))
      ("2"
       (name "bb" "poly_deriv(a)")
       (replace -1)
       (skeep)
       (case "ii = 0")
       (("1"
         (case "FORALL (jj:upto(n)): jj>0 IMPLIES a(jj)=0")
         (("1"
           (expand "polynomial" -7)
           (rewrite "sigma_first")
           (invoke (case "%1 = 0") (! -7 1 2))
           (("1" (replaces -1) (assert))
            ("2"
             (rewrite "sigma_restrict_eq_0")
             (hide 2)
             (skosimp*)
             (inst - "i!1")
             (assert))))
          ("2"
           (skeep)
           (inst + "jj-1")
           (("1"
             (assert)
             (expand "bb" 2)
             (expand "poly_deriv" 2)
             (hide 4)
             (lemma "nzreal_times_nzreal_is_nzreal")
             (assert))
            ("2" (assert))))))
        ("2"
         (hide 5)
         (inst + "ii-1")
         (("1"
           (flatten)
           (assert)
           (expand "bb" -2)
           (expand "poly_deriv" -2)
           (assert))
          ("2" (assert))))))))
    ("2"
     (hide 3)
     (hide -3)
     (hide -1)
     (decompose-equality 1)
     (expand "poly_n_deriv" 1)
     (expand "poly_deriv" 1)
     (expand "C" 1)
     (field)
     (case "factorial(n-A+x!1) = (n-A+x!1)*factorial(-1+n-A+x!1)")
     (("1" (replace -1) (assert))
      ("2" (hide 2) (expand "factorial" 1 1) (propax))))
    ("3" (assert)) ("4" (assert))))


proof_type: t_proof
decl_type: tcc
library: reals
theory: more_polynomial_props
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (case "FORALL (rr:real): rr/=0 IMPLIES abs(rr)>0")
   (("1"
     (rewrite -1)
     (hide (-1 2))
     (flatten)
     (typepred "maxn")
     (typepred "nzb")
     (assert))
    ("2" (hide-all-but 1) (grind))))


proof_type: t_proof
decl_type: tcc
library: reals
theory: more_polynomial_props
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (inst +
    "LAMBDA (a:sequence[real],(n|a(n)/=0)): choose({epsil:posreal | FORALL (x,y:real):
          polynomial(a,n)(x)=0 AND polynomial(a,n)(y)=0 AND x/=y IMPLIES
          abs(x-y)>epsil})")
   (skeep)
   (expand "nonempty?")
   (expand "empty?")
   (lemma "min_poly_root_distance")
   (inst - "a" "n")
   (split -)
   (("1"
     (skeep -)
     (inst - "epsil/2")
     (expand "member")
     (skeep)
     (inst - "x" "y")
     (assert))
    ("2" (inst + "n") (assert))))


proof_type: t_proof
decl_type: tcc
library: reals
theory: more_polynomial_props
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (split)
   (("1" (assert)) ("2" (assert))
    ("3"
     (skeep)
     (case "NOT abs(x) >= 2")
     (("1" (expand "max") (lift-if) (ground))
      ("2"
       (invoke (case "%1 <= %2") (! 1 1) (! 1 2 2 1))
       (("1" (expand "max") (lift-if) (ground))
        ("2"
         (hide 2)
         (expand "polynomial")
         (lemma "sigma_split")
         (label "final" 1)
         (hide "final")
         (inst?)
         (inst - "n-1")
         (assert)
         (replace -1)
         (hide -1)
         (reveal "final")
         (expand "sigma" - 2)
         (expand "sigma" - 2)
         (assert)
         (case "n = 0")
         (("1" (typepred "n") (assert))
          ("2"
           (assert)
           (mult-by 2 "abs(x)^(n-1) * abs(a(n))")
           (("1"
             (assert)
             (case " abs(x) * (abs(x) ^ (n - 1) * abs(a(n))) = abs(a(n) * x ^ n)")
             (("1"
               (replaces -1)
               (both-sides "-" "a(n)*x^n" -2)
               (assert)
               (neg-formula -2)
               (replace -1 2 :dir rl)
               (case "FORALL (rr:real): abs(-rr) = abs(rr)")
               (("1"
                 (rewrite -1)
                 (assert)
                 (case "NOT FORALL (rrr,tt:real): rrr/abs(a(n)) * (tt*abs(a(n))) = rrr*tt")
                 (("1" (skeep) (assert))
                  ("2"
                   (rewrite -1 +)
                   (hide -1)
                   (lemma "sigma_scal_right")
                   (inst - "LAMBDA (i:nat): abs(a(i))" "abs(x)^(n-1)"
                    "n-1" "0")
                   (replaces -1 2 :dir rl)
                   (lemma "sigma_triangle")
                   (inst?)
                   (invoke (case "%1 <= %2") (! -1 2) (! 2 2))
                   (("1" (assert))
                    ("2"
                     (hide (-1 -3 3))
                     (lemma "sigma_le")
                     (inst?)
                     (assert)
                     (skosimp*)
                     (lift-if)
                     (ground)
                     (("1"
                       (replaces -1)
                       (case "FORALL (kk:nat): abs(x)^kk >=1")
                       (("1"
                         (inst - "n-1")
                         (mult-by -1 "abs(a(0))")
                         (assert))
                        ("2"
                         (hide-all-but (-2 1))
                         (induct "kk")
                         (("1" (grind))
                          ("2"
                           (skeep)
                           (expand "^")
                           (expand "expt" +)
                           (mult-ineq -1 -2)
                           (("1" (assert))
                            ("2"
                             (split)
                             (("1"
                               (expand "abs" 1 1)
                               (expand "abs" 1 2)
                               (propax))
                              ("2"
                               (expand "abs" 1 1)
                               (expand "abs" 1 2)
                               (propax))))))))))
                      ("2"
                       (rewrite "abs_mult" 2)
                       (hide 3)
                       (case "FORALL (kk:nat): abs(x^n!1) <= abs(x)^(n!1+kk)")
                       (("1"
                         (inst - "n-1-n!1")
                         (assert)
                         (mult-by -1 "abs(a(n!1))")
                         (assert))
                        ("2"
                         (hide 3)
                         (induct "kk")
                         (("1"
                           (assert)
                           (lemma "abs_expt")
                           (rewrite -1 :dir rl)
                           (("1" (assert))
                            ("2"
                             (flatten)
                             (replaces -1)
                             (hide -)
                             (grind))))
                          ("2"
                           (skeep)
                           (assert)
                           (case "NOT 1<=abs(x)^1")
                           (("1"
                             (expand "^" 1)
                             (expand "expt" 1)
                             (expand "expt" 1)
                             (assert))
                            ("2"
                             (mult-ineq -1 -2)
                             (("1"
                               (rewrite "expt_plus" :dir rl)
                               (assert))
                              ("2"
                               (split 1)
                               (("1"
                                 (expand "abs" 1 1)
                                 (expand "abs" 1 1)
                                 (propax))
                                ("2"
                                 (expand "abs" 1 1)
                                 (expand "abs" 1 2)
                                 (propax))))))))))))))))))
                ("2" (hide-all-but 1) (grind))))
              ("2"
               (hide-all-but (-1 1 3))
               (rewrite "abs_mult")
               (expand "^" 1 2)
               (expand "expt")
               (expand "^")
               (rewrite "abs_mult")
               (rewrite "expt_of_abs" :dir rl)
               (assert))))
            ("2"
             (lemma "posreal_times_posreal_is_posreal")
             (inst?)
             (lemma "posreal_expt")
             (expand "^" 1)
             (inst?))))))))))))


proof_type: t_proof
decl_type: tcc
library: reals
theory: more_polynomial_props
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (skeep)
   (lemma "Knuth_bound_simple")
   (inst - "a" "n" "x")
   (assert)
   (skeep -1)
   (typepred "max_rec(maxKfun,1,n)")
   (inst -2 "k")
   (assert)
   (case "x<=2*maxKfun(k)")
   (("1" (assert))
    ("2"
     (hide (-1 -2 2))
     (replace -3 +)
     (assert)
     (hide -3)
     (name "j" "least_pow_2_ge(-a(n - k))")
     (replace -1)
     (typepred "floor(j/k)")
     (lemma "both_sides_expt_pos_le")
     (inst - "k" "x" "2 * 2 ^ (1 + floor(j / k))")
     (assert)
     (hide 2)
     (rewrite "mult_expt")
     (case "-a(n-k) <= 2 ^ (1 + floor(j / k)) ^ k")
     (("1" (mult-by -1 "2^k") (assert))
      ("2"
       (hide 2)
       (rewrite "expt_times" :dir rl)
       (assert)
       (lemma "both_sides_expt_gt1_le")
       (inst - "2" "j" "floor(j / k) * k + k")
       (assert)
       (hide 2)
       (cross-mult -2))))))


proof_type: t_proof
decl_type: tcc
library: reals
theory: more_polynomial_props
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (skeep)
   (skeep)
   (skeep)
   (skeep)
   (skeep)
   (split +)
   (("1" (hide -) (grind))
    ("2"
     (skeep)
     (case "x = 0")
     (("1" (replaces -1) (hide -) (grind))
      ("2"
       (assert)
       (case "x > 0")
       (("1"
         (expand "abs" +)
         (assert)
         (typepred "Knuth_poly_pos_root_bound(newa, n)")
         (inst - "x")
         (assert)
         (lemma "scal_polynomial")
         (inst - "a" "n" "1/a(n)")
         (case "newa = const_fun(1 / a(n)) * a")
         (("1"
           (replaces -1 :dir rl)
           (expand "const_fun" -1)
           (assert)
           (replaces -1 :dir rl)
           (expand "*")
           (assert))
          ("2"
           (decompose-equality 1)
           (expand "const_fun" 1)
           (expand "*")
           (replace -6 1)
           (assert))))
        ("2"
         (assert)
         (typepred "Knuth_poly_pos_root_bound(nega, n)")
         (inst - "-x")
         (expand "abs" +)
         (assert)
         (mult-by -1 "negsign(n)/a(n)")
         (case "FORALL (xyz:real):0*xyz=0")
         (("1"
           (rewrite -1)
           (replace -2 1 :dir rl)
           (hide (-1 -2))
           (expand "polynomial" 1)
           (rewrite "sigma_scal_right" :dir rl)
           (rewrite "sigma_eq")
           (hide 2)
           (skosimp*)
           (replace -2 1)
           (assert)
           (assert)
           (lift-if)
           (ground)
           (("1"
             (replaces -1)
             (replace -1 1)
             (assert)
             (lift-if)
             (ground))
            ("2"
             (lemma "mult_expt")
             (inst - "n!1" "-1" "x")
             (assert)
             (replaces -1)
             (case "FORALL (kp:nat): negsign(kp) = (-1)^kp")
             (("1"
               (inst-cp - "n!1")
               (case "(-1)^n!1 * (-1)^n!1 = 1")
               (("1"
                 (replace -3)
                 (assert)
                 (hide-all-but (-1 -3 2))
                 (grind-reals))
                ("2"
                 (replace -2 1 :dir rl)
                 (replace -3 1)
                 (assert)
                 (hide-all-but 1)
                 (lift-if)
                 (ground))))
              ("2"
               (hide-all-but (-1 1))
               (replaces -1)
               (induct "kp")
               (("1" (grind))
                ("2"
                 (skeep)
                 (expand "^")
                 (expand "expt" +)
                 (lift-if)
                 (ground)
                 (("1"
                   (lemma "odd_iff_even_succ")
                   (inst - "j")
                   (assert)
                   (lemma "even_iff_not_odd")
                   (inst - "j")
                   (assert))
                  ("2"
                   (lemma "even_iff_not_odd")
                   (inst - "j")
                   (assert)
                   (lemma "odd_iff_even_succ")
                   (inst - "j")
                   (assert))))))))))
          ("2" (assert))))))))))


proof_type: t_proof
decl_type: tcc
library: reals
theory: more_polynomial_props
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (assert)
   (typepred "Kprb")
   (skeep)
   (inst - "x")
   (assert)
   (expand "abs")
   (lift-if)
   (ground))


proof_type: t_proof
decl_type: tcc
library: reals
theory: more_polynomial_props
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (assert)
   (flatten)
   (case "n = 0")
   (("1"
     (assert)
     (hide -2)
     (replaces -1)
     (assert)
     (split)
     (("1" (inst + "a") (grind)) ("2" (grind))))
    ("2"
     (assert)
     (flatten)
     (inst + "a")
     (split)
     (("1" (skosimp*) (grind :exclude "polynomial")) ("2" (propax))
      ("3" (propax))))))


proof_type: t_proof
decl_type: tcc
library: reals
theory: more_polynomial_props
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (name "rf"
         "LAMBDA
                                                      (i: nat):
                                                      poly_shift(a, n)(y)(i + 1)")
   (replace -1)
   (name "ps" "poly_shift(rf, n - 1)(-y)")
   (("1"
     (replace -1)
     (assert)
     (name "k" "v(ps,n-1)(y)")
     (replace -1)
     (assert)
     (flatten)
     (assert)
     (invoke (case "NOT %1") (! 3 1))
     (("1"
       (hide 4)
       (typepred "k")
       (assert)
       (case "ps(n-1)=0")
       (("1"
         (expand "ps" -1)
         (expand "poly_shift" -1)
         (expand "sigma" -1)
         (expand "sigma" -1)
         (expand "C" -1)
         (expand "rf" -1)
         (expand "poly_shift" -1)
         (expand "sigma" -1)
         (expand "sigma" -1)
         (expand "C" -1)
         (expand "^" -1)
         (expand "expt")
         (assert))
        ("2"
         (assert)
         (flatten)
         (skeep)
         (inst + "b")
         (assert)
         (skeep)
         (inst - "x")
         (assert)
         (lemma " polynomial_zero_factor2")
         (inst - "a" "n" "y")
         (assert)
         (replace -8)
         (replace -7)
         (inst - "x")
         (expand "^")
         (expand "expt" +)
         (assert))))
      ("2"
       (replace -1)
       (lemma "max_linear_div_power_rew2")
       (inst - "a" "n" "y" "k+1")
       (assert)
       (flatten)
       (hide -1)
       (split -1)
       (("1"
         (expand "max_linear_div_power?")
         (hide -2)
         (skosimp*)
         (inst + "q!1")
         (assert))
        ("2" (hide 4) (skeep) (inst + "b" "n-k-1") (assert))))))
    ("2" (assert))))


proof_type: f_proof
decl_type: formula
library: reals
theory: base_repr
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skolem 1 ("n" "_" "_"))
   (induct "i" 1 NAT_induction)
   (skeep)
   (skeep)
   (expand "base_n" 1)
   (lift-if 1)
   (split 1)
   (("1"
     (flatten)
     (split 1)
     (("1" (flatten) (ground)) ("2" (flatten) (ground))))
    ("2"
     (flatten)
     (split 2)
     (("1" (flatten) (lemma "mod_pos") (inst?) (ground))
      ("2"
       (flatten)
       (inst -1 "j-1")
       (("1"
         (split -1)
         (("1"
           (inst -1 "(k-mod(k,n))/n")
           (hide-all-but 1)
           (split 1)
           (("1" (grind))
            ("2"
             (cross-mult)
             (expand "mod")
             (cancel-by 1 "n")
             (ground)
             (grind)
             (typepred (k))
             (div-by -1 "n")
             (ground))))
          ("2" (ground))))
        ("2" (ground))))))))


proof_type: f_proof
decl_type: formula
library: reals
theory: base_repr
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skolem 1 ("n" "_" "_"))
   (induct "k" 1 NAT_induction)
   (skeep)
   (skeep)
   (case "j<n")
   (("1"
     (expand "base_n" 1)
     (lift-if 1)
     (split 1)
     (("1"
       (flatten)
       (split)
       (("1"
         (flatten)
         (expand "upper_index")
         (lift-if -5)
         (split -5)
         (("1" (flatten))
          ("2" (flatten) (typepred ("log_nat(j, n)`1")) (ground))))
        ("2" (propax))))
      ("2" (flatten))))
    ("2"
     (expand "upper_index" -2)
     (lift-if -2)
     (split -2)
     (("1" (flatten) (ground))
      ("2"
       (flatten)
       (flip-ineq 2)
       (expand "base_n" 2)
       (lift-if 2)
       (split 2)
       (("1" (flatten) (ground))
        ("2"
         (flatten)
         (hide 1)
         (split 1)
         (("1" (flatten) (ground))
          ("2"
           (flatten)
           (hide 1)
           (inst -3 "(j-mod(j,n))/n")
           (("1"
             (split -3)
             (("1"
               (inst -1 "m-1")
               (("1"
                 (lemma "log_nat_incr")
                 (case "(j-mod(j,n))/n = 0")
                 (("1" (replace -1) (expand "base_n") (propax))
                  ("2"
                   (lemma "base_n_TCC4")
                   (inst -1 "n" "j" "1")
                   (split -1)
                   (("1"
                     (case "(j-mod(j,n))/n<1")
                     (("1"
                       (flatten)
                       (ground)
                       (assert)
                       (name-replace "N" "(j-mod(j,n))/n")
                       (hide-all-but (-1 -2 -3 2))
                       (ground))
                      ("2"
                       (flip-ineq 1)
                       (lemma "log_nat_incr")
                       (inst -1 "n" "(j-mod(j,n))/n" "j")
                       (split -1)
                       (("1"
                         (case "m-1>log_nat((j - mod(j, n)) / n, n)`1")
                         (("1"
                           (split -6)
                           (("1" (propax))
                            ("2"
                             (expand "upper_index")
                             (lift-if 1)
                             (split 1)
                             (("1" (flatten)) ("2" (flatten))))))
                          ("2" (ground))))
                        ("2"
                         (simplify 1)
                         (case-replace
                          "n * ((j - mod(j, n)) / n) = j-mod(j,n)")
                         (("1"
                           (both-sides "-" "j" 1)
                           (simplify 1)
                           (lemma "mod_pos")
                           (inst?)
                           (flatten)
                           (ground))
                          ("2" (ground))))))))
                    ("2" (ground)) ("3" (ground))))))
                ("2" (typepred ("log_nat(j, n)`1")) (ground))))
              ("2"
               (lemma "mod_pos")
               (inst -1 "j" "n")
               (flatten)
               (cross-mult 1)
               (ground)
               (both-sides "-" "j" 1)
               (simplify 1)
               (case "0<j")
               (("1"
                 (case "0<n-1")
                 (("1" (mult-ineq -1 -2) (ground)) ("2" (ground))))
                ("2" (ground))))))
            ("2"
             (lemma "base_n_TCC4")
             (inst -1 "n" "j" "1")
             (split -1)
             (("1" (propax)) ("2" (ground)) ("3" (ground))))))))))))))


proof_type: f_proof
decl_type: formula
library: reals
theory: base_repr
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skolem 1 ("n" "_"))
   (induct "k" 1 NAT_induction)
   (("1"
     (skolem 1 "k")
     (case "k<n")
     (("1"
       (flatten)
       (case-replace "upper_index(n,k) = 0")
       (("1"
         (lemma "sigma_eq_arg[nat]")
         (inst?)
         (replace -1)
         (hide (-1 -4))
         (expand "base_n")
         (expand "^")
         (expand "expt")
         (lift-if 1)
         (split)
         (("1" (flatten) (ground)) ("2" (flatten))))
        ("2"
         (expand "upper_index")
         (lift-if 1)
         (split 1)
         (("1" (propax))
          ("2"
           (flatten)
           (expand "log_nat")
           (lift-if 2)
           (split 2)
           (("1" (propax)) ("2" (flatten))))))))
      ("2"
       (flip-ineq 1)
       (flatten)
       (rewrite "sigma_first_ge")
       (case-replace "n^0*base_n(n,k)(0) = mod(k,n)")
       (("1"
         (both-sides "-" "mod(k,n)" 1)
         (("1"
           (simplify 1)
           (rewrite "sigma_shift_to_zero")
           (("1"
             (both-sides "*" "1/n" 1)
             (("1"
               (lemma "sigma_scal_right")
               (inst?)
               (replace -1 :dir rl)
               (case-replace
                "(LAMBDA (i_1: nat):
                                             (n ^ (1 + i_1)) * base_n(n, k)(1 + i_1) * (1 / n)) = LAMBDA (i: nat):
                                             n ^ i * base_n(n, k)(1 + i)")
               (("1"
                 (expand "base_n" 1)
                 (lemma "base_n_TCC4")
                 (inst -1 "n" "k" "1")
                 (split -1)
                 (("1"
                   (case-replace
                    "(LAMBDA(i:nat): n^i*IF k < n THEN 0
                                                        ELSE base_n(n, (k - mod(k, n)) / n)(i)
                                                        ENDIF) = LAMBDA(i:nat): n^i*base_n(n, (k - mod(k, n)) / n)(i)")
                   (("1"
                     (name "K" "(k-mod(k,n))/n")
                     (case-replace
                      "upper_index(n,K) = upper_index(n,k)-1")
                     (("1"
                       (hide (-5 -6))
                       (inst -7 "K")
                       (("1"
                         (split -7)
                         (("1" (replace -3 :dir rl) (ground))
                          ("2"
                           (expand "K")
                           (cross-mult 1)
                           (both-sides "-" "k" 1)
                           (simplify 1)
                           (case "0<k")
                           (("1"
                             (case "0<n-1")
                             (("1"
                               (mult-ineq -1 -2)
                               (lemma "mod_pos")
                               (inst?)
                               (flatten)
                               (ground))
                              ("2" (ground))))
                            ("2" (ground))))))
                        ("2" (expand "K") (propax))))
                      ("2"
                       (expand "upper_index")
                       (lift-if 1)
                       (split 1)
                       (("1"
                         (flatten)
                         (case "k=n")
                         (("1"
                           (replace -1)
                           (lift-if 1)
                           (split 1)
                           (("1" (flatten) (ground))
                            ("2"
                             (flatten)
                             (expand "log_nat")
                             (expand "log_nat")
                             (propax))))
                          ("2"
                           (replace -1)
                           (cross-mult -2)
                           (case "k=mod(k,n)")
                           (("1"
                             (lemma "mod_pos")
                             (inst?)
                             (flatten)
                             (replace -3 :dir rl)
                             (ground))
                            ("2" (ground))))))
                        ("2"
                         (flatten)
                         (lift-if 2)
                         (split 2)
                         (("1" (flatten) (ground))
                          ("2"
                           (flatten)
                           (hide (-2 -5 -6 -7 -9 4))
                           (lemma "log_nat_incr")
                           (inst -1 "n" "K" "k")
                           (split -1)
                           (("1"
                             (case "log_nat(K,n)`1<=log_nat(k,n)`1-1")
                             (("1"
                               (both-sides "+" "1" -1)
                               (simplify -1)
                               (both-sides "+" "1" 2)
                               (simplify 2)
                               (case-replace
                                "1+log_nat(K, n)`1 = log_nat(n*K, n)`1")
                               (("1"
                                 (lemma "log_nat_incr")
                                 (case
                                  "log_nat(n*K, n)`1< log_nat(k,n)`1")
                                 (("1"
                                   (case
                                    "log_nat(n*K, n)`1+1 <= log_nat(k,n)`1")
                                   (("1"
                                     (case-replace
                                      "log_nat(n*K, n)`1+1 = log_nat(n*n*K, n)`1")
                                     (("1"
                                       (lemma "log_nat_bounds")
                                       (inst-cp -1 "n" "n*K")
                                       (case
                                        "n*K<n^(log_nat(n*K,n)`1+1)")
                                       (("1"
                                         (inst -2 "n" "k")
                                         (case "n^log_nat(k,n)`1<=k")
                                         (("1"
                                           (replace -5 -2)
                                           (div-by -1 "n")
                                           (case-replace
                                            "n ^ log_nat(k, n)`1 / n = n^(log_nat(k,n)`1-1)")
                                           (("1"
                                             (case
                                              "n^(log_nat(k,n)`1-1)<=floor(k/n)")
                                             (("1"
                                               (mult-by -1 "n")
                                               (cross-mult -2)
                                               (replace -2 -1 :dir rl)
                                               (case-replace
                                                "floor(k/n)*n = k-mod(k,n)")
                                               (("1"
                                                 (case-replace
                                                  "k-mod(k,n) = n*K")
                                                 (("1"
                                                   (case
                                                    "n^log_nat(k,n)`1<n^log_nat(n*n*K, n)`1")
                                                   (("1"
                                                     (lemma
                                                      "both_sides_expt_gt1_lt")
                                                     (inst
                                                      -1
                                                      "n"
                                                      "log_nat(k, n)`1 "
                                                      " log_nat(n * n * K, n)`1")
                                                     (flatten)
                                                     (split -1)
                                                     (("1"
                                                       (ground)
                                                       (hide-all-but
                                                        (-2 -13))
                                                       (ground))
                                                      ("2" (propax))))
                                                    ("2"
                                                     (ground)
                                                     (split-ineq -3))))
                                                  ("2"
                                                   (expand "K")
                                                   (ground))))
                                                ("2"
                                                 (expand "mod")
                                                 (ground))))
                                              ("2"
                                               (case
                                                "FORALL (nn1:nat,xx1:nnreal): nn1<=xx1 IMPLIES nn1<=floor(xx1)")
                                               (("1"
                                                 (inst?)
                                                 (("1" (assert))
                                                  ("2" (assert))
                                                  ("3"
                                                   (assert)
                                                   (expand "^")
                                                   (propax))))
                                                ("2"
                                                 (hide-all-but 1)
                                                 (skeep)
                                                 (assert))))))
                                            ("2"
                                             (cross-mult 1)
                                             (expand "^")
                                             (lift-if 1)
                                             (split)
                                             (("1"
                                               (flatten)
                                               (expand "expt" 1 1)
                                               (lift-if 1)
                                               (split 1)
                                               (("1" (flatten) (ground))
                                                ("2"
                                                 (flatten)
                                                 (ground))))
                                              ("2" (ground))))))
                                          ("2" (ground))))
                                        ("2" (ground))))
                                      ("2"
                                       (name-replace
                                        "lgnK"
                                        "log_nat(n*K, n)`1")
                                       (hide (-1 -2 -3 -4 -5 -6 3))
                                       (expand "log_nat")
                                       (lift-if 1)
                                       (split 1)
                                       (("1"
                                         (flatten)
                                         (ground)
                                         (cancel-by -1 "n")
                                         (case "K>=1")
                                         (("1"
                                           (typepred (n))
                                           (mult-ineq -1 -2)
                                           (ground))
                                          ("2"
                                           (expand "K")
                                           (ground)
                                           (grind))))
                                        ("2"
                                         (flatten)
                                         (case-replace
                                          "K * n * n / n = K*n")
                                         (("1" (expand "lgnK") (ground))
                                          ("2" (ground))))))
                                      ("3"
                                       (case "K>=1")
                                       (("1"
                                         (typepred (n))
                                         (mult-ineq -1 -2)
                                         (ground)
                                         (mult-ineq -1 -2)
                                         (ground))
                                        ("2"
                                         (hide-all-but (-8 -9 1 5))
                                         (expand "K")
                                         (grind))))))
                                    ("2" (ground))))
                                  ("2" (ground))))
                                ("2"
                                 (name-replace "lgK" "log_nat(K,n)`1")
                                 (expand "log_nat")
                                 (lift-if 1)
                                 (split 1)
                                 (("1"
                                   (flatten)
                                   (cancel-by -1 "n")
                                   (expand "K")
                                   (ground)
                                   (grind))
                                  ("2"
                                   (flatten)
                                   (case-replace "n*K/n = K")
                                   (("1" (expand "lgK") (propax))
                                    ("2" (ground))))))
                                ("3"
                                 (case "K>=1")
                                 (("1"
                                   (typepred (n))
                                   (mult-ineq -1 -2)
                                   (ground))
                                  ("2"
                                   (replace -3)
                                   (ground)
                                   (split-ineq -5)
                                   (hide-all-but (-3 -4 -5 1 2))
                                   (expand "K")
                                   (grind))))))
                              ("2" (ground))))
                            ("2"
                             (expand "K")
                             (case-replace
                              "n * ((k - mod(k, n)) / n) = k-mod(k,n)")
                             (("1"
                               (both-sides "-" "k" 1)
                               (simplify 1)
                               (lemma "mod_pos")
                               (inst?)
                               (ground))
                              ("2" (ground))))))))))
                      ("3" (expand "K") (propax))))
                    ("2" (decompose-equality 1))
                    ("3" (flatten) (ground))))
                  ("2" (ground)) ("3" (ground))))
                ("2"
                 (hide 2)
                 (decompose-equality 1)
                 (expand "^")
                 (name-replace "EN" "expt(n, x!1)")
                 (expand "expt")
                 (ground)
                 (case-replace
                  " base_n(n, k)(1 + x!1) * expt(n, x!1) * (1 / n) * n  =  base_n(n, k)(1 + x!1) * expt(n, x!1)")
                 (("1" (expand "EN") (ground))
                  ("2" (expand "EN") (ground))))))
              ("2" (typepred (n)) (ground) (assert) (cancel-by -2 "n"))))
            ("2"
             (hide (-3 2))
             (expand "upper_index")
             (expand "log_nat")
             (ground))))
          ("2" (ground))))
        ("2"
         (hide (2 -2))
         (expand "^")
         (expand "expt")
         (expand "base_n")
         (lift-if 1)
         (split)
         (("1" (flatten) (ground)) ("2" (flatten) (ground))))))))
    ("2"
     (skeep 1)
     (expand "upper_index")
     (lift-if 1)
     (split 1)
     (("1" (flatten) (ground))
      ("2" (flatten) (typepred ("log_nat(k, n)`1")) (propax))))))


proof_type: f_proof
decl_type: formula
library: reals
theory: base_repr
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (expand "base_n_to_nat")
   (lemma "base_n_is_n")
   (inst?)
   (lemma "upper_is_bound")
   (lemma "log_nat_bounds")
   (case "upper_index(n,k)<=m")
   (("1"
     (case-replace "upper_index(n,k) = m")
     (lemma "sigma_split")
     (inst -1 "LAMBDA (s: nat): n ^ s * base_n(n, k)(s)" "m" "0"
      "upper_index(n,k)")
     (split -1)
     (("1"
       (ground)
       (replace -1)
       (hide -1)
       (replace -4 :dir rl)
       (simplify 2)
       (lemma "sigma_const_restrict_eq_0")
       (inst -1 "LAMBDA (s: nat): n ^ s * base_n(n, k)(s)" "m"
        "1+upper_index(n,k)" "1")
       (split -1)
       (("1" (ground))
        ("2"
         (skeep)
         (inst -3 "n" "k" "i")
         (split -3)
         (("1" (ground)) ("2" (ground))))))
      ("2" (ground)) ("3" (propax))))
    ("2"
     (expand "upper_index")
     (lift-if 1)
     (split 1)
     (("1" (flatten) (ground))
      ("2"
       (flatten)
       (hide (-3 3))
       (inst -1 "n" "k")
       (flip-ineq -3)
       (flip-ineq 3)
       (case "log_nat(k,n)`1>=m+1")
       (("1"
         (lemma "both_sides_expt_gt1_le")
         (inst -1 "n" "m+1" "log_nat(k,n)`1")
         (flatten)
         (hide -1)
         (split -1)
         (("1" (ground)) ("2" (ground))))
        ("2" (ground))))))))


proof_type: f_proof
decl_type: formula
library: reals
theory: base_repr
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (expand "base_n_to_nat")
   (lemma "sigma_le")
   (name "kz" "n-1")
   (inst - "LAMBDA (s: nat): n ^ s * F(s)" "LAMBDA (s:nat): (n-1)*n^s"
    "m" "0")
   (replace -1)
   (assert)
   (split)
   (("1"
     (rewrite "sigma_scal")
     (lemma "sigma_geometric")
     (inst - "m" "0" "n")
     (assert)
     (rewrite "expt_x0")
     (replaces -1)
     (assert)
     (invoke (case "%1 = n^(1+m)-1") (! -1 2))
     (("1" (assert)) ("2" (assert) (cross-mult 1))))
    ("2"
     (skosimp*)
     (inst - "n!1")
     (case "NOT F(n!1)<=kz")
     (("1" (assert)) ("2" (mult-by -1 "n^n!1") (assert))))))


proof_type: f_proof
decl_type: formula
library: reals
theory: base_repr
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (lemma "upper_is_bound")
   (inst?)
   (assert)
   (lemma "base_n_is_n")
   (inst?)
   (lemma "sigma_split")
   (inst?)
   (inst - "m")
   (assert)
   (replaces -1)
   (expand "sigma" - 1)
   (case "base_n(n,k)(m)>=1")
   (("1"
     (mult-by -1 "n^(m)")
     (lemma "sigma_ge_0")
     (inst-cp - _ "upper_index(n,k)" "1+m")
     (inst-cp - _ "m-1" "0")
     (hide -1)
     (inst?)
     (inst?)
     (ground))
    ("2" (assert))))


proof_type: f_proof
decl_type: formula
library: reals
theory: base_repr
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (skoletin 1)
   (skeep)
   (case "NOT upper_index(n,k)<=d")
   (("1"
     (expand "upper_index")
     (assert)
     (lift-if)
     (ground)
     (lemma "log_nat_bounds")
     (inst?)
     (assert)
     (flatten)
     (case "k < n^(d+1)")
     (("1"
       (lemma "both_sides_expt_gt1_lt_aux")
       (inst - "n" "log_nat(k,n)`1-1" "d")
       (assert)
       (expand "^")
       (assert))
      ("2"
       (lemma "sigma_le")
       (inst - "LAMBDA (s: nat): n ^ s * numseq(s)"
        "LAMBDA (s: nat): n ^ s * (n-1)" "d" "0")
       (split -)
       (("1"
         (invoke (case "%1 < n^(d+1)") (! -1 2))
         (("1" (assert))
          ("2"
           (hide -1)
           (lemma "sigma_scal")
           (inst - "LAMBDA (s:nat): n^s" "n-1" "d" "0")
           (replace -1)
           (lemma "sigma_geometric")
           (inst?)
           (split -1)
           (("1"
             (replace -1)
             (rewrite "expt_x0")
             (hide-all-but 1)
             (grind-reals))
            ("2" (assert)) ("3" (assert))))))
        ("2"
         (hide-all-but 1)
         (skosimp*)
         (case "numseq(n!1)<=n-1")
         (("1" (mult-by -1 "n^n!1") (assert)) ("2" (assert))))))))
    ("2"
     (lemma "base_n_is_n")
     (inst?)
     (case "NOT k =
                  sigma(0, d, LAMBDA (s: nat): n ^ s * base_n(n, k)(s))")
     (("1"
       (lemma "sigma_split")
       (inst?)
       (inst - "upper_index(n,k)")
       (assert)
       (replaces -1)
       (invoke (case "%1 = 0") (! 1 2 2))
       (("1" (assert))
        ("2"
         (hide 2)
         (rewrite "sigma_restrict_eq_0")
         (skosimp*)
         (lemma "upper_is_bound")
         (inst - "n" "k" "i!1")
         (assert))))
      ("2"
       (hide -2)
       (name "F" "LAMBDA (z:nat): numseq(z)-base_n(n,k)(z)")
       (case "F = (LAMBDA (i:nat): 0)")
       (("1"
         (decompose-equality -1)
         (inst - "j")
         (expand "F" -1)
         (assert))
        ("2"
         (case "NOT sigma(0,d,LAMBDA (s:nat): n^s*F(s))=0")
         (("1" (expand "F" 1) (rewrite "sigma_minus" :dir rl) (assert))
          ("2"
           (case "NOT FORALL (s:nat): abs(F(s))<n")
           (("1"
             (skeep)
             (expand "F" 1)
             (case "abs(numseq(s))<n AND abs(base_n(n,k)(s))<n")
             (("1"
               (flatten)
               (hide-all-but (-1 -2 1))
               (grind :exclude "base_n"))
              ("2"
               (expand "abs" 1)
               (assert)
               (lemma "base_n_lt_n")
               (inst?))))
            ("2"
             (case "EXISTS (dd:nat): dd<=d  AND F(dd)/=0 AND (FORALL (s:nat): s>dd AND s<=d IMPLIES F(s)=0)")
             (("1"
               (skeep -1)
               (case "sigma(0, d, LAMBDA (s: nat): n ^ s * F(s)) = sigma(0, dd, LAMBDA (s: nat): n ^ s * F(s))")
               (("1"
                 (assert)
                 (replace -1)
                 (expand "sigma" -5)
                 (case "abs(n^dd*F(dd)) >= n^dd AND abs(sigma(0, dd - 1, LAMBDA (s: nat): n ^ s * F(s)))<n^dd")
                 (("1" (flatten) (expand "abs") (lift-if) (ground))
                  ("2"
                   (split 1)
                   (("1"
                     (rewrite "abs_mult")
                     (expand "abs" + 1)
                     (case "NOT abs(F(dd))>=1")
                     (("1" (expand "abs" 1) (lift-if) (ground))
                      ("2" (mult-by -1 "n^dd") (assert))))
                    ("2"
                     (lemma "sigma_triangle")
                     (inst?)
                     (invoke (case "%1<n^dd") (! -1 2))
                     (("1" (assert))
                      ("2"
                       (lemma "sigma_le")
                       (inst - "LAMBDA (n_1: nat): abs(n ^ n_1 * F(n_1))"
                        "LAMBDA (n_1: nat): n ^ n_1 * (n-1)" "dd-1" "0")
                       (split -1)
                       (("1"
                         (invoke (case "%1<n^dd") (! -1 2))
                         (("1" (assert))
                          ("2"
                           (case "NOT dd-1>=0")
                           (("1"
                             (assert)
                             (expand "abs" +)
                             (assert)
                             (expand "^" +)
                             (lemma "posnat_expt")
                             (inst?)
                             (assert))
                            ("2"
                             (lemma "sigma_scal")
                             (inst - "LAMBDA (s:nat): n^s" "n-1" "dd-1"
                              "0")
                             (replaces -1)
                             (lemma "sigma_geometric")
                             (inst?)
                             (split -1)
                             (("1"
                               (replaces -1)
                               (rewrite "expt_x0")
                               (grind-reals))
                              ("2" (assert)) ("3" (assert))))))))
                        ("2"
                         (skosimp*)
                         (rewrite "abs_mult")
                         (expand "abs" + 1)
                         (inst -5 "n!1")
                         (case "abs(F(n!1))<=n-1")
                         (("1" (mult-by -1 "n^n!1") (assert))
                          ("2"
                           (assert)
                           (expand "abs")
                           (lift-if)
                           (ground))))))))))))
                ("2"
                 (lemma "sigma_split")
                 (inst?)
                 (inst - "dd")
                 (assert)
                 (replaces -1)
                 (assert)
                 (rewrite "sigma_restrict_eq_0" 1)
                 (skosimp*)
                 (inst - "i!1")
                 (assert))))
              ("2"
               (case "FORALL (kz:nat): (EXISTS (j:nat): j<=kz AND F(j)/=0) IMPLIES EXISTS (dd: nat): dd <= kz AND
                              F(dd) /= 0 AND
                               (FORALL (s: nat): s > dd AND s <= kz IMPLIES F(s) = 0)")
               (("1"
                 (inst - "d")
                 (replace 1)
                 (inst + "j")
                 (assert)
                 (expand "F" 1)
                 (assert))
                ("2"
                 (hide-all-but 1)
                 (induct "kz")
                 (("1" (grind))
                  ("2"
                   (skolem 1 "kz")
                   (flatten)
                   (assert)
                   (case "(EXISTS (j: nat): j <= kz AND F(j) /= 0)")
                   (("1"
                     (assert)
                     (replace -1)
                     (case "F(1+kz)=0")
                     (("1"
                       (skeep -3)
                       (inst + "dd")
                       (assert)
                       (skeep)
                       (inst -4 "s")
                       (ground))
                      ("2"
                       (inst + "1+kz")
                       (assert)
                       (skosimp*)
                       (assert))))
                    ("2"
                     (skeep -2)
                     (inst + "j!1")
                     (assert)
                     (inst + "1+kz")
                     (assert)
                     (skosimp*)
                     (assert))))))))))))))))))))


proof_type: f_proof
decl_type: formula
library: reals
theory: base_repr
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (skeep)
   (typepred "i")
   (lemma "base_n_unique")
   (name "numseq" "LAMBDA (i:nat): IF i<=m THEN F(i) ELSE 0 ENDIF")
   (inst - "m" "n" "numseq")
   (("1"
     (assert)
     (inst - "i")
     (assert)
     (expand "numseq" -2)
     (expand "base_n_to_nat" +)
     (case "sigma(0, m, LAMBDA (s: nat): n ^ s * F(s)) = sigma(0, m,
                               LAMBDA (s: nat):
                                 n ^ s * IF s <= m THEN F(s) ELSE 0 ENDIF)")
     (("1" (assert)) ("2" (rewrite "sigma_eq"))))
    ("2"
     (skosimp*)
     (expand "numseq")
     (lift-if)
     (ground)
     (inst - "x1!1"))))


proof_type: f_proof
decl_type: formula
library: reals
theory: base_repr
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (expand "base_n_to_nat")
   (rewrite "sigma_eq")
   (skosimp*)
   (inst - "n!1")
   (assert))


proof_type: f_proof
decl_type: formula
library: reals
theory: base_repr
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (expand "base_n_to_nat" - 2)
   (lemma "base_n_unique")
   (expand "base_n_to_nat")
   (inst - "m" "n" "LAMBDA (i:nat): IF i<=m THEN G(i) ELSE 0 ENDIF")
   (("1"
     (lemma "base_n_unique")
     (inst - "m" "n" "LAMBDA (i:nat): IF i<=m THEN F(i) ELSE 0 ENDIF")
     (("1"
       (assert)
       (skeep)
       (inst - "i")
       (inst - "i")
       (assert)
       (case "sigma(0, m,
                                 LAMBDA (s: nat):
                                   n ^ s * IF s <= m THEN F(s) ELSE 0 ENDIF) = sigma(0, m, LAMBDA (s: nat): n ^ s * F(s))")
       (("1"
         (case "sigma(0, m,
                                   LAMBDA (s: nat):
                                     n ^ s * IF s <= m THEN G(s) ELSE 0 ENDIF) = sigma(0, m, LAMBDA (s: nat): n ^ s * G(s))")
         (("1" (assert)) ("2" (rewrite "sigma_eq"))))
        ("2" (rewrite "sigma_eq"))))
      ("2" (skeep) (inst - "i") (assert))))
    ("2" (skeep) (inst - "i") (assert))))


proof_type: f_proof
decl_type: formula
library: reals
theory: base_repr
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (case "integer_pred((k-mod(k,n))/n) AND (k-mod(k,n))/n>=0")
   (("1"
     (lemma "more_list_props[below(n)].list_extensionality")
     (inst?)
     (flatten -1)
     (hide -1)
     (split -1)
     (("1" (propax)) ("2" (grind))
      ("3"
       (skeep)
       (hide 2)
       (expand "base_list")
       (typepred
        "array2list[below(n)](j)(base_n(n, (k - mod(k, n)) / n))")
       (("1"
         (inst -3 "n_1")
         (("1"
           (replace -3 :dir rl)
           (hide (-1 -2 -3))
           (case-replace
            "nth(cdr(array2list[below(n)](1 + j)(base_n(n, k))), n_1) = nth( array2list[below(n)](1 + j)(base_n(n, k)), n_1+1)")
           (("1"
             (typepred "array2list[below(n)](1 + j)(base_n(n, k))")
             (inst -3 "n_1+1")
             (("1"
               (replace -3 :dir rl)
               (name-replace "bnk_mod"
                "base_n(n, (k - mod(k, n)) / n)(n_1)")
               (hide (-1 -2 -3 -4))
               (expand "base_n")
               (lift-if 1)
               (split 1)
               (("1"
                 (flatten)
                 (case-replace "mod(k,n)=k")
                 (("1"
                   (expand "bnk_mod")
                   (replace -1)
                   (expand "base_n")
                   (lift-if 1)
                   (split)
                   (("1" (flatten) (ground)) ("2" (propax))))
                  ("2" (expand "mod") (div-by -1 "n") (ground))))
                ("2" (flatten) (ground) (expand "bnk_mod") (propax))))
              ("2" (typepred (n_1)) (grind))))
            ("2"
             (name-replace "CDL"
              "nth(cdr(array2list[below(n)](1 + j)(base_n(n, k))), n_1)")
             (expand "nth")
             (expand "CDL")
             (propax))
            ("3" (typepred (n_1)) (ground) (grind))))
          ("2" (ground) (typepred (n_1)) (ground) (grind))))
        ("2" (ground))))))
    ("2"
     (hide 2)
     (split 1)
     (("1" (expand "mod") (ground))
      ("2"
       (cross-mult)
       (expand "mod")
       (cancel-by 1 "n")
       (typepred (k))
       (div-by -1 "n")
       (ground))))))


proof_type: f_proof
decl_type: formula
library: reals
theory: base_repr
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (induct "digits")
   (("1" (ground)) ("2" (ground))
    ("3"
     (skeep)
     (skeep)
     (expand "base_list_faster" 1)
     (lift-if 1)
     (split 1)
     (("1"
       (flatten)
       (expand "base_list")
       (expand "base_n")
       (replace -1)
       (ground)
       (("1"
         (hide -1)
         (grind)
         (div-by -2 "n")
         (ground)
         (case "floor(k/n) = 0")
         (("1" (replace -1) (ground))
          ("2"
           (typepred (k))
           (ground)
           (grind)
           (div-by -1 "n")
           (ground))))
        ("2"
         (ground)
         (grind)
         (typepred (k))
         (div-by -1 "n")
         (div-by -3 "n")
         (grind))))
      ("2"
       (flatten)
       (split -1)
       (("1"
         (inst -1 "n" "(k-mod(k,n))/n")
         (("1"
           (rewrite "base_list_cdr" :dir rl)
           (replace -1)
           (ground)
           (case-replace "mod(k,n)= car(base_list(n,k,1+j))")
           (("1" (ground) (grind))
            ("2"
             (hide (-1 3))
             (expand "base_list")
             (expand "base_n")
             (grind)
             (div-by -1 "n")
             (typepred (k))
             (div-by -1 "n")
             (grind))))
          ("2"
           (split 1)
           (("1" (expand "mod") (grind))
            ("2"
             (cross-mult 1)
             (lemma "mod_pos")
             (inst?)
             (grind)
             (cancel-by 1 "n")
             (typepred (k))
             (grind)
             (grind)
             (grind)
             (div-by -1 "n")
             (ground))))))
        ("2" (ground))))))))


proof_type: f_proof
decl_type: formula
library: reals
theory: base_repr
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (decompose-equality 1)
   (("1"
     (case "x!1<j")
     (("1"
       (expand "base_to_array")
       (expand "base_list")
       (lemma "array2list_inv[below(n)]")
       (inst -1 "base_n(n, k)" "0" "j" "x!1"))
      ("2"
       (flip-ineq 1)
       (typepred (j))
       (expand "base_to_array")
       (rewrite "upper_is_bound")
       (ground)
       (rewrite "list2array_sound[below(n)]"))))
    ("2" (skeep) (rewrite "base_n_lt_n"))))


proof_type: t_proof
decl_type: tcc
library: reals
theory: base_repr
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (skeep)
   (split)
   (("1" (expand "mod") (ground))
    ("2" (ground) (lemma "mod_pos") (inst?) (flatten) (cross-mult))))


proof_type: t_proof
decl_type: tcc
library: reals
theory: base_repr
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (skeep)
   (lemma "mod_pos")
   (inst?)
   (flatten)
   (cross-mult)
   (both-sides "-" "k" 3)
   (simplify)
   (case-replace "k*n-k= k*(n-1)")
   (("1"
     (case "n-1>0")
     (("1"
       (case "k>0")
       (("1" (mult-ineq -1 -2) (ground)) ("2" (ground))))
      ("2" (ground))))
    ("2" (ground))))


proof_type: t_proof
decl_type: tcc
library: reals
theory: base_repr
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skolem 1 ("n" "_"))
   (induct "k" 1 NAT_induction)
   (skeep)
   (skeep)
   (expand "base_n" 1)
   (lift-if 1)
   (split 1)
   (("1" (flatten) (split 1) (("1" (propax)) ("2" (flatten) (ground))))
    ("2"
     (flatten)
     (split 2)
     (("1" (flatten) (lemma "mod_pos") (inst?) (flatten))
      ("2"
       (flatten)
       (inst -1 "(j-mod(j, n))/n")
       (("1"
         (split -1)
         (("1" (inst -1 "x1-1") (ground))
          ("2"
           (ground)
           (cross-mult)
           (both-sides "-" "j" 1)
           (simplify 1)
           (case-replace "j*n-j = (n-1)*j")
           (("1"
             (typepred (j))
             (typepred (n))
             (case "j>0")
             (("1"
               (case "n-1>0")
               (("1"
                 (mult-ineq -1 -2)
                 (lemma "mod_pos")
                 (inst?)
                 (flatten)
                 (ground))
                ("2" (ground))))
              ("2"
               (case-replace "j=0")
               (("1" (ground)) ("2" (ground))))))
            ("2" (ground))))))
        ("2"
         (split)
         (("1" (ground) (expand "mod") (ground))
          ("2" (cross-mult) (grind) (grind) (cancel-by 1 "n"))))))))))


proof_type: t_proof
decl_type: tcc
library: reals
theory: base_repr
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (split)
   (("1" (expand "mod") (grind))
    ("2"
     (cross-mult)
     (expand "mod")
     (cancel-by 1 "n")
     (ground)
     (grind)
     (typepred (k))
     (div-by -1 "n")
     (ground))))


proof_type: f_proof
decl_type: formula
library: reals
theory: harmonic_polynomials
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skolem 1 ("x" "y"))
   (expand "harmonic_poly_real")
   (expand "sigma")
   (expand "sigma")
   (rewrite "expt_x0")
   (rewrite "expt_x1")
   (rewrite "C_0")
   (case "odd?(0)")
   (("1" (expand "odd?") (propax))
    ("2" (assert) (expand "sigma") (propax))))


proof_type: f_proof
decl_type: formula
library: reals
theory: harmonic_polynomials
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skolem 1 ("x" "y"))
   (expand "harmonic_poly_imag")
   (expand "sigma")
   (expand "sigma")
   (rewrite "expt_x1")
   (rewrite "expt_x0")
   (rewrite "C_n")
   (case "even?(1)")
   (("1" (expand "even?") (propax))
    ("2" (assert) (expand "sigma") (propax))))


proof_type: f_proof
decl_type: formula
library: reals
theory: harmonic_polynomials
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skolem 1 ("n" "x" "y"))
   (expand "harmonic_poly_real")
   (expand "harmonic_poly_imag")
   (name "F1"
         "LAMBDA (i: nat):
                       IF i > 1 + n OR odd?(i) THEN 0
                       ELSE C(1 + n, i) * (-1) ^ (i / 2) *
                             (IF i = 0 THEN x ^ (1 + n)
                              ELSIF i = 1 + n THEN y ^ (1 + n)
                              ELSE (x ^ (1 - i + n)) * y ^ i
                              ENDIF)
                       ENDIF")
   (("1"
     (replace -1)
     (lemma "sigma_scal[nat]"
      ("low"
       "0"
       "high"
       "n"
       "a"
       "x"
       "F"
       " LAMBDA (i: nat):
                       IF i > n OR odd?(i) THEN 0
                       ELSE C(n, i) * (-1) ^ (i / 2) *
                             (IF i = 0 THEN x ^ n
                              ELSIF i = n THEN y ^ n
                              ELSE x ^ (n - i) * y ^ i
                              ENDIF)
                       ENDIF"))
     (("1"
       (replace -1 1 rl)
       (hide -1)
       (name "F2"
             "LAMBDA (i_1: nat):
                            x *
                             (LAMBDA (i: nat):
                                IF i > n OR odd?(i) THEN 0
                                ELSE C(n, i) * (-1) ^ (i / 2) *
                                      (IF i = 0 THEN x ^ n
                                       ELSIF i = n THEN y ^ n
                                       ELSE x ^ (n - i) * y ^ i
                                       ENDIF)
                                ENDIF)
                                 (i_1)")
       (("1"
         (replace -1)
         (name "F3"
               "LAMBDA (i: nat):
                                IF i > n OR even?(i) THEN 0
                                ELSE C(n, i) * (-1) ^ ((i - 1) / 2) *
                                      (IF i = n THEN y ^ n ELSE x ^ (n - i) * y ^ i ENDIF)
                                ENDIF")
         (("1"
           (replace -1)
           (lemma "sigma_scal[nat]"
            ("low" "0" "high" "n" "F" "F3" "a" "y"))
           (replace -1 1 rl)
           (case "sigma(0, n, F2) = sigma(0, n+1, F2)")
           (("1"
             (replace -1 1)
             (case "FORALL (n:nat): sigma(0, n, LAMBDA (i: nat): y * F3(i)) = sigma(0,n+1, LAMBDA (i:nat): IF i = 0 THEN 0 ELSE y*F3(i-1) ENDIF)")
             (("1"
               (inst - "n")
               (replace -1 1)
               (lemma "sigma_minus[nat]"
                ("low"
                 "0"
                 "high"
                 "n+1"
                 "F"
                 "F2"
                 "G"
                 "LAMBDA (i: nat): IF i = 0 THEN 0 ELSE y * F3(i - 1) ENDIF"))
               (replace -1 1)
               (hide -1 -2 -3 -4)
               (lemma "sigma_eq[nat]"
                ("low"
                 "0"
                 "high"
                 "n+1"
                 "F"
                 "F1"
                 "G"
                 "LAMBDA (i_1: nat):
                                F2(i_1) -
                                 (LAMBDA (i: nat): IF i = 0 THEN 0 ELSE y * F3(i - 1) ENDIF)
                                     (i_1)"))
               (("1"
                 (split -1)
                 (("1" (assert))
                  ("2"
                   (hide 2)
                   (skosimp*)
                   (typepred "n!1")
                   (expand "F1")
                   (hide -5 -4 -3)
                   (expand "F2")
                   (expand "F3")
                   (case "n!1=0")
                   (("1"
                     (replace -1)
                     (rewrite "C_0")
                     (rewrite "C_0")
                     (rewrite "expt_x0")
                     (case "odd?(0)")
                     (("1" (expand "odd?") (propax))
                      ("2"
                       (assert)
                       (expand "^")
                       (expand "expt" 2 1)
                       (assert))))
                    ("2"
                     (assert)
                     (case "n!1= 1+n")
                     (("1"
                       (assert)
                       (replace -1)
                       (rewrite "C_n")
                       (rewrite "C_n")
                       (case "even?(n)")
                       (("1"
                         (case "odd?(n+1)")
                         (("1" (assert))
                          ("2"
                           (hide-all-but (-1 1))
                           (expand "even?")
                           (skosimp*)
                           (replace -1)
                           (expand "odd?")
                           (inst + "j!1"))))
                        ("2"
                         (assert)
                         (case "NOT (odd?(1+n))")
                         (("1"
                           (assert)
                           (rewrite "even_or_odd")
                           (hide 1)
                           (expand "odd?")
                           (skosimp*)
                           (replace -1)
                           (lemma "div_cancel1" ("x" "j!1" "n0z" "2"))
                           (replace -1)
                           (lemma "div_cancel1" ("x" "j!1+1" "n0z" "2"))
                           (replace -1)
                           (replace -3 2 rl)
                           (replace -3 * rl)
                           (typepred "n")
                           (expand "^" 2)
                           (assert)
                           (expand "expt" 2 1)
                           (expand "expt" 2 2)
                           (assert))
                          ("2"
                           (hide-all-but (-1 1))
                           (expand "odd?")
                           (skosimp*)
                           (replace -1)
                           (expand "even?")
                           (inst + "j!1"))))))
                      ("2"
                       (assert)
                       (case "odd?(n!1)")
                       (("1"
                         (case "even?(n!1-1)")
                         (("1" (assert))
                          ("2"
                           (hide-all-but (1 -1))
                           (expand "odd?")
                           (skosimp*)
                           (replace -1)
                           (expand "even?")
                           (inst + "j!1"))))
                        ("2"
                         (case "NOT (even?(n!1-1))")
                         (("1"
                           (assert)
                           (rewrite "even_or_odd")
                           (hide 1)
                           (expand "odd?")
                           (skosimp*)
                           (lemma "div_cancel1" ("x" "1+j!1" "n0z" "2"))
                           (lemma "div_cancel1" ("x" "j!1" "n0z" "2"))
                           (case "(n!1 - 2) / 2 = j!1")
                           (("1"
                             (replace -1)
                             (case "(n!1) / 2 = j!1+1")
                             (("1"
                               (replace -1)
                               (case "n!1=n")
                               (("1"
                                 (replace -1)
                                 (rewrite "C_n")
                                 (rewrite "C_n_1")
                                 (rewrite "C_n_1")
                                 (lemma
                                  "expt_plus"
                                  ("n0x" "-1" "i" "1" "j" "j!1"))
                                 (rewrite "expt_x1" -1)
                                 (replace -1)
                                 (name-replace "K1" "(-1)^j!1")
                                 (rewrite "expt_x1" 3)
                                 (expand "^" 3)
                                 (expand "expt" 3 1)
                                 (grind))
                                ("2"
                                 (assert)
                                 (lemma "C_n_plus_1" ("n" "n" "k" "n!1"))
                                 (replace -1 4)
                                 (lemma
                                  "expt_plus"
                                  ("n0x" "-1" "i" "1" "j" "j!1"))
                                 (rewrite "expt_x1" -1)
                                 (replace -1 4)
                                 (name-replace "K10" "(-1)^j!1")
                                 (name-replace "K11" "C(n,n!1-1)")
                                 (name-replace "K12" "C(n,n!1)")
                                 (expand "^" 4)
                                 (expand "expt" 4 7)
                                 (expand "expt" 4 6)
                                 (expand "expt" 4 4)
                                 (expand "expt" 4 3)
                                 (expand "expt" 4 2)
                                 (expand "expt" 4 1)
                                 (assert))))
                              ("2" (hide-all-but (-4 1 -3)) (grind))))
                            ("2" (hide-all-but (1 -1 -3)) (grind))))
                          ("2"
                           (hide-all-but (-1 1))
                           (expand "even?")
                           (skosimp*)
                           (expand "odd?")
                           (inst + "j!1")
                           (assert))))))))))))
                ("2" (hide-all-but 1) (grind))))
              ("2"
               (hide-all-but 1)
               (induct "n")
               (("1"
                 (expand "sigma")
                 (expand "sigma")
                 (expand "sigma")
                 (propax))
                ("2"
                 (skolem 1 ("i"))
                 (flatten)
                 (expand "sigma" 1)
                 (assert))
                ("3" (hide 2) (grind))))
              ("3" (hide-all-but 1) (grind))))
            ("2"
             (hide-all-but (1 -3))
             (expand "sigma" 1 2)
             (expand "F2" 1)
             (propax))))
          ("2" (hide-all-but 1) (grind))
          ("3"
           (hide-all-but 1)
           (skosimp*)
           (rewrite "even_or_odd")
           (expand "odd?")
           (skosimp*)
           (lemma "div_cancel1" ("x" "j!1" "n0z" "2"))
           (replace -2 2)
           (replace -1 2)
           (assert))
          ("4" (hide-all-but 1) (grind))))
        ("2" (hide-all-but 1) (grind))
        ("3"
         (hide-all-but 1)
         (skosimp*)
         (case "even?(i!1)")
         (("1"
           (expand "even?")
           (skosimp*)
           (lemma "div_cancel1" ("x" "j!1" "n0z" "2"))
           (replace -2)
           (replace -1)
           (assert))
          ("2" (rewrite "even_or_odd") (assert))))
        ("4" (hide-all-but 1) (grind))))
      ("2" (hide-all-but 1) (grind))
      ("3"
       (hide-all-but 1)
       (skosimp*)
       (case "even?(i!1)")
       (("1"
         (expand "even?")
         (skosimp*)
         (replace -1)
         (lemma "div_cancel1" ("x" "j!1" "n0z" "2"))
         (replace -1)
         (assert))
        ("2" (rewrite "even_or_odd"))))
      ("4" (hide-all-but 1) (grind))))
    ("2" (hide 2) (grind))
    ("3"
     (hide 2)
     (skosimp*)
     (case "even?(i!1)")
     (("1"
       (expand "even?")
       (skosimp*)
       (lemma "div_cancel1" ("x" "j!1" "n0z" "2"))
       (replace -2)
       (replace -1)
       (assert))
      ("2" (rewrite "even_or_odd"))))
    ("4" (hide 2) (grind))))


proof_type: f_proof
decl_type: formula
library: reals
theory: harmonic_polynomials
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skolem 1 ("n" "x" "y"))
   (expand "harmonic_poly_imag")
   (expand "harmonic_poly_real")
   (name-replace "F1"
    "LAMBDA (i: nat):
                     IF i > n OR odd?(i) THEN 0
                     ELSE C(n, i) * (-1) ^ (i / 2) *
                           (IF i = 0 THEN x ^ n
                            ELSIF i = n THEN y ^ n
                            ELSE x ^ (n - i) * y ^ i
                            ENDIF)
                     ENDIF")
   (("1"
     (name-replace "F2"
      "LAMBDA (i: nat):
                      IF i > n OR even?(i) THEN 0
                      ELSE C(n, i) * (-1) ^ ((i - 1) / 2) *
                            (IF i = n THEN y ^ n ELSE x ^ (n - i) * y ^ i ENDIF)
                      ENDIF")
     (("1"
       (name-replace "F3"
        "LAMBDA (i: nat):
                      IF i > 1 + n OR even?(i) THEN 0
                      ELSE C(1 + n, i) * (-1) ^ ((i - 1) / 2) *
                            (IF i = 1 + n THEN y ^ (1 + n)
                             ELSE (x ^ (1 - i + n)) * y ^ i
                             ENDIF)
                      ENDIF")
       (("1"
         (lemma "sigma_scal" ("low" "0" "high" "n" "a" "x" "F" "F2"))
         (replace -1 1 rl)
         (lemma "sigma_scal" ("low" "0" "high" "n" "a" "y" "F" "F1"))
         (replace -1 1 rl)
         (hide -1 -2)
         (case "FORALL (n:nat): sigma(0, n, LAMBDA (i: nat): y * F1(i)) = sigma(0,n+1, LAMBDA (i:nat): IF i=0 THEN 0 ELSE y*F1(i-1) ENDIF)")
         (("1"
           (inst - "n")
           (replace -1)
           (case "sigma(0, n, LAMBDA (i: nat): x * F2(i)) = sigma(0, n+1
                  , LAMBDA (i: nat): x * F2(i))")
           (("1"
             (replace -1 1)
             (lemma "sigma_sum"
              ("low"
               "0"
               "high"
               "1+n"
               "F"
               "LAMBDA (i: nat): x * F2(i)"
               "G"
               "LAMBDA (i: nat): IF i = 0 THEN 0 ELSE y * F1(i - 1) ENDIF"))
             (replace -1 1)
             (hide -1 -2 -3)
             (lemma "sigma_eq[nat]"
              ("low"
               "0"
               "high"
               "1+n"
               "F"
               "F3"
               "G"
               "LAMBDA (i_1: nat):
                              (LAMBDA (i: nat): x * F2(i))(i_1) +
                               (LAMBDA (i: nat): IF i = 0 THEN 0 ELSE y * F1(i - 1) ENDIF)
                                   (i_1)"))
             (("1"
               (split -1)
               (("1" (propax))
                ("2"
                 (hide 2)
                 (skolem 1 ("i"))
                 (typepred "i")
                 (expand "F3")
                 (expand "F2")
                 (expand "F1")
                 (case "even?(i)")
                 (("1"
                   (case "odd?(i-1)")
                   (("1" (assert))
                    ("2"
                     (hide-all-but (-1 1))
                     (expand "even?")
                     (skosimp*)
                     (replace -1)
                     (expand "odd?")
                     (inst + "j!1-1")
                     (assert))))
                  ("2"
                   (case "NOT (odd?(i-1))")
                   (("1"
                     (assert)
                     (hide 1)
                     (case "i= 1+n")
                     (("1"
                       (replace -1)
                       (assert)
                       (rewrite "C_n")
                       (rewrite "C_n")
                       (expand "^" 2 2)
                       (expand "^" 2 3)
                       (expand "expt" 2 1)
                       (assert))
                      ("2"
                       (assert)
                       (case "i=0")
                       (("1"
                         (replace -1)
                         (expand "even?")
                         (inst + "0")
                         (assert))
                        ("2"
                         (case "i=1")
                         (("1"
                           (replace -1)
                           (assert)
                           (rewrite "expt_x0")
                           (rewrite "expt_x1")
                           (rewrite "C_0")
                           (rewrite "C_1")
                           (rewrite "C_1")
                           (case "n=1")
                           (("1"
                             (replace -1)
                             (rewrite "expt_x1")
                             (rewrite "expt_x1")
                             (assert))
                            ("2"
                             (assert)
                             (expand "^" 5)
                             (expand "expt" 5 1)
                             (assert))))
                          ("2"
                           (assert)
                           (lemma "C_n_plus_1" ("n" "n" "k" "i"))
                           (replace -1 5)
                           (expand "^" 5 2)
                           (expand "^" 5 2)
                           (expand "^" 5 3)
                           (expand "^" 5 4)
                           (expand "^" 5 5)
                           (expand "^" 5 6)
                           (expand "expt" 5)
                           (expand "^" 5 6)
                           (expand "^" 5 4)
                           (case "i=n")
                           (("1"
                             (replace -1)
                             (assert)
                             (expand "expt" 5 6)
                             (expand "expt" 5 3)
                             (expand "expt" 5 2)
                             (assert))
                            ("2" (assert))))))))))
                    ("2"
                     (hide-all-but (-1 1))
                     (expand "odd?")
                     (skosimp*)
                     (expand "even?")
                     (inst + "1+j!1")
                     (assert))))))))
              ("2"
               (hide 2)
               (grind)
               (("1" (expand "F2") (propax))
                ("2" (expand "F2") (expand "F1") (propax))))
              ("3" (skosimp*) (assert))))
            ("2" (hide -1 2) (expand "sigma" 1 2) (expand "F2") (propax))
            ("3" (skosimp*) (expand "F2") (propax))))
          ("2"
           (hide 2)
           (induct "n")
           (("1" (grind))
            ("2" (skolem 1 ("j")) (flatten) (expand "sigma" 1) (assert))
            ("3" (hide 2) (grind) (expand "F1") (propax))
            ("4" (hide 2) (grind))
            ("5" (skosimp*) (expand "F1") (propax))))
          ("3" (hide 2) (grind) (expand "F1") (propax))
          ("4" (hide 2) (grind))
          ("5" (skosimp*) (expand "F1") (propax))))
        ("2" (hide 2) (grind))
        ("3"
         (hide 2)
         (skosimp*)
         (rewrite "even_or_odd")
         (expand "odd?")
         (skosimp*)
         (replace -1 2)
         (lemma "div_cancel1" ("x" "j!1" "n0z" "2"))
         (replace -1)
         (assert))
        ("4" (hide 2) (grind))))
      ("2" (hide 2) (grind))
      ("3"
       (hide 2)
       (skosimp*)
       (rewrite "even_or_odd")
       (expand "odd?")
       (skosimp*)
       (replace -1)
       (lemma "div_cancel1" ("x" "j!1" "n0z" "2"))
       (replace -1)
       (assert))
      ("4" (hide 2) (grind))))
    ("2" (hide 2) (grind))
    ("3"
     (hide 2)
     (skosimp*)
     (case "even?(i!1)")
     (("1"
       (expand "even?")
       (skosimp*)
       (replace -1)
       (lemma "div_cancel1" ("x" "j!1" "n0z" "2"))
       (replace -1)
       (assert))
      ("2" (rewrite "even_or_odd"))))
    ("4" (hide 2) (grind))))


proof_type: f_proof
decl_type: formula
library: reals
theory: harmonic_polynomials
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skolem 1 ("_" "x" "y"))
   (induct "pn")
   (("1" (assert)) ("2" (assert))
    ("3"
     (skolem 1 ("i"))
     (flatten)
     (case "i=0")
     (("1"
       (replace -1)
       (hide -1 -2 -3)
       (rewrite "harmonic_polynomial_real_n1")
       (rewrite "harmonic_polynomial_imag_n1")
       (rewrite "expt_x1"))
      ("2"
       (assert)
       (hide -2 1)
       (rewrite "harmonic_polynomial_real_rec" 1)
       (rewrite "harmonic_polynomial_imag_rec" 1)
       (name-replace "U" "harmonic_poly_real(i, x, y)")
       (name-replace "V" "harmonic_poly_imag(i, x, y)")
       (expand "sq")
       (case "x=0")
       (("1"
         (replace -1)
         (case "y=0")
         (("1" (replace -1) (expand "^" 1) (expand "expt") (assert))
          ("2"
           (lemma "sq_nz_pos" ("nz" "y"))
           (("1"
             (expand "sq")
             (lemma "expt_plus" ("n0x" "y*y" "i" "1" "j" "i"))
             (("1" (rewrite "expt_x1" -1) (replace -1 2) (assert))
              ("2" (assert))))
            ("2" (assert))))))
        ("2"
         (lemma "sq_pos" ("a" "y"))
         (lemma "sq_nz_pos" ("nz" "x"))
         (("1"
           (expand "sq")
           (lemma "expt_plus" ("n0x" "x*x+y*y" "i" "1" "j" "i"))
           (("1"
             (rewrite "expt_x1" -1)
             (replace -1 2)
             (replace -4 2 rl)
             (assert))
            ("2" (assert))))
          ("2" (assert))))))))))


proof_type: t_proof
decl_type: tcc
library: reals
theory: harmonic_polynomials
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp*)
   (lemma "even_div2")
   (inst?)
   (assert)
   (lemma "even_iff_not_odd")
   (inst?)
   (assert))


proof_type: t_proof
decl_type: tcc
library: reals
theory: harmonic_polynomials
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp*)
   (lemma "even_div2")
   (inst?)
   (assert)
   (lemma "odd_iff_not_even")
   (inst?)
   (assert))


proof_type: f_proof
decl_type: formula
library: reals
theory: factorial_props
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (case "FORALL (n: nat): n^n <= factorial(2 * n)")
   (("1"
     (skosimp)
     (inst - "n!1")
     (rewrite "expt_times")
     (expand "^" 1 1)
     (expand "expt" 1)
     (expand "expt" 1)
     (expand "expt" 1)
     (rewrite "sq_rew"))
    ("2"
     (hide 2)
     (case "FORALL (n, N: nat): n <= N => N ^ n <= factorial(n + N)")
     (("1" (skosimp) (inst - "n!1" "n!1") (assert))
      ("2"
       (hide 2)
       (skolem 1 ("_" "N"))
       (induct "n")
       (("1" (assert) (expand "^") (expand "expt") (assert))
        ("2"
         (skosimp*)
         (assert)
         (rewrite "expt_plus")
         (rewrite "expt_x1")
         (expand "factorial" 1)
         (lemma "le_times_le_pos")
         (inst - "N^j!1" "N" "N+j!1+1" "factorial(N+j!1)")
         (assert))))))))


proof_type: f_proof
decl_type: formula
library: reals
theory: factorial_props
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (lemma "factorial_2n_lb" ("n" "n!1"))
   (case-replace "n!1=0")
   (("1"
     (expand "factorial")
     (expand "factorial")
     (rewrite "sqrt_0")
     (expand "^")
     (expand "expt")
     (assert))
    ("2"
     (rewrite "expt_plus" 2)
     (expand "factorial" 2)
     (assert)
     (rewrite "expt_x1")
     (lemma "le_times_le_pos"
      ("nnx"
       "sqrt(n!1) ^ (2 * n!1)"
       "y"
       "factorial(2 * n!1)"
       "nnz"
       "sqrt(n!1)"
       "w"
       "1+2*n!1"))
     (assert)
     (hide-all-but (1 2))
     (lemma "sq_le" ("nna" "sqrt(n!1)" "nnb" "1 + 2 * n!1"))
     (rewrite "sq_sqrt")
     (replace -1 1 rl)
     (hide -1)
     (expand "sq")
     (assert))))


proof_type: f_proof
decl_type: formula
library: reals
theory: exponent_props
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (induct "n")
   (("1" (skosimp*) (expand "expt") (assert))
    ("2" (skosimp*) (expand "expt" -2) (inst?) (assert))))


proof_type: f_proof
decl_type: formula
library: reals
theory: exponent_props
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (induct "n" 1)
   (("1" (grind))
    ("2"
     (skosimp*)
     (expand "expt" 1)
     (lemma "div_times")
     (inst -1 "abs(z!1) " "expt(abs(z!1), j!1)" "1" "1")
     (assert)
     (replace -1 * rl)
     (hide -1)
     (inst -1 "z!1")
     (replace -1 * rl)
     (hide -1)
     (name-replace "EXPT" "expt(z!1, j!1)")
     (case-replace "1 / (z!1 * EXPT) = 1 / z!1 * 1/EXPT")
     (("1"
       (hide -1)
       (lemma "abs_mult")
       (inst -1 "1/z!1" "1/EXPT")
       (replace -1)
       (hide -1)
       (case-replace "abs(1 / z!1) = 1/abs(z!1)")
       (hide 2)
       (lemma "pos_div_lt")
       (inst?)
       (grind))
      ("2" (hide 2) (assert))))))


proof_type: f_proof
decl_type: formula
library: reals
theory: exponent_props
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (induct "pn")
   (("1" (grind)) ("2" (assert))
    ("3" (skosimp*) (expand "^") (expand "expt" 1) (assert))))


proof_type: f_proof
decl_type: formula
library: reals
theory: exponent_props
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp*)
   (expand "^")
   (ground)
   (lift-if)
   (ground)
   (("1" (rewrite "expt_of_mult"))
    ("2" (rewrite "expt_of_mult") (assert))))


proof_type: f_proof
decl_type: formula
library: reals
theory: exponent_props
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp*)
   (expand "^")
   (lift-if)
   (ground)
   (("1" (rewrite "expt_of_div")) ("2" (rewrite "expt_of_div") (assert))))


proof_type: f_proof
decl_type: formula
library: reals
theory: exponent_props
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp*)
   (expand "^")
   (lift-if)
   (ground)
   (("1" (rewrite "expt_of_inv")) ("2" (rewrite "expt_of_inv"))))


proof_type: f_proof
decl_type: formula
library: reals
theory: exponent_props
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp*)
   (expand "^")
   (lift-if)
   (ground)
   (("1" (rewrite "abs_expt")) ("2" (rewrite "abs_expt_inv"))))


proof_type: f_proof
decl_type: formula
library: reals
theory: circles_and_lines
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (lemma "quad_min_eq_intv")
   (inst - "sq(vx) + sq(vy)" "2*sx*vx + 2*sy*vy" "D+ sq(sx) + sq(sy)" "t"
    "t1" "t2")
   (("1"
     (split -1)
     (("1" (expand "quadratic") (expand "sq") (assert))
      ("2" (hide 3) (hide -) (expand "sq") (assert))
      ("3"
       (hide 3)
       (replace -2 -3 rl)
       (hide -2)
       (expand "quadratic")
       (expand "sq")
       (assert))
      ("4" (propax)) ("5" (propax))))
    ("2" (expand "sq" 1) (assert))))


proof_type: f_proof
decl_type: formula
library: reals
theory: circles_and_lines
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (lemma "quad_min_eq_is_in")
   (inst - "sq(vx) + sq(vy)" "2*sx*vx + 2*sy*vy" "D+ sq(sx) + sq(sy)" "t"
    "t1" "t2")
   (("1"
     (split -1)
     (("1" (propax)) ("2" (hide -) (expand "sq") (assert))
      ("3" (expand "quadratic") (expand "sq") (assert))
      ("4" (expand "quadratic") (expand "sq") (assert)) ("5" (propax))))
    ("2" (expand "sq" 1) (assert))))


proof_type: f_proof
decl_type: formula
library: reals
theory: circles_and_lines
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (name-replace "aa" "vx*vx + vy*vy")
   (name-replace "bb" "2*(sx*vx + sy*vy)")
   (name-replace "cc" "sx*sx+sy*sy-D")
   (case "4*discrm=discr(aa,bb,cc)")
   (("1"
     (lemma "a_gt_0_discr_gt_0")
     (inst?)
     (inst -1 "t")
     (assert)
     (split)
     (("1" (hide-all-but (1 2)) (expand "aa") (grind-reals))
      ("2" (hide-all-but (1 3)) (expand* "aa" "bb" "cc") (grind))))
    ("2" (hide-all-but (-1 1)) (expand* "aa" "bb" "cc") (grind))
    ("3" (assert))))


proof_type: f_proof
decl_type: formula
library: reals
theory: root
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (case "x = 0 OR y = 0")
   (("1"
     (ground)
     (("1" (replaces -1) (grind)) ("2" (replaces -1) (grind))))
    ("2"
     (flatten)
     (case "x * y = 0")
     (("1"
       (lemma "nzreal_times_nzreal_is_nzreal")
       (inst?)
       (("1" (assert)) ("2" (assert)) ("3" (assert))))
      ("2"
       (lemma "mult_expt")
       (inst?)
       (("1" (assert)) ("2" (assert))))))))


proof_type: f_proof
decl_type: formula
library: reals
theory: root
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (skeep)
   (name "ef" "min(epsil/8,min(1/8,epsil/(8*(abs(g(x))+8))))")
   (name "eg" "min(epsil/8,min(1/8,epsil/(8*abs(f(x))+8)))")
   (inst - "ef" "x")
   (inst - "eg" "x")
   (skolem - "df")
   (skolem - "dg")
   (inst + "min(df,dg)")
   (skeep)
   (assert)
   (inst - "y")
   (inst - "y")
   (assert)
   (expand "*")
   (lemma "triangle")
   (inst - "g(x)*(f(x)-f(y))" "f(y)*(g(x)-g(y))")
   (invoke (case "%1 < epsil/2") (! -1 2 1))
   (("1"
     (invoke (case "%1 < epsil/2") (! -2 2 2))
     (("1" (assert))
      ("2"
       (hide (-1 -2 2))
       (rewrite "abs_mult")
       (case "abs(f(y)) < abs(f(x)) + 1")
       (("1"
         (mult-by -1 "abs((g(x) - g(y)))")
         (case "abs(g(x)-g(y)) <= (epsil/2)/(abs(f(x))+1)")
         (("1" (cross-mult -1) (assert))
          ("2"
           (hide (-1 -3 2))
           (case "epsil / (8 + 8 * abs(f(x)))<=(epsil / 2) / (abs(f(x)) + 1)")
           (("1" (assert))
            ("2"
             (invoke (case "%1 > 0") (! 1 2))
             (("1"
               (case "FORALL (egv:posreal): egv>egv/4")
               (("1"
                 (invoke (inst - "%1") (! -2 1))
                 (assert)
                 (invoke (case "%1 = %2") (! -1 2) (! 1 1))
                 (("1" (assert))
                  ("2" (assert) (hide-all-but 1) (field))))
                ("2" (skeep) (assert))))
              ("2" (cross-mult 1))))))))
        ("2" (hide (-1 -4 -5 2)) (grind))))))
    ("2"
     (hide (-1 2))
     (rewrite "abs_mult")
     (case "abs(f(x)-f(y))<epsil/(2*(abs(g(x))+1))")
     (("1" (cross-mult -1) (assert))
      ("2"
       (hide (-1 2))
       (invoke (case "ef < %1") (! 1 2))
       (("1" (assert))
        ("2"
         (hide-all-but 1)
         (expand "ef")
         (case "epsil / (64 + 8 * abs(g(x))) < epsil/(2+2*abs(g(x)))")
         (("1" (assert)) ("2" (hide 2) (cross-mult 1))))))))))


proof_type: f_proof
decl_type: formula
library: reals
theory: root
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (induct "m")
   (("1" (skeep) (grind))
    ("2"
     (skeep)
     (skeep)
     (inst - "nnr" "nnx")
     (assert)
     (mult-ineq -1 -2)
     (expand "^")
     (expand "expt" +)
     (assert))))


proof_type: f_proof
decl_type: formula
library: reals
theory: root
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (case "FORALL (epsil: posreal, nn: nat, x: real):
                        EXISTS (delta):
                          FORALL (y): abs(x - y) <= delta IMPLIES abs(x ^ (nn+1) - y ^ (nn+1)) < epsil")
   (("1" (skeep) (inst - "epsil" "n-1" "x") (assert))
    ("2"
     (hide 2)
     (induct "nn")
     (("1" (skeep) (inst + "epsil/2") (grind))
      ("2"
       (assert)
       (skeep)
       (lemma "real_mult_cont")
       (inst - "LAMBDA (xx:real): xx^(1+j)" "LAMBDA (xx:real): xx")
       (split -)
       (("1"
         (skeep)
         (inst - "epsil" "x")
         (skeep)
         (inst + "delta/2")
         (skeep)
         (inst - "y")
         (assert)
         (expand "*")
         (expand "^")
         (expand "expt" +)
         (assert))
        ("2"
         (hide 2)
         (assert)
         (skeep)
         (inst - "epsil" "x")
         (assert)
         (skeep)
         (inst + "delta/2")
         (skeep)
         (inst - "y")
         (assert))
        ("3" (hide (-1 2)) (skeep) (inst + "epsil/2") (grind))))))))


proof_type: f_proof
decl_type: formula
library: reals
theory: root
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (name "A" "{r:real | r^n<=nnr}")
   (case "nonempty?[real](A) AND bounded_above?(A)")
   (("1"
     (flatten)
     (name "gg" "lub(A)")
     (("1"
       (inst + "gg")
       (("1"
         (case "gg^n < nnr")
         (("1"
           (lemma "expt_cont")
           (inst - "nnr-gg^n" "n" "gg")
           (("1"
             (skosimp*)
             (typepred "gg")
             (expand "least_upper_bound?")
             (flatten)
             (hide -2)
             (expand "upper_bound?" -1)
             (inst - "gg+delta!1/2")
             (("1" (assert))
              ("2"
               (expand "A" 1)
               (inst - "gg+delta!1/2")
               (assert)
               (split -)
               (("1" (expand "abs") (ground))
                ("2" (expand "abs" 1) (assert))))))
            ("2" (assert))))
          ("2"
           (lemma "expt_cont")
           (inst - "gg^n-nnr" "n" "gg")
           (("1"
             (skeep)
             (typepred "gg")
             (expand "least_upper_bound?")
             (flatten)
             (hide -1)
             (inst - "gg-delta/2")
             (assert)
             (expand "upper_bound?" 1)
             (skeep)
             (typepred "s")
             (expand "A" -1)
             (inst - "s")
             (assert)
             (split -)
             (("1" (expand "abs") (ground))
              ("2"
               (typepred "gg")
               (expand "least_upper_bound?")
               (flatten)
               (expand "upper_bound?" -1)
               (inst - "s")
               (expand "abs")
               (lift-if)
               (ground))))
            ("2" (assert))))))
        ("2"
         (assert)
         (typepred "gg")
         (expand "least_upper_bound?")
         (flatten)
         (expand "upper_bound?" -1)
         (inst - "0")
         (("1" (assert))
          ("2"
           (expand "A" 1)
           (assert)
           (case "0^n=0")
           (("1" (assert))
            ("2" (expand "^" 1) (expand "expt" 1) (assert))))))))
      ("2" (propax))))
    ("2"
     (hide 2)
     (split)
     (("1"
       (expand "nonempty?")
       (expand "empty?")
       (inst - "0")
       (expand "member")
       (expand "A" 1)
       (case "0^n=0")
       (("1" (replaces -1) (assert)) ("2" (hide-all-but 1) (grind))))
      ("2"
       (expand "bounded_above?")
       (case "nnr < 1")
       (("1"
         (inst + "1")
         (expand "upper_bound?")
         (skeep)
         (typepred "s")
         (expand "A" -1)
         (lemma "expt_increasing")
         (inst - "n" "1" "s")
         (("1" (assert) (lemma "expt_1i") (inst?) (assert))
          ("2" (assert))))
        ("2"
         (inst + "nnr")
         (expand "upper_bound?")
         (skeep)
         (case "NOT s>=0")
         (("1" (assert))
          ("2"
           (label "sge0" -1)
           (hide "sge0")
           (expand "A" -1)
           (case "s<=1")
           (("1"
             (case "s^n<=s")
             (("1" (assert))
              ("2"
               (hide-all-but (-1 1))
               (case "FORALL (nn:nat): s^(nn+1)<=s")
               (("1" (inst - "n-1") (assert))
                ("2"
                 (hide 2)
                 (induct "nn")
                 (("1" (grind))
                  ("2"
                   (skeep)
                   (assert)
                   (mult-ineq -1 -2)
                   (("1" (expand "^") (expand "expt" +) (assert))
                    ("2"
                     (reveal "sge0")
                     (assert)
                     (flatten)
                     (split)
                     (("1" (expand "abs") (lift-if) (ground))
                      ("2" (expand "abs") (propax))))
                    ("3" (reveal "sge0") (assert))))))))))
            ("2"
             (hide -1)
             (typepred "s")
             (expand "A")
             (case "s^n>=s")
             (("1" (assert))
              ("2"
               (case "NOT s>=0")
               (("1" (assert))
                ("2"
                 (hide-all-but (-1 1 2))
                 (case "FORALL (nn:nat): s^(nn+1)>=s")
                 (("1" (inst - "n-1") (assert))
                  ("2"
                   (hide 2)
                   (induct "nn")
                   (("1" (grind))
                    ("2"
                     (skeep)
                     (assert)
                     (case "s>=1")
                     (("1"
                       (mult-ineq -1 -2)
                       (expand "^")
                       (expand "expt" +)
                       (assert))
                      ("2" (assert))))))))))))))))))))))


proof_type: t_proof
decl_type: tcc
library: reals
theory: root
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (lemma "nn_root_exists")
   (inst +
    "LAMBDA (nnr1:nnreal,kp:posnat): choose({nnx | nnx^kp = nnr1})")
   (assert)
   (skeep)
   (expand "nonempty?")
   (expand "empty?")
   (inst -2 "kp" "nnr1")
   (skeep -)
   (inst - "nnx")
   (expand "member")
   (propax))


proof_type: t_proof
decl_type: tcc
library: reals
theory: root
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (assert)
   (typepred "root_pos(r,n)")
   (assert)
   (case "root_pos(r,n) = 0")
   (("1" (replaces -1) (grind)) ("2" (assert))))


proof_type: t_proof
decl_type: tcc
library: reals
theory: root
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (assert)
   (typepred "root_pos(r,n)")
   (assert)
   (split +)
   (("1"
     (replaces -1)
     (assert)
     (case "0^n=0")
     (("1" (assert)) ("2" (hide-all-but 1) (grind))))
    ("2"
     (assert)
     (case "root_pos(r,n)=0")
     (("1"
       (replaces -1)
       (case "0^n=0")
       (("1" (assert)) ("2" (hide-all-but 1) (grind))))
      ("2" (assert))))
    ("3"
     (case "root_pos(r,n)=0")
     (("1"
       (replaces -1)
       (case "0^n=0")
       (("1" (assert)) ("2" (hide-all-but 1) (grind))))
      ("2" (assert))))))


proof_type: t_proof
decl_type: tcc
library: reals
theory: root
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (assert)
   (typepred "root_pos(-r,n)")
   (assert)
   (lemma "mult_expt_pos")
   (inst?)
   (assert)
   (replaces -1)
   (typepred "n")
   (assert)
   (expand "odd?")
   (skeep)
   (assert)
   (case "root_pos(-r,n) = 0")
   (("1" (replaces -1) (assert) (grind))
    ("2"
     (assert)
     (case "(-1)^n = -1")
     (("1" (assert))
      ("2"
       (hide 5)
       (replace -2 1)
       (case "FORALL (kk:nat): (-1)^(2*kk+1) = -1")
       (("1" (inst?) (assert))
        ("2"
         (hide-all-but 1)
         (induct "kk")
         (("1" (grind))
          ("2"
           (skeep)
           (assert)
           (expand "^")
           (expand "expt" +)
           (expand "expt" +)
           (assert))))))))))


proof_type: f_proof
decl_type: formula
library: reals
theory: abs_lems
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (grind)
   (("1" (grind-reals)) ("2" (grind-reals)) ("3" (grind-reals))
    ("4" (grind-reals))))


proof_type: f_proof
decl_type: formula
library: reals
theory: abs_lems
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (rewrite "abs_diff_commute")
   (lemma "triangle" ("x" "t!1 - x!1" "y" "x!1 - y!1"))
   (assert))


proof_type: f_proof
decl_type: formula
library: reals
theory: abs_lems
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp*)
   (case "m!1 >= 0")
   (("1" (mult-by -3 "m!1") (mult-by -4 "m!1") (grind))
    ("2"
     (assert)
     (mult-by -2 "m!1" "-")
     (assert)
     (mult-by -3 "m!1" "-")
     (assert)
     (grind))))


proof_type: f_proof
decl_type: formula
library: reals
theory: abs_lems
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp*)
   (case "m!1 >= 0")
   (("1" (mult-by -3 "m!1") (mult-by -4 "m!1") (grind))
    ("2"
     (assert)
     (mult-by -2 "m!1" "-")
     (mult-by -3 "m!1" "-")
     (assert)
     (grind))))


proof_type: f_proof
decl_type: formula
library: reals
theory: abs_lems
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (typepred "root_real(x)(n)")
   (typepred "root_real(abs(x))(n)")
   (assert)
   (case "x = 0")
   (("1" (replaces -1) (assert))
    ("2"
     (case "NOT abs(x)>0")
     (("1" (assert))
      ("2"
       (assert)
       (hide (-1 -2 -3 -4 -5 -6 -7 -8 -9))
       (case "FORALL (r1,r2:posreal): r1^n = r2^n IMPLIES r1 = r2")
       (("1"
         (inst - "abs(root_real(x)(n))" "root_real(abs(x))(n)")
         (assert)
         (replaces -1)
         (lemma "abs_expt")
         (inst?)
         (replace -1)
         (replace -10)
         (propax))
        ("2"
         (hide-all-but 1)
         (case " FORALL (r1, r2: posreal,kn:nat): r1>r2 IMPLIES r1^(kn+1) > r2^(kn+1)")
         (("1"
           (skeep)
           (inst-cp - "r1" "r2" "n-1")
           (inst - "r2" "r1" "n-1")
           (ground))
          ("2"
           (hide 2)
           (induct "kn")
           (("1" (skeep) (grind))
            ("2"
             (skeep)
             (skeep)
             (inst - "r1" "r2")
             (assert)
             (mult-ineq -1 -2)
             (expand "^")
             (expand "expt" +)
             (assert))))))))))))


proof_type: f_proof
decl_type: formula
library: reals
theory: old_sigma
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (induct "rng")
   (("1" (assert) (expand "sigma") (propax))
    ("2"
     (skosimp*)
     (expand "sigma" + (1 3))
     (inst?)
     (assert)
     (lemma "T_pred_lem")
     (inst?)
     (inst - "1+j!1+low!1+nn!1" "low!1")
     (assert)
     (lift-if)
     (ground))
    ("3"
     (hide 2)
     (skosimp*)
     (inst + "low!1+nn!1")
     (("1" (assert))
      ("2"
       (lemma "T_pred_lem")
       (inst?)
       (inst - "low!1+nn!1+rng!2" "low!1")
       (("1" (assert)) ("2" (assert))))))
    ("4" (hide 2) (skosimp*) (inst + "low!1+nn!1+rng!2") (assert))
    ("5" (hide 2) (skosimp*))))


proof_type: f_proof
decl_type: formula
library: reals
theory: old_sigma
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp*)
   (case "high!1<low!1")
   (("1" (assert) (expand "sum_it_def") (expand "sigma") (propax))
    ("2"
     (lemma "subrange_induction[low!1,high!1]")
     (("1"
       (inst -1
        "lambda(lh:T| low!1 <= lh AND lh <= high!1): sum_it_def((high!1-lh)+low!1, high!1, F!1, sigma(low!1,(high!1-lh)+low!1-1, F!1)) = sigma(low!1, high!1, F!1)")
       (("1"
         (expand "extend")
         (ground)
         (("1"
           (inst -1 "high!1-i!1+low!1-1")
           (("1" (ground))
            ("2"
             (expand "sum_it_def")
             (expand "sigma")
             (assert)
             (lift-if)
             (lift-if)
             (ground))))
          ("2"
           (hide -2 -3 -4 3)
           (expand "sum_it_def")
           (expand "sum_it_def")
           (expand "sigma" + 2)
           (lift-if)
           (ground)
           (expand "sigma")
           (assert))
          ("3" (hide -1 -2 3) (use "T_pred_lem") (assert))
          ("4"
           (hide -1 -2 3)
           (skosimp*)
           (ground)
           (("1" (expand "sum_it_def" 1) (rewrite "sigma_rew" -))
            ("2"
             (hide-all-but (-3 1))
             (lemma "T_pred_lem")
             (inst?)
             (inst - "high!1" "low!1")
             (assert))))))
        ("2"
         (skosimp*)
         (inst + "high!1 -lh!1 +low!1")
         (("1" (assert))
          ("2"
           (hide-all-but 1)
           (lemma "T_pred_lem")
           (inst - "high!1" "low!1" "high!1-lh!1+low!1")
           (assert))))
        ("3"
         (hide-all-but 1)
         (skosimp*)
         (typepred "high!1")
         (typepred "low!1")
         (assert)
         (lemma "T_pred_lem")
         (inst - "high!1" "low!1" "(high!1 - lh!1) + low!1")
         (assert))))
      ("2" (assert))))))


proof_type: t_proof
decl_type: tcc
library: reals
theory: old_sigma
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp*)
   (assert)
   (typepred "high!1")
   (prop)
   (("1" (inst 4 "high!1") (assert))
    ("2" (skosimp*) (inst 4 "j!1") (assert))))


proof_type: t_proof
decl_type: tcc
library: reals
theory: old_sigma
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp*)
   (typepred "high!1")
   (prop)
   (("1" (inst + "high!1") (assert))
    ("2" (skosimp*) (inst + "j!1") (assert))))


proof_type: j_proof
decl_type: tcc
library: reals
theory: old_sigma
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (auto-rewrite-theory "integers")
   (auto-rewrite-theory "rationals")
   (skosimp*)
   (case "low!1<=high!1")
   (("1"
     (case "(FORALL (rng: nat): T_pred(low!1+rng) IMPLIES (rational_pred(sigma(low!1, low!1+rng, Fnpi!1))             AND integer_pred(sigma(low!1, low!1+rng, Fnpi!1)))       AND sigma(low!1, low!1+rng, Fnpi!1) <= 0)")
     (("1"
       (inst -1 "high!1-low!1")
       (("1"
         (assert)
         (split -)
         (("1" (propax)) ("2" (use "T_pred_lem") (assert))))
        ("2" (assert))))
      ("2"
       (hide 2)
       (induct "rng" 1)
       (("1" (rewrite "sigma_eq_arg") (assert))
        ("2"
         (skosimp*)
         (expand "sigma" +)
         (split -)
         (("1" (flatten) (assert))
          ("2"
           (hide 2)
           (assert)
           (lemma "T_pred_lem")
           (inst - "low!1+j!1" "low!1" "low!1+j!1")
           (("1" (assert)) ("2" (inst + "1+j!1+low!1") (assert))))))
        ("3" (skosimp*)) ("4" (skosimp*)) ("5" (skosimp*))
        ("6" (skosimp*)) ("7" (skosimp*)) ("8" (skosimp*))
        ("9" (skosimp*)) ("10" (skosimp*)) ("11" (skosimp*))))
      ("3" (hide 2) (skosimp*)) ("4" (skosimp*)) ("5" (skosimp*))))
    ("2" (expand "sigma") (assert))))


proof_type: f_proof
decl_type: formula
library: reals
theory: mixed_sigmas
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (case "FORALL (F: [T -> real], G: [H -> real], hhigh: T_high[H],
                              hlow: T_low[H], thigh: T_high[T], tlow: T_low[T]):
                        (thigh - tlow = hhigh - hlow AND
                          (FORALL (i: nat):
                             i <= thigh - tlow IMPLIES F(tlow + i) = G(hlow + i)))
                         IMPLIES (FORALL (i: nat):
                             i <= thigh - tlow IMPLIES sigma[T](tlow, tlow+i, F) = sigma[H](hlow, hlow+i, G))")
   (("1"
     (skeep)
     (inst - "F" "G" "hhigh" "hlow" "thigh" "tlow")
     (assert)
     (replace -3)
     (inst - "thigh-tlow")
     (("1" (assert)) ("2" (assert) (expand "sigma" +) (propax))))
    ("2"
     (hide 2)
     (skeep)
     (induct "i")
     (("1"
       (assert)
       (flatten)
       (expand "sigma" +)
       (expand "sigma" +)
       (inst - "0")
       (assert))
      ("2" (skeep) (assert) (expand "sigma" +) (inst - "1+j") (assert))
      ("3"
       (skeep)
       (lemma "T_pred_lem[H]")
       (inst - "hhigh" "hlow" "i+hlow")
       (assert))
      ("4"
       (skeep)
       (lemma "T_pred_lem[T]")
       (inst - "thigh" "tlow" "i+tlow")
       (assert))))
    ("3"
     (hide 2)
     (skeep)
     (skeep)
     (lemma "T_pred_lem[H]")
     (inst - "hhigh" "hlow" "hlow + i1")
     (assert))
    ("4"
     (hide 2)
     (skeep)
     (skeep)
     (lemma "T_pred_lem[T]")
     (inst - "thigh" "tlow" "i1+tlow")
     (assert))
    ("5"
     (hide 2)
     (skeep)
     (skeep)
     (lemma "T_pred_lem[H]")
     (inst - "hhigh" "hlow" "hlow + i")
     (assert))
    ("6"
     (hide 2)
     (skeep)
     (skeep)
     (lemma "T_pred_lem[T]")
     (inst - "thigh" "tlow" "i+tlow")
     (assert))))


proof_type: f_proof
decl_type: formula
library: reals
theory: mixed_sigmas
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (lemma "mixed_sigmas_const_eq")
   (inst - _ _ _ _ _ _ 1)
   (assert)
   (case "FORALL (aa:real): 1*aa = aa")
   (("1" (rewrite -1) (rewrite -1)) ("2" (hide-all-but 1) (assert))))


proof_type: f_proof
decl_type: formula
library: reals
theory: mixed_products
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (case "FORALL (F: [T -> real], G: [H -> real], hhigh: T_high[H],
                                            hlow: T_low[H], thigh: T_high[T], tlow: T_low[T]):
                                      (thigh - tlow = hhigh - hlow AND
                                        (FORALL (i: nat):
                                           i <= thigh - tlow IMPLIES F(tlow + i) = G(hlow + i)))
                                       IMPLIES (FORALL (i: nat):
                                           i <= thigh - tlow IMPLIES product[T](tlow, tlow+i, F) = product[H](hlow, hlow+i, G))")
   (("1"
     (skeep)
     (inst - "F" "G" "hhigh" "hlow" "thigh" "tlow")
     (assert)
     (replace -3)
     (inst - "thigh-tlow")
     (("1" (assert)) ("2" (assert) (expand "product" +) (propax))))
    ("2"
     (hide 2)
     (skeep)
     (induct "i")
     (("1"
       (assert)
       (flatten)
       (expand "product" +)
       (expand "product" +)
       (inst - "0")
       (assert))
      ("2" (skeep) (assert) (expand "product" +) (inst - "1+j") (assert))
      ("3"
       (skeep)
       (lemma "T_pred_lem[H]")
       (inst - "hhigh" "hlow" "i+hlow")
       (assert))
      ("4"
       (skeep)
       (lemma "T_pred_lem[T]")
       (inst - "thigh" "tlow" "i+tlow")
       (assert))))
    ("3"
     (hide 2)
     (skeep)
     (skeep)
     (lemma "T_pred_lem[H]")
     (inst - "hhigh" "hlow" "hlow + i1")
     (assert))
    ("4"
     (hide 2)
     (skeep)
     (skeep)
     (lemma "T_pred_lem[T]")
     (inst - "thigh" "tlow" "i1+tlow")
     (assert))
    ("5"
     (hide 2)
     (skeep)
     (skeep)
     (lemma "T_pred_lem[H]")
     (inst - "hhigh" "hlow" "hlow + i")
     (assert))
    ("6"
     (hide 2)
     (skeep)
     (skeep)
     (lemma "T_pred_lem[T]")
     (inst - "thigh" "tlow" "i+tlow")
     (assert))))


proof_type: f_proof
decl_type: formula
library: reals
theory: mixed_products
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (lemma "mixed_products_const_eq")
   (inst - _ _ _ _ _ _ 1)
   (assert)
   (case "FORALL (aa:real): 1*aa = aa")
   (("1" (rewrite -1) (rewrite -1)) ("2" (hide-all-but 1) (assert))))


proof_type: j_proof
decl_type: tcc
library: reals
theory: sigma_fseq
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (expand "sigma")
   (assert)
   (lemma "sigma_nonneg")
   (inst?)
   (assert)
   (skeep)
   (assert)
   (typepred "fs_nnr`seq(i)")
   (propax))


proof_type: j_proof
decl_type: tcc
library: reals
theory: sigma_fseq
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skeep)
   (expand "sigma")
   (lemma "sigma_nonpos")
   (inst?)
   (assert)
   (skosimp*)
   (typepred "fs_npr`seq(i!1)")
   (propax))


proof_type: j_proof
decl_type: tcc
library: reals
theory: sigma_fseq
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (auto-rewrite-theory "integers")
   (auto-rewrite-theory "rationals")
   (skeep)
   (expand "sigma")
   (lemma "sigma_ge")
   (inst?)
   (inst?)
   (assert))


proof_type: j_proof
decl_type: tcc
library: reals
theory: sigma_fseq
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (auto-rewrite-theory "integers")
   (auto-rewrite-theory "rationals")
   (skeep)
   (expand "sigma")
   (lemma "sigma_le")
   (inst?)
   (inst?)
   (assert))


proof_type: f_proof
decl_type: formula
library: reals
theory: sigma_below_sub
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (induct "n")
   (("1"
     (skosimp*)
     (expand "sigma")
     (lift-if)
     (ground)
     (inst?)
     (assert)
     (expand "sigma")
     (propax))
    ("2"
     (skosimp*)
     (expand "sigma" 1)
     (assert)
     (inst?)
     (inst?)
     (prop)
     (("1" (inst -5 "1+j!1") (assert))
      ("2"
       (assert)
       (inst -4 "1+j!1")
       (assert)
       (assert)
       (expand "sigma")
       (propax))
      ("3" (skosimp*) (inst?) (assert))))
    ("3" (hide 2) (skosimp*) (assert)) ("4" (hide 2) (skosimp*))
    ("5" (assert) (hide 2) (skosimp*) (assert))
    ("6" (hide 2) (skosimp*) (assert)) ("7" (hide 2) (skosimp*))
    ("8" (assert) (hide 2) (skosimp*) (assert))
    ("9" (hide 2) (skosimp*) (assert))
    ("10" (hide 2) (skosimp*) (assert))))


proof_type: f_proof
decl_type: formula
library: reals
theory: sigma_below_sub
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (induct "n")
   (("1"
     (skosimp*)
     (expand "sigma")
     (lift-if)
     (ground)
     (inst?)
     (assert)
     (expand "sigma")
     (propax))
    ("2"
     (skosimp*)
     (expand "sigma" 1)
     (assert)
     (inst?)
     (inst?)
     (assert)
     (prop)
     (("1" (inst -5 "1+j!1") (assert))
      ("2" (ground) (expand "sigma") (assert) (inst?) (assert))
      ("3" (skosimp*) (inst?) (assert))))
    ("3" (hide 2) (skosimp*) (assert)) ("4" (hide 2) (skosimp*))
    ("5" (hide 2) (skosimp*) (assert)) ("6" (hide 2) (skosimp*) (assert))
    ("7" (hide 2) (skosimp*)) ("8" (hide 2) (skosimp*) (assert))
    ("9" (hide 2) (skosimp*) (assert))
    ("10" (hide 2) (skosimp*) (assert))))


proof_type: f_proof
decl_type: formula
library: reals
theory: sigma_posnat
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp*)
   (lemma "sigma_shift_T2")
   (inst?)
   (inst - "high!1" "low!1" "0 - m!1")
   (assert)
   (prop)
   (("1" (replace -1 :hide? t) (rewrite "sigma_eq") (skosimp*) (assert))
    ("2"
     (case "high!1<low!1")
     (("1" (expand "sigma") (assert)) ("2" (assert))))
    ("3" (assert) (expand "sigma") (propax))))


proof_type: f_proof
decl_type: formula
library: reals
theory: sigma_posnat
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp*)
   (rewrite "sigma_split")
   (("1" (expand "sigma") (lift-if) (assert))
    ("2" (expand "sigma") (lift-if) (assert))))


proof_type: f_proof
decl_type: formula
library: orders
theory: mucalculus_prop
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (auto-rewrite "glb_lower_bound" "glb_greatest_lower_bound" "mu" "lfp"
                 "monotonic?")
   (reduce :if-match nil)
   (inst - "mu(F!1)" "q!1")
   (assert)
   (grind :exclude ("glb")))


proof_type: f_proof
decl_type: formula
library: orders
theory: mucalculus_prop
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (auto-rewrite "closure_mu" "monotonic?" "lfp")
   (skolem-typepred)
   (rewrite "antisymmetry")
   (delete 2)
   (expand "mu" 1 1)
   (assert)
   (rewrite "glb_lower_bound")
   (inst?)
   (assert))


proof_type: f_proof
decl_type: formula
library: orders
theory: mucalculus_prop
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (auto-rewrite "lub_upper_bound" "lub_least_upper_bound" "nu" "gfp"
                 "monotonic?")
   (reduce :if-match nil)
   (inst - "q!1" "nu(F!1)")
   (assert)
   (grind :exclude ("lub")))


proof_type: f_proof
decl_type: formula
library: orders
theory: mucalculus_prop
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (auto-rewrite "closure_nu" "monotonic?" "gfp")
   (skolem-typepred)
   (rewrite "antisymmetry")
   (delete 2)
   (expand "nu" 1 2)
   (assert)
   (rewrite "lub_upper_bound")
   (inst?)
   (assert))


proof_type: f_proof
decl_type: formula
library: orders
theory: mucalculus_prop
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skolem!)
   (case "mu(dual(F!1)) <= complement(nu(F!1)) AND complement(mu(dual(F!1))) <= nu(F!1)")
   (("1" (grind-with-ext :exclude ("mu" "nu" "dual")))
    ("2"
     (auto-rewrite "dual_inclusion1" "dual_inclusion2" "dual_dual"
                   "smallest_closed" "largest_closed" "closure_nu"
                   "closure_mu")
     (ground))))


proof_type: f_proof
decl_type: formula
library: orders
theory: mucalculus_prop
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skolem!)
   (case "complement(mu(F!1)) <= nu(dual(F!1)) AND mu(F!1) <= complement(nu(dual(F!1)))")
   (("1" (grind-with-ext :exclude ("mu" "nu" "dual")))
    ("2"
     (auto-rewrite "dual_inclusion1" "dual_inclusion2" "dual_dual"
                   "smallest_closed" "largest_closed" "closure_nu"
                   "closure_mu")
     (ground))))


proof_type: j_proof
decl_type: tcc
library: orders
theory: mucalculus_prop
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skolem!)
   (expand* "lfp?" "lfp?" "fixpoint?")
   (reduce)
   (("1" (forward-chain "least_fixpoint1"))
    ("2" (rewrite "fixpoint_mu1"))))


proof_type: j_proof
decl_type: tcc
library: orders
theory: mucalculus_prop
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skolem!)
   (expand* "gfp?" "gfp?" "fixpoint?")
   (reduce)
   (("1" (forward-chain "greatest_fixpoint1"))
    ("2" (rewrite "fixpoint_nu1"))))


proof_type: j_proof
decl_type: tcc
library: orders
theory: mucalculus_prop
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (grind :if-match nil)
   (inst - "complement(p2!1)" "complement(p1!1)")
   (reduce :polarity? t))


proof_type: f_proof
decl_type: formula
library: orders
theory: bounded_orders
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (expand "least_upper_bound?")
   (skosimp)
   (forward-chain "subset_upper_bound")
   (inst -6 "t!1")
   (assert))


proof_type: f_proof
decl_type: formula
library: orders
theory: bounded_orders
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skolem-typepred)
   (invoke (typepred "%1") (! 1 l l))
   (ground)
   (use "unique_least_upper_bound"))


proof_type: f_proof
decl_type: formula
library: orders
theory: bounded_orders
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skolem-typepred)
   (invoke (typepred "%1") (! 1 2))
   (expand* "least_upper_bound?" "upper_bound?")
   (flatten)
   (inst?))


proof_type: f_proof
decl_type: formula
library: orders
theory: bounded_orders
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skolem-typepred)
   (invoke (typepred "%1") (! 1 l l))
   (expand "least_upper_bound?")
   (prop)
   (("1"
     (hide -3)
     (expand* "upper_bound?" "transitive?")
     (skolem-typepred)
     (inst?)
     (inst - "r!1" "lub(lesseqp!1)(S!1)" "t!1")
     (assert))
    ("2" (inst?) (assert))))


proof_type: f_proof
decl_type: formula
library: orders
theory: bounded_orders
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (expand "greatest_lower_bound?")
   (skosimp)
   (forward-chain "subset_lower_bound")
   (inst - "r!1")
   (assert))


proof_type: f_proof
decl_type: formula
library: orders
theory: bounded_orders
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skolem-typepred)
   (invoke (typepred "%1") (! 1 l l))
   (ground)
   (use "unique_greatest_lower_bound"))


proof_type: f_proof
decl_type: formula
library: orders
theory: bounded_orders
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skolem-typepred)
   (invoke (typepred "%1") (! 1 l))
   (expand* "greatest_lower_bound?" "lower_bound?")
   (flatten)
   (inst?))


proof_type: f_proof
decl_type: formula
library: orders
theory: bounded_orders
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skolem-typepred)
   (invoke (typepred "%1") (! 1 l r))
   (expand "greatest_lower_bound?")
   (prop)
   (("1"
     (hide -3)
     (expand* "lower_bound?" "transitive?")
     (skolem-typepred)
     (inst?)
     (inst - "t!1" "glb(lesseqp!1)(S!1)" "r!1")
     (assert))
    ("2" (inst?) (assert))))


proof_type: f_proof
decl_type: formula
library: orders
theory: bounded_orders
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skolem!)
   (expand* "singleton" "upper_bound?")
   (prop)
   (("1" (inst - "u!1")) ("2" (skolem-typepred) (assert))))


proof_type: f_proof
decl_type: formula
library: orders
theory: bounded_orders
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skolem-typepred)
   (rewrite "lub_def")
   (grind :if-match nil)
   (("1" (inst -4 "u!1")) ("2" (inst - "u!1"))))


proof_type: f_proof
decl_type: formula
library: orders
theory: bounded_orders
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skolem!)
   (expand* "singleton" "lower_bound?")
   (prop)
   (("1" (inst - "u!1")) ("2" (skolem-typepred) (assert))))


proof_type: f_proof
decl_type: formula
library: orders
theory: bounded_orders
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skolem-typepred)
   (rewrite "glb_def")
   (grind :if-match nil)
   (("1" (inst -4 "u!1")) ("2" (inst - "u!1"))))


proof_type: f_proof
decl_type: formula
library: orders
theory: bounded_orders
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skolem!)
   (expand* "emptyset" "fullset" "least_upper_bound?"
    "greatest_lower_bound?")
   (prop)
   (("1"
     (hide -1)
     (expand* "lower_bound?" "upper_bound?")
     (skolem!)
     (inst?)
     (assert)
     (skolem-typepred))
    ("2" (hide -2 -1) (skosimp) (expand "lower_bound?") (inst?))
    ("3" (hide -2 -1) (expand "upper_bound?") (skolem-typepred))
    ("4" (skosimp) (hide -3 -1) (expand "lower_bound?") (inst?))))


proof_type: f_proof
decl_type: formula
library: orders
theory: bounded_orders
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skolem!)
   (expand* "emptyset" "fullset" "least_upper_bound?"
    "greatest_lower_bound?")
   (prop)
   (("1"
     (hide -1)
     (expand* "lower_bound?" "upper_bound?")
     (skolem!)
     (inst?)
     (assert)
     (skolem-typepred))
    ("2" (hide -2 -1) (skosimp) (expand "upper_bound?") (inst?))
    ("3" (hide -2 -1) (expand "lower_bound?") (skolem-typepred))
    ("4" (skosimp) (hide -3 -1) (expand "upper_bound?") (inst?))))


proof_type: f_proof
decl_type: formula
library: orders
theory: bounded_orders
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skolem!)
   (lemma "lub_emptyset_is_glb_fullset")
   (expand* "least_bounded_above?" "greatest_bounded_below?")
   (prop)
   (("1" (skolem!) (inst?) (inst?) (assert))
    ("2" (skolem!) (inst?) (inst?) (assert))))


proof_type: f_proof
decl_type: formula
library: orders
theory: bounded_orders
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skolem!)
   (lemma "glb_emptyset_is_lub_fullset")
   (expand* "least_bounded_above?" "greatest_bounded_below?")
   (prop)
   (("1" (skolem!) (inst?) (inst?) (assert))
    ("2" (skolem!) (inst?) (inst?) (assert))))


proof_type: f_proof
decl_type: formula
library: orders
theory: bounded_orders
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (lemma "lub_le"
    ("<=" "lesseqp!1" "S" "S!1" "t" "lub(lesseqp!1)(R!1)"))
   (replace -1 1)
   (hide -1)
   (expand "upper_bound?")
   (skosimp)
   (typepred "r!1")
   (inst - "r!1")
   (skosimp)
   (typepred "r!2")
   (typepred "lub(lesseqp!1)(R!1)")
   (expand "least_upper_bound?")
   (flatten)
   (hide -2)
   (expand "upper_bound?")
   (inst - "r!2")
   (typepred "lesseqp!1")
   (expand "partial_order?")
   (expand "preorder?")
   (flatten)
   (expand "transitive?")
   (inst - "r!1" "r!2" "lub(lesseqp!1)(R!1)")
   (assert))


proof_type: f_proof
decl_type: formula
library: orders
theory: bounded_orders
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp*)
   (lemma "le_lub" ("<=" "lesseqp!1" "S" "S!1" "R" "R!1"))
   (lemma "le_lub" ("<=" "lesseqp!1" "S" "R!1" "R" "S!1"))
   (replace -3)
   (replace -4)
   (typepred "lesseqp!1")
   (expand "partial_order?")
   (flatten)
   (expand "antisymmetric?")
   (inst - " lub(lesseqp!1)(S!1)" "lub(lesseqp!1)(R!1)")
   (assert))


proof_type: f_proof
decl_type: formula
library: orders
theory: bounded_orders
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (lemma "lub_eq"
    ("<="
     "lesseqp!1"
     "S"
     "add(lub(lesseqp!1)(S!1), S!1)"
     "t"
     "lub(lesseqp!1)(S!1)"))
   (("1" (propax))
    ("2"
     (hide 2)
     (expand "least_upper_bound?")
     (split)
     (("1"
       (expand "upper_bound?")
       (skosimp)
       (typepred "r!1")
       (expand "add")
       (expand "member")
       (split)
       (("1"
         (typepred "lesseqp!1")
         (expand "partial_order?")
         (expand "preorder?")
         (flatten)
         (expand "reflexive?")
         (inst - "r!1")
         (assert))
        ("2"
         (typepred "S!1")
         (expand "least_bounded_above?")
         (skosimp)
         (lemma "lub_def" ("<=" "lesseqp!1" "S" "S!1" "t" "t!1"))
         (assert)
         (replace -1)
         (expand "least_upper_bound?")
         (flatten)
         (expand "upper_bound?")
         (inst - "r!1"))))
      ("2"
       (skosimp*)
       (expand "upper_bound?")
       (inst - "lub(lesseqp!1)(S!1)")
       (expand "add")
       (propax))))))


proof_type: f_proof
decl_type: formula
library: orders
theory: bounded_orders
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp*)
   (lemma "glb_ge"
    ("<=" "lesseqp!1" "S" "R!1" "t" "glb(lesseqp!1)(S!1)"))
   (replace -1 1)
   (hide -1)
   (expand "lower_bound?")
   (skosimp)
   (typepred "r!1")
   (typepred "glb(lesseqp!1)(S!1)")
   (expand "greatest_lower_bound?")
   (flatten)
   (hide -2)
   (inst - "r!1")
   (skosimp)
   (expand "lower_bound?")
   (inst - "s!1")
   (typepred "lesseqp!1")
   (expand "partial_order?")
   (expand "preorder?")
   (flatten)
   (expand "transitive?")
   (inst - "glb(lesseqp!1)(S!1)" "s!1" "r!1")
   (assert))


proof_type: f_proof
decl_type: formula
library: orders
theory: bounded_orders
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (lemma "le_glb" ("<=" "lesseqp!1" "S" "S!1" "R" "R!1"))
   (lemma "le_glb" ("<=" "lesseqp!1" "S" "R!1" "R" "S!1"))
   (replace -3)
   (replace -4)
   (typepred "lesseqp!1")
   (expand "partial_order?")
   (flatten)
   (expand "antisymmetric?")
   (inst - "glb(lesseqp!1)(S!1)" "glb(lesseqp!1)(R!1)")
   (assert))


proof_type: f_proof
decl_type: formula
library: orders
theory: bounded_orders
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skolem!)
   (lemma "glb_eq"
    ("<="
     "lesseqp!1"
     "S"
     "add(glb(lesseqp!1)(S!1), S!1)"
     "t"
     "glb(lesseqp!1)(S!1)"))
   (("1" (propax))
    ("2"
     (hide 2)
     (expand "greatest_lower_bound?")
     (split)
     (("1"
       (expand "lower_bound?")
       (skolem-typepred)
       (expand* "add" "member")
       (split)
       (("1"
         (typepred "lesseqp!1")
         (expand* "partial_order?" "preorder?" "reflexive?")
         (flatten)
         (inst - "r!1")
         (assert))
        ("2"
         (typepred "S!1")
         (expand "greatest_bounded_below?")
         (skolem!)
         (lemma "glb_def" ("<=" "lesseqp!1" "S" "S!1" "t" "t!1"))
         (assert)
         (replace -1)
         (expand "greatest_lower_bound?")
         (flatten)
         (expand "lower_bound?")
         (inst - "r!1"))))
      ("2"
       (skosimp)
       (expand* "add" "lower_bound?")
       (inst - "glb(lesseqp!1)(S!1)"))))))


proof_type: t_proof
decl_type: tcc
library: orders
theory: bounded_orders
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (inst +
    "LAMBDA <=: LAMBDA (S: {S | least_bounded_above?(S, <=)}): epsilon(least_upper_bound?(S, <=))")
   (("1"
     (skolem-typepred)
     (expand "least_bounded_above?")
     (use "epsilon_ax[T]")
     (("1" (assert)) ("2" (skolem!) (inst?))))
    ("2"
     (skolem-typepred)
     (expand "least_bounded_above?")
     (skolem!)
     (inst?))))


proof_type: t_proof
decl_type: tcc
library: orders
theory: bounded_orders
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (inst +
    "LAMBDA <=: LAMBDA (S: {S | greatest_bounded_below?(S, <=)}): epsilon(greatest_lower_bound?(S, <=))")
   (("1"
     (skolem-typepred)
     (expand "greatest_bounded_below?")
     (use "epsilon_ax[T]")
     (("1" (assert)) ("2" (skolem!) (inst?))))
    ("2"
     (skolem-typepred)
     (expand "greatest_bounded_below?")
     (skolem!)
     (inst?))))


proof_type: t_proof
decl_type: tcc
library: orders
theory: bounded_orders
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (grind :if-match nil)
   (inst + "u!1")
   (grind :if-match nil)
   (("1" (inst -4 "u!1")) ("2" (inst - "u!1"))))


proof_type: t_proof
decl_type: tcc
library: orders
theory: bounded_orders
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (typepred "S!1")
   (expand "least_bounded_above?")
   (skosimp)
   (lemma "lub_def" ("<=" "lesseqp!1" "S" "S!1" "t" "t!1"))
   (assert)
   (replace -1)
   (inst + "t!1")
   (expand "least_upper_bound?")
   (flatten)
   (split 1)
   (("1"
     (expand "upper_bound?")
     (skosimp)
     (typepred "r!1")
     (expand "add")
     (split -1)
     (("1"
       (typepred "lesseqp!1")
       (expand "partial_order?")
       (expand "preorder?")
       (flatten)
       (expand "reflexive?")
       (inst - "t!1")
       (assert))
      ("2" (expand "member") (inst - "r!1"))))
    ("2"
     (skosimp)
     (expand "upper_bound?")
     (inst - "t!1")
     (expand "add")
     (propax))))


proof_type: t_proof
decl_type: tcc
library: orders
theory: bounded_orders
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (typepred "S!1")
   (expand "greatest_bounded_below?")
   (skosimp)
   (inst + "t!1")
   (lemma "glb_def" ("<=" "lesseqp!1" "S" "S!1" "t" "t!1"))
   (assert)
   (replace -1)
   (expand "greatest_lower_bound?")
   (flatten)
   (split 1)
   (("1"
     (expand "lower_bound?")
     (skosimp)
     (typepred "r!1")
     (expand "add")
     (split -1)
     (("1"
       (typepred "lesseqp!1")
       (expand "partial_order?")
       (expand "preorder?")
       (flatten)
       (expand "reflexive?")
       (inst - "t!1")
       (assert))
      ("2" (expand "member") (inst - "r!1"))))
    ("2"
     (skosimp)
     (expand "lower_bound?")
     (inst - "t!1")
     (expand "add")
     (propax))))


proof_type: f_proof
decl_type: formula
library: orders
theory: minmax_orders
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skolem-typepred)
   (use "unique_least_upper_bound")
   (rewrite "greatest_is_least_upper_bound"))


proof_type: f_proof
decl_type: formula
library: orders
theory: minmax_orders
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skolem-typepred)
   (rewrite "greatest_iff_least_upper_bound")
   (rewrite "greatest_iff_least_upper_bound")
   (flatten)
   (use "unique_least_upper_bound"))


proof_type: f_proof
decl_type: formula
library: orders
theory: minmax_orders
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp :preds? t)
   (expand* "maximal?" "greatest?" "member" "upper_bound?"
    "antisymmetric?")
   (prop)
   (skosimp)
   (inst - "r!1")
   (inst - "t!1" "r!1")
   (assert))


proof_type: f_proof
decl_type: formula
library: orders
theory: minmax_orders
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp :preds? t)
   (expand* "maximal?" "greatest?" "member" "upper_bound?"
    "dichotomous?")
   (prop)
   (skolem!)
   (inst + "r!1")
   (inst - "t!1" "r!1")
   (assert))


proof_type: f_proof
decl_type: formula
library: orders
theory: minmax_orders
signature: nil
run_date: Unknown date
run_time: ----
status: proved-incomplete
description: nil
script:
  (""
   (skolem-typepred)
   (use "max_lem[T, le!1]")
   (assert)
   (expand* "has_greatest?" "greatest?" "member" "upper_bound?")
   (inst? +)
   (ground))


proof_type: f_proof
decl_type: formula
library: orders
theory: minmax_orders
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skolem!)
   (invoke (typepred "%1") (! 1 r))
   (expand* "greatest?" "upper_bound?")
   (flatten)
   (inst - "m!1"))


proof_type: f_proof
decl_type: formula
library: orders
theory: minmax_orders
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (invoke (typepred "%1" "%2") (! 1 l) (! 1 r))
   (expand "greatest?")
   (flatten)
   (hide -2)
   (expand "upper_bound?")
   (inst?)
   (expand* "subset?" "member")
   (inst?)
   (assert))


proof_type: f_proof
decl_type: formula
library: orders
theory: minmax_orders
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skolem-typepred)
   (rewrite "greatest_iff_least_upper_bound")
   (prop)
   (("1" (rewrite "greatest_equals_lub") (rewrite "lub_def"))
    ("2" (use "greatest_member") (assert))
    ("3" (rewrite "greatest_equals_lub") (rewrite "lub_def"))))


proof_type: f_proof
decl_type: formula
library: orders
theory: minmax_orders
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skolem-typepred)
   (invoke (typepred "%1") (! 1 l 1))
   (expand "greatest?")
   (prop)
   (("1"
     (expand* "upper_bound?" "partial_order?" "preorder?" "transitive?")
     (skosimp :preds? t)
     (inst?)
     (inst - "r!1" "greatest(lesseqp!1)(S!1)" "t!1")
     (assert))
    ("2" (expand "upper_bound?") (inst?))))


proof_type: f_proof
decl_type: formula
library: orders
theory: minmax_orders
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skolem-typepred)
   (use "unique_greatest_lower_bound")
   (rewrite "least_is_greatest_lower_bound"))


proof_type: f_proof
decl_type: formula
library: orders
theory: minmax_orders
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skolem-typepred)
   (rewrite "least_iff_greatest_lower_bound")
   (rewrite "least_iff_greatest_lower_bound")
   (flatten)
   (use "unique_greatest_lower_bound"))


proof_type: f_proof
decl_type: formula
library: orders
theory: minmax_orders
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp :preds? t)
   (expand* "minimal?" "least?" "member" "lower_bound?" "antisymmetric?")
   (prop)
   (skosimp)
   (inst - "r!1")
   (inst - "t!1" "r!1")
   (assert))


proof_type: f_proof
decl_type: formula
library: orders
theory: minmax_orders
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp :preds? t)
   (expand* "minimal?" "least?" "member" "lower_bound?" "dichotomous?")
   (prop)
   (skolem!)
   (inst + "r!1")
   (inst - "t!1" "r!1")
   (assert))


proof_type: f_proof
decl_type: formula
library: orders
theory: minmax_orders
signature: nil
run_date: Unknown date
run_time: ----
status: proved-incomplete
description: nil
script:
  (""
   (skolem-typepred)
   (use "min_lem[T, le!1]")
   (assert)
   (expand* "has_least?" "least?" "member" "lower_bound?")
   (inst? +)
   (ground))


proof_type: f_proof
decl_type: formula
library: orders
theory: minmax_orders
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skolem!)
   (invoke (typepred "%1") (! 1 l))
   (expand* "least?" "lower_bound?")
   (flatten)
   (inst - "m!1"))


proof_type: f_proof
decl_type: formula
library: orders
theory: minmax_orders
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (invoke (typepred "%1" "%2") (! 1 l) (! 1 r))
   (expand* "least?" "lower_bound?" "subset?" "member")
   (flatten)
   (inst?)
   (inst? -4)
   (assert))


proof_type: f_proof
decl_type: formula
library: orders
theory: minmax_orders
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skolem-typepred)
   (rewrite "least_iff_greatest_lower_bound")
   (prop)
   (("1" (rewrite "least_equals_glb") (rewrite "glb_def"))
    ("2" (use "least_member") (assert))
    ("3" (rewrite "least_equals_glb") (rewrite "glb_def"))))


proof_type: f_proof
decl_type: formula
library: orders
theory: minmax_orders
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skolem-typepred)
   (invoke (typepred "%1") (! 1 l 2))
   (expand "least?")
   (prop)
   (("1"
     (expand* "lower_bound?" "partial_order?" "preorder?" "transitive?")
     (skosimp :preds? t)
     (inst?)
     (inst - "t!1" "least(lesseqp!1)(S!1)" "r!1")
     (assert))
    ("2" (expand "lower_bound?") (inst?))))


proof_type: t_proof
decl_type: tcc
library: orders
theory: minmax_orders
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (inst +
    "LAMBDA (lesseq: pred[[T, T]]): LAMBDA (S: (LAMBDA (S): has_greatest?(S, lesseq))): choose[(S)]({t: (S) | greatest?(t, S, lesseq)})")
   (grind :if-match nil)
   (inst? -3))


proof_type: j_proof
decl_type: tcc
library: orders
theory: minmax_orders
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skolem-typepred)
   (expand* "least_bounded_above?" "has_greatest?")
   (skolem!)
   (inst?)
   (rewrite "greatest_is_least_upper_bound"))


proof_type: t_proof
decl_type: tcc
library: orders
theory: minmax_orders
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (inst +
    "LAMBDA (lesseq: pred[[T, T]]): LAMBDA (S: (LAMBDA (S): has_least?(S, lesseq))): choose[(S)]({t: (S) | least?(t, S, lesseq)})")
   (grind :if-match nil)
   (inst? -3))


proof_type: j_proof
decl_type: tcc
library: orders
theory: minmax_orders
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skolem-typepred)
   (expand* "greatest_bounded_below?" "has_least?")
   (skolem!)
   (inst?)
   (rewrite "least_is_greatest_lower_bound"))


proof_type: j_proof
decl_type: tcc
library: orders
theory: minmax_orders
signature: nil
run_date: Unknown date
run_time: ----
status: proved-incomplete
description: nil
script:
  (""
   (skolem-typepred)
   (expand* "lattice?" "upper_semilattice?" "lower_semilattice?"
    "total_order?")
   (prop)
   (("1"
     (skolem!)
     (use "non_empty_finite_has_greatest")
     (rewrite "has_greatest_is_least_bounded_above"))
    ("2"
     (skolem!)
     (use "non_empty_finite_has_least")
     (rewrite "has_least_is_greatest_bounded_below"))))


proof_type: f_proof
decl_type: formula
library: orders
theory: relation_iterate
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skolem!)
   (decompose-equality)
   (iff)
   (expand "o")
   (prop)
   (("1" (skosimp) (assert)) ("2" (inst?))))


proof_type: f_proof
decl_type: formula
library: orders
theory: relation_iterate
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (induct "n")
   (("1" (skolem!) (expand "iterate" + 3) (rewrite "comp_equal_r"))
    ("2"
     (skosimp*)
     (expand "iterate" + (1 3))
     (rewrite "assoc" :dir rl)
     (inst?)
     (assert))))


proof_type: f_proof
decl_type: formula
library: orders
theory: relation_iterate
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skolem!)
   (use "iterate_add" ("m" "1" "n" "n!1"))
   (replace -1 :hide? t)
   (rewrite "iterate_1"))


proof_type: f_proof
decl_type: formula
library: orders
theory: relation_iterate
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (induct "n")
   (("1" (skolem!) (expand "iterate" + (1 3)) (propax))
    ("2"
     (skosimp*)
     (expand "iterate" + 1)
     (inst?)
     (rewrite "iterate_add")
     (assert))))


proof_type: f_proof
decl_type: formula
library: orders
theory: relation_iterate
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skolem!)
   (decompose-equality)
   (iff)
   (expand* "o" "converse")
   (prop)
   (("1" (skosimp) (inst?) (assert)) ("2" (skosimp) (inst?) (assert))))


proof_type: f_proof
decl_type: formula
library: orders
theory: relation_iterate
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (induct "n")
   (("1" (skolem!) (expand "iterate") (rewrite "converse_equal"))
    ("2"
     (skosimp*)
     (rewrite "iterate_add_one")
     (expand "iterate" + 2)
     (rewrite "converse_comp")
     (inst?)
     (assert))))


proof_type: f_proof
decl_type: formula
library: orders
theory: relation_iterate
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (induct "n")
   (("1" (skosimp) (expand* "iterate" "subset?" "member") (skosimp))
    ("2"
     (skosimp*)
     (expand "iterate" +)
     (rewrite "comp_is_monotone")
     (inst?)
     (assert))))


proof_type: f_proof
decl_type: formula
library: orders
theory: closure_ops
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skolem!)
   (expand "preorder_closure")
   (decompose-equality)
   (expand "IUnion")
   (iff)
   (prop)
   (("1"
     (skolem!)
     (rewrite "iterate_converse")
     (expand "converse")
     (inst?))
    ("2"
     (expand "converse" -)
     (skolem!)
     (inst?)
     (rewrite "iterate_converse")
     (expand "converse")
     (propax))))


proof_type: f_proof
decl_type: formula
library: orders
theory: closure_ops
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (expand "transitive_closure")
   (rewrite "IUnion_is_monotone")
   (skolem!)
   (rewrite "iterate_is_monotone"))


proof_type: f_proof
decl_type: formula
library: orders
theory: closure_ops
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (expand "preorder_closure")
   (rewrite "IUnion_is_monotone")
   (skolem!)
   (rewrite "iterate_is_monotone"))


proof_type: f_proof
decl_type: formula
library: orders
theory: closure_ops
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skolem!)
   (decompose-equality)
   (expand* "transitive_closure" "preorder_closure" "IUnion")
   (expand "iterate" 1 1)
   (expand "o")
   (iff)
   (prop)
   (("1" (skosimp*) (inst?) (assert) (inst?))
    ("2" (skosimp*) (inst?) (assert))))


proof_type: f_proof
decl_type: formula
library: orders
theory: closure_ops
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skolem!)
   (decompose-equality)
   (expand* "transitive_closure" "preorder_closure" "IUnion")
   (iff)
   (prop)
   (("1"
     (skolem!)
     (rewrite "iterate_add_one")
     (expand "o")
     (skosimp)
     (inst?)
     (assert)
     (inst?))
    ("2"
     (expand "o")
     (skosimp*)
     (inst + "i!1 + 1")
     (rewrite "iterate_add_one")
     (expand "o")
     (inst?)
     (assert))))


proof_type: f_proof
decl_type: formula
library: orders
theory: closure_ops
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skolem!)
   (decompose-equality)
   (expand* "preorder_closure" "reflexive_closure" "transitive_closure"
    "union" "member" "IUnion")
   (iff)
   (prop)
   (("1" (skolem!) (inst?) (assert) (expand "iterate") (propax))
    ("2" (skolem!) (inst?)) ("3" (inst + 0) (expand "iterate") (propax))))


proof_type: f_proof
decl_type: formula
library: orders
theory: closure_ops
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skolem!)
   (decompose-equality)
   (iff)
   (prop)
   (("1"
     (rewrite "preorder_closure_reflexive_transitive")
     (expand "reflexive_closure" -)
     (expand* "union" "member")
     (split)
     (("1"
       (lemma "transitive_closure_is_monotone")
       (inst - "R!1" "reflexive_closure(R!1)")
       (split)
       (("1" (expand* "subset?" "member") (inst?) (assert))
        ("2"
         (hide-all-but 1)
         (expand* "subset?" "reflexive_closure" "union" "member")
         (skosimp))))
      ("2"
       (replace -1)
       (lemma "transitive_closure_of_reflexive"
        ("R" "reflexive_closure(R!1)"))
       (expand* "preorder?" "reflexive?")
       (flatten)
       (inst?))))
    ("2"
     (expand* "transitive_closure" "IUnion")
     (skolem!)
     (generalize-skolem-constants)
     (induct "i_1")
     (("1" (assert)) ("2" (assert))
      ("3"
       (skosimp*)
       (expand "iterate" -3)
       (expand "o")
       (skosimp)
       (case "preorder_closure(R!2)(x!4, y!1)")
       (("1"
         (hide -2 -3 -4)
         (expand* "reflexive_closure" "union" "member" "preorder_closure"
          "IUnion")
         (skolem!)
         (split)
         (("1"
           (inst + "i!2 + 1")
           (expand "iterate" +)
           (expand "o")
           (inst?)
           (assert))
          ("2" (inst?) (assert))))
        ("2"
         (hide 2)
         (splash -1)
         (("1" (inst?) (assert))
          ("2"
           (assert)
           (expand "iterate")
           (expand* "preorder_closure" "IUnion")
           (inst + 0)
           (expand "iterate")
           (propax))))))))))


proof_type: f_proof
decl_type: formula
library: orders
theory: closure_ops
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skolem-typepred)
   (expand* "transitive_closure" "IUnion")
   (decompose-equality)
   (iff)
   (prop)
   (("1"
     (case "FORALL (i: posnat), (a, b: T): iterate(lessp!1, i)(a, b) IMPLIES lessp!1(a, b)")
     (("1" (skolem!) (inst - "i!1" "x!1" "x!2") (assert))
      ("2"
       (hide -1 2)
       (induct "i")
       (("1" (assert)) ("2" (assert))
        ("3"
         (skosimp*)
         (expand "iterate" -3)
         (expand "o")
         (skosimp)
         (splash -1)
         (("1"
           (inst - "a!1" "y!1")
           (assert)
           (expand "transitive?")
           (inst - "a!1" "y!1" "b!1")
           (assert))
          ("2" (expand "iterate") (assert))))))))
    ("2" (inst + 1) (rewrite "iterate_1"))))


proof_type: f_proof
decl_type: formula
library: orders
theory: closure_ops
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skolem!)
   (rewrite "preorder_closure_reflexive_transitive")
   (use "transitive_closure_identity")
   (use "reflexive_closure_identity")
   (assert))


proof_type: f_proof
decl_type: formula
library: orders
theory: closure_ops
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skolem-typepred)
   (expand "order?")
   (flatten)
   (rewrite "preorder_closure_reflexive_transitive")
   (rewrite "transitive_closure_identity"))


proof_type: f_proof
decl_type: formula
library: orders
theory: closure_ops
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skolem-typepred)
   (expand* "equivalence?" "equivalence_closure")
   (flatten)
   (use "symmetric_closure_identity")
   (replace -1)
   (use "preorder_closure_identity"))


proof_type: t_proof
decl_type: tcc
library: orders
theory: closure_ops
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (expand* "transitive?" "IUnion")
   (skosimp*)
   (forward-chain "iterate_add_applied")
   (inst?))


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


proof_type: j_proof
decl_type: tcc
library: orders
theory: closure_ops
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skolem-typepred)
   (expand* "preorder?" "transitive?" "reflexive_closure" "union"
    "member")
   (skosimp)
   (inst - "x!1" "y!1" "z!1")
   (ground))


proof_type: j_proof
decl_type: tcc
library: orders
theory: closure_ops
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skolem-typepred)
   (expand* "partial_order?" "preorder?" "antisymmetric?"
    "reflexive_closure" "union" "member"))


proof_type: j_proof
decl_type: tcc
library: orders
theory: closure_ops
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skolem-typepred)
   (expand* "linear_order?" "order?" "total_order?" "partial_order?")
   (flatten)
   (assert)
   (lemma "reflexive_closure_preserves_transitive" ("R" "R!1"))
   (lemma "reflexive_closure_preserves_antisymmetric" ("R" "R!1"))
   (lemma "reflexive_closure_dichotomous" ("R" "R!1"))
   (assert))


proof_type: j_proof
decl_type: tcc
library: orders
theory: closure_ops
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skolem-typepred)
   (expand* "order?" "antisymmetric?" "strict_order?" "transitive?"
    "irreflexive_kernel" "difference" "member")
   (skosimp)
   (inst - "x!1" "y!1" "z!1")
   (inst - "y!1" "z!1")
   (assert))


proof_type: j_proof
decl_type: tcc
library: orders
theory: closure_ops
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skolem-typepred)
   (expand "equivalence?")
   (split)
   (("1"
     (expand* "preorder?" "reflexive?" "symmetric_kernel" "intersection"
      "converse" "member")
     (skosimp)
     (inst?)
     (assert))
    ("2"
     (expand* "preorder?" "transitive?" "symmetric_kernel" "intersection"
      "converse" "member")
     (skosimp)
     (inst-cp - "x!1" "y!1" "z!1")
     (inst - "z!1" "y!1" "x!1")
     (ground))))


proof_type: j_proof
decl_type: tcc
library: orders
theory: closure_ops
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skolem-typepred)
   (expand "strict_order?")
   (rewrite "asymmetric_is_irreflexive")
   (expand* "preorder?" "transitive?" "asymmetric_kernel" "difference"
    "converse" "member")
   (skosimp)
   (inst-cp - "x!1" "y!1" "z!1")
   (inst - "z!1" "x!1" "y!1")
   (assert))


proof_type: j_proof
decl_type: tcc
library: orders
theory: closure_ops
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skolem-typepred)
   (expand* "preorder?" "reflexive?" "transitive_closure" "IUnion")
   (skolem!)
   (inst + 1)
   (assert)
   (inst?)
   (expand* "iterate" "o" "iterate")
   (inst?))


proof_type: j_proof
decl_type: tcc
library: orders
theory: closure_ops
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skolem-typepred)
   (expand "equivalence?")
   (typepred "preorder_closure(R!1)")
   (expand "preorder?")
   (prop)
   (rewrite "symmetry_char")
   (rewrite "symmetry_char")
   (rewrite "preorder_closure_converse" :dir rl)
   (rewrite "preorder_closure_is_monotone"))


proof_type: f_proof
decl_type: formula
library: orders
theory: ordered_subset
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skolem 1 ("lt" "x" "y"))
   (expand "subset?")
   (expand "reflexive_closure")
   (expand "union")
   (expand "member")
   (skosimp*)
   (typepred "lt")
   (expand "transitive?")
   (inst - "x!1" "x" "y")
   (assert))


proof_type: f_proof
decl_type: formula
library: orders
theory: ordered_subset
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (expand "reflexive_closure")
   (expand "union")
   (expand "member")
   (expand "subset?")
   (expand "member")
   (skosimp*)
   (typepred "tr!1")
   (expand "transitive?")
   (inst - "x!1" "y!1" "x!2")
   (split -3)
   (("1" (assert)) ("2" (assert))))


proof_type: f_proof
decl_type: formula
library: orders
theory: ordered_subset
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (typepred "X!1")
   (expand "suffix?")
   (skosimp*)
   (expand "member")
   (expand "complement")
   (expand "member")
   (expand "prefix?")
   (typepred "r!1")
   (expand "complement")
   (expand "member")
   (inst - "r!1" "t!1")
   (assert))


proof_type: f_proof
decl_type: formula
library: orders
theory: ordered_subset
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (typepred "X!1")
   (expand "complement")
   (expand "member")
   (expand "prefix?")
   (expand "suffix?")
   (expand "member")
   (skosimp)
   (typepred "r!1")
   (inst - "r!1" "t!1")
   (assert))


proof_type: f_proof
decl_type: formula
library: orders
theory: ordered_subset
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (typepred "tr!1")
   (split)
   (("1"
     (flatten)
     (expand "reflexive_closure")
     (expand "union")
     (expand "member")
     (expand "image")
     (expand "extend")
     (apply-extensionality 1 :hide? t)
     (("1"
       (case-replace "X!1(x!1)")
       (("1"
         (expand "Union")
         (inst + "down(tr!1)(x!1)")
         (("1"
           (expand "reflexive_closure")
           (expand "union")
           (expand "member")
           (propax))
          ("2"
           (split)
           (("1"
             (flatten)
             (inst + "x!1")
             (expand "reflexive_closure")
             (expand "union")
             (expand "member")
             (propax))
            ("2"
             (expand "prefix?")
             (skosimp)
             (expand "reflexive_closure")
             (expand "union")
             (expand "member")
             (flatten)
             (expand "transitive?")
             (typepred "r!1")
             (expand "reflexive_closure")
             (expand "union")
             (expand "member")
             (split -1)
             (("1" (inst -5 "t!1" "r!1" "x!1") (assert))
              ("2" (replace -1) (propax))))))))
        ("2"
         (replace 1 2)
         (assert)
         (expand "Union")
         (skosimp)
         (typepred "a!1")
         (assert)
         (skosimp)
         (typepred "x!2")
         (replace -2)
         (assert)
         (expand "prefix?")
         (expand "member")
         (inst -5 "x!1" "x!2")
         (assert))))
      ("2"
       (skosimp*)
       (expand "prefix?")
       (skosimp)
       (expand "member")
       (flatten)
       (typepred "x!1")
       (typepred "r!1")
       (split -1)
       (("1" (expand "transitive?") (inst -6 "t!2" "r!1" "x!1") (assert))
        ("2" (replace -1) (propax))))))
    ("2"
     (flatten)
     (replace -1)
     (hide -1)
     (expand "reflexive_closure")
     (expand "union")
     (expand "member")
     (expand "image")
     (expand "extend")
     (expand "Union")
     (expand "prefix?")
     (expand "member")
     (skosimp)
     (typepred "r!1")
     (skosimp)
     (typepred "a!1")
     (assert)
     (skosimp)
     (typepred "r!1")
     (skosimp)
     (typepred "a!2")
     (assert)
     (skosimp)
     (typepred "x!2")
     (inst + "a!2")
     (expand "prefix?" -3)
     (inst - "t!1" "r!1")
     (expand "member")
     (propax))))


proof_type: f_proof
decl_type: formula
library: orders
theory: ordered_subset
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (expand "reflexive_closure")
   (expand "union")
   (expand "member")
   (expand "image")
   (expand "extend")
   (split)
   (("1"
     (flatten)
     (apply-extensionality 1 :hide? t)
     (("1"
       (case-replace "X!1(x!1)")
       (("1"
         (expand "Union")
         (inst + "up(tr!1)(x!1)")
         (("1"
           (expand "reflexive_closure")
           (expand "union")
           (expand "member")
           (propax))
          ("2"
           (assert)
           (prop)
           (("1"
             (inst + "x!1")
             (expand "reflexive_closure")
             (expand "union")
             (expand "member")
             (propax))
            ("2"
             (expand "reflexive_closure")
             (expand "union")
             (expand "member")
             (expand "suffix?")
             (skosimp)
             (expand "member")
             (flatten)
             (typepred "r!1")
             (split)
             (("1"
               (typepred "tr!1")
               (expand "transitive?")
               (inst - "x!1" "r!1" "t!1")
               (assert))
              ("2" (assert))))))))
        ("2"
         (replace 1 2)
         (assert)
         (expand "Union")
         (skosimp)
         (typepred "a!1")
         (assert)
         (skosimp)
         (typepred "x!2")
         (expand "suffix?")
         (replace -2)
         (assert)
         (inst -5 "x!1" "x!2")
         (expand "member")
         (propax))))
      ("2"
       (skosimp*)
       (expand "suffix?")
       (skosimp)
       (expand "member")
       (flatten)
       (typepred "x!1")
       (typepred "r!1")
       (split -1)
       (("1"
         (typepred "tr!1")
         (expand "transitive?")
         (inst - "x!1" "r!1" "t!2")
         (assert))
        ("2" (assert))))))
    ("2"
     (flatten)
     (replace -1)
     (hide -1)
     (expand "Union")
     (expand "suffix?")
     (expand "member")
     (skosimp*)
     (typepred "r!1")
     (skosimp)
     (typepred "a!1")
     (assert)
     (skosimp)
     (typepred "x!1")
     (inst + "a!1")
     (expand "suffix?")
     (inst - "t!1" "r!1")
     (expand "member")
     (propax))))


proof_type: f_proof
decl_type: formula
library: orders
theory: ordered_subset
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (expand "every")
   (expand "prefix?")
   (skosimp)
   (expand "member")
   (expand "Union")
   (typepred "r!1")
   (expand "Union")
   (skosimp)
   (inst + "a!1")
   (inst - "a!1")
   (inst - "t!1" "r!1")
   (assert))


proof_type: f_proof
decl_type: formula
library: orders
theory: ordered_subset
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (expand "every")
   (expand "Union")
   (expand "suffix?")
   (expand "member")
   (skosimp*)
   (typepred "r!1")
   (skosimp)
   (typepred "a!1")
   (inst - "a!1")
   (inst - "t!1" "r!1")
   (inst + "a!1")
   (assert))


proof_type: f_proof
decl_type: formula
library: orders
theory: ordered_subset
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (lemma "Union_lower_set" ("U" "add(X!1,singleton(Y!1))" "tr" "tr!1"))
   (split -1)
   (("1"
     (lemma "extensionality"
      ("f"
       "Union(extend
                                    [setof[T], (LAMBDA (S): prefix?(S, tr!1)), bool,
                                     FALSE]
                                    (add(X!1, singleton(Y!1))))"
       "g"
       "union(X!1,Y!1)"))
     (split -1)
     (("1" (assert))
      ("2"
       (hide-all-but 1)
       (skosimp)
       (expand "union")
       (expand "singleton")
       (expand "add")
       (expand "extend")
       (expand "Union")
       (expand "member")
       (case-replace "X!1(x!1)")
       (("1" (inst + "X!1"))
        ("2"
         (assert)
         (case-replace "Y!1(x!1)")
         (("1" (inst + "Y!1") (assert) (expand "member") (propax))
          ("2"
           (assert)
           (skosimp)
           (typepred "a!1")
           (assert)
           (expand "member")
           (assert))))))))
    ("2"
     (hide 2)
     (expand "singleton")
     (expand "add")
     (expand "member")
     (expand "extend")
     (expand "every")
     (propax))))


proof_type: f_proof
decl_type: formula
library: orders
theory: ordered_subset
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (lemma "Union_upper_set"
    ("U" "add(X!1,singleton(Y!1))" "<" "lessp!1"))
   (split -1)
   (("1"
     (lemma "extensionality"
      ("f"
       "Union(extend
                                    [setof[T], (LAMBDA (S): suffix?(S, lessp!1)), bool,
                                     FALSE]
                                    (add(X!1, singleton(Y!1))))"
       "g"
       "union(X!1, Y!1)"))
     (split -1)
     (("1" (assert))
      ("2"
       (hide-all-but 1)
       (skosimp)
       (expand "union")
       (expand "member")
       (expand "singleton")
       (expand "add")
       (expand "member")
       (expand "extend")
       (expand "Union")
       (case-replace "X!1(x!1)")
       (("1" (inst + "X!1"))
        ("2"
         (case-replace "Y!1(x!1)")
         (("1" (inst + "Y!1"))
          ("2" (assert) (skosimp) (typepred "a!1") (assert))))))))
    ("2"
     (hide 2)
     (expand "singleton")
     (expand "add")
     (expand "member")
     (expand "extend")
     (expand "every")
     (propax))))


proof_type: f_proof
decl_type: formula
library: orders
theory: ordered_subset
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (expand "every")
   (expand "Intersection")
   (expand "prefix?")
   (expand "member")
   (skosimp*)
   (typepred "a!1")
   (typepred "r!1")
   (inst - "a!1")
   (inst - "a!1")
   (inst - "t!1" "r!1")
   (assert))


proof_type: f_proof
decl_type: formula
library: orders
theory: ordered_subset
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (lemma "Union_lower_set" ("tr" "tr!1" "U" "Complement(U!1)"))
   (split -1)
   (("1"
     (rewrite "Demorgan2" -1 :dir rl)
     (lemma "complement_lower_set" ("<" "tr!1"))
     (inst - "complement(Intersection(U!1))")
     (rewrite "complement_complement"))
    ("2"
     (hide 2)
     (expand "every")
     (skosimp)
     (typepred "x!1")
     (expand "Complement")
     (skosimp)
     (replace -1)
     (typepred "b!1")
     (hide -2)
     (inst - "b!1")
     (lemma "complement_upper_set" ("<" "tr!1" "X" "b!1"))
     (("1" (propax)) ("2" (propax))))))


proof_type: f_proof
decl_type: formula
library: orders
theory: ordered_subset
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (lemma "Intersection_lower_set"
    ("<" "lessp!1" "U" "add(X!1,singleton(Y!1))"))
   (split -1)
   (("1"
     (lemma "extensionality"
      ("f"
       "Intersection(extend
                                           [setof[T],
                                            (LAMBDA (S): prefix?(S, lessp!1)), bool,
                                            FALSE]
                                           (add(X!1, singleton(Y!1))))"
       "g"
       "intersection(X!1, Y!1)"))
     (split -1)
     (("1" (assert))
      ("2"
       (hide-all-but 1)
       (skosimp)
       (expand "intersection")
       (expand "member")
       (expand "singleton")
       (expand "add")
       (expand "member")
       (expand "extend")
       (expand "Intersection")
       (case-replace "X!1(x!1)")
       (("1"
         (case-replace "Y!1(x!1)")
         (("1" (skosimp) (typepred "a!1") (assert))
          ("2" (assert) (inst - "Y!1"))))
        ("2" (assert) (inst - "X!1"))))))
    ("2"
     (hide 2)
     (expand "singleton")
     (expand "add")
     (expand "member")
     (expand "extend")
     (expand "every")
     (propax))))


proof_type: f_proof
decl_type: formula
library: orders
theory: ordered_subset
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (lemma "Intersection_upper_set"
    ("tr" "tr!1" "U" "add(X!1,singleton(Y!1))"))
   (split -1)
   (("1"
     (lemma "extensionality"
      ("f"
       "Intersection(extend
                                           [setof[T], (LAMBDA (S): suffix?(S, tr!1)),
                                            bool, FALSE]
                                           (add(X!1, singleton(Y!1))))"
       "g"
       "intersection(X!1, Y!1)"))
     (split -1)
     (("1" (assert))
      ("2"
       (hide-all-but 1)
       (skosimp)
       (expand "intersection")
       (expand "member")
       (expand "singleton")
       (expand "add")
       (expand "member")
       (expand "extend")
       (expand "Intersection")
       (case-replace "X!1(x!1)")
       (("1"
         (case-replace " Y!1(x!1)")
         (("1" (skosimp) (typepred "a!1") (assert))
          ("2" (assert) (inst - "Y!1"))))
        ("2" (assert) (inst - "X!1"))))))
    ("2"
     (hide 2)
     (expand "singleton")
     (expand "add")
     (expand "member")
     (expand "extend")
     (expand "every")
     (propax))))


proof_type: t_proof
decl_type: tcc
library: orders
theory: ordered_subset
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (grind :if-match nil)
   (("1" (inst - "r!1" "t!1") (assert))
    ("2" (inst - "t!2" "r!1" "t!1") (assert))))


proof_type: t_proof
decl_type: tcc
library: orders
theory: ordered_subset
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (grind :if-match nil)
   (("1" (inst - "t!2" "r!1") (assert))
    ("2" (inst - "t!1" "r!1" "t!2") (assert))))


proof_type: t_proof
decl_type: tcc
library: orders
theory: ordered_subset
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (typepred "tr!1")
   (expand "reflexive_closure")
   (expand "union")
   (expand "member")
   (expand "prefix?")
   (skosimp)
   (expand "member")
   (flatten)
   (typepred "r!1")
   (split)
   (("1" (expand "transitive?") (inst - "t!2" "r!1" "t!1") (assert))
    ("2" (assert))))


proof_type: t_proof
decl_type: tcc
library: orders
theory: ordered_subset
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (typepred "tr!1")
   (expand "reflexive_closure")
   (expand "union")
   (expand "suffix?")
   (skosimp*)
   (expand "member")
   (flatten)
   (typepred "r!1")
   (expand "member")
   (split)
   (("1" (expand "transitive?") (inst - "t!1" "r!1" "t!2") (assert))
    ("2" (assert))))


proof_type: f_proof
decl_type: formula
library: orders
theory: directed_orders
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (case "FORALL (X:set[T],n:nat):
                 is_finite(X) AND card(X) = n AND subset?(X, D!1) IMPLIES
                  (EXISTS (x: (D!1)):
                     bounded_orders.upper_bound?(x, X, lesseqp!1))")
   (("1" (skosimp) (inst - "X!1" "card(X!1)") (assert))
    ("2"
     (hide 2)
     (induct "n")
     (("1"
       (skosimp)
       (typepred "D!1")
       (expand "nonempty?")
       (expand "empty?")
       (skosimp)
       (expand "member")
       (inst + "x!1")
       (expand "upper_bound?")
       (skosimp)
       (typepred "r!1")
       (rewrite "card_is_0")
       (replace -5)
       (expand "emptyset")
       (propax))
      ("2"
       (skosimp*)
       (lemma "nonempty_card" ("S" "X!1"))
       (assert)
       (inst - "rest(X!1)")
       (lemma "rest_subset" ("a" "X!1"))
       (lemma "card_rest" ("S" "X!1"))
       (split -1)
       (("1"
         (replace -6)
         (replace -1)
         (hide -1 -6)
         (lemma "finite_rest" ("A" "X!1"))
         (lemma "subset_transitive"
          ("a" "rest(X!1)" "b" "X!1" "c" "D!1"))
         (assert)
         (skosimp)
         (typepred "x!1")
         (hide -2 -3 -4 -7)
         (lemma "choose_rest" ("a" "X!1"))
         (split -1)
         (("1"
           (expand "upper_bound?")
           (typepred "D!1")
           (expand "directed?")
           (inst - "x!1" "_")
           (assert)
           (inst - "choose(X!1)")
           (split -2)
           (("1"
             (skosimp)
             (inst + "z!1")
             (skosimp)
             (typepred "r!1")
             (replace -5 -1 rl)
             (expand "add")
             (split -1)
             (("1" (replace -1) (propax))
              ("2"
               (expand "member")
               (inst -8 "r!1")
               (typepred "lesseqp!1")
               (expand "partial_order?")
               (expand "preorder?")
               (flatten)
               (expand "transitive?")
               (inst - "r!1" "x!1" "z!1")
               (assert))))
            ("2"
             (expand "subset?")
             (expand "member")
             (inst -6 "choose(X!1)")
             (assert))))
          ("2" (expand "nonempty?") (propax))))
        ("2" (expand "nonempty?") (propax))))))))


proof_type: f_proof
decl_type: formula
library: orders
theory: directed_orders
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (typepred "lesseqp!1")
   (expand "directed_complete_partial_order?")
   (flatten)
   (expand "directed_complete?")
   (inst - "D!1"))


proof_type: j_proof
decl_type: tcc
library: orders
theory: directed_orders
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (typepred "x!1")
   (expand "complete_upper_semilattice?")
   (expand "directed_complete_partial_order?")
   (flatten)
   (assert)
   (expand "directed_complete?")
   (skosimp)
   (inst - "D!1"))


proof_type: j_proof
decl_type: tcc
library: orders
theory: directed_orders
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (typepred "x!1")
   (expand "pointed_directed_complete_partial_order?")
   (expand "directed_complete_partial_order?")
   (flatten)
   (expand "chain_complete_partial_order?")
   (assert)
   (expand "chain_complete?")
   (skosimp)
   (expand "directed_complete?")
   (case "empty?(C!1)")
   (("1"
     (rewrite "emptyset_is_empty?")
     (replace -1)
     (expand "least_bounded_above?")
     (expand "has_least?")
     (skosimp)
     (expand "least?")
     (flatten)
     (expand "lower_bound?")
     (inst + "t!1")
     (expand "least_upper_bound?")
     (split 1)
     (("1"
       (expand "upper_bound?")
       (skosimp)
       (typepred "r!1")
       (expand "emptyset")
       (propax))
      ("2" (skosimp) (inst -6 "r!1") (expand "fullset") (propax))))
    ("2"
     (inst - "C!1")
     (split 1)
     (("1" (expand "nonempty?") (propax))
      ("2"
       (typepred "C!1")
       (expand "directed?")
       (expand "chain?")
       (expand "total_order?")
       (expand "dichotomous?")
       (expand "restrict")
       (skosimp)
       (inst - "x!2" "y!1")
       (split -1)
       (("1"
         (inst + "y!1")
         (expand "partial_order?")
         (expand "preorder?")
         (flatten)
         (expand "reflexive?")
         (inst - "y!1")
         (assert))
        ("2"
         (inst + "x!2")
         (expand "partial_order?")
         (expand "preorder?")
         (flatten)
         (expand "reflexive?")
         (inst - "x!2")
         (assert))))))))


proof_type: f_proof
decl_type: formula
library: orders
theory: product_orders
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (typepred "D!1")
   (typepred "r1!1")
   (typepred "r2!1")
   (expand "directed_complete_partial_order?")
   (flatten)
   (lemma "product_preserves_directed_complete"
    ("r1" "r1!1" "r2" "r2!1"))
   (("1"
     (expand "directed_complete?")
     (inst - "D!1")
     (typepred "lub(r1!1 * r2!1)(D!1)")
     (name-replace "LUB12" "lub(r1!1 * r2!1)(D!1)")
     (name-replace "D1" "{x: T1 | EXISTS (z: (D!1)): z`1 = x}")
     (name-replace "D2" "{y: T2 | EXISTS (z: (D!1)): z`2 = y}")
     (case "nonempty?(D1)")
     (("1"
       (case "nonempty?(D2)")
       (("1"
         (case "directed?(r1!1)(D1)")
         (("1"
           (case "directed?(r2!1)(D2)")
           (("1"
             (inst - "D2")
             (inst - "D1")
             (typepred "lub(r1!1)(D1)")
             (typepred "lub(r2!1)(D2)")
             (name-replace "LUB1" "lub(r1!1)(D1)")
             (name-replace "LUB2" "lub(r2!1)(D2)")
             (hide-all-but (-1 -2 -7 1 -9 -11))
             (expand "least_upper_bound?")
             (flatten)
             (inst - "LUB12`2")
             (inst - "LUB12`1")
             (inst - "(LUB1,LUB2)")
             (lemma "product_preserves_partial_order"
              ("r1" "r1!1" "r2" "r2!1"))
             (expand "upper_bound?")
             (expand "*")
             (split -3)
             (("1"
               (split -5)
               (("1"
                 (split -7)
                 (("1"
                   (flatten)
                   (expand "partial_order?")
                   (flatten)
                   (expand "antisymmetric?")
                   (inst -13 "LUB12`1" "LUB1")
                   (inst -11 "LUB12`2" "LUB2")
                   (assert)
                   (decompose-equality 1))
                  ("2"
                   (hide 2)
                   (skosimp)
                   (typepred "r!1")
                   (inst - "r!1`2")
                   (("1"
                     (inst - "r!1`1")
                     (("1" (assert)) ("2" (expand "D1") (inst + "r!1"))))
                    ("2" (expand "D2") (inst + "r!1"))))))
                ("2"
                 (hide 2)
                 (skosimp)
                 (typepred "r!1")
                 (expand "D1")
                 (skosimp)
                 (inst -6 "z!1")
                 (flatten)
                 (assert))))
              ("2"
               (hide 2)
               (skosimp)
               (typepred "r!1")
               (expand "D2")
               (skosimp)
               (inst -6 "z!1")
               (flatten)
               (assert))))
            ("2"
             (hide-all-but (-6 -11 1 -10 -2))
             (expand "*")
             (expand "D2")
             (expand "directed?")
             (skosimp*)
             (typepred "z!1")
             (typepred "z!2")
             (inst -8 "z!1" "z!2")
             (assert)
             (skosimp)
             (inst + "z!3`2")
             (("1" (assert)) ("2" (inst + "z!3"))))
            ("3" (propax))))
          ("2"
           (hide-all-but (-10 1))
           (expand "D1")
           (expand "*")
           (expand "directed?")
           (skosimp*)
           (inst - "z!1" "z!2")
           (assert)
           (skosimp)
           (inst + "z!3`1")
           (("1" (assert)) ("2" (inst + "z!3"))))
          ("3" (propax))))
        ("2"
         (expand "nonempty?")
         (expand "empty?")
         (hide-all-but (-1 2))
         (skosimp)
         (expand "member")
         (expand "D2")
         (inst - "x!1`2")
         (inst + "x!1"))))
      ("2"
       (expand "nonempty?")
       (expand "empty?")
       (skosimp)
       (inst -1 "x!1`1")
       (expand "member")
       (expand "D1")
       (inst + "x!1"))))
    ("2" (propax)) ("3" (propax))))


proof_type: f_proof
decl_type: formula
library: orders
theory: product_orders
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (expand "fullset")
   (expand "*")
   (expand "has_least?")
   (skosimp*)
   (expand "least?")
   (expand "lower_bound?")
   (inst + "(t!1,t!2)")
   (skosimp)
   (inst - "r!1`1")
   (inst - "r!1`2")
   (assert))


proof_type: f_proof
decl_type: formula
library: orders
theory: product_orders
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (typepred "least(r1!1)(fullset[T1])")
   (typepred "least(r2!1)(fullset[T2])")
   (typepred "least(r1!1*r2!1)(fullset[[T1,T2]])")
   (name-replace "L12" "least(r1!1 * r2!1)(fullset[[T1, T2]])")
   (name-replace "L1" "least(r1!1)(fullset[T1])")
   (name-replace "L2" "least(r2!1)(fullset[T2])")
   (expand "least?")
   (expand "fullset")
   (expand "lower_bound?")
   (inst -1 "(L1, L2)")
   (inst - "L12`2")
   (inst - "L12`1")
   (expand "*")
   (flatten)
   (typepred "r1!1")
   (typepred "r2!1")
   (expand "pointed_directed_complete_partial_order?")
   (expand "directed_complete_partial_order?")
   (expand "partial_order?")
   (flatten)
   (expand "antisymmetric?")
   (inst - "L12`2" "L2")
   (inst - "L12`1" "L1")
   (assert)
   (replace -2 * rl)
   (replace -6 * rl)
   (decompose-equality))


proof_type: j_proof
decl_type: tcc
library: orders
theory: product_orders
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (typepred "r1!1")
   (typepred "r2!1")
   (expand "*")
   (expand "transitive?")
   (skosimp)
   (inst - "x!1`2" "y!1`2" "z!1`2")
   (inst - "x!1`1" "y!1`1" "z!1`1")
   (assert))


proof_type: j_proof
decl_type: tcc
library: orders
theory: product_orders
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (typepred "r1!1")
   (typepred "r2!1")
   (expand "*")
   (expand "antisymmetric?")
   (skosimp)
   (inst - "x!1`2" "y!1`2")
   (inst - "x!1`1" "y!1`1")
   (assert)
   (decompose-equality))


proof_type: j_proof
decl_type: tcc
library: orders
theory: product_orders
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (typepred "r2!1")
   (typepred "r1!1")
   (expand "*")
   (expand "directed_complete?")
   (skosimp)
   (typepred "D!1")
   (name "DD1" "{x:T1 | EXISTS (z:(D!1)): z`1 = x}")
   (name "DD2" "{y:T2 | EXISTS (z:(D!1)): z`2 = y}")
   (inst - "DD1")
   (("1"
     (inst - "DD2")
     (("1"
       (expand "least_bounded_above?")
       (skosimp*)
       (inst + "(t!1,t!2)")
       (expand "least_upper_bound?")
       (expand "upper_bound?")
       (flatten)
       (split 1)
       (("1"
         (skosimp)
         (inst -6 "r!1`1")
         (("1"
           (inst -9 "r!1`2")
           (("1" (assert)) ("2" (expand "DD2") (inst + "r!1"))))
          ("2" (expand "DD1") (inst + "r!1"))))
        ("2"
         (skosimp*)
         (inst -8 "r!1`1")
         (inst -11 "r!1`2")
         (split -8)
         (("1"
           (split -11)
           (("1" (assert))
            ("2"
             (skosimp)
             (typepred "r!2")
             (expand "DD2")
             (skosimp)
             (inst -3 "z!1")
             (flatten)
             (assert))))
          ("2"
           (skosimp)
           (typepred "r!2")
           (expand "DD1")
           (skosimp)
           (inst -2 "z!1")
           (flatten)
           (assert))))))
      ("2"
       (hide -1 -2 -5 -6 2)
       (case-replace "nonempty?[T2](DD2)")
       (("1"
         (expand "directed?")
         (skosimp)
         (expand "DD2")
         (skosimp*)
         (inst - "z!1" "z!2")
         (assert)
         (skosimp)
         (inst + "z!3`2")
         (("1" (assert)) ("2" (expand "DD2") (inst + "z!3"))))
        ("2"
         (hide-all-but (-1 1))
         (expand "nonempty?")
         (expand "empty?")
         (skosimp)
         (expand "member")
         (inst - "x!1`2")
         (expand "DD2")
         (inst + "x!1"))))))
    ("2"
     (hide -1 -2 -6 -7 2)
     (case-replace "nonempty?[T1](DD1)")
     (("1"
       (expand "directed?")
       (skosimp)
       (expand "DD1")
       (skosimp*)
       (inst - "z!1" "z!2")
       (assert)
       (skosimp)
       (inst + "z!3`1")
       (("1" (assert)) ("2" (expand "DD1") (inst + "z!3"))))
      ("2"
       (hide -2 2 -3)
       (expand "nonempty?")
       (expand "empty?")
       (skosimp)
       (expand "member")
       (inst - "x!1`1")
       (expand "DD1")
       (inst + "x!1"))))))


proof_type: j_proof
decl_type: tcc
library: orders
theory: product_orders
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (typepred "r2!1")
   (typepred "r1!1")
   (expand "directed_complete_partial_order?")
   (flatten)
   (lemma "product_preserves_directed_complete"
    ("r1" "r1!1" "r2" "r2!1"))
   (("1" (propax)) ("2" (propax)) ("3" (propax))))


proof_type: t_proof
decl_type: tcc
library: orders
theory: product_orders
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (lemma "product_preserves_directed_complete"
    ("r1" "r1!1" "r2" "r2!1"))
   (("1" (expand "directed_complete?") (inst - "D!1"))
    ("2"
     (typepred "r2!1")
     (expand "directed_complete_partial_order?")
     (flatten))
    ("3"
     (typepred "r1!1")
     (expand "directed_complete_partial_order?")
     (flatten))))


proof_type: t_proof
decl_type: tcc
library: orders
theory: product_orders
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (typepred "D!1")
   (typepred "r1!1")
   (typepred "r2!1")
   (expand "directed_complete_partial_order?")
   (flatten)
   (lemma "product_preserves_directed_complete"
    ("r1" "r1!1" "r2" "r2!1"))
   (("1"
     (hide -2 -3)
     (expand "directed_complete?")
     (inst - "D!1")
     (name-replace "D1" "{x: T1 | EXISTS (z: (D!1)): z`1 = x}")
     (case "nonempty?(D1)")
     (("1"
       (case "directed?(r1!1)(D1)")
       (("1" (inst - "D1"))
        ("2"
         (hide-all-but (1 -6))
         (expand "directed?")
         (skosimp)
         (expand "D1")
         (skosimp*)
         (inst - "z!1" "z!2")
         (assert)
         (skosimp)
         (expand "*")
         (flatten)
         (inst + "z!3`1")
         (("1" (assert)) ("2" (expand "D1") (inst + "z!3"))))
        ("3" (propax))))
      ("2"
       (hide-all-but (-4 1))
       (expand "nonempty?")
       (expand "empty?")
       (skosimp)
       (expand "member")
       (expand "D1")
       (inst - "x!1`1")
       (inst + "x!1"))))
    ("2" (propax)) ("3" (propax))))


proof_type: t_proof
decl_type: tcc
library: orders
theory: product_orders
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (typepred "D!1")
   (name-replace "D2" "{y: T2 | EXISTS (z: (D!1)): z`2 = y}")
   (typepred "r2!1")
   (typepred "r1!1")
   (expand "directed_complete_partial_order?")
   (flatten)
   (hide -1 -3)
   (lemma "product_preserves_directed_complete"
    ("r1" "r1!1" "r2" "r2!1"))
   (("1"
     (case "nonempty?(D2)")
     (("1"
       (case "directed?(r2!1)(D2)")
       (("1" (expand "directed_complete?") (inst -5 "D2"))
        ("2"
         (hide-all-but (-6 1))
         (expand "directed?")
         (skosimp)
         (expand "D2")
         (skosimp*)
         (inst - "z!1" "z!2")
         (assert)
         (skosimp)
         (expand "*")
         (flatten)
         (inst + "z!3`2")
         (("1" (assert)) ("2" (expand "D2") (inst + "z!3"))))
        ("3" (propax))))
      ("2"
       (hide-all-but (-4 1))
       (expand "nonempty?")
       (expand "empty?")
       (skosimp)
       (expand "member")
       (expand "D2")
       (inst - "x!1`2")
       (inst + "x!1"))))
    ("2" (propax)) ("3" (propax))))


proof_type: j_proof
decl_type: tcc
library: orders
theory: product_orders
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (lemma "product_preserves_directed_complete_partial_order"
    ("r1" "r1!1" "r2" "r2!1"))
   (expand "pointed_directed_complete_partial_order?")
   (lemma "product_preserves_has_least" ("rel1" "r1!1" "rel2" "r2!1"))
   (typepred "r1!1")
   (typepred "r2!1")
   (expand "pointed_directed_complete_partial_order?")
   (flatten)
   (assert))


proof_type: t_proof
decl_type: tcc
library: orders
theory: product_orders
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (lemma "product_preserves_pointed_directed_complete_partial_order"
    ("r1" "r1!1" "r2" "r2!1"))
   (expand "pointed_directed_complete_partial_order?")
   (flatten))


proof_type: j_proof
decl_type: tcc
library: orders
theory: sum_orders
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (typepred "r2!1")
   (typepred "r1!1")
   (expand "transitive?")
   (skosimp)
   (expand "+")
   (assert)
   (flatten)
   (case-replace "inl?(x!1)")
   (("1"
     (assert)
     (flatten)
     (assert)
     (flatten)
     (inst -2 "left(x!1)" "left(y!1)" "left(z!1)")
     (assert))
    ("2"
     (assert)
     (flatten)
     (assert)
     (flatten)
     (inst -2 "right(x!1)" "right(y!1)" "right(z!1)")
     (assert))))


proof_type: j_proof
decl_type: tcc
library: orders
theory: sum_orders
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (typepred "r2!1")
   (typepred "r1!1")
   (expand "antisymmetric?")
   (skosimp)
   (expand "+")
   (case-replace "inl?(x!1)")
   (("1"
     (assert)
     (flatten)
     (inst -2 "left(x!1)" "left(y!1)")
     (assert)
     (decompose-equality))
    ("2"
     (assert)
     (flatten)
     (inst -2 "right(x!1)" "right(y!1)")
     (assert)
     (case "inr?(x!1)")
     (("1" (assert) (grind) (hide -2 -5) (decompose-equality 1))
      ("2" (assert))))))


proof_type: j_proof
decl_type: tcc
library: orders
theory: sum_orders
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (typepred "r2!1")
   (typepred "r1!1")
   (expand "directed_complete?")
   (skosimp)
   (typepred "D!1")
   (expand "nonempty?")
   (expand "empty?")
   (skosimp)
   (expand "member")
   (case "inl?(x!1)")
   (("1"
     (name "LD" "{x:T1 | D!1(inl(x))}")
     (hide -7 -8)
     (case "D!1=image[T1,union[T1,T2]](inl,LD)")
     (("1"
       (inst - "LD")
       (("1"
         (expand "least_bounded_above?")
         (skosimp)
         (inst + "inl(t!1)")
         (expand "least_upper_bound?")
         (expand "upper_bound?")
         (flatten)
         (split)
         (("1"
           (skosimp)
           (expand "+")
           (typepred "r!1")
           (replace -2 -1)
           (expand "image")
           (skosimp)
           (assert)
           (inst -8 "x!2")
           (assert)
           (replace -1)
           (case-replace "left[T1,T2](inl(x!2)) =x!2")
           (decompose-equality))
          ("2"
           (skosimp)
           (expand "+")
           (case-replace "inl?(r!1)")
           (("1"
             (inst -10 "left(r!1)")
             (assert)
             (skosimp)
             (typepred "r!2")
             (expand "LD" -1)
             (inst -3 "inl(r!2)")
             (assert))
            ("2"
             (assert)
             (case-replace "inr?(r!1)")
             (("1" (inst - "x!1") (assert)) ("2" (assert))))))))
        ("2"
         (hide 2)
         (split)
         (("1"
           (expand "nonempty?")
           (expand "empty?")
           (inst - "left(x!1)")
           (expand "member")
           (replace -1 -4)
           (expand "image")
           (skosimp)
           (typepred "x!2")
           (replace -5)
           (assert))
          ("2"
           (expand "directed?")
           (skosimp)
           (inst - "inl(x!2)" "inl(y!1)")
           (assert)
           (expand "LD" (-1 -2))
           (assert)
           (skosimp)
           (expand "+")
           (flatten)
           (typepred "z!1")
           (replace -4 -1)
           (expand "image")
           (skosimp)
           (inst + "x!3")
           (assert)
           (replace -1)
           (assert))))))
      ("2"
       (hide 2)
       (apply-extensionality 1 :hide? t)
       (case-replace "D!1(x!2)")
       (("1"
         (expand "image")
         (case "inl?(x!2)")
         (("1"
           (inst + "left(x!2)")
           (("1" (assert) (hide-all-but 1) (grind) (decompose-equality))
            ("2"
             (expand "LD")
             (hide-all-but (-1 -2 1))
             (grind)
             (case-replace "inl(left[T1, T2](x!2)) = x!2")
             (decompose-equality))))
          ("2"
           (case "inr?(x!2)")
           (("1"
             (expand "directed?")
             (inst - "x!1" "x!2")
             (assert)
             (skosimp)
             (expand "+")
             (flatten)
             (assert))
            ("2" (assert))))))
        ("2"
         (assert)
         (expand "image")
         (skosimp)
         (typepred "x!3")
         (expand "LD")
         (assert))))))
    ("2"
     (case "inr?(x!1)")
     (("1"
       (hide 1 -4 -5)
       (name "RD" "{x:T2| D!1(inr(x))}")
       (case "D!1=image[T2, union[T1, T2]](inr,RD)")
       (("1"
         (inst - "RD")
         (("1"
           (expand "least_bounded_above?")
           (skosimp)
           (inst + "inr(t!1)")
           (expand "least_upper_bound?")
           (flatten)
           (split)
           (("1"
             (expand "upper_bound?")
             (skosimp)
             (expand "+")
             (typepred "r!1")
             (hide -6 -9)
             (replace -2 -1)
             (expand "image")
             (skosimp)
             (typepred "x!2")
             (inst -8 "x!2")
             (replace -2)
             (assert))
            ("2"
             (skosimp)
             (expand "+")
             (expand "upper_bound?")
             (assert)
             (case-replace "inr?(r!1)")
             (("1"
               (inst -10 "right(r!1)")
               (assert)
               (skosimp)
               (typepred "r!2")
               (expand "RD")
               (inst -3 "inr(r!2)")
               (flatten)
               (assert))
              ("2"
               (assert)
               (case "inl?(r!1)")
               (("1" (assert) (inst -2 "x!1") (flatten) (assert))
                ("2" (assert))))))))
          ("2"
           (hide 2)
           (split)
           (("1"
             (expand "nonempty?")
             (expand "empty?")
             (inst - "right(x!1)")
             (expand "member")
             (expand "RD")
             (case-replace "inr(right(x!1))=x!1")
             (decompose-equality))
            ("2"
             (expand "directed?")
             (skosimp)
             (expand "RD")
             (inst -7 "inr(x!2)" "inr(y!1)")
             (assert)
             (skosimp)
             (expand "+")
             (flatten)
             (inst + "right(z!1)")
             (("1" (assert))
              ("2"
               (expand "RD")
               (case-replace "inr(right[T1, T2](z!1))=z!1")
               (("1" (assert)) ("2" (decompose-equality))))))))))
        ("2"
         (hide 2)
         (apply-extensionality 1 :hide? t)
         (case-replace "D!1(x!2)")
         (("1"
           (expand "image")
           (expand "directed?")
           (inst - "x!1" "x!2")
           (assert)
           (skosimp)
           (expand "+")
           (flatten)
           (assert)
           (flatten)
           (inst + "right(x!2)")
           (("1" (assert) (decompose-equality))
            ("2"
             (expand "RD")
             (assert)
             (case-replace "inr(right[T1, T2](x!2))=x!2")
             (decompose-equality))))
          ("2"
           (assert)
           (expand "image")
           (skosimp)
           (replace -1)
           (typepred "x!3")
           (expand "RD")
           (propax))))))
      ("2" (assert))))))


proof_type: j_proof
decl_type: tcc
library: orders
theory: sum_orders
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (typepred "r2!1")
   (typepred "r1!1")
   (expand "directed_complete_partial_order?")
   (flatten)
   (lemma "sum_preserves_directed_complete" ("r1" "r1!1" "r2" "r2!1"))
   (("1" (propax)) ("2" (propax)) ("3" (propax))))


proof_type: f_proof
decl_type: formula
library: orders
theory: lift_props
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (case-replace "y1!1=y2!1")
   (("1" (assert))
    ("2"
     (assert)
     (lemma "up_down" ("y" "y1!1"))
     (lemma "up_down" ("y" "y2!1"))
     (assert))))


proof_type: f_proof
decl_type: formula
library: orders
theory: lift_props
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (case-replace "x1!1=x2!1")
   (("1" (assert))
    ("2"
     (assert)
     (lemma "down_equal" ("y1" "up(x1!1)" "y2" "up(x2!1)"))
     (assert))))


proof_type: t_proof
decl_type: tcc
library: orders
theory: partial_order_lift
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (typepred "lesseqp!1")
   (expand "pointed_directed_complete_partial_order?")
   (split)
   (("1"
     (expand "directed_complete_partial_order?")
     (expand "partial_order?")
     (expand "preorder?")
     (flatten)
     (split)
     (("1"
       (expand "reflexive?")
       (skosimp)
       (assert)
       (inst - "down[T](x!1)"))
      ("2"
       (expand "transitive?")
       (skosimp*)
       (assert)
       (flatten)
       (assert)
       (flatten)
       (inst - "down(x!1)" "down(y!1)" "down(z!1)")
       (assert))
      ("3"
       (expand "antisymmetric?")
       (skosimp*)
       (split -1)
       (("1" (assert))
        ("2"
         (flatten)
         (assert)
         (flatten)
         (inst - "down(x!1)" "down(y!1)")
         (assert)
         (lemma "down_equal" ("y1" "x!1" "y2" "y!1"))
         (assert))))
      ("4"
       (expand "directed_complete?")
       (skosimp)
       (typepred "D!1")
       (name "DD" "{x:T | D!1(up(x))}")
       (case "nonempty?(DD)")
       (("1"
         (inst - "DD")
         (("1"
           (expand "least_bounded_above?")
           (skosimp)
           (inst + "up(t!1)")
           (expand "least_upper_bound?")
           (flatten)
           (split)
           (("1"
             (hide -9)
             (expand "upper_bound?")
             (skosimp)
             (typepred "r!1")
             (inst -9 "down(r!1)")
             (expand "DD")
             (lemma "up_down" ("y" "r!1"))
             (assert))
            ("2"
             (skosimp)
             (expand "upper_bound?")
             (case-replace "r!1=bottom")
             (("1"
               (assert)
               (hide 1)
               (expand "nonempty?" -3)
               (expand "empty?")
               (skosimp)
               (expand "member")
               (expand "DD")
               (inst - "up(x!1)")
               (assert))
              ("2"
               (assert)
               (inst -10 "down(r!1)")
               (split -10)
               (("1" (propax))
                ("2"
                 (skosimp)
                 (typepred "r!2")
                 (expand "DD")
                 (inst - "up(r!2)")
                 (assert))))))))
          ("2"
           (assert)
           (hide 2)
           (expand "directed?")
           (skosimp)
           (expand "DD")
           (inst - "up(x!1)" "up(y!1)")
           (assert)
           (skosimp)
           (inst + "down(z!1)")
           (("1" (assert))
            ("2"
             (expand "DD")
             (lemma "up_down" ("y" "z!1"))
             (assert))))))
        ("2"
         (expand "nonempty?" 1)
         (expand "least_bounded_above?")
         (inst + "bottom")
         (expand "least_upper_bound?")
         (expand "upper_bound?")
         (hide -8 -4 -5 -6 -7 -2)
         (skosimp)
         (typepred "r!1")
         (expand "empty?")
         (expand "DD")
         (expand "member")
         (inst - "down(r!1)")
         (("1" (lemma "up_down" ("y" "r!1")) (assert))
          ("2" (assert))))))))
    ("2"
     (expand "has_least?")
     (expand "fullset")
     (inst + "bottom")
     (expand "least?")
     (expand "lower_bound?")
     (propax))))


proof_type: f_proof
decl_type: formula
library: orders
theory: lifted_orders
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (typepred "lub(lift(rel!1))(emptyset[lift[T]])")
   (lemma "lift_lub_emptyset_TCC1")
   (inst - "rel!1")
   (name-replace "LUB" "lub(lift(rel!1))(emptyset[lift[T]])")
   (hide -1)
   (expand "least_upper_bound?")
   (flatten)
   (expand "upper_bound?")
   (expand "lift")
   (inst -2 "bottom")
   (assert)
   (skosimp)
   (typepred "r!1")
   (expand "emptyset")
   (propax))


proof_type: f_proof
decl_type: formula
library: orders
theory: lifted_orders
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (lemma "lift_lub_bounded_TCC1" ("rel" "rel!1" "S" "S!1"))
   (typepred "lub(lift(rel!1))(image[T, lift[T]](up, S!1))")
   (name-replace "LUBL" "lub(lift(rel!1))(image[T, lift[T]](up, S!1))")
   (typepred "S!1")
   (typepred "lub(rel!1)(S!1)")
   (name-replace "LUB" "lub(rel!1)(S!1)")
   (hide -2 -4)
   (expand "least_upper_bound?")
   (flatten)
   (inst -4 "up(LUB)")
   (expand "upper_bound?")
   (expand "lift")
   (split -4)
   (("1"
     (typepred "S!1")
     (expand "nonempty_least_bounded_above?")
     (flatten)
     (hide-all-but (-1 1 -5))
     (expand "nonempty?")
     (expand "empty?")
     (skosimp)
     (expand "member")
     (inst - "up(x!1)")
     (("1" (assert)) ("2" (expand "image") (inst + "x!1"))))
    ("2"
     (inst -3 "down(LUBL)")
     (split -3)
     (("1"
       (typepred "rel!1")
       (expand "antisymmetric?")
       (inst - "LUB" "down(LUBL)")
       (assert)
       (replace -1)
       (typepred "S!1")
       (expand "nonempty_least_bounded_above?")
       (flatten)
       (expand "nonempty?")
       (expand "empty?")
       (skosimp)
       (expand "member")
       (inst-cp -7 "up(x!1)")
       (("1"
         (assert)
         (flatten)
         (hide -1 -2 -9)
         (lemma "up_down" ("y" "LUBL"))
         (assert))
        ("2" (expand "image") (inst + "x!1"))))
      ("2"
       (skosimp)
       (typepred "r!1")
       (hide 2 -2 -3)
       (inst - "up(r!1)")
       (("1" (assert)) ("2" (expand "image") (inst + "r!1"))))))
    ("3"
     (skosimp)
     (typepred "r!1")
     (expand "image")
     (skosimp)
     (replace -1)
     (rewrite "down_up")
     (typepred "x!1")
     (inst -4 "x!1"))))


proof_type: j_proof
decl_type: tcc
library: orders
theory: lifted_orders
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (typepred "r!1")
   (expand "lift")
   (expand "transitive?")
   (skosimp*)
   (assert)
   (flatten)
   (assert)
   (flatten)
   (inst - "down(x!1)" "down(y!1)" "down(z!1)")
   (assert))


proof_type: j_proof
decl_type: tcc
library: orders
theory: lifted_orders
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (expand "lift")
   (typepred "r!1")
   (expand "antisymmetric?")
   (skosimp)
   (split -2)
   (("1"
     (assert)
     (case-replace "x!1=bottom")
     (("1" (assert))
      ("2" (case-replace "y!1=bottom") (("1" (assert)) ("2" (assert))))))
    ("2"
     (flatten)
     (assert)
     (flatten)
     (inst - "down(x!1)" "down(y!1)")
     (assert)
     (lemma "down_equal" ("y1" "x!1" "y2" "y!1"))
     (assert))))


proof_type: t_proof
decl_type: tcc
library: orders
theory: lifted_orders
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (expand "lift")
   (expand "least_bounded_above?")
   (inst + "bottom")
   (expand "least_upper_bound?")
   (expand "upper_bound?")
   (skosimp)
   (typepred "r!1")
   (expand "emptyset")
   (propax))


proof_type: t_proof
decl_type: tcc
library: orders
theory: lifted_orders
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (typepred "S!1")
   (expand "least_bounded_above?")
   (case "nonempty?(S!1)")
   (("1"
     (expand "least_upper_bound?")
     (expand "lift")
     (expand "upper_bound?")
     (expand "nonempty_least_bounded_above?")
     (assert)
     (expand "least_bounded_above?")
     (skosimp)
     (inst + "up(t!1)")
     (expand "least_upper_bound?")
     (flatten)
     (expand "upper_bound?")
     (split)
     (("1"
       (skosimp)
       (assert)
       (typepred "r!1")
       (expand "image")
       (skosimp)
       (inst -4 "x!1")
       (replace -1)
       (rewrite "down_up"))
      ("2"
       (skosimp)
       (case-replace "r!1=bottom")
       (("1"
         (hide 1 -1)
         (expand "nonempty?")
         (expand "empty?")
         (skosimp)
         (expand "member")
         (assert)
         (inst - "up(x!1)")
         (("1" (assert)) ("2" (expand "image") (inst + "x!1"))))
        ("2"
         (assert)
         (inst -5 "down(r!1)")
         (assert)
         (skosimp)
         (typepred "r!2")
         (inst -2 "up(r!2)")
         (("1" (assert)) ("2" (expand "image") (inst + "r!2"))))))))
    ("2"
     (expand "nonempty?")
     (inst + "bottom")
     (hide -2)
     (expand "least_upper_bound?")
     (expand "upper_bound?")
     (expand "lift")
     (skosimp)
     (typepred "r!1")
     (expand "image")
     (skosimp)
     (typepred "x!1")
     (expand "empty?")
     (inst - "x!1")
     (expand "member")
     (propax))))


proof_type: j_proof
decl_type: tcc
library: orders
theory: lifted_orders
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (typepred "r!1")
   (expand "lift")
   (expand "directed_complete?")
   (skosimp*)
   (expand "least_bounded_above?")
   (typepred "D!1")
   (name "DD" "{x:T | EXISTS (z:(D!1)): z = up(x)}")
   (case "nonempty?(DD)")
   (("1"
     (inst -6 "DD")
     (("1"
       (skosimp)
       (inst + "up(t!1)")
       (expand "least_upper_bound?")
       (flatten)
       (split)
       (("1"
         (hide -7)
         (expand "upper_bound?")
         (skosimp)
         (typepred "r!2")
         (inst -8 "down(r!2)")
         (expand "DD")
         (inst + "r!2")
         (lemma "up_down" ("y" "r!2"))
         (assert))
        ("2"
         (skosimp)
         (case-replace "r!2=bottom")
         (("1"
           (hide -8 -9 1 -6 -4 -1)
           (expand "upper_bound?")
           (expand "nonempty?" -2)
           (expand "empty?")
           (skosimp)
           (expand "member")
           (expand "DD")
           (skosimp)
           (inst - "z!1")
           (assert))
          ("2"
           (assert)
           (inst -8 "down(r!2)")
           (split -8)
           (("1" (propax))
            ("2"
             (expand "upper_bound?")
             (skosimp)
             (typepred "r!3")
             (expand "DD")
             (skosimp)
             (typepred "z!1")
             (inst -3 "z!1")
             (assert)
             (replace -2)
             (rewrite "down_up"))))))))
      ("2"
       (assert)
       (hide 2)
       (expand "directed?")
       (skosimp)
       (expand "DD")
       (skosimp*)
       (inst - "up(x!1)" "up(y!1)")
       (assert)
       (skosimp)
       (inst + "down(z!3)")
       (("1" (assert))
        ("2"
         (expand "DD")
         (inst + "z!3")
         (lemma "up_down" ("y" "z!3"))
         (assert))))))
    ("2"
     (expand "nonempty?" 1)
     (expand "empty?")
     (expand "member")
     (expand "DD" -1)
     (inst + "bottom")
     (expand "least_upper_bound?")
     (expand "upper_bound?")
     (skosimp)
     (typepred "r!2")
     (lemma "up_down" ("y" "r!2"))
     (assert)
     (inst -3 "down(r!2)")
     (inst + "r!2")
     (assert))))


proof_type: j_proof
decl_type: tcc
library: orders
theory: lifted_orders
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (typepred "r!1")
   (expand "pointed_directed_complete_partial_order?")
   (split)
   (("1"
     (lemma "lift_preserves_directed_complete" ("r" "r!1"))
     (("1"
       (lemma "lift_preserves_partial_order" ("r" "r!1"))
       (expand "directed_complete_partial_order?")
       (propax))
      ("2" (expand "directed_complete_partial_order?") (flatten))))
    ("2"
     (expand "fullset")
     (expand "lift")
     (expand "has_least?")
     (inst + "bottom")
     (expand "least?")
     (expand "lower_bound?")
     (propax))))


proof_type: f_proof
decl_type: formula
library: orders
theory: partial_order_props
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (typepred "<=")
   (expand "partial_order?")
   (expand "preorder?")
   (expand "reflexive?")
   (flatten))


proof_type: f_proof
decl_type: formula
library: orders
theory: partial_order_props
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (typepred "<=")
   (expand "partial_order?")
   (expand "preorder?")
   (flatten)
   (expand "antisymmetric?")
   (propax))


proof_type: f_proof
decl_type: formula
library: orders
theory: partial_order_props
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (typepred "<=")
   (expand "partial_order?")
   (expand "preorder?")
   (flatten)
   (expand "transitive?")
   (propax))


proof_type: f_proof
decl_type: formula
library: orders
theory: partial_order_props
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (expand "down")
   (expand "subset?")
   (expand "member")
   (skosimp*)
   (assert)
   (lemma "partial_order_transitive" ("x" "x!2" "y" "x!1" "z" "y!1"))
   (assert))


proof_type: f_proof
decl_type: formula
library: orders
theory: partial_order_props
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (expand "up")
   (expand "subset?")
   (expand "member")
   (skosimp*)
   (lemma "partial_order_transitive" ("x" "x!1" "y" "y!1" "z" "x!2"))
   (assert))


proof_type: f_proof
decl_type: formula
library: orders
theory: partial_order_props
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (split)
   (("1"
     (flatten)
     (apply-extensionality :hide? t)
     (case-replace "S!1(x!1)")
     (("1"
       (expand "Union")
       (inst + "down(x!1)")
       (("1" (expand "down") (assert))
        ("2" (expand "image") (expand "extend") (inst + "x!1"))))
      ("2"
       (assert)
       (expand "Union")
       (skosimp)
       (typepred "a!1")
       (expand "extend")
       (prop)
       (expand "image")
       (skosimp)
       (replace -2 -3)
       (hide -1 -2)
       (expand "lower_set?")
       (inst - "x!2" "x!1")
       (expand "member")
       (expand "down")
       (propax))))
    ("2"
     (flatten)
     (expand "lower_set?")
     (skosimp)
     (expand "member")
     (replace -1)
     (hide -1)
     (expand "Union")
     (skosimp)
     (typepred "a!1")
     (expand "extend")
     (case-replace "lower_set?(a!1)")
     (("1"
       (expand "lower_set?")
       (inst - "x!1" "y!1")
       (expand "member")
       (replace -4 -1)
       (assert)
       (expand "image")
       (skosimp)
       (inst + "a!1"))
      ("2" (assert))))))


proof_type: f_proof
decl_type: formula
library: orders
theory: partial_order_props
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (split)
   (("1"
     (flatten)
     (apply-extensionality :hide? t)
     (case-replace "S!1(x!1)")
     (("1"
       (expand "Union")
       (inst + "up(x!1)")
       (("1" (expand "up") (assert))
        ("2" (expand "image") (expand "extend") (inst + "x!1"))))
      ("2"
       (assert)
       (expand "Union")
       (skosimp)
       (typepred "a!1")
       (expand "extend")
       (prop)
       (expand "image")
       (skosimp)
       (expand "upper_set?")
       (typepred "x!2")
       (replace -3 -4)
       (hide -2 -3)
       (inst - "x!2" "x!1")
       (expand "member")
       (expand "up")
       (propax))))
    ("2"
     (flatten)
     (expand "upper_set?")
     (skosimp)
     (expand "member")
     (replace -1)
     (hide -1)
     (expand "Union")
     (skosimp)
     (typepred "a!1")
     (expand "extend")
     (case-replace "upper_set?(a!1)")
     (("1"
       (expand "image")
       (skosimp)
       (inst + "a!1")
       (expand "upper_set?")
       (inst - "x!1" "y!1")
       (replace -4 -1)
       (expand "member")
       (assert))
      ("2" (assert))))))


proof_type: t_proof
decl_type: tcc
library: orders
theory: partial_order_props
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (expand "lower_sets?")
   (expand "every")
   (skosimp)
   (typepred "x!1")
   (expand "emptyset")
   (propax))


proof_type: t_proof
decl_type: tcc
library: orders
theory: partial_order_props
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (expand "upper_sets?")
   (expand "every")
   (skosimp)
   (typepred "x!1")
   (expand "emptyset")
   (propax))


proof_type: j_proof
decl_type: tcc
library: orders
theory: partial_order_props
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (typepred "L!1")
   (expand "complement")
   (expand "upper_set?")
   (expand "lower_set?")
   (skosimp)
   (expand "member")
   (inst - "y!1" "x!1")
   (assert))


proof_type: j_proof
decl_type: tcc
library: orders
theory: partial_order_props
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (typepred "U!1")
   (expand "upper_set?")
   (expand "lower_set?")
   (expand "complement")
   (expand "member")
   (skosimp*)
   (inst - "y!1" "x!1")
   (replace -2)
   (assert))


proof_type: j_proof
decl_type: tcc
library: orders
theory: partial_order_props
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (typepred "LS!1")
   (expand "Complement")
   (expand "upper_sets?")
   (expand "lower_sets?")
   (expand "every")
   (skosimp)
   (typepred "x!1")
   (skosimp)
   (inst - "b!1")
   (assert)
   (replace -1)
   (rewrite "complement_lower_set"))


proof_type: j_proof
decl_type: tcc
library: orders
theory: partial_order_props
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (typepred "US!1")
   (expand "upper_sets?")
   (expand "Complement")
   (expand "lower_sets?")
   (expand "every")
   (skosimp)
   (typepred "x!1")
   (skosimp)
   (replace -1)
   (inst - "b!1")
   (rewrite "complement_upper_set"))


proof_type: t_proof
decl_type: tcc
library: orders
theory: partial_order_props
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (expand "lower_set?")
   (expand "member")
   (skosimp*)
   (assert)
   (lemma "partial_order_transitive" ("x" "y!1" "y" "x!2" "z" "x!1"))
   (assert))


proof_type: j_proof
decl_type: tcc
library: orders
theory: partial_order_props
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (typepred "LS!1")
   (expand "lower_sets?")
   (expand "lower_set?")
   (expand "every")
   (expand "member")
   (expand "Union")
   (skosimp*)
   (typepred "a!1")
   (inst - "a!1")
   (inst - "x!1" "y!1")
   (replace -4)
   (assert)
   (inst + "a!1"))


proof_type: j_proof
decl_type: tcc
library: orders
theory: partial_order_props
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (typepred "US!1")
   (expand "upper_sets?")
   (expand "upper_set?")
   (expand "Union")
   (expand "every")
   (expand "member")
   (skosimp*)
   (inst - "a!1")
   (inst - "x!1" "y!1")
   (replace -3)
   (assert)
   (inst + "a!1"))


proof_type: j_proof
decl_type: tcc
library: orders
theory: partial_order_props
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (typepred "LS!1")
   (expand "lower_sets?")
   (expand "lower_set?")
   (expand "Intersection")
   (expand "member")
   (skosimp*)
   (expand "every")
   (typepred "a!1")
   (inst - "a!1")
   (inst - "a!1")
   (inst - "x!1" "y!1")
   (replace -4)
   (assert))


proof_type: j_proof
decl_type: tcc
library: orders
theory: partial_order_props
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (typepred "US!1")
   (expand "upper_sets?")
   (expand "every")
   (expand "upper_set?")
   (expand "Intersection")
   (expand "member")
   (skosimp*)
   (inst - "a!1")
   (inst - "a!1")
   (inst - "x!1" "y!1")
   (replace -3)
   (assert))


proof_type: j_proof
decl_type: tcc
library: orders
theory: partial_order_props
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (typepred "L1!1")
   (typepred "L2!1")
   (expand "lower_set?")
   (expand "union")
   (expand "member")
   (skosimp*)
   (inst - "x!1" "y!1")
   (inst - "x!1" "y!1")
   (replace -4)
   (split -3)
   (("1" (assert)) ("2" (assert))))


proof_type: j_proof
decl_type: tcc
library: orders
theory: partial_order_props
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (typepred "U1!1")
   (typepred "U2!1")
   (expand "union")
   (expand "upper_set?")
   (expand "member")
   (skosimp*)
   (inst - "x!1" "y!1")
   (inst - "x!1" "y!1")
   (replace -4)
   (split -3)
   (("1" (assert)) ("2" (assert))))


proof_type: j_proof
decl_type: tcc
library: orders
theory: partial_order_props
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (typepred "L1!1")
   (typepred "L2!1")
   (expand "intersection")
   (expand "lower_set?")
   (expand "member")
   (skosimp)
   (inst - "x!1" "y!1")
   (inst - "x!1" "y!1")
   (replace -5)
   (assert))


proof_type: j_proof
decl_type: tcc
library: orders
theory: partial_order_props
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (typepred "U1!1")
   (typepred "U2!1")
   (expand "upper_set?")
   (expand "intersection")
   (expand "member")
   (skosimp)
   (inst - "x!1" "y!1")
   (inst - "x!1" "y!1")
   (replace -5)
   (assert))


proof_type: f_proof
decl_type: formula
library: orders
theory: bounded_order_props
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (typepred "SA!1")
   (typepred "lub(SA!1)")
   (typepred "lub(<=)(SA!1)")
   (expand "least_upper_bound?")
   (flatten)
   (typepred "<=")
   (expand "partial_order?")
   (flatten)
   (inst - "lub(SA!1)")
   (inst - "lub(<=)(SA!1)")
   (split -4)
   (("1"
     (split -6)
     (("1"
       (expand "antisymmetric?")
       (inst - "lub(SA!1)" "lub(<=)(SA!1)")
       (assert))
      ("2" (propax))))
    ("2" (propax))))


proof_type: f_proof
decl_type: formula
library: orders
theory: bounded_order_props
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (typepred "lub(singleton(x!1))")
   (expand "least_upper_bound?")
   (flatten)
   (inst - "x!1")
   (expand "upper_bound?")
   (inst - "x!1")
   (("1"
     (split -2)
     (("1"
       (typepred "<=")
       (expand "partial_order?")
       (flatten)
       (expand "antisymmetric?")
       (inst - "lub(singleton(x!1))" "x!1")
       (assert))
      ("2"
       (skosimp)
       (typepred "r!1")
       (expand "singleton")
       (typepred "<=")
       (expand "partial_order?")
       (expand "preorder?")
       (flatten)
       (expand "reflexive?")
       (inst - "r!1")
       (assert))))
    ("2" (expand "singleton") (propax))))


proof_type: f_proof
decl_type: formula
library: orders
theory: bounded_order_props
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (typepred "lub(SA!1)")
   (case-replace "lub(SA!1)=x!1")
   (("1" (assert))
    ("2"
     (assert)
     (name-replace "LUB" "lub(SA!1)")
     (lemma "unique_least_upper_bound[T]")
     (inst - "SA!1" "<=" "_" "_")
     (inst - "LUB" "x!1"))))


proof_type: f_proof
decl_type: formula
library: orders
theory: bounded_order_props
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (typepred "lub(YA!1)")
   (typepred "lub(XA!1)")
   (expand "least_upper_bound?")
   (flatten)
   (inst -4 "lub(XA!1)")
   (split -4)
   (("1" (propax))
    ("2"
     (expand "upper_bound?")
     (skosimp)
     (typepred "r!1")
     (expand "above?")
     (inst -5 "r!1")
     (skosimp)
     (typepred "y!1")
     (inst -3 "y!1")
     (assert)
     (typepred "<=")
     (expand "partial_order?")
     (expand "preorder?")
     (flatten)
     (expand "transitive?")
     (inst - "r!1" "y!1" "lub(XA!1)")
     (assert))))


proof_type: f_proof
decl_type: formula
library: orders
theory: bounded_order_props
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (typepred "SB!1")
   (typepred "glb(<=)(SB!1)")
   (typepred "glb(SB!1)")
   (typepred "<=")
   (expand "partial_order?")
   (expand "greatest_lower_bound?")
   (flatten)
   (inst - "glb(<=)(SB!1)")
   (inst - "glb(SB!1)")
   (split -4)
   (("1"
     (split -6)
     (("1"
       (expand "antisymmetric?")
       (inst - "glb(SB!1)" "glb(<=)(SB!1)")
       (assert))
      ("2" (propax))))
    ("2" (propax))))


proof_type: f_proof
decl_type: formula
library: orders
theory: bounded_order_props
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (typepred "glb(singleton(x!1))")
   (expand "greatest_lower_bound?")
   (flatten)
   (expand "lower_bound?")
   (case "singleton(x!1)(x!1)")
   (("1"
     (inst - "x!1")
     (inst - "x!1")
     (split -3)
     (("1"
       (typepred "<=")
       (expand "partial_order?")
       (flatten)
       (expand "antisymmetric?")
       (inst - "glb(singleton(x!1))" "x!1")
       (assert))
      ("2"
       (skosimp)
       (typepred "r!1")
       (expand "singleton")
       (typepred "<=")
       (expand "partial_order?")
       (expand "preorder?")
       (flatten)
       (expand "reflexive?")
       (inst - "x!1")
       (assert))))
    ("2" (expand "singleton") (propax))))


proof_type: f_proof
decl_type: formula
library: orders
theory: bounded_order_props
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (typepred "glb(SB!1)")
   (case-replace "glb(SB!1) = x!1")
   (("1" (assert))
    ("2"
     (assert)
     (lemma "unique_greatest_lower_bound"
      ("<=" "<=" "S" "SB!1" "t" "glb(SB!1)" "r" "x!1"))
     (propax))))


proof_type: f_proof
decl_type: formula
library: orders
theory: bounded_order_props
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (typepred "glb(XB!1)")
   (typepred "glb(YB!1)")
   (expand "greatest_lower_bound?")
   (flatten)
   (inst - "glb(XB!1)")
   (split -2)
   (("1" (propax))
    ("2"
     (hide 2)
     (expand "lower_bound?")
     (skosimp)
     (typepred "r!1")
     (expand "below?")
     (inst -5 "r!1")
     (skosimp)
     (inst -3 "y!1")
     (typepred "<=")
     (expand "partial_order?")
     (expand "preorder?")
     (flatten)
     (expand "transitive?")
     (inst - "glb(XB!1)" "y!1" "r!1")
     (assert))))


proof_type: j_proof
decl_type: tcc
library: orders
theory: bounded_order_props
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (typepred "x!1")
   (expand "lub_set?")
   (expand "singleton?")
   (expand "least_bounded_above?")
   (skosimp)
   (typepred "x!2")
   (inst + "x!2")
   (expand "least_upper_bound?")
   (split)
   (("1"
     (expand "upper_bound?")
     (skosimp)
     (inst - "r!1")
     (assert)
     (typepred "<=")
     (expand "partial_order?")
     (expand "preorder?")
     (flatten)
     (expand "reflexive?")
     (inst - "r!1")
     (assert))
    ("2" (skosimp) (expand "upper_bound?") (inst - "x!2"))))


proof_type: t_proof
decl_type: tcc
library: orders
theory: bounded_order_props
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (inst +
    "LAMBDA (S:(lub_set?)):epsilon!(x:T):bounded_orders[T].least_upper_bound?(x,S,<=)")
   (("1"
     (skosimp)
     (typepred "S!1")
     (expand "lub_set?")
     (use "epsilon_ax[T]")
     (("1"
       (split -1)
       (("1" (propax)) ("2" (expand "least_bounded_above?") (propax))))
      ("2" (expand "least_bounded_above?") (skosimp) (inst + "t!1"))))
    ("2"
     (skosimp)
     (typepred "S!1")
     (expand "lub_set?")
     (expand "least_bounded_above?")
     (skosimp)
     (inst + "t!1"))))


proof_type: j_proof
decl_type: tcc
library: orders
theory: bounded_order_props
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (typepred "x!1")
   (expand "singleton?")
   (skosimp)
   (expand "glb_set?")
   (expand "greatest_bounded_below?")
   (inst + "x!2")
   (expand "greatest_lower_bound?")
   (split)
   (("1"
     (expand "lower_bound?")
     (skosimp)
     (typepred "<=")
     (expand "partial_order?")
     (expand "preorder?")
     (flatten)
     (expand "reflexive?")
     (inst - "x!2")
     (typepred "r!1")
     (inst - "r!1")
     (assert))
    ("2" (skosimp) (expand "lower_bound?") (inst - "x!2"))))


proof_type: t_proof
decl_type: tcc
library: orders
theory: bounded_order_props
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (inst +
    "LAMBDA (S:(glb_set?)):epsilon!(x:T):bounded_orders[T].greatest_lower_bound?(x,S,<=)")
   (("1"
     (skosimp)
     (typepred "S!1")
     (use "epsilon_ax[T]")
     (("1"
       (split -1)
       (("1" (propax))
        ("2"
         (expand "glb_set?")
         (expand "greatest_bounded_below?")
         (propax))))
      ("2"
       (expand "glb_set?")
       (expand "greatest_bounded_below?")
       (skosimp)
       (inst + "t!1"))))
    ("2"
     (skosimp)
     (typepred "S!1")
     (expand "glb_set?")
     (expand "greatest_bounded_below?")
     (skosimp)
     (inst + "t!1"))))


proof_type: f_proof
decl_type: formula
library: orders
theory: directed_order_props
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (typepred "U!1")
   (typepred "D!1")
   (expand "directed?")
   (expand "directed?")
   (skosimp*)
   (expand "intersection")
   (expand "member")
   (flatten)
   (inst - "x!1" "y!1")
   (assert)
   (skosimp)
   (typepred "z!1")
   (expand "upper_set?")
   (inst - "x!1" "z!1")
   (expand "member")
   (assert)
   (inst + "z!1")
   (("1" (assert))
    ("2" (expand "intersection") (expand "member") (propax))))


proof_type: f_proof
decl_type: formula
library: orders
theory: directed_order_props
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (expand "member")
   (typepred "L!1")
   (typepred "D!1")
   (expand "lower_set?")
   (expand "directed?")
   (expand "directed?")
   (expand "member")
   (inst - "x!1" "y!1")
   (assert)
   (skosimp)
   (case "L!1(z!1)")
   (("1" (inst - "z!1" "y!1") (assert)) ("2" (inst + "z!1") (assert))))


proof_type: f_proof
decl_type: formula
library: orders
theory: directed_order_props
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (typepred "L1!1")
   (typepred "L2!1")
   (typepred "D!1")
   (name "D1" "difference(D!1,L1!1)")
   (name "D2" "difference(D!1,L2!1)")
   (case "nonempty?(D1)")
   (("1"
     (case "nonempty?(D2)")
     (("1"
       (expand "nonempty?")
       (expand "empty?")
       (expand "member")
       (skolem 1 ("y"))
       (skolem 1 ("x"))
       (expand "D2")
       (expand "D1")
       (hide -3 -4)
       (expand "difference")
       (expand "member")
       (flatten)
       (expand "lower_set?")
       (expand "member")
       (expand "directed?")
       (expand "directed?")
       (inst - "x" "y")
       (assert)
       (skolem! -)
       (flatten)
       (typepred "z!1")
       (expand "union")
       (expand "subset?")
       (expand "member")
       (inst-cp -8 "z!1")
       (assert)
       (split -9)
       (("1" (inst -8 "z!1" "x") (assert))
        ("2" (inst -7 "z!1" "y") (assert))))
      ("2"
       (expand "D2")
       (hide-all-but (1 3))
       (expand "difference")
       (expand "nonempty?")
       (expand "empty?")
       (expand "subset?")
       (expand "member")
       (skosimp*)
       (inst - "x!1")
       (assert))))
    ("2"
     (expand "D1")
     (hide-all-but (1 2 -3))
     (expand "nonempty?")
     (expand "difference")
     (expand "empty?")
     (expand "subset?")
     (expand "member")
     (skosimp*)
     (inst - "x!2")
     (assert))))


proof_type: j_proof
decl_type: tcc
library: orders
theory: directed_order_props
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (typepred "x!1")
   (expand "lub_set?")
   (typepred "<=")
   (expand "directed_complete_partial_order?")
   (flatten)
   (expand "directed_complete?")
   (expand "directed?")
   (inst - "x!1"))


proof_type: j_proof
decl_type: tcc
library: orders
theory: directed_order_props
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (expand "singleton")
   (expand "directed?")
   (expand "directed?")
   (skosimp*)
   (inst + "x!1")
   (lemma "partial_order_reflexive" ("x" "x!1"))
   (assert))


proof_type: f_proof
decl_type: formula
library: orders
theory: skolemization
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skolem!)
   (prop)
   (("1"
     (inst + "LAMBDA d: epsilon(LAMBDA r: p!1(d, r))")
     (("1"
       (skolem!)
       (inst?)
       (use "epsilon_ax[R]")
       (("1" (replace*)) ("2" (skolem!) (inst?))))
      ("2" (skolem!) (inst - "d!1") (skolem!) (inst?))))
    ("2" (skosimp*) (inst?) (inst?))))


proof_type: f_proof
decl_type: formula
library: orders
theory: skolemization
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skolem!)
   (prop)
   (("1" (skosimp*) (inst?) (inst?))
    ("2"
     (inst - "LAMBDA d: epsilon(LAMBDA r: NOT p!1(d, r))")
     (("1"
       (skolem!)
       (inst?)
       (use "epsilon_ax[R]")
       (("1" (prop) (hide -1) (skolem!) (inst?))
        ("2" (hide -1) (skolem!) (inst?))))
      ("2" (skolem!) (inst 2 "d!1") (skolem!) (inst?))))))


proof_type: f_proof
decl_type: formula
library: orders
theory: infinite_pigeonhole
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skolem!)
   (decompose-equality)
   (expand* "fullset" "IUnion" "Union")
   (inst + "f!1(x!1)")
   (expand* "inverse_image" "inverse_image" "member" "singleton"))


proof_type: f_proof
decl_type: formula
library: orders
theory: infinite_pigeonhole
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skolem!)
   (use "Union_inverse_image")
   (rewrite "IUnion_Union")
   (use "Union_finite[D]")
   (replace -2 :dir rl :hide? t)
   (rewrite "finite_full" :dir rl)
   (rewrite "domain_infiniteness")
   (prop)
   (("1"
     (hide-all-but 1)
     (expand "image")
     (rewrite "finite_image")
     (rewrite "finite_full" :dir rl)
     (forward-chain "range_finiteness"))
    ("2"
     (expand "every")
     (skolem-typepred)
     (expand* "image" "image")
     (expand "inverse_image" -)
     (skolem!)
     (replace -1 :hide? t)
     (inst?))))


proof_type: f_proof
decl_type: formula
library: orders
theory: function_image_extra
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skolem!)
   (rewrite "add_as_union")
   (rewrite "add_as_union")
   (rewrite "image_union")
   (rewrite "image_singleton"))


proof_type: j_proof
decl_type: tcc
library: orders
theory: bounded_sets
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skolem-typepred)
   (expand* "least_bounded_above?" "bounded_above?" "least_upper_bound?")
   (skosimp)
   (inst? +))


proof_type: j_proof
decl_type: tcc
library: orders
theory: bounded_sets
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skolem-typepred)
   (expand* "greatest_bounded_below?" "bounded_below?"
    "greatest_lower_bound?")
   (skosimp)
   (inst? +))


proof_type: j_proof
decl_type: tcc
library: orders
theory: bounded_sets
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skolem-typepred)
   (expand* "tightly_bounded?" "bounded?")
   (rewrite "least_bounded_above_is_bounded_above")
   (rewrite "greatest_bounded_below_is_bounded_below"))


proof_type: j_proof
decl_type: tcc
library: orders
theory: bounded_sets
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skolem-typepred)
   (expand* "bounded_above?" "upper_bound?")
   (skolem!)
   (inst? +)
   (skolem-typepred)
   (expand* "intersection" "member")
   (flatten)
   (inst?))


proof_type: j_proof
decl_type: tcc
library: orders
theory: bounded_sets
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skolem-typepred)
   (rewrite "difference_intersection")
   (rewrite "intersection1_preserves_bounded_above"))


proof_type: j_proof
decl_type: tcc
library: orders
theory: bounded_sets
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skolem-typepred)
   (expand* "bounded_below?" "lower_bound?")
   (skolem!)
   (inst? +)
   (skolem-typepred)
   (expand* "intersection" "member")
   (flatten)
   (inst?))


proof_type: j_proof
decl_type: tcc
library: orders
theory: bounded_sets
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skolem-typepred)
   (rewrite "difference_intersection")
   (rewrite "intersection1_preserves_bounded_below"))


proof_type: j_proof
decl_type: tcc
library: orders
theory: bounded_sets
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skolem-typepred)
   (rewrite "remove_as_difference")
   (rewrite "difference_preserves_bounded_below"))


proof_type: f_proof
decl_type: formula
library: orders
theory: upper_semilattices
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skolem!)
   (expand* "least_upper_bound?" "upper_bound?")
   (split)
   (("1"
     (typepred "<=")
     (expand* "upper_semilattice?" "partial_order?" "preorder?"
      "reflexive?")
     (skosimp :preds? t)
     (expand "singleton")
     (inst?)
     (assert))
    ("2" (skosimp) (inst - "t!1") (expand "singleton") (propax))))


proof_type: f_proof
decl_type: formula
library: orders
theory: upper_semilattices
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skolem!)
   (invoke (typepred "%1") (! 1 l))
   (rewrite "unique_least_upper_bound")
   (rewrite "least_upper_bound_singleton"))


proof_type: f_proof
decl_type: formula
library: orders
theory: upper_semilattices
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skolem!)
   (expand "lub")
   (invoke (typepred "%1") (! 1 l l))
   (invoke (name-replace "L" "%1") (! 1 l l))
   (expand "least_upper_bound?")
   (typepred "<=")
   (prop)
   (("1"
     (hide -4)
     (expand "upper_bound?")
     (inst - "t!1")
     (("1"
       (expand* "upper_semilattice?" "partial_order?" "preorder?"
        "transitive?")
       (flatten)
       (inst - "t!1" "L" "s!1")
       (assert))
      ("2" (expand* "union" "singleton" "member"))))
    ("2"
     (hide -4)
     (expand "upper_bound?")
     (inst - "u!1")
     (("1"
       (expand* "upper_semilattice?" "partial_order?" "preorder?"
        "transitive?")
       (flatten)
       (inst - "u!1" "L" "s!1")
       (assert))
      ("2" (expand* "union" "singleton" "member"))))
    ("3"
     (hide -4)
     (inst - "s!1")
     (assert)
     (expand "upper_bound?")
     (skolem-typepred)
     (expand* "union" "singleton" "member")
     (assert))))


proof_type: f_proof
decl_type: formula
library: orders
theory: upper_semilattices
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (expand "lub")
   (invoke (typepred "%1") (! 1 r))
   (invoke (name-replace "L" "%1") (! 1 r))
   (expand "least_upper_bound?")
   (flatten)
   (hide -2)
   (expand "upper_bound?")
   (inst - "t!1")
   (("1"
     (typepred "<=")
     (expand* "upper_semilattice?" "partial_order?" "preorder?"
      "transitive?")
     (flatten)
     (inst - "s!1" "t!1" "L")
     (assert))
    ("2" (expand* "union" "singleton" "member"))))


proof_type: f_proof
decl_type: formula
library: orders
theory: upper_semilattices
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (expand "lub")
   (invoke (typepred "%1") (! 1 r))
   (invoke (name-replace "L" "%1") (! 1 r))
   (expand "least_upper_bound?")
   (flatten)
   (hide -2)
   (expand "upper_bound?")
   (inst - "u!1")
   (("1"
     (typepred "<=")
     (expand* "upper_semilattice?" "partial_order?" "preorder?"
      "transitive?")
     (flatten)
     (inst - "s!1" "u!1" "L")
     (assert))
    ("2" (expand* "union" "singleton" "member"))))


proof_type: f_proof
decl_type: formula
library: orders
theory: upper_semilattices
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (expand "least_upper_bound?")
   (prop)
   (("1"
     (hide -4 -2)
     (expand "upper_bound?")
     (skolem-typepred)
     (expand* "union" "member")
     (inst - "r!1")
     (("1" (rewrite "le_lub_1"))
      ("2" (assert) (inst - "r!1") (rewrite "le_lub_2"))))
    ("2"
     (skosimp)
     (rewrite "lub_le")
     (split)
     (("1"
       (hide -5 -4 -2)
       (inst?)
       (assert)
       (expand "upper_bound?")
       (skolem!)
       (inst - "r!2")
       (expand* "union" "member"))
      ("2"
       (hide -4 -3 -2)
       (inst?)
       (assert)
       (expand "upper_bound?")
       (skolem!)
       (inst - "r!2")
       (expand* "union" "member"))))))


proof_type: f_proof
decl_type: formula
library: orders
theory: upper_semilattices
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (rewrite "add_as_union")
   (rewrite "least_upper_bound_union")
   (rewrite "least_upper_bound_singleton"))


proof_type: f_proof
decl_type: formula
library: orders
theory: upper_semilattices
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skolem!)
   (invoke (typepred "%1" "%2" "%3") (! 1 l) (! 1 r 1) (! 1 r 2))
   (invoke (name-replace "LU" "%1") (! 1 l))
   (invoke (name-replace "L1" "%1") (! 1 r 1))
   (invoke (name-replace "L2" "%1") (! 1 r 2))
   (use "least_upper_bound_union")
   (assert)
   (use "unique_least_upper_bound"))


proof_type: j_proof
decl_type: tcc
library: orders
theory: upper_semilattices
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skolem-typepred)
   (expand "bounded_above?")
   (skosimp*)
   (inst + "lub(t!1, t!2)")
   (expand "upper_bound?")
   (skolem-typepred)
   (expand* "union" "member")
   (split)
   (("1" (inst?) (rewrite "le_lub_1"))
    ("2" (inst? -3) (rewrite "le_lub_2"))))


proof_type: j_proof
decl_type: tcc
library: orders
theory: upper_semilattices
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skolem-typepred)
   (expand "least_bounded_above?")
   (skosimp*)
   (inst + "lub(t!1, t!2)")
   (rewrite "least_upper_bound_union"))


proof_type: j_proof
decl_type: tcc
library: orders
theory: upper_semilattices
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skolem-typepred)
   (rewrite "add_as_union")
   (rewrite "union_preserves_least_bounded_above"))


proof_type: f_proof
decl_type: formula
library: orders
theory: lower_semilattices
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skolem!)
   (expand "greatest_lower_bound?")
   (split)
   (("1"
     (typepred "<=")
     (expand* "singleton" "lower_bound?" "lower_semilattice?"
      "partial_order?" "preorder?" "reflexive?")
     (skosimp :preds? t)
     (inst?)
     (assert))
    ("2" (skosimp) (expand* "singleton" "lower_bound?") (inst?))))


proof_type: f_proof
decl_type: formula
library: orders
theory: lower_semilattices
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skolem!)
   (invoke (typepred "%1") (! 1 l))
   (rewrite "unique_greatest_lower_bound")
   (rewrite "greatest_lower_bound_singleton"))


proof_type: f_proof
decl_type: formula
library: orders
theory: lower_semilattices
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skolem!)
   (expand "glb")
   (invoke (typepred "%1") (! 1 l r))
   (invoke (name-replace "L" "%1") (! 1 l r))
   (typepred "<=")
   (expand "greatest_lower_bound?")
   (prop)
   (("1"
     (hide -4)
     (expand "lower_bound?")
     (inst - "t!1")
     (("1"
       (expand* "lower_semilattice?" "partial_order?" "preorder?"
        "transitive?")
       (flatten)
       (inst - "s!1" "L" "t!1")
       (assert))
      ("2" (expand* "union" "singleton" "member"))))
    ("2"
     (hide -4)
     (expand "lower_bound?")
     (inst - "u!1")
     (("1"
       (expand* "lower_semilattice?" "partial_order?" "preorder?"
        "transitive?")
       (flatten)
       (inst - "s!1" "L" "u!1")
       (assert))
      ("2" (expand* "union" "singleton" "member"))))
    ("3"
     (hide -4)
     (inst - "s!1")
     (assert)
     (expand* "union" "singleton" "member" "lower_bound?")
     (skolem-typepred)
     (assert))))


proof_type: f_proof
decl_type: formula
library: orders
theory: lower_semilattices
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (expand "glb")
   (invoke (typepred "%1") (! 1 l))
   (invoke (name-replace "L" "%1") (! 1 l))
   (expand* "greatest_lower_bound?" "lower_bound?")
   (flatten)
   (inst - "t!1")
   (("1"
     (typepred "<=")
     (expand* "lower_semilattice?" "partial_order?" "preorder?"
      "transitive?")
     (flatten)
     (inst - "L" "t!1" "s!1")
     (assert))
    ("2" (expand* "union" "singleton" "member"))))


proof_type: f_proof
decl_type: formula
library: orders
theory: lower_semilattices
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (expand "glb")
   (invoke (typepred "%1") (! 1 l))
   (invoke (name-replace "L" "%1") (! 1 l))
   (expand* "greatest_lower_bound?" "lower_bound?")
   (flatten)
   (inst - "u!1")
   (("1"
     (typepred "<=")
     (expand* "lower_semilattice?" "partial_order?" "preorder?"
      "transitive?")
     (flatten)
     (inst - "L" "u!1" "s!1")
     (assert))
    ("2" (expand* "union" "singleton" "member"))))


proof_type: f_proof
decl_type: formula
library: orders
theory: lower_semilattices
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (expand "greatest_lower_bound?")
   (prop)
   (("1"
     (hide -4 -2)
     (expand "lower_bound?")
     (skolem-typepred)
     (expand* "union" "member")
     (inst - "r!1")
     (("1" (rewrite "glb_le_1"))
      ("2" (assert) (inst - "r!1") (rewrite "glb_le_2"))))
    ("2"
     (skosimp)
     (rewrite "le_glb")
     (split)
     (("1"
       (hide -5 -4 -2)
       (inst?)
       (assert)
       (expand "lower_bound?")
       (skolem!)
       (inst - "r!2")
       (expand* "union" "member"))
      ("2"
       (hide -4 -3 -2)
       (inst?)
       (assert)
       (expand "lower_bound?")
       (skolem!)
       (inst - "r!2")
       (expand* "union" "member"))))))


proof_type: f_proof
decl_type: formula
library: orders
theory: lower_semilattices
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (rewrite "add_as_union")
   (rewrite "greatest_lower_bound_union")
   (rewrite "greatest_lower_bound_singleton"))


proof_type: f_proof
decl_type: formula
library: orders
theory: lower_semilattices
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skolem!)
   (invoke (typepred "%1" "%2" "%3") (! 1 l) (! 1 r 1) (! 1 r 2))
   (invoke (name-replace "GU" "%1") (! 1 l))
   (invoke (name-replace "G1" "%1") (! 1 r 1))
   (invoke (name-replace "G2" "%1") (! 1 r 2))
   (use "greatest_lower_bound_union")
   (assert)
   (use "unique_greatest_lower_bound"))


proof_type: j_proof
decl_type: tcc
library: orders
theory: lower_semilattices
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skolem-typepred)
   (expand "bounded_below?")
   (skosimp*)
   (inst + "glb(t!1, t!2)")
   (expand "lower_bound?")
   (skolem-typepred)
   (expand* "union" "member")
   (inst?)
   (("1" (rewrite "glb_le_1"))
    ("2" (assert) (inst?) (rewrite "glb_le_2"))))


proof_type: j_proof
decl_type: tcc
library: orders
theory: lower_semilattices
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skolem-typepred)
   (expand "greatest_bounded_below?")
   (skosimp*)
   (inst + "glb(t!1, t!2)")
   (rewrite "greatest_lower_bound_union"))


proof_type: j_proof
decl_type: tcc
library: orders
theory: lattices
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skolem!)
   (typepred "<=")
   (expand* "tightly_bounded?" "lattice?")
   (prop)
   (("1" (expand "upper_semilattice?") (flatten) (inst?))
    ("2" (expand "lower_semilattice?") (flatten) (inst?))))


proof_type: f_proof
decl_type: formula
library: orders
theory: total_lattices
signature: nil
run_date: Unknown date
run_time: ----
status: proved-incomplete
description: nil
script:
  (""
   (skolem!)
   (rewrite "greatest_def")
   (grind)
   (typepred "<=")
   (expand* "total_order?" "partial_order?" "preorder?" "reflexive?")
   (flatten)
   (inst?))


proof_type: f_proof
decl_type: formula
library: orders
theory: total_lattices
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skolem!)
   (lift-if)
   (ground)
   (("1"
     (rewrite "greatest_def")
     (typepred "greatest(<=)(G2!1)")
     (typepred "greatest(<=)(G1!1)")
     (typepred "<=")
     (grind :if-match nil)
     (("1"
       (inst -7 "r!1")
       (inst - "r!1" "greatest(<=)(G1!1)" "greatest(<=)(G2!1)")
       (assert))
      ("2" (inst -9 "r!1"))))
    ("2"
     (typepred "<=")
     (expand* "total_order?" "dichotomous?")
     (flatten)
     (inst - "greatest(<=)(G1!1)" "greatest(<=)(G2!1)")
     (assert)
     (typepred "greatest(<=)(G2!1)")
     (typepred "greatest(<=)(G1!1)")
     (rewrite "greatest_def")
     (grind :if-match nil)
     (("1" (inst - "r!1"))
      ("2"
       (inst -5 "r!1")
       (inst - "r!1" "greatest(<=)(G2!1)" "greatest(<=)(G1!1)")
       (assert))))))


proof_type: f_proof
decl_type: formula
library: orders
theory: total_lattices
signature: nil
run_date: Unknown date
run_time: ----
status: proved-incomplete
description: nil
script:
  (""
   (skolem!)
   (rewrite "add_as_union[T]")
   (use "greatest_union")
   (rewrite "greatest_singleton"))


proof_type: f_proof
decl_type: formula
library: orders
theory: total_lattices
signature: nil
run_date: Unknown date
run_time: ----
status: proved-incomplete
description: nil
script:
  (""
   (skolem!)
   (rewrite "least_def")
   (grind)
   (typepred "<=")
   (expand* "total_order?" "partial_order?" "preorder?" "reflexive?")
   (flatten)
   (inst?))


proof_type: f_proof
decl_type: formula
library: orders
theory: total_lattices
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skolem!)
   (lift-if)
   (ground)
   (("1"
     (rewrite "least_def")
     (typepred "least(<=)(L2!1)")
     (typepred "least(<=)(L1!1)")
     (typepred "<=")
     (grind :if-match nil)
     (("1" (inst -7 "r!1"))
      ("2"
       (inst -9 "r!1")
       (inst - "least(<=)(L1!1)" "least(<=)(L2!1)" "r!1")
       (assert))))
    ("2"
     (typepred "<=")
     (expand* "total_order?" "dichotomous?")
     (flatten)
     (inst - "least(<=)(L1!1)" "least(<=)(L2!1)")
     (assert)
     (typepred "least(<=)(L2!1)")
     (typepred "least(<=)(L1!1)")
     (rewrite "least_def")
     (grind :if-match nil)
     (("1"
       (inst - "r!1")
       (inst - "least(<=)(L2!1)" "least(<=)(L1!1)" "r!1")
       (assert))
      ("2" (inst -5 "r!1"))))))


proof_type: j_proof
decl_type: tcc
library: orders
theory: total_lattices
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skolem-typepred)
   (expand* "has_greatest?" "greatest?" "upper_bound?" "union" "member")
   (skosimp*)
   (case "t!1 <= t!2")
   (("1"
     (inst + "t!2")
     (assert)
     (skolem-typepred)
     (expand* "union" "member")
     (split)
     (("1"
       (inst - "r!1")
       (typepred "<=")
       (expand* "total_order?" "partial_order?" "preorder?"
        "transitive?")
       (flatten)
       (inst - "r!1" "t!1" "t!2")
       (assert))
      ("2" (inst -6 "r!1"))))
    ("2"
     (typepred "<=")
     (expand* "total_order?" "dichotomous?" "partial_order?" "preorder?"
      "transitive?")
     (flatten)
     (inst - "t!1" "t!2")
     (inst + "t!1")
     (assert)
     (skolem-typepred)
     (expand* "union" "member")
     (split)
     (("1" (inst - "r!1"))
      ("2" (inst -9 "r!1") (inst - "r!1" "t!2" "t!1") (assert))))))


proof_type: j_proof
decl_type: tcc
library: orders
theory: total_lattices
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skolem-typepred)
   (expand* "has_least?" "least?" "lower_bound?" "union" "member")
   (skosimp*)
   (case "t!1 <= t!2")
   (("1"
     (inst + "t!1")
     (assert)
     (skolem-typepred)
     (expand* "union" "member")
     (split)
     (("1" (inst - "r!1"))
      ("2"
       (inst -6 "r!1")
       (typepred "<=")
       (expand* "total_order?" "partial_order?" "preorder?"
        "transitive?")
       (flatten)
       (inst - "t!1" "t!2" "r!1")
       (assert))))
    ("2"
     (typepred "<=")
     (expand* "total_order?" "dichotomous?" "partial_order?" "preorder?"
      "transitive?")
     (flatten)
     (inst - "t!1" "t!2")
     (inst + "t!2")
     (assert)
     (skolem-typepred)
     (expand* "union" "member")
     (split)
     (("1" (inst - "r!1") (inst - "t!2" "t!1" "r!1") (assert))
      ("2" (inst -9 "r!1"))))))


proof_type: f_proof
decl_type: formula
library: orders
theory: finite_orders
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (expand* "complete_lower_semilattice?" "lower_semilattice?")
   (prop)
   (skolem!)
   (case-replace "S!1 = emptyset")
   (inst?)
   (rewrite "emptyset_is_empty?"))


proof_type: f_proof
decl_type: formula
library: orders
theory: finite_orders
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (expand* "complete_upper_semilattice?" "upper_semilattice?")
   (prop)
   (skolem!)
   (case-replace "S!1 = emptyset")
   (inst?)
   (rewrite "emptyset_is_empty?"))


proof_type: j_proof
decl_type: tcc
library: orders
theory: finite_orders
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skolem-typepred)
   (expand* "complete_lattice?" "lattice?")
   (prop)
   (("1"
     (rewrite "finite_upper_semilattice_is_complete")
     (rewrite "least_bounded_above_emptyset")
     (rewrite "all_finite_greatest_bounded"))
    ("2"
     (rewrite "finite_lower_semilattice_is_complete")
     (rewrite "greatest_bounded_below_emptyset")
     (rewrite "all_finite_least_bounded"))))


proof_type: j_proof
decl_type: tcc
library: orders
theory: finite_orders
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skolem-typepred)
   (expand "well_founded?")
   (measure-induct+ "card(p)" ("p"))
   (skolem!)
   (inst - "remove(y!1, x!2)")
   (prop)
   (("1"
     (inst-cp + "y!1")
     (skosimp* t)
     (inst + "y!2")
     (("1"
       (skolem-typepred)
       (inst-cp - "x!3")
       (("1"
         (inst - "x!4")
         (expand* "remove" "member" "/=")
         (lemma "transitive")
         (inst - "x!1" "x!3" "y!1" "y!2")
         (assert))
        ("2"
         (expand* "remove" "member" "/=")
         (use "irreflexive")
         (assert))))
      ("2" (expand* "remove" "member") (assert))))
    ("2"
     (inst 2 "y!1")
     (skolem-typepred)
     (inst + "x!3")
     (expand* "remove" "member" "/=")
     (use "irreflexive")
     (assert))
    ("3" (rewrite "card_remove") (assert))))


proof_type: j_proof
decl_type: tcc
library: orders
theory: finite_orders
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skolem-typepred)
   (expand "well_ordered?")
   (rewrite "finite_strict_order_is_well_founded"))


proof_type: f_proof
decl_type: formula
library: orders
theory: subset_chain
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp :preds? t)
   (expand "maximal_chain?")
   (lemma "subset_chain_min" ("C" "C!1"))
   (inst + "add(Intersection(C!1), C!1)")
   (("1"
     (expand "strict_subset?")
     (use "subset_add[set[T]]")
     (assert)
     (decompose-equality)
     (inst - "Intersection(C!1)")
     (expand* "add" "member"))
    ("2"
     (grind :if-match nil)
     (("1"
       (expand "Intersection")
       (decompose-equality)
       (inst - "x!2")
       (assert)
       (inst - "y!1"))
      ("2"
       (inst - "x!1")
       (inst - "x!3")
       (assert)
       (expand "Intersection")
       (decompose-equality)
       (inst - "x!3")
       (assert))
      ("3"
       (inst -6 "x!1" "y!1")
       (split)
       (("1" (inst - "x!2") (assert)) ("2" (inst - "x!3") (assert))))))))


proof_type: t_proof
decl_type: tcc
library: orders
theory: chain_chain
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (typepred "<=")
   (grind :if-match nil)
   (inst -7 "a!1" "a!2")
   (split)
   (("1" (inst - "x!1") (assert) (inst - "x!1" "y!1") (assert))
    ("2" (inst - "y!1") (assert) (inst -4 "x!1" "y!1") (assert))))


proof_type: f_proof
decl_type: formula
library: orders
theory: zorn
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skolem!)
   (typepred "<=")
   (grind :if-match nil)
   (("1"
     (inst -5 "r!1")
     (assert)
     (skosimp)
     (inst - "x!1" "t!1" "r!1")
     (assert))
    ("2" (inst + "r!1") (inst - "t!1") (inst - "t!1") (assert))))


proof_type: f_proof
decl_type: formula
library: orders
theory: zorn
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp* t)
   (inst?)
   (expand* "bounded_above?" "upper_bound?")
   (skolem!)
   (inst? +)
   (expand* "subset?" "upto" "reflexive_closure" "union" "member")
   (skosimp)
   (inst?))


proof_type: f_proof
decl_type: formula
library: orders
theory: zorn
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skolem!)
   (prop)
   (("1" (expand "succ") (assert))
    ("2"
     (expand "succ")
     (assert)
     (decompose-equality)
     (expand* "empty?" "member")
     (skolem!)
     (inst-cp - "x!1")
     (iff)
     (prop)
     (("1" (expand* "add_set" "member") (flatten))
      ("2"
       (expand* "add" "member")
       (assert)
       (typepred "choose(add_set(ch!1))")
       (expand "add_set" -1 :occurrence 1)
       (expand "member")
       (inst - "choose(add_set(ch!1))"))))))


proof_type: f_proof
decl_type: formula
library: orders
theory: zorn
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skolem!)
   (expand* "fullset" "maximal?" "chain_incl" "add_set" "difference"
    "empty?" "member")
   (prop)
   (("1"
     (skosimp :preds? t)
     (apply-extensionality :hide? t)
     (iff)
     (prop)
     (("1" (expand* "subset?" "member") (inst -4 "x!1") (assert))
      ("2"
       (inst - "x!1")
       (assert)
       (lemma "subset_chain[T, <=]" ("ch" "r!1" "S" "add(x!1, ch!1)"))
       (assert)
       (expand* "add" "subset?" "member")
       (skosimp)
       (inst - "x!2")
       (assert))))
    ("2"
     (skosimp)
     (inst + "add(x!1, ch!1)")
     (use "subset_add[T]")
     (assert)
     (decompose-equality)
     (inst?)
     (expand* "add" "member"))))


proof_type: f_proof
decl_type: formula
library: orders
theory: zorn
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (expand "tower?")
   (split)
   (("1" (expand* "Intersection" "member") (skolem!) (inst?) (flatten))
    ("2"
     (skolem-typepred)
     (expand* "Intersection" "member")
     (skolem!)
     (inst - "a!1")
     (inst - "a!1")
     (flatten)
     (inst - "ch!1"))
    ("3"
     (skosimp)
     (expand* "Intersection" "member")
     (skolem!)
     (inst -2 "a!1")
     (flatten)
     (inst -4 "CH!1")
     (assert)
     (skolem!)
     (inst - "ch!1")
     (inst - "a!1"))))


proof_type: f_proof
decl_type: formula
library: orders
theory: zorn
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skolem!)
   (apply-extensionality :hide? t)
   (iff)
   (prop)
   (("1"
     (lemma "T0_smallest" ("tow" "make_tower(ch!1)"))
     (expand* "subset?" "member")
     (inst - "x!1")
     (assert))
    ("2" (expand "make_tower") (flatten))))


proof_type: f_proof
decl_type: formula
library: orders
theory: zorn
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skolem!)
   (lemma "T0_smallest")
   (inst - "{ch: (T0_comparable?) | TRUE}")
   (("1" (expand* "extend" "subset?" "member") (inst - "ch!1") (assert))
    ("2"
     (typepred "T0")
     (expand "tower?")
     (prop)
     (("1"
       (expand* "extend" "member")
       (prop)
       (expand "T0_comparable?")
       (skosimp)
       (expand* "emptyset" "subset?" "member"))
      ("2"
       (skolem-typepred)
       (expand* "extend" "member")
       (prop)
       (("1" (inst - "ch!2"))
        ("2"
         (lemma "T0_comparable" ("ch" "ch!2"))
         (("1" (assert)) ("2" (propax))))))
      ("3"
       (skosimp :preds? t)
       (expand* "extend" "member")
       (prop)
       (("1"
         (inst -5 "CH!1")
         (assert)
         (skolem!)
         (inst - "ch!2")
         (assert))
        ("2"
         (expand "T0_comparable?" 1)
         (skosimp)
         (expand* "chain_union" "subset?" "member" "Union")
         (skosimp* t)
         (expand "extend")
         (prop)
         (inst - "a!1")
         (prop)
         (expand "T0_comparable?" -)
         (inst - "ch2!1")
         (expand* "subset?" "member")
         (split)
         (("1" (inst - "x!1") (inst + "a!1") (assert))
          ("2" (inst - "x!2") (inst + "a!1") (assert))))))))))


proof_type: f_proof
decl_type: formula
library: orders
theory: zorn
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (flatten)
   (lemma "maximal_chain_add_set" ("ch" "chain_union(T0)"))
   (prop)
   (("1"
     (forward-chain "bounded_chain_upto")
     (expand* "fullset" "maximal?" "member")
     (inst - "chain_union(T0)")
     (skolem!)
     (use "maximal_upto_subset")
     (inst 2 "t!1")
     (prop)
     (("1"
       (skosimp)
       (inst - "r!1")
       (assert)
       (expand* "upto" "subset?" "member")
       (skosimp)
       (expand* "fullset" "maximal?" "reflexive_closure" "union"
        "member")
       (inst + "x!1")
       (assert)
       (typepred "<=")
       (expand* "partial_order?" "preorder?" "transitive?")
       (flatten)
       (inst - "x!1" "t!1" "r!1")
       (assert))
      ("2"
       (skosimp*)
       (expand* "upto" "chain_incl" "subset?" "member")
       (inst + "add(r!1, chain_union(T0))")
       (("1"
         (prop)
         (("1" (skosimp) (expand* "add" "member") (flatten))
          ("2"
           (decompose-equality)
           (inst - "r!1")
           (expand* "add" "reflexive_closure" "union" "member")
           (inst - "t!1")
           (inst - "r!1")
           (typepred "<=")
           (expand* "partial_order?" "preorder?" "antisymmetric?")
           (flatten)
           (inst - "t!1" "r!1")
           (ground))))
        ("2"
         (typepred "chain_union(T0)")
         (typepred "<=")
         (expand* "chain?" "total_order?" "partial_order?" "preorder?"
          "restrict" "dichotomous?")
         (skosimp :preds? t)
         (expand* "add" "reflexive?" "reflexive_closure" "union"
          "member")
         (ground)
         (("1" (inst - "r!1") (assert))
          ("2" (inst - "y!1") (inst - "y!1") (inst - "y!1") (assert))
          ("3" (inst - "x!1") (inst - "x!1") (inst - "x!1") (assert))
          ("4" (inst - "x!1" "y!1") (assert))))))))
    ("2"
     (expand* "fullset" "maximal?" "member" "chain_incl")
     (skosimp :preds? t)
     (lemma "empty_succ" ("ch" "chain_union(T0)"))
     (assert)
     (apply-extensionality :hide? t)
     (expand* "succ" "add" "member")
     (iff)
     (prop)
     (typepred "T0")
     (expand* "tower?" "member")
     (flatten)
     (inst -3 "T0")
     (split)
     (("1"
       (inst - "chain_union(T0)")
       (expand "chain_union" 1)
       (expand* "extend" "Union")
       (inst + "succ(chain_union(T0))")
       (expand* "succ" "add" "member")
       (assert))
      ("2" (skolem!) (assert))))))


proof_type: t_proof
decl_type: tcc
library: orders
theory: zorn
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (typepred "choose(add_set(ch!1))")
   (expand "add_set" -1 :occurrence 1)
   (flatten))


proof_type: t_proof
decl_type: tcc
library: orders
theory: zorn
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (typepred "T0")
   (skolem-typepred)
   (expand* "T0_comparable?" "tower?")
   (prop)
   (("1" (expand* "emptyset" "subset?" "member"))
    ("2"
     (skosimp :preds? t)
     (split)
     (("1"
       (case "ch!1 = ch1!1")
       (("1"
         (expand "member")
         (inst -9 "ch!1")
         (assert)
         (flatten)
         (expand "subset?" 2)
         (expand "member")
         (skosimp)
         (assert))
        ("2"
         (expand "member")
         (prop)
         (("1" (inst -8 "ch!1"))
          ("2"
           (inst - "succ(ch!1)")
           (("1"
             (assert)
             (apply-extensionality 3 :hide? t)
             (iff)
             (expand* "subset?" "member")
             (prop)
             (("1" (inst - "x!1") (assert))
              ("2"
               (inst -7 "x!1")
               (assert)
               (expand "succ" -7)
               (prop)
               (expand* "add" "member")
               (skosimp*)
               (expand "succ" -3)
               (prop)
               (expand* "add" "member")
               (assert)
               (inst - "x!2")
               (assert))))
            ("2" (inst - "ch!1"))))))))
      ("2"
       (expand "member")
       (inst -8 "ch!1")
       (prop)
       (expand* "subset?" "member")
       (skosimp*)
       (inst - "x!2")
       (assert)
       (expand "succ" 2)
       (prop)
       (expand* "add" "member"))))
    ("3"
     (skosimp :preds? t)
     (case "EXISTS (D: (CH!1)): subset?(succ(ch1!1), D)")
     (("1"
       (skolem!)
       (inst -9 "CH!1")
       (split)
       (("1"
         (expand* "chain_union" "extend" "Union" "subset?" "member")
         (prop)
         (skosimp*)
         (inst - "x!2")
         (assert)
         (inst + "D!1"))
        ("2" (skolem!) (inst - "ch!1") (expand "member") (flatten))))
      ("2"
       (expand "member")
       (prop)
       (("1"
         (inst -8 "CH!1")
         (assert)
         (skolem!)
         (inst - "ch!1")
         (flatten))
        ("2"
         (expand* "subset?" "member")
         (skosimp*)
         (inst -10 "CH!1")
         (split)
         (("1"
           (inst -8 "Union(CH!1)")
           (("1"
             (inst -10 "chain_union(CH!1)")
             (split)
             (("1"
               (expand "chain_union")
               (expand "Union" -3)
               (skolem-typepred)
               (expand "extend" -1)
               (prop)
               (inst -8 "a!1")
               (prop)
               (("1" (inst - "x!1") (assert)) ("2" (inst + "a!1"))))
              ("2" (inst - "x!1") (expand "chain_union") (assert))))
            ("2"
             (typepred "chain_union(CH!1)")
             (expand "chain_union")
             (assert))))
          ("2" (skolem!) (inst - "ch!1") (flatten))))))))))


proof_type: j_proof
decl_type: tcc
library: orders
theory: zorn
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skolem-typepred)
   (typepred "T0")
   (expand "tower?")
   (flatten)
   (inst - "ch!1")
   (expand "member")
   (assert)
   (use "T0_construct")
   (expand "T0_comparable?")
   (skosimp :preds? t)
   (replace -3 -2)
   (expand "make_tower" -2)
   (assert)
   (expand* "subset?" "member")
   (skosimp*)
   (inst - "x!2")
   (expand* "succ" "add" "member")
   (prop))


proof_type: j_proof
decl_type: tcc
library: orders
theory: zorn
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (typepred "chain_incl")
   (expand* "chain?" "total_order?" "partial_order?" "preorder?"
    "dichotomous?" "restrict")
   (skosimp)
   (lemma "T0_all_comparable" ("ch" "x!1"))
   (expand* "T0_comparable?" "chain_incl")
   (inst - "y!1")
   (assert))


proof_type: f_proof
decl_type: formula
library: orders
theory: well_ordering
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skolem-typepred)
   (expand* "bounded_above?" "upper_bound?")
   (inst + "ordered_set_union(C!1)")
   (skolem!)
   (expand "ordered_set_order")
   (split)
   (("1"
     (expand* "subset?" "member" "ordered_set_union")
     (skosimp)
     (inst?))
    ("2"
     (skolem!)
     (prop)
     (("1" (expand "ordered_set_union") (inst?) (assert))
      ("2"
       (expand* "ordered_set_union" "chain?" "total_order?"
        "dichotomous?" "restrict")
       (skosimp)
       (inst - "r!1" "ord!1")
       (expand "ordered_set_order")
       (prop)
       (("1" (inst - "t!1" "r!2") (assert))
        ("2" (inst - "t!1" "r!2") (assert))))))
    ("3"
     (skolem-typepred)
     (expand* "restrict" "difference" "member" "upper_bound?")
     (skosimp :preds? t)
     (expand* "ordered_set_union" "chain?" "total_order?" "dichotomous?"
      "restrict")
     (skosimp*)
     (inst - "S!2" "r!1")
     (expand* "ordered_set_order" "subset?" "member")
     (prop)
     (("1" (inst - "t!1") (assert))
      ("2"
       (inst - "r!2")
       (assert)
       (inst - "t!1")
       (("1"
         (expand* "restrict" "upper_bound?")
         (inst - "r!2")
         (inst + "S!2")
         (assert))
        ("2" (expand* "difference" "member"))))))))


proof_type: f_proof
decl_type: formula
library: orders
theory: well_ordering
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (lemma "chain_upper_bound")
   (forward-chain "zorn")
   (expand "bounded_above?")
   (skolem!)
   (expand* "fullset" "maximal?")
   (typepred "t!1`2")
   (case "full?(t!1`1)")
   (("1"
     (expand* "full?" "member")
     (inst 2
      "LAMBDA (t, r: T): IF t!1`1(t) AND t!1`1(r) THEN t!1`2(t, r) ELSE FALSE ENDIF")
     (expand* "well_ordered?" "strict_total_order?" "strict_order?")
     (prop)
     (("1" (expand "irreflexive?") (skolem!) (prop) (inst -5 "x!1"))
      ("2"
       (expand "transitive?")
       (skosimp)
       (prop)
       (inst - "x!1" "y!1" "z!1")
       (assert))
      ("3"
       (expand "trichotomous?")
       (skosimp)
       (inst-cp - "y!1")
       (inst - "x!1")
       (inst - "x!1" "y!1")
       (assert))
      ("4"
       (expand "well_founded?")
       (skosimp*)
       (inst - "y!1")
       (inst - "{t: (t!1`1) | p!1(t)}")
       (split)
       (("1"
         (skolem-typepred)
         (inst + "y!2")
         (skolem-typepred)
         (prop)
         (inst - "x!1"))
        ("2" (inst + "y!1"))))))
    ("2"
     (hide 3)
     (expand* "full?" "member")
     (skolem!)
     (inst +
      "(add(x!1, t!1`1), LAMBDA (t, r: (add(x!1, t!1`1))): IF t = x!1 THEN FALSE ELSIF r = x!1 THEN TRUE ELSE t!1`2(t, r) ENDIF)")
     (("1"
       (expand "ordered_set_order")
       (prop)
       (("1" (use "subset_add[T]")) ("2" (skolem!) (lift-if) (ground))
        ("3"
         (expand* "restrict" "upper_bound?")
         (skosimp* t)
         (expand* "add" "difference" "member")
         (ground))
        ("4" (replace -1 1) (beta) (expand* "add" "member"))))
      ("2"
       (expand* "well_ordered?" "strict_total_order?" "strict_order?")
       (prop)
       (("1"
         (expand "irreflexive?")
         (skolem-typepred)
         (expand* "add" "member")
         (ground)
         (inst - "x!2"))
        ("2"
         (expand "transitive?")
         (skosimp :preds? t)
         (expand* "add" "member")
         (ground)
         (inst - "x!2" "y!1" "z!1")
         (assert))
        ("3"
         (expand "trichotomous?")
         (skosimp :preds? t)
         (expand* "add" "member")
         (ground)
         (inst - "x!2" "y!1")
         (assert))
        ("4"
         (expand "well_founded?")
         (skosimp* t)
         (expand* "add" "member")
         (inst - "{t: (t!1`1) | p!1(t)}")
         (("1"
           (split)
           (("1"
             (split)
             (("1"
               (skolem-typepred)
               (inst + "y!2")
               (skolem-typepred)
               (expand* "add" "member")
               (ground)
               (inst - "x!2"))
              ("2"
               (inst 2 "y!1")
               (skolem-typepred)
               (expand* "add" "member")
               (ground)
               (inst + "x!2"))))
            ("2"
             (split)
             (("1"
               (skolem-typepred)
               (inst + "y!2")
               (skolem-typepred)
               (expand* "add" "member")
               (ground)
               (inst - "x!2"))
              ("2" (inst + "y!1"))))))
          ("2" (skolem-typepred) (expand* "add" "member"))))))
      ("3" (skosimp :preds? t) (expand* "add" "member") (ground))
      ("4" (skosimp :preds? t) (expand* "add" "member") (ground))))))


proof_type: j_proof
decl_type: tcc
library: orders
theory: well_ordering
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (grind :if-match nil)
   (("1" (grind-with-ext))
    ("2"
     (inst - "r!1")
     (assert)
     (inst -9 "t!1")
     (("1" (inst -9 "r!1"))
      ("2"
       (inst -7 "t!1")
       (inst -7 "r!1")
       (inst -9 "r!1" "t!1")
       (assert))))
    ("3"
     (inst-cp - "r!1")
     (inst - "t!1")
     (assert)
     (inst - "t!1" "r!1")
     (inst -8 "t!1" "r!1")
     (assert))
    ("4"
     (inst-cp - "r!1")
     (inst - "t!1")
     (assert)
     (inst - "t!1" "r!1")
     (inst -8 "t!1" "r!1")
     (assert))
    ("5" (inst - "x!2") (inst -4 "x!2") (assert))))


proof_type: t_proof
decl_type: tcc
library: orders
theory: well_ordering
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skolem-typepred)
   (expand* "well_ordered?" "strict_total_order?" "strict_order?")
   (split)
   (("1"
     (expand "irreflexive?")
     (skosimp* t)
     (typepred "ord!1`2")
     (expand* "well_ordered?" "strict_total_order?" "strict_order?"
      "irreflexive?")
     (flatten)
     (inst - "x!1"))
    ("2"
     (expand "transitive?")
     (skosimp* t)
     (expand* "chain?" "restrict" "total_order?" "dichotomous?")
     (flatten)
     (inst - "ord!1" "ord!2")
     (split)
     (("1"
       (expand "ordered_set_order" -1)
       (flatten)
       (expand* "subset?" "member")
       (inst - "x!1")
       (assert)
       (inst + "ord!2")
       (typepred "ord!2`2")
       (expand* "well_ordered?" "strict_total_order?" "strict_order?"
        "transitive?")
       (flatten)
       (inst - "x!1" "y!1" "z!1")
       (inst - "x!1" "y!1")
       (ground))
      ("2"
       (expand "ordered_set_order" -1)
       (flatten)
       (expand* "subset?" "member")
       (inst - "z!1")
       (assert)
       (inst + "ord!1")
       (typepred "ord!1`2")
       (expand* "well_ordered?" "strict_total_order?" "strict_order?"
        "transitive?")
       (flatten)
       (inst - "x!1" "y!1" "z!1")
       (inst - "y!1" "z!1")
       (ground))))
    ("3"
     (expand "trichotomous?")
     (skosimp* t)
     (expand* "chain?" "restrict" "total_order?" "dichotomous?")
     (flatten)
     (inst - "S!1" "S!2")
     (split)
     (("1"
       (expand "ordered_set_order" -1)
       (flatten)
       (expand* "subset?" "member")
       (inst - "x!1")
       (assert)
       (typepred "S!2`2")
       (expand* "well_ordered?" "strict_total_order?" "trichotomous?")
       (flatten)
       (inst - "x!1" "y!1")
       (inst + "S!2")
       (inst + "S!2")
       (ground))
      ("2"
       (expand "ordered_set_order" -1)
       (flatten)
       (expand* "subset?" "member")
       (inst - "y!1")
       (assert)
       (typepred "S!1`2")
       (expand* "well_ordered?" "strict_total_order?" "trichotomous?")
       (flatten)
       (inst - "x!1" "y!1")
       (inst + "S!1")
       (inst + "S!1")
       (ground))))
    ("4"
     (expand "well_founded?")
     (skosimp* t)
     (typepred "S!1`2")
     (expand* "well_ordered?" "well_founded?")
     (flatten)
     (inst - "{t: (S!1`1) | p!1(t)}")
     (("1"
       (split)
       (("1"
         (skolem-typepred)
         (inst + "y!2")
         (skosimp* t)
         (expand* "chain?" "restrict" "total_order?" "dichotomous?")
         (flatten)
         (inst - "S!1" "ord!1")
         (split)
         (("1"
           (expand "ordered_set_order" -1)
           (flatten)
           (inst - "x!1" "y!2")
           (("1" (assert) (inst -10 "x!1"))
            ("2"
             (inst - "x!1")
             (("1"
               (expand* "restrict" "upper_bound?")
               (inst - "y!2")
               (typepred "ord!1`2")
               (expand* "well_ordered?" "strict_total_order?"
                "strict_order?" "irreflexive?" "transitive?")
               (flatten)
               (inst - "x!1")
               (inst - "x!1" "y!2" "x!1")
               (assert))
              ("2" (expand* "difference" "member") (assert))))))
          ("2"
           (expand "ordered_set_order" -1)
           (flatten)
           (expand* "subset?" "member")
           (inst - "x!1")
           (assert)
           (inst - "x!1" "y!2")
           (inst -10 "x!1")
           (assert))))
        ("2" (inst + "y!1"))))
      ("2" (skolem-typepred) (inst + "S!1"))))))


proof_type: f_proof
decl_type: formula
library: orders
theory: well_ordered_traversal
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (grind :if-match nil)
   (inst -4 "fullset[T]")
   (split)
   (("1"
     (skolem!)
     (inst + "y!1")
     (skosimp)
     (inst - "r!1")
     (inst - "r!1" "y!1")
     (assert))
    ("2" (expand "fullset") (inst + "t!1"))))


proof_type: f_proof
decl_type: formula
library: orders
theory: well_ordered_traversal
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (grind :if-match nil)
   (inst -4 "above(t!1, lessp!1)")
   (split)
   (("1"
     (skolem-typepred)
     (assert)
     (flatten)
     (inst + "y!1")
     (assert)
     (skosimp :preds? t)
     (inst - "r!1")
     (inst - "y!1" "r!1")
     (assert))
    ("2"
     (inst 3 "x!1")
     (assert)
     (skosimp :preds? t)
     (inst + "x!1")
     (assert))))


proof_type: f_proof
decl_type: formula
library: orders
theory: well_ordered_traversal
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (expand* "has_last?" "has_next?" "has_greatest?" "greatest?" "fullset"
    "upper_bound?" "nonempty?" "empty?" "above" "reflexive_closure"
    "union" "irreflexive_kernel" "difference" "member")
   (skosimp* t)
   (inst - "last(lessp!1)")
   (typepred "last(lessp!1)")
   (expand* "greatest?" "fullset" "upper_bound?" "reflexive_closure"
    "union" "member")
   (inst - "x!1")
   (assert)
   (expand* "well_ordered?" "strict_total_order?" "strict_order?"
    "irreflexive?" "transitive?")
   (flatten)
   (inst - "x!1")
   (inst - "x!1" "last(lessp!1)" "x!1")
   (assert))


proof_type: f_proof
decl_type: formula
library: orders
theory: well_ordered_traversal
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp :preds? t)
   (typepred "last(lessp!1)")
   (grind :if-match nil)
   (inst - "x!1")
   (assert))


proof_type: f_proof
decl_type: formula
library: orders
theory: well_ordered_traversal
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp :preds? t)
   (expand "has_prev?")
   (skolem-typepred)
   (typepred "next(lessp!1)(r!1)")
   (replace -4)
   (grind :if-match nil)
   (inst + "r!1")
   (assert)
   (skosimp :preds? t)
   (assert)
   (flatten)
   (inst - "r!2" "r!1")
   (assert)
   (inst - "r!2")
   (inst - "r!2")
   (inst - "r!2" "t!1" "r!2")
   (assert))


proof_type: f_proof
decl_type: formula
library: orders
theory: isomorphism
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (grind :if-match nil)
   (("1" (inst -6 "d1!1" "d2!1") (assert))
    ("2"
     (inst -3 "d1!1" "d2!1")
     (inst -4 "f!1(d1!1)")
     (inst -4 "f!1(d1!1)" "f!1(d2!1)")
     (inst -5 "d2!1" "d1!1")
     (assert))))


proof_type: f_proof
decl_type: formula
library: orders
theory: isomorphism
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (grind :if-match nil)
   (("1"
     (inst-cp - "y!1")
     (inst - "x!1")
     (skosimp*)
     (inst -5 "x!2" "x!3")
     (inst-cp -4 "x!3" "x!2")
     (inst -4 "x!2" "x!3")
     (assert))
    ("2"
     (inst-cp -3 "y!1" "x!1")
     (inst -3 "x!1" "y!1")
     (inst -6 "f!1(x!1)" "f!1(y!1)")
     (assert))))


proof_type: f_proof
decl_type: formula
library: orders
theory: isomorphism
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (grind :if-match nil)
   (("1"
     (hide -1)
     (inst-cp - "y!1")
     (inst - "x!1")
     (skosimp*)
     (inst-cp - "x!3" "x!2")
     (inst - "x!2" "x!3")
     (inst - "x!2" "x!3")
     (assert))
    ("2"
     (inst - "x!1" "y!1")
     (inst-cp - "y!1" "x!1")
     (inst - "x!1" "y!1")
     (inst - "f!1(x!1)" "f!1(y!1)")
     (assert))))


proof_type: f_proof
decl_type: formula
library: orders
theory: isomorphism
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (grind :if-match nil)
   (("1"
     (inst-cp - "y!1")
     (inst - "x!1")
     (skosimp*)
     (hide -1)
     (inst-cp - "x!3" "x!2")
     (inst - "x!2" "x!3")
     (inst - "x!2" "x!3")
     (assert))
    ("2"
     (inst - "x!1" "y!1")
     (inst-cp - "y!1" "x!1")
     (inst - "x!1" "y!1")
     (inst - "f!1(x!1)" "f!1(y!1)")
     (assert))))


proof_type: f_proof
decl_type: formula
library: orders
theory: isomorphism
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (grind :if-match nil)
   (("1"
     (hide -1)
     (inst-cp - "z!1")
     (inst-cp - "y!1")
     (inst - "x!1")
     (skosimp*)
     (inst-cp - "x!3" "x!4")
     (inst-cp - "x!2" "x!3")
     (inst - "x!2" "x!4")
     (inst - "x!2" "x!3" "x!4")
     (assert))
    ("2"
     (hide -1 -2)
     (inst-cp - "y!1" "z!1")
     (inst-cp - "x!1" "y!1")
     (inst - "x!1" "z!1")
     (inst - "f!1(x!1)" "f!1(y!1)" "f!1(z!1)")
     (assert))))


proof_type: f_proof
decl_type: formula
library: orders
theory: isomorphism
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (grind :if-match nil)
   (("1"
     (inst-cp - "y!1")
     (inst - "x!1")
     (skosimp*)
     (hide -1)
     (inst-cp - "x!3" "x!2")
     (inst - "x!2" "x!3")
     (inst - "x!2" "x!3")
     (assert))
    ("2"
     (hide -1 -2)
     (inst-cp - "y!1" "x!1")
     (inst - "x!1" "y!1")
     (inst - "f!1(x!1)" "f!1(y!1)")
     (assert))))


proof_type: f_proof
decl_type: formula
library: orders
theory: isomorphism
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (prop)
   (("1"
     (grind :if-match nil)
     (inst -3 "p!1 o f!1")
     (split)
     (("1"
       (skolem-typepred)
       (expand "o")
       (inst + "f!1(y!2)")
       (skolem-typepred)
       (inst -5 "x!1")
       (skolem!)
       (inst - "x!2")
       (("1" (inst -7 "x!2" "y!2") (assert))
        ("2" (expand "o") (assert))))
      ("2"
       (inst - "y!1")
       (skolem!)
       (inst + "x!1")
       (expand "o")
       (assert))))
    ("2"
     (expand "isomorphic?")
     (skolem-typepred)
     (use "bijective_inverse_exists[D, R]")
     (expand "exists1")
     (flatten)
     (skolem!)
     (use "bij_inv_is_bij_alt[D, R]")
     (use "comp_inverse_right_alt[D, R]")
     (use "comp_inverse_left_alt[D, R]")
     (hide -5)
     (grind :if-match nil)
     (inst -8 "p!1 o x!1")
     (split)
     (("1"
       (skolem-typepred)
       (expand "o")
       (inst + "x!1(y!2)")
       (skolem-typepred)
       (inst -4 "x!2")
       (inst - "f!1(x!2)")
       (("1" (inst -12 "x!2" "x!1(y!2)") (inst - "y!2") (assert))
        ("2" (expand "o") (assert))))
      ("2" (inst + "f!1(y!1)") (expand "o") (inst - "y!1") (assert))))))


proof_type: f_proof
decl_type: formula
library: orders
theory: isomorphism
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skolem-typepred)
   (prop)
   (("1"
     (expand* "isomorphism?" "preserves")
     (skosimp)
     (inst - "x1!1" "x2!1")
     (assert))
    ("2"
     (expand* "isomorphism?" "preserves")
     (skosimp)
     (inst - "inverse_alt(f!1)(x1!1)" "inverse_alt(f!1)(x2!1)")
     (("1" (assert))
      ("2"
       (expand* "bijective?" "surjective?")
       (flatten)
       (skolem!)
       (inst - "r!1")
       (skolem!)
       (inst + "x!1"))))
    ("3"
     (expand* "isomorphism?" "preserves")
     (skolem!)
     (prop)
     (("1" (inst - "d1!1" "d2!1") (assert))
      ("2"
       (inst -3 "f!1(d1!1)" "f!1(d2!1)")
       (assert)
       (expand* "bijective?" "injective?")
       (flatten)
       (typepred "inverse_alt(f!1)(f!1(d2!1))")
       (("1"
         (typepred "inverse_alt(f!1)(f!1(d1!1))")
         (inst-cp -6 "inverse_alt(f!1)(f!1(d2!1))" "d2!1")
         (("1"
           (inst -6 "inverse_alt(f!1)(f!1(d1!1))" "d1!1")
           (("1" (assert)) ("2" (flatten) (inst?))))
          ("2" (flatten) (inst?))))
        ("2" (flatten) (inst?))))))))


proof_type: f_proof
decl_type: formula
library: orders
theory: monotone_functions
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (grind-with-ext :if-match nil)
   (("1" (inst - "x1!1" "x2!1") (assert))
    ("2" (inst - "x1!1" "x2!1") (assert))
    ("3" (inst - "x1!1" "x2!1") (assert))
    ("4" (inst - "x1!1" "x2!1") (assert))))


proof_type: f_proof
decl_type: formula
library: orders
theory: monotone_functions
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (grind-with-ext :if-match nil)
   (("1" (inst - "x2!1" "x1!1") (assert))
    ("2" (inst - "x2!1" "x1!1") (assert))
    ("3" (inst - "x2!1" "x1!1") (assert))
    ("4" (inst - "x2!1" "x1!1") (assert))))


proof_type: f_proof
decl_type: formula
library: orders
theory: monotone_functions
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (grind-with-ext :if-match nil)
   (("1" (inst - "x1!1" "x2!1") (assert))
    ("2" (inst - "x1!1" "x2!1") (assert))))


proof_type: f_proof
decl_type: formula
library: orders
theory: monotone_functions
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (grind-with-ext :if-match nil)
   (("1" (inst - "x2!1" "x1!1") (assert))
    ("2" (inst - "x2!1" "x1!1") (assert))))


proof_type: f_proof
decl_type: formula
library: orders
theory: monotone_functions
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (grind :if-match nil)
   (inst - "x1!1" "x2!1")
   (inst - "x1!1" "x2!1")
   (inst-cp - "x2!1" "x1!1")
   (inst - "x1!1" "x2!1")
   (ground))


proof_type: f_proof
decl_type: formula
library: orders
theory: monotone_functions
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (grind :if-match nil)
   (inst - "x1!1" "x2!1")
   (inst-cp - "x2!1" "x1!1")
   (inst - "x1!1" "x2!1")
   (ground))


proof_type: f_proof
decl_type: formula
library: orders
theory: well_ordered_props
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (typepred "<")
   (skosimp* t)
   (expand* "well_ordered?" "well_founded?")
   (flatten)
   (inst - "complement(seg!1)")
   (split)
   (("1"
     (skolem-typepred)
     (inst + "y!1")
     (apply-extensionality 2 :hide? t)
     (expand* "prefix?" "below" "complement" "irreflexive_kernel"
      "difference" "member" "strict_total_order?" "trichotomous?")
     (flatten)
     (inst -4 "x!1" "y!1")
     (smash)
     (("1" (inst - "y!1" "x!1") (assert))
      ("2" (inst - "x!1") (assert) (expand* "complement" "member"))))
    ("2" (expand* "complement" "member") (inst + "t!1"))))


proof_type: f_proof
decl_type: formula
library: orders
theory: well_ordered_props
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (typepred "<")
   (skolem-typepred)
   (expand* "well_ordered?" "well_founded?")
   (flatten)
   (inst - "{r | f!1(r) < r AND f!1(r) /= r}")
   (split)
   (("1"
     (skosimp :preds? t)
     (expand* "increasing?" "preserves" "irreflexive_kernel" "difference"
      "member")
     (inst - "f!1(y!1)" "y!1")
     (ground)
     (inst - "f!1(y!1)"))
    ("2"
     (expand* "strict_total_order?" "trichotomous?")
     (flatten)
     (inst - "t!1" "f!1(t!1)")
     (inst + "t!1")
     (assert))))


proof_type: f_proof
decl_type: formula
library: orders
theory: well_ordered_props
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp* t)
   (expand* "isomorphic?" "isomorphism?" "restrict" "member")
   (skolem!)
   (use "induced_prefixes")
   (skolem!)
   (typepred "f!1(t!1)")
   (replace -2 -1)
   (expand "below" -1)
   (expand* "irreflexive_kernel" "difference" "member")
   (flatten)
   (use "increasing_well_ordered")
   (("1"
     (assert)
     (typepred "<")
     (expand* "well_ordered?" "strict_total_order?" "strict_order?"
      "irreflexive?" "transitive?")
     (flatten)
     (inst - "t!1")
     (inst - "t!1" "f!1(t!1)")
     (assert)
     (replace -6 +)
     (expand "below" +)
     (expand* "irreflexive_kernel" "difference" "member")
     (inst - "t!1" "f!1(t!1)" "t!2")
     (assert))
    ("2"
     (grind)
     (("1"
       (typepred "f!1")
       (expand "bijective?")
       (flatten)
       (expand "injective?")
       (inst?)
       (assert))
      ("2"
       (typepred "f!1")
       (expand "bijective?")
       (flatten)
       (expand "injective?")
       (inst?)
       (assert))
      ("3"
       (typepred "f!1")
       (expand "bijective?")
       (flatten)
       (expand "injective?")
       (inst?)
       (assert))
      ("4"
       (typepred "f!1")
       (expand "bijective?")
       (flatten)
       (expand "injective?")
       (inst?)
       (assert))))))


proof_type: f_proof
decl_type: formula
library: orders
theory: well_ordered_finite
signature: nil
run_date: Unknown date
run_time: ----
status: proved-incomplete
description: nil
script:
  (""
   (typepred "<")
   (expand* "has_last?" "has_greatest?" "greatest?" "fullset"
    "upper_bound?" "reflexive_closure" "union" "member")
   (skosimp*)
   (use "finite_below")
   (expand* "is_finite" "is_finite_type")
   (skolem!)
   (inst + "1 + N!1"
    "LAMBDA (r: T): IF r = t!1 THEN N!1 ELSE f!1(r) ENDIF")
   (("1"
     (expand "injective?")
     (skosimp)
     (lift-if)
     (lift-if)
     (ground)
     (inst - "x1!1" "x2!1")
     (("1"
       (assert)
       (lift-if)
       (split -1)
       (("1" (flatten) (assert)) ("2" (flatten))))
      ("2"
       (assert)
       (lift-if)
       (split -1)
       (("1" (flatten) (assert))
        ("2"
         (expand* "below" "irreflexive_kernel" "difference" "member"
          "well_ordered?" "strict_total_order?" "trichotomous?")
         (flatten)
         (ground)
         (inst -5 "x2!1")
         (ground))))))
    ("2" (skosimp) (assert))
    ("3"
     (skosimp)
     (expand* "below" "irreflexive_kernel" "difference" "member"
      "well_ordered?" "strict_total_order?" "trichotomous?")
     (flatten)
     (inst - "r!1")
     (inst - "r!1" "t!1")
     (assert))))


proof_type: j_proof
decl_type: tcc
library: orders
theory: well_ordered_finite
signature: nil
run_date: Unknown date
run_time: ----
status: proved-incomplete
description: nil
script:
  (""
   (skolem-typepred)
   (expand* "nonempty?" "empty?" "member")
   (skolem!)
   (lemma "non_empty_finite_has_least")
   (inst - "{t | x!1(t) AND reflexive_closure(<)(t, x!2)}"
    "reflexive_closure(<)")
   (("1"
     (expand "has_least?")
     (skolem!)
     (inst + "t!1")
     (typepred "<")
     (grind :if-match nil)
     (("1"
       (inst -7 "r!1")
       (("1" (assert))
        ("2" (inst - "t!1" "r!1") (inst - "r!1" "t!1" "x!2") (assert))))
      ("2" (inst - "r!1" "x!2") (assert) (inst -6 "r!1") (assert))))
    ("2"
     (split)
     (("1"
       (use "finite_below")
       (expand "is_finite")
       (skolem!)
       (inst + "N!1 + 1"
        "LAMBDA (r: ({t | x!1(t) AND reflexive_closure[T](<)(t, x!2)})): IF r = x!2 THEN 0 ELSE f!1(r) + 1 ENDIF")
       (("1"
         (expand "injective?")
         (skosimp :preds? t)
         (lift-if)
         (lift-if)
         (ground)
         (lift-if)
         (split -1)
         (("1" (flatten) (assert))
          ("2" (flatten) (inst - "x1!1" "x2!1") (assert))))
        ("2" (skosimp) (assert))
        ("3"
         (skosimp :preds? t)
         (expand* "below" "reflexive_closure" "union"
          "irreflexive_kernel" "difference" "member")
         (assert))))
      ("2"
       (expand* "reflexive_closure" "union" "empty?" "member")
       (inst - "x!2"))))))


proof_type: j_proof
decl_type: tcc
library: orders
theory: well_ordered_finite
signature: nil
run_date: Unknown date
run_time: ----
status: proved-incomplete
description: nil
script:
  (""
   (expand* "well_ordered?" "well_founded?")
   (skosimp*)
   (use "nonempty_has_least")
   (("1"
     (assert)
     (typepred "least[T](reflexive_closure[T](<))(p!1)")
     (inst + "least(reflexive_closure[T](<))(p!1)")
     (skolem!)
     (expand* "least?" "lower_bound?")
     (inst - "x!1")
     (expand "reflexive_closure" -2 :occurrence 1)
     (expand* "union" "member")
     (typepred "<")
     (expand* "strict_total_order?" "strict_order?" "irreflexive?"
      "transitive?")
     (flatten)
     (inst - "x!1")
     (inst - "x!1" "least(reflexive_closure[T](<))(p!1)" "x!1")
     (assert))
    ("2" (expand* "nonempty?" "empty?" "member") (inst?))))


proof_type: j_proof
decl_type: tcc
library: orders
theory: well_ordered_finite
signature: nil
run_date: Unknown date
run_time: ----
status: proved-incomplete
description: nil
script:
  (""
   (skolem-typepred)
   (typepred "<")
   (case "EXISTS (t: T): FORALL (r: (fullset[T])): (r < t) OR (r = t)")
   (("1"
     (grind :if-match nil)
     (typepred "greatest(union(<, =))(fullset[T])")
     (("1"
       (expand* "greatest?" "upper_bound?" "fullset")
       (inst - "x!1")
       (expand "union" -1 :occurrence 1)
       (expand "member")
       (assert)
       (inst -7 "greatest(union(<, =))({x: T | TRUE})")
       (("1" (assert))
        ("2" (inst + "t!1") (skosimp) (inst - "r!1") (assert))))
      ("2" (inst + "t!1"))))
    ("2"
     (inst + "x!1")
     (skosimp)
     (expand* "has_next?" "above" "nonempty?" "empty?"
      "irreflexive_kernel" "difference" "member" "well_ordered?"
      "strict_total_order?" "trichotomous?")
     (flatten)
     (inst - "r!1" "x!1")
     (inst - "r!1")
     (assert))))


proof_type: j_proof
decl_type: tcc
library: orders
theory: well_ordered_finite
signature: nil
run_date: Unknown date
run_time: ----
status: proved-incomplete
description: nil
script:
  (""
   (skolem-typepred)
   (use "nonempty_has_least")
   (("1"
     (typepred "<")
     (use "finite_below")
     (lemma "non_empty_finite_has_greatest")
     (inst - "below(x!1, <)" "reflexive_closure(<)")
     (("1"
       (expand* "has_greatest?" "greatest?" "upper_bound?" "has_prev?")
       (skosimp)
       (inst + "t!1")
       (("1"
         (typepred "next(<)(t!1)")
         (expand* "least?" "lower_bound?")
         (flatten)
         (expand "below" -3)
         (expand* "above" "irreflexive_kernel" "difference"
          "reflexive_closure" "union" "member")
         (flatten)
         (inst - "x!1")
         (("1"
           (assert)
           (inst - "next(<)(t!1)")
           (("1"
             (assert)
             (expand* "well_ordered?" "strict_total_order?"
              "strict_order?" "irreflexive?" "transitive?")
             (flatten)
             (inst - "t!1")
             (inst - "t!1" "next(<)(t!1)" "t!1")
             (assert))
            ("2"
             (expand* "below" "irreflexive_kernel" "difference"
              "member"))))
          ("2"
           (expand* "above" "irreflexive_kernel" "difference" "member")
           (assert))))
        ("2"
         (expand* "has_next?" "nonempty?" "empty?" "member" "above"
          "below" "irreflexive_kernel" "difference" "member")
         (flatten)
         (inst - "x!1")
         (assert))))
      ("2"
       (assert)
       (rewrite "nonfirst")
       (lift-if)
       (expand "emptyset")
       (ground)
       (expand "first")
       (typepred "least(reflexive_closure(<))(fullset[T])")
       (expand* "least?" "fullset" "lower_bound?")
       (expand "reflexive_closure" -1 :occurrence 1)
       (expand* "union" "member")
       (inst - "x!1")
       (assert)
       (expand "below" -5)
       (expand* "empty?" "irreflexive_kernel" "difference" "member")
       (inst - "least(reflexive_closure(<))({x: T | TRUE})")
       (("1" (assert))
        ("2"
         (expand "has_least?" +)
         (expand* "well_ordered?" "well_founded?")
         (flatten)
         (inst - "{x: T | TRUE}")
         (split)
         (("1"
           (skolem!)
           (inst + "y!1")
           (expand* "least?" "lower_bound?" "reflexive_closure" "union"
            "member")
           (skosimp)
           (inst - "r!1")
           (expand* "strict_total_order?" "trichotomous?")
           (flatten)
           (inst - "r!1" "y!1")
           (assert))
          ("2" (inst + "x!1"))))))))
    ("2" (grind :if-match all))))


proof_type: f_proof
decl_type: formula
library: orders
theory: finite_below
signature: nil
run_date: Unknown date
run_time: ----
status: proved-incomplete
description: nil
script:
  (""
   (measure-induct+ "card(S)" ("S"))
   (skosimp :preds? t)
   (expand "nth" +)
   (lift-if)
   (prop)
   (("1"
     (inst - "remove(least(reflexive_closure(lessp!1))(x!1), x!1)")
     (expand "nth" +)
     (assert)
     (hide -4)
     (typepred "least(reflexive_closure(lessp!1))(x!1)")
     (expand* "least?" "lower_bound?")
     (inst -
      "least(reflexive_closure(lessp!1))(remove(least(reflexive_closure(lessp!1))(x!1), x!1))")
     (("1"
       (expand "reflexive_closure" -2 1)
       (expand* "union" "member")
       (typepred
        "least(reflexive_closure(lessp!1))(remove(least(reflexive_closure(lessp!1))(x!1), x!1))")
       (expand "remove" -1 1)
       (expand "member")
       (flatten))
      ("2"
       (typepred
        "least(reflexive_closure(lessp!1))(remove(least(reflexive_closure(lessp!1))(x!1), x!1))")
       (expand "remove" -1 1)
       (expand "member")
       (flatten))))
    ("2"
     (inst - "remove(least(reflexive_closure(lessp!1))(x!1), x!1)")
     (assert)
     (inst - "lessp!1" "n!1 - 1")
     (use "card_remove[T]")
     (assert))))


proof_type: f_proof
decl_type: formula
library: orders
theory: finite_below
signature: nil
run_date: Unknown date
run_time: ----
status: proved-incomplete
description: nil
script:
  (""
   (skolem-typepred)
   (expand* "restrict" "preserves")
   (induct "x1" :name "below_induction[card(S!1)]")
   (("1"
     (flatten)
     (induct "x2" :name "below_induction[card(S!1)]")
     (("1" (assert))
      ("2"
       (skosimp :preds? t)
       (expand "nth" -3 1)
       (expand "nth" +)
       (typepred "least(reflexive_closure(lessp!1))(S!1)")
       (expand* "least?" "lower_bound?")
       (inst -
        "nth(remove(least(reflexive_closure(lessp!1))(S!1), S!1), lessp!1)(jb!1)")
       (("1"
         (expand "reflexive_closure" -2 1)
         (expand* "union" "member")
         (assert)
         (typepred
          "nth(remove(least(reflexive_closure(lessp!1))(S!1), S!1), lessp!1)(jb!1)")
         (expand "remove" -1 1)
         (propax))
        ("2"
         (typepred
          "nth(remove(least(reflexive_closure(lessp!1))(S!1), S!1), lessp!1)(jb!1)")
         (expand "remove" -1 1)
         (expand "member")
         (flatten))))))
    ("2"
     (skosimp)
     (induct "x2" :name "below_induction[card(S!1)]")
     (("1" (assert))
      ("2"
       (skosimp)
       (split)
       (("1"
         (lemma "nth_one_step")
         (inst - "S!1" "lessp!1" "jb!2")
         (assert)
         (expand* "strict_total_order?" "strict_order?" "transitive?")
         (flatten)
         (inst - "nth(S!1, lessp!1)(1 + jb!1)" "nth(S!1, lessp!1)(jb!2)"
          "nth(S!1, lessp!1)(1 + jb!2)")
         (assert))
        ("2"
         (lemma "nth_one_step")
         (inst - "S!1" "lessp!1" "jb!2")
         (assert))))
      ("3" (skosimp :preds? t) (assert)) ("4" (assert))))))


proof_type: f_proof
decl_type: formula
library: orders
theory: finite_below
signature: nil
run_date: Unknown date
run_time: ----
status: proved-incomplete
description: nil
script:
  (""
   (measure-induct+ "card(S)" ("S"))
   (skolem-typepred)
   (expand "surjective?")
   (skolem!)
   (case "least(reflexive_closure(lessp!1))(x!1) = y!1")
   (("1"
     (inst + 0)
     (("1" (expand "nth" +) (propax))
      ("2"
       (use "empty_card[T]")
       (assert)
       (expand* "empty?" "member")
       (inst - "y!1")
       (assert))))
    ("2"
     (expand "nth" +)
     (inst - "remove(least(reflexive_closure(lessp!1))(x!1), x!1)")
     (inst - "lessp!1")
     (use "card_remove[T]")
     (typepred "least(reflexive_closure(lessp!1))(x!1)")
     (assert)
     (inst - "y!1")
     (("1" (skolem-typepred) (inst + "x!2 + 1") (assert))
      ("2" (expand* "remove" "member"))))
    ("3"
     (use "non_empty_finite_has_least")
     (expand* "empty?" "member")
     (inst - "y!1")
     (assert))))


proof_type: f_proof
decl_type: formula
library: orders
theory: finite_below
signature: nil
run_date: Unknown date
run_time: ----
status: proved-incomplete
description: nil
script:
  (""
   (measure-induct+ "card(S)" ("S"))
   (skolem-typepred)
   (expand* "restrict" "preserves")
   (skosimp)
   (expand "index" +)
   (smash)
   (("1"
     (lemma "least_unique")
     (inst - "x!1" "reflexive_closure(lessp!1)" "x1!1" "x2!1")
     (expand* "strict_total_order?" "strict_order?" "irreflexive?")
     (flatten)
     (inst - "x1!1")
     (assert))
    ("2"
     (expand "least?" -4)
     (expand "reflexive_closure" -4)
     (expand* "lower_bound?" "union" "member")
     (inst -4 "x1!1")
     (assert)
     (expand* "strict_total_order?" "strict_order?" "transitive?"
      "irreflexive?")
     (flatten)
     (inst - "x1!1")
     (inst - "x1!1" "x2!1" "x1!1")
     (assert))
    ("3"
     (inst - "remove(least(reflexive_closure(lessp!1))(x!1), x!1)")
     (inst - "lessp!1")
     (use "card_remove[T]")
     (assert)
     (inst - "x1!1" "x2!1")
     (assert))))


proof_type: f_proof
decl_type: formula
library: orders
theory: finite_below
signature: nil
run_date: Unknown date
run_time: ----
status: proved-incomplete
description: nil
script:
  (""
   (measure-induct+ "card(S)" ("S"))
   (skolem-typepred)
   (expand "left_inverse?")
   (skolem-typepred)
   (expand "index" +)
   (lift-if)
   (prop)
   (("1" (expand "nth" +) (rewrite "least_def"))
    ("2"
     (expand "nth" +)
     (lift-if)
     (ground)
     (inst - "remove(least(reflexive_closure(lessp!1))(x!1), x!1)")
     (inst - "lessp!1")
     (use "card_remove[T]")
     (assert)
     (inst - "d!1"))))


proof_type: f_proof
decl_type: formula
library: orders
theory: finite_below
signature: nil
run_date: Unknown date
run_time: ----
status: proved-incomplete
description: nil
script:
  (""
   (measure-induct+ "card(S)" ("S"))
   (skolem-typepred)
   (expand "right_inverse?")
   (skolem-typepred)
   (expand "nth" +)
   (lift-if)
   (prop)
   (("1" (expand "index" +) (lift-if) (ground))
    ("2"
     (expand "index" +)
     (lift-if)
     (ground)
     (("1"
       (lemma "least_unique")
       (inst - "x!1" "reflexive_closure(lessp!1)"
        "least(reflexive_closure(lessp!1))(x!1)"
        "nth(remove(least(reflexive_closure(lessp!1))(x!1), x!1), lessp!1)(r!1 - 1)")
       (expand "least?")
       (flatten)
       (typepred
        "nth(remove(least(reflexive_closure(lessp!1))(x!1), x!1), lessp!1)(r!1 - 1)")
       (expand "remove" -1 1)
       (expand "member")
       (flatten))
      ("2"
       (inst - "remove(least(reflexive_closure(lessp!1))(x!1), x!1)")
       (inst - "lessp!1")
       (use "card_remove[T]")
       (assert)
       (inst - "r!1 - 1")
       (assert))))))


proof_type: t_proof
decl_type: tcc
library: orders
theory: finite_below
signature: nil
run_date: Unknown date
run_time: ----
status: proved-incomplete
description: nil
script:
  (""
   (skosimp :preds? t)
   (use "nonempty_card[T]")
   (assert)
   (expand "nonempty?")
   (use "non_empty_finite_has_least"))


proof_type: t_proof
decl_type: tcc
library: orders
theory: finite_below
signature: nil
run_date: Unknown date
run_time: ----
status: proved-incomplete
description: nil
script:
  (""
   (skosimp :preds? t)
   (use "card_remove[T]")
   (("1" (lift-if) (ground))
    ("2"
     (lemma "non_empty_finite_has_least")
     (inst?)
     (use "nonempty_card[T]")
     (assert)
     (expand "nonempty?")
     (propax))))


proof_type: j_proof
decl_type: tcc
library: orders
theory: finite_below
signature: nil
run_date: Unknown date
run_time: ----
status: proved-incomplete
description: nil
script:
  (""
   (skolem-typepred)
   (expand* "bijective?" "injective?")
   (use "nth_surjective")
   (assert)
   (skosimp :preds? t)
   (use "nth_monotonic")
   (expand* "restrict" "preserves")
   (inst-cp - "x2!1" "x1!1")
   (inst - "x1!1" "x2!1")
   (expand* "strict_total_order?" "strict_order?" "irreflexive?")
   (flatten)
   (inst - "nth(S!1, lessp!1)(x1!1)")
   (ground))


proof_type: t_proof
decl_type: tcc
library: orders
theory: finite_below
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (use "empty_card")
   (assert)
   (expand* "empty?" "member")
   (inst - "t!1")
   (assert))


proof_type: t_proof
decl_type: tcc
library: orders
theory: finite_below
signature: nil
run_date: Unknown date
run_time: ----
status: proved-incomplete
description: nil
script:
  (""
   (skosimp :preds? t)
   (use "non_empty_finite_has_least")
   (expand* "empty?" "member")
   (inst?))


proof_type: j_proof
decl_type: tcc
library: orders
theory: finite_below
signature: nil
run_date: Unknown date
run_time: ----
status: proved-incomplete
description: nil
script:
  (""
   (skolem!)
   (use "index_nth_left_inverse")
   (use "index_nth_right_inverse")
   (forward-chain "left_right_bij[(S!1), below[card(S!1)]]"))


proof_type: f_proof
decl_type: formula
library: orders
theory: similarity
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (expand* "similarity?" "isomorphism?" "preserves")
   (skosimp* t)
   (inst-cp - "d1!1" "d2!1")
   (smash)
   (expand* "total_order?" "dichotomous?")
   (flatten)
   (inst - "d1!1" "d2!1")
   (inst -6 "d2!1" "d1!1")
   (assert)
   (expand "partial_order?" -3)
   (expand "antisymmetric?")
   (flatten)
   (inst - "f!1(d1!1)" "f!1(d2!1)")
   (assert)
   (expand* "bijective?" "injective?")
   (flatten)
   (inst -6 "d1!1" "d2!1")
   (assert))


proof_type: f_proof
decl_type: formula
library: orders
theory: similarity
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (expand* "similar?" "isomorphic?")
   (skolem!)
   (inst?)
   (forward-chain "similarity_is_isomorphism"))


proof_type: f_proof
decl_type: formula
library: orders
theory: similarity_props
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp :preds? t)
   (expand* "similarity?" "preserves" "greatest?" "fullset"
    "upper_bound?" "bijective?" "surjective?")
   (skosimp)
   (inst - "r!1")
   (skolem!)
   (inst - "x!1" "d!1")
   (inst - "x!1")
   (assert))


proof_type: f_proof
decl_type: formula
library: orders
theory: similarity_props
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (expand* "similar?" "has_greatest?")
   (skosimp*)
   (inst + "f!1(t!1)")
   (forward-chain "similarity_greatest"))


proof_type: f_proof
decl_type: formula
library: orders
theory: similarity_props
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp :preds? t)
   (expand* "similarity?" "preserves" "least?" "fullset" "lower_bound?"
    "bijective?" "surjective?")
   (skosimp)
   (inst - "r!1")
   (skolem!)
   (inst - "d!1" "x!1")
   (inst - "x!1")
   (assert))


proof_type: f_proof
decl_type: formula
library: orders
theory: similarity_props
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (expand* "similar?" "has_least?")
   (skosimp*)
   (inst + "f!1(t!1)")
   (forward-chain "similarity_least"))


proof_type: f_proof
decl_type: formula
library: orders
theory: similarity_props
signature: nil
run_date: Unknown date
run_time: ----
status: proved-incomplete
description: nil
script:
  (""
   (flatten)
   (skolem-typepred)
   (expand* "similar?" "similarity?" "preserves")
   (rewrite "finite_full[D]")
   (rewrite "finite_full[R]")
   (inst +
    "nth(fullset[R], irreflexive_kernel(Rord!1)) o index(fullset[D], irreflexive_kernel(Dord!1))")
   (("1"
     (skosimp)
     (expand "o")
     (use "index_monotonic[D]")
     (expand* "restrict" "preserves")
     (inst - "x1!1" "x2!1")
     (split)
     (("1"
       (use "nth_monotonic[R]")
       (expand* "restrict" "preserves")
       (inst - "index(fullset[D], irreflexive_kernel(Dord!1))(x1!1)"
        "index(fullset[D], irreflexive_kernel(Dord!1))(x2!1)")
       (assert)
       (expand "irreflexive_kernel" -1 1)
       (expand* "difference" "member"))
      ("2"
       (expand "irreflexive_kernel" 1)
       (expand* "difference" "member")
       (assert)
       (expand "total_order?" -3)
       (expand* "partial_order?" "preorder?" "reflexive?")
       (flatten)
       (inst?)
       (assert))))
    ("2"
     (expand "fullset" 1 1)
     (use "composition_bijective[D, below[card(fullset[R])], R]")
     (("1" (hide -2 -3 -4 -5 -6) (grind))
      ("2" (use "nth_bijective[R]") (hide -2 -3 -4 -5 -6 2) (grind))
      ("3"
       (expand "fullset" 1 1)
       (split)
       (("1" (skolem!) (assert))
        ("2"
         (use "index_bijective[D]")
         (hide -2 -3 2)
         (expand* "bijective?" "injective?" "surjective?")
         (prop)
         (("1" (skosimp) (inst - "x1!1" "x2!1") (assert))
          ("2"
           (skolem-typepred)
           (inst - "y!1")
           (("1" (skolem!) (inst?)) ("2" (assert))))))))))
    ("3" (skolem!) (assert))))


proof_type: f_proof
decl_type: formula
library: orders
theory: set_dichotomous
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (flatten)
   (lemma "zorn")
   (split)
   (("1"
     (skolem!)
     (expand* "maximal?" "fullset")
     (case "full?(t!1`1)")
     (("1"
       (inst 2 "t!1`2")
       (("1"
         (typepred "t!1`2")
         (expand* "full?" "member" "injective?")
         (skosimp)
         (inst?)
         (assert))
        ("2" (expand* "full?" "member"))))
      ("2"
       (inst 4 "extend[D, (t!1`1), R, epsilon(fullset[R])](t!1`2)")
       (("1"
         (expand* "surjective?" "full?" "member")
         (skosimp*)
         (inst +
          "(add(x!1, t!1`1), LAMBDA (a: (add(x!1, t!1`1))): IF a = x!1 THEN y!1 ELSE t!1`2(a) ENDIF)")
         (("1"
           (split)
           (("1"
             (expand "injection_order")
             (split)
             (("1" (use "subset_add[D]"))
              ("2" (skolem!) (lift-if) (ground))))
            ("2"
             (flatten)
             (replace -1)
             (beta)
             (expand* "add" "member"))))
          ("2" (expand "fullset") (propax))
          ("3"
           (typepred "t!1`2")
           (expand "injective?")
           (skosimp :preds? t)
           (expand* "add" "member" "extend" "fullset")
           (delete 5)
           (lift-if)
           (lift-if)
           (ground)
           (("1" (inst 5 "x2!1") (assert)) ("2" (inst 5 "x1!1") (assert))
            ("3" (inst - "x1!1" "x2!1") (assert))))
          ("4" (skosimp :preds? t) (expand* "add" "member") (assert))))
        ("2"
         (split)
         (("1" (expand* "full?" "member") (skolem!) (inst?))
          ("2" (skolem!) (inst + "r!1"))))))))
    ("2"
     (skolem-typepred)
     (expand* "bounded_above?" "upper_bound?" "injection_order")
     (inst +
      "({d | EXISTS (sub_inj: (ch!1)): sub_inj`1(d)}, LAMBDA (d: ({d | EXISTS (sub_inj: (ch!1)): sub_inj`1(d)})): choose[(ch!1)]({sub_inj: (ch!1) | sub_inj`1(d)})`2(d))")
     (("1"
       (skolem!)
       (split)
       (("1" (expand* "subset?" "member") (skosimp) (inst?))
        ("2"
         (skolem!)
         (expand* "chain?" "total_order?" "dichotomous?" "restrict")
         (inst - "r!1"
          "choose[(ch!1)]({sub_inj: (ch!1) | sub_inj`1(d!1)})")
         (("1"
           (expand "injection_order")
           (delete 4)
           (prop)
           (("1" (inst?)) ("2" (inst - "d!1") (assert))))
          ("2"
           (expand* "nonempty?" "empty?" "member")
           (inst?)
           (assert))))))
      ("2"
       (expand* "injective?" "chain?" "total_order?" "dichotomous?"
        "restrict")
       (skosimp* :preds? t)
       (inst - "choose[(ch!1)]({sub_inj: (ch!1) | sub_inj`1(x1!1)})"
        "choose[(ch!1)]({sub_inj: (ch!1) | sub_inj`1(x2!1)})")
       (("1"
         (expand "injection_order")
         (delete 4)
         (prop)
         (("1"
           (typepred
            "choose[(ch!1)]({sub_inj: (ch!1) | sub_inj`1(x2!1)})`2")
           (("1"
             (expand* "injective?" "subset?" "member")
             (inst -2 "x1!1")
             (inst?)
             (("1" (inst?) (assert)) ("2" (assert))))
            ("2" (expand* "nonempty?" "empty?" "member") (inst?))))
          ("2"
           (typepred
            "choose[(ch!1)]({sub_inj: (ch!1) | sub_inj`1(x1!1)})`2")
           (("1"
             (expand* "injective?" "subset?" "member")
             (inst -2 "x2!1")
             (inst?)
             (("1" (inst?) (assert)) ("2" (assert))))
            ("2" (expand* "nonempty?" "empty?" "member") (inst?))))))
        ("2" (expand* "nonempty?" "empty?" "member") (inst?))
        ("3" (expand* "nonempty?" "empty?" "member") (inst?))))
      ("3"
       (skosimp* :preds? t)
       (expand* "nonempty?" "empty?" "member")
       (inst?))
      ("4" (skosimp* :preds? t) (assert))))))


proof_type: f_proof
decl_type: formula
library: orders
theory: set_dichotomous
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (lemma "injective_or_surjective")
   (prop)
   (("1"
     (skolem!)
     (use "surjective_inverse_exists[D, R]")
     (skolem!)
     (use "inj_inv_alt[D, R]")
     (inst? 2))
    ("2"
     (inst 2 "LAMBDA r: epsilon(fullset[D])")
     (("1" (expand "injective?" 2) (skosimp*) (inst?)) ("2" (skolem!))))))


proof_type: f_proof
decl_type: formula
library: orders
theory: set_dichotomous
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (lemma "injective_or_surjective")
   (prop)
   (("1" (skolem!) (inst + "d!1"))
    ("2"
     (skolem!)
     (inst 3 "f!1")
     (expand "surjective?")
     (skolem!)
     (inst?))
    ("3"
     (skosimp*)
     (lemma "inv_inj_is_surj[D, R]")
     (("1" (inst?) (inst? 2) (inst + "d!1")) ("2" (inst + "d!1"))))
    ("4" (skosimp*) (inst + "r!1"))))


proof_type: f_proof
decl_type: formula
library: orders
theory: set_antisymmetric
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp*)
   (inst +
    "LAMBDA (d: D): IF in_closure(f!1, f!2, d) THEN f!1(d) ELSE inverse_alt(f!2)(d) ENDIF")
   (("1"
     (expand "bijective?")
     (split)
     (("1"
       (expand "injective?")
       (skosimp)
       (lift-if)
       (lift-if)
       (lift-if)
       (prop)
       (("1" (inst - "x1!1" "x2!1") (assert))
        ("2"
         (expand "in_closure" +)
         (flatten)
         (inst + "x1!1")
         (assert)
         (expand* "image" "complement" "difference" "member")
         (skolem!)
         (replace -1)
         (typepred "inverse_alt[R, D](f!2)")
         (("1"
           (expand "inverse?")
           (inst - "x2!1")
           (assert)
           (inst + "x!1")
           (assert))
          ("2" (flatten) (inst?))))
        ("3"
         (expand "in_closure" +)
         (flatten)
         (inst + "x2!1")
         (assert)
         (expand* "image" "complement" "difference" "member")
         (skosimp*)
         (replace -3)
         (replace -2 :dir rl)
         (typepred "inverse_alt[R, D](f!2)")
         (("1"
           (expand "inverse?")
           (inst - "f!2(x!1)")
           (assert)
           (inst + "x!1"))
          ("2" (flatten) (inst?))))
        ("4"
         (expand* "in_closure" "image" "complement" "difference"
          "member")
         (skosimp*)
         (replace -1)
         (replace -3)
         (typepred "inverse_alt[R, D](f!2)")
         (("1"
           (expand "inverse?")
           (inst-cp - "f!2(x!2)")
           (inst - "f!2(x!1)")
           (ground)
           (("1" (inst + "x!2")) ("2" (inst + "x!1"))
            ("3" (inst + "x!2"))))
          ("2" (flatten) (inst?))))))
      ("2"
       (expand "surjective?")
       (skolem!)
       (case "in_closure(f!1, f!2, f!2(y!1))")
       (("1"
         (expand "in_closure" -)
         (split)
         (("1"
           (expand* "fullset" "image" "complement" "difference" "member")
           (inst + "y!1"))
          ("2"
           (skosimp)
           (inst + "e!1")
           (assert)
           (expand "injective?")
           (inst -4 "f!1(e!1)" "y!1")
           (assert))))
        ("2"
         (inst + "f!2(y!1)")
         (assert)
         (typepred "inverse_alt[R, D](f!2)")
         (("1"
           (expand "inverse?")
           (inst - "f!2(y!1)")
           (split)
           (("1"
             (expand "injective?")
             (inst -3 "inverse_alt(f!2)(f!2(y!1))" "y!1")
             (("1" (assert)) ("2" (flatten) (inst?))))
            ("2" (inst + "y!1"))))
          ("2" (flatten) (inst?))))))))
    ("2" (skosimp) (inst + "f!1(d!1)"))))


proof_type: f_proof
decl_type: formula
library: orders
theory: set_antisymmetric
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp*)
   (lemma "inj_inj_bij")
   (prop)
   (("1"
     (use "surjective_inverse_exists[R, D]")
     (skolem!)
     (use "inj_inv_alt[R, D]")
     (inst?))
    ("2"
     (use "surjective_inverse_exists[D, R]")
     (skolem!)
     (use "inj_inv_alt[D, R]")
     (inst?))))


proof_type: f_proof
decl_type: formula
library: orders
theory: set_antisymmetric
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp*)
   (lemma "inj_inj_bij")
   (prop)
   (("1" (inst?))
    ("2"
     (assert)
     (lemma "surjective_inverse_exists[D, R]" ("f" "f!2"))
     (skolem!)
     (use "inj_inv_alt[D, R]")
     (inst?))))


proof_type: f_proof
decl_type: formula
library: orders
theory: numbers_infinite
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (expand "is_finite_type")
   (skolem!)
   (lemma "composition_injective[below[N!1 + 1], nat, below[N!1]]")
   (inst - "LAMBDA (n: below[N!1 + 1]): n" "g!1")
   (("1"
     (lemma "injection_n_to_m")
     (inst - "N!1" "N!1 + 1")
     (assert)
     (inst?))
    ("2" (expand "injective?") (skosimp))))


proof_type: f_proof
decl_type: formula
library: orders
theory: numbers_infinite
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (lemma "nat_infinite")
   (rewrite "finite_full")
   (rewrite "finite_full")
   (assert)
   (lemma "finite_subset[int]" ("A" "fullset[int]" "s" "fullset[nat]"))
   (rewrite "finite_extension[int, nat]")
   (expand* "extend" "subset?" "member" "fullset"))


proof_type: f_proof
decl_type: formula
library: orders
theory: numbers_infinite
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (lemma "nat_infinite")
   (rewrite "finite_full")
   (rewrite "finite_full")
   (assert)
   (lemma "finite_subset[rat]" ("A" "fullset[rat]" "s" "fullset[nat]"))
   (rewrite "finite_extension[rat, nat]")
   (expand* "extend" "subset?" "member" "fullset"))


proof_type: f_proof
decl_type: formula
library: orders
theory: numbers_infinite
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (lemma "nat_infinite")
   (rewrite "finite_full")
   (rewrite "finite_full")
   (assert)
   (lemma "finite_subset[real]" ("A" "fullset[real]" "s" "fullset[nat]"))
   (rewrite "finite_extension[real, nat]")
   (expand* "extend" "subset?" "member" "fullset"))


proof_type: f_proof
decl_type: formula
library: orders
theory: range
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skolem-typepred)
   (expand* "has_least?" "least?" "lower_bound?" "has_greatest?"
    "greatest?" "upper_bound?" "restrict" "member")
   (skosimp*)
   (inst-cp - "t!2")
   (inst + "t!1" "t!2")
   (apply-extensionality :hide? t)
   (expand "closed_range")
   (inst - "t!1" "t!2" "x!1")
   (smash)
   (("1" (inst -6 "x!1")) ("2" (inst - "x!1"))))


proof_type: f_proof
decl_type: formula
library: orders
theory: range
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skolem-typepred)
   (expand* "has_least?" "least?" "lower_bound?" "has_greatest?"
    "greatest?" "upper_bound?" "member")
   (expand "restrict" (-2 -3))
   (skosimp*)
   (inst + "t!1" "t!2")
   (("1"
     (apply-extensionality :hide? t)
     (expand "nontrivial_closed_range")
     (iff)
     (ground)
     (("1" (inst -4 "x!1")) ("2" (inst -6 "x!1"))
      ("3" (inst - "t!1" "t!2" "x!1") (assert))))
    ("2"
     (inst - "least(lesseq)(R!1)")
     (inst - "greatest(lesseq)(R!1)")
     (assert))))


proof_type: f_proof
decl_type: formula
library: orders
theory: range
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (grind)
   (typepred "least(lesseq)(R!1)")
   (expand* "least?" "lower_bound?")
   (expand "restrict" -3 :occurrence 1)
   (inst - "greatest(lesseq)(R!1)"))


proof_type: f_proof
decl_type: formula
library: orders
theory: range
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skolem!)
   (typepred "least(lesseq)(closed_range(r1!1, r2!1))")
   (expand* "least?" "lower_bound?")
   (expand "closed_range" -2 :occurrence 1)
   (flatten)
   (expand "restrict" -4 :occurrence 1)
   (inst - "r1!1")
   (("1" (assert)) ("2" (expand "closed_range" 1) (propax))))


proof_type: f_proof
decl_type: formula
library: orders
theory: range
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skolem!)
   (typepred "greatest(lesseq)(closed_range(r1!1, r2!1))")
   (expand* "greatest?" "upper_bound?")
   (expand "closed_range" -2 :occurrence 1)
   (flatten)
   (expand "restrict" -4 :occurrence 1)
   (inst - "r2!1")
   (("1" (assert)) ("2" (expand "closed_range" 1) (propax))))


proof_type: f_proof
decl_type: formula
library: orders
theory: range
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skolem!)
   (typepred "least(lesseq)(nontrivial_closed_range(r1!1, r2!1))")
   (expand* "least?" "lower_bound?")
   (expand "nontrivial_closed_range" -2 :occurrence 1)
   (flatten)
   (expand "restrict" -4 :occurrence 1)
   (inst - "r1!1")
   (("1" (assert)) ("2" (expand "nontrivial_closed_range" 1) (propax))))


proof_type: f_proof
decl_type: formula
library: orders
theory: range
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skolem!)
   (typepred "greatest(lesseq)(nontrivial_closed_range(r1!1, r2!1))")
   (expand* "greatest?" "upper_bound?")
   (expand "nontrivial_closed_range" -2 :occurrence 1)
   (flatten)
   (expand "restrict" -4 :occurrence 1)
   (inst - "r2!1")
   (("1" (assert)) ("2" (expand "nontrivial_closed_range" 1) (propax))))


proof_type: f_proof
decl_type: formula
library: orders
theory: range
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skolem!)
   (typepred "greatest(lesseq)(open_closed_range(r1!1, r2!1))")
   (expand* "greatest?" "upper_bound?")
   (expand "open_closed_range" -2 :occurrence 1)
   (flatten)
   (expand "restrict" -4 :occurrence 1)
   (inst - "r2!1")
   (("1" (assert)) ("2" (expand "open_closed_range" 1) (propax))))


proof_type: f_proof
decl_type: formula
library: orders
theory: range
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skolem!)
   (typepred "greatest(lesseq)(open_closed_range(r!1))")
   (expand* "greatest?" "upper_bound?")
   (expand "open_closed_range" -2 :occurrence 1)
   (expand "restrict" -3 :occurrence 1)
   (inst - "r!1")
   (("1" (assert)) ("2" (expand "open_closed_range" 1) (assert))))


proof_type: f_proof
decl_type: formula
library: orders
theory: range
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skolem!)
   (typepred "least(lesseq)(closed_open_range(r1!1, r2!1))")
   (expand* "least?" "lower_bound?")
   (expand "closed_open_range" -2 :occurrence 1)
   (flatten)
   (expand "restrict" -4 :occurrence 1)
   (inst - "r1!1")
   (("1" (assert)) ("2" (expand "closed_open_range" 1) (propax))))


proof_type: f_proof
decl_type: formula
library: orders
theory: range
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skolem!)
   (typepred "least(lesseq)(closed_open_range(r!1))")
   (expand* "least?" "lower_bound?")
   (expand "closed_open_range" -2 :occurrence 1)
   (expand "restrict" -3 :occurrence 1)
   (inst - "r!1")
   (("1" (assert)) ("2" (expand "closed_open_range" 1) (assert))))


proof_type: t_proof
decl_type: tcc
library: orders
theory: range
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (grind :if-match all)
   (typepred "least(lesseq)({r | r1!1 <= r AND r <= r2!1})")
   (("1"
     (typepred "greatest(lesseq)({r | r1!1 <= r AND r <= r2!1})")
     (("1"
       (expand* "greatest?" "upper_bound?" "least?" "lower_bound?")
       (expand "restrict" -4 :occurrence 1)
       (expand "restrict" -8 :occurrence 1)
       (inst - "r2!1")
       (inst - "r1!1")
       (assert))
      ("2" (inst + "r2!1") (assert))))
    ("2" (inst + "r1!1") (assert))))


proof_type: t_proof
decl_type: tcc
library: orders
theory: range
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (grind :if-match nil)
   (("1" (inst + "r2!1") (assert))
    ("2"
     (inst + "r1!1")
     (assert :quant-simp? t)
     (skosimp)
     (inst-cp -8 "r2!1")
     (inst -8 "t!1")
     (assert)
     (inst - "r1!2")
     (assert))))


proof_type: t_proof
decl_type: tcc
library: orders
theory: range
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (grind :if-match nil)
   (("1"
     (inst + "r2!1")
     (assert :quant-simp? t)
     (skosimp)
     (inst-cp -8 "r1!1")
     (assert)
     (inst -8 "r1!2")
     (assert))
    ("2" (inst + "r1!1") (assert))))


proof_type: t_proof
decl_type: tcc
library: orders
theory: range
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (grind :if-match nil)
   (("1"
     (inst + "r2!1")
     (assert :quant-simp? t)
     (skosimp)
     (inst-cp -7 "t!1")
     (assert)
     (inst -7 "r1!2")
     (assert))
    ("2"
     (inst + "r1!1")
     (assert :quant-simp? t)
     (skosimp)
     (inst-cp -7 "t!1")
     (assert)
     (inst -7 "r1!2")
     (assert))))


proof_type: t_proof
decl_type: tcc
library: orders
theory: range
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (grind :if-match nil)
   (("1" (inst - "t!1") (assert))
    ("2"
     (inst + "r2!1")
     (assert :quant-simp? t)
     (skosimp)
     (inst-cp -10 "t!1")
     (assert)
     (inst -10 "r1!2")
     (assert))
    ("3"
     (inst + "r1!1")
     (assert :quant-simp? t)
     (skosimp)
     (inst-cp -10 "t!1")
     (assert)
     (inst -10 "r1!2")
     (assert))))


proof_type: t_proof
decl_type: tcc
library: orders
theory: range
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (grind :if-match nil)
   (("1"
     (inst + "r!1")
     (assert)
     (skolem-typepred)
     (inst - "r!2")
     (assert))
    ("2"
     (inst 2 "r!1")
     (assert :quant-simp? t)
     (skosimp)
     (assert)
     (inst -5 "r1!1")
     (assert))
    ("3"
     (inst + "t!1")
     (assert)
     (skolem-typepred)
     (inst - "r!2")
     (assert))))


proof_type: t_proof
decl_type: tcc
library: orders
theory: range
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (grind :if-match nil)
   (("1"
     (inst + "r!1")
     (assert)
     (skolem-typepred)
     (inst - "r!2")
     (assert))
    ("2"
     (inst + "t!1")
     (assert)
     (skolem-typepred)
     (inst - "r!2")
     (assert))
    ("3"
     (inst 2 "r!1")
     (assert :quant-simp? t)
     (skosimp)
     (assert)
     (inst -5 "r1!1")
     (assert))))


proof_type: j_proof
decl_type: tcc
library: orders
theory: range_real
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skolem-typepred)
   (lemma "nat_infinite")
   (expand* "is_finite" "is_finite_type")
   (skolem!)
   (inst + "N!1"
    "LAMBDA (n: nat): f!1((greatest[real](lesseq)(x!1) - least[real](lesseq)(x!1)) / (n + 1) + least[real](lesseq)(x!1))")
   (("1"
     (expand "injective?")
     (skosimp)
     (inst -
      "least[real](lesseq)(x!1) + (greatest[real](lesseq)(x!1) - least[real](lesseq)(x!1)) / (1 + x1!1)"
      "least[real](lesseq)(x!1) + (greatest[real](lesseq)(x!1) - least[real](lesseq)(x!1)) / (1 + x2!1)")
     (assert)
     (use "both_sides_div2")
     (assert))
    ("2"
     (skolem!)
     (inst - "least[real](lesseq)(x!1)" "greatest[real](lesseq)(x!1)"
      "least[real](lesseq)(x!1) + (greatest[real](lesseq)(x!1) - least[real](lesseq)(x!1)) / (1 + n!1)")
     (expand "member")
     (assert)
     (split)
     (("1"
       (both-sides "-" "least[real](lesseq)(x!1)")
       (assert)
       (both-sides "*" "1 + n!1")
       (use "div_cancel2")
       (assert))
      ("2"
       (both-sides "-" "least[real](lesseq)(x!1)")
       (assert)
       (rewrite "div_mult_pos_le1")
       (lemma "le_times_le_pos")
       (inst - "greatest[real](lesseq)(x!1) - least[real](lesseq)(x!1)"
        "1" "1 + n!1"
        "greatest[real](lesseq)(x!1) - least[real](lesseq)(x!1)")
       (assert))))))


proof_type: j_proof
decl_type: tcc
library: orders
theory: range_real
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skolem-typepred)
   (expand* "nonempty?" "empty?" "member")
   (skolem!)
   (case "EXISTS (r: (x!1)): x!2 < r")
   (("1"
     (skolem!)
     (lemma "ntc_range_infinite")
     (inst - "nontrivial_closed_range(x!2, r!1)")
     (expand* "nontrivial_closed_range" "is_finite")
     (skolem!)
     (inst + "N!1"
      "LAMBDA (n: ({r: real | x!2 <= r AND r <= r!1})): f!1(n)")
     (("1"
       (expand "injective?")
       (skosimp :preds? t)
       (inst-cp - "x!2" "r!1" "x2!1")
       (inst - "x!2" "r!1" "x1!1")
       (assert)
       (inst - "x1!1" "x2!1")
       (assert))
      ("2" (skolem-typepred) (inst - "x!2" "r!1" "n!1") (assert))))
    ("2"
     (expand* "has_greatest?" "has_non_greatest?")
     (split -3)
     (("1"
       (inst + "x!2")
       (expand* "greatest?" "upper_bound?")
       (assert)
       (skolem!)
       (expand "restrict" 1)
       (inst + "r!1")
       (assert))
      ("2"
       (skosimp)
       (inst -2 "(x!2 + r!1) / 2")
       (inst-cp - "x!2")
       (assert)
       (skolem!)
       (inst - "t!1")
       (inst + "t!1")
       (assert))))))


proof_type: j_proof
decl_type: tcc
library: orders
theory: non_empty_bounded_sets
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skolem-typepred)
   (lemma "all_finite_least_bounded")
   (inst - "x!1" "reals.<=")
   (expand* "least_bounded_above?" "least_upper_bound?"
    "non_empty_bounded_above?" "nonempty?" "bounded_above?")
   (skosimp)
   (inst? +))


proof_type: j_proof
decl_type: tcc
library: orders
theory: non_empty_bounded_sets
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skolem-typepred)
   (lemma "all_finite_greatest_bounded")
   (inst - "x!1" "reals.<=")
   (expand* "greatest_bounded_below?" "greatest_lower_bound?"
    "non_empty_bounded_below?" "nonempty?" "bounded_below?")
   (skosimp)
   (inst? +))


proof_type: f_proof
decl_type: formula
library: orders
theory: bounded_integers
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (induct "c" :name "NAT_induction")
   (skosimp*)
   (case "upper_bound?[T](i!1, S!1, restrict[[real, real], [T, T], boolean](<=))")
   (("1" (expand* "has_greatest?" "greatest?") (inst? +) (assert))
    ("2"
     (expand "upper_bound?" +)
     (expand "restrict" 1)
     (skolem!)
     (inst - "j!2 - r!1")
     (("1" (assert) (inst - "S!1" "r!1" "j!2") (assert))
      ("2"
       (expand* "upper_bound?" "restrict")
       (inst - "r!1")
       (assert))))))


proof_type: f_proof
decl_type: formula
library: orders
theory: bounded_integers
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (induct "c" :name "NAT_induction")
   (skosimp*)
   (case "lower_bound?[T](i!1, S!1, restrict[[real, real], [T, T], boolean](<=))")
   (("1" (expand* "has_least?" "least?") (inst? +) (assert))
    ("2"
     (expand "lower_bound?" +)
     (expand "restrict" 1)
     (skolem!)
     (inst - "r!1 - j!2")
     (("1" (assert) (inst - "S!1" "r!1" "j!2") (assert))
      ("2"
       (expand* "lower_bound?" "restrict")
       (inst - "r!1")
       (assert))))))


proof_type: f_proof
decl_type: formula
library: orders
theory: bounded_integers
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (invoke (typepred "%1" "%2") (! 1 l) (! 1 r))
   (hide -4 -1)
   (invoke (name-replace "X" "%1") (! 1 l))
   (invoke (name-replace "Y" "%1") (! 1 r))
   (expand* "least?" "remove" "member" "/=" "lower_bound?" "restrict")
   (flatten)
   (inst - "Y")
   (assert))


proof_type: f_proof
decl_type: formula
library: orders
theory: bounded_integers
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (expand* "subset?" "remove" "member")
   (skosimp*)
   (inst-cp - "x!1")
   (prop)
   (invoke (typepred "%1") (! -1 l))
   (replace -4 :hide? t)
   (use "antisymmetric_restrict[real, T]")
   (rewrite "least_def")
   (grind))


proof_type: f_proof
decl_type: formula
library: orders
theory: bounded_integers
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (invoke (typepred "%1" "%2") (! 1 r) (! 1 l))
   (hide -4 -1)
   (invoke (name-replace "X" "%1") (! 1 l))
   (invoke (name-replace "Y" "%1") (! 1 r))
   (expand* "greatest?" "remove" "member" "/=" "upper_bound?" "restrict")
   (flatten)
   (inst - "X")
   (assert))


proof_type: f_proof
decl_type: formula
library: orders
theory: bounded_integers
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (expand* "subset?" "remove" "member")
   (skosimp*)
   (inst-cp - "x!1")
   (prop)
   (invoke (typepred "%1") (! -1 l))
   (replace -4 :hide? t)
   (use "antisymmetric_restrict[real, T]")
   (rewrite "greatest_def")
   (grind))


proof_type: f_proof
decl_type: formula
library: orders
theory: bounded_integers
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp :preds? t)
   (lemma "non_empty_bounded_above_has_greatest")
   (inst-cp - "Su2!1")
   (inst - "Su1!1")
   (expand* "disjoint?" "empty?" "member")
   (expand "restrict")
   (skolem!)
   (lemma "non_empty_bounded_above_has_greatest_lem")
   (inst - "intersection(Su1!1, Su2!1)"
    "max(greatest[T](restrict[[real, real], [T, T], bool](<=))(Su1!1), greatest[T](restrict[[real, real], [T, T], bool](<=))(Su2!1)) - x!1"
    "x!1"
    "max(greatest[T](restrict[[real, real], [T, T], bool](<=))(Su1!1), greatest[T](restrict[[real, real], [T, T], bool](<=))(Su2!1))")
   (("1"
     (assert)
     (expand "restrict")
     (expand* "upper_bound?" "max")
     (skolem-typepred)
     (expand* "intersection" "member")
     (lift-if)
     (prop)
     (("1"
       (lemma "greatest_ge")
       (inst - "restrict[[real, real], [T, T], bool](<=)" "Su2!1" "r!1")
       (expand "restrict")
       (propax))
      ("2"
       (assert)
       (lemma "greatest_ge")
       (inst - "restrict[[real, real], [T, T], bool](<=)" "Su1!1" "r!1")
       (expand "restrict")
       (propax))))
    ("2"
     (expand "max")
     (expand* "max" "intersection" "member")
     (expand "restrict")
     (propax))
    ("3"
     (expand* "max" "intersection" "member")
     (lift-if)
     (prop)
     (("1"
       (lemma "greatest_ge")
       (inst - "restrict[[real, real], [T, T], bool](<=)" "Su2!1" "x!1")
       (expand "restrict" -1 :occurrence 1)
       (assert))
      ("2"
       (lemma "greatest_ge")
       (inst - "restrict[[real, real], [T, T], bool](<=)" "Su1!1" "x!1")
       (expand "restrict" -1 :occurrence 1)
       (assert))))))


proof_type: f_proof
decl_type: formula
library: orders
theory: bounded_integers
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (auto-rewrite "restrict")
   (skosimp :preds? t)
   (lemma "non_empty_bounded_below_has_least")
   (inst-cp - "Sl2!1")
   (inst - "Sl1!1")
   (expand* "disjoint?" "empty?" "member")
   (skolem!)
   (lemma "non_empty_bounded_below_has_least_lem")
   (inst - "intersection(Sl1!1, Sl2!1)"
    "x!1 - min(least[T](restrict[[real, real], [T, T], bool](<=))(Sl1!1), least[T](restrict[[real, real], [T, T], bool](<=))(Sl2!1))"
    "x!1"
    "min(least[T](restrict[[real, real], [T, T], bool](<=))(Sl1!1), least[T](restrict[[real, real], [T, T], bool](<=))(Sl2!1))")
   (("1"
     (assert)
     (expand* "lower_bound?" "min")
     (skolem-typepred)
     (expand* "intersection" "member")
     (lift-if)
     (prop)
     (("1"
       (lemma "least_le")
       (inst - "restrict[[real, real], [T, T], bool](<=)" "Sl2!1" "r!1"))
      ("2"
       (lemma "least_le")
       (inst - "restrict[[real, real], [T, T], bool](<=)" "Sl1!1"
        "r!1"))))
    ("2"
     (expand "min")
     (expand* "min" "intersection" "member")
     (prop)
     (("1"
       (lemma "least_le")
       (inst - "restrict[[real, real], [T, T], bool](<=)" "Sl2!1" "x!1")
       (expand "restrict" -1 :occurrence 1)
       (assert))
      ("2"
       (lemma "least_le")
       (inst - "restrict[[real, real], [T, T], bool](<=)" "Sl1!1" "x!1")
       (expand "restrict" -1 :occurrence 1)
       (assert))))
    ("3"
     (expand* "min" "intersection" "member")
     (lift-if)
     (prop)
     (("1"
       (lemma "least_le")
       (inst - "restrict[[real, real], [T, T], bool](<=)" "Sl2!1" "x!1")
       (expand "restrict" -1 :occurrence 1)
       (assert))
      ("2"
       (lemma "least_le")
       (inst - "restrict[[real, real], [T, T], bool](<=)" "Sl1!1" "x!1")
       (expand "restrict" -1 :occurrence 1)
       (assert))))))


proof_type: j_proof
decl_type: tcc
library: orders
theory: bounded_integers
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skolem-typepred)
   (expand* "non_empty_bounded_above?" "bounded_above?")
   (flatten)
   (rewrite "nonempty_exists")
   (skosimp* :preds? t)
   (hide -2 -1)
   (lemma "non_empty_bounded_above_has_greatest_lem")
   (inst?)
   (inst?)
   (inst - "t!1 - x!2")
   (("1" (assert))
    ("2" (expand* "upper_bound?" "restrict") (inst - "x!2") (assert))))


proof_type: j_proof
decl_type: tcc
library: orders
theory: bounded_integers
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skolem-typepred)
   (expand* "non_empty_bounded_below?" "bounded_below?")
   (flatten)
   (rewrite "nonempty_exists")
   (skosimp* :preds? t)
   (hide -2 -1)
   (lemma "non_empty_bounded_below_has_least_lem")
   (inst?)
   (inst?)
   (inst - "x!2 - t!1")
   (("1" (assert))
    ("2" (expand* "lower_bound?" "restrict") (inst - "x!2") (assert))))


proof_type: t_proof
decl_type: tcc
library: orders
theory: bounded_integers
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (rewrite "non_empty_bounded_below_has_least")
   (expand "non_empty_bounded_below?")
   (propax))


proof_type: t_proof
decl_type: tcc
library: orders
theory: bounded_integers
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (rewrite "non_empty_bounded_above_has_greatest")
   (expand "non_empty_bounded_above?")
   (propax))


proof_type: j_proof
decl_type: tcc
library: orders
theory: bounded_nats
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skolem-typepred)
   (use "non_empty_bounded_below_has_least")
   (expand* "non_empty_bounded_below?" "nonempty?" "empty?" "member")
   (skolem!)
   (lemma "non_empty_finite_bounded_below")
   (inst - "{t: T |  x!1(t) AND t <= x!2}")
   (("1"
     (expand "non_empty_bounded_below?")
     (flatten)
     (expand* "bounded_below?" "lower_bound?" "restrict")
     (skolem!)
     (inst + "t!1")
     (skolem!)
     (inst-cp - "x!2")
     (inst - "r!1")
     (assert))
    ("2"
     (split)
     (("1"
       (expand "is_finite")
       (inst + "1 + x!2" "LAMBDA (n: ({t: T | x!1(t) AND t <= x!2})): n")
       (expand "injective?")
       (skosimp))
      ("2" (expand* "empty?" "member") (inst?) (assert))))))


proof_type: f_proof
decl_type: formula
library: orders
theory: ordered_nat
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (ground)
   (("1"
     (expand* "has_greatest?" "greatest?" "restrict" "below"
      "irreflexive_kernel" "difference" "member" "upper_bound?")
     (inst + "n!1 - 1")
     (reduce))
    ("2"
     (rewrite "greatest_def")
     (expand* "restrict" "greatest?" "below" "irreflexive_kernel"
      "difference" "member" "upper_bound?"))))


proof_type: f_proof
decl_type: formula
library: orders
theory: ordered_nat
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp :preds? t)
   (expand* "full?" "prefix?" "member" "is_finite" "injective?"
    "restrict")
   (skolem!)
   (inst + "x!1" "LAMBDA (x: (pre!1)): x")
   (("1" (skosimp)) ("2" (skolem!) (inst - "x!1" "x!2") (assert))))


proof_type: f_proof
decl_type: formula
library: orders
theory: ordered_nat
signature: nil
run_date: Unknown date
run_time: ----
status: proved-incomplete
description: nil
script:
  (""
   (measure-induct+ "IF is_finite(pre) THEN card(pre) ELSE 0 ENDIF"
    ("pre"))
   (typepred "x!1")
   (case "has_greatest?[nat](x!1, restrict[[real, real], [nat, nat], boolean](<=))")
   (("1"
     (inst -
      "remove(greatest[nat](restrict[[real, real], [nat, nat], boolean](<=))(x!1), x!1)")
     (("1"
       (use "finite_remove[nat]")
       (assert)
       (use "card_remove[nat]")
       (typepred
        "greatest[nat](restrict[[real, real], [nat, nat], boolean](<=))(x!1)")
       (expand "greatest?")
       (assert)
       (replace -3)
       (decompose-equality -7)
       (apply-extensionality :hide? t)
       (expand* "below" "irreflexive_kernel" "difference" "remove"
        "empty?" "member")
       (expand "restrict" +)
       (iff)
       (ground)
       (("1"
         (inst - "x!2 - 1")
         (expand "restrict" -2 :occurrence 2)
         (expand* "prefix?" "member")
         (expand "restrict" -7)
         (inst - "x!2 - 1" "x!2")
         (assert)
         (assert)
         (expand "upper_bound?")
         (expand "restrict" -3 :occurrence 1)
         (inst - "x!2")
         (assert))
        ("2"
         (inst - "x!2 - 1")
         (expand "restrict" -3 :occurrence 2)
         (expand* "prefix?" "member")
         (expand "restrict" -8)
         (inst - "x!2 - 1" "x!2")
         (assert)
         (assert)
         (expand "upper_bound?")
         (expand "restrict" -4 :occurrence 1)
         (inst - "x!2")
         (assert))
        ("3"
         (case-replace "x!2 = 0")
         (("1"
           (expand* "has_greatest?" "greatest?" "upper_bound?" "prefix?"
            "member" "restrict")
           (skosimp)
           (inst - "0" "t!1")
           (assert))
          ("2"
           (inst - "x!2 - 1")
           (("1"
             (expand "restrict" -2 :occurrence 2)
             (assert)
             (flatten)
             (expand "upper_bound?")
             (expand "restrict" -4 :occurrence 1)
             (inst - "x!2 - 1")
             (expand* "prefix?" "member")
             (inst - "x!2"
              "greatest[nat](restrict[[real, real], [nat, nat], boolean](<=))(x!1)")
             (expand "restrict" -8 :occurrence 1)
             (assert))
            ("2" (assert))))))))
      ("2"
       (expand* "prefix?" "member")
       (skosimp :preds? t)
       (expand* "remove" "member")
       (expand "restrict" (-3 -5))
       (flatten)
       (inst - "t!1" "r!1")
       (ground)
       (typepred
        "greatest[nat](restrict[[real, real], [nat, nat], boolean](<=))(x!1)")
       (expand* "greatest?" "upper_bound?")
       (expand "restrict" -2 :occurrence 1)
       (inst - "r!1")
       (assert))))
    ("2"
     (use "total_order_restrict[real, nat]")
     (use "non_empty_finite_has_greatest")
     (use "empty_card")
     (assert)
     (replace -1)
     (apply-extensionality :hide? t)
     (expand* "below" "irreflexive_kernel" "difference" "remove" "empty?"
      "member")
     (inst?)
     (assert)
     (expand "restrict" -1)
     (flatten)
     (assert))))


proof_type: f_proof
decl_type: formula
library: orders
theory: ordered_nat
signature: nil
run_date: Unknown date
run_time: ----
status: proved-incomplete
description: nil
script:
  (""
   (skosimp)
   (forward-chain "prefix_below")
   (decompose-equality)
   (apply-extensionality :hide? t)
   (("1"
     (inst - "x!1")
     (expand* "below" "irreflexive_kernel" "difference" "upto"
      "reflexive_closure" "union" "remove" "empty?" "member" "restrict")
     (iff)
     (ground))
    ("2" (forward-chain "prefix_upto_TCC1"))))


proof_type: f_proof
decl_type: formula
library: orders
theory: ordered_nat
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (induct "n")
   (("1" (grind :rewrites ("card_empty?")))
    ("2"
     (skosimp)
     (case "below(j!1 + 1) = add(j!1, below(j!1))")
     (("1"
       (use "card_add")
       (expand "below" -1 :occurrence 3)
       (expand* "irreflexive_kernel" "difference" "member")
       (assert))
      ("2"
       (apply-extensionality :hide? t)
       (expand* "below" "irreflexive_kernel" "difference" "add" "member"
        "restrict")
       (iff)
       (ground))))
    ("3" (skolem!) (use "below_is_finite"))))


proof_type: f_proof
decl_type: formula
library: orders
theory: ordered_nat
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (induct "n")
   (("1"
     (rewrite "card_one")
     (inst + "0")
     (apply-extensionality :hide? t)
     (expand* "upto" "reflexive_closure" "union" "member" "singleton"
      "restrict")
     (iff)
     (ground))
    ("2"
     (skosimp)
     (case "upto(j!1 + 1) = add(j!1 + 1, upto(j!1))")
     (("1"
       (use "card_add")
       (expand "upto" -1 :occurrence 3)
       (expand* "reflexive_closure" "union" "member" "restrict")
       (assert))
      ("2"
       (apply-extensionality :hide? t)
       (expand* "upto" "reflexive_closure" "union" "add" "member"
        "restrict")
       (iff)
       (ground))))
    ("3" (skolem!) (use "upto_is_finite"))))


proof_type: f_proof
decl_type: formula
library: orders
theory: ordered_nat
signature: nil
run_date: Unknown date
run_time: ----
status: proved-incomplete
description: nil
script:
  (""
   (skosimp :preds? t)
   (expand* "suffix?" "member" "restrict")
   (assert)
   (lemma "non_empty_finite_has_greatest")
   (inst - "suf!1" "lesseq")
   (expand* "has_greatest?" "greatest?" "upper_bound?" "restrict")
   (skosimp)
   (inst - "t!1 + 1" "t!1")
   (assert)
   (inst - "1 + t!1")
   (assert))


proof_type: f_proof
decl_type: formula
library: orders
theory: ordered_nat
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp :preds? t)
   (use "every_nonempty_set_has_least")
   (("1"
     (inst +
      "least(restrict[[real, real], [nat, nat], boolean](<=))(suf!1)")
     (apply-extensionality :hide? t)
     (expand* "upfrom" "reflexive_closure" "union" "suffix?" "member")
     (typepred
      "least(restrict[[real, real], [nat, nat], boolean](<=))(suf!1)")
     (expand "least?")
     (flatten)
     (inst - "x!1"
      "least(restrict[[real, real], [nat, nat], boolean](<=))(suf!1)")
     (expand "restrict" -4 :occurrence 1)
     (expand "restrict" 1 :occurrence 1)
     (iff)
     (smash)
     (expand "lower_bound?")
     (expand "restrict" -2 :occurrence 1)
     (inst - "x!1"))
    ("2" (expand "nonempty?") (propax))))


proof_type: f_proof
decl_type: formula
library: orders
theory: ordered_nat
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skosimp)
   (use "suffix_upfrom")
   (assert)
   (skolem!)
   (case-replace "n!1 = 0")
   (("1"
     (expand* "full?" "member")
     (skolem!)
     (decompose-equality)
     (inst - "x!1")
     (iff)
     (assert)
     (expand* "upfrom" "above" "reflexive_closure" "union" "member"
      "restrict"))
    ("2"
     (assert)
     (inst + "n!1 - 1")
     (apply-extensionality 4 :hide? t)
     (decompose-equality)
     (inst - "x!1")
     (iff)
     (expand* "upfrom" "reflexive_closure" "union" "above"
      "irreflexive_kernel" "difference" "member" "restrict")
     (ground))))


proof_type: f_proof
decl_type: formula
library: orders
theory: ordered_nat
signature: nil
run_date: Unknown date
run_time: ----
status: proved-incomplete
description: nil
script:
  (""
   (skosimp*)
   (forward-chain "prefix_below")
   (decompose-equality)
   (lemma "surjection_n_to_m_var")
   (inst - "1 + card(pre1!1)" "card(pre1!1)")
   (assert)
   (assert)
   (inst +
    "LAMBDA (x: below(card(pre1!1))): IF f!1(x) < 1 + card(pre1!1) THEN f!1(x) ELSE 0 ENDIF")
   (("1"
     (expand* "surjective?" "full?" "member")
     (skolem-typepred)
     (inst -4 "y!1")
     (inst -5 "y!1")
     (skolem!)
     (inst + "x!1")
     (("1" (assert))
      ("2"
       (expand* "below" "irreflexive_kernel" "difference" "member"
        "restrict")
       (inst - "x!1")
       (assert)
       (flatten)
       (assert))))
    ("2"
     (skosimp :preds? t)
     (inst - "x!1")
     (expand* "below" "irreflexive_kernel" "difference" "member"
      "restrict"))
    ("3"
     (skosimp :preds? t)
     (inst - "x!1")
     (expand* "below" "irreflexive_kernel" "difference" "member"
      "restrict"))))


proof_type: f_proof
decl_type: formula
library: orders
theory: ordered_nat
signature: nil
run_date: Unknown date
run_time: ----
status: proved-incomplete
description: nil
script:
  (""
   (skosimp*)
   (lemma "prefix_finite")
   (inst-cp - "pre2!1")
   (inst - "pre1!1")
   (prop)
   (("1"
     (lemma "prefix_below")
     (inst-cp - "pre2!1")
     (inst - "pre1!1")
     (assert)
     (replace -1 +)
     (replace -2 +)
     (apply-extensionality :hide? t)
     (decompose-equality)
     (decompose-equality)
     (expand* "below" "irreflexive_kernel" "difference" "member"
      "restrict")
     (iff)
     (case "card(pre1!1) = card(pre2!1)")
     (("1" (assert))
      ("2"
       (hide 2)
       (lemma "bijection_n_to_m" ("m" "card(pre2!1)" "n" "card(pre1!1)"))
       (assert)
       (inst + "f!1")
       (("1"
         (expand* "bijective?" "injective?" "surjective?")
         (prop)
         (("1" (skosimp) (inst - "x1!1" "x2!1") (assert))
          ("2"
           (skolem!)
           (inst - "y!1")
           (iff)
           (assert)
           (inst -6 "y!1")
           (skolem!)
           (inst - "x!2")
           (assert)
           (flatten)
           (inst + "x!2")
           (assert))))
        ("2"
         (split)
         (("1" (skolem!) (inst -2 "x!2") (iff) (ground))
          ("2" (skolem!) (inst - "f!1(x1!1)") (iff) (ground))))))))
    ("2"
     (forward-chain "prefix_finite_full")
     (inst - "f!1")
     (expand "bijective?")
     (flatten))
    ("3"
     (forward-chain "prefix_finite_full")
     (expand* "full?" "member")
     (inst -3 "0")
     (assert)
     (lemma "bijective_inverse_is_bijective[(pre1!1), (pre2!1)]")
     (("1"
       (inst - "f!1")
       (inst - "inverse(f!1)")
       (("1" (expand "bijective?") (flatten)) ("2" (inst?))))
      ("2" (inst?))))
    ("4"
     (apply-extensionality :hide? t)
     (expand* "full?" "member")
     (inst - "x!1")
     (inst - "x!1")
     (iff)
     (assert))))


proof_type: j_proof
decl_type: tcc
library: orders
theory: ordered_nat
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skolem!)
   (expand* "restrict" "has_greatest?" "greatest?" "upto"
    "reflexive_closure" "union" "member" "upper_bound?")
   (inst + "n!1")
   (reduce))


proof_type: j_proof
decl_type: tcc
library: orders
theory: ordered_nat
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skolem!)
   (expand* "restrict" "has_least?" "least?" "above" "irreflexive_kernel"
    "difference" "member" "lower_bound?")
   (inst + "n!1 + 1")
   (reduce))


proof_type: j_proof
decl_type: tcc
library: orders
theory: ordered_nat
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skolem!)
   (expand* "restrict" "has_least?" "least?" "upfrom" "reflexive_closure"
    "union" "member" "lower_bound?")
   (inst + "n!1")
   (reduce))


proof_type: j_proof
decl_type: tcc
library: orders
theory: ordered_nat
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skolem!)
   (expand "is_finite")
   (inst + "n!1"
    "LAMBDA (x: (below(n!1, restrict[[real, real], [nat, nat], boolean](<=)))): x")
   (("1" (expand "injective?") (skosimp)) ("2" (grind))))


proof_type: j_proof
decl_type: tcc
library: orders
theory: ordered_nat
signature: nil
run_date: Unknown date
run_time: ----
status: proved-complete
description: nil
script:
  (""
   (skolem!)
   (expand "is_finite")
   (inst + "1 + n!1"
    "LAMBDA (x: (upto(n!1, restrict[[real, real], [nat, nat], boolean](<=)))): x")
   (("1" (expand "injective?") (skosimp)) ("2" (grind))))


proof_type: f_proof
decl_type: formula
library: orders
theory: ordered_int
signature: nil
run_date: Unknown date
run_time: ----
status: proved-incomplete
description: nil
script:
  (""
   (skosimp :preds? t)
   (expand* "prefix?" "member" "restrict")
   (assert)
   (lemma "non_empty_finite_has_least")
   (inst - "pre!1" "<=")
   (expand* "restrict" "has_least?" "least?" "lower_bound?")
   (skosimp)
   (inst - "t!1 - 1" "t!1")
   (assert)
   (inst - "t!1 - 1")
   (assert))


proof_type: f_proof
decl_type: formula
library: orders
theory: ordered_int
signature: nil
run_date: Unknown date
run_time: ----
status: proved-incomplete
description: nil
script:
  (""
   (skosimp :preds? t)
   (case "has_greatest?[int](pre!1, restrict[[real, real], [int, int], boolean](<=))")
   (("1"
     (inst +
      "greatest[int](restrict[[real, real], [int, int], boolean](<=))(pre!1) + 1")
     (apply-extensionality 3 :hide? t)
     (expand* "prefix?" "below" "irreflexive_kernel" "difference"
      "member")
     (typepred
      "greatest[int](restrict[[real, real], [int, int], boolean](<=))(pre!1)")
     (expand "greatest?")
     (flatten)
     (inst - "x!1"
      "greatest[int](restrict[[real, real], [int, int], boolean](<=))(pre!1)")
     (expand* "restrict" "upper_bound?")
     (inst - "x!1")
     (("1" (assert)) ("2" (smash))))
    ("2"
     (expand* "has_greatest?" "greatest?" "upper_bound?" "full?" "empty?"
      "member" "restrict")
     (skosimp*)
     (case "x!1 < x!2 AND has_greatest?({i: int | pre!1(i) AND x!1 <=i AND i <= x!2}, restrict[[real, real], [int, int], boolean](<=))")
     (("1"
       (flatten)
       (inst +
        "greatest(restrict[[real, real], [int, int], boolean](<=))({i: int | pre!1(i) AND x!1 <= i AND i <= x!2})")
       (assert)
       (typepred
        "greatest(restrict[[real, real], [int, int], boolean](<=))({i: int | pre!1(i) AND x!1 <= i AND i <= x!2})")
       (expand* "greatest?" "upper_bound?")
       (flatten)
       (expand "restrict" -4 :occurrence 1)
       (assert)
       (skolem!)
       (inst - "r!1")
       (expand* "prefix?" "member")
       (inst - "x!2" "r!1")
       (assert))
      ("2"
       (expand* "prefix?" "member")
       (inst - "x!2" "x!1")
       (assert)
       (assert)
       (lemma "non_empty_finite_has_greatest")
       (inst - "{i: int | pre!1(i) AND x!1 <= i AND i <= x!2}"
        "restrict[[real, real], [int, int], boolean](<=)")
       (split)
       (("1"
         (expand "is_finite")
         (inst + "x!2 - x!1 + 1"
          "LAMBDA (x: ({i: int | pre!1(i) AND x!1 <= i AND i <= x!2})): x - x!1")
         (expand "injective?")
         (skosimp))
        ("2" (expand* "empty?" "member") (inst - "x!1") (assert))))))))


